From 45d4cd52a8194f2ef9e0383cfb2e2a35634af6ff Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Thu, 16 Jun 2022 12:47:52 +0200 Subject: full xtal conversion --- src/devices/bus/a1bus/a1bus.cpp | 8 +- src/devices/bus/a1bus/a1bus.h | 12 +- src/devices/bus/a1bus/a1cassette.cpp | 8 +- src/devices/bus/a1bus/a1cffa.cpp | 8 +- src/devices/bus/a2bus/4play.cpp | 8 +- src/devices/bus/a2bus/a2alfam2.cpp | 22 +-- src/devices/bus/a2bus/a2applicard.cpp | 10 +- src/devices/bus/a2bus/a2arcadebd.cpp | 10 +- src/devices/bus/a2bus/a2bus.cpp | 8 +- src/devices/bus/a2bus/a2bus.h | 12 +- src/devices/bus/a2bus/a2cffa.cpp | 12 +- src/devices/bus/a2bus/a2corvus.cpp | 6 +- src/devices/bus/a2bus/a2corvus.h | 4 +- src/devices/bus/a2bus/a2diskiing.cpp | 8 +- src/devices/bus/a2bus/a2diskiing.h | 8 +- src/devices/bus/a2bus/a2dx1.cpp | 12 +- src/devices/bus/a2bus/a2eauxslot.cpp | 8 +- src/devices/bus/a2bus/a2eauxslot.h | 10 +- src/devices/bus/a2bus/a2echoii.cpp | 10 +- src/devices/bus/a2bus/a2eext80col.cpp | 4 +- src/devices/bus/a2bus/a2eext80col.h | 4 +- src/devices/bus/a2bus/a2eramworks3.cpp | 8 +- src/devices/bus/a2bus/a2eramworks3.h | 8 +- src/devices/bus/a2bus/a2estd80col.cpp | 4 +- src/devices/bus/a2bus/a2estd80col.h | 4 +- src/devices/bus/a2bus/a2hsscsi.cpp | 4 +- src/devices/bus/a2bus/a2hsscsi.h | 4 +- src/devices/bus/a2bus/a2iwm.cpp | 6 +- src/devices/bus/a2bus/a2iwm.h | 6 +- src/devices/bus/a2bus/a2mcms.cpp | 12 +- src/devices/bus/a2bus/a2mcms.h | 10 +- src/devices/bus/a2bus/a2memexp.cpp | 12 +- src/devices/bus/a2bus/a2midi.cpp | 16 +- src/devices/bus/a2bus/a2mockingboard.cpp | 46 ++--- src/devices/bus/a2bus/a2parprn.cpp | 4 +- src/devices/bus/a2bus/a2pic.cpp | 4 +- src/devices/bus/a2bus/a2sam.cpp | 4 +- src/devices/bus/a2bus/a2scsi.cpp | 4 +- src/devices/bus/a2bus/a2scsi.h | 4 +- src/devices/bus/a2bus/a2sd.cpp | 8 +- src/devices/bus/a2bus/a2sd.h | 4 +- src/devices/bus/a2bus/a2softcard.cpp | 4 +- src/devices/bus/a2bus/a2softcard.h | 4 +- src/devices/bus/a2bus/a2ssc.cpp | 14 +- src/devices/bus/a2bus/a2superdrive.cpp | 8 +- src/devices/bus/a2bus/a2swyft.cpp | 8 +- src/devices/bus/a2bus/a2themill.cpp | 6 +- src/devices/bus/a2bus/a2themill.h | 4 +- src/devices/bus/a2bus/a2thunderclock.cpp | 8 +- src/devices/bus/a2bus/a2ultraterm.cpp | 12 +- src/devices/bus/a2bus/a2videoterm.cpp | 24 +-- src/devices/bus/a2bus/a2vulcan.cpp | 16 +- src/devices/bus/a2bus/a2zipdrive.cpp | 12 +- src/devices/bus/a2bus/ace2x00.cpp | 6 +- src/devices/bus/a2bus/ace2x00.h | 6 +- src/devices/bus/a2bus/agat7langcard.cpp | 4 +- src/devices/bus/a2bus/agat7langcard.h | 4 +- src/devices/bus/a2bus/agat7ports.cpp | 6 +- src/devices/bus/a2bus/agat7ports.h | 4 +- src/devices/bus/a2bus/agat7ram.cpp | 4 +- src/devices/bus/a2bus/agat7ram.h | 4 +- src/devices/bus/a2bus/agat840k_hle.cpp | 4 +- src/devices/bus/a2bus/agat840k_hle.h | 4 +- src/devices/bus/a2bus/agat_fdc.cpp | 4 +- src/devices/bus/a2bus/agat_fdc.h | 4 +- src/devices/bus/a2bus/booti.cpp | 10 +- src/devices/bus/a2bus/byte8251.cpp | 6 +- src/devices/bus/a2bus/ccs7710.cpp | 2 +- src/devices/bus/a2bus/ccs7710.h | 2 +- src/devices/bus/a2bus/cmsscsi.cpp | 4 +- src/devices/bus/a2bus/cmsscsi.h | 4 +- src/devices/bus/a2bus/computereyes2.cpp | 8 +- src/devices/bus/a2bus/corvfdc01.cpp | 4 +- src/devices/bus/a2bus/corvfdc01.h | 4 +- src/devices/bus/a2bus/corvfdc02.cpp | 4 +- src/devices/bus/a2bus/corvfdc02.h | 4 +- src/devices/bus/a2bus/excel9.cpp | 6 +- src/devices/bus/a2bus/excel9.h | 4 +- src/devices/bus/a2bus/ezcgi.cpp | 24 +-- src/devices/bus/a2bus/grafex.cpp | 8 +- src/devices/bus/a2bus/grappler.cpp | 24 +-- src/devices/bus/a2bus/lancegs.cpp | 10 +- src/devices/bus/a2bus/laser128.cpp | 6 +- src/devices/bus/a2bus/laser128.h | 6 +- src/devices/bus/a2bus/mouse.cpp | 12 +- src/devices/bus/a2bus/nippelclock.cpp | 4 +- src/devices/bus/a2bus/nippelclock.h | 4 +- src/devices/bus/a2bus/pc_xporter.cpp | 14 +- src/devices/bus/a2bus/prodosromdrive.cpp | 8 +- src/devices/bus/a2bus/q68.cpp | 6 +- src/devices/bus/a2bus/q68.h | 6 +- src/devices/bus/a2bus/ramcard128k.cpp | 4 +- src/devices/bus/a2bus/ramcard128k.h | 4 +- src/devices/bus/a2bus/ramcard16k.cpp | 4 +- src/devices/bus/a2bus/ramcard16k.h | 4 +- src/devices/bus/a2bus/sider.cpp | 6 +- src/devices/bus/a2bus/sider.h | 6 +- src/devices/bus/a2bus/softcard3.cpp | 4 +- src/devices/bus/a2bus/softcard3.h | 4 +- src/devices/bus/a2bus/ssbapple.cpp | 10 +- src/devices/bus/a2bus/ssprite.cpp | 12 +- src/devices/bus/a2bus/suprterminal.cpp | 8 +- src/devices/bus/a2bus/timemasterho.cpp | 12 +- src/devices/bus/a2bus/titan3plus2.cpp | 4 +- src/devices/bus/a2bus/titan3plus2.h | 4 +- src/devices/bus/a2bus/transwarp.cpp | 4 +- src/devices/bus/a2bus/transwarp.h | 4 +- src/devices/bus/a2bus/uniprint.cpp | 4 +- src/devices/bus/a2bus/uthernet.cpp | 4 +- src/devices/bus/a2gameio/computereyes.cpp | 4 +- src/devices/bus/a2gameio/gameio.cpp | 2 +- src/devices/bus/a2gameio/gameio.h | 4 +- src/devices/bus/a2gameio/gizmo.cpp | 4 +- src/devices/bus/a2gameio/joyport.cpp | 4 +- src/devices/bus/a2gameio/joystick.cpp | 4 +- src/devices/bus/a2gameio/paddles.cpp | 4 +- src/devices/bus/a7800/a78_slot.cpp | 2 +- src/devices/bus/a7800/a78_slot.h | 4 +- src/devices/bus/a7800/cpuwiz.cpp | 8 +- src/devices/bus/a7800/cpuwiz.h | 8 +- src/devices/bus/a7800/hiscore.cpp | 2 +- src/devices/bus/a7800/hiscore.h | 2 +- src/devices/bus/a7800/rom.cpp | 38 ++-- src/devices/bus/a7800/rom.h | 38 ++-- src/devices/bus/a7800/xboard.cpp | 6 +- src/devices/bus/a7800/xboard.h | 6 +- src/devices/bus/a800/a800_slot.cpp | 8 +- src/devices/bus/a800/a800_slot.h | 14 +- src/devices/bus/a800/a8sio.cpp | 2 +- src/devices/bus/a800/a8sio.h | 6 +- src/devices/bus/a800/atari1050.cpp | 2 +- src/devices/bus/a800/atari1050.h | 2 +- src/devices/bus/a800/atari810.cpp | 2 +- src/devices/bus/a800/atari810.h | 2 +- src/devices/bus/a800/cassette.cpp | 4 +- src/devices/bus/a800/cassette.h | 4 +- src/devices/bus/a800/oss.cpp | 8 +- src/devices/bus/a800/oss.h | 8 +- src/devices/bus/a800/rom.cpp | 22 +-- src/devices/bus/a800/rom.h | 24 +-- src/devices/bus/a800/sparta.cpp | 2 +- src/devices/bus/a800/sparta.h | 2 +- src/devices/bus/abcbus/abc890.cpp | 14 +- src/devices/bus/abcbus/abc890.h | 14 +- src/devices/bus/abcbus/abcbus.cpp | 2 +- src/devices/bus/abcbus/abcbus.h | 4 +- src/devices/bus/abcbus/cadmouse.cpp | 2 +- src/devices/bus/abcbus/cadmouse.h | 2 +- src/devices/bus/abcbus/db4106.cpp | 4 +- src/devices/bus/abcbus/db4106.h | 2 +- src/devices/bus/abcbus/db4107.cpp | 6 +- src/devices/bus/abcbus/db4107.h | 2 +- src/devices/bus/abcbus/db4112.cpp | 4 +- src/devices/bus/abcbus/db4112.h | 2 +- src/devices/bus/abcbus/fd2.cpp | 2 +- src/devices/bus/abcbus/fd2.h | 2 +- src/devices/bus/abcbus/lux10828.cpp | 2 +- src/devices/bus/abcbus/lux10828.h | 2 +- src/devices/bus/abcbus/lux21046.cpp | 14 +- src/devices/bus/abcbus/lux21046.h | 14 +- src/devices/bus/abcbus/lux21056.cpp | 2 +- src/devices/bus/abcbus/lux21056.h | 2 +- src/devices/bus/abcbus/lux4105.cpp | 2 +- src/devices/bus/abcbus/lux4105.h | 2 +- src/devices/bus/abcbus/memcard.cpp | 2 +- src/devices/bus/abcbus/memcard.h | 2 +- src/devices/bus/abcbus/ram.cpp | 2 +- src/devices/bus/abcbus/ram.h | 2 +- src/devices/bus/abcbus/sio.cpp | 4 +- src/devices/bus/abcbus/sio.h | 2 +- src/devices/bus/abcbus/slutprov.cpp | 2 +- src/devices/bus/abcbus/slutprov.h | 2 +- src/devices/bus/abcbus/ssa.cpp | 2 +- src/devices/bus/abcbus/ssa.h | 2 +- src/devices/bus/abcbus/uni800.cpp | 2 +- src/devices/bus/abcbus/uni800.h | 2 +- src/devices/bus/abcbus/unidisk.cpp | 4 +- src/devices/bus/abcbus/unidisk.h | 2 +- src/devices/bus/abckb/abc77.cpp | 6 +- src/devices/bus/abckb/abc77.h | 6 +- src/devices/bus/abckb/abc800kb.cpp | 2 +- src/devices/bus/abckb/abc800kb.h | 2 +- src/devices/bus/abckb/abc99.cpp | 4 +- src/devices/bus/abckb/abc99.h | 2 +- src/devices/bus/abckb/abckb.cpp | 2 +- src/devices/bus/abckb/abckb.h | 4 +- src/devices/bus/acorn/atom/discpack.cpp | 2 +- src/devices/bus/acorn/atom/discpack.h | 2 +- src/devices/bus/acorn/atom/econet.cpp | 6 +- src/devices/bus/acorn/atom/econet.h | 2 +- src/devices/bus/acorn/atom/sid.cpp | 2 +- src/devices/bus/acorn/atom/sid.h | 2 +- src/devices/bus/acorn/bus.cpp | 4 +- src/devices/bus/acorn/bus.h | 6 +- src/devices/bus/acorn/cms/4080term.cpp | 6 +- src/devices/bus/acorn/cms/4080term.h | 2 +- src/devices/bus/acorn/cms/fdc.cpp | 2 +- src/devices/bus/acorn/cms/fdc.h | 2 +- src/devices/bus/acorn/cms/hires.cpp | 2 +- src/devices/bus/acorn/cms/hires.h | 2 +- src/devices/bus/acorn/cms/ieee.cpp | 2 +- src/devices/bus/acorn/cms/ieee.h | 2 +- src/devices/bus/acorn/system/32k.cpp | 2 +- src/devices/bus/acorn/system/32k.h | 2 +- src/devices/bus/acorn/system/8k.cpp | 2 +- src/devices/bus/acorn/system/8k.h | 2 +- src/devices/bus/acorn/system/cass.cpp | 4 +- src/devices/bus/acorn/system/cass.h | 2 +- src/devices/bus/acorn/system/econet.cpp | 4 +- src/devices/bus/acorn/system/econet.h | 2 +- src/devices/bus/acorn/system/fdc.cpp | 2 +- src/devices/bus/acorn/system/fdc.h | 2 +- src/devices/bus/acorn/system/vdu40.cpp | 2 +- src/devices/bus/acorn/system/vdu40.h | 2 +- src/devices/bus/acorn/system/vdu80.cpp | 2 +- src/devices/bus/acorn/system/vdu80.h | 2 +- src/devices/bus/acorn/system/vib.cpp | 4 +- src/devices/bus/acorn/system/vib.h | 2 +- src/devices/bus/adam/adamlink.cpp | 2 +- src/devices/bus/adam/adamlink.h | 2 +- src/devices/bus/adam/exp.cpp | 2 +- src/devices/bus/adam/exp.h | 4 +- src/devices/bus/adam/ide.cpp | 2 +- src/devices/bus/adam/ide.h | 2 +- src/devices/bus/adam/ram.cpp | 2 +- src/devices/bus/adam/ram.h | 2 +- src/devices/bus/adamnet/adamnet.cpp | 4 +- src/devices/bus/adamnet/adamnet.h | 6 +- src/devices/bus/adamnet/ddp.cpp | 2 +- src/devices/bus/adamnet/ddp.h | 2 +- src/devices/bus/adamnet/fdc.cpp | 2 +- src/devices/bus/adamnet/fdc.h | 2 +- src/devices/bus/adamnet/kb.cpp | 2 +- src/devices/bus/adamnet/kb.h | 2 +- src/devices/bus/adamnet/printer.cpp | 2 +- src/devices/bus/adamnet/printer.h | 2 +- src/devices/bus/adamnet/spi.cpp | 2 +- src/devices/bus/adamnet/spi.h | 2 +- src/devices/bus/adb/a9m0330.cpp | 2 +- src/devices/bus/adb/a9m0330.h | 2 +- src/devices/bus/adb/a9m0331.cpp | 4 +- src/devices/bus/adb/a9m0331.h | 2 +- src/devices/bus/adb/adb.cpp | 4 +- src/devices/bus/adb/adb.h | 6 +- src/devices/bus/adb/adbhle.cpp | 2 +- src/devices/bus/adb/adbhle.h | 2 +- src/devices/bus/amiga/keyboard/a1200.cpp | 2 +- src/devices/bus/amiga/keyboard/a1200.h | 2 +- src/devices/bus/amiga/keyboard/a2000.cpp | 12 +- src/devices/bus/amiga/keyboard/keyboard.cpp | 2 +- src/devices/bus/amiga/keyboard/keyboard.h | 4 +- src/devices/bus/amiga/keyboard/mitsumi.cpp | 80 ++++---- src/devices/bus/amiga/zorro/a2052.cpp | 2 +- src/devices/bus/amiga/zorro/a2052.h | 2 +- src/devices/bus/amiga/zorro/a2058.cpp | 2 +- src/devices/bus/amiga/zorro/a2058.h | 2 +- src/devices/bus/amiga/zorro/a2065.cpp | 2 +- src/devices/bus/amiga/zorro/a2065.h | 2 +- src/devices/bus/amiga/zorro/a2232.cpp | 2 +- src/devices/bus/amiga/zorro/a2232.h | 2 +- src/devices/bus/amiga/zorro/a590.cpp | 12 +- src/devices/bus/amiga/zorro/a590.h | 6 +- src/devices/bus/amiga/zorro/action_replay.cpp | 8 +- src/devices/bus/amiga/zorro/action_replay.h | 8 +- src/devices/bus/amiga/zorro/buddha.cpp | 2 +- src/devices/bus/amiga/zorro/buddha.h | 2 +- src/devices/bus/amiga/zorro/zorro.cpp | 14 +- src/devices/bus/amiga/zorro/zorro.h | 16 +- src/devices/bus/apf/rom.cpp | 8 +- src/devices/bus/apf/rom.h | 8 +- src/devices/bus/apf/slot.cpp | 2 +- src/devices/bus/apf/slot.h | 4 +- src/devices/bus/apricot/expansion/expansion.cpp | 6 +- src/devices/bus/apricot/expansion/expansion.h | 8 +- src/devices/bus/apricot/expansion/ram.cpp | 6 +- src/devices/bus/apricot/expansion/ram.h | 6 +- src/devices/bus/apricot/expansion/winchester.cpp | 8 +- src/devices/bus/apricot/expansion/winchester.h | 2 +- src/devices/bus/apricot/keyboard/hle.cpp | 6 +- src/devices/bus/apricot/keyboard/hle.h | 2 +- src/devices/bus/apricot/keyboard/keyboard.cpp | 2 +- src/devices/bus/apricot/keyboard/keyboard.h | 4 +- src/devices/bus/apricot/video/mono.cpp | 2 +- src/devices/bus/apricot/video/mono.h | 2 +- src/devices/bus/apricot/video/video.cpp | 2 +- src/devices/bus/apricot/video/video.h | 4 +- src/devices/bus/aquarius/c1541.cpp | 2 +- src/devices/bus/aquarius/c1541.h | 2 +- src/devices/bus/aquarius/mini.cpp | 2 +- src/devices/bus/aquarius/mini.h | 2 +- src/devices/bus/aquarius/qdisk.cpp | 2 +- src/devices/bus/aquarius/qdisk.h | 2 +- src/devices/bus/aquarius/ram.cpp | 10 +- src/devices/bus/aquarius/ram.h | 10 +- src/devices/bus/aquarius/rom.cpp | 2 +- src/devices/bus/aquarius/rom.h | 2 +- src/devices/bus/aquarius/slot.cpp | 2 +- src/devices/bus/aquarius/slot.h | 4 +- src/devices/bus/aquarius/supercart.cpp | 2 +- src/devices/bus/aquarius/supercart.h | 2 +- src/devices/bus/arcadia/rom.cpp | 6 +- src/devices/bus/arcadia/rom.h | 6 +- src/devices/bus/arcadia/slot.cpp | 2 +- src/devices/bus/arcadia/slot.h | 4 +- src/devices/bus/archimedes/econet/econet.cpp | 4 +- src/devices/bus/archimedes/econet/econet.h | 2 +- src/devices/bus/archimedes/econet/midi.cpp | 6 +- src/devices/bus/archimedes/econet/midi.h | 6 +- src/devices/bus/archimedes/econet/rtfmjoy.cpp | 2 +- src/devices/bus/archimedes/econet/rtfmjoy.h | 2 +- src/devices/bus/archimedes/econet/slot.cpp | 2 +- src/devices/bus/archimedes/econet/slot.h | 2 +- src/devices/bus/archimedes/podule/a448.cpp | 14 +- src/devices/bus/archimedes/podule/acejoy.cpp | 4 +- src/devices/bus/archimedes/podule/armadeus.cpp | 8 +- src/devices/bus/archimedes/podule/eaglem2.cpp | 4 +- src/devices/bus/archimedes/podule/ether1.cpp | 4 +- src/devices/bus/archimedes/podule/etherd.cpp | 4 +- src/devices/bus/archimedes/podule/etherr.cpp | 4 +- src/devices/bus/archimedes/podule/faxpack.cpp | 4 +- src/devices/bus/archimedes/podule/greyhawk.cpp | 4 +- src/devices/bus/archimedes/podule/ide_be.cpp | 4 +- src/devices/bus/archimedes/podule/ide_rdev.cpp | 4 +- src/devices/bus/archimedes/podule/io.cpp | 22 +-- src/devices/bus/archimedes/podule/io_hccs.cpp | 4 +- src/devices/bus/archimedes/podule/io_morley.cpp | 16 +- src/devices/bus/archimedes/podule/io_we.cpp | 4 +- src/devices/bus/archimedes/podule/lark.cpp | 6 +- src/devices/bus/archimedes/podule/laserd.cpp | 8 +- src/devices/bus/archimedes/podule/midi_emr.cpp | 8 +- src/devices/bus/archimedes/podule/midimax.cpp | 12 +- src/devices/bus/archimedes/podule/nexus.cpp | 4 +- src/devices/bus/archimedes/podule/rom.cpp | 4 +- src/devices/bus/archimedes/podule/rs423.cpp | 4 +- src/devices/bus/archimedes/podule/scan256.cpp | 4 +- src/devices/bus/archimedes/podule/scanlight.cpp | 20 +- src/devices/bus/archimedes/podule/scsi_vti.cpp | 4 +- src/devices/bus/archimedes/podule/serial.cpp | 4 +- src/devices/bus/archimedes/podule/slot.cpp | 4 +- src/devices/bus/archimedes/podule/slot.h | 4 +- src/devices/bus/archimedes/podule/spectra.cpp | 4 +- src/devices/bus/archimedes/podule/tube.cpp | 4 +- src/devices/bus/astrocde/accessory.cpp | 2 +- src/devices/bus/astrocde/accessory.h | 4 +- src/devices/bus/astrocde/cassette.cpp | 2 +- src/devices/bus/astrocde/cassette.h | 2 +- src/devices/bus/astrocde/ctrl.cpp | 2 +- src/devices/bus/astrocde/ctrl.h | 4 +- src/devices/bus/astrocde/exp.cpp | 2 +- src/devices/bus/astrocde/exp.h | 4 +- src/devices/bus/astrocde/joy.cpp | 2 +- src/devices/bus/astrocde/joy.h | 2 +- src/devices/bus/astrocde/lightpen.cpp | 2 +- src/devices/bus/astrocde/lightpen.h | 2 +- src/devices/bus/astrocde/ram.cpp | 14 +- src/devices/bus/astrocde/ram.h | 14 +- src/devices/bus/astrocde/rom.cpp | 10 +- src/devices/bus/astrocde/rom.h | 10 +- src/devices/bus/astrocde/slot.cpp | 2 +- src/devices/bus/astrocde/slot.h | 4 +- src/devices/bus/ata/atadev.cpp | 2 +- src/devices/bus/ata/atadev.h | 2 +- src/devices/bus/ata/atahle.cpp | 2 +- src/devices/bus/ata/atahle.h | 2 +- src/devices/bus/ata/ataintf.cpp | 4 +- src/devices/bus/ata/ataintf.h | 4 +- src/devices/bus/ata/atapicdr.cpp | 6 +- src/devices/bus/ata/atapicdr.h | 6 +- src/devices/bus/ata/atapihle.cpp | 2 +- src/devices/bus/ata/atapihle.h | 2 +- src/devices/bus/ata/cr589.cpp | 2 +- src/devices/bus/ata/cr589.h | 2 +- src/devices/bus/ata/gdrom.cpp | 2 +- src/devices/bus/ata/gdrom.h | 2 +- src/devices/bus/ata/idehd.cpp | 6 +- src/devices/bus/ata/idehd.h | 6 +- src/devices/bus/ata/px320a.cpp | 4 +- src/devices/bus/ata/px320a.h | 2 +- src/devices/bus/bbc/1mhzbus/1mhzbus.cpp | 2 +- src/devices/bus/bbc/1mhzbus/1mhzbus.h | 4 +- src/devices/bus/bbc/1mhzbus/autoprom.cpp | 2 +- src/devices/bus/bbc/1mhzbus/autoprom.h | 2 +- src/devices/bus/bbc/1mhzbus/beebopl.cpp | 2 +- src/devices/bus/bbc/1mhzbus/beebopl.h | 2 +- src/devices/bus/bbc/1mhzbus/beebsid.cpp | 2 +- src/devices/bus/bbc/1mhzbus/beebsid.h | 2 +- src/devices/bus/bbc/1mhzbus/cc500.cpp | 2 +- src/devices/bus/bbc/1mhzbus/cc500.h | 2 +- src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp | 2 +- src/devices/bus/bbc/1mhzbus/cfa3000opt.h | 2 +- src/devices/bus/bbc/1mhzbus/cisco.cpp | 2 +- src/devices/bus/bbc/1mhzbus/cisco.h | 2 +- src/devices/bus/bbc/1mhzbus/datacentre.cpp | 2 +- src/devices/bus/bbc/1mhzbus/datacentre.h | 2 +- src/devices/bus/bbc/1mhzbus/emrmidi.cpp | 4 +- src/devices/bus/bbc/1mhzbus/emrmidi.h | 2 +- src/devices/bus/bbc/1mhzbus/ide.cpp | 4 +- src/devices/bus/bbc/1mhzbus/ide.h | 4 +- src/devices/bus/bbc/1mhzbus/ieee488.cpp | 6 +- src/devices/bus/bbc/1mhzbus/ieee488.h | 6 +- src/devices/bus/bbc/1mhzbus/m2000.cpp | 8 +- src/devices/bus/bbc/1mhzbus/m2000.h | 2 +- src/devices/bus/bbc/1mhzbus/m5000.cpp | 12 +- src/devices/bus/bbc/1mhzbus/m5000.h | 12 +- src/devices/bus/bbc/1mhzbus/multiform.cpp | 2 +- src/devices/bus/bbc/1mhzbus/multiform.h | 2 +- src/devices/bus/bbc/1mhzbus/opus3.cpp | 6 +- src/devices/bus/bbc/1mhzbus/opus3.h | 6 +- src/devices/bus/bbc/1mhzbus/pdram.cpp | 2 +- src/devices/bus/bbc/1mhzbus/pdram.h | 2 +- src/devices/bus/bbc/1mhzbus/pms64k.cpp | 2 +- src/devices/bus/bbc/1mhzbus/pms64k.h | 2 +- src/devices/bus/bbc/1mhzbus/ramdisc.cpp | 2 +- src/devices/bus/bbc/1mhzbus/ramdisc.h | 2 +- src/devices/bus/bbc/1mhzbus/sasi.cpp | 6 +- src/devices/bus/bbc/1mhzbus/sasi.h | 6 +- src/devices/bus/bbc/1mhzbus/scsi.cpp | 6 +- src/devices/bus/bbc/1mhzbus/scsi.h | 6 +- src/devices/bus/bbc/1mhzbus/sprite.cpp | 2 +- src/devices/bus/bbc/1mhzbus/sprite.h | 2 +- src/devices/bus/bbc/analogue/analogue.cpp | 2 +- src/devices/bus/bbc/analogue/analogue.h | 2 +- src/devices/bus/bbc/analogue/bitstik.cpp | 6 +- src/devices/bus/bbc/analogue/bitstik.h | 6 +- src/devices/bus/bbc/analogue/cfa3000a.cpp | 2 +- src/devices/bus/bbc/analogue/cfa3000a.h | 2 +- src/devices/bus/bbc/analogue/joystick.cpp | 6 +- src/devices/bus/bbc/analogue/joystick.h | 6 +- src/devices/bus/bbc/cart/click.cpp | 2 +- src/devices/bus/bbc/cart/click.h | 2 +- src/devices/bus/bbc/cart/mastersd.cpp | 4 +- src/devices/bus/bbc/cart/mastersd.h | 2 +- src/devices/bus/bbc/cart/mega256.cpp | 2 +- src/devices/bus/bbc/cart/mega256.h | 2 +- src/devices/bus/bbc/cart/mr8000.cpp | 2 +- src/devices/bus/bbc/cart/mr8000.h | 2 +- src/devices/bus/bbc/cart/msc.cpp | 2 +- src/devices/bus/bbc/cart/msc.h | 2 +- src/devices/bus/bbc/cart/slot.cpp | 2 +- src/devices/bus/bbc/cart/slot.h | 4 +- src/devices/bus/bbc/exp/autocue.cpp | 2 +- src/devices/bus/bbc/exp/autocue.h | 2 +- src/devices/bus/bbc/exp/exp.cpp | 2 +- src/devices/bus/bbc/exp/exp.h | 4 +- src/devices/bus/bbc/exp/mertec.cpp | 2 +- src/devices/bus/bbc/exp/mertec.h | 2 +- src/devices/bus/bbc/fdc/acorn.cpp | 4 +- src/devices/bus/bbc/fdc/acorn.h | 4 +- src/devices/bus/bbc/fdc/ams.cpp | 2 +- src/devices/bus/bbc/fdc/ams.h | 2 +- src/devices/bus/bbc/fdc/cumana.cpp | 6 +- src/devices/bus/bbc/fdc/cumana.h | 6 +- src/devices/bus/bbc/fdc/cv1797.cpp | 2 +- src/devices/bus/bbc/fdc/cv1797.h | 2 +- src/devices/bus/bbc/fdc/fdc.cpp | 2 +- src/devices/bus/bbc/fdc/fdc.h | 4 +- src/devices/bus/bbc/fdc/kenda.cpp | 2 +- src/devices/bus/bbc/fdc/kenda.h | 2 +- src/devices/bus/bbc/fdc/opus.cpp | 10 +- src/devices/bus/bbc/fdc/opus.h | 10 +- src/devices/bus/bbc/fdc/solidisk.cpp | 12 +- src/devices/bus/bbc/fdc/solidisk.h | 12 +- src/devices/bus/bbc/fdc/udm.cpp | 2 +- src/devices/bus/bbc/fdc/udm.h | 2 +- src/devices/bus/bbc/fdc/watford.cpp | 6 +- src/devices/bus/bbc/fdc/watford.h | 6 +- src/devices/bus/bbc/internal/aries.cpp | 8 +- src/devices/bus/bbc/internal/aries.h | 8 +- src/devices/bus/bbc/internal/atpl.cpp | 4 +- src/devices/bus/bbc/internal/atpl.h | 4 +- src/devices/bus/bbc/internal/cumana68k.cpp | 6 +- src/devices/bus/bbc/internal/cumana68k.h | 2 +- src/devices/bus/bbc/internal/integrab.cpp | 2 +- src/devices/bus/bbc/internal/integrab.h | 2 +- src/devices/bus/bbc/internal/internal.cpp | 2 +- src/devices/bus/bbc/internal/internal.h | 4 +- src/devices/bus/bbc/internal/memex.cpp | 2 +- src/devices/bus/bbc/internal/memex.h | 2 +- src/devices/bus/bbc/internal/morleyaa.cpp | 2 +- src/devices/bus/bbc/internal/morleyaa.h | 2 +- src/devices/bus/bbc/internal/overlay.cpp | 2 +- src/devices/bus/bbc/internal/overlay.h | 2 +- src/devices/bus/bbc/internal/peartree.cpp | 12 +- src/devices/bus/bbc/internal/peartree.h | 12 +- src/devices/bus/bbc/internal/ramamp.cpp | 2 +- src/devices/bus/bbc/internal/ramamp.h | 2 +- src/devices/bus/bbc/internal/raven20.cpp | 2 +- src/devices/bus/bbc/internal/raven20.h | 2 +- src/devices/bus/bbc/internal/romex.cpp | 2 +- src/devices/bus/bbc/internal/romex.h | 2 +- src/devices/bus/bbc/internal/stl2m128.cpp | 2 +- src/devices/bus/bbc/internal/stl2m128.h | 2 +- src/devices/bus/bbc/internal/stl4m32.cpp | 2 +- src/devices/bus/bbc/internal/stl4m32.h | 2 +- src/devices/bus/bbc/internal/stlswr.cpp | 10 +- src/devices/bus/bbc/internal/stlswr.h | 12 +- src/devices/bus/bbc/internal/we32kram.cpp | 2 +- src/devices/bus/bbc/internal/we32kram.h | 2 +- src/devices/bus/bbc/internal/werom.cpp | 6 +- src/devices/bus/bbc/internal/werom.h | 8 +- src/devices/bus/bbc/internal/weromram.cpp | 2 +- src/devices/bus/bbc/internal/weromram.h | 2 +- src/devices/bus/bbc/joyport/joyport.cpp | 2 +- src/devices/bus/bbc/joyport/joyport.h | 2 +- src/devices/bus/bbc/joyport/joystick.cpp | 2 +- src/devices/bus/bbc/joyport/joystick.h | 2 +- src/devices/bus/bbc/joyport/mouse.cpp | 2 +- src/devices/bus/bbc/joyport/mouse.h | 2 +- src/devices/bus/bbc/modem/meup.cpp | 2 +- src/devices/bus/bbc/modem/meup.h | 2 +- src/devices/bus/bbc/modem/modem.cpp | 2 +- src/devices/bus/bbc/modem/modem.h | 4 +- src/devices/bus/bbc/modem/scsiaiv.cpp | 6 +- src/devices/bus/bbc/modem/scsiaiv.h | 6 +- src/devices/bus/bbc/rom/datagem.cpp | 2 +- src/devices/bus/bbc/rom/datagem.h | 2 +- src/devices/bus/bbc/rom/dfs.cpp | 2 +- src/devices/bus/bbc/rom/dfs.h | 2 +- src/devices/bus/bbc/rom/genie.cpp | 2 +- src/devices/bus/bbc/rom/genie.h | 2 +- src/devices/bus/bbc/rom/nvram.cpp | 2 +- src/devices/bus/bbc/rom/nvram.h | 2 +- src/devices/bus/bbc/rom/pal.cpp | 20 +- src/devices/bus/bbc/rom/pal.h | 20 +- src/devices/bus/bbc/rom/ram.cpp | 2 +- src/devices/bus/bbc/rom/ram.h | 2 +- src/devices/bus/bbc/rom/rom.cpp | 2 +- src/devices/bus/bbc/rom/rom.h | 2 +- src/devices/bus/bbc/rom/rtc.cpp | 6 +- src/devices/bus/bbc/rom/rtc.h | 4 +- src/devices/bus/bbc/rom/slot.cpp | 6 +- src/devices/bus/bbc/rom/slot.h | 6 +- src/devices/bus/bbc/tube/tube.cpp | 2 +- src/devices/bus/bbc/tube/tube.h | 2 +- src/devices/bus/bbc/tube/tube_32016.cpp | 8 +- src/devices/bus/bbc/tube/tube_32016.h | 8 +- src/devices/bus/bbc/tube/tube_6502.cpp | 10 +- src/devices/bus/bbc/tube/tube_6502.h | 10 +- src/devices/bus/bbc/tube/tube_80186.cpp | 8 +- src/devices/bus/bbc/tube/tube_80186.h | 6 +- src/devices/bus/bbc/tube/tube_80286.cpp | 2 +- src/devices/bus/bbc/tube/tube_80286.h | 2 +- src/devices/bus/bbc/tube/tube_a500.cpp | 2 +- src/devices/bus/bbc/tube/tube_a500.h | 2 +- src/devices/bus/bbc/tube/tube_arm.cpp | 2 +- src/devices/bus/bbc/tube/tube_arm.h | 2 +- src/devices/bus/bbc/tube/tube_arm7.cpp | 2 +- src/devices/bus/bbc/tube/tube_arm7.h | 2 +- src/devices/bus/bbc/tube/tube_casper.cpp | 2 +- src/devices/bus/bbc/tube/tube_casper.h | 2 +- src/devices/bus/bbc/tube/tube_cms6809.cpp | 2 +- src/devices/bus/bbc/tube/tube_cms6809.h | 2 +- src/devices/bus/bbc/tube/tube_rc6502.cpp | 6 +- src/devices/bus/bbc/tube/tube_rc6502.h | 6 +- src/devices/bus/bbc/tube/tube_x25.cpp | 2 +- src/devices/bus/bbc/tube/tube_x25.h | 2 +- src/devices/bus/bbc/tube/tube_z80.cpp | 6 +- src/devices/bus/bbc/tube/tube_z80.h | 6 +- src/devices/bus/bbc/tube/tube_zep100.cpp | 12 +- src/devices/bus/bbc/tube/tube_zep100.h | 10 +- src/devices/bus/bbc/userport/beebspch.cpp | 8 +- src/devices/bus/bbc/userport/beebspch.h | 2 +- src/devices/bus/bbc/userport/cfa3000kbd.cpp | 2 +- src/devices/bus/bbc/userport/cfa3000kbd.h | 2 +- src/devices/bus/bbc/userport/lcd.cpp | 2 +- src/devices/bus/bbc/userport/lcd.h | 2 +- src/devices/bus/bbc/userport/m4000.cpp | 2 +- src/devices/bus/bbc/userport/m4000.h | 2 +- src/devices/bus/bbc/userport/palext.cpp | 6 +- src/devices/bus/bbc/userport/palext.h | 6 +- src/devices/bus/bbc/userport/pointer.cpp | 8 +- src/devices/bus/bbc/userport/pointer.h | 8 +- src/devices/bus/bbc/userport/sdcard.cpp | 10 +- src/devices/bus/bbc/userport/sdcard.h | 6 +- src/devices/bus/bbc/userport/userport.cpp | 2 +- src/devices/bus/bbc/userport/userport.h | 2 +- src/devices/bus/bbc/userport/usersplit.cpp | 2 +- src/devices/bus/bbc/userport/usersplit.h | 2 +- src/devices/bus/bbc/userport/voicebox.cpp | 4 +- src/devices/bus/bbc/userport/voicebox.h | 2 +- src/devices/bus/bml3/bml3bus.cpp | 8 +- src/devices/bus/bml3/bml3bus.h | 10 +- src/devices/bus/bml3/bml3kanji.cpp | 2 +- src/devices/bus/bml3/bml3kanji.h | 2 +- src/devices/bus/bml3/bml3mp1802.cpp | 2 +- src/devices/bus/bml3/bml3mp1802.h | 2 +- src/devices/bus/bml3/bml3mp1805.cpp | 4 +- src/devices/bus/bml3/bml3mp1805.h | 2 +- src/devices/bus/bml3/bml3rtc.cpp | 2 +- src/devices/bus/bml3/bml3rtc.h | 2 +- src/devices/bus/bw2/exp.cpp | 2 +- src/devices/bus/bw2/exp.h | 4 +- src/devices/bus/bw2/ramcard.cpp | 2 +- src/devices/bus/bw2/ramcard.h | 2 +- src/devices/bus/c64/16kb.cpp | 2 +- src/devices/bus/c64/16kb.h | 2 +- src/devices/bus/c64/4dxh.cpp | 2 +- src/devices/bus/c64/4dxh.h | 2 +- src/devices/bus/c64/4ksa.cpp | 2 +- src/devices/bus/c64/4ksa.h | 2 +- src/devices/bus/c64/4tba.cpp | 2 +- src/devices/bus/c64/4tba.h | 2 +- src/devices/bus/c64/bn1541.cpp | 2 +- src/devices/bus/c64/bn1541.h | 2 +- src/devices/bus/c64/buscard.cpp | 10 +- src/devices/bus/c64/buscard.h | 2 +- src/devices/bus/c64/buscard2.cpp | 8 +- src/devices/bus/c64/buscard2.h | 2 +- src/devices/bus/c64/c128_comal80.cpp | 2 +- src/devices/bus/c64/c128_comal80.h | 2 +- src/devices/bus/c64/c128_partner.cpp | 2 +- src/devices/bus/c64/c128_partner.h | 2 +- src/devices/bus/c64/comal80.cpp | 2 +- src/devices/bus/c64/comal80.h | 2 +- src/devices/bus/c64/cpm.cpp | 6 +- src/devices/bus/c64/cpm.h | 4 +- src/devices/bus/c64/currah_speech.cpp | 4 +- src/devices/bus/c64/currah_speech.h | 2 +- src/devices/bus/c64/dela_ep256.cpp | 2 +- src/devices/bus/c64/dela_ep256.h | 2 +- src/devices/bus/c64/dela_ep64.cpp | 2 +- src/devices/bus/c64/dela_ep64.h | 2 +- src/devices/bus/c64/dela_ep7x8.cpp | 2 +- src/devices/bus/c64/dela_ep7x8.h | 2 +- src/devices/bus/c64/dinamic.cpp | 2 +- src/devices/bus/c64/dinamic.h | 2 +- src/devices/bus/c64/dqbb.cpp | 2 +- src/devices/bus/c64/dqbb.h | 2 +- src/devices/bus/c64/easy_calc_result.cpp | 2 +- src/devices/bus/c64/easy_calc_result.h | 2 +- src/devices/bus/c64/easyflash.cpp | 2 +- src/devices/bus/c64/easyflash.h | 2 +- src/devices/bus/c64/epyx_fast_load.cpp | 2 +- src/devices/bus/c64/epyx_fast_load.h | 2 +- src/devices/bus/c64/exos.cpp | 2 +- src/devices/bus/c64/exos.h | 2 +- src/devices/bus/c64/exp.cpp | 2 +- src/devices/bus/c64/exp.h | 8 +- src/devices/bus/c64/fcc.cpp | 2 +- src/devices/bus/c64/fcc.h | 2 +- src/devices/bus/c64/final.cpp | 2 +- src/devices/bus/c64/final.h | 2 +- src/devices/bus/c64/final3.cpp | 2 +- src/devices/bus/c64/final3.h | 2 +- src/devices/bus/c64/fun_play.cpp | 2 +- src/devices/bus/c64/fun_play.h | 2 +- src/devices/bus/c64/geocable.cpp | 2 +- src/devices/bus/c64/geocable.h | 2 +- src/devices/bus/c64/georam.cpp | 2 +- src/devices/bus/c64/georam.h | 2 +- src/devices/bus/c64/ide64.cpp | 2 +- src/devices/bus/c64/ide64.h | 2 +- src/devices/bus/c64/ieee488.cpp | 6 +- src/devices/bus/c64/ieee488.h | 2 +- src/devices/bus/c64/kingsoft.cpp | 2 +- src/devices/bus/c64/kingsoft.h | 2 +- src/devices/bus/c64/mach5.cpp | 2 +- src/devices/bus/c64/mach5.h | 2 +- src/devices/bus/c64/magic_desk.cpp | 2 +- src/devices/bus/c64/magic_desk.h | 2 +- src/devices/bus/c64/magic_formel.cpp | 4 +- src/devices/bus/c64/magic_formel.h | 2 +- src/devices/bus/c64/magic_voice.cpp | 6 +- src/devices/bus/c64/magic_voice.h | 2 +- src/devices/bus/c64/midi_maplin.cpp | 6 +- src/devices/bus/c64/midi_maplin.h | 2 +- src/devices/bus/c64/midi_namesoft.cpp | 6 +- src/devices/bus/c64/midi_namesoft.h | 2 +- src/devices/bus/c64/midi_passport.cpp | 10 +- src/devices/bus/c64/midi_passport.h | 2 +- src/devices/bus/c64/midi_sci.cpp | 6 +- src/devices/bus/c64/midi_sci.h | 2 +- src/devices/bus/c64/midi_siel.cpp | 6 +- src/devices/bus/c64/midi_siel.h | 2 +- src/devices/bus/c64/mikro_assembler.cpp | 2 +- src/devices/bus/c64/mikro_assembler.h | 2 +- src/devices/bus/c64/multiscreen.cpp | 6 +- src/devices/bus/c64/multiscreen.h | 2 +- src/devices/bus/c64/music64.cpp | 2 +- src/devices/bus/c64/music64.h | 2 +- src/devices/bus/c64/neoram.cpp | 2 +- src/devices/bus/c64/neoram.h | 2 +- src/devices/bus/c64/ocean.cpp | 2 +- src/devices/bus/c64/ocean.h | 2 +- src/devices/bus/c64/pagefox.cpp | 2 +- src/devices/bus/c64/pagefox.h | 2 +- src/devices/bus/c64/partner.cpp | 2 +- src/devices/bus/c64/partner.h | 2 +- src/devices/bus/c64/prophet64.cpp | 2 +- src/devices/bus/c64/prophet64.h | 2 +- src/devices/bus/c64/ps64.cpp | 4 +- src/devices/bus/c64/ps64.h | 2 +- src/devices/bus/c64/reu.cpp | 10 +- src/devices/bus/c64/reu.h | 8 +- src/devices/bus/c64/rex.cpp | 2 +- src/devices/bus/c64/rex.h | 2 +- src/devices/bus/c64/rex_ep256.cpp | 2 +- src/devices/bus/c64/rex_ep256.h | 2 +- src/devices/bus/c64/ross.cpp | 2 +- src/devices/bus/c64/ross.h | 2 +- src/devices/bus/c64/sfx_sound_expander.cpp | 2 +- src/devices/bus/c64/sfx_sound_expander.h | 2 +- src/devices/bus/c64/silverrock.cpp | 2 +- src/devices/bus/c64/silverrock.h | 2 +- src/devices/bus/c64/simons_basic.cpp | 2 +- src/devices/bus/c64/simons_basic.h | 2 +- src/devices/bus/c64/speakeasy.cpp | 4 +- src/devices/bus/c64/speakeasy.h | 2 +- src/devices/bus/c64/stardos.cpp | 2 +- src/devices/bus/c64/stardos.h | 2 +- src/devices/bus/c64/std.cpp | 2 +- src/devices/bus/c64/std.h | 2 +- src/devices/bus/c64/structured_basic.cpp | 2 +- src/devices/bus/c64/structured_basic.h | 2 +- src/devices/bus/c64/super_explode.cpp | 2 +- src/devices/bus/c64/super_explode.h | 2 +- src/devices/bus/c64/super_games.cpp | 2 +- src/devices/bus/c64/super_games.h | 2 +- src/devices/bus/c64/supercpu.cpp | 4 +- src/devices/bus/c64/supercpu.h | 2 +- src/devices/bus/c64/sw8k.cpp | 2 +- src/devices/bus/c64/sw8k.h | 2 +- src/devices/bus/c64/swiftlink.cpp | 4 +- src/devices/bus/c64/swiftlink.h | 2 +- src/devices/bus/c64/system3.cpp | 2 +- src/devices/bus/c64/system3.h | 2 +- src/devices/bus/c64/tdos.cpp | 2 +- src/devices/bus/c64/tdos.h | 2 +- src/devices/bus/c64/turbo232.cpp | 4 +- src/devices/bus/c64/turbo232.h | 2 +- src/devices/bus/c64/vizastar.cpp | 2 +- src/devices/bus/c64/vizastar.h | 2 +- src/devices/bus/c64/vw64.cpp | 2 +- src/devices/bus/c64/vw64.h | 2 +- src/devices/bus/c64/warp_speed.cpp | 2 +- src/devices/bus/c64/warp_speed.h | 2 +- src/devices/bus/c64/westermann.cpp | 2 +- src/devices/bus/c64/westermann.h | 2 +- src/devices/bus/c64/xl80.cpp | 2 +- src/devices/bus/c64/xl80.h | 2 +- src/devices/bus/c64/z80videopak.cpp | 2 +- src/devices/bus/c64/z80videopak.h | 2 +- src/devices/bus/c64/zaxxon.cpp | 2 +- src/devices/bus/c64/zaxxon.h | 2 +- src/devices/bus/cbm2/24k.cpp | 2 +- src/devices/bus/cbm2/24k.h | 2 +- src/devices/bus/cbm2/exp.cpp | 2 +- src/devices/bus/cbm2/exp.h | 6 +- src/devices/bus/cbm2/hrg.cpp | 10 +- src/devices/bus/cbm2/hrg.h | 6 +- src/devices/bus/cbm2/std.cpp | 2 +- src/devices/bus/cbm2/std.h | 2 +- src/devices/bus/cbm2/user.cpp | 2 +- src/devices/bus/cbm2/user.h | 4 +- src/devices/bus/cbmiec/c1526.cpp | 6 +- src/devices/bus/cbmiec/c1526.h | 6 +- src/devices/bus/cbmiec/c1541.cpp | 46 ++--- src/devices/bus/cbmiec/c1541.h | 40 ++-- src/devices/bus/cbmiec/c1571.cpp | 16 +- src/devices/bus/cbmiec/c1571.h | 10 +- src/devices/bus/cbmiec/c1581.cpp | 6 +- src/devices/bus/cbmiec/c1581.h | 6 +- src/devices/bus/cbmiec/c64_nl10.cpp | 2 +- src/devices/bus/cbmiec/c64_nl10.h | 2 +- src/devices/bus/cbmiec/cbmiec.cpp | 4 +- src/devices/bus/cbmiec/cbmiec.h | 8 +- src/devices/bus/cbmiec/cmdhd.cpp | 10 +- src/devices/bus/cbmiec/cmdhd.h | 2 +- src/devices/bus/cbmiec/diag264_lb_iec.cpp | 2 +- src/devices/bus/cbmiec/diag264_lb_iec.h | 2 +- src/devices/bus/cbmiec/fd2000.cpp | 6 +- src/devices/bus/cbmiec/fd2000.h | 6 +- src/devices/bus/cbmiec/interpod.cpp | 10 +- src/devices/bus/cbmiec/interpod.h | 2 +- src/devices/bus/cbmiec/serialbox.cpp | 2 +- src/devices/bus/cbmiec/serialbox.h | 2 +- src/devices/bus/cbmiec/vic1515.cpp | 2 +- src/devices/bus/cbmiec/vic1515.h | 2 +- src/devices/bus/cbmiec/vic1520.cpp | 2 +- src/devices/bus/cbmiec/vic1520.h | 2 +- src/devices/bus/cbus/mpu_pc98.cpp | 2 +- src/devices/bus/cbus/mpu_pc98.h | 2 +- src/devices/bus/cbus/pc9801_118.cpp | 2 +- src/devices/bus/cbus/pc9801_118.h | 2 +- src/devices/bus/cbus/pc9801_26.cpp | 2 +- src/devices/bus/cbus/pc9801_26.h | 2 +- src/devices/bus/cbus/pc9801_55.cpp | 6 +- src/devices/bus/cbus/pc9801_55.h | 8 +- src/devices/bus/cbus/pc9801_86.cpp | 12 +- src/devices/bus/cbus/pc9801_86.h | 8 +- src/devices/bus/cbus/pc9801_amd98.cpp | 8 +- src/devices/bus/cbus/pc9801_amd98.h | 2 +- src/devices/bus/cbus/pc9801_cbus.cpp | 2 +- src/devices/bus/cbus/pc9801_cbus.h | 4 +- src/devices/bus/cbus/pc9801_snd.cpp | 2 +- src/devices/bus/cbus/pc9801_snd.h | 2 +- src/devices/bus/centronics/chessmec.cpp | 4 +- src/devices/bus/centronics/chessmec.h | 2 +- src/devices/bus/centronics/comxpl80.cpp | 4 +- src/devices/bus/centronics/comxpl80.h | 2 +- src/devices/bus/centronics/covox.cpp | 10 +- src/devices/bus/centronics/covox.h | 4 +- src/devices/bus/centronics/ctronics.cpp | 2 +- src/devices/bus/centronics/ctronics.h | 4 +- src/devices/bus/centronics/digiblst.cpp | 4 +- src/devices/bus/centronics/digiblst.h | 2 +- src/devices/bus/centronics/dsjoy.cpp | 2 +- src/devices/bus/centronics/dsjoy.h | 2 +- src/devices/bus/centronics/epson_ex800.cpp | 6 +- src/devices/bus/centronics/epson_ex800.h | 2 +- src/devices/bus/centronics/epson_lx800.cpp | 8 +- src/devices/bus/centronics/epson_lx800.h | 4 +- src/devices/bus/centronics/epson_lx810l.cpp | 10 +- src/devices/bus/centronics/epson_lx810l.h | 6 +- src/devices/bus/centronics/nec_p72.cpp | 4 +- src/devices/bus/centronics/nec_p72.h | 4 +- src/devices/bus/centronics/printer.cpp | 4 +- src/devices/bus/centronics/printer.h | 2 +- src/devices/bus/centronics/samdac.cpp | 6 +- src/devices/bus/centronics/samdac.h | 2 +- src/devices/bus/centronics/smartboard.cpp | 2 +- src/devices/bus/centronics/smartboard.h | 2 +- src/devices/bus/centronics/spjoy.cpp | 2 +- src/devices/bus/centronics/spjoy.h | 2 +- src/devices/bus/cgenie/expansion/expansion.cpp | 2 +- src/devices/bus/cgenie/expansion/expansion.h | 4 +- src/devices/bus/cgenie/expansion/floppy.cpp | 2 +- src/devices/bus/cgenie/expansion/floppy.h | 2 +- src/devices/bus/cgenie/parallel/joystick.cpp | 2 +- src/devices/bus/cgenie/parallel/joystick.h | 2 +- src/devices/bus/cgenie/parallel/parallel.cpp | 2 +- src/devices/bus/cgenie/parallel/parallel.h | 4 +- src/devices/bus/cgenie/parallel/printer.cpp | 2 +- src/devices/bus/cgenie/parallel/printer.h | 2 +- src/devices/bus/chanf/rom.cpp | 14 +- src/devices/bus/chanf/rom.h | 14 +- src/devices/bus/chanf/slot.cpp | 2 +- src/devices/bus/chanf/slot.h | 4 +- src/devices/bus/coco/coco_dcmodem.cpp | 4 +- src/devices/bus/coco/coco_dwsock.cpp | 2 +- src/devices/bus/coco/coco_dwsock.h | 2 +- src/devices/bus/coco/coco_fdc.cpp | 18 +- src/devices/bus/coco/coco_fdc.h | 2 +- src/devices/bus/coco/coco_gmc.cpp | 4 +- src/devices/bus/coco/coco_ide.cpp | 2 +- src/devices/bus/coco/coco_ide.h | 2 +- src/devices/bus/coco/coco_max.cpp | 4 +- src/devices/bus/coco/coco_midi.cpp | 18 +- src/devices/bus/coco/coco_multi.cpp | 12 +- src/devices/bus/coco/coco_orch90.cpp | 6 +- src/devices/bus/coco/coco_pak.cpp | 8 +- src/devices/bus/coco/coco_pak.h | 8 +- src/devices/bus/coco/coco_psg.cpp | 2 +- src/devices/bus/coco/coco_psg.h | 2 +- src/devices/bus/coco/coco_ram.cpp | 4 +- src/devices/bus/coco/coco_rs232.cpp | 4 +- src/devices/bus/coco/coco_ssc.cpp | 8 +- src/devices/bus/coco/coco_stecomp.cpp | 8 +- src/devices/bus/coco/coco_sym12.cpp | 4 +- src/devices/bus/coco/coco_t4426.cpp | 12 +- src/devices/bus/coco/coco_wpk.cpp | 8 +- src/devices/bus/coco/coco_wpk.h | 8 +- src/devices/bus/coco/coco_wpk2p.cpp | 2 +- src/devices/bus/coco/coco_wpk2p.h | 2 +- src/devices/bus/coco/cococart.cpp | 2 +- src/devices/bus/coco/cococart.h | 4 +- src/devices/bus/coco/dragon_amtor.cpp | 2 +- src/devices/bus/coco/dragon_amtor.h | 2 +- src/devices/bus/coco/dragon_claw.cpp | 2 +- src/devices/bus/coco/dragon_claw.h | 2 +- src/devices/bus/coco/dragon_fdc.cpp | 14 +- src/devices/bus/coco/dragon_jcbsnd.cpp | 2 +- src/devices/bus/coco/dragon_jcbsnd.h | 2 +- src/devices/bus/coco/dragon_jcbspch.cpp | 4 +- src/devices/bus/coco/dragon_jcbspch.h | 2 +- src/devices/bus/coco/dragon_msx2.cpp | 2 +- src/devices/bus/coco/dragon_msx2.h | 2 +- src/devices/bus/coco/dragon_serial.cpp | 4 +- src/devices/bus/coco/dragon_serial.h | 2 +- src/devices/bus/coco/dragon_sprites.cpp | 2 +- src/devices/bus/coco/dragon_sprites.h | 2 +- src/devices/bus/coleco/cartridge/exp.cpp | 2 +- src/devices/bus/coleco/cartridge/exp.h | 4 +- src/devices/bus/coleco/cartridge/megacart.cpp | 2 +- src/devices/bus/coleco/cartridge/megacart.h | 2 +- src/devices/bus/coleco/cartridge/std.cpp | 2 +- src/devices/bus/coleco/cartridge/std.h | 2 +- src/devices/bus/coleco/cartridge/xin1.cpp | 2 +- src/devices/bus/coleco/cartridge/xin1.h | 2 +- src/devices/bus/coleco/controller/ctrl.cpp | 2 +- src/devices/bus/coleco/controller/ctrl.h | 4 +- src/devices/bus/coleco/controller/hand.cpp | 2 +- src/devices/bus/coleco/controller/hand.h | 2 +- src/devices/bus/coleco/controller/sac.cpp | 2 +- src/devices/bus/coleco/controller/sac.h | 2 +- src/devices/bus/compis/graphics.cpp | 2 +- src/devices/bus/compis/graphics.h | 4 +- src/devices/bus/compis/hrg.cpp | 8 +- src/devices/bus/compis/hrg.h | 6 +- src/devices/bus/compucolor/floppy.cpp | 4 +- src/devices/bus/compucolor/floppy.h | 6 +- src/devices/bus/comx35/clm.cpp | 2 +- src/devices/bus/comx35/clm.h | 2 +- src/devices/bus/comx35/eprom.cpp | 2 +- src/devices/bus/comx35/eprom.h | 2 +- src/devices/bus/comx35/exp.cpp | 2 +- src/devices/bus/comx35/exp.h | 6 +- src/devices/bus/comx35/expbox.cpp | 2 +- src/devices/bus/comx35/expbox.h | 2 +- src/devices/bus/comx35/fdc.cpp | 2 +- src/devices/bus/comx35/fdc.h | 2 +- src/devices/bus/comx35/joycard.cpp | 2 +- src/devices/bus/comx35/joycard.h | 2 +- src/devices/bus/comx35/printer.cpp | 2 +- src/devices/bus/comx35/printer.h | 2 +- src/devices/bus/comx35/ram.cpp | 2 +- src/devices/bus/comx35/ram.h | 2 +- src/devices/bus/comx35/thermal.cpp | 2 +- src/devices/bus/comx35/thermal.h | 2 +- src/devices/bus/cpc/amdrum.cpp | 4 +- src/devices/bus/cpc/amdrum.h | 2 +- src/devices/bus/cpc/brunword4.cpp | 2 +- src/devices/bus/cpc/brunword4.h | 2 +- src/devices/bus/cpc/cpc_pds.cpp | 2 +- src/devices/bus/cpc/cpc_pds.h | 2 +- src/devices/bus/cpc/cpc_rom.cpp | 20 +- src/devices/bus/cpc/cpc_rom.h | 4 +- src/devices/bus/cpc/cpc_rs232.cpp | 8 +- src/devices/bus/cpc/cpc_rs232.h | 6 +- src/devices/bus/cpc/cpc_ssa1.cpp | 4 +- src/devices/bus/cpc/cpc_ssa1.h | 4 +- src/devices/bus/cpc/cpcexp.cpp | 2 +- src/devices/bus/cpc/cpcexp.h | 4 +- src/devices/bus/cpc/ddi1.cpp | 2 +- src/devices/bus/cpc/ddi1.h | 2 +- src/devices/bus/cpc/doubler.cpp | 2 +- src/devices/bus/cpc/doubler.h | 2 +- src/devices/bus/cpc/hd20.cpp | 2 +- src/devices/bus/cpc/hd20.h | 2 +- src/devices/bus/cpc/magicsound.cpp | 8 +- src/devices/bus/cpc/magicsound.h | 2 +- src/devices/bus/cpc/mface2.cpp | 2 +- src/devices/bus/cpc/mface2.h | 2 +- src/devices/bus/cpc/musicmachine.cpp | 6 +- src/devices/bus/cpc/musicmachine.h | 2 +- src/devices/bus/cpc/playcity.cpp | 2 +- src/devices/bus/cpc/playcity.h | 2 +- src/devices/bus/cpc/smartwatch.cpp | 4 +- src/devices/bus/cpc/smartwatch.h | 2 +- src/devices/bus/cpc/symbfac2.cpp | 2 +- src/devices/bus/cpc/symbfac2.h | 2 +- src/devices/bus/cpc/transtape.cpp | 2 +- src/devices/bus/cpc/transtape.h | 2 +- src/devices/bus/crvision/rom.cpp | 16 +- src/devices/bus/crvision/rom.h | 16 +- src/devices/bus/crvision/slot.cpp | 2 +- src/devices/bus/crvision/slot.h | 4 +- src/devices/bus/dmv/dmvbus.cpp | 2 +- src/devices/bus/dmv/dmvbus.h | 4 +- src/devices/bus/dmv/k012.cpp | 14 +- src/devices/bus/dmv/k012.h | 6 +- src/devices/bus/dmv/k210.cpp | 4 +- src/devices/bus/dmv/k210.h | 2 +- src/devices/bus/dmv/k220.cpp | 4 +- src/devices/bus/dmv/k220.h | 2 +- src/devices/bus/dmv/k230.cpp | 12 +- src/devices/bus/dmv/k230.h | 10 +- src/devices/bus/dmv/k233.cpp | 2 +- src/devices/bus/dmv/k233.h | 2 +- src/devices/bus/dmv/k801.cpp | 12 +- src/devices/bus/dmv/k801.h | 12 +- src/devices/bus/dmv/k803.cpp | 2 +- src/devices/bus/dmv/k803.h | 2 +- src/devices/bus/dmv/k806.cpp | 4 +- src/devices/bus/dmv/k806.h | 2 +- src/devices/bus/dmv/ram.cpp | 8 +- src/devices/bus/dmv/ram.h | 8 +- src/devices/bus/ecbbus/ecbbus.cpp | 4 +- src/devices/bus/ecbbus/ecbbus.h | 6 +- src/devices/bus/ecbbus/grip.cpp | 4 +- src/devices/bus/ecbbus/grip.h | 2 +- src/devices/bus/econet/e01.cpp | 8 +- src/devices/bus/econet/e01.h | 6 +- src/devices/bus/econet/econet.cpp | 4 +- src/devices/bus/econet/econet.h | 6 +- src/devices/bus/einstein/pipe/pipe.cpp | 2 +- src/devices/bus/einstein/pipe/pipe.h | 4 +- src/devices/bus/einstein/pipe/silicon_disc.cpp | 2 +- src/devices/bus/einstein/pipe/silicon_disc.h | 2 +- src/devices/bus/einstein/pipe/speculator.cpp | 6 +- src/devices/bus/einstein/pipe/speculator.h | 2 +- src/devices/bus/einstein/pipe/tk02.cpp | 2 +- src/devices/bus/einstein/pipe/tk02.h | 2 +- src/devices/bus/einstein/userport/mouse.cpp | 2 +- src/devices/bus/einstein/userport/mouse.h | 2 +- src/devices/bus/einstein/userport/speech.cpp | 4 +- src/devices/bus/einstein/userport/speech.h | 2 +- src/devices/bus/einstein/userport/userport.cpp | 6 +- src/devices/bus/einstein/userport/userport.h | 11 +- src/devices/bus/ekara/rom.cpp | 28 +-- src/devices/bus/ekara/rom.h | 16 +- src/devices/bus/ekara/slot.cpp | 2 +- src/devices/bus/ekara/slot.h | 4 +- src/devices/bus/electron/cart/abr.cpp | 2 +- src/devices/bus/electron/cart/abr.h | 2 +- src/devices/bus/electron/cart/ap34.cpp | 2 +- src/devices/bus/electron/cart/ap34.h | 2 +- src/devices/bus/electron/cart/ap5.cpp | 2 +- src/devices/bus/electron/cart/ap5.h | 2 +- src/devices/bus/electron/cart/aqr.cpp | 2 +- src/devices/bus/electron/cart/aqr.h | 2 +- src/devices/bus/electron/cart/click.cpp | 2 +- src/devices/bus/electron/cart/click.h | 2 +- src/devices/bus/electron/cart/cumana.cpp | 2 +- src/devices/bus/electron/cart/cumana.h | 2 +- src/devices/bus/electron/cart/elksdp1.cpp | 4 +- src/devices/bus/electron/cart/elksdp1.h | 2 +- src/devices/bus/electron/cart/mgc.cpp | 2 +- src/devices/bus/electron/cart/mgc.h | 2 +- src/devices/bus/electron/cart/peg400.cpp | 2 +- src/devices/bus/electron/cart/peg400.h | 2 +- src/devices/bus/electron/cart/romp144.cpp | 2 +- src/devices/bus/electron/cart/romp144.h | 2 +- src/devices/bus/electron/cart/rs423.cpp | 2 +- src/devices/bus/electron/cart/rs423.h | 2 +- src/devices/bus/electron/cart/slot.cpp | 4 +- src/devices/bus/electron/cart/slot.h | 6 +- src/devices/bus/electron/cart/sndexp.cpp | 2 +- src/devices/bus/electron/cart/sndexp.h | 2 +- src/devices/bus/electron/cart/sndexp3.cpp | 2 +- src/devices/bus/electron/cart/sndexp3.h | 2 +- src/devices/bus/electron/cart/sp64.cpp | 2 +- src/devices/bus/electron/cart/sp64.h | 2 +- src/devices/bus/electron/cart/std.cpp | 2 +- src/devices/bus/electron/cart/std.h | 2 +- src/devices/bus/electron/cart/stlefs.cpp | 2 +- src/devices/bus/electron/cart/stlefs.h | 2 +- src/devices/bus/electron/cart/tube.cpp | 2 +- src/devices/bus/electron/cart/tube.h | 2 +- src/devices/bus/electron/elksd128.cpp | 4 +- src/devices/bus/electron/elksd128.h | 2 +- src/devices/bus/electron/elksd64.cpp | 4 +- src/devices/bus/electron/elksd64.h | 2 +- src/devices/bus/electron/exp.cpp | 2 +- src/devices/bus/electron/exp.h | 4 +- src/devices/bus/electron/fbjoy.cpp | 2 +- src/devices/bus/electron/fbjoy.h | 2 +- src/devices/bus/electron/fbprint.cpp | 2 +- src/devices/bus/electron/fbprint.h | 2 +- src/devices/bus/electron/m2105.cpp | 4 +- src/devices/bus/electron/m2105.h | 2 +- src/devices/bus/electron/mc68k.cpp | 8 +- src/devices/bus/electron/mc68k.h | 2 +- src/devices/bus/electron/mode7.cpp | 2 +- src/devices/bus/electron/mode7.h | 2 +- src/devices/bus/electron/plus1.cpp | 8 +- src/devices/bus/electron/plus1.h | 8 +- src/devices/bus/electron/plus2.cpp | 2 +- src/devices/bus/electron/plus2.h | 2 +- src/devices/bus/electron/plus3.cpp | 2 +- src/devices/bus/electron/plus3.h | 2 +- src/devices/bus/electron/pwrjoy.cpp | 2 +- src/devices/bus/electron/pwrjoy.h | 2 +- src/devices/bus/electron/rombox.cpp | 2 +- src/devices/bus/electron/rombox.h | 2 +- src/devices/bus/electron/romboxp.cpp | 2 +- src/devices/bus/electron/romboxp.h | 2 +- src/devices/bus/electron/sidewndr.cpp | 2 +- src/devices/bus/electron/sidewndr.h | 2 +- src/devices/bus/ep64/exdos.cpp | 2 +- src/devices/bus/ep64/exdos.h | 2 +- src/devices/bus/ep64/exp.cpp | 2 +- src/devices/bus/ep64/exp.h | 4 +- src/devices/bus/epson_qx/multifont.cpp | 2 +- src/devices/bus/epson_qx/multifont.h | 2 +- src/devices/bus/epson_qx/option.cpp | 4 +- src/devices/bus/epson_qx/option.h | 4 +- src/devices/bus/epson_sio/epson_sio.cpp | 2 +- src/devices/bus/epson_sio/epson_sio.h | 4 +- src/devices/bus/epson_sio/pf10.cpp | 4 +- src/devices/bus/epson_sio/pf10.h | 2 +- src/devices/bus/epson_sio/tf20.cpp | 2 +- src/devices/bus/epson_sio/tf20.h | 2 +- src/devices/bus/fmt_scsi/fmt121.cpp | 6 +- src/devices/bus/fmt_scsi/fmt121.h | 2 +- src/devices/bus/fmt_scsi/fmt_scsi.cpp | 2 +- src/devices/bus/fmt_scsi/fmt_scsi.h | 4 +- src/devices/bus/gamate/gamate_protection.cpp | 2 +- src/devices/bus/gamate/gamate_protection.h | 2 +- src/devices/bus/gamate/rom.cpp | 12 +- src/devices/bus/gamate/rom.h | 10 +- src/devices/bus/gamate/slot.cpp | 2 +- src/devices/bus/gamate/slot.h | 4 +- src/devices/bus/gameboy/mbc.cpp | 2 +- src/devices/bus/gameboy/rom.cpp | 2 +- src/devices/bus/gamegear/ggext.cpp | 2 +- src/devices/bus/gamegear/ggext.h | 4 +- src/devices/bus/gamegear/smsctrladp.cpp | 2 +- src/devices/bus/gamegear/smsctrladp.h | 2 +- src/devices/bus/gba/gba_slot.cpp | 2 +- src/devices/bus/gba/gba_slot.h | 4 +- src/devices/bus/gba/rom.cpp | 38 ++-- src/devices/bus/gba/rom.h | 38 ++-- src/devices/bus/generic/ram.cpp | 16 +- src/devices/bus/generic/ram.h | 16 +- src/devices/bus/generic/rom.cpp | 10 +- src/devices/bus/generic/rom.h | 10 +- src/devices/bus/generic/slot.cpp | 6 +- src/devices/bus/generic/slot.h | 10 +- src/devices/bus/gio64/gio64.cpp | 6 +- src/devices/bus/gio64/gio64.h | 10 +- src/devices/bus/gio64/newport.cpp | 16 +- src/devices/bus/gio64/newport.h | 20 +- src/devices/bus/hexbus/hexbus.cpp | 4 +- src/devices/bus/hexbus/hexbus.h | 6 +- src/devices/bus/hexbus/hx5102.cpp | 6 +- src/devices/bus/hexbus/hx5102.h | 2 +- src/devices/bus/hexbus/tp0370.cpp | 2 +- src/devices/bus/hexbus/tp0370.h | 2 +- src/devices/bus/hp80_io/82900.cpp | 4 +- src/devices/bus/hp80_io/82900.h | 2 +- src/devices/bus/hp80_io/82937.cpp | 10 +- src/devices/bus/hp80_io/82937.h | 2 +- src/devices/bus/hp80_io/82939.cpp | 4 +- src/devices/bus/hp80_io/82939.h | 2 +- src/devices/bus/hp80_io/hp80_io.cpp | 6 +- src/devices/bus/hp80_io/hp80_io.h | 11 +- src/devices/bus/hp9845_io/98032.cpp | 6 +- src/devices/bus/hp9845_io/98032.h | 6 +- src/devices/bus/hp9845_io/98034.cpp | 4 +- src/devices/bus/hp9845_io/98034.h | 2 +- src/devices/bus/hp9845_io/98035.cpp | 2 +- src/devices/bus/hp9845_io/98035.h | 2 +- src/devices/bus/hp9845_io/98036.cpp | 4 +- src/devices/bus/hp9845_io/98036.h | 2 +- src/devices/bus/hp9845_io/98046.cpp | 2 +- src/devices/bus/hp9845_io/98046.h | 2 +- src/devices/bus/hp9845_io/hp9845_io.cpp | 2 +- src/devices/bus/hp9845_io/hp9845_io.h | 2 +- src/devices/bus/hp9845_io/hp9885.cpp | 2 +- src/devices/bus/hp9845_io/hp9885.h | 2 +- src/devices/bus/hp_dio/hp98265a.cpp | 22 +-- src/devices/bus/hp_dio/hp98265a.h | 4 +- src/devices/bus/hp_dio/hp98543.cpp | 6 +- src/devices/bus/hp_dio/hp98543.h | 4 +- src/devices/bus/hp_dio/hp98544.cpp | 4 +- src/devices/bus/hp_dio/hp98544.h | 4 +- src/devices/bus/hp_dio/hp98550.cpp | 6 +- src/devices/bus/hp_dio/hp98550.h | 4 +- src/devices/bus/hp_dio/hp98603a.cpp | 4 +- src/devices/bus/hp_dio/hp98603a.h | 4 +- src/devices/bus/hp_dio/hp98603b.cpp | 4 +- src/devices/bus/hp_dio/hp98603b.h | 4 +- src/devices/bus/hp_dio/hp98620.cpp | 4 +- src/devices/bus/hp_dio/hp98620.h | 4 +- src/devices/bus/hp_dio/hp98643.cpp | 4 +- src/devices/bus/hp_dio/hp98643.h | 4 +- src/devices/bus/hp_dio/hp98644.cpp | 4 +- src/devices/bus/hp_dio/hp98644.h | 4 +- src/devices/bus/hp_dio/hp_dio.cpp | 12 +- src/devices/bus/hp_dio/hp_dio.h | 20 +- src/devices/bus/hp_dio/human_interface.cpp | 10 +- src/devices/bus/hp_dio/human_interface.h | 4 +- src/devices/bus/hp_hil/hlebase.cpp | 2 +- src/devices/bus/hp_hil/hlebase.h | 2 +- src/devices/bus/hp_hil/hlekbd.cpp | 4 +- src/devices/bus/hp_hil/hlekbd.h | 4 +- src/devices/bus/hp_hil/hlemouse.cpp | 2 +- src/devices/bus/hp_hil/hlemouse.h | 2 +- src/devices/bus/hp_hil/hp_hil.cpp | 4 +- src/devices/bus/hp_hil/hp_hil.h | 6 +- src/devices/bus/hp_ipc_io/82919.cpp | 2 +- src/devices/bus/hp_ipc_io/82919.h | 2 +- src/devices/bus/hp_ipc_io/hp_ipc_io.cpp | 6 +- src/devices/bus/hp_ipc_io/hp_ipc_io.h | 11 +- src/devices/bus/ieee488/c2031.cpp | 4 +- src/devices/bus/ieee488/c2031.h | 2 +- src/devices/bus/ieee488/c2040.cpp | 8 +- src/devices/bus/ieee488/c2040.h | 8 +- src/devices/bus/ieee488/c2040fdc.cpp | 2 +- src/devices/bus/ieee488/c2040fdc.h | 2 +- src/devices/bus/ieee488/c8050.cpp | 10 +- src/devices/bus/ieee488/c8050.h | 10 +- src/devices/bus/ieee488/c8050fdc.cpp | 2 +- src/devices/bus/ieee488/c8050fdc.h | 2 +- src/devices/bus/ieee488/c8280.cpp | 2 +- src/devices/bus/ieee488/c8280.h | 2 +- src/devices/bus/ieee488/d9060.cpp | 6 +- src/devices/bus/ieee488/d9060.h | 6 +- src/devices/bus/ieee488/grid2102.cpp | 8 +- src/devices/bus/ieee488/grid2102.h | 8 +- src/devices/bus/ieee488/hardbox.cpp | 4 +- src/devices/bus/ieee488/hardbox.h | 2 +- src/devices/bus/ieee488/hp9122c.cpp | 2 +- src/devices/bus/ieee488/hp9122c.h | 2 +- src/devices/bus/ieee488/hp9895.cpp | 6 +- src/devices/bus/ieee488/hp9895.h | 2 +- src/devices/bus/ieee488/ieee488.cpp | 6 +- src/devices/bus/ieee488/ieee488.h | 6 +- src/devices/bus/ieee488/remote488.cpp | 4 +- src/devices/bus/ieee488/remote488.h | 2 +- src/devices/bus/ieee488/shark.cpp | 6 +- src/devices/bus/ieee488/shark.h | 2 +- src/devices/bus/ieee488/softbox.cpp | 6 +- src/devices/bus/ieee488/softbox.h | 2 +- src/devices/bus/imi7000/imi5000h.cpp | 4 +- src/devices/bus/imi7000/imi5000h.h | 2 +- src/devices/bus/imi7000/imi7000.cpp | 4 +- src/devices/bus/imi7000/imi7000.h | 6 +- src/devices/bus/intellec4/insdatastor.cpp | 4 +- src/devices/bus/intellec4/intellec4.cpp | 4 +- src/devices/bus/intellec4/intellec4.h | 6 +- src/devices/bus/intellec4/prommemory.cpp | 4 +- src/devices/bus/intellec4/tapereader.cpp | 4 +- src/devices/bus/interpro/keyboard/hle.cpp | 4 +- src/devices/bus/interpro/keyboard/hle.h | 4 +- src/devices/bus/interpro/keyboard/keyboard.cpp | 2 +- src/devices/bus/interpro/keyboard/keyboard.h | 2 +- src/devices/bus/interpro/keyboard/lle.cpp | 6 +- src/devices/bus/interpro/keyboard/lle.h | 4 +- src/devices/bus/interpro/mouse/mouse.cpp | 4 +- src/devices/bus/interpro/mouse/mouse.h | 4 +- src/devices/bus/interpro/sr/edge.cpp | 38 ++-- src/devices/bus/interpro/sr/edge.h | 22 +-- src/devices/bus/interpro/sr/gt.cpp | 64 +++--- src/devices/bus/interpro/sr/gt.h | 20 +- src/devices/bus/interpro/sr/sr.cpp | 8 +- src/devices/bus/interpro/sr/sr.h | 18 +- src/devices/bus/intv/ecs.cpp | 2 +- src/devices/bus/intv/ecs.h | 2 +- src/devices/bus/intv/rom.cpp | 10 +- src/devices/bus/intv/rom.h | 10 +- src/devices/bus/intv/slot.cpp | 2 +- src/devices/bus/intv/slot.h | 4 +- src/devices/bus/intv/voice.cpp | 4 +- src/devices/bus/intv/voice.h | 2 +- src/devices/bus/intv_ctrl/ctrl.cpp | 2 +- src/devices/bus/intv_ctrl/ctrl.h | 4 +- src/devices/bus/intv_ctrl/ecs_ctrl.cpp | 8 +- src/devices/bus/intv_ctrl/ecs_ctrl.h | 10 +- src/devices/bus/intv_ctrl/handctrl.cpp | 2 +- src/devices/bus/intv_ctrl/handctrl.h | 2 +- src/devices/bus/iq151/disc2.cpp | 4 +- src/devices/bus/iq151/disc2.h | 2 +- src/devices/bus/iq151/grafik.cpp | 2 +- src/devices/bus/iq151/grafik.h | 2 +- src/devices/bus/iq151/iq151.cpp | 2 +- src/devices/bus/iq151/iq151.h | 4 +- src/devices/bus/iq151/minigraf.cpp | 2 +- src/devices/bus/iq151/minigraf.h | 2 +- src/devices/bus/iq151/ms151a.cpp | 2 +- src/devices/bus/iq151/ms151a.h | 2 +- src/devices/bus/iq151/rom.cpp | 12 +- src/devices/bus/iq151/rom.h | 12 +- src/devices/bus/iq151/staper.cpp | 4 +- src/devices/bus/iq151/staper.h | 2 +- src/devices/bus/iq151/video32.cpp | 2 +- src/devices/bus/iq151/video32.h | 2 +- src/devices/bus/iq151/video64.cpp | 2 +- src/devices/bus/iq151/video64.h | 2 +- src/devices/bus/isa/3c503.cpp | 4 +- src/devices/bus/isa/3c503.h | 2 +- src/devices/bus/isa/3c505.cpp | 2 +- src/devices/bus/isa/3c505.h | 2 +- src/devices/bus/isa/3xtwin.cpp | 2 +- src/devices/bus/isa/3xtwin.h | 2 +- src/devices/bus/isa/acb2072.cpp | 2 +- src/devices/bus/isa/acb2072.h | 2 +- src/devices/bus/isa/adlib.cpp | 2 +- src/devices/bus/isa/adlib.h | 2 +- src/devices/bus/isa/aga.cpp | 6 +- src/devices/bus/isa/aga.h | 6 +- src/devices/bus/isa/aha1542b.cpp | 6 +- src/devices/bus/isa/aha1542b.h | 6 +- src/devices/bus/isa/aha1542c.cpp | 12 +- src/devices/bus/isa/aha1542c.h | 8 +- src/devices/bus/isa/aha174x.cpp | 10 +- src/devices/bus/isa/aha174x.h | 6 +- src/devices/bus/isa/asc88.cpp | 2 +- src/devices/bus/isa/asc88.h | 2 +- src/devices/bus/isa/bblue2.cpp | 2 +- src/devices/bus/isa/bblue2.h | 2 +- src/devices/bus/isa/bt54x.cpp | 12 +- src/devices/bus/isa/bt54x.h | 8 +- src/devices/bus/isa/cga.cpp | 28 +-- src/devices/bus/isa/cga.h | 28 +-- src/devices/bus/isa/chessmdr.cpp | 4 +- src/devices/bus/isa/chessmdr.h | 2 +- src/devices/bus/isa/chessmsr.cpp | 2 +- src/devices/bus/isa/chessmsr.h | 2 +- src/devices/bus/isa/cl_sh260.cpp | 6 +- src/devices/bus/isa/cl_sh260.h | 6 +- src/devices/bus/isa/com.cpp | 6 +- src/devices/bus/isa/com.h | 6 +- src/devices/bus/isa/dcb.cpp | 2 +- src/devices/bus/isa/dcb.h | 2 +- src/devices/bus/isa/dectalk.cpp | 4 +- src/devices/bus/isa/dectalk.h | 2 +- src/devices/bus/isa/ega.cpp | 4 +- src/devices/bus/isa/ega.h | 4 +- src/devices/bus/isa/eis_hgb107x.cpp | 4 +- src/devices/bus/isa/eis_hgb107x.h | 4 +- src/devices/bus/isa/eis_sad8852.cpp | 2 +- src/devices/bus/isa/eis_sad8852.h | 2 +- src/devices/bus/isa/eis_twib.cpp | 4 +- src/devices/bus/isa/eis_twib.h | 2 +- src/devices/bus/isa/ex1280.cpp | 6 +- src/devices/bus/isa/ex1280.h | 2 +- src/devices/bus/isa/fdc.cpp | 30 +-- src/devices/bus/isa/fdc.h | 18 +- src/devices/bus/isa/finalchs.cpp | 2 +- src/devices/bus/isa/finalchs.h | 2 +- src/devices/bus/isa/gblaster.cpp | 2 +- src/devices/bus/isa/gblaster.h | 2 +- src/devices/bus/isa/gus.cpp | 6 +- src/devices/bus/isa/gus.h | 4 +- src/devices/bus/isa/hdc.cpp | 14 +- src/devices/bus/isa/hdc.h | 14 +- src/devices/bus/isa/ibm_mfc.cpp | 4 +- src/devices/bus/isa/ibm_mfc.h | 2 +- src/devices/bus/isa/ide.cpp | 2 +- src/devices/bus/isa/ide.h | 2 +- src/devices/bus/isa/isa.cpp | 12 +- src/devices/bus/isa/isa.h | 20 +- src/devices/bus/isa/lbaenhancer.cpp | 4 +- src/devices/bus/isa/lbaenhancer.h | 2 +- src/devices/bus/isa/lpt.cpp | 2 +- src/devices/bus/isa/lpt.h | 2 +- src/devices/bus/isa/lrk330.cpp | 2 +- src/devices/bus/isa/lrk330.h | 2 +- src/devices/bus/isa/mach32.cpp | 20 +- src/devices/bus/isa/mach32.h | 16 +- src/devices/bus/isa/mc1502_fdc.cpp | 2 +- src/devices/bus/isa/mc1502_fdc.h | 2 +- src/devices/bus/isa/mc1502_rom.cpp | 2 +- src/devices/bus/isa/mc1502_rom.h | 2 +- src/devices/bus/isa/mcd.cpp | 2 +- src/devices/bus/isa/mcd.h | 2 +- src/devices/bus/isa/mda.cpp | 8 +- src/devices/bus/isa/mda.h | 8 +- src/devices/bus/isa/mpu401.cpp | 2 +- src/devices/bus/isa/mpu401.h | 2 +- src/devices/bus/isa/mufdc.cpp | 6 +- src/devices/bus/isa/mufdc.h | 6 +- src/devices/bus/isa/myb3k_com.cpp | 6 +- src/devices/bus/isa/myb3k_com.h | 4 +- src/devices/bus/isa/myb3k_fdc.cpp | 8 +- src/devices/bus/isa/myb3k_fdc.h | 14 +- src/devices/bus/isa/ne1000.cpp | 4 +- src/devices/bus/isa/ne1000.h | 2 +- src/devices/bus/isa/ne2000.cpp | 4 +- src/devices/bus/isa/ne2000.h | 2 +- src/devices/bus/isa/np600.cpp | 2 +- src/devices/bus/isa/np600.h | 2 +- src/devices/bus/isa/num9rev.cpp | 2 +- src/devices/bus/isa/num9rev.h | 2 +- src/devices/bus/isa/omti8621.cpp | 12 +- src/devices/bus/isa/omti8621.h | 4 +- src/devices/bus/isa/p1_fdc.cpp | 2 +- src/devices/bus/isa/p1_fdc.h | 2 +- src/devices/bus/isa/p1_hdc.cpp | 8 +- src/devices/bus/isa/p1_hdc.h | 2 +- src/devices/bus/isa/p1_rom.cpp | 2 +- src/devices/bus/isa/p1_rom.h | 2 +- src/devices/bus/isa/p1_sound.cpp | 12 +- src/devices/bus/isa/p1_sound.h | 2 +- src/devices/bus/isa/pc1640_iga.cpp | 2 +- src/devices/bus/isa/pc1640_iga.h | 2 +- src/devices/bus/isa/pcmidi.cpp | 2 +- src/devices/bus/isa/pcmidi.h | 2 +- src/devices/bus/isa/pds.cpp | 2 +- src/devices/bus/isa/pds.h | 2 +- src/devices/bus/isa/pgc.cpp | 4 +- src/devices/bus/isa/pgc.h | 4 +- src/devices/bus/isa/s3virge.cpp | 10 +- src/devices/bus/isa/s3virge.h | 10 +- src/devices/bus/isa/sb16.cpp | 6 +- src/devices/bus/isa/sb16.h | 2 +- src/devices/bus/isa/sblaster.cpp | 18 +- src/devices/bus/isa/sblaster.h | 12 +- src/devices/bus/isa/sc499.cpp | 6 +- src/devices/bus/isa/sc499.h | 4 +- src/devices/bus/isa/side116.cpp | 2 +- src/devices/bus/isa/side116.h | 2 +- src/devices/bus/isa/ssi2001.cpp | 2 +- src/devices/bus/isa/ssi2001.h | 2 +- src/devices/bus/isa/stereo_fx.cpp | 6 +- src/devices/bus/isa/stereo_fx.h | 2 +- src/devices/bus/isa/svga_cirrus.cpp | 8 +- src/devices/bus/isa/svga_cirrus.h | 4 +- src/devices/bus/isa/svga_s3.cpp | 16 +- src/devices/bus/isa/svga_s3.h | 8 +- src/devices/bus/isa/svga_trident.cpp | 4 +- src/devices/bus/isa/svga_trident.h | 2 +- src/devices/bus/isa/svga_tseng.cpp | 4 +- src/devices/bus/isa/svga_tseng.h | 2 +- src/devices/bus/isa/tekram_dc820.cpp | 26 +-- src/devices/bus/isa/tekram_dc820.h | 10 +- src/devices/bus/isa/trident.cpp | 6 +- src/devices/bus/isa/trident.h | 6 +- src/devices/bus/isa/ultra12f.cpp | 6 +- src/devices/bus/isa/ultra12f.h | 6 +- src/devices/bus/isa/ultra14f.cpp | 2 +- src/devices/bus/isa/ultra14f.h | 2 +- src/devices/bus/isa/ultra24f.cpp | 4 +- src/devices/bus/isa/ultra24f.h | 2 +- src/devices/bus/isa/vga.cpp | 4 +- src/devices/bus/isa/vga.h | 2 +- src/devices/bus/isa/vga_ati.cpp | 12 +- src/devices/bus/isa/vga_ati.h | 6 +- src/devices/bus/isa/wd1002a_wx1.cpp | 2 +- src/devices/bus/isa/wd1002a_wx1.h | 2 +- src/devices/bus/isa/wd1007a.cpp | 2 +- src/devices/bus/isa/wd1007a.h | 2 +- src/devices/bus/isa/wdxt_gen.cpp | 12 +- src/devices/bus/isa/wdxt_gen.h | 2 +- src/devices/bus/isa/xtide.cpp | 2 +- src/devices/bus/isa/xtide.h | 2 +- src/devices/bus/isbx/compis_fdc.cpp | 4 +- src/devices/bus/isbx/compis_fdc.h | 2 +- src/devices/bus/isbx/isbc_218a.cpp | 4 +- src/devices/bus/isbx/isbc_218a.h | 2 +- src/devices/bus/isbx/isbx.cpp | 2 +- src/devices/bus/isbx/isbx.h | 6 +- src/devices/bus/jakks_gamekey/rom.cpp | 12 +- src/devices/bus/jakks_gamekey/rom.h | 10 +- src/devices/bus/jakks_gamekey/slot.cpp | 2 +- src/devices/bus/jakks_gamekey/slot.h | 4 +- src/devices/bus/kc/d002.cpp | 2 +- src/devices/bus/kc/d002.h | 2 +- src/devices/bus/kc/d004.cpp | 6 +- src/devices/bus/kc/d004.h | 6 +- src/devices/bus/kc/kc.cpp | 6 +- src/devices/bus/kc/kc.h | 10 +- src/devices/bus/kc/ram.cpp | 14 +- src/devices/bus/kc/ram.h | 14 +- src/devices/bus/kc/rom.cpp | 8 +- src/devices/bus/kc/rom.h | 8 +- src/devices/bus/lpci/cirrus.cpp | 2 +- src/devices/bus/lpci/cirrus.h | 2 +- src/devices/bus/lpci/i82371ab.cpp | 2 +- src/devices/bus/lpci/i82371ab.h | 2 +- src/devices/bus/lpci/i82371sb.cpp | 2 +- src/devices/bus/lpci/i82371sb.h | 2 +- src/devices/bus/lpci/i82439tx.cpp | 2 +- src/devices/bus/lpci/i82439tx.h | 2 +- src/devices/bus/lpci/mpc105.cpp | 2 +- src/devices/bus/lpci/mpc105.h | 2 +- src/devices/bus/lpci/northbridge.cpp | 2 +- src/devices/bus/lpci/northbridge.h | 2 +- src/devices/bus/lpci/pci.cpp | 4 +- src/devices/bus/lpci/pci.h | 6 +- src/devices/bus/lpci/southbridge.cpp | 18 +- src/devices/bus/lpci/southbridge.h | 4 +- src/devices/bus/lpci/vt82c505.cpp | 2 +- src/devices/bus/lpci/vt82c505.h | 2 +- src/devices/bus/m5/rom.cpp | 6 +- src/devices/bus/m5/rom.h | 6 +- src/devices/bus/m5/slot.cpp | 2 +- src/devices/bus/m5/slot.h | 4 +- src/devices/bus/mackbd/keyboard.cpp | 20 +- src/devices/bus/mackbd/mackbd.cpp | 2 +- src/devices/bus/mackbd/mackbd.h | 4 +- src/devices/bus/mackbd/pluskbd.cpp | 8 +- src/devices/bus/macpds/hyperdrive.cpp | 8 +- src/devices/bus/macpds/hyperdrive.h | 4 +- src/devices/bus/macpds/macpds.cpp | 8 +- src/devices/bus/macpds/macpds.h | 12 +- src/devices/bus/macpds/pds_tpdfpd.cpp | 4 +- src/devices/bus/macpds/pds_tpdfpd.h | 4 +- src/devices/bus/mc10/mc10_cart.cpp | 2 +- src/devices/bus/mc10/mc10_cart.h | 4 +- src/devices/bus/mc10/mcx128.cpp | 12 +- src/devices/bus/mc10/pak.cpp | 4 +- src/devices/bus/mc10/pak.h | 4 +- src/devices/bus/mc10/ram.cpp | 4 +- src/devices/bus/megadrive/eeprom.cpp | 20 +- src/devices/bus/megadrive/eeprom.h | 20 +- src/devices/bus/megadrive/ggenie.cpp | 2 +- src/devices/bus/megadrive/ggenie.h | 2 +- src/devices/bus/megadrive/jcart.cpp | 10 +- src/devices/bus/megadrive/jcart.h | 10 +- src/devices/bus/megadrive/md_slot.cpp | 8 +- src/devices/bus/megadrive/md_slot.h | 14 +- src/devices/bus/megadrive/rom.cpp | 78 ++++---- src/devices/bus/megadrive/rom.h | 78 ++++---- src/devices/bus/megadrive/sk.cpp | 4 +- src/devices/bus/megadrive/sk.h | 4 +- src/devices/bus/megadrive/stm95.cpp | 4 +- src/devices/bus/megadrive/stm95.h | 4 +- src/devices/bus/megadrive/svp.cpp | 6 +- src/devices/bus/megadrive/svp.h | 4 +- src/devices/bus/midi/midi.cpp | 2 +- src/devices/bus/midi/midi.h | 4 +- src/devices/bus/midi/midiinport.cpp | 4 +- src/devices/bus/midi/midiinport.h | 2 +- src/devices/bus/midi/midioutport.cpp | 4 +- src/devices/bus/midi/midioutport.h | 2 +- src/devices/bus/msx_cart/arc.cpp | 2 +- src/devices/bus/msx_cart/arc.h | 2 +- src/devices/bus/msx_cart/ascii.cpp | 10 +- src/devices/bus/msx_cart/ascii.h | 10 +- src/devices/bus/msx_cart/bm_012.cpp | 2 +- src/devices/bus/msx_cart/bm_012.h | 2 +- src/devices/bus/msx_cart/crossblaim.cpp | 2 +- src/devices/bus/msx_cart/crossblaim.h | 2 +- src/devices/bus/msx_cart/disk.cpp | 20 +- src/devices/bus/msx_cart/disk.h | 18 +- src/devices/bus/msx_cart/dooly.cpp | 2 +- src/devices/bus/msx_cart/dooly.h | 2 +- src/devices/bus/msx_cart/easi_speech.cpp | 4 +- src/devices/bus/msx_cart/easi_speech.h | 2 +- src/devices/bus/msx_cart/fmpac.cpp | 2 +- src/devices/bus/msx_cart/fmpac.h | 2 +- src/devices/bus/msx_cart/fs_sr022.cpp | 2 +- src/devices/bus/msx_cart/fs_sr022.h | 2 +- src/devices/bus/msx_cart/halnote.cpp | 2 +- src/devices/bus/msx_cart/halnote.h | 2 +- src/devices/bus/msx_cart/hfox.cpp | 2 +- src/devices/bus/msx_cart/hfox.h | 2 +- src/devices/bus/msx_cart/holy_quran.cpp | 2 +- src/devices/bus/msx_cart/holy_quran.h | 2 +- src/devices/bus/msx_cart/ink.cpp | 2 +- src/devices/bus/msx_cart/ink.h | 2 +- src/devices/bus/msx_cart/konami.cpp | 18 +- src/devices/bus/msx_cart/konami.h | 16 +- src/devices/bus/msx_cart/korean.cpp | 6 +- src/devices/bus/msx_cart/korean.h | 6 +- src/devices/bus/msx_cart/majutsushi.cpp | 4 +- src/devices/bus/msx_cart/majutsushi.h | 2 +- src/devices/bus/msx_cart/moonsound.cpp | 2 +- src/devices/bus/msx_cart/moonsound.h | 2 +- src/devices/bus/msx_cart/msx_audio.cpp | 8 +- src/devices/bus/msx_cart/msx_audio.h | 6 +- src/devices/bus/msx_cart/msx_audio_kb.cpp | 6 +- src/devices/bus/msx_cart/msx_audio_kb.h | 4 +- src/devices/bus/msx_cart/msxdos2.cpp | 2 +- src/devices/bus/msx_cart/msxdos2.h | 2 +- src/devices/bus/msx_cart/nomapper.cpp | 2 +- src/devices/bus/msx_cart/nomapper.h | 2 +- src/devices/bus/msx_cart/rtype.cpp | 2 +- src/devices/bus/msx_cart/rtype.h | 2 +- src/devices/bus/msx_cart/super_swangi.cpp | 2 +- src/devices/bus/msx_cart/super_swangi.h | 2 +- src/devices/bus/msx_cart/superloderunner.cpp | 2 +- src/devices/bus/msx_cart/superloderunner.h | 2 +- src/devices/bus/msx_cart/yamaha.cpp | 6 +- src/devices/bus/msx_cart/yamaha.h | 6 +- src/devices/bus/msx_slot/bunsetsu.cpp | 2 +- src/devices/bus/msx_slot/bunsetsu.h | 2 +- src/devices/bus/msx_slot/cartridge.cpp | 6 +- src/devices/bus/msx_slot/cartridge.h | 6 +- src/devices/bus/msx_slot/disk.cpp | 18 +- src/devices/bus/msx_slot/disk.h | 18 +- src/devices/bus/msx_slot/fs4600.cpp | 2 +- src/devices/bus/msx_slot/fs4600.h | 2 +- src/devices/bus/msx_slot/music.cpp | 2 +- src/devices/bus/msx_slot/music.h | 2 +- src/devices/bus/msx_slot/panasonic08.cpp | 2 +- src/devices/bus/msx_slot/panasonic08.h | 2 +- src/devices/bus/msx_slot/ram.cpp | 2 +- src/devices/bus/msx_slot/ram.h | 2 +- src/devices/bus/msx_slot/ram_mm.cpp | 2 +- src/devices/bus/msx_slot/ram_mm.h | 2 +- src/devices/bus/msx_slot/rom.cpp | 4 +- src/devices/bus/msx_slot/rom.h | 4 +- src/devices/bus/msx_slot/sony08.cpp | 2 +- src/devices/bus/msx_slot/sony08.h | 2 +- src/devices/bus/mtx/cfx.cpp | 2 +- src/devices/bus/mtx/cfx.h | 2 +- src/devices/bus/mtx/exp.cpp | 2 +- src/devices/bus/mtx/exp.h | 2 +- src/devices/bus/mtx/magrom.cpp | 2 +- src/devices/bus/mtx/magrom.h | 2 +- src/devices/bus/mtx/rompak.cpp | 2 +- src/devices/bus/mtx/rompak.h | 2 +- src/devices/bus/mtx/sdx.cpp | 6 +- src/devices/bus/mtx/sdx.h | 6 +- src/devices/bus/multibus/cpuap.cpp | 2 +- src/devices/bus/multibus/cpuap.h | 2 +- src/devices/bus/multibus/isbc202.cpp | 2 +- src/devices/bus/multibus/isbc202.h | 2 +- src/devices/bus/multibus/isbc8024.cpp | 8 +- src/devices/bus/multibus/isbc8024.h | 2 +- src/devices/bus/multibus/labtam_3232.cpp | 2 +- src/devices/bus/multibus/labtam_3232.h | 2 +- src/devices/bus/multibus/labtam_vducom.cpp | 14 +- src/devices/bus/multibus/labtam_vducom.h | 2 +- src/devices/bus/multibus/labtam_z80sbc.cpp | 6 +- src/devices/bus/multibus/labtam_z80sbc.h | 2 +- src/devices/bus/multibus/multibus.cpp | 4 +- src/devices/bus/multibus/multibus.h | 4 +- src/devices/bus/multibus/serad.cpp | 2 +- src/devices/bus/multibus/serad.h | 2 +- src/devices/bus/nasbus/avc.cpp | 4 +- src/devices/bus/nasbus/avc.h | 2 +- src/devices/bus/nasbus/floppy.cpp | 2 +- src/devices/bus/nasbus/floppy.h | 2 +- src/devices/bus/nasbus/nasbus.cpp | 6 +- src/devices/bus/nasbus/nasbus.h | 8 +- src/devices/bus/neogeo/boot_cthd.cpp | 6 +- src/devices/bus/neogeo/boot_cthd.h | 6 +- src/devices/bus/neogeo/boot_kof2k2.cpp | 6 +- src/devices/bus/neogeo/boot_kof2k2.h | 6 +- src/devices/bus/neogeo/boot_kof2k3.cpp | 6 +- src/devices/bus/neogeo/boot_kof2k3.h | 6 +- src/devices/bus/neogeo/boot_misc.cpp | 22 +-- src/devices/bus/neogeo/boot_misc.h | 22 +-- src/devices/bus/neogeo/boot_svc.cpp | 8 +- src/devices/bus/neogeo/boot_svc.h | 8 +- src/devices/bus/neogeo/cmc.cpp | 24 +-- src/devices/bus/neogeo/cmc.h | 24 +-- src/devices/bus/neogeo/kof2k2.cpp | 10 +- src/devices/bus/neogeo/kof2k2.h | 10 +- src/devices/bus/neogeo/pcm2.cpp | 8 +- src/devices/bus/neogeo/pcm2.h | 8 +- src/devices/bus/neogeo/prot_cmc.cpp | 2 +- src/devices/bus/neogeo/prot_cmc.h | 2 +- src/devices/bus/neogeo/prot_cthd.cpp | 2 +- src/devices/bus/neogeo/prot_cthd.h | 2 +- src/devices/bus/neogeo/prot_fatfury2.cpp | 4 +- src/devices/bus/neogeo/prot_fatfury2.h | 2 +- src/devices/bus/neogeo/prot_kof2k2.cpp | 2 +- src/devices/bus/neogeo/prot_kof2k2.h | 2 +- src/devices/bus/neogeo/prot_kof2k3bl.cpp | 2 +- src/devices/bus/neogeo/prot_kof2k3bl.h | 2 +- src/devices/bus/neogeo/prot_kof98.cpp | 2 +- src/devices/bus/neogeo/prot_kof98.h | 2 +- src/devices/bus/neogeo/prot_misc.cpp | 2 +- src/devices/bus/neogeo/prot_misc.h | 2 +- src/devices/bus/neogeo/prot_mslugx.cpp | 2 +- src/devices/bus/neogeo/prot_mslugx.h | 2 +- src/devices/bus/neogeo/prot_pcm2.cpp | 2 +- src/devices/bus/neogeo/prot_pcm2.h | 2 +- src/devices/bus/neogeo/prot_pvc.cpp | 2 +- src/devices/bus/neogeo/prot_pvc.h | 2 +- src/devices/bus/neogeo/prot_sma.cpp | 2 +- src/devices/bus/neogeo/prot_sma.h | 2 +- src/devices/bus/neogeo/pvc.cpp | 8 +- src/devices/bus/neogeo/pvc.h | 8 +- src/devices/bus/neogeo/rom.cpp | 2 +- src/devices/bus/neogeo/rom.h | 2 +- src/devices/bus/neogeo/sbp.cpp | 2 +- src/devices/bus/neogeo/sbp.h | 2 +- src/devices/bus/neogeo/sma.cpp | 12 +- src/devices/bus/neogeo/sma.h | 12 +- src/devices/bus/neogeo_ctrl/ctrl.cpp | 4 +- src/devices/bus/neogeo_ctrl/ctrl.h | 8 +- src/devices/bus/neogeo_ctrl/dial.cpp | 2 +- src/devices/bus/neogeo_ctrl/dial.h | 2 +- src/devices/bus/neogeo_ctrl/irrmaze.cpp | 2 +- src/devices/bus/neogeo_ctrl/irrmaze.h | 2 +- src/devices/bus/neogeo_ctrl/joystick.cpp | 4 +- src/devices/bus/neogeo_ctrl/joystick.h | 4 +- src/devices/bus/neogeo_ctrl/kizuna4p.cpp | 2 +- src/devices/bus/neogeo_ctrl/kizuna4p.h | 2 +- src/devices/bus/neogeo_ctrl/mahjong.cpp | 6 +- src/devices/bus/neogeo_ctrl/mahjong.h | 6 +- src/devices/bus/nes/2a03pur.cpp | 2 +- src/devices/bus/nes/2a03pur.h | 2 +- src/devices/bus/nes/act53.cpp | 2 +- src/devices/bus/nes/act53.h | 2 +- src/devices/bus/nes/aladdin.cpp | 10 +- src/devices/bus/nes/aladdin.h | 12 +- src/devices/bus/nes/ave.cpp | 6 +- src/devices/bus/nes/ave.h | 6 +- src/devices/bus/nes/bandai.cpp | 18 +- src/devices/bus/nes/bandai.h | 18 +- src/devices/bus/nes/batlab.cpp | 4 +- src/devices/bus/nes/batlab.h | 4 +- src/devices/bus/nes/benshieng.cpp | 2 +- src/devices/bus/nes/benshieng.h | 2 +- src/devices/bus/nes/bootleg.cpp | 66 +++---- src/devices/bus/nes/bootleg.h | 66 +++---- src/devices/bus/nes/camerica.cpp | 10 +- src/devices/bus/nes/camerica.h | 10 +- src/devices/bus/nes/cne.cpp | 6 +- src/devices/bus/nes/cne.h | 6 +- src/devices/bus/nes/cony.cpp | 8 +- src/devices/bus/nes/cony.h | 8 +- src/devices/bus/nes/datach.cpp | 12 +- src/devices/bus/nes/datach.h | 12 +- src/devices/bus/nes/discrete.cpp | 8 +- src/devices/bus/nes/discrete.h | 8 +- src/devices/bus/nes/disksys.cpp | 2 +- src/devices/bus/nes/disksys.h | 2 +- src/devices/bus/nes/event.cpp | 4 +- src/devices/bus/nes/event.h | 4 +- src/devices/bus/nes/ggenie.cpp | 2 +- src/devices/bus/nes/ggenie.h | 2 +- src/devices/bus/nes/henggedianzi.cpp | 4 +- src/devices/bus/nes/henggedianzi.h | 4 +- src/devices/bus/nes/hes.cpp | 2 +- src/devices/bus/nes/hes.h | 2 +- src/devices/bus/nes/irem.cpp | 12 +- src/devices/bus/nes/irem.h | 12 +- src/devices/bus/nes/jaleco.cpp | 28 +-- src/devices/bus/nes/jaleco.h | 28 +-- src/devices/bus/nes/jncota.cpp | 2 +- src/devices/bus/nes/jncota.h | 2 +- src/devices/bus/nes/jy.cpp | 10 +- src/devices/bus/nes/jy.h | 10 +- src/devices/bus/nes/kaiser.cpp | 36 ++-- src/devices/bus/nes/kaiser.h | 36 ++-- src/devices/bus/nes/karastudio.cpp | 6 +- src/devices/bus/nes/karastudio.h | 8 +- src/devices/bus/nes/konami.cpp | 16 +- src/devices/bus/nes/konami.h | 16 +- src/devices/bus/nes/legacy.cpp | 8 +- src/devices/bus/nes/legacy.h | 8 +- src/devices/bus/nes/mmc1.cpp | 8 +- src/devices/bus/nes/mmc1.h | 8 +- src/devices/bus/nes/mmc1_clones.cpp | 14 +- src/devices/bus/nes/mmc1_clones.h | 14 +- src/devices/bus/nes/mmc2.cpp | 6 +- src/devices/bus/nes/mmc2.h | 6 +- src/devices/bus/nes/mmc3.cpp | 18 +- src/devices/bus/nes/mmc3.h | 18 +- src/devices/bus/nes/mmc3_clones.cpp | 132 ++++++------- src/devices/bus/nes/mmc3_clones.h | 132 ++++++------- src/devices/bus/nes/mmc5.cpp | 2 +- src/devices/bus/nes/mmc5.h | 2 +- src/devices/bus/nes/multigame.cpp | 160 +++++++-------- src/devices/bus/nes/multigame.h | 160 +++++++-------- src/devices/bus/nes/namcot.cpp | 16 +- src/devices/bus/nes/namcot.h | 16 +- src/devices/bus/nes/nanjing.cpp | 2 +- src/devices/bus/nes/nanjing.h | 2 +- src/devices/bus/nes/nes_slot.cpp | 2 +- src/devices/bus/nes/nes_slot.h | 4 +- src/devices/bus/nes/ntdec.cpp | 6 +- src/devices/bus/nes/ntdec.h | 6 +- src/devices/bus/nes/nxrom.cpp | 28 +-- src/devices/bus/nes/nxrom.h | 28 +-- src/devices/bus/nes/pirate.cpp | 24 +-- src/devices/bus/nes/pirate.h | 26 +-- src/devices/bus/nes/pt554.cpp | 2 +- src/devices/bus/nes/pt554.h | 2 +- src/devices/bus/nes/racermate.cpp | 2 +- src/devices/bus/nes/racermate.h | 2 +- src/devices/bus/nes/rcm.cpp | 12 +- src/devices/bus/nes/rcm.h | 12 +- src/devices/bus/nes/rexsoft.cpp | 4 +- src/devices/bus/nes/rexsoft.h | 4 +- src/devices/bus/nes/sachen.cpp | 36 ++-- src/devices/bus/nes/sachen.h | 36 ++-- src/devices/bus/nes/sealie.cpp | 10 +- src/devices/bus/nes/sealie.h | 10 +- src/devices/bus/nes/somari.cpp | 6 +- src/devices/bus/nes/somari.h | 6 +- src/devices/bus/nes/subor.cpp | 6 +- src/devices/bus/nes/subor.h | 6 +- src/devices/bus/nes/sunsoft.cpp | 16 +- src/devices/bus/nes/sunsoft.h | 16 +- src/devices/bus/nes/sunsoft_dcs.cpp | 6 +- src/devices/bus/nes/sunsoft_dcs.h | 8 +- src/devices/bus/nes/taito.cpp | 10 +- src/devices/bus/nes/taito.h | 10 +- src/devices/bus/nes/tengen.cpp | 6 +- src/devices/bus/nes/tengen.h | 6 +- src/devices/bus/nes/txc.cpp | 12 +- src/devices/bus/nes/txc.h | 12 +- src/devices/bus/nes/vrc_clones.cpp | 30 +-- src/devices/bus/nes/vrc_clones.h | 30 +-- src/devices/bus/nes/waixing.cpp | 48 ++--- src/devices/bus/nes/waixing.h | 48 ++--- src/devices/bus/nes/zemina.cpp | 2 +- src/devices/bus/nes/zemina.h | 2 +- src/devices/bus/nes_ctrl/4score.cpp | 6 +- src/devices/bus/nes_ctrl/4score.h | 6 +- src/devices/bus/nes_ctrl/arkpaddle.cpp | 6 +- src/devices/bus/nes_ctrl/arkpaddle.h | 6 +- src/devices/bus/nes_ctrl/bcbattle.cpp | 4 +- src/devices/bus/nes_ctrl/bcbattle.h | 2 +- src/devices/bus/nes_ctrl/ctrl.cpp | 2 +- src/devices/bus/nes_ctrl/ctrl.h | 4 +- src/devices/bus/nes_ctrl/dorepiano.cpp | 2 +- src/devices/bus/nes_ctrl/dorepiano.h | 2 +- src/devices/bus/nes_ctrl/fckeybrd.cpp | 2 +- src/devices/bus/nes_ctrl/fckeybrd.h | 2 +- src/devices/bus/nes_ctrl/fcmat.cpp | 6 +- src/devices/bus/nes_ctrl/fcmat.h | 6 +- src/devices/bus/nes_ctrl/hori.cpp | 4 +- src/devices/bus/nes_ctrl/hori.h | 4 +- src/devices/bus/nes_ctrl/joypad.cpp | 18 +- src/devices/bus/nes_ctrl/joypad.h | 18 +- src/devices/bus/nes_ctrl/konamibag.cpp | 2 +- src/devices/bus/nes_ctrl/konamibag.h | 2 +- src/devices/bus/nes_ctrl/konamihs.cpp | 2 +- src/devices/bus/nes_ctrl/konamihs.h | 2 +- src/devices/bus/nes_ctrl/miracle.cpp | 6 +- src/devices/bus/nes_ctrl/miracle.h | 2 +- src/devices/bus/nes_ctrl/mjpanel.cpp | 2 +- src/devices/bus/nes_ctrl/mjpanel.h | 2 +- src/devices/bus/nes_ctrl/pachinko.cpp | 2 +- src/devices/bus/nes_ctrl/pachinko.h | 2 +- src/devices/bus/nes_ctrl/partytap.cpp | 2 +- src/devices/bus/nes_ctrl/partytap.h | 2 +- src/devices/bus/nes_ctrl/powerpad.cpp | 2 +- src/devices/bus/nes_ctrl/powerpad.h | 2 +- src/devices/bus/nes_ctrl/rob.cpp | 4 +- src/devices/bus/nes_ctrl/rob.h | 2 +- src/devices/bus/nes_ctrl/snesadapter.cpp | 2 +- src/devices/bus/nes_ctrl/snesadapter.h | 2 +- src/devices/bus/nes_ctrl/suborkey.cpp | 2 +- src/devices/bus/nes_ctrl/suborkey.h | 2 +- src/devices/bus/nes_ctrl/turbofile.cpp | 2 +- src/devices/bus/nes_ctrl/turbofile.h | 2 +- src/devices/bus/nes_ctrl/zapper.cpp | 8 +- src/devices/bus/nes_ctrl/zapper.h | 6 +- src/devices/bus/nes_ctrl/zapper_sensor.cpp | 2 +- src/devices/bus/nes_ctrl/zapper_sensor.h | 2 +- src/devices/bus/newbrain/eim.cpp | 6 +- src/devices/bus/newbrain/eim.h | 2 +- src/devices/bus/newbrain/exp.cpp | 2 +- src/devices/bus/newbrain/exp.h | 4 +- src/devices/bus/newbrain/fdc.cpp | 4 +- src/devices/bus/newbrain/fdc.h | 2 +- src/devices/bus/nscsi/applecd.cpp | 2 +- src/devices/bus/nscsi/applecd.h | 2 +- src/devices/bus/nscsi/cd.cpp | 22 +-- src/devices/bus/nscsi/cd.h | 22 +-- src/devices/bus/nscsi/cdd2000.cpp | 6 +- src/devices/bus/nscsi/cdd2000.h | 2 +- src/devices/bus/nscsi/cdrn820s.cpp | 8 +- src/devices/bus/nscsi/cdrn820s.h | 4 +- src/devices/bus/nscsi/cdu415.cpp | 6 +- src/devices/bus/nscsi/cdu415.h | 2 +- src/devices/bus/nscsi/cdu561.cpp | 2 +- src/devices/bus/nscsi/cdu561.h | 2 +- src/devices/bus/nscsi/cdu75s.cpp | 4 +- src/devices/bus/nscsi/cdu75s.h | 2 +- src/devices/bus/nscsi/cfp1080s.cpp | 4 +- src/devices/bus/nscsi/cfp1080s.h | 2 +- src/devices/bus/nscsi/crd254sh.cpp | 2 +- src/devices/bus/nscsi/crd254sh.h | 2 +- src/devices/bus/nscsi/cw7501.cpp | 10 +- src/devices/bus/nscsi/cw7501.h | 6 +- src/devices/bus/nscsi/hd.cpp | 4 +- src/devices/bus/nscsi/hd.h | 4 +- src/devices/bus/nscsi/s1410.cpp | 2 +- src/devices/bus/nscsi/s1410.h | 2 +- src/devices/bus/nscsi/smoc501.cpp | 6 +- src/devices/bus/nscsi/smoc501.h | 2 +- src/devices/bus/nubus/bootbug.cpp | 4 +- src/devices/bus/nubus/bootbug.h | 4 +- src/devices/bus/nubus/laserview.cpp | 4 +- src/devices/bus/nubus/laserview.h | 4 +- src/devices/bus/nubus/nubus.cpp | 8 +- src/devices/bus/nubus/nubus.h | 10 +- src/devices/bus/nubus/nubus_48gc.cpp | 6 +- src/devices/bus/nubus/nubus_asntmc3b.cpp | 8 +- src/devices/bus/nubus/nubus_asntmc3b.h | 6 +- src/devices/bus/nubus/nubus_cb264.cpp | 6 +- src/devices/bus/nubus/nubus_cb264.h | 4 +- src/devices/bus/nubus/nubus_image.cpp | 10 +- src/devices/bus/nubus/nubus_image.h | 4 +- src/devices/bus/nubus/nubus_m2hires.cpp | 6 +- src/devices/bus/nubus/nubus_m2hires.h | 4 +- src/devices/bus/nubus/nubus_m2video.cpp | 6 +- src/devices/bus/nubus/nubus_m2video.h | 4 +- src/devices/bus/nubus/nubus_radiustpd.cpp | 4 +- src/devices/bus/nubus/nubus_radiustpd.h | 4 +- src/devices/bus/nubus/nubus_spec8.cpp | 4 +- src/devices/bus/nubus/nubus_specpdq.cpp | 4 +- src/devices/bus/nubus/nubus_vikbw.cpp | 4 +- src/devices/bus/nubus/nubus_vikbw.h | 4 +- src/devices/bus/nubus/nubus_wsportrait.cpp | 4 +- src/devices/bus/nubus/nubus_wsportrait.h | 4 +- src/devices/bus/nubus/pds30_30hr.cpp | 6 +- src/devices/bus/nubus/pds30_30hr.h | 4 +- src/devices/bus/nubus/pds30_cb264.cpp | 6 +- src/devices/bus/nubus/pds30_cb264.h | 4 +- src/devices/bus/nubus/pds30_mc30.cpp | 6 +- src/devices/bus/nubus/pds30_mc30.h | 4 +- src/devices/bus/nubus/pds30_procolor816.cpp | 6 +- src/devices/bus/nubus/pds30_procolor816.h | 4 +- src/devices/bus/nubus/pds30_sigmalview.cpp | 4 +- src/devices/bus/nubus/pds30_sigmalview.h | 4 +- src/devices/bus/nubus/quadralink.cpp | 4 +- src/devices/bus/nubus/quadralink.h | 4 +- src/devices/bus/odyssey2/4in1.cpp | 2 +- src/devices/bus/odyssey2/4in1.h | 2 +- src/devices/bus/odyssey2/chess.cpp | 2 +- src/devices/bus/odyssey2/chess.h | 2 +- src/devices/bus/odyssey2/homecomp.cpp | 2 +- src/devices/bus/odyssey2/homecomp.h | 2 +- src/devices/bus/odyssey2/ktaa.cpp | 2 +- src/devices/bus/odyssey2/ktaa.h | 2 +- src/devices/bus/odyssey2/rally.cpp | 2 +- src/devices/bus/odyssey2/rally.h | 2 +- src/devices/bus/odyssey2/rom.cpp | 2 +- src/devices/bus/odyssey2/rom.h | 2 +- src/devices/bus/odyssey2/slot.cpp | 2 +- src/devices/bus/odyssey2/slot.h | 4 +- src/devices/bus/odyssey2/test.cpp | 2 +- src/devices/bus/odyssey2/test.h | 2 +- src/devices/bus/odyssey2/voice.cpp | 2 +- src/devices/bus/odyssey2/voice.h | 2 +- src/devices/bus/oricext/jasmin.cpp | 2 +- src/devices/bus/oricext/jasmin.h | 2 +- src/devices/bus/oricext/microdisc.cpp | 2 +- src/devices/bus/oricext/microdisc.h | 2 +- src/devices/bus/oricext/oricext.cpp | 2 +- src/devices/bus/oricext/oricext.h | 4 +- src/devices/bus/pasopia/pac2.cpp | 2 +- src/devices/bus/pasopia/pac2.h | 4 +- src/devices/bus/pasopia/pac2exp.cpp | 2 +- src/devices/bus/pasopia/pac2exp.h | 2 +- src/devices/bus/pasopia/rampac2.cpp | 8 +- src/devices/bus/pasopia/rampac2.h | 8 +- src/devices/bus/pasopia/rompac2.cpp | 2 +- src/devices/bus/pasopia/rompac2.h | 2 +- src/devices/bus/pc1512/mouse.cpp | 4 +- src/devices/bus/pc1512/mouse.h | 6 +- src/devices/bus/pc8801/jmbx1.cpp | 2 +- src/devices/bus/pc8801/jmbx1.h | 2 +- src/devices/bus/pc8801/pc8801_23.cpp | 2 +- src/devices/bus/pc8801/pc8801_23.h | 2 +- src/devices/bus/pc8801/pc8801_31.cpp | 2 +- src/devices/bus/pc8801/pc8801_31.h | 2 +- src/devices/bus/pc8801/pc8801_exp.cpp | 4 +- src/devices/bus/pc8801/pc8801_exp.h | 6 +- src/devices/bus/pc8801/pcg8100.cpp | 4 +- src/devices/bus/pc8801/pcg8100.h | 2 +- src/devices/bus/pc_joy/pc_joy.cpp | 4 +- src/devices/bus/pc_joy/pc_joy.h | 4 +- src/devices/bus/pc_joy/pc_joy_sw.cpp | 2 +- src/devices/bus/pc_joy/pc_joy_sw.h | 2 +- src/devices/bus/pc_kbd/ec1841.cpp | 2 +- src/devices/bus/pc_kbd/ec1841.h | 2 +- src/devices/bus/pc_kbd/hle_mouse.cpp | 2 +- src/devices/bus/pc_kbd/hle_mouse.h | 2 +- src/devices/bus/pc_kbd/iskr1030.cpp | 2 +- src/devices/bus/pc_kbd/iskr1030.h | 2 +- src/devices/bus/pc_kbd/keytro.cpp | 6 +- src/devices/bus/pc_kbd/keytro.h | 4 +- src/devices/bus/pc_kbd/msnat.cpp | 2 +- src/devices/bus/pc_kbd/msnat.h | 2 +- src/devices/bus/pc_kbd/pc83.cpp | 2 +- src/devices/bus/pc_kbd/pc83.h | 2 +- src/devices/bus/pc_kbd/pc_kbdc.cpp | 2 +- src/devices/bus/pc_kbd/pc_kbdc.h | 4 +- src/devices/bus/pc_kbd/pcat101.cpp | 2 +- src/devices/bus/pc_kbd/pcat101.h | 2 +- src/devices/bus/pc_kbd/pcat84.cpp | 8 +- src/devices/bus/pc_kbd/pcat84.h | 6 +- src/devices/bus/pc_kbd/pcxt83.cpp | 2 +- src/devices/bus/pc_kbd/pcxt83.h | 2 +- src/devices/bus/pce/pce_rom.cpp | 12 +- src/devices/bus/pce/pce_rom.h | 12 +- src/devices/bus/pce/pce_slot.cpp | 2 +- src/devices/bus/pce/pce_slot.h | 4 +- src/devices/bus/pce_ctrl/joypad2.cpp | 6 +- src/devices/bus/pce_ctrl/joypad2.h | 6 +- src/devices/bus/pce_ctrl/joypad6.cpp | 8 +- src/devices/bus/pce_ctrl/joypad6.h | 8 +- src/devices/bus/pce_ctrl/multitap.cpp | 2 +- src/devices/bus/pce_ctrl/multitap.h | 2 +- src/devices/bus/pce_ctrl/pcectrl.cpp | 2 +- src/devices/bus/pce_ctrl/pcectrl.h | 4 +- src/devices/bus/pet/2joysnd.cpp | 4 +- src/devices/bus/pet/2joysnd.h | 2 +- src/devices/bus/pet/64k.cpp | 2 +- src/devices/bus/pet/64k.h | 2 +- src/devices/bus/pet/c2n.cpp | 8 +- src/devices/bus/pet/c2n.h | 8 +- src/devices/bus/pet/cass.cpp | 2 +- src/devices/bus/pet/cass.h | 4 +- src/devices/bus/pet/cb2snd.cpp | 4 +- src/devices/bus/pet/cb2snd.h | 2 +- src/devices/bus/pet/diag.cpp | 2 +- src/devices/bus/pet/diag.h | 2 +- src/devices/bus/pet/diag264_lb_tape.cpp | 2 +- src/devices/bus/pet/diag264_lb_tape.h | 2 +- src/devices/bus/pet/exp.cpp | 2 +- src/devices/bus/pet/exp.h | 4 +- src/devices/bus/pet/hsg.cpp | 10 +- src/devices/bus/pet/hsg.h | 6 +- src/devices/bus/pet/petuja.cpp | 2 +- src/devices/bus/pet/petuja.h | 2 +- src/devices/bus/pet/superpet.cpp | 4 +- src/devices/bus/pet/superpet.h | 2 +- src/devices/bus/pet/user.cpp | 2 +- src/devices/bus/pet/user.h | 4 +- src/devices/bus/plus4/c1551.cpp | 8 +- src/devices/bus/plus4/c1551.h | 2 +- src/devices/bus/plus4/diag264_lb_user.cpp | 2 +- src/devices/bus/plus4/diag264_lb_user.h | 2 +- src/devices/bus/plus4/exp.cpp | 2 +- src/devices/bus/plus4/exp.h | 6 +- src/devices/bus/plus4/sid.cpp | 2 +- src/devices/bus/plus4/sid.h | 2 +- src/devices/bus/plus4/std.cpp | 2 +- src/devices/bus/plus4/std.h | 2 +- src/devices/bus/pofo/ccm.cpp | 2 +- src/devices/bus/pofo/ccm.h | 4 +- src/devices/bus/pofo/exp.cpp | 2 +- src/devices/bus/pofo/exp.h | 4 +- src/devices/bus/pofo/hpc101.cpp | 2 +- src/devices/bus/pofo/hpc101.h | 2 +- src/devices/bus/pofo/hpc102.cpp | 2 +- src/devices/bus/pofo/hpc102.h | 2 +- src/devices/bus/pofo/hpc104.cpp | 6 +- src/devices/bus/pofo/hpc104.h | 6 +- src/devices/bus/pofo/ram.cpp | 2 +- src/devices/bus/pofo/ram.h | 2 +- src/devices/bus/pofo/rom.cpp | 2 +- src/devices/bus/pofo/rom.h | 2 +- src/devices/bus/psi_kbd/ergoline.cpp | 2 +- src/devices/bus/psi_kbd/ergoline.h | 2 +- src/devices/bus/psi_kbd/hle.cpp | 2 +- src/devices/bus/psi_kbd/hle.h | 2 +- src/devices/bus/psi_kbd/psi_kbd.cpp | 2 +- src/devices/bus/psi_kbd/psi_kbd.h | 4 +- src/devices/bus/psx/analogue.cpp | 6 +- src/devices/bus/psx/analogue.h | 6 +- src/devices/bus/psx/ctlrport.cpp | 8 +- src/devices/bus/psx/ctlrport.h | 8 +- src/devices/bus/psx/gamebooster.cpp | 2 +- src/devices/bus/psx/gamebooster.h | 2 +- src/devices/bus/psx/memcard.cpp | 2 +- src/devices/bus/psx/memcard.h | 2 +- src/devices/bus/psx/multitap.cpp | 2 +- src/devices/bus/psx/multitap.h | 2 +- src/devices/bus/psx/parallel.cpp | 2 +- src/devices/bus/psx/parallel.h | 4 +- src/devices/bus/qbus/dsd4432.cpp | 2 +- src/devices/bus/qbus/dsd4432.h | 2 +- src/devices/bus/qbus/dvk_kgd.cpp | 2 +- src/devices/bus/qbus/dvk_kgd.h | 2 +- src/devices/bus/qbus/pc11.cpp | 2 +- src/devices/bus/qbus/pc11.h | 2 +- src/devices/bus/qbus/qbus.cpp | 4 +- src/devices/bus/qbus/qbus.h | 6 +- src/devices/bus/qbus/qtx.cpp | 2 +- src/devices/bus/qbus/qtx.h | 2 +- src/devices/bus/ql/cst_q_plus4.cpp | 4 +- src/devices/bus/ql/cst_q_plus4.h | 2 +- src/devices/bus/ql/cst_qdisc.cpp | 2 +- src/devices/bus/ql/cst_qdisc.h | 2 +- src/devices/bus/ql/cumana_fdi.cpp | 2 +- src/devices/bus/ql/cumana_fdi.h | 2 +- src/devices/bus/ql/exp.cpp | 2 +- src/devices/bus/ql/exp.h | 4 +- src/devices/bus/ql/kempston_di.cpp | 2 +- src/devices/bus/ql/kempston_di.h | 2 +- src/devices/bus/ql/miracle_gold_card.cpp | 2 +- src/devices/bus/ql/miracle_gold_card.h | 2 +- src/devices/bus/ql/miracle_hd.cpp | 2 +- src/devices/bus/ql/miracle_hd.h | 2 +- src/devices/bus/ql/mp_fdi.cpp | 2 +- src/devices/bus/ql/mp_fdi.h | 2 +- src/devices/bus/ql/opd_basic_master.cpp | 2 +- src/devices/bus/ql/opd_basic_master.h | 2 +- src/devices/bus/ql/pcml_qdisk.cpp | 2 +- src/devices/bus/ql/pcml_qdisk.h | 2 +- src/devices/bus/ql/qubide.cpp | 2 +- src/devices/bus/ql/qubide.h | 2 +- src/devices/bus/ql/rom.cpp | 2 +- src/devices/bus/ql/rom.h | 4 +- src/devices/bus/ql/sandy_superdisk.cpp | 4 +- src/devices/bus/ql/sandy_superdisk.h | 2 +- src/devices/bus/ql/sandy_superqboard.cpp | 10 +- src/devices/bus/ql/sandy_superqboard.h | 10 +- src/devices/bus/ql/std.cpp | 2 +- src/devices/bus/ql/std.h | 2 +- src/devices/bus/ql/trumpcard.cpp | 12 +- src/devices/bus/ql/trumpcard.h | 10 +- src/devices/bus/rc2014/cf.cpp | 4 +- src/devices/bus/rc2014/clock.cpp | 20 +- src/devices/bus/rc2014/edge.cpp | 24 +-- src/devices/bus/rc2014/fdc.cpp | 8 +- src/devices/bus/rc2014/ide.cpp | 14 +- src/devices/bus/rc2014/micro.cpp | 10 +- src/devices/bus/rc2014/ram.cpp | 16 +- src/devices/bus/rc2014/rc2014.cpp | 22 +-- src/devices/bus/rc2014/rc2014.h | 22 +-- src/devices/bus/rc2014/rom.cpp | 8 +- src/devices/bus/rc2014/romram.cpp | 8 +- src/devices/bus/rc2014/rtc.cpp | 4 +- src/devices/bus/rc2014/serial.cpp | 20 +- src/devices/bus/rc2014/sound.cpp | 16 +- src/devices/bus/rc2014/z180cpu.cpp | 8 +- src/devices/bus/rc2014/z80cpu.cpp | 12 +- src/devices/bus/rs232/exorterm.cpp | 4 +- src/devices/bus/rs232/exorterm.h | 2 +- src/devices/bus/rs232/hlemouse.cpp | 2 +- src/devices/bus/rs232/hlemouse.h | 18 +- src/devices/bus/rs232/ie15.cpp | 4 +- src/devices/bus/rs232/keyboard.cpp | 4 +- src/devices/bus/rs232/keyboard.h | 4 +- src/devices/bus/rs232/loopback.cpp | 4 +- src/devices/bus/rs232/loopback.h | 4 +- src/devices/bus/rs232/mboardd.cpp | 8 +- src/devices/bus/rs232/null_modem.cpp | 4 +- src/devices/bus/rs232/null_modem.h | 2 +- src/devices/bus/rs232/printer.cpp | 8 +- src/devices/bus/rs232/printer.h | 6 +- src/devices/bus/rs232/pty.cpp | 2 +- src/devices/bus/rs232/pty.h | 2 +- src/devices/bus/rs232/rs232.cpp | 4 +- src/devices/bus/rs232/rs232.h | 8 +- src/devices/bus/rs232/rs232_sync_io.cpp | 2 +- src/devices/bus/rs232/rs232_sync_io.h | 2 +- src/devices/bus/rs232/swtpc8212.cpp | 4 +- src/devices/bus/rs232/swtpc8212.h | 2 +- src/devices/bus/rs232/terminal.cpp | 4 +- src/devices/bus/rs232/xvd701.cpp | 2 +- src/devices/bus/rs232/xvd701.h | 2 +- src/devices/bus/rtpc/kbd.cpp | 2 +- src/devices/bus/rtpc/kbd.h | 2 +- src/devices/bus/rtpc/kbd_con.cpp | 2 +- src/devices/bus/rtpc/kbd_con.h | 4 +- src/devices/bus/s100/am310.cpp | 4 +- src/devices/bus/s100/ascsasi.cpp | 4 +- src/devices/bus/s100/dg640.cpp | 2 +- src/devices/bus/s100/dg640.h | 2 +- src/devices/bus/s100/dj2db.cpp | 2 +- src/devices/bus/s100/dj2db.h | 2 +- src/devices/bus/s100/djdma.cpp | 2 +- src/devices/bus/s100/djdma.h | 2 +- src/devices/bus/s100/mm65k16s.cpp | 2 +- src/devices/bus/s100/mm65k16s.h | 2 +- src/devices/bus/s100/nsmdsa.cpp | 2 +- src/devices/bus/s100/nsmdsa.h | 2 +- src/devices/bus/s100/nsmdsad.cpp | 2 +- src/devices/bus/s100/nsmdsad.h | 2 +- src/devices/bus/s100/poly16k.cpp | 4 +- src/devices/bus/s100/polyfdc.cpp | 6 +- src/devices/bus/s100/polyvti.cpp | 6 +- src/devices/bus/s100/s100.cpp | 4 +- src/devices/bus/s100/s100.h | 4 +- src/devices/bus/s100/seals8k.cpp | 12 +- src/devices/bus/s100/wunderbus.cpp | 4 +- src/devices/bus/s100/wunderbus.h | 2 +- src/devices/bus/saitek_osa/expansion.cpp | 2 +- src/devices/bus/saitek_osa/expansion.h | 4 +- src/devices/bus/saitek_osa/maestro.cpp | 8 +- src/devices/bus/saitek_osa/maestro.h | 6 +- src/devices/bus/saitek_osa/maestroa.cpp | 2 +- src/devices/bus/saitek_osa/maestroa.h | 2 +- src/devices/bus/saitek_osa/sparc.cpp | 2 +- src/devices/bus/saitek_osa/sparc.h | 2 +- src/devices/bus/samcoupe/drive/atom.cpp | 2 +- src/devices/bus/samcoupe/drive/atom.h | 2 +- src/devices/bus/samcoupe/drive/drive.cpp | 2 +- src/devices/bus/samcoupe/drive/drive.h | 4 +- src/devices/bus/samcoupe/drive/floppy.cpp | 2 +- src/devices/bus/samcoupe/drive/floppy.h | 2 +- .../bus/samcoupe/expansion/blue_sampler.cpp | 4 +- src/devices/bus/samcoupe/expansion/blue_sampler.h | 2 +- src/devices/bus/samcoupe/expansion/dallas.cpp | 2 +- src/devices/bus/samcoupe/expansion/dallas.h | 2 +- src/devices/bus/samcoupe/expansion/expansion.cpp | 2 +- src/devices/bus/samcoupe/expansion/expansion.h | 4 +- src/devices/bus/samcoupe/expansion/onemeg.cpp | 2 +- src/devices/bus/samcoupe/expansion/onemeg.h | 2 +- src/devices/bus/samcoupe/expansion/sambus.cpp | 2 +- src/devices/bus/samcoupe/expansion/sambus.h | 2 +- src/devices/bus/samcoupe/expansion/sdide.cpp | 2 +- src/devices/bus/samcoupe/expansion/sdide.h | 2 +- src/devices/bus/samcoupe/expansion/sid.cpp | 6 +- src/devices/bus/samcoupe/expansion/sid.h | 6 +- src/devices/bus/samcoupe/expansion/spi.cpp | 2 +- src/devices/bus/samcoupe/expansion/spi.h | 2 +- src/devices/bus/samcoupe/expansion/voicebox.cpp | 4 +- src/devices/bus/samcoupe/expansion/voicebox.h | 2 +- src/devices/bus/samcoupe/mouse/mouse.cpp | 2 +- src/devices/bus/samcoupe/mouse/mouse.h | 2 +- src/devices/bus/samcoupe/mouse/mouseport.cpp | 2 +- src/devices/bus/samcoupe/mouse/mouseport.h | 4 +- src/devices/bus/sat_ctrl/analog.cpp | 2 +- src/devices/bus/sat_ctrl/analog.h | 2 +- src/devices/bus/sat_ctrl/ctrl.cpp | 2 +- src/devices/bus/sat_ctrl/ctrl.h | 4 +- src/devices/bus/sat_ctrl/joy.cpp | 2 +- src/devices/bus/sat_ctrl/joy.h | 2 +- src/devices/bus/sat_ctrl/joy_md.cpp | 4 +- src/devices/bus/sat_ctrl/joy_md.h | 4 +- src/devices/bus/sat_ctrl/keybd.cpp | 2 +- src/devices/bus/sat_ctrl/keybd.h | 2 +- src/devices/bus/sat_ctrl/mouse.cpp | 2 +- src/devices/bus/sat_ctrl/mouse.h | 2 +- src/devices/bus/sat_ctrl/multitap.cpp | 2 +- src/devices/bus/sat_ctrl/multitap.h | 2 +- src/devices/bus/sat_ctrl/pointer.cpp | 2 +- src/devices/bus/sat_ctrl/pointer.h | 2 +- src/devices/bus/sat_ctrl/racing.cpp | 2 +- src/devices/bus/sat_ctrl/racing.h | 2 +- src/devices/bus/sat_ctrl/segatap.cpp | 2 +- src/devices/bus/sat_ctrl/segatap.h | 2 +- src/devices/bus/saturn/bram.cpp | 10 +- src/devices/bus/saturn/bram.h | 10 +- src/devices/bus/saturn/dram.cpp | 6 +- src/devices/bus/saturn/dram.h | 6 +- src/devices/bus/saturn/rom.cpp | 4 +- src/devices/bus/saturn/rom.h | 4 +- src/devices/bus/saturn/sat_slot.cpp | 2 +- src/devices/bus/saturn/sat_slot.h | 4 +- src/devices/bus/sbus/artecon.cpp | 2 +- src/devices/bus/sbus/artecon.h | 2 +- src/devices/bus/sbus/bwtwo.cpp | 2 +- src/devices/bus/sbus/bwtwo.h | 2 +- src/devices/bus/sbus/cgsix.cpp | 10 +- src/devices/bus/sbus/cgsix.h | 8 +- src/devices/bus/sbus/cgthree.cpp | 4 +- src/devices/bus/sbus/cgthree.h | 2 +- src/devices/bus/sbus/hme.cpp | 2 +- src/devices/bus/sbus/hme.h | 2 +- src/devices/bus/sbus/sbus.cpp | 8 +- src/devices/bus/sbus/sbus.h | 12 +- src/devices/bus/sbus/sunpc.cpp | 2 +- src/devices/bus/sbus/sunpc.h | 2 +- src/devices/bus/scsi/acb4070.cpp | 2 +- src/devices/bus/scsi/acb4070.h | 2 +- src/devices/bus/scsi/cdu76s.cpp | 2 +- src/devices/bus/scsi/cdu76s.h | 2 +- src/devices/bus/scsi/d9060hd.cpp | 2 +- src/devices/bus/scsi/d9060hd.h | 2 +- src/devices/bus/scsi/omti5100.cpp | 2 +- src/devices/bus/scsi/omti5100.h | 2 +- src/devices/bus/scsi/pc9801_sasi.cpp | 2 +- src/devices/bus/scsi/pc9801_sasi.h | 2 +- src/devices/bus/scsi/s1410.cpp | 2 +- src/devices/bus/scsi/s1410.h | 2 +- src/devices/bus/scsi/sa1403d.cpp | 2 +- src/devices/bus/scsi/sa1403d.h | 2 +- src/devices/bus/scsi/scsi.cpp | 4 +- src/devices/bus/scsi/scsi.h | 4 +- src/devices/bus/scsi/scsicd.cpp | 4 +- src/devices/bus/scsi/scsicd.h | 4 +- src/devices/bus/scsi/scsicd512.cpp | 14 +- src/devices/bus/scsi/scsicd512.h | 16 +- src/devices/bus/scsi/scsihd.cpp | 4 +- src/devices/bus/scsi/scsihd.h | 4 +- src/devices/bus/scsi/scsihle.cpp | 2 +- src/devices/bus/scsi/scsihle.h | 2 +- src/devices/bus/scv/rom.cpp | 16 +- src/devices/bus/scv/rom.h | 16 +- src/devices/bus/scv/slot.cpp | 2 +- src/devices/bus/scv/slot.h | 4 +- src/devices/bus/sdk85/i8755.cpp | 2 +- src/devices/bus/sdk85/i8755.h | 2 +- src/devices/bus/sdk85/memexp.cpp | 2 +- src/devices/bus/sdk85/memexp.h | 4 +- src/devices/bus/sega8/ccatch.cpp | 2 +- src/devices/bus/sega8/ccatch.h | 2 +- src/devices/bus/sega8/mgear.cpp | 2 +- src/devices/bus/sega8/mgear.h | 2 +- src/devices/bus/sega8/rom.cpp | 48 ++--- src/devices/bus/sega8/rom.h | 48 ++--- src/devices/bus/sega8/sega8_slot.cpp | 24 +-- src/devices/bus/sega8/sega8_slot.h | 40 ++-- src/devices/bus/sg1000_exp/fm_unit.cpp | 2 +- src/devices/bus/sg1000_exp/fm_unit.h | 2 +- src/devices/bus/sg1000_exp/kblink.cpp | 4 +- src/devices/bus/sg1000_exp/kblink.h | 2 +- src/devices/bus/sg1000_exp/sg1000exp.cpp | 2 +- src/devices/bus/sg1000_exp/sg1000exp.h | 4 +- src/devices/bus/sg1000_exp/sk1100.cpp | 2 +- src/devices/bus/sg1000_exp/sk1100.h | 2 +- src/devices/bus/sg1000_exp/sk1100prn.cpp | 2 +- src/devices/bus/sg1000_exp/sk1100prn.h | 4 +- src/devices/bus/sgikbd/hlekbd.cpp | 2 +- src/devices/bus/sgikbd/hlekbd.h | 2 +- src/devices/bus/sgikbd/sgikbd.cpp | 4 +- src/devices/bus/sgikbd/sgikbd.h | 6 +- src/devices/bus/sms_ctrl/graphic.cpp | 2 +- src/devices/bus/sms_ctrl/graphic.h | 2 +- src/devices/bus/sms_ctrl/joypad.cpp | 2 +- src/devices/bus/sms_ctrl/joypad.h | 2 +- src/devices/bus/sms_ctrl/lphaser.cpp | 2 +- src/devices/bus/sms_ctrl/lphaser.h | 2 +- src/devices/bus/sms_ctrl/multitap.cpp | 2 +- src/devices/bus/sms_ctrl/multitap.h | 2 +- src/devices/bus/sms_ctrl/paddle.cpp | 2 +- src/devices/bus/sms_ctrl/paddle.h | 2 +- src/devices/bus/sms_ctrl/rfu.cpp | 2 +- src/devices/bus/sms_ctrl/rfu.h | 2 +- src/devices/bus/sms_ctrl/smsctrl.cpp | 2 +- src/devices/bus/sms_ctrl/smsctrl.h | 4 +- src/devices/bus/sms_ctrl/sports.cpp | 2 +- src/devices/bus/sms_ctrl/sports.h | 2 +- src/devices/bus/sms_ctrl/sportsjp.cpp | 2 +- src/devices/bus/sms_ctrl/sportsjp.h | 2 +- src/devices/bus/sms_exp/gender.cpp | 2 +- src/devices/bus/sms_exp/gender.h | 2 +- src/devices/bus/sms_exp/smsexp.cpp | 2 +- src/devices/bus/sms_exp/smsexp.h | 4 +- src/devices/bus/snes/bsx.cpp | 10 +- src/devices/bus/snes/bsx.h | 10 +- src/devices/bus/snes/event.cpp | 4 +- src/devices/bus/snes/event.h | 2 +- src/devices/bus/snes/rom.cpp | 22 +-- src/devices/bus/snes/rom.h | 22 +-- src/devices/bus/snes/rom21.cpp | 6 +- src/devices/bus/snes/rom21.h | 6 +- src/devices/bus/snes/sa1.cpp | 2 +- src/devices/bus/snes/sa1.h | 2 +- src/devices/bus/snes/sdd1.cpp | 4 +- src/devices/bus/snes/sdd1.h | 4 +- src/devices/bus/snes/sfx.cpp | 6 +- src/devices/bus/snes/sfx.h | 6 +- src/devices/bus/snes/sgb.cpp | 10 +- src/devices/bus/snes/sgb.h | 6 +- src/devices/bus/snes/snes_slot.cpp | 8 +- src/devices/bus/snes/snes_slot.h | 14 +- src/devices/bus/snes/spc7110.cpp | 6 +- src/devices/bus/snes/spc7110.h | 6 +- src/devices/bus/snes/sufami.cpp | 4 +- src/devices/bus/snes/sufami.h | 4 +- src/devices/bus/snes/upd.cpp | 54 ++--- src/devices/bus/snes/upd.h | 30 +-- src/devices/bus/snes_ctrl/bcbattle.cpp | 4 +- src/devices/bus/snes_ctrl/bcbattle.h | 2 +- src/devices/bus/snes_ctrl/ctrl.cpp | 2 +- src/devices/bus/snes_ctrl/ctrl.h | 4 +- src/devices/bus/snes_ctrl/joypad.cpp | 2 +- src/devices/bus/snes_ctrl/joypad.h | 2 +- src/devices/bus/snes_ctrl/miracle.cpp | 6 +- src/devices/bus/snes_ctrl/miracle.h | 2 +- src/devices/bus/snes_ctrl/mouse.cpp | 2 +- src/devices/bus/snes_ctrl/mouse.h | 2 +- src/devices/bus/snes_ctrl/multitap.cpp | 2 +- src/devices/bus/snes_ctrl/multitap.h | 2 +- src/devices/bus/snes_ctrl/pachinko.cpp | 2 +- src/devices/bus/snes_ctrl/pachinko.h | 2 +- src/devices/bus/snes_ctrl/sscope.cpp | 2 +- src/devices/bus/snes_ctrl/sscope.h | 2 +- src/devices/bus/snes_ctrl/twintap.cpp | 2 +- src/devices/bus/snes_ctrl/twintap.h | 2 +- src/devices/bus/spc1000/exp.cpp | 2 +- src/devices/bus/spc1000/exp.h | 4 +- src/devices/bus/spc1000/fdd.cpp | 2 +- src/devices/bus/spc1000/fdd.h | 2 +- src/devices/bus/spc1000/vdp.cpp | 2 +- src/devices/bus/spc1000/vdp.h | 2 +- src/devices/bus/spectrum/beta.cpp | 26 +-- src/devices/bus/spectrum/beta.h | 24 +-- src/devices/bus/spectrum/beta128.cpp | 2 +- src/devices/bus/spectrum/beta128.h | 2 +- src/devices/bus/spectrum/d40.cpp | 10 +- src/devices/bus/spectrum/d40.h | 10 +- src/devices/bus/spectrum/exp.cpp | 2 +- src/devices/bus/spectrum/exp.h | 2 +- src/devices/bus/spectrum/floppyone.cpp | 2 +- src/devices/bus/spectrum/floppyone.h | 2 +- src/devices/bus/spectrum/fuller.cpp | 2 +- src/devices/bus/spectrum/fuller.h | 2 +- src/devices/bus/spectrum/intf1.cpp | 2 +- src/devices/bus/spectrum/intf1.h | 2 +- src/devices/bus/spectrum/intf2.cpp | 2 +- src/devices/bus/spectrum/intf2.h | 2 +- src/devices/bus/spectrum/kempdisc.cpp | 6 +- src/devices/bus/spectrum/kempdisc.h | 6 +- src/devices/bus/spectrum/kempjoy.cpp | 2 +- src/devices/bus/spectrum/kempjoy.h | 2 +- src/devices/bus/spectrum/logitek.cpp | 4 +- src/devices/bus/spectrum/logitek.h | 2 +- src/devices/bus/spectrum/lprint.cpp | 12 +- src/devices/bus/spectrum/lprint.h | 12 +- src/devices/bus/spectrum/melodik.cpp | 2 +- src/devices/bus/spectrum/melodik.h | 2 +- src/devices/bus/spectrum/mface.cpp | 26 +-- src/devices/bus/spectrum/mface.h | 30 +-- src/devices/bus/spectrum/mgt.cpp | 6 +- src/devices/bus/spectrum/mgt.h | 6 +- src/devices/bus/spectrum/mikroplus.cpp | 2 +- src/devices/bus/spectrum/mikroplus.h | 2 +- src/devices/bus/spectrum/mpoker.cpp | 2 +- src/devices/bus/spectrum/mpoker.h | 2 +- src/devices/bus/spectrum/opus.cpp | 4 +- src/devices/bus/spectrum/opus.h | 2 +- src/devices/bus/spectrum/plus2test.cpp | 2 +- src/devices/bus/spectrum/plus2test.h | 2 +- src/devices/bus/spectrum/protek.cpp | 2 +- src/devices/bus/spectrum/protek.h | 2 +- src/devices/bus/spectrum/sdi.cpp | 2 +- src/devices/bus/spectrum/sdi.h | 2 +- src/devices/bus/spectrum/sixword.cpp | 6 +- src/devices/bus/spectrum/sixword.h | 6 +- src/devices/bus/spectrum/speccydos.cpp | 2 +- src/devices/bus/spectrum/speccydos.h | 2 +- src/devices/bus/spectrum/specdrum.cpp | 4 +- src/devices/bus/spectrum/specdrum.h | 2 +- src/devices/bus/spectrum/specmate.cpp | 2 +- src/devices/bus/spectrum/specmate.h | 2 +- src/devices/bus/spectrum/uslot.cpp | 2 +- src/devices/bus/spectrum/uslot.h | 2 +- src/devices/bus/spectrum/usource.cpp | 2 +- src/devices/bus/spectrum/usource.h | 2 +- src/devices/bus/spectrum/uspeech.cpp | 6 +- src/devices/bus/spectrum/uspeech.h | 2 +- src/devices/bus/spectrum/wafa.cpp | 2 +- src/devices/bus/spectrum/wafa.h | 2 +- src/devices/bus/ss50/dc5.cpp | 4 +- src/devices/bus/ss50/interface.cpp | 2 +- src/devices/bus/ss50/interface.h | 4 +- src/devices/bus/ss50/mpc.cpp | 4 +- src/devices/bus/ss50/mps.cpp | 4 +- src/devices/bus/ss50/mps2.cpp | 6 +- src/devices/bus/ss50/mpt.cpp | 4 +- src/devices/bus/ss50/piaide.cpp | 4 +- src/devices/bus/sunkbd/sunkbd.h | 6 +- src/devices/bus/sunmouse/sunmouse.h | 6 +- src/devices/bus/svi3x8/expander/expander.cpp | 2 +- src/devices/bus/svi3x8/expander/expander.h | 4 +- src/devices/bus/svi3x8/expander/sv601.cpp | 4 +- src/devices/bus/svi3x8/expander/sv601.h | 2 +- src/devices/bus/svi3x8/expander/sv602.cpp | 4 +- src/devices/bus/svi3x8/expander/sv602.h | 2 +- src/devices/bus/svi3x8/expander/sv603.cpp | 2 +- src/devices/bus/svi3x8/expander/sv603.h | 2 +- src/devices/bus/svi3x8/slot/slot.cpp | 4 +- src/devices/bus/svi3x8/slot/slot.h | 6 +- src/devices/bus/svi3x8/slot/sv801.cpp | 2 +- src/devices/bus/svi3x8/slot/sv801.h | 2 +- src/devices/bus/svi3x8/slot/sv802.cpp | 2 +- src/devices/bus/svi3x8/slot/sv802.h | 2 +- src/devices/bus/svi3x8/slot/sv803.cpp | 2 +- src/devices/bus/svi3x8/slot/sv803.h | 2 +- src/devices/bus/svi3x8/slot/sv805.cpp | 2 +- src/devices/bus/svi3x8/slot/sv805.h | 2 +- src/devices/bus/svi3x8/slot/sv806.cpp | 2 +- src/devices/bus/svi3x8/slot/sv806.h | 2 +- src/devices/bus/svi3x8/slot/sv807.cpp | 2 +- src/devices/bus/svi3x8/slot/sv807.h | 2 +- src/devices/bus/tanbus/bullsnd.cpp | 2 +- src/devices/bus/tanbus/bullsnd.h | 2 +- src/devices/bus/tanbus/mpvdu.cpp | 2 +- src/devices/bus/tanbus/mpvdu.h | 2 +- src/devices/bus/tanbus/ra32k.cpp | 2 +- src/devices/bus/tanbus/ra32k.h | 2 +- src/devices/bus/tanbus/radisc.cpp | 4 +- src/devices/bus/tanbus/radisc.h | 2 +- src/devices/bus/tanbus/ravdu.cpp | 2 +- src/devices/bus/tanbus/ravdu.h | 2 +- src/devices/bus/tanbus/tanbus.cpp | 4 +- src/devices/bus/tanbus/tanbus.h | 4 +- src/devices/bus/tanbus/tandos.cpp | 2 +- src/devices/bus/tanbus/tandos.h | 2 +- src/devices/bus/tanbus/tanex.cpp | 4 +- src/devices/bus/tanbus/tanex.h | 2 +- src/devices/bus/tanbus/tanhrg.cpp | 4 +- src/devices/bus/tanbus/tanhrg.h | 4 +- src/devices/bus/tanbus/tanram.cpp | 2 +- src/devices/bus/tanbus/tanram.h | 2 +- src/devices/bus/tanbus/tug64k.cpp | 2 +- src/devices/bus/tanbus/tug64k.h | 2 +- src/devices/bus/tanbus/tug8082.cpp | 6 +- src/devices/bus/tanbus/tug8082.h | 2 +- src/devices/bus/tanbus/tugpgm.cpp | 2 +- src/devices/bus/tanbus/tugpgm.h | 2 +- src/devices/bus/thomson/cd90_015.cpp | 2 +- src/devices/bus/thomson/cd90_015.h | 2 +- src/devices/bus/thomson/cd90_351.cpp | 2 +- src/devices/bus/thomson/cd90_351.h | 2 +- src/devices/bus/thomson/cd90_640.cpp | 2 +- src/devices/bus/thomson/cd90_640.h | 2 +- src/devices/bus/thomson/cq90_028.cpp | 2 +- src/devices/bus/thomson/cq90_028.h | 2 +- src/devices/bus/thomson/extension.cpp | 2 +- src/devices/bus/thomson/extension.h | 2 +- src/devices/bus/thomson/nanoreseau.cpp | 6 +- src/devices/bus/thomson/nanoreseau.h | 6 +- src/devices/bus/ti8x/bitsocket.cpp | 4 +- src/devices/bus/ti8x/graphlinkhle.cpp | 4 +- src/devices/bus/ti8x/teeconn.cpp | 2 +- src/devices/bus/ti8x/ti8x.h | 4 +- src/devices/bus/ti8x/tispeaker.cpp | 6 +- src/devices/bus/ti99/colorbus/busmouse.cpp | 2 +- src/devices/bus/ti99/colorbus/busmouse.h | 2 +- src/devices/bus/ti99/colorbus/colorbus.cpp | 2 +- src/devices/bus/ti99/colorbus/colorbus.h | 4 +- src/devices/bus/ti99/gromport/cartridges.cpp | 2 +- src/devices/bus/ti99/gromport/cartridges.h | 2 +- src/devices/bus/ti99/gromport/gkracker.cpp | 4 +- src/devices/bus/ti99/gromport/gkracker.h | 2 +- src/devices/bus/ti99/gromport/gromport.cpp | 4 +- src/devices/bus/ti99/gromport/gromport.h | 6 +- src/devices/bus/ti99/gromport/multiconn.cpp | 10 +- src/devices/bus/ti99/gromport/multiconn.h | 2 +- src/devices/bus/ti99/gromport/singleconn.cpp | 4 +- src/devices/bus/ti99/gromport/singleconn.h | 2 +- src/devices/bus/ti99/internal/992board.cpp | 18 +- src/devices/bus/ti99/internal/992board.h | 22 +-- src/devices/bus/ti99/internal/998board.cpp | 18 +- src/devices/bus/ti99/internal/998board.h | 10 +- src/devices/bus/ti99/internal/buffram.cpp | 2 +- src/devices/bus/ti99/internal/buffram.h | 2 +- src/devices/bus/ti99/internal/datamux.cpp | 2 +- src/devices/bus/ti99/internal/datamux.h | 2 +- src/devices/bus/ti99/internal/evpcconn.cpp | 2 +- src/devices/bus/ti99/internal/evpcconn.h | 2 +- src/devices/bus/ti99/internal/genboard.cpp | 8 +- src/devices/bus/ti99/internal/genboard.h | 8 +- src/devices/bus/ti99/internal/genkbd.cpp | 2 +- src/devices/bus/ti99/internal/genkbd.h | 2 +- src/devices/bus/ti99/internal/ioport.cpp | 2 +- src/devices/bus/ti99/internal/ioport.h | 6 +- src/devices/bus/ti99/joyport/handset.cpp | 4 +- src/devices/bus/ti99/joyport/handset.h | 4 +- src/devices/bus/ti99/joyport/joyport.cpp | 2 +- src/devices/bus/ti99/joyport/joyport.h | 4 +- src/devices/bus/ti99/joyport/mecmouse.cpp | 2 +- src/devices/bus/ti99/joyport/mecmouse.h | 2 +- src/devices/bus/ti99/peb/bwg.cpp | 4 +- src/devices/bus/ti99/peb/bwg.h | 2 +- src/devices/bus/ti99/peb/cc_fdc.cpp | 30 +-- src/devices/bus/ti99/peb/cc_fdc.h | 18 +- src/devices/bus/ti99/peb/evpc.cpp | 2 +- src/devices/bus/ti99/peb/evpc.h | 2 +- src/devices/bus/ti99/peb/forti.cpp | 2 +- src/devices/bus/ti99/peb/forti.h | 2 +- src/devices/bus/ti99/peb/hfdc.cpp | 6 +- src/devices/bus/ti99/peb/hfdc.h | 2 +- src/devices/bus/ti99/peb/horizon.cpp | 2 +- src/devices/bus/ti99/peb/horizon.h | 2 +- src/devices/bus/ti99/peb/hsgpl.cpp | 2 +- src/devices/bus/ti99/peb/hsgpl.h | 2 +- src/devices/bus/ti99/peb/memex.cpp | 4 +- src/devices/bus/ti99/peb/memex.h | 2 +- src/devices/bus/ti99/peb/myarcfdc.cpp | 6 +- src/devices/bus/ti99/peb/myarcfdc.h | 4 +- src/devices/bus/ti99/peb/myarcmem.cpp | 2 +- src/devices/bus/ti99/peb/myarcmem.h | 2 +- src/devices/bus/ti99/peb/pcode.cpp | 2 +- src/devices/bus/ti99/peb/pcode.h | 2 +- src/devices/bus/ti99/peb/peribox.cpp | 16 +- src/devices/bus/ti99/peb/peribox.h | 18 +- src/devices/bus/ti99/peb/pgram.cpp | 10 +- src/devices/bus/ti99/peb/pgram.h | 2 +- src/devices/bus/ti99/peb/samsmem.cpp | 2 +- src/devices/bus/ti99/peb/samsmem.h | 2 +- src/devices/bus/ti99/peb/scsicard.cpp | 6 +- src/devices/bus/ti99/peb/scsicard.h | 4 +- src/devices/bus/ti99/peb/sidmaster.cpp | 2 +- src/devices/bus/ti99/peb/sidmaster.h | 2 +- src/devices/bus/ti99/peb/spchsyn.cpp | 4 +- src/devices/bus/ti99/peb/spchsyn.h | 2 +- src/devices/bus/ti99/peb/ti_32kmem.cpp | 4 +- src/devices/bus/ti99/peb/ti_32kmem.h | 2 +- src/devices/bus/ti99/peb/ti_fdc.cpp | 4 +- src/devices/bus/ti99/peb/ti_fdc.h | 2 +- src/devices/bus/ti99/peb/ti_rs232.cpp | 16 +- src/devices/bus/ti99/peb/ti_rs232.h | 6 +- src/devices/bus/ti99/peb/tipi.cpp | 6 +- src/devices/bus/ti99/peb/tipi.h | 4 +- src/devices/bus/ti99/peb/tn_ide.cpp | 16 +- src/devices/bus/ti99/peb/tn_ide.h | 2 +- src/devices/bus/ti99/peb/tn_usbsm.cpp | 6 +- src/devices/bus/ti99/peb/tn_usbsm.h | 2 +- src/devices/bus/ti99x/990_dk.cpp | 2 +- src/devices/bus/ti99x/990_dk.h | 2 +- src/devices/bus/ti99x/990_hd.cpp | 2 +- src/devices/bus/ti99x/990_hd.h | 2 +- src/devices/bus/ti99x/990_tap.cpp | 14 +- src/devices/bus/ti99x/990_tap.h | 2 +- src/devices/bus/tiki100/8088.cpp | 4 +- src/devices/bus/tiki100/8088.h | 2 +- src/devices/bus/tiki100/exp.cpp | 4 +- src/devices/bus/tiki100/exp.h | 6 +- src/devices/bus/tiki100/hdc.cpp | 8 +- src/devices/bus/tiki100/hdc.h | 2 +- src/devices/bus/tmc600/euro.cpp | 2 +- src/devices/bus/tmc600/euro.h | 4 +- src/devices/bus/tvc/hbf.cpp | 2 +- src/devices/bus/tvc/hbf.h | 2 +- src/devices/bus/tvc/tvc.cpp | 2 +- src/devices/bus/tvc/tvc.h | 4 +- src/devices/bus/uts_kbd/400kbd.cpp | 2 +- src/devices/bus/uts_kbd/400kbd.h | 2 +- src/devices/bus/uts_kbd/extw.cpp | 2 +- src/devices/bus/uts_kbd/extw.h | 2 +- src/devices/bus/uts_kbd/uts_kbd.cpp | 2 +- src/devices/bus/uts_kbd/uts_kbd.h | 4 +- src/devices/bus/vboy/rom.cpp | 6 +- src/devices/bus/vboy/rom.h | 6 +- src/devices/bus/vboy/slot.cpp | 2 +- src/devices/bus/vboy/slot.h | 4 +- src/devices/bus/vc4000/rom.cpp | 10 +- src/devices/bus/vc4000/rom.h | 10 +- src/devices/bus/vc4000/slot.cpp | 4 +- src/devices/bus/vc4000/slot.h | 8 +- src/devices/bus/vcs/compumat.cpp | 2 +- src/devices/bus/vcs/compumat.h | 2 +- src/devices/bus/vcs/dpc.cpp | 6 +- src/devices/bus/vcs/dpc.h | 4 +- src/devices/bus/vcs/harmony_melody.cpp | 4 +- src/devices/bus/vcs/harmony_melody.h | 2 +- src/devices/bus/vcs/rom.cpp | 44 ++--- src/devices/bus/vcs/rom.h | 44 ++--- src/devices/bus/vcs/scharger.cpp | 2 +- src/devices/bus/vcs/scharger.h | 2 +- src/devices/bus/vcs/vcs_slot.cpp | 2 +- src/devices/bus/vcs/vcs_slot.h | 4 +- src/devices/bus/vcs_ctrl/ctrl.cpp | 2 +- src/devices/bus/vcs_ctrl/ctrl.h | 2 +- src/devices/bus/vcs_ctrl/joybooster.cpp | 2 +- src/devices/bus/vcs_ctrl/joybooster.h | 2 +- src/devices/bus/vcs_ctrl/joystick.cpp | 2 +- src/devices/bus/vcs_ctrl/joystick.h | 2 +- src/devices/bus/vcs_ctrl/keypad.cpp | 2 +- src/devices/bus/vcs_ctrl/keypad.h | 2 +- src/devices/bus/vcs_ctrl/lightpen.cpp | 2 +- src/devices/bus/vcs_ctrl/lightpen.h | 2 +- src/devices/bus/vcs_ctrl/mouse.cpp | 2 +- src/devices/bus/vcs_ctrl/mouse.h | 2 +- src/devices/bus/vcs_ctrl/paddles.cpp | 2 +- src/devices/bus/vcs_ctrl/paddles.h | 2 +- src/devices/bus/vcs_ctrl/wheel.cpp | 2 +- src/devices/bus/vcs_ctrl/wheel.h | 2 +- src/devices/bus/vectrex/rom.cpp | 8 +- src/devices/bus/vectrex/rom.h | 8 +- src/devices/bus/vectrex/slot.cpp | 2 +- src/devices/bus/vectrex/slot.h | 2 +- src/devices/bus/vic10/exp.cpp | 2 +- src/devices/bus/vic10/exp.h | 4 +- src/devices/bus/vic10/multimax.cpp | 2 +- src/devices/bus/vic10/multimax.h | 2 +- src/devices/bus/vic10/std.cpp | 2 +- src/devices/bus/vic10/std.h | 2 +- src/devices/bus/vic20/4cga.cpp | 2 +- src/devices/bus/vic20/4cga.h | 2 +- src/devices/bus/vic20/exp.cpp | 2 +- src/devices/bus/vic20/exp.h | 4 +- src/devices/bus/vic20/fe3.cpp | 2 +- src/devices/bus/vic20/fe3.h | 2 +- src/devices/bus/vic20/megacart.cpp | 2 +- src/devices/bus/vic20/megacart.h | 2 +- src/devices/bus/vic20/speakeasy.cpp | 4 +- src/devices/bus/vic20/speakeasy.h | 2 +- src/devices/bus/vic20/std.cpp | 2 +- src/devices/bus/vic20/std.h | 2 +- src/devices/bus/vic20/vic1010.cpp | 2 +- src/devices/bus/vic20/vic1010.h | 2 +- src/devices/bus/vic20/vic1011.cpp | 2 +- src/devices/bus/vic20/vic1011.h | 2 +- src/devices/bus/vic20/vic1110.cpp | 2 +- src/devices/bus/vic20/vic1110.h | 2 +- src/devices/bus/vic20/vic1111.cpp | 2 +- src/devices/bus/vic20/vic1111.h | 2 +- src/devices/bus/vic20/vic1112.cpp | 4 +- src/devices/bus/vic20/vic1112.h | 2 +- src/devices/bus/vic20/vic1210.cpp | 2 +- src/devices/bus/vic20/vic1210.h | 2 +- src/devices/bus/vic20/videopak.cpp | 2 +- src/devices/bus/vic20/videopak.h | 2 +- src/devices/bus/vidbrain/exp.cpp | 2 +- src/devices/bus/vidbrain/exp.h | 4 +- src/devices/bus/vidbrain/money_minder.cpp | 2 +- src/devices/bus/vidbrain/money_minder.h | 2 +- src/devices/bus/vidbrain/std.cpp | 2 +- src/devices/bus/vidbrain/std.h | 2 +- src/devices/bus/vidbrain/timeshare.cpp | 2 +- src/devices/bus/vidbrain/timeshare.h | 2 +- src/devices/bus/vip/byteio.cpp | 2 +- src/devices/bus/vip/byteio.h | 4 +- src/devices/bus/vip/exp.cpp | 2 +- src/devices/bus/vip/exp.h | 4 +- src/devices/bus/vip/vp550.cpp | 6 +- src/devices/bus/vip/vp550.h | 2 +- src/devices/bus/vip/vp570.cpp | 2 +- src/devices/bus/vip/vp570.h | 2 +- src/devices/bus/vip/vp575.cpp | 2 +- src/devices/bus/vip/vp575.h | 2 +- src/devices/bus/vip/vp585.cpp | 2 +- src/devices/bus/vip/vp585.h | 2 +- src/devices/bus/vip/vp590.cpp | 2 +- src/devices/bus/vip/vp590.h | 2 +- src/devices/bus/vip/vp595.cpp | 4 +- src/devices/bus/vip/vp595.h | 2 +- src/devices/bus/vip/vp620.cpp | 4 +- src/devices/bus/vip/vp620.h | 2 +- src/devices/bus/vip/vp700.cpp | 2 +- src/devices/bus/vip/vp700.h | 2 +- src/devices/bus/vme/vme.cpp | 8 +- src/devices/bus/vme/vme.h | 10 +- src/devices/bus/vme/vme_cp31.cpp | 8 +- src/devices/bus/vme/vme_cp31.h | 4 +- src/devices/bus/vme/vme_fccpu20.cpp | 16 +- src/devices/bus/vme/vme_fccpu20.h | 30 +-- src/devices/bus/vme/vme_fcisio.cpp | 12 +- src/devices/bus/vme/vme_fcisio.h | 4 +- src/devices/bus/vme/vme_fcscsi.cpp | 4 +- src/devices/bus/vme/vme_fcscsi.h | 4 +- src/devices/bus/vme/vme_hcpu30.cpp | 8 +- src/devices/bus/vme/vme_hcpu30.h | 4 +- src/devices/bus/vme/vme_mvme120.cpp | 12 +- src/devices/bus/vme/vme_mvme120.h | 18 +- src/devices/bus/vme/vme_mvme350.cpp | 4 +- src/devices/bus/vme/vme_mvme350.h | 4 +- src/devices/bus/vme/vme_mzr8105.cpp | 6 +- src/devices/bus/vme/vme_mzr8105.h | 4 +- src/devices/bus/vme/vme_mzr8300.cpp | 4 +- src/devices/bus/vme/vme_mzr8300.h | 4 +- src/devices/bus/vme/vme_smvme2000.cpp | 4 +- src/devices/bus/vme/vme_smvme2000.h | 2 +- src/devices/bus/vsmile/keyboard.cpp | 8 +- src/devices/bus/vsmile/keyboard.h | 8 +- src/devices/bus/vsmile/mat.cpp | 2 +- src/devices/bus/vsmile/mat.h | 2 +- src/devices/bus/vsmile/pad.cpp | 4 +- src/devices/bus/vsmile/pad.h | 4 +- src/devices/bus/vsmile/rom.cpp | 8 +- src/devices/bus/vsmile/rom.h | 8 +- src/devices/bus/vsmile/vsmile_ctrl.h | 6 +- src/devices/bus/vsmile/vsmile_slot.cpp | 2 +- src/devices/bus/vsmile/vsmile_slot.h | 4 +- src/devices/bus/vtech/ioexp/ioexp.cpp | 8 +- src/devices/bus/vtech/ioexp/ioexp.h | 12 +- src/devices/bus/vtech/ioexp/joystick.cpp | 2 +- src/devices/bus/vtech/ioexp/joystick.h | 2 +- src/devices/bus/vtech/ioexp/lpen.cpp | 2 +- src/devices/bus/vtech/ioexp/lpen.h | 2 +- src/devices/bus/vtech/ioexp/printer.cpp | 2 +- src/devices/bus/vtech/ioexp/printer.h | 2 +- src/devices/bus/vtech/memexp/floppy.cpp | 2 +- src/devices/bus/vtech/memexp/floppy.h | 2 +- src/devices/bus/vtech/memexp/memexp.cpp | 8 +- src/devices/bus/vtech/memexp/memexp.h | 12 +- src/devices/bus/vtech/memexp/memory.cpp | 8 +- src/devices/bus/vtech/memexp/memory.h | 8 +- src/devices/bus/vtech/memexp/rs232.cpp | 2 +- src/devices/bus/vtech/memexp/rs232.h | 2 +- src/devices/bus/vtech/memexp/rtty.cpp | 2 +- src/devices/bus/vtech/memexp/rtty.h | 2 +- src/devices/bus/vtech/memexp/sdloader.cpp | 4 +- src/devices/bus/vtech/memexp/sdloader.h | 2 +- src/devices/bus/vtech/memexp/wordpro.cpp | 2 +- src/devices/bus/vtech/memexp/wordpro.h | 2 +- src/devices/bus/wangpc/emb.cpp | 2 +- src/devices/bus/wangpc/emb.h | 2 +- src/devices/bus/wangpc/lic.cpp | 2 +- src/devices/bus/wangpc/lic.h | 2 +- src/devices/bus/wangpc/lvc.cpp | 2 +- src/devices/bus/wangpc/lvc.h | 2 +- src/devices/bus/wangpc/mcc.cpp | 6 +- src/devices/bus/wangpc/mcc.h | 2 +- src/devices/bus/wangpc/mvc.cpp | 2 +- src/devices/bus/wangpc/mvc.h | 2 +- src/devices/bus/wangpc/rtc.cpp | 12 +- src/devices/bus/wangpc/rtc.h | 2 +- src/devices/bus/wangpc/tig.cpp | 2 +- src/devices/bus/wangpc/tig.h | 2 +- src/devices/bus/wangpc/wangpc.cpp | 4 +- src/devices/bus/wangpc/wangpc.h | 6 +- src/devices/bus/wangpc/wdc.cpp | 8 +- src/devices/bus/wangpc/wdc.h | 2 +- src/devices/bus/wswan/rom.cpp | 12 +- src/devices/bus/wswan/rom.h | 12 +- src/devices/bus/wswan/slot.cpp | 2 +- src/devices/bus/wswan/slot.h | 4 +- src/devices/bus/x68k/x68k_midi.cpp | 2 +- src/devices/bus/x68k/x68k_midi.h | 2 +- src/devices/bus/x68k/x68k_neptunex.cpp | 4 +- src/devices/bus/x68k/x68k_neptunex.h | 2 +- src/devices/bus/x68k/x68k_scsiext.cpp | 2 +- src/devices/bus/x68k/x68k_scsiext.h | 2 +- src/devices/bus/x68k/x68kexp.cpp | 2 +- src/devices/bus/x68k/x68kexp.h | 4 +- src/devices/bus/z29_kbd/he191_3425.cpp | 4 +- src/devices/bus/z29_kbd/he191_3425.h | 2 +- src/devices/bus/z29_kbd/keyboard.cpp | 2 +- src/devices/bus/z29_kbd/keyboard.h | 4 +- src/devices/bus/z29_kbd/md_kbd.cpp | 4 +- src/devices/bus/z29_kbd/md_kbd.h | 2 +- src/devices/bus/z88/flash.cpp | 2 +- src/devices/bus/z88/flash.h | 2 +- src/devices/bus/z88/ram.cpp | 10 +- src/devices/bus/z88/ram.h | 10 +- src/devices/bus/z88/rom.cpp | 8 +- src/devices/bus/z88/rom.h | 8 +- src/devices/bus/z88/z88.cpp | 2 +- src/devices/bus/z88/z88.h | 4 +- src/devices/cpu/8x300/8x300.cpp | 6 +- src/devices/cpu/8x300/8x300.h | 6 +- src/devices/cpu/adsp2100/adsp2100.cpp | 16 +- src/devices/cpu/adsp2100/adsp2100.h | 16 +- src/devices/cpu/alpha/alpha.cpp | 6 +- src/devices/cpu/alpha/alpha.h | 6 +- src/devices/cpu/alto2/alto2cpu.cpp | 2 +- src/devices/cpu/alto2/alto2cpu.h | 2 +- src/devices/cpu/am29000/am29000.cpp | 2 +- src/devices/cpu/am29000/am29000.h | 2 +- src/devices/cpu/amis2000/amis2000.cpp | 6 +- src/devices/cpu/amis2000/amis2000.h | 8 +- src/devices/cpu/apexc/apexc.cpp | 2 +- src/devices/cpu/apexc/apexc.h | 2 +- src/devices/cpu/arc/arc.cpp | 2 +- src/devices/cpu/arc/arc.h | 2 +- src/devices/cpu/arcompact/arcompact.cpp | 2 +- src/devices/cpu/arcompact/arcompact.h | 2 +- src/devices/cpu/arm/arm.cpp | 4 +- src/devices/cpu/arm/arm.h | 4 +- src/devices/cpu/arm7/arm7.cpp | 38 ++-- src/devices/cpu/arm7/arm7.h | 38 ++-- src/devices/cpu/arm7/lpc210x.cpp | 4 +- src/devices/cpu/arm7/lpc210x.h | 2 +- src/devices/cpu/arm7/upd800468.cpp | 8 +- src/devices/cpu/arm7/upd800468.h | 4 +- src/devices/cpu/asap/asap.cpp | 2 +- src/devices/cpu/asap/asap.h | 2 +- src/devices/cpu/avr8/avr8.cpp | 16 +- src/devices/cpu/avr8/avr8.h | 16 +- src/devices/cpu/axc51/axc51.cpp | 10 +- src/devices/cpu/axc51/axc51.h | 10 +- src/devices/cpu/bcp/dp8344.cpp | 6 +- src/devices/cpu/bcp/dp8344.h | 6 +- src/devices/cpu/capricorn/capricorn.cpp | 2 +- src/devices/cpu/capricorn/capricorn.h | 2 +- src/devices/cpu/ccpu/ccpu.cpp | 2 +- src/devices/cpu/ccpu/ccpu.h | 2 +- src/devices/cpu/clipper/clipper.cpp | 8 +- src/devices/cpu/clipper/clipper.h | 8 +- src/devices/cpu/cop400/cop400.cpp | 36 ++-- src/devices/cpu/cop400/cop400.h | 36 ++-- src/devices/cpu/cops1/cops1base.cpp | 2 +- src/devices/cpu/cops1/cops1base.h | 2 +- src/devices/cpu/cops1/mm5799.cpp | 2 +- src/devices/cpu/cops1/mm5799.h | 2 +- src/devices/cpu/cosmac/cosmac.cpp | 18 +- src/devices/cpu/cosmac/cosmac.h | 18 +- src/devices/cpu/cp1610/cp1610.cpp | 2 +- src/devices/cpu/cr16b/cr16b.cpp | 4 +- src/devices/cpu/cr16b/cr16b.h | 4 +- src/devices/cpu/cubeqcpu/cubeqcpu.cpp | 6 +- src/devices/cpu/cubeqcpu/cubeqcpu.h | 6 +- src/devices/cpu/diablo/diablo1300.cpp | 2 +- src/devices/cpu/diablo/diablo1300.h | 2 +- src/devices/cpu/dsp16/dsp16.cpp | 6 +- src/devices/cpu/dsp16/dsp16.h | 6 +- src/devices/cpu/dsp32/dsp32.cpp | 2 +- src/devices/cpu/dsp32/dsp32.h | 2 +- src/devices/cpu/dsp56000/dsp56000.cpp | 6 +- src/devices/cpu/dsp56000/dsp56000.h | 6 +- src/devices/cpu/dsp56156/dsp56156.cpp | 2 +- src/devices/cpu/dsp56156/dsp56156.h | 2 +- src/devices/cpu/dspp/dspp.cpp | 4 +- src/devices/cpu/dspp/dspp.h | 5 +- src/devices/cpu/e0c6200/e0c6200.cpp | 2 +- src/devices/cpu/e0c6200/e0c6200.h | 2 +- src/devices/cpu/e0c6200/e0c6s46.cpp | 2 +- src/devices/cpu/e0c6200/e0c6s46.h | 2 +- src/devices/cpu/e132xs/e132xs.cpp | 30 +-- src/devices/cpu/e132xs/e132xs.h | 30 +-- src/devices/cpu/es5510/es5510.cpp | 2 +- src/devices/cpu/es5510/es5510.h | 2 +- src/devices/cpu/esrip/esrip.cpp | 2 +- src/devices/cpu/esrip/esrip.h | 2 +- src/devices/cpu/f2mc16/f2mc16.cpp | 4 +- src/devices/cpu/f2mc16/f2mc16.h | 4 +- src/devices/cpu/f2mc16/mb9061x.cpp | 14 +- src/devices/cpu/f2mc16/mb9061x.h | 14 +- src/devices/cpu/f8/f8.cpp | 2 +- src/devices/cpu/f8/f8.h | 2 +- src/devices/cpu/fr/fr.cpp | 4 +- src/devices/cpu/fr/fr.h | 4 +- src/devices/cpu/g65816/g65816.cpp | 8 +- src/devices/cpu/g65816/g65816.h | 8 +- src/devices/cpu/gigatron/gigatron.cpp | 2 +- src/devices/cpu/gigatron/gigatron.h | 2 +- src/devices/cpu/h16/hd641016.cpp | 2 +- src/devices/cpu/h16/hd641016.h | 2 +- src/devices/cpu/h6280/h6280.cpp | 2 +- src/devices/cpu/h6280/h6280.h | 2 +- src/devices/cpu/h8/gt913.cpp | 4 +- src/devices/cpu/h8/gt913.h | 2 +- src/devices/cpu/h8/h8.cpp | 2 +- src/devices/cpu/h8/h8.h | 2 +- src/devices/cpu/h8/h83002.cpp | 2 +- src/devices/cpu/h8/h83002.h | 2 +- src/devices/cpu/h8/h83003.cpp | 2 +- src/devices/cpu/h8/h83003.h | 2 +- src/devices/cpu/h8/h83006.cpp | 6 +- src/devices/cpu/h8/h83006.h | 6 +- src/devices/cpu/h8/h83008.cpp | 2 +- src/devices/cpu/h8/h83008.h | 2 +- src/devices/cpu/h8/h83032.cpp | 8 +- src/devices/cpu/h8/h83032.h | 8 +- src/devices/cpu/h8/h83042.cpp | 8 +- src/devices/cpu/h8/h83042.h | 8 +- src/devices/cpu/h8/h83048.cpp | 10 +- src/devices/cpu/h8/h83048.h | 10 +- src/devices/cpu/h8/h83337.cpp | 8 +- src/devices/cpu/h8/h83337.h | 8 +- src/devices/cpu/h8/h8_adc.cpp | 14 +- src/devices/cpu/h8/h8_adc.h | 26 +-- src/devices/cpu/h8/h8_dma.cpp | 4 +- src/devices/cpu/h8/h8_dma.h | 6 +- src/devices/cpu/h8/h8_dtc.cpp | 2 +- src/devices/cpu/h8/h8_dtc.h | 4 +- src/devices/cpu/h8/h8_intc.cpp | 14 +- src/devices/cpu/h8/h8_intc.h | 14 +- src/devices/cpu/h8/h8_port.cpp | 2 +- src/devices/cpu/h8/h8_port.h | 4 +- src/devices/cpu/h8/h8_sci.cpp | 2 +- src/devices/cpu/h8/h8_sci.h | 4 +- src/devices/cpu/h8/h8_timer16.cpp | 10 +- src/devices/cpu/h8/h8_timer16.h | 18 +- src/devices/cpu/h8/h8_timer8.cpp | 6 +- src/devices/cpu/h8/h8_timer8.h | 10 +- src/devices/cpu/h8/h8_watchdog.cpp | 2 +- src/devices/cpu/h8/h8_watchdog.h | 4 +- src/devices/cpu/h8/h8h.cpp | 2 +- src/devices/cpu/h8/h8h.h | 2 +- src/devices/cpu/h8/h8s2000.cpp | 2 +- src/devices/cpu/h8/h8s2000.h | 2 +- src/devices/cpu/h8/h8s2245.cpp | 10 +- src/devices/cpu/h8/h8s2245.h | 10 +- src/devices/cpu/h8/h8s2320.cpp | 20 +- src/devices/cpu/h8/h8s2320.h | 20 +- src/devices/cpu/h8/h8s2357.cpp | 14 +- src/devices/cpu/h8/h8s2357.h | 14 +- src/devices/cpu/h8/h8s2600.cpp | 2 +- src/devices/cpu/h8/h8s2600.h | 2 +- src/devices/cpu/h8/h8s2655.cpp | 6 +- src/devices/cpu/h8/h8s2655.h | 6 +- src/devices/cpu/h8500/h8500.cpp | 2 +- src/devices/cpu/h8500/h8500.h | 2 +- src/devices/cpu/h8500/h8510.cpp | 4 +- src/devices/cpu/h8500/h8510.h | 4 +- src/devices/cpu/h8500/h8520.cpp | 6 +- src/devices/cpu/h8500/h8520.h | 6 +- src/devices/cpu/h8500/h8532.cpp | 6 +- src/devices/cpu/h8500/h8532.h | 6 +- src/devices/cpu/h8500/h8534.cpp | 14 +- src/devices/cpu/h8500/h8534.h | 14 +- src/devices/cpu/hcd62121/hcd62121.cpp | 2 +- src/devices/cpu/hcd62121/hcd62121.h | 2 +- src/devices/cpu/hd61700/hd61700.cpp | 2 +- src/devices/cpu/hd61700/hd61700.h | 2 +- src/devices/cpu/hmcs40/hmcs40.cpp | 32 +-- src/devices/cpu/hmcs40/hmcs40.h | 32 +-- src/devices/cpu/hpc/hpc.cpp | 6 +- src/devices/cpu/hpc/hpc.h | 6 +- src/devices/cpu/hphybrid/hphybrid.cpp | 10 +- src/devices/cpu/hphybrid/hphybrid.h | 10 +- src/devices/cpu/i386/athlon.cpp | 2 +- src/devices/cpu/i386/athlon.h | 2 +- src/devices/cpu/i386/i386.cpp | 30 +-- src/devices/cpu/i386/i386.h | 30 +-- src/devices/cpu/i8008/i8008.cpp | 2 +- src/devices/cpu/i8008/i8008.h | 2 +- src/devices/cpu/i8085/i8085.cpp | 8 +- src/devices/cpu/i8085/i8085.h | 8 +- src/devices/cpu/i8089/i8089.cpp | 6 +- src/devices/cpu/i8089/i8089.h | 10 +- src/devices/cpu/i8089/i8089_channel.cpp | 2 +- src/devices/cpu/i8089/i8089_channel.h | 2 +- src/devices/cpu/i86/i186.cpp | 10 +- src/devices/cpu/i86/i186.h | 10 +- src/devices/cpu/i86/i286.cpp | 2 +- src/devices/cpu/i86/i286.h | 2 +- src/devices/cpu/i86/i86.cpp | 8 +- src/devices/cpu/i86/i86.h | 8 +- src/devices/cpu/i860/i860.cpp | 2 +- src/devices/cpu/i860/i860.h | 2 +- src/devices/cpu/i960/i960.cpp | 2 +- src/devices/cpu/i960/i960.h | 2 +- src/devices/cpu/ie15/ie15.cpp | 2 +- src/devices/cpu/ie15/ie15.h | 2 +- src/devices/cpu/jaguar/jaguar.cpp | 6 +- src/devices/cpu/jaguar/jaguar.h | 6 +- src/devices/cpu/ks0164/ks0164.cpp | 2 +- src/devices/cpu/ks0164/ks0164.h | 2 +- src/devices/cpu/lc8670/lc8670.cpp | 2 +- src/devices/cpu/lc8670/lc8670.h | 2 +- src/devices/cpu/lh5801/lh5801.cpp | 2 +- src/devices/cpu/lh5801/lh5801.h | 2 +- src/devices/cpu/lr35902/lr35902.cpp | 2 +- src/devices/cpu/lr35902/lr35902.h | 2 +- src/devices/cpu/m37710/m37710.cpp | 16 +- src/devices/cpu/m37710/m37710.h | 16 +- src/devices/cpu/m6502/deco16.cpp | 2 +- src/devices/cpu/m6502/deco16.h | 2 +- src/devices/cpu/m6502/m3745x.cpp | 6 +- src/devices/cpu/m6502/m3745x.h | 6 +- src/devices/cpu/m6502/m4510.cpp | 2 +- src/devices/cpu/m6502/m4510.h | 2 +- src/devices/cpu/m6502/m50734.cpp | 2 +- src/devices/cpu/m6502/m50734.h | 2 +- src/devices/cpu/m6502/m5074x.cpp | 20 +- src/devices/cpu/m6502/m5074x.h | 14 +- src/devices/cpu/m6502/m6500_1.cpp | 2 +- src/devices/cpu/m6502/m6500_1.h | 2 +- src/devices/cpu/m6502/m6502.cpp | 8 +- src/devices/cpu/m6502/m6502.h | 8 +- src/devices/cpu/m6502/m6504.cpp | 2 +- src/devices/cpu/m6502/m6504.h | 2 +- src/devices/cpu/m6502/m6507.cpp | 2 +- src/devices/cpu/m6502/m6507.h | 2 +- src/devices/cpu/m6502/m6509.cpp | 2 +- src/devices/cpu/m6502/m6509.h | 2 +- src/devices/cpu/m6502/m6510.cpp | 6 +- src/devices/cpu/m6502/m6510.h | 6 +- src/devices/cpu/m6502/m6510t.cpp | 2 +- src/devices/cpu/m6502/m6510t.h | 2 +- src/devices/cpu/m6502/m65c02.cpp | 4 +- src/devices/cpu/m6502/m65c02.h | 4 +- src/devices/cpu/m6502/m65ce02.cpp | 4 +- src/devices/cpu/m6502/m65ce02.h | 4 +- src/devices/cpu/m6502/m65sc02.cpp | 2 +- src/devices/cpu/m6502/m65sc02.h | 2 +- src/devices/cpu/m6502/m740.cpp | 2 +- src/devices/cpu/m6502/m740.h | 2 +- src/devices/cpu/m6502/m7501.cpp | 2 +- src/devices/cpu/m6502/m7501.h | 2 +- src/devices/cpu/m6502/m8502.cpp | 2 +- src/devices/cpu/m6502/m8502.h | 2 +- src/devices/cpu/m6502/r65c02.cpp | 4 +- src/devices/cpu/m6502/r65c02.h | 4 +- src/devices/cpu/m6502/r65c19.cpp | 8 +- src/devices/cpu/m6502/r65c19.h | 8 +- src/devices/cpu/m6502/rp2a03.cpp | 10 +- src/devices/cpu/m6502/rp2a03.h | 10 +- src/devices/cpu/m6502/st2204.cpp | 6 +- src/devices/cpu/m6502/st2204.h | 6 +- src/devices/cpu/m6502/st2205u.cpp | 6 +- src/devices/cpu/m6502/st2205u.h | 6 +- src/devices/cpu/m6502/st2xxx.cpp | 2 +- src/devices/cpu/m6502/st2xxx.h | 2 +- src/devices/cpu/m6502/w65c02s.cpp | 4 +- src/devices/cpu/m6502/w65c02s.h | 4 +- src/devices/cpu/m6502/xavix.cpp | 4 +- src/devices/cpu/m6502/xavix.h | 4 +- src/devices/cpu/m6502/xavix2000.cpp | 6 +- src/devices/cpu/m6502/xavix2000.h | 6 +- src/devices/cpu/m6800/m6800.cpp | 12 +- src/devices/cpu/m6800/m6800.h | 12 +- src/devices/cpu/m6800/m6801.cpp | 32 +-- src/devices/cpu/m6800/m6801.h | 32 +-- src/devices/cpu/m68000/fscpu32.cpp | 2 +- src/devices/cpu/m68000/fscpu32.h | 2 +- src/devices/cpu/m68000/m68000.cpp | 6 +- src/devices/cpu/m68000/m68000.h | 6 +- src/devices/cpu/m68000/m68008.cpp | 4 +- src/devices/cpu/m68000/m68008.h | 4 +- src/devices/cpu/m68000/m68010.cpp | 2 +- src/devices/cpu/m68000/m68010.h | 2 +- src/devices/cpu/m68000/m68020.cpp | 10 +- src/devices/cpu/m68000/m68020.h | 10 +- src/devices/cpu/m68000/m68030.cpp | 4 +- src/devices/cpu/m68000/m68030.h | 4 +- src/devices/cpu/m68000/m68040.cpp | 6 +- src/devices/cpu/m68000/m68040.h | 6 +- src/devices/cpu/m68000/m68kcommon.h | 6 +- src/devices/cpu/m68000/m68kcpu.cpp | 4 +- src/devices/cpu/m68000/mcf5206e.cpp | 2 +- src/devices/cpu/m68000/mcf5206e.h | 2 +- src/devices/cpu/m68000/scc68070.cpp | 2 +- src/devices/cpu/m68000/scc68070.h | 2 +- src/devices/cpu/m6805/m6805.cpp | 8 +- src/devices/cpu/m6805/m6805.h | 8 +- src/devices/cpu/m6805/m68705.cpp | 34 ++-- src/devices/cpu/m6805/m68705.h | 36 ++-- src/devices/cpu/m6805/m68hc05.cpp | 18 +- src/devices/cpu/m6805/m68hc05.h | 18 +- src/devices/cpu/m6809/hd6309.cpp | 6 +- src/devices/cpu/m6809/hd6309.h | 6 +- src/devices/cpu/m6809/konami.cpp | 2 +- src/devices/cpu/m6809/konami.h | 2 +- src/devices/cpu/m6809/m6809.cpp | 8 +- src/devices/cpu/m6809/m6809.h | 8 +- src/devices/cpu/m68hc16/cpu16.cpp | 2 +- src/devices/cpu/m68hc16/cpu16.h | 2 +- src/devices/cpu/m68hc16/m68hc16z.cpp | 4 +- src/devices/cpu/m68hc16/m68hc16z.h | 4 +- src/devices/cpu/m88000/m88000.cpp | 2 +- src/devices/cpu/m88000/m88000.h | 2 +- src/devices/cpu/mb86233/mb86233.cpp | 6 +- src/devices/cpu/mb86233/mb86233.h | 6 +- src/devices/cpu/mb86235/mb86235.cpp | 2 +- src/devices/cpu/mb86235/mb86235.h | 2 +- src/devices/cpu/mb88xx/mb88xx.cpp | 14 +- src/devices/cpu/mb88xx/mb88xx.h | 14 +- src/devices/cpu/mc68hc11/mc68hc11.cpp | 16 +- src/devices/cpu/mc68hc11/mc68hc11.h | 16 +- src/devices/cpu/mcs40/mcs40.cpp | 6 +- src/devices/cpu/mcs40/mcs40.h | 6 +- src/devices/cpu/mcs48/mcs48.cpp | 50 ++--- src/devices/cpu/mcs48/mcs48.h | 48 ++--- src/devices/cpu/mcs51/mcs51.cpp | 58 +++--- src/devices/cpu/mcs51/mcs51.h | 58 +++--- src/devices/cpu/mcs96/i8x9x.cpp | 10 +- src/devices/cpu/mcs96/i8x9x.h | 10 +- src/devices/cpu/mcs96/i8xc196.cpp | 2 +- src/devices/cpu/mcs96/i8xc196.h | 2 +- src/devices/cpu/mcs96/mcs96.cpp | 2 +- src/devices/cpu/mcs96/mcs96.h | 2 +- src/devices/cpu/melps4/m58846.cpp | 2 +- src/devices/cpu/melps4/m58846.h | 2 +- src/devices/cpu/melps4/melps4.cpp | 2 +- src/devices/cpu/melps4/melps4.h | 2 +- src/devices/cpu/minx/minx.cpp | 2 +- src/devices/cpu/minx/minx.h | 2 +- src/devices/cpu/mips/mips1.cpp | 26 +-- src/devices/cpu/mips/mips1.h | 26 +-- src/devices/cpu/mips/mips3.cpp | 2 +- src/devices/cpu/mips/mips3.h | 54 ++--- src/devices/cpu/mips/ps2vif1.cpp | 2 +- src/devices/cpu/mips/ps2vif1.h | 4 +- src/devices/cpu/mips/ps2vu.cpp | 6 +- src/devices/cpu/mips/ps2vu.h | 10 +- src/devices/cpu/mips/r4000.cpp | 2 +- src/devices/cpu/mips/r4000.h | 18 +- src/devices/cpu/mk1/mk1.cpp | 2 +- src/devices/cpu/mk1/mk1.h | 2 +- src/devices/cpu/mn10200/mn10200.cpp | 4 +- src/devices/cpu/mn10200/mn10200.h | 4 +- src/devices/cpu/mn1880/mn1880.cpp | 6 +- src/devices/cpu/mn1880/mn1880.h | 6 +- src/devices/cpu/nanoprocessor/nanoprocessor.cpp | 2 +- src/devices/cpu/nanoprocessor/nanoprocessor.h | 2 +- src/devices/cpu/nec/nec.cpp | 12 +- src/devices/cpu/nec/nec.h | 12 +- src/devices/cpu/nec/v25.cpp | 6 +- src/devices/cpu/nec/v25.h | 6 +- src/devices/cpu/nec/v5x.cpp | 18 +- src/devices/cpu/nec/v5x.h | 12 +- src/devices/cpu/nios2/nios2.cpp | 2 +- src/devices/cpu/nios2/nios2.h | 2 +- src/devices/cpu/ns32000/ns32000.cpp | 10 +- src/devices/cpu/ns32000/ns32000.h | 12 +- src/devices/cpu/nuon/nuon.cpp | 2 +- src/devices/cpu/nuon/nuon.h | 2 +- src/devices/cpu/pace/pace.cpp | 4 +- src/devices/cpu/pace/pace.h | 4 +- src/devices/cpu/patinhofeio/patinho_feio.cpp | 2 +- src/devices/cpu/pdp1/pdp1.cpp | 2 +- src/devices/cpu/pdp1/pdp1.h | 2 +- src/devices/cpu/pdp8/hd6120.cpp | 2 +- src/devices/cpu/pdp8/hd6120.h | 2 +- src/devices/cpu/pdp8/pdp8.cpp | 2 +- src/devices/cpu/pdp8/pdp8.h | 2 +- src/devices/cpu/pic16c5x/pic16c5x.cpp | 18 +- src/devices/cpu/pic16c5x/pic16c5x.h | 18 +- src/devices/cpu/pic16c62x/pic16c62x.cpp | 14 +- src/devices/cpu/pic16c62x/pic16c62x.h | 16 +- src/devices/cpu/pic17/pic17.cpp | 2 +- src/devices/cpu/pic17/pic17.h | 2 +- src/devices/cpu/pic17/pic17c4x.cpp | 8 +- src/devices/cpu/pic17/pic17c4x.h | 8 +- src/devices/cpu/powerpc/ppc.h | 28 +-- src/devices/cpu/powerpc/ppccom.cpp | 28 +-- src/devices/cpu/pps4/pps4.cpp | 6 +- src/devices/cpu/pps4/pps4.h | 6 +- src/devices/cpu/pps41/mm75.cpp | 2 +- src/devices/cpu/pps41/mm75.h | 2 +- src/devices/cpu/pps41/mm76.cpp | 12 +- src/devices/cpu/pps41/mm76.h | 12 +- src/devices/cpu/pps41/mm78.cpp | 12 +- src/devices/cpu/pps41/mm78.h | 12 +- src/devices/cpu/pps41/mm78la.cpp | 6 +- src/devices/cpu/pps41/mm78la.h | 6 +- src/devices/cpu/pps41/pps41base.cpp | 2 +- src/devices/cpu/pps41/pps41base.h | 2 +- src/devices/cpu/psx/dma.cpp | 2 +- src/devices/cpu/psx/dma.h | 2 +- src/devices/cpu/psx/irq.cpp | 2 +- src/devices/cpu/psx/irq.h | 2 +- src/devices/cpu/psx/mdec.cpp | 2 +- src/devices/cpu/psx/mdec.h | 2 +- src/devices/cpu/psx/psx.cpp | 22 +-- src/devices/cpu/psx/psx.h | 14 +- src/devices/cpu/psx/rcnt.cpp | 2 +- src/devices/cpu/psx/rcnt.h | 2 +- src/devices/cpu/psx/sio.cpp | 6 +- src/devices/cpu/psx/sio.h | 6 +- src/devices/cpu/rii/riscii.cpp | 4 +- src/devices/cpu/rii/riscii.h | 4 +- src/devices/cpu/romp/romp.cpp | 2 +- src/devices/cpu/romp/romp.h | 2 +- src/devices/cpu/rsp/rsp.cpp | 2 +- src/devices/cpu/rsp/rsp.h | 2 +- src/devices/cpu/rw5000/a5000.cpp | 4 +- src/devices/cpu/rw5000/a5000.h | 4 +- src/devices/cpu/rw5000/a5500.cpp | 4 +- src/devices/cpu/rw5000/a5500.h | 4 +- src/devices/cpu/rw5000/a5900.cpp | 2 +- src/devices/cpu/rw5000/a5900.h | 2 +- src/devices/cpu/rw5000/b5000.cpp | 4 +- src/devices/cpu/rw5000/b5000.h | 4 +- src/devices/cpu/rw5000/b5500.cpp | 2 +- src/devices/cpu/rw5000/b5500.h | 2 +- src/devices/cpu/rw5000/b6000.cpp | 4 +- src/devices/cpu/rw5000/b6000.h | 4 +- src/devices/cpu/rw5000/b6100.cpp | 2 +- src/devices/cpu/rw5000/b6100.h | 2 +- src/devices/cpu/rw5000/rw5000base.cpp | 2 +- src/devices/cpu/rw5000/rw5000base.h | 2 +- src/devices/cpu/rx01/rx01.cpp | 2 +- src/devices/cpu/rx01/rx01.h | 2 +- src/devices/cpu/s2650/s2650.cpp | 2 +- src/devices/cpu/s2650/s2650.h | 2 +- src/devices/cpu/saturn/saturn.cpp | 2 +- src/devices/cpu/saturn/saturn.h | 2 +- src/devices/cpu/sc61860/sc61860.cpp | 2 +- src/devices/cpu/sc61860/sc61860.h | 2 +- src/devices/cpu/scmp/scmp.cpp | 6 +- src/devices/cpu/scmp/scmp.h | 6 +- src/devices/cpu/score/score.cpp | 2 +- src/devices/cpu/score/score.h | 2 +- src/devices/cpu/scudsp/scudsp.cpp | 2 +- src/devices/cpu/se3208/se3208.cpp | 2 +- src/devices/cpu/se3208/se3208.h | 2 +- src/devices/cpu/sh/sh.h | 2 +- src/devices/cpu/sh/sh2.cpp | 8 +- src/devices/cpu/sh/sh2.h | 8 +- src/devices/cpu/sh/sh4.cpp | 14 +- src/devices/cpu/sh/sh4.h | 14 +- src/devices/cpu/sh/sh7604_bus.cpp | 2 +- src/devices/cpu/sh/sh7604_bus.h | 2 +- src/devices/cpu/sh/sh7604_sci.cpp | 2 +- src/devices/cpu/sh/sh7604_sci.h | 2 +- src/devices/cpu/sh/sh7604_wdt.cpp | 2 +- src/devices/cpu/sh/sh7604_wdt.h | 2 +- src/devices/cpu/sharc/sharc.cpp | 2 +- src/devices/cpu/sharc/sharc.h | 2 +- src/devices/cpu/sm510/sm500.cpp | 4 +- src/devices/cpu/sm510/sm500.h | 4 +- src/devices/cpu/sm510/sm510.cpp | 2 +- src/devices/cpu/sm510/sm510.h | 2 +- src/devices/cpu/sm510/sm510base.h | 2 +- src/devices/cpu/sm510/sm511.cpp | 6 +- src/devices/cpu/sm510/sm511.h | 6 +- src/devices/cpu/sm510/sm530.cpp | 4 +- src/devices/cpu/sm510/sm530.h | 4 +- src/devices/cpu/sm510/sm590.cpp | 8 +- src/devices/cpu/sm510/sm590.h | 8 +- src/devices/cpu/sm510/sm5a.cpp | 8 +- src/devices/cpu/sm510/sm5a.h | 8 +- src/devices/cpu/sm8500/sm8500.cpp | 2 +- src/devices/cpu/sparc/sparc.cpp | 12 +- src/devices/cpu/sparc/sparc.h | 12 +- src/devices/cpu/spc700/spc700.cpp | 4 +- src/devices/cpu/spc700/spc700.h | 4 +- src/devices/cpu/ssem/ssem.cpp | 2 +- src/devices/cpu/ssem/ssem.h | 2 +- src/devices/cpu/ssp1601/ssp1601.cpp | 2 +- src/devices/cpu/ssp1601/ssp1601.h | 2 +- src/devices/cpu/st62xx/st62xx.cpp | 2 +- src/devices/cpu/st62xx/st62xx.h | 2 +- src/devices/cpu/superfx/superfx.cpp | 8 +- src/devices/cpu/superfx/superfx.h | 8 +- src/devices/cpu/t11/t11.cpp | 6 +- src/devices/cpu/t11/t11.h | 6 +- src/devices/cpu/tlcs870/tlcs870.cpp | 4 +- src/devices/cpu/tlcs870/tlcs870.h | 4 +- src/devices/cpu/tlcs90/tlcs90.cpp | 14 +- src/devices/cpu/tlcs90/tlcs90.h | 14 +- src/devices/cpu/tlcs900/tlcs900.cpp | 4 +- src/devices/cpu/tlcs900/tlcs900.h | 4 +- src/devices/cpu/tlcs900/tmp95c061.cpp | 2 +- src/devices/cpu/tlcs900/tmp95c061.h | 2 +- src/devices/cpu/tlcs900/tmp95c063.cpp | 2 +- src/devices/cpu/tlcs900/tmp95c063.h | 2 +- src/devices/cpu/tlcs900/tmp96c141.cpp | 2 +- src/devices/cpu/tlcs900/tmp96c141.h | 2 +- src/devices/cpu/tms1000/tms0270.cpp | 2 +- src/devices/cpu/tms1000/tms0270.h | 2 +- src/devices/cpu/tms1000/tms0970.cpp | 8 +- src/devices/cpu/tms1000/tms0970.h | 8 +- src/devices/cpu/tms1000/tms0980.cpp | 6 +- src/devices/cpu/tms1000/tms0980.h | 6 +- src/devices/cpu/tms1000/tms1000.cpp | 18 +- src/devices/cpu/tms1000/tms1000.h | 18 +- src/devices/cpu/tms1000/tms1000c.cpp | 2 +- src/devices/cpu/tms1000/tms1000c.h | 2 +- src/devices/cpu/tms1000/tms1100.cpp | 10 +- src/devices/cpu/tms1000/tms1100.h | 10 +- src/devices/cpu/tms1000/tms1400.cpp | 16 +- src/devices/cpu/tms1000/tms1400.h | 16 +- src/devices/cpu/tms1000/tms1k_base.cpp | 2 +- src/devices/cpu/tms1000/tms1k_base.h | 2 +- src/devices/cpu/tms1000/tms2100.cpp | 12 +- src/devices/cpu/tms1000/tms2100.h | 12 +- src/devices/cpu/tms1000/tms2400.cpp | 12 +- src/devices/cpu/tms1000/tms2400.h | 12 +- src/devices/cpu/tms1000/tp0320.cpp | 2 +- src/devices/cpu/tms1000/tp0320.h | 2 +- src/devices/cpu/tms32010/tms32010.cpp | 8 +- src/devices/cpu/tms32010/tms32010.h | 8 +- src/devices/cpu/tms32025/tms32025.cpp | 8 +- src/devices/cpu/tms32025/tms32025.h | 8 +- src/devices/cpu/tms32031/tms32031.cpp | 10 +- src/devices/cpu/tms32031/tms32031.h | 10 +- src/devices/cpu/tms32051/tms32051.cpp | 6 +- src/devices/cpu/tms32051/tms32051.h | 6 +- src/devices/cpu/tms32082/tms32082.cpp | 4 +- src/devices/cpu/tms32082/tms32082.h | 4 +- src/devices/cpu/tms34010/tms34010.cpp | 6 +- src/devices/cpu/tms34010/tms34010.h | 6 +- src/devices/cpu/tms57002/tms57002.cpp | 2 +- src/devices/cpu/tms57002/tms57002.h | 2 +- src/devices/cpu/tms7000/tms7000.cpp | 26 +-- src/devices/cpu/tms7000/tms7000.h | 26 +-- src/devices/cpu/tms9900/ti990_10.cpp | 2 +- src/devices/cpu/tms9900/ti990_10.h | 2 +- src/devices/cpu/tms9900/tms9900.cpp | 4 +- src/devices/cpu/tms9900/tms9900.h | 4 +- src/devices/cpu/tms9900/tms9980a.cpp | 6 +- src/devices/cpu/tms9900/tms9980a.h | 6 +- src/devices/cpu/tms9900/tms9995.cpp | 4 +- src/devices/cpu/tms9900/tms9995.h | 6 +- src/devices/cpu/tx0/tx0.cpp | 10 +- src/devices/cpu/tx0/tx0.h | 4 +- src/devices/cpu/ucom4/ucom4.cpp | 12 +- src/devices/cpu/ucom4/ucom4.h | 12 +- src/devices/cpu/unsp/unsp.cpp | 16 +- src/devices/cpu/unsp/unsp.h | 16 +- src/devices/cpu/upd7725/upd7725.cpp | 6 +- src/devices/cpu/upd7725/upd7725.h | 6 +- src/devices/cpu/upd7810/upd7810.cpp | 18 +- src/devices/cpu/upd7810/upd7810.h | 18 +- src/devices/cpu/upd7810/upd7811.cpp | 4 +- src/devices/cpu/upd7810/upd7811.h | 4 +- src/devices/cpu/upd78k/upd78k0.cpp | 4 +- src/devices/cpu/upd78k/upd78k0.h | 8 +- src/devices/cpu/upd78k/upd78k2.cpp | 6 +- src/devices/cpu/upd78k/upd78k2.h | 6 +- src/devices/cpu/upd78k/upd78k3.cpp | 8 +- src/devices/cpu/upd78k/upd78k3.h | 8 +- src/devices/cpu/upd78k/upd78k4.cpp | 4 +- src/devices/cpu/upd78k/upd78k4.h | 4 +- src/devices/cpu/v30mz/v30mz.cpp | 2 +- src/devices/cpu/v30mz/v30mz.h | 2 +- src/devices/cpu/v60/v60.cpp | 6 +- src/devices/cpu/v60/v60.h | 6 +- src/devices/cpu/v810/v810.cpp | 2 +- src/devices/cpu/v810/v810.h | 2 +- src/devices/cpu/vt50/vt50.cpp | 6 +- src/devices/cpu/vt50/vt50.h | 6 +- src/devices/cpu/vt61/vt61.cpp | 2 +- src/devices/cpu/vt61/vt61.h | 2 +- src/devices/cpu/we32000/we32100.cpp | 2 +- src/devices/cpu/we32000/we32100.h | 2 +- src/devices/cpu/xavix2/xavix2.cpp | 2 +- src/devices/cpu/xavix2/xavix2.h | 2 +- src/devices/cpu/z180/hd647180x.cpp | 2 +- src/devices/cpu/z180/hd647180x.h | 2 +- src/devices/cpu/z180/z180.cpp | 12 +- src/devices/cpu/z180/z180.h | 12 +- src/devices/cpu/z180/z180asci.cpp | 14 +- src/devices/cpu/z180/z180asci.h | 14 +- src/devices/cpu/z8/z8.cpp | 16 +- src/devices/cpu/z8/z8.h | 16 +- src/devices/cpu/z80/ez80.cpp | 4 +- src/devices/cpu/z80/ez80.h | 4 +- src/devices/cpu/z80/kc82.cpp | 2 +- src/devices/cpu/z80/kc82.h | 2 +- src/devices/cpu/z80/kl5c80a12.cpp | 2 +- src/devices/cpu/z80/kl5c80a12.h | 2 +- src/devices/cpu/z80/kl5c80a16.cpp | 2 +- src/devices/cpu/z80/kl5c80a16.h | 2 +- src/devices/cpu/z80/kp63.cpp | 6 +- src/devices/cpu/z80/kp63.h | 6 +- src/devices/cpu/z80/kp64.cpp | 2 +- src/devices/cpu/z80/kp64.h | 2 +- src/devices/cpu/z80/kp69.cpp | 4 +- src/devices/cpu/z80/kp69.h | 4 +- src/devices/cpu/z80/ky80.cpp | 2 +- src/devices/cpu/z80/ky80.h | 2 +- src/devices/cpu/z80/lz8420m.cpp | 2 +- src/devices/cpu/z80/lz8420m.h | 2 +- src/devices/cpu/z80/mc8123.cpp | 2 +- src/devices/cpu/z80/mc8123.h | 2 +- src/devices/cpu/z80/r800.cpp | 2 +- src/devices/cpu/z80/r800.h | 2 +- src/devices/cpu/z80/tmpz84c011.cpp | 2 +- src/devices/cpu/z80/tmpz84c011.h | 2 +- src/devices/cpu/z80/tmpz84c015.cpp | 2 +- src/devices/cpu/z80/tmpz84c015.h | 2 +- src/devices/cpu/z80/z80.cpp | 6 +- src/devices/cpu/z80/z80.h | 6 +- src/devices/cpu/z8000/z8000.cpp | 6 +- src/devices/cpu/z8000/z8000.h | 6 +- src/devices/imagedev/avivideo.cpp | 2 +- src/devices/imagedev/avivideo.h | 2 +- src/devices/imagedev/bitbngr.cpp | 2 +- src/devices/imagedev/bitbngr.h | 2 +- src/devices/imagedev/cassette.cpp | 2 +- src/devices/imagedev/cassette.h | 2 +- src/devices/imagedev/chd_cd.cpp | 4 +- src/devices/imagedev/chd_cd.h | 4 +- src/devices/imagedev/diablo.cpp | 2 +- src/devices/imagedev/diablo.h | 2 +- src/devices/imagedev/flopdrv.cpp | 4 +- src/devices/imagedev/flopdrv.h | 8 +- src/devices/imagedev/floppy.cpp | 84 ++++---- src/devices/imagedev/floppy.h | 20 +- src/devices/imagedev/harddriv.cpp | 6 +- src/devices/imagedev/harddriv.h | 8 +- src/devices/imagedev/magtape.cpp | 4 +- src/devices/imagedev/magtape.h | 4 +- src/devices/imagedev/mfmhd.cpp | 12 +- src/devices/imagedev/mfmhd.h | 14 +- src/devices/imagedev/microdrv.cpp | 2 +- src/devices/imagedev/microdrv.h | 2 +- src/devices/imagedev/midiin.cpp | 6 +- src/devices/imagedev/midiin.h | 2 +- src/devices/imagedev/midiout.cpp | 6 +- src/devices/imagedev/midiout.h | 2 +- src/devices/imagedev/papertape.cpp | 6 +- src/devices/imagedev/papertape.h | 6 +- src/devices/imagedev/picture.cpp | 2 +- src/devices/imagedev/picture.h | 2 +- src/devices/imagedev/printer.cpp | 2 +- src/devices/imagedev/printer.h | 2 +- src/devices/imagedev/snapquik.cpp | 6 +- src/devices/imagedev/snapquik.h | 10 +- src/devices/imagedev/wafadrive.cpp | 2 +- src/devices/imagedev/wafadrive.h | 2 +- src/devices/machine/1ma6.cpp | 2 +- src/devices/machine/1ma6.h | 2 +- src/devices/machine/1mb5.cpp | 2 +- src/devices/machine/1mb5.h | 2 +- src/devices/machine/2812fifo.cpp | 2 +- src/devices/machine/2812fifo.h | 2 +- src/devices/machine/28fxxx.cpp | 8 +- src/devices/machine/28fxxx.h | 8 +- src/devices/machine/40105.cpp | 2 +- src/devices/machine/40105.h | 2 +- src/devices/machine/53c7xx.cpp | 2 +- src/devices/machine/53c7xx.h | 2 +- src/devices/machine/53c810.cpp | 2 +- src/devices/machine/53c810.h | 2 +- src/devices/machine/64h156.cpp | 2 +- src/devices/machine/64h156.h | 2 +- src/devices/machine/6522via.cpp | 10 +- src/devices/machine/6522via.h | 10 +- src/devices/machine/6525tpi.cpp | 2 +- src/devices/machine/6525tpi.h | 2 +- src/devices/machine/6532riot.cpp | 2 +- src/devices/machine/6532riot.h | 2 +- src/devices/machine/68153bim.cpp | 16 +- src/devices/machine/68153bim.h | 8 +- src/devices/machine/6821pia.cpp | 2 +- src/devices/machine/6821pia.h | 2 +- src/devices/machine/68230pit.cpp | 4 +- src/devices/machine/68230pit.h | 4 +- src/devices/machine/68307.cpp | 2 +- src/devices/machine/68307.h | 2 +- src/devices/machine/68340.cpp | 2 +- src/devices/machine/68340.h | 2 +- src/devices/machine/68340ser.cpp | 2 +- src/devices/machine/68340ser.h | 2 +- src/devices/machine/68340tmu.cpp | 2 +- src/devices/machine/68340tmu.h | 2 +- src/devices/machine/6840ptm.cpp | 2 +- src/devices/machine/6840ptm.h | 4 +- src/devices/machine/6850acia.cpp | 4 +- src/devices/machine/6850acia.h | 4 +- src/devices/machine/68561mpcc.cpp | 18 +- src/devices/machine/68561mpcc.h | 20 +- src/devices/machine/7200fifo.cpp | 14 +- src/devices/machine/7200fifo.h | 6 +- src/devices/machine/7400.cpp | 2 +- src/devices/machine/7400.h | 2 +- src/devices/machine/7404.cpp | 2 +- src/devices/machine/7404.h | 2 +- src/devices/machine/74123.cpp | 2 +- src/devices/machine/74123.h | 4 +- src/devices/machine/74145.cpp | 2 +- src/devices/machine/74145.h | 2 +- src/devices/machine/74148.cpp | 2 +- src/devices/machine/74148.h | 2 +- src/devices/machine/74153.cpp | 2 +- src/devices/machine/74153.h | 2 +- src/devices/machine/74157.cpp | 10 +- src/devices/machine/74157.h | 10 +- src/devices/machine/74161.cpp | 10 +- src/devices/machine/74161.h | 10 +- src/devices/machine/74165.cpp | 2 +- src/devices/machine/74165.h | 2 +- src/devices/machine/74166.cpp | 2 +- src/devices/machine/74166.h | 2 +- src/devices/machine/74175.cpp | 6 +- src/devices/machine/74175.h | 6 +- src/devices/machine/74181.cpp | 2 +- src/devices/machine/74181.h | 2 +- src/devices/machine/74259.cpp | 12 +- src/devices/machine/74259.h | 12 +- src/devices/machine/74381.cpp | 2 +- src/devices/machine/74381.h | 2 +- src/devices/machine/74543.cpp | 2 +- src/devices/machine/74543.h | 2 +- src/devices/machine/7474.cpp | 2 +- src/devices/machine/7474.h | 2 +- src/devices/machine/8042kbdc.cpp | 2 +- src/devices/machine/8042kbdc.h | 2 +- src/devices/machine/82s129.cpp | 6 +- src/devices/machine/82s129.h | 6 +- src/devices/machine/8364_paula.cpp | 2 +- src/devices/machine/8364_paula.h | 2 +- src/devices/machine/8530scc.cpp | 2 +- src/devices/machine/8530scc.h | 2 +- src/devices/machine/acorn_bmu.cpp | 2 +- src/devices/machine/acorn_bmu.h | 2 +- src/devices/machine/acorn_ioc.cpp | 4 +- src/devices/machine/acorn_ioc.h | 2 +- src/devices/machine/acorn_lc.cpp | 2 +- src/devices/machine/acorn_lc.h | 2 +- src/devices/machine/acorn_memc.cpp | 2 +- src/devices/machine/acorn_memc.h | 4 +- src/devices/machine/acorn_vidc.cpp | 14 +- src/devices/machine/acorn_vidc.h | 8 +- src/devices/machine/adc0804.cpp | 6 +- src/devices/machine/adc0804.h | 10 +- src/devices/machine/adc0808.cpp | 8 +- src/devices/machine/adc0808.h | 8 +- src/devices/machine/adc083x.cpp | 10 +- src/devices/machine/adc083x.h | 10 +- src/devices/machine/adc0844.cpp | 6 +- src/devices/machine/adc0844.h | 6 +- src/devices/machine/adc1038.cpp | 2 +- src/devices/machine/adc1038.h | 2 +- src/devices/machine/adc1213x.cpp | 8 +- src/devices/machine/adc1213x.h | 8 +- src/devices/machine/aic565.cpp | 2 +- src/devices/machine/aic565.h | 2 +- src/devices/machine/aic580.cpp | 2 +- src/devices/machine/aic580.h | 2 +- src/devices/machine/aic6250.cpp | 6 +- src/devices/machine/aic6250.h | 6 +- src/devices/machine/aicartc.cpp | 2 +- src/devices/machine/aicartc.h | 2 +- src/devices/machine/akiko.cpp | 2 +- src/devices/machine/akiko.h | 2 +- src/devices/machine/alpha_8921.cpp | 2 +- src/devices/machine/alpha_8921.h | 2 +- src/devices/machine/am25s55x.cpp | 6 +- src/devices/machine/am25s55x.h | 6 +- src/devices/machine/am2847.cpp | 8 +- src/devices/machine/am2847.h | 8 +- src/devices/machine/am2901b.cpp | 2 +- src/devices/machine/am2901b.h | 2 +- src/devices/machine/am2910.cpp | 2 +- src/devices/machine/am2910.h | 2 +- src/devices/machine/am53cf96.cpp | 2 +- src/devices/machine/am53cf96.h | 2 +- src/devices/machine/am79c30.cpp | 2 +- src/devices/machine/am79c30.h | 2 +- src/devices/machine/am79c90.cpp | 6 +- src/devices/machine/am79c90.h | 6 +- src/devices/machine/am9513.cpp | 6 +- src/devices/machine/am9513.h | 6 +- src/devices/machine/am9517a.cpp | 10 +- src/devices/machine/am9517a.h | 10 +- src/devices/machine/am9519.cpp | 2 +- src/devices/machine/am9519.h | 2 +- src/devices/machine/amiga_copper.cpp | 2 +- src/devices/machine/amiga_copper.h | 2 +- src/devices/machine/amigafdc.cpp | 2 +- src/devices/machine/amigafdc.h | 2 +- src/devices/machine/applefdintf.cpp | 2 +- src/devices/machine/applefdintf.h | 2 +- src/devices/machine/applepic.cpp | 2 +- src/devices/machine/applepic.h | 2 +- src/devices/machine/archimedes_keyb.cpp | 4 +- src/devices/machine/archimedes_keyb.h | 2 +- src/devices/machine/arm_iomd.cpp | 6 +- src/devices/machine/arm_iomd.h | 6 +- src/devices/machine/at.cpp | 4 +- src/devices/machine/at.h | 2 +- src/devices/machine/at28c16.cpp | 2 +- src/devices/machine/at28c16.h | 2 +- src/devices/machine/at28c64b.cpp | 2 +- src/devices/machine/at28c64b.h | 2 +- src/devices/machine/at29x.cpp | 8 +- src/devices/machine/at29x.h | 8 +- src/devices/machine/at45dbxx.cpp | 8 +- src/devices/machine/at45dbxx.h | 8 +- src/devices/machine/at_keybc.cpp | 6 +- src/devices/machine/at_keybc.h | 6 +- src/devices/machine/ataflash.cpp | 10 +- src/devices/machine/ataflash.h | 10 +- src/devices/machine/atmel_arm_aic.h | 2 +- src/devices/machine/ay31015.cpp | 6 +- src/devices/machine/ay31015.h | 6 +- src/devices/machine/bacta_datalogger.cpp | 10 +- src/devices/machine/bacta_datalogger.h | 4 +- src/devices/machine/bankdev.cpp | 2 +- src/devices/machine/bankdev.h | 2 +- src/devices/machine/bcreader.cpp | 2 +- src/devices/machine/bcreader.h | 2 +- src/devices/machine/bitmap_printer.cpp | 6 +- src/devices/machine/bitmap_printer.h | 4 +- src/devices/machine/bl_handhelds_menucontrol.cpp | 2 +- src/devices/machine/bl_handhelds_menucontrol.h | 2 +- src/devices/machine/bq4847.cpp | 6 +- src/devices/machine/bq4847.h | 6 +- src/devices/machine/bq48x2.cpp | 6 +- src/devices/machine/bq48x2.h | 4 +- src/devices/machine/buffer.cpp | 2 +- src/devices/machine/buffer.h | 2 +- src/devices/machine/busmouse.cpp | 2 +- src/devices/machine/busmouse.h | 2 +- src/devices/machine/cammu.cpp | 10 +- src/devices/machine/cammu.h | 10 +- src/devices/machine/cdp1852.cpp | 2 +- src/devices/machine/cdp1852.h | 2 +- src/devices/machine/cdp1871.cpp | 2 +- src/devices/machine/cdp1871.h | 2 +- src/devices/machine/cdp1879.cpp | 2 +- src/devices/machine/cdp1879.h | 2 +- src/devices/machine/ch376.cpp | 2 +- src/devices/machine/ch376.h | 2 +- src/devices/machine/chessmachine.cpp | 2 +- src/devices/machine/chessmachine.h | 2 +- src/devices/machine/clock.cpp | 2 +- src/devices/machine/clock.h | 2 +- src/devices/machine/com52c50.cpp | 2 +- src/devices/machine/com52c50.h | 2 +- src/devices/machine/com8116.cpp | 14 +- src/devices/machine/com8116.h | 14 +- src/devices/machine/cop452.cpp | 2 +- src/devices/machine/cop452.h | 2 +- src/devices/machine/corvushd.cpp | 2 +- src/devices/machine/corvushd.h | 2 +- src/devices/machine/cr511b.cpp | 2 +- src/devices/machine/cr511b.h | 2 +- src/devices/machine/cs4031.cpp | 12 +- src/devices/machine/cs4031.h | 4 +- src/devices/machine/cs8221.cpp | 2 +- src/devices/machine/cs8221.h | 6 +- src/devices/machine/cs8900a.cpp | 4 +- src/devices/machine/cs8900a.h | 4 +- src/devices/machine/cxd1095.cpp | 2 +- src/devices/machine/cxd1095.h | 2 +- src/devices/machine/cxd1185.cpp | 2 +- src/devices/machine/cxd1185.h | 2 +- src/devices/machine/dc7085.cpp | 10 +- src/devices/machine/dc7085.h | 4 +- src/devices/machine/diablo_hd.cpp | 4 +- src/devices/machine/diablo_hd.h | 2 +- src/devices/machine/dl11.cpp | 2 +- src/devices/machine/dl11.h | 2 +- src/devices/machine/dmac.cpp | 2 +- src/devices/machine/dmac.h | 2 +- src/devices/machine/dp8390.cpp | 6 +- src/devices/machine/dp8390.h | 6 +- src/devices/machine/dp83932c.cpp | 2 +- src/devices/machine/dp83932c.h | 2 +- src/devices/machine/dp8573.cpp | 2 +- src/devices/machine/dp8573.h | 2 +- src/devices/machine/ds1204.cpp | 2 +- src/devices/machine/ds1204.h | 2 +- src/devices/machine/ds1205.cpp | 2 +- src/devices/machine/ds1205.h | 2 +- src/devices/machine/ds128x.cpp | 6 +- src/devices/machine/ds128x.h | 6 +- src/devices/machine/ds1302.cpp | 6 +- src/devices/machine/ds1302.h | 6 +- src/devices/machine/ds1315.cpp | 2 +- src/devices/machine/ds1315.h | 2 +- src/devices/machine/ds1386.cpp | 8 +- src/devices/machine/ds1386.h | 8 +- src/devices/machine/ds17x85.cpp | 18 +- src/devices/machine/ds17x85.h | 18 +- src/devices/machine/ds1994.cpp | 2 +- src/devices/machine/ds1994.h | 7 +- src/devices/machine/ds2401.cpp | 2 +- src/devices/machine/ds2401.h | 7 +- src/devices/machine/ds2404.cpp | 2 +- src/devices/machine/ds2404.h | 2 +- src/devices/machine/ds6417.cpp | 2 +- src/devices/machine/ds6417.h | 2 +- src/devices/machine/ds75160a.cpp | 2 +- src/devices/machine/ds75160a.h | 2 +- src/devices/machine/ds75161a.cpp | 2 +- src/devices/machine/ds75161a.h | 2 +- src/devices/machine/ds8874.cpp | 2 +- src/devices/machine/ds8874.h | 2 +- src/devices/machine/e0516.cpp | 2 +- src/devices/machine/e0516.h | 2 +- src/devices/machine/e05a03.cpp | 2 +- src/devices/machine/e05a03.h | 2 +- src/devices/machine/e05a30.cpp | 2 +- src/devices/machine/e05a30.h | 2 +- src/devices/machine/edlc.cpp | 6 +- src/devices/machine/edlc.h | 6 +- src/devices/machine/eeprom.cpp | 2 +- src/devices/machine/eeprompar.cpp | 2 +- src/devices/machine/eeprompar.h | 2 +- src/devices/machine/eepromser.cpp | 2 +- src/devices/machine/eepromser.h | 2 +- src/devices/machine/er1400.cpp | 2 +- src/devices/machine/er1400.h | 2 +- src/devices/machine/er2055.cpp | 2 +- src/devices/machine/er2055.h | 2 +- src/devices/machine/exorterm.cpp | 10 +- src/devices/machine/exorterm.h | 4 +- src/devices/machine/f3853.cpp | 14 +- src/devices/machine/f3853.h | 14 +- src/devices/machine/f4702.cpp | 2 +- src/devices/machine/f4702.h | 2 +- src/devices/machine/fdc37c665gt.cpp | 2 +- src/devices/machine/fdc37c665gt.h | 4 +- src/devices/machine/fdc37c93x.cpp | 4 +- src/devices/machine/fdc37c93x.h | 2 +- src/devices/machine/fga002.cpp | 4 +- src/devices/machine/fga002.h | 4 +- src/devices/machine/fm_scsi.cpp | 2 +- src/devices/machine/fm_scsi.h | 2 +- src/devices/machine/gayle.cpp | 2 +- src/devices/machine/gayle.h | 2 +- src/devices/machine/gen_fifo.cpp | 4 +- src/devices/machine/gen_fifo.h | 4 +- src/devices/machine/gen_latch.cpp | 6 +- src/devices/machine/gen_latch.h | 6 +- src/devices/machine/generalplus_gpl16250soc.cpp | 8 +- src/devices/machine/generalplus_gpl16250soc.h | 20 +- .../machine/generalplus_gpl16250soc_video.cpp | 6 +- .../machine/generalplus_gpl16250soc_video.h | 6 +- src/devices/machine/genpc.cpp | 18 +- src/devices/machine/genpc.h | 18 +- src/devices/machine/gt64xxx.cpp | 2 +- src/devices/machine/gt64xxx.h | 10 +- src/devices/machine/gt913_io.cpp | 2 +- src/devices/machine/gt913_io.h | 4 +- src/devices/machine/gt913_kbd.cpp | 2 +- src/devices/machine/gt913_kbd.h | 2 +- src/devices/machine/gt913_snd.cpp | 2 +- src/devices/machine/gt913_snd.h | 2 +- src/devices/machine/hd63450.cpp | 2 +- src/devices/machine/hd63450.h | 4 +- src/devices/machine/hd64610.cpp | 2 +- src/devices/machine/hd64610.h | 2 +- src/devices/machine/hdc92x4.cpp | 6 +- src/devices/machine/hdc92x4.h | 6 +- src/devices/machine/hp_dc100_tape.cpp | 2 +- src/devices/machine/hp_dc100_tape.h | 2 +- src/devices/machine/hp_taco.cpp | 6 +- src/devices/machine/hp_taco.h | 4 +- src/devices/machine/i2cmem.cpp | 26 +-- src/devices/machine/i2cmem.h | 4 +- src/devices/machine/i6300esb.cpp | 4 +- src/devices/machine/i6300esb.h | 6 +- src/devices/machine/i7220.cpp | 2 +- src/devices/machine/i7220.h | 2 +- src/devices/machine/i80130.cpp | 6 +- src/devices/machine/i80130.h | 2 +- src/devices/machine/i8087.cpp | 4 +- src/devices/machine/i8087.h | 4 +- src/devices/machine/i8155.cpp | 6 +- src/devices/machine/i8155.h | 6 +- src/devices/machine/i8212.cpp | 2 +- src/devices/machine/i8212.h | 2 +- src/devices/machine/i8214.cpp | 2 +- src/devices/machine/i8214.h | 2 +- src/devices/machine/i82355.cpp | 2 +- src/devices/machine/i82355.h | 2 +- src/devices/machine/i82357.cpp | 10 +- src/devices/machine/i82357.h | 2 +- src/devices/machine/i82371sb.cpp | 6 +- src/devices/machine/i82371sb.h | 4 +- src/devices/machine/i8243.cpp | 2 +- src/devices/machine/i8243.h | 2 +- src/devices/machine/i82439hx.cpp | 2 +- src/devices/machine/i82439hx.h | 4 +- src/devices/machine/i82439tx.cpp | 2 +- src/devices/machine/i82439tx.h | 4 +- src/devices/machine/i8251.cpp | 4 +- src/devices/machine/i8251.h | 4 +- src/devices/machine/i82541.cpp | 2 +- src/devices/machine/i82541.h | 4 +- src/devices/machine/i8255.cpp | 6 +- src/devices/machine/i8255.h | 6 +- src/devices/machine/i8257.cpp | 2 +- src/devices/machine/i8257.h | 2 +- src/devices/machine/i82586.cpp | 14 +- src/devices/machine/i82586.h | 14 +- src/devices/machine/i8271.cpp | 6 +- src/devices/machine/i8271.h | 4 +- src/devices/machine/i8279.cpp | 2 +- src/devices/machine/i8279.h | 2 +- src/devices/machine/i82875p.cpp | 6 +- src/devices/machine/i82875p.h | 10 +- src/devices/machine/i8291a.cpp | 2 +- src/devices/machine/i8291a.h | 2 +- src/devices/machine/i8355.cpp | 2 +- src/devices/machine/i8355.h | 2 +- src/devices/machine/ibm21s850.cpp | 6 +- src/devices/machine/ibm21s850.h | 6 +- src/devices/machine/icm7170.cpp | 2 +- src/devices/machine/icm7170.h | 2 +- src/devices/machine/idectrl.cpp | 10 +- src/devices/machine/idectrl.h | 10 +- src/devices/machine/ie15.cpp | 10 +- src/devices/machine/ie15.h | 4 +- src/devices/machine/ie15_kbd.cpp | 4 +- src/devices/machine/ie15_kbd.h | 4 +- src/devices/machine/im6402.cpp | 2 +- src/devices/machine/im6402.h | 4 +- src/devices/machine/input_merger.cpp | 8 +- src/devices/machine/input_merger.h | 8 +- src/devices/machine/ins8154.cpp | 2 +- src/devices/machine/ins8154.h | 2 +- src/devices/machine/ins8250.cpp | 14 +- src/devices/machine/ins8250.h | 10 +- src/devices/machine/intelfsh.cpp | 84 ++++---- src/devices/machine/intelfsh.h | 82 ++++---- src/devices/machine/iopcdvd.cpp | 2 +- src/devices/machine/iopcdvd.h | 4 +- src/devices/machine/iopdma.cpp | 2 +- src/devices/machine/iopdma.h | 4 +- src/devices/machine/iopintc.cpp | 2 +- src/devices/machine/iopintc.h | 4 +- src/devices/machine/iopsio2.cpp | 2 +- src/devices/machine/iopsio2.h | 4 +- src/devices/machine/ioptimer.cpp | 2 +- src/devices/machine/ioptimer.h | 2 +- src/devices/machine/iwm.cpp | 2 +- src/devices/machine/iwm.h | 4 +- src/devices/machine/jvsdev.cpp | 2 +- src/devices/machine/jvsdev.h | 2 +- src/devices/machine/jvshost.cpp | 2 +- src/devices/machine/jvshost.h | 2 +- src/devices/machine/k033906.cpp | 2 +- src/devices/machine/k033906.h | 6 +- src/devices/machine/k053252.cpp | 2 +- src/devices/machine/k053252.h | 2 +- src/devices/machine/k054321.cpp | 2 +- src/devices/machine/k054321.h | 4 +- src/devices/machine/k056230.cpp | 2 +- src/devices/machine/k056230.h | 2 +- src/devices/machine/kb3600.cpp | 2 +- src/devices/machine/kb3600.h | 2 +- src/devices/machine/keyboard.cpp | 6 +- src/devices/machine/keyboard.h | 4 +- src/devices/machine/kr1601rr1.cpp | 2 +- src/devices/machine/kr1601rr1.h | 2 +- src/devices/machine/kr2376.cpp | 6 +- src/devices/machine/kr2376.h | 6 +- src/devices/machine/laserdsc.cpp | 6 +- src/devices/machine/laserdsc.h | 2 +- src/devices/machine/latch8.cpp | 2 +- src/devices/machine/latch8.h | 2 +- src/devices/machine/lc89510.cpp | 2 +- src/devices/machine/lc89510.h | 2 +- src/devices/machine/ldp1000.cpp | 2 +- src/devices/machine/ldp1000.h | 2 +- src/devices/machine/ldp1450.cpp | 2 +- src/devices/machine/ldp1450.h | 2 +- src/devices/machine/ldpr8210.cpp | 6 +- src/devices/machine/ldpr8210.h | 6 +- src/devices/machine/ldstub.cpp | 4 +- src/devices/machine/ldstub.h | 4 +- src/devices/machine/ldv1000.cpp | 2 +- src/devices/machine/ldv1000.h | 2 +- src/devices/machine/ldv4200hle.cpp | 2 +- src/devices/machine/ldv4200hle.h | 2 +- src/devices/machine/ldvp931.cpp | 2 +- src/devices/machine/ldvp931.h | 2 +- src/devices/machine/legscsi.cpp | 2 +- src/devices/machine/legscsi.h | 2 +- src/devices/machine/lh5810.cpp | 2 +- src/devices/machine/lh5810.h | 2 +- src/devices/machine/linflash.cpp | 8 +- src/devices/machine/linflash.h | 8 +- src/devices/machine/locomo.cpp | 2 +- src/devices/machine/locomo.h | 2 +- src/devices/machine/lpc-acpi.cpp | 2 +- src/devices/machine/lpc-acpi.h | 2 +- src/devices/machine/lpc-pit.cpp | 2 +- src/devices/machine/lpc-pit.h | 2 +- src/devices/machine/lpc-rtc.cpp | 2 +- src/devices/machine/lpc-rtc.h | 2 +- src/devices/machine/lpci.cpp | 2 +- src/devices/machine/lpci.h | 6 +- src/devices/machine/m3002.cpp | 6 +- src/devices/machine/m3002.h | 6 +- src/devices/machine/m68sfdc.cpp | 6 +- src/devices/machine/m68sfdc.h | 2 +- src/devices/machine/m6m80011ap.cpp | 2 +- src/devices/machine/m6m80011ap.h | 2 +- src/devices/machine/m950x0.cpp | 12 +- src/devices/machine/m950x0.h | 6 +- src/devices/machine/mb14241.cpp | 2 +- src/devices/machine/mb14241.h | 2 +- src/devices/machine/mb3773.cpp | 2 +- src/devices/machine/mb3773.h | 2 +- src/devices/machine/mb8421.h | 12 +- src/devices/machine/mb87030.cpp | 4 +- src/devices/machine/mb87030.h | 4 +- src/devices/machine/mb87078.cpp | 2 +- src/devices/machine/mb87078.h | 2 +- src/devices/machine/mb8795.cpp | 2 +- src/devices/machine/mb8795.h | 2 +- src/devices/machine/mb89352.cpp | 2 +- src/devices/machine/mb89352.h | 2 +- src/devices/machine/mb89363b.cpp | 2 +- src/devices/machine/mb89363b.h | 2 +- src/devices/machine/mb89371.cpp | 2 +- src/devices/machine/mb89371.h | 2 +- src/devices/machine/mb89374.cpp | 2 +- src/devices/machine/mb89374.h | 2 +- src/devices/machine/mc14411.cpp | 4 +- src/devices/machine/mc14411.h | 4 +- src/devices/machine/mc146818.cpp | 6 +- src/devices/machine/mc146818.h | 6 +- src/devices/machine/mc68328.cpp | 2 +- src/devices/machine/mc68328.h | 2 +- src/devices/machine/mc6843.cpp | 2 +- src/devices/machine/mc6843.h | 2 +- src/devices/machine/mc6844.cpp | 2 +- src/devices/machine/mc6844.h | 2 +- src/devices/machine/mc6846.cpp | 2 +- src/devices/machine/mc6846.h | 2 +- src/devices/machine/mc6852.cpp | 2 +- src/devices/machine/mc6852.h | 2 +- src/devices/machine/mc6854.cpp | 2 +- src/devices/machine/mc6854.h | 2 +- src/devices/machine/mc68681.cpp | 34 ++-- src/devices/machine/mc68681.h | 20 +- src/devices/machine/mc68901.cpp | 2 +- src/devices/machine/mc68901.h | 2 +- src/devices/machine/mccs1850.cpp | 2 +- src/devices/machine/mccs1850.h | 2 +- src/devices/machine/mcf5206e.cpp | 2 +- src/devices/machine/mcf5206e.h | 6 +- src/devices/machine/meters.cpp | 2 +- src/devices/machine/meters.h | 2 +- src/devices/machine/microtch.cpp | 2 +- src/devices/machine/microtch.h | 2 +- src/devices/machine/mm5307.cpp | 6 +- src/devices/machine/mm5307.h | 6 +- src/devices/machine/mm5740.cpp | 2 +- src/devices/machine/mm5740.h | 2 +- src/devices/machine/mm58167.cpp | 2 +- src/devices/machine/mm58167.h | 2 +- src/devices/machine/mm58174.cpp | 2 +- src/devices/machine/mm58174.h | 2 +- src/devices/machine/mm58274c.cpp | 2 +- src/devices/machine/mm58274c.h | 2 +- src/devices/machine/mm74c922.cpp | 6 +- src/devices/machine/mm74c922.h | 6 +- src/devices/machine/mos6526.cpp | 10 +- src/devices/machine/mos6526.h | 10 +- src/devices/machine/mos6529.cpp | 2 +- src/devices/machine/mos6529.h | 2 +- src/devices/machine/mos6530.cpp | 2 +- src/devices/machine/mos6530.h | 2 +- src/devices/machine/mos6530n.cpp | 6 +- src/devices/machine/mos6530n.h | 6 +- src/devices/machine/mos6551.cpp | 4 +- src/devices/machine/mos6551.h | 2 +- src/devices/machine/mos6702.cpp | 2 +- src/devices/machine/mos6702.h | 2 +- src/devices/machine/mos8706.cpp | 2 +- src/devices/machine/mos8706.h | 2 +- src/devices/machine/mos8722.cpp | 2 +- src/devices/machine/mos8722.h | 2 +- src/devices/machine/mos8726.cpp | 2 +- src/devices/machine/mos8726.h | 2 +- src/devices/machine/mpu401.cpp | 4 +- src/devices/machine/mpu401.h | 2 +- src/devices/machine/msm5832.cpp | 2 +- src/devices/machine/msm5832.h | 2 +- src/devices/machine/msm58321.cpp | 2 +- src/devices/machine/msm58321.h | 2 +- src/devices/machine/msm6242.cpp | 12 +- src/devices/machine/msm6242.h | 12 +- src/devices/machine/msm6253.cpp | 2 +- src/devices/machine/msm6253.h | 2 +- src/devices/machine/mv_sonora.cpp | 4 +- src/devices/machine/mv_sonora.h | 2 +- src/devices/machine/myb3k_kbd.cpp | 2 +- src/devices/machine/ncr5380.cpp | 8 +- src/devices/machine/ncr5380.h | 8 +- src/devices/machine/ncr5385.cpp | 2 +- src/devices/machine/ncr5385.h | 2 +- src/devices/machine/ncr5390.cpp | 14 +- src/devices/machine/ncr5390.h | 14 +- src/devices/machine/ncr539x.cpp | 2 +- src/devices/machine/ncr539x.h | 2 +- src/devices/machine/netlist.cpp | 30 +-- src/devices/machine/netlist.h | 32 +-- src/devices/machine/nmc9306.cpp | 2 +- src/devices/machine/nmc9306.h | 2 +- src/devices/machine/nmk112.cpp | 2 +- src/devices/machine/nmk112.h | 2 +- src/devices/machine/ns32081.cpp | 2 +- src/devices/machine/ns32081.h | 2 +- src/devices/machine/ns32082.cpp | 2 +- src/devices/machine/ns32082.h | 2 +- src/devices/machine/ns32202.cpp | 2 +- src/devices/machine/ns32202.h | 2 +- src/devices/machine/ns32382.cpp | 2 +- src/devices/machine/ns32382.h | 2 +- src/devices/machine/nsc810.cpp | 2 +- src/devices/machine/nsc810.h | 13 +- src/devices/machine/nscsi_bus.cpp | 8 +- src/devices/machine/nscsi_bus.h | 10 +- src/devices/machine/nscsi_cb.cpp | 2 +- src/devices/machine/nscsi_cb.h | 2 +- src/devices/machine/nvram.cpp | 2 +- src/devices/machine/nvram.h | 4 +- src/devices/machine/output_latch.cpp | 2 +- src/devices/machine/output_latch.h | 2 +- src/devices/machine/pc_fdc.cpp | 6 +- src/devices/machine/pc_fdc.h | 4 +- src/devices/machine/pc_lpt.cpp | 2 +- src/devices/machine/pc_lpt.h | 2 +- src/devices/machine/pccard.cpp | 2 +- src/devices/machine/pccard.h | 4 +- src/devices/machine/pcf8573.cpp | 2 +- src/devices/machine/pcf8573.h | 2 +- src/devices/machine/pcf8583.cpp | 2 +- src/devices/machine/pcf8583.h | 2 +- src/devices/machine/pcf8584.cpp | 2 +- src/devices/machine/pcf8584.h | 2 +- src/devices/machine/pcf8593.cpp | 2 +- src/devices/machine/pcf8593.h | 2 +- src/devices/machine/pci-apic.cpp | 2 +- src/devices/machine/pci-apic.h | 4 +- src/devices/machine/pci-ide.cpp | 2 +- src/devices/machine/pci-ide.h | 6 +- src/devices/machine/pci-sata.cpp | 2 +- src/devices/machine/pci-sata.h | 4 +- src/devices/machine/pci-smbus.cpp | 2 +- src/devices/machine/pci-smbus.h | 4 +- src/devices/machine/pci-usb.cpp | 6 +- src/devices/machine/pci-usb.h | 12 +- src/devices/machine/pci.cpp | 14 +- src/devices/machine/pci.h | 16 +- src/devices/machine/pci9050.cpp | 2 +- src/devices/machine/pckeybrd.cpp | 6 +- src/devices/machine/pckeybrd.h | 8 +- src/devices/machine/pdc.cpp | 8 +- src/devices/machine/pdc.h | 2 +- src/devices/machine/phi.cpp | 4 +- src/devices/machine/phi.h | 4 +- src/devices/machine/pic8259.cpp | 8 +- src/devices/machine/pic8259.h | 8 +- src/devices/machine/pit8253.cpp | 16 +- src/devices/machine/pit8253.h | 10 +- src/devices/machine/pla.cpp | 8 +- src/devices/machine/pla.h | 10 +- src/devices/machine/ps2dma.cpp | 2 +- src/devices/machine/ps2dma.h | 4 +- src/devices/machine/ps2intc.cpp | 2 +- src/devices/machine/ps2intc.h | 4 +- src/devices/machine/ps2mc.cpp | 2 +- src/devices/machine/ps2mc.h | 7 +- src/devices/machine/ps2pad.cpp | 2 +- src/devices/machine/ps2pad.h | 7 +- src/devices/machine/ps2sif.cpp | 2 +- src/devices/machine/ps2sif.h | 4 +- src/devices/machine/ps2timer.cpp | 2 +- src/devices/machine/ps2timer.h | 4 +- src/devices/machine/pxa255.cpp | 2 +- src/devices/machine/pxa255.h | 4 +- src/devices/machine/r10696.cpp | 2 +- src/devices/machine/r10696.h | 2 +- src/devices/machine/r10788.cpp | 2 +- src/devices/machine/r10788.h | 2 +- src/devices/machine/ra17xx.cpp | 2 +- src/devices/machine/ra17xx.h | 2 +- src/devices/machine/ram.cpp | 2 +- src/devices/machine/ram.h | 2 +- src/devices/machine/rf5c296.cpp | 2 +- src/devices/machine/rf5c296.h | 2 +- src/devices/machine/ripple_counter.cpp | 2 +- src/devices/machine/ripple_counter.h | 2 +- src/devices/machine/roc10937.cpp | 12 +- src/devices/machine/roc10937.h | 12 +- src/devices/machine/rp5c01.cpp | 6 +- src/devices/machine/rp5c01.h | 6 +- src/devices/machine/rp5c15.cpp | 2 +- src/devices/machine/rp5c15.h | 2 +- src/devices/machine/rp5h01.cpp | 2 +- src/devices/machine/rp5h01.h | 2 +- src/devices/machine/rstbuf.cpp | 6 +- src/devices/machine/rstbuf.h | 6 +- src/devices/machine/rtc4543.cpp | 6 +- src/devices/machine/rtc4543.h | 6 +- src/devices/machine/rtc65271.cpp | 2 +- src/devices/machine/rtc65271.h | 2 +- src/devices/machine/rtc9701.cpp | 2 +- src/devices/machine/rtc9701.h | 2 +- src/devices/machine/s2636.cpp | 2 +- src/devices/machine/s2636.h | 2 +- src/devices/machine/s3520cf.cpp | 6 +- src/devices/machine/s3520cf.h | 6 +- src/devices/machine/s3c2400.cpp | 2 +- src/devices/machine/s3c2400.h | 2 +- src/devices/machine/s3c2410.cpp | 2 +- src/devices/machine/s3c2410.h | 2 +- src/devices/machine/s3c2440.cpp | 2 +- src/devices/machine/s3c2440.h | 2 +- src/devices/machine/s3c44b0.cpp | 2 +- src/devices/machine/s3c44b0.h | 2 +- src/devices/machine/s_smp.cpp | 2 +- src/devices/machine/s_smp.h | 2 +- src/devices/machine/sa1110.cpp | 2 +- src/devices/machine/sa1110.h | 4 +- src/devices/machine/sa1111.cpp | 2 +- src/devices/machine/sa1111.h | 4 +- src/devices/machine/saa1043.cpp | 2 +- src/devices/machine/saa1043.h | 2 +- src/devices/machine/saa7191.cpp | 2 +- src/devices/machine/saa7191.h | 2 +- src/devices/machine/scc2698b.cpp | 6 +- src/devices/machine/scc2698b.h | 4 +- src/devices/machine/scc68070.cpp | 2 +- src/devices/machine/scc68070.h | 2 +- src/devices/machine/scn_pci.cpp | 12 +- src/devices/machine/scn_pci.h | 12 +- src/devices/machine/scnxx562.cpp | 24 +-- src/devices/machine/scnxx562.h | 24 +-- src/devices/machine/scoop.cpp | 2 +- src/devices/machine/scoop.h | 2 +- src/devices/machine/sda2006.cpp | 2 +- src/devices/machine/sda2006.h | 2 +- src/devices/machine/sdlc.cpp | 2 +- src/devices/machine/sdlc.h | 2 +- src/devices/machine/sega_scu.cpp | 2 +- src/devices/machine/sega_scu.h | 2 +- src/devices/machine/segacrp2_device.cpp | 22 +-- src/devices/machine/segacrp2_device.h | 22 +-- src/devices/machine/segacrpt_device.cpp | 54 ++--- src/devices/machine/segacrpt_device.h | 54 ++--- src/devices/machine/sensorboard.cpp | 2 +- src/devices/machine/sensorboard.h | 2 +- src/devices/machine/serflash.cpp | 2 +- src/devices/machine/serflash.h | 2 +- src/devices/machine/sis5513_ide.cpp | 2 +- src/devices/machine/sis5513_ide.h | 4 +- src/devices/machine/sis630_gui.cpp | 8 +- src/devices/machine/sis630_gui.h | 8 +- src/devices/machine/sis630_host.cpp | 2 +- src/devices/machine/sis630_host.h | 4 +- src/devices/machine/sis7001_usb.cpp | 2 +- src/devices/machine/sis7001_usb.h | 4 +- src/devices/machine/sis7018_audio.cpp | 2 +- src/devices/machine/sis7018_audio.h | 2 +- src/devices/machine/sis85c496.cpp | 8 +- src/devices/machine/sis85c496.h | 2 +- src/devices/machine/sis900_eth.cpp | 2 +- src/devices/machine/sis900_eth.h | 2 +- src/devices/machine/sis950_lpc.cpp | 8 +- src/devices/machine/sis950_lpc.h | 4 +- src/devices/machine/sis950_smbus.cpp | 2 +- src/devices/machine/sis950_smbus.h | 2 +- src/devices/machine/smartboard.cpp | 2 +- src/devices/machine/smartboard.h | 2 +- src/devices/machine/smartmed.cpp | 6 +- src/devices/machine/smartmed.h | 6 +- src/devices/machine/smc91c9x.cpp | 6 +- src/devices/machine/smc91c9x.h | 6 +- src/devices/machine/smioc.cpp | 2 +- src/devices/machine/smioc.h | 2 +- src/devices/machine/smpc.cpp | 2 +- src/devices/machine/smpc.h | 2 +- src/devices/machine/spchrom.cpp | 2 +- src/devices/machine/spchrom.h | 2 +- src/devices/machine/spg110.cpp | 4 +- src/devices/machine/spg110.h | 6 +- src/devices/machine/spg110_video.cpp | 4 +- src/devices/machine/spg110_video.h | 6 +- src/devices/machine/spg290_cdservo.cpp | 2 +- src/devices/machine/spg290_cdservo.h | 4 +- src/devices/machine/spg290_i2c.cpp | 2 +- src/devices/machine/spg290_i2c.h | 2 +- src/devices/machine/spg290_ppu.cpp | 2 +- src/devices/machine/spg290_ppu.h | 4 +- src/devices/machine/spg290_timer.cpp | 2 +- src/devices/machine/spg290_timer.h | 2 +- src/devices/machine/spg2xx.cpp | 10 +- src/devices/machine/spg2xx.h | 16 +- src/devices/machine/spg2xx_audio.cpp | 8 +- src/devices/machine/spg2xx_audio.h | 8 +- src/devices/machine/spg2xx_io.cpp | 6 +- src/devices/machine/spg2xx_io.h | 12 +- src/devices/machine/spg2xx_sysdma.cpp | 2 +- src/devices/machine/spg2xx_sysdma.h | 4 +- src/devices/machine/spg2xx_video.cpp | 6 +- src/devices/machine/spg2xx_video.h | 6 +- src/devices/machine/spg_renderer.cpp | 4 +- src/devices/machine/spg_renderer.h | 4 +- src/devices/machine/spi_sdcard.cpp | 6 +- src/devices/machine/spi_sdcard.h | 6 +- src/devices/machine/steppers.cpp | 6 +- src/devices/machine/steppers.h | 8 +- src/devices/machine/strata.cpp | 2 +- src/devices/machine/strata.h | 2 +- src/devices/machine/stvcd.cpp | 2 +- src/devices/machine/stvcd.h | 2 +- src/devices/machine/sun4c_mmu.cpp | 6 +- src/devices/machine/sun4c_mmu.h | 8 +- src/devices/machine/swim1.cpp | 2 +- src/devices/machine/swim1.h | 2 +- src/devices/machine/swim2.cpp | 2 +- src/devices/machine/swim2.h | 2 +- src/devices/machine/swim3.cpp | 2 +- src/devices/machine/swim3.h | 2 +- src/devices/machine/swtpc8212.cpp | 10 +- src/devices/machine/swtpc8212.h | 4 +- src/devices/machine/tc009xlvc.cpp | 6 +- src/devices/machine/tc009xlvc.h | 6 +- src/devices/machine/tdc1008.cpp | 2 +- src/devices/machine/tdc1008.h | 2 +- src/devices/machine/te7750.cpp | 8 +- src/devices/machine/te7750.h | 8 +- src/devices/machine/terminal.cpp | 8 +- src/devices/machine/terminal.h | 4 +- src/devices/machine/ticket.cpp | 6 +- src/devices/machine/ticket.h | 9 +- src/devices/machine/timekpr.cpp | 14 +- src/devices/machine/timekpr.h | 14 +- src/devices/machine/timer.cpp | 2 +- src/devices/machine/timer.h | 2 +- src/devices/machine/tmc0430.cpp | 2 +- src/devices/machine/tmc0430.h | 4 +- src/devices/machine/tmc0999.cpp | 2 +- src/devices/machine/tmc0999.h | 2 +- src/devices/machine/tmc208k.cpp | 6 +- src/devices/machine/tmc208k.h | 6 +- src/devices/machine/tmp68301.cpp | 2 +- src/devices/machine/tmp68301.h | 2 +- src/devices/machine/tms1024.cpp | 6 +- src/devices/machine/tms1024.h | 6 +- src/devices/machine/tms5501.cpp | 2 +- src/devices/machine/tms5501.h | 2 +- src/devices/machine/tms6100.cpp | 6 +- src/devices/machine/tms6100.h | 6 +- src/devices/machine/tms9901.cpp | 2 +- src/devices/machine/tms9901.h | 2 +- src/devices/machine/tms9902.cpp | 2 +- src/devices/machine/tms9902.h | 2 +- src/devices/machine/tms9914.cpp | 2 +- src/devices/machine/tms9914.h | 2 +- src/devices/machine/tsb12lv01a.cpp | 2 +- src/devices/machine/tsb12lv01a.h | 2 +- src/devices/machine/tube.cpp | 2 +- src/devices/machine/tube.h | 2 +- src/devices/machine/ucb1200.cpp | 2 +- src/devices/machine/ucb1200.h | 2 +- src/devices/machine/upc82c710.cpp | 2 +- src/devices/machine/upc82c710.h | 2 +- src/devices/machine/upc82c711.cpp | 2 +- src/devices/machine/upc82c711.h | 2 +- src/devices/machine/upd1990a.cpp | 6 +- src/devices/machine/upd1990a.h | 6 +- src/devices/machine/upd4701.cpp | 2 +- src/devices/machine/upd4701.h | 2 +- src/devices/machine/upd4991a.cpp | 2 +- src/devices/machine/upd4991a.h | 2 +- src/devices/machine/upd4992.cpp | 2 +- src/devices/machine/upd4992.h | 2 +- src/devices/machine/upd7001.cpp | 2 +- src/devices/machine/upd7001.h | 4 +- src/devices/machine/upd7002.cpp | 2 +- src/devices/machine/upd7002.h | 2 +- src/devices/machine/upd7004.cpp | 2 +- src/devices/machine/upd7004.h | 2 +- src/devices/machine/upd71071.cpp | 2 +- src/devices/machine/upd71071.h | 6 +- src/devices/machine/upd765.cpp | 42 ++-- src/devices/machine/upd765.h | 54 ++--- src/devices/machine/v3021.cpp | 2 +- src/devices/machine/v3021.h | 2 +- src/devices/machine/vic_pl192.cpp | 8 +- src/devices/machine/vic_pl192.h | 8 +- src/devices/machine/vr0uart.cpp | 6 +- src/devices/machine/vrc4373.cpp | 2 +- src/devices/machine/vrc4373.h | 6 +- src/devices/machine/vrc5074.cpp | 2 +- src/devices/machine/vrc5074.h | 4 +- src/devices/machine/vrender0.cpp | 6 +- src/devices/machine/vrender0.h | 4 +- src/devices/machine/vt82c496.cpp | 2 +- src/devices/machine/vt82c496.h | 2 +- src/devices/machine/vt83c461.cpp | 2 +- src/devices/machine/vt83c461.h | 2 +- src/devices/machine/watchdog.cpp | 2 +- src/devices/machine/watchdog.h | 2 +- src/devices/machine/wd1000.cpp | 2 +- src/devices/machine/wd1000.h | 2 +- src/devices/machine/wd1010.cpp | 2 +- src/devices/machine/wd1010.h | 2 +- src/devices/machine/wd11c00_17.cpp | 2 +- src/devices/machine/wd11c00_17.h | 2 +- src/devices/machine/wd2010.cpp | 2 +- src/devices/machine/wd2010.h | 2 +- src/devices/machine/wd33c9x.cpp | 10 +- src/devices/machine/wd33c9x.h | 30 +-- src/devices/machine/wd7600.cpp | 12 +- src/devices/machine/wd7600.h | 2 +- src/devices/machine/wd_fdc.cpp | 52 ++--- src/devices/machine/wd_fdc.h | 52 ++--- src/devices/machine/wozfdc.cpp | 6 +- src/devices/machine/wozfdc.h | 6 +- src/devices/machine/wtl3132.cpp | 2 +- src/devices/machine/wtl3132.h | 2 +- src/devices/machine/x2201.cpp | 2 +- src/devices/machine/x2201.h | 2 +- src/devices/machine/x2212.cpp | 6 +- src/devices/machine/x2212.h | 6 +- src/devices/machine/x76f041.cpp | 2 +- src/devices/machine/x76f041.h | 2 +- src/devices/machine/x76f100.cpp | 2 +- src/devices/machine/x76f100.h | 2 +- src/devices/machine/xc1700e.cpp | 2 +- src/devices/machine/xc1700e.h | 18 +- src/devices/machine/ym2148.cpp | 2 +- src/devices/machine/ym2148.h | 2 +- src/devices/machine/ym3802.cpp | 2 +- src/devices/machine/ym3802.h | 2 +- src/devices/machine/z8038.cpp | 2 +- src/devices/machine/z8038.h | 2 +- src/devices/machine/z80ctc.cpp | 4 +- src/devices/machine/z80ctc.h | 5 +- src/devices/machine/z80daisy_generic.cpp | 2 +- src/devices/machine/z80daisy_generic.h | 2 +- src/devices/machine/z80dma.cpp | 2 +- src/devices/machine/z80dma.h | 2 +- src/devices/machine/z80pio.cpp | 2 +- src/devices/machine/z80pio.h | 2 +- src/devices/machine/z80scc.cpp | 28 +-- src/devices/machine/z80scc.h | 30 +-- src/devices/machine/z80sio.cpp | 38 ++-- src/devices/machine/z80sio.h | 22 +-- src/devices/machine/z80sti.cpp | 2 +- src/devices/machine/z80sti.h | 2 +- src/devices/machine/z8536.cpp | 6 +- src/devices/machine/z8536.h | 6 +- src/devices/sound/315-5641.cpp | 2 +- src/devices/sound/315-5641.h | 2 +- src/devices/sound/ad1848.cpp | 6 +- src/devices/sound/ad1848.h | 2 +- src/devices/sound/aica.cpp | 2 +- src/devices/sound/aica.h | 2 +- src/devices/sound/asc.cpp | 2 +- src/devices/sound/asc.h | 4 +- src/devices/sound/astrocde.cpp | 2 +- src/devices/sound/astrocde.h | 2 +- src/devices/sound/awacs.cpp | 2 +- src/devices/sound/awacs.h | 2 +- src/devices/sound/ay8910.cpp | 26 +-- src/devices/sound/ay8910.h | 24 +-- src/devices/sound/bbd.cpp | 12 +- src/devices/sound/bbd.h | 12 +- src/devices/sound/beep.cpp | 2 +- src/devices/sound/beep.h | 2 +- src/devices/sound/bsmt2000.cpp | 2 +- src/devices/sound/bsmt2000.h | 2 +- src/devices/sound/c140.cpp | 6 +- src/devices/sound/c140.h | 6 +- src/devices/sound/c352.cpp | 2 +- src/devices/sound/c352.h | 4 +- src/devices/sound/c6280.cpp | 2 +- src/devices/sound/c6280.h | 2 +- src/devices/sound/cdda.cpp | 2 +- src/devices/sound/cdda.h | 2 +- src/devices/sound/cdp1863.cpp | 2 +- src/devices/sound/cdp1863.h | 2 +- src/devices/sound/cdp1864.cpp | 2 +- src/devices/sound/cdp1864.h | 2 +- src/devices/sound/cdp1869.cpp | 2 +- src/devices/sound/cdp1869.h | 4 +- src/devices/sound/cem3394.cpp | 2 +- src/devices/sound/cem3394.h | 2 +- src/devices/sound/dac.cpp | 2 +- src/devices/sound/dac.h | 10 +- src/devices/sound/dac76.cpp | 2 +- src/devices/sound/dac76.h | 2 +- src/devices/sound/dave.cpp | 2 +- src/devices/sound/dave.h | 2 +- src/devices/sound/digitalk.cpp | 2 +- src/devices/sound/digitalk.h | 2 +- src/devices/sound/discrete.cpp | 4 +- src/devices/sound/discrete.h | 8 +- src/devices/sound/dmadac.cpp | 2 +- src/devices/sound/dmadac.h | 2 +- src/devices/sound/dspv.cpp | 2 +- src/devices/sound/dspv.h | 2 +- src/devices/sound/es1373.cpp | 2 +- src/devices/sound/es1373.h | 2 +- src/devices/sound/es5503.cpp | 2 +- src/devices/sound/es5503.h | 2 +- src/devices/sound/es5506.cpp | 6 +- src/devices/sound/es5506.h | 6 +- src/devices/sound/es8712.cpp | 4 +- src/devices/sound/es8712.h | 2 +- src/devices/sound/esqpump.cpp | 2 +- src/devices/sound/esqpump.h | 2 +- src/devices/sound/flt_biquad.cpp | 2 +- src/devices/sound/flt_biquad.h | 2 +- src/devices/sound/flt_rc.cpp | 2 +- src/devices/sound/flt_rc.h | 4 +- src/devices/sound/flt_vol.cpp | 2 +- src/devices/sound/flt_vol.h | 2 +- src/devices/sound/gaelco.cpp | 6 +- src/devices/sound/gaelco.h | 6 +- src/devices/sound/gb.cpp | 6 +- src/devices/sound/gb.h | 8 +- src/devices/sound/hc55516.cpp | 14 +- src/devices/sound/hc55516.h | 14 +- src/devices/sound/huc6230.cpp | 2 +- src/devices/sound/huc6230.h | 2 +- src/devices/sound/i5000.cpp | 2 +- src/devices/sound/i5000.h | 2 +- src/devices/sound/ics2115.cpp | 2 +- src/devices/sound/ics2115.h | 2 +- src/devices/sound/iopspu.cpp | 2 +- src/devices/sound/iopspu.h | 4 +- src/devices/sound/iremga20.cpp | 2 +- src/devices/sound/iremga20.h | 2 +- src/devices/sound/k005289.cpp | 2 +- src/devices/sound/k005289.h | 2 +- src/devices/sound/k007232.cpp | 2 +- src/devices/sound/k007232.h | 2 +- src/devices/sound/k051649.cpp | 2 +- src/devices/sound/k051649.h | 2 +- src/devices/sound/k053260.cpp | 2 +- src/devices/sound/k053260.h | 2 +- src/devices/sound/k054539.cpp | 2 +- src/devices/sound/k054539.h | 2 +- src/devices/sound/k056800.cpp | 2 +- src/devices/sound/k056800.h | 2 +- src/devices/sound/ks0164.cpp | 2 +- src/devices/sound/ks0164.h | 2 +- src/devices/sound/l7a1045_l6028_dsp_a.cpp | 2 +- src/devices/sound/l7a1045_l6028_dsp_a.h | 2 +- src/devices/sound/lc7535.cpp | 2 +- src/devices/sound/lc7535.h | 2 +- src/devices/sound/lmc1992.cpp | 2 +- src/devices/sound/lmc1992.h | 2 +- src/devices/sound/lynx.cpp | 6 +- src/devices/sound/lynx.h | 6 +- src/devices/sound/mas3507d.cpp | 2 +- src/devices/sound/mas3507d.h | 2 +- src/devices/sound/mea8000.cpp | 2 +- src/devices/sound/mea8000.h | 2 +- src/devices/sound/meg.cpp | 6 +- src/devices/sound/meg.h | 6 +- src/devices/sound/mixer.cpp | 2 +- src/devices/sound/mixer.h | 2 +- src/devices/sound/mm5837.cpp | 4 +- src/devices/sound/mm5837.h | 4 +- src/devices/sound/mos6560.cpp | 8 +- src/devices/sound/mos6560.h | 12 +- src/devices/sound/mos6581.cpp | 6 +- src/devices/sound/mos6581.h | 6 +- src/devices/sound/mos7360.cpp | 2 +- src/devices/sound/mos7360.h | 2 +- src/devices/sound/msm5205.cpp | 6 +- src/devices/sound/msm5205.h | 6 +- src/devices/sound/msm5232.cpp | 2 +- src/devices/sound/msm5232.h | 4 +- src/devices/sound/multipcm.cpp | 2 +- src/devices/sound/multipcm.h | 2 +- src/devices/sound/n63701x.cpp | 2 +- src/devices/sound/n63701x.h | 2 +- src/devices/sound/namco.cpp | 8 +- src/devices/sound/namco.h | 8 +- src/devices/sound/namco_163.cpp | 2 +- src/devices/sound/namco_163.h | 2 +- src/devices/sound/nes_apu.cpp | 4 +- src/devices/sound/nes_apu.h | 6 +- src/devices/sound/nes_apu_vt.cpp | 2 +- src/devices/sound/nes_apu_vt.h | 2 +- src/devices/sound/okim6258.cpp | 2 +- src/devices/sound/okim6258.h | 2 +- src/devices/sound/okim6295.cpp | 2 +- src/devices/sound/okim6295.h | 4 +- src/devices/sound/okim6376.cpp | 6 +- src/devices/sound/okim6376.h | 6 +- src/devices/sound/okim9810.cpp | 2 +- src/devices/sound/okim9810.h | 2 +- src/devices/sound/pcd3311.cpp | 2 +- src/devices/sound/pcd3311.h | 2 +- src/devices/sound/pci-ac97.cpp | 2 +- src/devices/sound/pci-ac97.h | 4 +- src/devices/sound/pokey.cpp | 2 +- src/devices/sound/pokey.h | 4 +- src/devices/sound/qs1000.cpp | 2 +- src/devices/sound/qs1000.h | 2 +- src/devices/sound/qsound.cpp | 2 +- src/devices/sound/qsound.h | 2 +- src/devices/sound/qsoundhle.cpp | 2 +- src/devices/sound/qsoundhle.h | 2 +- src/devices/sound/rf5c400.cpp | 2 +- src/devices/sound/rf5c400.h | 2 +- src/devices/sound/rf5c68.cpp | 6 +- src/devices/sound/rf5c68.h | 6 +- src/devices/sound/rolandpcm.cpp | 2 +- src/devices/sound/rolandpcm.h | 2 +- src/devices/sound/rp2c33_snd.cpp | 2 +- src/devices/sound/rp2c33_snd.h | 2 +- src/devices/sound/s14001a.cpp | 2 +- src/devices/sound/s14001a.h | 2 +- src/devices/sound/s_dsp.cpp | 2 +- src/devices/sound/s_dsp.h | 2 +- src/devices/sound/saa1099.cpp | 2 +- src/devices/sound/saa1099.h | 2 +- src/devices/sound/samples.cpp | 4 +- src/devices/sound/samples.h | 4 +- src/devices/sound/sb0400.cpp | 2 +- src/devices/sound/sb0400.h | 4 +- src/devices/sound/scsp.cpp | 2 +- src/devices/sound/scsp.h | 2 +- src/devices/sound/segapcm.cpp | 2 +- src/devices/sound/segapcm.h | 2 +- src/devices/sound/setapcm.cpp | 6 +- src/devices/sound/setapcm.h | 6 +- src/devices/sound/sn76477.cpp | 2 +- src/devices/sound/sn76477.h | 2 +- src/devices/sound/sn76496.cpp | 20 +- src/devices/sound/sn76496.h | 22 +-- src/devices/sound/snkwave.cpp | 2 +- src/devices/sound/snkwave.h | 2 +- src/devices/sound/sp0250.cpp | 2 +- src/devices/sound/sp0250.h | 2 +- src/devices/sound/sp0256.cpp | 2 +- src/devices/sound/sp0256.h | 2 +- src/devices/sound/spkrdev.cpp | 2 +- src/devices/sound/spkrdev.h | 2 +- src/devices/sound/spu.cpp | 4 +- src/devices/sound/spu.h | 4 +- src/devices/sound/st0016.cpp | 2 +- src/devices/sound/st0016.h | 2 +- src/devices/sound/swp00.cpp | 2 +- src/devices/sound/swp00.h | 2 +- src/devices/sound/swp20.cpp | 2 +- src/devices/sound/swp20.h | 2 +- src/devices/sound/swp30.cpp | 2 +- src/devices/sound/swp30.h | 2 +- src/devices/sound/t6721a.cpp | 2 +- src/devices/sound/t6721a.h | 2 +- src/devices/sound/t6w28.cpp | 2 +- src/devices/sound/t6w28.h | 2 +- src/devices/sound/ta7630.cpp | 2 +- src/devices/sound/ta7630.h | 2 +- src/devices/sound/tc8830f.cpp | 2 +- src/devices/sound/tc8830f.h | 2 +- src/devices/sound/tiaintf.cpp | 2 +- src/devices/sound/tiaintf.h | 2 +- src/devices/sound/tms3615.cpp | 2 +- src/devices/sound/tms3615.h | 2 +- src/devices/sound/tms36xx.cpp | 2 +- src/devices/sound/tms36xx.h | 2 +- src/devices/sound/tms5110.cpp | 22 +-- src/devices/sound/tms5110.h | 22 +-- src/devices/sound/tms5220.cpp | 12 +- src/devices/sound/tms5220.h | 12 +- src/devices/sound/tt5665.cpp | 2 +- src/devices/sound/tt5665.h | 4 +- src/devices/sound/uda1344.cpp | 2 +- src/devices/sound/uda1344.h | 2 +- src/devices/sound/upd1771.cpp | 2 +- src/devices/sound/upd1771.h | 2 +- src/devices/sound/upd7752.cpp | 2 +- src/devices/sound/upd7752.h | 2 +- src/devices/sound/upd7759.cpp | 10 +- src/devices/sound/upd7759.h | 12 +- src/devices/sound/upd934g.cpp | 2 +- src/devices/sound/upd934g.h | 2 +- src/devices/sound/vgm_visualizer.cpp | 2 +- src/devices/sound/vgm_visualizer.h | 6 +- src/devices/sound/vlm5030.cpp | 2 +- src/devices/sound/vlm5030.h | 2 +- src/devices/sound/votrax.cpp | 2 +- src/devices/sound/votrax.h | 2 +- src/devices/sound/vrc6.cpp | 2 +- src/devices/sound/vrc6.h | 2 +- src/devices/sound/vrender0.cpp | 2 +- src/devices/sound/vrender0.h | 2 +- src/devices/sound/wave.cpp | 2 +- src/devices/sound/wave.h | 4 +- src/devices/sound/x1_010.cpp | 2 +- src/devices/sound/x1_010.h | 2 +- src/devices/sound/xt446.cpp | 2 +- src/devices/sound/xt446.h | 2 +- src/devices/sound/ym2154.cpp | 2 +- src/devices/sound/ym2154.h | 2 +- src/devices/sound/ymf271.cpp | 2 +- src/devices/sound/ymf271.h | 2 +- src/devices/sound/ymfm_mame.h | 10 +- src/devices/sound/ymopl.cpp | 18 +- src/devices/sound/ymopl.h | 18 +- src/devices/sound/ymopm.cpp | 4 +- src/devices/sound/ymopm.h | 4 +- src/devices/sound/ymopn.cpp | 16 +- src/devices/sound/ymopn.h | 16 +- src/devices/sound/ymopq.cpp | 4 +- src/devices/sound/ymopq.h | 4 +- src/devices/sound/ymopz.cpp | 2 +- src/devices/sound/ymopz.h | 2 +- src/devices/sound/ymz280b.cpp | 6 +- src/devices/sound/ymz280b.h | 4 +- src/devices/sound/ymz770.cpp | 6 +- src/devices/sound/ymz770.h | 6 +- src/devices/sound/zsg2.cpp | 2 +- src/devices/sound/zsg2.h | 2 +- src/devices/video/315_5124.cpp | 12 +- src/devices/video/315_5124.h | 14 +- src/devices/video/315_5313.cpp | 2 +- src/devices/video/315_5313.h | 4 +- src/devices/video/am8052.cpp | 2 +- src/devices/video/am8052.h | 2 +- src/devices/video/avgdvg.cpp | 20 +- src/devices/video/avgdvg.h | 18 +- src/devices/video/bt431.cpp | 2 +- src/devices/video/bt431.h | 2 +- src/devices/video/bt459.cpp | 2 +- src/devices/video/bt459.h | 2 +- src/devices/video/bt45x.cpp | 22 +-- src/devices/video/bt45x.h | 22 +-- src/devices/video/bt47x.cpp | 14 +- src/devices/video/bt47x.h | 14 +- src/devices/video/bufsprite.cpp | 10 +- src/devices/video/bufsprite.h | 10 +- src/devices/video/catseye.cpp | 4 +- src/devices/video/catseye.h | 4 +- src/devices/video/cdp1861.cpp | 2 +- src/devices/video/cdp1861.h | 2 +- src/devices/video/cdp1862.cpp | 2 +- src/devices/video/cdp1862.h | 2 +- src/devices/video/cesblit.cpp | 2 +- src/devices/video/cesblit.h | 4 +- src/devices/video/clgd542x.cpp | 8 +- src/devices/video/clgd542x.h | 8 +- src/devices/video/crt9007.cpp | 2 +- src/devices/video/crt9007.h | 2 +- src/devices/video/crt9021.cpp | 2 +- src/devices/video/crt9021.h | 2 +- src/devices/video/crt9028.cpp | 4 +- src/devices/video/crt9028.h | 4 +- src/devices/video/crt9212.cpp | 2 +- src/devices/video/crt9212.h | 2 +- src/devices/video/crtc_ega.cpp | 2 +- src/devices/video/crtc_ega.h | 2 +- src/devices/video/decsfb.cpp | 2 +- src/devices/video/decsfb.h | 2 +- src/devices/video/dl1416.cpp | 10 +- src/devices/video/dl1416.h | 4 +- src/devices/video/dm9368.cpp | 2 +- src/devices/video/dm9368.h | 2 +- src/devices/video/dp8350.cpp | 14 +- src/devices/video/dp8350.h | 8 +- src/devices/video/dp8510.cpp | 2 +- src/devices/video/dp8510.h | 2 +- src/devices/video/ef9340_1.cpp | 2 +- src/devices/video/ef9340_1.h | 4 +- src/devices/video/ef9345.cpp | 6 +- src/devices/video/ef9345.h | 6 +- src/devices/video/ef9364.cpp | 2 +- src/devices/video/ef9364.h | 2 +- src/devices/video/ef9365.cpp | 2 +- src/devices/video/ef9365.h | 2 +- src/devices/video/ef9369.cpp | 2 +- src/devices/video/ef9369.h | 2 +- src/devices/video/epic12.cpp | 2 +- src/devices/video/epic12.h | 2 +- src/devices/video/fixfreq.cpp | 6 +- src/devices/video/fixfreq.h | 12 +- src/devices/video/gb_lcd.cpp | 10 +- src/devices/video/gb_lcd.h | 18 +- src/devices/video/gba_lcd.cpp | 2 +- src/devices/video/gba_lcd.h | 2 +- src/devices/video/gf4500.cpp | 2 +- src/devices/video/gf4500.h | 2 +- src/devices/video/gf7600gs.cpp | 2 +- src/devices/video/gf7600gs.h | 4 +- src/devices/video/hd44102.cpp | 2 +- src/devices/video/hd44102.h | 2 +- src/devices/video/hd44352.cpp | 2 +- src/devices/video/hd44352.h | 2 +- src/devices/video/hd44780.cpp | 8 +- src/devices/video/hd44780.h | 8 +- src/devices/video/hd61202.cpp | 2 +- src/devices/video/hd61202.h | 2 +- src/devices/video/hd61603.cpp | 2 +- src/devices/video/hd61603.h | 2 +- src/devices/video/hd61830.cpp | 2 +- src/devices/video/hd61830.h | 2 +- src/devices/video/hd63484.cpp | 2 +- src/devices/video/hd63484.h | 2 +- src/devices/video/hd66421.cpp | 2 +- src/devices/video/hd66421.h | 2 +- src/devices/video/hlcd0438.cpp | 2 +- src/devices/video/hlcd0438.h | 2 +- src/devices/video/hlcd0488.cpp | 2 +- src/devices/video/hlcd0488.h | 2 +- src/devices/video/hlcd0515.cpp | 10 +- src/devices/video/hlcd0515.h | 10 +- src/devices/video/hlcd0538.cpp | 8 +- src/devices/video/hlcd0538.h | 6 +- src/devices/video/hp1ll3.cpp | 2 +- src/devices/video/hp1ll3.h | 2 +- src/devices/video/huc6202.cpp | 2 +- src/devices/video/huc6202.h | 2 +- src/devices/video/huc6260.cpp | 2 +- src/devices/video/huc6260.h | 2 +- src/devices/video/huc6261.cpp | 2 +- src/devices/video/huc6261.h | 2 +- src/devices/video/huc6270.cpp | 2 +- src/devices/video/huc6270.h | 2 +- src/devices/video/huc6271.cpp | 2 +- src/devices/video/huc6271.h | 2 +- src/devices/video/huc6272.cpp | 2 +- src/devices/video/huc6272.h | 2 +- src/devices/video/i8244.cpp | 6 +- src/devices/video/i8244.h | 6 +- src/devices/video/i82730.cpp | 2 +- src/devices/video/i82730.h | 4 +- src/devices/video/i8275.cpp | 6 +- src/devices/video/i8275.h | 6 +- src/devices/video/imagetek_i4100.cpp | 8 +- src/devices/video/imagetek_i4100.h | 8 +- src/devices/video/ims_cvc.cpp | 12 +- src/devices/video/ims_cvc.h | 10 +- src/devices/video/jangou_blitter.cpp | 2 +- src/devices/video/jangou_blitter.h | 2 +- src/devices/video/k051316.cpp | 2 +- src/devices/video/k051316.h | 2 +- src/devices/video/k053936.cpp | 2 +- src/devices/video/k053936.h | 2 +- src/devices/video/lc7582.cpp | 2 +- src/devices/video/lc7582.h | 2 +- src/devices/video/lc7985.cpp | 2 +- src/devices/video/lc7985.h | 2 +- src/devices/video/m50458.cpp | 2 +- src/devices/video/m50458.h | 4 +- src/devices/video/mb88303.cpp | 2 +- src/devices/video/mb88303.h | 2 +- src/devices/video/mb90082.cpp | 2 +- src/devices/video/mb90082.h | 2 +- src/devices/video/mb_vcu.cpp | 2 +- src/devices/video/mb_vcu.h | 2 +- src/devices/video/mc6845.cpp | 28 +-- src/devices/video/mc6845.h | 28 +-- src/devices/video/mc6847.cpp | 20 +- src/devices/video/mc6847.h | 20 +- src/devices/video/md4330b.cpp | 6 +- src/devices/video/md4330b.h | 6 +- src/devices/video/mga2064w.cpp | 2 +- src/devices/video/mga2064w.h | 2 +- src/devices/video/mm5445.cpp | 10 +- src/devices/video/mm5445.h | 10 +- src/devices/video/mos6566.cpp | 22 +-- src/devices/video/mos6566.h | 20 +- src/devices/video/msm6222b.cpp | 6 +- src/devices/video/msm6222b.h | 6 +- src/devices/video/msm6255.cpp | 2 +- src/devices/video/msm6255.h | 2 +- src/devices/video/nereid.cpp | 4 +- src/devices/video/nereid.h | 4 +- src/devices/video/nt7534.cpp | 4 +- src/devices/video/nt7534.h | 4 +- src/devices/video/pc_vga.cpp | 36 ++-- src/devices/video/pc_vga.h | 30 +-- src/devices/video/pcd8544.cpp | 2 +- src/devices/video/pcd8544.h | 2 +- src/devices/video/pcf2100.cpp | 10 +- src/devices/video/pcf2100.h | 10 +- src/devices/video/ppu2c0x.cpp | 26 +-- src/devices/video/ppu2c0x.h | 26 +-- src/devices/video/ppu2c0x_sh6578.cpp | 6 +- src/devices/video/ppu2c0x_sh6578.h | 6 +- src/devices/video/ppu2c0x_vt.cpp | 6 +- src/devices/video/ppu2c0x_vt.h | 6 +- src/devices/video/ps2gif.cpp | 2 +- src/devices/video/ps2gif.h | 4 +- src/devices/video/ps2gs.cpp | 2 +- src/devices/video/ps2gs.h | 4 +- src/devices/video/psx.cpp | 28 +-- src/devices/video/psx.h | 28 +-- src/devices/video/pwm.cpp | 2 +- src/devices/video/pwm.h | 2 +- src/devices/video/ramdac.cpp | 2 +- src/devices/video/ramdac.h | 6 +- src/devices/video/saa5050.cpp | 18 +- src/devices/video/saa5050.h | 18 +- src/devices/video/saa5240.cpp | 8 +- src/devices/video/saa5240.h | 10 +- src/devices/video/scn2674.cpp | 6 +- src/devices/video/scn2674.h | 6 +- src/devices/video/sda5708.cpp | 2 +- src/devices/video/sda5708.h | 2 +- src/devices/video/sed1200.cpp | 10 +- src/devices/video/sed1200.h | 10 +- src/devices/video/sed1330.cpp | 4 +- src/devices/video/sed1330.h | 2 +- src/devices/video/sed1356.cpp | 2 +- src/devices/video/sed1356.h | 2 +- src/devices/video/sed1500.cpp | 10 +- src/devices/video/sed1500.h | 10 +- src/devices/video/sed1520.cpp | 10 +- src/devices/video/sed1520.h | 10 +- src/devices/video/snes_ppu.cpp | 2 +- src/devices/video/snes_ppu.h | 2 +- src/devices/video/sprite.h | 2 +- src/devices/video/t6963c.cpp | 6 +- src/devices/video/t6963c.h | 4 +- src/devices/video/t6a04.cpp | 2 +- src/devices/video/t6a04.h | 2 +- src/devices/video/tea1002.cpp | 2 +- src/devices/video/tea1002.h | 2 +- src/devices/video/tlc34076.cpp | 2 +- src/devices/video/tlc34076.h | 4 +- src/devices/video/tmap038.cpp | 2 +- src/devices/video/tmap038.h | 7 +- src/devices/video/tms34061.cpp | 2 +- src/devices/video/tms34061.h | 2 +- src/devices/video/tms3556.cpp | 2 +- src/devices/video/tms3556.h | 2 +- src/devices/video/tms9927.cpp | 16 +- src/devices/video/tms9927.h | 10 +- src/devices/video/tms9928a.cpp | 20 +- src/devices/video/tms9928a.h | 20 +- src/devices/video/topcat.cpp | 4 +- src/devices/video/topcat.h | 4 +- src/devices/video/upd3301.cpp | 2 +- src/devices/video/upd3301.h | 2 +- src/devices/video/upd7220.cpp | 2 +- src/devices/video/upd7220.h | 2 +- src/devices/video/upd7227.cpp | 2 +- src/devices/video/upd7227.h | 4 +- src/devices/video/v9938.cpp | 6 +- src/devices/video/v9938.h | 6 +- src/devices/video/vector.cpp | 2 +- src/devices/video/vector.h | 2 +- src/devices/video/vic4567.cpp | 2 +- src/devices/video/vic4567.h | 2 +- src/devices/video/virge_pci.cpp | 10 +- src/devices/video/virge_pci.h | 10 +- src/devices/video/voodoo.cpp | 6 +- src/devices/video/voodoo.h | 8 +- src/devices/video/voodoo_2.cpp | 2 +- src/devices/video/voodoo_2.h | 6 +- src/devices/video/voodoo_banshee.cpp | 4 +- src/devices/video/voodoo_banshee.h | 10 +- src/devices/video/voodoo_pci.cpp | 10 +- src/devices/video/voodoo_pci.h | 26 +-- src/devices/video/vrender0.cpp | 2 +- src/devices/video/vrender0.h | 2 +- src/devices/video/x1_001.cpp | 2 +- src/devices/video/x1_001.h | 4 +- src/devices/video/zeus2.cpp | 2 +- src/devices/video/zeus2.h | 2 +- src/emu/devcpu.cpp | 2 +- src/emu/devcpu.h | 2 +- src/emu/device.cpp | 18 +- src/emu/device.h | 36 ++-- src/emu/device.ipp | 2 +- src/emu/diexec.cpp | 10 +- src/emu/diserial.h | 9 +- src/emu/dislot.h | 11 +- src/emu/disound.cpp | 4 +- src/emu/disound.h | 4 +- src/emu/drawgfx.cpp | 2 +- src/emu/drawgfx.h | 4 +- src/emu/driver.cpp | 2 +- src/emu/drivers/testcpu.cpp | 2 +- src/emu/emupal.cpp | 4 +- src/emu/emupal.h | 6 +- src/emu/machine.h | 2 +- src/emu/mconfig.cpp | 8 +- src/emu/mconfig.h | 20 +- src/emu/recording.cpp | 4 +- src/emu/save.h | 37 ++++ src/emu/screen.cpp | 2 +- src/emu/screen.h | 14 +- src/emu/softlist_dev.cpp | 2 +- src/emu/softlist_dev.h | 2 +- src/emu/sound.cpp | 76 ++++--- src/emu/sound.h | 62 +++--- src/emu/speaker.cpp | 4 +- src/emu/speaker.h | 4 +- src/emu/tilemap.cpp | 2 +- src/emu/tilemap.h | 8 +- src/emu/validity.cpp | 6 +- src/emu/xtal.cpp | 6 + src/emu/xtal.h | 41 +++- src/frontend/mame/clifront.cpp | 6 +- src/frontend/mame/infoxml.cpp | 10 +- src/frontend/mame/luaengine.cpp | 2 +- src/frontend/mame/media_ident.cpp | 2 +- src/frontend/mame/ui/devopt.cpp | 10 +- src/frontend/mame/ui/info.cpp | 8 +- src/frontend/mame/ui/ui.cpp | 2 +- src/mame/acorn/aa310.cpp | 10 +- src/mame/acorn/accomm.cpp | 6 +- src/mame/acorn/acrnsys.cpp | 16 +- src/mame/acorn/acrnsys1.cpp | 2 +- src/mame/acorn/aristmk5.cpp | 4 +- src/mame/acorn/atom.cpp | 2 +- src/mame/acorn/bbc.cpp | 14 +- src/mame/acorn/cms.cpp | 2 +- src/mame/acorn/electron.cpp | 2 +- src/mame/acorn/upd65031.cpp | 4 +- src/mame/acorn/upd65031.h | 2 +- src/mame/acorn/z88_impexp.cpp | 4 +- src/mame/acorn/z88_impexp.h | 2 +- src/mame/act/apricot.cpp | 8 +- src/mame/act/apricotf.cpp | 10 +- src/mame/act/apricotkb.cpp | 2 +- src/mame/act/apricotkb.h | 2 +- src/mame/act/apricotp.cpp | 18 +- src/mame/act/apxen.cpp | 22 +-- src/mame/act/victor9k.cpp | 12 +- src/mame/act/victor9k_fdc.cpp | 4 +- src/mame/act/victor9k_fdc.h | 2 +- src/mame/act/victor9k_kb.cpp | 2 +- src/mame/act/victor9k_kb.h | 2 +- src/mame/adc/superslave.cpp | 2 +- src/mame/adp/adp.cpp | 10 +- src/mame/adp/stellafr.cpp | 6 +- src/mame/agat/agat.cpp | 8 +- src/mame/agat/agat7.cpp | 2 +- src/mame/agat/agat7.h | 4 +- src/mame/agat/agat9.cpp | 2 +- src/mame/agat/agat9.h | 4 +- src/mame/agat/agatkeyb.cpp | 4 +- src/mame/agat/agatkeyb.h | 4 +- src/mame/akai/akaiax80.cpp | 14 +- src/mame/akai/mpc3000.cpp | 2 +- src/mame/akai/mpc60.cpp | 2 +- src/mame/alba/rmhaihai.cpp | 6 +- src/mame/alesis/alesis.cpp | 2 +- src/mame/alesis/alesis.h | 2 +- src/mame/alesis/alesis_a.cpp | 4 +- src/mame/alliedleisure/aleisttl.cpp | 4 +- src/mame/alliedleisure/clayshoo.cpp | 2 +- src/mame/alpha/ad_sound.cpp | 18 +- src/mame/alpha/ad_sound.h | 4 +- src/mame/alpha/alpha68k.cpp | 10 +- src/mame/alpha/alpha68k_n.cpp | 22 +-- src/mame/alpha/alpha8201.cpp | 2 +- src/mame/alpha/alpha8201.h | 2 +- src/mame/alpha/champbas.cpp | 10 +- src/mame/alpha/equites.cpp | 4 +- src/mame/alpha/meijinsn.cpp | 6 +- src/mame/altos/acs8600_ics.cpp | 2 +- src/mame/altos/acs8600_ics.h | 2 +- src/mame/altos/altos2.cpp | 2 +- src/mame/altos/altos486.cpp | 6 +- src/mame/altos/altos8600.cpp | 16 +- src/mame/amiga/alg.cpp | 2 +- src/mame/amiga/amiga.cpp | 18 +- src/mame/amiga/amiga_m.cpp | 4 +- src/mame/amiga/cubo.cpp | 6 +- src/mame/ampro/lbpc.cpp | 2 +- src/mame/amstrad/ams40041.cpp | 2 +- src/mame/amstrad/ams40041.h | 2 +- src/mame/amstrad/amstr_pc.cpp | 16 +- src/mame/amstrad/nc.cpp | 12 +- src/mame/amstrad/pc1512.cpp | 24 +-- src/mame/amstrad/pc1512kb.cpp | 2 +- src/mame/amstrad/pc1512kb.h | 2 +- src/mame/amstrad/pcw.cpp | 10 +- src/mame/amstrad/pcw16.cpp | 4 +- src/mame/apf/apf.cpp | 6 +- src/mame/apollo/apollo.cpp | 38 ++-- src/mame/apollo/apollo.h | 12 +- src/mame/apollo/apollo_kbd.cpp | 8 +- src/mame/apollo/apollo_kbd.h | 2 +- src/mame/apollo/apollo_m.cpp | 44 ++--- src/mame/apollo/apollo_v.cpp | 10 +- src/mame/apple/adbmodem.cpp | 2 +- src/mame/apple/adbmodem.h | 4 +- src/mame/apple/apple1.cpp | 8 +- src/mame/apple/apple2.cpp | 12 +- src/mame/apple/apple2common.cpp | 2 +- src/mame/apple/apple2common.h | 2 +- src/mame/apple/apple2e.cpp | 66 +++---- src/mame/apple/apple2gs.cpp | 18 +- src/mame/apple/apple2video.cpp | 2 +- src/mame/apple/apple2video.h | 2 +- src/mame/apple/apple3.cpp | 12 +- src/mame/apple/cuda.cpp | 2 +- src/mame/apple/cuda.h | 4 +- src/mame/apple/egret.cpp | 2 +- src/mame/apple/egret.h | 4 +- src/mame/apple/iphone2g.cpp | 16 +- src/mame/apple/lisa.cpp | 10 +- src/mame/apple/lwriter.cpp | 4 +- src/mame/apple/mac.cpp | 14 +- src/mame/apple/mac128.cpp | 6 +- src/mame/apple/mac_m.cpp | 4 +- src/mame/apple/macadb.cpp | 2 +- src/mame/apple/macadb.h | 2 +- src/mame/apple/maciivx.cpp | 4 +- src/mame/apple/maclc.cpp | 2 +- src/mame/apple/maclc3.cpp | 8 +- src/mame/apple/macpci.cpp | 8 +- src/mame/apple/macpci.h | 2 +- src/mame/apple/macpdm.cpp | 4 +- src/mame/apple/macpwrbk030.cpp | 15 +- src/mame/apple/macquadra700.cpp | 4 +- src/mame/apple/macrtc.cpp | 2 +- src/mame/apple/macrtc.h | 2 +- src/mame/apple/macscsi.cpp | 2 +- src/mame/apple/macscsi.h | 2 +- src/mame/apple/newton.cpp | 4 +- src/mame/apple/sonora.cpp | 10 +- src/mame/apple/sonora.h | 7 +- src/mame/apple/superga2.cpp | 4 +- src/mame/apple/tk2000.cpp | 2 +- src/mame/apple/v8.cpp | 18 +- src/mame/apple/v8.h | 8 +- src/mame/apple/vasp.cpp | 12 +- src/mame/apple/vasp.h | 7 +- src/mame/appliedconcepts/borisdpl.cpp | 4 +- src/mame/arcadia/arcadia.cpp | 2 +- src/mame/arcadia/arcadia_a.cpp | 6 +- src/mame/arcadia/arcadia_a.h | 2 +- src/mame/aristocrat/aristmk4.cpp | 2 +- src/mame/aristocrat/caswin.cpp | 4 +- src/mame/atari/a2600.cpp | 4 +- src/mame/atari/a7800.cpp | 10 +- src/mame/atari/akkaarrh.cpp | 4 +- src/mame/atari/antic.cpp | 2 +- src/mame/atari/antic.h | 2 +- src/mame/atari/arcadecl.cpp | 2 +- src/mame/atari/asic65.cpp | 4 +- src/mame/atari/asic65.h | 6 +- src/mame/atari/asteroid.cpp | 2 +- src/mame/atari/atari400.cpp | 18 +- src/mame/atari/atarifdc.cpp | 4 +- src/mame/atari/atarifdc.h | 2 +- src/mame/atari/atarig1.cpp | 24 +-- src/mame/atari/atarig42.cpp | 10 +- src/mame/atari/atarigt.cpp | 4 +- src/mame/atari/atarigx2.cpp | 10 +- src/mame/atari/atarijsa.cpp | 14 +- src/mame/atari/atarijsa.h | 14 +- src/mame/atari/atarimo.cpp | 2 +- src/mame/atari/atarimo.h | 6 +- src/mame/atari/atarirle.cpp | 2 +- src/mame/atari/atarirle.h | 6 +- src/mame/atari/atarisac.cpp | 2 +- src/mame/atari/atarisac.h | 2 +- src/mame/atari/atariscom.cpp | 2 +- src/mame/atari/atariscom.h | 4 +- src/mame/atari/atarist.cpp | 8 +- src/mame/atari/atarist_v.cpp | 6 +- src/mame/atari/atarist_v.h | 6 +- src/mame/atari/ataristb.cpp | 2 +- src/mame/atari/ataristb.h | 2 +- src/mame/atari/atarisy1.cpp | 14 +- src/mame/atari/atarisy2.cpp | 12 +- src/mame/atari/atarisy4.cpp | 8 +- src/mame/atari/atarittl.cpp | 22 +-- src/mame/atari/atarivad.cpp | 2 +- src/mame/atari/atarivad.h | 6 +- src/mame/atari/atarixga.cpp | 4 +- src/mame/atari/atarixga.h | 6 +- src/mame/atari/atetris.cpp | 2 +- src/mame/atari/badlands.cpp | 2 +- src/mame/atari/badlandsbl.cpp | 2 +- src/mame/atari/bartop52.cpp | 4 +- src/mame/atari/batman.cpp | 6 +- src/mame/atari/beathead.cpp | 2 +- src/mame/atari/blstroid.cpp | 4 +- src/mame/atari/bwidow.cpp | 4 +- src/mame/atari/bzone.cpp | 8 +- src/mame/atari/ccastles.cpp | 2 +- src/mame/atari/centiped.cpp | 20 +- src/mame/atari/cloak.cpp | 4 +- src/mame/atari/cloud9.cpp | 4 +- src/mame/atari/cops.cpp | 2 +- src/mame/atari/cyberbal.cpp | 10 +- src/mame/atari/cybstorm.cpp | 6 +- src/mame/atari/destroyr.cpp | 2 +- src/mame/atari/eprom.cpp | 12 +- src/mame/atari/firefox.cpp | 2 +- src/mame/atari/flyball.cpp | 2 +- src/mame/atari/gauntlet.cpp | 10 +- src/mame/atari/gtia.cpp | 2 +- src/mame/atari/gtia.h | 2 +- src/mame/atari/gumrally.cpp | 6 +- src/mame/atari/harddriv.cpp | 102 +++++----- src/mame/atari/harddriv.h | 40 ++-- src/mame/atari/harddriv_a.cpp | 6 +- src/mame/atari/hitparade.cpp | 2 +- src/mame/atari/jag_blitter.cpp | 2 +- src/mame/atari/jag_blitter.h | 2 +- src/mame/atari/jaguar.cpp | 10 +- src/mame/atari/klax.cpp | 6 +- src/mame/atari/liberatr.cpp | 2 +- src/mame/atari/marblmd2.cpp | 6 +- src/mame/atari/maria.cpp | 2 +- src/mame/atari/maria.h | 2 +- src/mame/atari/mathbox.cpp | 2 +- src/mame/atari/mathbox.h | 2 +- src/mame/atari/maxaflex.cpp | 8 +- src/mame/atari/mediagx.cpp | 6 +- src/mame/atari/metalmx.cpp | 8 +- src/mame/atari/mgolf.cpp | 2 +- src/mame/atari/mhavoc.cpp | 2 +- src/mame/atari/mhavoc.h | 2 +- src/mame/atari/offtwall.cpp | 6 +- src/mame/atari/pofo_kbd.cpp | 2 +- src/mame/atari/pofo_kbd.h | 2 +- src/mame/atari/pong.cpp | 50 ++--- src/mame/atari/poolshrk.cpp | 2 +- src/mame/atari/quantum.cpp | 6 +- src/mame/atari/quizshow.cpp | 2 +- src/mame/atari/rampart.cpp | 4 +- src/mame/atari/redbaron.cpp | 6 +- src/mame/atari/redbaron.h | 2 +- src/mame/atari/relief.cpp | 4 +- src/mame/atari/runaway.cpp | 6 +- src/mame/atari/sbrkout.cpp | 2 +- src/mame/atari/shuuz.cpp | 4 +- src/mame/atari/skullxbo.cpp | 4 +- src/mame/atari/skyraid.cpp | 2 +- src/mame/atari/slapstic.cpp | 2 +- src/mame/atari/slapstic.h | 4 +- src/mame/atari/sprint4.cpp | 2 +- src/mame/atari/sprint8.cpp | 2 +- src/mame/atari/starshp1.h | 2 +- src/mame/atari/starshp1_a.cpp | 2 +- src/mame/atari/starwars.cpp | 6 +- src/mame/atari/starwars_m.cpp | 2 +- src/mame/atari/subs.cpp | 2 +- src/mame/atari/tank8.cpp | 2 +- src/mame/atari/tempest.cpp | 4 +- src/mame/atari/thunderj.cpp | 6 +- src/mame/atari/tia.cpp | 6 +- src/mame/atari/tia.h | 14 +- src/mame/atari/tomcat.cpp | 8 +- src/mame/atari/toobin.cpp | 4 +- src/mame/atari/tourtabl.cpp | 2 +- src/mame/atari/triplhnt.cpp | 2 +- src/mame/atari/videopin.cpp | 2 +- src/mame/atari/vindictr.cpp | 4 +- src/mame/atari/wolfpack.cpp | 4 +- src/mame/atari/xybots.cpp | 6 +- src/mame/atlus/bowltry.cpp | 4 +- src/mame/atlus/ohmygod.cpp | 4 +- src/mame/atlus/patapata.cpp | 2 +- src/mame/att/att3b2.cpp | 10 +- src/mame/att/att4425.cpp | 8 +- src/mame/att/att610.cpp | 2 +- src/mame/att/unixpc.cpp | 4 +- src/mame/ausnz/amust.cpp | 14 +- src/mame/ausnz/applix.cpp | 6 +- src/mame/ausnz/aussiebyte.cpp | 4 +- src/mame/ausnz/binbug.cpp | 4 +- src/mame/ausnz/d6800.cpp | 6 +- src/mame/ausnz/datum.cpp | 6 +- src/mame/ausnz/dg680.cpp | 6 +- src/mame/ausnz/dmax8000.cpp | 14 +- src/mame/ausnz/eacc.cpp | 10 +- src/mame/ausnz/eti660.cpp | 2 +- src/mame/ausnz/excali64.cpp | 8 +- src/mame/ausnz/magnum.cpp | 10 +- src/mame/ausnz/mbee_m.cpp | 2 +- src/mame/ausnz/pegasus.cpp | 4 +- src/mame/ausnz/poly.cpp | 14 +- src/mame/ausnz/proteus.cpp | 10 +- src/mame/ausnz/super80.cpp | 4 +- src/mame/ausnz/tec1.cpp | 6 +- src/mame/banctec/banctec.cpp | 2 +- src/mame/bandai/wswan_v.cpp | 2 +- src/mame/bandai/wswan_v.h | 2 +- src/mame/barcrest/mpu1.cpp | 8 +- src/mame/barcrest/mpu2.cpp | 2 +- src/mame/barcrest/mpu3.cpp | 16 +- src/mame/barcrest/mpu4.cpp | 37 ++-- src/mame/barcrest/mpu4.h | 4 +- src/mame/barcrest/mpu4_characteriser_bootleg.cpp | 6 +- src/mame/barcrest/mpu4_characteriser_bootleg.h | 6 +- src/mame/barcrest/mpu4_characteriser_pal.cpp | 4 +- src/mame/barcrest/mpu4_characteriser_pal.h | 4 +- src/mame/barcrest/mpu4_characteriser_pal_bwb.cpp | 4 +- src/mame/barcrest/mpu4_characteriser_pal_bwb.h | 4 +- src/mame/barcrest/mpu4bwb.cpp | 4 +- src/mame/barcrest/mpu4mod2sw.cpp | 8 +- src/mame/barcrest/mpu4mod4yam.cpp | 4 +- src/mame/barcrest/mpu4plasma.cpp | 4 +- src/mame/barcrest/mpu4redpoint.cpp | 2 +- src/mame/barcrest/mpu4vid.cpp | 29 ++- src/mame/barcrest/mpu5.cpp | 2 +- src/mame/be/bebox.cpp | 38 ++-- src/mame/be/bebox.h | 2 +- src/mame/beehive/microb.cpp | 14 +- src/mame/bfm/bfcobra.cpp | 26 +-- src/mame/bfm/bfm_ad5.cpp | 4 +- src/mame/bfm/bfm_adr2.cpp | 2 +- src/mame/bfm/bfm_adr2.h | 2 +- src/mame/bfm/bfm_bd1.cpp | 2 +- src/mame/bfm/bfm_bd1.h | 4 +- src/mame/bfm/bfm_bda.cpp | 2 +- src/mame/bfm/bfm_bda.h | 4 +- src/mame/bfm/bfm_dm01.cpp | 4 +- src/mame/bfm/bfm_dm01.h | 2 +- src/mame/bfm/bfm_sc1.cpp | 6 +- src/mame/bfm/bfm_sc2.cpp | 18 +- src/mame/bfm/bfm_sc4.cpp | 14 +- src/mame/bfm/bfm_sc5.cpp | 12 +- src/mame/bfm/bfm_swp.cpp | 4 +- src/mame/bfm/bfmsys83.cpp | 4 +- src/mame/bfm/bfmsys85.cpp | 6 +- src/mame/bfm/rastersp.cpp | 24 +-- src/mame/bitcorp/gamate.cpp | 6 +- src/mame/bitcorp/gamate_v.cpp | 2 +- src/mame/bitcorp/gamate_v.h | 2 +- src/mame/bmc/bmcbowl.cpp | 4 +- src/mame/bmc/bmcpokr.cpp | 6 +- src/mame/bmc/koftball.cpp | 4 +- src/mame/bondwell/bw12.cpp | 6 +- src/mame/bondwell/bw2.cpp | 4 +- src/mame/booth/apexc.cpp | 2 +- src/mame/booth/apexc_m.cpp | 6 +- src/mame/booth/apexc_m.h | 11 +- src/mame/camputers/camplynx.cpp | 2 +- src/mame/canon/x07.cpp | 4 +- src/mame/capcom/bionicc.cpp | 2 +- src/mame/capcom/cbasebal.cpp | 6 +- src/mame/capcom/commando.cpp | 2 +- src/mame/capcom/cps1.cpp | 2 +- src/mame/capcom/cps1bl_5205.cpp | 28 +-- src/mame/capcom/cps1bl_pic.cpp | 24 +-- src/mame/capcom/cps2.cpp | 2 +- src/mame/capcom/cps2comm.cpp | 2 +- src/mame/capcom/cps2comm.h | 2 +- src/mame/capcom/cps3.cpp | 4 +- src/mame/capcom/cps3_a.cpp | 2 +- src/mame/capcom/cps3_a.h | 2 +- src/mame/capcom/egghunt.cpp | 6 +- src/mame/capcom/fcrash.cpp | 34 ++-- src/mame/capcom/instantm.cpp | 4 +- src/mame/capcom/lastduel.cpp | 2 +- src/mame/capcom/mitchell.cpp | 18 +- src/mame/capcom/psrockman.cpp | 2 +- src/mame/capcom/sf.cpp | 4 +- src/mame/capcom/sidearms.cpp | 14 +- src/mame/capcom/supduck.cpp | 4 +- src/mame/capcom/tigeroad.cpp | 22 +-- src/mame/capcom/tigeroad_spr.cpp | 2 +- src/mame/capcom/tigeroad_spr.h | 2 +- src/mame/capcom/tvcapcom.cpp | 2 +- src/mame/casio/casloopy.cpp | 6 +- src/mame/casio/cfx9850.cpp | 2 +- src/mame/casio/ctk2000.cpp | 4 +- src/mame/casio/ctk551.cpp | 8 +- src/mame/casio/cz101.cpp | 2 +- src/mame/casio/fp1100.cpp | 2 +- src/mame/casio/fp6000.cpp | 14 +- src/mame/casio/fp6000_kbd.cpp | 2 +- src/mame/casio/fp6000_kbd.h | 2 +- src/mame/casio/ld50.cpp | 2 +- src/mame/casio/pb1000.cpp | 6 +- src/mame/casio/pv1000.cpp | 10 +- src/mame/casio/rz1.cpp | 6 +- src/mame/casio/sx1000.cpp | 18 +- src/mame/cce/mc1000.cpp | 4 +- src/mame/ceres/ceres.cpp | 10 +- src/mame/ces/cesclass.cpp | 4 +- src/mame/ces/galgames.cpp | 43 +++- src/mame/chess/cking_master.cpp | 2 +- src/mame/chess/compuchess.cpp | 12 +- src/mame/chess/conic_cchess2.cpp | 6 +- src/mame/chess/tasc.cpp | 2 +- src/mame/chess/yeno_532xl.cpp | 2 +- src/mame/chromatics/cgc7900.cpp | 8 +- src/mame/cinematronics/cchasm.cpp | 16 +- src/mame/cinematronics/cinemat.cpp | 30 +-- src/mame/cinematronics/cinemat_a.cpp | 40 ++-- src/mame/cinematronics/cinemat_a.h | 28 +-- src/mame/cinematronics/dlair.cpp | 12 +- src/mame/cinematronics/embargo.cpp | 2 +- src/mame/cinematronics/leland.cpp | 20 +- src/mame/cinematronics/leland_a.cpp | 48 ++--- src/mame/cinematronics/leland_a.h | 10 +- src/mame/cirsa/cirsa820xxx.cpp | 4 +- src/mame/cirsa/cirsa910510.cpp | 6 +- src/mame/citoh/cit101.cpp | 6 +- src/mame/citoh/cit101_kbd.cpp | 8 +- src/mame/citoh/cit101_kbd.h | 6 +- src/mame/citoh/cit220.cpp | 14 +- src/mame/citoh/cit220_kbd.cpp | 6 +- src/mame/citoh/cit220_kbd.h | 2 +- src/mame/coleco/adam.cpp | 2 +- src/mame/comad/funybubl.cpp | 6 +- src/mame/comad/galspnbl.cpp | 2 +- src/mame/comad/zerozone.cpp | 2 +- src/mame/commodore/cbm2.cpp | 42 ++-- src/mame/commodore/clcd.cpp | 8 +- src/mame/commodore/mps1230.cpp | 4 +- src/mame/commodore/pet.cpp | 6 +- src/mame/commodore/plus4.cpp | 10 +- src/mame/commodore/vic20.cpp | 8 +- src/mame/compugraphic/pwrview.cpp | 9 +- src/mame/comx/comx35.cpp | 2 +- src/mame/concept/concept.cpp | 2 +- src/mame/conitec/prof180x.cpp | 2 +- src/mame/conitec/prof80.cpp | 2 +- src/mame/conitec/prof80mmu.cpp | 2 +- src/mame/conitec/prof80mmu.h | 2 +- src/mame/cvs/cvs.cpp | 12 +- src/mame/cvs/galaxia.cpp | 8 +- src/mame/cvs/quasar.cpp | 12 +- src/mame/cxg/ch2001.cpp | 2 +- src/mame/cxg/dominator.cpp | 2 +- src/mame/cxg/scptchess.cpp | 2 +- src/mame/cxg/sphinx40.cpp | 6 +- src/mame/cybiko/cybiko.cpp | 2 +- src/mame/dai/dai.cpp | 6 +- src/mame/dai/dai_snd.cpp | 2 +- src/mame/dai/dai_snd.h | 2 +- src/mame/dataeast/actfancr.cpp | 16 +- src/mame/dataeast/backfire.cpp | 14 +- src/mame/dataeast/battlera.cpp | 2 +- src/mame/dataeast/boogwing.cpp | 12 +- src/mame/dataeast/bwing.cpp | 8 +- src/mame/dataeast/cbuster.cpp | 6 +- src/mame/dataeast/chanbara.cpp | 2 +- src/mame/dataeast/cninja.cpp | 60 +++--- src/mame/dataeast/cntsteer.cpp | 16 +- src/mame/dataeast/compgolf.cpp | 4 +- src/mame/dataeast/darkseal.cpp | 6 +- src/mame/dataeast/dassault.cpp | 8 +- src/mame/dataeast/dblewing.cpp | 6 +- src/mame/dataeast/dec0.cpp | 46 ++--- src/mame/dataeast/dec8.cpp | 96 ++++----- src/mame/dataeast/decbac06.cpp | 2 +- src/mame/dataeast/decbac06.h | 2 +- src/mame/dataeast/deckarn.cpp | 2 +- src/mame/dataeast/deckarn.h | 2 +- src/mame/dataeast/decmxc06.cpp | 2 +- src/mame/dataeast/decmxc06.h | 2 +- src/mame/dataeast/deco104.cpp | 2 +- src/mame/dataeast/deco104.h | 2 +- src/mame/dataeast/deco146.cpp | 4 +- src/mame/dataeast/deco146.h | 4 +- src/mame/dataeast/deco156.cpp | 18 +- src/mame/dataeast/deco16ic.cpp | 2 +- src/mame/dataeast/deco16ic.h | 2 +- src/mame/dataeast/deco222.cpp | 4 +- src/mame/dataeast/deco222.h | 4 +- src/mame/dataeast/deco32.cpp | 98 ++++----- src/mame/dataeast/deco_ace.cpp | 2 +- src/mame/dataeast/deco_ace.h | 2 +- src/mame/dataeast/deco_irq.cpp | 2 +- src/mame/dataeast/deco_irq.h | 2 +- src/mame/dataeast/deco_ld.cpp | 12 +- src/mame/dataeast/deco_mlc.cpp | 10 +- src/mame/dataeast/decocass.cpp | 2 +- src/mame/dataeast/decocass_tape.cpp | 2 +- src/mame/dataeast/decocass_tape.h | 2 +- src/mame/dataeast/decocomn.cpp | 2 +- src/mame/dataeast/decocomn.h | 2 +- src/mame/dataeast/decocpu6.cpp | 2 +- src/mame/dataeast/decocpu6.h | 2 +- src/mame/dataeast/decocpu7.cpp | 2 +- src/mame/dataeast/decocpu7.h | 2 +- src/mame/dataeast/decrmc3.cpp | 2 +- src/mame/dataeast/decrmc3.h | 6 +- src/mame/dataeast/deshoros.cpp | 2 +- src/mame/dataeast/dietgo.cpp | 6 +- src/mame/dataeast/dreambal.cpp | 8 +- src/mame/dataeast/exprraid.cpp | 2 +- src/mame/dataeast/firetrap.cpp | 6 +- src/mame/dataeast/funkyjet.cpp | 6 +- src/mame/dataeast/karnov.cpp | 6 +- src/mame/dataeast/kchamp.cpp | 6 +- src/mame/dataeast/kingobox.cpp | 28 +-- src/mame/dataeast/lemmings.cpp | 8 +- src/mame/dataeast/liberate.cpp | 22 +-- src/mame/dataeast/madmotor.cpp | 20 +- src/mame/dataeast/metlclsh.cpp | 8 +- src/mame/dataeast/mirage.cpp | 10 +- src/mame/dataeast/pcktgal.cpp | 14 +- src/mame/dataeast/pktgaldx.cpp | 12 +- src/mame/dataeast/rohga.cpp | 26 +-- src/mame/dataeast/simpl156.cpp | 4 +- src/mame/dataeast/sshangha.cpp | 8 +- src/mame/dataeast/stadhero.cpp | 6 +- src/mame/dataeast/supbtime.cpp | 4 +- src/mame/dataeast/thedeep.cpp | 6 +- src/mame/dataeast/tryout.cpp | 6 +- src/mame/dataeast/tumbleb.cpp | 24 +-- src/mame/dataeast/vaportra.cpp | 6 +- src/mame/ddr/ac1.cpp | 2 +- src/mame/ddr/c80.cpp | 2 +- src/mame/ddr/chessmstdm.cpp | 4 +- src/mame/ddr/huebler.cpp | 2 +- src/mame/ddr/k7659kb.cpp | 2 +- src/mame/ddr/k7659kb.h | 2 +- src/mame/ddr/kc.cpp | 2 +- src/mame/ddr/kc.h | 4 +- src/mame/ddr/kc_keyb.cpp | 2 +- src/mame/ddr/kc_keyb.h | 2 +- src/mame/ddr/kramermc.cpp | 4 +- src/mame/ddr/lc80.cpp | 8 +- src/mame/ddr/llc1.cpp | 2 +- src/mame/ddr/llc2.cpp | 4 +- src/mame/ddr/mc8030.cpp | 4 +- src/mame/ddr/nanos.cpp | 2 +- src/mame/ddr/pcm.cpp | 2 +- src/mame/ddr/slc1.cpp | 2 +- src/mame/ddr/vcs80.cpp | 4 +- src/mame/dec/dc305.cpp | 2 +- src/mame/dec/dc305.h | 2 +- src/mame/dec/dct11em.cpp | 12 +- src/mame/dec/dec_lk201.cpp | 6 +- src/mame/dec/dec_lk201.h | 2 +- src/mame/dec/decioga.cpp | 2 +- src/mame/dec/decioga.h | 2 +- src/mame/dec/decstation.cpp | 34 ++-- src/mame/dec/dectalk.cpp | 2 +- src/mame/dec/decwritr.cpp | 2 +- src/mame/dec/jensen.cpp | 4 +- src/mame/dec/pdp1.cpp | 12 +- src/mame/dec/pdp1.h | 8 +- src/mame/dec/pdp11.cpp | 6 +- src/mame/dec/rainbow.cpp | 14 +- src/mame/dec/rx01.cpp | 4 +- src/mame/dec/rx01.h | 2 +- src/mame/dec/vax11.cpp | 4 +- src/mame/dec/vk100.cpp | 4 +- src/mame/dec/vt100.cpp | 14 +- src/mame/dec/vt240.cpp | 10 +- src/mame/dec/vtvideo.cpp | 6 +- src/mame/dec/vtvideo.h | 6 +- src/mame/dg/aviion88k.cpp | 6 +- src/mame/dgrm/blackt96.cpp | 2 +- src/mame/dms/dms5000.cpp | 2 +- src/mame/dms/dms86.cpp | 2 +- src/mame/dooyong/dooyong.cpp | 18 +- src/mame/dooyong/dooyong_tilemap.cpp | 10 +- src/mame/dooyong/dooyong_tilemap.h | 16 +- src/mame/drc/zrt80.cpp | 6 +- src/mame/dynax/ddenlovr.cpp | 46 ++--- src/mame/dynax/dynax.cpp | 66 +++---- src/mame/dynax/dynax_blitter_rev2.cpp | 6 +- src/mame/dynax/dynax_blitter_rev2.h | 6 +- src/mame/dynax/hnayayoi.cpp | 4 +- src/mame/dynax/royalmah.cpp | 34 ++-- src/mame/edevices/diverboy.cpp | 6 +- src/mame/edevices/edevices.cpp | 6 +- src/mame/edevices/edevices.h | 6 +- src/mame/edevices/fantland.cpp | 16 +- src/mame/edevices/mugsmash.cpp | 8 +- src/mame/edevices/mwarr.cpp | 2 +- src/mame/edevices/ppmast93.cpp | 2 +- src/mame/edevices/pzletime.cpp | 4 +- src/mame/edevices/stlforce.cpp | 2 +- src/mame/edevices/twins.cpp | 8 +- src/mame/efo/cedar_magnet.cpp | 16 +- src/mame/efo/cedar_magnet_flop.cpp | 2 +- src/mame/efo/cedar_magnet_flop.h | 2 +- src/mame/efo/cedar_magnet_plane.cpp | 8 +- src/mame/efo/cedar_magnet_plane.h | 2 +- src/mame/efo/cedar_magnet_sprite.cpp | 10 +- src/mame/efo/cedar_magnet_sprite.h | 2 +- src/mame/efo/cidelsa.h | 4 +- src/mame/elektor/avrmax.cpp | 4 +- src/mame/elektor/ec65.cpp | 20 +- src/mame/emusys/emax.cpp | 2 +- src/mame/emusys/emu3.cpp | 2 +- src/mame/emusys/emu68k.cpp | 6 +- src/mame/ensoniq/enmirage.cpp | 8 +- src/mame/ensoniq/esq1.cpp | 6 +- src/mame/ensoniq/esq5505.cpp | 14 +- src/mame/ensoniq/esqasr.cpp | 6 +- src/mame/ensoniq/esqkt.cpp | 10 +- src/mame/ensoniq/esqlcd.cpp | 2 +- src/mame/ensoniq/esqlcd.h | 2 +- src/mame/ensoniq/esqmr.cpp | 4 +- src/mame/ensoniq/esqpanel.cpp | 22 +-- src/mame/ensoniq/esqpanel.h | 12 +- src/mame/ensoniq/esqvfd.cpp | 8 +- src/mame/ensoniq/esqvfd.h | 8 +- src/mame/enterprise/nick.cpp | 2 +- src/mame/enterprise/nick.h | 4 +- src/mame/entex/advision.cpp | 2 +- src/mame/entex/sag.cpp | 8 +- src/mame/eolith/eolith.cpp | 6 +- src/mame/eolith/ghosteo.cpp | 8 +- src/mame/eolith/vegaeo.cpp | 2 +- src/mame/epoch/scv.cpp | 2 +- src/mame/epson/px4.cpp | 4 +- src/mame/epson/px8.cpp | 2 +- src/mame/epson/qx10.cpp | 14 +- src/mame/ericsson/e9161.cpp | 8 +- src/mame/ericsson/eispc.cpp | 14 +- src/mame/ericsson/eispc_kb.cpp | 2 +- src/mame/ericsson/eispc_kb.h | 2 +- src/mame/excellent/aquarium.cpp | 4 +- src/mame/excellent/d9final.cpp | 2 +- src/mame/excellent/excellent_spr.cpp | 2 +- src/mame/excellent/excellent_spr.h | 2 +- src/mame/excellent/gcpinbal.cpp | 6 +- src/mame/excellent/lastbank.cpp | 4 +- src/mame/excellent/witch.cpp | 2 +- src/mame/exidy/carpolo.cpp | 32 +-- src/mame/exidy/exidy.cpp | 10 +- src/mame/exidy/exidy440_a.cpp | 14 +- src/mame/exidy/exidy440_a.h | 2 +- src/mame/exidy/exidyttl.cpp | 6 +- src/mame/exidy/micropolis.cpp | 2 +- src/mame/exidy/micropolis.h | 2 +- src/mame/exidy/sorcerer.cpp | 10 +- src/mame/exidy/sorcerer_m.cpp | 2 +- src/mame/exidy/starfire.cpp | 12 +- src/mame/exidy/vertigo.cpp | 6 +- src/mame/exidy/victory.cpp | 2 +- src/mame/f32/crospang.cpp | 2 +- src/mame/f32/silvmil.cpp | 2 +- src/mame/facit/f4431_kbd.cpp | 2 +- src/mame/facit/f4431_kbd.h | 2 +- src/mame/fairchild/channelf_a.cpp | 4 +- src/mame/fairchild/channelf_a.h | 2 +- src/mame/fairchild/f387x.cpp | 2 +- src/mame/fairlight/cmi.cpp | 20 +- src/mame/fairlight/cmi01a.cpp | 10 +- src/mame/fairlight/cmi01a.h | 4 +- src/mame/fairlight/cmi_ankbd.cpp | 2 +- src/mame/fairlight/cmi_ankbd.h | 2 +- src/mame/fairlight/cmi_mkbd.cpp | 8 +- src/mame/fairlight/cmi_mkbd.h | 2 +- src/mame/falco/f5220_kbd.cpp | 2 +- src/mame/falco/f5220_kbd.h | 2 +- src/mame/fidelity/as12.cpp | 2 +- src/mame/fidelity/card.cpp | 2 +- src/mame/fidelity/cc10.cpp | 2 +- src/mame/fidelity/checkc2.cpp | 2 +- src/mame/fidelity/chesster.cpp | 2 +- src/mame/fidelity/csc.cpp | 12 +- src/mame/fidelity/dames.cpp | 2 +- src/mame/fidelity/desdis.cpp | 4 +- src/mame/fidelity/eag68k.cpp | 2 +- src/mame/fidelity/elite.cpp | 4 +- src/mame/fidelity/excel.cpp | 4 +- src/mame/fidelity/sc12.cpp | 2 +- src/mame/fidelity/sc9.cpp | 6 +- src/mame/fidelity/vcc.cpp | 2 +- src/mame/fidelity/vsc.cpp | 4 +- src/mame/force/fccpu20.cpp | 14 +- src/mame/force/fccpu30.cpp | 8 +- src/mame/force/force68k.cpp | 8 +- src/mame/force/miniforce.cpp | 2 +- src/mame/fujitsu/fm7.cpp | 24 +-- src/mame/fujitsu/fmt_icmem.cpp | 2 +- src/mame/fujitsu/fmt_icmem.h | 2 +- src/mame/fujitsu/fmtowns.cpp | 50 ++--- src/mame/funtech/acan.cpp | 4 +- src/mame/funtech/acan.h | 2 +- src/mame/funworld/funworld.cpp | 6 +- src/mame/funworld/photoply.cpp | 8 +- src/mame/funworld/photoplys.cpp | 2 +- src/mame/funworld/photoplysx.cpp | 2 +- src/mame/funworld/supercrd.cpp | 4 +- src/mame/fuuki/fuukifg.cpp | 2 +- src/mame/fuuki/fuukifg.h | 2 +- src/mame/fuuki/fuukifg2.cpp | 2 +- src/mame/fuuki/fuukifg3.cpp | 2 +- src/mame/gaelco/blmbycar.cpp | 2 +- src/mame/gaelco/gaelco3d.cpp | 12 +- src/mame/gaelco/gaelco3d_m.cpp | 2 +- src/mame/gaelco/gaelco3d_m.h | 2 +- src/mame/gaelco/gaelco_ds5002fp.cpp | 2 +- src/mame/gaelco/gaelco_ds5002fp.h | 2 +- src/mame/gaelco/gaelco_wrally_sprites.cpp | 6 +- src/mame/gaelco/gaelco_wrally_sprites.h | 6 +- src/mame/gaelco/gaelcof3.cpp | 4 +- src/mame/gaelco/gaelcopc.cpp | 2 +- src/mame/gaelco/gaelcrpt.cpp | 2 +- src/mame/gaelco/gaelcrpt.h | 2 +- src/mame/gaelco/goldart.cpp | 4 +- src/mame/gaelco/mastboy.cpp | 4 +- src/mame/gaelco/rollext.cpp | 4 +- src/mame/gaelco/wrally.cpp | 2 +- src/mame/gaelco/xorworld.cpp | 4 +- src/mame/galaxian/dambustr.cpp | 6 +- src/mame/galaxian/galaxian.cpp | 30 +-- src/mame/galaxian/galaxian_a.cpp | 8 +- src/mame/galaxian/galaxian_a.h | 8 +- src/mame/galaxian/galaxold.cpp | 8 +- src/mame/galaxian/scobra.cpp | 32 +-- src/mame/galaxian/scramble.cpp | 32 +-- src/mame/galaxian/scramble_a.cpp | 6 +- src/mame/gamepark/gp2x.cpp | 2 +- src/mame/gamepark/gp32.cpp | 40 ++-- src/mame/gamepark/gp32.h | 6 +- src/mame/gameplan/enigma2.cpp | 6 +- src/mame/gameplan/gameplan.cpp | 2 +- src/mame/gametron/gotya.cpp | 2 +- src/mame/gametron/sbugger.cpp | 8 +- src/mame/gottlieb/exterm.cpp | 18 +- src/mame/gottlieb/gottlieb.cpp | 14 +- src/mame/gridcomp/gridcomp.cpp | 4 +- src/mame/gridcomp/gridkeyb.cpp | 4 +- src/mame/gridcomp/gridkeyb.h | 4 +- src/mame/handheld/gameking.cpp | 6 +- src/mame/handheld/hh_cop400.cpp | 36 ++-- src/mame/handheld/hh_cops1.cpp | 8 +- src/mame/handheld/hh_hmcs40.cpp | 84 ++++---- src/mame/handheld/hh_pic16.cpp | 36 ++-- src/mame/handheld/hh_pps41.cpp | 24 +-- src/mame/handheld/hh_rw5000.cpp | 20 +- src/mame/handheld/hh_tms1k.cpp | 220 ++++++++++----------- src/mame/handheld/hh_ucom4.cpp | 26 +-- src/mame/handheld/lk3000.cpp | 8 +- src/mame/handheld/monty.cpp | 4 +- src/mame/handheld/pensebem.cpp | 2 +- src/mame/handheld/scrablex.cpp | 2 +- src/mame/handheld/tispeak.cpp | 2 +- src/mame/handheld/tispellb.cpp | 8 +- src/mame/handheld/wildfire.cpp | 2 +- src/mame/hds/hds200_kbd.cpp | 8 +- src/mame/hds/hds200_kbd.h | 2 +- src/mame/heathkit/et3400.cpp | 2 +- src/mame/heathkit/h19.cpp | 2 +- src/mame/heathkit/h8.cpp | 4 +- src/mame/heathkit/h89.cpp | 2 +- src/mame/hec2hrp/hec2hrp.cpp | 6 +- src/mame/hegenerglaser/mm2.cpp | 2 +- src/mame/hegenerglaser/mmboard.cpp | 6 +- src/mame/hegenerglaser/mmboard.h | 6 +- src/mame/hegenerglaser/mmdisplay1.cpp | 2 +- src/mame/hegenerglaser/mmdisplay1.h | 2 +- src/mame/hegenerglaser/mmdisplay2.cpp | 4 +- src/mame/hegenerglaser/mmdisplay2.h | 2 +- src/mame/hegenerglaser/mondial.cpp | 4 +- src/mame/hegenerglaser/mondial68k.cpp | 2 +- src/mame/hegenerglaser/montec.cpp | 4 +- src/mame/hegenerglaser/risc.cpp | 2 +- src/mame/hegenerglaser/smondial.cpp | 4 +- src/mame/heurikon/hk68v10.cpp | 2 +- src/mame/hitachi/bmjr.cpp | 4 +- src/mame/hitachi/bml3.cpp | 20 +- src/mame/homebrew/4004clk.cpp | 6 +- src/mame/homebrew/68ksbc.cpp | 6 +- src/mame/homebrew/chaos.cpp | 2 +- src/mame/homebrew/d6809.cpp | 4 +- src/mame/homebrew/gigatron.cpp | 4 +- src/mame/homebrew/gs6502.cpp | 4 +- src/mame/homebrew/gs6809.cpp | 4 +- src/mame/homebrew/gscpm.cpp | 4 +- src/mame/homebrew/gsz80.cpp | 4 +- src/mame/homebrew/lft_chiptune.cpp | 4 +- src/mame/homebrew/lft_craft.cpp | 4 +- src/mame/homebrew/lft_phasor.cpp | 4 +- src/mame/homebrew/phunsy.cpp | 2 +- src/mame/homebrew/pimps.cpp | 6 +- src/mame/homebrew/ravens.cpp | 2 +- src/mame/homebrew/rc2014.cpp | 32 +-- src/mame/homebrew/sbc6510.cpp | 2 +- src/mame/homebrew/sitcom.cpp | 8 +- src/mame/homebrew/test_t400.cpp | 4 +- src/mame/homebrew/ultim809.cpp | 6 +- src/mame/homebrew/uzebox.cpp | 2 +- src/mame/homebrew/z80clock.cpp | 2 +- src/mame/homebrew/zexall.cpp | 2 +- src/mame/homelab/braiplus.cpp | 12 +- src/mame/homelab/homelab.cpp | 2 +- src/mame/hp/hp16500.cpp | 24 +-- src/mame/hp/hp2620.cpp | 2 +- src/mame/hp/hp2640.cpp | 14 +- src/mame/hp/hp2640_tape.cpp | 4 +- src/mame/hp/hp2640_tape.h | 2 +- src/mame/hp/hp3478a.cpp | 2 +- src/mame/hp/hp48.cpp | 8 +- src/mame/hp/hp48_port.cpp | 2 +- src/mame/hp/hp48_port.h | 4 +- src/mame/hp/hp49gp.cpp | 4 +- src/mame/hp/hp64k.cpp | 14 +- src/mame/hp/hp80.cpp | 14 +- src/mame/hp/hp80_optrom.cpp | 2 +- src/mame/hp/hp80_optrom.h | 7 +- src/mame/hp/hp95lx.cpp | 10 +- src/mame/hp/hp9825.cpp | 24 +-- src/mame/hp/hp9825_optrom.cpp | 7 +- src/mame/hp/hp9825_optrom.h | 2 +- src/mame/hp/hp9825_tape.cpp | 8 +- src/mame/hp/hp9825_tape.h | 2 +- src/mame/hp/hp9845.cpp | 38 ++-- src/mame/hp/hp9845_optrom.cpp | 2 +- src/mame/hp/hp9845_optrom.h | 2 +- src/mame/hp/hp9845_printer.cpp | 6 +- src/mame/hp/hp9845_printer.h | 2 +- src/mame/hp/hp98x5_io_sys.cpp | 2 +- src/mame/hp/hp98x5_io_sys.h | 2 +- src/mame/hp/hp9k_3xx.cpp | 84 ++++---- src/mame/hp/hp_ipc.cpp | 2 +- src/mame/hp/hp_ipc_optrom.cpp | 2 +- src/mame/hp/hp_ipc_optrom.h | 7 +- src/mame/hp/hpz80unk.cpp | 2 +- src/mame/hp/jornada.cpp | 2 +- src/mame/husky/hunter2.cpp | 2 +- src/mame/husky/husky.cpp | 4 +- src/mame/ibm/ibm6580.cpp | 12 +- src/mame/ibm/ibm6580_fdc.cpp | 4 +- src/mame/ibm/ibm6580_fdc.h | 2 +- src/mame/ibm/ibm6580_kbd.cpp | 2 +- src/mame/ibm/ibm6580_kbd.h | 2 +- src/mame/ibm/rosetta.cpp | 2 +- src/mame/ibm/rosetta.h | 2 +- src/mame/ibm/rs6000_type7xxx.cpp | 2 +- src/mame/ibm/rtpc.cpp | 40 ++-- src/mame/ibm/rtpc_iocc.cpp | 2 +- src/mame/ibm/rtpc_iocc.h | 2 +- src/mame/ice/frenzyxprss.cpp | 2 +- src/mame/ice/ice_bozopail.cpp | 2 +- src/mame/ice/ice_tbd.cpp | 2 +- src/mame/ice/vp101.cpp | 4 +- src/mame/igs/dunhuang.cpp | 10 +- src/mame/igs/funtech.cpp | 4 +- src/mame/igs/goldstar.cpp | 18 +- src/mame/igs/igs017.cpp | 66 +++---- src/mame/igs/igs017_igs031.cpp | 2 +- src/mame/igs/igs017_igs031.h | 2 +- src/mame/igs/igs022.cpp | 2 +- src/mame/igs/igs022.h | 2 +- src/mame/igs/igs025.cpp | 2 +- src/mame/igs/igs025.h | 2 +- src/mame/igs/igs028.cpp | 2 +- src/mame/igs/igs028.h | 2 +- src/mame/igs/igs_fear.cpp | 2 +- src/mame/igs/igs_m027.cpp | 8 +- src/mame/igs/igs_m036.cpp | 4 +- src/mame/igs/igspoker.cpp | 4 +- src/mame/igs/iqblock.cpp | 4 +- src/mame/igs/jackie.cpp | 2 +- src/mame/igs/pgm2.cpp | 16 +- src/mame/igs/pgm2_memcard.cpp | 2 +- src/mame/igs/pgm2_memcard.h | 2 +- src/mame/igs/pgm3.cpp | 2 +- src/mame/igs/pgmprot_igs025_igs012.cpp | 2 +- src/mame/igs/pgmprot_igs025_igs022.cpp | 4 +- src/mame/igs/pgmprot_igs025_igs028.cpp | 4 +- src/mame/igs/pgmprot_igs027a_type1.cpp | 2 +- src/mame/igs/pgmprot_igs027a_type2.cpp | 4 +- src/mame/igs/pgmprot_igs027a_type3.cpp | 6 +- src/mame/igt/drw80pkr.cpp | 2 +- src/mame/igt/gkigt.cpp | 2 +- src/mame/igt/videopkr.cpp | 2 +- src/mame/informer/informer_207_100.cpp | 4 +- src/mame/informer/informer_207_376.cpp | 4 +- src/mame/informer/informer_207_376_kbd.cpp | 6 +- src/mame/informer/informer_207_376_kbd.h | 2 +- src/mame/informer/informer_213.cpp | 2 +- src/mame/informer/informer_213_kbd.cpp | 2 +- src/mame/informer/informer_213_kbd.h | 2 +- src/mame/intel/basic52.cpp | 4 +- src/mame/intel/imds2.cpp | 8 +- src/mame/intel/imds2ioc.cpp | 10 +- src/mame/intel/imds2ioc.h | 2 +- src/mame/intel/imm6_76.cpp | 2 +- src/mame/intel/imm6_76.h | 2 +- src/mame/intel/intellec4.cpp | 8 +- src/mame/intel/intellec8.cpp | 2 +- src/mame/intel/ipc.cpp | 6 +- src/mame/intel/ipds.cpp | 2 +- src/mame/intel/isbc.cpp | 36 ++-- src/mame/intel/isbc8010.cpp | 6 +- src/mame/intel/isbc8030.cpp | 8 +- src/mame/intel/isbc_208.cpp | 4 +- src/mame/intel/isbc_208.h | 6 +- src/mame/intel/rex6000.cpp | 4 +- src/mame/intel/sdk80.cpp | 2 +- src/mame/intel/sdk86.cpp | 4 +- src/mame/intergraph/interpro.cpp | 114 +++++------ src/mame/intergraph/interpro_arbga.cpp | 2 +- src/mame/intergraph/interpro_arbga.h | 2 +- src/mame/intergraph/interpro_ioga.cpp | 8 +- src/mame/intergraph/interpro_ioga.h | 8 +- src/mame/intergraph/interpro_mcga.cpp | 6 +- src/mame/intergraph/interpro_mcga.h | 6 +- src/mame/intergraph/interpro_sga.cpp | 2 +- src/mame/intergraph/interpro_sga.h | 2 +- src/mame/interton/vc4000.cpp | 6 +- src/mame/interton/vc4000_a.cpp | 4 +- src/mame/interton/vc4000_a.h | 2 +- src/mame/irem/irem.cpp | 10 +- src/mame/irem/irem.h | 8 +- src/mame/irem/m10.cpp | 6 +- src/mame/irem/m10.h | 4 +- src/mame/irem/m107.cpp | 4 +- src/mame/irem/m119.cpp | 4 +- src/mame/irem/m14.cpp | 2 +- src/mame/irem/m52.cpp | 2 +- src/mame/irem/m57.cpp | 2 +- src/mame/irem/m58.cpp | 2 +- src/mame/irem/m62.cpp | 2 +- src/mame/irem/m72.cpp | 12 +- src/mame/irem/m72_a.cpp | 2 +- src/mame/irem/m72_a.h | 2 +- src/mame/irem/m90.cpp | 8 +- src/mame/irem/m92.cpp | 4 +- src/mame/irem/olibochu.cpp | 4 +- src/mame/irem/redalert_a.cpp | 10 +- src/mame/irem/redalert_a.h | 10 +- src/mame/irem/shisen.cpp | 2 +- src/mame/irem/spartanxtec.cpp | 10 +- src/mame/irem/travrusa.cpp | 4 +- src/mame/irem/vigilant.cpp | 8 +- src/mame/itech/capbowl.cpp | 4 +- src/mame/itech/iteagle.cpp | 20 +- src/mame/itech/iteagle_fpga.cpp | 8 +- src/mame/itech/iteagle_fpga.h | 10 +- src/mame/itech/itech8.cpp | 10 +- src/mame/jaleco/acommand.cpp | 6 +- src/mame/jaleco/argus.cpp | 28 +-- src/mame/jaleco/bestleag.cpp | 4 +- src/mame/jaleco/bigstrkb.cpp | 8 +- src/mame/jaleco/cischeat.cpp | 34 ++-- src/mame/jaleco/ddayjlc.cpp | 8 +- src/mame/jaleco/ginganin.cpp | 2 +- src/mame/jaleco/jalblend.cpp | 2 +- src/mame/jaleco/jalblend.h | 2 +- src/mame/jaleco/jaleco_ms32_sysctrl.cpp | 6 +- src/mame/jaleco/jaleco_ms32_sysctrl.h | 6 +- src/mame/jaleco/jalmah.cpp | 6 +- src/mame/jaleco/megasys1.cpp | 12 +- src/mame/jaleco/ms1_tmap.cpp | 2 +- src/mame/jaleco/ms1_tmap.h | 4 +- src/mame/jaleco/ms32.cpp | 2 +- src/mame/jaleco/ms32_sprite.cpp | 2 +- src/mame/jaleco/ms32_sprite.h | 2 +- src/mame/jaleco/psychic5.cpp | 2 +- src/mame/jaleco/pturn.cpp | 8 +- src/mame/jpm/guab.cpp | 20 +- src/mame/jpm/jpmimpct.cpp | 28 +-- src/mame/jpm/jpmimpct.h | 4 +- src/mame/jpm/jpmmps.cpp | 2 +- src/mame/jpm/jpmsru.cpp | 4 +- src/mame/jpm/jpmsys5.cpp | 28 +-- src/mame/jpm/jpmsys7.cpp | 4 +- src/mame/jpm/pluto5.cpp | 2 +- src/mame/kaneko/airbustr.cpp | 2 +- src/mame/kaneko/djboy.cpp | 2 +- src/mame/kaneko/expro02.cpp | 10 +- src/mame/kaneko/galpani3.cpp | 8 +- src/mame/kaneko/galpanic.cpp | 2 +- src/mame/kaneko/hvyunit.cpp | 2 +- src/mame/kaneko/jchan.cpp | 8 +- src/mame/kaneko/kan_pand.cpp | 2 +- src/mame/kaneko/kan_pand.h | 2 +- src/mame/kaneko/kaneko16.cpp | 16 +- src/mame/kaneko/kaneko_calc3.cpp | 2 +- src/mame/kaneko/kaneko_calc3.h | 4 +- src/mame/kaneko/kaneko_grap2.cpp | 2 +- src/mame/kaneko/kaneko_grap2.h | 2 +- src/mame/kaneko/kaneko_hit.cpp | 2 +- src/mame/kaneko/kaneko_hit.h | 7 +- src/mame/kaneko/kaneko_spr.cpp | 6 +- src/mame/kaneko/kaneko_spr.h | 16 +- src/mame/kaneko/kaneko_tmap.cpp | 2 +- src/mame/kaneko/kaneko_tmap.h | 7 +- src/mame/kaneko/kaneko_toybox.cpp | 2 +- src/mame/kaneko/kaneko_toybox.h | 4 +- src/mame/kaneko/sandscrp.cpp | 8 +- src/mame/kaneko/sknsspr.cpp | 2 +- src/mame/kaneko/sknsspr.h | 2 +- src/mame/kaneko/snowbros.cpp | 18 +- src/mame/kaneko/suprnova.cpp | 2 +- src/mame/kawai/acr20.cpp | 2 +- src/mame/kawai/k5.cpp | 4 +- src/mame/kawai/ksp10.cpp | 2 +- src/mame/kawai/mb63h158.cpp | 2 +- src/mame/kawai/mb63h158.h | 2 +- src/mame/kawai/r100.cpp | 2 +- src/mame/kaypro/kay_kbd.cpp | 2 +- src/mame/kaypro/kay_kbd.h | 2 +- src/mame/kaypro/kaypro.cpp | 8 +- src/mame/kiwako/koikoi.cpp | 2 +- src/mame/kiwako/mrjong.cpp | 6 +- src/mame/koei/pasogo.cpp | 2 +- src/mame/konami/3dom2.cpp | 14 +- src/mame/konami/3dom2.h | 18 +- src/mame/konami/3dom2_te.cpp | 2 +- src/mame/konami/3dom2_te.h | 2 +- src/mame/konami/88games.cpp | 12 +- src/mame/konami/ajax.cpp | 16 +- src/mame/konami/aliens.cpp | 4 +- src/mame/konami/asterix.cpp | 6 +- src/mame/konami/battlnts.cpp | 4 +- src/mame/konami/bishi.cpp | 6 +- src/mame/konami/bladestl.cpp | 6 +- src/mame/konami/blockhl.cpp | 4 +- src/mame/konami/bottom9.cpp | 6 +- src/mame/konami/chqflag.cpp | 8 +- src/mame/konami/circusc.cpp | 4 +- src/mame/konami/cobra.cpp | 32 +-- src/mame/konami/combatsc.cpp | 18 +- src/mame/konami/contra.cpp | 4 +- src/mame/konami/crimfght.cpp | 4 +- src/mame/konami/dbz.cpp | 20 +- src/mame/konami/divebomb.cpp | 4 +- src/mame/konami/djmain.cpp | 8 +- src/mame/konami/fastlane.cpp | 4 +- src/mame/konami/finalizr.cpp | 2 +- src/mame/konami/firebeat.cpp | 36 ++-- src/mame/konami/flkatck.cpp | 2 +- src/mame/konami/giclassic.cpp | 6 +- src/mame/konami/gijoe.cpp | 6 +- src/mame/konami/gradius3.cpp | 10 +- src/mame/konami/gticlub.cpp | 24 +-- src/mame/konami/hcastle.cpp | 14 +- src/mame/konami/hexion.cpp | 4 +- src/mame/konami/hornet.cpp | 18 +- src/mame/konami/hyperspt.cpp | 10 +- src/mame/konami/hyprolyb.cpp | 2 +- src/mame/konami/hyprolyb.h | 2 +- src/mame/konami/ironhors.cpp | 10 +- src/mame/konami/junofrst.cpp | 10 +- src/mame/konami/k001005.cpp | 2 +- src/mame/konami/k001005.h | 6 +- src/mame/konami/k001006.cpp | 2 +- src/mame/konami/k001006.h | 2 +- src/mame/konami/k001604.cpp | 2 +- src/mame/konami/k001604.h | 2 +- src/mame/konami/k007121.cpp | 2 +- src/mame/konami/k007121.h | 2 +- src/mame/konami/k007342.cpp | 2 +- src/mame/konami/k007342.h | 2 +- src/mame/konami/k007420.cpp | 2 +- src/mame/konami/k007420.h | 2 +- src/mame/konami/k007452.cpp | 2 +- src/mame/konami/k007452.h | 2 +- src/mame/konami/k037122.cpp | 2 +- src/mame/konami/k037122.h | 2 +- src/mame/konami/k051733.cpp | 2 +- src/mame/konami/k051733.h | 2 +- src/mame/konami/k051960.cpp | 2 +- src/mame/konami/k051960.h | 2 +- src/mame/konami/k052109.cpp | 2 +- src/mame/konami/k052109.h | 2 +- src/mame/konami/k053244_k053245.cpp | 2 +- src/mame/konami/k053244_k053245.h | 2 +- src/mame/konami/k053246_k053247_k055673.cpp | 6 +- src/mame/konami/k053246_k053247_k055673.h | 6 +- src/mame/konami/k053250.cpp | 2 +- src/mame/konami/k053250.h | 6 +- src/mame/konami/k053250_ps.cpp | 2 +- src/mame/konami/k053250_ps.h | 4 +- src/mame/konami/k053251.cpp | 2 +- src/mame/konami/k053251.h | 2 +- src/mame/konami/k054000.cpp | 2 +- src/mame/konami/k054000.h | 2 +- src/mame/konami/k054156_k054157_k056832.cpp | 2 +- src/mame/konami/k054156_k054157_k056832.h | 4 +- src/mame/konami/k054338.cpp | 2 +- src/mame/konami/k054338.h | 6 +- src/mame/konami/k055555.cpp | 2 +- src/mame/konami/k055555.h | 2 +- src/mame/konami/k057714.cpp | 2 +- src/mame/konami/k057714.h | 2 +- src/mame/konami/k573cass.cpp | 16 +- src/mame/konami/k573cass.h | 16 +- src/mame/konami/k573dio.cpp | 2 +- src/mame/konami/k573dio.h | 2 +- src/mame/konami/k573fpga.cpp | 2 +- src/mame/konami/k573fpga.h | 2 +- src/mame/konami/k573kara.cpp | 4 +- src/mame/konami/k573kara.h | 2 +- src/mame/konami/k573mcal.cpp | 2 +- src/mame/konami/k573mcal.h | 4 +- src/mame/konami/k573mcr.cpp | 4 +- src/mame/konami/k573mcr.h | 6 +- src/mame/konami/k573msu.cpp | 2 +- src/mame/konami/k573msu.h | 2 +- src/mame/konami/k573npu.cpp | 2 +- src/mame/konami/k573npu.h | 2 +- src/mame/konami/konami1.cpp | 2 +- src/mame/konami/konami1.h | 2 +- src/mame/konami/konami_gn676_lan.cpp | 2 +- src/mame/konami/konami_gn676_lan.h | 6 +- src/mame/konami/konamigq.cpp | 6 +- src/mame/konami/konamigv.cpp | 6 +- src/mame/konami/konamigx.cpp | 22 +-- src/mame/konami/konamim2.cpp | 12 +- src/mame/konami/konblands.cpp | 2 +- src/mame/konami/konendev.cpp | 8 +- src/mame/konami/kongs470.cpp | 4 +- src/mame/konami/konmedal.cpp | 6 +- src/mame/konami/konmedal020.cpp | 2 +- src/mame/konami/konmedal68k.cpp | 4 +- src/mame/konami/konppc.cpp | 2 +- src/mame/konami/konppc.h | 2 +- src/mame/konami/kpontoon.cpp | 8 +- src/mame/konami/kpython.cpp | 4 +- src/mame/konami/kpython2.cpp | 18 +- src/mame/konami/ksys573.cpp | 44 ++--- src/mame/konami/labyrunr.cpp | 10 +- src/mame/konami/lethal.cpp | 6 +- src/mame/konami/mainevt.cpp | 2 +- src/mame/konami/megazone.cpp | 2 +- src/mame/konami/midikbd.cpp | 2 +- src/mame/konami/midikbd.h | 2 +- src/mame/konami/mogura.cpp | 4 +- src/mame/konami/moo.cpp | 22 +-- src/mame/konami/mystwarr.cpp | 28 +-- src/mame/konami/nemesis.cpp | 108 +++++----- src/mame/konami/nwk-tr.cpp | 16 +- src/mame/konami/otomedius.cpp | 2 +- src/mame/konami/overdriv.cpp | 12 +- src/mame/konami/pandoras.cpp | 2 +- src/mame/konami/parodius.cpp | 14 +- src/mame/konami/pingpong.cpp | 4 +- src/mame/konami/piratesh.cpp | 14 +- src/mame/konami/plygonet.cpp | 4 +- src/mame/konami/qdrmfgp.cpp | 4 +- src/mame/konami/quickpick5.cpp | 2 +- src/mame/konami/rockrage.cpp | 8 +- src/mame/konami/rollerg.cpp | 6 +- src/mame/konami/rungun.cpp | 10 +- src/mame/konami/sbasketb.cpp | 8 +- src/mame/konami/scotrsht.cpp | 6 +- src/mame/konami/simpsons.cpp | 6 +- src/mame/konami/spy.cpp | 10 +- src/mame/konami/surpratk.cpp | 6 +- src/mame/konami/tasman.cpp | 14 +- src/mame/konami/thunderx.cpp | 4 +- src/mame/konami/tmnt.cpp | 90 ++++----- src/mame/konami/tp84.cpp | 2 +- src/mame/konami/trackfld.cpp | 14 +- src/mame/konami/trackfld_a.cpp | 2 +- src/mame/konami/trackfld_a.h | 6 +- src/mame/konami/twinkle.cpp | 14 +- src/mame/konami/ultraman.cpp | 16 +- src/mame/konami/ultrsprt.cpp | 4 +- src/mame/konami/vendetta.cpp | 12 +- src/mame/konami/viper.cpp | 10 +- src/mame/konami/wecleman.cpp | 30 +-- src/mame/konami/xexex.cpp | 10 +- src/mame/konami/xmen.cpp | 8 +- src/mame/konami/yiear.cpp | 2 +- src/mame/konami/zr107.cpp | 12 +- src/mame/konami/zs01.cpp | 2 +- src/mame/konami/zs01.h | 7 +- src/mame/kontron/kdt6.cpp | 6 +- src/mame/korg/korgds8.cpp | 2 +- src/mame/korg/korgdss1.cpp | 2 +- src/mame/korg/korgm1.cpp | 2 +- src/mame/korg/korgz3.cpp | 8 +- src/mame/kyber/kminus.cpp | 2 +- src/mame/leapfrog/leapfrog_iquest.cpp | 4 +- src/mame/leapfrog/leapfrog_leappad.cpp | 6 +- src/mame/leapfrog/leapfrog_leapster_explorer.cpp | 2 +- src/mame/leapfrog/leapster.cpp | 2 +- src/mame/lsi/m3.cpp | 8 +- src/mame/lsi/octo_kbd.cpp | 8 +- src/mame/lsi/octo_kbd.h | 2 +- src/mame/lsi/octopus.cpp | 14 +- src/mame/luxor/abc1600.cpp | 6 +- src/mame/luxor/abc1600_v.cpp | 2 +- src/mame/luxor/abc1600_v.h | 2 +- src/mame/luxor/abc1600mac.cpp | 2 +- src/mame/luxor/abc1600mac.h | 2 +- src/mame/luxor/abc80.cpp | 4 +- src/mame/luxor/abc80kb.cpp | 4 +- src/mame/luxor/abc80kb.h | 2 +- src/mame/luxor/ds90.cpp | 22 +-- src/mame/makerbot/replicator.cpp | 6 +- src/mame/matsushita/duet16.cpp | 8 +- src/mame/matsushita/jr100.cpp | 2 +- src/mame/matsushita/jr200.cpp | 4 +- src/mame/matsushita/myb3k.cpp | 10 +- src/mame/mattel/chess.cpp | 4 +- src/mame/mattel/intv.cpp | 6 +- src/mame/mattel/juicebox.cpp | 8 +- src/mame/mattel/stic.cpp | 2 +- src/mame/mattel/stic.h | 2 +- src/mame/maygay/maygay1b.cpp | 8 +- src/mame/maygay/maygayep.cpp | 4 +- src/mame/maygay/maygayew.cpp | 2 +- src/mame/maygay/maygayv1.cpp | 2 +- src/mame/maygay/mmm.cpp | 6 +- src/mame/mchester/ssem.cpp | 2 +- src/mame/meadows/lazercmd.cpp | 16 +- src/mame/meadows/meadows.cpp | 4 +- src/mame/meadows/meadwttl.cpp | 4 +- src/mame/mera/ec7915.cpp | 8 +- src/mame/mera/konin.cpp | 12 +- src/mame/mera/m79152pc.cpp | 12 +- src/mame/mera/vdm7932x.cpp | 2 +- src/mame/merit/merit.cpp | 2 +- src/mame/merit/meritm.cpp | 8 +- src/mame/merit/mtouchxl.cpp | 20 +- src/mame/merit/pubtimed.cpp | 4 +- src/mame/metro/hyprduel.cpp | 4 +- src/mame/metro/metro.cpp | 12 +- src/mame/metro/tmmjprd.cpp | 2 +- src/mame/microkey/primo.cpp | 2 +- src/mame/microsoft/jazz.cpp | 8 +- src/mame/microsoft/mct_adr.cpp | 2 +- src/mame/microsoft/mct_adr.h | 2 +- src/mame/microsoft/xbox.cpp | 2 +- src/mame/microterm/ergo201.cpp | 2 +- src/mame/microterm/microterm_f8.cpp | 2 +- src/mame/microterm/mt420.cpp | 2 +- src/mame/midcoin/24cdjuke.cpp | 4 +- src/mame/midcoin/wallc.cpp | 2 +- src/mame/midw8080/8080bw_a.cpp | 2 +- src/mame/midw8080/8080bw_a.h | 2 +- src/mame/midw8080/mw8080bw.h | 2 +- src/mame/midw8080/mw8080bw_a.cpp | 40 ++-- src/mame/midw8080/mw8080bw_a.h | 36 ++-- src/mame/midw8080/rotaryf.cpp | 2 +- src/mame/midway/astrocde.cpp | 12 +- src/mame/midway/atlantis.cpp | 14 +- src/mame/midway/balsente.cpp | 8 +- src/mame/midway/balsente.h | 2 +- src/mame/midway/csd.cpp | 6 +- src/mame/midway/csd.h | 2 +- src/mame/midway/gridlee.cpp | 2 +- src/mame/midway/gridlee.h | 4 +- src/mame/midway/gridlee_a.cpp | 2 +- src/mame/midway/mcr.cpp | 2 +- src/mame/midway/mcr68.cpp | 2 +- src/mame/midway/midqslvr.cpp | 8 +- src/mame/midway/midtunit.cpp | 4 +- src/mame/midway/midtunit_v.cpp | 10 +- src/mame/midway/midtunit_v.h | 16 +- src/mame/midway/midtview.ipp | 2 +- src/mame/midway/midvunit.cpp | 10 +- src/mame/midway/midway.cpp | 14 +- src/mame/midway/midway.h | 6 +- src/mame/midway/midwayic.cpp | 14 +- src/mame/midway/midwayic.h | 14 +- src/mame/midway/midwunit.cpp | 8 +- src/mame/midway/midxunit.cpp | 6 +- src/mame/midway/midzeus.cpp | 18 +- src/mame/midway/omegrace.cpp | 4 +- src/mame/midway/pinball2k.cpp | 6 +- src/mame/midway/seattle.cpp | 60 +++--- src/mame/midway/sente6vb.cpp | 12 +- src/mame/midway/sente6vb.h | 2 +- src/mame/midway/spyhuntertec.cpp | 4 +- src/mame/midway/sspeedr.cpp | 2 +- src/mame/midway/tmaster.cpp | 4 +- src/mame/midway/vegas.cpp | 62 +++--- src/mame/midway/williams.cpp | 42 ++-- src/mame/midway/wmg.cpp | 8 +- src/mame/midway/zwackery.cpp | 8 +- src/mame/miltonbradley/microvsn.cpp | 6 +- src/mame/miltonbradley/milton6805.cpp | 4 +- src/mame/miltonbradley/vectrex.cpp | 6 +- src/mame/mips/mips.cpp | 2 +- src/mame/mips/mips_rambo.cpp | 2 +- src/mame/mips/mips_rambo.h | 2 +- src/mame/misc/39in1.cpp | 4 +- src/mame/misc/4enlinea.cpp | 12 +- src/mame/misc/5clown.cpp | 4 +- src/mame/misc/ace_sp_reelctrl.cpp | 6 +- src/mame/misc/ace_sp_reelctrl.h | 6 +- src/mame/misc/acefruit.cpp | 2 +- src/mame/misc/acesp.cpp | 6 +- src/mame/misc/alinvade.cpp | 2 +- src/mame/misc/amspdwy.cpp | 6 +- src/mame/misc/amusco.cpp | 8 +- src/mame/misc/arachnid.cpp | 6 +- src/mame/misc/artmagic.cpp | 6 +- src/mame/misc/astrafr.cpp | 12 +- src/mame/misc/astrcorp.cpp | 2 +- src/mame/misc/astropc.cpp | 2 +- src/mame/misc/atronic.cpp | 8 +- src/mame/misc/attckufo.cpp | 2 +- src/mame/misc/aztarac.cpp | 2 +- src/mame/misc/bailey.cpp | 4 +- src/mame/misc/beaminv.cpp | 2 +- src/mame/misc/beezer.cpp | 2 +- src/mame/misc/belatra.cpp | 2 +- src/mame/misc/bgt.cpp | 2 +- src/mame/misc/bingor.cpp | 6 +- src/mame/misc/blitz68k.cpp | 4 +- src/mame/misc/bntyhunt.cpp | 2 +- src/mame/misc/calomega.cpp | 14 +- src/mame/misc/cardline.cpp | 2 +- src/mame/misc/castle.cpp | 6 +- src/mame/misc/cave.cpp | 8 +- src/mame/misc/cavepc.cpp | 2 +- src/mame/misc/cb2001.cpp | 4 +- src/mame/misc/chameleonrx1.cpp | 2 +- src/mame/misc/chicago.cpp | 4 +- src/mame/misc/chsuper.cpp | 4 +- src/mame/misc/clowndwn.cpp | 12 +- src/mame/misc/clpoker.cpp | 2 +- src/mame/misc/cocoloco.cpp | 2 +- src/mame/misc/coinmstr.cpp | 6 +- src/mame/misc/coinmvga.cpp | 4 +- src/mame/misc/coolpool.cpp | 4 +- src/mame/misc/cowtipping.cpp | 2 +- src/mame/misc/crazybal.cpp | 4 +- src/mame/misc/crospuzl.cpp | 2 +- src/mame/misc/cubeqst.cpp | 6 +- src/mame/misc/cupidon.cpp | 2 +- src/mame/misc/cv1k.cpp | 4 +- src/mame/misc/diamondking.cpp | 6 +- src/mame/misc/discoboy.cpp | 2 +- src/mame/misc/dorachan.cpp | 2 +- src/mame/misc/dwarfd.cpp | 2 +- src/mame/misc/dynadice.cpp | 2 +- src/mame/misc/dynamoah.cpp | 2 +- src/mame/misc/ecoinf1.cpp | 2 +- src/mame/misc/ecoinf2.cpp | 6 +- src/mame/misc/ecoinf3.cpp | 4 +- src/mame/misc/ecoinfr.cpp | 4 +- src/mame/misc/electra.cpp | 4 +- src/mame/misc/esd16.cpp | 2 +- src/mame/misc/esh.cpp | 4 +- src/mame/misc/esripsys.cpp | 8 +- src/mame/misc/ettrivia.cpp | 6 +- src/mame/misc/extrema.cpp | 2 +- src/mame/misc/ez2d.cpp | 2 +- src/mame/misc/fastinvaders.cpp | 6 +- src/mame/misc/fireball.cpp | 2 +- src/mame/misc/flower.cpp | 2 +- src/mame/misc/flower_a.cpp | 2 +- src/mame/misc/flower_a.h | 2 +- src/mame/misc/fresh.cpp | 2 +- src/mame/misc/fungames.cpp | 4 +- src/mame/misc/funkball.cpp | 6 +- src/mame/misc/galgame.cpp | 2 +- src/mame/misc/gambl186.cpp | 2 +- src/mame/misc/gammagic.cpp | 4 +- src/mame/misc/gamtor.cpp | 6 +- src/mame/misc/gei.cpp | 4 +- src/mame/misc/gfamily.cpp | 2 +- src/mame/misc/globalfr.cpp | 2 +- src/mame/misc/globalvr.cpp | 2 +- src/mame/misc/goldngam.cpp | 8 +- src/mame/misc/goldnpkr.cpp | 10 +- src/mame/misc/good.cpp | 2 +- src/mame/misc/gotcha.cpp | 2 +- src/mame/misc/gsspade.cpp | 4 +- src/mame/misc/hapyfish.cpp | 12 +- src/mame/misc/hazelgr.cpp | 18 +- src/mame/misc/highvdeo.cpp | 8 +- src/mame/misc/hitpoker.cpp | 6 +- src/mame/misc/hobbyplay.cpp | 2 +- src/mame/misc/homedata.cpp | 12 +- src/mame/misc/hotblock.cpp | 2 +- src/mame/misc/hotchili.cpp | 2 +- src/mame/misc/hotstuff.cpp | 6 +- src/mame/misc/imolagp.cpp | 8 +- src/mame/misc/inder_sb.cpp | 22 +-- src/mame/misc/inder_sb.h | 2 +- src/mame/misc/intrscti.cpp | 4 +- src/mame/misc/istellar.cpp | 2 +- src/mame/misc/jackpool.cpp | 6 +- src/mame/misc/jankenmn.cpp | 2 +- src/mame/misc/jokrwild.cpp | 4 +- src/mame/misc/krokha.cpp | 2 +- src/mame/misc/kurukuru.cpp | 2 +- src/mame/misc/ladyfrog.cpp | 2 +- src/mame/misc/laserbas.cpp | 8 +- src/mame/misc/lependu.cpp | 4 +- src/mame/misc/limenko.cpp | 4 +- src/mame/misc/luckybal.cpp | 8 +- src/mame/misc/magic10.cpp | 2 +- src/mame/misc/magicard.cpp | 12 +- src/mame/misc/magicfly.cpp | 2 +- src/mame/misc/magictg.cpp | 6 +- src/mame/misc/magtouch.cpp | 6 +- src/mame/misc/malzak.cpp | 6 +- src/mame/misc/matrix.cpp | 2 +- src/mame/misc/megaphx.cpp | 4 +- src/mame/misc/meyc8080.cpp | 2 +- src/mame/misc/meyc8088.cpp | 2 +- src/mame/misc/micro3d.cpp | 2 +- src/mame/misc/micro3d_a.cpp | 2 +- src/mame/misc/micro3d_a.h | 2 +- src/mame/misc/microdar.cpp | 2 +- src/mame/misc/mil4000.cpp | 2 +- src/mame/misc/miniboy7.cpp | 2 +- src/mame/misc/mjsenpu.cpp | 2 +- src/mame/misc/mole.cpp | 4 +- src/mame/misc/multfish.cpp | 2 +- src/mame/misc/murogem.cpp | 6 +- src/mame/misc/murogmbl.cpp | 8 +- src/mame/misc/neomania.cpp | 2 +- src/mame/misc/neoprint.cpp | 8 +- src/mame/misc/news.cpp | 4 +- src/mame/misc/nexus3d.cpp | 4 +- src/mame/misc/nibble.cpp | 4 +- src/mame/misc/norautp.cpp | 6 +- src/mame/misc/nsg6809.cpp | 4 +- src/mame/misc/odyssey.cpp | 2 +- src/mame/misc/othello.cpp | 4 +- src/mame/misc/pass.cpp | 4 +- src/mame/misc/photon.cpp | 2 +- src/mame/misc/photon2.cpp | 4 +- src/mame/misc/pkscram.cpp | 2 +- src/mame/misc/playcenter.cpp | 2 +- src/mame/misc/pntnpuzl.cpp | 2 +- src/mame/misc/poker72.cpp | 4 +- src/mame/misc/policetr.cpp | 4 +- src/mame/misc/proconn.cpp | 20 +- src/mame/misc/pse.cpp | 4 +- src/mame/misc/radikaldarts.cpp | 2 +- src/mame/misc/rawthrillspc.cpp | 2 +- src/mame/misc/rcorsair.cpp | 4 +- src/mame/misc/rfslots8085.cpp | 4 +- src/mame/misc/rfslotspcpent.cpp | 2 +- src/mame/misc/roul.cpp | 6 +- src/mame/misc/sanremmg.cpp | 2 +- src/mame/misc/savquest.cpp | 8 +- src/mame/misc/scm_500.cpp | 2 +- src/mame/misc/sfbonus.cpp | 6 +- src/mame/misc/shangkid.cpp | 6 +- src/mame/misc/silverball.cpp | 2 +- src/mame/misc/skeetsht.cpp | 8 +- src/mame/misc/skopro.cpp | 2 +- src/mame/misc/skyarmy.cpp | 6 +- src/mame/misc/skylncr.cpp | 4 +- src/mame/misc/sliver.cpp | 8 +- src/mame/misc/spool99.cpp | 2 +- src/mame/misc/ssingles.cpp | 8 +- src/mame/misc/startouch.cpp | 2 +- src/mame/misc/statriv2.cpp | 2 +- src/mame/misc/strkzn.cpp | 4 +- src/mame/misc/summit.cpp | 2 +- src/mame/misc/sumt8035.cpp | 2 +- src/mame/misc/supertnk.cpp | 2 +- src/mame/misc/taxidriv.cpp | 10 +- src/mame/misc/thayers.cpp | 2 +- src/mame/misc/triviaquiz.cpp | 2 +- src/mame/misc/trivrus.cpp | 2 +- src/mame/misc/truco.cpp | 4 +- src/mame/misc/trucocl.cpp | 2 +- src/mame/misc/trvmadns.cpp | 2 +- src/mame/misc/ttchamp.cpp | 2 +- src/mame/misc/tugboat.cpp | 6 +- src/mame/misc/unkpoker.cpp | 2 +- src/mame/misc/usbilliards.cpp | 4 +- src/mame/misc/usgames.cpp | 2 +- src/mame/misc/vamphalf.cpp | 2 +- src/mame/misc/vcombat.cpp | 4 +- src/mame/misc/video21.cpp | 2 +- src/mame/misc/vlc.cpp | 2 +- src/mame/misc/vlc34010.cpp | 2 +- src/mame/misc/voyager.cpp | 4 +- src/mame/misc/vpoker.cpp | 2 +- src/mame/misc/vroulet.cpp | 4 +- src/mame/misc/wildpkr.cpp | 16 +- src/mame/misc/xtom3d.cpp | 2 +- src/mame/misc/yuvomz80.cpp | 10 +- src/mame/misc/z80ne.cpp | 8 +- src/mame/mit/tx0.cpp | 28 +-- src/mame/mits/altair.cpp | 2 +- src/mame/mitsubishi/multi16.cpp | 8 +- src/mame/mitsubishi/multi8.cpp | 12 +- src/mame/mizar/mzr8105.cpp | 2 +- src/mame/motorola/ampscarp.cpp | 2 +- src/mame/motorola/exorciser.cpp | 16 +- src/mame/motorola/exorterm.cpp | 2 +- src/mame/motorola/mekd1.cpp | 6 +- src/mame/motorola/mekd2.cpp | 8 +- src/mame/motorola/mekd3.cpp | 14 +- src/mame/motorola/mekd4.cpp | 14 +- src/mame/motorola/mekd5.cpp | 6 +- src/mame/motorola/mvme147.cpp | 4 +- src/mame/motorola/mvme162.cpp | 2 +- src/mame/motorola/powerstack.cpp | 2 +- src/mame/motorola/sys1121.cpp | 2 +- src/mame/motorola/uchroma68.cpp | 8 +- src/mame/msx/msx.cpp | 98 ++++----- src/mame/msx/msx_matsushita.cpp | 2 +- src/mame/msx/msx_matsushita.h | 2 +- src/mame/msx/msx_s1985.cpp | 2 +- src/mame/msx/msx_s1985.h | 2 +- src/mame/msx/msx_systemflags.cpp | 2 +- src/mame/msx/msx_systemflags.h | 4 +- src/mame/multitech/mkit09.cpp | 4 +- src/mame/multitech/mpf1.cpp | 6 +- src/mame/mupid/mupid2.cpp | 8 +- src/mame/namco/20pacgal.cpp | 2 +- src/mame/namco/c117.cpp | 2 +- src/mame/namco/c117.h | 2 +- src/mame/namco/cgang.cpp | 4 +- src/mame/namco/dkmb.cpp | 4 +- src/mame/namco/gal3.cpp | 18 +- src/mame/namco/galaga.cpp | 4 +- src/mame/namco/gaplus.cpp | 12 +- src/mame/namco/geebee.cpp | 2 +- src/mame/namco/geebee.h | 2 +- src/mame/namco/kungfur.cpp | 2 +- src/mame/namco/mappy.cpp | 28 +-- src/mame/namco/namco06.cpp | 2 +- src/mame/namco/namco06.h | 2 +- src/mame/namco/namco50.cpp | 2 +- src/mame/namco/namco50.h | 2 +- src/mame/namco/namco51.cpp | 2 +- src/mame/namco/namco51.h | 2 +- src/mame/namco/namco52.cpp | 2 +- src/mame/namco/namco52.h | 2 +- src/mame/namco/namco53.cpp | 2 +- src/mame/namco/namco53.h | 2 +- src/mame/namco/namco54.cpp | 2 +- src/mame/namco/namco54.h | 2 +- src/mame/namco/namco62.cpp | 2 +- src/mame/namco/namco62.h | 2 +- src/mame/namco/namco65.cpp | 2 +- src/mame/namco/namco65.h | 2 +- src/mame/namco/namco68.cpp | 2 +- src/mame/namco/namco68.h | 2 +- src/mame/namco/namco_c116.cpp | 2 +- src/mame/namco/namco_c116.h | 2 +- src/mame/namco/namco_c123tmap.cpp | 2 +- src/mame/namco/namco_c123tmap.h | 2 +- src/mame/namco/namco_c139.cpp | 2 +- src/mame/namco/namco_c139.h | 2 +- src/mame/namco/namco_c148.cpp | 2 +- src/mame/namco/namco_c148.h | 4 +- src/mame/namco/namco_c169roz.cpp | 2 +- src/mame/namco/namco_c169roz.h | 2 +- src/mame/namco/namco_c45road.cpp | 2 +- src/mame/namco/namco_c45road.h | 2 +- src/mame/namco/namco_c67.cpp | 2 +- src/mame/namco/namco_c67.h | 2 +- src/mame/namco/namco_settings.cpp | 2 +- src/mame/namco/namco_settings.h | 2 +- src/mame/namco/namcofl.cpp | 8 +- src/mame/namco/namcoio.cpp | 8 +- src/mame/namco/namcoio.h | 8 +- src/mame/namco/namcoio_gearbox.cpp | 2 +- src/mame/namco/namcoio_gearbox.h | 2 +- src/mame/namco/namcomcu.cpp | 10 +- src/mame/namco/namcomcu.h | 10 +- src/mame/namco/namcona1.cpp | 2 +- src/mame/namco/namcond1.cpp | 4 +- src/mame/namco/namcops2.cpp | 2 +- src/mame/namco/namcos1.cpp | 12 +- src/mame/namco/namcos10.cpp | 16 +- src/mame/namco/namcos11.cpp | 28 +-- src/mame/namco/namcos12.cpp | 6 +- src/mame/namco/namcos2.cpp | 8 +- src/mame/namco/namcos21.cpp | 8 +- src/mame/namco/namcos21_3d.cpp | 2 +- src/mame/namco/namcos21_3d.h | 2 +- src/mame/namco/namcos21_c67.cpp | 10 +- src/mame/namco/namcos21_de.cpp | 24 +-- src/mame/namco/namcos21_dsp.cpp | 2 +- src/mame/namco/namcos21_dsp.h | 2 +- src/mame/namco/namcos21_dsp_c67.cpp | 6 +- src/mame/namco/namcos21_dsp_c67.h | 2 +- src/mame/namco/namcos23.cpp | 4 +- src/mame/namco/namcos2_roz.cpp | 2 +- src/mame/namco/namcos2_roz.h | 2 +- src/mame/namco/namcos2_sprite.cpp | 8 +- src/mame/namco/namcos2_sprite.h | 8 +- src/mame/namco/namcos86.cpp | 8 +- src/mame/namco/ns10crypt.cpp | 22 +-- src/mame/namco/ns10crypt.h | 22 +-- src/mame/namco/ns11prot.cpp | 20 +- src/mame/namco/ns11prot.h | 20 +- src/mame/namco/polepos.cpp | 6 +- src/mame/namco/polepos_a.cpp | 2 +- src/mame/namco/polepos_a.h | 2 +- src/mame/namco/rbowlorama.cpp | 2 +- src/mame/namco/starfield_05xx.cpp | 2 +- src/mame/namco/starfield_05xx.h | 2 +- src/mame/namco/tankbatt.cpp | 2 +- src/mame/namco/tceptor.cpp | 4 +- src/mame/namco/toypop.cpp | 8 +- src/mame/namco/turrett.cpp | 4 +- src/mame/namco/turrett.h | 2 +- src/mame/namco/turrett_a.cpp | 2 +- src/mame/namco/wacky_gator.cpp | 4 +- src/mame/namco/warpwarp_a.cpp | 2 +- src/mame/namco/warpwarp_a.h | 2 +- src/mame/namco/ygv608.cpp | 2 +- src/mame/namco/ygv608.h | 2 +- src/mame/nasco/crgolf.cpp | 2 +- src/mame/ncd/bert_m.cpp | 2 +- src/mame/ncd/bert_m.h | 2 +- src/mame/ncd/ncd68k.cpp | 8 +- src/mame/ncd/ncd88k.cpp | 14 +- src/mame/ncd/ncdmips.cpp | 2 +- src/mame/ncd/ncdppc.cpp | 2 +- src/mame/nec/apc.cpp | 14 +- src/mame/nec/pc100.cpp | 10 +- src/mame/nec/pc6001.cpp | 8 +- src/mame/nec/pc8001.cpp | 4 +- src/mame/nec/pc80s31k.cpp | 8 +- src/mame/nec/pc80s31k.h | 6 +- src/mame/nec/pc8401a.cpp | 6 +- src/mame/nec/pc8401a_v.cpp | 4 +- src/mame/nec/pc8801.cpp | 4 +- src/mame/nec/pc88va.cpp | 10 +- src/mame/nec/pc9801.cpp | 36 ++-- src/mame/nec/pc9801_cd.cpp | 2 +- src/mame/nec/pc9801_cd.h | 2 +- src/mame/nec/pc9801_kbd.cpp | 2 +- src/mame/nec/pc9801_kbd.h | 2 +- src/mame/nec/pc9801_memsw.cpp | 2 +- src/mame/nec/pc9801_memsw.h | 2 +- src/mame/nec/pc98ha.cpp | 12 +- src/mame/nec/pce.cpp | 12 +- src/mame/nec/pce_cd.cpp | 2 +- src/mame/nec/pce_cd.h | 2 +- src/mame/nec/pcfx.cpp | 4 +- src/mame/nec/tk80bs.cpp | 2 +- src/mame/neogeo/midas.cpp | 10 +- src/mame/neogeo/neogeo.cpp | 14 +- src/mame/neogeo/neogeo_spr.cpp | 6 +- src/mame/neogeo/neogeo_spr.h | 8 +- src/mame/neogeo/neogeocd.cpp | 2 +- src/mame/neogeo/neopcb.cpp | 6 +- src/mame/neogeo/ng_memcard.cpp | 2 +- src/mame/neogeo/ng_memcard.h | 2 +- src/mame/netronics/elf.cpp | 6 +- src/mame/next/next.cpp | 10 +- src/mame/next/nextkbd.cpp | 2 +- src/mame/next/nextkbd.h | 2 +- src/mame/next/nextmo.cpp | 2 +- src/mame/next/nextmo.h | 2 +- src/mame/nichibutsu/armedf.cpp | 12 +- src/mame/nichibutsu/cclimber.cpp | 6 +- src/mame/nichibutsu/cop01.cpp | 8 +- src/mame/nichibutsu/csplayh5.cpp | 6 +- src/mame/nichibutsu/galivan.cpp | 6 +- src/mame/nichibutsu/gomoku_a.cpp | 2 +- src/mame/nichibutsu/gomoku_a.h | 2 +- src/mame/nichibutsu/hyhoo.cpp | 6 +- src/mame/nichibutsu/nb1412m2.cpp | 2 +- src/mame/nichibutsu/nb1412m2.h | 2 +- src/mame/nichibutsu/nb1413m3.cpp | 2 +- src/mame/nichibutsu/nb1413m3.h | 4 +- src/mame/nichibutsu/nb1414m4.cpp | 2 +- src/mame/nichibutsu/nb1414m4.h | 2 +- src/mame/nichibutsu/nbmj8688.cpp | 16 +- src/mame/nichibutsu/nbmj8891.cpp | 4 +- src/mame/nichibutsu/nbmj8900.cpp | 4 +- src/mame/nichibutsu/nbmj8991.cpp | 12 +- src/mame/nichibutsu/nbmj9195.cpp | 8 +- src/mame/nichibutsu/nichisnd.cpp | 10 +- src/mame/nichibutsu/nichisnd.h | 2 +- src/mame/nichibutsu/nightgal.cpp | 4 +- src/mame/nichibutsu/niyanpai.cpp | 2 +- src/mame/nichibutsu/pastelg.cpp | 10 +- src/mame/nichibutsu/seicross.cpp | 2 +- src/mame/nichibutsu/tubep.cpp | 2 +- src/mame/nichibutsu/wiping_a.cpp | 2 +- src/mame/nichibutsu/wiping_a.h | 2 +- src/mame/nintendo/aleck64.cpp | 6 +- src/mame/nintendo/dkong_a.cpp | 2 +- src/mame/nintendo/gamecube.cpp | 2 +- src/mame/nintendo/gb.cpp | 4 +- src/mame/nintendo/gba.cpp | 10 +- src/mame/nintendo/m6502_swap_op_d2_d7.cpp | 2 +- src/mame/nintendo/m6502_swap_op_d2_d7.h | 2 +- src/mame/nintendo/m6502_swap_op_d5_d6.cpp | 4 +- src/mame/nintendo/m6502_swap_op_d5_d6.h | 4 +- src/mame/nintendo/m6502_vtscr.cpp | 2 +- src/mame/nintendo/m6502_vtscr.h | 2 +- src/mame/nintendo/mario.cpp | 2 +- src/mame/nintendo/mario_a.cpp | 6 +- src/mame/nintendo/n64.cpp | 6 +- src/mame/nintendo/n64.h | 8 +- src/mame/nintendo/n64_m.cpp | 10 +- src/mame/nintendo/n8080_a.cpp | 6 +- src/mame/nintendo/nds.cpp | 51 ++--- src/mame/nintendo/nds.h | 2 +- src/mame/nintendo/nes_vt09_soc.cpp | 4 +- src/mame/nintendo/nes_vt09_soc.h | 4 +- src/mame/nintendo/nes_vt32_soc.cpp | 6 +- src/mame/nintendo/nes_vt32_soc.h | 6 +- src/mame/nintendo/nes_vt369_vtunknown_soc.cpp | 18 +- src/mame/nintendo/nes_vt369_vtunknown_soc.h | 16 +- src/mame/nintendo/nes_vt_soc.cpp | 8 +- src/mame/nintendo/nes_vt_soc.h | 8 +- src/mame/nintendo/nss.cpp | 4 +- src/mame/nintendo/playch10.cpp | 6 +- src/mame/nintendo/pokemini.cpp | 4 +- src/mame/nintendo/popeye.cpp | 2 +- src/mame/nintendo/punchout.cpp | 4 +- src/mame/nintendo/vsnes.cpp | 2 +- src/mame/nintendo/vt1682.cpp | 12 +- src/mame/nintendo/vt1682_alu.cpp | 2 +- src/mame/nintendo/vt1682_alu.h | 2 +- src/mame/nintendo/vt1682_io.cpp | 2 +- src/mame/nintendo/vt1682_io.h | 2 +- src/mame/nintendo/vt1682_timer.cpp | 2 +- src/mame/nintendo/vt1682_timer.h | 2 +- src/mame/nintendo/vt1682_uio.cpp | 2 +- src/mame/nintendo/vt1682_uio.h | 2 +- src/mame/nintendo/vt_unknown.cpp | 2 +- src/mame/nix/fitfight.cpp | 10 +- src/mame/nmk/nmk004.cpp | 2 +- src/mame/nmk/nmk004.h | 2 +- src/mame/nmk/nmk16.cpp | 136 ++++++------- src/mame/nmk/nmk16spr.cpp | 2 +- src/mame/nmk/nmk16spr.h | 2 +- src/mame/nmk/powerins.cpp | 4 +- src/mame/nmk/quizpani.cpp | 4 +- src/mame/nokia/dbox.cpp | 4 +- src/mame/nokia/mikromik.cpp | 6 +- src/mame/nokia/mm1kb.cpp | 2 +- src/mame/nokia/mm1kb.h | 2 +- src/mame/nokia/nokia_3310.cpp | 2 +- src/mame/northstar/horizon.cpp | 4 +- src/mame/novag/cexpert.cpp | 2 +- src/mame/novag/diablo.cpp | 2 +- src/mame/novag/sexpert.cpp | 2 +- src/mame/novation/basssta.cpp | 4 +- src/mame/novation/drumsta.cpp | 4 +- src/mame/olivetti/m20.cpp | 12 +- src/mame/olivetti/m20_8086.cpp | 2 +- src/mame/olivetti/m20_8086.h | 4 +- src/mame/olivetti/m20_kbd.cpp | 4 +- src/mame/olivetti/m20_kbd.h | 2 +- src/mame/olivetti/m24.cpp | 18 +- src/mame/olivetti/m24_kbd.cpp | 2 +- src/mame/olivetti/m24_kbd.h | 2 +- src/mame/olivetti/m24_z8000.cpp | 6 +- src/mame/olivetti/m24_z8000.h | 2 +- src/mame/olivetti/olivpc1.cpp | 6 +- src/mame/olympia/dday.cpp | 6 +- src/mame/olympia/monzagp.cpp | 4 +- src/mame/olympia/portrait.cpp | 6 +- src/mame/olympia/vega.cpp | 6 +- src/mame/olympiaint/olyboss.cpp | 12 +- src/mame/olympiaint/olytext.cpp | 2 +- src/mame/olympiaint/peoplepc.cpp | 2 +- src/mame/omnibyte/ob68k1a.cpp | 12 +- src/mame/omori/spaceg.cpp | 2 +- src/mame/omron/luna_68k.cpp | 6 +- src/mame/orca/espial.cpp | 6 +- src/mame/orca/funkybee.cpp | 4 +- src/mame/orca/orca40c.cpp | 2 +- src/mame/orca/orca40c.h | 2 +- src/mame/orca/vastar.cpp | 2 +- src/mame/orca/zodiack.cpp | 2 +- src/mame/osborne/osbexec.cpp | 6 +- src/mame/osborne/osborne1.cpp | 2 +- src/mame/osborne/vixen.cpp | 2 +- src/mame/osi/osi.cpp | 26 +-- src/mame/pacific/mrflea.cpp | 16 +- src/mame/pacman/pacman.cpp | 6 +- src/mame/pacman/pengo.cpp | 2 +- src/mame/pacman/schick.cpp | 2 +- src/mame/palm/palm.cpp | 2 +- src/mame/palm/palmz22.cpp | 6 +- src/mame/pc/asst128.cpp | 10 +- src/mame/pc/at.cpp | 168 ++++++++-------- src/mame/pc/atpci.cpp | 44 ++--- src/mame/pc/calchase.cpp | 16 +- src/mame/pc/compc.cpp | 12 +- src/mame/pc/ct486.cpp | 20 +- src/mame/pc/ec184x.cpp | 24 +-- src/mame/pc/europc.cpp | 18 +- src/mame/pc/europc_kbd.cpp | 2 +- src/mame/pc/europc_kbd.h | 2 +- src/mame/pc/fruitpc.cpp | 8 +- src/mame/pc/genpc.cpp | 14 +- src/mame/pc/ibmpc.cpp | 28 +-- src/mame/pc/ibmpcjr.cpp | 8 +- src/mame/pc/igspc.cpp | 2 +- src/mame/pc/iskr103x.cpp | 14 +- src/mame/pc/mc1502.cpp | 12 +- src/mame/pc/nforcepc.cpp | 46 ++--- src/mame/pc/nforcepc.h | 22 +-- src/mame/pc/paokaipc.cpp | 8 +- src/mame/pc/pc.cpp | 110 +++++------ src/mame/pc/pc_t1t.cpp | 6 +- src/mame/pc/pc_t1t.h | 6 +- src/mame/pc/pcat_dyn.cpp | 12 +- src/mame/pc/pcat_nit.cpp | 4 +- src/mame/pc/pcipc.cpp | 34 ++-- src/mame/pc/pcxt.cpp | 18 +- src/mame/pc/poisk1.cpp | 14 +- src/mame/pc/ps2.cpp | 32 +-- src/mame/pc/quakeat.cpp | 2 +- src/mame/pc/queen.cpp | 2 +- src/mame/pc/sis630.cpp | 18 +- src/mame/pc/tandy1t.cpp | 48 ++--- src/mame/pc/tosh1000.cpp | 14 +- src/mame/pc/tosh1000_bram.cpp | 2 +- src/mame/pc/tosh1000_bram.h | 2 +- src/mame/pce/ggconnie.cpp | 6 +- src/mame/pce/paranoia.cpp | 2 +- src/mame/pce/tourvis.cpp | 2 +- src/mame/pce/uapce.cpp | 4 +- src/mame/philips/cdi.cpp | 10 +- src/mame/philips/cdicdic.cpp | 2 +- src/mame/philips/cdicdic.h | 2 +- src/mame/philips/cdislavehle.cpp | 2 +- src/mame/philips/cdislavehle.h | 2 +- src/mame/philips/mcd212.cpp | 2 +- src/mame/philips/mcd212.h | 4 +- src/mame/philips/minitel_2_rpic.cpp | 6 +- src/mame/philips/p2000t.cpp | 10 +- src/mame/philips/p2000t_mdcr.cpp | 2 +- src/mame/philips/p2000t_mdcr.h | 2 +- src/mame/philips/vg5k.cpp | 6 +- src/mame/phoenix/naughtyb.cpp | 2 +- src/mame/phoenix/phoenix.cpp | 2 +- src/mame/phoenix/phoenix_a.cpp | 2 +- src/mame/phoenix/phoenix_a.h | 2 +- src/mame/phoenix/pleiads.cpp | 8 +- src/mame/phoenix/pleiads.h | 8 +- src/mame/pinball/allied.cpp | 10 +- src/mame/pinball/alvg.cpp | 4 +- src/mame/pinball/atari_4x4.cpp | 6 +- src/mame/pinball/atari_s1.cpp | 2 +- src/mame/pinball/atari_s2.cpp | 4 +- src/mame/pinball/barni.cpp | 18 +- src/mame/pinball/bingo.cpp | 6 +- src/mame/pinball/by17.cpp | 6 +- src/mame/pinball/by35.cpp | 6 +- src/mame/pinball/by6803.cpp | 6 +- src/mame/pinball/byvid.cpp | 10 +- src/mame/pinball/capcom.cpp | 2 +- src/mame/pinball/de_3.cpp | 6 +- src/mame/pinball/decodmd1.cpp | 2 +- src/mame/pinball/decodmd1.h | 4 +- src/mame/pinball/decodmd2.cpp | 4 +- src/mame/pinball/decodmd2.h | 4 +- src/mame/pinball/decodmd3.cpp | 4 +- src/mame/pinball/decodmd3.h | 4 +- src/mame/pinball/decopincpu.cpp | 26 +-- src/mame/pinball/decopincpu.h | 22 +-- src/mame/pinball/gp_1.cpp | 6 +- src/mame/pinball/gp_2.cpp | 6 +- src/mame/pinball/gts1.cpp | 18 +- src/mame/pinball/gts3.cpp | 4 +- src/mame/pinball/gts3a.cpp | 2 +- src/mame/pinball/gts80.cpp | 6 +- src/mame/pinball/gts80a.cpp | 10 +- src/mame/pinball/gts80b.cpp | 10 +- src/mame/pinball/hankin.cpp | 14 +- src/mame/pinball/icecold.cpp | 10 +- src/mame/pinball/idsa.cpp | 6 +- src/mame/pinball/inder.cpp | 8 +- src/mame/pinball/inderp.cpp | 4 +- src/mame/pinball/jeutel.cpp | 6 +- src/mame/pinball/joctronic.cpp | 28 +-- src/mame/pinball/jp.cpp | 4 +- src/mame/pinball/jvh.cpp | 8 +- src/mame/pinball/kissproto.cpp | 2 +- src/mame/pinball/lancelot.cpp | 2 +- src/mame/pinball/lckydraw.cpp | 2 +- src/mame/pinball/ltd.cpp | 4 +- src/mame/pinball/macp.cpp | 6 +- src/mame/pinball/mephistp.cpp | 2 +- src/mame/pinball/micropin.cpp | 10 +- src/mame/pinball/missamer.cpp | 8 +- src/mame/pinball/mrgame.cpp | 8 +- src/mame/pinball/nsm.cpp | 2 +- src/mame/pinball/peyper.cpp | 10 +- src/mame/pinball/pinsnd88.cpp | 4 +- src/mame/pinball/pinsnd88.h | 4 +- src/mame/pinball/play_1.cpp | 6 +- src/mame/pinball/play_2.cpp | 8 +- src/mame/pinball/play_3.cpp | 6 +- src/mame/pinball/recel.cpp | 6 +- src/mame/pinball/rowamet.cpp | 6 +- src/mame/pinball/s11.cpp | 18 +- src/mame/pinball/s11a.cpp | 18 +- src/mame/pinball/s11b.cpp | 18 +- src/mame/pinball/s11c.cpp | 12 +- src/mame/pinball/s3.cpp | 10 +- src/mame/pinball/s4.cpp | 14 +- src/mame/pinball/s6.cpp | 12 +- src/mame/pinball/s7.cpp | 14 +- src/mame/pinball/s8.cpp | 14 +- src/mame/pinball/s9.cpp | 10 +- src/mame/pinball/sleic.cpp | 6 +- src/mame/pinball/spinb.cpp | 16 +- src/mame/pinball/spirit76.cpp | 4 +- src/mame/pinball/st_mp100.cpp | 10 +- src/mame/pinball/st_mp200.cpp | 20 +- src/mame/pinball/stargame.cpp | 6 +- src/mame/pinball/taito.cpp | 8 +- src/mame/pinball/techno.cpp | 4 +- src/mame/pinball/vd.cpp | 6 +- src/mame/pinball/whitestar.cpp | 4 +- src/mame/pinball/wms_shuffle.cpp | 24 +-- src/mame/pinball/wpc.cpp | 2 +- src/mame/pinball/wpc.h | 2 +- src/mame/pinball/wpc_95.cpp | 10 +- src/mame/pinball/wpc_an.cpp | 2 +- src/mame/pinball/wpc_dcs.cpp | 8 +- src/mame/pinball/wpc_dmd.cpp | 2 +- src/mame/pinball/wpc_dmd.h | 2 +- src/mame/pinball/wpc_dot.cpp | 4 +- src/mame/pinball/wpc_flip1.cpp | 4 +- src/mame/pinball/wpc_flip2.cpp | 4 +- src/mame/pinball/wpc_lamp.cpp | 2 +- src/mame/pinball/wpc_lamp.h | 2 +- src/mame/pinball/wpc_out.cpp | 2 +- src/mame/pinball/wpc_out.h | 4 +- src/mame/pinball/wpc_pic.cpp | 2 +- src/mame/pinball/wpc_pic.h | 2 +- src/mame/pinball/wpc_s.cpp | 10 +- src/mame/pinball/wpc_shift.cpp | 2 +- src/mame/pinball/wpc_shift.h | 2 +- src/mame/pinball/wpcsnd.cpp | 8 +- src/mame/pinball/wpcsnd.h | 2 +- src/mame/pinball/zac_1.cpp | 6 +- src/mame/playmark/playmark.cpp | 14 +- src/mame/playmark/sderby.cpp | 20 +- src/mame/playmark/sslam.cpp | 12 +- src/mame/positron/positron.cpp | 10 +- src/mame/promat/gstream.cpp | 6 +- src/mame/psikyo/psikyo.cpp | 2 +- src/mame/psikyo/psikyosh.h | 2 +- src/mame/psion/etna.cpp | 2 +- src/mame/psion/etna.h | 2 +- src/mame/psion/psion.cpp | 8 +- src/mame/psion/psion5.cpp | 2 +- src/mame/psion/psion_pack.cpp | 2 +- src/mame/psion/psion_pack.h | 2 +- src/mame/quantel/dpb7000.cpp | 6 +- src/mame/qume/qvt102.cpp | 2 +- src/mame/qume/qvt190.cpp | 4 +- src/mame/qume/qvt70.cpp | 4 +- src/mame/ramtek/ramtek.cpp | 4 +- src/mame/ramtek/starcrus.cpp | 2 +- src/mame/rare/kinst.cpp | 4 +- src/mame/rare/xtheball.cpp | 6 +- src/mame/rca/studio2.cpp | 10 +- src/mame/regnecentralen/rc702.cpp | 8 +- src/mame/regnecentralen/rc759.cpp | 6 +- src/mame/regnecentralen/rc759_kbd.cpp | 2 +- src/mame/regnecentralen/rc759_kbd.h | 2 +- src/mame/rm/rm380z.cpp | 4 +- src/mame/rm/rmnimbus.cpp | 14 +- src/mame/rm/rmnkbd.cpp | 2 +- src/mame/rm/rmnkbd.h | 2 +- src/mame/robotron/a5105.cpp | 4 +- src/mame/robotron/a7150.cpp | 10 +- src/mame/robotron/k1003.cpp | 2 +- src/mame/robotron/rt1715.cpp | 4 +- src/mame/robotron/z9001.cpp | 4 +- src/mame/rockwell/aim65.cpp | 2 +- src/mame/rockwell/aim65_40.cpp | 10 +- src/mame/roland/alphajuno.cpp | 4 +- src/mame/roland/bu3905.cpp | 2 +- src/mame/roland/bu3905.h | 2 +- src/mame/roland/jx8p_synth.cpp | 10 +- src/mame/roland/jx8p_synth.h | 6 +- src/mame/roland/mb62h195.cpp | 2 +- src/mame/roland/mb62h195.h | 2 +- src/mame/roland/mb63h114.cpp | 2 +- src/mame/roland/mb63h114.h | 2 +- src/mame/roland/mb63h149.cpp | 6 +- src/mame/roland/mb63h149.h | 6 +- src/mame/roland/mb87013.cpp | 2 +- src/mame/roland/mb87013.h | 2 +- src/mame/roland/pg200.cpp | 2 +- src/mame/roland/pg200.h | 2 +- src/mame/roland/roland_cm32p.cpp | 2 +- src/mame/roland/roland_d10.cpp | 2 +- src/mame/roland/roland_mt32.cpp | 2 +- src/mame/roland/roland_ra30.cpp | 2 +- src/mame/roland/roland_s10.cpp | 2 +- src/mame/roland/roland_tb303.cpp | 2 +- src/mame/roland/roland_tr606.cpp | 2 +- src/mame/roland/roland_tr808.cpp | 2 +- src/mame/roland/sa16.cpp | 6 +- src/mame/roland/sa16.h | 6 +- src/mame/rolm/r9751.cpp | 10 +- src/mame/sage/sage2.cpp | 12 +- src/mame/saitek/ccompan.cpp | 4 +- src/mame/saitek/cp2000.cpp | 4 +- src/mame/saitek/delta1.cpp | 4 +- src/mame/saitek/exchess.cpp | 4 +- src/mame/saitek/intchess.cpp | 2 +- src/mame/saitek/minichess.cpp | 2 +- src/mame/saitek/prschess.cpp | 2 +- src/mame/saitek/renaissance.cpp | 2 +- src/mame/saitek/schess.cpp | 2 +- src/mame/saitek/simultano.cpp | 2 +- src/mame/saitek/ssystem3.cpp | 8 +- src/mame/saitek/superstar.cpp | 2 +- src/mame/sanritsu/appoooh.cpp | 2 +- src/mame/sanritsu/mermaid.cpp | 6 +- src/mame/sanritsu/mjkjidai.cpp | 2 +- src/mame/sanritsu/ron.cpp | 2 +- src/mame/sanyo/mbc200.cpp | 8 +- src/mame/sanyo/mbc55x.cpp | 6 +- src/mame/sanyo/mbc55x_kbd.cpp | 4 +- src/mame/sanyo/mbc55x_kbd.h | 2 +- src/mame/sanyo/phc25.cpp | 2 +- src/mame/saturn/st17xx.cpp | 2 +- src/mame/sega/315-5838_317-0229_comp.cpp | 2 +- src/mame/sega/315-5838_317-0229_comp.h | 2 +- src/mame/sega/315-5881_crypt.cpp | 2 +- src/mame/sega/315-5881_crypt.h | 2 +- src/mame/sega/315-6154.cpp | 2 +- src/mame/sega/315-6154.h | 2 +- src/mame/sega/315_5195.cpp | 2 +- src/mame/sega/315_5195.h | 4 +- src/mame/sega/315_5296.cpp | 2 +- src/mame/sega/315_5296.h | 2 +- src/mame/sega/315_5338a.cpp | 2 +- src/mame/sega/315_5338a.h | 2 +- src/mame/sega/315_5649.cpp | 2 +- src/mame/sega/315_5649.h | 2 +- src/mame/sega/awboard.cpp | 2 +- src/mame/sega/awboard.h | 2 +- src/mame/sega/bingoc.cpp | 22 +-- src/mame/sega/bingoct.cpp | 2 +- src/mame/sega/bingoct.h | 2 +- src/mame/sega/calorie.cpp | 10 +- src/mame/sega/chihiro.cpp | 24 +-- src/mame/sega/coolridr.cpp | 2 +- src/mame/sega/dc-ctrl.cpp | 6 +- src/mame/sega/dc-ctrl.h | 10 +- src/mame/sega/dc_atomiswave.cpp | 2 +- src/mame/sega/dc_g2if.cpp | 2 +- src/mame/sega/dc_g2if.h | 2 +- src/mame/sega/dccons.cpp | 4 +- src/mame/sega/dsbz80.cpp | 8 +- src/mame/sega/dsbz80.h | 2 +- src/mame/sega/fd1089.cpp | 6 +- src/mame/sega/fd1089.h | 6 +- src/mame/sega/fd1094.cpp | 2 +- src/mame/sega/fd1094.h | 2 +- src/mame/sega/flashbeats.cpp | 4 +- src/mame/sega/gpworld.cpp | 2 +- src/mame/sega/gunsense.cpp | 4 +- src/mame/sega/gunsense.h | 2 +- src/mame/sega/hshavoc.cpp | 2 +- src/mame/sega/jvs13551.cpp | 4 +- src/mame/sega/jvs13551.h | 4 +- src/mame/sega/kopunch.cpp | 2 +- src/mame/sega/lindbergh.cpp | 44 ++--- src/mame/sega/m1comm.cpp | 8 +- src/mame/sega/m1comm.h | 2 +- src/mame/sega/m2comm.cpp | 2 +- src/mame/sega/m2comm.h | 2 +- src/mame/sega/m3comm.cpp | 4 +- src/mame/sega/m3comm.h | 2 +- src/mame/sega/maple-dc.cpp | 2 +- src/mame/sega/maple-dc.h | 4 +- src/mame/sega/mapledev.cpp | 2 +- src/mame/sega/mapledev.h | 2 +- src/mame/sega/mdconsole.cpp | 18 +- src/mame/sega/megacd.cpp | 12 +- src/mame/sega/megacd.h | 8 +- src/mame/sega/megadriv.h | 4 +- src/mame/sega/megaplay.cpp | 2 +- src/mame/sega/megatech.cpp | 2 +- src/mame/sega/mie.cpp | 4 +- src/mame/sega/mie.h | 6 +- src/mame/sega/model1.cpp | 28 +-- src/mame/sega/model1io.cpp | 4 +- src/mame/sega/model1io.h | 2 +- src/mame/sega/model1io2.cpp | 6 +- src/mame/sega/model1io2.h | 2 +- src/mame/sega/model2.cpp | 94 ++++----- src/mame/sega/model3.cpp | 30 +-- src/mame/sega/monacogp.cpp | 4 +- src/mame/sega/naomi.cpp | 10 +- src/mame/sega/naomibd.cpp | 2 +- src/mame/sega/naomibd.h | 2 +- src/mame/sega/naomig1.cpp | 2 +- src/mame/sega/naomig1.h | 2 +- src/mame/sega/naomigd.cpp | 16 +- src/mame/sega/naomigd.h | 10 +- src/mame/sega/naomim1.cpp | 2 +- src/mame/sega/naomim1.h | 4 +- src/mame/sega/naomim2.cpp | 4 +- src/mame/sega/naomim2.h | 4 +- src/mame/sega/naomim4.cpp | 2 +- src/mame/sega/naomim4.h | 4 +- src/mame/sega/naomirom.cpp | 2 +- src/mame/sega/naomirom.h | 4 +- src/mame/sega/powervr2.cpp | 2 +- src/mame/sega/powervr2.h | 2 +- src/mame/sega/s32comm.cpp | 2 +- src/mame/sega/s32comm.h | 2 +- src/mame/sega/saturn.cpp | 14 +- src/mame/sega/saturn_cdb.cpp | 2 +- src/mame/sega/saturn_cdb.h | 2 +- src/mame/sega/sega16sp.cpp | 18 +- src/mame/sega/sega16sp.h | 20 +- src/mame/sega/sega_beena.cpp | 2 +- src/mame/sega/sega_sawatte.cpp | 2 +- src/mame/sega/segabb.cpp | 2 +- src/mame/sega/segabb.h | 2 +- src/mame/sega/segabill.cpp | 2 +- src/mame/sega/segabill.h | 2 +- src/mame/sega/segacoin.cpp | 14 +- src/mame/sega/segafruit.cpp | 2 +- src/mame/sega/segag80.cpp | 12 +- src/mame/sega/segag80.h | 10 +- src/mame/sega/segag80r.cpp | 6 +- src/mame/sega/segag80r.h | 2 +- src/mame/sega/segag80r_a.cpp | 12 +- src/mame/sega/segag80r_a.h | 4 +- src/mame/sega/segag80v.cpp | 18 +- src/mame/sega/segahang.cpp | 12 +- src/mame/sega/segaic16.cpp | 2 +- src/mame/sega/segaic16.h | 4 +- src/mame/sega/segaic16_m.cpp | 6 +- src/mame/sega/segaic16_m.h | 6 +- src/mame/sega/segaic16_road.cpp | 2 +- src/mame/sega/segaic16_road.h | 2 +- src/mame/sega/segaic24.cpp | 6 +- src/mame/sega/segaic24.h | 8 +- src/mame/sega/segajw.cpp | 14 +- src/mame/sega/segald.cpp | 2 +- src/mame/sega/segaorun.cpp | 6 +- src/mame/sega/segapm.cpp | 2 +- src/mame/sega/segas16a.cpp | 14 +- src/mame/sega/segas16b.cpp | 16 +- src/mame/sega/segas16b_isgsm.cpp | 2 +- src/mame/sega/segas18.cpp | 18 +- src/mame/sega/segas18_astormbl.cpp | 12 +- src/mame/sega/segas24.cpp | 12 +- src/mame/sega/segas32.cpp | 82 ++++---- src/mame/sega/segas32.h | 30 +-- src/mame/sega/segashiobd.cpp | 2 +- src/mame/sega/segashiobd.h | 2 +- src/mame/sega/segasm1.cpp | 10 +- src/mame/sega/segaspeech.cpp | 4 +- src/mame/sega/segaspeech.h | 2 +- src/mame/sega/segattl.cpp | 4 +- src/mame/sega/segaufo.cpp | 2 +- src/mame/sega/segausb.cpp | 18 +- src/mame/sega/segausb.h | 10 +- src/mame/sega/segaxbd.cpp | 60 +++--- src/mame/sega/segaxbd.h | 20 +- src/mame/sega/segaybd.cpp | 18 +- src/mame/sega/sg1000.cpp | 4 +- src/mame/sega/shtzone.cpp | 2 +- src/mame/sega/sms.cpp | 8 +- src/mame/sega/speedbsk.cpp | 14 +- src/mame/sega/stv.cpp | 16 +- src/mame/sega/stv.h | 4 +- src/mame/sega/suprloco.cpp | 8 +- src/mame/sega/system1.cpp | 4 +- src/mame/sega/system16.cpp | 64 +++--- src/mame/sega/timetrv.cpp | 6 +- src/mame/sega/triforce.cpp | 2 +- src/mame/sega/vicdual-97269pb.cpp | 2 +- src/mame/sega/vicdual-97269pb.h | 2 +- src/mame/sega/vicdual-97271p.cpp | 2 +- src/mame/sega/vicdual-97271p.h | 2 +- src/mame/sega/vicdual.cpp | 12 +- src/mame/sega/vicdual_a.cpp | 8 +- src/mame/sega/vicdual_a.h | 6 +- src/mame/sega/y2.cpp | 2 +- src/mame/seibu/airraid.cpp | 6 +- src/mame/seibu/airraid_dev.cpp | 2 +- src/mame/seibu/airraid_dev.h | 2 +- src/mame/seibu/banprestoms.cpp | 4 +- src/mame/seibu/bloodbro.cpp | 4 +- src/mame/seibu/cabal.cpp | 4 +- src/mame/seibu/darkmist.cpp | 4 +- src/mame/seibu/dcon.cpp | 16 +- src/mame/seibu/deadang.cpp | 4 +- src/mame/seibu/dynduke.cpp | 6 +- src/mame/seibu/goodejan.cpp | 4 +- src/mame/seibu/legionna.cpp | 36 ++-- src/mame/seibu/metlfrzr.cpp | 2 +- src/mame/seibu/mustache.cpp | 4 +- src/mame/seibu/panicr.cpp | 2 +- src/mame/seibu/r2dx_v33.cpp | 6 +- src/mame/seibu/raiden.cpp | 6 +- src/mame/seibu/raiden2.cpp | 12 +- src/mame/seibu/seibu_crtc.cpp | 2 +- src/mame/seibu/seibu_crtc.h | 2 +- src/mame/seibu/seibucats.cpp | 4 +- src/mame/seibu/seibucop.cpp | 2 +- src/mame/seibu/seibucop.h | 2 +- src/mame/seibu/seibuspi.cpp | 4 +- src/mame/seibu/seicopbl.cpp | 2 +- src/mame/seibu/seicopbl.h | 4 +- src/mame/seibu/seicupbl.cpp | 2 +- src/mame/seibu/sengokmj.cpp | 6 +- src/mame/seibu/stfight.cpp | 4 +- src/mame/seibu/stfight_dev.cpp | 2 +- src/mame/seibu/stfight_dev.h | 2 +- src/mame/seibu/t5182.cpp | 2 +- src/mame/seibu/t5182.h | 2 +- src/mame/seibu/toki.cpp | 12 +- src/mame/sequential/prophet600.cpp | 2 +- src/mame/seta/albazc.cpp | 4 +- src/mame/seta/jclub2.cpp | 14 +- src/mame/seta/macs.cpp | 2 +- src/mame/seta/seta.cpp | 148 +++++++------- src/mame/seta/seta2.cpp | 12 +- src/mame/seta/simple_st0016.cpp | 2 +- src/mame/seta/srmp2.cpp | 8 +- src/mame/seta/srmp6.cpp | 2 +- src/mame/seta/ssv.cpp | 16 +- src/mame/seta/st0016.cpp | 2 +- src/mame/seta/st0020.cpp | 2 +- src/mame/seta/st0020.h | 2 +- src/mame/seta/x1_012.cpp | 2 +- src/mame/seta/x1_012.h | 4 +- src/mame/sfrj/galeb.cpp | 8 +- src/mame/sfrj/tim100.cpp | 8 +- src/mame/sgi/4dpi.cpp | 6 +- src/mame/sgi/crime.cpp | 2 +- src/mame/sgi/crime.h | 4 +- src/mame/sgi/hal2.cpp | 6 +- src/mame/sgi/hal2.h | 7 +- src/mame/sgi/hpc1.cpp | 14 +- src/mame/sgi/hpc1.h | 4 +- src/mame/sgi/hpc3.cpp | 2 +- src/mame/sgi/hpc3.h | 4 +- src/mame/sgi/indigo.cpp | 2 +- src/mame/sgi/indy_indigo2.cpp | 20 +- src/mame/sgi/ioc2.cpp | 8 +- src/mame/sgi/ioc2.h | 10 +- src/mame/sgi/iris3130.cpp | 4 +- src/mame/sgi/light.cpp | 2 +- src/mame/sgi/light.h | 7 +- src/mame/sgi/mace.cpp | 2 +- src/mame/sgi/mace.h | 4 +- src/mame/sgi/o2.cpp | 2 +- src/mame/sgi/sgi.cpp | 2 +- src/mame/sgi/sgi.h | 4 +- src/mame/sgi/sgi_ge5.cpp | 2 +- src/mame/sgi/sgi_ge5.h | 2 +- src/mame/sgi/sgi_gr1.cpp | 4 +- src/mame/sgi/sgi_gr1.h | 2 +- src/mame/sgi/sgi_re2.cpp | 2 +- src/mame/sgi/sgi_re2.h | 2 +- src/mame/sgi/sgi_xmap2.cpp | 2 +- src/mame/sgi/sgi_xmap2.h | 2 +- src/mame/sgi/vino.cpp | 2 +- src/mame/sgi/vino.h | 2 +- src/mame/shared/alpha68k_palette.cpp | 2 +- src/mame/shared/alpha68k_palette.h | 2 +- src/mame/shared/ballysound.cpp | 14 +- src/mame/shared/ballysound.h | 2 +- src/mame/shared/cage.cpp | 6 +- src/mame/shared/cage.h | 6 +- src/mame/shared/cclimber_a.cpp | 2 +- src/mame/shared/cclimber_a.h | 2 +- src/mame/shared/dcs.cpp | 24 +-- src/mame/shared/dcs.h | 24 +-- src/mame/shared/decobsmt.cpp | 2 +- src/mame/shared/decobsmt.h | 2 +- src/mame/shared/decospr.cpp | 2 +- src/mame/shared/decospr.h | 2 +- src/mame/shared/efo_zsu.cpp | 10 +- src/mame/shared/efo_zsu.h | 8 +- src/mame/shared/exidysound.cpp | 26 +-- src/mame/shared/exidysound.h | 14 +- src/mame/shared/fruitsamples.cpp | 2 +- src/mame/shared/fruitsamples.h | 2 +- src/mame/shared/gottlieb_a.cpp | 48 ++--- src/mame/shared/gottlieb_a.h | 24 +-- src/mame/shared/inder_vid.cpp | 4 +- src/mame/shared/inder_vid.h | 2 +- src/mame/shared/isbc_215g.cpp | 10 +- src/mame/shared/isbc_215g.h | 6 +- src/mame/shared/mega32x.cpp | 16 +- src/mame/shared/mega32x.h | 10 +- src/mame/shared/megacdcd.cpp | 2 +- src/mame/shared/megacdcd.h | 2 +- src/mame/shared/mitcrt.cpp | 2 +- src/mame/shared/mitcrt.h | 2 +- src/mame/shared/ms7004.cpp | 4 +- src/mame/shared/ms7004.h | 2 +- src/mame/shared/namco_c355spr.cpp | 4 +- src/mame/shared/namco_c355spr.h | 4 +- src/mame/shared/pcshare.cpp | 18 +- src/mame/shared/rax.cpp | 2 +- src/mame/shared/rax.h | 2 +- src/mame/shared/s11c_bg.cpp | 18 +- src/mame/shared/s11c_bg.h | 12 +- src/mame/shared/sec.cpp | 2 +- src/mame/shared/sec.h | 2 +- src/mame/shared/segam1audio.cpp | 6 +- src/mame/shared/segam1audio.h | 2 +- src/mame/shared/seibusound.cpp | 6 +- src/mame/shared/seibusound.h | 8 +- src/mame/shared/snk68_spr.cpp | 2 +- src/mame/shared/snk68_spr.h | 2 +- src/mame/shared/taito68705.cpp | 6 +- src/mame/shared/taito68705.h | 10 +- src/mame/shared/taitosnd.cpp | 6 +- src/mame/shared/taitosnd.h | 6 +- src/mame/shared/tecmo_spr.cpp | 2 +- src/mame/shared/tecmo_spr.h | 2 +- src/mame/shared/teleprinter.cpp | 6 +- src/mame/shared/teleprinter.h | 2 +- src/mame/shared/timeplt_a.cpp | 6 +- src/mame/shared/timeplt_a.h | 6 +- src/mame/shared/vboysound.cpp | 10 +- src/mame/shared/vboysound.h | 2 +- src/mame/shared/vt100_kbd.cpp | 8 +- src/mame/shared/vt100_kbd.h | 6 +- src/mame/shared/williamssound.cpp | 54 ++--- src/mame/shared/williamssound.h | 14 +- src/mame/shared/wswansound.cpp | 2 +- src/mame/shared/wswansound.h | 2 +- src/mame/shared/xbox.cpp | 24 +-- src/mame/shared/xbox.h | 8 +- src/mame/shared/xbox_pci.cpp | 46 ++--- src/mame/shared/xbox_pci.h | 44 ++--- src/mame/shared/xbox_usb.cpp | 4 +- src/mame/shared/xbox_usb.h | 6 +- src/mame/sharp/fontwriter.cpp | 4 +- src/mame/sharp/mz2000.cpp | 4 +- src/mame/sharp/mz2500.cpp | 12 +- src/mame/sharp/mz3500.cpp | 6 +- src/mame/sharp/mz6500.cpp | 2 +- src/mame/sharp/mz700.cpp | 2 +- src/mame/sharp/mz80.cpp | 2 +- src/mame/sharp/pce220.cpp | 4 +- src/mame/sharp/pce220_ser.cpp | 2 +- src/mame/sharp/pce220_ser.h | 2 +- src/mame/sharp/pocketc.cpp | 8 +- src/mame/sharp/wizard.cpp | 2 +- src/mame/sharp/x1.cpp | 2 +- src/mame/sharp/x1.h | 2 +- src/mame/sharp/x1_m.cpp | 2 +- src/mame/sharp/x1twin.cpp | 2 +- src/mame/sharp/x68k.cpp | 4 +- src/mame/sharp/x68k_crtc.cpp | 6 +- src/mame/sharp/x68k_crtc.h | 6 +- src/mame/sharp/x68k_hdc.cpp | 2 +- src/mame/sharp/x68k_hdc.h | 2 +- src/mame/sharp/x68k_kbd.cpp | 6 +- src/mame/sharp/x68k_kbd.h | 2 +- src/mame/siemens/bitel.cpp | 8 +- src/mame/siemens/pcd.cpp | 14 +- src/mame/siemens/pcd.h | 6 +- src/mame/siemens/pcd_kbd.cpp | 4 +- src/mame/siemens/pcd_kbd.h | 2 +- src/mame/siemens/pcd_v.cpp | 8 +- src/mame/siemens/pg685.cpp | 28 +-- src/mame/sigma/nyny.cpp | 6 +- src/mame/sigma/r2dtank.cpp | 6 +- src/mame/sigma/sigma21.cpp | 6 +- src/mame/sigma/sigmab98.cpp | 6 +- src/mame/sigma/spiders.cpp | 16 +- src/mame/sinclair/atm.cpp | 2 +- src/mame/sinclair/beta_m.cpp | 2 +- src/mame/sinclair/beta_m.h | 2 +- src/mame/sinclair/elwro800.cpp | 2 +- src/mame/sinclair/glukrs.cpp | 2 +- src/mame/sinclair/glukrs.h | 2 +- src/mame/sinclair/pentagon.cpp | 2 +- src/mame/sinclair/qimi.cpp | 2 +- src/mame/sinclair/qimi.h | 2 +- src/mame/sinclair/ql.cpp | 2 +- src/mame/sinclair/scorpion.cpp | 2 +- src/mame/sinclair/tsconf.cpp | 4 +- src/mame/sinclair/tsconfdma.cpp | 2 +- src/mame/sinclair/tsconfdma.h | 2 +- src/mame/sinclair/zx8301.cpp | 2 +- src/mame/sinclair/zx8301.h | 4 +- src/mame/sinclair/zx8302.cpp | 2 +- src/mame/sinclair/zx8302.h | 2 +- src/mame/skeleton/airbase99.cpp | 6 +- src/mame/skeleton/alfaskop41xx.cpp | 12 +- src/mame/skeleton/alfaskop_s41_kb.h | 2 +- src/mame/skeleton/alphasma.cpp | 4 +- src/mame/skeleton/alphasma3k.cpp | 6 +- src/mame/skeleton/ampex.cpp | 2 +- src/mame/skeleton/ampex210_kbd.cpp | 2 +- src/mame/skeleton/ampex210_kbd.h | 2 +- src/mame/skeleton/anzterm.cpp | 10 +- src/mame/skeleton/attache.cpp | 2 +- src/mame/skeleton/ax20.cpp | 2 +- src/mame/skeleton/basf7100.cpp | 12 +- src/mame/skeleton/basf7100_kbd.cpp | 2 +- src/mame/skeleton/basf7100_kbd.h | 2 +- src/mame/skeleton/bitgraph.cpp | 16 +- src/mame/skeleton/blit.cpp | 6 +- src/mame/skeleton/br8641.cpp | 2 +- src/mame/skeleton/busicom.cpp | 2 +- src/mame/skeleton/c2color.cpp | 2 +- src/mame/skeleton/candela.cpp | 20 +- src/mame/skeleton/cd100.cpp | 2 +- src/mame/skeleton/cd2650.cpp | 4 +- src/mame/skeleton/ckz80.cpp | 2 +- src/mame/skeleton/consola_emt.cpp | 2 +- src/mame/skeleton/cortex.cpp | 4 +- src/mame/skeleton/cosmicos.cpp | 2 +- src/mame/skeleton/cp1.cpp | 4 +- src/mame/skeleton/ct909e_segadvd.cpp | 2 +- src/mame/skeleton/cxhumax.cpp | 6 +- src/mame/skeleton/daruma.cpp | 2 +- src/mame/skeleton/datacast.cpp | 10 +- src/mame/skeleton/design.cpp | 2 +- src/mame/skeleton/didact.cpp | 26 +-- src/mame/skeleton/digel804.cpp | 4 +- src/mame/skeleton/digilog320.cpp | 4 +- src/mame/skeleton/digilog_kbd.cpp | 2 +- src/mame/skeleton/digilog_kbd.h | 2 +- src/mame/skeleton/dim68k.cpp | 4 +- src/mame/skeleton/dm7000.cpp | 2 +- src/mame/skeleton/dmv.cpp | 6 +- src/mame/skeleton/dmv_keyb.cpp | 2 +- src/mame/skeleton/dmv_keyb.h | 2 +- src/mame/skeleton/dps1.cpp | 6 +- src/mame/skeleton/e100.cpp | 6 +- src/mame/skeleton/easy_karaoke.cpp | 2 +- src/mame/skeleton/elzet80.cpp | 10 +- src/mame/skeleton/epic14e.cpp | 2 +- src/mame/skeleton/eurit.cpp | 6 +- src/mame/skeleton/eurocom2.cpp | 12 +- src/mame/skeleton/fanucspmg.cpp | 18 +- src/mame/skeleton/fc100.cpp | 2 +- src/mame/skeleton/fk1.cpp | 4 +- src/mame/skeleton/ft68m.cpp | 2 +- src/mame/skeleton/gimix.cpp | 16 +- src/mame/skeleton/gm1000.cpp | 4 +- src/mame/skeleton/goupil.cpp | 2 +- src/mame/skeleton/grfd2301.cpp | 2 +- src/mame/skeleton/hazeltin.cpp | 8 +- src/mame/skeleton/hazl1420.cpp | 4 +- src/mame/skeleton/hohnadam.cpp | 6 +- src/mame/skeleton/hprot1.cpp | 2 +- src/mame/skeleton/ht68k.cpp | 2 +- src/mame/skeleton/i7000.cpp | 4 +- src/mame/skeleton/icatel.cpp | 2 +- src/mame/skeleton/icebox.cpp | 4 +- src/mame/skeleton/iez80.cpp | 12 +- src/mame/skeleton/if800.cpp | 4 +- src/mame/skeleton/imsai.cpp | 6 +- src/mame/skeleton/indiana.cpp | 8 +- src/mame/skeleton/itt1700_kbd.cpp | 2 +- src/mame/skeleton/itt1700_kbd.h | 2 +- src/mame/skeleton/itt3030.cpp | 2 +- src/mame/skeleton/itt9216.cpp | 4 +- src/mame/skeleton/jonos.cpp | 2 +- src/mame/skeleton/juku.cpp | 18 +- src/mame/skeleton/junior80.cpp | 14 +- src/mame/skeleton/lee1214.cpp | 2 +- src/mame/skeleton/lee1220.cpp | 8 +- src/mame/skeleton/lms46.cpp | 4 +- src/mame/skeleton/mccpm.cpp | 2 +- src/mame/skeleton/mes.cpp | 8 +- src/mame/skeleton/mfabfz.cpp | 2 +- src/mame/skeleton/mice.cpp | 2 +- src/mame/skeleton/micral.cpp | 4 +- src/mame/skeleton/micromon.cpp | 2 +- src/mame/skeleton/micronic.cpp | 2 +- src/mame/skeleton/milwaukee.cpp | 12 +- src/mame/skeleton/mindset.cpp | 22 +-- src/mame/skeleton/mini2440.cpp | 10 +- src/mame/skeleton/miniframe.cpp | 8 +- src/mame/skeleton/ml20.cpp | 2 +- src/mame/skeleton/mmd1.cpp | 2 +- src/mame/skeleton/mmd2.cpp | 2 +- src/mame/skeleton/mod8.cpp | 4 +- src/mame/skeleton/modellot.cpp | 2 +- src/mame/skeleton/ms9540.cpp | 4 +- src/mame/skeleton/mtd1256.cpp | 2 +- src/mame/skeleton/mx2178.cpp | 4 +- src/mame/skeleton/mycom.cpp | 2 +- src/mame/skeleton/ngen.cpp | 32 +-- src/mame/skeleton/ngen_kb.cpp | 6 +- src/mame/skeleton/ngen_kb.h | 2 +- src/mame/skeleton/onyx.cpp | 6 +- src/mame/skeleton/p8k.cpp | 24 +-- src/mame/skeleton/palestra.cpp | 4 +- src/mame/skeleton/pdt3100.cpp | 2 +- src/mame/skeleton/pes.cpp | 4 +- src/mame/skeleton/philipsbo.cpp | 4 +- src/mame/skeleton/picno.cpp | 2 +- src/mame/skeleton/plan80.cpp | 2 +- src/mame/skeleton/pm68k.cpp | 6 +- src/mame/skeleton/pockchal.cpp | 2 +- src/mame/skeleton/proteus3.cpp | 8 +- src/mame/skeleton/pt68k4.cpp | 38 ++-- src/mame/skeleton/ptcsol.cpp | 6 +- src/mame/skeleton/pv9234.cpp | 2 +- src/mame/skeleton/qtsbc.cpp | 2 +- src/mame/skeleton/rvoice.cpp | 4 +- src/mame/skeleton/sacstate.cpp | 4 +- src/mame/skeleton/sansa_fuze.cpp | 2 +- src/mame/skeleton/sartorius.cpp | 2 +- src/mame/skeleton/sbrain.cpp | 4 +- src/mame/skeleton/scopus.cpp | 6 +- src/mame/skeleton/sh4robot.cpp | 2 +- src/mame/skeleton/shine.cpp | 8 +- src/mame/skeleton/slsstars.cpp | 2 +- src/mame/skeleton/softbox.cpp | 4 +- src/mame/skeleton/squale.cpp | 6 +- src/mame/skeleton/swyft.cpp | 2 +- src/mame/skeleton/sys2900.cpp | 8 +- src/mame/skeleton/sys9002.cpp | 6 +- src/mame/skeleton/systec.cpp | 2 +- src/mame/skeleton/tavernie.cpp | 14 +- src/mame/skeleton/telex274.cpp | 10 +- src/mame/skeleton/terak.cpp | 2 +- src/mame/skeleton/terco.cpp | 6 +- src/mame/skeleton/terminal.cpp | 2 +- src/mame/skeleton/testpat.cpp | 6 +- src/mame/skeleton/ti630.cpp | 2 +- src/mame/skeleton/tk635.cpp | 2 +- src/mame/skeleton/tr175.cpp | 4 +- src/mame/skeleton/tsispch.cpp | 8 +- src/mame/skeleton/tulip1.cpp | 12 +- src/mame/skeleton/v6809.cpp | 16 +- src/mame/skeleton/vanguardmk1.cpp | 2 +- src/mame/skeleton/vd56sp.cpp | 2 +- src/mame/skeleton/vector4.cpp | 14 +- src/mame/skeleton/vectrix.cpp | 2 +- src/mame/skeleton/vp415.cpp | 4 +- src/mame/skeleton/vsmilepro.cpp | 2 +- src/mame/skeleton/wicat.cpp | 4 +- src/mame/skeleton/zeebo_qualcomm_adreno130.cpp | 2 +- src/mame/skeleton/zms8085.cpp | 2 +- src/mame/skeleton/zorba.cpp | 8 +- src/mame/skeleton/zorbakbd.h | 2 +- src/mame/skeleton/zt8802.cpp | 4 +- src/mame/slicer/slicer.cpp | 4 +- src/mame/snk/bbusters.cpp | 10 +- src/mame/snk/dmndrby.cpp | 6 +- src/mame/snk/hng64.cpp | 14 +- src/mame/snk/hng64.h | 2 +- src/mame/snk/k1ge.cpp | 6 +- src/mame/snk/k1ge.h | 10 +- src/mame/snk/lasso.cpp | 8 +- src/mame/snk/mainsnk.cpp | 8 +- src/mame/snk/mechatt.cpp | 8 +- src/mame/snk/miconkit.cpp | 2 +- src/mame/snk/munchmo.cpp | 2 +- src/mame/snk/ngp.cpp | 4 +- src/mame/snk/snk.cpp | 32 +-- src/mame/snk/snk6502.cpp | 4 +- src/mame/snk/snk6502_a.cpp | 24 +-- src/mame/snk/snk6502_a.h | 16 +- src/mame/snk/snk68.cpp | 6 +- src/mame/snk/snk_bbusters_spr.cpp | 2 +- src/mame/snk/snk_bbusters_spr.h | 2 +- src/mame/sony/cat702.cpp | 2 +- src/mame/sony/cat702.h | 2 +- src/mame/sony/dfs500.cpp | 8 +- src/mame/sony/dmac_0266.cpp | 2 +- src/mame/sony/dmac_0266.h | 2 +- src/mame/sony/dmac_0448.cpp | 2 +- src/mame/sony/dmac_0448.h | 2 +- src/mame/sony/dpsv55.cpp | 2 +- src/mame/sony/news_38xx.cpp | 6 +- src/mame/sony/news_68k.cpp | 6 +- src/mame/sony/news_hid.cpp | 2 +- src/mame/sony/news_hid.h | 2 +- src/mame/sony/news_r3k.cpp | 6 +- src/mame/sony/pockstat.cpp | 2 +- src/mame/sony/psx.cpp | 4 +- src/mame/sony/psxcd.cpp | 2 +- src/mame/sony/psxcd.h | 4 +- src/mame/sony/smc777.cpp | 2 +- src/mame/sony/taito_zm.cpp | 2 +- src/mame/sony/taito_zm.h | 2 +- src/mame/sony/taitogn.cpp | 2 +- src/mame/sony/zn.cpp | 22 +-- src/mame/sony/znmcu.cpp | 2 +- src/mame/sony/znmcu.h | 2 +- src/mame/stern/astinvad.cpp | 2 +- src/mame/stern/berzerk.cpp | 2 +- src/mame/stern/cliffhgr.cpp | 4 +- src/mame/subsino/lastfght.cpp | 2 +- src/mame/subsino/subsino.cpp | 4 +- src/mame/subsino/subsino2.cpp | 8 +- src/mame/sun/sun3.cpp | 8 +- src/mame/sun/sun3x.cpp | 8 +- src/mame/sun/sun4.cpp | 20 +- src/mame/suna/go2000.cpp | 2 +- src/mame/suna/suna16.cpp | 24 +-- src/mame/suna/suna8.cpp | 8 +- src/mame/sunelectronics/shanghai.cpp | 8 +- src/mame/svision/svis_snd.cpp | 2 +- src/mame/svision/svis_snd.h | 4 +- src/mame/svision/svision.cpp | 4 +- src/mame/swtpc/swtpc09.cpp | 24 +-- src/mame/swtpc/swtpc8212.cpp | 2 +- src/mame/synertek/ktm3.cpp | 2 +- src/mame/synertek/sym1.cpp | 4 +- src/mame/ta/alphatpc16.cpp | 6 +- src/mame/ta/alphatpx.cpp | 14 +- src/mame/ta/alphatro.cpp | 4 +- src/mame/tab/e22_kbd.cpp | 6 +- src/mame/tab/e22_kbd.h | 2 +- src/mame/tab/tabe22.cpp | 2 +- src/mame/taito/2mindril.cpp | 4 +- src/mame/taito/40love.cpp | 4 +- src/mame/taito/ashnojoe.cpp | 2 +- src/mame/taito/asuka.cpp | 66 +++---- src/mame/taito/bigevglf.cpp | 2 +- src/mame/taito/bingowav.cpp | 10 +- src/mame/taito/bking.cpp | 2 +- src/mame/taito/capr1.cpp | 6 +- src/mame/taito/caprcyc.cpp | 2 +- src/mame/taito/changela.cpp | 8 +- src/mame/taito/cpzodiac.cpp | 2 +- src/mame/taito/cucaracha.cpp | 8 +- src/mame/taito/darius.cpp | 4 +- src/mame/taito/exzisus.cpp | 12 +- src/mame/taito/flstory.cpp | 2 +- src/mame/taito/galastrm.cpp | 12 +- src/mame/taito/gladiatr.cpp | 2 +- src/mame/taito/grchamp.cpp | 4 +- src/mame/taito/groundfx.cpp | 10 +- src/mame/taito/gsword.cpp | 10 +- src/mame/taito/gunbustr.cpp | 6 +- src/mame/taito/heromem.cpp | 8 +- src/mame/taito/kikikai.cpp | 4 +- src/mame/taito/ksayakyu.cpp | 2 +- src/mame/taito/lgp.cpp | 2 +- src/mame/taito/missb2.cpp | 2 +- src/mame/taito/mlanding.cpp | 6 +- src/mame/taito/msisaac.cpp | 12 +- src/mame/taito/ninjaw.cpp | 40 ++-- src/mame/taito/nycaptor.cpp | 16 +- src/mame/taito/opwolf.cpp | 20 +- src/mame/taito/othunder.cpp | 8 +- src/mame/taito/pc080sn.cpp | 2 +- src/mame/taito/pc080sn.h | 2 +- src/mame/taito/pc090oj.cpp | 2 +- src/mame/taito/pc090oj.h | 2 +- src/mame/taito/qix.cpp | 6 +- src/mame/taito/qix_a.cpp | 8 +- src/mame/taito/rastan.cpp | 8 +- src/mame/taito/rbisland.cpp | 8 +- src/mame/taito/scyclone.cpp | 4 +- src/mame/taito/slapshot.cpp | 22 +-- src/mame/taito/spdheat.cpp | 2 +- src/mame/taito/superchs.cpp | 8 +- src/mame/taito/taito_b.cpp | 86 ++++---- src/mame/taito/taito_en.cpp | 4 +- src/mame/taito/taito_en.h | 2 +- src/mame/taito/taito_f2.cpp | 140 ++++++------- src/mame/taito/taito_f3.cpp | 4 +- src/mame/taito/taito_h.cpp | 10 +- src/mame/taito/taito_l.cpp | 20 +- src/mame/taito/taito_o.cpp | 6 +- src/mame/taito/taito_x.cpp | 20 +- src/mame/taito/taito_z.cpp | 114 +++++------ src/mame/taito/taitoair.cpp | 10 +- src/mame/taito/taitocchip.cpp | 6 +- src/mame/taito/taitocchip.h | 2 +- src/mame/taito/taitoio.cpp | 8 +- src/mame/taito/taitoio.h | 8 +- src/mame/taito/taitoio_yoke.cpp | 2 +- src/mame/taito/taitoio_yoke.h | 2 +- src/mame/taito/taitojc.cpp | 8 +- src/mame/taito/taitopjc.cpp | 10 +- src/mame/taito/taitosj.cpp | 2 +- src/mame/taito/taitottl.cpp | 4 +- src/mame/taito/taitotx.cpp | 2 +- src/mame/taito/taitotz.cpp | 4 +- src/mame/taito/taitowlf.cpp | 4 +- src/mame/taito/tc0080vco.cpp | 2 +- src/mame/taito/tc0080vco.h | 2 +- src/mame/taito/tc0100scn.cpp | 6 +- src/mame/taito/tc0100scn.h | 6 +- src/mame/taito/tc0110pcr.cpp | 2 +- src/mame/taito/tc0110pcr.h | 2 +- src/mame/taito/tc0150rod.cpp | 2 +- src/mame/taito/tc0150rod.h | 2 +- src/mame/taito/tc0180vcu.cpp | 2 +- src/mame/taito/tc0180vcu.h | 2 +- src/mame/taito/tc0280grd.cpp | 2 +- src/mame/taito/tc0280grd.h | 2 +- src/mame/taito/tc0360pri.cpp | 2 +- src/mame/taito/tc0360pri.h | 2 +- src/mame/taito/tc0480scp.cpp | 2 +- src/mame/taito/tc0480scp.h | 2 +- src/mame/taito/tc0780fpa.cpp | 2 +- src/mame/taito/tc0780fpa.h | 2 +- src/mame/taito/tnzs.cpp | 4 +- src/mame/taito/topspeed.cpp | 8 +- src/mame/taito/tsamurai.cpp | 10 +- src/mame/taito/undrfire.cpp | 20 +- src/mame/taito/volfied.cpp | 4 +- src/mame/taito/warriorb.cpp | 24 +-- src/mame/taito/wgp.cpp | 10 +- src/mame/taito/wyvernf0.cpp | 2 +- src/mame/tangerine/hhtiger.cpp | 2 +- src/mame/tangerine/oric.cpp | 4 +- src/mame/tatsumi/kingdrby.cpp | 2 +- src/mame/tatsumi/tatsumi.cpp | 2 +- src/mame/tatsumi/tx1_a.cpp | 12 +- src/mame/tatsumi/tx1_a.h | 12 +- src/mame/tch/littlerb.cpp | 6 +- src/mame/tch/rltennis.cpp | 6 +- src/mame/tch/speedspn.cpp | 6 +- src/mame/tch/wheelfir.cpp | 8 +- src/mame/teamconcepts/comquest.cpp | 2 +- src/mame/tecfri/holeland.cpp | 4 +- src/mame/technos/battlane.cpp | 6 +- src/mame/technos/blockout.cpp | 2 +- src/mame/technos/chinagat.cpp | 12 +- src/mame/technos/ddragon.cpp | 4 +- src/mame/technos/matmania.cpp | 18 +- src/mame/technos/spdodgeb.cpp | 6 +- src/mame/technos/ssozumo.cpp | 10 +- src/mame/technos/tagteam.cpp | 2 +- src/mame/tecmo/gaiden.cpp | 32 +-- src/mame/tecmo/senjyo.cpp | 12 +- src/mame/tecmo/solomon.cpp | 10 +- src/mame/tecmo/spbactn.cpp | 8 +- src/mame/tecmo/tbowl.cpp | 16 +- src/mame/tecmo/tecmo.cpp | 2 +- src/mame/tecmo/tecmo16.cpp | 4 +- src/mame/tecmo/tecmo_mix.cpp | 2 +- src/mame/tecmo/tecmo_mix.h | 2 +- src/mame/tecmo/tehkanwc.cpp | 2 +- src/mame/tecmo/wc90.cpp | 2 +- src/mame/tektronix/tek405x.cpp | 22 +-- src/mame/tektronix/tek410x_kbd.cpp | 2 +- src/mame/tektronix/tek410x_kbd.h | 2 +- src/mame/tektronix/tek43xx.cpp | 2 +- src/mame/tektronix/tekigw.cpp | 18 +- src/mame/telenova/compis.cpp | 10 +- src/mame/telenova/compiskb.cpp | 4 +- src/mame/telenova/compiskb.h | 2 +- src/mame/telercas/tmc1800.cpp | 6 +- src/mame/televideo/ts802.cpp | 4 +- src/mame/televideo/ts816.cpp | 2 +- src/mame/televideo/tv910.cpp | 4 +- src/mame/televideo/tv924.cpp | 4 +- src/mame/televideo/tv950kb.cpp | 2 +- src/mame/televideo/tv950kb.h | 2 +- src/mame/televideo/tv955.cpp | 6 +- src/mame/televideo/tv955kb.cpp | 2 +- src/mame/televideo/tv955kb.h | 2 +- src/mame/televideo/tv965.cpp | 4 +- src/mame/televideo/tv990.cpp | 4 +- src/mame/tesla/ondra.cpp | 2 +- src/mame/tesla/pmd85.cpp | 20 +- src/mame/tesla/sapi1.cpp | 4 +- src/mame/thepit/timelimt.cpp | 2 +- src/mame/thomson/thomson.cpp | 20 +- src/mame/thomson/thomson.h | 2 +- src/mame/thomson/thomson_m.cpp | 4 +- src/mame/ti/733_asr.cpp | 2 +- src/mame/ti/733_asr.h | 2 +- src/mame/ti/911_vdt.cpp | 4 +- src/mame/ti/911_vdt.h | 2 +- src/mame/ti/avigo.cpp | 2 +- src/mame/ti/cc40.cpp | 2 +- src/mame/ti/evmbug.cpp | 2 +- src/mame/ti/exelv.cpp | 8 +- src/mame/ti/geneve.cpp | 18 +- src/mame/ti/ti74.cpp | 4 +- src/mame/ti/ti85.cpp | 18 +- src/mame/ti/ti990_10.cpp | 8 +- src/mame/ti/ti990_4.cpp | 12 +- src/mame/ti/ti99_2.cpp | 6 +- src/mame/ti/ti99_4p.cpp | 8 +- src/mame/ti/ti99_4x.cpp | 12 +- src/mame/ti/ti99_8.cpp | 10 +- src/mame/ti/tm990189.cpp | 10 +- src/mame/tiger/gamecom.cpp | 6 +- src/mame/tiger/k28.cpp | 2 +- src/mame/tigertel/docg3.cpp | 2 +- src/mame/tigertel/docg3.h | 2 +- src/mame/tigertel/gizmondo.cpp | 6 +- src/mame/tiki/tiki100.cpp | 2 +- src/mame/toaplan/gp9001.cpp | 2 +- src/mame/toaplan/gp9001.h | 2 +- src/mame/toaplan/mjsister.cpp | 2 +- src/mame/toaplan/slapfght.cpp | 2 +- src/mame/toaplan/toaplan1.cpp | 2 +- src/mame/toaplan/toaplan2.cpp | 10 +- src/mame/toaplan/toaplan_scu.cpp | 2 +- src/mame/toaplan/toaplan_scu.h | 2 +- src/mame/toaplan/twincobr.cpp | 2 +- src/mame/toaplan/wardner.cpp | 2 +- src/mame/tomy/tomy_princ.cpp | 2 +- src/mame/tomy/tutor.cpp | 4 +- src/mame/toshiba/paso1600.cpp | 2 +- src/mame/toshiba/pasopia7.cpp | 2 +- src/mame/trainer/amico2k.cpp | 2 +- src/mame/trainer/babbage.cpp | 2 +- src/mame/trainer/crei680.cpp | 8 +- src/mame/trainer/emma2.cpp | 6 +- src/mame/trainer/mk14.cpp | 4 +- src/mame/trainer/selz80.cpp | 4 +- src/mame/trs/6883sam.cpp | 2 +- src/mame/trs/6883sam.h | 4 +- src/mame/trs/coco12.cpp | 10 +- src/mame/trs/coco3.cpp | 6 +- src/mame/trs/coco_vhd.cpp | 2 +- src/mame/trs/coco_vhd.h | 4 +- src/mame/trs/dgn_beta.cpp | 6 +- src/mame/trs/dragon.cpp | 12 +- src/mame/trs/gime.cpp | 6 +- src/mame/trs/gime.h | 10 +- src/mame/trs/lnw80.cpp | 2 +- src/mame/trs/max80.cpp | 4 +- src/mame/trs/mc10.cpp | 4 +- src/mame/trs/meritum.cpp | 6 +- src/mame/trs/radionic.cpp | 2 +- src/mame/trs/tandy2k.cpp | 22 +-- src/mame/trs/tandy2kb.cpp | 4 +- src/mame/trs/tandy2kb.h | 2 +- src/mame/trs/trs80.cpp | 4 +- src/mame/trs/trs80dt1.cpp | 4 +- src/mame/trs/trs80m2.cpp | 10 +- src/mame/trs/trs80m2kb.cpp | 4 +- src/mame/trs/trs80m2kb.h | 2 +- src/mame/trs/trs80m3.cpp | 8 +- src/mame/trs/trs80m3_m.cpp | 2 +- src/mame/trs/vis.cpp | 20 +- src/mame/tvgames/actions_atj2279b.cpp | 2 +- src/mame/tvgames/bl_handhelds_lcdc.cpp | 2 +- src/mame/tvgames/bl_handhelds_lcdc.h | 2 +- src/mame/tvgames/elan_ep3a19a.cpp | 8 +- src/mame/tvgames/elan_ep3a19asys.cpp | 2 +- src/mame/tvgames/elan_ep3a19asys.h | 2 +- src/mame/tvgames/elan_eu3a05.cpp | 8 +- src/mame/tvgames/elan_eu3a05_a.cpp | 2 +- src/mame/tvgames/elan_eu3a05_a.h | 2 +- src/mame/tvgames/elan_eu3a05commonsys.cpp | 4 +- src/mame/tvgames/elan_eu3a05commonsys.h | 4 +- src/mame/tvgames/elan_eu3a05commonvid.cpp | 4 +- src/mame/tvgames/elan_eu3a05commonvid.h | 4 +- src/mame/tvgames/elan_eu3a05gpio.cpp | 2 +- src/mame/tvgames/elan_eu3a05gpio.h | 2 +- src/mame/tvgames/elan_eu3a05sys.cpp | 2 +- src/mame/tvgames/elan_eu3a05sys.h | 2 +- src/mame/tvgames/elan_eu3a05vid.cpp | 2 +- src/mame/tvgames/elan_eu3a05vid.h | 2 +- src/mame/tvgames/elan_eu3a14.cpp | 6 +- src/mame/tvgames/elan_eu3a14sys.cpp | 2 +- src/mame/tvgames/elan_eu3a14sys.h | 2 +- src/mame/tvgames/elan_eu3a14vid.cpp | 2 +- src/mame/tvgames/elan_eu3a14vid.h | 2 +- src/mame/tvgames/generalplus_gpl16250_m.cpp | 2 +- src/mame/tvgames/generalplus_gpl16250_m.h | 2 +- src/mame/tvgames/generalplus_gpl162xx_lcdtype.cpp | 4 +- src/mame/tvgames/generalplus_gpl32612.cpp | 4 +- src/mame/tvgames/generalplus_gpl_unknown.cpp | 4 +- src/mame/tvgames/hyperscan_card.cpp | 2 +- src/mame/tvgames/hyperscan_card.h | 2 +- src/mame/tvgames/hyperscan_ctrl.cpp | 2 +- src/mame/tvgames/hyperscan_ctrl.h | 2 +- src/mame/tvgames/magiceyes_pollux_vr3520f.cpp | 2 +- src/mame/tvgames/monkey_king_3b.cpp | 2 +- src/mame/tvgames/spg29x.cpp | 6 +- src/mame/tvgames/spg2xx.cpp | 8 +- src/mame/tvgames/spg2xx_jakks.cpp | 2 +- src/mame/tvgames/spg2xx_jakks_gkr.cpp | 2 +- src/mame/tvgames/spg2xx_jakks_tvtouch.cpp | 2 +- src/mame/tvgames/st2302u_bbl_rom.cpp | 8 +- src/mame/tvgames/st2302u_bbl_spi.cpp | 6 +- src/mame/tvgames/titan_soc.cpp | 2 +- src/mame/tvgames/trkfldch.cpp | 2 +- src/mame/tvgames/xavix.cpp | 20 +- src/mame/tvgames/xavix.h | 2 +- src/mame/tvgames/xavix2.cpp | 2 +- src/mame/tvgames/xavix2002_io.cpp | 2 +- src/mame/tvgames/xavix2002_io.h | 2 +- src/mame/tvgames/xavix_2000.cpp | 6 +- src/mame/tvgames/xavix_2002.cpp | 8 +- src/mame/tvgames/xavix_a.cpp | 2 +- src/mame/tvgames/xavix_adc.cpp | 2 +- src/mame/tvgames/xavix_adc.h | 2 +- src/mame/tvgames/xavix_anport.cpp | 2 +- src/mame/tvgames/xavix_anport.h | 2 +- src/mame/tvgames/xavix_io.cpp | 2 +- src/mame/tvgames/xavix_io.h | 2 +- src/mame/tvgames/xavix_madfb_ball.cpp | 2 +- src/mame/tvgames/xavix_madfb_ball.h | 2 +- src/mame/tvgames/xavix_math.cpp | 2 +- src/mame/tvgames/xavix_math.h | 2 +- src/mame/tvgames/xavix_mtrk_wheel.cpp | 2 +- src/mame/tvgames/xavix_mtrk_wheel.h | 2 +- src/mame/ultimachine/rambo.cpp | 2 +- src/mame/unico/unianapc.cpp | 2 +- src/mame/unisonic/gic.cpp | 4 +- src/mame/unisonic/gic.h | 4 +- src/mame/unisys/univac.cpp | 2 +- src/mame/universal/cheekyms.cpp | 2 +- src/mame/universal/cheekyms_a.cpp | 4 +- src/mame/universal/cheekyms_a.h | 2 +- src/mame/universal/cosmic.cpp | 6 +- src/mame/universal/cosmicg.cpp | 2 +- src/mame/universal/ladybug.cpp | 2 +- src/mame/universal/ladybug_video.h | 2 +- src/mame/universal/superdq.cpp | 4 +- src/mame/upl/mouser.cpp | 4 +- src/mame/usp/patinho_feio.cpp | 6 +- src/mame/ussr/apogee.cpp | 2 +- src/mame/ussr/argo.cpp | 6 +- src/mame/ussr/b2m.cpp | 8 +- src/mame/ussr/bk.cpp | 2 +- src/mame/ussr/cm1800.cpp | 2 +- src/mame/ussr/dvk_kcgd.cpp | 2 +- src/mame/ussr/dvk_ksm.cpp | 10 +- src/mame/ussr/ie15.cpp | 2 +- src/mame/ussr/intellect02.cpp | 4 +- src/mame/ussr/irisha.cpp | 6 +- src/mame/ussr/istrebiteli.cpp | 6 +- src/mame/ussr/km035.cpp | 4 +- src/mame/ussr/km035.h | 2 +- src/mame/ussr/lviv.cpp | 2 +- src/mame/ussr/mikro80.cpp | 4 +- src/mame/ussr/mikrosha.cpp | 2 +- src/mame/ussr/mk98.cpp | 4 +- src/mame/ussr/ms0515.cpp | 14 +- src/mame/ussr/ms6102.cpp | 8 +- src/mame/ussr/okean240.cpp | 8 +- src/mame/ussr/orion.cpp | 10 +- src/mame/ussr/pk8000.cpp | 2 +- src/mame/ussr/pyl601.cpp | 2 +- src/mame/ussr/sm1800.cpp | 4 +- src/mame/ussr/sm7238.cpp | 18 +- src/mame/ussr/special.cpp | 12 +- src/mame/ussr/special_gambl.cpp | 4 +- src/mame/ussr/specialsound.cpp | 2 +- src/mame/ussr/specialsound.h | 2 +- src/mame/ussr/tiamc1.cpp | 4 +- src/mame/ussr/tiamc1_a.cpp | 2 +- src/mame/ussr/tiamc1_a.h | 2 +- src/mame/ussr/uknc.cpp | 4 +- src/mame/ussr/unior.cpp | 2 +- src/mame/ussr/ut88.cpp | 6 +- src/mame/ussr/vector06.cpp | 6 +- src/mame/ussr/vta2000.cpp | 6 +- src/mame/valadon/bagman.cpp | 10 +- src/mame/venture/looping.cpp | 4 +- src/mame/venture/spcforce.cpp | 8 +- src/mame/verifone/tranz330.cpp | 2 +- src/mame/vidbrain/uv201.cpp | 2 +- src/mame/vidbrain/uv201.h | 2 +- src/mame/vidbrain/vidbrain.cpp | 6 +- src/mame/videoton/tvc.cpp | 4 +- src/mame/videoton/tvc_a.cpp | 2 +- src/mame/videoton/tvc_a.h | 2 +- src/mame/virtual/vgmplay.cpp | 212 ++++++++++---------- src/mame/visual/v100.cpp | 2 +- src/mame/visual/v102.cpp | 2 +- src/mame/visual/v102_kbd.cpp | 8 +- src/mame/visual/v102_kbd.h | 4 +- src/mame/visual/v1050.cpp | 4 +- src/mame/visual/v1050kb.cpp | 2 +- src/mame/visual/v1050kb.h | 2 +- src/mame/votrax/votrhv.cpp | 4 +- src/mame/votrax/votrpss.cpp | 8 +- src/mame/votrax/votrtnt.cpp | 6 +- src/mame/vsystem/aerofgt.cpp | 66 +++---- src/mame/vsystem/crshrace.cpp | 10 +- src/mame/vsystem/f1gp.cpp | 24 +-- src/mame/vsystem/fromanc2.cpp | 8 +- src/mame/vsystem/fromance.cpp | 8 +- src/mame/vsystem/gstriker.cpp | 12 +- src/mame/vsystem/inufuku.cpp | 2 +- src/mame/vsystem/mb60553.cpp | 2 +- src/mame/vsystem/mb60553.h | 2 +- src/mame/vsystem/ojankohs.cpp | 18 +- src/mame/vsystem/pipedrm.cpp | 6 +- src/mame/vsystem/suprslam.cpp | 6 +- src/mame/vsystem/tail2nos.cpp | 4 +- src/mame/vsystem/taotaido.cpp | 10 +- src/mame/vsystem/vs9209.cpp | 2 +- src/mame/vsystem/vs9209.h | 2 +- src/mame/vsystem/vs920a.cpp | 2 +- src/mame/vsystem/vs920a.h | 2 +- src/mame/vsystem/vsystem_gga.cpp | 2 +- src/mame/vsystem/vsystem_gga.h | 2 +- src/mame/vsystem/vsystem_spr.cpp | 2 +- src/mame/vsystem/vsystem_spr.h | 2 +- src/mame/vsystem/vsystem_spr2.cpp | 2 +- src/mame/vsystem/vsystem_spr2.h | 2 +- src/mame/vsystem/welltris.cpp | 4 +- src/mame/vtech/crvision.cpp | 6 +- src/mame/vtech/gamemachine.cpp | 2 +- src/mame/vtech/geniusjr.cpp | 6 +- src/mame/vtech/glcx.cpp | 2 +- src/mame/vtech/innotv_innotabmax.cpp | 2 +- src/mame/vtech/inteladv.cpp | 4 +- src/mame/vtech/laser3k.cpp | 6 +- src/mame/vtech/lcmate2.cpp | 2 +- src/mame/vtech/pc2000.cpp | 6 +- src/mame/vtech/pc4.cpp | 2 +- src/mame/vtech/socrates_a.cpp | 2 +- src/mame/vtech/socrates_a.h | 2 +- src/mame/vtech/storio.cpp | 2 +- src/mame/vtech/vtech2.cpp | 2 +- src/mame/vtech/vtech_eu3a12.cpp | 2 +- src/mame/vtech/vtech_innotab.cpp | 2 +- src/mame/wang/wangpc.cpp | 16 +- src/mame/wang/wangpckb.cpp | 8 +- src/mame/wang/wangpckb.h | 2 +- src/mame/wavemate/bullet.cpp | 2 +- src/mame/wavemate/jupiter.cpp | 10 +- src/mame/westinghouse/testconsole.cpp | 2 +- src/mame/wing/luckgrln.cpp | 4 +- src/mame/wing/pinkiri8.cpp | 8 +- src/mame/wyse/wy50kb.cpp | 6 +- src/mame/wyse/wy50kb.h | 4 +- src/mame/xerox/alto2.cpp | 4 +- src/mame/xerox/bigbord2.cpp | 8 +- src/mame/xerox/notetaker.cpp | 6 +- src/mame/xerox/x820kb.cpp | 2 +- src/mame/xerox/x820kb.h | 2 +- src/mame/xerox/xerox820.cpp | 10 +- src/mame/yamaha/fb01.cpp | 2 +- src/mame/yamaha/mulcd.cpp | 2 +- src/mame/yamaha/mulcd.h | 2 +- src/mame/yamaha/tg100.cpp | 2 +- src/mame/yamaha/ymdx100.cpp | 2 +- src/mame/yamaha/ymdx11.cpp | 2 +- src/mame/yamaha/ympsr340.cpp | 2 +- src/mame/yamaha/ympsr40.cpp | 2 +- src/mame/yamaha/ympsr60.cpp | 2 +- src/mame/yamaha/ymqy70.cpp | 2 +- src/mame/yamaha/ymrx15.cpp | 2 +- src/mame/yamaha/ymtx81z.cpp | 2 +- src/mame/yunsung/nmg5.cpp | 10 +- src/mame/yunsung/yunsung8.cpp | 2 +- src/mame/zaccaria/seabattl.cpp | 14 +- src/mame/zaccaria/zac2650.cpp | 2 +- src/mame/zaccaria/zaccaria_a.cpp | 16 +- src/mame/zaccaria/zaccaria_a.h | 4 +- src/mame/zenith/z100.cpp | 2 +- src/mame/zpa/iq151.cpp | 2 +- src/mame/zvt/pp01.cpp | 6 +- src/osd/modules/render/aviwrite.cpp | 4 +- 7914 files changed, 23366 insertions(+), 23467 deletions(-) (limited to 'src') diff --git a/src/devices/bus/a1bus/a1bus.cpp b/src/devices/bus/a1bus/a1bus.cpp index 21549f5a171..cbd5616f3e0 100644 --- a/src/devices/bus/a1bus/a1bus.cpp +++ b/src/devices/bus/a1bus/a1bus.cpp @@ -27,12 +27,12 @@ template class device_finder; //------------------------------------------------- // a1bus_slot_device - constructor //------------------------------------------------- -a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a1bus_slot_device(mconfig, A1BUS_SLOT, tag, owner, clock) { } -a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_a1bus(*this, finder_base::DUMMY_TAG) @@ -69,12 +69,12 @@ DEFINE_DEVICE_TYPE(A1BUS, a1bus_device, "a1bus", "Apple I Bus") // a1bus_device - constructor //------------------------------------------------- -a1bus_device::a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a1bus_device::a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a1bus_device(mconfig, A1BUS, tag, owner, clock) { } -a1bus_device::a1bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a1bus_device::a1bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_space(*this, finder_base::DUMMY_TAG, -1) , m_out_irq_cb(*this) diff --git a/src/devices/bus/a1bus/a1bus.h b/src/devices/bus/a1bus/a1bus.h index d1d4860113d..2b5fe79ad30 100644 --- a/src/devices/bus/a1bus/a1bus.h +++ b/src/devices/bus/a1bus/a1bus.h @@ -24,8 +24,8 @@ class a1bus_slot_device : public device_t, public device_single_card_slot_interf public: // construction/destruction template - a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&a1bus_tag, U &&opts, const char *dflt) - : a1bus_slot_device(mconfig, tag, owner, clock) + a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&a1bus_tag, U &&opts, const char *dflt) + : a1bus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -33,10 +33,10 @@ public: set_fixed(false); m_a1bus.set_tag(std::forward(a1bus_tag)); } - a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: - a1bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a1bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -55,7 +55,7 @@ class a1bus_device : public device_t { public: // construction/destruction - a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward(tag), spacenum); } @@ -75,7 +75,7 @@ public: DECLARE_WRITE_LINE_MEMBER( nmi_w ); protected: - a1bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a1bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; diff --git a/src/devices/bus/a1bus/a1cassette.cpp b/src/devices/bus/a1bus/a1cassette.cpp index 56cd198bac8..14fdcf5ed70 100644 --- a/src/devices/bus/a1bus/a1cassette.cpp +++ b/src/devices/bus/a1bus/a1cassette.cpp @@ -41,13 +41,13 @@ class a1bus_cassette_device: { public: // construction/destruction - a1bus_cassette_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a1bus_cassette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t cassette_r(offs_t offset); void cassette_w(offs_t offset, uint8_t data); protected: - a1bus_cassette_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a1bus_cassette_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -89,12 +89,12 @@ const tiny_rom_entry *a1bus_cassette_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a1bus_cassette_device(mconfig, A1BUS_CASSETTE, tag, owner, clock) { } -a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a1bus_cassette_device::a1bus_cassette_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a1bus_card_interface(mconfig, *this) , m_cassette(*this, "cassette") diff --git a/src/devices/bus/a1bus/a1cffa.cpp b/src/devices/bus/a1bus/a1cffa.cpp index 9818caf9fc6..7a97b9ade6e 100644 --- a/src/devices/bus/a1bus/a1cffa.cpp +++ b/src/devices/bus/a1bus/a1cffa.cpp @@ -38,13 +38,13 @@ class a1bus_cffa_device: { public: // construction/destruction - a1bus_cffa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a1bus_cffa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t cffa_r(offs_t offset); void cffa_w(offs_t offset, uint8_t data); protected: - a1bus_cffa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a1bus_cffa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -78,12 +78,12 @@ const tiny_rom_entry *a1bus_cffa_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a1bus_cffa_device(mconfig, A1BUS_CFFA, tag, owner, clock) { } -a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a1bus_cffa_device::a1bus_cffa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a1bus_card_interface(mconfig, *this) , m_ata(*this, CFFA_ATA_TAG) diff --git a/src/devices/bus/a2bus/4play.cpp b/src/devices/bus/a2bus/4play.cpp index c51ef306cff..cfa261a3235 100644 --- a/src/devices/bus/a2bus/4play.cpp +++ b/src/devices/bus/a2bus/4play.cpp @@ -25,10 +25,10 @@ class a2bus_4play_device: { public: // construction/destruction - a2bus_4play_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_4play_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_4play_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_4play_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual ioport_constructor device_input_ports() const override; @@ -93,12 +93,12 @@ ioport_constructor a2bus_4play_device::device_input_ports() const // LIVE DEVICE //************************************************************************** -a2bus_4play_device::a2bus_4play_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_4play_device::a2bus_4play_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_4play_device(mconfig, A2BUS_4PLAY, tag, owner, clock) { } -a2bus_4play_device::a2bus_4play_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_4play_device::a2bus_4play_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_p1(*this, "p1"), diff --git a/src/devices/bus/a2bus/a2alfam2.cpp b/src/devices/bus/a2bus/a2alfam2.cpp index 72815dcce53..5b6288b8313 100644 --- a/src/devices/bus/a2bus/a2alfam2.cpp +++ b/src/devices/bus/a2bus/a2alfam2.cpp @@ -30,14 +30,14 @@ class a2bus_alfam2_device: public device_a2bus_card_interface { public: - a2bus_alfam2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + a2bus_alfam2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_alfam2_device(mconfig, A2BUS_ALFAM2, tag, owner, clock) { } protected: // construction/destruction - a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -60,7 +60,7 @@ private: class a2bus_aesms_device : public a2bus_alfam2_device { public: - a2bus_aesms_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + a2bus_aesms_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_alfam2_device(mconfig, A2BUS_AESMS, tag, owner, clock) { } @@ -92,14 +92,14 @@ void a2bus_alfam2_device::device_add_mconfig(machine_config &config) SPEAKER(config, "alf_l").front_left(); SPEAKER(config, "alf_r").front_right(); - SN76489(config, m_sn1, 1020484); + SN76489(config, m_sn1, XTAL::u(1020484)); m_sn1->add_route(ALL_OUTPUTS, "alf_l", 0.50); - SN76489(config, m_sn2, 1020484); + SN76489(config, m_sn2, XTAL::u(1020484)); m_sn2->add_route(ALL_OUTPUTS, "alf_l", 0.50); m_sn2->add_route(ALL_OUTPUTS, "alf_r", 0.50); - SN76489(config, m_sn3, 1020484); + SN76489(config, m_sn3, XTAL::u(1020484)); m_sn3->add_route(ALL_OUTPUTS, "alf_r", 0.50); } @@ -108,17 +108,17 @@ void a2bus_aesms_device::device_add_mconfig(machine_config &config) SPEAKER(config, "alf_l").front_left(); SPEAKER(config, "alf_r").front_right(); - SN76489(config, m_sn1, 1020484); + SN76489(config, m_sn1, XTAL::u(1020484)); m_sn1->add_route(ALL_OUTPUTS, "alf_l", 0.50); - SN76489(config, m_sn2, 1020484); + SN76489(config, m_sn2, XTAL::u(1020484)); m_sn2->add_route(ALL_OUTPUTS, "alf_l", 0.50); m_sn2->add_route(ALL_OUTPUTS, "alf_r", 0.50); - SN76489(config, m_sn3, 1020484); + SN76489(config, m_sn3, XTAL::u(1020484)); m_sn3->add_route(ALL_OUTPUTS, "alf_r", 0.50); - SN76489(config, m_sn4, 1020484); + SN76489(config, m_sn4, XTAL::u(1020484)); m_sn4->add_route(ALL_OUTPUTS, "alf_l", 0.50); m_sn4->add_route(ALL_OUTPUTS, "alf_r", 0.50); } @@ -127,7 +127,7 @@ void a2bus_aesms_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_alfam2_device::a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_alfam2_device::a2bus_alfam2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_sn1(*this, SN1_TAG), diff --git a/src/devices/bus/a2bus/a2applicard.cpp b/src/devices/bus/a2bus/a2applicard.cpp index 5395295a207..b9d13751658 100644 --- a/src/devices/bus/a2bus/a2applicard.cpp +++ b/src/devices/bus/a2bus/a2applicard.cpp @@ -41,13 +41,13 @@ class a2bus_applicard_device: { public: // construction/destruction - a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t z80_io_r(offs_t offset); void z80_io_w(offs_t offset, uint8_t data); protected: - a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -95,7 +95,7 @@ void a2bus_applicard_device::z80_io(address_map &map) void a2bus_applicard_device::device_add_mconfig(machine_config &config) { - Z80(config, m_z80, 6000000); // Z80 runs at 6 MHz + Z80(config, m_z80, XTAL::u(6000000)); // Z80 runs at 6 MHz m_z80->set_addrmap(AS_PROGRAM, &a2bus_applicard_device::z80_mem); m_z80->set_addrmap(AS_IO, &a2bus_applicard_device::z80_io); } @@ -113,7 +113,7 @@ const tiny_rom_entry *a2bus_applicard_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_z80(*this, Z80_TAG), @@ -122,7 +122,7 @@ a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, de { } -a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_applicard_device::a2bus_applicard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_applicard_device(mconfig, A2BUS_APPLICARD, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2arcadebd.cpp b/src/devices/bus/a2bus/a2arcadebd.cpp index 85c0cfc02d2..2c338cc6cd3 100644 --- a/src/devices/bus/a2bus/a2arcadebd.cpp +++ b/src/devices/bus/a2bus/a2arcadebd.cpp @@ -42,10 +42,10 @@ class a2bus_arcboard_device: { public: // construction/destruction - a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -74,19 +74,19 @@ void a2bus_arcboard_device::device_add_mconfig(machine_config &config) SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER); SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay, 1022727).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8910(config, m_ay, XTAL::u(1022727)).add_route(ALL_OUTPUTS, "mono", 1.0); } //************************************************************************** // LIVE DEVICE //************************************************************************** -a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_arcboard_device(mconfig, A2BUS_ARCADEBOARD, tag, owner, clock) { } -a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_tms(*this, TMS_TAG), diff --git a/src/devices/bus/a2bus/a2bus.cpp b/src/devices/bus/a2bus/a2bus.cpp index deb322f67a8..7f374924973 100644 --- a/src/devices/bus/a2bus/a2bus.cpp +++ b/src/devices/bus/a2bus/a2bus.cpp @@ -91,12 +91,12 @@ template class device_finder; //------------------------------------------------- // a2bus_slot_device - constructor //------------------------------------------------- -a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_slot_device(mconfig, A2BUS_SLOT, tag, owner, clock) { } -a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_slot_device::a2bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_a2bus(*this, finder_base::DUMMY_TAG) @@ -132,12 +132,12 @@ DEFINE_DEVICE_TYPE(A2BUS, a2bus_device, "a2bus", "Apple II Bus") // a2bus_device - constructor //------------------------------------------------- -a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_device(mconfig, A2BUS, tag, owner, clock) { } -a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_maincpu_space(*this, finder_base::DUMMY_TAG, -1) , m_out_irq_cb(*this) diff --git a/src/devices/bus/a2bus/a2bus.h b/src/devices/bus/a2bus/a2bus.h index 5a10f06de39..625c12d31e0 100644 --- a/src/devices/bus/a2bus/a2bus.h +++ b/src/devices/bus/a2bus/a2bus.h @@ -26,7 +26,7 @@ #define INH_WRITE 0x02 // 7M = XTAL(14'318'181) / 2 or XTAL(28'636'363) / 4 (for IIgs) -static constexpr uint32_t A2BUS_7M_CLOCK = 7159090; +static constexpr XTAL A2BUS_7M_CLOCK = XTAL(14'318'181) / 2; //************************************************************************** // TYPE DEFINITIONS @@ -45,7 +45,7 @@ public: { } template - a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&a2bus_tag, U &&opts, const char *dflt) + a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&a2bus_tag, U &&opts, const char *dflt) : a2bus_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -54,10 +54,10 @@ public: set_fixed(false); m_a2bus.set_tag(std::forward(a2bus_tag)); } - a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = A2BUS_7M_CLOCK); + a2bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = A2BUS_7M_CLOCK); protected: - a2bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -78,7 +78,7 @@ class a2bus_device : public device_t friend class a2bus_mcms2_device; public: // construction/destruction - a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_space(T &&tag, int spacenum) { m_maincpu_space.set_tag(std::forward(tag), spacenum); } @@ -103,7 +103,7 @@ public: DECLARE_WRITE_LINE_MEMBER( nmi_w ); protected: - a2bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; diff --git a/src/devices/bus/a2bus/a2cffa.cpp b/src/devices/bus/a2bus/a2cffa.cpp index 3839b338ae1..43c4ddd8c51 100644 --- a/src/devices/bus/a2bus/a2cffa.cpp +++ b/src/devices/bus/a2bus/a2cffa.cpp @@ -45,7 +45,7 @@ class a2bus_cffa2000_device: { protected: // construction/destruction - a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -73,7 +73,7 @@ private: class a2bus_cffa2_device : public a2bus_cffa2000_device, public device_nvram_interface { public: - a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_config_nvram_interface overrides @@ -85,7 +85,7 @@ protected: class a2bus_cffa2_6502_device : public a2bus_cffa2000_device, public device_nvram_interface { public: - a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; protected: @@ -130,7 +130,7 @@ const tiny_rom_entry *a2bus_cffa2_6502_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_cffa2000_device::a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_cffa2000_device::a2bus_cffa2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_ata(*this, CFFA2_ATA_TAG), @@ -139,13 +139,13 @@ a2bus_cffa2000_device::a2bus_cffa2000_device(const machine_config &mconfig, devi { } -a2bus_cffa2_device::a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_cffa2_device::a2bus_cffa2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_cffa2000_device(mconfig, A2BUS_CFFA2, tag, owner, clock), device_nvram_interface(mconfig, *this) { } -a2bus_cffa2_6502_device::a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_cffa2_6502_device::a2bus_cffa2_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_cffa2000_device(mconfig, A2BUS_CFFA2_6502, tag, owner, clock), device_nvram_interface(mconfig, *this) { diff --git a/src/devices/bus/a2bus/a2corvus.cpp b/src/devices/bus/a2bus/a2corvus.cpp index b2e845f3d2c..9430356844f 100644 --- a/src/devices/bus/a2bus/a2corvus.cpp +++ b/src/devices/bus/a2bus/a2corvus.cpp @@ -73,7 +73,7 @@ ROM_END void a2bus_corvus_device::device_add_mconfig(machine_config &config) { - CORVUS_HDC(config, m_corvushd, 0); + CORVUS_HDC(config, m_corvushd); HARDDISK(config, "harddisk1", "corvus_hdd"); HARDDISK(config, "harddisk2", "corvus_hdd"); HARDDISK(config, "harddisk3", "corvus_hdd"); @@ -93,14 +93,14 @@ const tiny_rom_entry *a2bus_corvus_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_corvus_device::a2bus_corvus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_corvus_device::a2bus_corvus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_corvushd(*this, CORVUS_HD_TAG), m_rom(nullptr) { } -a2bus_corvus_device::a2bus_corvus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_corvus_device::a2bus_corvus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_corvus_device(mconfig, A2BUS_CORVUS, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2corvus.h b/src/devices/bus/a2bus/a2corvus.h index a6d1a232eee..028dc89f43c 100644 --- a/src/devices/bus/a2bus/a2corvus.h +++ b/src/devices/bus/a2bus/a2corvus.h @@ -27,10 +27,10 @@ class a2bus_corvus_device: { public: // construction/destruction - a2bus_corvus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_corvus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_corvus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_corvus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2diskiing.cpp b/src/devices/bus/a2bus/a2diskiing.cpp index f6c4808462a..4549beb4c39 100644 --- a/src/devices/bus/a2bus/a2diskiing.cpp +++ b/src/devices/bus/a2bus/a2diskiing.cpp @@ -129,7 +129,7 @@ const tiny_rom_entry *a2bus_agat9flop_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -diskiing_device::diskiing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +diskiing_device::diskiing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_wozfdc(*this, WOZFDC_TAG), @@ -138,17 +138,17 @@ diskiing_device::diskiing_device(const machine_config &mconfig, device_type type { } -a2bus_diskiing_device::a2bus_diskiing_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_diskiing_device::a2bus_diskiing_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : diskiing_device(mconfig, A2BUS_DISKIING, tag, owner, clock) { } -a2bus_diskiing13_device::a2bus_diskiing13_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_diskiing13_device::a2bus_diskiing13_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : diskiing_device(mconfig, A2BUS_DISKIING13, tag, owner, clock) { } -a2bus_applesurance_device::a2bus_applesurance_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_applesurance_device::a2bus_applesurance_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : diskiing_device(mconfig, A2BUS_APPLESURANCE, tag, owner, clock), m_c800_bank(1) { diff --git a/src/devices/bus/a2bus/a2diskiing.h b/src/devices/bus/a2bus/a2diskiing.h index 1d6e2f93f99..6f246eea8c9 100644 --- a/src/devices/bus/a2bus/a2diskiing.h +++ b/src/devices/bus/a2bus/a2diskiing.h @@ -32,7 +32,7 @@ class diskiing_device: { protected: // construction/destruction - diskiing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + diskiing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -56,13 +56,13 @@ private: class a2bus_diskiing_device: public diskiing_device { public: - a2bus_diskiing_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_diskiing_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class a2bus_diskiing13_device: public diskiing_device { public: - a2bus_diskiing13_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_diskiing13_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -75,7 +75,7 @@ private: class a2bus_applesurance_device: public diskiing_device { public: - a2bus_applesurance_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_applesurance_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/a2bus/a2dx1.cpp b/src/devices/bus/a2bus/a2dx1.cpp index ae8f80091b1..4395471f94d 100644 --- a/src/devices/bus/a2bus/a2dx1.cpp +++ b/src/devices/bus/a2bus/a2dx1.cpp @@ -28,10 +28,10 @@ class a2bus_dx1_device: { public: // construction/destruction - a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; @@ -56,8 +56,8 @@ protected: void a2bus_dx1_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC - DAC_8BIT_R2R(config, m_dacvol, 0) + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dacvol) .set_output_range(0, 1) .add_route(0, "dac", 1.0, DAC_INPUT_RANGE_HI) .add_route(0, "dac", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC @@ -67,7 +67,7 @@ void a2bus_dx1_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_dac(*this, "dac"), @@ -75,7 +75,7 @@ a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, device_type ty { } -a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_dx1_device::a2bus_dx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_dx1_device(mconfig, A2BUS_DX1, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2eauxslot.cpp b/src/devices/bus/a2bus/a2eauxslot.cpp index 36b99cbe6aa..25147f0f3f5 100644 --- a/src/devices/bus/a2bus/a2eauxslot.cpp +++ b/src/devices/bus/a2bus/a2eauxslot.cpp @@ -24,12 +24,12 @@ DEFINE_DEVICE_TYPE(A2EAUXSLOT_SLOT, a2eauxslot_slot_device, "a2eauxslot_slot", " //------------------------------------------------- // a2eauxslot_slot_device - constructor //------------------------------------------------- -a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2eauxslot_slot_device(mconfig, A2EAUXSLOT_SLOT, tag, owner, clock) { } -a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2eauxslot_slot_device::a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_a2eauxslot(*this, finder_base::DUMMY_TAG) @@ -57,12 +57,12 @@ DEFINE_DEVICE_TYPE(A2EAUXSLOT, a2eauxslot_device, "a2eauxslot", "Apple IIe AUX B // a2eauxslot_device - constructor //------------------------------------------------- -a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2eauxslot_device(mconfig, A2EAUXSLOT, tag, owner, clock) { } -a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_space(*this, finder_base::DUMMY_TAG, -1) , m_out_irq_cb(*this) diff --git a/src/devices/bus/a2bus/a2eauxslot.h b/src/devices/bus/a2bus/a2eauxslot.h index 0eefe28db1d..e4b53cfbd2e 100644 --- a/src/devices/bus/a2bus/a2eauxslot.h +++ b/src/devices/bus/a2bus/a2eauxslot.h @@ -31,7 +31,7 @@ public: // construction/destruction template a2eauxslot_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&slottag, U &&opts, char const *dflt) - : a2eauxslot_slot_device(mconfig, tag, owner, 0) + : a2eauxslot_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -40,14 +40,14 @@ public: m_a2eauxslot.set_tag(std::forward(slottag)); } - a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + a2eauxslot_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_resolve_objects() override; virtual void device_start() override { } protected: - a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2eauxslot_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // configuration required_device m_a2eauxslot; @@ -62,7 +62,7 @@ class a2eauxslot_device : public device_t { public: // construction/destruction - a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward(tag), spacenum); } @@ -79,7 +79,7 @@ public: DECLARE_WRITE_LINE_MEMBER( nmi_w ); protected: - a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2eauxslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; diff --git a/src/devices/bus/a2bus/a2echoii.cpp b/src/devices/bus/a2bus/a2echoii.cpp index 604dc7ae1c6..cbd3710e3d8 100644 --- a/src/devices/bus/a2bus/a2echoii.cpp +++ b/src/devices/bus/a2bus/a2echoii.cpp @@ -53,12 +53,12 @@ class a2bus_echoii_device: { public: // construction/destruction - a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); required_device m_tms; protected: - a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -88,7 +88,7 @@ private: void a2bus_echoii_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "echoii").front_center(); - tms5220_device &tms(TMS5220(config, TMS_TAG, 640000)); + tms5220_device &tms(TMS5220(config, TMS_TAG, XTAL::u(640000))); // Note the Echo II card has an R/C circuit (and sometimes a 'FREQ' potentiometer) to control the tms5220[c]'s clock frequency; 640khz is // the nominal '8khz' value according to the TMS5220 datasheet. // The EchoIIb card however has a 74LS92 which divides the apple2's Q3 ((14.318/7)MHz asymmetrical) clock by 6 to produce a 681.809khz/2 @@ -107,14 +107,14 @@ void a2bus_echoii_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_tms(*this, TMS_TAG) { } -a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_echoii_device::a2bus_echoii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_echoii_device(mconfig, A2BUS_ECHOII, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2eext80col.cpp b/src/devices/bus/a2bus/a2eext80col.cpp index 1c7a4fe77b3..f779425e9db 100644 --- a/src/devices/bus/a2bus/a2eext80col.cpp +++ b/src/devices/bus/a2bus/a2eext80col.cpp @@ -26,12 +26,12 @@ DEFINE_DEVICE_TYPE(A2EAUX_EXT80COL, a2eaux_ext80col_device, "a2eext80", "Apple I // LIVE DEVICE //************************************************************************** -a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2eaux_ext80col_device(mconfig, A2EAUX_EXT80COL, tag, owner, clock) { } -a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_ext80col_device::a2eaux_ext80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2eauxslot_card_interface(mconfig, *this) { diff --git a/src/devices/bus/a2bus/a2eext80col.h b/src/devices/bus/a2bus/a2eext80col.h index 239a22e1484..9cc494a4c2a 100644 --- a/src/devices/bus/a2bus/a2eext80col.h +++ b/src/devices/bus/a2bus/a2eext80col.h @@ -25,10 +25,10 @@ class a2eaux_ext80col_device: { public: // construction/destruction - a2eaux_ext80col_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2eaux_ext80col_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2eaux_ext80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2eaux_ext80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2eramworks3.cpp b/src/devices/bus/a2bus/a2eramworks3.cpp index 11dcf3cae68..a72c3ba70a4 100644 --- a/src/devices/bus/a2bus/a2eramworks3.cpp +++ b/src/devices/bus/a2bus/a2eramworks3.cpp @@ -30,24 +30,24 @@ DEFINE_DEVICE_TYPE(A2EAUX_FRANKLIN512, a2eaux_franklin512_device, "a2ef512", "Fr // LIVE DEVICE //************************************************************************** -a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2eaux_ramworks3_device(mconfig, A2EAUX_RAMWORKS3, tag, owner, clock) { } -a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_ramworks3_device::a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2eauxslot_card_interface(mconfig, *this), m_bank(0) { } -a2eaux_franklin384_device::a2eaux_franklin384_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_franklin384_device::a2eaux_franklin384_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2eaux_ramworks3_device(mconfig, A2EAUX_FRANKLIN384, tag, owner, clock) { } -a2eaux_franklin512_device::a2eaux_franklin512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_franklin512_device::a2eaux_franklin512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2eaux_ramworks3_device(mconfig, A2EAUX_FRANKLIN512, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2eramworks3.h b/src/devices/bus/a2bus/a2eramworks3.h index fc083445e3c..693b12ea226 100644 --- a/src/devices/bus/a2bus/a2eramworks3.h +++ b/src/devices/bus/a2bus/a2eramworks3.h @@ -23,10 +23,10 @@ class a2eaux_ramworks3_device: { public: // construction/destruction - a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2eaux_ramworks3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2eaux_ramworks3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -48,7 +48,7 @@ private: class a2eaux_franklin384_device: public a2eaux_ramworks3_device { public: - a2eaux_franklin384_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2eaux_franklin384_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void write_c07x(u8 offset, u8 data) override; @@ -57,7 +57,7 @@ protected: class a2eaux_franklin512_device: public a2eaux_ramworks3_device { public: - a2eaux_franklin512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2eaux_franklin512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void write_c07x(u8 offset, u8 data) override; diff --git a/src/devices/bus/a2bus/a2estd80col.cpp b/src/devices/bus/a2bus/a2estd80col.cpp index ab5d4bc48d1..7642b7211c6 100644 --- a/src/devices/bus/a2bus/a2estd80col.cpp +++ b/src/devices/bus/a2bus/a2estd80col.cpp @@ -21,12 +21,12 @@ DEFINE_DEVICE_TYPE(A2EAUX_STD80COL, a2eaux_std80col_device, "a2estd80", "Apple I // LIVE DEVICE //************************************************************************** -a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2eaux_std80col_device(mconfig, A2EAUX_STD80COL, tag, owner, clock) { } -a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2eaux_std80col_device::a2eaux_std80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2eauxslot_card_interface(mconfig, *this) { diff --git a/src/devices/bus/a2bus/a2estd80col.h b/src/devices/bus/a2bus/a2estd80col.h index d66a42a7495..78bdbd1b25f 100644 --- a/src/devices/bus/a2bus/a2estd80col.h +++ b/src/devices/bus/a2bus/a2estd80col.h @@ -25,10 +25,10 @@ class a2eaux_std80col_device: { public: // construction/destruction - a2eaux_std80col_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2eaux_std80col_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2eaux_std80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2eaux_std80col_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2hsscsi.cpp b/src/devices/bus/a2bus/a2hsscsi.cpp index b2043c20f30..d4779082092 100644 --- a/src/devices/bus/a2bus/a2hsscsi.cpp +++ b/src/devices/bus/a2bus/a2hsscsi.cpp @@ -97,7 +97,7 @@ const tiny_rom_entry *a2bus_hsscsi_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_hsscsi_device::a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_hsscsi_device::a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_ncr5380(*this, SCSI_5380_TAG), @@ -106,7 +106,7 @@ a2bus_hsscsi_device::a2bus_hsscsi_device(const machine_config &mconfig, device_t { } -a2bus_hsscsi_device::a2bus_hsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_hsscsi_device::a2bus_hsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_hsscsi_device(mconfig, A2BUS_HSSCSI, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2hsscsi.h b/src/devices/bus/a2bus/a2hsscsi.h index be200ccde0d..55c97948bb9 100644 --- a/src/devices/bus/a2bus/a2hsscsi.h +++ b/src/devices/bus/a2bus/a2hsscsi.h @@ -26,14 +26,14 @@ class a2bus_hsscsi_device: { public: // construction/destruction - a2bus_hsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_hsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } DECLARE_WRITE_LINE_MEMBER( drq_w ); protected: - a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_hsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2iwm.cpp b/src/devices/bus/a2bus/a2iwm.cpp index 74adc23ffa8..81bb8a5323c 100644 --- a/src/devices/bus/a2bus/a2iwm.cpp +++ b/src/devices/bus/a2bus/a2iwm.cpp @@ -59,7 +59,7 @@ const tiny_rom_entry *a2bus_iwm_card_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_iwm_device::a2bus_iwm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_iwm_device::a2bus_iwm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_iwm(*this, "iwm"), @@ -67,12 +67,12 @@ a2bus_iwm_device::a2bus_iwm_device(const machine_config &mconfig, device_type ty { } -a2bus_iwm_int_device::a2bus_iwm_int_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_iwm_int_device::a2bus_iwm_int_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_iwm_device(mconfig, A2BUS_IWM, tag, owner, clock) { } -a2bus_iwm_card_device::a2bus_iwm_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_iwm_card_device::a2bus_iwm_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_iwm_device(mconfig, A2BUS_IWM_CARD, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2iwm.h b/src/devices/bus/a2bus/a2iwm.h index 3f0fe974d3a..d7249565dc6 100644 --- a/src/devices/bus/a2bus/a2iwm.h +++ b/src/devices/bus/a2bus/a2iwm.h @@ -29,7 +29,7 @@ class a2bus_iwm_device: { protected: // construction/destruction - a2bus_iwm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_iwm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -50,13 +50,13 @@ private: class a2bus_iwm_int_device: public a2bus_iwm_device { public: - a2bus_iwm_int_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_iwm_int_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class a2bus_iwm_card_device: public a2bus_iwm_device { public: - a2bus_iwm_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_iwm_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/a2bus/a2mcms.cpp b/src/devices/bus/a2bus/a2mcms.cpp index f23a647f4a8..362e3843820 100644 --- a/src/devices/bus/a2bus/a2mcms.cpp +++ b/src/devices/bus/a2bus/a2mcms.cpp @@ -52,7 +52,7 @@ void a2bus_mcms1_device::device_add_mconfig(machine_config &config) SPEAKER(config, "mcms_l").front_left(); SPEAKER(config, "mcms_r").front_right(); - MCMS(config, m_mcms, 1000000); + MCMS(config, m_mcms, XTAL::u(1000000)); m_mcms->irq_cb().set(FUNC(a2bus_mcms1_device::irq_w)); m_mcms->add_route(0, "mcms_l", 1.0); m_mcms->add_route(1, "mcms_r", 1.0); @@ -62,14 +62,14 @@ void a2bus_mcms1_device::device_add_mconfig(machine_config &config) // LIVE DEVICE - Card 1 //************************************************************************** -a2bus_mcms1_device::a2bus_mcms1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_mcms1_device::a2bus_mcms1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_mcms(*this, ENGINE_TAG) { } -a2bus_mcms1_device::a2bus_mcms1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_mcms1_device::a2bus_mcms1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_mcms1_device(mconfig, A2BUS_MCMS1, tag, owner, clock) { } @@ -139,13 +139,13 @@ WRITE_LINE_MEMBER(a2bus_mcms1_device::irq_w) // LIVE DEVICE - Card 2 //************************************************************************** -a2bus_mcms2_device::a2bus_mcms2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_mcms2_device::a2bus_mcms2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_card1(nullptr), m_engine(nullptr) { } -a2bus_mcms2_device::a2bus_mcms2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_mcms2_device::a2bus_mcms2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_mcms2_device(mconfig, A2BUS_MCMS2, tag, owner, clock) { } @@ -196,7 +196,7 @@ void a2bus_mcms2_device::write_cnxx(uint8_t offset, uint8_t data) Sound device implementation */ -mcms_device::mcms_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcms_device::mcms_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MCMS, tag, owner, clock), device_sound_interface(mconfig, *this), m_write_irq(*this), m_stream(nullptr), m_timer(nullptr), m_clrtimer(nullptr), m_pBusDevice(nullptr), m_enabled(false), m_mastervol(0), m_rand(0) diff --git a/src/devices/bus/a2bus/a2mcms.h b/src/devices/bus/a2bus/a2mcms.h index 371c74c54fa..3340fdcbc1d 100644 --- a/src/devices/bus/a2bus/a2mcms.h +++ b/src/devices/bus/a2bus/a2mcms.h @@ -25,7 +25,7 @@ class mcms_device : public device_t, public device_sound_interface { public: // construction/destruction - mcms_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcms_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void voiceregs_w(offs_t offset, uint8_t data); void control_w(offs_t offset, uint8_t data); @@ -67,7 +67,7 @@ class a2bus_mcms1_device: { public: // construction/destruction - a2bus_mcms1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_mcms1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // comms from card 2 (oscillator parameter writes) mcms_device *get_engine(void); @@ -75,7 +75,7 @@ public: required_device m_mcms; protected: - a2bus_mcms1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_mcms1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -98,10 +98,10 @@ class a2bus_mcms2_device: { public: // construction/destruction - a2bus_mcms2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_mcms2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_mcms2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_mcms2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2memexp.cpp b/src/devices/bus/a2bus/a2memexp.cpp index 4c10de81848..1984b00c13a 100644 --- a/src/devices/bus/a2bus/a2memexp.cpp +++ b/src/devices/bus/a2bus/a2memexp.cpp @@ -48,7 +48,7 @@ public: protected: // construction/destruction - a2bus_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -71,13 +71,13 @@ private: class a2bus_memexpapple_device : public a2bus_memexp_device { public: - a2bus_memexpapple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_memexpapple_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class a2bus_ramfactor_device : public a2bus_memexp_device { public: - a2bus_ramfactor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ramfactor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -113,7 +113,7 @@ const tiny_rom_entry *a2bus_ramfactor_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_memexp_device::a2bus_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_memexp_device::a2bus_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_isramfactor(false), m_bankhior(0), m_addrmask(0), m_rom(*this, MEMEXP_ROM_REGION), @@ -121,7 +121,7 @@ a2bus_memexp_device::a2bus_memexp_device(const machine_config &mconfig, device_t { } -a2bus_memexpapple_device::a2bus_memexpapple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_memexpapple_device::a2bus_memexpapple_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_memexp_device(mconfig, A2BUS_MEMEXP, tag, owner, clock) { m_isramfactor = false; @@ -129,7 +129,7 @@ a2bus_memexpapple_device::a2bus_memexpapple_device(const machine_config &mconfig m_addrmask = 0xfffff; } -a2bus_ramfactor_device::a2bus_ramfactor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ramfactor_device::a2bus_ramfactor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_memexp_device(mconfig, A2BUS_RAMFACTOR, tag, owner, clock) { m_isramfactor = true; diff --git a/src/devices/bus/a2bus/a2midi.cpp b/src/devices/bus/a2bus/a2midi.cpp index f1cc7ecb2a6..392fea79bae 100644 --- a/src/devices/bus/a2bus/a2midi.cpp +++ b/src/devices/bus/a2bus/a2midi.cpp @@ -37,10 +37,10 @@ class a2bus_midi_device: { public: // construction/destruction - a2bus_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -66,11 +66,11 @@ private: void a2bus_midi_device::device_add_mconfig(machine_config &config) { - PTM6840(config, m_ptm, 1021800); - m_ptm->set_external_clocks(1021800.0f, 1021800.0f, 1021800.0f); + PTM6840(config, m_ptm, XTAL::u(1021800)); + m_ptm->set_external_clocks(XTAL::u(1021800), XTAL::u(1021800), XTAL::u(1021800)); m_ptm->irq_callback().set(FUNC(a2bus_midi_device::ptm_irq_w)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(FUNC(a2bus_midi_device::acia_irq_w)); @@ -78,7 +78,7 @@ void a2bus_midi_device::device_add_mconfig(machine_config &config) MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); acia_clock.signal_handler().set(FUNC(a2bus_midi_device::write_acia_clock)); } @@ -86,12 +86,12 @@ void a2bus_midi_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_midi_device::a2bus_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_midi_device::a2bus_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_midi_device(mconfig, A2BUS_MIDI, tag, owner, clock) { } -a2bus_midi_device::a2bus_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_midi_device::a2bus_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_ptm(*this, MIDI_PTM_TAG), diff --git a/src/devices/bus/a2bus/a2mockingboard.cpp b/src/devices/bus/a2bus/a2mockingboard.cpp index 0968d55c9a0..56c956950ab 100644 --- a/src/devices/bus/a2bus/a2mockingboard.cpp +++ b/src/devices/bus/a2bus/a2mockingboard.cpp @@ -54,7 +54,7 @@ public: protected: // construction/destruction - a2bus_ayboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ayboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -80,7 +80,7 @@ protected: class a2bus_mockingboard_device : public a2bus_ayboard_device { public: - a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void via1_out_b(u8 data) override; protected: @@ -99,7 +99,7 @@ private: class a2bus_phasor_device : public a2bus_ayboard_device { public: - a2bus_phasor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_phasor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void via1_out_b(u8 data) override; void via2_out_b(u8 data) override; @@ -124,7 +124,7 @@ private: class a2bus_echoplus_device : public a2bus_ayboard_device { public: - a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -145,13 +145,13 @@ protected: void a2bus_ayboard_device::add_common_devices(machine_config &config) { - MOS6522(config, m_via1, 1022727); + MOS6522(config, m_via1, XTAL::u(1022727)); m_via1->readpa_handler().set(FUNC(a2bus_ayboard_device::via1_in_a)); m_via1->writepa_handler().set(FUNC(a2bus_ayboard_device::via1_out_a)); m_via1->writepb_handler().set(FUNC(a2bus_ayboard_device::via1_out_b)); m_via1->irq_handler().set(FUNC(a2bus_ayboard_device::via1_irq_w)); - MOS6522(config, m_via2, 1022727); + MOS6522(config, m_via2, XTAL::u(1022727)); m_via2->readpa_handler().set(FUNC(a2bus_ayboard_device::via2_in_a)); m_via2->writepa_handler().set(FUNC(a2bus_ayboard_device::via2_out_a)); m_via2->writepb_handler().set(FUNC(a2bus_ayboard_device::via2_out_b)); @@ -159,7 +159,7 @@ void a2bus_ayboard_device::add_common_devices(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - AY8913(config, m_ay1, 1022727); + AY8913(config, m_ay1, XTAL::u(1022727)); m_ay1->add_route(ALL_OUTPUTS, "lspeaker", 0.5); } @@ -167,7 +167,7 @@ void a2bus_ayboard_device::device_add_mconfig(machine_config &config) { add_common_devices(config); - AY8913(config, m_ay2, 1022727); + AY8913(config, m_ay2, XTAL::u(1022727)); m_ay2->add_route(ALL_OUTPUTS, "rspeaker", 0.5); } @@ -178,10 +178,10 @@ void a2bus_mockingboard_device::device_add_mconfig(machine_config &config) m_via1->writepb_handler().set(FUNC(a2bus_mockingboard_device::via1_out_b)); m_via1->cb2_handler().set(FUNC(a2bus_mockingboard_device::write_via1_cb2)); - AY8913(config, m_ay2, 1022727); + AY8913(config, m_ay2, XTAL::u(1022727)); m_ay2->add_route(ALL_OUTPUTS, "rspeaker", 0.5); - VOTRAX_SC01(config, m_sc01, 1022727); + VOTRAX_SC01(config, m_sc01, XTAL::u(1022727)); m_sc01->ar_callback().set(m_via1, FUNC(via6522_device::write_cb1)); m_sc01->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_sc01->add_route(ALL_OUTPUTS, "rspeaker", 1.0); @@ -196,9 +196,9 @@ void a2bus_phasor_device::device_add_mconfig(machine_config &config) SPEAKER(config, "lspeaker2").front_left(); SPEAKER(config, "rspeaker2").front_right(); - AY8913(config, m_ay2, 1022727); - AY8913(config, m_ay3, 1022727); - AY8913(config, m_ay4, 1022727); + AY8913(config, m_ay2, XTAL::u(1022727)); + AY8913(config, m_ay3, XTAL::u(1022727)); + AY8913(config, m_ay4, XTAL::u(1022727)); m_ay2->add_route(ALL_OUTPUTS, "lspeaker2", 0.5); m_ay3->add_route(ALL_OUTPUTS, "rspeaker", 0.5); m_ay4->add_route(ALL_OUTPUTS, "rspeaker2", 0.5); @@ -211,11 +211,11 @@ void a2bus_echoplus_device::device_add_mconfig(machine_config &config) config.device_remove(VIA2_TAG); m_via1->writepb_handler().set(FUNC(a2bus_ayboard_device::via1_out_b)); - AY8913(config, m_ay2, 1022727); + AY8913(config, m_ay2, XTAL::u(1022727)); m_ay2->add_route(ALL_OUTPUTS, "rspeaker", 0.5); SPEAKER(config, "echosp").front_center(); - TMS5220(config, m_tms, 640000); + TMS5220(config, m_tms, XTAL::u(640000)); // echo+ has a TSP5220C soldered down on it m_tms->add_route(ALL_OUTPUTS, "echosp", 1.0); } @@ -224,7 +224,7 @@ void a2bus_echoplus_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_ayboard_device::a2bus_ayboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ayboard_device::a2bus_ayboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_via1(*this, VIA1_TAG), @@ -236,13 +236,13 @@ a2bus_ayboard_device::a2bus_ayboard_device(const machine_config &mconfig, device { } -a2bus_mockingboard_device::a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_mockingboard_device::a2bus_mockingboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ayboard_device(mconfig, A2BUS_MOCKINGBOARD, tag, owner, clock), m_sc01(*this, "sc01") { } -a2bus_phasor_device::a2bus_phasor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_phasor_device::a2bus_phasor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ayboard_device(mconfig, A2BUS_PHASOR, tag, owner, clock), m_ay3(*this, AY3_TAG), m_ay4(*this, AY4_TAG), @@ -250,7 +250,7 @@ a2bus_phasor_device::a2bus_phasor_device(const machine_config &mconfig, const ch { } -a2bus_echoplus_device::a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_echoplus_device::a2bus_echoplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ayboard_device(mconfig, A2BUS_ECHOPLUS, tag, owner, clock), m_tms(*this, E2P_TMS_TAG) { @@ -628,10 +628,10 @@ void a2bus_phasor_device::set_clocks() } else { - m_ay1->set_clock(1022727); - m_ay2->set_clock(1022727); - m_ay3->set_clock(1022727); - m_ay4->set_clock(1022727); + m_ay1->set_clock(XTAL::u(1022727)); + m_ay2->set_clock(XTAL::u(1022727)); + m_ay3->set_clock(XTAL::u(1022727)); + m_ay4->set_clock(XTAL::u(1022727)); } } diff --git a/src/devices/bus/a2bus/a2parprn.cpp b/src/devices/bus/a2bus/a2parprn.cpp index c79f04f6da8..4acbf05bac6 100644 --- a/src/devices/bus/a2bus/a2parprn.cpp +++ b/src/devices/bus/a2bus/a2parprn.cpp @@ -14,7 +14,7 @@ namespace { class a2bus_parprn_device : public device_t, public device_a2bus_card_interface { public: - a2bus_parprn_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + a2bus_parprn_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device_a2bus_card_interface implementation virtual u8 read_c0nx(u8 offset) override; @@ -104,7 +104,7 @@ INPUT_PORTS_END -a2bus_parprn_device::a2bus_parprn_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +a2bus_parprn_device::a2bus_parprn_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A2BUS_PARPRN, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_printer_conn(*this, "prn"), diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp index 537abe313ad..f4f311e22b0 100644 --- a/src/devices/bus/a2bus/a2pic.cpp +++ b/src/devices/bus/a2bus/a2pic.cpp @@ -14,7 +14,7 @@ namespace { class a2bus_pic_device : public device_t, public device_a2bus_card_interface { public: - a2bus_pic_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + a2bus_pic_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // DIP switch/jumper handlers DECLARE_INPUT_CHANGED_MEMBER(sw1_strobe); @@ -126,7 +126,7 @@ INPUT_PORTS_END -a2bus_pic_device::a2bus_pic_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +a2bus_pic_device::a2bus_pic_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A2BUS_PIC, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_printer_conn(*this, "prn"), diff --git a/src/devices/bus/a2bus/a2sam.cpp b/src/devices/bus/a2bus/a2sam.cpp index ecedc1eaa61..03921c099b8 100644 --- a/src/devices/bus/a2bus/a2sam.cpp +++ b/src/devices/bus/a2bus/a2sam.cpp @@ -28,7 +28,7 @@ class a2bus_sam_device: { public: // construction/destruction - a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A2BUS_SAM, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_dac(*this, "dac") @@ -54,7 +54,7 @@ protected: void a2bus_sam_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } } // anonymous namespace diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp index fb3e7e8e222..b5cfdb65903 100644 --- a/src/devices/bus/a2bus/a2scsi.cpp +++ b/src/devices/bus/a2bus/a2scsi.cpp @@ -90,7 +90,7 @@ const tiny_rom_entry *a2bus_scsi_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_scsi_device::a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_scsi_device::a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_ncr5380(*this, SCSI_5380_TAG), @@ -98,7 +98,7 @@ a2bus_scsi_device::a2bus_scsi_device(const machine_config &mconfig, device_type { } -a2bus_scsi_device::a2bus_scsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_scsi_device::a2bus_scsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_scsi_device(mconfig, A2BUS_SCSI, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2scsi.h b/src/devices/bus/a2bus/a2scsi.h index 098e7848563..06a49fd9115 100644 --- a/src/devices/bus/a2bus/a2scsi.h +++ b/src/devices/bus/a2bus/a2scsi.h @@ -26,12 +26,12 @@ class a2bus_scsi_device: { public: // construction/destruction - a2bus_scsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_scsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( drq_w ); protected: - a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2sd.cpp b/src/devices/bus/a2bus/a2sd.cpp index c5f1e743d0f..f20c57acfdc 100644 --- a/src/devices/bus/a2bus/a2sd.cpp +++ b/src/devices/bus/a2bus/a2sd.cpp @@ -62,9 +62,9 @@ ROM_END //------------------------------------------------- void a2bus_a2sd_device::device_add_mconfig(machine_config &config) { - AT28C64B(config, m_flash, 0); + AT28C64B(config, m_flash); - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set(FUNC(a2bus_a2sd_device::spi_miso_w)); } @@ -81,7 +81,7 @@ const tiny_rom_entry *a2bus_a2sd_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_a2sd_device::a2bus_a2sd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_a2sd_device::a2bus_a2sd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_flash(*this, "flash"), @@ -90,7 +90,7 @@ a2bus_a2sd_device::a2bus_a2sd_device(const machine_config &mconfig, device_type { } -a2bus_a2sd_device::a2bus_a2sd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_a2sd_device::a2bus_a2sd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_a2sd_device(mconfig, A2BUS_A2SD, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2sd.h b/src/devices/bus/a2bus/a2sd.h index 88414ec39d3..fe0730e11d2 100644 --- a/src/devices/bus/a2bus/a2sd.h +++ b/src/devices/bus/a2bus/a2sd.h @@ -27,10 +27,10 @@ class a2bus_a2sd_device: { public: // construction/destruction - a2bus_a2sd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_a2sd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_a2sd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_a2sd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2softcard.cpp b/src/devices/bus/a2bus/a2softcard.cpp index bab2ea728f8..24a16a650b8 100644 --- a/src/devices/bus/a2bus/a2softcard.cpp +++ b/src/devices/bus/a2bus/a2softcard.cpp @@ -47,14 +47,14 @@ void a2bus_softcard_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_z80(*this, Z80_TAG), m_bEnabled(false), m_FirstZ80Boot(false) { } -a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_softcard_device::a2bus_softcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_softcard_device(mconfig, A2BUS_SOFTCARD, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2softcard.h b/src/devices/bus/a2bus/a2softcard.h index de2ee0e220b..2767f6b73f7 100644 --- a/src/devices/bus/a2bus/a2softcard.h +++ b/src/devices/bus/a2bus/a2softcard.h @@ -23,10 +23,10 @@ class a2bus_softcard_device: { public: // construction/destruction - a2bus_softcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_softcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_softcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_softcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2ssc.cpp b/src/devices/bus/a2bus/a2ssc.cpp index 61ab1efc30b..1c77983e713 100644 --- a/src/devices/bus/a2bus/a2ssc.cpp +++ b/src/devices/bus/a2bus/a2ssc.cpp @@ -32,10 +32,10 @@ class a2bus_ssc_device: { public: // construction/destruction - a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -63,7 +63,7 @@ class apricorn_ssi_device : public a2bus_ssc_device { public: // construction/destruction - apricorn_ssi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricorn_ssi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -269,7 +269,7 @@ ioport_constructor apricorn_ssi_device::device_input_ports() const void a2bus_ssc_device::device_add_mconfig(machine_config &config) { - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(1.8432_MHz_XTAL); m_acia->irq_handler().set(FUNC(a2bus_ssc_device::acia_irq_w)); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); @@ -301,12 +301,12 @@ const tiny_rom_entry *apricorn_ssi_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ssc_device(mconfig, A2BUS_SSC, tag, owner, clock) { } -a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_dsw1(*this, "DSW1"), @@ -317,7 +317,7 @@ a2bus_ssc_device::a2bus_ssc_device(const machine_config &mconfig, device_type ty { } -apricorn_ssi_device::apricorn_ssi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricorn_ssi_device::apricorn_ssi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ssc_device(mconfig, APRICORN_SSI, tag, owner, clock), m_alt_bank(false) { diff --git a/src/devices/bus/a2bus/a2superdrive.cpp b/src/devices/bus/a2bus/a2superdrive.cpp index 7fb5820caa9..285d6dd0e80 100644 --- a/src/devices/bus/a2bus/a2superdrive.cpp +++ b/src/devices/bus/a2bus/a2superdrive.cpp @@ -55,10 +55,10 @@ class a2bus_superdrive_device: { public: // construction/destruction - a2bus_superdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_superdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_superdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_superdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -138,7 +138,7 @@ void a2bus_superdrive_device::device_add_mconfig(machine_config &config) -a2bus_superdrive_device::a2bus_superdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_superdrive_device::a2bus_superdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_65c02(*this, "superdrive_65c02"), @@ -149,7 +149,7 @@ a2bus_superdrive_device::a2bus_superdrive_device(const machine_config &mconfig, m_side(0) { } -a2bus_superdrive_device::a2bus_superdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +a2bus_superdrive_device::a2bus_superdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): a2bus_superdrive_device(mconfig, A2BUS_SUPERDRIVE, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2swyft.cpp b/src/devices/bus/a2bus/a2swyft.cpp index 6d9701d3a04..ac10b27924e 100644 --- a/src/devices/bus/a2bus/a2swyft.cpp +++ b/src/devices/bus/a2bus/a2swyft.cpp @@ -37,12 +37,12 @@ class a2bus_swyft_device: { public: // construction/destruction - a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; protected: - a2bus_swyft_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_swyft_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -73,12 +73,12 @@ const tiny_rom_entry *a2bus_swyft_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_swyft_device(mconfig, A2BUS_SWYFT, tag, owner, clock) { } -a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_swyft_device::a2bus_swyft_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_rom(*this, SWYFT_ROM_REGION) diff --git a/src/devices/bus/a2bus/a2themill.cpp b/src/devices/bus/a2bus/a2themill.cpp index 44925c4c68b..837f0a584c6 100644 --- a/src/devices/bus/a2bus/a2themill.cpp +++ b/src/devices/bus/a2bus/a2themill.cpp @@ -68,7 +68,7 @@ ioport_constructor a2bus_themill_device::device_input_ports() const void a2bus_themill_device::device_add_mconfig(machine_config &config) { - MC6809E(config, m_6809, 1021800); // 6809E runs at ~1 MHz as per Stellation Two's print ads + MC6809E(config, m_6809, XTAL::u(1021800)); // 6809E runs at ~1 MHz as per Stellation Two's print ads m_6809->set_addrmap(AS_PROGRAM, &a2bus_themill_device::m6809_mem); } @@ -76,7 +76,7 @@ void a2bus_themill_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_6809(*this, "m6809") @@ -88,7 +88,7 @@ a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, device { } -a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_themill_device::a2bus_themill_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_themill_device(mconfig, A2BUS_THEMILL, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2themill.h b/src/devices/bus/a2bus/a2themill.h index 59f0c2316d1..71285642c3d 100644 --- a/src/devices/bus/a2bus/a2themill.h +++ b/src/devices/bus/a2bus/a2themill.h @@ -25,10 +25,10 @@ class a2bus_themill_device: { public: // construction/destruction - a2bus_themill_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_themill_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_themill_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_themill_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/a2thunderclock.cpp b/src/devices/bus/a2bus/a2thunderclock.cpp index c109be5c276..260de5c5d4b 100644 --- a/src/devices/bus/a2bus/a2thunderclock.cpp +++ b/src/devices/bus/a2bus/a2thunderclock.cpp @@ -55,10 +55,10 @@ class a2bus_thunderclock_device: { public: // construction/destruction - a2bus_thunderclock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_thunderclock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_thunderclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_thunderclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -107,7 +107,7 @@ const tiny_rom_entry *a2bus_thunderclock_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_upd1990ac(*this, THUNDERCLOCK_UPD1990_TAG), @@ -116,7 +116,7 @@ a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconf { } -a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_thunderclock_device::a2bus_thunderclock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_thunderclock_device(mconfig, A2BUS_THUNDERCLOCK, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2ultraterm.cpp b/src/devices/bus/a2bus/a2ultraterm.cpp index 468c7402c46..fea8fa92aa1 100644 --- a/src/devices/bus/a2bus/a2ultraterm.cpp +++ b/src/devices/bus/a2bus/a2ultraterm.cpp @@ -104,7 +104,7 @@ class a2bus_videx160_device: { protected: // construction/destruction - a2bus_videx160_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_videx160_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -135,7 +135,7 @@ private: class a2bus_ultraterm_device : public a2bus_videx160_device { public: - a2bus_ultraterm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ultraterm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -143,7 +143,7 @@ public: class a2bus_ultratermenh_device : public a2bus_videx160_device { public: - a2bus_ultratermenh_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ultratermenh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -188,7 +188,7 @@ const tiny_rom_entry *a2bus_ultratermenh_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_videx160_device::a2bus_videx160_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_videx160_device::a2bus_videx160_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_framecnt(0), m_ctrl1(0), m_ctrl2(0), @@ -199,12 +199,12 @@ a2bus_videx160_device::a2bus_videx160_device(const machine_config &mconfig, devi { } -a2bus_ultraterm_device::a2bus_ultraterm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ultraterm_device::a2bus_ultraterm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_videx160_device(mconfig, A2BUS_ULTRATERM, tag, owner, clock) { } -a2bus_ultratermenh_device::a2bus_ultratermenh_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ultratermenh_device::a2bus_ultratermenh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_videx160_device(mconfig, A2BUS_ULTRATERMENH, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2videoterm.cpp b/src/devices/bus/a2bus/a2videoterm.cpp index c5c75fc3323..3b17a680593 100644 --- a/src/devices/bus/a2bus/a2videoterm.cpp +++ b/src/devices/bus/a2bus/a2videoterm.cpp @@ -106,7 +106,7 @@ class a2bus_videx80_device: { protected: // construction/destruction - a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -134,7 +134,7 @@ protected: class a2bus_videoterm_device : public a2bus_videx80_device { public: - a2bus_videoterm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_videoterm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -142,7 +142,7 @@ public: class a2bus_ap16_device : public a2bus_videx80_device { public: - a2bus_ap16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ap16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -155,7 +155,7 @@ protected: class a2bus_ap16alt_device : public a2bus_videx80_device { public: - a2bus_ap16alt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ap16alt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -167,7 +167,7 @@ protected: class a2bus_vtc1_device : public a2bus_videx80_device { public: - a2bus_vtc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_vtc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -176,7 +176,7 @@ public: class a2bus_aevm80_device : public a2bus_videx80_device { public: - a2bus_aevm80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_aevm80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -275,7 +275,7 @@ const tiny_rom_entry *a2bus_aevm80_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_videx80_device::a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_videx80_device::a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_crtc(*this, VIDEOTERM_MC6845_NAME), @@ -286,28 +286,28 @@ a2bus_videx80_device::a2bus_videx80_device(const machine_config &mconfig, device { } -a2bus_videoterm_device::a2bus_videoterm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_videoterm_device::a2bus_videoterm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_videx80_device(mconfig, A2BUS_VIDEOTERM, tag, owner, clock) { } -a2bus_ap16_device::a2bus_ap16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ap16_device::a2bus_ap16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_videx80_device(mconfig, A2BUS_IBSAP16, tag, owner, clock) { } -a2bus_ap16alt_device::a2bus_ap16alt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ap16alt_device::a2bus_ap16alt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_videx80_device(mconfig, A2BUS_IBSAP16ALT, tag, owner, clock) { } -a2bus_vtc1_device::a2bus_vtc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_vtc1_device::a2bus_vtc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_videx80_device(mconfig, A2BUS_VTC1, tag, owner, clock) { m_char_width = 11; } -a2bus_aevm80_device::a2bus_aevm80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_aevm80_device::a2bus_aevm80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_videx80_device(mconfig, A2BUS_AEVIEWMASTER80, tag, owner, clock) { m_char_width = 10; diff --git a/src/devices/bus/a2bus/a2vulcan.cpp b/src/devices/bus/a2bus/a2vulcan.cpp index 889e7df5de3..632b9c16b58 100644 --- a/src/devices/bus/a2bus/a2vulcan.cpp +++ b/src/devices/bus/a2bus/a2vulcan.cpp @@ -90,7 +90,7 @@ class a2bus_vulcanbase_device: { protected: // construction/destruction - a2bus_vulcanbase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_vulcanbase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -117,7 +117,7 @@ private: class a2bus_vulcan_device : public a2bus_vulcanbase_device { public: - a2bus_vulcan_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_vulcan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -127,7 +127,7 @@ protected: class a2bus_vulcaniie_device : public a2bus_vulcanbase_device { public: - a2bus_vulcaniie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_vulcaniie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -137,7 +137,7 @@ protected: class a2bus_vulcangold_device : public a2bus_vulcanbase_device { public: - a2bus_vulcangold_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_vulcangold_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -179,7 +179,7 @@ const tiny_rom_entry *a2bus_vulcangold_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_vulcanbase_device::a2bus_vulcanbase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_vulcanbase_device::a2bus_vulcanbase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_ata(*this, VULCAN_ATA_TAG), @@ -188,17 +188,17 @@ a2bus_vulcanbase_device::a2bus_vulcanbase_device(const machine_config &mconfig, { } -a2bus_vulcan_device::a2bus_vulcan_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_vulcan_device::a2bus_vulcan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_vulcanbase_device(mconfig, A2BUS_VULCAN, tag, owner, clock) { } -a2bus_vulcaniie_device::a2bus_vulcaniie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_vulcaniie_device::a2bus_vulcaniie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_vulcanbase_device(mconfig, A2BUS_VULCANIIE, tag, owner, clock) { } -a2bus_vulcangold_device::a2bus_vulcangold_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_vulcangold_device::a2bus_vulcangold_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_vulcanbase_device(mconfig, A2BUS_VULCANGOLD, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/a2zipdrive.cpp b/src/devices/bus/a2bus/a2zipdrive.cpp index 9a59af1a431..77accaf4105 100644 --- a/src/devices/bus/a2bus/a2zipdrive.cpp +++ b/src/devices/bus/a2bus/a2zipdrive.cpp @@ -98,7 +98,7 @@ class a2bus_zipdrivebase_device: { protected: // construction/destruction - a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -120,13 +120,13 @@ protected: class a2bus_zipdrive_device : public a2bus_zipdrivebase_device { public: - a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class a2bus_focusdrive_device : public a2bus_zipdrivebase_device { public: - a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -166,7 +166,7 @@ const tiny_rom_entry *a2bus_focusdrive_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_zipdrivebase_device::a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_zipdrivebase_device::a2bus_zipdrivebase_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_ata(*this, ZIPDRIVE_ATA_TAG), @@ -175,12 +175,12 @@ a2bus_zipdrivebase_device::a2bus_zipdrivebase_device(const machine_config &mconf { } -a2bus_zipdrive_device::a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_zipdrive_device::a2bus_zipdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_zipdrivebase_device(mconfig, A2BUS_ZIPDRIVE, tag, owner, clock) { } -a2bus_focusdrive_device::a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_focusdrive_device::a2bus_focusdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_zipdrivebase_device(mconfig, A2BUS_FOCUSDRIVE, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/ace2x00.cpp b/src/devices/bus/a2bus/ace2x00.cpp index ccea01c4ecc..922fea05c81 100644 --- a/src/devices/bus/a2bus/ace2x00.cpp +++ b/src/devices/bus/a2bus/ace2x00.cpp @@ -41,18 +41,18 @@ void a2bus_ace2x00_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_ace2x00_device::a2bus_ace2x00_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ace2x00_device::a2bus_ace2x00_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_rom(nullptr) { } -a2bus_ace2x00_slot1_device::a2bus_ace2x00_slot1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ace2x00_slot1_device::a2bus_ace2x00_slot1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ace2x00_device(mconfig, A2BUS_ACE2X00_SLOT1, tag, owner, clock) { } -a2bus_ace2x00_slot6_device::a2bus_ace2x00_slot6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ace2x00_slot6_device::a2bus_ace2x00_slot6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ace2x00_device(mconfig, A2BUS_ACE2X00_SLOT6, tag, owner, clock), m_iwm(*this, "iwm"), m_floppy(*this, "%u", 0U) diff --git a/src/devices/bus/a2bus/ace2x00.h b/src/devices/bus/a2bus/ace2x00.h index 9714f5aa965..2f041728df2 100644 --- a/src/devices/bus/a2bus/ace2x00.h +++ b/src/devices/bus/a2bus/ace2x00.h @@ -28,7 +28,7 @@ class a2bus_ace2x00_device: { public: // construction/destruction - a2bus_ace2x00_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ace2x00_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -47,7 +47,7 @@ protected: class a2bus_ace2x00_slot1_device : public a2bus_ace2x00_device { public: - a2bus_ace2x00_slot1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ace2x00_slot1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: }; @@ -55,7 +55,7 @@ protected: class a2bus_ace2x00_slot6_device : public a2bus_ace2x00_device { public: - a2bus_ace2x00_slot6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ace2x00_slot6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/a2bus/agat7langcard.cpp b/src/devices/bus/a2bus/agat7langcard.cpp index 05a8b87d3c3..70beed95351 100644 --- a/src/devices/bus/a2bus/agat7langcard.cpp +++ b/src/devices/bus/a2bus/agat7langcard.cpp @@ -32,13 +32,13 @@ DEFINE_DEVICE_TYPE(A2BUS_AGAT7LANGCARD, a2bus_agat7langcard_device, "a7lang", "A // LIVE DEVICE //************************************************************************** -a2bus_agat7langcard_device::a2bus_agat7langcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_agat7langcard_device::a2bus_agat7langcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_dxxx_bank(0), m_main_bank(0), m_csr(0) { } -a2bus_agat7langcard_device::a2bus_agat7langcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_agat7langcard_device::a2bus_agat7langcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_agat7langcard_device(mconfig, A2BUS_AGAT7LANGCARD, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/agat7langcard.h b/src/devices/bus/a2bus/agat7langcard.h index e7dae54ebfb..2884b273a1d 100644 --- a/src/devices/bus/a2bus/agat7langcard.h +++ b/src/devices/bus/a2bus/agat7langcard.h @@ -25,10 +25,10 @@ class a2bus_agat7langcard_device: { public: // construction/destruction - a2bus_agat7langcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat7langcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_agat7langcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat7langcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/agat7ports.cpp b/src/devices/bus/a2bus/agat7ports.cpp index afd196d6549..36c0e5dd7bc 100644 --- a/src/devices/bus/a2bus/agat7ports.cpp +++ b/src/devices/bus/a2bus/agat7ports.cpp @@ -63,7 +63,7 @@ void a2bus_agat7_ports_device::device_add_mconfig(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - I8251(config, m_d10, 0); + I8251(config, m_d10); } //------------------------------------------------- @@ -80,7 +80,7 @@ ioport_constructor a2bus_agat7_ports_device::device_input_ports() const // LIVE DEVICE //************************************************************************** -a2bus_agat7_ports_device::a2bus_agat7_ports_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_agat7_ports_device::a2bus_agat7_ports_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_printer_cfg(*this, "PRINTER_CFG") @@ -90,7 +90,7 @@ a2bus_agat7_ports_device::a2bus_agat7_ports_device(const machine_config &mconfig { } -a2bus_agat7_ports_device::a2bus_agat7_ports_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_agat7_ports_device::a2bus_agat7_ports_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_agat7_ports_device(mconfig, A2BUS_AGAT7_PORTS, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/agat7ports.h b/src/devices/bus/a2bus/agat7ports.h index 2ee4f38b4dd..51fc7230af3 100644 --- a/src/devices/bus/a2bus/agat7ports.h +++ b/src/devices/bus/a2bus/agat7ports.h @@ -30,10 +30,10 @@ class a2bus_agat7_ports_device: { public: // construction/destruction - a2bus_agat7_ports_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat7_ports_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_agat7_ports_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat7_ports_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/agat7ram.cpp b/src/devices/bus/a2bus/agat7ram.cpp index ef0b7a3a335..a0a8bd37127 100644 --- a/src/devices/bus/a2bus/agat7ram.cpp +++ b/src/devices/bus/a2bus/agat7ram.cpp @@ -32,13 +32,13 @@ DEFINE_DEVICE_TYPE(A2BUS_AGAT7RAM, a2bus_agat7ram_device, "a7ram", "Agat-7 32K R // LIVE DEVICE //************************************************************************** -a2bus_agat7ram_device::a2bus_agat7ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_agat7ram_device::a2bus_agat7ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_main_bank(0), m_csr(0) { } -a2bus_agat7ram_device::a2bus_agat7ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_agat7ram_device::a2bus_agat7ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_agat7ram_device(mconfig, A2BUS_AGAT7RAM, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/agat7ram.h b/src/devices/bus/a2bus/agat7ram.h index 6b8529fcb7b..81d65af83bc 100644 --- a/src/devices/bus/a2bus/agat7ram.h +++ b/src/devices/bus/a2bus/agat7ram.h @@ -25,10 +25,10 @@ class a2bus_agat7ram_device: { public: // construction/destruction - a2bus_agat7ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat7ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_agat7ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat7ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/agat840k_hle.cpp b/src/devices/bus/a2bus/agat840k_hle.cpp index cd6d01389b4..f0fdd572a0a 100644 --- a/src/devices/bus/a2bus/agat840k_hle.cpp +++ b/src/devices/bus/a2bus/agat840k_hle.cpp @@ -83,7 +83,7 @@ const tiny_rom_entry *a2bus_agat840k_hle_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_agat840k_hle_device::a2bus_agat840k_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_agat840k_hle_device::a2bus_agat840k_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_floppy_image(*this, "floppy%u", 0U) @@ -95,7 +95,7 @@ a2bus_agat840k_hle_device::a2bus_agat840k_hle_device(const machine_config &mconf { } -a2bus_agat840k_hle_device::a2bus_agat840k_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_agat840k_hle_device::a2bus_agat840k_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_agat840k_hle_device(mconfig, A2BUS_AGAT840K_HLE, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/agat840k_hle.h b/src/devices/bus/a2bus/agat840k_hle.h index a497f2bc7aa..5866344bad1 100644 --- a/src/devices/bus/a2bus/agat840k_hle.h +++ b/src/devices/bus/a2bus/agat840k_hle.h @@ -35,7 +35,7 @@ public: }; // construction/destruction - a2bus_agat840k_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat840k_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t d14_i_b(); uint8_t d15_i_a(); @@ -51,7 +51,7 @@ public: protected: // construction/destruction - a2bus_agat840k_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat840k_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/agat_fdc.cpp b/src/devices/bus/a2bus/agat_fdc.cpp index dc88c7ea39e..ce6ffe84934 100644 --- a/src/devices/bus/a2bus/agat_fdc.cpp +++ b/src/devices/bus/a2bus/agat_fdc.cpp @@ -104,7 +104,7 @@ const tiny_rom_entry *a2bus_agat_fdc_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_agat_fdc_device::a2bus_agat_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_agat_fdc_device::a2bus_agat_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_d14(*this, "d14") @@ -116,7 +116,7 @@ a2bus_agat_fdc_device::a2bus_agat_fdc_device(const machine_config &mconfig, devi { } -a2bus_agat_fdc_device::a2bus_agat_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_agat_fdc_device::a2bus_agat_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_agat_fdc_device(mconfig, A2BUS_AGAT_FDC, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/agat_fdc.h b/src/devices/bus/a2bus/agat_fdc.h index 84bfd82b268..e7e72811171 100644 --- a/src/devices/bus/a2bus/agat_fdc.h +++ b/src/devices/bus/a2bus/agat_fdc.h @@ -32,7 +32,7 @@ class a2bus_agat_fdc_device: { public: // construction/destruction - a2bus_agat_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t d14_i_b(); uint8_t d15_i_a(); @@ -45,7 +45,7 @@ public: protected: // construction/destruction - a2bus_agat_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_agat_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/booti.cpp b/src/devices/bus/a2bus/booti.cpp index 39c6b1055ba..734282e7302 100644 --- a/src/devices/bus/a2bus/booti.cpp +++ b/src/devices/bus/a2bus/booti.cpp @@ -45,10 +45,10 @@ class a2bus_booti_device: { public: // construction/destruction - a2bus_booti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_booti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_booti_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_booti_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -80,7 +80,7 @@ private: void a2bus_booti_device::device_add_mconfig(machine_config &config) { - AT28C64B(config, "flash", 0); + AT28C64B(config, "flash"); CH376(config, "ch376"); } @@ -98,7 +98,7 @@ const tiny_rom_entry *a2bus_booti_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_booti_device::a2bus_booti_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_booti_device::a2bus_booti_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_flash(*this, "flash"), @@ -107,7 +107,7 @@ a2bus_booti_device::a2bus_booti_device(const machine_config &mconfig, device_typ { } -a2bus_booti_device::a2bus_booti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_booti_device::a2bus_booti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_booti_device(mconfig, A2BUS_BOOTI, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/byte8251.cpp b/src/devices/bus/a2bus/byte8251.cpp index ffe6c6325c0..f5d87b133b5 100644 --- a/src/devices/bus/a2bus/byte8251.cpp +++ b/src/devices/bus/a2bus/byte8251.cpp @@ -45,7 +45,7 @@ class a2bus_byte8251_device : public device_t, public device_a2bus_card_interfac { public: // construction/destruction - a2bus_byte8251_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + a2bus_byte8251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(rate_changed); @@ -68,7 +68,7 @@ private: required_ioport m_switches; }; -a2bus_byte8251_device::a2bus_byte8251_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +a2bus_byte8251_device::a2bus_byte8251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A2BUS_BYTE8251, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_usart(*this, "8251") @@ -131,7 +131,7 @@ ioport_constructor a2bus_byte8251_device::device_input_ports() const void a2bus_byte8251_device::device_add_mconfig(machine_config &config) { - I8251(config, m_usart, 1021800); // CLK tied to ϕ1 signal from bus pin 38 + I8251(config, m_usart, XTAL::u(1021800)); // CLK tied to ϕ1 signal from bus pin 38 m_usart->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); MM5307AA(config, m_brg, A2BUS_7M_CLOCK / 8); diff --git a/src/devices/bus/a2bus/ccs7710.cpp b/src/devices/bus/a2bus/ccs7710.cpp index 17f8cdfe80e..fe6b15f0af1 100644 --- a/src/devices/bus/a2bus/ccs7710.cpp +++ b/src/devices/bus/a2bus/ccs7710.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(A2BUS_CCS7710, ccs7710_device, "ccs7710", "CCS Model 7710 Asy // DEVICE IMPLEMENTATION //************************************************************************** -ccs7710_device::ccs7710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ccs7710_device::ccs7710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A2BUS_CCS7710, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_acia(*this, "acia") diff --git a/src/devices/bus/a2bus/ccs7710.h b/src/devices/bus/a2bus/ccs7710.h index db2a7616891..5b3db8a7073 100644 --- a/src/devices/bus/a2bus/ccs7710.h +++ b/src/devices/bus/a2bus/ccs7710.h @@ -19,7 +19,7 @@ class ccs7710_device : public device_t, public device_a2bus_card_interface { public: // device type constructor - ccs7710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ccs7710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/a2bus/cmsscsi.cpp b/src/devices/bus/a2bus/cmsscsi.cpp index 77a7ade3e6f..f0876e57972 100644 --- a/src/devices/bus/a2bus/cmsscsi.cpp +++ b/src/devices/bus/a2bus/cmsscsi.cpp @@ -88,7 +88,7 @@ const tiny_rom_entry *a2bus_cmsscsi_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_cmsscsi_device::a2bus_cmsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_cmsscsi_device::a2bus_cmsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_ncr5380(*this, SCSI_5380_TAG), @@ -96,7 +96,7 @@ a2bus_cmsscsi_device::a2bus_cmsscsi_device(const machine_config &mconfig, device { } -a2bus_cmsscsi_device::a2bus_cmsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_cmsscsi_device::a2bus_cmsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_cmsscsi_device(mconfig, A2BUS_CMSSCSI, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/cmsscsi.h b/src/devices/bus/a2bus/cmsscsi.h index 8e417d76bc0..4d7a2ae6a56 100644 --- a/src/devices/bus/a2bus/cmsscsi.h +++ b/src/devices/bus/a2bus/cmsscsi.h @@ -26,12 +26,12 @@ class a2bus_cmsscsi_device: { public: // construction/destruction - a2bus_cmsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_cmsscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( drq_w ); protected: - a2bus_cmsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_cmsscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/computereyes2.cpp b/src/devices/bus/a2bus/computereyes2.cpp index 979472d00ef..f1ec52c54df 100644 --- a/src/devices/bus/a2bus/computereyes2.cpp +++ b/src/devices/bus/a2bus/computereyes2.cpp @@ -28,10 +28,10 @@ class a2bus_computereyes2_device: { public: // construction/destruction - a2bus_computereyes2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_computereyes2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_computereyes2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_computereyes2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -66,14 +66,14 @@ void a2bus_computereyes2_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_computereyes2_device::a2bus_computereyes2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_computereyes2_device::a2bus_computereyes2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_picture(*this, "srcimg") { } -a2bus_computereyes2_device::a2bus_computereyes2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_computereyes2_device::a2bus_computereyes2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_computereyes2_device(mconfig, A2BUS_COMPUTEREYES2, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/corvfdc01.cpp b/src/devices/bus/a2bus/corvfdc01.cpp index 212f49ed20b..be53e109f6f 100644 --- a/src/devices/bus/a2bus/corvfdc01.cpp +++ b/src/devices/bus/a2bus/corvfdc01.cpp @@ -103,7 +103,7 @@ const tiny_rom_entry *a2bus_corvfdc01_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_corvfdc01_device::a2bus_corvfdc01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_corvfdc01_device::a2bus_corvfdc01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_wdfdc(*this, FDC01_FDC_TAG), @@ -115,7 +115,7 @@ a2bus_corvfdc01_device::a2bus_corvfdc01_device(const machine_config &mconfig, de { } -a2bus_corvfdc01_device::a2bus_corvfdc01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_corvfdc01_device::a2bus_corvfdc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_corvfdc01_device(mconfig, A2BUS_CORVFDC01, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/corvfdc01.h b/src/devices/bus/a2bus/corvfdc01.h index 5c92107fcbe..76e7f1b95f2 100644 --- a/src/devices/bus/a2bus/corvfdc01.h +++ b/src/devices/bus/a2bus/corvfdc01.h @@ -28,10 +28,10 @@ class a2bus_corvfdc01_device: { public: // construction/destruction - a2bus_corvfdc01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_corvfdc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_corvfdc01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_corvfdc01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/corvfdc02.cpp b/src/devices/bus/a2bus/corvfdc02.cpp index 12c7aed06ac..cdddec35de1 100644 --- a/src/devices/bus/a2bus/corvfdc02.cpp +++ b/src/devices/bus/a2bus/corvfdc02.cpp @@ -77,7 +77,7 @@ const tiny_rom_entry *a2bus_corvfdc02_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_corvfdc02_device::a2bus_corvfdc02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_corvfdc02_device::a2bus_corvfdc02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_fdc(*this, FDC02_FDC_TAG), @@ -88,7 +88,7 @@ a2bus_corvfdc02_device::a2bus_corvfdc02_device(const machine_config &mconfig, de { } -a2bus_corvfdc02_device::a2bus_corvfdc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_corvfdc02_device::a2bus_corvfdc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_corvfdc02_device(mconfig, A2BUS_CORVFDC02, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/corvfdc02.h b/src/devices/bus/a2bus/corvfdc02.h index 825d68d564b..213c1bdfe36 100644 --- a/src/devices/bus/a2bus/corvfdc02.h +++ b/src/devices/bus/a2bus/corvfdc02.h @@ -28,10 +28,10 @@ class a2bus_corvfdc02_device: { public: // construction/destruction - a2bus_corvfdc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_corvfdc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_corvfdc02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_corvfdc02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/excel9.cpp b/src/devices/bus/a2bus/excel9.cpp index 706cb3c4f63..5fd27dea399 100644 --- a/src/devices/bus/a2bus/excel9.cpp +++ b/src/devices/bus/a2bus/excel9.cpp @@ -52,7 +52,7 @@ ROM_END void a2bus_excel9_device::device_add_mconfig(machine_config &config) { - MC6809E(config, m_6809, 1021800); // 6809E runs at ~1 MHz + MC6809E(config, m_6809, XTAL::u(1021800)); // 6809E runs at ~1 MHz m_6809->set_addrmap(AS_PROGRAM, &a2bus_excel9_device::m6809_mem); } @@ -69,7 +69,7 @@ const tiny_rom_entry *a2bus_excel9_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_excel9_device::a2bus_excel9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_excel9_device::a2bus_excel9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_6809(*this, "m6809") @@ -83,7 +83,7 @@ a2bus_excel9_device::a2bus_excel9_device(const machine_config &mconfig, device_t { } -a2bus_excel9_device::a2bus_excel9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_excel9_device::a2bus_excel9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_excel9_device(mconfig, A2BUS_EXCEL9, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/excel9.h b/src/devices/bus/a2bus/excel9.h index 2814cd6e394..a1fd57fc577 100644 --- a/src/devices/bus/a2bus/excel9.h +++ b/src/devices/bus/a2bus/excel9.h @@ -25,10 +25,10 @@ class a2bus_excel9_device: { public: // construction/destruction - a2bus_excel9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_excel9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_excel9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_excel9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/ezcgi.cpp b/src/devices/bus/a2bus/ezcgi.cpp index 3ebccb45518..b5a78c766f4 100644 --- a/src/devices/bus/a2bus/ezcgi.cpp +++ b/src/devices/bus/a2bus/ezcgi.cpp @@ -36,10 +36,10 @@ class a2bus_ezcgi_device: { public: // construction/destruction - a2bus_ezcgi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ezcgi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_ezcgi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ezcgi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -61,10 +61,10 @@ class a2bus_ezcgi_9938_device: { public: // construction/destruction - a2bus_ezcgi_9938_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ezcgi_9938_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_ezcgi_9938_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ezcgi_9938_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -86,10 +86,10 @@ class a2bus_ezcgi_9958_device: { public: // construction/destruction - a2bus_ezcgi_9958_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ezcgi_9958_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_ezcgi_9958_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ezcgi_9958_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -158,36 +158,36 @@ void a2bus_ezcgi_9958_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_ezcgi_device::a2bus_ezcgi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ezcgi_device::a2bus_ezcgi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ezcgi_device(mconfig, A2BUS_EZCGI, tag, owner, clock) { } -a2bus_ezcgi_device::a2bus_ezcgi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ezcgi_device::a2bus_ezcgi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_tms(*this, TMS_TAG) { } -a2bus_ezcgi_9938_device::a2bus_ezcgi_9938_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ezcgi_9938_device::a2bus_ezcgi_9938_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ezcgi_9938_device(mconfig, A2BUS_EZCGI_9938, tag, owner, clock) { } -a2bus_ezcgi_9938_device::a2bus_ezcgi_9938_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ezcgi_9938_device::a2bus_ezcgi_9938_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_tms(*this, TMS_TAG) { } -a2bus_ezcgi_9958_device::a2bus_ezcgi_9958_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ezcgi_9958_device::a2bus_ezcgi_9958_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ezcgi_9958_device(mconfig, A2BUS_EZCGI_9958, tag, owner, clock) { } -a2bus_ezcgi_9958_device::a2bus_ezcgi_9958_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ezcgi_9958_device::a2bus_ezcgi_9958_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_tms(*this, TMS_TAG) diff --git a/src/devices/bus/a2bus/grafex.cpp b/src/devices/bus/a2bus/grafex.cpp index 6855ebe174a..d7486a8d68e 100644 --- a/src/devices/bus/a2bus/grafex.cpp +++ b/src/devices/bus/a2bus/grafex.cpp @@ -46,10 +46,10 @@ class a2bus_grafex_device : public device_t, { public: // construction/destruction - a2bus_grafex_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_grafex_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_grafex_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_grafex_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; @@ -89,12 +89,12 @@ void a2bus_grafex_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_grafex_device::a2bus_grafex_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_grafex_device::a2bus_grafex_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_grafex_device(mconfig, A2BUS_GRAFEX, tag, owner, clock) { } -a2bus_grafex_device::a2bus_grafex_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_grafex_device::a2bus_grafex_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_gdc(*this, "upd7220"), diff --git a/src/devices/bus/a2bus/grappler.cpp b/src/devices/bus/a2bus/grappler.cpp index 933b9b3357f..0ad56766acf 100644 --- a/src/devices/bus/a2bus/grappler.cpp +++ b/src/devices/bus/a2bus/grappler.cpp @@ -63,7 +63,7 @@ public: virtual u8 read_c800(u16 offset) override; protected: - a2bus_grappler_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + a2bus_grappler_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // signal state u8 busy_in() const { return m_busy_in; } @@ -100,7 +100,7 @@ private: }; -a2bus_grappler_device_base::a2bus_grappler_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : +a2bus_grappler_device_base::a2bus_grappler_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_printer_conn(*this, "prn"), @@ -230,7 +230,7 @@ void a2bus_grappler_device_base::set_slct_in(s32 param) class a2bus_grappler_device : public a2bus_grappler_device_base { public: - a2bus_grappler_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + a2bus_grappler_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device_a2bus_card_interface implementation virtual u8 read_c0nx(u8 offset) override; @@ -260,7 +260,7 @@ private: }; -a2bus_grappler_device::a2bus_grappler_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +a2bus_grappler_device::a2bus_grappler_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2bus_grappler_device_base(mconfig, A2BUS_GRAPPLER, tag, owner, clock), m_strobe(1U), m_ack_latch(1U), @@ -443,7 +443,7 @@ public: virtual void write_cnxx(u8 offset, u8 data) override; protected: - a2bus_grapplerplus_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + a2bus_grapplerplus_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t implementation virtual ioport_constructor device_input_ports() const override; @@ -472,7 +472,7 @@ private: }; -a2bus_grapplerplus_device_base::a2bus_grapplerplus_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : +a2bus_grapplerplus_device_base::a2bus_grapplerplus_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : a2bus_grappler_device_base(mconfig, type, tag, owner, clock), m_s1(*this, "S1"), m_ack_latch(1U), @@ -619,7 +619,7 @@ void a2bus_grapplerplus_device_base::set_ack_in(s32 param) class a2bus_grapplerplus_device : public a2bus_grapplerplus_device_base { public: - a2bus_grapplerplus_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + a2bus_grapplerplus_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // DIP switch handlers virtual DECLARE_INPUT_CHANGED_MEMBER(sw_msb) override; @@ -653,7 +653,7 @@ private: }; -a2bus_grapplerplus_device::a2bus_grapplerplus_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +a2bus_grapplerplus_device::a2bus_grapplerplus_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2bus_grapplerplus_device_base(mconfig, A2BUS_GRAPPLERPLUS, tag, owner, clock), m_strobe_timer(nullptr), m_data_latch(0xffU), @@ -842,7 +842,7 @@ TIMER_CALLBACK_MEMBER(a2bus_grapplerplus_device::update_strobe) class a2bus_buf_grapplerplus_device : public a2bus_grapplerplus_device_base { public: - a2bus_buf_grapplerplus_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : + a2bus_buf_grapplerplus_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2bus_buf_grapplerplus_device(mconfig, A2BUS_BUFGRAPPLERPLUS, tag, owner, clock) { } @@ -851,7 +851,7 @@ public: virtual u8 read_c0nx(u8 offset) override; protected: - a2bus_buf_grapplerplus_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + a2bus_buf_grapplerplus_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t implementation virtual tiny_rom_entry const *device_rom_region() const override { return ROM_NAME(bufgrapplerplus); } @@ -895,7 +895,7 @@ private: -a2bus_buf_grapplerplus_device::a2bus_buf_grapplerplus_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : +a2bus_buf_grapplerplus_device::a2bus_buf_grapplerplus_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : a2bus_grapplerplus_device_base(mconfig, type, tag, owner, clock), m_mcu(*this, "mcu"), m_ram(), @@ -1223,7 +1223,7 @@ void a2bus_buf_grapplerplus_device::clear_ibusy(s32 param) class a2bus_buf_grapplerplus_reva_device : public a2bus_buf_grapplerplus_device { public: - a2bus_buf_grapplerplus_reva_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : + a2bus_buf_grapplerplus_reva_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2bus_buf_grapplerplus_device(mconfig, A2BUS_BUFGRAPPLERPLUSA, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/lancegs.cpp b/src/devices/bus/a2bus/lancegs.cpp index cca53536c2e..bcda172a191 100644 --- a/src/devices/bus/a2bus/lancegs.cpp +++ b/src/devices/bus/a2bus/lancegs.cpp @@ -63,10 +63,10 @@ class a2bus_lancegs_device: { public: // construction/destruction - a2bus_lancegs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_lancegs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_lancegs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_lancegs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -89,12 +89,12 @@ private: // LIVE DEVICE //************************************************************************** -a2bus_lancegs_device::a2bus_lancegs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_lancegs_device::a2bus_lancegs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_lancegs_device(mconfig, A2BUS_LANCEGS, tag, owner, clock) { } -a2bus_lancegs_device::a2bus_lancegs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_lancegs_device::a2bus_lancegs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_netinf(*this, "smc91c96"), @@ -106,7 +106,7 @@ a2bus_lancegs_device::a2bus_lancegs_device(const machine_config &mconfig, device void a2bus_lancegs_device::device_add_mconfig(machine_config &config) { SMC91C96(config, m_netinf, 20_MHz_XTAL); // Datasheet fig 12.26, pg 122. - I2C_24C04(config, m_i2cmem, 0).set_address(0x80).set_e0(1); + I2C_24C04(config, m_i2cmem).set_address(0x80).set_e0(1); m_netinf->irq_handler().set(FUNC(a2bus_lancegs_device::netinf_irq_w)); } diff --git a/src/devices/bus/a2bus/laser128.cpp b/src/devices/bus/a2bus/laser128.cpp index ecddbc66b14..5fcdf24caf7 100644 --- a/src/devices/bus/a2bus/laser128.cpp +++ b/src/devices/bus/a2bus/laser128.cpp @@ -41,18 +41,18 @@ void a2bus_laser128_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_rom(nullptr), m_slot7_bank(0), m_bParPrinter(false), m_slot7_ram_bank(0) { } -a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_laser128_device(mconfig, A2BUS_LASER128, tag, owner, clock) { } -a2bus_laser128_orig_device::a2bus_laser128_orig_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_laser128_orig_device::a2bus_laser128_orig_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_laser128_device(mconfig, A2BUS_LASER128_ORIG, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/laser128.h b/src/devices/bus/a2bus/laser128.h index 9858e3889f7..82b53e15f6a 100644 --- a/src/devices/bus/a2bus/laser128.h +++ b/src/devices/bus/a2bus/laser128.h @@ -25,13 +25,13 @@ class a2bus_laser128_device: { public: // construction/destruction - a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // special config API void set_parallel_printer(bool bPrinterIsParallel) { m_bParPrinter = bPrinterIsParallel; } protected: - a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -57,7 +57,7 @@ private: class a2bus_laser128_orig_device: public a2bus_laser128_device { public: - a2bus_laser128_orig_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_laser128_orig_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t read_c800(uint16_t offset) override; diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp index 6a40c244a40..f5003d02e3b 100644 --- a/src/devices/bus/a2bus/mouse.cpp +++ b/src/devices/bus/a2bus/mouse.cpp @@ -95,14 +95,14 @@ class a2bus_mouse_device: { public: // construction/destruction - a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; protected: - a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -183,14 +183,14 @@ ioport_constructor a2bus_mouse_device::device_input_ports() const void a2bus_mouse_device::device_add_mconfig(machine_config &config) { - M68705P3(config, m_mcu, 2043600); + M68705P3(config, m_mcu, XTAL::u(2043600)); m_mcu->porta_r().set(FUNC(a2bus_mouse_device::mcu_port_a_r)); m_mcu->portb_r().set(FUNC(a2bus_mouse_device::mcu_port_b_r)); m_mcu->porta_w().set(FUNC(a2bus_mouse_device::mcu_port_a_w)); m_mcu->portb_w().set(FUNC(a2bus_mouse_device::mcu_port_b_w)); m_mcu->portc_w().set(FUNC(a2bus_mouse_device::mcu_port_c_w)); - PIA6821(config, m_pia, 1021800); + PIA6821(config, m_pia, XTAL::u(1021800)); m_pia->writepa_handler().set(FUNC(a2bus_mouse_device::pia_out_a)); m_pia->writepb_handler().set(FUNC(a2bus_mouse_device::pia_out_b)); m_pia->tspb_handler().set_constant(0x00); @@ -212,7 +212,7 @@ const tiny_rom_entry *a2bus_mouse_device::device_rom_region() const LIVE DEVICE ***************************************************************************/ -a2bus_mouse_device::a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_mouse_device::a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_pia(*this, MOUSE_PIA_TAG), @@ -225,7 +225,7 @@ a2bus_mouse_device::a2bus_mouse_device(const machine_config &mconfig, device_typ { } -a2bus_mouse_device::a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_mouse_device::a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_mouse_device(mconfig, A2BUS_MOUSE, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/nippelclock.cpp b/src/devices/bus/a2bus/nippelclock.cpp index 047e13422e0..b86e8291ec2 100644 --- a/src/devices/bus/a2bus/nippelclock.cpp +++ b/src/devices/bus/a2bus/nippelclock.cpp @@ -55,14 +55,14 @@ WRITE_LINE_MEMBER(a2bus_nippelclock_device::irq_w) // LIVE DEVICE //************************************************************************** -a2bus_nippelclock_device::a2bus_nippelclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_nippelclock_device::a2bus_nippelclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_rtc(*this, "rtc") { } -a2bus_nippelclock_device::a2bus_nippelclock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_nippelclock_device::a2bus_nippelclock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_nippelclock_device(mconfig, A2BUS_NIPPELCLOCK, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/nippelclock.h b/src/devices/bus/a2bus/nippelclock.h index d2ac6f14c7f..4bc93e89fa6 100644 --- a/src/devices/bus/a2bus/nippelclock.h +++ b/src/devices/bus/a2bus/nippelclock.h @@ -26,10 +26,10 @@ class a2bus_nippelclock_device: { public: // construction/destruction - a2bus_nippelclock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_nippelclock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_nippelclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_nippelclock_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp index 06a87cc1820..2fa23e450cf 100644 --- a/src/devices/bus/a2bus/pc_xporter.cpp +++ b/src/devices/bus/a2bus/pc_xporter.cpp @@ -107,12 +107,12 @@ class a2bus_pcxporter_device: { public: // construction/destruction - a2bus_pcxporter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_pcxporter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); [[maybe_unused]] uint16_t pc_bios_r(offs_t offset); // TODO: hook up to something? protected: - a2bus_pcxporter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_pcxporter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -252,7 +252,7 @@ void a2bus_pcxporter_device::device_add_mconfig(machine_config &config) PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_v30, 0); - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace(m_v30, AS_PROGRAM); m_isabus->set_iospace(m_v30, AS_IO); m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w)); @@ -273,15 +273,15 @@ void a2bus_pcxporter_device::device_add_mconfig(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); - ISA8_SLOT(config, "isa1", 0, m_isabus, pc_isa8_cards, "cga", true); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, m_isabus, pc_isa8_cards, "fdc_xt", true); + ISA8_SLOT(config, "isa1", m_isabus, pc_isa8_cards, "cga", true); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", m_isabus, pc_isa8_cards, "fdc_xt", true); } //************************************************************************** // LIVE DEVICE //************************************************************************** -a2bus_pcxporter_device::a2bus_pcxporter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_pcxporter_device::a2bus_pcxporter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_v30(*this, "v30"), @@ -294,7 +294,7 @@ a2bus_pcxporter_device::a2bus_pcxporter_device(const machine_config &mconfig, de { } -a2bus_pcxporter_device::a2bus_pcxporter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_pcxporter_device::a2bus_pcxporter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_pcxporter_device(mconfig, A2BUS_PCXPORTER, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/prodosromdrive.cpp b/src/devices/bus/a2bus/prodosromdrive.cpp index d9275384a00..9cdc1c1bdc4 100644 --- a/src/devices/bus/a2bus/prodosromdrive.cpp +++ b/src/devices/bus/a2bus/prodosromdrive.cpp @@ -33,10 +33,10 @@ class a2bus_pdromdrive_device : public device_t, { public: // construction/destruction - a2bus_pdromdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_pdromdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_pdromdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_pdromdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -56,12 +56,12 @@ private: // LIVE DEVICE //************************************************************************** -a2bus_pdromdrive_device::a2bus_pdromdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_pdromdrive_device::a2bus_pdromdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_pdromdrive_device(mconfig, A2BUS_PRODOSROMDRIVE, tag, owner, clock) { } -a2bus_pdromdrive_device::a2bus_pdromdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_pdromdrive_device::a2bus_pdromdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_rom(*this, "romdrive") diff --git a/src/devices/bus/a2bus/q68.cpp b/src/devices/bus/a2bus/q68.cpp index 4729f450e4a..c98513be043 100644 --- a/src/devices/bus/a2bus/q68.cpp +++ b/src/devices/bus/a2bus/q68.cpp @@ -107,7 +107,7 @@ const tiny_rom_entry *a2bus_68k_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_68k_device::a2bus_68k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a2bus_68k_device::a2bus_68k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a2bus_card_interface(mconfig, *this) , m_m68008(*this, "m68008") @@ -115,12 +115,12 @@ a2bus_68k_device::a2bus_68k_device(const machine_config &mconfig, device_type ty { } -a2bus_q68_device::a2bus_q68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_q68_device::a2bus_q68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_68k_device(mconfig, A2BUS_Q68, tag, owner, clock) { } -a2bus_q68plus_device::a2bus_q68plus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_q68plus_device::a2bus_q68plus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_68k_device(mconfig, A2BUS_Q68PLUS, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/q68.h b/src/devices/bus/a2bus/q68.h index 34664a284f0..32f63838a06 100644 --- a/src/devices/bus/a2bus/q68.h +++ b/src/devices/bus/a2bus/q68.h @@ -33,7 +33,7 @@ class a2bus_68k_device: public device_a2bus_card_interface { protected: - a2bus_68k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_68k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -56,7 +56,7 @@ private: class a2bus_q68_device : public a2bus_68k_device { public: - a2bus_q68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_q68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -68,7 +68,7 @@ private: class a2bus_q68plus_device : public a2bus_68k_device { public: - a2bus_q68plus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_q68plus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static auto parent_rom_device_type() { return &A2BUS_Q68; } diff --git a/src/devices/bus/a2bus/ramcard128k.cpp b/src/devices/bus/a2bus/ramcard128k.cpp index 0736e39c5d4..a5a6b98dc0f 100644 --- a/src/devices/bus/a2bus/ramcard128k.cpp +++ b/src/devices/bus/a2bus/ramcard128k.cpp @@ -29,13 +29,13 @@ DEFINE_DEVICE_TYPE(A2BUS_RAMCARD128K, a2bus_ssramcard_device, "ssram128", "Satur // LIVE DEVICE //************************************************************************** -a2bus_ssramcard_device::a2bus_ssramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssramcard_device::a2bus_ssramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_last_offset(0), m_dxxx_bank(0), m_main_bank(0) { } -a2bus_ssramcard_device::a2bus_ssramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssramcard_device::a2bus_ssramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ssramcard_device(mconfig, A2BUS_RAMCARD128K, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/ramcard128k.h b/src/devices/bus/a2bus/ramcard128k.h index ee3ac683514..1fd5573d74a 100644 --- a/src/devices/bus/a2bus/ramcard128k.h +++ b/src/devices/bus/a2bus/ramcard128k.h @@ -25,10 +25,10 @@ class a2bus_ssramcard_device: { public: // construction/destruction - a2bus_ssramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_ssramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/ramcard16k.cpp b/src/devices/bus/a2bus/ramcard16k.cpp index cd91ce64230..612367d5776 100644 --- a/src/devices/bus/a2bus/ramcard16k.cpp +++ b/src/devices/bus/a2bus/ramcard16k.cpp @@ -29,13 +29,13 @@ DEFINE_DEVICE_TYPE(A2BUS_RAMCARD16K, a2bus_ramcard_device, "a2ram16k", "Apple II // LIVE DEVICE //************************************************************************** -a2bus_ramcard_device::a2bus_ramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ramcard_device::a2bus_ramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_inh_state(0), m_prewrite(false), m_dxxx_bank(0) { } -a2bus_ramcard_device::a2bus_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ramcard_device::a2bus_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ramcard_device(mconfig, A2BUS_RAMCARD16K, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/ramcard16k.h b/src/devices/bus/a2bus/ramcard16k.h index 21edcd7a7fd..0e35520bc30 100644 --- a/src/devices/bus/a2bus/ramcard16k.h +++ b/src/devices/bus/a2bus/ramcard16k.h @@ -25,10 +25,10 @@ class a2bus_ramcard_device: { public: // construction/destruction - a2bus_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_ramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ramcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/sider.cpp b/src/devices/bus/a2bus/sider.cpp index d2722c8bb77..4241cb30b3b 100644 --- a/src/devices/bus/a2bus/sider.cpp +++ b/src/devices/bus/a2bus/sider.cpp @@ -140,7 +140,7 @@ const tiny_rom_entry *a2bus_sider1card_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_sider_device::a2bus_sider_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_sider_device::a2bus_sider_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_sasibus(*this, "sasibus"), @@ -151,12 +151,12 @@ a2bus_sider_device::a2bus_sider_device(const machine_config &mconfig, device_typ { } -a2bus_sider2card_device::a2bus_sider2card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_sider2card_device::a2bus_sider2card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_sider_device(mconfig, A2BUS_SIDER2, tag, owner, clock) { } -a2bus_sider1card_device::a2bus_sider1card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_sider1card_device::a2bus_sider1card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_sider_device(mconfig, A2BUS_SIDER1, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/sider.h b/src/devices/bus/a2bus/sider.h index 6bb5ed3c036..ed7f56e5ede 100644 --- a/src/devices/bus/a2bus/sider.h +++ b/src/devices/bus/a2bus/sider.h @@ -27,7 +27,7 @@ class a2bus_sider_device: public device_a2bus_card_interface { protected: - a2bus_sider_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_sider_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -53,14 +53,14 @@ private: class a2bus_sider2card_device: public a2bus_sider_device { public: - a2bus_sider2card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_sider2card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; class a2bus_sider1card_device: public a2bus_sider_device { public: - a2bus_sider1card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_sider1card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/bus/a2bus/softcard3.cpp b/src/devices/bus/a2bus/softcard3.cpp index fb3da1eb291..1b3d24e809f 100644 --- a/src/devices/bus/a2bus/softcard3.cpp +++ b/src/devices/bus/a2bus/softcard3.cpp @@ -60,7 +60,7 @@ void a2bus_softcard3_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_softcard3_device::a2bus_softcard3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_softcard3_device::a2bus_softcard3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_z80(*this, "z80"), @@ -72,7 +72,7 @@ a2bus_softcard3_device::a2bus_softcard3_device(const machine_config &mconfig, de { } -a2bus_softcard3_device::a2bus_softcard3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_softcard3_device::a2bus_softcard3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_softcard3_device(mconfig, A2BUS_SOFTCARD3, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/softcard3.h b/src/devices/bus/a2bus/softcard3.h index a048c9e754d..cb7d27539e1 100644 --- a/src/devices/bus/a2bus/softcard3.h +++ b/src/devices/bus/a2bus/softcard3.h @@ -25,12 +25,12 @@ class a2bus_softcard3_device: public: // construction/destruction - a2bus_softcard3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_softcard3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void z80_io_w(offs_t offset, uint8_t data); protected: - a2bus_softcard3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_softcard3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/ssbapple.cpp b/src/devices/bus/a2bus/ssbapple.cpp index c4ad0f7684b..0aae9420bee 100644 --- a/src/devices/bus/a2bus/ssbapple.cpp +++ b/src/devices/bus/a2bus/ssbapple.cpp @@ -35,13 +35,13 @@ class a2bus_ssb_device: { public: // construction/destruction - a2bus_ssb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::SOUND; } required_device m_tms; protected: - a2bus_ssb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -64,7 +64,7 @@ protected: void a2bus_ssb_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "ssbapple").front_center(); - TMS5220(config, m_tms, 640000); // guess - this gives 8 kHz output according to the datasheet + TMS5220(config, m_tms, XTAL::u(640000)); // guess - this gives 8 kHz output according to the datasheet m_tms->add_route(ALL_OUTPUTS, "ssbapple", 1.0); } @@ -72,14 +72,14 @@ void a2bus_ssb_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_ssb_device::a2bus_ssb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssb_device::a2bus_ssb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_tms(*this, TMS_TAG) { } -a2bus_ssb_device::a2bus_ssb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssb_device::a2bus_ssb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ssb_device(mconfig, A2BUS_SSBAPPLE, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/ssprite.cpp b/src/devices/bus/a2bus/ssprite.cpp index 2fdecb117c9..14889c2a83d 100644 --- a/src/devices/bus/a2bus/ssprite.cpp +++ b/src/devices/bus/a2bus/ssprite.cpp @@ -39,10 +39,10 @@ class a2bus_ssprite_device: { public: // construction/destruction - a2bus_ssprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_ssprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_ssprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -72,20 +72,20 @@ void a2bus_ssprite_device::device_add_mconfig(machine_config &config) SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER); SPEAKER(config, "mono").front_center(); - AY8912(config, m_ay, 1022727).add_route(ALL_OUTPUTS, "mono", 1.0); - TMS5220(config, m_tms5220, 640000).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8912(config, m_ay, XTAL::u(1022727)).add_route(ALL_OUTPUTS, "mono", 1.0); + TMS5220(config, m_tms5220, XTAL::u(640000)).add_route(ALL_OUTPUTS, "mono", 1.0); } //************************************************************************** // LIVE DEVICE //************************************************************************** -a2bus_ssprite_device::a2bus_ssprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssprite_device::a2bus_ssprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_ssprite_device(mconfig, A2BUS_SSPRITE, tag, owner, clock) { } -a2bus_ssprite_device::a2bus_ssprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_ssprite_device::a2bus_ssprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_tms(*this, TMS_TAG), diff --git a/src/devices/bus/a2bus/suprterminal.cpp b/src/devices/bus/a2bus/suprterminal.cpp index 796937bebcb..f064c569e66 100644 --- a/src/devices/bus/a2bus/suprterminal.cpp +++ b/src/devices/bus/a2bus/suprterminal.cpp @@ -47,10 +47,10 @@ class a2bus_suprterminal_device: { public: // construction/destruction - a2bus_suprterminal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + a2bus_suprterminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_suprterminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + a2bus_suprterminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -103,12 +103,12 @@ const tiny_rom_entry *a2bus_suprterminal_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_suprterminal_device::a2bus_suprterminal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +a2bus_suprterminal_device::a2bus_suprterminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_suprterminal_device(mconfig, A2BUS_SUPRTERMINAL, tag, owner, clock) { } -a2bus_suprterminal_device::a2bus_suprterminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +a2bus_suprterminal_device::a2bus_suprterminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_crtc(*this, "crtc"), diff --git a/src/devices/bus/a2bus/timemasterho.cpp b/src/devices/bus/a2bus/timemasterho.cpp index 8dbef3a5a37..fa6c30df595 100644 --- a/src/devices/bus/a2bus/timemasterho.cpp +++ b/src/devices/bus/a2bus/timemasterho.cpp @@ -86,10 +86,10 @@ class a2bus_timemasterho_device: { public: // construction/destruction - a2bus_timemasterho_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_timemasterho_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_timemasterho_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_timemasterho_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -138,13 +138,13 @@ ioport_constructor a2bus_timemasterho_device::device_input_ports() const void a2bus_timemasterho_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 1021800); + PIA6821(config, m_pia, XTAL::u(1021800)); m_pia->writepa_handler().set(FUNC(a2bus_timemasterho_device::pia_out_a)); m_pia->writepb_handler().set(FUNC(a2bus_timemasterho_device::pia_out_b)); m_pia->irqa_handler().set(FUNC(a2bus_timemasterho_device::pia_irqa_w)); m_pia->irqb_handler().set(FUNC(a2bus_timemasterho_device::pia_irqb_w)); - MSM5832(config, m_msm5832, 32768); + MSM5832(config, m_msm5832, XTAL::u(32768)); } //------------------------------------------------- @@ -160,7 +160,7 @@ const tiny_rom_entry *a2bus_timemasterho_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -a2bus_timemasterho_device::a2bus_timemasterho_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_timemasterho_device::a2bus_timemasterho_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_pia(*this, TIMEMASTER_PIA_TAG), @@ -170,7 +170,7 @@ a2bus_timemasterho_device::a2bus_timemasterho_device(const machine_config &mconf { } -a2bus_timemasterho_device::a2bus_timemasterho_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_timemasterho_device::a2bus_timemasterho_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_timemasterho_device(mconfig, A2BUS_TIMEMASTERHO, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/titan3plus2.cpp b/src/devices/bus/a2bus/titan3plus2.cpp index e04dc03448a..4c1a3970828 100644 --- a/src/devices/bus/a2bus/titan3plus2.cpp +++ b/src/devices/bus/a2bus/titan3plus2.cpp @@ -49,14 +49,14 @@ void a2bus_titan3plus2_device::device_add_mconfig(machine_config &config) APPLE2_GAMEIO(config, m_gameio, apple2_gameio_device::default_options, nullptr); } -a2bus_titan3plus2_device::a2bus_titan3plus2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_titan3plus2_device::a2bus_titan3plus2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_gameio(*this, "gameio"), m_inh_state(0), m_last_offset(0), m_dxxx_bank(0), m_main_bank(0), m_enabled(false) { } -a2bus_titan3plus2_device::a2bus_titan3plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_titan3plus2_device::a2bus_titan3plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_titan3plus2_device(mconfig, A2BUS_TITAN3PLUS2, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/titan3plus2.h b/src/devices/bus/a2bus/titan3plus2.h index f162f115d8e..9b9326e14a3 100644 --- a/src/devices/bus/a2bus/titan3plus2.h +++ b/src/devices/bus/a2bus/titan3plus2.h @@ -26,10 +26,10 @@ class a2bus_titan3plus2_device: { public: // construction/destruction - a2bus_titan3plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_titan3plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_titan3plus2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_titan3plus2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/a2bus/transwarp.cpp b/src/devices/bus/a2bus/transwarp.cpp index a87f724a704..d3288b67966 100644 --- a/src/devices/bus/a2bus/transwarp.cpp +++ b/src/devices/bus/a2bus/transwarp.cpp @@ -136,7 +136,7 @@ void a2bus_transwarp_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -a2bus_transwarp_device::a2bus_transwarp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +a2bus_transwarp_device::a2bus_transwarp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_bEnabled(false), @@ -147,7 +147,7 @@ a2bus_transwarp_device::a2bus_transwarp_device(const machine_config &mconfig, de { } -a2bus_transwarp_device::a2bus_transwarp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2bus_transwarp_device::a2bus_transwarp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_transwarp_device(mconfig, A2BUS_TRANSWARP, tag, owner, clock) { } diff --git a/src/devices/bus/a2bus/transwarp.h b/src/devices/bus/a2bus/transwarp.h index 1213ea26c8b..7846ef23f9e 100644 --- a/src/devices/bus/a2bus/transwarp.h +++ b/src/devices/bus/a2bus/transwarp.h @@ -23,10 +23,10 @@ class a2bus_transwarp_device: { public: // construction/destruction - a2bus_transwarp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2bus_transwarp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a2bus_transwarp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a2bus_transwarp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // overrides of device_t functions virtual void device_start() override; diff --git a/src/devices/bus/a2bus/uniprint.cpp b/src/devices/bus/a2bus/uniprint.cpp index 9bc72a4f2bd..b0be885c3ad 100644 --- a/src/devices/bus/a2bus/uniprint.cpp +++ b/src/devices/bus/a2bus/uniprint.cpp @@ -15,7 +15,7 @@ namespace { class a2bus_uniprint_device : public device_t, public device_a2bus_card_interface { public: - a2bus_uniprint_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + a2bus_uniprint_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device_a2bus_card_interface implementation virtual u8 read_c0nx(u8 offset) override; @@ -88,7 +88,7 @@ INPUT_PORTS_START(uniprint) INPUT_PORTS_END -a2bus_uniprint_device::a2bus_uniprint_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +a2bus_uniprint_device::a2bus_uniprint_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A2BUS_UNIPRINT, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_printer_conn(*this, "prn"), diff --git a/src/devices/bus/a2bus/uthernet.cpp b/src/devices/bus/a2bus/uthernet.cpp index 6f3a8d21b47..1487f088a0c 100644 --- a/src/devices/bus/a2bus/uthernet.cpp +++ b/src/devices/bus/a2bus/uthernet.cpp @@ -25,13 +25,13 @@ class a2bus_uthernet_device: { public: // construction/destruction - a2bus_uthernet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + a2bus_uthernet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a2bus_uthernet_device(mconfig, A2BUS_UTHERNET, tag, owner, clock) { } protected: - a2bus_uthernet_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + a2bus_uthernet_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_a2bus_card_interface(mconfig, *this), m_netinf(*this, "cs8900a") diff --git a/src/devices/bus/a2gameio/computereyes.cpp b/src/devices/bus/a2gameio/computereyes.cpp index 38b100586e4..7303b671512 100644 --- a/src/devices/bus/a2gameio/computereyes.cpp +++ b/src/devices/bus/a2gameio/computereyes.cpp @@ -22,7 +22,7 @@ class apple2_compeyes_device : public device_t, public device_a2gameio_interface { public: // construction/destruction - apple2_compeyes_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + apple2_compeyes_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -48,7 +48,7 @@ private: // DEVICE IMPLEMENTATION //************************************************************************** -apple2_compeyes_device::apple2_compeyes_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +apple2_compeyes_device::apple2_compeyes_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_COMPUTEREYES, tag, owner, clock) , device_a2gameio_interface(mconfig, *this) , m_picture(*this, "srcimg") diff --git a/src/devices/bus/a2gameio/gameio.cpp b/src/devices/bus/a2gameio/gameio.cpp index 9a600776a90..82b210c8f64 100644 --- a/src/devices/bus/a2gameio/gameio.cpp +++ b/src/devices/bus/a2gameio/gameio.cpp @@ -62,7 +62,7 @@ // device type definition DEFINE_DEVICE_TYPE(APPLE2_GAMEIO, apple2_gameio_device, "a2gameio", "Apple II Game I/O Connector") -apple2_gameio_device::apple2_gameio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +apple2_gameio_device::apple2_gameio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_GAMEIO, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_intf(nullptr) diff --git a/src/devices/bus/a2gameio/gameio.h b/src/devices/bus/a2gameio/gameio.h index 7ff1771b17b..10ff3241264 100644 --- a/src/devices/bus/a2gameio/gameio.h +++ b/src/devices/bus/a2gameio/gameio.h @@ -25,11 +25,11 @@ class apple2_gameio_device : public device_t, public device_single_card_slot_int { public: // construction/destruction - apple2_gameio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + apple2_gameio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template apple2_gameio_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : apple2_gameio_device(mconfig, tag, owner, 0U) + : apple2_gameio_device(mconfig, tag, owner) { option_reset(); opts(*this); diff --git a/src/devices/bus/a2gameio/gizmo.cpp b/src/devices/bus/a2gameio/gizmo.cpp index 999fdf94ded..eee0419e053 100644 --- a/src/devices/bus/a2gameio/gizmo.cpp +++ b/src/devices/bus/a2gameio/gizmo.cpp @@ -19,7 +19,7 @@ class apple2_gizmo_device : public device_t, public device_a2gameio_interface { public: // construction/destruction - apple2_gizmo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + apple2_gizmo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -55,7 +55,7 @@ INPUT_PORTS_END // DEVICE IMPLEMENTATION //************************************************************************** -apple2_gizmo_device::apple2_gizmo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +apple2_gizmo_device::apple2_gizmo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_GIZMO, tag, owner, clock) , device_a2gameio_interface(mconfig, *this) , m_player1(*this, "joystick_p1") diff --git a/src/devices/bus/a2gameio/joyport.cpp b/src/devices/bus/a2gameio/joyport.cpp index 1c2f1118216..943f5e3d33b 100644 --- a/src/devices/bus/a2gameio/joyport.cpp +++ b/src/devices/bus/a2gameio/joyport.cpp @@ -25,7 +25,7 @@ class apple2_joyport_device : public device_t, public device_a2gameio_interface { public: // construction/destruction - apple2_joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + apple2_joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -69,7 +69,7 @@ INPUT_PORTS_END // DEVICE IMPLEMENTATION //************************************************************************** -apple2_joyport_device::apple2_joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +apple2_joyport_device::apple2_joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_JOYPORT, tag, owner, clock) , device_a2gameio_interface(mconfig, *this) , m_player1(*this, "joystick_p1") diff --git a/src/devices/bus/a2gameio/joystick.cpp b/src/devices/bus/a2gameio/joystick.cpp index 498b32757e2..737ddf9ea5e 100644 --- a/src/devices/bus/a2gameio/joystick.cpp +++ b/src/devices/bus/a2gameio/joystick.cpp @@ -17,7 +17,7 @@ class apple2_joystick_device : public device_t, public device_a2gameio_interface { public: // construction/destruction - apple2_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + apple2_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -93,7 +93,7 @@ INPUT_PORTS_END // DEVICE IMPLEMENTATION //************************************************************************** -apple2_joystick_device::apple2_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +apple2_joystick_device::apple2_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_JOYSTICK, tag, owner, clock) , device_a2gameio_interface(mconfig, *this) , m_joy_x(*this, "joystick_%u_x", 1U) diff --git a/src/devices/bus/a2gameio/paddles.cpp b/src/devices/bus/a2gameio/paddles.cpp index 5f0955fba89..ee38902b826 100644 --- a/src/devices/bus/a2gameio/paddles.cpp +++ b/src/devices/bus/a2gameio/paddles.cpp @@ -17,7 +17,7 @@ class apple2_paddles_device : public device_t, public device_a2gameio_interface { public: // construction/destruction - apple2_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + apple2_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -68,7 +68,7 @@ INPUT_PORTS_END // DEVICE IMPLEMENTATION //************************************************************************** -apple2_paddles_device::apple2_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +apple2_paddles_device::apple2_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_PADDLES, tag, owner, clock) , device_a2gameio_interface(mconfig, *this) , m_pdl(*this, "paddle_%u", 1U) diff --git a/src/devices/bus/a7800/a78_slot.cpp b/src/devices/bus/a7800/a78_slot.cpp index cee7d3bd99f..d40cdc6a2a0 100644 --- a/src/devices/bus/a7800/a78_slot.cpp +++ b/src/devices/bus/a7800/a78_slot.cpp @@ -111,7 +111,7 @@ void device_a78_cart_interface::nvram_alloc(uint32_t size) //------------------------------------------------- // a78_cart_slot_device - constructor //------------------------------------------------- -a78_cart_slot_device::a78_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_cart_slot_device::a78_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A78_CART_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_slot_interface(mconfig, *this) diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h index d27a175e3d1..80051d4c99f 100644 --- a/src/devices/bus/a7800/a78_slot.h +++ b/src/devices/bus/a7800/a78_slot.h @@ -90,14 +90,14 @@ public: // construction/destruction template a78_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : a78_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : a78_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - a78_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + a78_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~a78_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/a7800/cpuwiz.cpp b/src/devices/bus/a7800/cpuwiz.cpp index 3a8c3cc1546..6cd92b53124 100644 --- a/src/devices/bus/a7800/cpuwiz.cpp +++ b/src/devices/bus/a7800/cpuwiz.cpp @@ -41,24 +41,24 @@ DEFINE_DEVICE_TYPE(A78_ROM_MEGACART, a78_megacart_device, "a78_megacart", "Atari DEFINE_DEVICE_TYPE(A78_ROM_P450_VB, a78_rom_p450_vb_device, "a78_versapokey", "Atari 7800 VersaBoard + POKEY @ 0x450 Cart") -a78_versaboard_device::a78_versaboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_versaboard_device::a78_versaboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg_device(mconfig, type, tag, owner, clock), m_ram_bank(0) { } -a78_versaboard_device::a78_versaboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_versaboard_device::a78_versaboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_versaboard_device(mconfig, A78_ROM_VERSABOARD, tag, owner, clock) { } -a78_megacart_device::a78_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_megacart_device::a78_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_versaboard_device(mconfig, A78_ROM_MEGACART, tag, owner, clock) { } -a78_rom_p450_vb_device::a78_rom_p450_vb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_p450_vb_device::a78_rom_p450_vb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_versaboard_device(mconfig, A78_ROM_P450_VB, tag, owner, clock) , m_pokey450(*this, "pokey450") { diff --git a/src/devices/bus/a7800/cpuwiz.h b/src/devices/bus/a7800/cpuwiz.h index e55c637592f..148f8c936d5 100644 --- a/src/devices/bus/a7800/cpuwiz.h +++ b/src/devices/bus/a7800/cpuwiz.h @@ -15,7 +15,7 @@ class a78_versaboard_device : public a78_rom_sg_device { public: // construction/destruction - a78_versaboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_versaboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -26,7 +26,7 @@ public: virtual void write_40xx(offs_t offset, uint8_t data) override; protected: - a78_versaboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_versaboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); int m_ram_bank; }; @@ -38,7 +38,7 @@ class a78_megacart_device : public a78_versaboard_device { public: // construction/destruction - a78_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual void write_40xx(offs_t offset, uint8_t data) override; @@ -53,7 +53,7 @@ class a78_rom_p450_vb_device : public a78_versaboard_device { public: // construction/destruction - a78_rom_p450_vb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_p450_vb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } diff --git a/src/devices/bus/a7800/hiscore.cpp b/src/devices/bus/a7800/hiscore.cpp index a0c821552d8..3c1199d51c4 100644 --- a/src/devices/bus/a7800/hiscore.cpp +++ b/src/devices/bus/a7800/hiscore.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(A78_HISCORE, a78_hiscore_device, "a78_hiscore", "Atari 7800 High Score Cart") -a78_hiscore_device::a78_hiscore_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_hiscore_device::a78_hiscore_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, A78_HISCORE, tag, owner, clock) , m_hscslot(*this, "hsc_slot") { diff --git a/src/devices/bus/a7800/hiscore.h b/src/devices/bus/a7800/hiscore.h index b9dc9674212..8e932fe209a 100644 --- a/src/devices/bus/a7800/hiscore.h +++ b/src/devices/bus/a7800/hiscore.h @@ -15,7 +15,7 @@ class a78_hiscore_device : public a78_rom_device { public: // construction/destruction - a78_hiscore_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_hiscore_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override; diff --git a/src/devices/bus/a7800/rom.cpp b/src/devices/bus/a7800/rom.cpp index 9e715ddcf2c..5762dcbc4b7 100644 --- a/src/devices/bus/a7800/rom.cpp +++ b/src/devices/bus/a7800/rom.cpp @@ -43,87 +43,87 @@ DEFINE_DEVICE_TYPE(A78_ROM_P450_SG_RAM, a78_rom_p450_sg_ram_device, "a78_p450_t6 DEFINE_DEVICE_TYPE(A78_ROM_P450_SG9, a78_rom_p450_sg9_device, "a78_p450_ta", "Atari 7800 ROM Carts w/SuperGame 9Banks + POKEY @ 0x0450") -a78_rom_device::a78_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_rom_device::a78_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_a78_cart_interface( mconfig, *this ) { } -a78_rom_device::a78_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_device::a78_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, A78_ROM, tag, owner, clock) { } -a78_rom_pokey_device::a78_rom_pokey_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_rom_pokey_device::a78_rom_pokey_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, type, tag, owner, clock) , m_pokey(*this, "pokey") { } -a78_rom_pokey_device::a78_rom_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_pokey_device::a78_rom_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_pokey_device(mconfig, A78_ROM_POKEY, tag, owner, clock) { } -a78_rom_mram_device::a78_rom_mram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_rom_mram_device::a78_rom_mram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, type, tag, owner, clock) { } -a78_rom_mram_device::a78_rom_mram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_mram_device::a78_rom_mram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_mram_device(mconfig, A78_ROM_MRAM, tag, owner, clock) { } -a78_rom_sg_device::a78_rom_sg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_rom_sg_device::a78_rom_sg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, type, tag, owner, clock) , m_bank(0) { } -a78_rom_sg_device::a78_rom_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_sg_device::a78_rom_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg_device(mconfig, A78_ROM_SG, tag, owner, clock) { } -a78_rom_sg_pokey_device::a78_rom_sg_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_sg_pokey_device::a78_rom_sg_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg_device(mconfig, A78_ROM_SG_POKEY, tag, owner, clock) , m_pokey(*this, "pokey") { } -a78_rom_sg_ram_device::a78_rom_sg_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_rom_sg_ram_device::a78_rom_sg_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg_device(mconfig, type, tag, owner, clock) { } -a78_rom_sg_ram_device::a78_rom_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_sg_ram_device::a78_rom_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg_ram_device(mconfig, A78_ROM_SG_RAM, tag, owner, clock) { } -a78_rom_sg9_device::a78_rom_sg9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_rom_sg9_device::a78_rom_sg9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg_device(mconfig, type, tag, owner, clock) { } -a78_rom_sg9_device::a78_rom_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_sg9_device::a78_rom_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg9_device(mconfig, A78_ROM_SG9, tag, owner, clock) { } -a78_rom_abs_device::a78_rom_abs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_abs_device::a78_rom_abs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, A78_ROM_ABSOLUTE, tag, owner, clock) , m_bank(0) { } -a78_rom_act_device::a78_rom_act_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_act_device::a78_rom_act_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, A78_ROM_ACTIVISION, tag, owner, clock) , m_bank(0) { @@ -131,25 +131,25 @@ a78_rom_act_device::a78_rom_act_device(const machine_config &mconfig, const char -a78_rom_p450_device::a78_rom_p450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_p450_device::a78_rom_p450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, A78_ROM_P450, tag, owner, clock) , m_pokey450(*this, "pokey450") { } -a78_rom_p450_pokey_device::a78_rom_p450_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_p450_pokey_device::a78_rom_p450_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_pokey_device(mconfig, A78_ROM_P450_POKEY, tag, owner, clock) , m_pokey450(*this, "pokey450") { } -a78_rom_p450_sg_ram_device::a78_rom_p450_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_p450_sg_ram_device::a78_rom_p450_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg_ram_device(mconfig, A78_ROM_P450_SG_RAM, tag, owner, clock) , m_pokey450(*this, "pokey450") { } -a78_rom_p450_sg9_device::a78_rom_p450_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_rom_p450_sg9_device::a78_rom_p450_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_sg9_device(mconfig, A78_ROM_P450_SG9, tag, owner, clock) , m_pokey450(*this, "pokey450") { diff --git a/src/devices/bus/a7800/rom.h b/src/devices/bus/a7800/rom.h index 8237b07c8ac..a51e1876a28 100644 --- a/src/devices/bus/a7800/rom.h +++ b/src/devices/bus/a7800/rom.h @@ -16,13 +16,13 @@ class a78_rom_device : public device_t, { public: // construction/destruction - a78_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; protected: - a78_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -36,14 +36,14 @@ class a78_rom_pokey_device : public a78_rom_device { public: // construction/destruction - a78_rom_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; virtual void write_40xx(offs_t offset, uint8_t data) override; protected: - a78_rom_pokey_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_rom_pokey_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; @@ -57,14 +57,14 @@ class a78_rom_mram_device : public a78_rom_device { public: // construction/destruction - a78_rom_mram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_mram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; virtual void write_40xx(offs_t offset, uint8_t data) override; protected: - a78_rom_mram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_rom_mram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -74,14 +74,14 @@ class a78_rom_sg_device : public a78_rom_device { public: // construction/destruction - a78_rom_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; virtual void write_40xx(offs_t offset, uint8_t data) override; protected: - a78_rom_sg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_rom_sg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -97,7 +97,7 @@ class a78_rom_sg_pokey_device : public a78_rom_sg_device { public: // construction/destruction - a78_rom_sg_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_sg_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; @@ -116,14 +116,14 @@ class a78_rom_sg_ram_device : public a78_rom_sg_device { public: // construction/destruction - a78_rom_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; virtual void write_40xx(offs_t offset, uint8_t data) override; protected: - a78_rom_sg_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_rom_sg_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -133,14 +133,14 @@ class a78_rom_sg9_device : public a78_rom_sg_device { public: // construction/destruction - a78_rom_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; virtual void write_40xx(offs_t offset, uint8_t data) override; protected: - a78_rom_sg9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_rom_sg9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -150,7 +150,7 @@ class a78_rom_abs_device : public a78_rom_device { public: // construction/destruction - a78_rom_abs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_abs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; @@ -171,7 +171,7 @@ class a78_rom_act_device : public a78_rom_device { public: // construction/destruction - a78_rom_act_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_act_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_40xx(offs_t offset) override; @@ -194,7 +194,7 @@ class a78_rom_p450_device : public a78_rom_device { public: // construction/destruction - a78_rom_p450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_p450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } @@ -213,7 +213,7 @@ class a78_rom_p450_pokey_device : public a78_rom_pokey_device { public: // construction/destruction - a78_rom_p450_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_p450_pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } @@ -232,7 +232,7 @@ class a78_rom_p450_sg_ram_device : public a78_rom_sg_ram_device { public: // construction/destruction - a78_rom_p450_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_p450_sg_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } @@ -251,7 +251,7 @@ class a78_rom_p450_sg9_device : public a78_rom_sg9_device { public: // construction/destruction - a78_rom_p450_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_rom_p450_sg9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override { if (offset >= 0x50 && offset < 0x60) return m_pokey450->read(offset & 0x0f); else return 0xff; } diff --git a/src/devices/bus/a7800/xboard.cpp b/src/devices/bus/a7800/xboard.cpp index bee85d76c98..95609e06152 100644 --- a/src/devices/bus/a7800/xboard.cpp +++ b/src/devices/bus/a7800/xboard.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(A78_XBOARD, a78_xboard_device, "a78_xboard", "Atari 7800 XBoa DEFINE_DEVICE_TYPE(A78_XM, a78_xm_device, "a78_xm", "Atari 7800 XM expansion module") -a78_xboard_device::a78_xboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a78_xboard_device::a78_xboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a78_rom_device(mconfig, type, tag, owner, clock) , m_xbslot(*this, "xb_slot") , m_pokey(*this, "xb_pokey") @@ -66,13 +66,13 @@ a78_xboard_device::a78_xboard_device(const machine_config &mconfig, device_type } -a78_xboard_device::a78_xboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_xboard_device::a78_xboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_xboard_device(mconfig, A78_XBOARD, tag, owner, clock) { } -a78_xm_device::a78_xm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a78_xm_device::a78_xm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a78_xboard_device(mconfig, A78_XM, tag, owner, clock) , m_ym(*this, "xm_ym2151"), m_ym_enabled(0) { diff --git a/src/devices/bus/a7800/xboard.h b/src/devices/bus/a7800/xboard.h index ee4cda6c018..e69b634cdb3 100644 --- a/src/devices/bus/a7800/xboard.h +++ b/src/devices/bus/a7800/xboard.h @@ -17,7 +17,7 @@ class a78_xboard_device : public a78_rom_device { public: // construction/destruction - a78_xboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_xboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override; @@ -26,7 +26,7 @@ public: virtual void write_40xx(offs_t offset, uint8_t data) override; protected: - a78_xboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a78_xboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -44,7 +44,7 @@ class a78_xm_device : public a78_xboard_device { public: // construction/destruction - a78_xm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a78_xm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_04xx(offs_t offset) override; diff --git a/src/devices/bus/a800/a800_slot.cpp b/src/devices/bus/a800/a800_slot.cpp index 089cd8778bb..249b20e30f1 100644 --- a/src/devices/bus/a800/a800_slot.cpp +++ b/src/devices/bus/a800/a800_slot.cpp @@ -102,7 +102,7 @@ void device_a800_cart_interface::nvram_alloc(uint32_t size) //------------------------------------------------- // ****_cart_slot_device - constructor //------------------------------------------------- -a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) @@ -111,19 +111,19 @@ a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, devi { } -a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a800_cart_slot_device::a800_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a800_cart_slot_device(mconfig, A800_CART_SLOT, tag, owner, clock) { } -a5200_cart_slot_device::a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a5200_cart_slot_device::a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a800_cart_slot_device(mconfig, A5200_CART_SLOT, tag, owner, clock) { } -xegs_cart_slot_device::xegs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xegs_cart_slot_device::xegs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a800_cart_slot_device(mconfig, XEGS_CART_SLOT, tag, owner, clock) { } diff --git a/src/devices/bus/a800/a800_slot.h b/src/devices/bus/a800/a800_slot.h index 71b79dbe1b5..019064fffcb 100644 --- a/src/devices/bus/a800/a800_slot.h +++ b/src/devices/bus/a800/a800_slot.h @@ -92,14 +92,14 @@ public: // construction/destruction template a800_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : a800_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : a800_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - a800_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + a800_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~a800_cart_slot_device(); // image-level overrides @@ -124,7 +124,7 @@ public: void write_d5xx(offs_t offset, uint8_t data); protected: - a800_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a800_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -146,14 +146,14 @@ public: // construction/destruction template a5200_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : a5200_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : a5200_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~a5200_cart_slot_device(); virtual const char *file_extensions() const noexcept override { return "bin,rom,car,a52"; } @@ -170,14 +170,14 @@ public: // construction/destruction template xegs_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : xegs_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : xegs_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - xegs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xegs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~xegs_cart_slot_device(); virtual const char *file_extensions() const noexcept override { return "bin,rom,car"; } diff --git a/src/devices/bus/a800/a8sio.cpp b/src/devices/bus/a800/a8sio.cpp index 41fb3f863e5..a46161cb3ab 100644 --- a/src/devices/bus/a800/a8sio.cpp +++ b/src/devices/bus/a800/a8sio.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(A8SIO, a8sio_device, "a8sio", "Atari 8 bit SIO Slot") // a8sio_device - constructor //------------------------------------------------- -a8sio_device::a8sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a8sio_device::a8sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A8SIO, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_out_clock_in_cb(*this) diff --git a/src/devices/bus/a800/a8sio.h b/src/devices/bus/a800/a8sio.h index 643dffe19a5..a08f6ff9011 100644 --- a/src/devices/bus/a800/a8sio.h +++ b/src/devices/bus/a800/a8sio.h @@ -44,14 +44,14 @@ class a8sio_device : public device_t, public device_single_card_slot_interface(mconfig, *this), m_write_irq(*this), diff --git a/src/devices/bus/abcbus/abcbus.h b/src/devices/bus/abcbus/abcbus.h index e8ce92a2d9b..e1a1940ec21 100644 --- a/src/devices/bus/abcbus/abcbus.h +++ b/src/devices/bus/abcbus/abcbus.h @@ -158,9 +158,9 @@ class abcbus_slot_device : public device_t, { public: // construction/destruction - abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + abcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : abcbus_slot_device(mconfig, tag, owner, clock) { option_reset(); diff --git a/src/devices/bus/abcbus/cadmouse.cpp b/src/devices/bus/abcbus/cadmouse.cpp index 7a4d90916f9..222a7113fa7 100644 --- a/src/devices/bus/abcbus/cadmouse.cpp +++ b/src/devices/bus/abcbus/cadmouse.cpp @@ -140,7 +140,7 @@ void abc_cadmouse_device::device_add_mconfig(machine_config &config) // abc_cadmouse_device - constructor //------------------------------------------------- -abc_cadmouse_device::abc_cadmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +abc_cadmouse_device::abc_cadmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_CADMOUSE, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG) diff --git a/src/devices/bus/abcbus/cadmouse.h b/src/devices/bus/abcbus/cadmouse.h index 317c67e97aa..aef4abfe991 100644 --- a/src/devices/bus/abcbus/cadmouse.h +++ b/src/devices/bus/abcbus/cadmouse.h @@ -17,7 +17,7 @@ class abc_cadmouse_device : public device_t, { public: // construction/destruction - abc_cadmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_cadmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Flag non working features static constexpr feature_type unemulated_features() { return feature::MOUSE | feature::GRAPHICS; } diff --git a/src/devices/bus/abcbus/db4106.cpp b/src/devices/bus/abcbus/db4106.cpp index edd604f610c..8fb2e3c0112 100644 --- a/src/devices/bus/abcbus/db4106.cpp +++ b/src/devices/bus/abcbus/db4106.cpp @@ -70,7 +70,7 @@ void databoard_4106_device::databoard_4106_io(address_map &map) void databoard_4106_device::device_add_mconfig(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_memory_map(&databoard_4106_device::databoard_4106_mem); m_maincpu->set_io_map(&databoard_4106_device::databoard_4106_io); } @@ -103,7 +103,7 @@ ioport_constructor databoard_4106_device::device_input_ports() const // databoard_4106_device - constructor //------------------------------------------------- -databoard_4106_device::databoard_4106_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +databoard_4106_device::databoard_4106_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DATABOARD_4106, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG) diff --git a/src/devices/bus/abcbus/db4106.h b/src/devices/bus/abcbus/db4106.h index 74e49631dbe..ad54f511c19 100644 --- a/src/devices/bus/abcbus/db4106.h +++ b/src/devices/bus/abcbus/db4106.h @@ -27,7 +27,7 @@ class databoard_4106_device : public device_t, { public: // construction/destruction - databoard_4106_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + databoard_4106_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/db4107.cpp b/src/devices/bus/abcbus/db4107.cpp index 0b9ab0ed062..2e31f02f5ab 100644 --- a/src/devices/bus/abcbus/db4107.cpp +++ b/src/devices/bus/abcbus/db4107.cpp @@ -96,11 +96,11 @@ void databoard_4107_device::databoard_4107_io(address_map &map) void databoard_4107_device::device_add_mconfig(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_memory_map(&databoard_4107_device::databoard_4107_mem); m_maincpu->set_io_map(&databoard_4107_device::databoard_4107_io); - Z80DMA(config, m_dma, 4000000); + Z80DMA(config, m_dma, XTAL::u(4000000)); } @@ -131,7 +131,7 @@ ioport_constructor databoard_4107_device::device_input_ports() const // databoard_4107_device - constructor //------------------------------------------------- -databoard_4107_device::databoard_4107_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +databoard_4107_device::databoard_4107_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DATABOARD_4107, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/abcbus/db4107.h b/src/devices/bus/abcbus/db4107.h index 4ae301084ca..4db86a3f041 100644 --- a/src/devices/bus/abcbus/db4107.h +++ b/src/devices/bus/abcbus/db4107.h @@ -28,7 +28,7 @@ class databoard_4107_device : public device_t, { public: // construction/destruction - databoard_4107_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + databoard_4107_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/db4112.cpp b/src/devices/bus/abcbus/db4112.cpp index a2631f0b244..6054d4acc21 100644 --- a/src/devices/bus/abcbus/db4112.cpp +++ b/src/devices/bus/abcbus/db4112.cpp @@ -74,7 +74,7 @@ void abc_databoard_4112_device::databoard_4112_io(address_map &map) void abc_databoard_4112_device::device_add_mconfig(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_memory_map(&abc_databoard_4112_device::databoard_4112_mem); m_maincpu->set_io_map(&abc_databoard_4112_device::databoard_4112_io); } @@ -107,7 +107,7 @@ ioport_constructor abc_databoard_4112_device::device_input_ports() const // abc_databoard_4112_device - constructor //------------------------------------------------- -abc_databoard_4112_device::abc_databoard_4112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc_databoard_4112_device::abc_databoard_4112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DATABOARD_4112, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG) diff --git a/src/devices/bus/abcbus/db4112.h b/src/devices/bus/abcbus/db4112.h index c28da004297..0f8aae355df 100644 --- a/src/devices/bus/abcbus/db4112.h +++ b/src/devices/bus/abcbus/db4112.h @@ -27,7 +27,7 @@ class abc_databoard_4112_device : public device_t, { public: // construction/destruction - abc_databoard_4112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_databoard_4112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/fd2.cpp b/src/devices/bus/abcbus/fd2.cpp index b23daa8ebd7..eb16b40e80b 100644 --- a/src/devices/bus/abcbus/fd2.cpp +++ b/src/devices/bus/abcbus/fd2.cpp @@ -271,7 +271,7 @@ void abc_fd2_device::device_add_mconfig(machine_config &config) // abc_fd2_device - constructor //------------------------------------------------- -abc_fd2_device::abc_fd2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc_fd2_device::abc_fd2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_FD2, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/abcbus/fd2.h b/src/devices/bus/abcbus/fd2.h index a476b66c821..15c55a2e393 100644 --- a/src/devices/bus/abcbus/fd2.h +++ b/src/devices/bus/abcbus/fd2.h @@ -32,7 +32,7 @@ class abc_fd2_device : public device_t, { public: // construction/destruction - abc_fd2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_fd2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/lux10828.cpp b/src/devices/bus/abcbus/lux10828.cpp index e349cd76bb5..2c54c6cf825 100644 --- a/src/devices/bus/abcbus/lux10828.cpp +++ b/src/devices/bus/abcbus/lux10828.cpp @@ -403,7 +403,7 @@ ioport_constructor luxor_55_10828_device::device_input_ports() const // luxor_55_10828_device - constructor //------------------------------------------------- -luxor_55_10828_device::luxor_55_10828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +luxor_55_10828_device::luxor_55_10828_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LUXOR_55_10828, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/abcbus/lux10828.h b/src/devices/bus/abcbus/lux10828.h index c5bf46a8c89..55e3fce585f 100644 --- a/src/devices/bus/abcbus/lux10828.h +++ b/src/devices/bus/abcbus/lux10828.h @@ -54,7 +54,7 @@ class luxor_55_10828_device : public device_t, { public: // construction/destruction - luxor_55_10828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + luxor_55_10828_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/lux21046.cpp b/src/devices/bus/abcbus/lux21046.cpp index 7dd4ebfb791..6b496722ccc 100644 --- a/src/devices/bus/abcbus/lux21046.cpp +++ b/src/devices/bus/abcbus/lux21046.cpp @@ -710,12 +710,12 @@ ioport_constructor abc850_floppy_device::device_input_ports() const // luxor_55_21046_device - constructor //------------------------------------------------- -luxor_55_21046_device::luxor_55_21046_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +luxor_55_21046_device::luxor_55_21046_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : luxor_55_21046_device(mconfig, LUXOR_55_21046, tag, owner, clock) { } -luxor_55_21046_device::luxor_55_21046_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +luxor_55_21046_device::luxor_55_21046_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_floppy0(*this, SAB1793_TAG":0"), @@ -738,27 +738,27 @@ luxor_55_21046_device::luxor_55_21046_device(const machine_config &mconfig, devi { } -abc830_device::abc830_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc830_device::abc830_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : luxor_55_21046_device(mconfig, ABC830, tag, owner, clock) { } -abc832_device::abc832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc832_device::abc832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : luxor_55_21046_device(mconfig, ABC832, tag, owner, clock) { } -abc834_device::abc834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc834_device::abc834_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : luxor_55_21046_device(mconfig, ABC834, tag, owner, clock) { } -abc838_device::abc838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc838_device::abc838_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : luxor_55_21046_device(mconfig, ABC838, tag, owner, clock) { } -abc850_floppy_device::abc850_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc850_floppy_device::abc850_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : luxor_55_21046_device(mconfig, ABC850_FLOPPY, tag, owner, clock) { } diff --git a/src/devices/bus/abcbus/lux21046.h b/src/devices/bus/abcbus/lux21046.h index 735de99641c..b18f393b4b2 100644 --- a/src/devices/bus/abcbus/lux21046.h +++ b/src/devices/bus/abcbus/lux21046.h @@ -53,10 +53,10 @@ class luxor_55_21046_device : public device_t, { public: // construction/destruction - luxor_55_21046_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + luxor_55_21046_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - luxor_55_21046_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + luxor_55_21046_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -127,7 +127,7 @@ class abc830_device : public luxor_55_21046_device { public: // construction/destruction - abc830_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc830_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -142,7 +142,7 @@ class abc832_device : public luxor_55_21046_device { public: // construction/destruction - abc832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -157,7 +157,7 @@ class abc834_device : public luxor_55_21046_device { public: // construction/destruction - abc834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc834_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -172,7 +172,7 @@ class abc838_device : public luxor_55_21046_device { public: // construction/destruction - abc838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc838_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -187,7 +187,7 @@ class abc850_floppy_device : public luxor_55_21046_device { public: // construction/destruction - abc850_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc850_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/abcbus/lux21056.cpp b/src/devices/bus/abcbus/lux21056.cpp index f14ea5a0f68..970ced7ab57 100644 --- a/src/devices/bus/abcbus/lux21056.cpp +++ b/src/devices/bus/abcbus/lux21056.cpp @@ -334,7 +334,7 @@ ioport_constructor luxor_55_21056_device::device_input_ports() const // luxor_55_21056_device - constructor //------------------------------------------------- -luxor_55_21056_device::luxor_55_21056_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +luxor_55_21056_device::luxor_55_21056_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LUXOR_55_21056, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/abcbus/lux21056.h b/src/devices/bus/abcbus/lux21056.h index 812bb8325a3..c7f06bf2b30 100644 --- a/src/devices/bus/abcbus/lux21056.h +++ b/src/devices/bus/abcbus/lux21056.h @@ -30,7 +30,7 @@ class luxor_55_21056_device : public device_t, { public: // construction/destruction - luxor_55_21056_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + luxor_55_21056_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/lux4105.cpp b/src/devices/bus/abcbus/lux4105.cpp index 324fd542ac7..48369bb8f82 100644 --- a/src/devices/bus/abcbus/lux4105.cpp +++ b/src/devices/bus/abcbus/lux4105.cpp @@ -136,7 +136,7 @@ ioport_constructor luxor_4105_device::device_input_ports() const // luxor_4105_device - constructor //------------------------------------------------- -luxor_4105_device::luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +luxor_4105_device::luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LUXOR_4105, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_sasi(*this, "sasi:7:scsicb"), diff --git a/src/devices/bus/abcbus/lux4105.h b/src/devices/bus/abcbus/lux4105.h index dde20ad3075..179fa47ca47 100644 --- a/src/devices/bus/abcbus/lux4105.h +++ b/src/devices/bus/abcbus/lux4105.h @@ -30,7 +30,7 @@ class luxor_4105_device : public device_t, { public: // construction/destruction - luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/memcard.cpp b/src/devices/bus/abcbus/memcard.cpp index e8cd5464ae7..af82487d28e 100644 --- a/src/devices/bus/abcbus/memcard.cpp +++ b/src/devices/bus/abcbus/memcard.cpp @@ -110,7 +110,7 @@ const tiny_rom_entry *abc_memory_card_device::device_rom_region() const // abc_memory_card_device - constructor //------------------------------------------------- -abc_memory_card_device::abc_memory_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc_memory_card_device::abc_memory_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_MEMORY_CARD, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_dos_rom(*this, "dos"), diff --git a/src/devices/bus/abcbus/memcard.h b/src/devices/bus/abcbus/memcard.h index dae0a14fd50..09ffc2b4c12 100644 --- a/src/devices/bus/abcbus/memcard.h +++ b/src/devices/bus/abcbus/memcard.h @@ -25,7 +25,7 @@ class abc_memory_card_device : public device_t, public device_abcbus_card_interf { public: // construction/destruction - abc_memory_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_memory_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/abcbus/ram.cpp b/src/devices/bus/abcbus/ram.cpp index 563964041c5..11b823a2381 100644 --- a/src/devices/bus/abcbus/ram.cpp +++ b/src/devices/bus/abcbus/ram.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ABC80_16KB_RAM_CARD, abc80_16kb_ram_card_device, "abc80_16kb" // abc80_16kb_ram_card_device - constructor //------------------------------------------------- -abc80_16kb_ram_card_device::abc80_16kb_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc80_16kb_ram_card_device::abc80_16kb_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC80_16KB_RAM_CARD, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_ram(*this, "ram", 0x4000, ENDIANNESS_LITTLE) diff --git a/src/devices/bus/abcbus/ram.h b/src/devices/bus/abcbus/ram.h index cf552c6412f..eb8016f570d 100644 --- a/src/devices/bus/abcbus/ram.h +++ b/src/devices/bus/abcbus/ram.h @@ -25,7 +25,7 @@ class abc80_16kb_ram_card_device : public device_t, public device_abcbus_card_in { public: // construction/destruction - abc80_16kb_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc80_16kb_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/sio.cpp b/src/devices/bus/abcbus/sio.cpp index 326d4f07a73..ba3bca1a884 100644 --- a/src/devices/bus/abcbus/sio.cpp +++ b/src/devices/bus/abcbus/sio.cpp @@ -79,7 +79,7 @@ const tiny_rom_entry *abc_sio_device::device_rom_region() const void abc_sio_device::device_add_mconfig(machine_config &config) { Z80CTC(config, m_ctc, XTAL(4'915'200)); - Z80DART(config, m_sio, 0); + Z80DART(config, m_sio); } @@ -92,7 +92,7 @@ void abc_sio_device::device_add_mconfig(machine_config &config) // abc_sio_device - constructor //------------------------------------------------- -abc_sio_device::abc_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +abc_sio_device::abc_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_SIO, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_ctc(*this, Z80CTC_TAG), diff --git a/src/devices/bus/abcbus/sio.h b/src/devices/bus/abcbus/sio.h index 156939808df..90e9f364666 100644 --- a/src/devices/bus/abcbus/sio.h +++ b/src/devices/bus/abcbus/sio.h @@ -22,7 +22,7 @@ class abc_sio_device : public device_t, { public: // construction/destruction - abc_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abcbus/slutprov.cpp b/src/devices/bus/abcbus/slutprov.cpp index 8ca4bc5934e..79b69ee5863 100644 --- a/src/devices/bus/abcbus/slutprov.cpp +++ b/src/devices/bus/abcbus/slutprov.cpp @@ -41,7 +41,7 @@ const tiny_rom_entry *abc_slutprov_device::device_rom_region() const // abc_slutprov_device - constructor //------------------------------------------------- -abc_slutprov_device::abc_slutprov_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +abc_slutprov_device::abc_slutprov_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_SLUTPROV, tag, owner, clock), device_abcbus_card_interface(mconfig, *this) { diff --git a/src/devices/bus/abcbus/slutprov.h b/src/devices/bus/abcbus/slutprov.h index 16f6b0e9f79..9eb6319d376 100644 --- a/src/devices/bus/abcbus/slutprov.h +++ b/src/devices/bus/abcbus/slutprov.h @@ -20,7 +20,7 @@ class abc_slutprov_device : public device_t, { public: // construction/destruction - abc_slutprov_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_slutprov_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/abcbus/ssa.cpp b/src/devices/bus/abcbus/ssa.cpp index c17c2e2a826..e8e79c84822 100644 --- a/src/devices/bus/abcbus/ssa.cpp +++ b/src/devices/bus/abcbus/ssa.cpp @@ -113,7 +113,7 @@ const tiny_rom_entry *abc_super_smartaid_device::device_rom_region() const // abc_super_smartaid_device - constructor //------------------------------------------------- -abc_super_smartaid_device::abc_super_smartaid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc_super_smartaid_device::abc_super_smartaid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_SUPER_SMARTAID, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/bus/abcbus/ssa.h b/src/devices/bus/abcbus/ssa.h index f8f94bd2f93..81cbbdcd3de 100644 --- a/src/devices/bus/abcbus/ssa.h +++ b/src/devices/bus/abcbus/ssa.h @@ -27,7 +27,7 @@ class abc_super_smartaid_device : public device_t, { public: // construction/destruction - abc_super_smartaid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_super_smartaid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/abcbus/uni800.cpp b/src/devices/bus/abcbus/uni800.cpp index 2b38faac748..aa54f6ee2d6 100644 --- a/src/devices/bus/abcbus/uni800.cpp +++ b/src/devices/bus/abcbus/uni800.cpp @@ -72,7 +72,7 @@ const tiny_rom_entry *abc_uni800_device::device_rom_region() const // abc_uni800_device - constructor //------------------------------------------------- -abc_uni800_device::abc_uni800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +abc_uni800_device::abc_uni800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_UNI800, tag, owner, clock), device_abcbus_card_interface(mconfig, *this) { diff --git a/src/devices/bus/abcbus/uni800.h b/src/devices/bus/abcbus/uni800.h index c6eb9400d40..8d8c341a6d4 100644 --- a/src/devices/bus/abcbus/uni800.h +++ b/src/devices/bus/abcbus/uni800.h @@ -20,7 +20,7 @@ class abc_uni800_device : public device_t, { public: // construction/destruction - abc_uni800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_uni800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/abcbus/unidisk.cpp b/src/devices/bus/abcbus/unidisk.cpp index 4661bc1fc03..57a429e51aa 100644 --- a/src/devices/bus/abcbus/unidisk.cpp +++ b/src/devices/bus/abcbus/unidisk.cpp @@ -75,7 +75,7 @@ void abc_unidisk_device::unidisk_io(address_map &map) void abc_unidisk_device::device_add_mconfig(machine_config &config) { - TMS9995(config, m_maincpu, 12000000); + TMS9995(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &abc_unidisk_device::unidisk_mem); m_maincpu->set_addrmap(AS_IO, &abc_unidisk_device::unidisk_io); } @@ -108,7 +108,7 @@ ioport_constructor abc_unidisk_device::device_input_ports() const // abc_unidisk_device - constructor //------------------------------------------------- -abc_unidisk_device::abc_unidisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc_unidisk_device::abc_unidisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_UNIDISK, tag, owner, clock), device_abcbus_card_interface(mconfig, *this), m_maincpu(*this, TMS9995_TAG) diff --git a/src/devices/bus/abcbus/unidisk.h b/src/devices/bus/abcbus/unidisk.h index 6d95e34208e..54d365e11e9 100644 --- a/src/devices/bus/abcbus/unidisk.h +++ b/src/devices/bus/abcbus/unidisk.h @@ -27,7 +27,7 @@ class abc_unidisk_device : public device_t, { public: // construction/destruction - abc_unidisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc_unidisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/abckb/abc77.cpp b/src/devices/bus/abckb/abc77.cpp index 442ff553e2f..38415a5ad66 100644 --- a/src/devices/bus/abckb/abc77.cpp +++ b/src/devices/bus/abckb/abc77.cpp @@ -413,7 +413,7 @@ inline void abc77_device::key_down(int state) // abc77_device - constructor //------------------------------------------------- -abc77_device::abc77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +abc77_device::abc77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), abc_keyboard_interface(mconfig, *this), m_maincpu(*this, I8035_TAG), @@ -428,10 +428,10 @@ abc77_device::abc77_device(const machine_config &mconfig, device_type type, cons { } -abc55_device::abc55_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc55_device::abc55_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : abc77_device(mconfig, ABC55, tag, owner, clock) { } -abc77_device::abc77_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc77_device::abc77_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : abc77_device(mconfig, ABC77, tag, owner, clock) { } diff --git a/src/devices/bus/abckb/abc77.h b/src/devices/bus/abckb/abc77.h index 4982c746570..139a2803fd6 100644 --- a/src/devices/bus/abckb/abc77.h +++ b/src/devices/bus/abckb/abc77.h @@ -30,12 +30,12 @@ class abc77_device : public device_t, public abc_keyboard_interface { public: // construction/destruction - abc77_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc77_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER( keyboard_reset ); protected: - abc77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + abc77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -89,7 +89,7 @@ class abc55_device : public abc77_device { public: // construction/destruction - abc55_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc55_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/abckb/abc800kb.cpp b/src/devices/bus/abckb/abc800kb.cpp index 39f00d3347c..0bf5ee08193 100644 --- a/src/devices/bus/abckb/abc800kb.cpp +++ b/src/devices/bus/abckb/abc800kb.cpp @@ -317,7 +317,7 @@ void abc800_keyboard_device::key_down(int state) // abc800_keyboard_device - constructor //------------------------------------------------- -abc800_keyboard_device::abc800_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc800_keyboard_device::abc800_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC800_KEYBOARD, tag, owner, clock), abc_keyboard_interface(mconfig, *this), m_maincpu(*this, I8048_TAG), diff --git a/src/devices/bus/abckb/abc800kb.h b/src/devices/bus/abckb/abc800kb.h index 39f54e2f854..0921ce80656 100644 --- a/src/devices/bus/abckb/abc800kb.h +++ b/src/devices/bus/abckb/abc800kb.h @@ -29,7 +29,7 @@ class abc800_keyboard_device : public device_t, { public: // construction/destruction - abc800_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc800_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // abc_keyboard_interface overrides virtual void txd_w(int state) override; diff --git a/src/devices/bus/abckb/abc99.cpp b/src/devices/bus/abckb/abc99.cpp index b1a5c6a0a6d..58f71286e1f 100644 --- a/src/devices/bus/abckb/abc99.cpp +++ b/src/devices/bus/abckb/abc99.cpp @@ -178,7 +178,7 @@ void abc99_device::device_add_mconfig(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SPEAKER_SOUND(config, m_speaker, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); } @@ -470,7 +470,7 @@ void abc99_device::key_down(int state) // abc99_device - constructor //------------------------------------------------- -abc99_device::abc99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc99_device::abc99_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC99, tag, owner, clock), abc_keyboard_interface(mconfig, *this), m_serial_timer(nullptr), m_mouse_timer(nullptr), m_maincpu(*this, I8035_Z2_TAG), diff --git a/src/devices/bus/abckb/abc99.h b/src/devices/bus/abckb/abc99.h index d2c30db1f4f..f14ce0376da 100644 --- a/src/devices/bus/abckb/abc99.h +++ b/src/devices/bus/abckb/abc99.h @@ -29,7 +29,7 @@ class abc99_device : public device_t, { public: // construction/destruction - abc99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc99_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER( keyboard_reset ); diff --git a/src/devices/bus/abckb/abckb.cpp b/src/devices/bus/abckb/abckb.cpp index 32af6f47178..af9224d9e78 100644 --- a/src/devices/bus/abckb/abckb.cpp +++ b/src/devices/bus/abckb/abckb.cpp @@ -43,7 +43,7 @@ abc_keyboard_interface::abc_keyboard_interface(const machine_config &mconfig, de // abc_keyboard_port_device - constructor //------------------------------------------------- -abc_keyboard_port_device::abc_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc_keyboard_port_device::abc_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC_KEYBOARD_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_out_rx_handler(*this), diff --git a/src/devices/bus/abckb/abckb.h b/src/devices/bus/abckb/abckb.h index 63b8b2c799e..2dbb95ac18e 100644 --- a/src/devices/bus/abckb/abckb.h +++ b/src/devices/bus/abckb/abckb.h @@ -24,7 +24,7 @@ public: // construction/destruction template abc_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : abc_keyboard_port_device(mconfig, tag, owner, 0) + : abc_keyboard_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -32,7 +32,7 @@ public: set_fixed(false); } - abc_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + abc_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_rx_handler() { return m_out_rx_handler.bind(); } auto out_trxc_handler() { return m_out_trxc_handler.bind(); } diff --git a/src/devices/bus/acorn/atom/discpack.cpp b/src/devices/bus/acorn/atom/discpack.cpp index 2f2024b86b0..6b5e185d1bf 100644 --- a/src/devices/bus/acorn/atom/discpack.cpp +++ b/src/devices/bus/acorn/atom/discpack.cpp @@ -67,7 +67,7 @@ const tiny_rom_entry *atom_discpack_device::device_rom_region() const // atom_discpack_device - constructor //------------------------------------------------- -atom_discpack_device::atom_discpack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atom_discpack_device::atom_discpack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATOM_DISCPACK, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_dos_rom(*this, "dos_rom") diff --git a/src/devices/bus/acorn/atom/discpack.h b/src/devices/bus/acorn/atom/discpack.h index cff8a09005d..b679d1d04f0 100644 --- a/src/devices/bus/acorn/atom/discpack.h +++ b/src/devices/bus/acorn/atom/discpack.h @@ -27,7 +27,7 @@ class atom_discpack_device : { public: // construction/destruction - atom_discpack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atom_discpack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/acorn/atom/econet.cpp b/src/devices/bus/acorn/atom/econet.cpp index 70c92ff3489..e91ef84c2c0 100644 --- a/src/devices/bus/acorn/atom/econet.cpp +++ b/src/devices/bus/acorn/atom/econet.cpp @@ -29,12 +29,12 @@ void atom_econet_device::device_add_mconfig(machine_config &config) m_adlc->out_txd_cb().set(m_econet, FUNC(econet_device::host_data_w)); m_adlc->out_irq_cb().set(FUNC(atom_econet_device::bus_irq_w)); - ECONET(config, m_econet, 0); + ECONET(config, m_econet); m_econet->clk_wr_callback().set(m_adlc, FUNC(mc6854_device::txc_w)); m_econet->clk_wr_callback().append(m_adlc, FUNC(mc6854_device::rxc_w)); m_econet->data_wr_callback().set(m_adlc, FUNC(mc6854_device::set_rx)); - econet_slot_device &slot(ECONET_SLOT(config, "econet254", 0)); + econet_slot_device &slot(ECONET_SLOT(config, "econet254")); econet_devices(slot); slot.set_slot(254); } @@ -47,7 +47,7 @@ void atom_econet_device::device_add_mconfig(machine_config &config) // atom_econet_device - constructor //------------------------------------------------- -atom_econet_device::atom_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atom_econet_device::atom_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATOM_ECONET, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_adlc(*this, "mc6854") diff --git a/src/devices/bus/acorn/atom/econet.h b/src/devices/bus/acorn/atom/econet.h index 114dc76bbeb..a9f428c9107 100644 --- a/src/devices/bus/acorn/atom/econet.h +++ b/src/devices/bus/acorn/atom/econet.h @@ -26,7 +26,7 @@ class atom_econet_device : { public: // construction/destruction - atom_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atom_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/atom/sid.cpp b/src/devices/bus/acorn/atom/sid.cpp index 4b0e1f7ff4d..f1fe9e0781d 100644 --- a/src/devices/bus/acorn/atom/sid.cpp +++ b/src/devices/bus/acorn/atom/sid.cpp @@ -39,7 +39,7 @@ void atom_sid_device::device_add_mconfig(machine_config &config) // atom_sid_device - constructor //------------------------------------------------- -atom_sid_device::atom_sid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atom_sid_device::atom_sid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATOM_SID, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_sid(*this, "sid6581") diff --git a/src/devices/bus/acorn/atom/sid.h b/src/devices/bus/acorn/atom/sid.h index 8383bbdf9c8..f52841eb9ff 100644 --- a/src/devices/bus/acorn/atom/sid.h +++ b/src/devices/bus/acorn/atom/sid.h @@ -25,7 +25,7 @@ class atom_sid_device : { public: // construction/destruction - atom_sid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atom_sid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/bus.cpp b/src/devices/bus/acorn/bus.cpp index 55f332e6581..4c0b40bfc13 100644 --- a/src/devices/bus/acorn/bus.cpp +++ b/src/devices/bus/acorn/bus.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(ACORN_BUS_SLOT, acorn_bus_slot_device, "acorn_bus_slot", "Aco //------------------------------------------------- // acorn_bus_slot_device - constructor //------------------------------------------------- -acorn_bus_slot_device::acorn_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_bus_slot_device::acorn_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_BUS_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) @@ -62,7 +62,7 @@ DEFINE_DEVICE_TYPE(ACORN_BUS, acorn_bus_device, "acorn_bus", "Acorn Bus") // acorn_bus_device - constructor //------------------------------------------------- -acorn_bus_device::acorn_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_bus_device::acorn_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_BUS, tag, owner, clock) , m_space(*this, finder_base::DUMMY_TAG, -1) , m_out_irq_cb(*this) diff --git a/src/devices/bus/acorn/bus.h b/src/devices/bus/acorn/bus.h index bfd9a980304..6422fd5df88 100644 --- a/src/devices/bus/acorn/bus.h +++ b/src/devices/bus/acorn/bus.h @@ -32,7 +32,7 @@ public: // construction/destruction template acorn_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&bus_tag, U &&opts, const char *dflt) - : acorn_bus_slot_device(mconfig, tag, owner, 0) + : acorn_bus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -40,7 +40,7 @@ public: set_fixed(false); m_bus.set_tag(std::forward(bus_tag)); } - acorn_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -60,7 +60,7 @@ class acorn_bus_device : public device_t { public: // construction/destruction - acorn_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/acorn/cms/4080term.cpp b/src/devices/bus/acorn/cms/4080term.cpp index 97946af1406..a7fa28b6be8 100644 --- a/src/devices/bus/acorn/cms/4080term.cpp +++ b/src/devices/bus/acorn/cms/4080term.cpp @@ -77,7 +77,7 @@ void cms_4080term_device::device_add_mconfig(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_cms_4080term); PALETTE(config, "palette", palette_device::RGB_3BIT); - EF9345(config, m_ef9345, 0); + EF9345(config, m_ef9345); m_ef9345->set_screen("screen"); m_ef9345->set_palette_tag("palette"); @@ -88,7 +88,7 @@ void cms_4080term_device::device_add_mconfig(machine_config &config) m_via->ca2_handler().set(m_centronics, FUNC(centronics_device::write_strobe)); m_via->irq_handler().set(FUNC(cms_4080term_device::bus_irq_w)); - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(1.8432_MHz_XTAL); m_acia->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts)); @@ -123,7 +123,7 @@ const tiny_rom_entry *cms_4080term_device::device_rom_region() const // cms_4080term_device - constructor //------------------------------------------------- -cms_4080term_device::cms_4080term_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cms_4080term_device::cms_4080term_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMS_4080TERM, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_via(*this, "via") diff --git a/src/devices/bus/acorn/cms/4080term.h b/src/devices/bus/acorn/cms/4080term.h index 14d1beacd43..7d98c67d76c 100644 --- a/src/devices/bus/acorn/cms/4080term.h +++ b/src/devices/bus/acorn/cms/4080term.h @@ -30,7 +30,7 @@ class cms_4080term_device : { public: // construction/destruction - cms_4080term_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cms_4080term_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); TIMER_DEVICE_CALLBACK_MEMBER(update_scanline); diff --git a/src/devices/bus/acorn/cms/fdc.cpp b/src/devices/bus/acorn/cms/fdc.cpp index f918309bb76..40c4637059d 100644 --- a/src/devices/bus/acorn/cms/fdc.cpp +++ b/src/devices/bus/acorn/cms/fdc.cpp @@ -56,7 +56,7 @@ void cms_fdc_device::device_add_mconfig(machine_config &config) // cms_fdc_device - constructor //------------------------------------------------- -cms_fdc_device::cms_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cms_fdc_device::cms_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMS_FDC, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_fdc(*this, "wd1770") diff --git a/src/devices/bus/acorn/cms/fdc.h b/src/devices/bus/acorn/cms/fdc.h index 99a92c34dc7..4b26fbe261c 100644 --- a/src/devices/bus/acorn/cms/fdc.h +++ b/src/devices/bus/acorn/cms/fdc.h @@ -27,7 +27,7 @@ class cms_fdc_device : { public: // construction/destruction - cms_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cms_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/acorn/cms/hires.cpp b/src/devices/bus/acorn/cms/hires.cpp index de42be218cd..080801881fa 100644 --- a/src/devices/bus/acorn/cms/hires.cpp +++ b/src/devices/bus/acorn/cms/hires.cpp @@ -53,7 +53,7 @@ void cms_hires_device::device_add_mconfig(machine_config &config) // cms_hires_device - constructor //------------------------------------------------- -cms_hires_device::cms_hires_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cms_hires_device::cms_hires_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMS_HIRES, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_screen(*this, "screen") diff --git a/src/devices/bus/acorn/cms/hires.h b/src/devices/bus/acorn/cms/hires.h index f79d7af383b..d02018e2f9d 100644 --- a/src/devices/bus/acorn/cms/hires.h +++ b/src/devices/bus/acorn/cms/hires.h @@ -26,7 +26,7 @@ class cms_hires_device : { public: // construction/destruction - cms_hires_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cms_hires_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/cms/ieee.cpp b/src/devices/bus/acorn/cms/ieee.cpp index 06d9b47f0dd..b53a265aed5 100644 --- a/src/devices/bus/acorn/cms/ieee.cpp +++ b/src/devices/bus/acorn/cms/ieee.cpp @@ -58,7 +58,7 @@ void cms_ieee_device::device_add_mconfig(machine_config &config) // cms_ieee_device - constructor //------------------------------------------------- -cms_ieee_device::cms_ieee_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cms_ieee_device::cms_ieee_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMS_IEEE, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_ieee(*this, IEEE488_TAG) diff --git a/src/devices/bus/acorn/cms/ieee.h b/src/devices/bus/acorn/cms/ieee.h index 48352d4a100..c77abce6dd1 100644 --- a/src/devices/bus/acorn/cms/ieee.h +++ b/src/devices/bus/acorn/cms/ieee.h @@ -24,7 +24,7 @@ class cms_ieee_device: { public: // construction/destruction - cms_ieee_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cms_ieee_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/system/32k.cpp b/src/devices/bus/acorn/system/32k.cpp index 00eb80050e9..6d6673fb00a 100644 --- a/src/devices/bus/acorn/system/32k.cpp +++ b/src/devices/bus/acorn/system/32k.cpp @@ -60,7 +60,7 @@ ioport_constructor acorn_32k_device::device_input_ports() const // acorn_32k_device - constructor //------------------------------------------------- -acorn_32k_device::acorn_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_32k_device::acorn_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_32K, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_links(*this, "LINKS") diff --git a/src/devices/bus/acorn/system/32k.h b/src/devices/bus/acorn/system/32k.h index f3d3b76be5c..9dc5ba37b51 100644 --- a/src/devices/bus/acorn/system/32k.h +++ b/src/devices/bus/acorn/system/32k.h @@ -26,7 +26,7 @@ class acorn_32k_device : { public: // construction/destruction - acorn_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/system/8k.cpp b/src/devices/bus/acorn/system/8k.cpp index b2e1c7bb3d2..e48d9f908a6 100644 --- a/src/devices/bus/acorn/system/8k.cpp +++ b/src/devices/bus/acorn/system/8k.cpp @@ -83,7 +83,7 @@ void acorn_8k_device::device_add_mconfig(machine_config &config) // acorn_8k_device - constructor //------------------------------------------------- -acorn_8k_device::acorn_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_8k_device::acorn_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_8K, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_rom(*this, "rom%u", 0) diff --git a/src/devices/bus/acorn/system/8k.h b/src/devices/bus/acorn/system/8k.h index 09f089c1563..6420f6383fe 100644 --- a/src/devices/bus/acorn/system/8k.h +++ b/src/devices/bus/acorn/system/8k.h @@ -29,7 +29,7 @@ class acorn_8k_device : { public: // construction/destruction - acorn_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/system/cass.cpp b/src/devices/bus/acorn/system/cass.cpp index 6e5b8faf40c..98f239ea930 100644 --- a/src/devices/bus/acorn/system/cass.cpp +++ b/src/devices/bus/acorn/system/cass.cpp @@ -30,7 +30,7 @@ void acorn_cass_device::device_add_mconfig(machine_config &config) SPEAKER(config, "mono").front_center(); WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25); - CASSETTE(config, "cassette", 0); + CASSETTE(config, "cassette"); TIMER(config, "cass_c").configure_periodic(FUNC(acorn_cass_device::cass_c), attotime::from_hz(4800)); TIMER(config, "cass_p").configure_periodic(FUNC(acorn_cass_device::cass_p), attotime::from_hz(40000)); } @@ -44,7 +44,7 @@ void acorn_cass_device::device_add_mconfig(machine_config &config) // acorn_cass_device - constructor //------------------------------------------------- -acorn_cass_device::acorn_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_cass_device::acorn_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_CASS, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_cass(*this, "cassette") diff --git a/src/devices/bus/acorn/system/cass.h b/src/devices/bus/acorn/system/cass.h index 02a323bb994..23e6b79eb8d 100644 --- a/src/devices/bus/acorn/system/cass.h +++ b/src/devices/bus/acorn/system/cass.h @@ -28,7 +28,7 @@ class acorn_cass_device : { public: // construction/destruction - acorn_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/system/econet.cpp b/src/devices/bus/acorn/system/econet.cpp index f8a0737e456..e24fb7ea53d 100644 --- a/src/devices/bus/acorn/system/econet.cpp +++ b/src/devices/bus/acorn/system/econet.cpp @@ -30,7 +30,7 @@ void acorn_econet_device::device_add_mconfig(machine_config &config) m_adlc->out_txd_cb().set(m_econet, FUNC(econet_device::host_data_w)); m_adlc->out_irq_cb().set(FUNC(acorn_econet_device::bus_irq_w)); - ECONET(config, m_econet, 0); + ECONET(config, m_econet); m_econet->clk_wr_callback().set(m_adlc, FUNC(mc6854_device::txc_w)); m_econet->clk_wr_callback().append(m_adlc, FUNC(mc6854_device::rxc_w)); m_econet->data_wr_callback().set(m_adlc, FUNC(mc6854_device::set_rx)); @@ -46,7 +46,7 @@ void acorn_econet_device::device_add_mconfig(machine_config &config) // acorn_econet_device - constructor //------------------------------------------------- -acorn_econet_device::acorn_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_econet_device::acorn_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_ECONET, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_adlc(*this, "mc6854") diff --git a/src/devices/bus/acorn/system/econet.h b/src/devices/bus/acorn/system/econet.h index b5e470975c9..07d3e15ce8c 100644 --- a/src/devices/bus/acorn/system/econet.h +++ b/src/devices/bus/acorn/system/econet.h @@ -28,7 +28,7 @@ class acorn_econet_device : { public: // construction/destruction - acorn_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/system/fdc.cpp b/src/devices/bus/acorn/system/fdc.cpp index 397fbb9ac50..a77bd3c933b 100644 --- a/src/devices/bus/acorn/system/fdc.cpp +++ b/src/devices/bus/acorn/system/fdc.cpp @@ -61,7 +61,7 @@ void acorn_fdc_device::device_add_mconfig(machine_config &config) // acorn_fdc_device - constructor //------------------------------------------------- -acorn_fdc_device::acorn_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_fdc_device::acorn_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_FDC, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_fdc(*this, "i8271") diff --git a/src/devices/bus/acorn/system/fdc.h b/src/devices/bus/acorn/system/fdc.h index f943b1f6767..60c68f670e9 100644 --- a/src/devices/bus/acorn/system/fdc.h +++ b/src/devices/bus/acorn/system/fdc.h @@ -29,7 +29,7 @@ class acorn_fdc_device : { public: // construction/destruction - acorn_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/acorn/system/vdu40.cpp b/src/devices/bus/acorn/system/vdu40.cpp index 7bc8629ac35..236848d5294 100644 --- a/src/devices/bus/acorn/system/vdu40.cpp +++ b/src/devices/bus/acorn/system/vdu40.cpp @@ -53,7 +53,7 @@ void acorn_vdu40_device::device_add_mconfig(machine_config &config) // acorn_vdu40_device - constructor //------------------------------------------------- -acorn_vdu40_device::acorn_vdu40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_vdu40_device::acorn_vdu40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_VDU40, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_screen(*this, "screen") diff --git a/src/devices/bus/acorn/system/vdu40.h b/src/devices/bus/acorn/system/vdu40.h index ff80a76d1ea..1b961343cb4 100644 --- a/src/devices/bus/acorn/system/vdu40.h +++ b/src/devices/bus/acorn/system/vdu40.h @@ -30,7 +30,7 @@ class acorn_vdu40_device : { public: // construction/destruction - acorn_vdu40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_vdu40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/system/vdu80.cpp b/src/devices/bus/acorn/system/vdu80.cpp index 77bad0bf32c..e3bb1f6fb43 100644 --- a/src/devices/bus/acorn/system/vdu80.cpp +++ b/src/devices/bus/acorn/system/vdu80.cpp @@ -118,7 +118,7 @@ const tiny_rom_entry *acorn_vdu80_device::device_rom_region() const // acorn_vdu80_device - constructor //------------------------------------------------- -acorn_vdu80_device::acorn_vdu80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_vdu80_device::acorn_vdu80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_VDU80, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_chargen(*this, "chargen") diff --git a/src/devices/bus/acorn/system/vdu80.h b/src/devices/bus/acorn/system/vdu80.h index 8ebb7e0a327..2f1c33d7d76 100644 --- a/src/devices/bus/acorn/system/vdu80.h +++ b/src/devices/bus/acorn/system/vdu80.h @@ -29,7 +29,7 @@ class acorn_vdu80_device : { public: // construction/destruction - acorn_vdu80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_vdu80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/acorn/system/vib.cpp b/src/devices/bus/acorn/system/vib.cpp index bf685daac95..4a4be409e40 100644 --- a/src/devices/bus/acorn/system/vib.cpp +++ b/src/devices/bus/acorn/system/vib.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(ACORN_VIB, acorn_vib_device, "acorn_vib", "Acorn Versatile In // acorn_vib_device - constructor //------------------------------------------------- -acorn_vib_device::acorn_vib_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_vib_device::acorn_vib_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_VIB, tag, owner, clock) , device_acorn_bus_interface(mconfig, *this) , m_ppi8255(*this, "ppi8255") @@ -149,7 +149,7 @@ void acorn_vib_device::device_add_mconfig(machine_config &config) { INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set(FUNC(acorn_vib_device::irq_w)); - MOS6522(config, m_via6522, 1'000'000); // TODO: derive clock from bus (pin 29 = ϕ2) + MOS6522(config, m_via6522, XTAL::u(1'000'000)); // TODO: derive clock from bus (pin 29 = ϕ2) m_via6522->writepa_handler().set("cent_data_out", FUNC(output_latch_device::write)); m_via6522->ca2_handler().set(m_centronics, FUNC(centronics_device::write_strobe)); m_via6522->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); diff --git a/src/devices/bus/acorn/system/vib.h b/src/devices/bus/acorn/system/vib.h index bd4d886e281..e5d6ad34ccd 100644 --- a/src/devices/bus/acorn/system/vib.h +++ b/src/devices/bus/acorn/system/vib.h @@ -33,7 +33,7 @@ class acorn_vib_device : { public: // construction/destruction - acorn_vib_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_vib_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adam/adamlink.cpp b/src/devices/bus/adam/adamlink.cpp index 4dc2d44b3d7..b8a5d7d14f1 100644 --- a/src/devices/bus/adam/adamlink.cpp +++ b/src/devices/bus/adam/adamlink.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ADAMLINK, adamlink_device, "adamlink", "AdamLink modem") // adamlink_device - constructor //------------------------------------------------- -adamlink_device::adamlink_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adamlink_device::adamlink_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAMLINK, tag, owner, clock) , device_adam_expansion_slot_card_interface(mconfig, *this) { diff --git a/src/devices/bus/adam/adamlink.h b/src/devices/bus/adam/adamlink.h index 6fb07f81c6f..ed2a2c04769 100644 --- a/src/devices/bus/adam/adamlink.h +++ b/src/devices/bus/adam/adamlink.h @@ -26,7 +26,7 @@ class adamlink_device : public device_t, { public: // construction/destruction - adamlink_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adamlink_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adam/exp.cpp b/src/devices/bus/adam/exp.cpp index 5a2098b2cfe..01929356ab5 100644 --- a/src/devices/bus/adam/exp.cpp +++ b/src/devices/bus/adam/exp.cpp @@ -51,7 +51,7 @@ device_adam_expansion_slot_card_interface::device_adam_expansion_slot_card_inter // adam_expansion_slot_device - constructor //------------------------------------------------- -adam_expansion_slot_device::adam_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adam_expansion_slot_device::adam_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h index 01d73774bdb..09c399684aa 100644 --- a/src/devices/bus/adam/exp.h +++ b/src/devices/bus/adam/exp.h @@ -29,7 +29,7 @@ class adam_expansion_slot_device : public device_t, public: // construction/destruction template - adam_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + adam_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : adam_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -37,7 +37,7 @@ public: set_default_option(dflt); set_fixed(false); } - adam_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adam_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~adam_expansion_slot_device() { } auto irq() { return m_write_irq.bind(); } diff --git a/src/devices/bus/adam/ide.cpp b/src/devices/bus/adam/ide.cpp index 114e9eeb2e6..eb2b35a1eea 100644 --- a/src/devices/bus/adam/ide.cpp +++ b/src/devices/bus/adam/ide.cpp @@ -81,7 +81,7 @@ void powermate_ide_device::device_add_mconfig(machine_config &config) // powermate_ide_device - constructor //------------------------------------------------- -powermate_ide_device::powermate_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +powermate_ide_device::powermate_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_IDE, tag, owner, clock), device_adam_expansion_slot_card_interface(mconfig, *this), m_ata(*this, ATA_TAG), diff --git a/src/devices/bus/adam/ide.h b/src/devices/bus/adam/ide.h index fc01088eeec..9908e5661df 100644 --- a/src/devices/bus/adam/ide.h +++ b/src/devices/bus/adam/ide.h @@ -28,7 +28,7 @@ class powermate_ide_device : public device_t, { public: // construction/destruction - powermate_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + powermate_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adam/ram.cpp b/src/devices/bus/adam/ram.cpp index 65dc13f2246..232d2566839 100644 --- a/src/devices/bus/adam/ram.cpp +++ b/src/devices/bus/adam/ram.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ADAM_RAM, adam_ram_expansion_device, "adam_ram", "Adam 64KB R // adam_ram_expansion_device - constructor //------------------------------------------------- -adam_ram_expansion_device::adam_ram_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adam_ram_expansion_device::adam_ram_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_RAM, tag, owner, clock), device_adam_expansion_slot_card_interface(mconfig, *this), m_ram(*this, "ram", 0x10000, ENDIANNESS_LITTLE) diff --git a/src/devices/bus/adam/ram.h b/src/devices/bus/adam/ram.h index c1997bf77c4..984e5870fea 100644 --- a/src/devices/bus/adam/ram.h +++ b/src/devices/bus/adam/ram.h @@ -26,7 +26,7 @@ class adam_ram_expansion_device : public device_t, { public: // construction/destruction - adam_ram_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adam_ram_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adamnet/adamnet.cpp b/src/devices/bus/adamnet/adamnet.cpp index 18b91c4fb8c..db559db9125 100644 --- a/src/devices/bus/adamnet/adamnet.cpp +++ b/src/devices/bus/adamnet/adamnet.cpp @@ -52,7 +52,7 @@ device_adamnet_card_interface::~device_adamnet_card_interface() //------------------------------------------------- // adamnet_slot_device - constructor //------------------------------------------------- -adamnet_slot_device::adamnet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adamnet_slot_device::adamnet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAMNET_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_bus(*this, finder_base::DUMMY_TAG) @@ -80,7 +80,7 @@ void adamnet_slot_device::device_start() // adamnet_device - constructor //------------------------------------------------- -adamnet_device::adamnet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adamnet_device::adamnet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAMNET, tag, owner, clock), m_txd(1), m_reset(CLEAR_LINE) diff --git a/src/devices/bus/adamnet/adamnet.h b/src/devices/bus/adamnet/adamnet.h index a064ce24f2f..9489721f9b4 100644 --- a/src/devices/bus/adamnet/adamnet.h +++ b/src/devices/bus/adamnet/adamnet.h @@ -26,7 +26,7 @@ class adamnet_device : public device_t { public: // construction/destruction - adamnet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adamnet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void add_device(device_t *target); @@ -76,7 +76,7 @@ public: // construction/destruction template adamnet_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus, U &&opts, char const *dflt) - : adamnet_slot_device(mconfig, tag, owner, (uint32_t)0) + : adamnet_slot_device(mconfig, tag, owner) { set_bus(std::forward(bus)); option_reset(); @@ -84,7 +84,7 @@ public: set_default_option(dflt); set_fixed(false); } - adamnet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adamnet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/devices/bus/adamnet/ddp.cpp b/src/devices/bus/adamnet/ddp.cpp index b4a17e909cd..57978229adc 100644 --- a/src/devices/bus/adamnet/ddp.cpp +++ b/src/devices/bus/adamnet/ddp.cpp @@ -103,7 +103,7 @@ void adam_digital_data_pack_device::device_add_mconfig(machine_config &config) // adam_digital_data_pack_device - constructor //------------------------------------------------- -adam_digital_data_pack_device::adam_digital_data_pack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adam_digital_data_pack_device::adam_digital_data_pack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_DDP, tag, owner, clock), device_adamnet_card_interface(mconfig, *this), m_maincpu(*this, M6801_TAG), diff --git a/src/devices/bus/adamnet/ddp.h b/src/devices/bus/adamnet/ddp.h index c6fa66f98d3..aaeeb32af69 100644 --- a/src/devices/bus/adamnet/ddp.h +++ b/src/devices/bus/adamnet/ddp.h @@ -29,7 +29,7 @@ class adam_digital_data_pack_device : public device_t, { public: // construction/destruction - adam_digital_data_pack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adam_digital_data_pack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adamnet/fdc.cpp b/src/devices/bus/adamnet/fdc.cpp index 1b7753cfe17..25db73483c4 100644 --- a/src/devices/bus/adamnet/fdc.cpp +++ b/src/devices/bus/adamnet/fdc.cpp @@ -163,7 +163,7 @@ ioport_constructor adam_fdc_device::device_input_ports() const // adam_fdc_device - constructor //------------------------------------------------- -adam_fdc_device::adam_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adam_fdc_device::adam_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_FDC, tag, owner, clock), device_adamnet_card_interface(mconfig, *this), m_maincpu(*this, M6801_TAG), diff --git a/src/devices/bus/adamnet/fdc.h b/src/devices/bus/adamnet/fdc.h index d4d1cc33a01..95e499d1b46 100644 --- a/src/devices/bus/adamnet/fdc.h +++ b/src/devices/bus/adamnet/fdc.h @@ -30,7 +30,7 @@ class adam_fdc_device : public device_t, { public: // construction/destruction - adam_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adam_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adamnet/kb.cpp b/src/devices/bus/adamnet/kb.cpp index 840bb898e25..bb250c83ec4 100644 --- a/src/devices/bus/adamnet/kb.cpp +++ b/src/devices/bus/adamnet/kb.cpp @@ -210,7 +210,7 @@ ioport_constructor adam_keyboard_device::device_input_ports() const // adam_keyboard_device - constructor //------------------------------------------------- -adam_keyboard_device::adam_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adam_keyboard_device::adam_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_KB, tag, owner, clock), device_adamnet_card_interface(mconfig, *this), m_maincpu(*this, M6801_TAG), diff --git a/src/devices/bus/adamnet/kb.h b/src/devices/bus/adamnet/kb.h index 167ff1fc46d..3eb9f3de7a0 100644 --- a/src/devices/bus/adamnet/kb.h +++ b/src/devices/bus/adamnet/kb.h @@ -27,7 +27,7 @@ class adam_keyboard_device : public device_t, { public: // construction/destruction - adam_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adam_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adamnet/printer.cpp b/src/devices/bus/adamnet/printer.cpp index 841fa76b138..ea0d5f5f188 100644 --- a/src/devices/bus/adamnet/printer.cpp +++ b/src/devices/bus/adamnet/printer.cpp @@ -85,7 +85,7 @@ void adam_printer_device::device_add_mconfig(machine_config &config) // adam_printer_device - constructor //------------------------------------------------- -adam_printer_device::adam_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adam_printer_device::adam_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_PRN, tag, owner, clock), device_adamnet_card_interface(mconfig, *this), m_maincpu(*this, M6801_TAG) diff --git a/src/devices/bus/adamnet/printer.h b/src/devices/bus/adamnet/printer.h index 376db4a9a99..1c71e9709e7 100644 --- a/src/devices/bus/adamnet/printer.h +++ b/src/devices/bus/adamnet/printer.h @@ -27,7 +27,7 @@ class adam_printer_device : public device_t, { public: // construction/destruction - adam_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adam_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adamnet/spi.cpp b/src/devices/bus/adamnet/spi.cpp index 008a99a2bfa..d7756d9dfcb 100644 --- a/src/devices/bus/adamnet/spi.cpp +++ b/src/devices/bus/adamnet/spi.cpp @@ -83,7 +83,7 @@ void adam_spi_device::device_add_mconfig(machine_config &config) // adam_spi_device - constructor //------------------------------------------------- -adam_spi_device::adam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adam_spi_device::adam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADAM_SPI, tag, owner, clock) , device_adamnet_card_interface(mconfig, *this) , m_maincpu(*this, "m6801") diff --git a/src/devices/bus/adamnet/spi.h b/src/devices/bus/adamnet/spi.h index 36e2ba60789..404058b958b 100644 --- a/src/devices/bus/adamnet/spi.h +++ b/src/devices/bus/adamnet/spi.h @@ -30,7 +30,7 @@ class adam_spi_device : public device_t, { public: // construction/destruction - adam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/adb/a9m0330.cpp b/src/devices/bus/adb/a9m0330.cpp index 8d3f9226299..adc6d810df3 100644 --- a/src/devices/bus/adb/a9m0330.cpp +++ b/src/devices/bus/adb/a9m0330.cpp @@ -185,7 +185,7 @@ const tiny_rom_entry *a9m0330_device::device_rom_region() const DEVICE IMPLEMENTATION ***************************************************************************/ -a9m0330_device::a9m0330_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +a9m0330_device::a9m0330_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adb_device(mconfig, ADB_A9M0330, tag, owner, clock), adb_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_mcu(*this, "mcu") diff --git a/src/devices/bus/adb/a9m0330.h b/src/devices/bus/adb/a9m0330.h index 1d44a28bba8..c376aca62d3 100644 --- a/src/devices/bus/adb/a9m0330.h +++ b/src/devices/bus/adb/a9m0330.h @@ -14,7 +14,7 @@ class a9m0330_device : public adb_device, public adb_slot_card_interface { public: - a9m0330_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + a9m0330_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/adb/a9m0331.cpp b/src/devices/bus/adb/a9m0331.cpp index f0178dc4386..4e9e14067e0 100644 --- a/src/devices/bus/adb/a9m0331.cpp +++ b/src/devices/bus/adb/a9m0331.cpp @@ -52,7 +52,7 @@ ioport_constructor a9m0331_device::device_input_ports() const -------------------------------------------------*/ void a9m0331_device::device_add_mconfig(machine_config &config) { - M68705P3(config, m_mcu, 2048000); + M68705P3(config, m_mcu, XTAL::u(2048000)); m_mcu->porta_r().set(FUNC(a9m0331_device::mcu_port_a_r)); m_mcu->portb_r().set(FUNC(a9m0331_device::mcu_port_b_r)); m_mcu->portc_r().set(FUNC(a9m0331_device::mcu_port_c_r)); @@ -73,7 +73,7 @@ const tiny_rom_entry *a9m0331_device::device_rom_region() const DEVICE IMPLEMENTATION ***************************************************************************/ -a9m0331_device::a9m0331_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a9m0331_device::a9m0331_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adb_device(mconfig, ADB_A9M0331, tag, owner, clock), adb_slot_card_interface(mconfig, *this, DEVICE_SELF), m_mcu(*this, "mcu") diff --git a/src/devices/bus/adb/a9m0331.h b/src/devices/bus/adb/a9m0331.h index f6fd1d145ab..cf6e94e394b 100644 --- a/src/devices/bus/adb/a9m0331.h +++ b/src/devices/bus/adb/a9m0331.h @@ -14,7 +14,7 @@ class a9m0331_device : public adb_device, public adb_slot_card_interface { public: - a9m0331_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a9m0331_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/adb/adb.cpp b/src/devices/bus/adb/adb.cpp index cdf0810369a..913dc1ad024 100644 --- a/src/devices/bus/adb/adb.cpp +++ b/src/devices/bus/adb/adb.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(ADB_CONNECTOR, adb_connector, "adbslot", "ADB connector") -adb_connector::adb_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adb_connector::adb_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADB_CONNECTOR, tag, owner, clock), device_single_card_slot_interface(mconfig, *this) { @@ -43,7 +43,7 @@ adb_slot_card_interface::adb_slot_card_interface(const machine_config &mconfig, -adb_device::adb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +adb_device::adb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_adb_cb(*this), m_poweron_cb(*this) diff --git a/src/devices/bus/adb/adb.h b/src/devices/bus/adb/adb.h index e6b15e8f61d..db4be20dcf5 100644 --- a/src/devices/bus/adb/adb.h +++ b/src/devices/bus/adb/adb.h @@ -20,7 +20,7 @@ class adb_connector: public device_t, public device_single_card_slot_interface adb_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false) - : adb_connector(mconfig, tag, owner, 0) + : adb_connector(mconfig, tag, owner) { option_reset(); opts(*this); @@ -28,7 +28,7 @@ public: set_fixed(fixed); } - adb_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adb_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~adb_connector() = default; adb_device *get_device(); @@ -58,7 +58,7 @@ public: static void default_devices(device_slot_interface &device); protected: - adb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + adb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/adb/adbhle.cpp b/src/devices/bus/adb/adbhle.cpp index 369595ef143..2c756a26b35 100644 --- a/src/devices/bus/adb/adbhle.cpp +++ b/src/devices/bus/adb/adbhle.cpp @@ -10,7 +10,7 @@ DEFINE_DEVICE_TYPE(ADB_HLE, adb_hle_device, "adbhle", "ADB HLE") -adb_hle_device::adb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adb_hle_device::adb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adb_device(mconfig, ADB_HLE, tag, owner, clock), adb_slot_card_interface(mconfig, *this, DEVICE_SELF) { diff --git a/src/devices/bus/adb/adbhle.h b/src/devices/bus/adb/adbhle.h index 24dff3ad2fe..46146339f92 100644 --- a/src/devices/bus/adb/adbhle.h +++ b/src/devices/bus/adb/adbhle.h @@ -15,7 +15,7 @@ class adb_hle_device : public adb_device, public adb_slot_card_interface { public: - adb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/amiga/keyboard/a1200.cpp b/src/devices/bus/amiga/keyboard/a1200.cpp index 4877903d73a..76ee506b8bc 100644 --- a/src/devices/bus/amiga/keyboard/a1200.cpp +++ b/src/devices/bus/amiga/keyboard/a1200.cpp @@ -102,7 +102,7 @@ ROM_END // LIVE DEVICE //************************************************************************** -a1200_kbd_device::a1200_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +a1200_kbd_device::a1200_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, A1200_KBD, tag, owner, clock) , device_amiga_keyboard_interface(mconfig, *this) , m_rows(*this, "ROW%u", 0) diff --git a/src/devices/bus/amiga/keyboard/a1200.h b/src/devices/bus/amiga/keyboard/a1200.h index 4cbba0616db..6131db77149 100644 --- a/src/devices/bus/amiga/keyboard/a1200.h +++ b/src/devices/bus/amiga/keyboard/a1200.h @@ -24,7 +24,7 @@ class a1200_kbd_device : public device_t, public device_amiga_keyboard_interface { public: // construction/destruction - a1200_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + a1200_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // from host virtual DECLARE_WRITE_LINE_MEMBER(kdat_w) override; diff --git a/src/devices/bus/amiga/keyboard/a2000.cpp b/src/devices/bus/amiga/keyboard/a2000.cpp index 59aac50b652..8d01e4c4d85 100644 --- a/src/devices/bus/amiga/keyboard/a2000.cpp +++ b/src/devices/bus/amiga/keyboard/a2000.cpp @@ -103,7 +103,7 @@ public: protected: // construction/destruction - a2000_kbd_g80_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock) + a2000_kbd_g80_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_amiga_keyboard_interface(mconfig, *this) , m_rows(*this, "ROW%u", 0U) @@ -614,7 +614,7 @@ INPUT_PORTS_END class a2000_kbd_g80_us_device : public a2000_kbd_g80_device { public: - a2000_kbd_g80_us_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) + a2000_kbd_g80_us_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2000_kbd_g80_device(mconfig, A2000_KBD_G80_US, tag, owner, clock) { } @@ -630,7 +630,7 @@ protected: class a2000_kbd_g80_de_device : public a2000_kbd_g80_device { public: - a2000_kbd_g80_de_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) + a2000_kbd_g80_de_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2000_kbd_g80_device(mconfig, A2000_KBD_G80_DE, tag, owner, clock) { } @@ -648,7 +648,7 @@ protected: class a2000_kbd_g80_se_device : public a2000_kbd_g80_device { public: - a2000_kbd_g80_se_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) + a2000_kbd_g80_se_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2000_kbd_g80_device(mconfig, A2000_KBD_G80_SE, tag, owner, clock) { } @@ -666,7 +666,7 @@ protected: class a2000_kbd_g80_dk_device : public a2000_kbd_g80_device { public: - a2000_kbd_g80_dk_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) + a2000_kbd_g80_dk_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2000_kbd_g80_device(mconfig, A2000_KBD_G80_DK, tag, owner, clock) { } @@ -684,7 +684,7 @@ protected: class a2000_kbd_g80_gb_device : public a2000_kbd_g80_device { public: - a2000_kbd_g80_gb_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) + a2000_kbd_g80_gb_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a2000_kbd_g80_device(mconfig, A2000_KBD_G80_GB, tag, owner, clock) { } diff --git a/src/devices/bus/amiga/keyboard/keyboard.cpp b/src/devices/bus/amiga/keyboard/keyboard.cpp index 141998a15fa..c097bc1f8c6 100644 --- a/src/devices/bus/amiga/keyboard/keyboard.cpp +++ b/src/devices/bus/amiga/keyboard/keyboard.cpp @@ -32,7 +32,7 @@ template class device_finder; // amiga_keyboard_bus_device - constructor //------------------------------------------------- -amiga_keyboard_bus_device::amiga_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +amiga_keyboard_bus_device::amiga_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMIGA_KEYBOARD_INTERFACE, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_kbd(nullptr), diff --git a/src/devices/bus/amiga/keyboard/keyboard.h b/src/devices/bus/amiga/keyboard/keyboard.h index ce11d82ba32..cb90bc9b333 100644 --- a/src/devices/bus/amiga/keyboard/keyboard.h +++ b/src/devices/bus/amiga/keyboard/keyboard.h @@ -33,14 +33,14 @@ public: // construction/destruction template amiga_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : amiga_keyboard_bus_device(mconfig, tag, owner, 0) + : amiga_keyboard_bus_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - amiga_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + amiga_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~amiga_keyboard_bus_device(); // callbacks diff --git a/src/devices/bus/amiga/keyboard/mitsumi.cpp b/src/devices/bus/amiga/keyboard/mitsumi.cpp index ccc68d5d1d4..a3b6c6bc12a 100644 --- a/src/devices/bus/amiga/keyboard/mitsumi.cpp +++ b/src/devices/bus/amiga/keyboard/mitsumi.cpp @@ -144,7 +144,7 @@ public: } protected: - mitsumi_keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) + mitsumi_keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_amiga_keyboard_interface(mconfig, *this) , m_mcu{ *this, "mcu" } @@ -267,7 +267,7 @@ private: class a500_keyboard_base : public mitsumi_watchdog_keyboard_base { protected: - a500_keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) + a500_keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, type, tag, owner, clock) , m_reset_merger(*this, "reset") { @@ -325,7 +325,7 @@ private: class a600_keyboard_base : public mitsumi_keyboard_base { protected: - a600_keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) + a600_keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_keyboard_base(mconfig, type, tag, owner, clock) , m_reset_merger(*this, "reset") { @@ -661,7 +661,7 @@ INPUT_PORTS_END class a500_keyboard_us : public a500_keyboard_base { public: - a500_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_US, tag, owner, clock) { } @@ -674,7 +674,7 @@ protected: class a500_keyboard_de : public a500_keyboard_base { public: - a500_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_DE, tag, owner, clock) { } @@ -687,7 +687,7 @@ protected: class a500_keyboard_fr : public a500_keyboard_base { public: - a500_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_FR, tag, owner, clock) { } @@ -700,7 +700,7 @@ protected: class a500_keyboard_it : public a500_keyboard_base { public: - a500_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_IT, tag, owner, clock) { } @@ -713,7 +713,7 @@ protected: class a500_keyboard_se : public a500_keyboard_base { public: - a500_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_SE, tag, owner, clock) { } @@ -726,7 +726,7 @@ protected: class a500_keyboard_es : public a500_keyboard_base { public: - a500_keyboard_es(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_es(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_ES, tag, owner, clock) { } @@ -739,7 +739,7 @@ protected: class a500_keyboard_dk : public a500_keyboard_base { public: - a500_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_DK, tag, owner, clock) { } @@ -752,7 +752,7 @@ protected: class a500_keyboard_ch : public a500_keyboard_base { public: - a500_keyboard_ch(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_ch(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_CH, tag, owner, clock) { } @@ -765,7 +765,7 @@ protected: class a500_keyboard_no : public a500_keyboard_base { public: - a500_keyboard_no(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_no(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_NO, tag, owner, clock) { } @@ -778,7 +778,7 @@ protected: class a500_keyboard_gb : public a500_keyboard_base { public: - a500_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a500_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a500_keyboard_base(mconfig, A500_KBD_GB, tag, owner, clock) { } @@ -796,7 +796,7 @@ protected: class a600_keyboard_us : public a600_keyboard_base { public: - a600_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_US, tag, owner, clock) { } @@ -809,7 +809,7 @@ protected: class a600_keyboard_de : public a600_keyboard_base { public: - a600_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_DE, tag, owner, clock) { } @@ -822,7 +822,7 @@ protected: class a600_keyboard_fr : public a600_keyboard_base { public: - a600_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_FR, tag, owner, clock) { } @@ -835,7 +835,7 @@ protected: class a600_keyboard_it : public a600_keyboard_base { public: - a600_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_IT, tag, owner, clock) { } @@ -848,7 +848,7 @@ protected: class a600_keyboard_se : public a600_keyboard_base { public: - a600_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_SE, tag, owner, clock) { } @@ -861,7 +861,7 @@ protected: class a600_keyboard_es : public a600_keyboard_base { public: - a600_keyboard_es(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_es(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_ES, tag, owner, clock) { } @@ -874,7 +874,7 @@ protected: class a600_keyboard_dk : public a600_keyboard_base { public: - a600_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_DK, tag, owner, clock) { } @@ -887,7 +887,7 @@ protected: class a600_keyboard_ch : public a600_keyboard_base { public: - a600_keyboard_ch(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_ch(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_CH, tag, owner, clock) { } @@ -900,7 +900,7 @@ protected: class a600_keyboard_no : public a600_keyboard_base { public: - a600_keyboard_no(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_no(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_NO, tag, owner, clock) { } @@ -913,7 +913,7 @@ protected: class a600_keyboard_gb : public a600_keyboard_base { public: - a600_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a600_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a600_keyboard_base(mconfig, A600_KBD_GB, tag, owner, clock) { } @@ -931,7 +931,7 @@ protected: class a1000_keyboard_us : public a1000_keyboard_base { public: - a1000_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a1000_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a1000_keyboard_base(mconfig, A1000_KBD_US, tag, owner, clock) { } @@ -942,7 +942,7 @@ protected: class a1000_keyboard_de : public a1000_keyboard_base { public: - a1000_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a1000_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a1000_keyboard_base(mconfig, A1000_KBD_DE, tag, owner, clock) { } @@ -955,7 +955,7 @@ protected: class a1000_keyboard_fr : public a1000_keyboard_base { public: - a1000_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a1000_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a1000_keyboard_base(mconfig, A1000_KBD_FR, tag, owner, clock) { } @@ -968,7 +968,7 @@ protected: class a1000_keyboard_it : public a1000_keyboard_base { public: - a1000_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a1000_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a1000_keyboard_base(mconfig, A1000_KBD_IT, tag, owner, clock) { } @@ -981,7 +981,7 @@ protected: class a1000_keyboard_se : public a1000_keyboard_base { public: - a1000_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a1000_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a1000_keyboard_base(mconfig, A1000_KBD_SE, tag, owner, clock) { } @@ -994,7 +994,7 @@ protected: class a1000_keyboard_dk : public a1000_keyboard_base { public: - a1000_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a1000_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a1000_keyboard_base(mconfig, A1000_KBD_DK, tag, owner, clock) { } @@ -1007,7 +1007,7 @@ protected: class a1000_keyboard_gb : public a1000_keyboard_base { public: - a1000_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a1000_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : a1000_keyboard_base(mconfig, A1000_KBD_GB, tag, owner, clock) { } @@ -1025,7 +1025,7 @@ protected: class a2000_keyboard_us : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_us(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_US, tag, owner, clock) { } @@ -1036,7 +1036,7 @@ protected: class a2000_keyboard_de : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_de(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_DE, tag, owner, clock) { } @@ -1049,7 +1049,7 @@ protected: class a2000_keyboard_fr : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_fr(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_FR, tag, owner, clock) { } @@ -1062,7 +1062,7 @@ protected: class a2000_keyboard_it : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_it(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_IT, tag, owner, clock) { } @@ -1075,7 +1075,7 @@ protected: class a2000_keyboard_se : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_se(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_SE, tag, owner, clock) { } @@ -1088,7 +1088,7 @@ protected: class a2000_keyboard_es : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_es(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_es(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_ES, tag, owner, clock) { } @@ -1101,7 +1101,7 @@ protected: class a2000_keyboard_dk : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_dk(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_DK, tag, owner, clock) { } @@ -1114,7 +1114,7 @@ protected: class a2000_keyboard_ch : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_ch(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_ch(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_CH, tag, owner, clock) { } @@ -1127,7 +1127,7 @@ protected: class a2000_keyboard_no : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_no(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_no(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_NO, tag, owner, clock) { } @@ -1140,7 +1140,7 @@ protected: class a2000_keyboard_gb : public mitsumi_watchdog_keyboard_base { public: - a2000_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + a2000_keyboard_gb(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mitsumi_watchdog_keyboard_base(mconfig, A2000_KBD_GB, tag, owner, clock) { } diff --git a/src/devices/bus/amiga/zorro/a2052.cpp b/src/devices/bus/amiga/zorro/a2052.cpp index 379a75270c5..e51d020085a 100644 --- a/src/devices/bus/amiga/zorro/a2052.cpp +++ b/src/devices/bus/amiga/zorro/a2052.cpp @@ -50,7 +50,7 @@ ioport_constructor a2052_device::device_input_ports() const // a2052_device - constructor //------------------------------------------------- -a2052_device::a2052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2052_device::a2052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZORRO_A2052, tag, owner, clock), device_zorro2_card_interface(mconfig, *this), m_config(*this, "config") diff --git a/src/devices/bus/amiga/zorro/a2052.h b/src/devices/bus/amiga/zorro/a2052.h index f64bf06196d..046a8dc7879 100644 --- a/src/devices/bus/amiga/zorro/a2052.h +++ b/src/devices/bus/amiga/zorro/a2052.h @@ -29,7 +29,7 @@ class a2052_device : public device_t, public device_zorro2_card_interface, publi { public: // construction/destruction - a2052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override ATTR_COLD; diff --git a/src/devices/bus/amiga/zorro/a2058.cpp b/src/devices/bus/amiga/zorro/a2058.cpp index 26d5f393222..c88969a80c1 100644 --- a/src/devices/bus/amiga/zorro/a2058.cpp +++ b/src/devices/bus/amiga/zorro/a2058.cpp @@ -51,7 +51,7 @@ ioport_constructor a2058_device::device_input_ports() const // a2058_device - constructor //------------------------------------------------- -a2058_device::a2058_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2058_device::a2058_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZORRO_A2058, tag, owner, clock), device_zorro2_card_interface(mconfig, *this), m_config(*this, "config"), diff --git a/src/devices/bus/amiga/zorro/a2058.h b/src/devices/bus/amiga/zorro/a2058.h index 9b361b403e4..5e3b9f774c8 100644 --- a/src/devices/bus/amiga/zorro/a2058.h +++ b/src/devices/bus/amiga/zorro/a2058.h @@ -29,7 +29,7 @@ class a2058_device : public device_t, public device_zorro2_card_interface, publi { public: // construction/destruction - a2058_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2058_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override ATTR_COLD; diff --git a/src/devices/bus/amiga/zorro/a2065.cpp b/src/devices/bus/amiga/zorro/a2065.cpp index a76b289bb7f..6f34016a6b9 100644 --- a/src/devices/bus/amiga/zorro/a2065.cpp +++ b/src/devices/bus/amiga/zorro/a2065.cpp @@ -50,7 +50,7 @@ void a2065_device::device_add_mconfig(machine_config &config) // a2065_device - constructor //------------------------------------------------- -a2065_device::a2065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2065_device::a2065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZORRO_A2065, tag, owner, clock), device_zorro2_card_interface(mconfig, *this), m_lance(*this, "lance") diff --git a/src/devices/bus/amiga/zorro/a2065.h b/src/devices/bus/amiga/zorro/a2065.h index 43e66c29678..fdb5e4a52ed 100644 --- a/src/devices/bus/amiga/zorro/a2065.h +++ b/src/devices/bus/amiga/zorro/a2065.h @@ -30,7 +30,7 @@ class a2065_device : public device_t, public device_zorro2_card_interface, publi { public: // construction/destruction - a2065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t host_ram_r(offs_t offset); void host_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/amiga/zorro/a2232.cpp b/src/devices/bus/amiga/zorro/a2232.cpp index b9d6726bc7e..4dd94a3f971 100644 --- a/src/devices/bus/amiga/zorro/a2232.cpp +++ b/src/devices/bus/amiga/zorro/a2232.cpp @@ -117,7 +117,7 @@ void a2232_device::device_add_mconfig(machine_config &config) // a2232_device - constructor //------------------------------------------------- -a2232_device::a2232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2232_device::a2232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZORRO_A2232, tag, owner, clock), device_zorro2_card_interface(mconfig, *this), m_iocpu(*this, "iocpu"), diff --git a/src/devices/bus/amiga/zorro/a2232.h b/src/devices/bus/amiga/zorro/a2232.h index e8a5da3258c..a703f0cec7e 100644 --- a/src/devices/bus/amiga/zorro/a2232.h +++ b/src/devices/bus/amiga/zorro/a2232.h @@ -36,7 +36,7 @@ class a2232_device : public device_t, public device_zorro2_card_interface, publi { public: // construction/destruction - a2232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // zorro slot uint16_t shared_ram_r(offs_t offset, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/amiga/zorro/a590.cpp b/src/devices/bus/amiga/zorro/a590.cpp index 3fe72c69a42..f804bee8263 100644 --- a/src/devices/bus/amiga/zorro/a590.cpp +++ b/src/devices/bus/amiga/zorro/a590.cpp @@ -119,20 +119,20 @@ ioport_constructor a2091_device::device_input_ports() const void dmac_hdc_device_base::wd33c93(device_t *device) { - device->set_clock(10000000); + device->set_clock(XTAL::u(10000000)); downcast(device)->irq_cb().set(*this, FUNC(dmac_hdc_device_base::scsi_irq_w)); downcast(device)->drq_cb().set(*this, FUNC(dmac_hdc_device_base::scsi_drq_w)); } void dmac_hdc_device_base::device_add_mconfig(machine_config &config) { - amiga_dmac_device &dmac(AMIGA_DMAC(config, "dmac", 0)); + amiga_dmac_device &dmac(AMIGA_DMAC(config, "dmac")); dmac.scsi_read_handler().set(FUNC(dmac_hdc_device_base::dmac_scsi_r)); dmac.scsi_write_handler().set(FUNC(dmac_hdc_device_base::dmac_scsi_w)); dmac.int_handler().set(FUNC(dmac_hdc_device_base::dmac_int_w)); dmac.cfgout_handler().set(FUNC(dmac_hdc_device_base::dmac_cfgout_w)); - NSCSI_BUS(config, "scsi", 0); + NSCSI_BUS(config, "scsi"); NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr, false); NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, "harddisk", false); NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); @@ -214,7 +214,7 @@ const tiny_rom_entry *dmac_hdc_device_base::device_rom_region() const // dmac_hdc_device_base - constructor //------------------------------------------------- -dmac_hdc_device_base::dmac_hdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dmac_hdc_device_base::dmac_hdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_int6(false), m_dmac(*this, "dmac"), @@ -222,7 +222,7 @@ dmac_hdc_device_base::dmac_hdc_device_base(const machine_config &mconfig, device { } -a590_device::a590_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a590_device::a590_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmac_hdc_device_base(mconfig, ZORRO_A590, tag, owner, clock), device_exp_card_interface(mconfig, *this), m_dips(*this, "dips"), @@ -232,7 +232,7 @@ a590_device::a590_device(const machine_config &mconfig, const char *tag, device_ { } -a2091_device::a2091_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a2091_device::a2091_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmac_hdc_device_base(mconfig, ZORRO_A2091, tag, owner, clock), device_zorro2_card_interface(mconfig, *this), m_jp1(*this, "jp1"), diff --git a/src/devices/bus/amiga/zorro/a590.h b/src/devices/bus/amiga/zorro/a590.h index ab2a71bb0ce..82b4ef1af7c 100644 --- a/src/devices/bus/amiga/zorro/a590.h +++ b/src/devices/bus/amiga/zorro/a590.h @@ -30,7 +30,7 @@ class dmac_hdc_device_base : public device_t { protected: // construction/destruction - dmac_hdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dmac_hdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override ATTR_COLD; @@ -75,7 +75,7 @@ class a590_device : public dmac_hdc_device_base, public device_exp_card_interfac { public: // construction/destruction - a590_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a590_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -106,7 +106,7 @@ class a2091_device : public dmac_hdc_device_base, public device_zorro2_card_inte { public: // construction/destruction - a2091_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2091_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/amiga/zorro/action_replay.cpp b/src/devices/bus/amiga/zorro/action_replay.cpp index 9466305049d..40d43350535 100644 --- a/src/devices/bus/amiga/zorro/action_replay.cpp +++ b/src/devices/bus/amiga/zorro/action_replay.cpp @@ -101,24 +101,24 @@ const tiny_rom_entry *action_replay_mk3_device::device_rom_region() const // action_replay_device_base - constructor //------------------------------------------------- -action_replay_device_base::action_replay_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +action_replay_device_base::action_replay_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_exp_card_interface(mconfig, *this), m_button(*this, "freeze") { } -action_replay_mk1_device::action_replay_mk1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +action_replay_mk1_device::action_replay_mk1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : action_replay_device_base(mconfig, ZORRO_ACTION_REPLAY_MK1, tag, owner, clock) { } -action_replay_mk2_device::action_replay_mk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +action_replay_mk2_device::action_replay_mk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : action_replay_device_base(mconfig, ZORRO_ACTION_REPLAY_MK2, tag, owner, clock) { } -action_replay_mk3_device::action_replay_mk3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +action_replay_mk3_device::action_replay_mk3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : action_replay_device_base(mconfig, ZORRO_ACTION_REPLAY_MK3, tag, owner, clock) { } diff --git a/src/devices/bus/amiga/zorro/action_replay.h b/src/devices/bus/amiga/zorro/action_replay.h index 18a3c6c6456..74b309a8c78 100644 --- a/src/devices/bus/amiga/zorro/action_replay.h +++ b/src/devices/bus/amiga/zorro/action_replay.h @@ -31,7 +31,7 @@ public: protected: // construction/destruction - action_replay_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + action_replay_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override ATTR_COLD; @@ -48,7 +48,7 @@ class action_replay_mk1_device : public action_replay_device_base { public: // construction/destruction - action_replay_mk1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + action_replay_mk1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -59,7 +59,7 @@ class action_replay_mk2_device : public action_replay_device_base { public: // construction/destruction - action_replay_mk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + action_replay_mk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -70,7 +70,7 @@ class action_replay_mk3_device : public action_replay_device_base { public: // construction/destruction - action_replay_mk3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + action_replay_mk3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp index 16a27d07ff2..9f138dbe953 100644 --- a/src/devices/bus/amiga/zorro/buddha.cpp +++ b/src/devices/bus/amiga/zorro/buddha.cpp @@ -94,7 +94,7 @@ const tiny_rom_entry *buddha_device::device_rom_region() const // buddha_device - constructor //------------------------------------------------- -buddha_device::buddha_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +buddha_device::buddha_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZORRO_BUDDHA, tag, owner, clock), device_zorro2_card_interface(mconfig, *this), m_ata_0(*this, "ata_0"), diff --git a/src/devices/bus/amiga/zorro/buddha.h b/src/devices/bus/amiga/zorro/buddha.h index 80fce2682c5..dfef57d1a86 100644 --- a/src/devices/bus/amiga/zorro/buddha.h +++ b/src/devices/bus/amiga/zorro/buddha.h @@ -30,7 +30,7 @@ class buddha_device : public device_t, public device_zorro2_card_interface, publ { public: // construction/destruction - buddha_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + buddha_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/amiga/zorro/zorro.cpp b/src/devices/bus/amiga/zorro/zorro.cpp index 6bd8b280c86..8619314fb5e 100644 --- a/src/devices/bus/amiga/zorro/zorro.cpp +++ b/src/devices/bus/amiga/zorro/zorro.cpp @@ -22,12 +22,12 @@ DEFINE_DEVICE_TYPE(ZORRO_SLOT, zorro_slot_device, "zorro_slot", "Zorro slot") // zorro_slot_device - constructor //------------------------------------------------- -zorro_slot_device::zorro_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +zorro_slot_device::zorro_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : zorro_slot_device(mconfig, ZORRO_SLOT, tag, owner, clock) { } -zorro_slot_device::zorro_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +zorro_slot_device::zorro_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_slot_interface(mconfig, *this), m_zorro_bus(*this, finder_base::DUMMY_TAG) @@ -64,7 +64,7 @@ void zorro_slot_device::device_start() // exp_slot_device - constructor //------------------------------------------------- -zorro_bus_device_base::zorro_bus_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +zorro_bus_device_base::zorro_bus_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_space(*this, finder_base::DUMMY_TAG, -1), m_ovr_handler(*this), @@ -111,12 +111,12 @@ DEFINE_DEVICE_TYPE(EXP_SLOT, exp_slot_device, "exp_slot", "86-pin expansion slot // exp_slot_device - constructor //------------------------------------------------- -exp_slot_device::exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +exp_slot_device::exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : exp_slot_device(mconfig, EXP_SLOT, tag, owner, clock) { } -exp_slot_device::exp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +exp_slot_device::exp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : zorro_bus_device_base(mconfig, type, tag, owner, clock), m_ipl_handler(*this), m_dev(nullptr) @@ -185,12 +185,12 @@ DEFINE_DEVICE_TYPE(ZORRO2, zorro2_bus_device, "zorro2", "Zorro-II bus") // zorro2_bus_device - constructor //------------------------------------------------- -zorro2_bus_device::zorro2_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +zorro2_bus_device::zorro2_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : zorro2_bus_device(mconfig, ZORRO2, tag, owner, clock) { } -zorro2_bus_device::zorro2_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +zorro2_bus_device::zorro2_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : zorro_bus_device_base(mconfig, type, tag, owner, clock), m_eint1_handler(*this), m_eint4_handler(*this), diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h index 632a5de9f6a..286fa081332 100644 --- a/src/devices/bus/amiga/zorro/zorro.h +++ b/src/devices/bus/amiga/zorro/zorro.h @@ -160,10 +160,10 @@ class zorro_slot_device : public device_t, public device_slot_interface { public: // construction/destruction - zorro_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + zorro_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template zorro_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&zorrotag, O &&opts, const char *dflt) - : zorro_slot_device(mconfig, tag, owner, 0) + : zorro_slot_device(mconfig, tag, owner) { set_zorro_slot(std::forward(zorrotag)); option_reset(); @@ -176,7 +176,7 @@ public: template void set_zorro_slot(T &&zorro_tag) { m_zorro_bus.set_tag(zorro_tag); } protected: - zorro_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + zorro_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override ATTR_COLD; @@ -217,7 +217,7 @@ public: protected: // construction/destruction - zorro_bus_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + zorro_bus_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override ATTR_COLD; @@ -237,7 +237,7 @@ class exp_slot_device : public zorro_bus_device_base { public: // construction/destruction - exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ipl_handler() { return m_ipl_handler.bind(); } @@ -251,7 +251,7 @@ public: virtual void fc_w(int code) override; protected: - exp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + exp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override ATTR_COLD; @@ -272,7 +272,7 @@ class zorro2_bus_device : public zorro_bus_device_base { public: // construction/destruction - zorro2_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + zorro2_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~zorro2_bus_device(); auto eint1_handler() { return m_eint1_handler.bind(); } @@ -295,7 +295,7 @@ public: virtual void fc_w(int code) override; protected: - zorro2_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + zorro2_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override ATTR_COLD; diff --git a/src/devices/bus/apf/rom.cpp b/src/devices/bus/apf/rom.cpp index 509aa30f458..1897646acc2 100644 --- a/src/devices/bus/apf/rom.cpp +++ b/src/devices/bus/apf/rom.cpp @@ -22,22 +22,22 @@ DEFINE_DEVICE_TYPE(APF_ROM_BASIC, apf_basic_device, "apf_basic", "APF B DEFINE_DEVICE_TYPE(APF_ROM_SPACEDST, apf_spacedst_device, "apf_spacedst", "APF Space Destroyer Cart") -apf_rom_device::apf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +apf_rom_device::apf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_apf_cart_interface(mconfig, *this) { } -apf_rom_device::apf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apf_rom_device::apf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : apf_rom_device(mconfig, APF_ROM_STD, tag, owner, clock) { } -apf_basic_device::apf_basic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apf_basic_device::apf_basic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : apf_rom_device(mconfig, APF_ROM_BASIC, tag, owner, clock) { } -apf_spacedst_device::apf_spacedst_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apf_spacedst_device::apf_spacedst_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : apf_rom_device(mconfig, APF_ROM_SPACEDST, tag, owner, clock) { } diff --git a/src/devices/bus/apf/rom.h b/src/devices/bus/apf/rom.h index ab129289493..b53053ec951 100644 --- a/src/devices/bus/apf/rom.h +++ b/src/devices/bus/apf/rom.h @@ -13,13 +13,13 @@ class apf_rom_device : public device_t, { public: // construction/destruction - apf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; protected: - apf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + apf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -32,7 +32,7 @@ class apf_basic_device : public apf_rom_device { public: // construction/destruction - apf_basic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apf_basic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t extra_rom(offs_t offset) override; @@ -44,7 +44,7 @@ class apf_spacedst_device : public apf_rom_device { public: // construction/destruction - apf_spacedst_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apf_spacedst_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_ram(offs_t offset) override; diff --git a/src/devices/bus/apf/slot.cpp b/src/devices/bus/apf/slot.cpp index 62c8c7c02e9..b26af6f57da 100644 --- a/src/devices/bus/apf/slot.cpp +++ b/src/devices/bus/apf/slot.cpp @@ -71,7 +71,7 @@ void device_apf_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- // apf_cart_slot_device - constructor //------------------------------------------------- -apf_cart_slot_device::apf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apf_cart_slot_device::apf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APF_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h index 886135cb62b..40f6df0c66b 100644 --- a/src/devices/bus/apf/slot.h +++ b/src/devices/bus/apf/slot.h @@ -61,7 +61,7 @@ public: // construction/destruction template apf_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : apf_cart_slot_device(mconfig, tag, owner, 0) + : apf_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -69,7 +69,7 @@ public: set_fixed(false); } - apf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + apf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~apf_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/apricot/expansion/expansion.cpp b/src/devices/bus/apricot/expansion/expansion.cpp index 0949e1ae781..1bafa84998c 100644 --- a/src/devices/bus/apricot/expansion/expansion.cpp +++ b/src/devices/bus/apricot/expansion/expansion.cpp @@ -20,12 +20,12 @@ DEFINE_DEVICE_TYPE(APRICOT_EXPANSION_SLOT, apricot_expansion_slot_device, "apric // apricot_expansion_slot_device - constructor //------------------------------------------------- -apricot_expansion_slot_device::apricot_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_expansion_slot_device::apricot_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : apricot_expansion_slot_device(mconfig, APRICOT_EXPANSION_SLOT, tag, owner, clock) { } -apricot_expansion_slot_device::apricot_expansion_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +apricot_expansion_slot_device::apricot_expansion_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_single_card_slot_interface(mconfig, *this) { @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(APRICOT_EXPANSION_BUS, apricot_expansion_bus_device, "apricot // apricot_expansion_bus_device - constructor //------------------------------------------------- -apricot_expansion_bus_device::apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_expansion_bus_device::apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_EXPANSION_BUS, tag, owner, clock), m_program(*this, finder_base::DUMMY_TAG, -1), m_io(*this, finder_base::DUMMY_TAG, -1), diff --git a/src/devices/bus/apricot/expansion/expansion.h b/src/devices/bus/apricot/expansion/expansion.h index f5a1994861d..4f9d107f112 100644 --- a/src/devices/bus/apricot/expansion/expansion.h +++ b/src/devices/bus/apricot/expansion/expansion.h @@ -63,17 +63,17 @@ public: // construction/destruction template apricot_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : apricot_expansion_slot_device(mconfig, tag, owner, (uint32_t)0) + : apricot_expansion_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - apricot_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: - apricot_expansion_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + apricot_expansion_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; @@ -89,7 +89,7 @@ class apricot_expansion_bus_device : public device_t { public: // construction/destruction - apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~apricot_expansion_bus_device(); template void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/apricot/expansion/ram.cpp b/src/devices/bus/apricot/expansion/ram.cpp index ba9b146522d..e14cf003386 100644 --- a/src/devices/bus/apricot/expansion/ram.cpp +++ b/src/devices/bus/apricot/expansion/ram.cpp @@ -43,7 +43,7 @@ ioport_constructor apricot_256k_ram_device::device_input_ports() const // apricot_256k_ram_device - constructor //------------------------------------------------- -apricot_256k_ram_device::apricot_256k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_256k_ram_device::apricot_256k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_256K_RAM, tag, owner, clock), device_apricot_expansion_card_interface(mconfig, *this), m_sw(*this, "sw") @@ -97,7 +97,7 @@ ioport_constructor apricot_128k_ram_device::device_input_ports() const // apricot_128_512k_ram_device - constructor //------------------------------------------------- -apricot_128k_ram_device::apricot_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_128k_ram_device::apricot_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_128K_RAM, tag, owner, clock), device_apricot_expansion_card_interface(mconfig, *this), m_strap(*this, "strap") @@ -151,7 +151,7 @@ ioport_constructor apricot_512k_ram_device::device_input_ports() const // apricot_128_512k_ram_device - constructor //------------------------------------------------- -apricot_512k_ram_device::apricot_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_512k_ram_device::apricot_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_512K_RAM, tag, owner, clock), device_apricot_expansion_card_interface(mconfig, *this), m_strap(*this, "strap") diff --git a/src/devices/bus/apricot/expansion/ram.h b/src/devices/bus/apricot/expansion/ram.h index d6692b49ba7..7dd539720ec 100644 --- a/src/devices/bus/apricot/expansion/ram.h +++ b/src/devices/bus/apricot/expansion/ram.h @@ -25,7 +25,7 @@ class apricot_256k_ram_device : public device_t, public device_apricot_expansion { public: // construction/destruction - apricot_256k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_256k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; @@ -45,7 +45,7 @@ class apricot_128k_ram_device : public device_t, public device_apricot_expansion { public: // construction/destruction - apricot_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; @@ -65,7 +65,7 @@ class apricot_512k_ram_device : public device_t, public device_apricot_expansion { public: // construction/destruction - apricot_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/apricot/expansion/winchester.cpp b/src/devices/bus/apricot/expansion/winchester.cpp index e48751851fb..61bdc020c38 100644 --- a/src/devices/bus/apricot/expansion/winchester.cpp +++ b/src/devices/bus/apricot/expansion/winchester.cpp @@ -50,7 +50,7 @@ void apricot_winchester_device::regs(address_map &map) void apricot_winchester_device::device_add_mconfig(machine_config &config) { - WD1010(config, m_hdc, 5000000); + WD1010(config, m_hdc, XTAL::u(5000000)); m_hdc->out_intrq_callback().set(FUNC(apricot_winchester_device::hdc_intrq_w)); m_hdc->in_data_callback().set(FUNC(apricot_winchester_device::hdc_data_r)); m_hdc->out_data_callback().set(FUNC(apricot_winchester_device::hdc_data_w)); @@ -65,8 +65,8 @@ void apricot_winchester_device::device_add_mconfig(machine_config &config) latch.q_out_cb<6>().set(FUNC(apricot_winchester_device::clksel_w)); // buffer chip read/write clock select (host or wdc) latch.q_out_cb<7>().set(FUNC(apricot_winchester_device::drive_w<1>)); - HARDDISK(config, "hdc:0", 0); - HARDDISK(config, "hdc:1", 0); + HARDDISK(config, "hdc:0"); + HARDDISK(config, "hdc:1"); } @@ -78,7 +78,7 @@ void apricot_winchester_device::device_add_mconfig(machine_config &config) // apricot_winchester_device - constructor //------------------------------------------------- -apricot_winchester_device::apricot_winchester_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_winchester_device::apricot_winchester_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_WINCHESTER, tag, owner, clock), device_apricot_expansion_card_interface(mconfig, *this), m_hdc(*this, "hdc"), diff --git a/src/devices/bus/apricot/expansion/winchester.h b/src/devices/bus/apricot/expansion/winchester.h index fc082776d8c..051d1492efa 100644 --- a/src/devices/bus/apricot/expansion/winchester.h +++ b/src/devices/bus/apricot/expansion/winchester.h @@ -25,7 +25,7 @@ class apricot_winchester_device : public device_t, public device_apricot_expansi { public: // construction/destruction - apricot_winchester_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_winchester_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/apricot/keyboard/hle.cpp b/src/devices/bus/apricot/keyboard/hle.cpp index 8a33c2952fa..c607a7bd1f8 100644 --- a/src/devices/bus/apricot/keyboard/hle.cpp +++ b/src/devices/bus/apricot/keyboard/hle.cpp @@ -221,7 +221,7 @@ void apricot_keyboard_hle_device::device_add_mconfig(machine_config &config) // apricot_keyboard_hle_device - constructor //------------------------------------------------- -apricot_keyboard_hle_device::apricot_keyboard_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_keyboard_hle_device::apricot_keyboard_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_KEYBOARD_HLE, tag, owner, clock), device_apricot_keyboard_interface(mconfig, *this), device_buffered_serial_interface(mconfig, *this), @@ -262,8 +262,8 @@ void apricot_keyboard_hle_device::device_reset() transmit_register_reset(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(7800); - set_tra_rate(7800); + set_rcv_rate(XTAL::u(7800)); + set_tra_rate(XTAL::u(7800)); reset_key_state(); start_processing(attotime::from_hz(7800)); diff --git a/src/devices/bus/apricot/keyboard/hle.h b/src/devices/bus/apricot/keyboard/hle.h index c9738598a57..c39a6fd23e5 100644 --- a/src/devices/bus/apricot/keyboard/hle.h +++ b/src/devices/bus/apricot/keyboard/hle.h @@ -31,7 +31,7 @@ class apricot_keyboard_hle_device : public device_t, { public: // construction/destruction - apricot_keyboard_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_keyboard_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual void out_w(int state) override; diff --git a/src/devices/bus/apricot/keyboard/keyboard.cpp b/src/devices/bus/apricot/keyboard/keyboard.cpp index 4a87d6b0493..d366a82e09c 100644 --- a/src/devices/bus/apricot/keyboard/keyboard.cpp +++ b/src/devices/bus/apricot/keyboard/keyboard.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(APRICOT_KEYBOARD_INTERFACE, apricot_keyboard_bus_device, "apr // apricot_keyboard_bus_device - constructor //------------------------------------------------- -apricot_keyboard_bus_device::apricot_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_keyboard_bus_device::apricot_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_KEYBOARD_INTERFACE, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_kbd(nullptr), diff --git a/src/devices/bus/apricot/keyboard/keyboard.h b/src/devices/bus/apricot/keyboard/keyboard.h index e19605b2459..82f245a6558 100644 --- a/src/devices/bus/apricot/keyboard/keyboard.h +++ b/src/devices/bus/apricot/keyboard/keyboard.h @@ -48,14 +48,14 @@ public: // construction/destruction template apricot_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : apricot_keyboard_bus_device(mconfig, tag, owner, 0) + : apricot_keyboard_bus_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - apricot_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~apricot_keyboard_bus_device(); // callbacks diff --git a/src/devices/bus/apricot/video/mono.cpp b/src/devices/bus/apricot/video/mono.cpp index 424df94cea8..d6d0d0c2e6a 100644 --- a/src/devices/bus/apricot/video/mono.cpp +++ b/src/devices/bus/apricot/video/mono.cpp @@ -73,7 +73,7 @@ void apricot_mono_display_device::device_add_mconfig(machine_config &config) // apricot_mono_display_device - constructor //------------------------------------------------- -apricot_mono_display_device::apricot_mono_display_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_mono_display_device::apricot_mono_display_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_MONO_DISPLAY, tag, owner, clock), device_apricot_video_interface(mconfig, *this), m_crtc(*this, "crtc"), diff --git a/src/devices/bus/apricot/video/mono.h b/src/devices/bus/apricot/video/mono.h index 36885bcb768..5e1ffa12cf2 100644 --- a/src/devices/bus/apricot/video/mono.h +++ b/src/devices/bus/apricot/video/mono.h @@ -26,7 +26,7 @@ class apricot_mono_display_device : public device_t, public device_apricot_video { public: // construction/destruction - apricot_mono_display_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_mono_display_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/apricot/video/video.cpp b/src/devices/bus/apricot/video/video.cpp index 13e91b04a58..8cfa9498c85 100644 --- a/src/devices/bus/apricot/video/video.cpp +++ b/src/devices/bus/apricot/video/video.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(APRICOT_VIDEO_SLOT, apricot_video_slot_device, "apricot_video // apricot_video_slot_device - constructor //------------------------------------------------- -apricot_video_slot_device::apricot_video_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_video_slot_device::apricot_video_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_VIDEO_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_apvid_handler(*this), diff --git a/src/devices/bus/apricot/video/video.h b/src/devices/bus/apricot/video/video.h index 5b1a8b322f8..0e9a8405d7f 100644 --- a/src/devices/bus/apricot/video/video.h +++ b/src/devices/bus/apricot/video/video.h @@ -28,7 +28,7 @@ public: // construction/destruction template apricot_video_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, const char *dflt) - : apricot_video_slot_device(mconfig, tag, owner, uint32_t(0)) + : apricot_video_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -36,7 +36,7 @@ public: set_fixed(false); } - apricot_video_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_video_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~apricot_video_slot_device(); // callbacks diff --git a/src/devices/bus/aquarius/c1541.cpp b/src/devices/bus/aquarius/c1541.cpp index 40ac2679422..90be53ad4e0 100644 --- a/src/devices/bus/aquarius/c1541.cpp +++ b/src/devices/bus/aquarius/c1541.cpp @@ -36,7 +36,7 @@ void aquarius_c1541_device::device_add_mconfig(machine_config &config) // aquarius_c1541_device - constructor //------------------------------------------------- -aquarius_c1541_device::aquarius_c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_c1541_device::aquarius_c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AQUARIUS_C1541, tag, owner, clock) , device_aquarius_cartridge_interface(mconfig, *this) , m_iec(*this, "iec_bus") diff --git a/src/devices/bus/aquarius/c1541.h b/src/devices/bus/aquarius/c1541.h index 3a9e16e290c..dde267fc541 100644 --- a/src/devices/bus/aquarius/c1541.h +++ b/src/devices/bus/aquarius/c1541.h @@ -25,7 +25,7 @@ class aquarius_c1541_device : { public: // construction/destruction - aquarius_c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/aquarius/mini.cpp b/src/devices/bus/aquarius/mini.cpp index dee7c4cd294..12278faf306 100644 --- a/src/devices/bus/aquarius/mini.cpp +++ b/src/devices/bus/aquarius/mini.cpp @@ -117,7 +117,7 @@ void aquarius_mini_device::device_add_mconfig(machine_config &config) // aquarius_mini_device - constructor //------------------------------------------------- -aquarius_mini_device::aquarius_mini_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_mini_device::aquarius_mini_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AQUARIUS_MINI, tag, owner, clock) , device_aquarius_cartridge_interface(mconfig, *this) , m_irqs(*this, "irqs") diff --git a/src/devices/bus/aquarius/mini.h b/src/devices/bus/aquarius/mini.h index ed9cc1af641..496948078ce 100644 --- a/src/devices/bus/aquarius/mini.h +++ b/src/devices/bus/aquarius/mini.h @@ -24,7 +24,7 @@ class aquarius_mini_device: { public: // construction/destruction - aquarius_mini_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_mini_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(input_changed); diff --git a/src/devices/bus/aquarius/qdisk.cpp b/src/devices/bus/aquarius/qdisk.cpp index ba06201f554..e2ee568c091 100644 --- a/src/devices/bus/aquarius/qdisk.cpp +++ b/src/devices/bus/aquarius/qdisk.cpp @@ -78,7 +78,7 @@ void aquarius_qdisk_device::device_add_mconfig(machine_config &config) // aquarius_qdisk_device - constructor //------------------------------------------------- -aquarius_qdisk_device::aquarius_qdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_qdisk_device::aquarius_qdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AQUARIUS_QDISK, tag, owner, clock) , device_aquarius_cartridge_interface(mconfig, *this) , m_ssda(*this, "mc6852") diff --git a/src/devices/bus/aquarius/qdisk.h b/src/devices/bus/aquarius/qdisk.h index 303ed90affa..3f14f837178 100644 --- a/src/devices/bus/aquarius/qdisk.h +++ b/src/devices/bus/aquarius/qdisk.h @@ -25,7 +25,7 @@ class aquarius_qdisk_device : { public: // construction/destruction - aquarius_qdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_qdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/aquarius/ram.cpp b/src/devices/bus/aquarius/ram.cpp index 753a1fbf3a3..a2c23a74033 100644 --- a/src/devices/bus/aquarius/ram.cpp +++ b/src/devices/bus/aquarius/ram.cpp @@ -28,29 +28,29 @@ DEFINE_DEVICE_TYPE(AQUARIUS_RAM16P, aquarius_ram16p_device, "aquarius_ram16p", " // aquarius_ram_device - constructor //------------------------------------------------- -aquarius_ram_device::aquarius_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t size) +aquarius_ram_device::aquarius_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t size) : device_t(mconfig, type, tag, owner, clock) , device_aquarius_cartridge_interface(mconfig, *this) , m_ram_size(size) { } -aquarius_ram4_device::aquarius_ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_ram4_device::aquarius_ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aquarius_ram_device(mconfig, AQUARIUS_RAM4, tag, owner, clock, 0x1000) { } -aquarius_ram16_device::aquarius_ram16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_ram16_device::aquarius_ram16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aquarius_ram_device(mconfig, AQUARIUS_RAM16, tag, owner, clock, 0x4000) { } -aquarius_ram32_device::aquarius_ram32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_ram32_device::aquarius_ram32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aquarius_ram_device(mconfig, AQUARIUS_RAM32, tag, owner, clock, 0x8000) { } -aquarius_ram16p_device::aquarius_ram16p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_ram16p_device::aquarius_ram16p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AQUARIUS_RAM16P, tag, owner, clock) , device_aquarius_cartridge_interface(mconfig, *this) { diff --git a/src/devices/bus/aquarius/ram.h b/src/devices/bus/aquarius/ram.h index 3721314bb0f..b917291bc49 100644 --- a/src/devices/bus/aquarius/ram.h +++ b/src/devices/bus/aquarius/ram.h @@ -26,7 +26,7 @@ class aquarius_ram_device : { protected: // construction/destruction - aquarius_ram_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock, uint16_t size); + aquarius_ram_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock, uint16_t size); // device-level overrides virtual void device_start() override; @@ -47,7 +47,7 @@ class aquarius_ram4_device : public aquarius_ram_device { public: // construction/destruction - aquarius_ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> aquarius_ram16_device @@ -56,7 +56,7 @@ class aquarius_ram16_device : public aquarius_ram_device { public: // construction/destruction - aquarius_ram16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_ram16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> aquarius_ram32_device @@ -65,7 +65,7 @@ class aquarius_ram32_device : public aquarius_ram_device { public: // construction/destruction - aquarius_ram32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_ram32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -77,7 +77,7 @@ class aquarius_ram16p_device : { public: // construction/destruction - aquarius_ram16p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_ram16p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/aquarius/rom.cpp b/src/devices/bus/aquarius/rom.cpp index 87f7df97079..f4c65bc1da2 100644 --- a/src/devices/bus/aquarius/rom.cpp +++ b/src/devices/bus/aquarius/rom.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(AQUARIUS_ROM, aquarius_rom_device, "aquarius_rom", "Aquarius // aquarius_rom_device - constructor //------------------------------------------------- -aquarius_rom_device::aquarius_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_rom_device::aquarius_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AQUARIUS_ROM, tag, owner, clock) , device_aquarius_cartridge_interface(mconfig, *this) { diff --git a/src/devices/bus/aquarius/rom.h b/src/devices/bus/aquarius/rom.h index 9e25f9e9ab0..dc70d6d0740 100644 --- a/src/devices/bus/aquarius/rom.h +++ b/src/devices/bus/aquarius/rom.h @@ -26,7 +26,7 @@ class aquarius_rom_device : { public: // construction/destruction - aquarius_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/aquarius/slot.cpp b/src/devices/bus/aquarius/slot.cpp index 2deb6149e12..68e81bf18c2 100644 --- a/src/devices/bus/aquarius/slot.cpp +++ b/src/devices/bus/aquarius/slot.cpp @@ -55,7 +55,7 @@ void device_aquarius_cartridge_interface::rom_alloc(uint32_t size) // aquarius_cartridge_slot_device - constructor //------------------------------------------------- -aquarius_cartridge_slot_device::aquarius_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_cartridge_slot_device::aquarius_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AQUARIUS_CARTRIDGE_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) diff --git a/src/devices/bus/aquarius/slot.h b/src/devices/bus/aquarius/slot.h index 9ee7aaf6d2b..2f2bdf4451b 100644 --- a/src/devices/bus/aquarius/slot.h +++ b/src/devices/bus/aquarius/slot.h @@ -29,7 +29,7 @@ class aquarius_cartridge_slot_device : public device_t, public: // construction/destruction template - aquarius_cartridge_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + aquarius_cartridge_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : aquarius_cartridge_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -38,7 +38,7 @@ public: set_fixed(false); } - aquarius_cartridge_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + aquarius_cartridge_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // callbacks auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/bus/aquarius/supercart.cpp b/src/devices/bus/aquarius/supercart.cpp index 2bc2ad82fd8..6deb1c0fdb4 100644 --- a/src/devices/bus/aquarius/supercart.cpp +++ b/src/devices/bus/aquarius/supercart.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(AQUARIUS_SC1, aquarius_sc1_device, "aquarius_sc1", "Aquarius // aquarius_sc1_device - constructor //------------------------------------------------- -aquarius_sc1_device::aquarius_sc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aquarius_sc1_device::aquarius_sc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AQUARIUS_SC1, tag, owner, clock) , device_aquarius_cartridge_interface(mconfig, *this) , m_bank(0) diff --git a/src/devices/bus/aquarius/supercart.h b/src/devices/bus/aquarius/supercart.h index 9242c1dc667..63661f3d405 100644 --- a/src/devices/bus/aquarius/supercart.h +++ b/src/devices/bus/aquarius/supercart.h @@ -26,7 +26,7 @@ class aquarius_sc1_device : { public: // construction/destruction - aquarius_sc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aquarius_sc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/arcadia/rom.cpp b/src/devices/bus/arcadia/rom.cpp index 60bc4b3a88e..30e64dee377 100644 --- a/src/devices/bus/arcadia/rom.cpp +++ b/src/devices/bus/arcadia/rom.cpp @@ -22,17 +22,17 @@ DEFINE_DEVICE_TYPE(ARCADIA_ROM_STD, arcadia_rom_device, "arcadia_rom", "Emers DEFINE_DEVICE_TYPE(ARCADIA_ROM_GOLF, arcadia_golf_device, "arcadia_golf", "Emerson Arcadia Golf Cart") -arcadia_rom_device::arcadia_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +arcadia_rom_device::arcadia_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_arcadia_cart_interface(mconfig, *this) { } -arcadia_rom_device::arcadia_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arcadia_rom_device::arcadia_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arcadia_rom_device(mconfig, ARCADIA_ROM_STD, tag, owner, clock) { } -arcadia_golf_device::arcadia_golf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arcadia_golf_device::arcadia_golf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arcadia_rom_device(mconfig, ARCADIA_ROM_GOLF, tag, owner, clock) { } diff --git a/src/devices/bus/arcadia/rom.h b/src/devices/bus/arcadia/rom.h index b0ba196302e..e748a4cd746 100644 --- a/src/devices/bus/arcadia/rom.h +++ b/src/devices/bus/arcadia/rom.h @@ -15,14 +15,14 @@ class arcadia_rom_device : public device_t, { public: // construction/destruction - arcadia_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arcadia_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; virtual uint8_t extra_rom(offs_t offset) override; public: - arcadia_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + arcadia_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -35,7 +35,7 @@ class arcadia_golf_device : public arcadia_rom_device { public: // construction/destruction - arcadia_golf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arcadia_golf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/arcadia/slot.cpp b/src/devices/bus/arcadia/slot.cpp index 1eaada68544..fee3f1b50d7 100644 --- a/src/devices/bus/arcadia/slot.cpp +++ b/src/devices/bus/arcadia/slot.cpp @@ -61,7 +61,7 @@ void device_arcadia_cart_interface::rom_alloc(uint32_t size) //------------------------------------------------- // arcadia_cart_slot_device - constructor //------------------------------------------------- -arcadia_cart_slot_device::arcadia_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +arcadia_cart_slot_device::arcadia_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EA2001_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/arcadia/slot.h b/src/devices/bus/arcadia/slot.h index e9a3ed8415e..3bbbb673d4c 100644 --- a/src/devices/bus/arcadia/slot.h +++ b/src/devices/bus/arcadia/slot.h @@ -51,14 +51,14 @@ public: // construction/destruction template arcadia_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : arcadia_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : arcadia_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - arcadia_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arcadia_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~arcadia_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/archimedes/econet/econet.cpp b/src/devices/bus/archimedes/econet/econet.cpp index e469b9f581d..9f4e037fb2d 100644 --- a/src/devices/bus/archimedes/econet/econet.cpp +++ b/src/devices/bus/archimedes/econet/econet.cpp @@ -29,7 +29,7 @@ void arc_econet_device::device_add_mconfig(machine_config &config) m_adlc->out_txd_cb().set("econet", FUNC(econet_device::host_data_w)); m_adlc->out_irq_cb().set(DEVICE_SELF_OWNER, FUNC(archimedes_econet_slot_device::efiq_w)); - econet_device &econet(ECONET(config, "econet", 0)); + econet_device &econet(ECONET(config, "econet")); econet.clk_wr_callback().set(m_adlc, FUNC(mc6854_device::txc_w)); econet.clk_wr_callback().append(m_adlc, FUNC(mc6854_device::rxc_w)); econet.data_wr_callback().set(m_adlc, FUNC(mc6854_device::set_rx)); @@ -46,7 +46,7 @@ void arc_econet_device::device_add_mconfig(machine_config &config) // archimedes_econet_device - constructor //------------------------------------------------- -arc_econet_device::arc_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_econet_device::arc_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_ECONET, tag, owner, clock) , device_archimedes_econet_interface(mconfig, *this) , m_adlc(*this, "mc6854") diff --git a/src/devices/bus/archimedes/econet/econet.h b/src/devices/bus/archimedes/econet/econet.h index 337cb077206..f41e16c62df 100644 --- a/src/devices/bus/archimedes/econet/econet.h +++ b/src/devices/bus/archimedes/econet/econet.h @@ -30,7 +30,7 @@ class arc_econet_device: { public: // construction/destruction - arc_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/archimedes/econet/midi.cpp b/src/devices/bus/archimedes/econet/midi.cpp index f6d3cc5c39b..22f14f94f14 100644 --- a/src/devices/bus/archimedes/econet/midi.cpp +++ b/src/devices/bus/archimedes/econet/midi.cpp @@ -59,19 +59,19 @@ void arc_serial_sampler_device::device_add_mconfig(machine_config &config) // arc_serial_midi_device - constructor //------------------------------------------------- -arc_serial_midi_device::arc_serial_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +arc_serial_midi_device::arc_serial_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_archimedes_econet_interface(mconfig, *this) , m_adlc(*this, "mc6854") { } -arc_serial_midi_device::arc_serial_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_serial_midi_device::arc_serial_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_serial_midi_device(mconfig, ARC_SERIAL_MIDI, tag, owner, clock) { } -arc_serial_sampler_device::arc_serial_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_serial_sampler_device::arc_serial_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_serial_midi_device(mconfig, ARC_SERIAL_SAMPLER, tag, owner, clock) { } diff --git a/src/devices/bus/archimedes/econet/midi.h b/src/devices/bus/archimedes/econet/midi.h index 140819c5caa..2b8fd206bdb 100644 --- a/src/devices/bus/archimedes/econet/midi.h +++ b/src/devices/bus/archimedes/econet/midi.h @@ -29,10 +29,10 @@ class arc_serial_midi_device: { public: // construction/destruction - arc_serial_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_serial_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - arc_serial_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + arc_serial_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -54,7 +54,7 @@ class arc_serial_sampler_device: public arc_serial_midi_device { public: // construction/destruction - arc_serial_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_serial_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE; } diff --git a/src/devices/bus/archimedes/econet/rtfmjoy.cpp b/src/devices/bus/archimedes/econet/rtfmjoy.cpp index c53e7c155da..cda1839008a 100644 --- a/src/devices/bus/archimedes/econet/rtfmjoy.cpp +++ b/src/devices/bus/archimedes/econet/rtfmjoy.cpp @@ -56,7 +56,7 @@ ioport_constructor arc_rtfm_joystick_device::device_input_ports() const // archimedes_rtfm_joystick_device - constructor //------------------------------------------------- -arc_rtfm_joystick_device::arc_rtfm_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_rtfm_joystick_device::arc_rtfm_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_RTFM_JOY, tag, owner, clock) , device_archimedes_econet_interface(mconfig, *this) , m_joy(*this, "JOY%u", 0U) diff --git a/src/devices/bus/archimedes/econet/rtfmjoy.h b/src/devices/bus/archimedes/econet/rtfmjoy.h index 443d5a1560b..585c1614b75 100644 --- a/src/devices/bus/archimedes/econet/rtfmjoy.h +++ b/src/devices/bus/archimedes/econet/rtfmjoy.h @@ -27,7 +27,7 @@ class arc_rtfm_joystick_device: { public: // construction/destruction - arc_rtfm_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_rtfm_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/archimedes/econet/slot.cpp b/src/devices/bus/archimedes/econet/slot.cpp index c15e13698c3..9088a796da7 100644 --- a/src/devices/bus/archimedes/econet/slot.cpp +++ b/src/devices/bus/archimedes/econet/slot.cpp @@ -41,7 +41,7 @@ device_archimedes_econet_interface::device_archimedes_econet_interface(const mac // archimedes_econet_slot_device - constructor //------------------------------------------------- -archimedes_econet_slot_device::archimedes_econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +archimedes_econet_slot_device::archimedes_econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARCHIMEDES_ECONET_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_device(nullptr) diff --git a/src/devices/bus/archimedes/econet/slot.h b/src/devices/bus/archimedes/econet/slot.h index 4d963fd608e..ef0cf69f12f 100644 --- a/src/devices/bus/archimedes/econet/slot.h +++ b/src/devices/bus/archimedes/econet/slot.h @@ -57,7 +57,7 @@ public: set_fixed(false); } - archimedes_econet_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + archimedes_econet_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto efiq_handler() { return m_efiq_handler.bind(); } diff --git a/src/devices/bus/archimedes/podule/a448.cpp b/src/devices/bus/archimedes/podule/a448.cpp index 400a15722e6..960c8f3603f 100644 --- a/src/devices/bus/archimedes/podule/a448.cpp +++ b/src/devices/bus/archimedes/podule/a448.cpp @@ -28,10 +28,10 @@ public: static constexpr feature_type unemulated_features() { return feature::CAPTURE; } // construction/destruction - arc_a448_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_a448_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - arc_a448_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + arc_a448_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -54,7 +54,7 @@ class arc_a448b_device : public arc_a448_device { public: // construction/destruction - arc_a448b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_a448b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -100,7 +100,7 @@ const tiny_rom_entry *arc_a448b_device::device_rom_region() const void arc_a448_device::device_add_mconfig(machine_config &config) { - //ZN448(config, "zn448", 0); + //ZN448(config, "zn448"); } void arc_a448b_device::device_add_mconfig(machine_config &config) @@ -122,19 +122,19 @@ void arc_a448b_device::device_add_mconfig(machine_config &config) // arc_a448_device - constructor //------------------------------------------------- -arc_a448_device::arc_a448_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +arc_a448_device::arc_a448_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") { } -arc_a448_device::arc_a448_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_a448_device::arc_a448_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_a448_device(mconfig, ARC_A448, tag, owner, clock) { } -arc_a448b_device::arc_a448b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_a448b_device::arc_a448b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_a448_device(mconfig, ARC_A448B, tag, owner, clock) { } diff --git a/src/devices/bus/archimedes/podule/acejoy.cpp b/src/devices/bus/archimedes/podule/acejoy.cpp index 6cf6f2ef0e1..5473c8d9f9d 100644 --- a/src/devices/bus/archimedes/podule/acejoy.cpp +++ b/src/devices/bus/archimedes/podule/acejoy.cpp @@ -20,7 +20,7 @@ class arc_acejoy_device : { public: // construction/destruction - arc_acejoy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_acejoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -103,7 +103,7 @@ ioport_constructor arc_acejoy_device::device_input_ports() const // arc_acejoy_device - constructor //------------------------------------------------- -arc_acejoy_device::arc_acejoy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_acejoy_device::arc_acejoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_ACEJOY, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/armadeus.cpp b/src/devices/bus/archimedes/podule/armadeus.cpp index 4af99d9dd8f..04d46e1ff96 100644 --- a/src/devices/bus/archimedes/podule/armadeus.cpp +++ b/src/devices/bus/archimedes/podule/armadeus.cpp @@ -24,7 +24,7 @@ public: static constexpr feature_type unemulated_features() { return feature::CAPTURE; } // construction/destruction - arc_armadeus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_armadeus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -71,9 +71,9 @@ const tiny_rom_entry *arc_armadeus_device::device_rom_region() const void arc_armadeus_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "speaker").front_center(); - ZN428E(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + ZN428E(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); - //ZN448(config, "zn448", 0); + //ZN448(config, "zn448"); } @@ -85,7 +85,7 @@ void arc_armadeus_device::device_add_mconfig(machine_config &config) // arc_armadeus_device - constructor //------------------------------------------------- -arc_armadeus_device::arc_armadeus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_armadeus_device::arc_armadeus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_ARMADEUS, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/eaglem2.cpp b/src/devices/bus/archimedes/podule/eaglem2.cpp index 5180f724208..19f6f91b605 100644 --- a/src/devices/bus/archimedes/podule/eaglem2.cpp +++ b/src/devices/bus/archimedes/podule/eaglem2.cpp @@ -38,7 +38,7 @@ class arc_eaglem2_device : { public: // construction/destruction - arc_eaglem2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_eaglem2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE | feature::SOUND; } @@ -115,7 +115,7 @@ void arc_eaglem2_device::device_add_mconfig(machine_config &config) // arc_eaglem2_device - constructor //------------------------------------------------- -arc_eaglem2_device::arc_eaglem2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_eaglem2_device::arc_eaglem2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_EAGLEM2, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/ether1.cpp b/src/devices/bus/archimedes/podule/ether1.cpp index e4e23704360..74d2a59cfeb 100644 --- a/src/devices/bus/archimedes/podule/ether1.cpp +++ b/src/devices/bus/archimedes/podule/ether1.cpp @@ -21,7 +21,7 @@ class arc_ether1_aka25_device : { public: // construction/destruction - arc_ether1_aka25_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_ether1_aka25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -100,7 +100,7 @@ const tiny_rom_entry *arc_ether1_aka25_device::device_rom_region() const // arc_ether1_aka25_device - constructor //------------------------------------------------- -arc_ether1_aka25_device::arc_ether1_aka25_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_ether1_aka25_device::arc_ether1_aka25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_ETHER1_AKA25, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/etherd.cpp b/src/devices/bus/archimedes/podule/etherd.cpp index f1f4bfc4228..7f04546447e 100644 --- a/src/devices/bus/archimedes/podule/etherd.cpp +++ b/src/devices/bus/archimedes/podule/etherd.cpp @@ -21,7 +21,7 @@ class arc_etherd_device : { public: // construction/destruction - arc_etherd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_etherd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::COMMS; } @@ -89,7 +89,7 @@ void arc_etherd_device::device_add_mconfig(machine_config &config) // arc_etherd_device - constructor //------------------------------------------------- -arc_etherd_device::arc_etherd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_etherd_device::arc_etherd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_ETHERD, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/etherr.cpp b/src/devices/bus/archimedes/podule/etherr.cpp index df3ebc6a57b..adfba95caf1 100644 --- a/src/devices/bus/archimedes/podule/etherr.cpp +++ b/src/devices/bus/archimedes/podule/etherr.cpp @@ -21,7 +21,7 @@ class arc_etherr_device : { public: // construction/destruction - arc_etherr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_etherr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::COMMS; } @@ -89,7 +89,7 @@ void arc_etherr_device::device_add_mconfig(machine_config &config) // arc_etherr_device - constructor //------------------------------------------------- -arc_etherr_device::arc_etherr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_etherr_device::arc_etherr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_ETHERR, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/faxpack.cpp b/src/devices/bus/archimedes/podule/faxpack.cpp index 0ae0d375203..be02b883082 100644 --- a/src/devices/bus/archimedes/podule/faxpack.cpp +++ b/src/devices/bus/archimedes/podule/faxpack.cpp @@ -25,7 +25,7 @@ class arc_faxpack_device : { public: // construction/destruction - arc_faxpack_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_faxpack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE; } @@ -108,7 +108,7 @@ void arc_faxpack_device::device_add_mconfig(machine_config &config) // arc_faxpack_device - constructor //------------------------------------------------- -arc_faxpack_device::arc_faxpack_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_faxpack_device::arc_faxpack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_FAXPACK, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_mcu(*this, "mcu") diff --git a/src/devices/bus/archimedes/podule/greyhawk.cpp b/src/devices/bus/archimedes/podule/greyhawk.cpp index a2ffe51459b..797ada06b2d 100644 --- a/src/devices/bus/archimedes/podule/greyhawk.cpp +++ b/src/devices/bus/archimedes/podule/greyhawk.cpp @@ -24,7 +24,7 @@ class arc_greyhawk_device : { public: // construction/destruction - arc_greyhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_greyhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE; } @@ -93,7 +93,7 @@ void arc_greyhawk_device::device_add_mconfig(machine_config &config) // arc_greyhawk_device - constructor //------------------------------------------------- -arc_greyhawk_device::arc_greyhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_greyhawk_device::arc_greyhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_GREYHAWK, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/ide_be.cpp b/src/devices/bus/archimedes/podule/ide_be.cpp index 622b62a7cf1..af59cfa0992 100644 --- a/src/devices/bus/archimedes/podule/ide_be.cpp +++ b/src/devices/bus/archimedes/podule/ide_be.cpp @@ -23,7 +23,7 @@ class arc_ide_be_device : { public: // construction/destruction - arc_ide_be_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_ide_be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -93,7 +93,7 @@ void arc_ide_be_device::device_add_mconfig(machine_config &config) // arc_ide_be_device - constructor //------------------------------------------------- -arc_ide_be_device::arc_ide_be_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_ide_be_device::arc_ide_be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_IDE_BE, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/ide_rdev.cpp b/src/devices/bus/archimedes/podule/ide_rdev.cpp index ccf48d24e51..05c919fa0ac 100644 --- a/src/devices/bus/archimedes/podule/ide_rdev.cpp +++ b/src/devices/bus/archimedes/podule/ide_rdev.cpp @@ -21,7 +21,7 @@ class arc_ide_rdev_device : { public: // construction/destruction - arc_ide_rdev_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_ide_rdev_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -85,7 +85,7 @@ void arc_ide_rdev_device::device_add_mconfig(machine_config &config) // arc_ide_rdev_device - constructor //------------------------------------------------- -arc_ide_rdev_device::arc_ide_rdev_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_ide_rdev_device::arc_ide_rdev_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_IDE_RDEV, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/io.cpp b/src/devices/bus/archimedes/podule/io.cpp index 698cf94114b..5b1f43b2f90 100644 --- a/src/devices/bus/archimedes/podule/io.cpp +++ b/src/devices/bus/archimedes/podule/io.cpp @@ -42,7 +42,7 @@ class arc_io_aka_device : public device_archimedes_podule_interface { protected: - arc_io_aka_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + arc_io_aka_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -74,7 +74,7 @@ class arc_bbcio_aka10_device : public arc_io_aka_device { public: // construction/destruction - arc_bbcio_aka10_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_bbcio_aka10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -93,7 +93,7 @@ class arc_upmidi_aka12_device : public arc_io_aka_device { public: // construction/destruction - arc_upmidi_aka12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_upmidi_aka12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -111,7 +111,7 @@ class arc_iomidi_aka15_device : public arc_io_aka_device { public: // construction/destruction - arc_iomidi_aka15_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_iomidi_aka15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -130,7 +130,7 @@ class arc_midi_aka16_device : public arc_io_aka_device { public: // construction/destruction - arc_midi_aka16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_midi_aka16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -284,7 +284,7 @@ void arc_io_aka_device::add_1mhzbus(machine_config &config) void arc_io_aka_device::add_midi_6850(machine_config &config) { - acia6850_device &acia(ACIA6850(config, "acia", 0)); + acia6850_device &acia(ACIA6850(config, "acia")); acia.irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<3>)); acia.txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); @@ -355,7 +355,7 @@ void arc_midi_aka16_device::device_add_mconfig(machine_config &config) // arc_io_aka_device - constructor //------------------------------------------------- -arc_io_aka_device::arc_io_aka_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +arc_io_aka_device::arc_io_aka_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") @@ -366,22 +366,22 @@ arc_io_aka_device::arc_io_aka_device(const machine_config &mconfig, device_type { } -arc_bbcio_aka10_device::arc_bbcio_aka10_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_bbcio_aka10_device::arc_bbcio_aka10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_io_aka_device(mconfig, ARC_BBCIO_AKA10, tag, owner, clock) { } -arc_upmidi_aka12_device::arc_upmidi_aka12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_upmidi_aka12_device::arc_upmidi_aka12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_io_aka_device(mconfig, ARC_UPMIDI_AKA12, tag, owner, clock) { } -arc_iomidi_aka15_device::arc_iomidi_aka15_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_iomidi_aka15_device::arc_iomidi_aka15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_io_aka_device(mconfig, ARC_IOMIDI_AKA15, tag, owner, clock) { } -arc_midi_aka16_device::arc_midi_aka16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_midi_aka16_device::arc_midi_aka16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_io_aka_device(mconfig, ARC_MIDI_AKA16, tag, owner, clock) { } diff --git a/src/devices/bus/archimedes/podule/io_hccs.cpp b/src/devices/bus/archimedes/podule/io_hccs.cpp index 16c73b22b7d..3f4ae014259 100644 --- a/src/devices/bus/archimedes/podule/io_hccs.cpp +++ b/src/devices/bus/archimedes/podule/io_hccs.cpp @@ -26,7 +26,7 @@ class arc_upa_hccs_device : { public: // construction/destruction - arc_upa_hccs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_upa_hccs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -106,7 +106,7 @@ void arc_upa_hccs_device::device_add_mconfig(machine_config &config) // arc_upa_hccs_device - constructor //------------------------------------------------- -arc_upa_hccs_device::arc_upa_hccs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_upa_hccs_device::arc_upa_hccs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_UPA_HCCS, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/io_morley.cpp b/src/devices/bus/archimedes/podule/io_morley.cpp index 3e6bccc755b..b30a11c4fc3 100644 --- a/src/devices/bus/archimedes/podule/io_morley.cpp +++ b/src/devices/bus/archimedes/podule/io_morley.cpp @@ -36,7 +36,7 @@ class arc_io_morley_device : public device_archimedes_podule_interface { protected: - arc_io_morley_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + arc_io_morley_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -63,7 +63,7 @@ class arc_bbcio_aga30_device : public arc_io_morley_device { public: // construction/destruction - arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -82,7 +82,7 @@ class arc_ua_morley_device : public arc_io_morley_device { public: // construction/destruction - arc_ua_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_ua_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -101,7 +101,7 @@ class arc_uma_morley_device : public arc_io_morley_device { public: // construction/destruction - arc_uma_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_uma_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -266,7 +266,7 @@ void arc_uma_morley_device::device_add_mconfig(machine_config &config) // arc_io_morley_device - constructor //------------------------------------------------- -arc_io_morley_device::arc_io_morley_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +arc_io_morley_device::arc_io_morley_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") @@ -276,17 +276,17 @@ arc_io_morley_device::arc_io_morley_device(const machine_config &mconfig, device { } -arc_bbcio_aga30_device::arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_bbcio_aga30_device::arc_bbcio_aga30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_io_morley_device(mconfig, ARC_BBCIO_AGA30, tag, owner, clock) { } -arc_ua_morley_device::arc_ua_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_ua_morley_device::arc_ua_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_io_morley_device(mconfig, ARC_UA_MORLEY, tag, owner, clock) { } -arc_uma_morley_device::arc_uma_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_uma_morley_device::arc_uma_morley_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_io_morley_device(mconfig, ARC_UMA_MORLEY, tag, owner, clock) { } diff --git a/src/devices/bus/archimedes/podule/io_we.cpp b/src/devices/bus/archimedes/podule/io_we.cpp index 40d5092d824..20e18398f64 100644 --- a/src/devices/bus/archimedes/podule/io_we.cpp +++ b/src/devices/bus/archimedes/podule/io_we.cpp @@ -27,7 +27,7 @@ class arc_bbcio_we_device : { public: // construction/destruction - arc_bbcio_we_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_bbcio_we_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -129,7 +129,7 @@ void arc_bbcio_we_device::device_add_mconfig(machine_config &config) // arc_bbcio_we_device - constructor //------------------------------------------------- -arc_bbcio_we_device::arc_bbcio_we_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_bbcio_we_device::arc_bbcio_we_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_BBCIO_WE, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/lark.cpp b/src/devices/bus/archimedes/podule/lark.cpp index 54bfa5cd480..7d48f7d8b1a 100644 --- a/src/devices/bus/archimedes/podule/lark.cpp +++ b/src/devices/bus/archimedes/podule/lark.cpp @@ -25,7 +25,7 @@ class arc_lark_device : { public: // construction/destruction - arc_lark_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_lark_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE; } @@ -122,7 +122,7 @@ const tiny_rom_entry *arc_lark_device::device_rom_region() const void arc_lark_device::device_add_mconfig(machine_config &config) { - AD1848(config, m_ad1848, 0); + AD1848(config, m_ad1848); //m_ad1848->irq().set([this](int state) { set_irq(IRQ_AD1848, state); }); // not used/connected? m_ad1848->drq().set(FUNC(arc_lark_device::playback_drq)); @@ -152,7 +152,7 @@ void arc_lark_device::device_add_mconfig(machine_config &config) // arc_lark_device - constructor //------------------------------------------------- -arc_lark_device::arc_lark_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_lark_device::arc_lark_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_LARK, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/laserd.cpp b/src/devices/bus/archimedes/podule/laserd.cpp index eb688f3735f..b839a8236b7 100644 --- a/src/devices/bus/archimedes/podule/laserd.cpp +++ b/src/devices/bus/archimedes/podule/laserd.cpp @@ -27,7 +27,7 @@ public: static constexpr feature_type unemulated_features() { return feature::PRINTER; } protected: - arc_laserd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + arc_laserd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class arc_lbp4_device : public arc_laserd_device { public: // construction/destruction - arc_lbp4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_lbp4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -125,7 +125,7 @@ void arc_laserd_device::device_add_mconfig(machine_config &config) // arc_laserd_device - constructor //------------------------------------------------- -arc_laserd_device::arc_laserd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +arc_laserd_device::arc_laserd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") @@ -133,7 +133,7 @@ arc_laserd_device::arc_laserd_device(const machine_config &mconfig, device_type { } -arc_lbp4_device::arc_lbp4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_lbp4_device::arc_lbp4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_laserd_device(mconfig, ARC_LBP4, tag, owner, clock) { } diff --git a/src/devices/bus/archimedes/podule/midi_emr.cpp b/src/devices/bus/archimedes/podule/midi_emr.cpp index 27127471c62..dae373cf72d 100644 --- a/src/devices/bus/archimedes/podule/midi_emr.cpp +++ b/src/devices/bus/archimedes/podule/midi_emr.cpp @@ -25,7 +25,7 @@ class arc_midi2_emr_device : { public: // construction/destruction - arc_midi2_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_midi2_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -54,7 +54,7 @@ class arc_midi4_emr_device : { public: // construction/destruction - arc_midi4_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_midi4_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -159,7 +159,7 @@ void arc_midi4_emr_device::device_add_mconfig(machine_config &config) // arc_midi_emr_device - constructor //------------------------------------------------- -arc_midi2_emr_device::arc_midi2_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_midi2_emr_device::arc_midi2_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_MIDI2_EMR, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") @@ -167,7 +167,7 @@ arc_midi2_emr_device::arc_midi2_emr_device(const machine_config &mconfig, const { } -arc_midi4_emr_device::arc_midi4_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_midi4_emr_device::arc_midi4_emr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_MIDI4_EMR, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) { diff --git a/src/devices/bus/archimedes/podule/midimax.cpp b/src/devices/bus/archimedes/podule/midimax.cpp index b8a43a2bfae..ff13269009d 100644 --- a/src/devices/bus/archimedes/podule/midimax.cpp +++ b/src/devices/bus/archimedes/podule/midimax.cpp @@ -24,10 +24,10 @@ class arc_midimax_device : { public: // construction/destruction - arc_midimax_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_midimax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - arc_midimax_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + arc_midimax_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class arc_midimax2_device : public arc_midimax_device { public: // construction/destruction - arc_midimax2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_midimax2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -127,7 +127,7 @@ void arc_midimax_device::device_add_mconfig(machine_config &config) // arc_midimax_device - constructor //------------------------------------------------- -arc_midimax_device::arc_midimax_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +arc_midimax_device::arc_midimax_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") @@ -135,12 +135,12 @@ arc_midimax_device::arc_midimax_device(const machine_config &mconfig, device_typ { } -arc_midimax_device::arc_midimax_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_midimax_device::arc_midimax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_midimax_device(mconfig, ARC_MIDIMAX, tag, owner, clock) { } -arc_midimax2_device::arc_midimax2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_midimax2_device::arc_midimax2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_midimax_device(mconfig, ARC_MIDIMAX2, tag, owner, clock) { } diff --git a/src/devices/bus/archimedes/podule/nexus.cpp b/src/devices/bus/archimedes/podule/nexus.cpp index 9ab8dd63d46..760afb528b7 100644 --- a/src/devices/bus/archimedes/podule/nexus.cpp +++ b/src/devices/bus/archimedes/podule/nexus.cpp @@ -21,7 +21,7 @@ class arc_nexus_device : { public: // construction/destruction - arc_nexus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_nexus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::COMMS; } @@ -90,7 +90,7 @@ void arc_nexus_device::device_add_mconfig(machine_config &config) // arc_nexus_device - constructor //------------------------------------------------- -arc_nexus_device::arc_nexus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_nexus_device::arc_nexus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_NEXUS_A500, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/rom.cpp b/src/devices/bus/archimedes/podule/rom.cpp index be073229e5e..44510e62547 100644 --- a/src/devices/bus/archimedes/podule/rom.cpp +++ b/src/devices/bus/archimedes/podule/rom.cpp @@ -25,7 +25,7 @@ class arc_rom_aka05_device : { public: // construction/destruction - arc_rom_aka05_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_rom_aka05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::ROM; } @@ -112,7 +112,7 @@ void arc_rom_aka05_device::device_add_mconfig(machine_config &config) // arc_rom_aka05_device - constructor //------------------------------------------------- -arc_rom_aka05_device::arc_rom_aka05_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_rom_aka05_device::arc_rom_aka05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_ROM_AKA05, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/rs423.cpp b/src/devices/bus/archimedes/podule/rs423.cpp index d3f20c03edf..78a91e711a1 100644 --- a/src/devices/bus/archimedes/podule/rs423.cpp +++ b/src/devices/bus/archimedes/podule/rs423.cpp @@ -26,7 +26,7 @@ class arc_rs423_device : { public: // construction/destruction - arc_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -99,7 +99,7 @@ void arc_rs423_device::device_add_mconfig(machine_config &config) // arc_rs423_device - constructor //------------------------------------------------- -arc_rs423_device::arc_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_rs423_device::arc_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_RS423, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/scan256.cpp b/src/devices/bus/archimedes/podule/scan256.cpp index 8666084c04b..b8454035e4a 100644 --- a/src/devices/bus/archimedes/podule/scan256.cpp +++ b/src/devices/bus/archimedes/podule/scan256.cpp @@ -24,7 +24,7 @@ class arc_scan256_device : { public: // construction/destruction - arc_scan256_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_scan256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE; } @@ -88,7 +88,7 @@ void arc_scan256_device::device_add_mconfig(machine_config &config) // arc_scan256_device - constructor //------------------------------------------------- -arc_scan256_device::arc_scan256_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_scan256_device::arc_scan256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_SCAN256, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/scanlight.cpp b/src/devices/bus/archimedes/podule/scanlight.cpp index 7e22683032f..348610d6383 100644 --- a/src/devices/bus/archimedes/podule/scanlight.cpp +++ b/src/devices/bus/archimedes/podule/scanlight.cpp @@ -36,12 +36,12 @@ class arc_scanlight_device : { public: // construction/destruction - arc_scanlight_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_scanlight_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE; } protected: - arc_scanlight_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + arc_scanlight_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -68,7 +68,7 @@ class arc_scanjunior_device : public arc_scanlight_device { public: // construction/destruction - arc_scanjunior_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_scanjunior_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -82,7 +82,7 @@ class arc_scanjunior3_device : public arc_scanlight_device { public: // construction/destruction - arc_scanjunior3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_scanjunior3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -96,7 +96,7 @@ class arc_scanvideo_device : public arc_scanlight_device { public: // construction/destruction - arc_scanvideo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_scanvideo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -199,7 +199,7 @@ void arc_scanvideo_device::device_add_mconfig(machine_config &config) // arc_scanlight_device - constructor //------------------------------------------------- -arc_scanlight_device::arc_scanlight_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +arc_scanlight_device::arc_scanlight_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") @@ -208,22 +208,22 @@ arc_scanlight_device::arc_scanlight_device(const machine_config &mconfig, device { } -arc_scanlight_device::arc_scanlight_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_scanlight_device::arc_scanlight_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_scanlight_device(mconfig, ARC_SCANLIGHT, tag, owner, clock) { } -arc_scanjunior_device::arc_scanjunior_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_scanjunior_device::arc_scanjunior_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_scanlight_device(mconfig, ARC_SCANJUNIOR, tag, owner, clock) { } -arc_scanjunior3_device::arc_scanjunior3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_scanjunior3_device::arc_scanjunior3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_scanlight_device(mconfig, ARC_SCANJUNIOR3, tag, owner, clock) { } -arc_scanvideo_device::arc_scanvideo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_scanvideo_device::arc_scanvideo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arc_scanlight_device(mconfig, ARC_SCANVIDEO, tag, owner, clock) , m_avivideo(*this, "srcavi") { diff --git a/src/devices/bus/archimedes/podule/scsi_vti.cpp b/src/devices/bus/archimedes/podule/scsi_vti.cpp index f0239dfeeb0..85b2ee04d70 100644 --- a/src/devices/bus/archimedes/podule/scsi_vti.cpp +++ b/src/devices/bus/archimedes/podule/scsi_vti.cpp @@ -29,7 +29,7 @@ class arc_scsi_vti_device : { public: // construction/destruction - arc_scsi_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_scsi_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::DISK; } @@ -133,7 +133,7 @@ void arc_scsi_vti_device::device_add_mconfig(machine_config &config) // arc_scsi_vti_device - constructor //------------------------------------------------- -arc_scsi_vti_device::arc_scsi_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_scsi_vti_device::arc_scsi_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_SCSI_VTI, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_fas216(*this, "scsi:7:fas216") diff --git a/src/devices/bus/archimedes/podule/serial.cpp b/src/devices/bus/archimedes/podule/serial.cpp index dff0fa826f9..a195607ac3f 100644 --- a/src/devices/bus/archimedes/podule/serial.cpp +++ b/src/devices/bus/archimedes/podule/serial.cpp @@ -24,7 +24,7 @@ class arc_serial_device : { public: // construction/destruction - arc_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -119,7 +119,7 @@ void arc_serial_device::device_add_mconfig(machine_config &config) // arc_serial_device - constructor //------------------------------------------------- -arc_serial_device::arc_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_serial_device::arc_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_SERIAL, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/slot.cpp b/src/devices/bus/archimedes/podule/slot.cpp index 75498df27a9..b783b7e0622 100644 --- a/src/devices/bus/archimedes/podule/slot.cpp +++ b/src/devices/bus/archimedes/podule/slot.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(ARCHIMEDES_PODULE_SLOT, archimedes_podule_slot_device, "archi //------------------------------------------------- // archimedes_podule_slot_device - constructor //------------------------------------------------- -archimedes_podule_slot_device::archimedes_podule_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +archimedes_podule_slot_device::archimedes_podule_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARCHIMEDES_PODULE_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_exp(*this, finder_base::DUMMY_TAG) @@ -63,7 +63,7 @@ DEFINE_DEVICE_TYPE(ARCHIMEDES_EXPANSION_BUS, archimedes_exp_device, "archimedes_ // archimedes_exp_device - constructor //------------------------------------------------- -archimedes_exp_device::archimedes_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +archimedes_exp_device::archimedes_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARCHIMEDES_EXPANSION_BUS, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_ioc_config("podule_ioc", ENDIANNESS_LITTLE, 32, 16, 0, address_map_constructor(FUNC(archimedes_exp_device::ioc_map), this)) diff --git a/src/devices/bus/archimedes/podule/slot.h b/src/devices/bus/archimedes/podule/slot.h index eca2c54865f..56e7258ab10 100644 --- a/src/devices/bus/archimedes/podule/slot.h +++ b/src/devices/bus/archimedes/podule/slot.h @@ -41,7 +41,7 @@ public: set_fixed(false); m_exp.set_tag(std::forward(bus_tag)); } - archimedes_podule_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + archimedes_podule_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -63,7 +63,7 @@ class archimedes_exp_device : public device_t, { public: // construction/destruction - archimedes_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + archimedes_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration auto out_irq_callback() { return m_out_pirq_cb.bind(); } diff --git a/src/devices/bus/archimedes/podule/spectra.cpp b/src/devices/bus/archimedes/podule/spectra.cpp index 6c144dbebf7..5718860f229 100644 --- a/src/devices/bus/archimedes/podule/spectra.cpp +++ b/src/devices/bus/archimedes/podule/spectra.cpp @@ -24,7 +24,7 @@ class arc_spectra_device : { public: // construction/destruction - arc_spectra_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_spectra_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CAPTURE; } @@ -88,7 +88,7 @@ void arc_spectra_device::device_add_mconfig(machine_config &config) // arc_spectra_device - constructor //------------------------------------------------- -arc_spectra_device::arc_spectra_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_spectra_device::arc_spectra_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_SPECTRA, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) , m_podule_rom(*this, "podule_rom") diff --git a/src/devices/bus/archimedes/podule/tube.cpp b/src/devices/bus/archimedes/podule/tube.cpp index 84d699b4bc2..3ea106bc346 100644 --- a/src/devices/bus/archimedes/podule/tube.cpp +++ b/src/devices/bus/archimedes/podule/tube.cpp @@ -22,7 +22,7 @@ class arc_tube_device : { public: // construction/destruction - arc_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arc_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -62,7 +62,7 @@ void arc_tube_device::device_add_mconfig(machine_config &config) // arc_tube_device - constructor //------------------------------------------------- -arc_tube_device::arc_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arc_tube_device::arc_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARC_TUBE, tag, owner, clock) , device_archimedes_podule_interface(mconfig, *this) { diff --git a/src/devices/bus/astrocde/accessory.cpp b/src/devices/bus/astrocde/accessory.cpp index fb047e660d8..b54e0e85527 100644 --- a/src/devices/bus/astrocde/accessory.cpp +++ b/src/devices/bus/astrocde/accessory.cpp @@ -47,7 +47,7 @@ void device_astrocade_accessory_interface::interface_pre_start() // Bally Astrocade accessory port //************************************************************************** -astrocade_accessory_port_device::astrocade_accessory_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +astrocade_accessory_port_device::astrocade_accessory_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_ACCESSORY_PORT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_ltpen(0) diff --git a/src/devices/bus/astrocde/accessory.h b/src/devices/bus/astrocde/accessory.h index 5386cd1362a..f8e2a44074b 100644 --- a/src/devices/bus/astrocde/accessory.h +++ b/src/devices/bus/astrocde/accessory.h @@ -27,7 +27,7 @@ public: // construction/destruction template astrocade_accessory_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&screen_tag, U &&opts, char const *dflt) - : astrocade_accessory_port_device(mconfig, tag, owner, 0U) + : astrocade_accessory_port_device(mconfig, tag, owner) { m_screen.set_tag(std::forward(screen_tag)); option_reset(); @@ -35,7 +35,7 @@ public: set_default_option(dflt); set_fixed(false); } - astrocade_accessory_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + astrocade_accessory_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~astrocade_accessory_port_device(); auto ltpen_handler() { return m_ltpen_handler.bind(); } diff --git a/src/devices/bus/astrocde/cassette.cpp b/src/devices/bus/astrocde/cassette.cpp index 3e4cc80deb8..5e92dedcaad 100644 --- a/src/devices/bus/astrocde/cassette.cpp +++ b/src/devices/bus/astrocde/cassette.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(ASTROCADE_CASSETTE, astrocade_cassette_device, "astrocade_cas // Bally Astrocade cassette input //************************************************************************** -astrocade_cassette_device::astrocade_cassette_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +astrocade_cassette_device::astrocade_cassette_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_CASSETTE, tag, owner, clock) , device_astrocade_ctrl_interface(mconfig, *this) , m_cassette(*this, "cassette") diff --git a/src/devices/bus/astrocde/cassette.h b/src/devices/bus/astrocde/cassette.h index d36e8a1bfd7..a6fb81a64bf 100644 --- a/src/devices/bus/astrocde/cassette.h +++ b/src/devices/bus/astrocde/cassette.h @@ -25,7 +25,7 @@ public: static constexpr feature_type imperfect_features() { return feature::TAPE; } // construction/destruction - astrocade_cassette_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + astrocade_cassette_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~astrocade_cassette_device(); // device_astrocade_ctrl_interface implementation diff --git a/src/devices/bus/astrocde/ctrl.cpp b/src/devices/bus/astrocde/ctrl.cpp index b33c8aebb49..fb98284bace 100644 --- a/src/devices/bus/astrocde/ctrl.cpp +++ b/src/devices/bus/astrocde/ctrl.cpp @@ -56,7 +56,7 @@ WRITE_LINE_MEMBER( device_astrocade_ctrl_interface::write_ltpen ) // Bally Astrocade controller port //************************************************************************** -astrocade_ctrl_port_device::astrocade_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +astrocade_ctrl_port_device::astrocade_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_CTRL_PORT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_ltpen(0) diff --git a/src/devices/bus/astrocde/ctrl.h b/src/devices/bus/astrocde/ctrl.h index 0273b4a80fd..c32d9eb8bb7 100644 --- a/src/devices/bus/astrocde/ctrl.h +++ b/src/devices/bus/astrocde/ctrl.h @@ -51,14 +51,14 @@ public: // construction/destruction template astrocade_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : astrocade_ctrl_port_device(mconfig, tag, owner, 0U) + : astrocade_ctrl_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - astrocade_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + astrocade_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~astrocade_ctrl_port_device(); auto ltpen_handler() { return m_ltpen_handler.bind(); } diff --git a/src/devices/bus/astrocde/exp.cpp b/src/devices/bus/astrocde/exp.cpp index a33259380f1..0d0ea58cf7b 100644 --- a/src/devices/bus/astrocde/exp.cpp +++ b/src/devices/bus/astrocde/exp.cpp @@ -35,7 +35,7 @@ device_astrocade_exp_interface::~device_astrocade_exp_interface() //------------------------------------------------- // astrocade_exp_device - constructor //------------------------------------------------- -astrocade_exp_device::astrocade_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +astrocade_exp_device::astrocade_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_EXP_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card_mounted(false), m_card(nullptr) diff --git a/src/devices/bus/astrocde/exp.h b/src/devices/bus/astrocde/exp.h index e2ed2279135..6d8aac21cd0 100644 --- a/src/devices/bus/astrocde/exp.h +++ b/src/devices/bus/astrocde/exp.h @@ -30,14 +30,14 @@ public: // construction/destruction template astrocade_exp_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : astrocade_exp_device(mconfig, tag, owner, (uint32_t)0) + : astrocade_exp_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - astrocade_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~astrocade_exp_device(); // device-level overrides diff --git a/src/devices/bus/astrocde/joy.cpp b/src/devices/bus/astrocde/joy.cpp index cbf75da0c5c..ea034898232 100644 --- a/src/devices/bus/astrocde/joy.cpp +++ b/src/devices/bus/astrocde/joy.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(ASTROCADE_JOY, astrocade_joy_device, "astrocade_joy", "Bally // Bally Astrocade joystick control //************************************************************************** -astrocade_joy_device::astrocade_joy_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +astrocade_joy_device::astrocade_joy_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_JOY, tag, owner, clock) , device_astrocade_ctrl_interface(mconfig, *this) , m_handle(*this, "HANDLE") diff --git a/src/devices/bus/astrocde/joy.h b/src/devices/bus/astrocde/joy.h index bb8f755c845..dbbf3353fd5 100644 --- a/src/devices/bus/astrocde/joy.h +++ b/src/devices/bus/astrocde/joy.h @@ -18,7 +18,7 @@ class astrocade_joy_device : public device_t, { public: // construction/destruction - astrocade_joy_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + astrocade_joy_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~astrocade_joy_device(); // device_astrocade_ctrl_interface implementation diff --git a/src/devices/bus/astrocde/lightpen.cpp b/src/devices/bus/astrocde/lightpen.cpp index 40a7ec415de..1d9d81b7d4e 100644 --- a/src/devices/bus/astrocde/lightpen.cpp +++ b/src/devices/bus/astrocde/lightpen.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(ASTROCADE_LIGHTPEN, astrocade_lightpen_device, "astrocade_lig // Bally Astrocade light pen input //************************************************************************** -astrocade_lightpen_device::astrocade_lightpen_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +astrocade_lightpen_device::astrocade_lightpen_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_LIGHTPEN, tag, owner, clock) , device_astrocade_accessory_interface(mconfig, *this) , m_trigger(*this, "TRIGGER") diff --git a/src/devices/bus/astrocde/lightpen.h b/src/devices/bus/astrocde/lightpen.h index dd75c807443..49991a2574d 100644 --- a/src/devices/bus/astrocde/lightpen.h +++ b/src/devices/bus/astrocde/lightpen.h @@ -19,7 +19,7 @@ class astrocade_lightpen_device : public device_t, { public: // construction/destruction - astrocade_lightpen_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + astrocade_lightpen_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~astrocade_lightpen_device(); DECLARE_INPUT_CHANGED_MEMBER(trigger); diff --git a/src/devices/bus/astrocde/ram.cpp b/src/devices/bus/astrocde/ram.cpp index 39eb299d8f6..d8fde36cc92 100644 --- a/src/devices/bus/astrocde/ram.cpp +++ b/src/devices/bus/astrocde/ram.cpp @@ -68,7 +68,7 @@ DEFINE_DEVICE_TYPE(ASTROCADE_WHITERAM, astrocade_whiteram_device, "astroca DEFINE_DEVICE_TYPE(ASTROCADE_RL64RAM, astrocade_rl64ram_device, "astrocade_rl64", "Bally Astrocade R&L RAM 64K") -astrocade_blueram_4k_device::astrocade_blueram_4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +astrocade_blueram_4k_device::astrocade_blueram_4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_astrocade_exp_interface(mconfig, *this) , m_write_prot(*this, "RAM_PROTECT") @@ -77,36 +77,36 @@ astrocade_blueram_4k_device::astrocade_blueram_4k_device(const machine_config &m { } -astrocade_blueram_4k_device::astrocade_blueram_4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_blueram_4k_device::astrocade_blueram_4k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : astrocade_blueram_4k_device(mconfig, ASTROCADE_BLUERAM_4K, tag, owner, clock) { } -astrocade_blueram_16k_device::astrocade_blueram_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_blueram_16k_device::astrocade_blueram_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : astrocade_blueram_4k_device(mconfig, ASTROCADE_BLUERAM_16K, tag, owner, clock) { } -astrocade_blueram_32k_device::astrocade_blueram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_blueram_32k_device::astrocade_blueram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : astrocade_blueram_4k_device(mconfig, ASTROCADE_BLUERAM_32K, tag, owner, clock) { } -astrocade_viper_sys1_device::astrocade_viper_sys1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_viper_sys1_device::astrocade_viper_sys1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_VIPER_SYS1, tag, owner, clock) , device_astrocade_exp_interface(mconfig, *this) , m_write_prot(*this, "RAM_PROTECT") { } -astrocade_whiteram_device::astrocade_whiteram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_whiteram_device::astrocade_whiteram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_WHITERAM, tag, owner, clock) , device_astrocade_exp_interface(mconfig, *this) , m_write_prot(*this, "RAM_PROTECT") { } -astrocade_rl64ram_device::astrocade_rl64ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_rl64ram_device::astrocade_rl64ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_RL64RAM, tag, owner, clock) , device_astrocade_exp_interface(mconfig, *this) , m_write_prot(*this, "RAM_PROTECT") diff --git a/src/devices/bus/astrocde/ram.h b/src/devices/bus/astrocde/ram.h index 22e6e3bd590..21e9d10c857 100644 --- a/src/devices/bus/astrocde/ram.h +++ b/src/devices/bus/astrocde/ram.h @@ -16,7 +16,7 @@ class astrocade_blueram_4k_device : public device_t, public device_astrocade_exp { public: // construction/destruction - astrocade_blueram_4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_blueram_4k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -33,7 +33,7 @@ public: void portb_w(uint8_t data); protected: - astrocade_blueram_4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + astrocade_blueram_4k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override { m_ram.resize(0x1000); save_item(NAME(m_ram)); } virtual void device_reset() override { } @@ -51,7 +51,7 @@ class astrocade_blueram_16k_device : public astrocade_blueram_4k_device { public: // construction/destruction - astrocade_blueram_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_blueram_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override { m_ram.resize(0x4000); save_item(NAME(m_ram)); } }; @@ -62,7 +62,7 @@ class astrocade_blueram_32k_device : public astrocade_blueram_4k_device { public: // construction/destruction - astrocade_blueram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_blueram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override { m_ram.resize(0x8000); save_item(NAME(m_ram)); } }; @@ -73,7 +73,7 @@ class astrocade_viper_sys1_device : public device_t, public device_astrocade_exp { public: // construction/destruction - astrocade_viper_sys1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_viper_sys1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -97,7 +97,7 @@ class astrocade_whiteram_device : public device_t, public device_astrocade_exp_i { public: // construction/destruction - astrocade_whiteram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_whiteram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -121,7 +121,7 @@ class astrocade_rl64ram_device : public device_t, public device_astrocade_exp_in { public: // construction/destruction - astrocade_rl64ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_rl64ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/astrocde/rom.cpp b/src/devices/bus/astrocde/rom.cpp index e574c63ecd7..4fd04ead658 100644 --- a/src/devices/bus/astrocde/rom.cpp +++ b/src/devices/bus/astrocde/rom.cpp @@ -23,27 +23,27 @@ DEFINE_DEVICE_TYPE(ASTROCADE_ROM_512K, astrocade_rom_512k_device, "astrocade_rom DEFINE_DEVICE_TYPE(ASTROCADE_ROM_CASS, astrocade_rom_cass_device, "astrocade_rom_cass", "Bally Astrocade AstroBASIC Cart") -astrocade_rom_device::astrocade_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +astrocade_rom_device::astrocade_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_astrocade_cart_interface(mconfig, *this) { } -astrocade_rom_device::astrocade_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_rom_device::astrocade_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : astrocade_rom_device(mconfig, ASTROCADE_ROM_STD, tag, owner, clock) { } -astrocade_rom_256k_device::astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_rom_256k_device::astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : astrocade_rom_device(mconfig, ASTROCADE_ROM_256K, tag, owner, clock), m_base_bank(0) { } -astrocade_rom_512k_device::astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_rom_512k_device::astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : astrocade_rom_device(mconfig, ASTROCADE_ROM_512K, tag, owner, clock), m_base_bank(0) { } -astrocade_rom_cass_device::astrocade_rom_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_rom_cass_device::astrocade_rom_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : astrocade_rom_device(mconfig, ASTROCADE_ROM_CASS, tag, owner, clock) , m_cassette(*this, "cassette") { diff --git a/src/devices/bus/astrocde/rom.h b/src/devices/bus/astrocde/rom.h index 8a8db1634de..8c88248ef8d 100644 --- a/src/devices/bus/astrocde/rom.h +++ b/src/devices/bus/astrocde/rom.h @@ -16,13 +16,13 @@ class astrocade_rom_device : public device_t, { public: // construction/destruction - astrocade_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; protected: - astrocade_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + astrocade_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -35,7 +35,7 @@ class astrocade_rom_256k_device : public astrocade_rom_device { public: // construction/destruction - astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_rom_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; @@ -53,7 +53,7 @@ class astrocade_rom_512k_device : public astrocade_rom_device { public: // construction/destruction - astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_rom_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; @@ -71,7 +71,7 @@ class astrocade_rom_cass_device : public astrocade_rom_device { public: // construction/destruction - astrocade_rom_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_rom_cass_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; diff --git a/src/devices/bus/astrocde/slot.cpp b/src/devices/bus/astrocde/slot.cpp index 6581dee5d01..06b2d961d15 100644 --- a/src/devices/bus/astrocde/slot.cpp +++ b/src/devices/bus/astrocde/slot.cpp @@ -61,7 +61,7 @@ void device_astrocade_cart_interface::rom_alloc(uint32_t size) //------------------------------------------------- // astrocade_cart_slot_device - constructor //------------------------------------------------- -astrocade_cart_slot_device::astrocade_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +astrocade_cart_slot_device::astrocade_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/astrocde/slot.h b/src/devices/bus/astrocde/slot.h index 49242f2c31d..6d0bf86a9b1 100644 --- a/src/devices/bus/astrocde/slot.h +++ b/src/devices/bus/astrocde/slot.h @@ -56,14 +56,14 @@ public: // construction/destruction template astrocade_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : astrocade_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : astrocade_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - astrocade_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + astrocade_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~astrocade_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/ata/atadev.cpp b/src/devices/bus/ata/atadev.cpp index d4e3e3cd3fa..3e37d12bcef 100644 --- a/src/devices/bus/ata/atadev.cpp +++ b/src/devices/bus/ata/atadev.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(ATA_SLOT, ata_slot_device, "ata_slot", "ATA Connector") // ata_slot_device - constructor //------------------------------------------------- -ata_slot_device::ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ata_slot_device::ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATA_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_dev(nullptr) diff --git a/src/devices/bus/ata/atadev.h b/src/devices/bus/ata/atadev.h index 41832a8d22a..43164d7de7f 100644 --- a/src/devices/bus/ata/atadev.h +++ b/src/devices/bus/ata/atadev.h @@ -51,7 +51,7 @@ class ata_slot_device : public device_t, { public: // construction/destruction - ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); device_ata_interface *dev() { return m_dev; } diff --git a/src/devices/bus/ata/atahle.cpp b/src/devices/bus/ata/atahle.cpp index 0ba22e2773b..a2f8de9b6a9 100644 --- a/src/devices/bus/ata/atahle.cpp +++ b/src/devices/bus/ata/atahle.cpp @@ -40,7 +40,7 @@ enum #define DEVICE1_PDIAG_TIME (attotime::from_msec(2)) #define DIAGNOSTIC_TIME (attotime::from_msec(2)) -ata_hle_device::ata_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ata_hle_device::ata_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_ata_interface(mconfig, *this), m_buffer_offset(0), diff --git a/src/devices/bus/ata/atahle.h b/src/devices/bus/ata/atahle.h index 5fcfa90c478..56cefd3b106 100644 --- a/src/devices/bus/ata/atahle.h +++ b/src/devices/bus/ata/atahle.h @@ -31,7 +31,7 @@ public: virtual DECLARE_WRITE_LINE_MEMBER(write_pdiag) override; protected: - ata_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ata_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/ata/ataintf.cpp b/src/devices/bus/ata/ataintf.cpp index d2a09e7a689..ff95998925a 100644 --- a/src/devices/bus/ata/ataintf.cpp +++ b/src/devices/bus/ata/ataintf.cpp @@ -206,7 +206,7 @@ WRITE_LINE_MEMBER( abstract_ata_interface_device::write_dmack ) elem->dev()->write_dmack(state); } -abstract_ata_interface_device::abstract_ata_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +abstract_ata_interface_device::abstract_ata_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_slot(*this, "%u", 0U), m_irq_handler(*this), @@ -218,7 +218,7 @@ abstract_ata_interface_device::abstract_ata_interface_device(const machine_confi DEFINE_DEVICE_TYPE(ATA_INTERFACE, ata_interface_device, "ata_interface", "ATA Interface") -ata_interface_device::ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ata_interface_device::ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : abstract_ata_interface_device(mconfig, ATA_INTERFACE, tag, owner, clock) { } diff --git a/src/devices/bus/ata/ataintf.h b/src/devices/bus/ata/ataintf.h index 8fef178553d..7259b5df73a 100644 --- a/src/devices/bus/ata/ataintf.h +++ b/src/devices/bus/ata/ataintf.h @@ -62,7 +62,7 @@ public: DECLARE_WRITE_LINE_MEMBER(write_dmack); protected: - abstract_ata_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + abstract_ata_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint16_t internal_read_cs0(offs_t offset, uint16_t mem_mask = 0xffff); uint16_t internal_read_cs1(offs_t offset, uint16_t mem_mask = 0xffff); @@ -110,7 +110,7 @@ private: class ata_interface_device : public abstract_ata_interface_device { public: - ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ata_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template ata_interface_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false) { diff --git a/src/devices/bus/ata/atapicdr.cpp b/src/devices/bus/ata/atapicdr.cpp index fd3003f58d3..3bc77549578 100644 --- a/src/devices/bus/ata/atapicdr.cpp +++ b/src/devices/bus/ata/atapicdr.cpp @@ -11,18 +11,18 @@ DEFINE_DEVICE_TYPE(ATAPI_CDROM, atapi_cdrom_device, "cdrom", "ATAPI CD-ROM") DEFINE_DEVICE_TYPE(ATAPI_FIXED_CDROM, atapi_fixed_cdrom_device, "cdrom_fixed", "ATAPI fixed CD-ROM") -atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atapi_cdrom_device(mconfig, ATAPI_CDROM, tag, owner, clock) { } -atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : atapi_hle_device(mconfig, type, tag, owner, clock), ultra_dma_mode(0) { } -atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atapi_cdrom_device(mconfig, ATAPI_FIXED_CDROM, tag, owner, clock) { } diff --git a/src/devices/bus/ata/atapicdr.h b/src/devices/bus/ata/atapicdr.h index c2ffbb92fee..65ad5278bab 100644 --- a/src/devices/bus/ata/atapicdr.h +++ b/src/devices/bus/ata/atapicdr.h @@ -19,14 +19,14 @@ class atapi_cdrom_device : public atapi_hle_device, public t10mmc { public: - atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_ultra_dma_mode(uint16_t mode); uint16_t *identify_device_buffer() { return m_identify_buffer; } protected: - atapi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + atapi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -44,7 +44,7 @@ protected: class atapi_fixed_cdrom_device : public atapi_cdrom_device { public: - atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; diff --git a/src/devices/bus/ata/atapihle.cpp b/src/devices/bus/ata/atapihle.cpp index b416cdf1e94..de2b07cb6d0 100644 --- a/src/devices/bus/ata/atapihle.cpp +++ b/src/devices/bus/ata/atapihle.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "atapihle.h" -atapi_hle_device::atapi_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +atapi_hle_device::atapi_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ata_hle_device(mconfig, type, tag, owner, clock), m_packet(0), m_data_size(0) diff --git a/src/devices/bus/ata/atapihle.h b/src/devices/bus/ata/atapihle.h index 8d1bb95eec4..9d091a28d58 100644 --- a/src/devices/bus/ata/atapihle.h +++ b/src/devices/bus/ata/atapihle.h @@ -47,7 +47,7 @@ public: }; protected: - atapi_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + atapi_hle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/ata/cr589.cpp b/src/devices/bus/ata/cr589.cpp index 5905a54bd54..473ba7d64a8 100644 --- a/src/devices/bus/ata/cr589.cpp +++ b/src/devices/bus/ata/cr589.cpp @@ -142,7 +142,7 @@ void matsushita_cr589_device::WriteData( uint8_t *data, int dataLength ) // device type definition DEFINE_DEVICE_TYPE(CR589, matsushita_cr589_device, "cr589", "Matsushita CR589 CD-ROM Drive") -matsushita_cr589_device::matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +matsushita_cr589_device::matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atapi_cdrom_device(mconfig, CR589, tag, owner, clock), device_nvram_interface(mconfig, *this) { diff --git a/src/devices/bus/ata/cr589.h b/src/devices/bus/ata/cr589.h index 9b2f89d172c..fb58b658ae6 100644 --- a/src/devices/bus/ata/cr589.h +++ b/src/devices/bus/ata/cr589.h @@ -19,7 +19,7 @@ class matsushita_cr589_device : public atapi_cdrom_device, public device_nvram_interface { public: - matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + matsushita_cr589_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ExecCommand() override; virtual void WriteData( uint8_t *data, int dataLength ) override; diff --git a/src/devices/bus/ata/gdrom.cpp b/src/devices/bus/ata/gdrom.cpp index 59a7d154d56..a0d2192d369 100644 --- a/src/devices/bus/ata/gdrom.cpp +++ b/src/devices/bus/ata/gdrom.cpp @@ -509,7 +509,7 @@ void gdrom_device::SetDevice(void *device) // device type definition DEFINE_DEVICE_TYPE(GDROM, gdrom_device, "gdrom", "GD-ROM") -gdrom_device::gdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gdrom_device::gdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atapi_cdrom_device(mconfig, GDROM, tag, owner, clock), is_real_gdrom_disc(false) { diff --git a/src/devices/bus/ata/gdrom.h b/src/devices/bus/ata/gdrom.h index 66565e7160b..11c48071eb8 100644 --- a/src/devices/bus/ata/gdrom.h +++ b/src/devices/bus/ata/gdrom.h @@ -16,7 +16,7 @@ class gdrom_device : public atapi_cdrom_device { public: - gdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Sega GD-ROM handler diff --git a/src/devices/bus/ata/idehd.cpp b/src/devices/bus/ata/idehd.cpp index 38ea6c21c6c..080577feffc 100644 --- a/src/devices/bus/ata/idehd.cpp +++ b/src/devices/bus/ata/idehd.cpp @@ -20,7 +20,7 @@ #define TIME_FULL_STROKE_SEEK (attotime::from_usec(13000)) #define TIME_AVERAGE_ROTATIONAL_LATENCY (attotime::from_usec(1300)) -ata_mass_storage_device::ata_mass_storage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ata_mass_storage_device::ata_mass_storage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ata_hle_device(mconfig, type, tag, owner, clock), m_can_identify_device(0), m_num_cylinders(0), @@ -796,12 +796,12 @@ DEFINE_DEVICE_TYPE(IDE_HARDDISK, ide_hdd_device, "idehd", "IDE Hard Disk") // ide_hdd_device - constructor //------------------------------------------------- -ide_hdd_device::ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ide_hdd_device::ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_hdd_device(mconfig, IDE_HARDDISK, tag, owner, clock) { } -ide_hdd_device::ide_hdd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ide_hdd_device::ide_hdd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ata_mass_storage_device(mconfig, type, tag, owner, clock), m_image(*this, "image") { diff --git a/src/devices/bus/ata/idehd.h b/src/devices/bus/ata/idehd.h index 0d7a999a412..eff7653d808 100644 --- a/src/devices/bus/ata/idehd.h +++ b/src/devices/bus/ata/idehd.h @@ -36,7 +36,7 @@ public: void set_dma_transfer_time(const attotime time) { m_dma_transfer_time = time; } protected: - ata_mass_storage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ata_mass_storage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -90,10 +90,10 @@ class ide_hdd_device : public ata_mass_storage_device { public: // construction/destruction - ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - ide_hdd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ide_hdd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/ata/px320a.cpp b/src/devices/bus/ata/px320a.cpp index fabad11e967..ec78f44788a 100644 --- a/src/devices/bus/ata/px320a.cpp +++ b/src/devices/bus/ata/px320a.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(PX320A, px320a_device, "px320a", "PleXCombo PX-320A CD-RW/DVD-ROM Drive") -px320a_device::px320a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +px320a_device::px320a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PX320A, tag, owner, clock) , device_ata_interface(mconfig, *this) , m_frcpu(*this, "frcpu") @@ -75,7 +75,7 @@ void px320a_device::frcpu_map(address_map &map) void px320a_device::device_add_mconfig(machine_config &config) { - MB91F155A(config, m_frcpu, 16'000'000); // FR type guessed; clock unknown + MB91F155A(config, m_frcpu, XTAL::u(16'000'000)); // FR type guessed; clock unknown m_frcpu->set_addrmap(AS_PROGRAM, &px320a_device::frcpu_map); } diff --git a/src/devices/bus/ata/px320a.h b/src/devices/bus/ata/px320a.h index 938fc3a580b..5c872245df4 100644 --- a/src/devices/bus/ata/px320a.h +++ b/src/devices/bus/ata/px320a.h @@ -11,7 +11,7 @@ class px320a_device : public device_t, public device_ata_interface { public: - px320a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + px320a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp b/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp index 0af231e4eb3..cbfba97eabb 100644 --- a/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp +++ b/src/devices/bus/bbc/1mhzbus/1mhzbus.cpp @@ -41,7 +41,7 @@ device_bbc_1mhzbus_interface::device_bbc_1mhzbus_interface(const machine_config // bbc_1mhzbus_slot_device - constructor //------------------------------------------------- -bbc_1mhzbus_slot_device::bbc_1mhzbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_1mhzbus_slot_device::bbc_1mhzbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_1MHZBUS_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/bbc/1mhzbus/1mhzbus.h b/src/devices/bus/bbc/1mhzbus/1mhzbus.h index 302348b6822..dcc1b26873e 100644 --- a/src/devices/bus/bbc/1mhzbus/1mhzbus.h +++ b/src/devices/bus/bbc/1mhzbus/1mhzbus.h @@ -92,7 +92,7 @@ class bbc_1mhzbus_slot_device : public device_t, public device_single_card_slot_ public: // construction/destruction template - bbc_1mhzbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + bbc_1mhzbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : bbc_1mhzbus_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -101,7 +101,7 @@ public: set_fixed(false); } - bbc_1mhzbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + bbc_1mhzbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // callbacks auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/bus/bbc/1mhzbus/autoprom.cpp b/src/devices/bus/bbc/1mhzbus/autoprom.cpp index 0bf0b0cfefd..74c74c449f9 100644 --- a/src/devices/bus/bbc/1mhzbus/autoprom.cpp +++ b/src/devices/bus/bbc/1mhzbus/autoprom.cpp @@ -96,7 +96,7 @@ const tiny_rom_entry *bbc_autoprom_device::device_rom_region() const // bbc_autoprom_device - constructor //------------------------------------------------- -bbc_autoprom_device::bbc_autoprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_autoprom_device::bbc_autoprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_AUTOPROM, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_autorun(*this, "autorun") diff --git a/src/devices/bus/bbc/1mhzbus/autoprom.h b/src/devices/bus/bbc/1mhzbus/autoprom.h index 358b5819f2b..26f44b66351 100644 --- a/src/devices/bus/bbc/1mhzbus/autoprom.h +++ b/src/devices/bus/bbc/1mhzbus/autoprom.h @@ -23,7 +23,7 @@ class bbc_autoprom_device : { public: // construction/destruction - bbc_autoprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_autoprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/beebopl.cpp b/src/devices/bus/bbc/1mhzbus/beebopl.cpp index 9c3db9ca6ff..36c1cbe561f 100644 --- a/src/devices/bus/bbc/1mhzbus/beebopl.cpp +++ b/src/devices/bus/bbc/1mhzbus/beebopl.cpp @@ -47,7 +47,7 @@ void bbc_beebopl_device::device_add_mconfig(machine_config &config) // bbc_beebopl_device - constructor //------------------------------------------------- -bbc_beebopl_device::bbc_beebopl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_beebopl_device::bbc_beebopl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_BEEBOPL, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_1mhzbus(*this, "1mhzbus") diff --git a/src/devices/bus/bbc/1mhzbus/beebopl.h b/src/devices/bus/bbc/1mhzbus/beebopl.h index 618bea6af41..ba0dd7e7cbc 100644 --- a/src/devices/bus/bbc/1mhzbus/beebopl.h +++ b/src/devices/bus/bbc/1mhzbus/beebopl.h @@ -25,7 +25,7 @@ class bbc_beebopl_device : { public: // construction/destruction - bbc_beebopl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_beebopl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/beebsid.cpp b/src/devices/bus/bbc/1mhzbus/beebsid.cpp index d50449ede99..2ef317618d3 100644 --- a/src/devices/bus/bbc/1mhzbus/beebsid.cpp +++ b/src/devices/bus/bbc/1mhzbus/beebsid.cpp @@ -43,7 +43,7 @@ void bbc_beebsid_device::device_add_mconfig(machine_config &config) // bbc_beebsid_device - constructor //------------------------------------------------- -bbc_beebsid_device::bbc_beebsid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_beebsid_device::bbc_beebsid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_BEEBSID, tag, owner, clock), device_bbc_1mhzbus_interface(mconfig, *this), m_1mhzbus(*this, "1mhzbus"), diff --git a/src/devices/bus/bbc/1mhzbus/beebsid.h b/src/devices/bus/bbc/1mhzbus/beebsid.h index 107e875abde..ff5e6e5120a 100644 --- a/src/devices/bus/bbc/1mhzbus/beebsid.h +++ b/src/devices/bus/bbc/1mhzbus/beebsid.h @@ -25,7 +25,7 @@ class bbc_beebsid_device : { public: // construction/destruction - bbc_beebsid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_beebsid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/cc500.cpp b/src/devices/bus/bbc/1mhzbus/cc500.cpp index c04fc06429e..17f51de4747 100644 --- a/src/devices/bus/bbc/1mhzbus/cc500.cpp +++ b/src/devices/bus/bbc/1mhzbus/cc500.cpp @@ -93,7 +93,7 @@ const tiny_rom_entry* bbc_cc500_device::device_rom_region() const // bbc_cc500_device - constructor //------------------------------------------------- -bbc_cc500_device::bbc_cc500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_cc500_device::bbc_cc500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_CC500, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_palette(*this, ":palette") diff --git a/src/devices/bus/bbc/1mhzbus/cc500.h b/src/devices/bus/bbc/1mhzbus/cc500.h index f99ceec100a..4831ed2526a 100644 --- a/src/devices/bus/bbc/1mhzbus/cc500.h +++ b/src/devices/bus/bbc/1mhzbus/cc500.h @@ -27,7 +27,7 @@ class bbc_cc500_device : { public: // construction/destruction - bbc_cc500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cc500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp b/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp index e5ac755e006..2146b4d1338 100644 --- a/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp +++ b/src/devices/bus/bbc/1mhzbus/cfa3000opt.cpp @@ -77,7 +77,7 @@ ioport_constructor cfa3000_opt_device::device_input_ports() const // cfa3000_opt_device - constructor //------------------------------------------------- -cfa3000_opt_device::cfa3000_opt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cfa3000_opt_device::cfa3000_opt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CFA3000_OPT, tag, owner, clock), device_bbc_1mhzbus_interface(mconfig, *this), m_opt(*this, "OPT") diff --git a/src/devices/bus/bbc/1mhzbus/cfa3000opt.h b/src/devices/bus/bbc/1mhzbus/cfa3000opt.h index 64913e95604..cbe0ea3b270 100644 --- a/src/devices/bus/bbc/1mhzbus/cfa3000opt.h +++ b/src/devices/bus/bbc/1mhzbus/cfa3000opt.h @@ -26,7 +26,7 @@ class cfa3000_opt_device : { public: // construction/destruction - cfa3000_opt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cfa3000_opt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/cisco.cpp b/src/devices/bus/bbc/1mhzbus/cisco.cpp index e12efa906d2..eb1fd20a76a 100644 --- a/src/devices/bus/bbc/1mhzbus/cisco.cpp +++ b/src/devices/bus/bbc/1mhzbus/cisco.cpp @@ -83,7 +83,7 @@ void bbc_cisco_device::device_add_mconfig(machine_config &config) // bbc_cisco_device - constructor //------------------------------------------------- -bbc_cisco_device::bbc_cisco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_cisco_device::bbc_cisco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_CISCO, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , device_rtc_interface(mconfig , *this) diff --git a/src/devices/bus/bbc/1mhzbus/cisco.h b/src/devices/bus/bbc/1mhzbus/cisco.h index fdbe528db98..80507f50979 100644 --- a/src/devices/bus/bbc/1mhzbus/cisco.h +++ b/src/devices/bus/bbc/1mhzbus/cisco.h @@ -25,7 +25,7 @@ class bbc_cisco_device { public: // construction/destruction - bbc_cisco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cisco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/datacentre.cpp b/src/devices/bus/bbc/1mhzbus/datacentre.cpp index f21d5af1d54..d12694f314e 100644 --- a/src/devices/bus/bbc/1mhzbus/datacentre.cpp +++ b/src/devices/bus/bbc/1mhzbus/datacentre.cpp @@ -108,7 +108,7 @@ const tiny_rom_entry *bbc_datacentre_device::device_rom_region() const // bbc_ide_device - constructor //------------------------------------------------- -bbc_datacentre_device::bbc_datacentre_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bbc_datacentre_device::bbc_datacentre_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, BBC_DATACENTRE, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_links(*this, "LINKS") diff --git a/src/devices/bus/bbc/1mhzbus/datacentre.h b/src/devices/bus/bbc/1mhzbus/datacentre.h index c6846821e9b..597fd673bdb 100644 --- a/src/devices/bus/bbc/1mhzbus/datacentre.h +++ b/src/devices/bus/bbc/1mhzbus/datacentre.h @@ -27,7 +27,7 @@ class bbc_datacentre_device : { public: // construction/destruction - bbc_datacentre_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_datacentre_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(import_nvrest); template DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); diff --git a/src/devices/bus/bbc/1mhzbus/emrmidi.cpp b/src/devices/bus/bbc/1mhzbus/emrmidi.cpp index 6cfbacf23da..e1e1e6251c6 100644 --- a/src/devices/bus/bbc/1mhzbus/emrmidi.cpp +++ b/src/devices/bus/bbc/1mhzbus/emrmidi.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(BBC_EMRMIDI, bbc_emrmidi_device, "bbc_emrmidi", "EMR BBC Midi void bbc_emrmidi_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout1", FUNC(midi_port_device::write_txd)); m_acia->txd_handler().append("mdout2", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w)); @@ -60,7 +60,7 @@ void bbc_emrmidi_device::device_add_mconfig(machine_config &config) // bbc_emrmidi_device - constructor //------------------------------------------------- -bbc_emrmidi_device::bbc_emrmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_emrmidi_device::bbc_emrmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_EMRMIDI, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_acia(*this, "acia1") diff --git a/src/devices/bus/bbc/1mhzbus/emrmidi.h b/src/devices/bus/bbc/1mhzbus/emrmidi.h index 341e487ce24..228d37519f5 100644 --- a/src/devices/bus/bbc/1mhzbus/emrmidi.h +++ b/src/devices/bus/bbc/1mhzbus/emrmidi.h @@ -27,7 +27,7 @@ class bbc_emrmidi_device : { public: // construction/destruction - bbc_emrmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_emrmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/ide.cpp b/src/devices/bus/bbc/1mhzbus/ide.cpp index d5fdafb000d..103066ecc81 100644 --- a/src/devices/bus/bbc/1mhzbus/ide.cpp +++ b/src/devices/bus/bbc/1mhzbus/ide.cpp @@ -78,14 +78,14 @@ void bbc_beebide_device::device_add_mconfig(machine_config& config) // bbc_ide_device - constructor //------------------------------------------------- -bbc_ide8_device::bbc_ide8_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bbc_ide8_device::bbc_ide8_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, BBC_IDE8, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_ide(*this, "ide") { } -bbc_beebide_device::bbc_beebide_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bbc_beebide_device::bbc_beebide_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, BBC_BEEBIDE, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_ide(*this, "ide") diff --git a/src/devices/bus/bbc/1mhzbus/ide.h b/src/devices/bus/bbc/1mhzbus/ide.h index d326c199ce9..dfddadf1f67 100644 --- a/src/devices/bus/bbc/1mhzbus/ide.h +++ b/src/devices/bus/bbc/1mhzbus/ide.h @@ -29,7 +29,7 @@ class bbc_ide8_device : { public: // construction/destruction - bbc_ide8_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bbc_ide8_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // device-level overrides @@ -52,7 +52,7 @@ class bbc_beebide_device : { public: // construction/destruction - bbc_beebide_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bbc_beebide_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/ieee488.cpp b/src/devices/bus/bbc/1mhzbus/ieee488.cpp index 3ddb6a13dc1..c0bcecc85d5 100644 --- a/src/devices/bus/bbc/1mhzbus/ieee488.cpp +++ b/src/devices/bus/bbc/1mhzbus/ieee488.cpp @@ -155,7 +155,7 @@ const tiny_rom_entry *bbc_ieee488_device::device_rom_region() const // bbc_ieee488_device - constructor //------------------------------------------------- -bbc_ieee488_device::bbc_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ieee488_device::bbc_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_IEEE488, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_ieee(*this, IEEE488_TAG) @@ -164,7 +164,7 @@ bbc_ieee488_device::bbc_ieee488_device(const machine_config &mconfig, const char { } -bbc_b488_device::bbc_b488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_b488_device::bbc_b488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_B488, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_ieee(*this, IEEE488_TAG) @@ -172,7 +172,7 @@ bbc_b488_device::bbc_b488_device(const machine_config &mconfig, const char *tag, { } -//bbc_procyon_device::bbc_procyon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +//bbc_procyon_device::bbc_procyon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) // : device_t(mconfig, BBC_PROCYON, tag, owner, clock) // , device_bbc_1mhzbus_interface(mconfig, *this) // , m_ieee(*this, IEEE488_TAG) diff --git a/src/devices/bus/bbc/1mhzbus/ieee488.h b/src/devices/bus/bbc/1mhzbus/ieee488.h index 9b810b4bf8d..b45c860b88d 100644 --- a/src/devices/bus/bbc/1mhzbus/ieee488.h +++ b/src/devices/bus/bbc/1mhzbus/ieee488.h @@ -32,7 +32,7 @@ class bbc_ieee488_device: { public: // construction/destruction - bbc_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -60,7 +60,7 @@ class bbc_b488_device : { public: // construction/destruction - bbc_b488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_b488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -84,7 +84,7 @@ private: //{ //public: // // construction/destruction -// bbc_procyon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +// bbc_procyon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // //protected: // // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/m2000.cpp b/src/devices/bus/bbc/1mhzbus/m2000.cpp index 8203cada22e..c9c874da0c3 100644 --- a/src/devices/bus/bbc/1mhzbus/m2000.cpp +++ b/src/devices/bus/bbc/1mhzbus/m2000.cpp @@ -30,15 +30,15 @@ void bbc_m2000_device::device_add_mconfig(machine_config &config) { INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_1mhzbus_slot_device::irq_w)); - ACIA6850(config, m_acia1, 0); + ACIA6850(config, m_acia1); m_acia1->txd_handler().set("mdout1", FUNC(midi_port_device::write_txd)); m_acia1->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); - ACIA6850(config, m_acia2, 0); + ACIA6850(config, m_acia2); m_acia2->txd_handler().set("mdout2", FUNC(midi_port_device::write_txd)); m_acia2->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); - ACIA6850(config, m_acia3, 0); + ACIA6850(config, m_acia3); m_acia3->txd_handler().set("mdout3", FUNC(midi_port_device::write_txd)); m_acia3->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<2>)); @@ -66,7 +66,7 @@ void bbc_m2000_device::device_add_mconfig(machine_config &config) // bbc_m2000_device - constructor //------------------------------------------------- -bbc_m2000_device::bbc_m2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_m2000_device::bbc_m2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_M2000, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_1mhzbus(*this, "1mhzbus") diff --git a/src/devices/bus/bbc/1mhzbus/m2000.h b/src/devices/bus/bbc/1mhzbus/m2000.h index eeee1034a4e..8680d6f2287 100644 --- a/src/devices/bus/bbc/1mhzbus/m2000.h +++ b/src/devices/bus/bbc/1mhzbus/m2000.h @@ -29,7 +29,7 @@ class bbc_m2000_device : { public: // construction/destruction - bbc_m2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_m2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/m5000.cpp b/src/devices/bus/bbc/1mhzbus/m5000.cpp index ae3fd948969..77f300ec6e1 100644 --- a/src/devices/bus/bbc/1mhzbus/m5000.cpp +++ b/src/devices/bus/bbc/1mhzbus/m5000.cpp @@ -120,7 +120,7 @@ void bbc_m87_device::device_add_mconfig(machine_config &config) // bbc_hybrid_device - constructor //------------------------------------------------- -bbc_m500_device::bbc_m500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_m500_device::bbc_m500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_1mhzbus(*this, "1mhzbus") @@ -129,22 +129,22 @@ bbc_m500_device::bbc_m500_device(const machine_config &mconfig, device_type type { } -bbc_m500_device::bbc_m500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_m500_device::bbc_m500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_m500_device(mconfig, BBC_M500, tag, owner, clock) { } -bbc_m5000_device::bbc_m5000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_m5000_device::bbc_m5000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_m500_device(mconfig, BBC_M5000, tag, owner, clock) { } -bbc_m3000_device::bbc_m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_m3000_device::bbc_m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_m500_device(mconfig, BBC_M3000, tag, owner, clock) { } -bbc_m87_device::bbc_m87_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_m87_device::bbc_m87_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_m500_device(mconfig, BBC_M87, tag, owner, clock) { } @@ -219,7 +219,7 @@ void bbc_m3000_device::jim_w(offs_t offset, uint8_t data) // htmusic_device - constructor //------------------------------------------------- -htmusic_device::htmusic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +htmusic_device::htmusic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HTMUSIC, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_counter(0) diff --git a/src/devices/bus/bbc/1mhzbus/m5000.h b/src/devices/bus/bbc/1mhzbus/m5000.h index 116bc17cebe..eaa4c19ebbe 100644 --- a/src/devices/bus/bbc/1mhzbus/m5000.h +++ b/src/devices/bus/bbc/1mhzbus/m5000.h @@ -37,7 +37,7 @@ class htmusic_device : public device_t, public device_sound_interface { public: - htmusic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + htmusic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void ram_w(offs_t offset, uint8_t data) { m_wave_ram[offset & 0x7ff] = data; } @@ -78,10 +78,10 @@ class bbc_m500_device : public device_t, public device_bbc_1mhzbus_interface { public: // construction/destruction - bbc_m500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_m500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_m500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_m500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -109,7 +109,7 @@ class bbc_m5000_device : public bbc_m500_device { public: // construction/destruction - bbc_m5000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_m5000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -124,7 +124,7 @@ class bbc_m3000_device : public bbc_m500_device { public: // construction/destruction - bbc_m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -140,7 +140,7 @@ class bbc_m87_device : public bbc_m500_device { public: // construction/destruction - bbc_m87_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_m87_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/1mhzbus/multiform.cpp b/src/devices/bus/bbc/1mhzbus/multiform.cpp index 081c488107a..52e13320446 100644 --- a/src/devices/bus/bbc/1mhzbus/multiform.cpp +++ b/src/devices/bus/bbc/1mhzbus/multiform.cpp @@ -95,7 +95,7 @@ const tiny_rom_entry *bbc_multiform_device::device_rom_region() const // bbc_multiform_device - constructor //------------------------------------------------- -bbc_multiform_device::bbc_multiform_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_multiform_device::bbc_multiform_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MULTIFORM, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_z80(*this, "z80") diff --git a/src/devices/bus/bbc/1mhzbus/multiform.h b/src/devices/bus/bbc/1mhzbus/multiform.h index 586ebe0d7d2..769b87a0876 100644 --- a/src/devices/bus/bbc/1mhzbus/multiform.h +++ b/src/devices/bus/bbc/1mhzbus/multiform.h @@ -28,7 +28,7 @@ class bbc_multiform_device : { public: // construction/destruction - bbc_multiform_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_multiform_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t mem_r(offs_t offset); void mem_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/bbc/1mhzbus/opus3.cpp b/src/devices/bus/bbc/1mhzbus/opus3.cpp index f537eb88b54..da82188d1e8 100644 --- a/src/devices/bus/bbc/1mhzbus/opus3.cpp +++ b/src/devices/bus/bbc/1mhzbus/opus3.cpp @@ -126,7 +126,7 @@ const tiny_rom_entry *bbc_opusa_device::device_rom_region() const // bbc_opus3_device - constructor //------------------------------------------------- -bbc_opus3_device::bbc_opus3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_opus3_device::bbc_opus3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_ramdisk(*this, "ramdisk") @@ -136,12 +136,12 @@ bbc_opus3_device::bbc_opus3_device(const machine_config &mconfig, device_type ty { } -bbc_opus3_device::bbc_opus3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_opus3_device::bbc_opus3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_opus3_device(mconfig, BBC_OPUS3, tag, owner, clock) { } -bbc_opusa_device::bbc_opusa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_opusa_device::bbc_opusa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_opus3_device(mconfig, BBC_OPUSA, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/1mhzbus/opus3.h b/src/devices/bus/bbc/1mhzbus/opus3.h index 2fd06b4015f..ba44d44ea4e 100644 --- a/src/devices/bus/bbc/1mhzbus/opus3.h +++ b/src/devices/bus/bbc/1mhzbus/opus3.h @@ -27,10 +27,10 @@ class bbc_opus3_device: { public: // construction/destruction - bbc_opus3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_opus3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_opus3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_opus3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -59,7 +59,7 @@ class bbc_opusa_device : public bbc_opus3_device { public: // construction/destruction - bbc_opusa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_opusa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/pdram.cpp b/src/devices/bus/bbc/1mhzbus/pdram.cpp index 81106218fc4..fbdd63d9923 100644 --- a/src/devices/bus/bbc/1mhzbus/pdram.cpp +++ b/src/devices/bus/bbc/1mhzbus/pdram.cpp @@ -44,7 +44,7 @@ const tiny_rom_entry* bbc_pdram_device::device_rom_region() const // bbc_pdram_device - constructor //------------------------------------------------- -bbc_pdram_device::bbc_pdram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_pdram_device::bbc_pdram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_PDRAM, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_ram_page(0) diff --git a/src/devices/bus/bbc/1mhzbus/pdram.h b/src/devices/bus/bbc/1mhzbus/pdram.h index 23f5b2884ca..7f1e71d6109 100644 --- a/src/devices/bus/bbc/1mhzbus/pdram.h +++ b/src/devices/bus/bbc/1mhzbus/pdram.h @@ -22,7 +22,7 @@ class bbc_pdram_device: { public: // construction/destruction - bbc_pdram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_pdram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/pms64k.cpp b/src/devices/bus/bbc/1mhzbus/pms64k.cpp index 0c975b39f48..2633f79381d 100644 --- a/src/devices/bus/bbc/1mhzbus/pms64k.cpp +++ b/src/devices/bus/bbc/1mhzbus/pms64k.cpp @@ -38,7 +38,7 @@ void bbc_pms64k_device::device_add_mconfig(machine_config &config) // bbc_pms64k_device - constructor //------------------------------------------------- -bbc_pms64k_device::bbc_pms64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_pms64k_device::bbc_pms64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_PMS64K, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_nvram(*this, "nvram") diff --git a/src/devices/bus/bbc/1mhzbus/pms64k.h b/src/devices/bus/bbc/1mhzbus/pms64k.h index 8b817b7db1d..aac78a1f298 100644 --- a/src/devices/bus/bbc/1mhzbus/pms64k.h +++ b/src/devices/bus/bbc/1mhzbus/pms64k.h @@ -23,7 +23,7 @@ class bbc_pms64k_device: { public: // construction/destruction - bbc_pms64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_pms64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/1mhzbus/ramdisc.cpp b/src/devices/bus/bbc/1mhzbus/ramdisc.cpp index 7552042a716..ac5d12530e8 100644 --- a/src/devices/bus/bbc/1mhzbus/ramdisc.cpp +++ b/src/devices/bus/bbc/1mhzbus/ramdisc.cpp @@ -86,7 +86,7 @@ const tiny_rom_entry *bbc_ramdisc_device::device_rom_region() const // bbc_ramdisc_device - constructor //------------------------------------------------- -bbc_ramdisc_device::bbc_ramdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ramdisc_device::bbc_ramdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_RAMDISC, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_1mhzbus(*this, "1mhzbus") diff --git a/src/devices/bus/bbc/1mhzbus/ramdisc.h b/src/devices/bus/bbc/1mhzbus/ramdisc.h index a4955921bcc..ca27e7bc309 100644 --- a/src/devices/bus/bbc/1mhzbus/ramdisc.h +++ b/src/devices/bus/bbc/1mhzbus/ramdisc.h @@ -23,7 +23,7 @@ class bbc_ramdisc_device: { public: // construction/destruction - bbc_ramdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ramdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(power_changed); diff --git a/src/devices/bus/bbc/1mhzbus/sasi.cpp b/src/devices/bus/bbc/1mhzbus/sasi.cpp index 9a55916f8f1..16d60d94f62 100644 --- a/src/devices/bus/bbc/1mhzbus/sasi.cpp +++ b/src/devices/bus/bbc/1mhzbus/sasi.cpp @@ -72,7 +72,7 @@ void bbc_torchhd_device::device_add_mconfig(machine_config &config) // bbc_sasi_device - constructor //------------------------------------------------- -bbc_sasi_device::bbc_sasi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_sasi_device::bbc_sasi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_sasi(*this, "sasi:7:scsicb") @@ -80,12 +80,12 @@ bbc_sasi_device::bbc_sasi_device(const machine_config &mconfig, device_type type { } -bbc_sasi_device::bbc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_sasi_device::bbc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_sasi_device(mconfig, BBC_SASI, tag, owner, clock) { } -bbc_torchhd_device::bbc_torchhd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_torchhd_device::bbc_torchhd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_sasi_device(mconfig, BBC_TORCHHD, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/1mhzbus/sasi.h b/src/devices/bus/bbc/1mhzbus/sasi.h index e1b81125ecd..3ce5d0d6485 100644 --- a/src/devices/bus/bbc/1mhzbus/sasi.h +++ b/src/devices/bus/bbc/1mhzbus/sasi.h @@ -24,13 +24,13 @@ class bbc_sasi_device: { public: // construction/destruction - bbc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(req_w); DECLARE_WRITE_LINE_MEMBER(sel_w); protected: - bbc_sasi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_sasi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -55,7 +55,7 @@ class bbc_torchhd_device : public bbc_sasi_device { public: // construction/destruction - bbc_torchhd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_torchhd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/1mhzbus/scsi.cpp b/src/devices/bus/bbc/1mhzbus/scsi.cpp index 26c640467b3..b3fd0cd1db8 100644 --- a/src/devices/bus/bbc/1mhzbus/scsi.cpp +++ b/src/devices/bus/bbc/1mhzbus/scsi.cpp @@ -87,19 +87,19 @@ void bbc_awhd_device::device_add_mconfig(machine_config &config) // bbc_scsi_device - constructor //------------------------------------------------- -bbc_scsi_device::bbc_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_scsi_device::bbc_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_scsi(*this, "scsi:7:scsicb") { } -bbc_scsi_device::bbc_scsi_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bbc_scsi_device::bbc_scsi_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : bbc_scsi_device(mconfig, BBC_SCSI, tag, owner, clock) { } -bbc_awhd_device::bbc_awhd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_awhd_device::bbc_awhd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_scsi_device(mconfig, BBC_AWHD, tag, owner, clock) , m_1mhzbus(*this, "1mhzbus") { diff --git a/src/devices/bus/bbc/1mhzbus/scsi.h b/src/devices/bus/bbc/1mhzbus/scsi.h index 8a4dabbe113..5c16af7676c 100644 --- a/src/devices/bus/bbc/1mhzbus/scsi.h +++ b/src/devices/bus/bbc/1mhzbus/scsi.h @@ -24,13 +24,13 @@ class bbc_scsi_device: { public: // construction/destruction - bbc_scsi_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bbc_scsi_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(bsy_w); DECLARE_WRITE_LINE_MEMBER(req_w); protected: - bbc_scsi_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + bbc_scsi_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -57,7 +57,7 @@ public: static constexpr feature_type imperfect_features() { return feature::DISK; } // construction/destruction - bbc_awhd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_awhd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/1mhzbus/sprite.cpp b/src/devices/bus/bbc/1mhzbus/sprite.cpp index ee7f5f292e7..f47ca52e0c3 100644 --- a/src/devices/bus/bbc/1mhzbus/sprite.cpp +++ b/src/devices/bus/bbc/1mhzbus/sprite.cpp @@ -41,7 +41,7 @@ void bbc_sprite_device::device_add_mconfig(machine_config &config) // bbc_sprite_device - constructor //------------------------------------------------- -bbc_sprite_device::bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_sprite_device::bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_SPRITE, tag, owner, clock) , device_bbc_1mhzbus_interface(mconfig, *this) , m_vdp(*this, "vdp") diff --git a/src/devices/bus/bbc/1mhzbus/sprite.h b/src/devices/bus/bbc/1mhzbus/sprite.h index 02b0cff5dc2..a6aac9f0bda 100644 --- a/src/devices/bus/bbc/1mhzbus/sprite.h +++ b/src/devices/bus/bbc/1mhzbus/sprite.h @@ -24,7 +24,7 @@ class bbc_sprite_device: { public: // construction/destruction - bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/analogue/analogue.cpp b/src/devices/bus/bbc/analogue/analogue.cpp index 6dce6a36e99..f631033da42 100644 --- a/src/devices/bus/bbc/analogue/analogue.cpp +++ b/src/devices/bus/bbc/analogue/analogue.cpp @@ -41,7 +41,7 @@ device_bbc_analogue_interface::device_bbc_analogue_interface(const machine_confi // bbc_analogue_slot_device - constructor //------------------------------------------------- -bbc_analogue_slot_device::bbc_analogue_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_analogue_slot_device::bbc_analogue_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_ANALOGUE_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/bbc/analogue/analogue.h b/src/devices/bus/bbc/analogue/analogue.h index bb58d2d0148..062abe5842f 100644 --- a/src/devices/bus/bbc/analogue/analogue.h +++ b/src/devices/bus/bbc/analogue/analogue.h @@ -55,7 +55,7 @@ public: set_fixed(false); } - bbc_analogue_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + bbc_analogue_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto lpstb_handler() { return m_lpstb_handler.bind(); } diff --git a/src/devices/bus/bbc/analogue/bitstik.cpp b/src/devices/bus/bbc/analogue/bitstik.cpp index f904e20db9f..68df8b71769 100644 --- a/src/devices/bus/bbc/analogue/bitstik.cpp +++ b/src/devices/bus/bbc/analogue/bitstik.cpp @@ -89,7 +89,7 @@ const tiny_rom_entry *bbc_bitstik2_device::device_rom_region() const // bbc_bitstik_device - constructor //------------------------------------------------- -bbc_bitstik_device::bbc_bitstik_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bbc_bitstik_device::bbc_bitstik_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_bbc_analogue_interface(mconfig, *this), m_channel(*this, "CHANNEL%u", 0), @@ -97,12 +97,12 @@ bbc_bitstik_device::bbc_bitstik_device(const machine_config &mconfig, device_typ { } -bbc_bitstik1_device::bbc_bitstik1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_bitstik1_device::bbc_bitstik1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_bitstik_device(mconfig, BBC_BITSTIK1, tag, owner, clock) { } -bbc_bitstik2_device::bbc_bitstik2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_bitstik2_device::bbc_bitstik2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_bitstik_device(mconfig, BBC_BITSTIK2, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/analogue/bitstik.h b/src/devices/bus/bbc/analogue/bitstik.h index 494be5dec69..89747c5c1fb 100644 --- a/src/devices/bus/bbc/analogue/bitstik.h +++ b/src/devices/bus/bbc/analogue/bitstik.h @@ -31,7 +31,7 @@ class bbc_bitstik_device : { protected: // construction/destruction - bbc_bitstik_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_bitstik_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -50,7 +50,7 @@ private: class bbc_bitstik1_device : public bbc_bitstik_device { public: - bbc_bitstik1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_bitstik1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -59,7 +59,7 @@ protected: class bbc_bitstik2_device : public bbc_bitstik_device { public: - bbc_bitstik2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_bitstik2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/bbc/analogue/cfa3000a.cpp b/src/devices/bus/bbc/analogue/cfa3000a.cpp index f48234e091b..754dbbf75b9 100644 --- a/src/devices/bus/bbc/analogue/cfa3000a.cpp +++ b/src/devices/bus/bbc/analogue/cfa3000a.cpp @@ -58,7 +58,7 @@ ioport_constructor cfa3000_anlg_device::device_input_ports() const // cfa3000_anlg_device - constructor //------------------------------------------------- -cfa3000_anlg_device::cfa3000_anlg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cfa3000_anlg_device::cfa3000_anlg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CFA3000_ANLG, tag, owner, clock), device_bbc_analogue_interface(mconfig, *this), m_channel(*this, "CHANNEL%u", 0), diff --git a/src/devices/bus/bbc/analogue/cfa3000a.h b/src/devices/bus/bbc/analogue/cfa3000a.h index 8948ca586be..6662f02ceb8 100644 --- a/src/devices/bus/bbc/analogue/cfa3000a.h +++ b/src/devices/bus/bbc/analogue/cfa3000a.h @@ -26,7 +26,7 @@ class cfa3000_anlg_device : { public: // construction/destruction - cfa3000_anlg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cfa3000_anlg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/analogue/joystick.cpp b/src/devices/bus/bbc/analogue/joystick.cpp index 434ea1060b2..c938d327799 100644 --- a/src/devices/bus/bbc/analogue/joystick.cpp +++ b/src/devices/bus/bbc/analogue/joystick.cpp @@ -82,7 +82,7 @@ ioport_constructor bbc_voltmace3b_device::device_input_ports() const // bbc_joystick_device - constructor //------------------------------------------------- -bbc_joystick_device::bbc_joystick_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bbc_joystick_device::bbc_joystick_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_bbc_analogue_interface(mconfig, *this), m_joy(*this, "JOY%u", 0), @@ -90,12 +90,12 @@ bbc_joystick_device::bbc_joystick_device(const machine_config &mconfig, device_t { } -bbc_acornjoy_device::bbc_acornjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_acornjoy_device::bbc_acornjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_joystick_device(mconfig, BBC_ACORNJOY, tag, owner, clock) { } -bbc_voltmace3b_device::bbc_voltmace3b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_voltmace3b_device::bbc_voltmace3b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_joystick_device(mconfig, BBC_VOLTMACE3B, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/analogue/joystick.h b/src/devices/bus/bbc/analogue/joystick.h index 887e87c74d7..2cefd0ab9d5 100644 --- a/src/devices/bus/bbc/analogue/joystick.h +++ b/src/devices/bus/bbc/analogue/joystick.h @@ -26,7 +26,7 @@ class bbc_joystick_device : { protected: // construction/destruction - bbc_joystick_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_joystick_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -43,7 +43,7 @@ private: class bbc_acornjoy_device : public bbc_joystick_device { public: - bbc_acornjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_acornjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; }; @@ -51,7 +51,7 @@ public: class bbc_voltmace3b_device : public bbc_joystick_device { public: - bbc_voltmace3b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_voltmace3b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; }; diff --git a/src/devices/bus/bbc/cart/click.cpp b/src/devices/bus/bbc/cart/click.cpp index 175de5eeae3..a0277210137 100644 --- a/src/devices/bus/bbc/cart/click.cpp +++ b/src/devices/bus/bbc/cart/click.cpp @@ -54,7 +54,7 @@ ioport_constructor bbc_click_device::device_input_ports() const // bbc_click_device - constructor //------------------------------------------------- -bbc_click_device::bbc_click_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_click_device::bbc_click_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_CLICK, tag, owner, clock) , device_bbc_cart_interface(mconfig, *this) { diff --git a/src/devices/bus/bbc/cart/click.h b/src/devices/bus/bbc/cart/click.h index 9f6691c4356..bd71bea4053 100644 --- a/src/devices/bus/bbc/cart/click.h +++ b/src/devices/bus/bbc/cart/click.h @@ -26,7 +26,7 @@ class bbc_click_device : public device_t, public device_bbc_cart_interface { public: // construction/destruction - bbc_click_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_click_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(click_button); diff --git a/src/devices/bus/bbc/cart/mastersd.cpp b/src/devices/bus/bbc/cart/mastersd.cpp index 1c1d21ede72..4395b9002ae 100644 --- a/src/devices/bus/bbc/cart/mastersd.cpp +++ b/src/devices/bus/bbc/cart/mastersd.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(BBC_MASTERSD, bbc_mastersd_device, "bbc_mastersd", "MasterSD void bbc_mastersd_device::device_add_mconfig(machine_config &config) { - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set([this](int state) { m_in_bit = state; }); } @@ -38,7 +38,7 @@ void bbc_mastersd_device::device_add_mconfig(machine_config &config) // bbc_mastersd_device - constructor //------------------------------------------------- -bbc_mastersd_device::bbc_mastersd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mastersd_device::bbc_mastersd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MASTERSD, tag, owner, clock) , device_bbc_cart_interface(mconfig, *this) , m_sdcard(*this, "sdcard") diff --git a/src/devices/bus/bbc/cart/mastersd.h b/src/devices/bus/bbc/cart/mastersd.h index cd6d399176d..b05a613576e 100644 --- a/src/devices/bus/bbc/cart/mastersd.h +++ b/src/devices/bus/bbc/cart/mastersd.h @@ -21,7 +21,7 @@ class bbc_mastersd_device : public device_t, public device_bbc_cart_interface { public: // construction/destruction - bbc_mastersd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mastersd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/cart/mega256.cpp b/src/devices/bus/bbc/cart/mega256.cpp index f0348df2e74..985ab6082a2 100644 --- a/src/devices/bus/bbc/cart/mega256.cpp +++ b/src/devices/bus/bbc/cart/mega256.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(BBC_MEGA256, bbc_mega256_device, "bbc_mega256", "Solidisk Meg // bbc_mega256_device - constructor //------------------------------------------------- -bbc_mega256_device::bbc_mega256_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mega256_device::bbc_mega256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MEGA256, tag, owner, clock) , device_bbc_cart_interface(mconfig, *this) , m_page(0) diff --git a/src/devices/bus/bbc/cart/mega256.h b/src/devices/bus/bbc/cart/mega256.h index b6f211b694a..f6f1fdbab6a 100644 --- a/src/devices/bus/bbc/cart/mega256.h +++ b/src/devices/bus/bbc/cart/mega256.h @@ -26,7 +26,7 @@ class bbc_mega256_device : public device_t, public device_bbc_cart_interface { public: // construction/destruction - bbc_mega256_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mega256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/cart/mr8000.cpp b/src/devices/bus/bbc/cart/mr8000.cpp index a039936f23a..8a7e127d4c4 100644 --- a/src/devices/bus/bbc/cart/mr8000.cpp +++ b/src/devices/bus/bbc/cart/mr8000.cpp @@ -51,7 +51,7 @@ ioport_constructor bbc_mr8000_device::device_input_ports() const // bbc_mr8000_device - constructor //------------------------------------------------- -bbc_mr8000_device::bbc_mr8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mr8000_device::bbc_mr8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MR8000, tag, owner, clock) , device_bbc_cart_interface(mconfig, *this) , m_switch(*this, "SWITCH") diff --git a/src/devices/bus/bbc/cart/mr8000.h b/src/devices/bus/bbc/cart/mr8000.h index ccf79e4508e..d2d37b4ec40 100644 --- a/src/devices/bus/bbc/cart/mr8000.h +++ b/src/devices/bus/bbc/cart/mr8000.h @@ -24,7 +24,7 @@ class bbc_mr8000_device : public device_t, public device_bbc_cart_interface { public: // construction/destruction - bbc_mr8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mr8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/cart/msc.cpp b/src/devices/bus/bbc/cart/msc.cpp index 05a3284e83d..ca282be539e 100644 --- a/src/devices/bus/bbc/cart/msc.cpp +++ b/src/devices/bus/bbc/cart/msc.cpp @@ -44,7 +44,7 @@ ioport_constructor bbc_msc_device::device_input_ports() const // bbc_msc_device - constructor //------------------------------------------------- -bbc_msc_device::bbc_msc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_msc_device::bbc_msc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MSC, tag, owner, clock) , device_bbc_cart_interface(mconfig, *this) , m_button(*this, "BUTTON") diff --git a/src/devices/bus/bbc/cart/msc.h b/src/devices/bus/bbc/cart/msc.h index 4bde2113047..22affbb6d58 100644 --- a/src/devices/bus/bbc/cart/msc.h +++ b/src/devices/bus/bbc/cart/msc.h @@ -24,7 +24,7 @@ class bbc_msc_device : public device_t, public device_bbc_cart_interface { public: // construction/destruction - bbc_msc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_msc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(activate); diff --git a/src/devices/bus/bbc/cart/slot.cpp b/src/devices/bus/bbc/cart/slot.cpp index 04e01ac04db..e6517298314 100644 --- a/src/devices/bus/bbc/cart/slot.cpp +++ b/src/devices/bus/bbc/cart/slot.cpp @@ -48,7 +48,7 @@ device_bbc_cart_interface::~device_bbc_cart_interface() //------------------------------------------------- // bbc_cartslot_device - constructor //------------------------------------------------- -bbc_cartslot_device::bbc_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_cartslot_device::bbc_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : electron_cartslot_device(mconfig, BBCM_CARTSLOT, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/cart/slot.h b/src/devices/bus/bbc/cart/slot.h index 42487bee5c7..0f5c5212682 100644 --- a/src/devices/bus/bbc/cart/slot.h +++ b/src/devices/bus/bbc/cart/slot.h @@ -123,7 +123,7 @@ class bbc_cartslot_device : public electron_cartslot_device public: // construction/destruction template - bbc_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + bbc_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : electron_cartslot_device(mconfig, tag, owner, clock) { option_reset(); @@ -132,7 +132,7 @@ public: set_fixed(false); } - bbc_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "bbcm_cart"; } virtual const char *file_extensions() const noexcept override { return "rom,bin"; } diff --git a/src/devices/bus/bbc/exp/autocue.cpp b/src/devices/bus/bbc/exp/autocue.cpp index 4c9fa193c3a..72f3d853316 100644 --- a/src/devices/bus/bbc/exp/autocue.cpp +++ b/src/devices/bus/bbc/exp/autocue.cpp @@ -44,7 +44,7 @@ void bbc_autocue_device::device_add_mconfig(machine_config &config) // bbc_autocue_device - constructor //------------------------------------------------- -bbc_autocue_device::bbc_autocue_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_autocue_device::bbc_autocue_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_AUTOCUE, tag, owner, clock) , device_bbc_exp_interface(mconfig, *this) , m_nvram(*this, "nvram") diff --git a/src/devices/bus/bbc/exp/autocue.h b/src/devices/bus/bbc/exp/autocue.h index 0151e94e9bf..933fec91721 100644 --- a/src/devices/bus/bbc/exp/autocue.h +++ b/src/devices/bus/bbc/exp/autocue.h @@ -23,7 +23,7 @@ class bbc_autocue_device : { public: // construction/destruction - bbc_autocue_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_autocue_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/exp/exp.cpp b/src/devices/bus/bbc/exp/exp.cpp index 4209249a0f9..46c11ad43cb 100644 --- a/src/devices/bus/bbc/exp/exp.cpp +++ b/src/devices/bus/bbc/exp/exp.cpp @@ -41,7 +41,7 @@ device_bbc_exp_interface::device_bbc_exp_interface(const machine_config &mconfig // bbc_exp_slot_device - constructor //------------------------------------------------- -bbc_exp_slot_device::bbc_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_exp_slot_device::bbc_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_EXP_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/bbc/exp/exp.h b/src/devices/bus/bbc/exp/exp.h index f7d695b59a5..ccf0aa49230 100644 --- a/src/devices/bus/bbc/exp/exp.h +++ b/src/devices/bus/bbc/exp/exp.h @@ -56,7 +56,7 @@ class bbc_exp_slot_device : public device_t, public device_single_card_slot_inte public: // construction/destruction template - bbc_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + bbc_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : bbc_exp_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -65,7 +65,7 @@ public: set_fixed(false); } - bbc_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/bus/bbc/exp/mertec.cpp b/src/devices/bus/bbc/exp/mertec.cpp index c561f052460..d2019b296db 100644 --- a/src/devices/bus/bbc/exp/mertec.cpp +++ b/src/devices/bus/bbc/exp/mertec.cpp @@ -79,7 +79,7 @@ void bbc_mertec_device::device_add_mconfig(machine_config &config) // bbc_mertec_device - constructor //------------------------------------------------- -bbc_mertec_device::bbc_mertec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mertec_device::bbc_mertec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MERTEC, tag, owner, clock) , device_bbc_exp_interface(mconfig, *this) , m_pia(*this, "pia") diff --git a/src/devices/bus/bbc/exp/mertec.h b/src/devices/bus/bbc/exp/mertec.h index 33d71ab2ce9..ba051d7f96b 100644 --- a/src/devices/bus/bbc/exp/mertec.h +++ b/src/devices/bus/bbc/exp/mertec.h @@ -29,7 +29,7 @@ class bbc_mertec_device : { public: // construction/destruction - bbc_mertec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mertec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: diff --git a/src/devices/bus/bbc/fdc/acorn.cpp b/src/devices/bus/bbc/fdc/acorn.cpp index 22b2cc027c8..b383f9f352f 100644 --- a/src/devices/bus/bbc/fdc/acorn.cpp +++ b/src/devices/bus/bbc/fdc/acorn.cpp @@ -135,7 +135,7 @@ const tiny_rom_entry *bbc_acorn1770_device::device_rom_region() const // bbc_acornfdc_device - constructor //------------------------------------------------- -bbc_acorn8271_device::bbc_acorn8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_acorn8271_device::bbc_acorn8271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_ACORN8271, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) , m_fdc(*this, "i8271") @@ -143,7 +143,7 @@ bbc_acorn8271_device::bbc_acorn8271_device(const machine_config &mconfig, const { } -bbc_acorn1770_device::bbc_acorn1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_acorn1770_device::bbc_acorn1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_ACORN1770, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) , m_fdc(*this, "wd1770") diff --git a/src/devices/bus/bbc/fdc/acorn.h b/src/devices/bus/bbc/fdc/acorn.h index 347368ff29f..b973c45292e 100644 --- a/src/devices/bus/bbc/fdc/acorn.h +++ b/src/devices/bus/bbc/fdc/acorn.h @@ -30,7 +30,7 @@ class bbc_acorn8271_device : { public: // construction/destruction - bbc_acorn8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_acorn8271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); @@ -59,7 +59,7 @@ class bbc_acorn1770_device : { public: // construction/destruction - bbc_acorn1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_acorn1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/fdc/ams.cpp b/src/devices/bus/bbc/fdc/ams.cpp index ef64eabd75c..b085e7e1f20 100644 --- a/src/devices/bus/bbc/fdc/ams.cpp +++ b/src/devices/bus/bbc/fdc/ams.cpp @@ -73,7 +73,7 @@ const tiny_rom_entry *bbc_ams3_device::device_rom_region() const // bbc_ams3_device - constructor //------------------------------------------------- -bbc_ams3_device::bbc_ams3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ams3_device::bbc_ams3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_AMS3, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) , m_fdc(*this, "i8271") diff --git a/src/devices/bus/bbc/fdc/ams.h b/src/devices/bus/bbc/fdc/ams.h index a1bdcc27696..bb4105c37af 100644 --- a/src/devices/bus/bbc/fdc/ams.h +++ b/src/devices/bus/bbc/fdc/ams.h @@ -27,7 +27,7 @@ class bbc_ams3_device : { public: // construction/destruction - bbc_ams3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ams3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/bbc/fdc/cumana.cpp b/src/devices/bus/bbc/fdc/cumana.cpp index 2db9b4b2f2a..a81f83f6a4d 100644 --- a/src/devices/bus/bbc/fdc/cumana.cpp +++ b/src/devices/bus/bbc/fdc/cumana.cpp @@ -106,7 +106,7 @@ const tiny_rom_entry *bbc_cumana2_device::device_rom_region() const // bbc_cumanafdc_device - constructor //------------------------------------------------- -bbc_cumanafdc_device::bbc_cumanafdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bbc_cumanafdc_device::bbc_cumanafdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_bbc_fdc_interface(mconfig, *this), m_fdc(*this, "mb8877a"), @@ -115,13 +115,13 @@ bbc_cumanafdc_device::bbc_cumanafdc_device(const machine_config &mconfig, device { } -bbc_cumana1_device::bbc_cumana1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_cumana1_device::bbc_cumana1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_cumanafdc_device(mconfig, BBC_CUMANA1, tag, owner, clock) { m_invert = true; } -bbc_cumana2_device::bbc_cumana2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_cumana2_device::bbc_cumana2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_cumanafdc_device(mconfig, BBC_CUMANA2, tag, owner, clock) { m_invert = false; diff --git a/src/devices/bus/bbc/fdc/cumana.h b/src/devices/bus/bbc/fdc/cumana.h index d775a68e622..f92d64b1d96 100644 --- a/src/devices/bus/bbc/fdc/cumana.h +++ b/src/devices/bus/bbc/fdc/cumana.h @@ -34,7 +34,7 @@ public: protected: // construction/destruction - bbc_cumanafdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_cumanafdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -55,7 +55,7 @@ private: class bbc_cumana1_device : public bbc_cumanafdc_device { public: - bbc_cumana1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cumana1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -65,7 +65,7 @@ protected: class bbc_cumana2_device : public bbc_cumanafdc_device { public: - bbc_cumana2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cumana2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/bbc/fdc/cv1797.cpp b/src/devices/bus/bbc/fdc/cv1797.cpp index 32d517f35cb..d7e9a993465 100644 --- a/src/devices/bus/bbc/fdc/cv1797.cpp +++ b/src/devices/bus/bbc/fdc/cv1797.cpp @@ -86,7 +86,7 @@ const tiny_rom_entry *bbc_cv1797_device::device_rom_region() const // bbc_cv1797_device - constructor //------------------------------------------------- -bbc_cv1797_device::bbc_cv1797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_cv1797_device::bbc_cv1797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_CV1797, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) , m_fdc(*this, "fd1797") diff --git a/src/devices/bus/bbc/fdc/cv1797.h b/src/devices/bus/bbc/fdc/cv1797.h index 16b870f963c..29f52996eef 100644 --- a/src/devices/bus/bbc/fdc/cv1797.h +++ b/src/devices/bus/bbc/fdc/cv1797.h @@ -28,7 +28,7 @@ class bbc_cv1797_device : { public: // construction/destruction - bbc_cv1797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cv1797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/fdc/fdc.cpp b/src/devices/bus/bbc/fdc/fdc.cpp index abfc5e109b1..505ef16b446 100644 --- a/src/devices/bus/bbc/fdc/fdc.cpp +++ b/src/devices/bus/bbc/fdc/fdc.cpp @@ -40,7 +40,7 @@ device_bbc_fdc_interface::device_bbc_fdc_interface(const machine_config &mconfig // bbc_fdc_slot_device - constructor //------------------------------------------------- -bbc_fdc_slot_device::bbc_fdc_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_fdc_slot_device::bbc_fdc_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_FDC_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/bbc/fdc/fdc.h b/src/devices/bus/bbc/fdc/fdc.h index 7138ced7ad1..b7b724488dc 100644 --- a/src/devices/bus/bbc/fdc/fdc.h +++ b/src/devices/bus/bbc/fdc/fdc.h @@ -26,7 +26,7 @@ class bbc_fdc_slot_device : public device_t, public device_single_card_slot_inte public: // construction/destruction template - bbc_fdc_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + bbc_fdc_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : bbc_fdc_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -36,7 +36,7 @@ public: set_insert_rom(true); } - bbc_fdc_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + bbc_fdc_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); void set_insert_rom(bool insert_rom) { m_insert_rom = insert_rom; } bool insert_rom() { return m_insert_rom; } diff --git a/src/devices/bus/bbc/fdc/kenda.cpp b/src/devices/bus/bbc/fdc/kenda.cpp index 801dd731200..5ef055a1224 100644 --- a/src/devices/bus/bbc/fdc/kenda.cpp +++ b/src/devices/bus/bbc/fdc/kenda.cpp @@ -99,7 +99,7 @@ const tiny_rom_entry *bbc_kenda_device::device_rom_region() const // bbc_kenda_device - constructor //------------------------------------------------- -bbc_kenda_device::bbc_kenda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_kenda_device::bbc_kenda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_KENDA, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) , m_fdc(*this, "fdc") diff --git a/src/devices/bus/bbc/fdc/kenda.h b/src/devices/bus/bbc/fdc/kenda.h index 99868f062fb..8ad7c738ac6 100644 --- a/src/devices/bus/bbc/fdc/kenda.h +++ b/src/devices/bus/bbc/fdc/kenda.h @@ -25,7 +25,7 @@ class bbc_kenda_device : public device_t, public device_bbc_fdc_interface { public: // construction/destruction - bbc_kenda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_kenda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/fdc/opus.cpp b/src/devices/bus/bbc/fdc/opus.cpp index 2851fc3de3c..c68e034e0c5 100644 --- a/src/devices/bus/bbc/fdc/opus.cpp +++ b/src/devices/bus/bbc/fdc/opus.cpp @@ -166,7 +166,7 @@ const tiny_rom_entry *bbc_opus1770_device::device_rom_region() const // bbc_opusfdc_device - constructor //------------------------------------------------- -bbc_opus8272_device::bbc_opus8272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_opus8272_device::bbc_opus8272_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_OPUS8272, tag, owner, clock), device_bbc_fdc_interface(mconfig, *this), m_fdc(*this, "i8272"), @@ -174,7 +174,7 @@ bbc_opus8272_device::bbc_opus8272_device(const machine_config &mconfig, const ch { } -bbc_opusfdc_device::bbc_opusfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bbc_opusfdc_device::bbc_opusfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_bbc_fdc_interface(mconfig, *this), m_fdc(*this, "fdc"), @@ -183,17 +183,17 @@ bbc_opusfdc_device::bbc_opusfdc_device(const machine_config &mconfig, device_typ { } -bbc_opus2791_device::bbc_opus2791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_opus2791_device::bbc_opus2791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_opusfdc_device(mconfig, BBC_OPUS2791, tag, owner, clock) { } -bbc_opus2793_device::bbc_opus2793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_opus2793_device::bbc_opus2793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_opusfdc_device(mconfig, BBC_OPUS2793, tag, owner, clock) { } -bbc_opus1770_device::bbc_opus1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_opus1770_device::bbc_opus1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_opusfdc_device(mconfig, BBC_OPUS1770, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/fdc/opus.h b/src/devices/bus/bbc/fdc/opus.h index 5cca5a5c701..bbc66abef1d 100644 --- a/src/devices/bus/bbc/fdc/opus.h +++ b/src/devices/bus/bbc/fdc/opus.h @@ -26,7 +26,7 @@ class bbc_opus8272_device : { public: // construction/destruction - bbc_opus8272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_opus8272_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -56,7 +56,7 @@ public: protected: // construction/destruction - bbc_opusfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_opusfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -74,7 +74,7 @@ private: class bbc_opus2791_device : public bbc_opusfdc_device { public: - bbc_opus2791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_opus2791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -84,7 +84,7 @@ protected: class bbc_opus2793_device : public bbc_opusfdc_device { public: - bbc_opus2793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_opus2793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -94,7 +94,7 @@ protected: class bbc_opus1770_device : public bbc_opusfdc_device { public: - bbc_opus1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_opus1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/bbc/fdc/solidisk.cpp b/src/devices/bus/bbc/fdc/solidisk.cpp index c342fc64355..3b4df171758 100644 --- a/src/devices/bus/bbc/fdc/solidisk.cpp +++ b/src/devices/bus/bbc/fdc/solidisk.cpp @@ -147,7 +147,7 @@ const tiny_rom_entry *bbc_stldfdc_1_device::device_rom_region() const // bbc_stlfdc_device - constructor //------------------------------------------------- -bbc_stlfdc_device::bbc_stlfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_stlfdc_device::bbc_stlfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) , m_wd1770(*this, "wd1770") @@ -157,27 +157,27 @@ bbc_stlfdc_device::bbc_stlfdc_device(const machine_config &mconfig, device_type { } -bbc_stl1770_1_device::bbc_stl1770_1_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) +bbc_stl1770_1_device::bbc_stl1770_1_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : bbc_stlfdc_device(mconfig, type, tag, owner, clock) { } -bbc_stl1770_1_device::bbc_stl1770_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stl1770_1_device::bbc_stl1770_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_stlfdc_device(mconfig, BBC_STL1770_1, tag, owner, clock) { } -bbc_stl1770_2_device::bbc_stl1770_2_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) +bbc_stl1770_2_device::bbc_stl1770_2_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : bbc_stlfdc_device(mconfig, type, tag, owner, clock) { } -bbc_stl1770_2_device::bbc_stl1770_2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stl1770_2_device::bbc_stl1770_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_stlfdc_device(mconfig, BBC_STL1770_2, tag, owner, clock) { } -bbc_stldfdc_1_device::bbc_stldfdc_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stldfdc_1_device::bbc_stldfdc_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_stl1770_1_device(mconfig, BBC_STLDFDC_1, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/fdc/solidisk.h b/src/devices/bus/bbc/fdc/solidisk.h index 025db9ca332..cede8534314 100644 --- a/src/devices/bus/bbc/fdc/solidisk.h +++ b/src/devices/bus/bbc/fdc/solidisk.h @@ -33,7 +33,7 @@ public: protected: // construction/destruction - bbc_stlfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_stlfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(motor_w); DECLARE_WRITE_LINE_MEMBER(side_w); @@ -48,10 +48,10 @@ protected: class bbc_stl1770_1_device : public bbc_stlfdc_device { public: - bbc_stl1770_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stl1770_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_stl1770_1_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + bbc_stl1770_1_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -67,10 +67,10 @@ protected: class bbc_stl1770_2_device : public bbc_stlfdc_device { public: - bbc_stl1770_2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stl1770_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_stl1770_2_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + bbc_stl1770_2_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -87,7 +87,7 @@ class bbc_stldfdc_1_device : public bbc_stl1770_1_device { public: // construction/destruction - bbc_stldfdc_1_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bbc_stldfdc_1_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/fdc/udm.cpp b/src/devices/bus/bbc/fdc/udm.cpp index dc078aa8dfa..dfcc4f801fa 100644 --- a/src/devices/bus/bbc/fdc/udm.cpp +++ b/src/devices/bus/bbc/fdc/udm.cpp @@ -85,7 +85,7 @@ const tiny_rom_entry *bbc_udm_device::device_rom_region() const // bbc_udm_device - constructor //------------------------------------------------- -bbc_udm_device::bbc_udm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_udm_device::bbc_udm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_UDM, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) , m_fdc(*this, "wd2793") diff --git a/src/devices/bus/bbc/fdc/udm.h b/src/devices/bus/bbc/fdc/udm.h index 8e21917efb8..06a7605d83f 100644 --- a/src/devices/bus/bbc/fdc/udm.h +++ b/src/devices/bus/bbc/fdc/udm.h @@ -28,7 +28,7 @@ class bbc_udm_device : { public: // construction/destruction - bbc_udm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_udm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/fdc/watford.cpp b/src/devices/bus/bbc/fdc/watford.cpp index 7f058c41838..2d4b9d6fb28 100644 --- a/src/devices/bus/bbc/fdc/watford.cpp +++ b/src/devices/bus/bbc/fdc/watford.cpp @@ -110,13 +110,13 @@ const tiny_rom_entry *bbc_weddb3_device::device_rom_region() const // bbc_watfordfdc_device - constructor //------------------------------------------------- -bbc_watfordfdc_device::bbc_watfordfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_watfordfdc_device::bbc_watfordfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_fdc_interface(mconfig, *this) { } -bbc_weddb2_device::bbc_weddb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_weddb2_device::bbc_weddb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_watfordfdc_device(mconfig, BBC_WEDDB2, tag, owner, clock) , m_fdc(*this, "wd1772") , m_floppy(*this, "wd1772:%u", 0) @@ -124,7 +124,7 @@ bbc_weddb2_device::bbc_weddb2_device(const machine_config &mconfig, const char * { } -bbc_weddb3_device::bbc_weddb3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_weddb3_device::bbc_weddb3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_watfordfdc_device(mconfig, BBC_WEDDB3, tag, owner, clock) , m_fdc(*this, "wd1770") , m_floppy(*this, "wd1770:%u", 0) diff --git a/src/devices/bus/bbc/fdc/watford.h b/src/devices/bus/bbc/fdc/watford.h index 37a635d2afb..51effebb2a4 100644 --- a/src/devices/bus/bbc/fdc/watford.h +++ b/src/devices/bus/bbc/fdc/watford.h @@ -30,13 +30,13 @@ public: protected: // construction/destruction - bbc_watfordfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_watfordfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; class bbc_weddb2_device : public bbc_watfordfdc_device { public: - bbc_weddb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_weddb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -58,7 +58,7 @@ private: class bbc_weddb3_device : public bbc_watfordfdc_device { public: - bbc_weddb3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_weddb3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/aries.cpp b/src/devices/bus/bbc/internal/aries.cpp index 1ee29009129..705374042be 100644 --- a/src/devices/bus/bbc/internal/aries.cpp +++ b/src/devices/bus/bbc/internal/aries.cpp @@ -103,24 +103,24 @@ const tiny_rom_entry *bbc_ariesb32_device::device_rom_region() const // bbc_aries_device - constructor //------------------------------------------------- -bbc_ariesb12_device::bbc_ariesb12_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_ariesb12_device::bbc_ariesb12_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) { } -bbc_ariesb12_device::bbc_ariesb12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ariesb12_device::bbc_ariesb12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_ariesb12_device(mconfig, BBC_ARIESB12, tag, owner, clock) { } -bbc_ariesb20_device::bbc_ariesb20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ariesb20_device::bbc_ariesb20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_ariesb12_device(mconfig, BBC_ARIESB20, tag, owner, clock) { } -bbc_ariesb32_device::bbc_ariesb32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ariesb32_device::bbc_ariesb32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_ariesb12_device(mconfig, BBC_ARIESB32, tag, owner, clock) , m_aries_rom(*this, "aries_rom") { diff --git a/src/devices/bus/bbc/internal/aries.h b/src/devices/bus/bbc/internal/aries.h index 9dc7383ff21..a61cd9119d3 100644 --- a/src/devices/bus/bbc/internal/aries.h +++ b/src/devices/bus/bbc/internal/aries.h @@ -30,10 +30,10 @@ class bbc_ariesb12_device : { public: // construction/destruction - bbc_ariesb12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ariesb12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_ariesb12_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_ariesb12_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -56,7 +56,7 @@ class bbc_ariesb20_device : public bbc_ariesb12_device { public: // construction/destruction - bbc_ariesb20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ariesb20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -82,7 +82,7 @@ class bbc_ariesb32_device : public bbc_ariesb12_device { public: // construction/destruction - bbc_ariesb32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ariesb32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/atpl.cpp b/src/devices/bus/bbc/internal/atpl.cpp index 94c5f8459b0..635785c8bc6 100644 --- a/src/devices/bus/bbc/internal/atpl.cpp +++ b/src/devices/bus/bbc/internal/atpl.cpp @@ -94,7 +94,7 @@ void bbc_atplswp_device::device_add_mconfig(machine_config &config) // bbc_atplsw_device - constructor //------------------------------------------------- -bbc_atplsw_device::bbc_atplsw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_atplsw_device::bbc_atplsw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_ATPLSW, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) @@ -102,7 +102,7 @@ bbc_atplsw_device::bbc_atplsw_device(const machine_config &mconfig, const char * { } -bbc_atplswp_device::bbc_atplswp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_atplswp_device::bbc_atplswp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_ATPLSWP, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) diff --git a/src/devices/bus/bbc/internal/atpl.h b/src/devices/bus/bbc/internal/atpl.h index fe10ebb3a76..37a78d23d29 100644 --- a/src/devices/bus/bbc/internal/atpl.h +++ b/src/devices/bus/bbc/internal/atpl.h @@ -27,7 +27,7 @@ class bbc_atplsw_device : { public: // construction/destruction - bbc_atplsw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_atplsw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -56,7 +56,7 @@ class bbc_atplswp_device : { public: // construction/destruction - bbc_atplswp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_atplswp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/cumana68k.cpp b/src/devices/bus/bbc/internal/cumana68k.cpp index 19e71ee8692..d6245606707 100644 --- a/src/devices/bus/bbc/internal/cumana68k.cpp +++ b/src/devices/bus/bbc/internal/cumana68k.cpp @@ -96,7 +96,7 @@ void bbc_cumana68k_device::device_add_mconfig(machine_config &config) downcast(*device).req_callback().append(m_pia_sasi, FUNC(pia6821_device::ca1_w)); }); - PIA6821(config, m_pia_sasi, 0); + PIA6821(config, m_pia_sasi); m_pia_sasi->readpa_handler().set(m_sasi, FUNC(nscsi_callback_device::read)); m_pia_sasi->writepa_handler().set(m_sasi, FUNC(nscsi_callback_device::write)); m_pia_sasi->writepb_handler().set(FUNC(bbc_cumana68k_device::pia_sasi_pb_w)); @@ -106,7 +106,7 @@ void bbc_cumana68k_device::device_add_mconfig(machine_config &config) m_pia_sasi->irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); m_pia_sasi->irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_pia_rtc, 0); + PIA6821(config, m_pia_rtc); m_pia_rtc->readpa_handler().set([this]() { return m_mc146818_data; }); m_pia_rtc->writepa_handler().set([this](uint8_t data) { m_mc146818_data = data; }); m_pia_rtc->writepb_handler().set(FUNC(bbc_cumana68k_device::pia_rtc_pb_w)); @@ -142,7 +142,7 @@ const tiny_rom_entry *bbc_cumana68k_device::device_rom_region() const // bbc_cumana68k_device - constructor //------------------------------------------------- -bbc_cumana68k_device::bbc_cumana68k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_cumana68k_device::bbc_cumana68k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_CUMANA68K, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_m68008(*this, "m68008") diff --git a/src/devices/bus/bbc/internal/cumana68k.h b/src/devices/bus/bbc/internal/cumana68k.h index 84f545db295..2ff26571974 100644 --- a/src/devices/bus/bbc/internal/cumana68k.h +++ b/src/devices/bus/bbc/internal/cumana68k.h @@ -32,7 +32,7 @@ class bbc_cumana68k_device : { public: // construction/destruction - bbc_cumana68k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cumana68k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void pia_rtc_pb_w(uint8_t data); void pia_sasi_pb_w(uint8_t data); diff --git a/src/devices/bus/bbc/internal/integrab.cpp b/src/devices/bus/bbc/internal/integrab.cpp index 6d69b9c34c0..b6fe1c052c1 100644 --- a/src/devices/bus/bbc/internal/integrab.cpp +++ b/src/devices/bus/bbc/internal/integrab.cpp @@ -107,7 +107,7 @@ const tiny_rom_entry *bbc_integrab_device::device_rom_region() const // bbc_integrab_device - constructor //------------------------------------------------- -bbc_integrab_device::bbc_integrab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_integrab_device::bbc_integrab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_INTEGRAB, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_ibos(*this, "ibos") diff --git a/src/devices/bus/bbc/internal/integrab.h b/src/devices/bus/bbc/internal/integrab.h index 679bdc44526..a804ec40190 100644 --- a/src/devices/bus/bbc/internal/integrab.h +++ b/src/devices/bus/bbc/internal/integrab.h @@ -25,7 +25,7 @@ class bbc_integrab_device : { public: // construction/destruction - bbc_integrab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_integrab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/internal.cpp b/src/devices/bus/bbc/internal/internal.cpp index a365b5729dc..1442b0bf5fc 100644 --- a/src/devices/bus/bbc/internal/internal.cpp +++ b/src/devices/bus/bbc/internal/internal.cpp @@ -52,7 +52,7 @@ device_bbc_internal_interface::device_bbc_internal_interface(const machine_confi // bbc_internal_slot_device - constructor //------------------------------------------------- -bbc_internal_slot_device::bbc_internal_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_internal_slot_device::bbc_internal_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_INTERNAL_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_irq_handler(*this) diff --git a/src/devices/bus/bbc/internal/internal.h b/src/devices/bus/bbc/internal/internal.h index 3042dd30a0b..1ffdb0186fa 100644 --- a/src/devices/bus/bbc/internal/internal.h +++ b/src/devices/bus/bbc/internal/internal.h @@ -60,7 +60,7 @@ class bbc_internal_slot_device : public device_t, public device_single_card_slot public: // construction/destruction template - bbc_internal_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + bbc_internal_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : bbc_internal_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -69,7 +69,7 @@ public: set_fixed(false); } - bbc_internal_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_internal_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/bus/bbc/internal/memex.cpp b/src/devices/bus/bbc/internal/memex.cpp index 809313e4c68..d49dca9f09f 100644 --- a/src/devices/bus/bbc/internal/memex.cpp +++ b/src/devices/bus/bbc/internal/memex.cpp @@ -48,7 +48,7 @@ const tiny_rom_entry *bbc_memexb20_device::device_rom_region() const // bbc_memexb20_device - constructor //------------------------------------------------- -bbc_memexb20_device::bbc_memexb20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_memexb20_device::bbc_memexb20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MEMEXB20, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_shadow(false) diff --git a/src/devices/bus/bbc/internal/memex.h b/src/devices/bus/bbc/internal/memex.h index 1e4f07bcb16..6ab35c7ba5a 100644 --- a/src/devices/bus/bbc/internal/memex.h +++ b/src/devices/bus/bbc/internal/memex.h @@ -21,7 +21,7 @@ class bbc_memexb20_device : public device_t, public device_bbc_internal_interfac { public: // construction/destruction - bbc_memexb20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_memexb20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/morleyaa.cpp b/src/devices/bus/bbc/internal/morleyaa.cpp index e01336c3b5c..f93a886109f 100644 --- a/src/devices/bus/bbc/internal/morleyaa.cpp +++ b/src/devices/bus/bbc/internal/morleyaa.cpp @@ -71,7 +71,7 @@ const tiny_rom_entry *bbc_morleyaa_device::device_rom_region() const // bbc_morleyaa_device - constructor //------------------------------------------------- -bbc_morleyaa_device::bbc_morleyaa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_morleyaa_device::bbc_morleyaa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MORLEYAA, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_aa_rom(*this, "aa_rom") diff --git a/src/devices/bus/bbc/internal/morleyaa.h b/src/devices/bus/bbc/internal/morleyaa.h index f2debcff982..0d26f2b45c8 100644 --- a/src/devices/bus/bbc/internal/morleyaa.h +++ b/src/devices/bus/bbc/internal/morleyaa.h @@ -23,7 +23,7 @@ class bbc_morleyaa_device : { public: // construction/destruction - bbc_morleyaa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_morleyaa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/overlay.cpp b/src/devices/bus/bbc/internal/overlay.cpp index c46a280a316..f5959af0196 100644 --- a/src/devices/bus/bbc/internal/overlay.cpp +++ b/src/devices/bus/bbc/internal/overlay.cpp @@ -87,7 +87,7 @@ void bbc_overlay_device::device_add_mconfig(machine_config &config) // bbc_overlay_device - constructor //------------------------------------------------- -bbc_overlay_device::bbc_overlay_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_overlay_device::bbc_overlay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_OVERLAY, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) diff --git a/src/devices/bus/bbc/internal/overlay.h b/src/devices/bus/bbc/internal/overlay.h index 3800687f5ac..6f1ac8bad30 100644 --- a/src/devices/bus/bbc/internal/overlay.h +++ b/src/devices/bus/bbc/internal/overlay.h @@ -25,7 +25,7 @@ class bbc_overlay_device : { public: // construction/destruction - bbc_overlay_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_overlay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/peartree.cpp b/src/devices/bus/bbc/internal/peartree.cpp index 49281731097..8953c43cdfe 100644 --- a/src/devices/bus/bbc/internal/peartree.cpp +++ b/src/devices/bus/bbc/internal/peartree.cpp @@ -101,19 +101,19 @@ void bbc_mr4800_device::device_add_mconfig(machine_config &config) // bbc_mr3000_device - constructor //------------------------------------------------- -bbc_mr3000_device::bbc_mr3000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_mr3000_device::bbc_mr3000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) { } -bbc_mr3000_device::bbc_mr3000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mr3000_device::bbc_mr3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_mr3000_device(mconfig, BBC_MR3000, tag, owner, clock) { } -bbc_mr4200_device::bbc_mr4200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mr4200_device::bbc_mr4200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_mr3000_device(mconfig, BBC_MR4200, tag, owner, clock) , m_wp(*this, "wp") { @@ -123,7 +123,7 @@ bbc_mr4200_device::bbc_mr4200_device(const machine_config &mconfig, const char * // bbc_mr4300_device - constructor //------------------------------------------------- -bbc_mr4300_device::bbc_mr4300_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_mr4300_device::bbc_mr4300_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) @@ -131,12 +131,12 @@ bbc_mr4300_device::bbc_mr4300_device(const machine_config &mconfig, device_type { } -bbc_mr4300_device::bbc_mr4300_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mr4300_device::bbc_mr4300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_mr4300_device(mconfig, BBC_MR4300, tag, owner, clock) { } -bbc_mr4800_device::bbc_mr4800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_mr4800_device::bbc_mr4800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_mr4300_device(mconfig, BBC_MR4800, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/internal/peartree.h b/src/devices/bus/bbc/internal/peartree.h index 9f9ed683396..6b893fc3522 100644 --- a/src/devices/bus/bbc/internal/peartree.h +++ b/src/devices/bus/bbc/internal/peartree.h @@ -25,10 +25,10 @@ class bbc_mr3000_device : { public: // construction/destruction - bbc_mr3000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mr3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_mr3000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_mr3000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -51,7 +51,7 @@ class bbc_mr4200_device : public bbc_mr3000_device { public: // construction/destruction - bbc_mr4200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mr4200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -70,10 +70,10 @@ class bbc_mr4300_device : { public: // construction/destruction - bbc_mr4300_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mr4300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_mr4300_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_mr4300_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -98,7 +98,7 @@ class bbc_mr4800_device : public bbc_mr4300_device { public: // construction/destruction - bbc_mr4800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_mr4800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/internal/ramamp.cpp b/src/devices/bus/bbc/internal/ramamp.cpp index 586159377aa..24c95856307 100644 --- a/src/devices/bus/bbc/internal/ramamp.cpp +++ b/src/devices/bus/bbc/internal/ramamp.cpp @@ -65,7 +65,7 @@ void bbc_ramamp_device::device_add_mconfig(machine_config &config) // bbc_ramamp_device - constructor //------------------------------------------------- -bbc_ramamp_device::bbc_ramamp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ramamp_device::bbc_ramamp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_RAMAMP, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) diff --git a/src/devices/bus/bbc/internal/ramamp.h b/src/devices/bus/bbc/internal/ramamp.h index d8f9b62408b..39870217a06 100644 --- a/src/devices/bus/bbc/internal/ramamp.h +++ b/src/devices/bus/bbc/internal/ramamp.h @@ -25,7 +25,7 @@ class bbc_ramamp_device : { public: // construction/destruction - bbc_ramamp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ramamp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/raven20.cpp b/src/devices/bus/bbc/internal/raven20.cpp index f6bb3efdb4b..86f371f259d 100644 --- a/src/devices/bus/bbc/internal/raven20.cpp +++ b/src/devices/bus/bbc/internal/raven20.cpp @@ -51,7 +51,7 @@ const tiny_rom_entry *bbc_raven20_device::device_rom_region() const // bbc_raven20_device - constructor //------------------------------------------------- -bbc_raven20_device::bbc_raven20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_raven20_device::bbc_raven20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_RAVEN20, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) { diff --git a/src/devices/bus/bbc/internal/raven20.h b/src/devices/bus/bbc/internal/raven20.h index 0e04137afa6..3962b280690 100644 --- a/src/devices/bus/bbc/internal/raven20.h +++ b/src/devices/bus/bbc/internal/raven20.h @@ -23,7 +23,7 @@ class bbc_raven20_device : { public: // construction/destruction - bbc_raven20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_raven20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/romex.cpp b/src/devices/bus/bbc/internal/romex.cpp index 9d7932db81f..60eeb3b8e49 100644 --- a/src/devices/bus/bbc/internal/romex.cpp +++ b/src/devices/bus/bbc/internal/romex.cpp @@ -53,7 +53,7 @@ void bbc_romex13_device::device_add_mconfig(machine_config &config) // bbc_romex13_device - constructor //------------------------------------------------- -bbc_romex13_device::bbc_romex13_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_romex13_device::bbc_romex13_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_ROMEX13, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) diff --git a/src/devices/bus/bbc/internal/romex.h b/src/devices/bus/bbc/internal/romex.h index b9542937ebf..8da974be33e 100644 --- a/src/devices/bus/bbc/internal/romex.h +++ b/src/devices/bus/bbc/internal/romex.h @@ -25,7 +25,7 @@ class bbc_romex13_device : { public: // construction/destruction - bbc_romex13_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_romex13_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/stl2m128.cpp b/src/devices/bus/bbc/internal/stl2m128.cpp index 46b595aedfa..dd1d6e14a8d 100644 --- a/src/devices/bus/bbc/internal/stl2m128.cpp +++ b/src/devices/bus/bbc/internal/stl2m128.cpp @@ -87,7 +87,7 @@ const tiny_rom_entry *bbc_stl2m128_device::device_rom_region() const // bbc_stl2m128_device - constructor //------------------------------------------------- -bbc_stl2m128_device::bbc_stl2m128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stl2m128_device::bbc_stl2m128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_STL2M128, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) diff --git a/src/devices/bus/bbc/internal/stl2m128.h b/src/devices/bus/bbc/internal/stl2m128.h index 2c5f327ab19..bb61e166c2b 100644 --- a/src/devices/bus/bbc/internal/stl2m128.h +++ b/src/devices/bus/bbc/internal/stl2m128.h @@ -23,7 +23,7 @@ class bbc_stl2m128_device : { public: // construction/destruction - bbc_stl2m128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stl2m128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/stl4m32.cpp b/src/devices/bus/bbc/internal/stl4m32.cpp index 5d3782c36ac..fb4703d5fdf 100644 --- a/src/devices/bus/bbc/internal/stl4m32.cpp +++ b/src/devices/bus/bbc/internal/stl4m32.cpp @@ -86,7 +86,7 @@ const tiny_rom_entry *bbc_stl4m32_device::device_rom_region() const // bbc_stl4m32_device - constructor //------------------------------------------------- -bbc_stl4m32_device::bbc_stl4m32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stl4m32_device::bbc_stl4m32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_STL4M32, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) diff --git a/src/devices/bus/bbc/internal/stl4m32.h b/src/devices/bus/bbc/internal/stl4m32.h index ac939d6d4ff..f45d24876d5 100644 --- a/src/devices/bus/bbc/internal/stl4m32.h +++ b/src/devices/bus/bbc/internal/stl4m32.h @@ -25,7 +25,7 @@ class bbc_stl4m32_device : { public: // construction/destruction - bbc_stl4m32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stl4m32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(clock_switch); diff --git a/src/devices/bus/bbc/internal/stlswr.cpp b/src/devices/bus/bbc/internal/stlswr.cpp index f4992197453..bdbf1c17d29 100644 --- a/src/devices/bus/bbc/internal/stlswr.cpp +++ b/src/devices/bus/bbc/internal/stlswr.cpp @@ -94,29 +94,29 @@ const tiny_rom_entry *bbc_stlswr_device::device_rom_region() const // bbc_stlswr_device - constructor //------------------------------------------------- -bbc_stlswr_device::bbc_stlswr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_stlswr_device::bbc_stlswr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) { } -bbc_stlswr16_device::bbc_stlswr16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stlswr16_device::bbc_stlswr16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_stlswr_device(mconfig, BBC_STLSWR16, tag, owner, clock) { } -bbc_stlswr32_device::bbc_stlswr32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stlswr32_device::bbc_stlswr32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_stlswr_device(mconfig, BBC_STLSWR32, tag, owner, clock) { } -bbc_stlswr64_device::bbc_stlswr64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stlswr64_device::bbc_stlswr64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_stlswr_device(mconfig, BBC_STLSWR64, tag, owner, clock) { } -bbc_stlswr128_device::bbc_stlswr128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stlswr128_device::bbc_stlswr128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_stlswr_device(mconfig, BBC_STLSWR128, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/internal/stlswr.h b/src/devices/bus/bbc/internal/stlswr.h index db7e263ce28..3ff46bfd349 100644 --- a/src/devices/bus/bbc/internal/stlswr.h +++ b/src/devices/bus/bbc/internal/stlswr.h @@ -25,10 +25,10 @@ class bbc_stlswr_device : { public: // construction/destruction - bbc_stlswr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stlswr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_stlswr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_stlswr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class bbc_stlswr16_device : public bbc_stlswr_device { public: // construction/destruction - bbc_stlswr16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stlswr16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -65,7 +65,7 @@ class bbc_stlswr32_device : public bbc_stlswr_device { public: // construction/destruction - bbc_stlswr32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stlswr32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -77,7 +77,7 @@ class bbc_stlswr64_device : public bbc_stlswr_device { public: // construction/destruction - bbc_stlswr64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stlswr64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -89,7 +89,7 @@ class bbc_stlswr128_device : public bbc_stlswr_device { public: // construction/destruction - bbc_stlswr128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stlswr128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/internal/we32kram.cpp b/src/devices/bus/bbc/internal/we32kram.cpp index 4e0e084e655..cfe6a252d24 100644 --- a/src/devices/bus/bbc/internal/we32kram.cpp +++ b/src/devices/bus/bbc/internal/we32kram.cpp @@ -56,7 +56,7 @@ const tiny_rom_entry *bbc_we32kram_device::device_rom_region() const // bbc_we32kram_device - constructor //------------------------------------------------- -bbc_we32kram_device::bbc_we32kram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_we32kram_device::bbc_we32kram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_WE32KRAM, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) { diff --git a/src/devices/bus/bbc/internal/we32kram.h b/src/devices/bus/bbc/internal/we32kram.h index aa10005292b..d5fc6a0a1f5 100644 --- a/src/devices/bus/bbc/internal/we32kram.h +++ b/src/devices/bus/bbc/internal/we32kram.h @@ -25,7 +25,7 @@ class bbc_we32kram_device : { public: // construction/destruction - bbc_we32kram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_we32kram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/werom.cpp b/src/devices/bus/bbc/internal/werom.cpp index bc38500dee8..90937325851 100644 --- a/src/devices/bus/bbc/internal/werom.cpp +++ b/src/devices/bus/bbc/internal/werom.cpp @@ -94,20 +94,20 @@ void bbc_we13rom_device::device_add_mconfig(machine_config &config) // bbc_werom_device - constructor //------------------------------------------------- -bbc_werom_device::bbc_werom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_werom_device::bbc_werom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) { } -bbc_we12rom_device::bbc_we12rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_we12rom_device::bbc_we12rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_werom_device(mconfig, BBC_WE12ROM, tag, owner, clock) , m_wp(*this, "wp") { } -bbc_we13rom_device::bbc_we13rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_we13rom_device::bbc_we13rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_werom_device(mconfig, BBC_WE13ROM, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/internal/werom.h b/src/devices/bus/bbc/internal/werom.h index 4e95ba120d8..87985297cf4 100644 --- a/src/devices/bus/bbc/internal/werom.h +++ b/src/devices/bus/bbc/internal/werom.h @@ -27,10 +27,10 @@ class bbc_werom_device : { public: // construction/destruction - bbc_werom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_werom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_werom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_werom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); optional_device_array m_rom; @@ -45,7 +45,7 @@ class bbc_we12rom_device : public bbc_werom_device { public: // construction/destruction - bbc_we12rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_we12rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -67,7 +67,7 @@ class bbc_we13rom_device : public bbc_werom_device { public: // construction/destruction - bbc_we13rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_we13rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/internal/weromram.cpp b/src/devices/bus/bbc/internal/weromram.cpp index ceb8be3e270..cf429706721 100644 --- a/src/devices/bus/bbc/internal/weromram.cpp +++ b/src/devices/bus/bbc/internal/weromram.cpp @@ -50,7 +50,7 @@ void bbc_weromram_device::device_add_mconfig(machine_config &config) // bbc_weromram_device - constructor //------------------------------------------------- -bbc_weromram_device::bbc_weromram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_weromram_device::bbc_weromram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_WEROMRAM, tag, owner, clock) , device_bbc_internal_interface(mconfig, *this) , m_rom(*this, "romslot%u", 0U) diff --git a/src/devices/bus/bbc/internal/weromram.h b/src/devices/bus/bbc/internal/weromram.h index b85c9d031ab..fa853944e51 100644 --- a/src/devices/bus/bbc/internal/weromram.h +++ b/src/devices/bus/bbc/internal/weromram.h @@ -25,7 +25,7 @@ class bbc_weromram_device : { public: // construction/destruction - bbc_weromram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_weromram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/joyport/joyport.cpp b/src/devices/bus/bbc/joyport/joyport.cpp index 59173030724..161b32a0a0d 100644 --- a/src/devices/bus/bbc/joyport/joyport.cpp +++ b/src/devices/bus/bbc/joyport/joyport.cpp @@ -40,7 +40,7 @@ device_bbc_joyport_interface::device_bbc_joyport_interface(const machine_config // bbcmc_joyport_slot_device - constructor //------------------------------------------------- -bbc_joyport_slot_device::bbc_joyport_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_joyport_slot_device::bbc_joyport_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_JOYPORT_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_device(nullptr) diff --git a/src/devices/bus/bbc/joyport/joyport.h b/src/devices/bus/bbc/joyport/joyport.h index 15d81243d84..94814633a34 100644 --- a/src/devices/bus/bbc/joyport/joyport.h +++ b/src/devices/bus/bbc/joyport/joyport.h @@ -55,7 +55,7 @@ public: set_fixed(false); } - bbc_joyport_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + bbc_joyport_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto cb1_handler() { return m_cb1_handler.bind(); } diff --git a/src/devices/bus/bbc/joyport/joystick.cpp b/src/devices/bus/bbc/joyport/joystick.cpp index 1f5a9f89c98..527c7668e10 100644 --- a/src/devices/bus/bbc/joyport/joystick.cpp +++ b/src/devices/bus/bbc/joyport/joystick.cpp @@ -48,7 +48,7 @@ ioport_constructor bbcmc_joystick_device::device_input_ports() const // bbcmc_joystick_device - constructor //------------------------------------------------- -bbcmc_joystick_device::bbcmc_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbcmc_joystick_device::bbcmc_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBCMC_JOYSTICK, tag, owner, clock) , device_bbc_joyport_interface(mconfig, *this) , m_joy(*this, "JOY") diff --git a/src/devices/bus/bbc/joyport/joystick.h b/src/devices/bus/bbc/joyport/joystick.h index b30ef3ae51c..50872e7f810 100644 --- a/src/devices/bus/bbc/joyport/joystick.h +++ b/src/devices/bus/bbc/joyport/joystick.h @@ -26,7 +26,7 @@ class bbcmc_joystick_device : { public: // construction/destruction - bbcmc_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbcmc_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/bbc/joyport/mouse.cpp b/src/devices/bus/bbc/joyport/mouse.cpp index 1cd91caeaa5..ae8fe92b348 100644 --- a/src/devices/bus/bbc/joyport/mouse.cpp +++ b/src/devices/bus/bbc/joyport/mouse.cpp @@ -59,7 +59,7 @@ ioport_constructor bbcmc_mouse_device::device_input_ports() const // bbcmc_mouse_device - constructor //------------------------------------------------- -bbcmc_mouse_device::bbcmc_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbcmc_mouse_device::bbcmc_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBCMC_MOUSE, tag, owner, clock) , device_bbc_joyport_interface(mconfig, *this) , m_mouse_x(*this, "mouse_x") diff --git a/src/devices/bus/bbc/joyport/mouse.h b/src/devices/bus/bbc/joyport/mouse.h index 0e2c6947104..6347d6bbb3f 100644 --- a/src/devices/bus/bbc/joyport/mouse.h +++ b/src/devices/bus/bbc/joyport/mouse.h @@ -25,7 +25,7 @@ class bbcmc_mouse_device : { public: // construction/destruction - bbcmc_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbcmc_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/modem/meup.cpp b/src/devices/bus/bbc/modem/meup.cpp index 128db2b0297..eb24a25e66c 100644 --- a/src/devices/bus/bbc/modem/meup.cpp +++ b/src/devices/bus/bbc/modem/meup.cpp @@ -45,7 +45,7 @@ void bbc_meup_device::device_add_mconfig(machine_config &config) // bbc_meup_device - constructor //------------------------------------------------- -bbc_meup_device::bbc_meup_device(const machine_config &mconfig, const char* tag, device_t* owner, uint32_t clock) +bbc_meup_device::bbc_meup_device(const machine_config &mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, BBC_MEUP, tag, owner, clock) , device_bbc_modem_interface(mconfig, *this) , m_via(*this, "via") diff --git a/src/devices/bus/bbc/modem/meup.h b/src/devices/bus/bbc/modem/meup.h index 95d0a536c50..4be0245071d 100644 --- a/src/devices/bus/bbc/modem/meup.h +++ b/src/devices/bus/bbc/modem/meup.h @@ -22,7 +22,7 @@ class bbc_meup_device: public device_t, public device_bbc_modem_interface { public: // construction/destruction - bbc_meup_device(const machine_config &mconfig, const char* tag, device_t* owner, uint32_t clock); + bbc_meup_device(const machine_config &mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/modem/modem.cpp b/src/devices/bus/bbc/modem/modem.cpp index e3b4d164fac..43af8978c4b 100644 --- a/src/devices/bus/bbc/modem/modem.cpp +++ b/src/devices/bus/bbc/modem/modem.cpp @@ -41,7 +41,7 @@ device_bbc_modem_interface::device_bbc_modem_interface(const machine_config &mco // bbc_modem_slot_device - constructor //------------------------------------------------- -bbc_modem_slot_device::bbc_modem_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_modem_slot_device::bbc_modem_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_MODEM_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_card(nullptr) diff --git a/src/devices/bus/bbc/modem/modem.h b/src/devices/bus/bbc/modem/modem.h index 6c1e7840637..17d7076aa28 100644 --- a/src/devices/bus/bbc/modem/modem.h +++ b/src/devices/bus/bbc/modem/modem.h @@ -51,7 +51,7 @@ class bbc_modem_slot_device : public device_t, public device_single_card_slot_in public: // construction/destruction template - bbc_modem_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + bbc_modem_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : bbc_modem_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -60,7 +60,7 @@ public: set_fixed(false); } - bbc_modem_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + bbc_modem_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // callbacks auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/bus/bbc/modem/scsiaiv.cpp b/src/devices/bus/bbc/modem/scsiaiv.cpp index 603b36c9a8a..c4c3e5243d5 100644 --- a/src/devices/bus/bbc/modem/scsiaiv.cpp +++ b/src/devices/bus/bbc/modem/scsiaiv.cpp @@ -54,19 +54,19 @@ void bbc_scsiaiv_device::device_add_mconfig(machine_config& config) // bbc_scsiaiv_device - constructor //------------------------------------------------- -bbc_scsiaiv_device::bbc_scsiaiv_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) +bbc_scsiaiv_device::bbc_scsiaiv_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_modem_interface(mconfig, *this) , m_scsi(*this, "scsi:7:scsicb") { } -bbc_scsiaiv_device::bbc_scsiaiv_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bbc_scsiaiv_device::bbc_scsiaiv_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : bbc_scsiaiv_device(mconfig, BBC_SCSIAIV, tag, owner, clock) { } -//bbc_vp415_device::bbc_vp415_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +//bbc_vp415_device::bbc_vp415_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) // : bbc_scsiaiv_device(mconfig, BBC_VP415, tag, owner, clock) //{ //} diff --git a/src/devices/bus/bbc/modem/scsiaiv.h b/src/devices/bus/bbc/modem/scsiaiv.h index 0b244bb71e3..8cbb8602d9b 100644 --- a/src/devices/bus/bbc/modem/scsiaiv.h +++ b/src/devices/bus/bbc/modem/scsiaiv.h @@ -24,13 +24,13 @@ class bbc_scsiaiv_device: { public: // construction/destruction - bbc_scsiaiv_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bbc_scsiaiv_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(bsy_w); DECLARE_WRITE_LINE_MEMBER(req_w); protected: - bbc_scsiaiv_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + bbc_scsiaiv_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -55,7 +55,7 @@ private: //{ //public: // // construction/destruction -// bbc_vp415_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); +// bbc_vp415_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); // //protected: // // optional information overrides diff --git a/src/devices/bus/bbc/rom/datagem.cpp b/src/devices/bus/bbc/rom/datagem.cpp index 11f2cfdb631..d516d2d1487 100644 --- a/src/devices/bus/bbc/rom/datagem.cpp +++ b/src/devices/bus/bbc/rom/datagem.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(BBC_DATAGEM, bbc_datagem_device, "bbc_datagem", "Gemini DataG // bbc_datagem_device - constructor //------------------------------------------------- -bbc_datagem_device::bbc_datagem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_datagem_device::bbc_datagem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_DATAGEM, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) , m_bank(0) diff --git a/src/devices/bus/bbc/rom/datagem.h b/src/devices/bus/bbc/rom/datagem.h index 0d78f754e44..f5c1bb29dbf 100644 --- a/src/devices/bus/bbc/rom/datagem.h +++ b/src/devices/bus/bbc/rom/datagem.h @@ -25,7 +25,7 @@ class bbc_datagem_device : public device_t, { public: // construction/destruction - bbc_datagem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_datagem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/rom/dfs.cpp b/src/devices/bus/bbc/rom/dfs.cpp index 7395b31dae9..4dc8dd6bb0d 100644 --- a/src/devices/bus/bbc/rom/dfs.cpp +++ b/src/devices/bus/bbc/rom/dfs.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(BBC_DFSE00, bbc_dfse00_device, "bbc_dfse00", "BBC Micro E00 D // bbc_rom_device - constructor //------------------------------------------------- -bbc_dfse00_device::bbc_dfse00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_dfse00_device::bbc_dfse00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_DFSE00, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) { diff --git a/src/devices/bus/bbc/rom/dfs.h b/src/devices/bus/bbc/rom/dfs.h index 13d6d94d079..8f5824d1146 100644 --- a/src/devices/bus/bbc/rom/dfs.h +++ b/src/devices/bus/bbc/rom/dfs.h @@ -23,7 +23,7 @@ class bbc_dfse00_device : public device_t, public device_bbc_rom_interface { public: // construction/destruction - bbc_dfse00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_dfse00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/rom/genie.cpp b/src/devices/bus/bbc/rom/genie.cpp index 28b9b42644a..c3b1ef8afc0 100644 --- a/src/devices/bus/bbc/rom/genie.cpp +++ b/src/devices/bus/bbc/rom/genie.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(BBC_PMSGENIE, bbc_pmsgenie_device, "bbc_pmsgenie", "PMS Genie // bbc_palprom_device - constructor //------------------------------------------------- -bbc_pmsgenie_device::bbc_pmsgenie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_pmsgenie_device::bbc_pmsgenie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_PMSGENIE, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) , m_write_latch(0) diff --git a/src/devices/bus/bbc/rom/genie.h b/src/devices/bus/bbc/rom/genie.h index 82813b2b166..81ffb542e9b 100644 --- a/src/devices/bus/bbc/rom/genie.h +++ b/src/devices/bus/bbc/rom/genie.h @@ -25,7 +25,7 @@ class bbc_pmsgenie_device : public device_t, { public: // construction/destruction - bbc_pmsgenie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_pmsgenie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/rom/nvram.cpp b/src/devices/bus/bbc/rom/nvram.cpp index 0d24f30c8bd..686b2afcc6a 100644 --- a/src/devices/bus/bbc/rom/nvram.cpp +++ b/src/devices/bus/bbc/rom/nvram.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(BBC_NVRAM, bbc_nvram_device, "bbc_nvram", "BBC Micro Sideways // bbc_nvram_device - constructor //------------------------------------------------- -bbc_nvram_device::bbc_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_nvram_device::bbc_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_NVRAM, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) { diff --git a/src/devices/bus/bbc/rom/nvram.h b/src/devices/bus/bbc/rom/nvram.h index d10025c6acd..a9134c44ac1 100644 --- a/src/devices/bus/bbc/rom/nvram.h +++ b/src/devices/bus/bbc/rom/nvram.h @@ -24,7 +24,7 @@ class bbc_nvram_device : public device_t, { public: // construction/destruction - bbc_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/rom/pal.cpp b/src/devices/bus/bbc/rom/pal.cpp index 51667f70955..80c838a1a4c 100644 --- a/src/devices/bus/bbc/rom/pal.cpp +++ b/src/devices/bus/bbc/rom/pal.cpp @@ -63,54 +63,54 @@ DEFINE_DEVICE_TYPE(BBC_PALMO2, bbc_palmo2_device, "bbc_palmo2", "Instant Mini Of // bbc_palprom_device - constructor //------------------------------------------------- -bbc_pal_device::bbc_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_pal_device::bbc_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) , m_bank(0) { } -bbc_cciword_device::bbc_cciword_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_cciword_device::bbc_cciword_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_CCIWORD, tag, owner, clock) { } -bbc_ccibase_device::bbc_ccibase_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ccibase_device::bbc_ccibase_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_CCIBASE, tag, owner, clock) { } -bbc_ccispell_device::bbc_ccispell_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ccispell_device::bbc_ccispell_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_CCISPELL, tag, owner, clock) { } -bbc_palqst_device::bbc_palqst_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_palqst_device::bbc_palqst_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_PALQST, tag, owner, clock) { } -bbc_palwap_device::bbc_palwap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_palwap_device::bbc_palwap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_PALWAP, tag, owner, clock) { } -bbc_palted_device::bbc_palted_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_palted_device::bbc_palted_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_PALTED, tag, owner, clock) { } -bbc_palabep_device::bbc_palabep_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_palabep_device::bbc_palabep_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_PALABEP, tag, owner, clock) { } -bbc_palabe_device::bbc_palabe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_palabe_device::bbc_palabe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_PALABE, tag, owner, clock) { } -bbc_palmo2_device::bbc_palmo2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_palmo2_device::bbc_palmo2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pal_device(mconfig, BBC_PALMO2, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/rom/pal.h b/src/devices/bus/bbc/rom/pal.h index 31c8dcd0d78..5fda03fd656 100644 --- a/src/devices/bus/bbc/rom/pal.h +++ b/src/devices/bus/bbc/rom/pal.h @@ -25,7 +25,7 @@ class bbc_pal_device : public device_t, { protected: // construction/destruction - bbc_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -42,7 +42,7 @@ class bbc_cciword_device : public bbc_pal_device { public: // construction/destruction - bbc_cciword_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cciword_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -55,7 +55,7 @@ class bbc_ccibase_device : public bbc_pal_device { public: // construction/destruction - bbc_ccibase_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ccibase_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -68,7 +68,7 @@ class bbc_ccispell_device : public bbc_pal_device { public: // construction/destruction - bbc_ccispell_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ccispell_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -80,7 +80,7 @@ protected: class bbc_palqst_device : public bbc_pal_device { public: - bbc_palqst_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_palqst_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -92,7 +92,7 @@ protected: class bbc_palwap_device : public bbc_pal_device { public: - bbc_palwap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_palwap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -105,7 +105,7 @@ class bbc_palted_device : public bbc_pal_device { public: // construction/destruction - bbc_palted_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_palted_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -118,7 +118,7 @@ class bbc_palabep_device : public bbc_pal_device { public: // construction/destruction - bbc_palabep_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_palabep_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -131,7 +131,7 @@ class bbc_palabe_device : public bbc_pal_device { public: // construction/destruction - bbc_palabe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_palabe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides @@ -144,7 +144,7 @@ class bbc_palmo2_device : public bbc_pal_device { public: // construction/destruction - bbc_palmo2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_palmo2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_bbc_rom_interface overrides diff --git a/src/devices/bus/bbc/rom/ram.cpp b/src/devices/bus/bbc/rom/ram.cpp index bbe5d956006..d3cb0cea3b8 100644 --- a/src/devices/bus/bbc/rom/ram.cpp +++ b/src/devices/bus/bbc/rom/ram.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(BBC_RAM, bbc_ram_device, "bbc_ram", "BBC Micro Sideways RAM") // bbc_ram_device - constructor //------------------------------------------------- -bbc_ram_device::bbc_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_ram_device::bbc_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_RAM, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) { diff --git a/src/devices/bus/bbc/rom/ram.h b/src/devices/bus/bbc/rom/ram.h index 85267147a35..adb538fce2e 100644 --- a/src/devices/bus/bbc/rom/ram.h +++ b/src/devices/bus/bbc/rom/ram.h @@ -24,7 +24,7 @@ class bbc_ram_device : public device_t, { public: // construction/destruction - bbc_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/rom/rom.cpp b/src/devices/bus/bbc/rom/rom.cpp index f419998510b..09df9d47ba1 100644 --- a/src/devices/bus/bbc/rom/rom.cpp +++ b/src/devices/bus/bbc/rom/rom.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(BBC_ROM, bbc_rom_device, "bbc_rom", "BBC Micro Sideways ROM") // bbc_rom_device - constructor //------------------------------------------------- -bbc_rom_device::bbc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_rom_device::bbc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_ROM, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) { diff --git a/src/devices/bus/bbc/rom/rom.h b/src/devices/bus/bbc/rom/rom.h index 282e5471781..4405d3d313f 100644 --- a/src/devices/bus/bbc/rom/rom.h +++ b/src/devices/bus/bbc/rom/rom.h @@ -24,7 +24,7 @@ class bbc_rom_device : public device_t, { public: // construction/destruction - bbc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/rom/rtc.cpp b/src/devices/bus/bbc/rom/rtc.cpp index 7d73c24b53e..14f58489a3c 100644 --- a/src/devices/bus/bbc/rom/rtc.cpp +++ b/src/devices/bus/bbc/rom/rtc.cpp @@ -34,7 +34,7 @@ void bbc_stlrtc_device::device_add_mconfig(machine_config &config) void bbc_pmsrtc_device::device_add_mconfig(machine_config &config) { /* Dallas DS1216 SmartWatch RAM */ - DS1315(config, m_rtc, 0); + DS1315(config, m_rtc); } //************************************************************************** @@ -45,14 +45,14 @@ void bbc_pmsrtc_device::device_add_mconfig(machine_config &config) // bbc_stlrtc_device - constructor //------------------------------------------------- -bbc_stlrtc_device::bbc_stlrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_stlrtc_device::bbc_stlrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_STLRTC, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) , m_rtc(*this, "rtc") { } -bbc_pmsrtc_device::bbc_pmsrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_pmsrtc_device::bbc_pmsrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_PMSRTC, tag, owner, clock) , device_bbc_rom_interface(mconfig, *this) , m_rtc(*this, "rtc") diff --git a/src/devices/bus/bbc/rom/rtc.h b/src/devices/bus/bbc/rom/rtc.h index d37b2174b9b..0cdb9819352 100644 --- a/src/devices/bus/bbc/rom/rtc.h +++ b/src/devices/bus/bbc/rom/rtc.h @@ -28,7 +28,7 @@ class bbc_stlrtc_device : public device_t, { public: // construction/destruction - bbc_stlrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_stlrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -50,7 +50,7 @@ class bbc_pmsrtc_device : public device_t, { public: // construction/destruction - bbc_pmsrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_pmsrtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/rom/slot.cpp b/src/devices/bus/bbc/rom/slot.cpp index b7ea541bbc2..b015306c86a 100644 --- a/src/devices/bus/bbc/rom/slot.cpp +++ b/src/devices/bus/bbc/rom/slot.cpp @@ -82,7 +82,7 @@ void device_bbc_rom_interface::nvram_alloc(uint32_t size) //------------------------------------------------- // bbc_romslot_device - constructor //------------------------------------------------- -bbc_romslot_device::bbc_romslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_romslot_device::bbc_romslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) @@ -90,12 +90,12 @@ bbc_romslot_device::bbc_romslot_device(const machine_config &mconfig, device_typ { } -bbc_romslot16_device::bbc_romslot16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_romslot16_device::bbc_romslot16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_romslot_device(mconfig, BBC_ROMSLOT16, tag, owner, clock) { } -bbc_romslot32_device::bbc_romslot32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_romslot32_device::bbc_romslot32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_romslot_device(mconfig, BBC_ROMSLOT32, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/rom/slot.h b/src/devices/bus/bbc/rom/slot.h index 986d796dd0d..c0d6b87b831 100644 --- a/src/devices/bus/bbc/rom/slot.h +++ b/src/devices/bus/bbc/rom/slot.h @@ -53,7 +53,7 @@ public: protected: // construction/destruction - bbc_romslot_device(const machine_config &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + bbc_romslot_device(const machine_config &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -81,7 +81,7 @@ public: m_slot_size = 0x4000; } - bbc_romslot16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bbc_romslot16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> bbc_romslot32_device @@ -101,7 +101,7 @@ public: m_slot_size = 0x8000; } - bbc_romslot32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bbc_romslot32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/bus/bbc/tube/tube.cpp b/src/devices/bus/bbc/tube/tube.cpp index 505b7a25030..0b833e38651 100644 --- a/src/devices/bus/bbc/tube/tube.cpp +++ b/src/devices/bus/bbc/tube/tube.cpp @@ -42,7 +42,7 @@ device_bbc_tube_interface::device_bbc_tube_interface(const machine_config &mconf // bbc_tube_slot_device - constructor //------------------------------------------------- -bbc_tube_slot_device::bbc_tube_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bbc_tube_slot_device::bbc_tube_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/bbc/tube/tube.h b/src/devices/bus/bbc/tube/tube.h index 97c18ab0d34..400292366ae 100644 --- a/src/devices/bus/bbc/tube/tube.h +++ b/src/devices/bus/bbc/tube/tube.h @@ -62,7 +62,7 @@ public: set_insert_rom(true); } - bbc_tube_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + bbc_tube_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void set_insert_rom(bool insert_rom) { m_insert_rom = insert_rom; } bool insert_rom() { return m_insert_rom; } diff --git a/src/devices/bus/bbc/tube/tube_32016.cpp b/src/devices/bus/bbc/tube/tube_32016.cpp index e62e3003998..781f84e55cd 100644 --- a/src/devices/bus/bbc/tube/tube_32016.cpp +++ b/src/devices/bus/bbc/tube/tube_32016.cpp @@ -199,7 +199,7 @@ ioport_constructor bbc_tube_32016_device::device_input_ports() const // bbc_tube_32016_device - constructor //------------------------------------------------- -bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -210,17 +210,17 @@ bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, devi { } -bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_32016_device::bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_32016_device(mconfig, BBC_TUBE_32016, tag, owner, clock) { } -bbc_tube_16032_device::bbc_tube_16032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_16032_device::bbc_tube_16032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_32016_device(mconfig, BBC_TUBE_16032, tag, owner, clock) { } -bbc_tube_32016l_device::bbc_tube_32016l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_32016l_device::bbc_tube_32016l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_32016_device(mconfig, BBC_TUBE_32016L, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/tube/tube_32016.h b/src/devices/bus/bbc/tube/tube_32016.h index 242b4eb773b..318f72c9d09 100644 --- a/src/devices/bus/bbc/tube/tube_32016.h +++ b/src/devices/bus/bbc/tube/tube_32016.h @@ -34,10 +34,10 @@ class bbc_tube_32016_device : { public: // construction/destruction - bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_32016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_tube_32016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_32016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -68,7 +68,7 @@ protected: class bbc_tube_16032_device : public bbc_tube_32016_device { public: - bbc_tube_16032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_16032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -80,7 +80,7 @@ protected: class bbc_tube_32016l_device : public bbc_tube_32016_device { public: - bbc_tube_32016l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_32016l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/tube/tube_6502.cpp b/src/devices/bus/bbc/tube/tube_6502.cpp index e7cc3157c90..b680b1eff41 100644 --- a/src/devices/bus/bbc/tube/tube_6502.cpp +++ b/src/devices/bus/bbc/tube/tube_6502.cpp @@ -200,7 +200,7 @@ const tiny_rom_entry *bbc_tube_65c102_device::device_rom_region() const // bbc_tube_6502_device - constructor //------------------------------------------------- -bbc_tube_6502_device::bbc_tube_6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_6502_device::bbc_tube_6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -211,17 +211,17 @@ bbc_tube_6502_device::bbc_tube_6502_device(const machine_config &mconfig, device { } -bbc_tube_6502_device::bbc_tube_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_6502_device::bbc_tube_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_6502_device(mconfig, BBC_TUBE_6502, tag, owner, clock) { } -bbc_tube_6502p_device::bbc_tube_6502p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_6502p_device::bbc_tube_6502p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_6502_device(mconfig, BBC_TUBE_6502P, tag, owner, clock) { } -bbc_tube_6502e_device::bbc_tube_6502e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_6502e_device::bbc_tube_6502e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_6502_device(mconfig, BBC_TUBE_6502E, tag, owner, clock) , m_opcode_ind_y(false) , m_page(0) @@ -229,7 +229,7 @@ bbc_tube_6502e_device::bbc_tube_6502e_device(const machine_config &mconfig, cons { } -bbc_tube_65c102_device::bbc_tube_65c102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_65c102_device::bbc_tube_65c102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_6502_device(mconfig, BBC_TUBE_65C102, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/tube/tube_6502.h b/src/devices/bus/bbc/tube/tube_6502.h index a68e9c3f51e..b34aa903e8b 100644 --- a/src/devices/bus/bbc/tube/tube_6502.h +++ b/src/devices/bus/bbc/tube/tube_6502.h @@ -33,10 +33,10 @@ class bbc_tube_6502_device { public: // construction/destruction - bbc_tube_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_tube_6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -67,7 +67,7 @@ protected: class bbc_tube_6502p_device : public bbc_tube_6502_device { public: - bbc_tube_6502p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_6502p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -82,7 +82,7 @@ private: class bbc_tube_6502e_device : public bbc_tube_6502_device { public: - bbc_tube_6502e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_6502e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -107,7 +107,7 @@ private: class bbc_tube_65c102_device : public bbc_tube_6502_device { public: - bbc_tube_65c102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_65c102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/tube/tube_80186.cpp b/src/devices/bus/bbc/tube/tube_80186.cpp index 07456c67a38..4b657a60b86 100644 --- a/src/devices/bus/bbc/tube/tube_80186.cpp +++ b/src/devices/bus/bbc/tube/tube_80186.cpp @@ -72,7 +72,7 @@ void bbc_tube_80186_device::device_add_mconfig(machine_config &config) m_i80186->tmrout0_handler().set_inputline(m_i80186, INPUT_LINE_HALT).invert(); m_i80186->tmrout1_handler().set_inputline(m_i80186, INPUT_LINE_NMI).invert(); - TUBE(config, m_ula, 0); + TUBE(config, m_ula); m_ula->pirq_handler().set(m_i80186, FUNC(i80186_cpu_device::int0_w)); m_ula->drq_handler().set(m_i80186, FUNC(i80186_cpu_device::drq0_w)); m_ula->prst_handler().set(FUNC(bbc_tube_80186_device::prst_w)); @@ -115,7 +115,7 @@ const tiny_rom_entry *bbc_tube_pcplus_device::device_rom_region() const // bbc_tube_80186_device - constructor //------------------------------------------------- -bbc_tube_80186_device::bbc_tube_80186_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_80186_device::bbc_tube_80186_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_i80186(*this, "i80186") @@ -125,12 +125,12 @@ bbc_tube_80186_device::bbc_tube_80186_device(const machine_config &mconfig, devi { } -bbc_tube_80186_device::bbc_tube_80186_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_80186_device::bbc_tube_80186_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_80186_device(mconfig, BBC_TUBE_80186, tag, owner, clock) { } -bbc_tube_pcplus_device::bbc_tube_pcplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_pcplus_device::bbc_tube_pcplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_80186_device(mconfig, BBC_TUBE_PCPLUS, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/tube/tube_80186.h b/src/devices/bus/bbc/tube/tube_80186.h index 448ef06cc7f..f7903ee2810 100644 --- a/src/devices/bus/bbc/tube/tube_80186.h +++ b/src/devices/bus/bbc/tube/tube_80186.h @@ -29,10 +29,10 @@ class bbc_tube_80186_device : { public: // construction/destruction - bbc_tube_80186_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_80186_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_tube_80186_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_80186_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -60,7 +60,7 @@ protected: class bbc_tube_pcplus_device : public bbc_tube_80186_device { public: - bbc_tube_pcplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_pcplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/tube/tube_80286.cpp b/src/devices/bus/bbc/tube/tube_80286.cpp index ffdfc0edb6f..863990a6bdb 100644 --- a/src/devices/bus/bbc/tube/tube_80286.cpp +++ b/src/devices/bus/bbc/tube/tube_80286.cpp @@ -94,7 +94,7 @@ const tiny_rom_entry *bbc_tube_80286_device::device_rom_region() const // bbc_tube_80286_device - constructor //------------------------------------------------- -bbc_tube_80286_device::bbc_tube_80286_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_80286_device::bbc_tube_80286_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_80286, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_i80286(*this, "i80286") diff --git a/src/devices/bus/bbc/tube/tube_80286.h b/src/devices/bus/bbc/tube/tube_80286.h index 6ac75975fa7..eefef58de50 100644 --- a/src/devices/bus/bbc/tube/tube_80286.h +++ b/src/devices/bus/bbc/tube/tube_80286.h @@ -27,7 +27,7 @@ class bbc_tube_80286_device : { public: // construction/destruction - bbc_tube_80286_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_80286_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/tube/tube_a500.cpp b/src/devices/bus/bbc/tube/tube_a500.cpp index f9406f2d2f0..f2653db1099 100644 --- a/src/devices/bus/bbc/tube/tube_a500.cpp +++ b/src/devices/bus/bbc/tube/tube_a500.cpp @@ -114,7 +114,7 @@ const tiny_rom_entry *bbc_tube_a500_device::device_rom_region() const // bbc_tube_a500_device - constructor //------------------------------------------------- -bbc_tube_a500_device::bbc_tube_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_a500_device::bbc_tube_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_A500, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/bbc/tube/tube_a500.h b/src/devices/bus/bbc/tube/tube_a500.h index 31af8f227f1..f5f6af9658f 100644 --- a/src/devices/bus/bbc/tube/tube_a500.h +++ b/src/devices/bus/bbc/tube/tube_a500.h @@ -36,7 +36,7 @@ class bbc_tube_a500_device : { public: // construction/destruction - bbc_tube_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_a500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/tube/tube_arm.cpp b/src/devices/bus/bbc/tube/tube_arm.cpp index c015871ffa5..dfc2c3f8760 100644 --- a/src/devices/bus/bbc/tube/tube_arm.cpp +++ b/src/devices/bus/bbc/tube/tube_arm.cpp @@ -85,7 +85,7 @@ const tiny_rom_entry *bbc_tube_arm_device::device_rom_region() const // bbc_tube_arm_device - constructor //------------------------------------------------- -bbc_tube_arm_device::bbc_tube_arm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_arm_device::bbc_tube_arm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_ARM, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/bbc/tube/tube_arm.h b/src/devices/bus/bbc/tube/tube_arm.h index c84ddc97748..125228b5f03 100644 --- a/src/devices/bus/bbc/tube/tube_arm.h +++ b/src/devices/bus/bbc/tube/tube_arm.h @@ -27,7 +27,7 @@ class bbc_tube_arm_device : { public: // construction/destruction - bbc_tube_arm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_arm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/tube/tube_arm7.cpp b/src/devices/bus/bbc/tube/tube_arm7.cpp index e79b83ad997..f4ce41f2f05 100644 --- a/src/devices/bus/bbc/tube/tube_arm7.cpp +++ b/src/devices/bus/bbc/tube/tube_arm7.cpp @@ -87,7 +87,7 @@ const tiny_rom_entry *bbc_tube_arm7_device::device_rom_region() const // bbc_tube_arm7_device - constructor //------------------------------------------------- -bbc_tube_arm7_device::bbc_tube_arm7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_arm7_device::bbc_tube_arm7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_ARM7, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/bbc/tube/tube_arm7.h b/src/devices/bus/bbc/tube/tube_arm7.h index e203c26388a..cd903e39598 100644 --- a/src/devices/bus/bbc/tube/tube_arm7.h +++ b/src/devices/bus/bbc/tube/tube_arm7.h @@ -44,7 +44,7 @@ class bbc_tube_arm7_device : public: // construction/destruction - bbc_tube_arm7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_arm7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/tube/tube_casper.cpp b/src/devices/bus/bbc/tube/tube_casper.cpp index ea2734159f9..b035b3e6f26 100644 --- a/src/devices/bus/bbc/tube/tube_casper.cpp +++ b/src/devices/bus/bbc/tube/tube_casper.cpp @@ -85,7 +85,7 @@ const tiny_rom_entry *bbc_tube_casper_device::device_rom_region() const // bbc_tube_casper_device - constructor //------------------------------------------------- -bbc_tube_casper_device::bbc_tube_casper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_casper_device::bbc_tube_casper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_CASPER, tag, owner, clock), device_bbc_tube_interface(mconfig, *this), m_m68000(*this, "m68000"), diff --git a/src/devices/bus/bbc/tube/tube_casper.h b/src/devices/bus/bbc/tube/tube_casper.h index 5f4187c80a7..b9760d3b6c3 100644 --- a/src/devices/bus/bbc/tube/tube_casper.h +++ b/src/devices/bus/bbc/tube/tube_casper.h @@ -26,7 +26,7 @@ class bbc_tube_casper_device : { public: // construction/destruction - bbc_tube_casper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_casper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/tube/tube_cms6809.cpp b/src/devices/bus/bbc/tube/tube_cms6809.cpp index 43c86628f2a..c2d8a220da7 100644 --- a/src/devices/bus/bbc/tube/tube_cms6809.cpp +++ b/src/devices/bus/bbc/tube/tube_cms6809.cpp @@ -89,7 +89,7 @@ const tiny_rom_entry *bbc_tube_cms6809_device::device_rom_region() const // bbc_tube_cms6809_device - constructor //------------------------------------------------- -bbc_tube_cms6809_device::bbc_tube_cms6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_cms6809_device::bbc_tube_cms6809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_CMS6809, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/bbc/tube/tube_cms6809.h b/src/devices/bus/bbc/tube/tube_cms6809.h index 79336974246..0fac81f17ea 100644 --- a/src/devices/bus/bbc/tube/tube_cms6809.h +++ b/src/devices/bus/bbc/tube/tube_cms6809.h @@ -26,7 +26,7 @@ class bbc_tube_cms6809_device : { public: // construction/destruction - bbc_tube_cms6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_cms6809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/tube/tube_rc6502.cpp b/src/devices/bus/bbc/tube/tube_rc6502.cpp index 7aeeee283a2..550755e72d3 100644 --- a/src/devices/bus/bbc/tube/tube_rc6502.cpp +++ b/src/devices/bus/bbc/tube/tube_rc6502.cpp @@ -175,7 +175,7 @@ const tiny_rom_entry *bbc_tube_rc65816_device::device_rom_region() const // bbc_tube_rc6502_device - constructor //------------------------------------------------- -bbc_tube_rc6502_device::bbc_tube_rc6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_rc6502_device::bbc_tube_rc6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -188,12 +188,12 @@ bbc_tube_rc6502_device::bbc_tube_rc6502_device(const machine_config &mconfig, de { } -bbc_tube_rc6502_device::bbc_tube_rc6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_rc6502_device::bbc_tube_rc6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_rc6502_device(mconfig, BBC_TUBE_RC6502, tag, owner, clock) { } -bbc_tube_rc65816_device::bbc_tube_rc65816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_rc65816_device::bbc_tube_rc65816_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_rc6502_device(mconfig, BBC_TUBE_RC65816, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/tube/tube_rc6502.h b/src/devices/bus/bbc/tube/tube_rc6502.h index cc1e12d71c8..9e0e926d507 100644 --- a/src/devices/bus/bbc/tube/tube_rc6502.h +++ b/src/devices/bus/bbc/tube/tube_rc6502.h @@ -31,10 +31,10 @@ class bbc_tube_rc6502_device : { public: // construction/destruction - bbc_tube_rc6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_rc6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_tube_rc6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_rc6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -78,7 +78,7 @@ private: class bbc_tube_rc65816_device : public bbc_tube_rc6502_device { public: - bbc_tube_rc65816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_rc65816_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/tube/tube_x25.cpp b/src/devices/bus/bbc/tube/tube_x25.cpp index 21e03217201..d68273edc06 100644 --- a/src/devices/bus/bbc/tube/tube_x25.cpp +++ b/src/devices/bus/bbc/tube/tube_x25.cpp @@ -135,7 +135,7 @@ const tiny_rom_entry *bbc_tube_x25_device::device_rom_region() const // bbc_tube_x25_device - constructor //------------------------------------------------- -bbc_tube_x25_device::bbc_tube_x25_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_x25_device::bbc_tube_x25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_TUBE_X25, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_z80(*this, "z80_%u", 0) diff --git a/src/devices/bus/bbc/tube/tube_x25.h b/src/devices/bus/bbc/tube/tube_x25.h index 6e63c45bfa5..72bfd360ca5 100644 --- a/src/devices/bus/bbc/tube/tube_x25.h +++ b/src/devices/bus/bbc/tube/tube_x25.h @@ -30,7 +30,7 @@ class bbc_tube_x25_device : { public: // construction/destruction - bbc_tube_x25_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_x25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::LAN; } diff --git a/src/devices/bus/bbc/tube/tube_z80.cpp b/src/devices/bus/bbc/tube/tube_z80.cpp index f273c2f37d4..0868335657f 100644 --- a/src/devices/bus/bbc/tube/tube_z80.cpp +++ b/src/devices/bus/bbc/tube/tube_z80.cpp @@ -108,7 +108,7 @@ const tiny_rom_entry *bbc_tube_z80w_device::device_rom_region() const // bbc_tube_z80_device - constructor //------------------------------------------------- -bbc_tube_z80_device::bbc_tube_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_z80_device::bbc_tube_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_z80(*this, "z80") @@ -118,12 +118,12 @@ bbc_tube_z80_device::bbc_tube_z80_device(const machine_config &mconfig, device_t { } -bbc_tube_z80_device::bbc_tube_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_z80_device::bbc_tube_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_z80_device(mconfig, BBC_TUBE_Z80, tag, owner, clock) { } -bbc_tube_z80w_device::bbc_tube_z80w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_z80w_device::bbc_tube_z80w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_z80_device(mconfig, BBC_TUBE_Z80W, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/tube/tube_z80.h b/src/devices/bus/bbc/tube/tube_z80.h index e878f61627d..ac8050ccd5c 100644 --- a/src/devices/bus/bbc/tube/tube_z80.h +++ b/src/devices/bus/bbc/tube/tube_z80.h @@ -28,10 +28,10 @@ class bbc_tube_z80_device : { public: // construction/destruction - bbc_tube_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_z80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_tube_z80_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + bbc_tube_z80_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -70,7 +70,7 @@ private: class bbc_tube_z80w_device : public bbc_tube_z80_device { public: - bbc_tube_z80w_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bbc_tube_z80w_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/bbc/tube/tube_zep100.cpp b/src/devices/bus/bbc/tube/tube_zep100.cpp index 0d5b0d18948..7a066ed56a6 100644 --- a/src/devices/bus/bbc/tube/tube_zep100.cpp +++ b/src/devices/bus/bbc/tube/tube_zep100.cpp @@ -111,7 +111,7 @@ void bbc_tube_zep100_device::device_add_mconfig(machine_config &config) m_via->ca2_handler().set(m_ppi, FUNC(i8255_device::pc6_w)); m_via->irq_handler().set(DEVICE_SELF_OWNER, FUNC(bbc_tube_slot_device::irq_w)); - I8255A(config, m_ppi, 0); + I8255A(config, m_ppi); m_ppi->out_pa_callback().set(m_via, FUNC(via6522_device::write_pa)); m_ppi->in_pb_callback().set(FUNC(bbc_tube_zep100_device::ppi_pb_r)); m_ppi->out_pc_callback().set(FUNC(bbc_tube_zep100_device::ppi_pc_w)); @@ -152,7 +152,7 @@ const tiny_rom_entry *bbc_tube_zep100m_device::device_rom_region() const // bbc_tube_zep100_device - constructor //------------------------------------------------- -bbc_tube_zep100_device::bbc_tube_zep100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_zep100_device::bbc_tube_zep100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_tube_interface(mconfig, *this) , m_rom_enabled(true) @@ -164,22 +164,22 @@ bbc_tube_zep100_device::bbc_tube_zep100_device(const machine_config &mconfig, de { } -bbc_tube_zep100_device::bbc_tube_zep100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_zep100_device::bbc_tube_zep100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_zep100_device(mconfig, BBC_TUBE_ZEP100, tag, owner, clock) { } -bbc_tube_zep100l_device::bbc_tube_zep100l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_zep100l_device::bbc_tube_zep100l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_zep100_device(mconfig, BBC_TUBE_ZEP100L, tag, owner, clock) { } -bbc_tube_zep100w_device::bbc_tube_zep100w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_zep100w_device::bbc_tube_zep100w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_zep100_device(mconfig, BBC_TUBE_ZEP100W, tag, owner, clock) { } -bbc_tube_zep100m_device::bbc_tube_zep100m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tube_zep100m_device::bbc_tube_zep100m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_tube_zep100_device(mconfig, BBC_TUBE_ZEP100M, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/tube/tube_zep100.h b/src/devices/bus/bbc/tube/tube_zep100.h index a4f0dd58d92..1c5a292c551 100644 --- a/src/devices/bus/bbc/tube/tube_zep100.h +++ b/src/devices/bus/bbc/tube/tube_zep100.h @@ -29,10 +29,10 @@ class bbc_tube_zep100_device : { public: // construction/destruction - bbc_tube_zep100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_zep100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_tube_zep100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_zep100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -73,7 +73,7 @@ private: class bbc_tube_zep100l_device : public bbc_tube_zep100_device { public: - bbc_tube_zep100l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_zep100l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -82,7 +82,7 @@ protected: class bbc_tube_zep100w_device : public bbc_tube_zep100_device { public: - bbc_tube_zep100w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_zep100w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -91,7 +91,7 @@ protected: class bbc_tube_zep100m_device : public bbc_tube_zep100_device { public: - bbc_tube_zep100m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tube_zep100m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/bbc/userport/beebspch.cpp b/src/devices/bus/bbc/userport/beebspch.cpp index 728d8ae6658..666802ea546 100644 --- a/src/devices/bus/bbc/userport/beebspch.cpp +++ b/src/devices/bus/bbc/userport/beebspch.cpp @@ -47,7 +47,7 @@ const tiny_rom_entry *bbc_beebspch_device::device_rom_region() const void bbc_beebspch_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SP0256(config, m_nsp, 3120000); // TODO: generated by a LS269 + SP0256(config, m_nsp, XTAL::u(3120000)); // TODO: generated by a LS269 m_nsp->data_request_callback().set(FUNC(bbc_beebspch_device::cb1_w)); m_nsp->standby_callback().set(FUNC(bbc_beebspch_device::cb2_w)); m_nsp->add_route(ALL_OUTPUTS, "mono", 1.0); @@ -62,7 +62,7 @@ void bbc_beebspch_device::device_add_mconfig(machine_config &config) // bbc_beebspch_device - constructor //------------------------------------------------- -bbc_beebspch_device::bbc_beebspch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_beebspch_device::bbc_beebspch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_BEEBSPCH, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_nsp(*this, "sp0256") @@ -88,11 +88,11 @@ void bbc_beebspch_device::pb_w(uint8_t data) { case 0x40: // intonation high - m_nsp->set_clock(3800000); // TODO: the exact frequency is unknown + m_nsp->set_clock(XTAL::u(3800000)); // TODO: the exact frequency is unknown break; case 0x80: // intonation low - m_nsp->set_clock(3500000); // CK / 4 ?? + m_nsp->set_clock(XTAL::u(3500000)); // CK / 4 ?? break; } diff --git a/src/devices/bus/bbc/userport/beebspch.h b/src/devices/bus/bbc/userport/beebspch.h index 79e6abf64ab..67a5bbb82bf 100644 --- a/src/devices/bus/bbc/userport/beebspch.h +++ b/src/devices/bus/bbc/userport/beebspch.h @@ -25,7 +25,7 @@ class bbc_beebspch_device : { public: // construction/destruction - bbc_beebspch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_beebspch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(cb1_w); DECLARE_WRITE_LINE_MEMBER(cb2_w); diff --git a/src/devices/bus/bbc/userport/cfa3000kbd.cpp b/src/devices/bus/bbc/userport/cfa3000kbd.cpp index 5b2d5586f56..36420596a12 100644 --- a/src/devices/bus/bbc/userport/cfa3000kbd.cpp +++ b/src/devices/bus/bbc/userport/cfa3000kbd.cpp @@ -83,7 +83,7 @@ ioport_constructor cfa3000_kbd_device::device_input_ports() const // cfa3000_kbd_device - constructor //------------------------------------------------- -cfa3000_kbd_device::cfa3000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cfa3000_kbd_device::cfa3000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CFA3000_KBD, tag, owner, clock), device_bbc_userport_interface(mconfig, *this), m_kbd(*this, "KBD.%u", 0) diff --git a/src/devices/bus/bbc/userport/cfa3000kbd.h b/src/devices/bus/bbc/userport/cfa3000kbd.h index ff9951399c8..7b4d66372ea 100644 --- a/src/devices/bus/bbc/userport/cfa3000kbd.h +++ b/src/devices/bus/bbc/userport/cfa3000kbd.h @@ -26,7 +26,7 @@ class cfa3000_kbd_device : { public: // construction/destruction - cfa3000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cfa3000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/userport/lcd.cpp b/src/devices/bus/bbc/userport/lcd.cpp index f5f92270ca9..b693b28957e 100644 --- a/src/devices/bus/bbc/userport/lcd.cpp +++ b/src/devices/bus/bbc/userport/lcd.cpp @@ -51,7 +51,7 @@ void bbc_lcd_device::device_add_mconfig(machine_config &config) // bbc_lcd_device - constructor //------------------------------------------------- -bbc_lcd_device::bbc_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_lcd_device::bbc_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_LCD, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_lcdc(*this, "lcdc") diff --git a/src/devices/bus/bbc/userport/lcd.h b/src/devices/bus/bbc/userport/lcd.h index c4aecfbd00e..99d0fad96e6 100644 --- a/src/devices/bus/bbc/userport/lcd.h +++ b/src/devices/bus/bbc/userport/lcd.h @@ -28,7 +28,7 @@ class bbc_lcd_device : { public: // construction/destruction - bbc_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/userport/m4000.cpp b/src/devices/bus/bbc/userport/m4000.cpp index 910f2f8b3f1..e374b727c46 100644 --- a/src/devices/bus/bbc/userport/m4000.cpp +++ b/src/devices/bus/bbc/userport/m4000.cpp @@ -113,7 +113,7 @@ ioport_constructor bbc_m4000_device::device_input_ports() const // bbc_m4000_device - constructor //------------------------------------------------- -bbc_m4000_device::bbc_m4000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_m4000_device::bbc_m4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_M4000, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_kbd(*this, "KBLOCK_%u", 1) diff --git a/src/devices/bus/bbc/userport/m4000.h b/src/devices/bus/bbc/userport/m4000.h index df9c5e556cf..a04adb626a0 100644 --- a/src/devices/bus/bbc/userport/m4000.h +++ b/src/devices/bus/bbc/userport/m4000.h @@ -29,7 +29,7 @@ class bbc_m4000_device : { public: // construction/destruction - bbc_m4000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_m4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/userport/palext.cpp b/src/devices/bus/bbc/userport/palext.cpp index dab527e478b..d44d5a8cfaa 100644 --- a/src/devices/bus/bbc/userport/palext.cpp +++ b/src/devices/bus/bbc/userport/palext.cpp @@ -51,7 +51,7 @@ const tiny_rom_entry* bbc_chameleon_device::device_rom_region() const // bbc_palext_device - constructor //------------------------------------------------- -bbc_palext_device::bbc_palext_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_palext_device::bbc_palext_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_palette(*this, ":palette") @@ -59,12 +59,12 @@ bbc_palext_device::bbc_palext_device(const machine_config &mconfig, device_type { } -bbc_chameleon_device::bbc_chameleon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_chameleon_device::bbc_chameleon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_palext_device(mconfig, BBC_CHAMELEON, tag, owner, clock) { } -bbc_cpalette_device::bbc_cpalette_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_cpalette_device::bbc_cpalette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_palext_device(mconfig, BBC_CPALETTE, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/userport/palext.h b/src/devices/bus/bbc/userport/palext.h index bca159103cb..6caa44793ca 100644 --- a/src/devices/bus/bbc/userport/palext.h +++ b/src/devices/bus/bbc/userport/palext.h @@ -27,7 +27,7 @@ class bbc_palext_device : { protected: // construction/destruction - bbc_palext_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_palext_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -45,7 +45,7 @@ class bbc_chameleon_device : public bbc_palext_device { public: // construction/destruction - bbc_chameleon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_chameleon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -63,7 +63,7 @@ public: static constexpr feature_type imperfect_features() { return feature::PALETTE; } // construction/destruction - bbc_cpalette_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_cpalette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void pb_w(uint8_t data) override; diff --git a/src/devices/bus/bbc/userport/pointer.cpp b/src/devices/bus/bbc/userport/pointer.cpp index cff7c1570e2..1ae9fbde8ad 100644 --- a/src/devices/bus/bbc/userport/pointer.cpp +++ b/src/devices/bus/bbc/userport/pointer.cpp @@ -120,7 +120,7 @@ ioport_constructor bbc_tracker_device::device_input_ports() const // bbc_pointer_device - constructor //------------------------------------------------- -bbc_pointer_device::bbc_pointer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_pointer_device::bbc_pointer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_pointer_x(*this, "POINTER_X") @@ -129,17 +129,17 @@ bbc_pointer_device::bbc_pointer_device(const machine_config &mconfig, device_typ { } -bbc_amxmouse_device::bbc_amxmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_amxmouse_device::bbc_amxmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pointer_device(mconfig, BBC_AMXMOUSE, tag, owner, clock) { } -bbc_m512mouse_device::bbc_m512mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_m512mouse_device::bbc_m512mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pointer_device(mconfig, BBC_M512MOUSE, tag, owner, clock) { } -bbc_tracker_device::bbc_tracker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_tracker_device::bbc_tracker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_pointer_device(mconfig, BBC_TRACKER, tag, owner, clock) { } diff --git a/src/devices/bus/bbc/userport/pointer.h b/src/devices/bus/bbc/userport/pointer.h index 865a9c91270..d903afbe331 100644 --- a/src/devices/bus/bbc/userport/pointer.h +++ b/src/devices/bus/bbc/userport/pointer.h @@ -24,7 +24,7 @@ class bbc_pointer_device : { protected: // construction/destruction - bbc_pointer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_pointer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class bbc_amxmouse_device : public bbc_pointer_device { public: // construction/destruction - bbc_amxmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_amxmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t pb_r() override; @@ -68,7 +68,7 @@ class bbc_m512mouse_device : public bbc_pointer_device { public: // construction/destruction - bbc_m512mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_m512mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t pb_r() override; @@ -83,7 +83,7 @@ class bbc_tracker_device : public bbc_pointer_device { public: // construction/destruction - bbc_tracker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_tracker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t pb_r() override; diff --git a/src/devices/bus/bbc/userport/sdcard.cpp b/src/devices/bus/bbc/userport/sdcard.cpp index ccd5337d840..c6509f56f65 100644 --- a/src/devices/bus/bbc/userport/sdcard.cpp +++ b/src/devices/bus/bbc/userport/sdcard.cpp @@ -57,13 +57,13 @@ DEFINE_DEVICE_TYPE(BBC_SDCARDT, bbc_sdcardt_device, "bbc_sdcardt", "BBC Micro Tu void bbc_sdcard_device::device_add_mconfig(machine_config &config) { - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set([this](int state) { m_slot->cb2_w(state); }); } void bbc_sdcardt_device::device_add_mconfig(machine_config &config) { - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set([this](int state) { if (!m_turbo) m_slot->cb2_w(state); }); } @@ -76,19 +76,19 @@ void bbc_sdcardt_device::device_add_mconfig(machine_config &config) // bbc_sdcard_device - constructor //------------------------------------------------- -bbc_sdcard_device::bbc_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bbc_sdcard_device::bbc_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_sdcard(*this, "sdcard") { } -bbc_sdcard_device::bbc_sdcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_sdcard_device::bbc_sdcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_sdcard_device(mconfig, BBC_SDCARD, tag, owner, clock) { } -bbc_sdcardt_device::bbc_sdcardt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_sdcardt_device::bbc_sdcardt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbc_sdcard_device(mconfig, BBC_SDCARDT, tag, owner, clock) , m_turbo(false) { diff --git a/src/devices/bus/bbc/userport/sdcard.h b/src/devices/bus/bbc/userport/sdcard.h index bfa86ad359b..07e5756974d 100644 --- a/src/devices/bus/bbc/userport/sdcard.h +++ b/src/devices/bus/bbc/userport/sdcard.h @@ -25,10 +25,10 @@ class bbc_sdcard_device : public device_t, public device_bbc_userport_interface { public: // construction/destruction - bbc_sdcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_sdcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bbc_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bbc_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -49,7 +49,7 @@ class bbc_sdcardt_device : public bbc_sdcard_device { public: // construction/destruction - bbc_sdcardt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_sdcardt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bbc/userport/userport.cpp b/src/devices/bus/bbc/userport/userport.cpp index 6bf5476db9c..71cc4782fe9 100644 --- a/src/devices/bus/bbc/userport/userport.cpp +++ b/src/devices/bus/bbc/userport/userport.cpp @@ -51,7 +51,7 @@ device_bbc_userport_interface::~device_bbc_userport_interface() // bbc_userport_slot_device - constructor //------------------------------------------------- -bbc_userport_slot_device::bbc_userport_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_userport_slot_device::bbc_userport_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_USERPORT_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_device(nullptr) diff --git a/src/devices/bus/bbc/userport/userport.h b/src/devices/bus/bbc/userport/userport.h index 29374eb9058..6785a9c4832 100644 --- a/src/devices/bus/bbc/userport/userport.h +++ b/src/devices/bus/bbc/userport/userport.h @@ -55,7 +55,7 @@ public: set_fixed(false); } - bbc_userport_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + bbc_userport_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto cb1_handler() { return m_cb1_handler.bind(); } diff --git a/src/devices/bus/bbc/userport/usersplit.cpp b/src/devices/bus/bbc/userport/usersplit.cpp index 520abaebdb9..5f9f3ca5608 100644 --- a/src/devices/bus/bbc/userport/usersplit.cpp +++ b/src/devices/bus/bbc/userport/usersplit.cpp @@ -64,7 +64,7 @@ void bbc_usersplit_device::device_add_mconfig(machine_config &config) // bbc_usersplit_device - constructor //------------------------------------------------- -bbc_usersplit_device::bbc_usersplit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_usersplit_device::bbc_usersplit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_USERSPLIT, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_userport(*this, "userport%u", 1) diff --git a/src/devices/bus/bbc/userport/usersplit.h b/src/devices/bus/bbc/userport/usersplit.h index 27ce11a9fde..0c359a59fc9 100644 --- a/src/devices/bus/bbc/userport/usersplit.h +++ b/src/devices/bus/bbc/userport/usersplit.h @@ -26,7 +26,7 @@ class bbc_usersplit_device : { public: // construction/destruction - bbc_usersplit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_usersplit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(userport_changed) { m_selected = newval; } diff --git a/src/devices/bus/bbc/userport/voicebox.cpp b/src/devices/bus/bbc/userport/voicebox.cpp index c42d71a2456..8c726b659a5 100644 --- a/src/devices/bus/bbc/userport/voicebox.cpp +++ b/src/devices/bus/bbc/userport/voicebox.cpp @@ -40,7 +40,7 @@ const tiny_rom_entry *bbc_voicebox_device::device_rom_region() const void bbc_voicebox_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SP0256(config, m_nsp, 3120000); // TODO: unknown crystal + SP0256(config, m_nsp, XTAL::u(3120000)); // TODO: unknown crystal m_nsp->data_request_callback().set(DEVICE_SELF_OWNER, FUNC(bbc_userport_slot_device::cb1_w)).invert(); m_nsp->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -54,7 +54,7 @@ void bbc_voicebox_device::device_add_mconfig(machine_config &config) // bbc_voicebox_device - constructor //------------------------------------------------- -bbc_voicebox_device::bbc_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bbc_voicebox_device::bbc_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BBC_VOICEBOX, tag, owner, clock) , device_bbc_userport_interface(mconfig, *this) , m_nsp(*this, "sp0256") diff --git a/src/devices/bus/bbc/userport/voicebox.h b/src/devices/bus/bbc/userport/voicebox.h index 0f479e27c1d..33bc693d6a1 100644 --- a/src/devices/bus/bbc/userport/voicebox.h +++ b/src/devices/bus/bbc/userport/voicebox.h @@ -25,7 +25,7 @@ class bbc_voicebox_device : { public: // construction/destruction - bbc_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bbc_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/bml3/bml3bus.cpp b/src/devices/bus/bml3/bml3bus.cpp index 54e63ea70ec..a4c9973af8a 100644 --- a/src/devices/bus/bml3/bml3bus.cpp +++ b/src/devices/bus/bml3/bml3bus.cpp @@ -59,12 +59,12 @@ DEFINE_DEVICE_TYPE(BML3BUS_SLOT, bml3bus_slot_device, "bml3bus_slot", "Hitachi M //------------------------------------------------- // bml3bus_slot_device - constructor //------------------------------------------------- -bml3bus_slot_device::bml3bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bml3bus_slot_device::bml3bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bml3bus_slot_device(mconfig, BML3BUS_SLOT, tag, owner, clock) { } -bml3bus_slot_device::bml3bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bml3bus_slot_device::bml3bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_bml3bus(*this, finder_base::DUMMY_TAG), @@ -97,12 +97,12 @@ DEFINE_DEVICE_TYPE(BML3BUS, bml3bus_device, "bml3bus", "Hitachi MB-6890 Bus") // bml3bus_device - constructor //------------------------------------------------- -bml3bus_device::bml3bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bml3bus_device::bml3bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bml3bus_device(mconfig, BML3BUS, tag, owner, clock) { } -bml3bus_device::bml3bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bml3bus_device::bml3bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_space(*this, finder_base::DUMMY_TAG, -1, 8), m_out_nmi_cb(*this), diff --git a/src/devices/bus/bml3/bml3bus.h b/src/devices/bus/bml3/bml3bus.h index b3c36ed9c70..dd1eed49471 100644 --- a/src/devices/bus/bml3/bml3bus.h +++ b/src/devices/bus/bml3/bml3bus.h @@ -32,7 +32,7 @@ public: // construction/destruction template bml3bus_slot_device(machine_config const &mconfig, const char *tag, device_t *owner, T &&nbtag, U &&opts, const char *dflt) - : bml3bus_slot_device(mconfig, tag, owner, (uint32_t)0) + : bml3bus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -41,7 +41,7 @@ public: set_bml3bus_slot(std::forward(nbtag), tag); } - bml3bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bml3bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template @@ -52,7 +52,7 @@ public: } protected: - bml3bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bml3bus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -72,7 +72,7 @@ class bml3bus_device : public device_t friend class device_bml3bus_card_interface; public: // construction/destruction - bml3bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bml3bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_space(Object &&tag, int spacenum) { m_space.set_tag(std::forward(tag), spacenum); } @@ -87,7 +87,7 @@ public: DECLARE_WRITE_LINE_MEMBER( firq_w ); protected: - bml3bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bml3bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/bml3/bml3kanji.cpp b/src/devices/bus/bml3/bml3kanji.cpp index 22bfe8d58a9..ac87e07d7ad 100644 --- a/src/devices/bus/bml3/bml3kanji.cpp +++ b/src/devices/bus/bml3/bml3kanji.cpp @@ -59,7 +59,7 @@ void bml3bus_kanji_device::bml3_kanji_w(offs_t offset, uint8_t data) // LIVE DEVICE //************************************************************************** -bml3bus_kanji_device::bml3bus_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bml3bus_kanji_device::bml3bus_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BML3BUS_KANJI, tag, owner, clock), device_bml3bus_card_interface(mconfig, *this), m_kanji_addr(0), m_rom(nullptr) { diff --git a/src/devices/bus/bml3/bml3kanji.h b/src/devices/bus/bml3/bml3kanji.h index 2ce54ed8230..2e00d6259c6 100644 --- a/src/devices/bus/bml3/bml3kanji.h +++ b/src/devices/bus/bml3/bml3kanji.h @@ -25,7 +25,7 @@ class bml3bus_kanji_device: { public: // construction/destruction - bml3bus_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bml3bus_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t bml3_kanji_r(offs_t offset); void bml3_kanji_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/bml3/bml3mp1802.cpp b/src/devices/bus/bml3/bml3mp1802.cpp index 61900cd020f..c0f66308c7a 100644 --- a/src/devices/bus/bml3/bml3mp1802.cpp +++ b/src/devices/bus/bml3/bml3mp1802.cpp @@ -110,7 +110,7 @@ void bml3bus_mp1802_device::bml3_mp1802_w(uint8_t data) // LIVE DEVICE //************************************************************************** -bml3bus_mp1802_device::bml3bus_mp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bml3bus_mp1802_device::bml3bus_mp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BML3BUS_MP1802, tag, owner, clock), device_bml3bus_card_interface(mconfig, *this), m_fdc(*this, "fdc"), diff --git a/src/devices/bus/bml3/bml3mp1802.h b/src/devices/bus/bml3/bml3mp1802.h index d1bbdad744b..f45206c968d 100644 --- a/src/devices/bus/bml3/bml3mp1802.h +++ b/src/devices/bus/bml3/bml3mp1802.h @@ -29,7 +29,7 @@ class bml3bus_mp1802_device: { public: // construction/destruction - bml3bus_mp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bml3bus_mp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t bml3_mp1802_r(); void bml3_mp1802_w(uint8_t data); diff --git a/src/devices/bus/bml3/bml3mp1805.cpp b/src/devices/bus/bml3/bml3mp1805.cpp index 78b58782d6e..ee14fc8724d 100644 --- a/src/devices/bus/bml3/bml3mp1805.cpp +++ b/src/devices/bus/bml3/bml3mp1805.cpp @@ -52,7 +52,7 @@ void bml3bus_mp1805_device::floppy_drives(device_slot_interface &device) void bml3bus_mp1805_device::device_add_mconfig(machine_config &config) { - MC6843(config, m_mc6843, 500000); + MC6843(config, m_mc6843, XTAL::u(500000)); m_mc6843->force_ready(); m_mc6843->irq().set(FUNC(bml3bus_mp1805_device::nmi_w)); @@ -131,7 +131,7 @@ void bml3bus_mp1805_device::bml3_mp1805_w(uint8_t data) // LIVE DEVICE //************************************************************************** -bml3bus_mp1805_device::bml3bus_mp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bml3bus_mp1805_device::bml3bus_mp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BML3BUS_MP1805, tag, owner, clock), device_bml3bus_card_interface(mconfig, *this), m_floppy(*this, "%u", 0U), diff --git a/src/devices/bus/bml3/bml3mp1805.h b/src/devices/bus/bml3/bml3mp1805.h index f3c4de448d3..2a8d0f6da03 100644 --- a/src/devices/bus/bml3/bml3mp1805.h +++ b/src/devices/bus/bml3/bml3mp1805.h @@ -28,7 +28,7 @@ class bml3bus_mp1805_device: { public: // construction/destruction - bml3bus_mp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bml3bus_mp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t bml3_mp1805_r(); void bml3_mp1805_w(uint8_t data); diff --git a/src/devices/bus/bml3/bml3rtc.cpp b/src/devices/bus/bml3/bml3rtc.cpp index 6fbe66f166e..da6cb024945 100644 --- a/src/devices/bus/bml3/bml3rtc.cpp +++ b/src/devices/bus/bml3/bml3rtc.cpp @@ -82,7 +82,7 @@ void bml3bus_rtc_device::bml3_rtc_w(offs_t offset, uint8_t data) // LIVE DEVICE //************************************************************************** -bml3bus_rtc_device::bml3bus_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bml3bus_rtc_device::bml3bus_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BML3BUS_RTC, tag, owner, clock) , device_bml3bus_card_interface(mconfig, *this) , m_rtc(*this, "rtc") diff --git a/src/devices/bus/bml3/bml3rtc.h b/src/devices/bus/bml3/bml3rtc.h index 16c6cbd0e9c..4a4d1d4514a 100644 --- a/src/devices/bus/bml3/bml3rtc.h +++ b/src/devices/bus/bml3/bml3rtc.h @@ -27,7 +27,7 @@ class bml3bus_rtc_device: { public: // construction/destruction - bml3bus_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bml3bus_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t bml3_rtc_r(offs_t offset); void bml3_rtc_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/bw2/exp.cpp b/src/devices/bus/bw2/exp.cpp index 030170d488c..01c07f72392 100644 --- a/src/devices/bus/bw2/exp.cpp +++ b/src/devices/bus/bw2/exp.cpp @@ -52,7 +52,7 @@ device_bw2_expansion_slot_interface::~device_bw2_expansion_slot_interface() // bw2_expansion_slot_device - constructor //------------------------------------------------- -bw2_expansion_slot_device::bw2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bw2_expansion_slot_device::bw2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BW2_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_cart(nullptr) diff --git a/src/devices/bus/bw2/exp.h b/src/devices/bus/bw2/exp.h index 6c6acf11f9a..32f4e008fb2 100644 --- a/src/devices/bus/bw2/exp.h +++ b/src/devices/bus/bw2/exp.h @@ -56,7 +56,7 @@ class bw2_expansion_slot_device : public device_t, public: // construction/destruction template - bw2_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + bw2_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : bw2_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -65,7 +65,7 @@ public: set_fixed(false); } - bw2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bw2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~bw2_expansion_slot_device(); // computer interface diff --git a/src/devices/bus/bw2/ramcard.cpp b/src/devices/bus/bw2/ramcard.cpp index 33d1fc147d9..80715655e20 100644 --- a/src/devices/bus/bw2/ramcard.cpp +++ b/src/devices/bus/bw2/ramcard.cpp @@ -47,7 +47,7 @@ const tiny_rom_entry *bw2_ramcard_device::device_rom_region() const // bw2_ramcard_device - constructor //------------------------------------------------- -bw2_ramcard_device::bw2_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bw2_ramcard_device::bw2_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BW2_RAMCARD, tag, owner, clock), device_bw2_expansion_slot_interface(mconfig, *this), m_rom(*this, "ramcard"), diff --git a/src/devices/bus/bw2/ramcard.h b/src/devices/bus/bw2/ramcard.h index f3cd95f38d4..4a6d49c2504 100644 --- a/src/devices/bus/bw2/ramcard.h +++ b/src/devices/bus/bw2/ramcard.h @@ -26,7 +26,7 @@ class bw2_ramcard_device : public device_t, { public: // construction/destruction - bw2_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bw2_ramcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/c64/16kb.cpp b/src/devices/bus/c64/16kb.cpp index 4b497f88591..a94bb9567f4 100644 --- a/src/devices/bus/c64/16kb.cpp +++ b/src/devices/bus/c64/16kb.cpp @@ -62,7 +62,7 @@ ioport_constructor c64_16kb_cartridge_device::device_input_ports() const // c64_16kb_cartridge_device - constructor //------------------------------------------------- -c64_16kb_cartridge_device::c64_16kb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_16kb_cartridge_device::c64_16kb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_16KB, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_sw1(*this, "SW1"), diff --git a/src/devices/bus/c64/16kb.h b/src/devices/bus/c64/16kb.h index d17e7636879..7ab351fae4d 100644 --- a/src/devices/bus/c64/16kb.h +++ b/src/devices/bus/c64/16kb.h @@ -28,7 +28,7 @@ class c64_16kb_cartridge_device : public device_t, public device_c64_expansion_c { public: // construction/destruction - c64_16kb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_16kb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/4dxh.cpp b/src/devices/bus/c64/4dxh.cpp index 4273388543b..e28c2967fb3 100644 --- a/src/devices/bus/c64/4dxh.cpp +++ b/src/devices/bus/c64/4dxh.cpp @@ -62,7 +62,7 @@ ioport_constructor c64_4dxh_device::device_input_ports() const // c64_4dxh_device - constructor //------------------------------------------------- -c64_4dxh_device::c64_4dxh_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_4dxh_device::c64_4dxh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_4DXH, tag, owner, clock), device_pet_user_port_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/4dxh.h b/src/devices/bus/c64/4dxh.h index 620228e4942..d1bbe17e6a6 100644 --- a/src/devices/bus/c64/4dxh.h +++ b/src/devices/bus/c64/4dxh.h @@ -26,7 +26,7 @@ class c64_4dxh_device : public device_t, public device_pet_user_port_interface { public: // construction/destruction - c64_4dxh_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_4dxh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/4ksa.cpp b/src/devices/bus/c64/4ksa.cpp index 39a86b6b17c..164297719bc 100644 --- a/src/devices/bus/c64/4ksa.cpp +++ b/src/devices/bus/c64/4ksa.cpp @@ -62,7 +62,7 @@ ioport_constructor c64_4ksa_device::device_input_ports() const // c64_4ksa_device - constructor //------------------------------------------------- -c64_4ksa_device::c64_4ksa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_4ksa_device::c64_4ksa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_4KSA, tag, owner, clock), device_pet_user_port_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/4ksa.h b/src/devices/bus/c64/4ksa.h index 6208ab201d2..d9f758a0a23 100644 --- a/src/devices/bus/c64/4ksa.h +++ b/src/devices/bus/c64/4ksa.h @@ -26,7 +26,7 @@ class c64_4ksa_device : public device_t, public device_pet_user_port_interface { public: // construction/destruction - c64_4ksa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_4ksa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/4tba.cpp b/src/devices/bus/c64/4tba.cpp index 4fc58cb0d49..1c7ae31f3fe 100644 --- a/src/devices/bus/c64/4tba.cpp +++ b/src/devices/bus/c64/4tba.cpp @@ -62,7 +62,7 @@ ioport_constructor c64_4tba_device::device_input_ports() const // c64_4tba_device - constructor //------------------------------------------------- -c64_4tba_device::c64_4tba_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_4tba_device::c64_4tba_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_4TBA, tag, owner, clock), device_pet_user_port_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/4tba.h b/src/devices/bus/c64/4tba.h index dc4f3b2186c..b18074e184f 100644 --- a/src/devices/bus/c64/4tba.h +++ b/src/devices/bus/c64/4tba.h @@ -26,7 +26,7 @@ class c64_4tba_device : public device_t, public device_pet_user_port_interface { public: // construction/destruction - c64_4tba_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_4tba_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/bn1541.cpp b/src/devices/bus/c64/bn1541.cpp index ffdf84b77d1..3e2f152ac70 100644 --- a/src/devices/bus/c64/bn1541.cpp +++ b/src/devices/bus/c64/bn1541.cpp @@ -61,7 +61,7 @@ device_c64_floppy_parallel_interface::~device_c64_floppy_parallel_interface() // c64_bn1541_device - constructor //------------------------------------------------- -c64_bn1541_device::c64_bn1541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_bn1541_device::c64_bn1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_BN1541, tag, owner, clock), device_pet_user_port_interface(mconfig, *this), device_c64_floppy_parallel_interface(mconfig, *this), m_parallel_output(0) diff --git a/src/devices/bus/c64/bn1541.h b/src/devices/bus/c64/bn1541.h index af6fedd7c97..08b29759ea3 100644 --- a/src/devices/bus/c64/bn1541.h +++ b/src/devices/bus/c64/bn1541.h @@ -47,7 +47,7 @@ class c64_bn1541_device : public device_t, { public: // construction/destruction - c64_bn1541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_bn1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/buscard.cpp b/src/devices/bus/c64/buscard.cpp index aef66ef022b..669eabd8bf4 100644 --- a/src/devices/bus/c64/buscard.cpp +++ b/src/devices/bus/c64/buscard.cpp @@ -222,7 +222,7 @@ WRITE_LINE_MEMBER( c64_buscard_device::busy_w ) void c64_buscard_device::device_add_mconfig(machine_config &config) { - I8255A(config, m_ppi, 0); + I8255A(config, m_ppi); m_ppi->in_pa_callback().set(FUNC(c64_buscard_device::ppi_pa_r)); m_ppi->out_pa_callback().set(FUNC(c64_buscard_device::ppi_pa_w)); m_ppi->in_pb_callback().set_constant(0xff); @@ -230,11 +230,11 @@ void c64_buscard_device::device_add_mconfig(machine_config &config) m_ppi->in_pc_callback().set(FUNC(c64_buscard_device::ppi_pc_r)); m_ppi->out_pc_callback().set(FUNC(c64_buscard_device::ppi_pc_w)); - DS75160A(config, m_ieee1, 0); + DS75160A(config, m_ieee1); m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r)); m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w)); - DS75161A(config, m_ieee2, 0); + DS75161A(config, m_ieee2); m_ieee2->in_ren().set(IEEE488_TAG, FUNC(ieee488_device::ren_r)); m_ieee2->in_ifc().set(IEEE488_TAG, FUNC(ieee488_device::ifc_r)); m_ieee2->in_ndac().set(IEEE488_TAG, FUNC(ieee488_device::ndac_r)); @@ -252,7 +252,7 @@ void c64_buscard_device::device_add_mconfig(machine_config &config) m_ieee2->out_atn().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w)); m_ieee2->out_srq().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w)); - IEEE488(config, m_bus, 0); + IEEE488(config, m_bus); ieee488_slot_device::add_cbm_defaults(config, nullptr); CENTRONICS(config, m_centronics, centronics_devices, nullptr); @@ -272,7 +272,7 @@ void c64_buscard_device::device_add_mconfig(machine_config &config) // c64_buscard_device - constructor //------------------------------------------------- -c64_buscard_device::c64_buscard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_buscard_device::c64_buscard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_BUSCARD, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_ppi(*this, "u2"), diff --git a/src/devices/bus/c64/buscard.h b/src/devices/bus/c64/buscard.h index 151598060ad..230a84e258f 100644 --- a/src/devices/bus/c64/buscard.h +++ b/src/devices/bus/c64/buscard.h @@ -32,7 +32,7 @@ class c64_buscard_device : public device_t, { public: // construction/destruction - c64_buscard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_buscard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/buscard2.cpp b/src/devices/bus/c64/buscard2.cpp index 65ee3b0ebb8..309a765cf33 100644 --- a/src/devices/bus/c64/buscard2.cpp +++ b/src/devices/bus/c64/buscard2.cpp @@ -105,11 +105,11 @@ WRITE_LINE_MEMBER( c64_buscard2_device::busy_w ) void c64_buscard2_device::device_add_mconfig(machine_config &config) { - RIOT6532(config, m_riot, 0); + RIOT6532(config, m_riot); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); - IEEE488(config, m_bus, 0); + IEEE488(config, m_bus); ieee488_slot_device::add_cbm_defaults(config, nullptr); CENTRONICS(config, m_centronics, centronics_devices, nullptr); @@ -129,7 +129,7 @@ void c64_buscard2_device::device_add_mconfig(machine_config &config) // c64_buscard2_device - constructor //------------------------------------------------- -c64_buscard2_device::c64_buscard2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_buscard2_device::c64_buscard2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_BUSCARD2, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_riot(*this, "riot"), diff --git a/src/devices/bus/c64/buscard2.h b/src/devices/bus/c64/buscard2.h index e0250f03d03..8c235cfce1b 100644 --- a/src/devices/bus/c64/buscard2.h +++ b/src/devices/bus/c64/buscard2.h @@ -31,7 +31,7 @@ class c64_buscard2_device : public device_t, { public: // construction/destruction - c64_buscard2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_buscard2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/c128_comal80.cpp b/src/devices/bus/c64/c128_comal80.cpp index f1ce8c5c87a..c8e93c03b9c 100644 --- a/src/devices/bus/c64/c128_comal80.cpp +++ b/src/devices/bus/c64/c128_comal80.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C128_COMAL80, c128_comal80_cartridge_device, "c128_comal80", // c128_comal80_cartridge_device - constructor //------------------------------------------------- -c128_comal80_cartridge_device::c128_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c128_comal80_cartridge_device::c128_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C128_COMAL80, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/c128_comal80.h b/src/devices/bus/c64/c128_comal80.h index fe413f9bef6..06107e5c70e 100644 --- a/src/devices/bus/c64/c128_comal80.h +++ b/src/devices/bus/c64/c128_comal80.h @@ -27,7 +27,7 @@ class c128_comal80_cartridge_device : public device_t, { public: // construction/destruction - c128_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c128_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/c128_partner.cpp b/src/devices/bus/c64/c128_partner.cpp index 7c6cf1aea97..e9c3d6cb75e 100644 --- a/src/devices/bus/c64/c128_partner.cpp +++ b/src/devices/bus/c64/c128_partner.cpp @@ -77,7 +77,7 @@ ioport_constructor c128_partner_cartridge_device::device_input_ports() const // c128_partner_cartridge_device - constructor //------------------------------------------------- -c128_partner_cartridge_device::c128_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c128_partner_cartridge_device::c128_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C128_PARTNER, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", 0x2000, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/c64/c128_partner.h b/src/devices/bus/c64/c128_partner.h index 3f91afbb0e9..587d0ccf42d 100644 --- a/src/devices/bus/c64/c128_partner.h +++ b/src/devices/bus/c64/c128_partner.h @@ -28,7 +28,7 @@ class c128_partner_cartridge_device : public device_t, { public: // construction/destruction - c128_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c128_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/comal80.cpp b/src/devices/bus/c64/comal80.cpp index 0ce6dcbfb5a..40a3f604ad6 100644 --- a/src/devices/bus/c64/comal80.cpp +++ b/src/devices/bus/c64/comal80.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_COMAL80, c64_comal80_cartridge_device, "c64_comal80", "C6 // c64_comal80_cartridge_device - constructor //------------------------------------------------- -c64_comal80_cartridge_device::c64_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_comal80_cartridge_device::c64_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_COMAL80, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/comal80.h b/src/devices/bus/c64/comal80.h index af0958a8940..1abe98fb26c 100644 --- a/src/devices/bus/c64/comal80.h +++ b/src/devices/bus/c64/comal80.h @@ -27,7 +27,7 @@ class c64_comal80_cartridge_device : public device_t, { public: // construction/destruction - c64_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_comal80_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/cpm.cpp b/src/devices/bus/c64/cpm.cpp index f60fe8bd506..99b8ad6bc3c 100644 --- a/src/devices/bus/c64/cpm.cpp +++ b/src/devices/bus/c64/cpm.cpp @@ -62,7 +62,7 @@ void c64_cpm_cartridge_device::z80_io(address_map &map) void c64_cpm_cartridge_device::device_add_mconfig(machine_config &config) { - Z80(config, m_maincpu, 3000000); + Z80(config, m_maincpu, XTAL::u(3000000)); m_maincpu->set_addrmap(AS_PROGRAM, &c64_cpm_cartridge_device::z80_mem); m_maincpu->set_addrmap(AS_IO, &c64_cpm_cartridge_device::z80_io); } @@ -122,7 +122,7 @@ inline void c64_cpm_cartridge_device::update_signals() // c64_cpm_cartridge_device - constructor //------------------------------------------------- -c64_cpm_cartridge_device::c64_cpm_cartridge_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +c64_cpm_cartridge_device::c64_cpm_cartridge_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), @@ -131,7 +131,7 @@ c64_cpm_cartridge_device::c64_cpm_cartridge_device(const machine_config& mconfig { } -c64_cpm_cartridge_device::c64_cpm_cartridge_device(const machine_config& mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_cpm_cartridge_device::c64_cpm_cartridge_device(const machine_config& mconfig, const char *tag, device_t *owner, const XTAL &clock) : c64_cpm_cartridge_device(mconfig, C64_CPM, tag, owner, clock) { } diff --git a/src/devices/bus/c64/cpm.h b/src/devices/bus/c64/cpm.h index c490d61aa58..e80ced0d8e4 100644 --- a/src/devices/bus/c64/cpm.h +++ b/src/devices/bus/c64/cpm.h @@ -27,10 +27,10 @@ class c64_cpm_cartridge_device : public device_t, { public: // construction/destruction - c64_cpm_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_cpm_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - c64_cpm_cartridge_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c64_cpm_cartridge_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/c64/currah_speech.cpp b/src/devices/bus/c64/currah_speech.cpp index 0216e4c4ef5..8d807a4ba6f 100644 --- a/src/devices/bus/c64/currah_speech.cpp +++ b/src/devices/bus/c64/currah_speech.cpp @@ -106,7 +106,7 @@ const tiny_rom_entry *c64_currah_speech_cartridge_device::device_rom_region() co void c64_currah_speech_cartridge_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SP0256(config, m_nsp, 4000000); // ??? + SP0256(config, m_nsp, XTAL::u(4000000)); // ??? m_nsp->add_route(ALL_OUTPUTS, "mono", 1.00); } @@ -138,7 +138,7 @@ void c64_currah_speech_cartridge_device::set_osc1(int voice, int intonation) // c64_currah_speech_cartridge_device - constructor //------------------------------------------------- -c64_currah_speech_cartridge_device::c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_currah_speech_cartridge_device::c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_CURRAH_SPEECH, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_nsp(*this, "sp0256") diff --git a/src/devices/bus/c64/currah_speech.h b/src/devices/bus/c64/currah_speech.h index f856833f659..179967526de 100644 --- a/src/devices/bus/c64/currah_speech.h +++ b/src/devices/bus/c64/currah_speech.h @@ -28,7 +28,7 @@ class c64_currah_speech_cartridge_device : public device_t, { public: // construction/destruction - c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/dela_ep256.cpp b/src/devices/bus/c64/dela_ep256.cpp index d5052f914b2..dde8d788582 100644 --- a/src/devices/bus/c64/dela_ep256.cpp +++ b/src/devices/bus/c64/dela_ep256.cpp @@ -38,7 +38,7 @@ void c64_dela_ep256_cartridge_device::device_add_mconfig(machine_config &config) // c64_dela_ep256_cartridge_device - constructor //------------------------------------------------- -c64_dela_ep256_cartridge_device::c64_dela_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_dela_ep256_cartridge_device::c64_dela_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_DELA_EP256, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_eproms(*this, "rom%u", 1U) diff --git a/src/devices/bus/c64/dela_ep256.h b/src/devices/bus/c64/dela_ep256.h index bb6806f4d8e..1addc1e9fed 100644 --- a/src/devices/bus/c64/dela_ep256.h +++ b/src/devices/bus/c64/dela_ep256.h @@ -29,7 +29,7 @@ class c64_dela_ep256_cartridge_device : public device_t, { public: // construction/destruction - c64_dela_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_dela_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/dela_ep64.cpp b/src/devices/bus/c64/dela_ep64.cpp index 5798794f7eb..70592f3b571 100644 --- a/src/devices/bus/c64/dela_ep64.cpp +++ b/src/devices/bus/c64/dela_ep64.cpp @@ -37,7 +37,7 @@ void c64_dela_ep64_cartridge_device::device_add_mconfig(machine_config &config) // c64_dela_ep64_cartridge_device - constructor //------------------------------------------------- -c64_dela_ep64_cartridge_device::c64_dela_ep64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_dela_ep64_cartridge_device::c64_dela_ep64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_DELA_EP64, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_eprom1(*this, "eprom1"), diff --git a/src/devices/bus/c64/dela_ep64.h b/src/devices/bus/c64/dela_ep64.h index 95ac3440871..6aa026205ae 100644 --- a/src/devices/bus/c64/dela_ep64.h +++ b/src/devices/bus/c64/dela_ep64.h @@ -29,7 +29,7 @@ class c64_dela_ep64_cartridge_device : public device_t, { public: // construction/destruction - c64_dela_ep64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_dela_ep64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/dela_ep7x8.cpp b/src/devices/bus/c64/dela_ep7x8.cpp index 0c71555b880..8e2dd88387b 100644 --- a/src/devices/bus/c64/dela_ep7x8.cpp +++ b/src/devices/bus/c64/dela_ep7x8.cpp @@ -42,7 +42,7 @@ void c64_dela_ep7x8_cartridge_device::device_add_mconfig(machine_config &config) // c64_dela_ep7x8_cartridge_device - constructor //------------------------------------------------- -c64_dela_ep7x8_cartridge_device::c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_dela_ep7x8_cartridge_device::c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_DELA_EP7X8, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_eprom(*this, "rom%u", 1U) diff --git a/src/devices/bus/c64/dela_ep7x8.h b/src/devices/bus/c64/dela_ep7x8.h index 50e1b3af01e..a000175868d 100644 --- a/src/devices/bus/c64/dela_ep7x8.h +++ b/src/devices/bus/c64/dela_ep7x8.h @@ -29,7 +29,7 @@ class c64_dela_ep7x8_cartridge_device : public device_t, { public: // construction/destruction - c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_dela_ep7x8_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/dinamic.cpp b/src/devices/bus/c64/dinamic.cpp index 13d37749335..89aac9ec324 100644 --- a/src/devices/bus/c64/dinamic.cpp +++ b/src/devices/bus/c64/dinamic.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_DINAMIC, c64_dinamic_cartridge_device, "c64_dinamic", "C6 // c64_dinamic_cartridge_device - constructor //------------------------------------------------- -c64_dinamic_cartridge_device::c64_dinamic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_dinamic_cartridge_device::c64_dinamic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_DINAMIC, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/dinamic.h b/src/devices/bus/c64/dinamic.h index e204964e4a1..f30c02386c9 100644 --- a/src/devices/bus/c64/dinamic.h +++ b/src/devices/bus/c64/dinamic.h @@ -27,7 +27,7 @@ class c64_dinamic_cartridge_device : public device_t, { public: // construction/destruction - c64_dinamic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_dinamic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/dqbb.cpp b/src/devices/bus/c64/dqbb.cpp index e08bfbd05b5..a4ed00fe8a6 100644 --- a/src/devices/bus/c64/dqbb.cpp +++ b/src/devices/bus/c64/dqbb.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(C64_DQBB, c64_dqbb_cartridge_device, "c64_dqbb", "C64 Double // c64_dqbb_cartridge_device - constructor //------------------------------------------------- -c64_dqbb_cartridge_device::c64_dqbb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_dqbb_cartridge_device::c64_dqbb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_DQBB, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/bus/c64/dqbb.h b/src/devices/bus/c64/dqbb.h index 9770793bdd0..57e64339257 100644 --- a/src/devices/bus/c64/dqbb.h +++ b/src/devices/bus/c64/dqbb.h @@ -28,7 +28,7 @@ class c64_dqbb_cartridge_device : public device_t, { public: // construction/destruction - c64_dqbb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_dqbb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/easy_calc_result.cpp b/src/devices/bus/c64/easy_calc_result.cpp index 123870d5d3e..3fd64c777f5 100644 --- a/src/devices/bus/c64/easy_calc_result.cpp +++ b/src/devices/bus/c64/easy_calc_result.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(C64_EASY_CALC_RESULT, c64_easy_calc_result_cartridge_device, // c64_easy_calc_result_cartridge_device - constructor //------------------------------------------------- -c64_easy_calc_result_cartridge_device::c64_easy_calc_result_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_easy_calc_result_cartridge_device::c64_easy_calc_result_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_EASY_CALC_RESULT, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) { diff --git a/src/devices/bus/c64/easy_calc_result.h b/src/devices/bus/c64/easy_calc_result.h index 2d945b7dea2..ec72a56ff73 100644 --- a/src/devices/bus/c64/easy_calc_result.h +++ b/src/devices/bus/c64/easy_calc_result.h @@ -27,7 +27,7 @@ class c64_easy_calc_result_cartridge_device : public device_t, { public: // construction/destruction - c64_easy_calc_result_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_easy_calc_result_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/easyflash.cpp b/src/devices/bus/c64/easyflash.cpp index eab9ff7930a..966ecc93d01 100644 --- a/src/devices/bus/c64/easyflash.cpp +++ b/src/devices/bus/c64/easyflash.cpp @@ -71,7 +71,7 @@ ioport_constructor c64_easyflash_cartridge_device::device_input_ports() const // c64_easyflash_cartridge_device - constructor //------------------------------------------------- -c64_easyflash_cartridge_device::c64_easyflash_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_easyflash_cartridge_device::c64_easyflash_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_EASYFLASH, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_flash_roml(*this, AM29F040_0_TAG), diff --git a/src/devices/bus/c64/easyflash.h b/src/devices/bus/c64/easyflash.h index 6c73a14838a..40c206e2b6c 100644 --- a/src/devices/bus/c64/easyflash.h +++ b/src/devices/bus/c64/easyflash.h @@ -28,7 +28,7 @@ class c64_easyflash_cartridge_device : public device_t, { public: // construction/destruction - c64_easyflash_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_easyflash_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/epyx_fast_load.cpp b/src/devices/bus/c64/epyx_fast_load.cpp index 21352ddef63..1098f868dfc 100644 --- a/src/devices/bus/c64/epyx_fast_load.cpp +++ b/src/devices/bus/c64/epyx_fast_load.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(C64_EPYX_FAST_LOAD, c64_epyx_fast_load_cartridge_device, "c64 // c64_epyx_fast_load_cartridge_device - constructor //------------------------------------------------- -c64_epyx_fast_load_cartridge_device::c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_epyx_fast_load_cartridge_device::c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_EPYX_FAST_LOAD, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_exrom_timer(nullptr) { diff --git a/src/devices/bus/c64/epyx_fast_load.h b/src/devices/bus/c64/epyx_fast_load.h index 8a2ebcaa9b0..8d13a81d508 100644 --- a/src/devices/bus/c64/epyx_fast_load.h +++ b/src/devices/bus/c64/epyx_fast_load.h @@ -27,7 +27,7 @@ class c64_epyx_fast_load_cartridge_device : public device_t, { public: // construction/destruction - c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_epyx_fast_load_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/exos.cpp b/src/devices/bus/c64/exos.cpp index 13c5d972642..dbfe1fdca3a 100644 --- a/src/devices/bus/c64/exos.cpp +++ b/src/devices/bus/c64/exos.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_EXOS, c64_exos_cartridge_device, "c64_exos", "C64 ExOS ca // c64_exos_cartridge_device - constructor //------------------------------------------------- -c64_exos_cartridge_device::c64_exos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_exos_cartridge_device::c64_exos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_EXOS, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/exos.h b/src/devices/bus/c64/exos.h index 73b9b2699aa..e31f4fc5536 100644 --- a/src/devices/bus/c64/exos.h +++ b/src/devices/bus/c64/exos.h @@ -27,7 +27,7 @@ class c64_exos_cartridge_device : public device_t, { public: // construction/destruction - c64_exos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_exos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/exp.cpp b/src/devices/bus/c64/exp.cpp index 72d66ce6f30..5c0c5ae3e6a 100644 --- a/src/devices/bus/c64/exp.cpp +++ b/src/devices/bus/c64/exp.cpp @@ -56,7 +56,7 @@ device_c64_expansion_card_interface::~device_c64_expansion_card_interface() // c64_expansion_slot_device - constructor //------------------------------------------------- -c64_expansion_slot_device::c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_expansion_slot_device::c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h index d5861b0c4a3..3607b1f11b9 100644 --- a/src/devices/bus/c64/exp.h +++ b/src/devices/bus/c64/exp.h @@ -56,7 +56,7 @@ class c64_expansion_slot_device : public device_t, public: // construction/destruction template - c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : c64_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -65,7 +65,7 @@ public: set_fixed(false); } - c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_write_irq.bind(); } auto nmi_callback() { return m_write_nmi.bind(); } @@ -87,8 +87,8 @@ public: DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_write_nmi(state); } DECLARE_WRITE_LINE_MEMBER( dma_w ) { m_write_dma(state); } DECLARE_WRITE_LINE_MEMBER( reset_w ) { m_write_reset(state); } - int phi2() { return clock(); } - int dotclock() { return phi2() * 8; } + XTAL phi2() { return clock(); } + XTAL dotclock() { return phi2() * 8; } int hiram() { return m_hiram; } int loram() { return m_loram; } diff --git a/src/devices/bus/c64/fcc.cpp b/src/devices/bus/c64/fcc.cpp index 07ff8840e3a..6199968cc0a 100644 --- a/src/devices/bus/c64/fcc.cpp +++ b/src/devices/bus/c64/fcc.cpp @@ -78,7 +78,7 @@ ioport_constructor c64_final_chesscard_device::device_input_ports() const // c64_final_chesscard_device - constructor //------------------------------------------------- -c64_final_chesscard_device::c64_final_chesscard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_final_chesscard_device::c64_final_chesscard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_FCC, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/bus/c64/fcc.h b/src/devices/bus/c64/fcc.h index 33baea0707c..18dbd863f72 100644 --- a/src/devices/bus/c64/fcc.h +++ b/src/devices/bus/c64/fcc.h @@ -29,7 +29,7 @@ class c64_final_chesscard_device : public device_t, { public: // construction/destruction - c64_final_chesscard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_final_chesscard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/final.cpp b/src/devices/bus/c64/final.cpp index b11267b1f01..d7a40b39ff0 100644 --- a/src/devices/bus/c64/final.cpp +++ b/src/devices/bus/c64/final.cpp @@ -63,7 +63,7 @@ ioport_constructor c64_final_cartridge_device::device_input_ports() const // c64_final_cartridge_device - constructor //------------------------------------------------- -c64_final_cartridge_device::c64_final_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_final_cartridge_device::c64_final_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_FINAL, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/final.h b/src/devices/bus/c64/final.h index 6d59e737c02..11e18d56dee 100644 --- a/src/devices/bus/c64/final.h +++ b/src/devices/bus/c64/final.h @@ -27,7 +27,7 @@ class c64_final_cartridge_device : public device_t, { public: // construction/destruction - c64_final_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_final_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/final3.cpp b/src/devices/bus/c64/final3.cpp index 7df9d03042e..739e3e96c8f 100644 --- a/src/devices/bus/c64/final3.cpp +++ b/src/devices/bus/c64/final3.cpp @@ -64,7 +64,7 @@ ioport_constructor c64_final3_cartridge_device::device_input_ports() const // c64_final3_cartridge_device - constructor //------------------------------------------------- -c64_final3_cartridge_device::c64_final3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_final3_cartridge_device::c64_final3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_FINAL3, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0), m_hidden(0) { diff --git a/src/devices/bus/c64/final3.h b/src/devices/bus/c64/final3.h index 8b020482560..0f19ba580ef 100644 --- a/src/devices/bus/c64/final3.h +++ b/src/devices/bus/c64/final3.h @@ -27,7 +27,7 @@ class c64_final3_cartridge_device : public device_t, { public: // construction/destruction - c64_final3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_final3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/fun_play.cpp b/src/devices/bus/c64/fun_play.cpp index 2a211b21ab5..0c6a2430ee2 100644 --- a/src/devices/bus/c64/fun_play.cpp +++ b/src/devices/bus/c64/fun_play.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_FUN_PLAY, c64_fun_play_cartridge_device, "c64_fun_play", // c64_fun_play_cartridge_device - constructor //------------------------------------------------- -c64_fun_play_cartridge_device::c64_fun_play_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_fun_play_cartridge_device::c64_fun_play_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_FUN_PLAY, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/fun_play.h b/src/devices/bus/c64/fun_play.h index 6fc082164c6..1b43b5e5755 100644 --- a/src/devices/bus/c64/fun_play.h +++ b/src/devices/bus/c64/fun_play.h @@ -27,7 +27,7 @@ class c64_fun_play_cartridge_device : public device_t, { public: // construction/destruction - c64_fun_play_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_fun_play_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/geocable.cpp b/src/devices/bus/c64/geocable.cpp index e07734f987f..19ec7430bf6 100644 --- a/src/devices/bus/c64/geocable.cpp +++ b/src/devices/bus/c64/geocable.cpp @@ -46,7 +46,7 @@ void c64_geocable_device::device_add_mconfig(machine_config &config) // c64_geocable_device - constructor //------------------------------------------------- -c64_geocable_device::c64_geocable_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_geocable_device::c64_geocable_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_GEOCABLE, tag, owner, clock), device_pet_user_port_interface(mconfig, *this), m_centronics(*this, CENTRONICS_TAG) diff --git a/src/devices/bus/c64/geocable.h b/src/devices/bus/c64/geocable.h index 587a94ad80c..408fa0df991 100644 --- a/src/devices/bus/c64/geocable.h +++ b/src/devices/bus/c64/geocable.h @@ -27,7 +27,7 @@ class c64_geocable_device : public device_t, public device_pet_user_port_interfa { public: // construction/destruction - c64_geocable_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_geocable_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/georam.cpp b/src/devices/bus/c64/georam.cpp index 377bc10a391..19db7f3c66c 100644 --- a/src/devices/bus/c64/georam.cpp +++ b/src/devices/bus/c64/georam.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_GEORAM, c64_georam_cartridge_device, "c64_georam", "C64 G // c64_georam_cartridge_device - constructor //------------------------------------------------- -c64_georam_cartridge_device::c64_georam_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_georam_cartridge_device::c64_georam_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_GEORAM, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", 0x80000, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/c64/georam.h b/src/devices/bus/c64/georam.h index 41b7fd82379..0a66f343b92 100644 --- a/src/devices/bus/c64/georam.h +++ b/src/devices/bus/c64/georam.h @@ -27,7 +27,7 @@ class c64_georam_cartridge_device : public device_t, { public: // construction/destruction - c64_georam_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_georam_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/ide64.cpp b/src/devices/bus/c64/ide64.cpp index 830f38c3993..5fa27a61e66 100644 --- a/src/devices/bus/c64/ide64.cpp +++ b/src/devices/bus/c64/ide64.cpp @@ -86,7 +86,7 @@ ioport_constructor c64_ide64_cartridge_device::device_input_ports() const // c64_ide64_cartridge_device - constructor //------------------------------------------------- -c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_IDE64, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_flash_rom(*this, AT29C010A_TAG), diff --git a/src/devices/bus/c64/ide64.h b/src/devices/bus/c64/ide64.h index 9438e3a1ed0..d0a7d113c2a 100644 --- a/src/devices/bus/c64/ide64.h +++ b/src/devices/bus/c64/ide64.h @@ -31,7 +31,7 @@ class c64_ide64_cartridge_device : public device_t, { public: // construction/destruction - c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/ieee488.cpp b/src/devices/bus/c64/ieee488.cpp index dc588dfc136..48288cb216c 100644 --- a/src/devices/bus/c64/ieee488.cpp +++ b/src/devices/bus/c64/ieee488.cpp @@ -143,7 +143,7 @@ void c64_ieee488_device::tpi_pc_w(uint8_t data) void c64_ieee488_device::device_add_mconfig(machine_config &config) { - TPI6525(config, m_tpi, 0); + TPI6525(config, m_tpi); m_tpi->in_pa_cb().set(FUNC(c64_ieee488_device::tpi_pa_r)); m_tpi->out_pa_cb().set(FUNC(c64_ieee488_device::tpi_pa_w)); m_tpi->in_pb_cb().set(m_bus, FUNC(ieee488_device::dio_r)); @@ -151,7 +151,7 @@ void c64_ieee488_device::device_add_mconfig(machine_config &config) m_tpi->in_pc_cb().set(FUNC(c64_ieee488_device::tpi_pc_r)); m_tpi->out_pc_cb().set(FUNC(c64_ieee488_device::tpi_pc_w)); - IEEE488(config, m_bus, 0); + IEEE488(config, m_bus); ieee488_slot_device::add_cbm_defaults(config, nullptr); C64_EXPANSION_SLOT(config, m_exp, DERIVED_CLOCK(1, 1), c64_expansion_cards, nullptr); @@ -168,7 +168,7 @@ void c64_ieee488_device::device_add_mconfig(machine_config &config) // c64_ieee488_device - constructor //------------------------------------------------- -c64_ieee488_device::c64_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_ieee488_device::c64_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_IEEE488, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_tpi(*this, MOS6525_TAG), diff --git a/src/devices/bus/c64/ieee488.h b/src/devices/bus/c64/ieee488.h index 60919029bf7..224ac1c5883 100644 --- a/src/devices/bus/c64/ieee488.h +++ b/src/devices/bus/c64/ieee488.h @@ -28,7 +28,7 @@ class c64_ieee488_device : public device_t, { public: // construction/destruction - c64_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/kingsoft.cpp b/src/devices/bus/c64/kingsoft.cpp index 510032fb720..3e8be5a06b2 100644 --- a/src/devices/bus/c64/kingsoft.cpp +++ b/src/devices/bus/c64/kingsoft.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_KINGSOFT, c64_kingsoft_cartridge_device, "c64_kingsoft", // c64_kingsoft_cartridge_device - constructor //------------------------------------------------- -c64_kingsoft_cartridge_device::c64_kingsoft_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_kingsoft_cartridge_device::c64_kingsoft_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_KINGSOFT, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/kingsoft.h b/src/devices/bus/c64/kingsoft.h index 3a9fda45fef..afccc2e7363 100644 --- a/src/devices/bus/c64/kingsoft.h +++ b/src/devices/bus/c64/kingsoft.h @@ -27,7 +27,7 @@ class c64_kingsoft_cartridge_device : public device_t, { public: // construction/destruction - c64_kingsoft_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_kingsoft_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/mach5.cpp b/src/devices/bus/c64/mach5.cpp index ddd44407d3e..006cd6972eb 100644 --- a/src/devices/bus/c64/mach5.cpp +++ b/src/devices/bus/c64/mach5.cpp @@ -52,7 +52,7 @@ ioport_constructor c64_mach5_cartridge_device::device_input_ports() const // c64_mach5_cartridge_device - constructor //------------------------------------------------- -c64_mach5_cartridge_device::c64_mach5_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_mach5_cartridge_device::c64_mach5_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MACH5, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_s1(*this, "S1"), m_c128(false) diff --git a/src/devices/bus/c64/mach5.h b/src/devices/bus/c64/mach5.h index a49e1bec347..b532c0e253a 100644 --- a/src/devices/bus/c64/mach5.h +++ b/src/devices/bus/c64/mach5.h @@ -26,7 +26,7 @@ class c64_mach5_cartridge_device : public device_t, { public: // construction/destruction - c64_mach5_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_mach5_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/magic_desk.cpp b/src/devices/bus/c64/magic_desk.cpp index 2fe55681966..f1a140a6fe5 100644 --- a/src/devices/bus/c64/magic_desk.cpp +++ b/src/devices/bus/c64/magic_desk.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_MAGIC_DESK, c64_magic_desk_cartridge_device, "c64_magic_d // c64_magic_desk_cartridge_device - constructor //------------------------------------------------- -c64_magic_desk_cartridge_device::c64_magic_desk_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_magic_desk_cartridge_device::c64_magic_desk_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MAGIC_DESK, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/magic_desk.h b/src/devices/bus/c64/magic_desk.h index 75f76dee732..811c521e22e 100644 --- a/src/devices/bus/c64/magic_desk.h +++ b/src/devices/bus/c64/magic_desk.h @@ -27,7 +27,7 @@ class c64_magic_desk_cartridge_device : public device_t, { public: // construction/destruction - c64_magic_desk_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_magic_desk_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/magic_formel.cpp b/src/devices/bus/c64/magic_formel.cpp index 1e6c38d1685..5409307eb69 100644 --- a/src/devices/bus/c64/magic_formel.cpp +++ b/src/devices/bus/c64/magic_formel.cpp @@ -98,7 +98,7 @@ WRITE_LINE_MEMBER( c64_magic_formel_cartridge_device::pia_cb2_w ) void c64_magic_formel_cartridge_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(c64_magic_formel_cartridge_device::pia_pa_w)); m_pia->writepb_handler().set(FUNC(c64_magic_formel_cartridge_device::pia_pb_w)); m_pia->cb2_handler().set(FUNC(c64_magic_formel_cartridge_device::pia_cb2_w)); @@ -153,7 +153,7 @@ ioport_constructor c64_magic_formel_cartridge_device::device_input_ports() const // c64_magic_formel_cartridge_device - constructor //------------------------------------------------- -c64_magic_formel_cartridge_device::c64_magic_formel_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_magic_formel_cartridge_device::c64_magic_formel_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MAGIC_FORMEL, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_pia(*this, MC6821_TAG), diff --git a/src/devices/bus/c64/magic_formel.h b/src/devices/bus/c64/magic_formel.h index ab16d4a0e34..aa6e35116b2 100644 --- a/src/devices/bus/c64/magic_formel.h +++ b/src/devices/bus/c64/magic_formel.h @@ -27,7 +27,7 @@ class c64_magic_formel_cartridge_device : public device_t, { public: // construction/destruction - c64_magic_formel_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_magic_formel_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER( freeze ); diff --git a/src/devices/bus/c64/magic_voice.cpp b/src/devices/bus/c64/magic_voice.cpp index faac3bc0a33..f6752526d69 100644 --- a/src/devices/bus/c64/magic_voice.cpp +++ b/src/devices/bus/c64/magic_voice.cpp @@ -221,7 +221,7 @@ WRITE_LINE_MEMBER( c64_magic_voice_cartridge_device::apd_w ) void c64_magic_voice_cartridge_device::device_add_mconfig(machine_config &config) { - TPI6525(config, m_tpi, 0); + TPI6525(config, m_tpi); m_tpi->out_irq_cb().set(FUNC(c64_magic_voice_cartridge_device::tpi_irq_w)); m_tpi->in_pa_cb().set(FUNC(c64_magic_voice_cartridge_device::tpi_pa_r)); m_tpi->out_pa_cb().set(FUNC(c64_magic_voice_cartridge_device::tpi_pa_w)); @@ -230,7 +230,7 @@ void c64_magic_voice_cartridge_device::device_add_mconfig(machine_config &config m_tpi->out_ca_cb().set(FUNC(c64_magic_voice_cartridge_device::tpi_ca_w)); m_tpi->out_cb_cb().set(FUNC(c64_magic_voice_cartridge_device::tpi_cb_w)); - CD40105(config, m_fifo, 0); + CD40105(config, m_fifo); m_fifo->in_ready_cb().set(m_tpi, FUNC(tpi6525_device::i3_w)); SPEAKER(config, "mono").front_center(); @@ -255,7 +255,7 @@ void c64_magic_voice_cartridge_device::device_add_mconfig(machine_config &config // c64_magic_voice_cartridge_device - constructor //------------------------------------------------- -c64_magic_voice_cartridge_device::c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_magic_voice_cartridge_device::c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MAGIC_VOICE, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_vslsi(*this, T6721A_TAG), diff --git a/src/devices/bus/c64/magic_voice.h b/src/devices/bus/c64/magic_voice.h index f6c4a4d138e..b55008f9614 100644 --- a/src/devices/bus/c64/magic_voice.h +++ b/src/devices/bus/c64/magic_voice.h @@ -29,7 +29,7 @@ class c64_magic_voice_cartridge_device : public device_t, { public: // construction/destruction - c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_magic_voice_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/midi_maplin.cpp b/src/devices/bus/c64/midi_maplin.cpp index adc8556a7bd..ae0a7d3f286 100644 --- a/src/devices/bus/c64/midi_maplin.cpp +++ b/src/devices/bus/c64/midi_maplin.cpp @@ -46,7 +46,7 @@ WRITE_LINE_MEMBER( c64_maplin_midi_cartridge_device::write_acia_clock ) void c64_maplin_midi_cartridge_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(FUNC(c64_maplin_midi_cartridge_device::acia_irq_w)); @@ -54,7 +54,7 @@ void c64_maplin_midi_cartridge_device::device_add_mconfig(machine_config &config MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); acia_clock.signal_handler().set(FUNC(c64_maplin_midi_cartridge_device::write_acia_clock)); } @@ -68,7 +68,7 @@ void c64_maplin_midi_cartridge_device::device_add_mconfig(machine_config &config // c64_maplin_midi_cartridge_device - constructor //------------------------------------------------- -c64_maplin_midi_cartridge_device::c64_maplin_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_maplin_midi_cartridge_device::c64_maplin_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MIDI_MAPLIN, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_acia(*this, MC6850_TAG) diff --git a/src/devices/bus/c64/midi_maplin.h b/src/devices/bus/c64/midi_maplin.h index d0798d9217f..18e40b9207a 100644 --- a/src/devices/bus/c64/midi_maplin.h +++ b/src/devices/bus/c64/midi_maplin.h @@ -26,7 +26,7 @@ class c64_maplin_midi_cartridge_device : public device_t, public device_c64_expa { public: // construction/destruction - c64_maplin_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_maplin_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/midi_namesoft.cpp b/src/devices/bus/c64/midi_namesoft.cpp index d4e7c8b59ac..4aef9cf522b 100644 --- a/src/devices/bus/c64/midi_namesoft.cpp +++ b/src/devices/bus/c64/midi_namesoft.cpp @@ -46,7 +46,7 @@ WRITE_LINE_MEMBER( c64_namesoft_midi_cartridge_device::write_acia_clock ) void c64_namesoft_midi_cartridge_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(FUNC(c64_namesoft_midi_cartridge_device::acia_irq_w)); @@ -54,7 +54,7 @@ void c64_namesoft_midi_cartridge_device::device_add_mconfig(machine_config &conf MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); acia_clock.signal_handler().set(FUNC(c64_namesoft_midi_cartridge_device::write_acia_clock)); } @@ -68,7 +68,7 @@ void c64_namesoft_midi_cartridge_device::device_add_mconfig(machine_config &conf // c64_namesoft_midi_cartridge_device - constructor //------------------------------------------------- -c64_namesoft_midi_cartridge_device::c64_namesoft_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_namesoft_midi_cartridge_device::c64_namesoft_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MIDI_NAMESOFT, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_acia(*this, MC6850_TAG) diff --git a/src/devices/bus/c64/midi_namesoft.h b/src/devices/bus/c64/midi_namesoft.h index d2183d271d0..3d66ff6b433 100644 --- a/src/devices/bus/c64/midi_namesoft.h +++ b/src/devices/bus/c64/midi_namesoft.h @@ -26,7 +26,7 @@ class c64_namesoft_midi_cartridge_device : public device_t, public device_c64_ex { public: // construction/destruction - c64_namesoft_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_namesoft_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/midi_passport.cpp b/src/devices/bus/c64/midi_passport.cpp index 05a3fbb1a36..1e98e2e9417 100644 --- a/src/devices/bus/c64/midi_passport.cpp +++ b/src/devices/bus/c64/midi_passport.cpp @@ -60,19 +60,19 @@ WRITE_LINE_MEMBER( c64_passport_midi_cartridge_device::write_acia_clock ) void c64_passport_midi_cartridge_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(FUNC(c64_passport_midi_cartridge_device::acia_irq_w)); - PTM6840(config, m_ptm, 1021800); - m_ptm->set_external_clocks(1021800.0f, 1021800.0f, 1021800.0f); + PTM6840(config, m_ptm, XTAL::u(1021800)); + m_ptm->set_external_clocks(XTAL::u(1021800), XTAL::u(1021800), XTAL::u(1021800)); m_ptm->irq_callback().set(FUNC(c64_passport_midi_cartridge_device::ptm_irq_w)); MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd)); MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); // TODO: work out if the clock should come from the 6840 + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); // TODO: work out if the clock should come from the 6840 acia_clock.signal_handler().set(FUNC(c64_passport_midi_cartridge_device::write_acia_clock)); } @@ -86,7 +86,7 @@ void c64_passport_midi_cartridge_device::device_add_mconfig(machine_config &conf // c64_passport_midi_cartridge_device - constructor //------------------------------------------------- -c64_passport_midi_cartridge_device::c64_passport_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_passport_midi_cartridge_device::c64_passport_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MIDI_PASSPORT, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_acia(*this, MC6850_TAG), diff --git a/src/devices/bus/c64/midi_passport.h b/src/devices/bus/c64/midi_passport.h index d6b4cf16eb7..77b4ccc9538 100644 --- a/src/devices/bus/c64/midi_passport.h +++ b/src/devices/bus/c64/midi_passport.h @@ -27,7 +27,7 @@ class c64_passport_midi_cartridge_device : public device_t, public device_c64_ex { public: // construction/destruction - c64_passport_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_passport_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/midi_sci.cpp b/src/devices/bus/c64/midi_sci.cpp index 14309ee5e7c..62d9fed4fd3 100644 --- a/src/devices/bus/c64/midi_sci.cpp +++ b/src/devices/bus/c64/midi_sci.cpp @@ -46,7 +46,7 @@ WRITE_LINE_MEMBER( c64_sequential_midi_cartridge_device::write_acia_clock ) void c64_sequential_midi_cartridge_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(FUNC(c64_sequential_midi_cartridge_device::acia_irq_w)); @@ -54,7 +54,7 @@ void c64_sequential_midi_cartridge_device::device_add_mconfig(machine_config &co MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); acia_clock.signal_handler().set(FUNC(c64_sequential_midi_cartridge_device::write_acia_clock)); } @@ -68,7 +68,7 @@ void c64_sequential_midi_cartridge_device::device_add_mconfig(machine_config &co // c64_sequential_midi_cartridge_device - constructor //------------------------------------------------- -c64_sequential_midi_cartridge_device::c64_sequential_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_sequential_midi_cartridge_device::c64_sequential_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MIDI_SCI, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_acia(*this, MC6850_TAG) diff --git a/src/devices/bus/c64/midi_sci.h b/src/devices/bus/c64/midi_sci.h index 5ab0d8d45db..66a8623a489 100644 --- a/src/devices/bus/c64/midi_sci.h +++ b/src/devices/bus/c64/midi_sci.h @@ -26,7 +26,7 @@ class c64_sequential_midi_cartridge_device : public device_t, public device_c64_ { public: // construction/destruction - c64_sequential_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_sequential_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/midi_siel.cpp b/src/devices/bus/c64/midi_siel.cpp index eea7a4b333d..d2af8c262a5 100644 --- a/src/devices/bus/c64/midi_siel.cpp +++ b/src/devices/bus/c64/midi_siel.cpp @@ -46,7 +46,7 @@ WRITE_LINE_MEMBER( c64_siel_midi_cartridge_device::write_acia_clock ) void c64_siel_midi_cartridge_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(FUNC(c64_siel_midi_cartridge_device::acia_irq_w)); @@ -54,7 +54,7 @@ void c64_siel_midi_cartridge_device::device_add_mconfig(machine_config &config) MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); acia_clock.signal_handler().set(FUNC(c64_siel_midi_cartridge_device::write_acia_clock)); } @@ -68,7 +68,7 @@ void c64_siel_midi_cartridge_device::device_add_mconfig(machine_config &config) // c64_siel_midi_cartridge_device - constructor //------------------------------------------------- -c64_siel_midi_cartridge_device::c64_siel_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_siel_midi_cartridge_device::c64_siel_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MIDI_SIEL, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_acia(*this, MC6850_TAG) diff --git a/src/devices/bus/c64/midi_siel.h b/src/devices/bus/c64/midi_siel.h index 412d1a224b7..5a84c250e66 100644 --- a/src/devices/bus/c64/midi_siel.h +++ b/src/devices/bus/c64/midi_siel.h @@ -26,7 +26,7 @@ class c64_siel_midi_cartridge_device : public device_t, public device_c64_expans { public: // construction/destruction - c64_siel_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_siel_midi_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/mikro_assembler.cpp b/src/devices/bus/c64/mikro_assembler.cpp index d6c02be7681..394cf04afcb 100644 --- a/src/devices/bus/c64/mikro_assembler.cpp +++ b/src/devices/bus/c64/mikro_assembler.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_MIKRO_ASSEMBLER, c64_mikro_assembler_cartridge_device, "c // c64_mikro_assembler_cartridge_device - constructor //------------------------------------------------- -c64_mikro_assembler_cartridge_device::c64_mikro_assembler_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_mikro_assembler_cartridge_device::c64_mikro_assembler_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MIKRO_ASSEMBLER, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/mikro_assembler.h b/src/devices/bus/c64/mikro_assembler.h index 754a91385d4..0abf97aabe4 100644 --- a/src/devices/bus/c64/mikro_assembler.h +++ b/src/devices/bus/c64/mikro_assembler.h @@ -27,7 +27,7 @@ class c64_mikro_assembler_cartridge_device : public device_t, { public: // construction/destruction - c64_mikro_assembler_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_mikro_assembler_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/multiscreen.cpp b/src/devices/bus/c64/multiscreen.cpp index 890c1a35799..63b6bca4d80 100644 --- a/src/devices/bus/c64/multiscreen.cpp +++ b/src/devices/bus/c64/multiscreen.cpp @@ -117,8 +117,8 @@ void c64_multiscreen_cartridge_device::device_add_mconfig(machine_config &config m6802_cpu_device &cpu(M6802(config, MC6802P_TAG, XTAL(4'000'000))); cpu.set_addrmap(AS_PROGRAM, &c64_multiscreen_cartridge_device::multiscreen_mem); - PIA6821(config, MC6821P_0_TAG, 0); - PIA6821(config, MC6821P_1_TAG, 0); + PIA6821(config, MC6821P_0_TAG); + PIA6821(config, MC6821P_1_TAG); } @@ -130,7 +130,7 @@ void c64_multiscreen_cartridge_device::device_add_mconfig(machine_config &config // c64_multiscreen_cartridge_device - constructor //------------------------------------------------- -c64_multiscreen_cartridge_device::c64_multiscreen_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_multiscreen_cartridge_device::c64_multiscreen_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MULTISCREEN, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) { diff --git a/src/devices/bus/c64/multiscreen.h b/src/devices/bus/c64/multiscreen.h index 619154d18c5..edc07af326a 100644 --- a/src/devices/bus/c64/multiscreen.h +++ b/src/devices/bus/c64/multiscreen.h @@ -29,7 +29,7 @@ class c64_multiscreen_cartridge_device : public device_t, { public: // construction/destruction - c64_multiscreen_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_multiscreen_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/music64.cpp b/src/devices/bus/c64/music64.cpp index 28fa6fc1539..1f8724e64d7 100644 --- a/src/devices/bus/c64/music64.cpp +++ b/src/devices/bus/c64/music64.cpp @@ -141,7 +141,7 @@ ioport_constructor c64_music64_cartridge_device::device_input_ports() const // c64_music64_cartridge_device - constructor //------------------------------------------------- -c64_music64_cartridge_device::c64_music64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_music64_cartridge_device::c64_music64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_MUSIC64, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_exp(*this, "exp"), diff --git a/src/devices/bus/c64/music64.h b/src/devices/bus/c64/music64.h index cf494c481b8..7b583e983aa 100644 --- a/src/devices/bus/c64/music64.h +++ b/src/devices/bus/c64/music64.h @@ -26,7 +26,7 @@ class c64_music64_cartridge_device : public device_t, { public: // construction/destruction - c64_music64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_music64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/neoram.cpp b/src/devices/bus/c64/neoram.cpp index c0f292da161..4d70792f337 100644 --- a/src/devices/bus/c64/neoram.cpp +++ b/src/devices/bus/c64/neoram.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_NEORAM, c64_neoram_cartridge_device, "c64_neoram", "C64 N // c64_neoram_cartridge_device - constructor //------------------------------------------------- -c64_neoram_cartridge_device::c64_neoram_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_neoram_cartridge_device::c64_neoram_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_NEORAM, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/bus/c64/neoram.h b/src/devices/bus/c64/neoram.h index d54e8e18cc4..63b4149c004 100644 --- a/src/devices/bus/c64/neoram.h +++ b/src/devices/bus/c64/neoram.h @@ -28,7 +28,7 @@ class c64_neoram_cartridge_device : public device_t, { public: // construction/destruction - c64_neoram_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_neoram_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/ocean.cpp b/src/devices/bus/c64/ocean.cpp index 3e134d9449b..dacb5513608 100644 --- a/src/devices/bus/c64/ocean.cpp +++ b/src/devices/bus/c64/ocean.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(C64_OCEAN, c64_ocean_cartridge_device, "c64_ocean", "C64 Ocea // c64_ocean_cartridge_device - constructor //------------------------------------------------- -c64_ocean_cartridge_device::c64_ocean_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_ocean_cartridge_device::c64_ocean_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_OCEAN, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/ocean.h b/src/devices/bus/c64/ocean.h index 9a78f5e21f9..752fe0eb087 100644 --- a/src/devices/bus/c64/ocean.h +++ b/src/devices/bus/c64/ocean.h @@ -27,7 +27,7 @@ class c64_ocean_cartridge_device : public device_t, { public: // construction/destruction - c64_ocean_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_ocean_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/pagefox.cpp b/src/devices/bus/c64/pagefox.cpp index e33bb4d3d7b..67580e00c2d 100644 --- a/src/devices/bus/c64/pagefox.cpp +++ b/src/devices/bus/c64/pagefox.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(C64_PAGEFOX, c64_pagefox_cartridge_device, "c64_pagefox", "C6 // c64_pagefox_cartridge_device - constructor //------------------------------------------------- -c64_pagefox_cartridge_device::c64_pagefox_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_pagefox_cartridge_device::c64_pagefox_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_PAGEFOX, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", 0x8000, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/c64/pagefox.h b/src/devices/bus/c64/pagefox.h index b0295eb9d0d..f19f7d71653 100644 --- a/src/devices/bus/c64/pagefox.h +++ b/src/devices/bus/c64/pagefox.h @@ -27,7 +27,7 @@ class c64_pagefox_cartridge_device : public device_t, { public: // construction/destruction - c64_pagefox_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_pagefox_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/partner.cpp b/src/devices/bus/c64/partner.cpp index b77cf610d17..851224479b8 100644 --- a/src/devices/bus/c64/partner.cpp +++ b/src/devices/bus/c64/partner.cpp @@ -77,7 +77,7 @@ ioport_constructor c64_partner_cartridge_device::device_input_ports() const // c64_partner_cartridge_device - constructor //------------------------------------------------- -c64_partner_cartridge_device::c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_partner_cartridge_device::c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_PARTNER, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", 0x2000, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/c64/partner.h b/src/devices/bus/c64/partner.h index 4dd71542571..be3aa3925b6 100644 --- a/src/devices/bus/c64/partner.h +++ b/src/devices/bus/c64/partner.h @@ -26,7 +26,7 @@ class c64_partner_cartridge_device : public device_t, { public: // construction/destruction - c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/prophet64.cpp b/src/devices/bus/c64/prophet64.cpp index ea5e16a3000..d4f2d4ff9cc 100644 --- a/src/devices/bus/c64/prophet64.cpp +++ b/src/devices/bus/c64/prophet64.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_PROPHET64, c64_prophet64_cartridge_device, "c64_prophet64 // c64_prophet64_cartridge_device - constructor //------------------------------------------------- -c64_prophet64_cartridge_device::c64_prophet64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_prophet64_cartridge_device::c64_prophet64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_PROPHET64, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/prophet64.h b/src/devices/bus/c64/prophet64.h index f58ba30b7b7..fc26e74ebab 100644 --- a/src/devices/bus/c64/prophet64.h +++ b/src/devices/bus/c64/prophet64.h @@ -26,7 +26,7 @@ class c64_prophet64_cartridge_device : public device_t, { public: // construction/destruction - c64_prophet64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_prophet64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/ps64.cpp b/src/devices/bus/c64/ps64.cpp index c14008b2c08..fcfd3f02422 100644 --- a/src/devices/bus/c64/ps64.cpp +++ b/src/devices/bus/c64/ps64.cpp @@ -67,7 +67,7 @@ DEFINE_DEVICE_TYPE(C64_PS64, c64_ps64_cartridge_device, "c64_ps64", "C64 PS-64") void c64_ps64_cartridge_device::device_add_mconfig(machine_config &config) { //SPEAKER(config, "speaker").front_center(); - //VOTRAX_SC02(config, SSI263_TAG, 2000000).add_route(ALL_OUTPUTS, "mono", 1.00); + //VOTRAX_SC02(config, SSI263_TAG, XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 1.00); } @@ -80,7 +80,7 @@ void c64_ps64_cartridge_device::device_add_mconfig(machine_config &config) // c64_ps64_cartridge_device - constructor //------------------------------------------------- -c64_ps64_cartridge_device::c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_ps64_cartridge_device::c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_PS64, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/ps64.h b/src/devices/bus/c64/ps64.h index 69a9c5b0110..1cb0d113031 100644 --- a/src/devices/bus/c64/ps64.h +++ b/src/devices/bus/c64/ps64.h @@ -28,7 +28,7 @@ class c64_ps64_cartridge_device : public device_t, { public: // construction/destruction - c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/reu.cpp b/src/devices/bus/c64/reu.cpp index 0d24a1967fa..09c0cf82bba 100644 --- a/src/devices/bus/c64/reu.cpp +++ b/src/devices/bus/c64/reu.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(C64_REU1764, c64_reu1764_cartridge_device, "c64_1764reu", "17 void c64_reu_cartridge_device::device_add_mconfig(machine_config &config) { - MOS8726(config, m_dmac, 1000000); // dummy clock + MOS8726(config, m_dmac, XTAL::u(1000000)); // dummy clock GENERIC_SOCKET(config, m_eprom, generic_linear_slot, nullptr, "bin,rom"); } @@ -48,7 +48,7 @@ void c64_reu_cartridge_device::device_add_mconfig(machine_config &config) // c64_reu_cartridge_device - constructor //------------------------------------------------- -c64_reu_cartridge_device::c64_reu_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant, int jp1, size_t ram_size) : +c64_reu_cartridge_device::c64_reu_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant, int jp1, size_t ram_size) : device_t(mconfig, type, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_dmac(*this, MOS8726R1_TAG), @@ -60,13 +60,13 @@ c64_reu_cartridge_device::c64_reu_cartridge_device(const machine_config &mconfig { } -c64_reu1700_cartridge_device::c64_reu1700_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c64_reu1700_cartridge_device::c64_reu1700_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c64_reu_cartridge_device(mconfig, C64_REU1700, tag, owner, clock, TYPE_1700, 0, 128 * 1024) { } -c64_reu1750_cartridge_device::c64_reu1750_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c64_reu1750_cartridge_device::c64_reu1750_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c64_reu_cartridge_device(mconfig, C64_REU1750, tag, owner, clock, TYPE_1750, 1, 256 * 1024) { } -c64_reu1764_cartridge_device::c64_reu1764_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c64_reu1764_cartridge_device::c64_reu1764_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c64_reu_cartridge_device(mconfig, C64_REU1764, tag, owner, clock, TYPE_1764, 1, 512 * 1024) { } diff --git a/src/devices/bus/c64/reu.h b/src/devices/bus/c64/reu.h index eaa662f38a1..e2197b615d9 100644 --- a/src/devices/bus/c64/reu.h +++ b/src/devices/bus/c64/reu.h @@ -37,7 +37,7 @@ protected: }; // construction/destruction - c64_reu_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant, int jp1, size_t ram_size); + c64_reu_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant, int jp1, size_t ram_size); // device-level overrides virtual void device_start() override; @@ -66,7 +66,7 @@ class c64_reu1700_cartridge_device : public c64_reu_cartridge_device { public: // construction/destruction - c64_reu1700_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_reu1700_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -76,7 +76,7 @@ class c64_reu1750_cartridge_device : public c64_reu_cartridge_device { public: // construction/destruction - c64_reu1750_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_reu1750_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> c64_reu1700_cartridge_device @@ -85,7 +85,7 @@ class c64_reu1764_cartridge_device : public c64_reu_cartridge_device { public: // construction/destruction - c64_reu1764_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_reu1764_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/c64/rex.cpp b/src/devices/bus/c64/rex.cpp index 97fecd740af..3932cd419a2 100644 --- a/src/devices/bus/c64/rex.cpp +++ b/src/devices/bus/c64/rex.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_REX, c64_rex_cartridge_device, "c64_rex", "C64 Rex cartri // c64_rex_cartridge_device - constructor //------------------------------------------------- -c64_rex_cartridge_device::c64_rex_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_rex_cartridge_device::c64_rex_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_REX, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/rex.h b/src/devices/bus/c64/rex.h index cc0cccb52da..f7ab9abbe4b 100644 --- a/src/devices/bus/c64/rex.h +++ b/src/devices/bus/c64/rex.h @@ -27,7 +27,7 @@ class c64_rex_cartridge_device : public device_t, { public: // construction/destruction - c64_rex_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_rex_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/rex_ep256.cpp b/src/devices/bus/c64/rex_ep256.cpp index c482e4b2589..2868e1430aa 100644 --- a/src/devices/bus/c64/rex_ep256.cpp +++ b/src/devices/bus/c64/rex_ep256.cpp @@ -38,7 +38,7 @@ void c64_rex_ep256_cartridge_device::device_add_mconfig(machine_config &config) // c64_rex_ep256_cartridge_device - constructor //------------------------------------------------- -c64_rex_ep256_cartridge_device::c64_rex_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_rex_ep256_cartridge_device::c64_rex_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_REX_EP256, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_eproms(*this, "rom%u", 1U) diff --git a/src/devices/bus/c64/rex_ep256.h b/src/devices/bus/c64/rex_ep256.h index e06a2c71d17..b9c4d53808d 100644 --- a/src/devices/bus/c64/rex_ep256.h +++ b/src/devices/bus/c64/rex_ep256.h @@ -29,7 +29,7 @@ class c64_rex_ep256_cartridge_device : public device_t, { public: // construction/destruction - c64_rex_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_rex_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/ross.cpp b/src/devices/bus/c64/ross.cpp index e8703a33bcc..9e0e9c31580 100644 --- a/src/devices/bus/c64/ross.cpp +++ b/src/devices/bus/c64/ross.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_ROSS, c64_ross_cartridge_device, "c64_ross", "C64 Ross ca // c64_ross_cartridge_device - constructor //------------------------------------------------- -c64_ross_cartridge_device::c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_ross_cartridge_device::c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_ROSS, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) { diff --git a/src/devices/bus/c64/ross.h b/src/devices/bus/c64/ross.h index 97f2698fb6c..4374f044b2f 100644 --- a/src/devices/bus/c64/ross.h +++ b/src/devices/bus/c64/ross.h @@ -27,7 +27,7 @@ class c64_ross_cartridge_device : public device_t, { public: // construction/destruction - c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/sfx_sound_expander.cpp b/src/devices/bus/c64/sfx_sound_expander.cpp index a85b93bccbf..e392e5f6aac 100644 --- a/src/devices/bus/c64/sfx_sound_expander.cpp +++ b/src/devices/bus/c64/sfx_sound_expander.cpp @@ -173,7 +173,7 @@ inline offs_t c64_sfx_sound_expander_cartridge_device::get_offset(offs_t offset, // c64_sfx_sound_expander_cartridge_device - constructor //------------------------------------------------- -c64_sfx_sound_expander_cartridge_device::c64_sfx_sound_expander_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_sfx_sound_expander_cartridge_device::c64_sfx_sound_expander_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SFX_SOUND_EXPANDER, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_opl(*this, YM3526_TAG), diff --git a/src/devices/bus/c64/sfx_sound_expander.h b/src/devices/bus/c64/sfx_sound_expander.h index 52e006ce686..174b4659149 100644 --- a/src/devices/bus/c64/sfx_sound_expander.h +++ b/src/devices/bus/c64/sfx_sound_expander.h @@ -27,7 +27,7 @@ class c64_sfx_sound_expander_cartridge_device : public device_t, { public: // construction/destruction - c64_sfx_sound_expander_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_sfx_sound_expander_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/silverrock.cpp b/src/devices/bus/c64/silverrock.cpp index f52efc569b6..7b411c2020a 100644 --- a/src/devices/bus/c64/silverrock.cpp +++ b/src/devices/bus/c64/silverrock.cpp @@ -60,7 +60,7 @@ DEFINE_DEVICE_TYPE(C64_SILVERROCK, c64_silverrock_cartridge_device, "c64_silverr // c64_silverrock_cartridge_device - constructor //------------------------------------------------- -c64_silverrock_cartridge_device::c64_silverrock_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_silverrock_cartridge_device::c64_silverrock_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SILVERROCK, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) { diff --git a/src/devices/bus/c64/silverrock.h b/src/devices/bus/c64/silverrock.h index 3d9c4e015f2..e758dc18c1b 100644 --- a/src/devices/bus/c64/silverrock.h +++ b/src/devices/bus/c64/silverrock.h @@ -27,7 +27,7 @@ class c64_silverrock_cartridge_device : public device_t, { public: // construction/destruction - c64_silverrock_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_silverrock_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/simons_basic.cpp b/src/devices/bus/c64/simons_basic.cpp index 246e67b8b56..57e5a8774b5 100644 --- a/src/devices/bus/c64/simons_basic.cpp +++ b/src/devices/bus/c64/simons_basic.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_SIMONS_BASIC, c64_simons_basic_cartridge_device, "c64_sim // c64_simons_basic_cartridge_device - constructor //------------------------------------------------- -c64_simons_basic_cartridge_device::c64_simons_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_simons_basic_cartridge_device::c64_simons_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SIMONS_BASIC, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/simons_basic.h b/src/devices/bus/c64/simons_basic.h index 63d2dfb5cb9..88639532062 100644 --- a/src/devices/bus/c64/simons_basic.h +++ b/src/devices/bus/c64/simons_basic.h @@ -27,7 +27,7 @@ class c64_simons_basic_cartridge_device : public device_t, { public: // construction/destruction - c64_simons_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_simons_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/speakeasy.cpp b/src/devices/bus/c64/speakeasy.cpp index 23caee3488f..1d85625d8b9 100644 --- a/src/devices/bus/c64/speakeasy.cpp +++ b/src/devices/bus/c64/speakeasy.cpp @@ -35,7 +35,7 @@ void c64_speakeasy_cartridge_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - VOTRAX_SC01(config, m_votrax, 720000).add_route(ALL_OUTPUTS, "mono", 0.85); + VOTRAX_SC01(config, m_votrax, XTAL::u(720000)).add_route(ALL_OUTPUTS, "mono", 0.85); } @@ -48,7 +48,7 @@ void c64_speakeasy_cartridge_device::device_add_mconfig(machine_config &config) // c64_speakeasy_cartridge_device - constructor //------------------------------------------------- -c64_speakeasy_cartridge_device::c64_speakeasy_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_speakeasy_cartridge_device::c64_speakeasy_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SPEAKEASY, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_votrax(*this, SC01A_TAG) diff --git a/src/devices/bus/c64/speakeasy.h b/src/devices/bus/c64/speakeasy.h index 0816e4caa2e..bf16973502f 100644 --- a/src/devices/bus/c64/speakeasy.h +++ b/src/devices/bus/c64/speakeasy.h @@ -26,7 +26,7 @@ class c64_speakeasy_cartridge_device : public device_t, public device_c64_expans { public: // construction/destruction - c64_speakeasy_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_speakeasy_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/stardos.cpp b/src/devices/bus/c64/stardos.cpp index 601ada2778c..c8436020b94 100644 --- a/src/devices/bus/c64/stardos.cpp +++ b/src/devices/bus/c64/stardos.cpp @@ -113,7 +113,7 @@ void c64_stardos_cartridge_device::charge_io2_capacitor() // c64_stardos_cartridge_device - constructor //------------------------------------------------- -c64_stardos_cartridge_device::c64_stardos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_stardos_cartridge_device::c64_stardos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_STARDOS, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_io1_charge(0), diff --git a/src/devices/bus/c64/stardos.h b/src/devices/bus/c64/stardos.h index 9be9f599957..606eb155a2a 100644 --- a/src/devices/bus/c64/stardos.h +++ b/src/devices/bus/c64/stardos.h @@ -28,7 +28,7 @@ class c64_stardos_cartridge_device : public device_t, { public: // construction/destruction - c64_stardos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_stardos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/std.cpp b/src/devices/bus/c64/std.cpp index 127f0bf235c..dd4ed8c2b5c 100644 --- a/src/devices/bus/c64/std.cpp +++ b/src/devices/bus/c64/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_STD, c64_standard_cartridge_device, "c64_standard", "C64 // c64_standard_cartridge_device - constructor //------------------------------------------------- -c64_standard_cartridge_device::c64_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_standard_cartridge_device::c64_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_STD, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/std.h b/src/devices/bus/c64/std.h index 391e9ac973f..edb034d2717 100644 --- a/src/devices/bus/c64/std.h +++ b/src/devices/bus/c64/std.h @@ -27,7 +27,7 @@ class c64_standard_cartridge_device : public device_t, { public: // construction/destruction - c64_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/structured_basic.cpp b/src/devices/bus/c64/structured_basic.cpp index e7773c772c0..951b997c38a 100644 --- a/src/devices/bus/c64/structured_basic.cpp +++ b/src/devices/bus/c64/structured_basic.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_STRUCTURED_BASIC, c64_structured_basic_cartridge_device, // c64_structured_basic_cartridge_device - constructor //------------------------------------------------- -c64_structured_basic_cartridge_device::c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_structured_basic_cartridge_device::c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_STRUCTURED_BASIC, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/structured_basic.h b/src/devices/bus/c64/structured_basic.h index 44d370cdb3f..3811455996c 100644 --- a/src/devices/bus/c64/structured_basic.h +++ b/src/devices/bus/c64/structured_basic.h @@ -27,7 +27,7 @@ class c64_structured_basic_cartridge_device : public device_t, { public: // construction/destruction - c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/super_explode.cpp b/src/devices/bus/c64/super_explode.cpp index b01e2e25fba..336c0bf4bbe 100644 --- a/src/devices/bus/c64/super_explode.cpp +++ b/src/devices/bus/c64/super_explode.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(C64_SUPER_EXPLODE, c64_super_explode_cartridge_device, "c64_s // c64_super_explode_cartridge_device - constructor //------------------------------------------------- -c64_super_explode_cartridge_device::c64_super_explode_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_super_explode_cartridge_device::c64_super_explode_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SUPER_EXPLODE, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0), m_exrom_timer(nullptr) { diff --git a/src/devices/bus/c64/super_explode.h b/src/devices/bus/c64/super_explode.h index b2cedd35c55..37c763ab194 100644 --- a/src/devices/bus/c64/super_explode.h +++ b/src/devices/bus/c64/super_explode.h @@ -27,7 +27,7 @@ class c64_super_explode_cartridge_device : public device_t, { public: // construction/destruction - c64_super_explode_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_super_explode_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/super_games.cpp b/src/devices/bus/c64/super_games.cpp index 610861c360e..f10f5e7b740 100644 --- a/src/devices/bus/c64/super_games.cpp +++ b/src/devices/bus/c64/super_games.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_SUPER_GAMES, c64_super_games_cartridge_device, "c64_super // c64_super_games_cartridge_device - constructor //------------------------------------------------- -c64_super_games_cartridge_device::c64_super_games_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_super_games_cartridge_device::c64_super_games_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SUPER_GAMES, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/super_games.h b/src/devices/bus/c64/super_games.h index 11e4b44046a..eda47dcc195 100644 --- a/src/devices/bus/c64/super_games.h +++ b/src/devices/bus/c64/super_games.h @@ -27,7 +27,7 @@ class c64_super_games_cartridge_device : public device_t, { public: // construction/destruction - c64_super_games_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_super_games_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/supercpu.cpp b/src/devices/bus/c64/supercpu.cpp index e0fe2e2a1ea..c9aa032dfdd 100644 --- a/src/devices/bus/c64/supercpu.cpp +++ b/src/devices/bus/c64/supercpu.cpp @@ -63,7 +63,7 @@ void c64_supercpu_device::c64_supercpu_map(address_map &map) void c64_supercpu_device::device_add_mconfig(machine_config &config) { - G65816(config, m_maincpu, 1000000); + G65816(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &c64_supercpu_device::c64_supercpu_map); C64_EXPANSION_SLOT(config, m_exp, DERIVED_CLOCK(1, 1), c64_expansion_cards, nullptr); @@ -111,7 +111,7 @@ ioport_constructor c64_supercpu_device::device_input_ports() const // c64_supercpu_device - constructor //------------------------------------------------- -c64_supercpu_device::c64_supercpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_supercpu_device::c64_supercpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SUPERCPU, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_maincpu(*this, G65816_TAG), diff --git a/src/devices/bus/c64/supercpu.h b/src/devices/bus/c64/supercpu.h index 73982328c31..ca82826bc37 100644 --- a/src/devices/bus/c64/supercpu.h +++ b/src/devices/bus/c64/supercpu.h @@ -27,7 +27,7 @@ class c64_supercpu_device : public device_t, { public: // construction/destruction - c64_supercpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_supercpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/sw8k.cpp b/src/devices/bus/c64/sw8k.cpp index 2f55b223797..037363364da 100644 --- a/src/devices/bus/c64/sw8k.cpp +++ b/src/devices/bus/c64/sw8k.cpp @@ -72,7 +72,7 @@ ioport_constructor c64_switchable_8k_cartridge_device::device_input_ports() cons // c64_switchable_8k_cartridge_device - constructor //------------------------------------------------- -c64_switchable_8k_cartridge_device::c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_switchable_8k_cartridge_device::c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SW8K, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_sw(*this, "SW"), m_bank(0) diff --git a/src/devices/bus/c64/sw8k.h b/src/devices/bus/c64/sw8k.h index 186e96792d6..7fae40984f2 100644 --- a/src/devices/bus/c64/sw8k.h +++ b/src/devices/bus/c64/sw8k.h @@ -27,7 +27,7 @@ class c64_switchable_8k_cartridge_device : public device_t, { public: // construction/destruction - c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/swiftlink.cpp b/src/devices/bus/c64/swiftlink.cpp index 3855da85ca3..b89eb1d40e3 100644 --- a/src/devices/bus/c64/swiftlink.cpp +++ b/src/devices/bus/c64/swiftlink.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(C64_SWIFTLINK, c64_swiftlink_cartridge_device, "c64_swiftlink void c64_swiftlink_cartridge_device::device_add_mconfig(machine_config &config) { - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(3.6864_MHz_XTAL); m_acia->irq_handler().set(FUNC(c64_swiftlink_cartridge_device::acia_irq_w)); m_acia->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); @@ -90,7 +90,7 @@ ioport_constructor c64_swiftlink_cartridge_device::device_input_ports() const // c64_swiftlink_cartridge_device - constructor //------------------------------------------------- -c64_swiftlink_cartridge_device::c64_swiftlink_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_swiftlink_cartridge_device::c64_swiftlink_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SWIFTLINK, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_acia(*this, MOS6551_TAG), diff --git a/src/devices/bus/c64/swiftlink.h b/src/devices/bus/c64/swiftlink.h index 409cfafa33a..63309c6e395 100644 --- a/src/devices/bus/c64/swiftlink.h +++ b/src/devices/bus/c64/swiftlink.h @@ -29,7 +29,7 @@ class c64_swiftlink_cartridge_device : public device_t, { public: // construction/destruction - c64_swiftlink_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_swiftlink_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/system3.cpp b/src/devices/bus/c64/system3.cpp index f02ef692b3b..26aa73719d4 100644 --- a/src/devices/bus/c64/system3.cpp +++ b/src/devices/bus/c64/system3.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_SYSTEM3, c64_system3_cartridge_device, "c64_system3", "C6 // c64_system3_cartridge_device - constructor //------------------------------------------------- -c64_system3_cartridge_device::c64_system3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_system3_cartridge_device::c64_system3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_SYSTEM3, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/system3.h b/src/devices/bus/c64/system3.h index 024798fc77e..43c2e151c86 100644 --- a/src/devices/bus/c64/system3.h +++ b/src/devices/bus/c64/system3.h @@ -27,7 +27,7 @@ class c64_system3_cartridge_device : public device_t, { public: // construction/destruction - c64_system3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_system3_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/tdos.cpp b/src/devices/bus/c64/tdos.cpp index 5f8a9a4c456..47734a24368 100644 --- a/src/devices/bus/c64/tdos.cpp +++ b/src/devices/bus/c64/tdos.cpp @@ -193,7 +193,7 @@ ioport_constructor c64_tdos_cartridge_device::device_input_ports() const // c64_tdos_cartridge_device - constructor //------------------------------------------------- -c64_tdos_cartridge_device::c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_tdos_cartridge_device::c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_TDOS, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_ssda(*this, MC68A52P_TAG), diff --git a/src/devices/bus/c64/tdos.h b/src/devices/bus/c64/tdos.h index 49c1b07651c..d12420536ba 100644 --- a/src/devices/bus/c64/tdos.h +++ b/src/devices/bus/c64/tdos.h @@ -27,7 +27,7 @@ class c64_tdos_cartridge_device : public device_t, { public: // construction/destruction - c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/turbo232.cpp b/src/devices/bus/c64/turbo232.cpp index f9113bed1c5..789a17e0717 100644 --- a/src/devices/bus/c64/turbo232.cpp +++ b/src/devices/bus/c64/turbo232.cpp @@ -39,7 +39,7 @@ DEFINE_DEVICE_TYPE(C64_TURBO232, c64_turbo232_cartridge_device, "c64_turbo232", void c64_turbo232_cartridge_device::device_add_mconfig(machine_config &config) { - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(3.6864_MHz_XTAL); m_acia->irq_handler().set(FUNC(c64_turbo232_cartridge_device::acia_irq_w)); m_acia->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); @@ -89,7 +89,7 @@ ioport_constructor c64_turbo232_cartridge_device::device_input_ports() const // c64_turbo232_cartridge_device - constructor //------------------------------------------------- -c64_turbo232_cartridge_device::c64_turbo232_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_turbo232_cartridge_device::c64_turbo232_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_TURBO232, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_acia(*this, MOS6551_TAG), diff --git a/src/devices/bus/c64/turbo232.h b/src/devices/bus/c64/turbo232.h index 4f5638f88fa..77bf4daa929 100644 --- a/src/devices/bus/c64/turbo232.h +++ b/src/devices/bus/c64/turbo232.h @@ -29,7 +29,7 @@ class c64_turbo232_cartridge_device : public device_t, { public: // construction/destruction - c64_turbo232_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_turbo232_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/vizastar.cpp b/src/devices/bus/c64/vizastar.cpp index 443c232bde7..ab154609b8f 100644 --- a/src/devices/bus/c64/vizastar.cpp +++ b/src/devices/bus/c64/vizastar.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(C64_VIZASTAR, c64_vizastar_cartridge_device, "c64_vizastar", // c64_vizastar_cartridge_device - constructor //------------------------------------------------- -c64_vizastar_cartridge_device::c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_vizastar_cartridge_device::c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_VIZASTAR, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/vizastar.h b/src/devices/bus/c64/vizastar.h index 26ec63cd46b..b1d98340aee 100644 --- a/src/devices/bus/c64/vizastar.h +++ b/src/devices/bus/c64/vizastar.h @@ -27,7 +27,7 @@ class c64_vizastar_cartridge_device : public device_t, { public: // construction/destruction - c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/vw64.cpp b/src/devices/bus/c64/vw64.cpp index 81a56e478b8..521b397e1a9 100644 --- a/src/devices/bus/c64/vw64.cpp +++ b/src/devices/bus/c64/vw64.cpp @@ -67,7 +67,7 @@ DEFINE_DEVICE_TYPE(C64_VW64, c64_vizawrite_cartridge_device, "c64_vizawrite", "V // c64_vizawrite_cartridge_device - constructor //------------------------------------------------- -c64_vizawrite_cartridge_device::c64_vizawrite_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_vizawrite_cartridge_device::c64_vizawrite_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_VW64, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_game_timer(nullptr) { diff --git a/src/devices/bus/c64/vw64.h b/src/devices/bus/c64/vw64.h index 00b94969413..4e88e8e5401 100644 --- a/src/devices/bus/c64/vw64.h +++ b/src/devices/bus/c64/vw64.h @@ -27,7 +27,7 @@ class c64_vizawrite_cartridge_device : public device_t, { public: // construction/destruction - c64_vizawrite_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_vizawrite_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/warp_speed.cpp b/src/devices/bus/c64/warp_speed.cpp index ff485c05277..a43f1e78796 100644 --- a/src/devices/bus/c64/warp_speed.cpp +++ b/src/devices/bus/c64/warp_speed.cpp @@ -86,7 +86,7 @@ ioport_constructor c64_warp_speed_cartridge_device::device_input_ports() const // c64_warp_speed_cartridge_device - constructor //------------------------------------------------- -c64_warp_speed_cartridge_device::c64_warp_speed_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_warp_speed_cartridge_device::c64_warp_speed_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_WARP_SPEED, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/warp_speed.h b/src/devices/bus/c64/warp_speed.h index d5c61f50f49..58385a85253 100644 --- a/src/devices/bus/c64/warp_speed.h +++ b/src/devices/bus/c64/warp_speed.h @@ -27,7 +27,7 @@ class c64_warp_speed_cartridge_device : public device_t, { public: // construction/destruction - c64_warp_speed_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_warp_speed_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/c64/westermann.cpp b/src/devices/bus/c64/westermann.cpp index 57a752c8fe2..134fc29f4a9 100644 --- a/src/devices/bus/c64/westermann.cpp +++ b/src/devices/bus/c64/westermann.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_WESTERMANN, c64_westermann_cartridge_device, "c64_westerm // c64_westermann_cartridge_device - constructor //------------------------------------------------- -c64_westermann_cartridge_device::c64_westermann_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_westermann_cartridge_device::c64_westermann_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_WESTERMANN, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/c64/westermann.h b/src/devices/bus/c64/westermann.h index 4b7b2e4389f..4ed2983a529 100644 --- a/src/devices/bus/c64/westermann.h +++ b/src/devices/bus/c64/westermann.h @@ -27,7 +27,7 @@ class c64_westermann_cartridge_device : public device_t, { public: // construction/destruction - c64_westermann_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_westermann_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/xl80.cpp b/src/devices/bus/c64/xl80.cpp index 3f467c7ade3..97053865531 100644 --- a/src/devices/bus/c64/xl80.cpp +++ b/src/devices/bus/c64/xl80.cpp @@ -151,7 +151,7 @@ void c64_xl80_device::device_add_mconfig(machine_config &config) // c64_xl80_device - constructor //------------------------------------------------- -c64_xl80_device::c64_xl80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_xl80_device::c64_xl80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_XL80, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_crtc(*this, HD46505SP_TAG), diff --git a/src/devices/bus/c64/xl80.h b/src/devices/bus/c64/xl80.h index 6d5ca071262..3131696503f 100644 --- a/src/devices/bus/c64/xl80.h +++ b/src/devices/bus/c64/xl80.h @@ -29,7 +29,7 @@ class c64_xl80_device : public device_t, { public: // construction/destruction - c64_xl80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_xl80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/z80videopak.cpp b/src/devices/bus/c64/z80videopak.cpp index fc6c3544b2c..26d7a7daf98 100644 --- a/src/devices/bus/c64/z80videopak.cpp +++ b/src/devices/bus/c64/z80videopak.cpp @@ -124,7 +124,7 @@ void c64_z80videopak_device::device_add_mconfig(machine_config &config) // c64_z80videopak_device - constructor //------------------------------------------------- -c64_z80videopak_device::c64_z80videopak_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +c64_z80videopak_device::c64_z80videopak_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : c64_cpm_cartridge_device(mconfig, C64_Z80VIDEOPAK, tag, owner, clock), m_crtc(*this, HD46505SP_TAG), m_palette(*this, "palette"), diff --git a/src/devices/bus/c64/z80videopak.h b/src/devices/bus/c64/z80videopak.h index 0e563518ca9..496df621094 100644 --- a/src/devices/bus/c64/z80videopak.h +++ b/src/devices/bus/c64/z80videopak.h @@ -28,7 +28,7 @@ class c64_z80videopak_device : public c64_cpm_cartridge_device { public: // construction/destruction - c64_z80videopak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_z80videopak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/c64/zaxxon.cpp b/src/devices/bus/c64/zaxxon.cpp index d63b05da095..c8f3a2329ff 100644 --- a/src/devices/bus/c64/zaxxon.cpp +++ b/src/devices/bus/c64/zaxxon.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(C64_ZAXXON, c64_zaxxon_cartridge_device, "c64_zaxxon", "C64 Z // c64_zaxxon_cartridge_device - constructor //------------------------------------------------- -c64_zaxxon_cartridge_device::c64_zaxxon_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_zaxxon_cartridge_device::c64_zaxxon_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_ZAXXON, tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), m_bank(0) diff --git a/src/devices/bus/c64/zaxxon.h b/src/devices/bus/c64/zaxxon.h index 8e47d4caff7..ee33945b798 100644 --- a/src/devices/bus/c64/zaxxon.h +++ b/src/devices/bus/c64/zaxxon.h @@ -27,7 +27,7 @@ class c64_zaxxon_cartridge_device : public device_t, { public: // construction/destruction - c64_zaxxon_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_zaxxon_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbm2/24k.cpp b/src/devices/bus/cbm2/24k.cpp index c56474c7be9..c5fccaf6d65 100644 --- a/src/devices/bus/cbm2/24k.cpp +++ b/src/devices/bus/cbm2/24k.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(CBM2_24K, cbm2_24k_cartridge_device, "cbm2_24k", "CBM-II 24K // cbm2_24k_cartridge_device - constructor //------------------------------------------------- -cbm2_24k_cartridge_device::cbm2_24k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm2_24k_cartridge_device::cbm2_24k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM2_24K, tag, owner, clock), device_cbm2_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", 0x6000, ENDIANNESS_LITTLE) diff --git a/src/devices/bus/cbm2/24k.h b/src/devices/bus/cbm2/24k.h index 554ba721444..5450b3edf4d 100644 --- a/src/devices/bus/cbm2/24k.h +++ b/src/devices/bus/cbm2/24k.h @@ -26,7 +26,7 @@ class cbm2_24k_cartridge_device : public device_t, { public: // construction/destruction - cbm2_24k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm2_24k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbm2/exp.cpp b/src/devices/bus/cbm2/exp.cpp index c43e540e181..c3879d2a627 100644 --- a/src/devices/bus/cbm2/exp.cpp +++ b/src/devices/bus/cbm2/exp.cpp @@ -60,7 +60,7 @@ device_cbm2_expansion_card_interface::~device_cbm2_expansion_card_interface() // cbm2_expansion_slot_device - constructor //------------------------------------------------- -cbm2_expansion_slot_device::cbm2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm2_expansion_slot_device::cbm2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM2_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/cbm2/exp.h b/src/devices/bus/cbm2/exp.h index 19ed3d01dac..030be49ce06 100644 --- a/src/devices/bus/cbm2/exp.h +++ b/src/devices/bus/cbm2/exp.h @@ -48,7 +48,7 @@ class cbm2_expansion_slot_device : public device_t, public: // construction/destruction template - cbm2_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + cbm2_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : cbm2_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -56,14 +56,14 @@ public: set_default_option(dflt); set_fixed(false); } - cbm2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cbm2_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // computer interface uint8_t read(offs_t offset, uint8_t data, int csbank1, int csbank2, int csbank3); void write(offs_t offset, uint8_t data, int csbank1, int csbank2, int csbank3); // cartridge interface - int phi2() { return clock(); } + XTAL phi2() { return clock(); } protected: // device-level overrides diff --git a/src/devices/bus/cbm2/hrg.cpp b/src/devices/bus/cbm2/hrg.cpp index 166e38e76b2..c635070cda0 100644 --- a/src/devices/bus/cbm2/hrg.cpp +++ b/src/devices/bus/cbm2/hrg.cpp @@ -97,7 +97,7 @@ void cbm2_hrg_a_device::device_add_mconfig(machine_config &config) screen.set_refresh_hz(25); PALETTE(config, "palette", palette_device::MONOCHROME); - EF9365(config, m_gdc, 1750000); + EF9365(config, m_gdc, XTAL::u(1750000)); m_gdc->set_screen(SCREEN_TAG); m_gdc->set_addrmap(0, &cbm2_hrg_a_device::hrg_a_map); m_gdc->set_palette_tag("palette"); @@ -114,7 +114,7 @@ void cbm2_hrg_b_device::device_add_mconfig(machine_config &config) screen.set_refresh_hz(50); PALETTE(config, "palette", palette_device::MONOCHROME); - EF9365(config, m_gdc, 1750000); //EF9366 + EF9365(config, m_gdc, XTAL::u(1750000)); //EF9366 m_gdc->set_screen(SCREEN_TAG); m_gdc->set_addrmap(0, &cbm2_hrg_b_device::hrg_b_map); m_gdc->set_palette_tag("palette"); @@ -132,7 +132,7 @@ void cbm2_hrg_b_device::device_add_mconfig(machine_config &config) // cbm2_hrg_device - constructor //------------------------------------------------- -cbm2_hrg_device::cbm2_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +cbm2_hrg_device::cbm2_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cbm2_expansion_card_interface(mconfig, *this), m_gdc(*this, EF9366_TAG), @@ -140,12 +140,12 @@ cbm2_hrg_device::cbm2_hrg_device(const machine_config &mconfig, device_type type { } -cbm2_hrg_a_device::cbm2_hrg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm2_hrg_a_device::cbm2_hrg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cbm2_hrg_device(mconfig, CBM2_HRG_A, tag, owner, clock) { } -cbm2_hrg_b_device::cbm2_hrg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm2_hrg_b_device::cbm2_hrg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cbm2_hrg_device(mconfig, CBM2_HRG_B, tag, owner, clock) { } diff --git a/src/devices/bus/cbm2/hrg.h b/src/devices/bus/cbm2/hrg.h index 3b6a20c94e8..d1ba273ee14 100644 --- a/src/devices/bus/cbm2/hrg.h +++ b/src/devices/bus/cbm2/hrg.h @@ -31,7 +31,7 @@ public: protected: // construction/destruction - cbm2_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cbm2_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -54,7 +54,7 @@ class cbm2_hrg_a_device : public cbm2_hrg_device { public: // construction/destruction - cbm2_hrg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm2_hrg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -71,7 +71,7 @@ class cbm2_hrg_b_device : public cbm2_hrg_device { public: // construction/destruction - cbm2_hrg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm2_hrg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/cbm2/std.cpp b/src/devices/bus/cbm2/std.cpp index 51653c72755..5a1a3f51be4 100644 --- a/src/devices/bus/cbm2/std.cpp +++ b/src/devices/bus/cbm2/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(CBM2_STD, cbm2_standard_cartridge_device, "cbm2_standard", "C // cbm2_standard_cartridge_device - constructor //------------------------------------------------- -cbm2_standard_cartridge_device::cbm2_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm2_standard_cartridge_device::cbm2_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM2_STD, tag, owner, clock), device_cbm2_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/cbm2/std.h b/src/devices/bus/cbm2/std.h index ee941ca580a..209a2237444 100644 --- a/src/devices/bus/cbm2/std.h +++ b/src/devices/bus/cbm2/std.h @@ -26,7 +26,7 @@ class cbm2_standard_cartridge_device : public device_t, { public: // construction/destruction - cbm2_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm2_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbm2/user.cpp b/src/devices/bus/cbm2/user.cpp index 5dc12567096..d9ca37c7b0f 100644 --- a/src/devices/bus/cbm2/user.cpp +++ b/src/devices/bus/cbm2/user.cpp @@ -43,7 +43,7 @@ device_cbm2_user_port_interface::device_cbm2_user_port_interface(const machine_c // cbm2_user_port_device - constructor //------------------------------------------------- -cbm2_user_port_device::cbm2_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm2_user_port_device::cbm2_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM2_USER_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_irq(*this), diff --git a/src/devices/bus/cbm2/user.h b/src/devices/bus/cbm2/user.h index 4a49807118d..7e236149539 100644 --- a/src/devices/bus/cbm2/user.h +++ b/src/devices/bus/cbm2/user.h @@ -73,14 +73,14 @@ public: // construction/destruction template cbm2_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : cbm2_user_port_device(mconfig, tag, owner, 0) + : cbm2_user_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - cbm2_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm2_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_callback() { return m_write_irq.bind(); } auto sp_callback() { return m_write_sp.bind(); } diff --git a/src/devices/bus/cbmiec/c1526.cpp b/src/devices/bus/cbmiec/c1526.cpp index 45e4540e236..1c6584a6368 100644 --- a/src/devices/bus/cbmiec/c1526.cpp +++ b/src/devices/bus/cbmiec/c1526.cpp @@ -151,7 +151,7 @@ ioport_constructor c4023_device::device_input_ports() const // c1526_device_base - constructor //------------------------------------------------- -c1526_device_base::c1526_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +c1526_device_base::c1526_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } @@ -161,7 +161,7 @@ c1526_device_base::c1526_device_base(const machine_config &mconfig, device_type // c1526_device - constructor //------------------------------------------------- -c1526_device::c1526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c1526_device::c1526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1526_device_base(mconfig, C1526, tag, owner, clock), device_cbm_iec_interface(mconfig, *this) { @@ -172,7 +172,7 @@ c1526_device::c1526_device(const machine_config &mconfig, const char *tag, devic // c4023_device - constructor //------------------------------------------------- -c4023_device::c4023_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c4023_device::c4023_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1526_device_base(mconfig, C4023, tag, owner, clock), device_ieee488_interface(mconfig, *this) { diff --git a/src/devices/bus/cbmiec/c1526.h b/src/devices/bus/cbmiec/c1526.h index d5042f283f1..40acefc91eb 100644 --- a/src/devices/bus/cbmiec/c1526.h +++ b/src/devices/bus/cbmiec/c1526.h @@ -27,7 +27,7 @@ class c1526_device_base : public device_t { protected: // construction/destruction - c1526_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c1526_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -42,7 +42,7 @@ class c1526_device : public c1526_device_base, public device_cbm_iec_interface { public: // construction/destruction - c1526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -63,7 +63,7 @@ class c4023_device : public c1526_device_base, public device_ieee488_interface { public: // construction/destruction - c4023_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c4023_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/cbmiec/c1541.cpp b/src/devices/bus/cbmiec/c1541.cpp index a547fc6f208..1120ca40399 100644 --- a/src/devices/bus/cbmiec/c1541.cpp +++ b/src/devices/bus/cbmiec/c1541.cpp @@ -990,7 +990,7 @@ void c1541_device_base::device_add_mconfig(machine_config &config) m_ga->atn_callback().set(FUNC(c1541_device_base::atn_w)); m_ga->byte_callback().set(FUNC(c1541_device_base::byte_w)); - floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0", 0)); + floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0")); connector.option_add("525ssqd", ALPS_3255190X); connector.set_default_option("525ssqd"); connector.set_fixed(true); @@ -1025,7 +1025,7 @@ void c1541_prologic_dos_classic_device::device_add_mconfig(machine_config &confi m_maincpu->set_addrmap(AS_PROGRAM, &c1541_prologic_dos_classic_device::c1541pdc_mem); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpb_handler().set(FUNC(c1541_prologic_dos_classic_device::pia_pb_r)); m_pia->writepa_handler().set(FUNC(c1541_prologic_dos_classic_device::pia_pa_w)); m_pia->writepb_handler().set(FUNC(c1541_prologic_dos_classic_device::pia_pb_w)); @@ -1034,7 +1034,7 @@ void c1541_prologic_dos_classic_device::device_add_mconfig(machine_config &confi centronics_device ¢ronics(CENTRONICS(config, CENTRONICS_TAG, centronics_devices, "printer")); centronics.ack_handler().set(MC6821_TAG, FUNC(pia6821_device::ca1_w)); - output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out", 0)); + output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); centronics.set_output_latch(cent_data_out); } @@ -1089,7 +1089,7 @@ inline void c1541_device_base::set_iec_data() // c1541_device_base - constructor //------------------------------------------------- -c1541_device_base::c1541_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +c1541_device_base::c1541_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cbm_iec_interface(mconfig, *this), device_c64_floppy_parallel_interface(mconfig, *this), @@ -1111,7 +1111,7 @@ c1541_device_base::c1541_device_base(const machine_config &mconfig, device_type // c1540_device - constructor //------------------------------------------------- -c1540_device::c1540_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c1540_device::c1540_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, C1540, tag, owner, clock) { } @@ -1119,7 +1119,7 @@ c1540_device::c1540_device(const machine_config &mconfig, const char *tag, devic // c1541_device - constructor //------------------------------------------------- -c1541_device::c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c1541_device::c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, C1541, tag, owner, clock) { } @@ -1127,7 +1127,7 @@ c1541_device::c1541_device(const machine_config &mconfig, const char *tag, devic // c1541c_device - constructor //------------------------------------------------- -c1541c_device::c1541c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c1541c_device::c1541c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, C1541C, tag, owner, clock) { } @@ -1135,7 +1135,7 @@ c1541c_device::c1541c_device(const machine_config &mconfig, const char *tag, dev // c1541ii_device - constructor //------------------------------------------------- -c1541ii_device::c1541ii_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c1541ii_device::c1541ii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, C1541II, tag, owner, clock) { } @@ -1143,7 +1143,7 @@ c1541ii_device::c1541ii_device(const machine_config &mconfig, const char *tag, d // sx1541_device - constructor //------------------------------------------------- -sx1541_device::sx1541_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sx1541_device::sx1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, SX1541, tag, owner, clock) { } @@ -1151,7 +1151,7 @@ sx1541_device::sx1541_device(const machine_config &mconfig, const char *tag, dev // fsd1_device - constructor //------------------------------------------------- -fsd1_device::fsd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +fsd1_device::fsd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, FSD1, tag, owner, clock) { } @@ -1159,7 +1159,7 @@ fsd1_device::fsd1_device(const machine_config &mconfig, const char *tag, device_ // fsd2_device - constructor //------------------------------------------------- -fsd2_device::fsd2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +fsd2_device::fsd2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, FSD2, tag, owner, clock) { } @@ -1167,7 +1167,7 @@ fsd2_device::fsd2_device(const machine_config &mconfig, const char *tag, device_ // csd1_device - constructor //------------------------------------------------- -csd1_device::csd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +csd1_device::csd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, CSD1, tag, owner, clock) { } @@ -1175,7 +1175,7 @@ csd1_device::csd1_device(const machine_config &mconfig, const char *tag, device_ // c1541_dolphin_dos_device - constructor //------------------------------------------------- -c1541_dolphin_dos_device::c1541_dolphin_dos_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c1541_dolphin_dos_device::c1541_dolphin_dos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, C1541_DOLPHIN_DOS, tag, owner, clock) { } @@ -1183,7 +1183,7 @@ c1541_dolphin_dos_device::c1541_dolphin_dos_device(const machine_config &mconfig // c1541_professional_dos_v1_device - constructor //------------------------------------------------- -c1541_professional_dos_v1_device::c1541_professional_dos_v1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c1541_professional_dos_v1_device::c1541_professional_dos_v1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, C1541_PROFESSIONAL_DOS_V1, tag, owner, clock) { } @@ -1191,7 +1191,7 @@ c1541_professional_dos_v1_device::c1541_professional_dos_v1_device(const machine // c1541_prologic_dos_classic_device - constructor //------------------------------------------------- -c1541_prologic_dos_classic_device::c1541_prologic_dos_classic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c1541_prologic_dos_classic_device::c1541_prologic_dos_classic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, C1541_PROLOGIC_DOS_CLASSIC, tag, owner, clock), m_pia(*this, MC6821_TAG), m_cent_data_out(*this, "cent_data_out"), @@ -1204,7 +1204,7 @@ c1541_prologic_dos_classic_device::c1541_prologic_dos_classic_device(const machi // indus_gt_device - constructor //------------------------------------------------- -indus_gt_device::indus_gt_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +indus_gt_device::indus_gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, INDUS_GT, tag, owner, clock) { } @@ -1212,7 +1212,7 @@ indus_gt_device::indus_gt_device(const machine_config &mconfig, const char *tag, // technica_device - constructor //------------------------------------------------- -technica_device::technica_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +technica_device::technica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, TECHNICA, tag, owner, clock) { } @@ -1220,7 +1220,7 @@ technica_device::technica_device(const machine_config &mconfig, const char *tag, // blue_chip_device - constructor //------------------------------------------------- -blue_chip_device::blue_chip_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +blue_chip_device::blue_chip_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, BLUE_CHIP, tag, owner, clock) { } @@ -1228,7 +1228,7 @@ blue_chip_device::blue_chip_device(const machine_config &mconfig, const char *ta // commander_c2_device - constructor //------------------------------------------------- -commander_c2_device::commander_c2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +commander_c2_device::commander_c2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, COMMANDER_C2, tag, owner, clock) { } @@ -1236,7 +1236,7 @@ commander_c2_device::commander_c2_device(const machine_config &mconfig, const ch // enhancer_2000_device - constructor //------------------------------------------------- -enhancer_2000_device::enhancer_2000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +enhancer_2000_device::enhancer_2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, ENHANCER_2000, tag, owner, clock) { } @@ -1244,7 +1244,7 @@ enhancer_2000_device::enhancer_2000_device(const machine_config &mconfig, const // fd148_device - constructor //------------------------------------------------- -fd148_device::fd148_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +fd148_device::fd148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, FD148, tag, owner, clock) { } @@ -1252,7 +1252,7 @@ fd148_device::fd148_device(const machine_config &mconfig, const char *tag, devic // msd_sd1_device - constructor //------------------------------------------------- -msd_sd1_device::msd_sd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msd_sd1_device::msd_sd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, MSD_SD1, tag, owner, clock) { } @@ -1260,7 +1260,7 @@ msd_sd1_device::msd_sd1_device(const machine_config &mconfig, const char *tag, d // msd_sd2_device - constructor //------------------------------------------------- -msd_sd2_device::msd_sd2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msd_sd2_device::msd_sd2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1541_device_base(mconfig, MSD_SD2, tag, owner, clock) { } diff --git a/src/devices/bus/cbmiec/c1541.h b/src/devices/bus/cbmiec/c1541.h index de79cc95f90..44fe91a16dd 100644 --- a/src/devices/bus/cbmiec/c1541.h +++ b/src/devices/bus/cbmiec/c1541.h @@ -33,7 +33,7 @@ class c1541_device_base : public device_t, { protected: // construction/destruction - c1541_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + c1541_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -103,7 +103,7 @@ class c1540_device : public c1541_device_base { public: // construction/destruction - c1540_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c1540_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -117,7 +117,7 @@ class c1541_device : public c1541_device_base { public: // construction/destruction - c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -131,7 +131,7 @@ class c1541c_device : public c1541_device_base { public: // construction/destruction - c1541c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c1541c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -149,7 +149,7 @@ class c1541ii_device : public c1541_device_base { public: // construction/destruction - c1541ii_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c1541ii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -163,7 +163,7 @@ class sx1541_device : public c1541_device_base { public: // construction/destruction - sx1541_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sx1541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -177,7 +177,7 @@ class fsd1_device : public c1541_device_base { public: // construction/destruction - fsd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + fsd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -191,7 +191,7 @@ class fsd2_device : public c1541_device_base { public: // construction/destruction - fsd2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + fsd2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -208,7 +208,7 @@ class csd1_device : public c1541_device_base { public: // construction/destruction - csd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + csd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -222,7 +222,7 @@ class c1541_dolphin_dos_device : public c1541_device_base { public: // construction/destruction - c1541_dolphin_dos_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c1541_dolphin_dos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -237,7 +237,7 @@ class c1541_professional_dos_v1_device : public c1541_device_base { public: // construction/destruction - c1541_professional_dos_v1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c1541_professional_dos_v1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -252,7 +252,7 @@ class c1541_prologic_dos_classic_device : public c1541_device_base { public: // construction/destruction - c1541_prologic_dos_classic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c1541_prologic_dos_classic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -282,7 +282,7 @@ class indus_gt_device : public c1541_device_base { public: // construction/destruction - indus_gt_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + indus_gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -296,7 +296,7 @@ class technica_device : public c1541_device_base { public: // construction/destruction - technica_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + technica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -310,7 +310,7 @@ class blue_chip_device : public c1541_device_base { public: // construction/destruction - blue_chip_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + blue_chip_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -324,7 +324,7 @@ class commander_c2_device : public c1541_device_base { public: // construction/destruction - commander_c2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + commander_c2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -338,7 +338,7 @@ class enhancer_2000_device : public c1541_device_base { public: // construction/destruction - enhancer_2000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + enhancer_2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -352,7 +352,7 @@ class fd148_device : public c1541_device_base { public: // construction/destruction - fd148_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + fd148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -366,7 +366,7 @@ class msd_sd1_device : public c1541_device_base { public: // construction/destruction - msd_sd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msd_sd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -380,7 +380,7 @@ class msd_sd2_device : public c1541_device_base { public: // construction/destruction - msd_sd2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msd_sd2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/cbmiec/c1571.cpp b/src/devices/bus/cbmiec/c1571.cpp index f2d41120f5e..f12e0635c92 100644 --- a/src/devices/bus/cbmiec/c1571.cpp +++ b/src/devices/bus/cbmiec/c1571.cpp @@ -622,7 +622,7 @@ void c1571_device::add_base_mconfig(machine_config &config) C64H156(config, m_ga, 16_MHz_XTAL); m_ga->byte_callback().set(FUNC(c1571_device::byte_w)); - floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0", 0)); + floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0")); connector.option_add("525qd", FLOPPY_525_QD); connector.set_default_option("525qd"); connector.set_fixed(true); @@ -673,10 +673,10 @@ void mini_chief_device::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mini_chief_device::mini_chief_mem); - isa8_device &isa8(ISA8(config, ISA_BUS_TAG, 0)); + isa8_device &isa8(ISA8(config, ISA_BUS_TAG)); isa8.set_memspace(m_maincpu, AS_PROGRAM); isa8.set_iospace(m_maincpu, AS_PROGRAM); - ISA8_SLOT(config, "isa1", 0, ISA_BUS_TAG, mini_chief_isa8_cards, "wd1002a_wx1", false); + ISA8_SLOT(config, "isa1", ISA_BUS_TAG, mini_chief_isa8_cards, "wd1002a_wx1", false); } @@ -713,7 +713,7 @@ ioport_constructor c1571_device::device_input_ports() const // c1571_device - constructor //------------------------------------------------- -c1571_device::c1571_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +c1571_device::c1571_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cbm_iec_interface(mconfig, *this), device_c64_floppy_parallel_interface(mconfig, *this), @@ -737,7 +737,7 @@ c1571_device::c1571_device(const machine_config &mconfig, device_type type, cons { } -c1571_device::c1571_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1571_device::c1571_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1571_device(mconfig, C1571, tag, owner, clock) { } @@ -747,7 +747,7 @@ c1571_device::c1571_device(const machine_config &mconfig, const char *tag, devic // c1570_device - constructor //------------------------------------------------- -c1570_device::c1570_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1570_device::c1570_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1571_device(mconfig, C1570, tag, owner, clock) { } @@ -757,7 +757,7 @@ c1570_device::c1570_device(const machine_config &mconfig, const char *tag, devic // c1571cr_device - constructor //------------------------------------------------- -c1571cr_device::c1571cr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1571cr_device::c1571cr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1571_device(mconfig, C1571CR, tag, owner, clock) { } @@ -767,7 +767,7 @@ c1571cr_device::c1571cr_device(const machine_config &mconfig, const char *tag, d // mini_chief_device - constructor //------------------------------------------------- -mini_chief_device::mini_chief_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mini_chief_device::mini_chief_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1571_device(mconfig, MINI_CHIEF, tag, owner, clock) { } diff --git a/src/devices/bus/cbmiec/c1571.h b/src/devices/bus/cbmiec/c1571.h index 103da690a2c..c25433a4148 100644 --- a/src/devices/bus/cbmiec/c1571.h +++ b/src/devices/bus/cbmiec/c1571.h @@ -41,7 +41,7 @@ class c1571_device : public device_t, public device_cbm_iec_interface, public de { public: // construction/destruction - c1571_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1571_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( via0_irq_w ); uint8_t via0_pa_r(); @@ -70,7 +70,7 @@ public: void c1571_mem(address_map &map); protected: - c1571_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c1571_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -134,7 +134,7 @@ class c1570_device : public c1571_device { public: // construction/destruction - c1570_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1570_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -149,7 +149,7 @@ class c1571cr_device : public c1571_device { public: // construction/destruction - c1571cr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1571cr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -168,7 +168,7 @@ class mini_chief_device : public c1571_device { public: // construction/destruction - mini_chief_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mini_chief_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/cbmiec/c1581.cpp b/src/devices/bus/cbmiec/c1581.cpp index b139a272266..8a4a167a44b 100644 --- a/src/devices/bus/cbmiec/c1581.cpp +++ b/src/devices/bus/cbmiec/c1581.cpp @@ -320,7 +320,7 @@ ioport_constructor c1581_device::device_input_ports() const // c1581_device - constructor //------------------------------------------------- -c1581_device::c1581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +c1581_device::c1581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cbm_iec_interface(mconfig, *this), m_maincpu(*this, M6502_TAG), @@ -337,7 +337,7 @@ c1581_device::c1581_device(const machine_config &mconfig, device_type type, cons { } -c1581_device::c1581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1581_device::c1581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1581_device(mconfig, C1581, tag, owner, clock) { } @@ -347,7 +347,7 @@ c1581_device::c1581_device(const machine_config &mconfig, const char *tag, devic // c1563_device - constructor //------------------------------------------------- -c1563_device::c1563_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1563_device::c1563_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c1581_device(mconfig, C1563, tag, owner, clock) { } diff --git a/src/devices/bus/cbmiec/c1581.h b/src/devices/bus/cbmiec/c1581.h index 1fef8579460..3fbe5615b3d 100644 --- a/src/devices/bus/cbmiec/c1581.h +++ b/src/devices/bus/cbmiec/c1581.h @@ -38,10 +38,10 @@ class c1581_device : public device_t, public device_cbm_iec_interface { public: // construction/destruction - c1581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - c1581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c1581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -99,7 +99,7 @@ class c1563_device : public c1581_device { public: // construction/destruction - c1563_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1563_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cbmiec/c64_nl10.cpp b/src/devices/bus/cbmiec/c64_nl10.cpp index d4ed3467016..a287fec53ac 100644 --- a/src/devices/bus/cbmiec/c64_nl10.cpp +++ b/src/devices/bus/cbmiec/c64_nl10.cpp @@ -47,7 +47,7 @@ const tiny_rom_entry *c64_nl10_interface_device::device_rom_region() const // c64_nl10_interface_device - constructor //------------------------------------------------- -c64_nl10_interface_device::c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c64_nl10_interface_device::c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_NL10_INTERFACE, tag, owner, clock) , device_cbm_iec_interface(mconfig, *this) { diff --git a/src/devices/bus/cbmiec/c64_nl10.h b/src/devices/bus/cbmiec/c64_nl10.h index 68f9f135c91..9c38233050d 100644 --- a/src/devices/bus/cbmiec/c64_nl10.h +++ b/src/devices/bus/cbmiec/c64_nl10.h @@ -25,7 +25,7 @@ class c64_nl10_interface_device : public device_t, public device_cbm_iec_interfa { public: // construction/destruction - c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_nl10_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cbmiec/cbmiec.cpp b/src/devices/bus/cbmiec/cbmiec.cpp index 03b9837779f..6415a4e203c 100644 --- a/src/devices/bus/cbmiec/cbmiec.cpp +++ b/src/devices/bus/cbmiec/cbmiec.cpp @@ -246,7 +246,7 @@ device_cbm_iec_interface::~device_cbm_iec_interface() // cbm_iec_slot_device - constructor //------------------------------------------------- -cbm_iec_slot_device::cbm_iec_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm_iec_slot_device::cbm_iec_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM_IEC_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), m_address(0) { @@ -281,7 +281,7 @@ void cbm_iec_slot_device::device_start() // cbm_iec_device - constructor //------------------------------------------------- -cbm_iec_device::cbm_iec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm_iec_device::cbm_iec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM_IEC, tag, owner, clock), m_write_srq(*this), m_write_atn(*this), diff --git a/src/devices/bus/cbmiec/cbmiec.h b/src/devices/bus/cbmiec/cbmiec.h index 0683a98b4f8..fe00416c9c3 100644 --- a/src/devices/bus/cbmiec/cbmiec.h +++ b/src/devices/bus/cbmiec/cbmiec.h @@ -39,7 +39,7 @@ class cbm_iec_device : public device_t { public: // construction/destruction - cbm_iec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm_iec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto srq_callback() { return m_write_srq.bind(); } auto atn_callback() { return m_write_atn.bind(); } @@ -124,7 +124,7 @@ public: // construction/destruction template cbm_iec_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, int address, T &&opts, char const *dflt) - : cbm_iec_slot_device(mconfig, tag, owner, (uint32_t)0) + : cbm_iec_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -132,7 +132,7 @@ public: set_fixed(false); set_address(address); } - cbm_iec_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm_iec_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template static void add(machine_config &config, T &&_bus_tag, const char *_default_drive) { @@ -142,7 +142,7 @@ public: CBM_IEC_SLOT(config, "iec10", 10, cbm_iec_devices, nullptr); CBM_IEC_SLOT(config, "iec11", 11, cbm_iec_devices, nullptr); - CBM_IEC(config, std::forward(_bus_tag), 0); + CBM_IEC(config, std::forward(_bus_tag)); } void set_address(int address) { m_address = address; } diff --git a/src/devices/bus/cbmiec/cmdhd.cpp b/src/devices/bus/cbmiec/cmdhd.cpp index 104b0eb456e..e7badebec3b 100644 --- a/src/devices/bus/cbmiec/cmdhd.cpp +++ b/src/devices/bus/cbmiec/cmdhd.cpp @@ -75,12 +75,12 @@ void cmd_hd_device::mem_map(address_map &map) void cmd_hd_device::device_add_mconfig(machine_config &config) { - M6502(config, m_maincpu, 2000000); + M6502(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &cmd_hd_device::mem_map); - MOS6522(config, M6522_1_TAG, 2000000); - MOS6522(config, M6522_2_TAG, 2000000); - I8255A(config, I8255A_TAG, 0); + MOS6522(config, M6522_1_TAG, XTAL::u(2000000)); + MOS6522(config, M6522_2_TAG, XTAL::u(2000000)); + I8255A(config, I8255A_TAG); RTC72421(config, RTC72421A_TAG, XTAL(32'768)); SCSI_PORT(config, m_scsibus); @@ -97,7 +97,7 @@ void cmd_hd_device::device_add_mconfig(machine_config &config) // cmd_hd_device - constructor //------------------------------------------------- -cmd_hd_device::cmd_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cmd_hd_device::cmd_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMD_HD, tag, owner, clock), device_cbm_iec_interface(mconfig, *this), m_maincpu(*this, M6502_TAG), diff --git a/src/devices/bus/cbmiec/cmdhd.h b/src/devices/bus/cbmiec/cmdhd.h index 8c6836f36bf..431d8582109 100644 --- a/src/devices/bus/cbmiec/cmdhd.h +++ b/src/devices/bus/cbmiec/cmdhd.h @@ -30,7 +30,7 @@ class cmd_hd_device : public device_t, public device_cbm_iec_interface { public: // construction/destruction - cmd_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cmd_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbmiec/diag264_lb_iec.cpp b/src/devices/bus/cbmiec/diag264_lb_iec.cpp index 8852f997285..188488c6d7d 100644 --- a/src/devices/bus/cbmiec/diag264_lb_iec.cpp +++ b/src/devices/bus/cbmiec/diag264_lb_iec.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(DIAG264_SERIAL_LOOPBACK, diag264_serial_loopback_device, "dia // diag264_serial_loopback_device - constructor //------------------------------------------------- -diag264_serial_loopback_device::diag264_serial_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +diag264_serial_loopback_device::diag264_serial_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DIAG264_SERIAL_LOOPBACK, tag, owner, clock) , device_cbm_iec_interface(mconfig, *this) { diff --git a/src/devices/bus/cbmiec/diag264_lb_iec.h b/src/devices/bus/cbmiec/diag264_lb_iec.h index 6611fee413d..3d7faf9a2a8 100644 --- a/src/devices/bus/cbmiec/diag264_lb_iec.h +++ b/src/devices/bus/cbmiec/diag264_lb_iec.h @@ -26,7 +26,7 @@ class diag264_serial_loopback_device : public device_t, { public: // construction/destruction - diag264_serial_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diag264_serial_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbmiec/fd2000.cpp b/src/devices/bus/cbmiec/fd2000.cpp index 34e06d70dbf..912bf9c78ec 100644 --- a/src/devices/bus/cbmiec/fd2000.cpp +++ b/src/devices/bus/cbmiec/fd2000.cpp @@ -251,12 +251,12 @@ void fd4000_device::device_add_mconfig(machine_config &config) // fd2000_device - constructor //------------------------------------------------- -fd2000_device::fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fd2000_device::fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fd2000_device(mconfig, FD2000, tag, owner, clock) { } -fd2000_device::fd2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +fd2000_device::fd2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cbm_iec_interface(mconfig, *this) , m_maincpu(*this, G65SC02PI2_TAG) @@ -270,7 +270,7 @@ fd2000_device::fd2000_device(const machine_config &mconfig, device_type type, co // fd4000_device - constructor //------------------------------------------------- -fd4000_device::fd4000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fd4000_device::fd4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fd2000_device(mconfig, FD4000, tag, owner, clock) { m_maincpu.set_tag(*this, R65C02P4_TAG); diff --git a/src/devices/bus/cbmiec/fd2000.h b/src/devices/bus/cbmiec/fd2000.h index 0b247405e7e..b7ddd71bab4 100644 --- a/src/devices/bus/cbmiec/fd2000.h +++ b/src/devices/bus/cbmiec/fd2000.h @@ -31,7 +31,7 @@ class fd2000_device : public device_t, { public: // construction/destruction - fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t via_pa_r(); void via_pa_w(uint8_t data); @@ -41,7 +41,7 @@ public: //static void floppy_formats(format_registration &fr); protected: - fd2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + fd2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -74,7 +74,7 @@ class fd4000_device : public fd2000_device { public: // construction/destruction - fd4000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cbmiec/interpod.cpp b/src/devices/bus/cbmiec/interpod.cpp index c5479a30b18..9e5fec201a4 100644 --- a/src/devices/bus/cbmiec/interpod.cpp +++ b/src/devices/bus/cbmiec/interpod.cpp @@ -125,14 +125,14 @@ void cbm_interpod_device::interpod_mem(address_map &map) void cbm_interpod_device::device_add_mconfig(machine_config &config) { - M6502(config, m_maincpu, 1000000); + M6502(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &cbm_interpod_device::interpod_mem); - MOS6522(config, m_via, 1000000); + MOS6522(config, m_via, XTAL::u(1000000)); - MOS6532_NEW(config, m_riot, 1000000); + MOS6532_NEW(config, m_riot, XTAL::u(1000000)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); ieee488_device::add_cbm_devices(config, nullptr); @@ -149,7 +149,7 @@ void cbm_interpod_device::device_add_mconfig(machine_config &config) // cbm_interpod_device - constructor //------------------------------------------------- -cbm_interpod_device::cbm_interpod_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm_interpod_device::cbm_interpod_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM_INTERPOD, tag, owner, clock), device_cbm_iec_interface(mconfig, *this), m_maincpu(*this, R6502_TAG), diff --git a/src/devices/bus/cbmiec/interpod.h b/src/devices/bus/cbmiec/interpod.h index 823ab0c64e7..1b3debfce6f 100644 --- a/src/devices/bus/cbmiec/interpod.h +++ b/src/devices/bus/cbmiec/interpod.h @@ -32,7 +32,7 @@ class cbm_interpod_device : public device_t, { public: // construction/destruction - cbm_interpod_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm_interpod_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbmiec/serialbox.cpp b/src/devices/bus/cbmiec/serialbox.cpp index 9d9dcc114cf..a3e5e5ba2f1 100644 --- a/src/devices/bus/cbmiec/serialbox.cpp +++ b/src/devices/bus/cbmiec/serialbox.cpp @@ -85,7 +85,7 @@ void cbm_serial_box_device::device_add_mconfig(machine_config &config) // cbm_serial_box_device - constructor //------------------------------------------------- -cbm_serial_box_device::cbm_serial_box_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cbm_serial_box_device::cbm_serial_box_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBM_SERIAL_BOX, tag, owner, clock), device_cbm_iec_interface(mconfig, *this), m_maincpu(*this, M6502_TAG) diff --git a/src/devices/bus/cbmiec/serialbox.h b/src/devices/bus/cbmiec/serialbox.h index 16cb099e247..53a3613dd7f 100644 --- a/src/devices/bus/cbmiec/serialbox.h +++ b/src/devices/bus/cbmiec/serialbox.h @@ -26,7 +26,7 @@ class cbm_serial_box_device : public device_t, public device_cbm_iec_interface { public: // construction/destruction - cbm_serial_box_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm_serial_box_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbmiec/vic1515.cpp b/src/devices/bus/cbmiec/vic1515.cpp index 5accd8b6858..959a7ee5dcf 100644 --- a/src/devices/bus/cbmiec/vic1515.cpp +++ b/src/devices/bus/cbmiec/vic1515.cpp @@ -101,7 +101,7 @@ ioport_constructor vic1515_device::device_input_ports() const // vic1515_device - constructor //------------------------------------------------- -vic1515_device::vic1515_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vic1515_device::vic1515_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1515, tag, owner, clock), device_cbm_iec_interface(mconfig, *this) { diff --git a/src/devices/bus/cbmiec/vic1515.h b/src/devices/bus/cbmiec/vic1515.h index 1b84636e6d3..0b8c9b5eeb1 100644 --- a/src/devices/bus/cbmiec/vic1515.h +++ b/src/devices/bus/cbmiec/vic1515.h @@ -26,7 +26,7 @@ class vic1515_device : public device_t, public device_cbm_iec_interface { public: // construction/destruction - vic1515_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic1515_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbmiec/vic1520.cpp b/src/devices/bus/cbmiec/vic1520.cpp index c77175fb83b..7d5f028956a 100644 --- a/src/devices/bus/cbmiec/vic1520.cpp +++ b/src/devices/bus/cbmiec/vic1520.cpp @@ -112,7 +112,7 @@ ioport_constructor vic1520_device::device_input_ports() const // vic1520_device - constructor //------------------------------------------------- -vic1520_device::vic1520_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vic1520_device::vic1520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1520, tag, owner, clock) , device_cbm_iec_interface(mconfig, *this) , m_mcu(*this, "mcu") diff --git a/src/devices/bus/cbmiec/vic1520.h b/src/devices/bus/cbmiec/vic1520.h index 37659c19942..4348613cf92 100644 --- a/src/devices/bus/cbmiec/vic1520.h +++ b/src/devices/bus/cbmiec/vic1520.h @@ -26,7 +26,7 @@ class vic1520_device : public device_t, public device_cbm_iec_interface { public: // construction/destruction - vic1520_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vic1520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbus/mpu_pc98.cpp b/src/devices/bus/cbus/mpu_pc98.cpp index 2ba192d4b0d..815f2f9591f 100644 --- a/src/devices/bus/cbus/mpu_pc98.cpp +++ b/src/devices/bus/cbus/mpu_pc98.cpp @@ -54,7 +54,7 @@ void mpu_pc98_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -mpu_pc98_device::mpu_pc98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpu_pc98_device::mpu_pc98_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MPU_PC98, tag, owner, clock) , m_bus(*this, DEVICE_SELF_OWNER) , m_mpu401(*this, MPU_CORE_TAG) diff --git a/src/devices/bus/cbus/mpu_pc98.h b/src/devices/bus/cbus/mpu_pc98.h index 798f8b8f11e..b8bb6e735ff 100644 --- a/src/devices/bus/cbus/mpu_pc98.h +++ b/src/devices/bus/cbus/mpu_pc98.h @@ -18,7 +18,7 @@ class mpu_pc98_device : public device_t { public: // construction/destruction - mpu_pc98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpu_pc98_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cbus/pc9801_118.cpp b/src/devices/bus/cbus/pc9801_118.cpp index 403a23b4658..0a6ac5ee9a2 100644 --- a/src/devices/bus/cbus/pc9801_118.cpp +++ b/src/devices/bus/cbus/pc9801_118.cpp @@ -148,7 +148,7 @@ const tiny_rom_entry *pc9801_118_device::device_rom_region() const // pc9801_118_device - constructor //------------------------------------------------- -pc9801_118_device::pc9801_118_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_118_device::pc9801_118_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc9801_snd_device(mconfig, PC9801_118, tag, owner, clock), m_bus(*this, DEVICE_SELF_OWNER), m_opn3(*this, "opn3") diff --git a/src/devices/bus/cbus/pc9801_118.h b/src/devices/bus/cbus/pc9801_118.h index 94ac3bfe24c..3a92996cd02 100644 --- a/src/devices/bus/cbus/pc9801_118.h +++ b/src/devices/bus/cbus/pc9801_118.h @@ -26,7 +26,7 @@ class pc9801_118_device : public pc9801_snd_device { public: // construction/destruction - pc9801_118_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_118_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::SOUND; } diff --git a/src/devices/bus/cbus/pc9801_26.cpp b/src/devices/bus/cbus/pc9801_26.cpp index 8f8b15740bd..6283d2cc9f4 100644 --- a/src/devices/bus/cbus/pc9801_26.cpp +++ b/src/devices/bus/cbus/pc9801_26.cpp @@ -115,7 +115,7 @@ ioport_constructor pc9801_26_device::device_input_ports() const // pc9801_26_device - constructor //------------------------------------------------- -pc9801_26_device::pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_26_device::pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc9801_snd_device(mconfig, PC9801_26, tag, owner, clock) , m_bus(*this, DEVICE_SELF_OWNER) , m_opn(*this, "opn") diff --git a/src/devices/bus/cbus/pc9801_26.h b/src/devices/bus/cbus/pc9801_26.h index 80cd57a20cd..fdb67619200 100644 --- a/src/devices/bus/cbus/pc9801_26.h +++ b/src/devices/bus/cbus/pc9801_26.h @@ -25,7 +25,7 @@ class pc9801_26_device : public pc9801_snd_device { public: // construction/destruction - pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t opn_r(offs_t offset); void opn_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/cbus/pc9801_55.cpp b/src/devices/bus/cbus/pc9801_55.cpp index 879ad2f1a66..44e17b63c60 100644 --- a/src/devices/bus/cbus/pc9801_55.cpp +++ b/src/devices/bus/cbus/pc9801_55.cpp @@ -144,7 +144,7 @@ ioport_constructor pc9801_55_device::device_input_ports() const // pc9801_55u_device - constructor //------------------------------------------------- -pc9801_55_device::pc9801_55_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pc9801_55_device::pc9801_55_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_bus(*this, DEVICE_SELF_OWNER) , m_scsi_bus(*this, "scsi") @@ -152,13 +152,13 @@ pc9801_55_device::pc9801_55_device(const machine_config &mconfig, device_type ty { } -pc9801_55u_device::pc9801_55u_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_55u_device::pc9801_55u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc9801_55_device(mconfig, PC9801_55U, tag, owner, clock) { } -pc9801_55l_device::pc9801_55l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_55l_device::pc9801_55l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc9801_55_device(mconfig, PC9801_55L, tag, owner, clock) { diff --git a/src/devices/bus/cbus/pc9801_55.h b/src/devices/bus/cbus/pc9801_55.h index b74c754c2b8..212e4501b26 100644 --- a/src/devices/bus/cbus/pc9801_55.h +++ b/src/devices/bus/cbus/pc9801_55.h @@ -26,8 +26,8 @@ class pc9801_55_device : public device_t { public: // construction/destruction - //pc9801_55_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - pc9801_55_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + //pc9801_55_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + pc9801_55_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } @@ -55,7 +55,7 @@ private: class pc9801_55u_device : public pc9801_55_device { public: - pc9801_55u_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_55u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: virtual const tiny_rom_entry *device_rom_region() const override; @@ -65,7 +65,7 @@ private: class pc9801_55l_device : public pc9801_55_device { public: - pc9801_55l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_55l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cbus/pc9801_86.cpp b/src/devices/bus/cbus/pc9801_86.cpp index 740906357c5..dd11ad30fd7 100644 --- a/src/devices/bus/cbus/pc9801_86.cpp +++ b/src/devices/bus/cbus/pc9801_86.cpp @@ -89,8 +89,8 @@ void pc9801_86_device::pc9801_86_config(machine_config &config) m_opna->add_route(1, "lspeaker", 1.00); m_opna->add_route(2, "rspeaker", 1.00); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // burr brown pcm61p - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // burr brown pcm61p + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // burr brown pcm61p + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // burr brown pcm61p } void pc9801_86_device::device_add_mconfig(machine_config &config) @@ -178,7 +178,7 @@ ioport_constructor pc9801_86_device::device_input_ports() const // pc9801_86_device - constructor //------------------------------------------------- -pc9801_86_device::pc9801_86_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pc9801_86_device::pc9801_86_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pc9801_snd_device(mconfig, type, tag, owner, clock) , m_bus(*this, DEVICE_SELF_OWNER) , m_opna(*this, "opna") @@ -188,7 +188,7 @@ pc9801_86_device::pc9801_86_device(const machine_config &mconfig, device_type ty { } -pc9801_86_device::pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_86_device::pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc9801_86_device(mconfig, PC9801_86, tag, owner, clock) { @@ -445,7 +445,7 @@ const tiny_rom_entry *pc9801_speakboard_device::device_rom_region() const return ROM_NAME( pc9801_spb ); } -pc9801_speakboard_device::pc9801_speakboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_speakboard_device::pc9801_speakboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc9801_86_device(mconfig, PC9801_SPEAKBOARD, tag, owner, clock) , m_opna_slave(*this, "opna_slave") { @@ -505,7 +505,7 @@ void pc9801_speakboard_device::opna_slave_w(offs_t offset, u8 data) DEFINE_DEVICE_TYPE(OTOMICHAN_KAI, otomichan_kai_device, "pc98_otomichan_kai", "MAD Factory Otomi-chan Kai") // 音美(おとみ)ちゃん改 -otomichan_kai_device::otomichan_kai_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +otomichan_kai_device::otomichan_kai_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc9801_86_device(mconfig, OTOMICHAN_KAI, tag, owner, clock) , m_opn2c(*this, "opn2c") { diff --git a/src/devices/bus/cbus/pc9801_86.h b/src/devices/bus/cbus/pc9801_86.h index 7903f11e0b9..e5f8399d94c 100644 --- a/src/devices/bus/cbus/pc9801_86.h +++ b/src/devices/bus/cbus/pc9801_86.h @@ -26,8 +26,8 @@ class pc9801_86_device : public pc9801_snd_device { public: // construction/destruction - pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - pc9801_86_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + pc9801_86_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(sound_irq); @@ -77,7 +77,7 @@ class pc9801_speakboard_device : public pc9801_86_device { public: // construction/destruction - pc9801_speakboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_speakboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::SOUND; } @@ -98,7 +98,7 @@ class otomichan_kai_device : public pc9801_86_device { public: // construction/destruction - otomichan_kai_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + otomichan_kai_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::SOUND; } diff --git a/src/devices/bus/cbus/pc9801_amd98.cpp b/src/devices/bus/cbus/pc9801_amd98.cpp index 5b4d66bbdff..a6461f65319 100644 --- a/src/devices/bus/cbus/pc9801_amd98.cpp +++ b/src/devices/bus/cbus/pc9801_amd98.cpp @@ -47,17 +47,17 @@ void pc9801_amd98_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - AY8910(config, m_ay1, 1'996'800); + AY8910(config, m_ay1, XTAL::u(1'996'800)); m_ay1->port_a_read_callback().set_ioport("OPN_PA1"); m_ay1->port_b_write_callback().set(FUNC(pc9801_amd98_device::ay3_address_w)); m_ay1->add_route(ALL_OUTPUTS, "lspeaker", 0.50); - AY8910(config, m_ay2, 1'996'800); + AY8910(config, m_ay2, XTAL::u(1'996'800)); m_ay2->port_a_read_callback().set_ioport("OPN_PA2"); m_ay2->port_b_write_callback().set(FUNC(pc9801_amd98_device::ay3_data_latch_w)); m_ay2->add_route(ALL_OUTPUTS, "rspeaker", 0.50); - AY8910(config, m_ay3, 1'996'800); + AY8910(config, m_ay3, XTAL::u(1'996'800)); m_ay3->add_route(ALL_OUTPUTS, "lspeaker", 0.25); m_ay3->add_route(ALL_OUTPUTS, "rspeaker", 0.25); } @@ -100,7 +100,7 @@ ioport_constructor pc9801_amd98_device::device_input_ports() const // pc9801_amd98_device - constructor //------------------------------------------------- -pc9801_amd98_device::pc9801_amd98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_amd98_device::pc9801_amd98_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC9801_AMD98, tag, owner, clock) , m_bus(*this, DEVICE_SELF_OWNER) , m_ay1(*this, "ay1") diff --git a/src/devices/bus/cbus/pc9801_amd98.h b/src/devices/bus/cbus/pc9801_amd98.h index f26246c768b..fbc74a2dba4 100644 --- a/src/devices/bus/cbus/pc9801_amd98.h +++ b/src/devices/bus/cbus/pc9801_amd98.h @@ -24,7 +24,7 @@ class pc9801_amd98_device : public device_t { public: // construction/destruction - pc9801_amd98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_amd98_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::SOUND; } diff --git a/src/devices/bus/cbus/pc9801_cbus.cpp b/src/devices/bus/cbus/pc9801_cbus.cpp index 9077d8cc4ea..aabc8d8a7d6 100644 --- a/src/devices/bus/cbus/pc9801_cbus.cpp +++ b/src/devices/bus/cbus/pc9801_cbus.cpp @@ -65,7 +65,7 @@ device_pc9801cbus_card_interface::~device_pc9801cbus_card_interface() // pc9801_slot_device - constructor //------------------------------------------------- -pc9801_slot_device::pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc9801_slot_device::pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC9801CBUS_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), m_memspace(*this, finder_base::DUMMY_TAG, -1), diff --git a/src/devices/bus/cbus/pc9801_cbus.h b/src/devices/bus/cbus/pc9801_cbus.h index ab7085dfa86..9a0bf3fe367 100644 --- a/src/devices/bus/cbus/pc9801_cbus.h +++ b/src/devices/bus/cbus/pc9801_cbus.h @@ -93,14 +93,14 @@ public: // construction/destruction template pc9801_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pc9801_slot_device(mconfig, tag, owner, (uint32_t)0) + : pc9801_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_memspace(T &&tag, int spacenum) { m_memspace.set_tag(std::forward(tag), spacenum); } template void set_iospace(T &&tag, int spacenum) { m_iospace.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/cbus/pc9801_snd.cpp b/src/devices/bus/cbus/pc9801_snd.cpp index 3a33cfe6757..8c173c47500 100644 --- a/src/devices/bus/cbus/pc9801_snd.cpp +++ b/src/devices/bus/cbus/pc9801_snd.cpp @@ -10,7 +10,7 @@ #include "emu.h" #include "pc9801_snd.h" -pc9801_snd_device::pc9801_snd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pc9801_snd_device::pc9801_snd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/bus/cbus/pc9801_snd.h b/src/devices/bus/cbus/pc9801_snd.h index 0c9c694a4e3..63190b94832 100644 --- a/src/devices/bus/cbus/pc9801_snd.h +++ b/src/devices/bus/cbus/pc9801_snd.h @@ -15,7 +15,7 @@ class pc9801_snd_device : public device_t { public: - pc9801_snd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc9801_snd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: u8 opn_porta_r(); diff --git a/src/devices/bus/centronics/chessmec.cpp b/src/devices/bus/centronics/chessmec.cpp index fb30a7253b7..25fb4acdf69 100644 --- a/src/devices/bus/centronics/chessmec.cpp +++ b/src/devices/bus/centronics/chessmec.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS_CHESSMEC, centronics_chessmec_device, "centronics_ // constructor //------------------------------------------------- -centronics_chessmec_device::centronics_chessmec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +centronics_chessmec_device::centronics_chessmec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS_CHESSMEC, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_chessm(*this, "chessm") @@ -32,5 +32,5 @@ centronics_chessmec_device::centronics_chessmec_device(const machine_config &mco void centronics_chessmec_device::device_add_mconfig(machine_config &config) { - CHESSMACHINE(config, m_chessm, 15'000'000).data_out().set(FUNC(centronics_chessmec_device::output_busy)); + CHESSMACHINE(config, m_chessm, XTAL::u(15'000'000)).data_out().set(FUNC(centronics_chessmec_device::output_busy)); } diff --git a/src/devices/bus/centronics/chessmec.h b/src/devices/bus/centronics/chessmec.h index 07bbd8970c3..726a79b07dd 100644 --- a/src/devices/bus/centronics/chessmec.h +++ b/src/devices/bus/centronics/chessmec.h @@ -20,7 +20,7 @@ class centronics_chessmec_device : public device_t, { public: // construction/destruction - centronics_chessmec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_chessmec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/centronics/comxpl80.cpp b/src/devices/bus/centronics/comxpl80.cpp index 65646f0d290..f22556ed915 100644 --- a/src/devices/bus/centronics/comxpl80.cpp +++ b/src/devices/bus/centronics/comxpl80.cpp @@ -65,7 +65,7 @@ const tiny_rom_entry *comx_pl80_device::device_rom_region() const void comx_pl80_device::device_add_mconfig(machine_config &config) { #if 0 - m6805_device &cx005(M6805(config, CX005_TAG, 4000000)); // CX005: some kind of MC6805/MC68HC05 clone + m6805_device &cx005(M6805(config, CX005_TAG, XTAL::u(4000000))); // CX005: some kind of MC6805/MC68HC05 clone cx005.set_disable(); #endif } @@ -113,7 +113,7 @@ ioport_constructor comx_pl80_device::device_input_ports() const // comx_pl80_device - constructor //------------------------------------------------- -comx_pl80_device::comx_pl80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +comx_pl80_device::comx_pl80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_PL80, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_plotter(*this, "gfx1"), diff --git a/src/devices/bus/centronics/comxpl80.h b/src/devices/bus/centronics/comxpl80.h index f64a31da6d0..ffb727a8879 100644 --- a/src/devices/bus/centronics/comxpl80.h +++ b/src/devices/bus/centronics/comxpl80.h @@ -26,7 +26,7 @@ class comx_pl80_device : public device_t, { public: // construction/destruction - comx_pl80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_pl80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/centronics/covox.cpp b/src/devices/bus/centronics/covox.cpp index d37d96ce958..12b9a89cb2f 100644 --- a/src/devices/bus/centronics/covox.cpp +++ b/src/devices/bus/centronics/covox.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS_COVOX, centronics_covox_device, "covox", "Covox Sp // centronics_covox_device - constructor //------------------------------------------------- -centronics_covox_device::centronics_covox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +centronics_covox_device::centronics_covox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS_COVOX, tag, owner, clock), device_centronics_peripheral_interface( mconfig, *this ), m_dac(*this, "dac"), @@ -41,7 +41,7 @@ void centronics_covox_device::device_add_mconfig(machine_config &config) { /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void centronics_covox_device::device_start() @@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS_COVOX_STEREO, centronics_covox_stereo_device, "cov // centronics_covox_stereo_device - constructor //------------------------------------------------- -centronics_covox_stereo_device::centronics_covox_stereo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +centronics_covox_stereo_device::centronics_covox_stereo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS_COVOX_STEREO, tag, owner, clock), device_centronics_peripheral_interface( mconfig, *this ), m_ldac(*this, "ldac"), @@ -90,8 +90,8 @@ void centronics_covox_stereo_device::device_add_mconfig(machine_config &config) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_8BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_8BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC } void centronics_covox_stereo_device::device_start() diff --git a/src/devices/bus/centronics/covox.h b/src/devices/bus/centronics/covox.h index da6ed1063aa..1c83edb0c87 100644 --- a/src/devices/bus/centronics/covox.h +++ b/src/devices/bus/centronics/covox.h @@ -21,7 +21,7 @@ class centronics_covox_device : public device_t, { public: // construction/destruction - centronics_covox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_covox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -57,7 +57,7 @@ class centronics_covox_stereo_device : public device_t, { public: // construction/destruction - centronics_covox_stereo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_covox_stereo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/centronics/ctronics.cpp b/src/devices/bus/centronics/ctronics.cpp index 81812bc37f6..9cea2dd0b9e 100644 --- a/src/devices/bus/centronics/ctronics.cpp +++ b/src/devices/bus/centronics/ctronics.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS, centronics_device, "centronics", "Centronics") -centronics_device::centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +centronics_device::centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS, tag, owner, clock), device_slot_interface(mconfig, *this), m_strobe_handler(*this), diff --git a/src/devices/bus/centronics/ctronics.h b/src/devices/bus/centronics/ctronics.h index 44de7930cc8..ebfc7ebe831 100644 --- a/src/devices/bus/centronics/ctronics.h +++ b/src/devices/bus/centronics/ctronics.h @@ -25,14 +25,14 @@ class centronics_device : public device_t, public device_slot_interface public: template centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : centronics_device(mconfig, tag, owner, 0) + : centronics_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto strobe_handler() { return m_strobe_handler.bind(); } diff --git a/src/devices/bus/centronics/digiblst.cpp b/src/devices/bus/centronics/digiblst.cpp index 3b66d35b9df..4ddce59f843 100644 --- a/src/devices/bus/centronics/digiblst.cpp +++ b/src/devices/bus/centronics/digiblst.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS_DIGIBLASTER, centronics_digiblaster_device, "cpcdi // centronics_digiblaster_device - constructor //------------------------------------------------- -centronics_digiblaster_device::centronics_digiblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +centronics_digiblaster_device::centronics_digiblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS_DIGIBLASTER, tag, owner, clock), device_centronics_peripheral_interface( mconfig, *this ), m_dac(*this, "dac"), @@ -41,7 +41,7 @@ void centronics_digiblaster_device::device_add_mconfig(machine_config &config) { /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void centronics_digiblaster_device::device_start() diff --git a/src/devices/bus/centronics/digiblst.h b/src/devices/bus/centronics/digiblst.h index 00a8246b802..a506c6930d8 100644 --- a/src/devices/bus/centronics/digiblst.h +++ b/src/devices/bus/centronics/digiblst.h @@ -27,7 +27,7 @@ class centronics_digiblaster_device : public device_t, { public: // construction/destruction - centronics_digiblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_digiblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/centronics/dsjoy.cpp b/src/devices/bus/centronics/dsjoy.cpp index a9209c264f8..55030b71094 100644 --- a/src/devices/bus/centronics/dsjoy.cpp +++ b/src/devices/bus/centronics/dsjoy.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(DEMPA_SHINBUNSHA_JOYSTICK, dempa_shinbunsha_joystick_device, "dempa_shinbunsha_joystick", "Dempa Shinbunsha Joystick") -dempa_shinbunsha_joystick_device::dempa_shinbunsha_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dempa_shinbunsha_joystick_device::dempa_shinbunsha_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DEMPA_SHINBUNSHA_JOYSTICK, tag, owner, clock), device_centronics_peripheral_interface( mconfig, *this ), m_lptjoy(*this, "lptjoy"), diff --git a/src/devices/bus/centronics/dsjoy.h b/src/devices/bus/centronics/dsjoy.h index bcb91afceed..14095017c62 100644 --- a/src/devices/bus/centronics/dsjoy.h +++ b/src/devices/bus/centronics/dsjoy.h @@ -18,7 +18,7 @@ class dempa_shinbunsha_joystick_device : public device_t, { public: // construction/destruction - dempa_shinbunsha_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dempa_shinbunsha_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/centronics/epson_ex800.cpp b/src/devices/bus/centronics/epson_ex800.cpp index e7af6cfc65b..6326bdd0422 100644 --- a/src/devices/bus/centronics/epson_ex800.cpp +++ b/src/devices/bus/centronics/epson_ex800.cpp @@ -218,7 +218,7 @@ void epson_ex800_device::ex800_mem(address_map &map) void epson_ex800_device::device_add_mconfig(machine_config &config) { /* basic machine hardware */ - upd7810_device &upd(UPD7810(config, m_maincpu, 12000000)); // 12 MHz? + upd7810_device &upd(UPD7810(config, m_maincpu, XTAL::u(12000000))); // 12 MHz? upd.set_addrmap(AS_PROGRAM, &epson_ex800_device::ex800_mem); upd.pa_in_cb().set(FUNC(epson_ex800_device::porta_r)); upd.pa_out_cb().set(FUNC(epson_ex800_device::porta_w)); @@ -231,7 +231,7 @@ void epson_ex800_device::device_add_mconfig(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 4000); // measured at 4000 Hz */ + BEEP(config, m_beeper, XTAL::u(4000)); // measured at 4000 Hz */ m_beeper->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -342,7 +342,7 @@ ioport_constructor epson_ex800_device::device_input_ports() const // epson_ex800_device - constructor //------------------------------------------------- -epson_ex800_device::epson_ex800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_ex800_device::epson_ex800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPSON_EX800, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_maincpu(*this, "maincpu"), diff --git a/src/devices/bus/centronics/epson_ex800.h b/src/devices/bus/centronics/epson_ex800.h index 4c60b8cc847..0f8ae4bd0ff 100644 --- a/src/devices/bus/centronics/epson_ex800.h +++ b/src/devices/bus/centronics/epson_ex800.h @@ -27,7 +27,7 @@ class epson_ex800_device : public device_t, public device_centronics_peripheral { public: // construction/destruction - epson_ex800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + epson_ex800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(online_switch); diff --git a/src/devices/bus/centronics/epson_lx800.cpp b/src/devices/bus/centronics/epson_lx800.cpp index 3733c92cb2b..acb70a8fb38 100644 --- a/src/devices/bus/centronics/epson_lx800.cpp +++ b/src/devices/bus/centronics/epson_lx800.cpp @@ -89,11 +89,11 @@ void epson_lx800_device::device_add_mconfig(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 4000); // ? + BEEP(config, m_beep, XTAL::u(4000)); // ? m_beep->add_route(ALL_OUTPUTS, "mono", 0.05); /* gate array */ - e05a03_device &ic3b(E05A03(config, "ic3b", 0)); + e05a03_device &ic3b(E05A03(config, "ic3b")); ic3b.pe_lp_wr_callback().set_output("paperout_led"); ic3b.reso_wr_callback().set(FUNC(epson_lx800_device::reset_w)); ic3b.pe_wr_callback().set(FUNC(epson_lx800_device::centronics_pe_w)); @@ -176,12 +176,12 @@ ioport_constructor epson_lx800_device::device_input_ports() const // epson_lx800_device - constructor //------------------------------------------------- -epson_lx800_device::epson_lx800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_lx800_device::epson_lx800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : epson_lx800_device(mconfig, EPSON_LX800, tag, owner, clock) { } -epson_lx800_device::epson_lx800_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +epson_lx800_device::epson_lx800_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_maincpu(*this, "maincpu"), diff --git a/src/devices/bus/centronics/epson_lx800.h b/src/devices/bus/centronics/epson_lx800.h index c6534f3d62f..e45a6217248 100644 --- a/src/devices/bus/centronics/epson_lx800.h +++ b/src/devices/bus/centronics/epson_lx800.h @@ -28,10 +28,10 @@ class epson_lx800_device : public device_t, public device_centronics_peripheral { public: // construction/destruction - epson_lx800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + epson_lx800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - epson_lx800_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + epson_lx800_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp index 24f9b90c50f..39611d2e367 100644 --- a/src/devices/bus/centronics/epson_lx810l.cpp +++ b/src/devices/bus/centronics/epson_lx810l.cpp @@ -144,10 +144,10 @@ void epson_lx810l_device::device_add_mconfig(machine_config &config) /* audio hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); /* gate array */ - e05a30_device &e05a30(E05A30(config, m_e05a30, 0)); + e05a30_device &e05a30(E05A30(config, m_e05a30)); e05a30.printhead().set(FUNC(epson_lx810l_device::printhead)); e05a30.pf_stepper().set(FUNC(epson_lx810l_device::pf_stepper)); e05a30.cr_stepper().set(FUNC(epson_lx810l_device::cr_stepper)); @@ -284,12 +284,12 @@ INPUT_CHANGED_MEMBER(epson_lx810l_device::reset_printer) // epson_lx810l_device - constructor //------------------------------------------------- -epson_lx810l_device::epson_lx810l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_lx810l_device::epson_lx810l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : epson_lx810l_device(mconfig, EPSON_LX810L, tag, owner, clock) { } -epson_lx810l_device::epson_lx810l_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +epson_lx810l_device::epson_lx810l_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_maincpu(*this, "maincpu"), @@ -315,7 +315,7 @@ epson_lx810l_device::epson_lx810l_device(const machine_config &mconfig, device_t { } -epson_ap2000_device::epson_ap2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +epson_ap2000_device::epson_ap2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : epson_lx810l_device(mconfig, EPSON_AP2000, tag, owner, clock) { } diff --git a/src/devices/bus/centronics/epson_lx810l.h b/src/devices/bus/centronics/epson_lx810l.h index 1b5581a606b..96b4f3f04a5 100644 --- a/src/devices/bus/centronics/epson_lx810l.h +++ b/src/devices/bus/centronics/epson_lx810l.h @@ -31,7 +31,7 @@ class epson_lx810l_device : public device_t, public device_centronics_peripheral { public: // construction/destruction - epson_lx810l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + epson_lx810l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* Centronics stuff */ virtual DECLARE_WRITE_LINE_MEMBER( input_strobe ) override { m_e05a30->centronics_input_strobe(state); } @@ -52,7 +52,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(reset_printer); protected: - epson_lx810l_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + epson_lx810l_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -152,7 +152,7 @@ class epson_ap2000_device : public epson_lx810l_device { public: // construction/destruction - epson_ap2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + epson_ap2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/centronics/nec_p72.cpp b/src/devices/bus/centronics/nec_p72.cpp index fe03bb93d34..1804167bcee 100644 --- a/src/devices/bus/centronics/nec_p72.cpp +++ b/src/devices/bus/centronics/nec_p72.cpp @@ -73,12 +73,12 @@ void nec_p72_device::device_start() // nec_p72_device - constructor //------------------------------------------------- -nec_p72_device::nec_p72_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nec_p72_device::nec_p72_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nec_p72_device(mconfig, NEC_P72, tag, owner, clock) { } -nec_p72_device::nec_p72_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nec_p72_device::nec_p72_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/centronics/nec_p72.h b/src/devices/bus/centronics/nec_p72.h index f7ba6d59a73..0d92555f61e 100644 --- a/src/devices/bus/centronics/nec_p72.h +++ b/src/devices/bus/centronics/nec_p72.h @@ -20,10 +20,10 @@ class nec_p72_device : public device_t, { public: // construction/destruction - nec_p72_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nec_p72_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nec_p72_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nec_p72_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/centronics/printer.cpp b/src/devices/bus/centronics/printer.cpp index b1b136cfc66..c5f749dd811 100644 --- a/src/devices/bus/centronics/printer.cpp +++ b/src/devices/bus/centronics/printer.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS_PRINTER, centronics_printer_device, "centronics_pr // centronics_printer_device - constructor //------------------------------------------------- -centronics_printer_device::centronics_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +centronics_printer_device::centronics_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS_PRINTER, tag, owner, clock), device_centronics_peripheral_interface( mconfig, *this ), m_strobe(0), @@ -34,7 +34,7 @@ centronics_printer_device::centronics_printer_device(const machine_config &mconf void centronics_printer_device::device_add_mconfig(machine_config &config) { - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); m_printer->online_callback().set(FUNC(centronics_printer_device::printer_online)); } diff --git a/src/devices/bus/centronics/printer.h b/src/devices/bus/centronics/printer.h index e959959be0c..4e2e4511122 100644 --- a/src/devices/bus/centronics/printer.h +++ b/src/devices/bus/centronics/printer.h @@ -15,7 +15,7 @@ class centronics_printer_device : public device_t, { public: // construction/destruction - centronics_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_strobe ) override; virtual DECLARE_WRITE_LINE_MEMBER( input_data0 ) override { if (state) m_data |= 0x01; else m_data &= ~0x01; } diff --git a/src/devices/bus/centronics/samdac.cpp b/src/devices/bus/centronics/samdac.cpp index 01b18963e44..7586116100e 100644 --- a/src/devices/bus/centronics/samdac.cpp +++ b/src/devices/bus/centronics/samdac.cpp @@ -26,8 +26,8 @@ void centronics_samdac_device::device_add_mconfig(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_8BIT_R2R(config, m_dac[0], 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); - DAC_8BIT_R2R(config, m_dac[1], 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); + DAC_8BIT_R2R(config, m_dac[0]).add_route(ALL_OUTPUTS, "lspeaker", 0.5); + DAC_8BIT_R2R(config, m_dac[1]).add_route(ALL_OUTPUTS, "rspeaker", 0.5); } @@ -39,7 +39,7 @@ void centronics_samdac_device::device_add_mconfig(machine_config &config) // centronics_samdac_device - constructor //------------------------------------------------- -centronics_samdac_device::centronics_samdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +centronics_samdac_device::centronics_samdac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS_SAMDAC, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_dac(*this, "dac%u", 0U), diff --git a/src/devices/bus/centronics/samdac.h b/src/devices/bus/centronics/samdac.h index 79cd654e267..31ea00257ec 100644 --- a/src/devices/bus/centronics/samdac.h +++ b/src/devices/bus/centronics/samdac.h @@ -25,7 +25,7 @@ class centronics_samdac_device : public device_t, public device_centronics_perip { public: // construction/destruction - centronics_samdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_samdac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from centronics port virtual DECLARE_WRITE_LINE_MEMBER( input_strobe ) override; diff --git a/src/devices/bus/centronics/smartboard.cpp b/src/devices/bus/centronics/smartboard.cpp index 8afcfbf68f7..200184abac7 100644 --- a/src/devices/bus/centronics/smartboard.cpp +++ b/src/devices/bus/centronics/smartboard.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS_SMARTBOARD, centronics_smartboard_device, "centron // constructor //------------------------------------------------- -centronics_smartboard_device::centronics_smartboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +centronics_smartboard_device::centronics_smartboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CENTRONICS_SMARTBOARD, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), m_smartboard(*this, "smartboard") diff --git a/src/devices/bus/centronics/smartboard.h b/src/devices/bus/centronics/smartboard.h index 4988086b11f..050bd67ba57 100644 --- a/src/devices/bus/centronics/smartboard.h +++ b/src/devices/bus/centronics/smartboard.h @@ -20,7 +20,7 @@ class centronics_smartboard_device : public device_t, { public: // construction/destruction - centronics_smartboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + centronics_smartboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/centronics/spjoy.cpp b/src/devices/bus/centronics/spjoy.cpp index dc032c35031..6302f3c5182 100644 --- a/src/devices/bus/centronics/spjoy.cpp +++ b/src/devices/bus/centronics/spjoy.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SERIAL_PORT_JOYSTICK, serial_port_joystick_device, "spjoy", "The Serial Port/Vertical Twist Joystick Interface") -serial_port_joystick_device::serial_port_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +serial_port_joystick_device::serial_port_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERIAL_PORT_JOYSTICK, tag, owner, clock) , device_centronics_peripheral_interface( mconfig, *this ) , m_joy(*this, "joy_p%u", 1U) diff --git a/src/devices/bus/centronics/spjoy.h b/src/devices/bus/centronics/spjoy.h index d13f2f90555..0cbc434cf94 100644 --- a/src/devices/bus/centronics/spjoy.h +++ b/src/devices/bus/centronics/spjoy.h @@ -18,7 +18,7 @@ class serial_port_joystick_device : public device_t, { public: // construction/destruction - serial_port_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + serial_port_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/cgenie/expansion/expansion.cpp b/src/devices/bus/cgenie/expansion/expansion.cpp index d35d75401bd..c29f56a5c59 100644 --- a/src/devices/bus/cgenie/expansion/expansion.cpp +++ b/src/devices/bus/cgenie/expansion/expansion.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(CG_EXP_SLOT, cg_exp_slot_device, "cg_exp_slot", "Colour Genie // cg_exp - constructor //------------------------------------------------- -cg_exp_slot_device::cg_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cg_exp_slot_device::cg_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CG_EXP_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_program(*this, finder_base::DUMMY_TAG, -1), diff --git a/src/devices/bus/cgenie/expansion/expansion.h b/src/devices/bus/cgenie/expansion/expansion.h index 5d128128fa8..e063f6defa8 100644 --- a/src/devices/bus/cgenie/expansion/expansion.h +++ b/src/devices/bus/cgenie/expansion/expansion.h @@ -54,14 +54,14 @@ class cg_exp_slot_device : public device_t, public device_single_card_slot_inter public: // construction/destruction cg_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner) - : cg_exp_slot_device(mconfig, tag, owner, (uint32_t)0) + : cg_exp_slot_device(mconfig, tag, owner, XTAL()) { option_reset(); cg_exp_slot_carts(*this); set_default_option(nullptr); set_fixed(false); } - cg_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cg_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~cg_exp_slot_device(); template void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/cgenie/expansion/floppy.cpp b/src/devices/bus/cgenie/expansion/floppy.cpp index a97c3d46e66..c54eac55f71 100644 --- a/src/devices/bus/cgenie/expansion/floppy.cpp +++ b/src/devices/bus/cgenie/expansion/floppy.cpp @@ -113,7 +113,7 @@ void cgenie_fdc_device::device_add_mconfig(machine_config &config) // cgenie_fdc_device - constructor //------------------------------------------------- -cgenie_fdc_device::cgenie_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cgenie_fdc_device::cgenie_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CGENIE_FDC, tag, owner, clock), device_cg_exp_interface(mconfig, *this), m_fdc(*this, "wd2793"), diff --git a/src/devices/bus/cgenie/expansion/floppy.h b/src/devices/bus/cgenie/expansion/floppy.h index ca64b39f0d7..fb7a48776d0 100644 --- a/src/devices/bus/cgenie/expansion/floppy.h +++ b/src/devices/bus/cgenie/expansion/floppy.h @@ -28,7 +28,7 @@ class cgenie_fdc_device : public device_t, public device_cg_exp_interface { public: // construction/destruction - cgenie_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cgenie_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cgenie/parallel/joystick.cpp b/src/devices/bus/cgenie/parallel/joystick.cpp index 2be4d5280b5..9fabe060244 100644 --- a/src/devices/bus/cgenie/parallel/joystick.cpp +++ b/src/devices/bus/cgenie/parallel/joystick.cpp @@ -93,7 +93,7 @@ ioport_constructor cgenie_joystick_device::device_input_ports() const // cgenie_joystick_device - constructor //------------------------------------------------- -cgenie_joystick_device::cgenie_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cgenie_joystick_device::cgenie_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CGENIE_JOYSTICK, tag, owner, clock), device_cg_parallel_interface(mconfig, *this), m_joy(*this, "JOY.%u", 0), diff --git a/src/devices/bus/cgenie/parallel/joystick.h b/src/devices/bus/cgenie/parallel/joystick.h index 6a4025ada9f..2f7b9871bd2 100644 --- a/src/devices/bus/cgenie/parallel/joystick.h +++ b/src/devices/bus/cgenie/parallel/joystick.h @@ -24,7 +24,7 @@ class cgenie_joystick_device : public device_t, public device_cg_parallel_interf { public: // construction/destruction - cgenie_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cgenie_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/cgenie/parallel/parallel.cpp b/src/devices/bus/cgenie/parallel/parallel.cpp index 2d08f27a1e5..8a9d7567ae7 100644 --- a/src/devices/bus/cgenie/parallel/parallel.cpp +++ b/src/devices/bus/cgenie/parallel/parallel.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(CG_PARALLEL_SLOT, cg_parallel_slot_device, "cg_parallel_slot" // cg_parallel_slot_device - constructor //------------------------------------------------- -cg_parallel_slot_device::cg_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cg_parallel_slot_device::cg_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CG_PARALLEL_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_cart(nullptr) diff --git a/src/devices/bus/cgenie/parallel/parallel.h b/src/devices/bus/cgenie/parallel/parallel.h index 74fb8b7a50b..8027ad76eb4 100644 --- a/src/devices/bus/cgenie/parallel/parallel.h +++ b/src/devices/bus/cgenie/parallel/parallel.h @@ -38,14 +38,14 @@ class cg_parallel_slot_device : public device_t, public device_single_card_slot_ public: // construction/destruction cg_parallel_slot_device(machine_config const &mconfig, char const *tag, device_t *owner) - : cg_parallel_slot_device(mconfig, tag, owner, (uint32_t)0) + : cg_parallel_slot_device(mconfig, tag, owner, XTAL()) { option_reset(); cg_parallel_slot_carts(*this); set_default_option(nullptr); set_fixed(false); } - cg_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cg_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~cg_parallel_slot_device(); // IOA diff --git a/src/devices/bus/cgenie/parallel/printer.cpp b/src/devices/bus/cgenie/parallel/printer.cpp index 9a3e9df5dc4..c8816ea3fec 100644 --- a/src/devices/bus/cgenie/parallel/printer.cpp +++ b/src/devices/bus/cgenie/parallel/printer.cpp @@ -48,7 +48,7 @@ void cgenie_printer_device::device_add_mconfig(machine_config &config) // cgenie_printer_device - constructor //------------------------------------------------- -cgenie_printer_device::cgenie_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cgenie_printer_device::cgenie_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CGENIE_PRINTER, tag, owner, clock), device_cg_parallel_interface(mconfig, *this), m_centronics(*this, "centronics"), diff --git a/src/devices/bus/cgenie/parallel/printer.h b/src/devices/bus/cgenie/parallel/printer.h index 6da59e68ea0..ea3c34802d3 100644 --- a/src/devices/bus/cgenie/parallel/printer.h +++ b/src/devices/bus/cgenie/parallel/printer.h @@ -25,7 +25,7 @@ class cgenie_printer_device : public device_t, public device_cg_parallel_interfa { public: // construction/destruction - cgenie_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cgenie_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/chanf/rom.cpp b/src/devices/bus/chanf/rom.cpp index ab4b1a83750..f1d494f8822 100644 --- a/src/devices/bus/chanf/rom.cpp +++ b/src/devices/bus/chanf/rom.cpp @@ -31,39 +31,39 @@ DEFINE_DEVICE_TYPE(CHANF_ROM_MULTI_OLD, chanf_multi_old_device, "chanf_multi DEFINE_DEVICE_TYPE(CHANF_ROM_MULTI_FINAL, chanf_multi_final_device, "chanf_multi_fin", "Channel F Multigame (Final Version) Cart") -chanf_rom_device::chanf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +chanf_rom_device::chanf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_channelf_cart_interface(mconfig, *this) , m_addr_latch(0), m_addr(0), m_read_write(0), m_data0(0) { } -chanf_rom_device::chanf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +chanf_rom_device::chanf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : chanf_rom_device(mconfig, CHANF_ROM_STD, tag, owner, clock) { } -chanf_maze_device::chanf_maze_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +chanf_maze_device::chanf_maze_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : chanf_rom_device(mconfig, CHANF_ROM_MAZE, tag, owner, clock) { } -chanf_hangman_device::chanf_hangman_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +chanf_hangman_device::chanf_hangman_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : chanf_rom_device(mconfig, CHANF_ROM_HANGMAN, tag, owner, clock) { } -chanf_chess_device::chanf_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +chanf_chess_device::chanf_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : chanf_rom_device(mconfig, CHANF_ROM_CHESS, tag, owner, clock) { } -chanf_multi_old_device::chanf_multi_old_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +chanf_multi_old_device::chanf_multi_old_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : chanf_rom_device(mconfig, CHANF_ROM_MULTI_OLD, tag, owner, clock), m_base_bank(0) { } -chanf_multi_final_device::chanf_multi_final_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +chanf_multi_final_device::chanf_multi_final_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : chanf_rom_device(mconfig, CHANF_ROM_MULTI_FINAL, tag, owner, clock), m_base_bank(0), m_half_bank(0) { } diff --git a/src/devices/bus/chanf/rom.h b/src/devices/bus/chanf/rom.h index 76221811881..2abaac50320 100644 --- a/src/devices/bus/chanf/rom.h +++ b/src/devices/bus/chanf/rom.h @@ -13,7 +13,7 @@ class chanf_rom_device : public device_t, { public: // construction/destruction - chanf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + chanf_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override {} @@ -28,7 +28,7 @@ public: virtual uint8_t read_rom(offs_t offset) override; protected: - chanf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + chanf_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // used for RAM chip in Hangman & Maze uint8_t m_latch[2]; // PORT A & PORT B @@ -42,7 +42,7 @@ class chanf_maze_device : public chanf_rom_device { public: // construction/destruction - chanf_maze_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + chanf_maze_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -60,7 +60,7 @@ class chanf_hangman_device : public chanf_rom_device { public: // construction/destruction - chanf_hangman_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + chanf_hangman_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -78,7 +78,7 @@ class chanf_chess_device : public chanf_rom_device { public: // construction/destruction - chanf_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + chanf_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_ram(offs_t offset) override { return common_read_3853(offset); } @@ -92,7 +92,7 @@ class chanf_multi_old_device : public chanf_rom_device { public: // construction/destruction - chanf_multi_old_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + chanf_multi_old_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -115,7 +115,7 @@ class chanf_multi_final_device : public chanf_rom_device { public: // construction/destruction - chanf_multi_final_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + chanf_multi_final_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/chanf/slot.cpp b/src/devices/bus/chanf/slot.cpp index e13dd1d0d82..0a9f2992920 100644 --- a/src/devices/bus/chanf/slot.cpp +++ b/src/devices/bus/chanf/slot.cpp @@ -71,7 +71,7 @@ void device_channelf_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- // channelf_cart_slot_device - constructor //------------------------------------------------- -channelf_cart_slot_device::channelf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +channelf_cart_slot_device::channelf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CHANF_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h index afad1a76065..3fdcd91c479 100644 --- a/src/devices/bus/chanf/slot.h +++ b/src/devices/bus/chanf/slot.h @@ -66,7 +66,7 @@ public: // construction/destruction template channelf_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : channelf_cart_slot_device(mconfig, tag, owner, 0) + : channelf_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -74,7 +74,7 @@ public: set_fixed(false); } - channelf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + channelf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~channelf_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/coco/coco_dcmodem.cpp b/src/devices/bus/coco/coco_dcmodem.cpp index fc26e61fb1f..611821a23ad 100644 --- a/src/devices/bus/coco/coco_dcmodem.cpp +++ b/src/devices/bus/coco/coco_dcmodem.cpp @@ -37,7 +37,7 @@ namespace { public: // construction/destruction - coco_dc_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco_dc_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_DCMODEM, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_uart(*this, UART_TAG) @@ -92,7 +92,7 @@ namespace void coco_dc_modem_device::device_add_mconfig(machine_config &config) { - MOS6551(config, m_uart, 0); + MOS6551(config, m_uart); m_uart->set_xtal(1.8432_MHz_XTAL); m_uart->irq_handler().set(FUNC(coco_dc_modem_device::uart_irq_w)); m_uart->txd_handler().set(PORT_TAG, FUNC(rs232_port_device::write_txd)); diff --git a/src/devices/bus/coco/coco_dwsock.cpp b/src/devices/bus/coco/coco_dwsock.cpp index b72783eed8d..3a1b794fb04 100644 --- a/src/devices/bus/coco/coco_dwsock.cpp +++ b/src/devices/bus/coco/coco_dwsock.cpp @@ -62,7 +62,7 @@ INPUT_CHANGED_MEMBER(beckerport_device::drivewire_port_changed) // beckerport_device - constructor / destructor //------------------------------------------------- -beckerport_device::beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +beckerport_device::beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_DWSOCK, tag, owner, clock) , m_hostname(nullptr), m_dwconfigport(*this, DRIVEWIRE_PORT_TAG), m_dwtcpport(0) { diff --git a/src/devices/bus/coco/coco_dwsock.h b/src/devices/bus/coco/coco_dwsock.h index 6cbcc106488..d608d56fb9d 100644 --- a/src/devices/bus/coco/coco_dwsock.h +++ b/src/devices/bus/coco/coco_dwsock.h @@ -24,7 +24,7 @@ class beckerport_device : public device_t { public: - beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + beckerport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~beckerport_device(); // optional information overrides diff --git a/src/devices/bus/coco/coco_fdc.cpp b/src/devices/bus/coco/coco_fdc.cpp index 94d83954d59..d02ed33c06f 100644 --- a/src/devices/bus/coco/coco_fdc.cpp +++ b/src/devices/bus/coco/coco_fdc.cpp @@ -117,7 +117,7 @@ class coco_fdc_device_base : public coco_family_fdc_device_base { protected: // construction/destruction - coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); enum class rtc_type { @@ -202,7 +202,7 @@ void coco_fdc_device_base::device_add_mconfig(machine_config &config) MSM6242(config, m_disto_msm6242, 32.768_kHz_XTAL); - DS1315(config, CLOUD9_TAG, 0); + DS1315(config, CLOUD9_TAG); RAM(config, "cachebuffer").set_default_size("256").set_default_value(0); } @@ -264,7 +264,7 @@ memory_region *coco_family_fdc_device_base::get_cart_memregion() // coco_fdc_device_base - constructor //------------------------------------------------- -coco_fdc_device_base::coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +coco_fdc_device_base::coco_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : coco_family_fdc_device_base(mconfig, type, tag, owner, clock) , m_wd17xx(*this, WD_TAG) , m_ds1315(*this, CLOUD9_TAG) @@ -639,7 +639,7 @@ namespace { public: // construction/destruction - coco_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_fdc_device_base(mconfig, COCO_FDC, tag, owner, clock) { } @@ -676,7 +676,7 @@ namespace { public: // construction/destruction - coco_fdc_v11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco_fdc_v11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_fdc_device_base(mconfig, COCO_FDC_V11, tag, owner, clock) { } @@ -711,7 +711,7 @@ namespace { public: // construction/destruction - coco3_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco3_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_fdc_device_base(mconfig, COCO3_HDB1, tag, owner, clock) { } @@ -745,7 +745,7 @@ namespace { public: // construction/destruction - coco2_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco2_hdb1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_fdc_device_base(mconfig, COCO2_HDB1, tag, owner, clock) { } @@ -781,7 +781,7 @@ namespace { public: // construction/destruction - cp450_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + cp450_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_fdc_device_base(mconfig, CP450_FDC, tag, owner, clock) { } @@ -815,7 +815,7 @@ namespace { public: // construction/destruction - cd6809_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + cd6809_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_fdc_device_base(mconfig, CD6809_FDC, tag, owner, clock) { } diff --git a/src/devices/bus/coco/coco_fdc.h b/src/devices/bus/coco/coco_fdc.h index 786d30c2f68..0851238f5cd 100644 --- a/src/devices/bus/coco/coco_fdc.h +++ b/src/devices/bus/coco/coco_fdc.h @@ -33,7 +33,7 @@ public: protected: // construction/destruction - coco_family_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + coco_family_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cococart_interface(mconfig, *this) { diff --git a/src/devices/bus/coco/coco_gmc.cpp b/src/devices/bus/coco/coco_gmc.cpp index 122450ace26..b801224e527 100644 --- a/src/devices/bus/coco/coco_gmc.cpp +++ b/src/devices/bus/coco/coco_gmc.cpp @@ -38,7 +38,7 @@ namespace { public: // construction/destruction - coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; protected: @@ -68,7 +68,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(COCO_PAK_GMC, device_cococart_interface, coco_pak_gmc // coco_pak_device - constructor //------------------------------------------------- -coco_pak_gmc_device::coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_pak_gmc_device::coco_pak_gmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_pak_banked_device(mconfig, COCO_PAK_GMC, tag, owner, clock) , m_psg(*this, SN76489AN_TAG) { diff --git a/src/devices/bus/coco/coco_ide.cpp b/src/devices/bus/coco/coco_ide.cpp index 0d261e2be3b..3d3b99780b0 100644 --- a/src/devices/bus/coco/coco_ide.cpp +++ b/src/devices/bus/coco/coco_ide.cpp @@ -47,7 +47,7 @@ ioport_constructor coco_ide_device::device_input_ports() const // coco_ide_device - constructor //------------------------------------------------- -coco_ide_device::coco_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_ide_device::coco_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_IDE, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_ata(*this, "ata") diff --git a/src/devices/bus/coco/coco_ide.h b/src/devices/bus/coco/coco_ide.h index 465a4b0b8f6..fcbae3f3fe7 100644 --- a/src/devices/bus/coco/coco_ide.h +++ b/src/devices/bus/coco/coco_ide.h @@ -22,7 +22,7 @@ class coco_ide_device : { public: // construction/destruction - coco_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/coco/coco_max.cpp b/src/devices/bus/coco/coco_max.cpp index 611e4aad39f..948dfa37a8f 100644 --- a/src/devices/bus/coco/coco_max.cpp +++ b/src/devices/bus/coco/coco_max.cpp @@ -47,7 +47,7 @@ namespace { public: // construction/destruction - coco_pak_max_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_pak_max_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -80,7 +80,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(COCO_PAK_MAX, device_cococart_interface, coco_pak_max // coco_pak_device - constructor //------------------------------------------------- -coco_pak_max_device::coco_pak_max_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_pak_max_device::coco_pak_max_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_PAK_MAX, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_mouse_x(*this, COCOMAX_X_TAG) diff --git a/src/devices/bus/coco/coco_midi.cpp b/src/devices/bus/coco/coco_midi.cpp index 0e6e38b839b..b803edcae0b 100644 --- a/src/devices/bus/coco/coco_midi.cpp +++ b/src/devices/bus/coco/coco_midi.cpp @@ -26,10 +26,10 @@ class coco_midi_device : { public: // construction/destruction - coco_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - coco_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + coco_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; // optional information overrides @@ -45,14 +45,14 @@ class dragon_midi_device : public coco_midi_device { public: // construction/destruction - dragon_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dragon_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + dragon_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; }; -coco_midi_device::coco_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +coco_midi_device::coco_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_acia(*this, "mc6850") @@ -60,7 +60,7 @@ coco_midi_device::coco_midi_device(const machine_config &mconfig, device_type ty { } -coco_midi_device::coco_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_midi_device::coco_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_midi_device(mconfig, COCO_MIDI, tag, owner, clock) { } @@ -76,7 +76,7 @@ void coco_midi_device::device_add_mconfig(machine_config &config) MIDI_PORT(config, m_mdthru, midiout_slot, "midiout"); MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); } @@ -93,12 +93,12 @@ WRITE_LINE_MEMBER(coco_midi_device::acia_irq_w) set_line_value(line::CART, state == 0); } -dragon_midi_device::dragon_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +dragon_midi_device::dragon_midi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : coco_midi_device(mconfig, type, tag, owner, clock) { } -dragon_midi_device::dragon_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_midi_device::dragon_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dragon_midi_device(mconfig, DRAGON_MIDI, tag, owner, clock) { } diff --git a/src/devices/bus/coco/coco_multi.cpp b/src/devices/bus/coco/coco_multi.cpp index 2061c905b3f..860daf0c9da 100644 --- a/src/devices/bus/coco/coco_multi.cpp +++ b/src/devices/bus/coco/coco_multi.cpp @@ -96,12 +96,12 @@ namespace { public: // construction/destruction - coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); INPUT_CHANGED_MEMBER( switch_changed ); protected: - coco_multipak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + coco_multipak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -152,7 +152,7 @@ class dragon_multipak_device : public coco_multipak_device { public: // construction/destruction - dragon_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -264,19 +264,19 @@ ioport_constructor coco_multipak_device::device_input_ports() const // coco_multipak_device - constructor //------------------------------------------------- -coco_multipak_device::coco_multipak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +coco_multipak_device::coco_multipak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_slots(*this, "slot%u", 1), m_select(0), m_block(0) { } -coco_multipak_device::coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_multipak_device::coco_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_multipak_device(mconfig, COCO_MULTIPAK, tag, owner, clock) { } -dragon_multipak_device::dragon_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_multipak_device::dragon_multipak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_multipak_device(mconfig, DRAGON_MULTIPAK, tag, owner, clock) { } diff --git a/src/devices/bus/coco/coco_orch90.cpp b/src/devices/bus/coco/coco_orch90.cpp index 7d149f36a26..0f1f02b126f 100644 --- a/src/devices/bus/coco/coco_orch90.cpp +++ b/src/devices/bus/coco/coco_orch90.cpp @@ -57,7 +57,7 @@ namespace { public: // construction/destruction - coco_orch90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco_orch90_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_ORCH90, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_eprom(*this, "eprom") @@ -118,8 +118,8 @@ namespace { SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_8BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // ls374.ic5 + r7 (8x20k) + r9 (8x10k) - DAC_8BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // ls374.ic4 + r6 (8x20k) + r8 (8x10k) + DAC_8BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // ls374.ic5 + r7 (8x20k) + r9 (8x10k) + DAC_8BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // ls374.ic4 + r6 (8x20k) + r8 (8x10k) } //------------------------------------------------- diff --git a/src/devices/bus/coco/coco_pak.cpp b/src/devices/bus/coco/coco_pak.cpp index b01698633eb..72561d2a93c 100644 --- a/src/devices/bus/coco/coco_pak.cpp +++ b/src/devices/bus/coco/coco_pak.cpp @@ -55,14 +55,14 @@ DEFINE_DEVICE_TYPE(COCO_PAK, coco_pak_device, "cocopak", "CoCo Program PAK") //------------------------------------------------- // coco_pak_device - constructor //------------------------------------------------- -coco_pak_device::coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +coco_pak_device::coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_cart(nullptr), m_eprom(*this, CARTSLOT_TAG), m_autostart(*this, CART_AUTOSTART_TAG) { } -coco_pak_device::coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_pak_device::coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_pak_device(mconfig, COCO_PAK, tag, owner, clock) { } @@ -171,12 +171,12 @@ DEFINE_DEVICE_TYPE(COCO_PAK_BANKED, coco_pak_banked_device, "cocopak_banked", "C // coco_pak_device - constructor //------------------------------------------------- -coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : coco_pak_device(mconfig, type, tag, owner, clock) , m_pos(0) { } -coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_pak_banked_device::coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_pak_banked_device(mconfig, COCO_PAK_BANKED, tag, owner, clock) { } diff --git a/src/devices/bus/coco/coco_pak.h b/src/devices/bus/coco/coco_pak.h index 2add297bbc6..7787c57f39d 100644 --- a/src/devices/bus/coco/coco_pak.h +++ b/src/devices/bus/coco/coco_pak.h @@ -19,7 +19,7 @@ class coco_pak_device : { public: // construction/destruction - coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -30,7 +30,7 @@ public: virtual memory_region *get_cart_memregion() override; protected: - coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + coco_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -50,10 +50,10 @@ class coco_pak_banked_device : public coco_pak_device { public: // construction/destruction - coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + coco_pak_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/coco/coco_psg.cpp b/src/devices/bus/coco/coco_psg.cpp index 5f3d84c98da..ade232da48f 100644 --- a/src/devices/bus/coco/coco_psg.cpp +++ b/src/devices/bus/coco/coco_psg.cpp @@ -104,7 +104,7 @@ void coco_psg_device::device_add_mconfig(machine_config &config) // coco_psg_device - constructor //------------------------------------------------- -coco_psg_device::coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_psg_device::coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_PSG, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_psg(*this, "psg") diff --git a/src/devices/bus/coco/coco_psg.h b/src/devices/bus/coco/coco_psg.h index 34c344c26e7..83bd13a86c1 100644 --- a/src/devices/bus/coco/coco_psg.h +++ b/src/devices/bus/coco/coco_psg.h @@ -22,7 +22,7 @@ class coco_psg_device : { public: // construction/destruction - coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_psg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/coco/coco_ram.cpp b/src/devices/bus/coco/coco_ram.cpp index 885cc55a34d..5d227acd528 100644 --- a/src/devices/bus/coco/coco_ram.cpp +++ b/src/devices/bus/coco/coco_ram.cpp @@ -41,7 +41,7 @@ namespace { public: // construction/destruction - coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; protected: @@ -71,7 +71,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(COCO_PAK_RAM, device_cococart_interface, coco_pak_ram // coco_pak_device - constructor //------------------------------------------------- -coco_pak_ram_device::coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_pak_ram_device::coco_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_PAK_RAM, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_staticram(*this, STATICRAM_TAG) diff --git a/src/devices/bus/coco/coco_rs232.cpp b/src/devices/bus/coco/coco_rs232.cpp index 90f7c6f7be7..326f4547bd7 100644 --- a/src/devices/bus/coco/coco_rs232.cpp +++ b/src/devices/bus/coco/coco_rs232.cpp @@ -36,7 +36,7 @@ namespace { public: // construction/destruction - coco_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_RS232, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_eprom(*this, "eprom") @@ -90,7 +90,7 @@ IMPLEMENTATION void coco_rs232_device::device_add_mconfig(machine_config &config) { - MOS6551(config, m_uart, 0); + MOS6551(config, m_uart); m_uart->set_xtal(1.8432_MHz_XTAL); m_uart->irq_handler().set(FUNC(coco_rs232_device::uart_irq_w)); m_uart->txd_handler().set(PORT_TAG, FUNC(rs232_port_device::write_txd)); diff --git a/src/devices/bus/coco/coco_ssc.cpp b/src/devices/bus/coco/coco_ssc.cpp index 7c8d497a224..b2890fa4349 100644 --- a/src/devices/bus/coco/coco_ssc.cpp +++ b/src/devices/bus/coco/coco_ssc.cpp @@ -85,7 +85,7 @@ namespace { public: // construction/destruction - coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -126,7 +126,7 @@ namespace public device_sound_interface { public: - cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~cocossc_sac_device() { } bool sound_activity_circuit_output(); @@ -200,7 +200,7 @@ ROM_END // coco_ssc_device - constructor //------------------------------------------------- -coco_ssc_device::coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_ssc_device::coco_ssc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_SSC, tag, owner, clock), device_cococart_interface(mconfig, *this ), m_tms7040(*this, PIC_TAG), @@ -475,7 +475,7 @@ void coco_ssc_device::ssc_port_d_w(u8 data) // cocossc_sac_device - constructor //------------------------------------------------- -cocossc_sac_device::cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cocossc_sac_device::cocossc_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCOSSC_SAC, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/bus/coco/coco_stecomp.cpp b/src/devices/bus/coco/coco_stecomp.cpp index 412f4e3f865..ef277c55e9a 100644 --- a/src/devices/bus/coco/coco_stecomp.cpp +++ b/src/devices/bus/coco/coco_stecomp.cpp @@ -35,7 +35,7 @@ namespace { public: // construction/destruction - coco_stereo_composer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco_stereo_composer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_STEREO_COMPOSER, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_pia(*this, "sc_pia") @@ -70,10 +70,10 @@ namespace { SPEAKER(config, "sc_lspeaker").front_left(); SPEAKER(config, "sc_rspeaker").front_right(); - DAC_8BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "sc_lspeaker", 0.5); - DAC_8BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "sc_rspeaker", 0.5); + DAC_8BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "sc_lspeaker", 0.5); + DAC_8BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "sc_rspeaker", 0.5); - pia6821_device &pia(PIA6821(config, "sc_pia", 0)); + pia6821_device &pia(PIA6821(config, "sc_pia")); pia.writepa_handler().set("sc_ldac", FUNC(dac_byte_interface::data_w)); pia.writepb_handler().set("sc_rdac", FUNC(dac_byte_interface::data_w)); } diff --git a/src/devices/bus/coco/coco_sym12.cpp b/src/devices/bus/coco/coco_sym12.cpp index 1edbb27fccc..75ebe8ba3da 100644 --- a/src/devices/bus/coco/coco_sym12.cpp +++ b/src/devices/bus/coco/coco_sym12.cpp @@ -36,7 +36,7 @@ namespace { public: // construction/destruction - coco_symphony_twelve_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + coco_symphony_twelve_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_SYM12, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_pia(*this, "s12_pia") @@ -72,7 +72,7 @@ namespace void coco_symphony_twelve_device::device_add_mconfig(machine_config &config) { - pia6821_device &pia(PIA6821(config, "s12_pia", 0)); + pia6821_device &pia(PIA6821(config, "s12_pia")); pia.writepa_handler().set(*this, FUNC(coco_symphony_twelve_device::write_porta)); pia.readpa_handler().set(*this, FUNC(coco_symphony_twelve_device::read_porta)); pia.writepb_handler().set(*this, FUNC(coco_symphony_twelve_device::write_portb)); diff --git a/src/devices/bus/coco/coco_t4426.cpp b/src/devices/bus/coco/coco_t4426.cpp index bf236f5b7b8..219f31cedf2 100644 --- a/src/devices/bus/coco/coco_t4426.cpp +++ b/src/devices/bus/coco/coco_t4426.cpp @@ -95,7 +95,7 @@ namespace { public: // construction/destruction - coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -117,7 +117,7 @@ namespace DECLARE_WRITE_LINE_MEMBER (write_f13_clock){ write_acia_clocks(mc14411_device::TIMER_F13, state); } DECLARE_WRITE_LINE_MEMBER (write_f15_clock){ write_acia_clocks(mc14411_device::TIMER_F15, state); } protected: - coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -151,10 +151,10 @@ namespace void coco_t4426_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(coco_t4426_device::pia_A_w)); - ACIA6850(config, m_uart, 0); + ACIA6850(config, m_uart); m_uart->txd_handler().set(SERIAL_TAG, FUNC(rs232_port_device::write_txd)); m_uart->rts_handler().set(SERIAL_TAG, FUNC(rs232_port_device::write_rts)); @@ -236,7 +236,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(COCO_T4426, device_cococart_interface, coco_t4426_dev // coco_t4426_device - constructor //------------------------------------------------- -coco_t4426_device::coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +coco_t4426_device::coco_t4426_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_cart(nullptr) @@ -251,7 +251,7 @@ coco_t4426_device::coco_t4426_device(const machine_config &mconfig, device_type { } -coco_t4426_device::coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_t4426_device::coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_t4426_device(mconfig, COCO_T4426, tag, owner, clock) { } diff --git a/src/devices/bus/coco/coco_wpk.cpp b/src/devices/bus/coco/coco_wpk.cpp index e2750428227..69d36d8be8c 100644 --- a/src/devices/bus/coco/coco_wpk.cpp +++ b/src/devices/bus/coco/coco_wpk.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(COCO_WPKRS, coco_wpkrs_device, "coco_wpkrs", "CoCo WordPak RS // coco_wpk_device - constructor //------------------------------------------------- -coco_wpk_device::coco_wpk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +coco_wpk_device::coco_wpk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_crtc(*this, "crtc") @@ -54,17 +54,17 @@ coco_wpk_device::coco_wpk_device(const machine_config &mconfig, device_type type { } -coco_wpk_device::coco_wpk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_wpk_device::coco_wpk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_wpk_device(mconfig, COCO_WPK, tag, owner, clock) { } -coco_wpk2_device::coco_wpk2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_wpk2_device::coco_wpk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_wpk_device(mconfig, COCO_WPK2, tag, owner, clock) { } -coco_wpkrs_device::coco_wpkrs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_wpkrs_device::coco_wpkrs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : coco_wpk_device(mconfig, COCO_WPKRS, tag, owner, clock) { } diff --git a/src/devices/bus/coco/coco_wpk.h b/src/devices/bus/coco/coco_wpk.h index 33db6c4be73..8c9fdfc121d 100644 --- a/src/devices/bus/coco/coco_wpk.h +++ b/src/devices/bus/coco/coco_wpk.h @@ -24,11 +24,11 @@ public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - coco_wpk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_wpk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - coco_wpk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + coco_wpk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -58,7 +58,7 @@ class coco_wpk2_device : public coco_wpk_device { public: // construction/destruction - coco_wpk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + coco_wpk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -76,7 +76,7 @@ class coco_wpkrs_device : public coco_wpk_device { public: // construction/destruction - coco_wpkrs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + coco_wpkrs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/coco/coco_wpk2p.cpp b/src/devices/bus/coco/coco_wpk2p.cpp index 62fb2504bf7..25009d8b9a9 100644 --- a/src/devices/bus/coco/coco_wpk2p.cpp +++ b/src/devices/bus/coco/coco_wpk2p.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(COCO_WPK2P, coco_wpk2p_device, "coco_wpk2p", "CoCo WordPak 2+ // coco_wpk2p_device - constructor //------------------------------------------------- -coco_wpk2p_device::coco_wpk2p_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +coco_wpk2p_device::coco_wpk2p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_WPK2P, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_v9958(*this, "v9958") diff --git a/src/devices/bus/coco/coco_wpk2p.h b/src/devices/bus/coco/coco_wpk2p.h index f6c3debc766..87da0b44e32 100644 --- a/src/devices/bus/coco/coco_wpk2p.h +++ b/src/devices/bus/coco/coco_wpk2p.h @@ -21,7 +21,7 @@ class coco_wpk2p_device : { public: // construction/destruction - coco_wpk2p_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + coco_wpk2p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/coco/cococart.cpp b/src/devices/bus/coco/cococart.cpp index ec387378fb8..737f6203e53 100644 --- a/src/devices/bus/coco/cococart.cpp +++ b/src/devices/bus/coco/cococart.cpp @@ -123,7 +123,7 @@ ALLOW_SAVE_TYPE(cococart_slot_device::line_value); //------------------------------------------------- // cococart_slot_device - constructor //------------------------------------------------- -cococart_slot_device::cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +cococart_slot_device::cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCOCART_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h index b686ac0748d..33ee3f2d9df 100644 --- a/src/devices/bus/coco/cococart.h +++ b/src/devices/bus/coco/cococart.h @@ -53,7 +53,7 @@ public: // construction/destruction template - cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt) + cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : cococart_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -61,7 +61,7 @@ public: set_default_option(dflt); set_fixed(false); } - cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cococart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto cart_callback() { return m_cart_callback.bind(); } auto nmi_callback() { return m_nmi_callback.bind(); } diff --git a/src/devices/bus/coco/dragon_amtor.cpp b/src/devices/bus/coco/dragon_amtor.cpp index 7ce51671153..5eff8fd2842 100644 --- a/src/devices/bus/coco/dragon_amtor.cpp +++ b/src/devices/bus/coco/dragon_amtor.cpp @@ -53,7 +53,7 @@ INPUT_PORTS_END // dragon_amtor_device - constructor //------------------------------------------------- -dragon_amtor_device::dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_amtor_device::dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DRAGON_AMTOR, tag, owner, clock) , device_cococart_interface(mconfig, *this) , m_eprom(*this, "eprom") diff --git a/src/devices/bus/coco/dragon_amtor.h b/src/devices/bus/coco/dragon_amtor.h index 3d6e73fc40a..931d2388921 100644 --- a/src/devices/bus/coco/dragon_amtor.h +++ b/src/devices/bus/coco/dragon_amtor.h @@ -19,7 +19,7 @@ class dragon_amtor_device : { public: // construction/destruction - dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_amtor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/coco/dragon_claw.cpp b/src/devices/bus/coco/dragon_claw.cpp index a4c00b0f71a..affcfeaa40b 100644 --- a/src/devices/bus/coco/dragon_claw.cpp +++ b/src/devices/bus/coco/dragon_claw.cpp @@ -59,7 +59,7 @@ ioport_constructor dragon_claw_device::device_input_ports() const // dragon_claw_device - constructor //------------------------------------------------- -dragon_claw_device::dragon_claw_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_claw_device::dragon_claw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DRAGON_CLAW, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_via(*this, "via") diff --git a/src/devices/bus/coco/dragon_claw.h b/src/devices/bus/coco/dragon_claw.h index 9743b5b0b3c..f31dcc6e12f 100644 --- a/src/devices/bus/coco/dragon_claw.h +++ b/src/devices/bus/coco/dragon_claw.h @@ -22,7 +22,7 @@ class dragon_claw_device : { public: // construction/destruction - dragon_claw_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock); + dragon_claw_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/coco/dragon_fdc.cpp b/src/devices/bus/coco/dragon_fdc.cpp index 5a70433e559..611a48ab091 100644 --- a/src/devices/bus/coco/dragon_fdc.cpp +++ b/src/devices/bus/coco/dragon_fdc.cpp @@ -96,7 +96,7 @@ namespace { protected: // construction/destruction - dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual u8 cts_read(offs_t offset) override; @@ -118,7 +118,7 @@ namespace { protected: // construction/destruction - premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual u8 cts_read(offs_t offset) override; @@ -178,7 +178,7 @@ void premier_fdc_device_base::device_add_mconfig(machine_config &config) //------------------------------------------------- // dragon_fdc_device_base - constructor //------------------------------------------------- -dragon_fdc_device_base::dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +dragon_fdc_device_base::dragon_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : coco_family_fdc_device_base(mconfig, type, tag, owner, clock) , m_wd2797(*this, "wd2797") , m_floppies(*this, "wd2797:%u", 0) @@ -186,7 +186,7 @@ dragon_fdc_device_base::dragon_fdc_device_base(const machine_config &mconfig, de } -premier_fdc_device_base::premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +premier_fdc_device_base::premier_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : coco_family_fdc_device_base(mconfig, type, tag, owner, clock) , m_wd2791(*this, "wd2791") , m_floppies(*this, "wd2791:%u", 0) @@ -395,7 +395,7 @@ namespace { public: // construction/destruction - dragon_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + dragon_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dragon_fdc_device_base(mconfig, DRAGON_FDC, tag, owner, clock) { } @@ -427,7 +427,7 @@ namespace { public: // construction/destruction - premier_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + premier_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : premier_fdc_device_base(mconfig, PREMIER_FDC, tag, owner, clock) { } @@ -459,7 +459,7 @@ namespace { public: // construction/destruction - sdtandy_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + sdtandy_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dragon_fdc_device_base(mconfig, SDTANDY_FDC, tag, owner, clock) { } diff --git a/src/devices/bus/coco/dragon_jcbsnd.cpp b/src/devices/bus/coco/dragon_jcbsnd.cpp index fc5b8390f89..cf91ddc46cd 100644 --- a/src/devices/bus/coco/dragon_jcbsnd.cpp +++ b/src/devices/bus/coco/dragon_jcbsnd.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(DRAGON_JCBSND, dragon_jcbsnd_device, "dragon_jcbsnd", "Dragon // dragon_jcbsnd_device - constructor //------------------------------------------------- -dragon_jcbsnd_device::dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_jcbsnd_device::dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DRAGON_JCBSND, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_eprom(*this, "eprom") diff --git a/src/devices/bus/coco/dragon_jcbsnd.h b/src/devices/bus/coco/dragon_jcbsnd.h index 6ded5d6c601..9e13ff7b483 100644 --- a/src/devices/bus/coco/dragon_jcbsnd.h +++ b/src/devices/bus/coco/dragon_jcbsnd.h @@ -20,7 +20,7 @@ class dragon_jcbsnd_device : { public: // construction/destruction - dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_jcbsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/coco/dragon_jcbspch.cpp b/src/devices/bus/coco/dragon_jcbspch.cpp index a82d122d275..94445a29e90 100644 --- a/src/devices/bus/coco/dragon_jcbspch.cpp +++ b/src/devices/bus/coco/dragon_jcbspch.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(DRAGON_JCBSPCH, dragon_jcbspch_device, "dragon_jcbspch", "Dra // dragon_jcbspch_device - constructor //------------------------------------------------- -dragon_jcbspch_device::dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_jcbspch_device::dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DRAGON_JCBSPCH, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_eprom(*this, "eprom") @@ -83,7 +83,7 @@ memory_region *dragon_jcbspch_device::get_cart_memregion() void dragon_jcbspch_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepb_handler().set(m_nsp, FUNC(sp0256_device::ald_w)).mask(0x3f); m_pia->cb2_handler().set(FUNC(dragon_jcbspch_device::pia_cb2_w)); m_pia->irqb_handler().set(FUNC(dragon_jcbspch_device::nmi_w)); diff --git a/src/devices/bus/coco/dragon_jcbspch.h b/src/devices/bus/coco/dragon_jcbspch.h index e8761dec2d8..51187678623 100644 --- a/src/devices/bus/coco/dragon_jcbspch.h +++ b/src/devices/bus/coco/dragon_jcbspch.h @@ -21,7 +21,7 @@ class dragon_jcbspch_device : { public: // construction/destruction - dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_jcbspch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/coco/dragon_msx2.cpp b/src/devices/bus/coco/dragon_msx2.cpp index a8da5565991..2b8f2195f88 100644 --- a/src/devices/bus/coco/dragon_msx2.cpp +++ b/src/devices/bus/coco/dragon_msx2.cpp @@ -63,7 +63,7 @@ ioport_constructor dragon_msx2_device::device_input_ports() const // dragon_msx2_device - constructor //------------------------------------------------- -dragon_msx2_device::dragon_msx2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_msx2_device::dragon_msx2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DRAGON_MSX2, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_ym2413(*this, "ym2413") diff --git a/src/devices/bus/coco/dragon_msx2.h b/src/devices/bus/coco/dragon_msx2.h index 3eb1fcaa64b..cee2edd73cd 100644 --- a/src/devices/bus/coco/dragon_msx2.h +++ b/src/devices/bus/coco/dragon_msx2.h @@ -23,7 +23,7 @@ class dragon_msx2_device : { public: // construction/destruction - dragon_msx2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_msx2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/coco/dragon_serial.cpp b/src/devices/bus/coco/dragon_serial.cpp index 8967bed816c..d018abeec09 100644 --- a/src/devices/bus/coco/dragon_serial.cpp +++ b/src/devices/bus/coco/dragon_serial.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(DRAGON_SERIAL, dragon_serial_device, "dragon_serial", "Dragon // dragon_serial_device - constructor //------------------------------------------------- -dragon_serial_device::dragon_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_serial_device::dragon_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DRAGON_SERIAL, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_eprom(*this, "eprom") @@ -84,7 +84,7 @@ memory_region *dragon_serial_device::get_cart_memregion() void dragon_serial_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); m_acia->irq_handler().set([this](int state) { set_line_value(line::NMI, state); }); diff --git a/src/devices/bus/coco/dragon_serial.h b/src/devices/bus/coco/dragon_serial.h index 7f33a61de67..3d162c75e78 100644 --- a/src/devices/bus/coco/dragon_serial.h +++ b/src/devices/bus/coco/dragon_serial.h @@ -20,7 +20,7 @@ class dragon_serial_device : { public: // construction/destruction - dragon_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::COMMS; } diff --git a/src/devices/bus/coco/dragon_sprites.cpp b/src/devices/bus/coco/dragon_sprites.cpp index a33d9648715..55bfb59ed68 100644 --- a/src/devices/bus/coco/dragon_sprites.cpp +++ b/src/devices/bus/coco/dragon_sprites.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(DRAGON_SPRITES, dragon_sprites_device, "dragon_sprites", "Dra // dragon_sprites_device - constructor //------------------------------------------------- -dragon_sprites_device::dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dragon_sprites_device::dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DRAGON_SPRITES, tag, owner, clock) , device_cococart_interface(mconfig, *this ) , m_eprom(*this, "eprom") diff --git a/src/devices/bus/coco/dragon_sprites.h b/src/devices/bus/coco/dragon_sprites.h index 1236912396e..e5b221c1ebf 100644 --- a/src/devices/bus/coco/dragon_sprites.h +++ b/src/devices/bus/coco/dragon_sprites.h @@ -21,7 +21,7 @@ class dragon_sprites_device : { public: // construction/destruction - dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dragon_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/coleco/cartridge/exp.cpp b/src/devices/bus/coleco/cartridge/exp.cpp index 6a73d73efb6..534d7afa753 100644 --- a/src/devices/bus/coleco/cartridge/exp.cpp +++ b/src/devices/bus/coleco/cartridge/exp.cpp @@ -53,7 +53,7 @@ void device_colecovision_cartridge_interface::rom_alloc(size_t size) // colecovision_cartridge_slot_device - constructor //------------------------------------------------- -colecovision_cartridge_slot_device::colecovision_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +colecovision_cartridge_slot_device::colecovision_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COLECOVISION_CARTRIDGE_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/coleco/cartridge/exp.h b/src/devices/bus/coleco/cartridge/exp.h index 5e7eaa252d2..8b663c76e97 100644 --- a/src/devices/bus/coleco/cartridge/exp.h +++ b/src/devices/bus/coleco/cartridge/exp.h @@ -55,14 +55,14 @@ public: // construction/destruction template colecovision_cartridge_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : colecovision_cartridge_slot_device(mconfig, tag, owner, (uint32_t)0) + : colecovision_cartridge_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - colecovision_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + colecovision_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // computer interface uint8_t bd_r(offs_t offset, uint8_t data, int _8000, int _a000, int _c000, int _e000); diff --git a/src/devices/bus/coleco/cartridge/megacart.cpp b/src/devices/bus/coleco/cartridge/megacart.cpp index 68b84af653b..48cc7045fad 100644 --- a/src/devices/bus/coleco/cartridge/megacart.cpp +++ b/src/devices/bus/coleco/cartridge/megacart.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(COLECOVISION_MEGACART, colecovision_megacart_cartridge_device // colecovision_megacart_cartridge_device - constructor //------------------------------------------------- -colecovision_megacart_cartridge_device::colecovision_megacart_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +colecovision_megacart_cartridge_device::colecovision_megacart_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COLECOVISION_MEGACART, tag, owner, clock), device_colecovision_cartridge_interface(mconfig, *this), m_bankcount(0), diff --git a/src/devices/bus/coleco/cartridge/megacart.h b/src/devices/bus/coleco/cartridge/megacart.h index 6a0b73f5124..747033c8e61 100644 --- a/src/devices/bus/coleco/cartridge/megacart.h +++ b/src/devices/bus/coleco/cartridge/megacart.h @@ -26,7 +26,7 @@ class colecovision_megacart_cartridge_device : public device_t, { public: // construction/destruction - colecovision_megacart_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + colecovision_megacart_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/coleco/cartridge/std.cpp b/src/devices/bus/coleco/cartridge/std.cpp index 24bb815834e..b6f155ed28b 100644 --- a/src/devices/bus/coleco/cartridge/std.cpp +++ b/src/devices/bus/coleco/cartridge/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(COLECOVISION_STANDARD, colecovision_standard_cartridge_device // colecovision_standard_cartridge_device - constructor //------------------------------------------------- -colecovision_standard_cartridge_device::colecovision_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +colecovision_standard_cartridge_device::colecovision_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COLECOVISION_STANDARD, tag, owner, clock), device_colecovision_cartridge_interface(mconfig, *this) { diff --git a/src/devices/bus/coleco/cartridge/std.h b/src/devices/bus/coleco/cartridge/std.h index 6e0c5206ada..c4b3a44553d 100644 --- a/src/devices/bus/coleco/cartridge/std.h +++ b/src/devices/bus/coleco/cartridge/std.h @@ -26,7 +26,7 @@ class colecovision_standard_cartridge_device : public device_t, { public: // construction/destruction - colecovision_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + colecovision_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/coleco/cartridge/xin1.cpp b/src/devices/bus/coleco/cartridge/xin1.cpp index 954c4a6e483..1548f0699b6 100644 --- a/src/devices/bus/coleco/cartridge/xin1.cpp +++ b/src/devices/bus/coleco/cartridge/xin1.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(COLECOVISION_XIN1, colecovision_xin1_cartridge_device, "colec // colecovision_xin1_cartridge_device - constructor //------------------------------------------------- -colecovision_xin1_cartridge_device::colecovision_xin1_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +colecovision_xin1_cartridge_device::colecovision_xin1_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COLECOVISION_XIN1, tag, owner, clock), device_colecovision_cartridge_interface(mconfig, *this), m_current_offset(0) diff --git a/src/devices/bus/coleco/cartridge/xin1.h b/src/devices/bus/coleco/cartridge/xin1.h index 0e8a7813c9f..624984e270a 100644 --- a/src/devices/bus/coleco/cartridge/xin1.h +++ b/src/devices/bus/coleco/cartridge/xin1.h @@ -26,7 +26,7 @@ class colecovision_xin1_cartridge_device : public device_t, { public: // construction/destruction - colecovision_xin1_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + colecovision_xin1_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/coleco/controller/ctrl.cpp b/src/devices/bus/coleco/controller/ctrl.cpp index 80b5968eb03..2ea1081a57e 100644 --- a/src/devices/bus/coleco/controller/ctrl.cpp +++ b/src/devices/bus/coleco/controller/ctrl.cpp @@ -45,7 +45,7 @@ device_colecovision_control_port_interface::device_colecovision_control_port_int // colecovision_control_port_device - constructor //------------------------------------------------- -colecovision_control_port_device::colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +colecovision_control_port_device::colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COLECOVISION_CONTROL_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr), diff --git a/src/devices/bus/coleco/controller/ctrl.h b/src/devices/bus/coleco/controller/ctrl.h index 3d87a19b355..2fbcc097f1f 100644 --- a/src/devices/bus/coleco/controller/ctrl.h +++ b/src/devices/bus/coleco/controller/ctrl.h @@ -50,14 +50,14 @@ public: // construction/destruction template colecovision_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : colecovision_control_port_device(mconfig, tag, owner, (uint32_t)0) + : colecovision_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + colecovision_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // static configuration helpers auto irq() { return m_write_irq.bind(); } diff --git a/src/devices/bus/coleco/controller/hand.cpp b/src/devices/bus/coleco/controller/hand.cpp index d5e4d72b6bc..6364e80f2f0 100644 --- a/src/devices/bus/coleco/controller/hand.cpp +++ b/src/devices/bus/coleco/controller/hand.cpp @@ -90,7 +90,7 @@ ioport_constructor coleco_hand_controller_device::device_input_ports() const // coleco_hand_controller_device - constructor //------------------------------------------------- -coleco_hand_controller_device::coleco_hand_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +coleco_hand_controller_device::coleco_hand_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COLECO_HAND_CONTROLLER, tag, owner, clock), device_colecovision_control_port_interface(mconfig, *this), m_io_common0(*this, "COMMON0"), diff --git a/src/devices/bus/coleco/controller/hand.h b/src/devices/bus/coleco/controller/hand.h index f65ad709106..9da3eb76f55 100644 --- a/src/devices/bus/coleco/controller/hand.h +++ b/src/devices/bus/coleco/controller/hand.h @@ -26,7 +26,7 @@ class coleco_hand_controller_device : public device_t, { public: // construction/destruction - coleco_hand_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + coleco_hand_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/coleco/controller/sac.cpp b/src/devices/bus/coleco/controller/sac.cpp index 7621897c78d..525ce109a22 100644 --- a/src/devices/bus/coleco/controller/sac.cpp +++ b/src/devices/bus/coleco/controller/sac.cpp @@ -102,7 +102,7 @@ ioport_constructor coleco_super_action_controller_device::device_input_ports() c // coleco_super_action_controller_device - constructor //------------------------------------------------- -coleco_super_action_controller_device::coleco_super_action_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +coleco_super_action_controller_device::coleco_super_action_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COLECO_SUPER_ACTION_CONTROLLER, tag, owner, clock), device_colecovision_control_port_interface(mconfig, *this), m_io_common0(*this, "COMMON0"), diff --git a/src/devices/bus/coleco/controller/sac.h b/src/devices/bus/coleco/controller/sac.h index 20078e33ef7..fc231ede99a 100644 --- a/src/devices/bus/coleco/controller/sac.h +++ b/src/devices/bus/coleco/controller/sac.h @@ -26,7 +26,7 @@ class coleco_super_action_controller_device : public device_t, { public: // construction/destruction - coleco_super_action_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + coleco_super_action_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/compis/graphics.cpp b/src/devices/bus/compis/graphics.cpp index ad9291dee65..7662d7ec2b4 100644 --- a/src/devices/bus/compis/graphics.cpp +++ b/src/devices/bus/compis/graphics.cpp @@ -38,7 +38,7 @@ device_compis_graphics_card_interface::device_compis_graphics_card_interface(con // compis_graphics_slot_device - constructor //------------------------------------------------- -compis_graphics_slot_device::compis_graphics_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +compis_graphics_slot_device::compis_graphics_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMPIS_GRAPHICS_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_dma_request(*this), diff --git a/src/devices/bus/compis/graphics.h b/src/devices/bus/compis/graphics.h index 3f0c8e41cb9..964ea83ae64 100644 --- a/src/devices/bus/compis/graphics.h +++ b/src/devices/bus/compis/graphics.h @@ -50,7 +50,7 @@ class compis_graphics_slot_device : public device_t, public device_single_card_s public: // construction/destruction template - compis_graphics_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + compis_graphics_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : compis_graphics_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -58,7 +58,7 @@ public: set_default_option(dflt); set_fixed(false); } - compis_graphics_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + compis_graphics_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto drq() { return m_write_dma_request.bind(); } diff --git a/src/devices/bus/compis/hrg.cpp b/src/devices/bus/compis/hrg.cpp index 9fcd130bec0..492253550fe 100644 --- a/src/devices/bus/compis/hrg.cpp +++ b/src/devices/bus/compis/hrg.cpp @@ -87,7 +87,7 @@ void compis_hrg_device::device_add_mconfig(machine_config &config) screen.set_visarea(0, 640-1, 0, 400-1); screen.set_screen_update(UPD7220_TAG, FUNC(upd7220_device::screen_update)); - UPD7220(config, m_crtc, 2252500); // unknown clock + UPD7220(config, m_crtc, XTAL::u(2252500)); // unknown clock m_crtc->set_addrmap(0, &compis_hrg_device::hrg_map); m_crtc->set_display_pixels(FUNC(compis_hrg_device::display_pixels)); m_crtc->set_screen(SCREEN_TAG); @@ -123,7 +123,7 @@ void compis_uhrg_device::device_add_mconfig(machine_config &config) // compis_hrg_device - constructor //------------------------------------------------- -compis_hrg_device::compis_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +compis_hrg_device::compis_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_compis_graphics_card_interface(mconfig, *this), m_crtc(*this, UPD7220_TAG), @@ -132,12 +132,12 @@ compis_hrg_device::compis_hrg_device(const machine_config &mconfig, device_type { } -compis_hrg_device::compis_hrg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +compis_hrg_device::compis_hrg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : compis_hrg_device(mconfig, COMPIS_HRG, tag, owner, clock) { } -compis_uhrg_device::compis_uhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +compis_uhrg_device::compis_uhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : compis_hrg_device(mconfig, COMPIS_UHRG, tag, owner, clock) { } diff --git a/src/devices/bus/compis/hrg.h b/src/devices/bus/compis/hrg.h index 98ef784df14..e9129983011 100644 --- a/src/devices/bus/compis/hrg.h +++ b/src/devices/bus/compis/hrg.h @@ -28,10 +28,10 @@ class compis_hrg_device : public device_t, { public: // construction/destruction - compis_hrg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + compis_hrg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - compis_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + compis_hrg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -63,7 +63,7 @@ class compis_uhrg_device : public compis_hrg_device { public: // construction/destruction - compis_uhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + compis_uhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/compucolor/floppy.cpp b/src/devices/bus/compucolor/floppy.cpp index 9c8a33870c1..28928d9da4c 100644 --- a/src/devices/bus/compucolor/floppy.cpp +++ b/src/devices/bus/compucolor/floppy.cpp @@ -79,7 +79,7 @@ device_compucolor_floppy_port_interface::device_compucolor_floppy_port_interface // compucolor_floppy_port_device - constructor //------------------------------------------------- -compucolor_floppy_port_device::compucolor_floppy_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +compucolor_floppy_port_device::compucolor_floppy_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rs232_port_device(mconfig, COMPUCOLOR_FLOPPY_PORT, tag, owner, clock), m_dev(nullptr) { } @@ -89,7 +89,7 @@ compucolor_floppy_port_device::compucolor_floppy_port_device(const machine_confi // compucolor_floppy_device - constructor //------------------------------------------------- -compucolor_floppy_device::compucolor_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +compucolor_floppy_device::compucolor_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMPUCOLOR_FLOPPY, tag, owner, clock) , device_compucolor_floppy_port_interface(mconfig, *this) , m_floppy(*this, "floppy") diff --git a/src/devices/bus/compucolor/floppy.h b/src/devices/bus/compucolor/floppy.h index 66247ac9601..53ecfae9582 100644 --- a/src/devices/bus/compucolor/floppy.h +++ b/src/devices/bus/compucolor/floppy.h @@ -41,14 +41,14 @@ class compucolor_floppy_port_device : public rs232_port_device public: template compucolor_floppy_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : rs232_port_device(mconfig, tag, owner, 0) + : rs232_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - compucolor_floppy_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + compucolor_floppy_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( rw_w ) { if (m_dev) m_dev->rw_w(state); } void stepper_w(uint8_t data) { if (m_dev) m_dev->stepper_w(data); } @@ -70,7 +70,7 @@ class compucolor_floppy_device : public device_t, public device_compucolor_flopp { public: // construction/destruction - compucolor_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + compucolor_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/comx35/clm.cpp b/src/devices/bus/comx35/clm.cpp index d32b4a694f8..70920c4d70b 100644 --- a/src/devices/bus/comx35/clm.cpp +++ b/src/devices/bus/comx35/clm.cpp @@ -165,7 +165,7 @@ void comx_clm_device::device_add_mconfig(machine_config &config) // comx_clm_device - constructor //------------------------------------------------- -comx_clm_device::comx_clm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_clm_device::comx_clm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_CLM, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), device_gfx_interface(mconfig, *this, nullptr, "palette"), diff --git a/src/devices/bus/comx35/clm.h b/src/devices/bus/comx35/clm.h index de86ff28b7f..61052edf06e 100644 --- a/src/devices/bus/comx35/clm.h +++ b/src/devices/bus/comx35/clm.h @@ -29,7 +29,7 @@ class comx_clm_device : public device_t, { public: // construction/destruction - comx_clm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_clm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/comx35/eprom.cpp b/src/devices/bus/comx35/eprom.cpp index 0267d7c5b62..7eb4ca1481f 100644 --- a/src/devices/bus/comx35/eprom.cpp +++ b/src/devices/bus/comx35/eprom.cpp @@ -57,7 +57,7 @@ const tiny_rom_entry *comx_epr_device::device_rom_region() const // comx_epr_device - constructor //------------------------------------------------- -comx_epr_device::comx_epr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_epr_device::comx_epr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_EPR, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), m_rom(*this, "f800"), diff --git a/src/devices/bus/comx35/eprom.h b/src/devices/bus/comx35/eprom.h index 90f57e52d3d..de8fb88f812 100644 --- a/src/devices/bus/comx35/eprom.h +++ b/src/devices/bus/comx35/eprom.h @@ -26,7 +26,7 @@ class comx_epr_device : public device_t, { public: // construction/destruction - comx_epr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_epr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/comx35/exp.cpp b/src/devices/bus/comx35/exp.cpp index 9c5095e5fd1..f69dbad5db4 100644 --- a/src/devices/bus/comx35/exp.cpp +++ b/src/devices/bus/comx35/exp.cpp @@ -43,7 +43,7 @@ device_comx_expansion_card_interface::device_comx_expansion_card_interface(const // comx_expansion_slot_device - constructor //------------------------------------------------- -comx_expansion_slot_device::comx_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_expansion_slot_device::comx_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_irq(*this), m_card(nullptr) diff --git a/src/devices/bus/comx35/exp.h b/src/devices/bus/comx35/exp.h index 8f99edae4fd..ea13f30a2ac 100644 --- a/src/devices/bus/comx35/exp.h +++ b/src/devices/bus/comx35/exp.h @@ -47,8 +47,8 @@ class comx_expansion_slot_device : public device_t, public device_single_card_sl public: // construction/destruction template - comx_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) - : comx_expansion_slot_device(mconfig, tag, owner, clock) + comx_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) + : comx_expansion_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -56,7 +56,7 @@ public: set_fixed(false); } - comx_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_callback() { return m_write_irq.bind(); } diff --git a/src/devices/bus/comx35/expbox.cpp b/src/devices/bus/comx35/expbox.cpp index 65c945274f1..b511cbe4dbb 100644 --- a/src/devices/bus/comx35/expbox.cpp +++ b/src/devices/bus/comx35/expbox.cpp @@ -116,7 +116,7 @@ void comx_eb_device::device_add_mconfig(machine_config &config) // comx_eb_device - constructor //------------------------------------------------- -comx_eb_device::comx_eb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_eb_device::comx_eb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_EB, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), m_rom(*this, "e000"), diff --git a/src/devices/bus/comx35/expbox.h b/src/devices/bus/comx35/expbox.h index c4c89b4f2bc..c49b26992ee 100644 --- a/src/devices/bus/comx35/expbox.h +++ b/src/devices/bus/comx35/expbox.h @@ -34,7 +34,7 @@ class comx_eb_device : public device_t, { public: // construction/destruction - comx_eb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_eb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/comx35/fdc.cpp b/src/devices/bus/comx35/fdc.cpp index 077de3e2c4d..a4e86aa12b4 100644 --- a/src/devices/bus/comx35/fdc.cpp +++ b/src/devices/bus/comx35/fdc.cpp @@ -116,7 +116,7 @@ void comx_fd_device::device_add_mconfig(machine_config &config) // comx_fd_device - constructor //------------------------------------------------- -comx_fd_device::comx_fd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_fd_device::comx_fd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_FD, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), m_fdc(*this, WD1770_TAG), diff --git a/src/devices/bus/comx35/fdc.h b/src/devices/bus/comx35/fdc.h index 6f2b5ea60bd..a424376d093 100644 --- a/src/devices/bus/comx35/fdc.h +++ b/src/devices/bus/comx35/fdc.h @@ -29,7 +29,7 @@ class comx_fd_device : public device_t, { public: // construction/destruction - comx_fd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_fd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/comx35/joycard.cpp b/src/devices/bus/comx35/joycard.cpp index e76f20a5be8..40844d9b4dd 100644 --- a/src/devices/bus/comx35/joycard.cpp +++ b/src/devices/bus/comx35/joycard.cpp @@ -67,7 +67,7 @@ ioport_constructor comx_joy_device::device_input_ports() const // comx_joy_device - constructor //------------------------------------------------- -comx_joy_device::comx_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_joy_device::comx_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_JOY, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), m_joy1(*this, "JOY1"), diff --git a/src/devices/bus/comx35/joycard.h b/src/devices/bus/comx35/joycard.h index 92c41431961..81e11722a70 100644 --- a/src/devices/bus/comx35/joycard.h +++ b/src/devices/bus/comx35/joycard.h @@ -26,7 +26,7 @@ class comx_joy_device : public device_t, { public: // construction/destruction - comx_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/comx35/printer.cpp b/src/devices/bus/comx35/printer.cpp index 6858d687c0b..e475bcb9e32 100644 --- a/src/devices/bus/comx35/printer.cpp +++ b/src/devices/bus/comx35/printer.cpp @@ -79,7 +79,7 @@ void comx_prn_device::device_add_mconfig(machine_config &config) // comx_prn_device - constructor //------------------------------------------------- -comx_prn_device::comx_prn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_prn_device::comx_prn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_PRN, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), m_centronics(*this, CENTRONICS_TAG), diff --git a/src/devices/bus/comx35/printer.h b/src/devices/bus/comx35/printer.h index 1ffa3f66046..3aef84ee373 100644 --- a/src/devices/bus/comx35/printer.h +++ b/src/devices/bus/comx35/printer.h @@ -27,7 +27,7 @@ class comx_prn_device : public device_t, public device_comx_expansion_card_inter { public: // construction/destruction - comx_prn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_prn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/comx35/ram.cpp b/src/devices/bus/comx35/ram.cpp index 0f11dfdb194..c091c8c872c 100644 --- a/src/devices/bus/comx35/ram.cpp +++ b/src/devices/bus/comx35/ram.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(COMX_RAM, comx_ram_device, "comx_ram", "COMX-35 RAM Card") // comx_ram_device - constructor //------------------------------------------------- -comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_RAM, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", RAM_SIZE, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/comx35/ram.h b/src/devices/bus/comx35/ram.h index 8ab8703d195..ab8b0b66adf 100644 --- a/src/devices/bus/comx35/ram.h +++ b/src/devices/bus/comx35/ram.h @@ -26,7 +26,7 @@ class comx_ram_device : public device_t, { public: // construction/destruction - comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/comx35/thermal.cpp b/src/devices/bus/comx35/thermal.cpp index badd1beb8c1..65e1f23ab95 100644 --- a/src/devices/bus/comx35/thermal.cpp +++ b/src/devices/bus/comx35/thermal.cpp @@ -52,7 +52,7 @@ const tiny_rom_entry *comx_thm_device::device_rom_region() const // comx_thm_device - constructor //------------------------------------------------- -comx_thm_device::comx_thm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +comx_thm_device::comx_thm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMX_THM, tag, owner, clock), device_comx_expansion_card_interface(mconfig, *this), m_rom(*this, "c000") diff --git a/src/devices/bus/comx35/thermal.h b/src/devices/bus/comx35/thermal.h index 645f6bf0213..5a91d2a1d62 100644 --- a/src/devices/bus/comx35/thermal.h +++ b/src/devices/bus/comx35/thermal.h @@ -26,7 +26,7 @@ class comx_thm_device : public device_t, { public: // construction/destruction - comx_thm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + comx_thm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cpc/amdrum.cpp b/src/devices/bus/cpc/amdrum.cpp index 26345f48bc9..f0d32d84896 100644 --- a/src/devices/bus/cpc/amdrum.cpp +++ b/src/devices/bus/cpc/amdrum.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(CPC_AMDRUM, cpc_amdrum_device, "cpc_amdrum", "Amdrum") void cpc_amdrum_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "speaker").front_center(); - ZN428E(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + ZN428E(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // no pass-through } @@ -31,7 +31,7 @@ void cpc_amdrum_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_amdrum_device::cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_amdrum_device::cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_AMDRUM, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), diff --git a/src/devices/bus/cpc/amdrum.h b/src/devices/bus/cpc/amdrum.h index 44fede8af4f..019c253e072 100644 --- a/src/devices/bus/cpc/amdrum.h +++ b/src/devices/bus/cpc/amdrum.h @@ -25,7 +25,7 @@ class cpc_amdrum_device : public device_t, { public: // construction/destruction - cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_amdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void dac_w(uint8_t data); diff --git a/src/devices/bus/cpc/brunword4.cpp b/src/devices/bus/cpc/brunword4.cpp index c28433b281a..e02fb99009b 100644 --- a/src/devices/bus/cpc/brunword4.cpp +++ b/src/devices/bus/cpc/brunword4.cpp @@ -63,7 +63,7 @@ const tiny_rom_entry *cpc_brunword4_device::device_rom_region() const return ROM_NAME( cpc_brunword4 ); } -cpc_brunword4_device::cpc_brunword4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_brunword4_device::cpc_brunword4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_BRUNWORD_MK4, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_rombank_active(false), m_bank_sel(0) diff --git a/src/devices/bus/cpc/brunword4.h b/src/devices/bus/cpc/brunword4.h index c2e93f2a51d..99a7ec20bee 100644 --- a/src/devices/bus/cpc/brunword4.h +++ b/src/devices/bus/cpc/brunword4.h @@ -17,7 +17,7 @@ class cpc_brunword4_device : public device_t, { public: // construction/destruction - cpc_brunword4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_brunword4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cpc/cpc_pds.cpp b/src/devices/bus/cpc/cpc_pds.cpp index 411b0b6e575..9200f0eff75 100644 --- a/src/devices/bus/cpc/cpc_pds.cpp +++ b/src/devices/bus/cpc/cpc_pds.cpp @@ -29,7 +29,7 @@ void cpc_pds_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_pds_device::cpc_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_pds_device::cpc_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_PDS, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), diff --git a/src/devices/bus/cpc/cpc_pds.h b/src/devices/bus/cpc/cpc_pds.h index c2d7e68b6fd..764d9b80651 100644 --- a/src/devices/bus/cpc/cpc_pds.h +++ b/src/devices/bus/cpc/cpc_pds.h @@ -34,7 +34,7 @@ class cpc_pds_device : public device_t, { public: // construction/destruction - cpc_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t pio_r(offs_t offset); void pio_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/cpc/cpc_rom.cpp b/src/devices/bus/cpc/cpc_rom.cpp index 014d4600858..74a2bf0fb09 100644 --- a/src/devices/bus/cpc/cpc_rom.cpp +++ b/src/devices/bus/cpc/cpc_rom.cpp @@ -20,14 +20,14 @@ void cpc_exp_cards(device_slot_interface &device); // device machine config void cpc_rom_device::device_add_mconfig(machine_config &config) { - CPC_ROMSLOT(config, m_rom[0], 0); - CPC_ROMSLOT(config, m_rom[1], 0); - CPC_ROMSLOT(config, m_rom[2], 0); - CPC_ROMSLOT(config, m_rom[3], 0); - CPC_ROMSLOT(config, m_rom[4], 0); - CPC_ROMSLOT(config, m_rom[5], 0); - CPC_ROMSLOT(config, m_rom[6], 0); - CPC_ROMSLOT(config, m_rom[7], 0); + CPC_ROMSLOT(config, m_rom[0]); + CPC_ROMSLOT(config, m_rom[1]); + CPC_ROMSLOT(config, m_rom[2]); + CPC_ROMSLOT(config, m_rom[3]); + CPC_ROMSLOT(config, m_rom[4]); + CPC_ROMSLOT(config, m_rom[5]); + CPC_ROMSLOT(config, m_rom[6]); + CPC_ROMSLOT(config, m_rom[7]); // pass-through cpc_expansion_slot_device &exp(CPC_EXPANSION_SLOT(config, "exp", DERIVED_CLOCK(1, 1), cpc_exp_cards, nullptr)); @@ -41,7 +41,7 @@ void cpc_rom_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_rom_device::cpc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_rom_device::cpc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_ROM, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_rom(*this, "rom%u", 1) @@ -74,7 +74,7 @@ DEFINE_DEVICE_TYPE(CPC_ROMSLOT, cpc_rom_image_device, "cpc_rom_image", "CPC ROM // cpc_rom_image_device - constructor //------------------------------------------------- -cpc_rom_image_device::cpc_rom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cpc_rom_image_device::cpc_rom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_ROMSLOT, tag, owner, clock) , device_rom_image_interface(mconfig, *this) , m_base(nullptr) diff --git a/src/devices/bus/cpc/cpc_rom.h b/src/devices/bus/cpc/cpc_rom.h index a9932dd57a8..08311ba9f94 100644 --- a/src/devices/bus/cpc/cpc_rom.h +++ b/src/devices/bus/cpc/cpc_rom.h @@ -22,7 +22,7 @@ class cpc_rom_image_device : public device_t, public device_rom_image_interface { public: // construction/destruction - cpc_rom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_rom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~cpc_rom_image_device(); // image-level overrides @@ -55,7 +55,7 @@ class cpc_rom_device : public device_t, { public: // construction/destruction - cpc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t* base(uint8_t slot) { if(slot >=1 && slot <= 8) return m_rom[slot]->base(); else return nullptr; } diff --git a/src/devices/bus/cpc/cpc_rs232.cpp b/src/devices/bus/cpc/cpc_rs232.cpp index 4e387f9ab85..4c1f9e39b23 100644 --- a/src/devices/bus/cpc/cpc_rs232.cpp +++ b/src/devices/bus/cpc/cpc_rs232.cpp @@ -35,7 +35,7 @@ ROM_END // device machine config void cpc_rs232_device::device_add_mconfig(machine_config &config) { - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(2000000); m_pit->set_clk<1>(2000000); m_pit->set_clk<2>(2000000); @@ -76,12 +76,12 @@ const tiny_rom_entry *cpc_ams_rs232_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -cpc_rs232_device::cpc_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_rs232_device::cpc_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpc_rs232_device(mconfig, CPC_RS232, tag, owner, clock) { } -cpc_rs232_device::cpc_rs232_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +cpc_rs232_device::cpc_rs232_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_pit(*this,"pit"), @@ -91,7 +91,7 @@ cpc_rs232_device::cpc_rs232_device(const machine_config &mconfig, device_type ty { } -cpc_ams_rs232_device::cpc_ams_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_ams_rs232_device::cpc_ams_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpc_rs232_device(mconfig, CPC_RS232_AMS, tag, owner, clock) { } diff --git a/src/devices/bus/cpc/cpc_rs232.h b/src/devices/bus/cpc/cpc_rs232.h index fabbbd2001b..1605e4af5e2 100644 --- a/src/devices/bus/cpc/cpc_rs232.h +++ b/src/devices/bus/cpc/cpc_rs232.h @@ -20,7 +20,7 @@ class cpc_rs232_device : public device_t, public device_cpc_expansion_card_inter { public: // construction/destruction - cpc_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t dart_r(offs_t offset); void dart_w(offs_t offset, uint8_t data); @@ -28,7 +28,7 @@ public: void pit_w(offs_t offset, uint8_t data); protected: - cpc_rs232_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cpc_rs232_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -54,7 +54,7 @@ class cpc_ams_rs232_device : public cpc_rs232_device { public: // construction/destruction - cpc_ams_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_ams_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/cpc/cpc_ssa1.cpp b/src/devices/bus/cpc/cpc_ssa1.cpp index 40cfcccf0da..d67e4dd13d5 100644 --- a/src/devices/bus/cpc/cpc_ssa1.cpp +++ b/src/devices/bus/cpc/cpc_ssa1.cpp @@ -150,7 +150,7 @@ void cpc_dkspeech_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_ssa1_device::cpc_ssa1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_ssa1_device::cpc_ssa1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_SSA1, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_rom(nullptr), m_lrq(1), m_sby(0), @@ -158,7 +158,7 @@ cpc_ssa1_device::cpc_ssa1_device(const machine_config &mconfig, const char *tag, { } -cpc_dkspeech_device::cpc_dkspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_dkspeech_device::cpc_dkspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_DKSPEECH, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_rom(nullptr), m_lrq(1), m_sby(0), diff --git a/src/devices/bus/cpc/cpc_ssa1.h b/src/devices/bus/cpc/cpc_ssa1.h index 7157d9a0475..88ad17757d3 100644 --- a/src/devices/bus/cpc/cpc_ssa1.h +++ b/src/devices/bus/cpc/cpc_ssa1.h @@ -54,7 +54,7 @@ class cpc_ssa1_device : public device_t, { public: // construction/destruction - cpc_ssa1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_ssa1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_lrq(uint8_t state) { m_lrq = state; } uint8_t get_lrq() { return m_lrq; } @@ -91,7 +91,7 @@ class cpc_dkspeech_device : public device_t, { public: // construction/destruction - cpc_dkspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_dkspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_lrq(uint8_t state) { m_lrq = state; } uint8_t get_lrq() { return m_lrq; } diff --git a/src/devices/bus/cpc/cpcexp.cpp b/src/devices/bus/cpc/cpcexp.cpp index a8e1420f22d..daf1d7c0f7f 100644 --- a/src/devices/bus/cpc/cpcexp.cpp +++ b/src/devices/bus/cpc/cpcexp.cpp @@ -41,7 +41,7 @@ device_cpc_expansion_card_interface::~device_cpc_expansion_card_interface() // LIVE DEVICE //************************************************************************** -cpc_expansion_slot_device::cpc_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cpc_expansion_slot_device::cpc_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_EXPANSION_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_cpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/bus/cpc/cpcexp.h b/src/devices/bus/cpc/cpcexp.h index 6793a116e6e..036119c9b27 100644 --- a/src/devices/bus/cpc/cpcexp.h +++ b/src/devices/bus/cpc/cpcexp.h @@ -92,9 +92,9 @@ class cpc_expansion_slot_device : public device_t, public device_single_card_slo { public: // construction/destruction - cpc_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - cpc_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + cpc_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : cpc_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); diff --git a/src/devices/bus/cpc/ddi1.cpp b/src/devices/bus/cpc/ddi1.cpp index 7deaa49eabd..6a3cef24130 100644 --- a/src/devices/bus/cpc/ddi1.cpp +++ b/src/devices/bus/cpc/ddi1.cpp @@ -58,7 +58,7 @@ void cpc_ddi1_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_ddi1_device::cpc_ddi1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_ddi1_device::cpc_ddi1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_DDI1, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_fdc(*this,"upd765"), diff --git a/src/devices/bus/cpc/ddi1.h b/src/devices/bus/cpc/ddi1.h index ab25ce454d3..a763b54f587 100644 --- a/src/devices/bus/cpc/ddi1.h +++ b/src/devices/bus/cpc/ddi1.h @@ -21,7 +21,7 @@ class cpc_ddi1_device : public device_t, public device_cpc_expansion_card_interf { public: // construction/destruction - cpc_ddi1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_ddi1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void motor_w(offs_t offset, uint8_t data); void fdc_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/cpc/doubler.cpp b/src/devices/bus/cpc/doubler.cpp index 3a30f6b5449..007c3682bf9 100644 --- a/src/devices/bus/cpc/doubler.cpp +++ b/src/devices/bus/cpc/doubler.cpp @@ -31,7 +31,7 @@ void cpc_doubler_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_doubler_device::cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_doubler_device::cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_DOUBLER, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_tape(*this,"doubler_tape") diff --git a/src/devices/bus/cpc/doubler.h b/src/devices/bus/cpc/doubler.h index 13e3370dd99..a99ed8483bb 100644 --- a/src/devices/bus/cpc/doubler.h +++ b/src/devices/bus/cpc/doubler.h @@ -22,7 +22,7 @@ class cpc_doubler_device : public device_t, { public: // construction/destruction - cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_doubler_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t ext_tape_r(); diff --git a/src/devices/bus/cpc/hd20.cpp b/src/devices/bus/cpc/hd20.cpp index 81fa6d90c43..7ec59cf5eb8 100644 --- a/src/devices/bus/cpc/hd20.cpp +++ b/src/devices/bus/cpc/hd20.cpp @@ -43,7 +43,7 @@ const tiny_rom_entry *cpc_hd20_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -cpc_hd20_device::cpc_hd20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_hd20_device::cpc_hd20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_HD20, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_hdc(*this, "hdc") diff --git a/src/devices/bus/cpc/hd20.h b/src/devices/bus/cpc/hd20.h index 684f7c90901..5272f9d9a45 100644 --- a/src/devices/bus/cpc/hd20.h +++ b/src/devices/bus/cpc/hd20.h @@ -24,7 +24,7 @@ class cpc_hd20_device : public device_t, { public: // construction/destruction - cpc_hd20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_hd20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t hdc_r(offs_t offset); void hdc_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/cpc/magicsound.cpp b/src/devices/bus/cpc/magicsound.cpp index 194791f4a38..13fa79a3126 100644 --- a/src/devices/bus/cpc/magicsound.cpp +++ b/src/devices/bus/cpc/magicsound.cpp @@ -41,7 +41,7 @@ void al_magicsound_device::device_add_mconfig(machine_config &config) // According to the schematics, the clock is from the clock pin on the expansion port (4MHz), and // passes through an inverter to each CLK pin on both timers. This seems to be too fast. // Timer outputs to SAM0/1/2/3 are sample clocks for each sound channel, D/A0 is the low bit of the channel select. - PIT8254(config, m_timer1, 0); + PIT8254(config, m_timer1); m_timer1->set_clk<0>(4000000); m_timer1->out_handler<0>().set(FUNC(al_magicsound_device::sam0_w)); m_timer1->set_clk<1>(4000000); @@ -49,7 +49,7 @@ void al_magicsound_device::device_add_mconfig(machine_config &config) m_timer1->set_clk<2>(4000000); m_timer1->out_handler<2>().set(FUNC(al_magicsound_device::sam2_w)); - PIT8254(config, m_timer2, 0); + PIT8254(config, m_timer2); m_timer2->set_clk<0>(4000000); m_timer2->out_handler<0>().set(FUNC(al_magicsound_device::sam3_w)); m_timer2->set_clk<1>(4000000); @@ -57,7 +57,7 @@ void al_magicsound_device::device_add_mconfig(machine_config &config) m_timer2->set_clk<2>(4000000); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC // no pass-through(?) } @@ -66,7 +66,7 @@ void al_magicsound_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -al_magicsound_device::al_magicsound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +al_magicsound_device::al_magicsound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AL_MAGICSOUND, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_dac(*this,"dac"), diff --git a/src/devices/bus/cpc/magicsound.h b/src/devices/bus/cpc/magicsound.h index e40b6230d41..f3d1ba22cf0 100644 --- a/src/devices/bus/cpc/magicsound.h +++ b/src/devices/bus/cpc/magicsound.h @@ -39,7 +39,7 @@ class al_magicsound_device : public device_t, { public: // construction/destruction - al_magicsound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + al_magicsound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t dmac_r(offs_t offset); void dmac_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/cpc/mface2.cpp b/src/devices/bus/cpc/mface2.cpp index 831a895b439..e28d110dec9 100644 --- a/src/devices/bus/cpc/mface2.cpp +++ b/src/devices/bus/cpc/mface2.cpp @@ -307,7 +307,7 @@ ioport_constructor cpc_multiface2_device::device_input_ports() const // LIVE DEVICE //************************************************************************** -cpc_multiface2_device::cpc_multiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_multiface2_device::cpc_multiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_MFACE2, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_multiface_ram(nullptr), m_multiface_flags(0), m_romdis(0) diff --git a/src/devices/bus/cpc/mface2.h b/src/devices/bus/cpc/mface2.h index ba230b917c6..c0258e363db 100644 --- a/src/devices/bus/cpc/mface2.h +++ b/src/devices/bus/cpc/mface2.h @@ -37,7 +37,7 @@ class cpc_multiface2_device : public device_t, { public: // construction/destruction - cpc_multiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_multiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); int multiface_hardware_enabled(); void multiface_rethink_memory(); diff --git a/src/devices/bus/cpc/musicmachine.cpp b/src/devices/bus/cpc/musicmachine.cpp index a02be0c70b7..2c8e5de8691 100644 --- a/src/devices/bus/cpc/musicmachine.cpp +++ b/src/devices/bus/cpc/musicmachine.cpp @@ -25,11 +25,11 @@ void cpc_musicmachine_device::device_add_mconfig(machine_config &config) m_acia->irq_handler().set(DEVICE_SELF_OWNER, FUNC(cpc_expansion_slot_device::nmi_w)); MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd)); MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); acia_clock.signal_handler().set(FUNC(cpc_musicmachine_device::write_acia_clock)); SPEAKER(config, "speaker").front_center(); - ZN429E(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.2); + ZN429E(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.2); // no pass-through } @@ -38,7 +38,7 @@ void cpc_musicmachine_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_musicmachine_device::cpc_musicmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_musicmachine_device::cpc_musicmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_MUSICMACHINE, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), diff --git a/src/devices/bus/cpc/musicmachine.h b/src/devices/bus/cpc/musicmachine.h index 57c1b6f5273..dd10cf894cc 100644 --- a/src/devices/bus/cpc/musicmachine.h +++ b/src/devices/bus/cpc/musicmachine.h @@ -21,7 +21,7 @@ class cpc_musicmachine_device : public device_t, { public: // construction/destruction - cpc_musicmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_musicmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void dac_w(uint8_t data); uint8_t acia_r(offs_t offset); diff --git a/src/devices/bus/cpc/playcity.cpp b/src/devices/bus/cpc/playcity.cpp index c6abaeed14e..397a26b8d70 100644 --- a/src/devices/bus/cpc/playcity.cpp +++ b/src/devices/bus/cpc/playcity.cpp @@ -50,7 +50,7 @@ void cpc_playcity_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -cpc_playcity_device::cpc_playcity_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_playcity_device::cpc_playcity_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_PLAYCITY, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), diff --git a/src/devices/bus/cpc/playcity.h b/src/devices/bus/cpc/playcity.h index 5dd8459e986..c148bf44b83 100644 --- a/src/devices/bus/cpc/playcity.h +++ b/src/devices/bus/cpc/playcity.h @@ -28,7 +28,7 @@ class cpc_playcity_device : public device_t, public device_cpc_expansion_card_in { public: // construction/destruction - cpc_playcity_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_playcity_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t ctc_r(offs_t offset); void ctc_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/cpc/smartwatch.cpp b/src/devices/bus/cpc/smartwatch.cpp index a58b30f2c0a..651fd62731d 100644 --- a/src/devices/bus/cpc/smartwatch.cpp +++ b/src/devices/bus/cpc/smartwatch.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(CPC_SMARTWATCH, cpc_smartwatch_device, "cpc_smartwatch", "Dob void cpc_smartwatch_device::device_add_mconfig(machine_config &config) { - DS1315(config, m_rtc, 0); + DS1315(config, m_rtc); // no pass-through (?) } @@ -40,7 +40,7 @@ const tiny_rom_entry *cpc_smartwatch_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -cpc_smartwatch_device::cpc_smartwatch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_smartwatch_device::cpc_smartwatch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_SMARTWATCH, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_rtc(*this,"rtc"), m_bank(nullptr) diff --git a/src/devices/bus/cpc/smartwatch.h b/src/devices/bus/cpc/smartwatch.h index 8e3f08a1e00..86a3f3d6cbd 100644 --- a/src/devices/bus/cpc/smartwatch.h +++ b/src/devices/bus/cpc/smartwatch.h @@ -21,7 +21,7 @@ class cpc_smartwatch_device : public device_t, public device_cpc_expansion_card_ { public: // construction/destruction - cpc_smartwatch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_smartwatch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t rtc_w(offs_t offset); uint8_t rtc_r(); diff --git a/src/devices/bus/cpc/symbfac2.cpp b/src/devices/bus/cpc/symbfac2.cpp index bffadf99f2a..d28b06070d0 100644 --- a/src/devices/bus/cpc/symbfac2.cpp +++ b/src/devices/bus/cpc/symbfac2.cpp @@ -68,7 +68,7 @@ ioport_constructor cpc_symbiface2_device::device_input_ports() const // LIVE DEVICE //************************************************************************** -cpc_symbiface2_device::cpc_symbiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_symbiface2_device::cpc_symbiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_SYMBIFACE2, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), diff --git a/src/devices/bus/cpc/symbfac2.h b/src/devices/bus/cpc/symbfac2.h index 4bc59e8a5e6..f031d639b0f 100644 --- a/src/devices/bus/cpc/symbfac2.h +++ b/src/devices/bus/cpc/symbfac2.h @@ -21,7 +21,7 @@ class cpc_symbiface2_device : public device_t, { public: // construction/destruction - cpc_symbiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_symbiface2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t ide_cs0_r(offs_t offset); void ide_cs0_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/cpc/transtape.cpp b/src/devices/bus/cpc/transtape.cpp index 115b8463dc7..f2e47013460 100644 --- a/src/devices/bus/cpc/transtape.cpp +++ b/src/devices/bus/cpc/transtape.cpp @@ -42,7 +42,7 @@ ioport_constructor cpc_transtape_device::device_input_ports() const // LIVE DEVICE //************************************************************************** -cpc_transtape_device::cpc_transtape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cpc_transtape_device::cpc_transtape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPC_TRANSTAPE, tag, owner, clock), device_cpc_expansion_card_interface(mconfig, *this), m_slot(nullptr), m_space(nullptr), m_ram(nullptr), diff --git a/src/devices/bus/cpc/transtape.h b/src/devices/bus/cpc/transtape.h index 451c3b1bd2a..71545661fa2 100644 --- a/src/devices/bus/cpc/transtape.h +++ b/src/devices/bus/cpc/transtape.h @@ -19,7 +19,7 @@ class cpc_transtape_device : public device_t, { public: // construction/destruction - cpc_transtape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cpc_transtape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/crvision/rom.cpp b/src/devices/bus/crvision/rom.cpp index f4aac5393d8..9b639ca45ad 100644 --- a/src/devices/bus/crvision/rom.cpp +++ b/src/devices/bus/crvision/rom.cpp @@ -26,43 +26,43 @@ DEFINE_DEVICE_TYPE(CRVISION_ROM_16K, crvision_rom16k_device, "crvision_16k", "Cr DEFINE_DEVICE_TYPE(CRVISION_ROM_18K, crvision_rom18k_device, "crvision_18k", "CreatiVision 18K Carts") -crvision_rom_device::crvision_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +crvision_rom_device::crvision_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_crvision_cart_interface(mconfig, *this) { } -crvision_rom_device::crvision_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crvision_rom_device::crvision_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crvision_rom_device(mconfig, CRVISION_ROM_4K, tag, owner, clock) { } -crvision_rom6k_device::crvision_rom6k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crvision_rom6k_device::crvision_rom6k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crvision_rom_device(mconfig, CRVISION_ROM_6K, tag, owner, clock) { } -crvision_rom8k_device::crvision_rom8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crvision_rom8k_device::crvision_rom8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crvision_rom_device(mconfig, CRVISION_ROM_8K, tag, owner, clock) { } -crvision_rom10k_device::crvision_rom10k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crvision_rom10k_device::crvision_rom10k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crvision_rom_device(mconfig, CRVISION_ROM_10K, tag, owner, clock) { } -crvision_rom12k_device::crvision_rom12k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crvision_rom12k_device::crvision_rom12k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crvision_rom_device(mconfig, CRVISION_ROM_12K, tag, owner, clock) { } -crvision_rom16k_device::crvision_rom16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crvision_rom16k_device::crvision_rom16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crvision_rom_device(mconfig, CRVISION_ROM_16K, tag, owner, clock) { } -crvision_rom18k_device::crvision_rom18k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crvision_rom18k_device::crvision_rom18k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crvision_rom_device(mconfig, CRVISION_ROM_18K, tag, owner, clock) { } diff --git a/src/devices/bus/crvision/rom.h b/src/devices/bus/crvision/rom.h index ffb07e8c601..8a1dffb4490 100644 --- a/src/devices/bus/crvision/rom.h +++ b/src/devices/bus/crvision/rom.h @@ -15,13 +15,13 @@ class crvision_rom_device : public device_t, { public: // construction/destruction - crvision_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom80(offs_t offset) override; protected: - crvision_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + crvision_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override {} @@ -34,7 +34,7 @@ class crvision_rom6k_device : public crvision_rom_device { public: // construction/destruction - crvision_rom6k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_rom6k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom80(offs_t offset) override; @@ -46,7 +46,7 @@ class crvision_rom8k_device : public crvision_rom_device { public: // construction/destruction - crvision_rom8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_rom8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom80(offs_t offset) override; @@ -58,7 +58,7 @@ class crvision_rom10k_device : public crvision_rom_device { public: // construction/destruction - crvision_rom10k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_rom10k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom40(offs_t offset) override; @@ -71,7 +71,7 @@ class crvision_rom12k_device : public crvision_rom_device { public: // construction/destruction - crvision_rom12k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_rom12k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom40(offs_t offset) override; @@ -84,7 +84,7 @@ class crvision_rom16k_device : public crvision_rom_device { public: // construction/destruction - crvision_rom16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_rom16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom80(offs_t offset) override; @@ -96,7 +96,7 @@ class crvision_rom18k_device : public crvision_rom_device { public: // construction/destruction - crvision_rom18k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_rom18k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom40(offs_t offset) override; diff --git a/src/devices/bus/crvision/slot.cpp b/src/devices/bus/crvision/slot.cpp index 616ad6173b4..1a9950b640b 100644 --- a/src/devices/bus/crvision/slot.cpp +++ b/src/devices/bus/crvision/slot.cpp @@ -61,7 +61,7 @@ void device_crvision_cart_interface::rom_alloc(uint32_t size) //------------------------------------------------- // crvision_cart_slot_device - constructor //------------------------------------------------- -crvision_cart_slot_device::crvision_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +crvision_cart_slot_device::crvision_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CRVISION_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h index 41f86b117ae..9515b943f57 100644 --- a/src/devices/bus/crvision/slot.h +++ b/src/devices/bus/crvision/slot.h @@ -60,14 +60,14 @@ public: // construction/destruction template crvision_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : crvision_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : crvision_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - crvision_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crvision_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~crvision_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/dmv/dmvbus.cpp b/src/devices/bus/dmv/dmvbus.cpp index 3b828de41a1..b26090d4639 100644 --- a/src/devices/bus/dmv/dmvbus.cpp +++ b/src/devices/bus/dmv/dmvbus.cpp @@ -196,7 +196,7 @@ device_dmvslot_interface::~device_dmvslot_interface() //------------------------------------------------- // dmvcart_slot_device - constructor //------------------------------------------------- -dmvcart_slot_device::dmvcart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dmvcart_slot_device::dmvcart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMVCART_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_prog_read_cb(*this), diff --git a/src/devices/bus/dmv/dmvbus.h b/src/devices/bus/dmv/dmvbus.h index 24c55fdb512..84bd7ee93f8 100644 --- a/src/devices/bus/dmv/dmvbus.h +++ b/src/devices/bus/dmv/dmvbus.h @@ -28,14 +28,14 @@ public: // construction/destruction template dmvcart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : dmvcart_slot_device(mconfig, tag, owner, (uint32_t)0) + : dmvcart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - dmvcart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmvcart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~dmvcart_slot_device(); auto prog_read() { return m_prog_read_cb.bind(); } diff --git a/src/devices/bus/dmv/k012.cpp b/src/devices/bus/dmv/k012.cpp index 21f5f4e5e8d..bcc651a73ea 100644 --- a/src/devices/bus/dmv/k012.cpp +++ b/src/devices/bus/dmv/k012.cpp @@ -40,12 +40,12 @@ DEFINE_DEVICE_TYPE(DMV_C3282, dmv_c3282_device, "dmv_c3282", "C3282 External HD // dmv_k012_device - constructor //------------------------------------------------- -dmv_k012_device::dmv_k012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k012_device::dmv_k012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k012_device(mconfig, DMV_K012, tag, owner, clock) { } -dmv_k012_device::dmv_k012_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +dmv_k012_device::dmv_k012_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_dmvslot_interface( mconfig, *this ) , m_hdc(*this, "hdc") @@ -57,7 +57,7 @@ dmv_k012_device::dmv_k012_device(const machine_config &mconfig, device_type type // dmv_c3282_device - constructor //------------------------------------------------- -dmv_c3282_device::dmv_c3282_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_c3282_device::dmv_c3282_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k012_device(mconfig, DMV_C3282, tag, owner, clock) { } @@ -97,10 +97,10 @@ void dmv_k012_device::device_add_mconfig(machine_config &config) m_hdc->intrq_wr_callback().set(FUNC(dmv_k012_device::out_int)); // default drive is 10MB (306,4,17) - HARDDISK(config, "hdc:0", 0); - HARDDISK(config, "hdc:1", 0); - HARDDISK(config, "hdc:2", 0); - HARDDISK(config, "hdc:3", 0); + HARDDISK(config, "hdc:0"); + HARDDISK(config, "hdc:1"); + HARDDISK(config, "hdc:2"); + HARDDISK(config, "hdc:3"); } void dmv_k012_device::io_read(int ifsel, offs_t offset, uint8_t &data) diff --git a/src/devices/bus/dmv/k012.h b/src/devices/bus/dmv/k012.h index b450b5f125b..4c04dfecd0c 100644 --- a/src/devices/bus/dmv/k012.h +++ b/src/devices/bus/dmv/k012.h @@ -21,10 +21,10 @@ class dmv_k012_device : { public: // construction/destruction - dmv_k012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dmv_k012_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dmv_k012_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class dmv_c3282_device : { public: // construction/destruction - dmv_c3282_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_c3282_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/dmv/k210.cpp b/src/devices/bus/dmv/k210.cpp index 90f39e5bf0e..6803a8cb4b9 100644 --- a/src/devices/bus/dmv/k210.cpp +++ b/src/devices/bus/dmv/k210.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(DMV_K210, dmv_k210_device, "dmv_k210", "K210 Centronics") // dmv_k210_device - constructor //------------------------------------------------- -dmv_k210_device::dmv_k210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k210_device::dmv_k210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMV_K210, tag, owner, clock) , device_dmvslot_interface(mconfig, *this) , m_ppi(*this, "ppi8255") @@ -79,7 +79,7 @@ TIMER_CALLBACK_MEMBER(dmv_k210_device::strobe_tick) void dmv_k210_device::device_add_mconfig(machine_config &config) { - I8255(config, m_ppi, 0); + I8255(config, m_ppi); m_ppi->in_pa_callback().set(FUNC(dmv_k210_device::porta_r)); m_ppi->in_pb_callback().set(FUNC(dmv_k210_device::portb_r)); m_ppi->in_pc_callback().set(FUNC(dmv_k210_device::portc_r)); diff --git a/src/devices/bus/dmv/k210.h b/src/devices/bus/dmv/k210.h index d49673b2415..04dfb4377d8 100644 --- a/src/devices/bus/dmv/k210.h +++ b/src/devices/bus/dmv/k210.h @@ -22,7 +22,7 @@ class dmv_k210_device : { public: // construction/destruction - dmv_k210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/dmv/k220.cpp b/src/devices/bus/dmv/k220.cpp index 64df90c21d8..c5f42fdd04a 100644 --- a/src/devices/bus/dmv/k220.cpp +++ b/src/devices/bus/dmv/k220.cpp @@ -120,7 +120,7 @@ DEFINE_DEVICE_TYPE(DMV_K220, dmv_k220_device, "dmv_k220", "K220 diagnostic") // dmv_k220_device - constructor //------------------------------------------------- -dmv_k220_device::dmv_k220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k220_device::dmv_k220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMV_K220, tag, owner, clock) , device_dmvslot_interface(mconfig, *this) , m_pit(*this, "pit8253") @@ -172,7 +172,7 @@ void dmv_k220_device::device_add_mconfig(machine_config &config) m_ppi->in_pb_callback().set_ioport("SWITCH"); m_ppi->out_pc_callback().set(FUNC(dmv_k220_device::portc_w)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(XTAL(1'000'000)); // CLK1 m_pit->out_handler<0>().set(FUNC(dmv_k220_device::write_out0)); m_pit->out_handler<1>().set(FUNC(dmv_k220_device::write_out1)); diff --git a/src/devices/bus/dmv/k220.h b/src/devices/bus/dmv/k220.h index b58777df15e..6efa7a33308 100644 --- a/src/devices/bus/dmv/k220.h +++ b/src/devices/bus/dmv/k220.h @@ -22,7 +22,7 @@ class dmv_k220_device : { public: // construction/destruction - dmv_k220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/dmv/k230.cpp b/src/devices/bus/dmv/k230.cpp index 82d6e24f7d2..8d2a14ebd9d 100644 --- a/src/devices/bus/dmv/k230.cpp +++ b/src/devices/bus/dmv/k230.cpp @@ -90,12 +90,12 @@ DEFINE_DEVICE_TYPE(DMV_K235, dmv_k235_device, "dmv_k235", "K235 8088 with interr // dmv_k230_device - constructor //------------------------------------------------- -dmv_k230_device::dmv_k230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k230_device::dmv_k230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k230_device(mconfig, DMV_K230, tag, owner, clock) { } -dmv_k230_device::dmv_k230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +dmv_k230_device::dmv_k230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_dmvslot_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -109,7 +109,7 @@ dmv_k230_device::dmv_k230_device(const machine_config &mconfig, device_type type // dmv_k231_device - constructor //------------------------------------------------- -dmv_k231_device::dmv_k231_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k231_device::dmv_k231_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k230_device(mconfig, DMV_K231, tag, owner, clock) { } @@ -118,7 +118,7 @@ dmv_k231_device::dmv_k231_device(const machine_config &mconfig, const char *tag, // dmv_k234_device - constructor //------------------------------------------------- -dmv_k234_device::dmv_k234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k234_device::dmv_k234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k230_device(mconfig, DMV_K234, tag, owner, clock), m_snr(0) { } @@ -127,7 +127,7 @@ dmv_k234_device::dmv_k234_device(const machine_config &mconfig, const char *tag, // dmv_k235_device - constructor //------------------------------------------------- -dmv_k235_device::dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k235_device::dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k230_device(mconfig, DMV_K235, tag, owner, clock), m_pic(*this, "pic8259"), m_dsw(*this, "DSW") { } @@ -193,7 +193,7 @@ void dmv_k235_device::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_IO, &dmv_k235_device::k235_io); m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); } diff --git a/src/devices/bus/dmv/k230.h b/src/devices/bus/dmv/k230.h index c260ad70504..7c6367c3dcc 100644 --- a/src/devices/bus/dmv/k230.h +++ b/src/devices/bus/dmv/k230.h @@ -29,10 +29,10 @@ class dmv_k230_device : { public: // construction/destruction - dmv_k230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dmv_k230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dmv_k230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -72,7 +72,7 @@ class dmv_k231_device : { public: // construction/destruction - dmv_k231_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k231_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -86,7 +86,7 @@ class dmv_k234_device : { public: // construction/destruction - dmv_k234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -118,7 +118,7 @@ class dmv_k235_device : { public: // construction/destruction - dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k235_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/dmv/k233.cpp b/src/devices/bus/dmv/k233.cpp index 5873aec8d5c..bb42565083d 100644 --- a/src/devices/bus/dmv/k233.cpp +++ b/src/devices/bus/dmv/k233.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(DMV_K233, dmv_k233_device, "dmv_k233", "K233 16K Shared RAM") // dmv_k233_device - constructor //------------------------------------------------- -dmv_k233_device::dmv_k233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k233_device::dmv_k233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMV_K233, tag, owner, clock) , device_dmvslot_interface(mconfig, *this) , m_enabled(false) diff --git a/src/devices/bus/dmv/k233.h b/src/devices/bus/dmv/k233.h index 8f4c9302136..63767459446 100644 --- a/src/devices/bus/dmv/k233.h +++ b/src/devices/bus/dmv/k233.h @@ -20,7 +20,7 @@ class dmv_k233_device : { public: // construction/destruction - dmv_k233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/dmv/k801.cpp b/src/devices/bus/dmv/k801.cpp index 4465a45227b..4eb4756d008 100644 --- a/src/devices/bus/dmv/k801.cpp +++ b/src/devices/bus/dmv/k801.cpp @@ -76,12 +76,12 @@ DEFINE_DEVICE_TYPE(DMV_K213, dmv_k213_device, "dmv_k213", "K213 RS-232 Plotter I // dmv_k801_device - constructor //------------------------------------------------- -dmv_k801_device::dmv_k801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k801_device::dmv_k801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k801_device(mconfig, DMV_K801, tag, owner, clock) { } -dmv_k801_device::dmv_k801_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +dmv_k801_device::dmv_k801_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dmvslot_interface( mconfig, *this ), m_pci(*this, "pci"), @@ -94,13 +94,13 @@ dmv_k801_device::dmv_k801_device(const machine_config &mconfig, device_type type // dmv_k211_device - constructor //------------------------------------------------- -dmv_k211_device::dmv_k211_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k211_device::dmv_k211_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k211_device(mconfig, DMV_K211, tag, owner, clock) { } -dmv_k211_device::dmv_k211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +dmv_k211_device::dmv_k211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : dmv_k801_device(mconfig, type, tag, owner, clock) { } @@ -109,7 +109,7 @@ dmv_k211_device::dmv_k211_device(const machine_config &mconfig, device_type type // dmv_k212_device - constructor //------------------------------------------------- -dmv_k212_device::dmv_k212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k212_device::dmv_k212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k211_device(mconfig, DMV_K212, tag, owner, clock) { } @@ -118,7 +118,7 @@ dmv_k212_device::dmv_k212_device(const machine_config &mconfig, const char *tag, // dmv_k213_device - constructor //------------------------------------------------- -dmv_k213_device::dmv_k213_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k213_device::dmv_k213_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_k211_device(mconfig, DMV_K213, tag, owner, clock) { } diff --git a/src/devices/bus/dmv/k801.h b/src/devices/bus/dmv/k801.h index 41f72aaacf8..d842bbf3208 100644 --- a/src/devices/bus/dmv/k801.h +++ b/src/devices/bus/dmv/k801.h @@ -23,10 +23,10 @@ class dmv_k801_device : { public: // construction/destruction - dmv_k801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dmv_k801_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dmv_k801_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -58,10 +58,10 @@ class dmv_k211_device : { public: // construction/destruction - dmv_k211_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k211_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dmv_k211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dmv_k211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; @@ -79,7 +79,7 @@ class dmv_k212_device : { public: // construction/destruction - dmv_k212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -94,7 +94,7 @@ class dmv_k213_device : { public: // construction/destruction - dmv_k213_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k213_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/dmv/k803.cpp b/src/devices/bus/dmv/k803.cpp index d2a72f22441..11be88cc159 100644 --- a/src/devices/bus/dmv/k803.cpp +++ b/src/devices/bus/dmv/k803.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(DMV_K803, dmv_k803_device, "dmv_k803", "K803 RTC") // dmv_k803_device - constructor //------------------------------------------------- -dmv_k803_device::dmv_k803_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dmv_k803_device::dmv_k803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMV_K803, tag, owner, clock), device_dmvslot_interface( mconfig, *this ), m_rtc(*this, "rtc"), diff --git a/src/devices/bus/dmv/k803.h b/src/devices/bus/dmv/k803.h index 60a8cd91ced..1771373e985 100644 --- a/src/devices/bus/dmv/k803.h +++ b/src/devices/bus/dmv/k803.h @@ -21,7 +21,7 @@ class dmv_k803_device : { public: // construction/destruction - dmv_k803_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/dmv/k806.cpp b/src/devices/bus/dmv/k806.cpp index 89802ca43bd..1fb6a8478dd 100644 --- a/src/devices/bus/dmv/k806.cpp +++ b/src/devices/bus/dmv/k806.cpp @@ -63,7 +63,7 @@ DEFINE_DEVICE_TYPE(DMV_K806, dmv_k806_device, "dmv_k806", "K806 mouse") // dmv_k806_device - constructor //------------------------------------------------- -dmv_k806_device::dmv_k806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k806_device::dmv_k806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMV_K806, tag, owner, clock) , device_dmvslot_interface( mconfig, *this ) , m_mcu(*this, "mcu") @@ -116,7 +116,7 @@ void dmv_k806_device::device_add_mconfig(machine_config &config) m_mcu->p2_out_cb().set(FUNC(dmv_k806_device::port2_w)); m_mcu->t1_in_cb().set(FUNC(dmv_k806_device::portt1_r)); - TIMER(config, "mouse_timer", 0).configure_periodic(FUNC(dmv_k806_device::mouse_timer), attotime::from_hz(1000)); + TIMER(config, "mouse_timer").configure_periodic(FUNC(dmv_k806_device::mouse_timer), attotime::from_hz(1000)); } //------------------------------------------------- diff --git a/src/devices/bus/dmv/k806.h b/src/devices/bus/dmv/k806.h index 8c7c3618f69..c2649af0888 100644 --- a/src/devices/bus/dmv/k806.h +++ b/src/devices/bus/dmv/k806.h @@ -24,7 +24,7 @@ class dmv_k806_device : { public: // construction/destruction - dmv_k806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/dmv/ram.cpp b/src/devices/bus/dmv/ram.cpp index 3538ba6ed41..dff22460e30 100644 --- a/src/devices/bus/dmv/ram.cpp +++ b/src/devices/bus/dmv/ram.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(DMV_K208, dmv_k208_device, "dmv_k208", "K208 448K RAM expansi // dmv_ram_device_base - constructor //------------------------------------------------- -dmv_ram_device_base::dmv_ram_device_base(const machine_config &mconfig, device_type type, uint32_t size, const char *tag, device_t *owner, uint32_t clock) +dmv_ram_device_base::dmv_ram_device_base(const machine_config &mconfig, device_type type, uint32_t size, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_dmvslot_interface(mconfig, *this) , m_ram(nullptr) @@ -45,7 +45,7 @@ dmv_ram_device_base::dmv_ram_device_base(const machine_config &mconfig, device_t // dmv_k200_device - constructor //------------------------------------------------- -dmv_k200_device::dmv_k200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k200_device::dmv_k200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_ram_device_base(mconfig, DMV_K200, 1, tag, owner, clock) { } @@ -54,7 +54,7 @@ dmv_k200_device::dmv_k200_device(const machine_config &mconfig, const char *tag, // dmv_k202_device - constructor //------------------------------------------------- -dmv_k202_device::dmv_k202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k202_device::dmv_k202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_ram_device_base(mconfig, DMV_K202, 3, tag, owner, clock) { } @@ -63,7 +63,7 @@ dmv_k202_device::dmv_k202_device(const machine_config &mconfig, const char *tag, // dmv_k208_device - constructor //------------------------------------------------- -dmv_k208_device::dmv_k208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_k208_device::dmv_k208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmv_ram_device_base(mconfig, DMV_K208, 7, tag, owner, clock) { } diff --git a/src/devices/bus/dmv/ram.h b/src/devices/bus/dmv/ram.h index 79cc9c3ea92..d54811fa12a 100644 --- a/src/devices/bus/dmv/ram.h +++ b/src/devices/bus/dmv/ram.h @@ -20,7 +20,7 @@ class dmv_ram_device_base : { protected: // construction/destruction - dmv_ram_device_base(const machine_config &mconfig, device_type type, uint32_t size, const char *tag, device_t *owner, uint32_t clock); + dmv_ram_device_base(const machine_config &mconfig, device_type type, uint32_t size, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -39,7 +39,7 @@ class dmv_k200_device : public dmv_ram_device_base { public: // construction/destruction - dmv_k200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -47,7 +47,7 @@ class dmv_k202_device : public dmv_ram_device_base { public: // construction/destruction - dmv_k202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -55,7 +55,7 @@ class dmv_k208_device : public dmv_ram_device_base { public: // construction/destruction - dmv_k208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_k208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/ecbbus/ecbbus.cpp b/src/devices/bus/ecbbus/ecbbus.cpp index 5eaeda9f284..1881f6b9848 100644 --- a/src/devices/bus/ecbbus/ecbbus.cpp +++ b/src/devices/bus/ecbbus/ecbbus.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ECBBUS_SLOT, ecbbus_slot_device, "ecbbus_slot", "ECB bus slot // ecbbus_slot_device - constructor //------------------------------------------------- -ecbbus_slot_device::ecbbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ecbbus_slot_device::ecbbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECBBUS_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_bus(*this, finder_base::DUMMY_TAG), @@ -81,7 +81,7 @@ device_ecbbus_card_interface::device_ecbbus_card_interface(const machine_config // ecbbus_device - constructor //------------------------------------------------- -ecbbus_device::ecbbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ecbbus_device::ecbbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECBBUS, tag, owner, clock), m_write_irq(*this), m_write_nmi(*this) diff --git a/src/devices/bus/ecbbus/ecbbus.h b/src/devices/bus/ecbbus/ecbbus.h index bee5201a2fc..6e7ad6fcc29 100644 --- a/src/devices/bus/ecbbus/ecbbus.h +++ b/src/devices/bus/ecbbus/ecbbus.h @@ -65,7 +65,7 @@ public: // construction/destruction template ecbbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bustag, int num, U &&opts, char const *dflt) - : ecbbus_slot_device(mconfig, tag, owner, 0) + : ecbbus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -74,7 +74,7 @@ public: set_ecbbus_slot(std::forward(bustag), num); } - ecbbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ecbbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; @@ -103,7 +103,7 @@ class ecbbus_device : public device_t { public: // construction/destruction - ecbbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ecbbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_wr_callback() { return m_write_irq.bind(); } auto nmi_wr_callback() { return m_write_nmi.bind(); } diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp index 6de51191cd5..e0a8ea195c0 100644 --- a/src/devices/bus/ecbbus/grip.cpp +++ b/src/devices/bus/ecbbus/grip.cpp @@ -459,7 +459,7 @@ void ecb_grip21_device::device_add_mconfig(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(ecb_grip21_device::kb_w)); } @@ -558,7 +558,7 @@ ioport_constructor ecb_grip21_device::device_input_ports() const // ecb_grip21_device - constructor //------------------------------------------------- -ecb_grip21_device::ecb_grip21_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ecb_grip21_device::ecb_grip21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECB_GRIP21, tag, owner, clock), device_ecbbus_card_interface(mconfig, *this), m_ppi(*this, I8255A_TAG), diff --git a/src/devices/bus/ecbbus/grip.h b/src/devices/bus/ecbbus/grip.h index 024a820e4e3..f77ffa9968b 100644 --- a/src/devices/bus/ecbbus/grip.h +++ b/src/devices/bus/ecbbus/grip.h @@ -35,7 +35,7 @@ class ecb_grip21_device : public device_t, public device_ecbbus_card_interface { public: // construction/destruction - ecb_grip21_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ecb_grip21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/econet/e01.cpp b/src/devices/bus/econet/e01.cpp index 256e545c702..168aa239cd1 100644 --- a/src/devices/bus/econet/e01.cpp +++ b/src/devices/bus/econet/e01.cpp @@ -78,7 +78,7 @@ DEFINE_DEVICE_TYPE(ECONET_E01, econet_e01_device, "econet_e01", "Acorn FileStore E01") DEFINE_DEVICE_TYPE(ECONET_E01S, econet_e01s_device, "econet_e01s", "Acorn FileStore E01S") -econet_e01s_device::econet_e01s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +econet_e01s_device::econet_e01s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : econet_e01_device(mconfig, ECONET_E01S, tag, owner, clock, TYPE_E01S) { } @@ -253,7 +253,7 @@ void econet_e01_device::device_add_mconfig(machine_config &config) via.writepa_handler().set("cent_data_out", FUNC(output_latch_device::write)); via.irq_handler().set(FUNC(econet_e01_device::via_irq_w)); - MC6854(config, m_adlc, 0); + MC6854(config, m_adlc); m_adlc->out_irq_cb().set(FUNC(econet_e01_device::adlc_irq_w)); m_adlc->out_txd_cb().set(FUNC(econet_e01_device::econet_data_w)); @@ -380,13 +380,13 @@ inline void econet_e01_device::hdc_irq_enable(int enabled) // econet_e01_device - constructor //------------------------------------------------- -econet_e01_device::econet_e01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +econet_e01_device::econet_e01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : econet_e01_device(mconfig, ECONET_E01, tag, owner, clock, TYPE_E01) { } -econet_e01_device::econet_e01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant) +econet_e01_device::econet_e01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant) : device_t(mconfig, type, tag, owner, clock) , device_econet_interface(mconfig, *this) , m_maincpu(*this, R65C102_TAG) diff --git a/src/devices/bus/econet/e01.h b/src/devices/bus/econet/e01.h index 695e18c47cd..4bcdab699be 100644 --- a/src/devices/bus/econet/e01.h +++ b/src/devices/bus/econet/e01.h @@ -30,7 +30,7 @@ class econet_e01_device : public device_t, { public: // construction/destruction - econet_e01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + econet_e01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum @@ -39,7 +39,7 @@ protected: TYPE_E01S }; - econet_e01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant); + econet_e01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant); // device-level overrides virtual void device_start() override; @@ -132,7 +132,7 @@ class econet_e01s_device : public econet_e01_device { public: // construction/destruction - econet_e01s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + econet_e01s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/econet/econet.cpp b/src/devices/bus/econet/econet.cpp index e9afc9c0d49..7ec6552dcef 100644 --- a/src/devices/bus/econet/econet.cpp +++ b/src/devices/bus/econet/econet.cpp @@ -54,7 +54,7 @@ device_econet_interface::device_econet_interface(const machine_config &mconfig, // econet_slot_device - constructor //------------------------------------------------- -econet_slot_device::econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +econet_slot_device::econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECONET_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), m_address(0), m_econet(*this, finder_base::DUMMY_TAG) @@ -183,7 +183,7 @@ inline int econet_device::get_signal(int signal) // econet_device - constructor //------------------------------------------------- -econet_device::econet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +econet_device::econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECONET, tag, owner, clock), m_write_clk(*this), m_write_data(*this) diff --git a/src/devices/bus/econet/econet.h b/src/devices/bus/econet/econet.h index 1aab9da8095..6f6ff3a5e35 100644 --- a/src/devices/bus/econet/econet.h +++ b/src/devices/bus/econet/econet.h @@ -26,7 +26,7 @@ class econet_device : public device_t { public: // construction/destruction - econet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + econet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto clk_wr_callback() { return m_write_clk.bind(); } auto data_wr_callback() { return m_write_data.bind(); } @@ -86,11 +86,11 @@ class econet_slot_device : public device_t, { public: // construction/destruction - econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template econet_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&econet_tag, U &&devs) - : econet_slot_device(mconfig, tag, owner, 0U) + : econet_slot_device(mconfig, tag, owner) { set_econet_tag(std::forward(econet_tag)); devs(*this); diff --git a/src/devices/bus/einstein/pipe/pipe.cpp b/src/devices/bus/einstein/pipe/pipe.cpp index f54092e9587..868e56dcf7a 100644 --- a/src/devices/bus/einstein/pipe/pipe.cpp +++ b/src/devices/bus/einstein/pipe/pipe.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(TATUNG_PIPE, tatung_pipe_device, "tatung_pipe", "Tatung Pipe // tatung_pipe_device - constructor //------------------------------------------------- -tatung_pipe_device::tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tatung_pipe_device::tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TATUNG_PIPE, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_program(*this, finder_base::DUMMY_TAG, -1), diff --git a/src/devices/bus/einstein/pipe/pipe.h b/src/devices/bus/einstein/pipe/pipe.h index 7b2a2fdcbad..2897b582818 100644 --- a/src/devices/bus/einstein/pipe/pipe.h +++ b/src/devices/bus/einstein/pipe/pipe.h @@ -56,9 +56,9 @@ class tatung_pipe_device : public device_t, public device_single_card_slot_inter friend class device_tatung_pipe_interface; public: // construction/destruction - tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + tatung_pipe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : tatung_pipe_device(mconfig, tag, owner, clock) { option_reset(); diff --git a/src/devices/bus/einstein/pipe/silicon_disc.cpp b/src/devices/bus/einstein/pipe/silicon_disc.cpp index c0a29f304bd..3f70488551a 100644 --- a/src/devices/bus/einstein/pipe/silicon_disc.cpp +++ b/src/devices/bus/einstein/pipe/silicon_disc.cpp @@ -49,7 +49,7 @@ const tiny_rom_entry *einstein_silicon_disc_device::device_rom_region() const // einstein_silicon_disc_device - constructor //------------------------------------------------- -einstein_silicon_disc_device::einstein_silicon_disc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +einstein_silicon_disc_device::einstein_silicon_disc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EINSTEIN_SILICON_DISC, tag, owner, clock), device_tatung_pipe_interface(mconfig, *this), m_rom(*this, "rom"), diff --git a/src/devices/bus/einstein/pipe/silicon_disc.h b/src/devices/bus/einstein/pipe/silicon_disc.h index c80ef0ed88c..48b5485cb77 100644 --- a/src/devices/bus/einstein/pipe/silicon_disc.h +++ b/src/devices/bus/einstein/pipe/silicon_disc.h @@ -26,7 +26,7 @@ class einstein_silicon_disc_device : public device_t, public device_tatung_pipe_ { public: // construction/destruction - einstein_silicon_disc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + einstein_silicon_disc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/einstein/pipe/speculator.cpp b/src/devices/bus/einstein/pipe/speculator.cpp index e99d3978cb4..4a05436724c 100644 --- a/src/devices/bus/einstein/pipe/speculator.cpp +++ b/src/devices/bus/einstein/pipe/speculator.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(EINSTEIN_SPECULATOR, einstein_speculator_device, "einstein_sp void einstein_speculator_device::device_add_mconfig(machine_config &config) { - TTL74123(config, m_ic5a, 0); + TTL74123(config, m_ic5a); m_ic5a->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE); m_ic5a->set_resistor_value(RES_K(47)); m_ic5a->set_capacitor_value(CAP_P(560)); @@ -36,7 +36,7 @@ void einstein_speculator_device::device_add_mconfig(machine_config &config) m_ic5a->set_clear_pin_value(0); m_ic5a->out_cb().set(FUNC(einstein_speculator_device::ic5a_q_w)); - TTL74123(config, m_ic5b, 0); + TTL74123(config, m_ic5b); m_ic5b->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE); m_ic5b->set_resistor_value(RES_K(47)); m_ic5b->set_capacitor_value(CAP_P(560)); @@ -64,7 +64,7 @@ void einstein_speculator_device::device_add_mconfig(machine_config &config) // einstein_speculator_device - constructor //------------------------------------------------- -einstein_speculator_device::einstein_speculator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +einstein_speculator_device::einstein_speculator_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EINSTEIN_SPECULATOR, tag, owner, clock), device_tatung_pipe_interface(mconfig, *this), m_ic5a(*this, "ic5a"), m_ic5b(*this, "ic5b"), diff --git a/src/devices/bus/einstein/pipe/speculator.h b/src/devices/bus/einstein/pipe/speculator.h index c66b2e0122e..54159838878 100644 --- a/src/devices/bus/einstein/pipe/speculator.h +++ b/src/devices/bus/einstein/pipe/speculator.h @@ -30,7 +30,7 @@ class einstein_speculator_device : public device_t, public device_tatung_pipe_in { public: // construction/destruction - einstein_speculator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + einstein_speculator_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void int_w(int state) override; diff --git a/src/devices/bus/einstein/pipe/tk02.cpp b/src/devices/bus/einstein/pipe/tk02.cpp index 74cd880e151..668426f458b 100644 --- a/src/devices/bus/einstein/pipe/tk02.cpp +++ b/src/devices/bus/einstein/pipe/tk02.cpp @@ -126,7 +126,7 @@ void tk02_device::device_add_mconfig(machine_config &config) // tk02_device - constructor //------------------------------------------------- -tk02_device::tk02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tk02_device::tk02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TK02_80COL, tag, owner, clock), device_tatung_pipe_interface(mconfig, *this), m_pipe(*this, "pipe"), diff --git a/src/devices/bus/einstein/pipe/tk02.h b/src/devices/bus/einstein/pipe/tk02.h index 3834585ed2a..aaccafb48c0 100644 --- a/src/devices/bus/einstein/pipe/tk02.h +++ b/src/devices/bus/einstein/pipe/tk02.h @@ -26,7 +26,7 @@ class tk02_device : public device_t, public device_tatung_pipe_interface { public: // construction/destruction - tk02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tk02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/einstein/userport/mouse.cpp b/src/devices/bus/einstein/userport/mouse.cpp index 945bff5d37c..e0613d4f1e5 100644 --- a/src/devices/bus/einstein/userport/mouse.cpp +++ b/src/devices/bus/einstein/userport/mouse.cpp @@ -48,7 +48,7 @@ ioport_constructor einstein_mouse_device::device_input_ports() const // einstein_speech_device - constructor //------------------------------------------------- -einstein_mouse_device::einstein_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +einstein_mouse_device::einstein_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EINSTEIN_MOUSE, tag, owner, clock), device_einstein_userport_interface(mconfig, *this), m_mouse_b(*this, "mouse_b"), diff --git a/src/devices/bus/einstein/userport/mouse.h b/src/devices/bus/einstein/userport/mouse.h index dad8200d06b..8ec38ae4004 100644 --- a/src/devices/bus/einstein/userport/mouse.h +++ b/src/devices/bus/einstein/userport/mouse.h @@ -24,7 +24,7 @@ class einstein_mouse_device : public device_t, public device_einstein_userport_i { public: // construction/destruction - einstein_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + einstein_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/einstein/userport/speech.cpp b/src/devices/bus/einstein/userport/speech.cpp index 435423f9f82..3a822109d49 100644 --- a/src/devices/bus/einstein/userport/speech.cpp +++ b/src/devices/bus/einstein/userport/speech.cpp @@ -40,7 +40,7 @@ const tiny_rom_entry *einstein_speech_device::device_rom_region() const void einstein_speech_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SP0256(config, m_sp0256, 3120000); // ??? + SP0256(config, m_sp0256, XTAL::u(3120000)); // ??? m_sp0256->add_route(ALL_OUTPUTS, "mono", 1.00); } @@ -53,7 +53,7 @@ void einstein_speech_device::device_add_mconfig(machine_config &config) // einstein_speech_device - constructor //------------------------------------------------- -einstein_speech_device::einstein_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +einstein_speech_device::einstein_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EINSTEIN_SPEECH, tag, owner, clock), device_einstein_userport_interface(mconfig, *this), m_sp0256(*this, "sp0256") diff --git a/src/devices/bus/einstein/userport/speech.h b/src/devices/bus/einstein/userport/speech.h index 4c62b24e842..494e5e5d54d 100644 --- a/src/devices/bus/einstein/userport/speech.h +++ b/src/devices/bus/einstein/userport/speech.h @@ -25,7 +25,7 @@ class einstein_speech_device : public device_t, public device_einstein_userport_ { public: // construction/destruction - einstein_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + einstein_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/einstein/userport/userport.cpp b/src/devices/bus/einstein/userport/userport.cpp index e2fdd06acd2..ce1ebcc4b97 100644 --- a/src/devices/bus/einstein/userport/userport.cpp +++ b/src/devices/bus/einstein/userport/userport.cpp @@ -29,12 +29,16 @@ DEFINE_DEVICE_TYPE(EINSTEIN_USERPORT, einstein_userport_device, "einstein_userpo // einstein_userport_device - constructor //------------------------------------------------- -einstein_userport_device::einstein_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +einstein_userport_device::einstein_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EINSTEIN_USERPORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), m_bstb_handler(*this) { + option_reset(); + einstein_userport_cards(*this); + set_default_option(nullptr); + set_fixed(false); } //------------------------------------------------- diff --git a/src/devices/bus/einstein/userport/userport.h b/src/devices/bus/einstein/userport/userport.h index d543f14d7c6..fde4e708cfb 100644 --- a/src/devices/bus/einstein/userport/userport.h +++ b/src/devices/bus/einstein/userport/userport.h @@ -36,16 +36,7 @@ class einstein_userport_device : public device_t, public device_single_card_slot { public: // construction/destruction - einstein_userport_device(machine_config const &mconfig, char const *tag, device_t *owner) - : einstein_userport_device(mconfig, tag, owner, (uint32_t)0) - { - option_reset(); - einstein_userport_cards(*this); - set_default_option(nullptr); - set_fixed(false); - } - - einstein_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + einstein_userport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~einstein_userport_device(); // callbacks diff --git a/src/devices/bus/ekara/rom.cpp b/src/devices/bus/ekara/rom.cpp index f4458c63efd..b22b0482b29 100644 --- a/src/devices/bus/ekara/rom.cpp +++ b/src/devices/bus/ekara/rom.cpp @@ -17,56 +17,56 @@ DEFINE_DEVICE_TYPE(EKARA_ROM_I2C_24LC02_GC0010, ekara_rom_i2c_24lc02_gc0010_d DEFINE_DEVICE_TYPE(EKARA_ROM_I2C_24LC08_EVIO, ekara_rom_i2c_24lc08_evio_device, "ekara_rom_i2c_24lc08_evio", "EKARA Cartridge with I2C 24LC08 (evio direct access)") -ekara_rom_plain_device::ekara_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_plain_device::ekara_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_ekara_cart_interface(mconfig, *this) { } -ekara_rom_plain_device::ekara_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_plain_device::ekara_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_plain_device(mconfig, EKARA_ROM_PLAIN, tag, owner, clock) { } -ekara_rom_i2c_base_device::ekara_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_base_device::ekara_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_plain_device(mconfig, type, tag, owner, clock), m_i2cmem(*this, "i2cmem") { m_buscontrol[0] = m_buscontrol[1] = m_buscontrol[2] = 0x00; } -ekara_rom_i2c_base_device::ekara_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_base_device::ekara_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_i2c_base_device(mconfig, EKARA_ROM_I2C_BASE, tag, owner, clock) { } -ekara_rom_i2c_24c08_epitch_device::ekara_rom_i2c_24c08_epitch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_24c08_epitch_device::ekara_rom_i2c_24c08_epitch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_i2c_base_device(mconfig, EKARA_ROM_I2C_24C08_EPITCH, tag, owner, clock) { } -ekara_rom_i2c_24lc04_device::ekara_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_24lc04_device::ekara_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_i2c_base_device(mconfig, EKARA_ROM_I2C_24LC04, tag, owner, clock) { } -ekara_rom_i2c_24lc02_device::ekara_rom_i2c_24lc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_24lc02_device::ekara_rom_i2c_24lc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_i2c_base_device(mconfig, EKARA_ROM_I2C_24LC02, tag, owner, clock) { } -ekara_rom_i2c_24lc02_gc0010_device::ekara_rom_i2c_24lc02_gc0010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_24lc02_gc0010_device::ekara_rom_i2c_24lc02_gc0010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_i2c_24lc02_gc0010_device(mconfig, EKARA_ROM_I2C_24LC02_GC0010, tag, owner, clock) { } -ekara_rom_i2c_24lc02_gc0010_device::ekara_rom_i2c_24lc02_gc0010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_24lc02_gc0010_device::ekara_rom_i2c_24lc02_gc0010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_i2c_base_device(mconfig, type, tag, owner, clock) { } -ekara_rom_i2c_24lc08_evio_device::ekara_rom_i2c_24lc08_evio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_rom_i2c_24lc08_evio_device::ekara_rom_i2c_24lc08_evio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ekara_rom_i2c_24lc02_gc0010_device(mconfig, EKARA_ROM_I2C_24LC08_EVIO, tag, owner, clock) { } @@ -159,21 +159,21 @@ bool ekara_rom_i2c_24c08_epitch_device::is_write_access_not_rom(void) void ekara_rom_i2c_24c08_epitch_device::device_add_mconfig(machine_config &config) { - I2C_24C08(config, "i2cmem", 0); + I2C_24C08(config, "i2cmem"); } // i2c 24lc04 void ekara_rom_i2c_24lc04_device::device_add_mconfig(machine_config &config) { - I2C_24C04(config, "i2cmem", 0); // 24LC04 + I2C_24C04(config, "i2cmem"); // 24LC04 } // i2c 24lc02 void ekara_rom_i2c_24lc02_device::device_add_mconfig(machine_config &config) { - I2C_24C02(config, "i2cmem", 0); // 24LC02 + I2C_24C02(config, "i2cmem"); // 24LC02 } // i2c 24lc02 with direct IO port access @@ -217,7 +217,7 @@ READ_LINE_MEMBER(ekara_rom_i2c_24lc02_gc0010_device::read_sda ) void ekara_rom_i2c_24lc02_gc0010_device::device_add_mconfig(machine_config &config) { - I2C_24C02(config, "i2cmem", 0); // 24LC02 + I2C_24C02(config, "i2cmem"); // 24LC02 } diff --git a/src/devices/bus/ekara/rom.h b/src/devices/bus/ekara/rom.h index 890136f26ef..9c24f497ba5 100644 --- a/src/devices/bus/ekara/rom.h +++ b/src/devices/bus/ekara/rom.h @@ -15,7 +15,7 @@ class ekara_rom_plain_device : public device_t, { public: // construction/destruction - ekara_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -28,7 +28,7 @@ public: virtual void write_rom(offs_t offset, uint8_t data); protected: - ekara_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -41,10 +41,10 @@ class ekara_rom_i2c_base_device : public ekara_rom_plain_device { public: // construction/destruction - ekara_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - ekara_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; @@ -70,7 +70,7 @@ class ekara_rom_i2c_24c08_epitch_device : public ekara_rom_i2c_base_device { public: // construction/destruction - ekara_rom_i2c_24c08_epitch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_i2c_24c08_epitch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual bool is_read_access_not_rom(void) override; @@ -86,7 +86,7 @@ class ekara_rom_i2c_24lc04_device : public ekara_rom_i2c_base_device { public: // construction/destruction - ekara_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -98,7 +98,7 @@ class ekara_rom_i2c_24lc02_device : public ekara_rom_i2c_base_device { public: // construction/destruction - ekara_rom_i2c_24lc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_i2c_24lc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -111,7 +111,7 @@ class ekara_rom_i2c_24lc02_gc0010_device : public ekara_rom_i2c_base_device { public: // construction/destruction - ekara_rom_i2c_24lc02_gc0010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ekara_rom_i2c_24lc02_gc0010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: ekara_rom_i2c_24lc02_gc0010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/bus/ekara/slot.cpp b/src/devices/bus/ekara/slot.cpp index 2cd33594edb..4cc6b43f95f 100644 --- a/src/devices/bus/ekara/slot.cpp +++ b/src/devices/bus/ekara/slot.cpp @@ -54,7 +54,7 @@ void device_ekara_cart_interface::rom_alloc(uint32_t size) //------------------------------------------------- // ekara_cart_slot_device - constructor //------------------------------------------------- -ekara_cart_slot_device::ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ekara_cart_slot_device::ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EKARA_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/ekara/slot.h b/src/devices/bus/ekara/slot.h index 29cdc7f81de..37d5df75155 100644 --- a/src/devices/bus/ekara/slot.h +++ b/src/devices/bus/ekara/slot.h @@ -66,10 +66,10 @@ class ekara_cart_slot_device : public device_t, { public: // construction/destruction - ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + ekara_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : ekara_cart_slot_device(mconfig, tag, owner, clock) { option_reset(); diff --git a/src/devices/bus/electron/cart/abr.cpp b/src/devices/bus/electron/cart/abr.cpp index 0c82ca65782..af1e4fbd3ab 100644 --- a/src/devices/bus/electron/cart/abr.cpp +++ b/src/devices/bus/electron/cart/abr.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(ELECTRON_ABR, electron_abr_device, "electron_abr", "Electron // electron_abr_device - constructor //------------------------------------------------- -electron_abr_device::electron_abr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_abr_device::electron_abr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_ABR, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) { diff --git a/src/devices/bus/electron/cart/abr.h b/src/devices/bus/electron/cart/abr.h index 3ef92c95a8d..d7c1fc6649f 100644 --- a/src/devices/bus/electron/cart/abr.h +++ b/src/devices/bus/electron/cart/abr.h @@ -25,7 +25,7 @@ class electron_abr_device : public device_t, { public: // construction/destruction - electron_abr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_abr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/ap34.cpp b/src/devices/bus/electron/cart/ap34.cpp index ecb3b9da30c..5f4d4659ab7 100644 --- a/src/devices/bus/electron/cart/ap34.cpp +++ b/src/devices/bus/electron/cart/ap34.cpp @@ -61,7 +61,7 @@ void electron_ap34_device::device_add_mconfig(machine_config &config) // electron_ap34_device - constructor //------------------------------------------------- -electron_ap34_device::electron_ap34_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_ap34_device::electron_ap34_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_AP34, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_fdc(*this, "fdc") diff --git a/src/devices/bus/electron/cart/ap34.h b/src/devices/bus/electron/cart/ap34.h index ac84e7cd58f..3c3f762d7b8 100644 --- a/src/devices/bus/electron/cart/ap34.h +++ b/src/devices/bus/electron/cart/ap34.h @@ -26,7 +26,7 @@ class electron_ap34_device : { public: // construction/destruction - electron_ap34_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_ap34_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/ap5.cpp b/src/devices/bus/electron/cart/ap5.cpp index 90c4188d7b1..6862015154d 100644 --- a/src/devices/bus/electron/cart/ap5.cpp +++ b/src/devices/bus/electron/cart/ap5.cpp @@ -63,7 +63,7 @@ void electron_ap5_device::device_add_mconfig(machine_config &config) // electron_ap5_device - constructor //------------------------------------------------- -electron_ap5_device::electron_ap5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_ap5_device::electron_ap5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_AP5, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_irqs(*this, "irqs") diff --git a/src/devices/bus/electron/cart/ap5.h b/src/devices/bus/electron/cart/ap5.h index 9e69c775c63..f1b23f4c0f2 100644 --- a/src/devices/bus/electron/cart/ap5.h +++ b/src/devices/bus/electron/cart/ap5.h @@ -28,7 +28,7 @@ class electron_ap5_device : { public: // construction/destruction - electron_ap5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_ap5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/aqr.cpp b/src/devices/bus/electron/cart/aqr.cpp index 8be0176efc4..ba7a411078a 100644 --- a/src/devices/bus/electron/cart/aqr.cpp +++ b/src/devices/bus/electron/cart/aqr.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(ELECTRON_AQR, electron_aqr_device, "electron_aqr", "Electron // electron_aqr_device - constructor //------------------------------------------------- -electron_aqr_device::electron_aqr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_aqr_device::electron_aqr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_AQR, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_page_register(0) diff --git a/src/devices/bus/electron/cart/aqr.h b/src/devices/bus/electron/cart/aqr.h index 820f967b5cf..c267415e030 100644 --- a/src/devices/bus/electron/cart/aqr.h +++ b/src/devices/bus/electron/cart/aqr.h @@ -25,7 +25,7 @@ class electron_aqr_device : public device_t, { public: // construction/destruction - electron_aqr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_aqr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/click.cpp b/src/devices/bus/electron/cart/click.cpp index 46bb123c9e4..4dfd48592ba 100644 --- a/src/devices/bus/electron/cart/click.cpp +++ b/src/devices/bus/electron/cart/click.cpp @@ -57,7 +57,7 @@ ioport_constructor electron_click_device::device_input_ports() const // electron_click_device - constructor //------------------------------------------------- -electron_click_device::electron_click_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_click_device::electron_click_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_CLICK, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_rtc(*this, "rtc") diff --git a/src/devices/bus/electron/cart/click.h b/src/devices/bus/electron/cart/click.h index cb7dd114687..4ddcd6c7ab7 100644 --- a/src/devices/bus/electron/cart/click.h +++ b/src/devices/bus/electron/cart/click.h @@ -28,7 +28,7 @@ class electron_click_device : public device_t, { public: // construction/destruction - electron_click_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_click_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(click_button); diff --git a/src/devices/bus/electron/cart/cumana.cpp b/src/devices/bus/electron/cart/cumana.cpp index 9b854871e59..68782806942 100644 --- a/src/devices/bus/electron/cart/cumana.cpp +++ b/src/devices/bus/electron/cart/cumana.cpp @@ -67,7 +67,7 @@ void electron_cumana_device::device_add_mconfig(machine_config &config) // electron_cumana_device - constructor //------------------------------------------------- -electron_cumana_device::electron_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_cumana_device::electron_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_CUMANA, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_fdc(*this, "fdc") diff --git a/src/devices/bus/electron/cart/cumana.h b/src/devices/bus/electron/cart/cumana.h index 2dce4bbc78c..5672952f7d7 100644 --- a/src/devices/bus/electron/cart/cumana.h +++ b/src/devices/bus/electron/cart/cumana.h @@ -27,7 +27,7 @@ class electron_cumana_device : { public: // construction/destruction - electron_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/elksdp1.cpp b/src/devices/bus/electron/cart/elksdp1.cpp index c2baf7e7801..241d073c27f 100644 --- a/src/devices/bus/electron/cart/elksdp1.cpp +++ b/src/devices/bus/electron/cart/elksdp1.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(ELECTRON_ELKSDP1, electron_elksdp1_device, "electron_elksdp1" void electron_elksdp1_device::device_add_mconfig(machine_config &config) { - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set([this](int state) { m_in_bit = state; }); } @@ -38,7 +38,7 @@ void electron_elksdp1_device::device_add_mconfig(machine_config &config) // electron_elksdp1_device - constructor //------------------------------------------------- -electron_elksdp1_device::electron_elksdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_elksdp1_device::electron_elksdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_ELKSDP1, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_sdcard(*this, "sdcard") diff --git a/src/devices/bus/electron/cart/elksdp1.h b/src/devices/bus/electron/cart/elksdp1.h index d0f606591ec..61267e4a990 100644 --- a/src/devices/bus/electron/cart/elksdp1.h +++ b/src/devices/bus/electron/cart/elksdp1.h @@ -21,7 +21,7 @@ class electron_elksdp1_device : public device_t, public device_electron_cart_int { public: // construction/destruction - electron_elksdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_elksdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/mgc.cpp b/src/devices/bus/electron/cart/mgc.cpp index 5f80559c47a..99f8bedb560 100644 --- a/src/devices/bus/electron/cart/mgc.cpp +++ b/src/devices/bus/electron/cart/mgc.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(ELECTRON_MGC, electron_mgc_device, "electron_mgc", "Electron // electron_mgc_device - constructor //------------------------------------------------- -electron_mgc_device::electron_mgc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_mgc_device::electron_mgc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_MGC, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_page_latch(0) diff --git a/src/devices/bus/electron/cart/mgc.h b/src/devices/bus/electron/cart/mgc.h index bf23aa34391..f089b6fb0c2 100644 --- a/src/devices/bus/electron/cart/mgc.h +++ b/src/devices/bus/electron/cart/mgc.h @@ -25,7 +25,7 @@ class electron_mgc_device : public device_t, { public: // construction/destruction - electron_mgc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_mgc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/peg400.cpp b/src/devices/bus/electron/cart/peg400.cpp index cba69099613..a685516d67d 100644 --- a/src/devices/bus/electron/cart/peg400.cpp +++ b/src/devices/bus/electron/cart/peg400.cpp @@ -60,7 +60,7 @@ void electron_peg400_device::device_add_mconfig(machine_config &config) // electron_peg400_device - constructor //------------------------------------------------- -electron_peg400_device::electron_peg400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_peg400_device::electron_peg400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_PEG400, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_fdc(*this, "fdc") diff --git a/src/devices/bus/electron/cart/peg400.h b/src/devices/bus/electron/cart/peg400.h index 141cc1fe02f..95418380c12 100644 --- a/src/devices/bus/electron/cart/peg400.h +++ b/src/devices/bus/electron/cart/peg400.h @@ -24,7 +24,7 @@ class electron_peg400_device : { public: // construction/destruction - electron_peg400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_peg400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/romp144.cpp b/src/devices/bus/electron/cart/romp144.cpp index 8bdeab7cc34..57ba5066ca4 100644 --- a/src/devices/bus/electron/cart/romp144.cpp +++ b/src/devices/bus/electron/cart/romp144.cpp @@ -49,7 +49,7 @@ void electron_romp144_device::device_add_mconfig(machine_config &config) // electron_romp144_device - constructor //------------------------------------------------- -electron_romp144_device::electron_romp144_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_romp144_device::electron_romp144_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_ROMP144, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_romslot(*this, "rom%u", 7) diff --git a/src/devices/bus/electron/cart/romp144.h b/src/devices/bus/electron/cart/romp144.h index 45916a3ab38..240788191c3 100644 --- a/src/devices/bus/electron/cart/romp144.h +++ b/src/devices/bus/electron/cart/romp144.h @@ -23,7 +23,7 @@ class electron_romp144_device : { public: // construction/destruction - electron_romp144_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_romp144_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/rs423.cpp b/src/devices/bus/electron/cart/rs423.cpp index 68838a4cae2..746b27900d7 100644 --- a/src/devices/bus/electron/cart/rs423.cpp +++ b/src/devices/bus/electron/cart/rs423.cpp @@ -43,7 +43,7 @@ void electron_rs423_device::device_add_mconfig(machine_config &config) // electron_rs423_device - constructor //------------------------------------------------- -electron_rs423_device::electron_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_rs423_device::electron_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_RS423, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_duart(*this, "duart") diff --git a/src/devices/bus/electron/cart/rs423.h b/src/devices/bus/electron/cart/rs423.h index 0068b9c701e..9fc582cd68d 100644 --- a/src/devices/bus/electron/cart/rs423.h +++ b/src/devices/bus/electron/cart/rs423.h @@ -22,7 +22,7 @@ class electron_rs423_device : { public: // construction/destruction - electron_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_rs423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/slot.cpp b/src/devices/bus/electron/cart/slot.cpp index bcdff13233d..9268c2d5d03 100644 --- a/src/devices/bus/electron/cart/slot.cpp +++ b/src/devices/bus/electron/cart/slot.cpp @@ -89,7 +89,7 @@ void device_electron_cart_interface::nvram_alloc(uint32_t size) //------------------------------------------------- // electron_cartslot_device - constructor //------------------------------------------------- -electron_cartslot_device::electron_cartslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +electron_cartslot_device::electron_cartslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), @@ -99,7 +99,7 @@ electron_cartslot_device::electron_cartslot_device(const machine_config &mconfig { } -electron_cartslot_device::electron_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +electron_cartslot_device::electron_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : electron_cartslot_device(mconfig, ELECTRON_CARTSLOT, tag, owner, clock) { } diff --git a/src/devices/bus/electron/cart/slot.h b/src/devices/bus/electron/cart/slot.h index b71da09d5ae..a03b6ca63eb 100644 --- a/src/devices/bus/electron/cart/slot.h +++ b/src/devices/bus/electron/cart/slot.h @@ -121,7 +121,7 @@ class electron_cartslot_device : public device_t, public: // construction/destruction template - electron_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&slot_options, const char *default_option) + electron_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&slot_options, const char *default_option) : electron_cartslot_device(mconfig, tag, owner, clock) { option_reset(); @@ -130,7 +130,7 @@ public: set_fixed(false); } - electron_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto irq_handler() { return m_irq_handler.bind(); } @@ -158,7 +158,7 @@ public: DECLARE_WRITE_LINE_MEMBER(nmi_w) { m_nmi_handler(state); } protected: - electron_cartslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + electron_cartslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/electron/cart/sndexp.cpp b/src/devices/bus/electron/cart/sndexp.cpp index 9ca096adbfd..fa587549f7b 100644 --- a/src/devices/bus/electron/cart/sndexp.cpp +++ b/src/devices/bus/electron/cart/sndexp.cpp @@ -60,7 +60,7 @@ ioport_constructor electron_sndexp_device::device_input_ports() const // electron_sndexp_device - constructor //------------------------------------------------- -electron_sndexp_device::electron_sndexp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_sndexp_device::electron_sndexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_SNDEXP, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_sn(*this, "sn76489") diff --git a/src/devices/bus/electron/cart/sndexp.h b/src/devices/bus/electron/cart/sndexp.h index f222185aa5f..1eb70a91c0a 100644 --- a/src/devices/bus/electron/cart/sndexp.h +++ b/src/devices/bus/electron/cart/sndexp.h @@ -22,7 +22,7 @@ class electron_sndexp_device : { public: // construction/destruction - electron_sndexp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_sndexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/sndexp3.cpp b/src/devices/bus/electron/cart/sndexp3.cpp index f39fb90c414..925dfb1346f 100644 --- a/src/devices/bus/electron/cart/sndexp3.cpp +++ b/src/devices/bus/electron/cart/sndexp3.cpp @@ -39,7 +39,7 @@ void electron_sndexp3_device::device_add_mconfig(machine_config &config) // electron_sndexp3_device - constructor //------------------------------------------------- -electron_sndexp3_device::electron_sndexp3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_sndexp3_device::electron_sndexp3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_SNDEXP3, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_sn(*this, "sn76489") diff --git a/src/devices/bus/electron/cart/sndexp3.h b/src/devices/bus/electron/cart/sndexp3.h index 95d437b63e2..455ea7a9a66 100644 --- a/src/devices/bus/electron/cart/sndexp3.h +++ b/src/devices/bus/electron/cart/sndexp3.h @@ -22,7 +22,7 @@ class electron_sndexp3_device : { public: // construction/destruction - electron_sndexp3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_sndexp3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/sp64.cpp b/src/devices/bus/electron/cart/sp64.cpp index 9b5d497999e..3b811207a72 100644 --- a/src/devices/bus/electron/cart/sp64.cpp +++ b/src/devices/bus/electron/cart/sp64.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(ELECTRON_SP64, electron_sp64_device, "electron_sp64", "Slogge // electron_sp64_device - constructor //------------------------------------------------- -electron_sp64_device::electron_sp64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_sp64_device::electron_sp64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_SP64, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_page_register(0) diff --git a/src/devices/bus/electron/cart/sp64.h b/src/devices/bus/electron/cart/sp64.h index 68954fc9d30..2466621ad47 100644 --- a/src/devices/bus/electron/cart/sp64.h +++ b/src/devices/bus/electron/cart/sp64.h @@ -25,7 +25,7 @@ class electron_sp64_device : public device_t, { public: // construction/destruction - electron_sp64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_sp64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/std.cpp b/src/devices/bus/electron/cart/std.cpp index f2b7333f347..6bbad0f3f78 100644 --- a/src/devices/bus/electron/cart/std.cpp +++ b/src/devices/bus/electron/cart/std.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(ELECTRON_STDCART, electron_stdcart_device, "electron_stdcart" // electron_stdcart_device - constructor //------------------------------------------------- -electron_stdcart_device::electron_stdcart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_stdcart_device::electron_stdcart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_STDCART, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) { diff --git a/src/devices/bus/electron/cart/std.h b/src/devices/bus/electron/cart/std.h index 3fc9cefbcd9..dae32559841 100644 --- a/src/devices/bus/electron/cart/std.h +++ b/src/devices/bus/electron/cart/std.h @@ -24,7 +24,7 @@ class electron_stdcart_device : public device_t, { public: // construction/destruction - electron_stdcart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_stdcart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/stlefs.cpp b/src/devices/bus/electron/cart/stlefs.cpp index 462ead401d1..0f1932976c4 100644 --- a/src/devices/bus/electron/cart/stlefs.cpp +++ b/src/devices/bus/electron/cart/stlefs.cpp @@ -70,7 +70,7 @@ void electron_stlefs_device::device_add_mconfig(machine_config &config) // electron_stlefs_device - constructor //------------------------------------------------- -electron_stlefs_device::electron_stlefs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_stlefs_device::electron_stlefs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_STLEFS, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_irqs(*this, "irqs") diff --git a/src/devices/bus/electron/cart/stlefs.h b/src/devices/bus/electron/cart/stlefs.h index 2ff8e53ea87..2b0e33214d3 100644 --- a/src/devices/bus/electron/cart/stlefs.h +++ b/src/devices/bus/electron/cart/stlefs.h @@ -28,7 +28,7 @@ class electron_stlefs_device : { public: // construction/destruction - electron_stlefs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_stlefs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/cart/tube.cpp b/src/devices/bus/electron/cart/tube.cpp index 02dcd00275d..e4cea6d5a49 100644 --- a/src/devices/bus/electron/cart/tube.cpp +++ b/src/devices/bus/electron/cart/tube.cpp @@ -37,7 +37,7 @@ void electron_tube_device::device_add_mconfig(machine_config &config) // electron_tube_device - constructor //------------------------------------------------- -electron_tube_device::electron_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_tube_device::electron_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_TUBE, tag, owner, clock) , device_electron_cart_interface(mconfig, *this) , m_tube(*this, "tube") diff --git a/src/devices/bus/electron/cart/tube.h b/src/devices/bus/electron/cart/tube.h index 1d239ef5215..579c68fbdc0 100644 --- a/src/devices/bus/electron/cart/tube.h +++ b/src/devices/bus/electron/cart/tube.h @@ -22,7 +22,7 @@ class electron_tube_device : { public: // construction/destruction - electron_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/elksd128.cpp b/src/devices/bus/electron/elksd128.cpp index 302144bb343..12179d61ba3 100644 --- a/src/devices/bus/electron/elksd128.cpp +++ b/src/devices/bus/electron/elksd128.cpp @@ -57,7 +57,7 @@ ROM_END void electron_elksd128_device::device_add_mconfig(machine_config &config) { - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set([this](int state) { m_in_bit = state; }); } @@ -78,7 +78,7 @@ const tiny_rom_entry *electron_elksd128_device::device_rom_region() const // electron_elksd128_device - constructor //------------------------------------------------- -electron_elksd128_device::electron_elksd128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_elksd128_device::electron_elksd128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_ELKSD128, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_flash(*this, "flash") diff --git a/src/devices/bus/electron/elksd128.h b/src/devices/bus/electron/elksd128.h index 48ff1375ea9..bde97f588a7 100644 --- a/src/devices/bus/electron/elksd128.h +++ b/src/devices/bus/electron/elksd128.h @@ -24,7 +24,7 @@ class electron_elksd128_device: { public: // construction/destruction - electron_elksd128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_elksd128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/elksd64.cpp b/src/devices/bus/electron/elksd64.cpp index c76c9a8c685..030fc3732f0 100644 --- a/src/devices/bus/electron/elksd64.cpp +++ b/src/devices/bus/electron/elksd64.cpp @@ -38,7 +38,7 @@ ROM_END void electron_elksd64_device::device_add_mconfig(machine_config &config) { - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set([this](int state) { m_status = state << 7; }); } @@ -59,7 +59,7 @@ const tiny_rom_entry *electron_elksd64_device::device_rom_region() const // electron_elksd64_device - constructor //------------------------------------------------- -electron_elksd64_device::electron_elksd64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_elksd64_device::electron_elksd64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_ELKSD64, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_flash(*this, "flash") diff --git a/src/devices/bus/electron/elksd64.h b/src/devices/bus/electron/elksd64.h index d21b9595fc0..093eaf34a5b 100644 --- a/src/devices/bus/electron/elksd64.h +++ b/src/devices/bus/electron/elksd64.h @@ -24,7 +24,7 @@ class electron_elksd64_device: { public: // construction/destruction - electron_elksd64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_elksd64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/exp.cpp b/src/devices/bus/electron/exp.cpp index 6e9b1c6a2e4..097111bcb28 100644 --- a/src/devices/bus/electron/exp.cpp +++ b/src/devices/bus/electron/exp.cpp @@ -40,7 +40,7 @@ device_electron_expansion_interface::device_electron_expansion_interface(const m // electron_expansion_slot_device - constructor //------------------------------------------------- -electron_expansion_slot_device::electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +electron_expansion_slot_device::electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/electron/exp.h b/src/devices/bus/electron/exp.h index ea0c435a4be..b1895f62cac 100644 --- a/src/devices/bus/electron/exp.h +++ b/src/devices/bus/electron/exp.h @@ -103,7 +103,7 @@ class electron_expansion_slot_device : public device_t, public device_single_car public: // construction/destruction template - electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : electron_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -111,7 +111,7 @@ public: set_default_option(dflt); set_fixed(false); } - electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/bus/electron/fbjoy.cpp b/src/devices/bus/electron/fbjoy.cpp index e5a4042cfeb..19012c64572 100644 --- a/src/devices/bus/electron/fbjoy.cpp +++ b/src/devices/bus/electron/fbjoy.cpp @@ -46,7 +46,7 @@ ioport_constructor electron_fbjoy_device::device_input_ports() const // electron_fbjoy_device - constructor //------------------------------------------------- -electron_fbjoy_device::electron_fbjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_fbjoy_device::electron_fbjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_FBJOY, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_joy(*this, "JOY") diff --git a/src/devices/bus/electron/fbjoy.h b/src/devices/bus/electron/fbjoy.h index d9faaa6cd15..4ea31227377 100644 --- a/src/devices/bus/electron/fbjoy.h +++ b/src/devices/bus/electron/fbjoy.h @@ -28,7 +28,7 @@ class electron_fbjoy_device : { public: // construction/destruction - electron_fbjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_fbjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/electron/fbprint.cpp b/src/devices/bus/electron/fbprint.cpp index 00bb056db75..6952e78144d 100644 --- a/src/devices/bus/electron/fbprint.cpp +++ b/src/devices/bus/electron/fbprint.cpp @@ -39,7 +39,7 @@ void electron_fbprint_device::device_add_mconfig(machine_config &config) // electron_fbprint_device - constructor //------------------------------------------------- -electron_fbprint_device::electron_fbprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_fbprint_device::electron_fbprint_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_FBPRINT, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_centronics(*this, "centronics") diff --git a/src/devices/bus/electron/fbprint.h b/src/devices/bus/electron/fbprint.h index f279e216943..4cb598ae6cb 100644 --- a/src/devices/bus/electron/fbprint.h +++ b/src/devices/bus/electron/fbprint.h @@ -24,7 +24,7 @@ class electron_fbprint_device: { public: // construction/destruction - electron_fbprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_fbprint_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/m2105.cpp b/src/devices/bus/electron/m2105.cpp index 35ba1e40e13..9c40e47482d 100644 --- a/src/devices/bus/electron/m2105.cpp +++ b/src/devices/bus/electron/m2105.cpp @@ -116,7 +116,7 @@ void electron_m2105_device::device_add_mconfig(machine_config &config) TMS6100(config, "tms6100", 640000/4); - tms5220_device &tms(TMS5220(config, "tms5220", 640000)); + tms5220_device &tms(TMS5220(config, "tms5220", XTAL::u(640000))); tms.ready_cb().set(m_via[0], FUNC(via6522_device::write_ca1)); tms.ready_cb().append(m_via[0], FUNC(via6522_device::write_pb2)); tms.irq_cb().set(m_via[0], FUNC(via6522_device::write_ca2)); @@ -144,7 +144,7 @@ const tiny_rom_entry *electron_m2105_device::device_rom_region() const // electron_m2105_device - constructor //------------------------------------------------- -electron_m2105_device::electron_m2105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_m2105_device::electron_m2105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_M2105, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_exp_rom(*this, "exp_rom") diff --git a/src/devices/bus/electron/m2105.h b/src/devices/bus/electron/m2105.h index 07c5ffc35c4..d0afe533562 100644 --- a/src/devices/bus/electron/m2105.h +++ b/src/devices/bus/electron/m2105.h @@ -32,7 +32,7 @@ class electron_m2105_device: { public: // construction/destruction - electron_m2105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_m2105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/electron/mc68k.cpp b/src/devices/bus/electron/mc68k.cpp index 06e39350977..8650430fc51 100644 --- a/src/devices/bus/electron/mc68k.cpp +++ b/src/devices/bus/electron/mc68k.cpp @@ -92,14 +92,14 @@ void electron_mc68k_device::device_add_mconfig(machine_config &config) RAM(config, m_ram).set_default_size("256K").set_extra_options("64K,128K,192K"); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->writepb_handler().set(m_pia[1], FUNC(pia6821_device::set_a_input)); m_pia[0]->ca2_handler().set(m_pia[1], FUNC(pia6821_device::cb1_w)); m_pia[0]->cb2_handler().set(m_pia[1], FUNC(pia6821_device::ca1_w)); m_pia[0]->irqa_handler().set("irq_ipl0", FUNC(input_merger_device::in_w<0>)); m_pia[0]->irqb_handler().set("irq_ipl0", FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->writepb_handler().set(m_pia[0], FUNC(pia6821_device::set_a_input)); m_pia[1]->ca2_handler().set(m_pia[0], FUNC(pia6821_device::cb1_w)); m_pia[1]->cb2_handler().set(m_pia[0], FUNC(pia6821_device::ca1_w)); @@ -109,7 +109,7 @@ void electron_mc68k_device::device_add_mconfig(machine_config &config) via6522_device &via(MOS6522(config, "via", 10_MHz_XTAL / 10)); via.irq_handler().set("irq_ipl1", FUNC(input_merger_device::in_w<0>)); - acia6850_device &acia(ACIA6850(config, "acia", 0)); + acia6850_device &acia(ACIA6850(config, "acia")); acia.irq_handler().set("irq_ipl1", FUNC(input_merger_device::in_w<1>)); clock_device &acia_clock(CLOCK(config, "acia_clock", 3.6864_MHz_XTAL / 12)); @@ -130,7 +130,7 @@ const tiny_rom_entry *electron_mc68k_device::device_rom_region() const // electron_mc68k_device - constructor //------------------------------------------------- -electron_mc68k_device::electron_mc68k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +electron_mc68k_device::electron_mc68k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_MC68K, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/electron/mc68k.h b/src/devices/bus/electron/mc68k.h index c469d06e357..ef27b553e3b 100644 --- a/src/devices/bus/electron/mc68k.h +++ b/src/devices/bus/electron/mc68k.h @@ -27,7 +27,7 @@ class electron_mc68k_device: { public: // construction/destruction - electron_mc68k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_mc68k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/mode7.cpp b/src/devices/bus/electron/mode7.cpp index 408b6a92300..5093b84499e 100644 --- a/src/devices/bus/electron/mode7.cpp +++ b/src/devices/bus/electron/mode7.cpp @@ -95,7 +95,7 @@ const tiny_rom_entry *electron_mode7_device::device_rom_region() const // electron_mode7_device - constructor //------------------------------------------------- -electron_mode7_device::electron_mode7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_mode7_device::electron_mode7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_MODE7, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_screen(*this, "screen") diff --git a/src/devices/bus/electron/mode7.h b/src/devices/bus/electron/mode7.h index b3c447ee87d..afd1641aceb 100644 --- a/src/devices/bus/electron/mode7.h +++ b/src/devices/bus/electron/mode7.h @@ -27,7 +27,7 @@ public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - electron_mode7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_mode7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(break_button); diff --git a/src/devices/bus/electron/plus1.cpp b/src/devices/bus/electron/plus1.cpp index e9aa67bb16b..6e5511ac7ef 100644 --- a/src/devices/bus/electron/plus1.cpp +++ b/src/devices/bus/electron/plus1.cpp @@ -171,7 +171,7 @@ const tiny_rom_entry *electron_ap6_device::device_rom_region() const // electron_plus1_device - constructor //------------------------------------------------- -electron_plus1_device::electron_plus1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +electron_plus1_device::electron_plus1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_irqs(*this, "irqs") @@ -188,17 +188,17 @@ electron_plus1_device::electron_plus1_device(const machine_config &mconfig, devi { } -electron_plus1_device::electron_plus1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_plus1_device::electron_plus1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : electron_plus1_device(mconfig, ELECTRON_PLUS1, tag, owner, clock) { } -electron_ap1_device::electron_ap1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_ap1_device::electron_ap1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : electron_plus1_device(mconfig, ELECTRON_AP1, tag, owner, clock) { } -electron_ap6_device::electron_ap6_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +electron_ap6_device::electron_ap6_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : electron_plus1_device(mconfig, ELECTRON_AP6, tag, owner, clock) , m_rom(*this, "rom%u", 1) , m_links(*this, "LINKS") diff --git a/src/devices/bus/electron/plus1.h b/src/devices/bus/electron/plus1.h index bdfd35808e7..f48433e37aa 100644 --- a/src/devices/bus/electron/plus1.h +++ b/src/devices/bus/electron/plus1.h @@ -29,10 +29,10 @@ class electron_plus1_device: { public: // construction/destruction - electron_plus1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_plus1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - electron_plus1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + electron_plus1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -62,7 +62,7 @@ protected: class electron_ap1_device : public electron_plus1_device { public: - electron_ap1_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + electron_ap1_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // optional information overrides @@ -73,7 +73,7 @@ protected: class electron_ap6_device : public electron_plus1_device { public: - electron_ap6_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + electron_ap6_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/plus2.cpp b/src/devices/bus/electron/plus2.cpp index 7a75524ed5c..6f8f68982f1 100644 --- a/src/devices/bus/electron/plus2.cpp +++ b/src/devices/bus/electron/plus2.cpp @@ -76,7 +76,7 @@ void electron_plus2_device::device_add_mconfig(machine_config &config) // electron_plus2_device - constructor //------------------------------------------------- -electron_plus2_device::electron_plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_plus2_device::electron_plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_PLUS2, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_irqs(*this, "irqs") diff --git a/src/devices/bus/electron/plus2.h b/src/devices/bus/electron/plus2.h index 04e3a280377..390b1ae7277 100644 --- a/src/devices/bus/electron/plus2.h +++ b/src/devices/bus/electron/plus2.h @@ -28,7 +28,7 @@ class electron_plus2_device: { public: // construction/destruction - electron_plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_plus2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/plus3.cpp b/src/devices/bus/electron/plus3.cpp index 1589bc722b9..cd7b85e0f1b 100644 --- a/src/devices/bus/electron/plus3.cpp +++ b/src/devices/bus/electron/plus3.cpp @@ -99,7 +99,7 @@ const tiny_rom_entry *electron_plus3_device::device_rom_region() const // electron_plus3_device - constructor //------------------------------------------------- -electron_plus3_device::electron_plus3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_plus3_device::electron_plus3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_PLUS3, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_exp(*this, "exp") diff --git a/src/devices/bus/electron/plus3.h b/src/devices/bus/electron/plus3.h index 2854557675b..8f0a5638a83 100644 --- a/src/devices/bus/electron/plus3.h +++ b/src/devices/bus/electron/plus3.h @@ -24,7 +24,7 @@ class electron_plus3_device: { public: // construction/destruction - electron_plus3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_plus3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/pwrjoy.cpp b/src/devices/bus/electron/pwrjoy.cpp index 1ff7ab79566..38f1a11703b 100644 --- a/src/devices/bus/electron/pwrjoy.cpp +++ b/src/devices/bus/electron/pwrjoy.cpp @@ -55,7 +55,7 @@ const tiny_rom_entry *electron_pwrjoy_device::device_rom_region() const // electron_pwrjoy_device - constructor //------------------------------------------------- -electron_pwrjoy_device::electron_pwrjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_pwrjoy_device::electron_pwrjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_PWRJOY, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_exp_rom(*this, "exp_rom") diff --git a/src/devices/bus/electron/pwrjoy.h b/src/devices/bus/electron/pwrjoy.h index abc91cf3e2b..cf72e5f8284 100644 --- a/src/devices/bus/electron/pwrjoy.h +++ b/src/devices/bus/electron/pwrjoy.h @@ -26,7 +26,7 @@ class electron_pwrjoy_device : { public: // construction/destruction - electron_pwrjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_pwrjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/electron/rombox.cpp b/src/devices/bus/electron/rombox.cpp index 47040271e7f..e6cdb9f8c04 100644 --- a/src/devices/bus/electron/rombox.cpp +++ b/src/devices/bus/electron/rombox.cpp @@ -85,7 +85,7 @@ void electron_rombox_device::device_add_mconfig(machine_config &config) // electron_rombox_device - constructor //------------------------------------------------- -electron_rombox_device::electron_rombox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_rombox_device::electron_rombox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_ROMBOX, tag, owner, clock), device_electron_expansion_interface(mconfig, *this), m_exp(*this, "exp"), diff --git a/src/devices/bus/electron/rombox.h b/src/devices/bus/electron/rombox.h index 65ed2fa80d8..b18fc522904 100644 --- a/src/devices/bus/electron/rombox.h +++ b/src/devices/bus/electron/rombox.h @@ -24,7 +24,7 @@ class electron_rombox_device: { public: // construction/destruction - electron_rombox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_rombox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/romboxp.cpp b/src/devices/bus/electron/romboxp.cpp index 59d83bc4121..2a53446c6ff 100644 --- a/src/devices/bus/electron/romboxp.cpp +++ b/src/devices/bus/electron/romboxp.cpp @@ -120,7 +120,7 @@ const tiny_rom_entry *electron_romboxp_device::device_rom_region() const // electron_romboxp_device - constructor //------------------------------------------------- -electron_romboxp_device::electron_romboxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_romboxp_device::electron_romboxp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_ROMBOXP, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_irqs(*this, "irqs") diff --git a/src/devices/bus/electron/romboxp.h b/src/devices/bus/electron/romboxp.h index 62b2124c913..2a3b1b02de2 100644 --- a/src/devices/bus/electron/romboxp.h +++ b/src/devices/bus/electron/romboxp.h @@ -29,7 +29,7 @@ class electron_romboxp_device: { public: // construction/destruction - electron_romboxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_romboxp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/electron/sidewndr.cpp b/src/devices/bus/electron/sidewndr.cpp index a2ab8011b09..0702b416c70 100644 --- a/src/devices/bus/electron/sidewndr.cpp +++ b/src/devices/bus/electron/sidewndr.cpp @@ -84,7 +84,7 @@ const tiny_rom_entry *electron_sidewndr_device::device_rom_region() const // electron_sidewndr_device - constructor //------------------------------------------------- -electron_sidewndr_device::electron_sidewndr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +electron_sidewndr_device::electron_sidewndr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELECTRON_SIDEWNDR, tag, owner, clock) , device_electron_expansion_interface(mconfig, *this) , m_exp(*this, "exp") diff --git a/src/devices/bus/electron/sidewndr.h b/src/devices/bus/electron/sidewndr.h index 2e1dea53087..5199d8ffdc5 100644 --- a/src/devices/bus/electron/sidewndr.h +++ b/src/devices/bus/electron/sidewndr.h @@ -24,7 +24,7 @@ class electron_sidewndr_device: { public: // construction/destruction - electron_sidewndr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + electron_sidewndr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ep64/exdos.cpp b/src/devices/bus/ep64/exdos.cpp index 37f382955eb..d18378e053d 100644 --- a/src/devices/bus/ep64/exdos.cpp +++ b/src/devices/bus/ep64/exdos.cpp @@ -124,7 +124,7 @@ void ep64_exdos_device::device_add_mconfig(machine_config &config) // ep64_exdos_device - constructor //------------------------------------------------- -ep64_exdos_device::ep64_exdos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ep64_exdos_device::ep64_exdos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EP64_EXDOS, tag, owner, clock), device_ep64_expansion_bus_card_interface(mconfig, *this), m_fdc(*this, WD1770_TAG), diff --git a/src/devices/bus/ep64/exdos.h b/src/devices/bus/ep64/exdos.h index cb5f9d47cc7..9407c1056af 100644 --- a/src/devices/bus/ep64/exdos.h +++ b/src/devices/bus/ep64/exdos.h @@ -29,7 +29,7 @@ class ep64_exdos_device : public device_t, { public: // construction/destruction - ep64_exdos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ep64_exdos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(); void write(uint8_t data); diff --git a/src/devices/bus/ep64/exp.cpp b/src/devices/bus/ep64/exp.cpp index ebd423cfc7f..293701edcae 100644 --- a/src/devices/bus/ep64/exp.cpp +++ b/src/devices/bus/ep64/exp.cpp @@ -43,7 +43,7 @@ device_ep64_expansion_bus_card_interface::device_ep64_expansion_bus_card_interfa // ep64_expansion_bus_slot_device - constructor //------------------------------------------------- -ep64_expansion_bus_slot_device::ep64_expansion_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ep64_expansion_bus_slot_device::ep64_expansion_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EP64_EXPANSION_BUS_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_write_irq(*this) diff --git a/src/devices/bus/ep64/exp.h b/src/devices/bus/ep64/exp.h index 354d6f0691e..d5030e24e06 100644 --- a/src/devices/bus/ep64/exp.h +++ b/src/devices/bus/ep64/exp.h @@ -66,14 +66,14 @@ class ep64_expansion_bus_slot_device : public device_t, public: // construction/destruction ep64_expansion_bus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, char const *dflt) - : ep64_expansion_bus_slot_device(mconfig, tag, owner, (uint32_t)0) + : ep64_expansion_bus_slot_device(mconfig, tag, owner) { option_reset(); ep64_expansion_bus_cards(*this); set_default_option(dflt); set_fixed(false); } - ep64_expansion_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ep64_expansion_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_program_space(T &&tag, int spacenum) { m_program_space.set_tag(std::forward(tag), spacenum); } template void set_io_space(T &&tag, int spacenum) { m_io_space.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/epson_qx/multifont.cpp b/src/devices/bus/epson_qx/multifont.cpp index 8349af95dea..38ab373e725 100644 --- a/src/devices/bus/epson_qx/multifont.cpp +++ b/src/devices/bus/epson_qx/multifont.cpp @@ -92,7 +92,7 @@ INPUT_PORTS_END //------------------------------------------------- // multifont_device - constructor //------------------------------------------------- -multifont_device::multifont_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +multifont_device::multifont_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPSON_QX_OPTION_MULTIFONT, tag, owner, clock), device_option_expansion_interface(mconfig, *this), m_mcu(*this, "mcu"), diff --git a/src/devices/bus/epson_qx/multifont.h b/src/devices/bus/epson_qx/multifont.h index 85cd6739286..7e9839f2d90 100644 --- a/src/devices/bus/epson_qx/multifont.h +++ b/src/devices/bus/epson_qx/multifont.h @@ -27,7 +27,7 @@ class multifont_device : public device_t, public bus::epson_qx::device_option_ex { public: // construction/destruction - multifont_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + multifont_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/epson_qx/option.cpp b/src/devices/bus/epson_qx/option.cpp index 5b6ad3a0f3e..7096be2d10c 100644 --- a/src/devices/bus/epson_qx/option.cpp +++ b/src/devices/bus/epson_qx/option.cpp @@ -24,7 +24,7 @@ namespace bus::epson_qx { //------------------------------------------------- // option_bus_slot_device - constructor //------------------------------------------------- -option_slot_device::option_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +option_slot_device::option_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPSON_QX_OPTION_BUS_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_bus(*this, finder_base::DUMMY_TAG), @@ -79,7 +79,7 @@ WRITE_LINE_MEMBER(option_slot_device::rdys_w) { (*m_bus).set_rdys_line(state, m_ //------------------------------------------------- // option_bus_device - constructor //------------------------------------------------- -option_bus_device::option_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +option_bus_device::option_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPSON_QX_OPTION_BUS, tag, owner, clock), m_iospace(*this, finder_base::DUMMY_TAG, -1), m_inth1_cb(*this), diff --git a/src/devices/bus/epson_qx/option.h b/src/devices/bus/epson_qx/option.h index db74d46deb3..7103bc1990a 100644 --- a/src/devices/bus/epson_qx/option.h +++ b/src/devices/bus/epson_qx/option.h @@ -136,7 +136,7 @@ public: m_bus.set_tag(std::forward(bus_tag)); m_slot = slot; } - option_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + option_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(inth1_w); DECLARE_WRITE_LINE_MEMBER(inth2_w); @@ -182,7 +182,7 @@ class option_bus_device : public device_t { public: // construction/destruction - option_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + option_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_iospace(T &&tag, int spacenum) { m_iospace.set_tag(std::forward(tag), spacenum); } void set_memview(memory_view::memory_view_entry &view) { m_view = &view; } diff --git a/src/devices/bus/epson_sio/epson_sio.cpp b/src/devices/bus/epson_sio/epson_sio.cpp index adb75b853b7..a72f65f3028 100644 --- a/src/devices/bus/epson_sio/epson_sio.cpp +++ b/src/devices/bus/epson_sio/epson_sio.cpp @@ -53,7 +53,7 @@ device_epson_sio_interface::~device_epson_sio_interface() // epson_sio_device - constructor //------------------------------------------------- -epson_sio_device::epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_sio_device::epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPSON_SIO, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_cart(nullptr), diff --git a/src/devices/bus/epson_sio/epson_sio.h b/src/devices/bus/epson_sio/epson_sio.h index 99bf6bce7a3..e7a594d5709 100644 --- a/src/devices/bus/epson_sio/epson_sio.h +++ b/src/devices/bus/epson_sio/epson_sio.h @@ -26,7 +26,7 @@ class epson_sio_device : public device_t, public device_single_card_slot_interfa public: // construction/destruction epson_sio_device(machine_config const &mconfig, char const *tag, device_t *owner, char const *dflt) - : epson_sio_device(mconfig, tag, owner, (uint32_t)0) + : epson_sio_device(mconfig, tag, owner) { option_reset(); epson_sio_devices(*this); @@ -34,7 +34,7 @@ public: set_fixed(false); } - epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~epson_sio_device(); // callbacks diff --git a/src/devices/bus/epson_sio/pf10.cpp b/src/devices/bus/epson_sio/pf10.cpp index 067931da4e8..5fe21eeda1b 100644 --- a/src/devices/bus/epson_sio/pf10.cpp +++ b/src/devices/bus/epson_sio/pf10.cpp @@ -70,7 +70,7 @@ void epson_pf10_device::device_add_mconfig(machine_config &config) m_cpu->out_p2_cb().set(FUNC(epson_pf10_device::port2_w)); m_cpu->out_ser_tx_cb().set(FUNC(epson_pf10_device::hd6303_tx_w)); - UPD765A(config, m_fdc, 4'000'000, false, true); + UPD765A(config, m_fdc, XTAL::u(4'000'000), false, true); FLOPPY_CONNECTOR(config, m_floppy, pf10_floppies, "smd165", floppy_image_device::default_mfm_floppy_formats); EPSON_SIO(config, m_sio_output, nullptr); @@ -87,7 +87,7 @@ void epson_pf10_device::device_add_mconfig(machine_config &config) // epson_pf10_device - constructor //------------------------------------------------- -epson_pf10_device::epson_pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_pf10_device::epson_pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPSON_PF10, tag, owner, clock), device_epson_sio_interface(mconfig, *this), m_cpu(*this, "maincpu"), diff --git a/src/devices/bus/epson_sio/pf10.h b/src/devices/bus/epson_sio/pf10.h index ce5f2ee6f3d..a2bf134a25b 100644 --- a/src/devices/bus/epson_sio/pf10.h +++ b/src/devices/bus/epson_sio/pf10.h @@ -28,7 +28,7 @@ class epson_pf10_device : public device_t, { public: // construction/destruction - epson_pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + epson_pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/epson_sio/tf20.cpp b/src/devices/bus/epson_sio/tf20.cpp index a2f9c2e9320..4eec8534410 100644 --- a/src/devices/bus/epson_sio/tf20.cpp +++ b/src/devices/bus/epson_sio/tf20.cpp @@ -124,7 +124,7 @@ void epson_tf20_device::device_add_mconfig(machine_config &config) // epson_tf20_device - constructor //------------------------------------------------- -epson_tf20_device::epson_tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_tf20_device::epson_tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPSON_TF20, tag, owner, clock), device_epson_sio_interface(mconfig, *this), m_cpu(*this, "19b"), diff --git a/src/devices/bus/epson_sio/tf20.h b/src/devices/bus/epson_sio/tf20.h index 906ae0a4b9c..3a101038211 100644 --- a/src/devices/bus/epson_sio/tf20.h +++ b/src/devices/bus/epson_sio/tf20.h @@ -30,7 +30,7 @@ class epson_tf20_device : public device_t, { public: // construction/destruction - epson_tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + epson_tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/fmt_scsi/fmt121.cpp b/src/devices/bus/fmt_scsi/fmt121.cpp index 34f784115a0..1044c77d9e0 100644 --- a/src/devices/bus/fmt_scsi/fmt121.cpp +++ b/src/devices/bus/fmt_scsi/fmt121.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(FMT121, fmt121_device, "fmt121", "FMT-121 SCSI Card") // fmt121_device - construction //------------------------------------------------- -fmt121_device::fmt121_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +fmt121_device::fmt121_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FMT121, tag, owner, clock) , fmt_scsi_card_interface(mconfig, *this) , m_scsi_ctlr(*this, "fmscsi") @@ -74,14 +74,14 @@ fmt121_device::fmt121_device(const machine_config &mconfig, const char *tag, dev void fmt121_device::device_add_mconfig(machine_config &config) { - scsi_port_device &scsi(SCSI_PORT(config, "scsi", 0)); + scsi_port_device &scsi(SCSI_PORT(config, "scsi")); scsi.set_slot_device(1, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0)); scsi.set_slot_device(2, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_1)); scsi.set_slot_device(3, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_2)); scsi.set_slot_device(4, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_3)); scsi.set_slot_device(5, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_4)); - FMSCSI(config, m_scsi_ctlr, 0); + FMSCSI(config, m_scsi_ctlr); m_scsi_ctlr->set_scsi_port("scsi"); m_scsi_ctlr->irq_handler().set(FUNC(fmt121_device::irq_w)); m_scsi_ctlr->drq_handler().set(FUNC(fmt121_device::drq_w)); diff --git a/src/devices/bus/fmt_scsi/fmt121.h b/src/devices/bus/fmt_scsi/fmt121.h index 9b80b2c70f1..582ca0bdd79 100644 --- a/src/devices/bus/fmt_scsi/fmt121.h +++ b/src/devices/bus/fmt_scsi/fmt121.h @@ -21,7 +21,7 @@ class fmt121_device : public device_t, public fmt_scsi_card_interface { public: // device type constructor - fmt121_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + fmt121_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/fmt_scsi/fmt_scsi.cpp b/src/devices/bus/fmt_scsi/fmt_scsi.cpp index b5d62fb3577..5ae4a09ee24 100644 --- a/src/devices/bus/fmt_scsi/fmt_scsi.cpp +++ b/src/devices/bus/fmt_scsi/fmt_scsi.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(FMT_SCSI_SLOT, fmt_scsi_slot_device, "fmt_scsi_slot", "FM Tow // fmt_scsi_slot_device - construction //------------------------------------------------- -fmt_scsi_slot_device::fmt_scsi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +fmt_scsi_slot_device::fmt_scsi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FMT_SCSI_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_card(nullptr) diff --git a/src/devices/bus/fmt_scsi/fmt_scsi.h b/src/devices/bus/fmt_scsi/fmt_scsi.h index 549b1047f4c..780aa33060f 100644 --- a/src/devices/bus/fmt_scsi/fmt_scsi.h +++ b/src/devices/bus/fmt_scsi/fmt_scsi.h @@ -29,7 +29,7 @@ public: // construction/destruction template fmt_scsi_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : fmt_scsi_slot_device(mconfig, tag, owner, 0) + : fmt_scsi_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -37,7 +37,7 @@ public: set_fixed(false); } - fmt_scsi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + fmt_scsi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_handler() { return m_irq_handler.bind(); } auto drq_handler() { return m_drq_handler.bind(); } diff --git a/src/devices/bus/gamate/gamate_protection.cpp b/src/devices/bus/gamate/gamate_protection.cpp index 4218a237a3f..1e26ca76691 100644 --- a/src/devices/bus/gamate/gamate_protection.cpp +++ b/src/devices/bus/gamate/gamate_protection.cpp @@ -10,7 +10,7 @@ DEFINE_DEVICE_TYPE(GAMATE_PROT, gamate_protection_device, "gamate_prot", "Gamate Protection Mapper") -gamate_protection_device::gamate_protection_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gamate_protection_device::gamate_protection_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAMATE_PROT, tag, owner, clock), m_is_protection_passed(0), m_has_failed(0), diff --git a/src/devices/bus/gamate/gamate_protection.h b/src/devices/bus/gamate/gamate_protection.h index 5ee37ff3e20..ca98821f602 100644 --- a/src/devices/bus/gamate/gamate_protection.h +++ b/src/devices/bus/gamate/gamate_protection.h @@ -12,7 +12,7 @@ class gamate_protection_device : public device_t { public: // construction/destruction - gamate_protection_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamate_protection_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bool is_protection_passed(); diff --git a/src/devices/bus/gamate/rom.cpp b/src/devices/bus/gamate/rom.cpp index 7301b6bdfc7..d1373396f17 100644 --- a/src/devices/bus/gamate/rom.cpp +++ b/src/devices/bus/gamate/rom.cpp @@ -15,31 +15,31 @@ DEFINE_DEVICE_TYPE(GAMATE_ROM_BANKED, gamate_rom_banked_device, "gam DEFINE_DEVICE_TYPE(GAMATE_ROM_4IN1, gamate_rom_4in1_device, "gamate_rom_4in1", "GAMATE 4-in-1 Cartridge") -gamate_rom_plain_device::gamate_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +gamate_rom_plain_device::gamate_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_gamate_cart_interface(mconfig, *this), m_protection(*this, "protection") { } -gamate_rom_plain_device::gamate_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gamate_rom_plain_device::gamate_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gamate_rom_plain_device(mconfig, GAMATE_ROM_PLAIN, tag, owner, clock) { } -gamate_rom_banked_device::gamate_rom_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gamate_rom_banked_device::gamate_rom_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gamate_rom_plain_device(mconfig, GAMATE_ROM_BANKED, tag, owner, clock), m_bank(0) { } -gamate_rom_banked_device::gamate_rom_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +gamate_rom_banked_device::gamate_rom_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : gamate_rom_plain_device(mconfig, type, tag, owner, clock), m_bank(0) { } -gamate_rom_4in1_device::gamate_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gamate_rom_4in1_device::gamate_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gamate_rom_banked_device(mconfig, GAMATE_ROM_4IN1, tag, owner, clock), m_multibank(0) { @@ -170,7 +170,7 @@ void gamate_rom_4in1_device::write_rom(offs_t offset, uint8_t data) void gamate_rom_plain_device::device_add_mconfig(machine_config &config) { - GAMATE_PROT(config, m_protection, 0); + GAMATE_PROT(config, m_protection); } diff --git a/src/devices/bus/gamate/rom.h b/src/devices/bus/gamate/rom.h index cad923f3d54..d2db0bf768e 100644 --- a/src/devices/bus/gamate/rom.h +++ b/src/devices/bus/gamate/rom.h @@ -15,7 +15,7 @@ class gamate_rom_plain_device : public device_t, { public: // construction/destruction - gamate_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamate_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -24,7 +24,7 @@ public: virtual void write_rom(offs_t offset, uint8_t data); protected: - gamate_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gamate_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; @@ -41,10 +41,10 @@ class gamate_rom_banked_device : public gamate_rom_plain_device { public: // construction/destruction - gamate_rom_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamate_rom_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - gamate_rom_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gamate_rom_banked_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; @@ -64,7 +64,7 @@ class gamate_rom_4in1_device : public gamate_rom_banked_device { public: // construction/destruction - gamate_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamate_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; diff --git a/src/devices/bus/gamate/slot.cpp b/src/devices/bus/gamate/slot.cpp index d46ed1d0a65..e24a593db36 100644 --- a/src/devices/bus/gamate/slot.cpp +++ b/src/devices/bus/gamate/slot.cpp @@ -54,7 +54,7 @@ void device_gamate_cart_interface::rom_alloc(uint32_t size) //------------------------------------------------- // gamate_cart_slot_device - constructor //------------------------------------------------- -gamate_cart_slot_device::gamate_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gamate_cart_slot_device::gamate_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAMATE_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/gamate/slot.h b/src/devices/bus/gamate/slot.h index b78fa012705..efb8ccf4040 100644 --- a/src/devices/bus/gamate/slot.h +++ b/src/devices/bus/gamate/slot.h @@ -53,7 +53,7 @@ public: // construction/destruction template gamate_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : gamate_cart_slot_device(mconfig, tag, owner, 0) + : gamate_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -61,7 +61,7 @@ public: set_fixed(false); } - gamate_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gamate_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~gamate_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/gameboy/mbc.cpp b/src/devices/bus/gameboy/mbc.cpp index 4bad4a2522d..d270bf6f0aa 100644 --- a/src/devices/bus/gameboy/mbc.cpp +++ b/src/devices/bus/gameboy/mbc.cpp @@ -88,7 +88,7 @@ namespace { class rom_mbc_device_base : public mbc_ram_device_base { protected: - rom_mbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : + rom_mbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : mbc_ram_device_base(mconfig, type, tag, owner, clock), m_view_ram(*this, "ram"), m_bank_lines{ 0U, 0U } diff --git a/src/devices/bus/gameboy/rom.cpp b/src/devices/bus/gameboy/rom.cpp index cf593b95c8a..e7729b30850 100644 --- a/src/devices/bus/gameboy/rom.cpp +++ b/src/devices/bus/gameboy/rom.cpp @@ -50,7 +50,7 @@ namespace { class sachen_mmc_device_base : public mbc_dual_uniform_device_base { protected: - sachen_mmc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : + sachen_mmc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : mbc_dual_uniform_device_base(mconfig, type, tag, owner, clock), m_bank_mux_rom(0U), m_bank_sel_rom{ 0U, 0U } diff --git a/src/devices/bus/gamegear/ggext.cpp b/src/devices/bus/gamegear/ggext.cpp index dad471f1f9b..7fe1d43e142 100644 --- a/src/devices/bus/gamegear/ggext.cpp +++ b/src/devices/bus/gamegear/ggext.cpp @@ -56,7 +56,7 @@ device_gg_ext_port_interface::~device_gg_ext_port_interface() // gg_ext_port_device - constructor //------------------------------------------------- -gg_ext_port_device::gg_ext_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gg_ext_port_device::gg_ext_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GG_EXT_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_screen(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/bus/gamegear/ggext.h b/src/devices/bus/gamegear/ggext.h index 04d802eca02..025e8f6cb0e 100644 --- a/src/devices/bus/gamegear/ggext.h +++ b/src/devices/bus/gamegear/ggext.h @@ -30,7 +30,7 @@ public: // construction/destruction template gg_ext_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : gg_ext_port_device(mconfig, tag, owner, 0) + : gg_ext_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -38,7 +38,7 @@ public: set_fixed(false); } - gg_ext_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gg_ext_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~gg_ext_port_device(); // static configuration helpers diff --git a/src/devices/bus/gamegear/smsctrladp.cpp b/src/devices/bus/gamegear/smsctrladp.cpp index d066f815697..34df9be6244 100644 --- a/src/devices/bus/gamegear/smsctrladp.cpp +++ b/src/devices/bus/gamegear/smsctrladp.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SMS_CTRL_ADAPTOR, sms_ctrl_adaptor_device, "sms_ctrl_adaptor" // sms_ctrl_adaptor_device - constructor //------------------------------------------------- -sms_ctrl_adaptor_device::sms_ctrl_adaptor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_ctrl_adaptor_device::sms_ctrl_adaptor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_CTRL_ADAPTOR, tag, owner, clock), device_gg_ext_port_interface(mconfig, *this), m_subctrl_port(*this, "ctrl") diff --git a/src/devices/bus/gamegear/smsctrladp.h b/src/devices/bus/gamegear/smsctrladp.h index 46646bde0f0..67d7c1e21e1 100644 --- a/src/devices/bus/gamegear/smsctrladp.h +++ b/src/devices/bus/gamegear/smsctrladp.h @@ -29,7 +29,7 @@ class sms_ctrl_adaptor_device : public device_t, { public: // construction/destruction - sms_ctrl_adaptor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_ctrl_adaptor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp index bb5ad11048e..e574578f700 100644 --- a/src/devices/bus/gba/gba_slot.cpp +++ b/src/devices/bus/gba/gba_slot.cpp @@ -532,7 +532,7 @@ void device_gba_cart_interface::nvram_alloc(uint32_t size) //------------------------------------------------- // gba_cart_slot_device - constructor //------------------------------------------------- -gba_cart_slot_device::gba_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gba_cart_slot_device::gba_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GBA_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_slot_interface(mconfig, *this), diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h index 70fad8e4581..e1e7fffb845 100644 --- a/src/devices/bus/gba/gba_slot.h +++ b/src/devices/bus/gba/gba_slot.h @@ -86,7 +86,7 @@ public: // construction/destruction template gba_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : gba_cart_slot_device(mconfig, tag, owner, 0) + : gba_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -94,7 +94,7 @@ public: set_fixed(false); } - gba_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gba_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~gba_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/gba/rom.cpp b/src/devices/bus/gba/rom.cpp index 643432b8433..cff51b9c308 100644 --- a/src/devices/bus/gba/rom.cpp +++ b/src/devices/bus/gba/rom.cpp @@ -36,108 +36,108 @@ DEFINE_DEVICE_TYPE(GBA_ROM_FLASH1M_RTC, gba_rom_flash1m_rtc_device, "gba_rom_fla DEFINE_DEVICE_TYPE(GBA_ROM_3DMATRIX, gba_rom_3dmatrix_device, "gba_rom_3dmatrix", "3D Matrix Memory Mapper") -gba_rom_device::gba_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gba_rom_device::gba_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_gba_cart_interface(mconfig, *this) { } -gba_rom_device::gba_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_device::gba_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_device(mconfig, GBA_ROM_STD, tag, owner, clock) { } -gba_rom_sram_device::gba_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gba_rom_sram_device::gba_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_device(mconfig, type, tag, owner, clock) { } -gba_rom_sram_device::gba_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_sram_device::gba_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_sram_device(mconfig, GBA_ROM_SRAM, tag, owner, clock) { } -gba_rom_drilldoz_device::gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_drilldoz_device::gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_sram_device(mconfig, GBA_ROM_DRILLDOZ, tag, owner, clock) , m_rumble(*this, "Rumble") { } -gba_rom_wariotws_device::gba_rom_wariotws_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_wariotws_device::gba_rom_wariotws_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_sram_device(mconfig, GBA_ROM_WARIOTWS, tag, owner, clock) , m_rumble(*this, "Rumble") , m_gyro_z(*this, "GYROZ") { } -gba_rom_eeprom_device::gba_rom_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gba_rom_eeprom_device::gba_rom_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_device(mconfig, type, tag, owner, clock) { } -gba_rom_eeprom_device::gba_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_eeprom_device::gba_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_eeprom_device(mconfig, GBA_ROM_EEPROM, tag, owner, clock) { } -gba_rom_yoshiug_device::gba_rom_yoshiug_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_yoshiug_device::gba_rom_yoshiug_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_eeprom_device(mconfig, GBA_ROM_YOSHIUG, tag, owner, clock) , m_tilt_x(*this, "TILTX") , m_tilt_y(*this, "TILTY") { } -gba_rom_eeprom64_device::gba_rom_eeprom64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gba_rom_eeprom64_device::gba_rom_eeprom64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_device(mconfig, type, tag, owner, clock) { } -gba_rom_eeprom64_device::gba_rom_eeprom64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_eeprom64_device::gba_rom_eeprom64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_eeprom64_device(mconfig, GBA_ROM_EEPROM64, tag, owner, clock) { } -gba_rom_boktai_device::gba_rom_boktai_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_boktai_device::gba_rom_boktai_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_eeprom64_device(mconfig, GBA_ROM_BOKTAI, tag, owner, clock) , m_sensor(*this, "LIGHTSENSE") { } -gba_rom_flash_device::gba_rom_flash_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gba_rom_flash_device::gba_rom_flash_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_device(mconfig, type, tag, owner, clock) , m_flash_mask(0) , m_flash(*this, "flash") { } -gba_rom_flash_device::gba_rom_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_flash_device::gba_rom_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_flash_device(mconfig, GBA_ROM_FLASH, tag, owner, clock) { } -gba_rom_flash_rtc_device::gba_rom_flash_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_flash_rtc_device::gba_rom_flash_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_flash_device(mconfig, GBA_ROM_FLASH_RTC, tag, owner, clock) { } -gba_rom_flash1m_device::gba_rom_flash1m_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gba_rom_flash1m_device::gba_rom_flash1m_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_device(mconfig, type, tag, owner, clock) , m_flash_mask(0) , m_flash(*this, "flash") { } -gba_rom_flash1m_device::gba_rom_flash1m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_flash1m_device::gba_rom_flash1m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_flash1m_device(mconfig, GBA_ROM_FLASH1M, tag, owner, clock) { } -gba_rom_flash1m_rtc_device::gba_rom_flash1m_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_flash1m_rtc_device::gba_rom_flash1m_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_flash1m_device(mconfig, GBA_ROM_FLASH1M_RTC, tag, owner, clock) { } -gba_rom_3dmatrix_device::gba_rom_3dmatrix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_rom_3dmatrix_device::gba_rom_3dmatrix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gba_rom_device(mconfig, GBA_ROM_3DMATRIX, tag, owner, clock) { } diff --git a/src/devices/bus/gba/rom.h b/src/devices/bus/gba/rom.h index 3a1ac4005a1..d009f10a426 100644 --- a/src/devices/bus/gba/rom.h +++ b/src/devices/bus/gba/rom.h @@ -88,7 +88,7 @@ class gba_rom_device : public device_t, { public: // construction/destruction - gba_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint32_t read_rom(offs_t offset) override { return m_rom[offset]; } @@ -100,7 +100,7 @@ public: virtual void gpio_dev_write(uint16_t data, int gpio_dirs) { } protected: - gba_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gba_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -118,14 +118,14 @@ class gba_rom_sram_device : public gba_rom_device { public: // construction/destruction - gba_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: - gba_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gba_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -135,7 +135,7 @@ class gba_rom_drilldoz_device : public gba_rom_sram_device { public: // construction/destruction - gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_drilldoz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -153,7 +153,7 @@ class gba_rom_wariotws_device : public gba_rom_sram_device { public: // construction/destruction - gba_rom_wariotws_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_wariotws_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; @@ -180,14 +180,14 @@ class gba_rom_flash_device : public gba_rom_device { public: // construction/destruction - gba_rom_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: - gba_rom_flash_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gba_rom_flash_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; @@ -206,7 +206,7 @@ class gba_rom_flash_rtc_device : public gba_rom_flash_device { public: // construction/destruction - gba_rom_flash_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_flash_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual uint16_t gpio_dev_read(int gpio_dirs) override; @@ -226,14 +226,14 @@ class gba_rom_flash1m_device : public gba_rom_device { public: // construction/destruction - gba_rom_flash1m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_flash1m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: - gba_rom_flash1m_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gba_rom_flash1m_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; @@ -252,7 +252,7 @@ class gba_rom_flash1m_rtc_device : public gba_rom_flash1m_device { public: // construction/destruction - gba_rom_flash1m_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_flash1m_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual uint16_t gpio_dev_read(int gpio_dirs) override; @@ -272,14 +272,14 @@ class gba_rom_eeprom_device : public gba_rom_device { public: // construction/destruction - gba_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: - gba_rom_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gba_rom_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -295,7 +295,7 @@ class gba_rom_yoshiug_device : public gba_rom_eeprom_device { public: // construction/destruction - gba_rom_yoshiug_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_yoshiug_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -322,14 +322,14 @@ class gba_rom_eeprom64_device : public gba_rom_device { public: // construction/destruction - gba_rom_eeprom64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_eeprom64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: - gba_rom_eeprom64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gba_rom_eeprom64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -344,7 +344,7 @@ class gba_rom_boktai_device : public gba_rom_eeprom64_device { public: // construction/destruction - gba_rom_boktai_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_boktai_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -369,7 +369,7 @@ class gba_rom_3dmatrix_device : public gba_rom_device { public: // construction/destruction - gba_rom_3dmatrix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_rom_3dmatrix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual void write_mapper(offs_t offset, uint32_t data) override; diff --git a/src/devices/bus/generic/ram.cpp b/src/devices/bus/generic/ram.cpp index 1c9a63d7306..ee71561e5d1 100644 --- a/src/devices/bus/generic/ram.cpp +++ b/src/devices/bus/generic/ram.cpp @@ -34,14 +34,14 @@ DEFINE_DEVICE_TYPE(GENERIC_RAM_64K_LINEAR, generic_ram_64k_linear_device, "ge DEFINE_DEVICE_TYPE(GENERIC_RAM_128K_LINEAR, generic_ram_128k_linear_device, "generic_ram128l", "Generic RAM 128K (linear mapping)") -generic_ram_plain_device::generic_ram_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t size) +generic_ram_plain_device::generic_ram_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t size) : device_t(mconfig, type, tag, owner, clock) , device_generic_cart_interface(mconfig, *this) , m_size(size) { } -generic_ram_linear_device::generic_ram_linear_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t size) +generic_ram_linear_device::generic_ram_linear_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t size) : device_t(mconfig, type, tag, owner, clock) , device_generic_cart_interface(mconfig, *this) , m_size(size) @@ -49,32 +49,32 @@ generic_ram_linear_device::generic_ram_linear_device(const machine_config &mconf } -generic_ram_32k_plain_device::generic_ram_32k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_ram_32k_plain_device::generic_ram_32k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_ram_plain_device(mconfig, GENERIC_RAM_32K_PLAIN, tag, owner, clock, 0x8000) { } -generic_ram_64k_plain_device::generic_ram_64k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_ram_64k_plain_device::generic_ram_64k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_ram_plain_device(mconfig, GENERIC_RAM_64K_PLAIN, tag, owner, clock, 0x10000) { } -generic_ram_128k_plain_device::generic_ram_128k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_ram_128k_plain_device::generic_ram_128k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_ram_plain_device(mconfig, GENERIC_RAM_128K_PLAIN, tag, owner, clock, 0x20000) { } -generic_ram_32k_linear_device::generic_ram_32k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_ram_32k_linear_device::generic_ram_32k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_ram_linear_device(mconfig, GENERIC_RAM_32K_LINEAR, tag, owner, clock, 0x8000) { } -generic_ram_64k_linear_device::generic_ram_64k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_ram_64k_linear_device::generic_ram_64k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_ram_linear_device(mconfig, GENERIC_RAM_64K_LINEAR, tag, owner, clock, 0x10000) { } -generic_ram_128k_linear_device::generic_ram_128k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_ram_128k_linear_device::generic_ram_128k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_ram_linear_device(mconfig, GENERIC_RAM_128K_LINEAR, tag, owner, clock, 0x20000) { } diff --git a/src/devices/bus/generic/ram.h b/src/devices/bus/generic/ram.h index 5cd8c8092b0..04dd4281528 100644 --- a/src/devices/bus/generic/ram.h +++ b/src/devices/bus/generic/ram.h @@ -19,7 +19,7 @@ public: protected: // construction/destruction - generic_ram_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t size); + generic_ram_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t size); // device-level overrides virtual void device_start() override; @@ -40,7 +40,7 @@ public: protected: // construction/destruction - generic_ram_linear_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t size); + generic_ram_linear_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t size); // device-level overrides virtual void device_start() override; @@ -56,21 +56,21 @@ class generic_ram_32k_plain_device : public generic_ram_plain_device { public: // construction/destruction - generic_ram_32k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_ram_32k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class generic_ram_64k_plain_device : public generic_ram_plain_device { public: // construction/destruction - generic_ram_64k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_ram_64k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class generic_ram_128k_plain_device : public generic_ram_plain_device { public: // construction/destruction - generic_ram_128k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_ram_128k_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -80,21 +80,21 @@ class generic_ram_32k_linear_device : public generic_ram_linear_device { public: // construction/destruction - generic_ram_32k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_ram_32k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class generic_ram_64k_linear_device : public generic_ram_linear_device { public: // construction/destruction - generic_ram_64k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_ram_64k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class generic_ram_128k_linear_device : public generic_ram_linear_device { public: // construction/destruction - generic_ram_128k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_ram_128k_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/generic/rom.cpp b/src/devices/bus/generic/rom.cpp index e52854d5b64..eec2cb35f5a 100644 --- a/src/devices/bus/generic/rom.cpp +++ b/src/devices/bus/generic/rom.cpp @@ -31,27 +31,27 @@ DEFINE_DEVICE_TYPE(GENERIC_ROM_LINEAR, generic_rom_linear_device, "generic_r DEFINE_DEVICE_TYPE(GENERIC_ROMRAM_PLAIN, generic_romram_plain_device, "generic_romram_plain", "Generic ROM + RAM (plain mapping)") -generic_rom_device::generic_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +generic_rom_device::generic_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_generic_cart_interface(mconfig, *this) { } -generic_rom_plain_device::generic_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +generic_rom_plain_device::generic_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : generic_rom_device(mconfig, type, tag, owner, clock) { } -generic_rom_plain_device::generic_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_rom_plain_device::generic_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_rom_plain_device(mconfig, GENERIC_ROM_PLAIN, tag, owner, clock) { } -generic_rom_linear_device::generic_rom_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_rom_linear_device::generic_rom_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_rom_device(mconfig, GENERIC_ROM_LINEAR, tag, owner, clock) { } -generic_romram_plain_device::generic_romram_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_romram_plain_device::generic_romram_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_rom_plain_device(mconfig, GENERIC_ROMRAM_PLAIN, tag, owner, clock) { } diff --git a/src/devices/bus/generic/rom.h b/src/devices/bus/generic/rom.h index 6c5df5d4bf4..c3627320298 100644 --- a/src/devices/bus/generic/rom.h +++ b/src/devices/bus/generic/rom.h @@ -14,7 +14,7 @@ class generic_rom_device : public device_t, public device_generic_cart_interface { protected: // construction/destruction - generic_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + generic_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -27,7 +27,7 @@ class generic_rom_plain_device : public generic_rom_device { public: // construction/destruction - generic_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; @@ -35,7 +35,7 @@ public: virtual uint32_t read32_rom(offs_t offset, uint32_t mem_mask) override; protected: - generic_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + generic_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -45,7 +45,7 @@ class generic_romram_plain_device : public generic_rom_plain_device { public: // construction/destruction - generic_romram_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_romram_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_ram(offs_t offset) override; @@ -59,7 +59,7 @@ class generic_rom_linear_device : public generic_rom_device { public: // construction/destruction - generic_rom_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_rom_linear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; diff --git a/src/devices/bus/generic/slot.cpp b/src/devices/bus/generic/slot.cpp index 8827706e657..356b45cf11d 100644 --- a/src/devices/bus/generic/slot.cpp +++ b/src/devices/bus/generic/slot.cpp @@ -119,7 +119,7 @@ void device_generic_cart_interface::ram_alloc(u32 size) // generic_slot_device //************************************************************************** -generic_slot_device::generic_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : +generic_slot_device::generic_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_rom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), @@ -134,12 +134,12 @@ generic_slot_device::generic_slot_device(machine_config const &mconfig, device_t { } -generic_socket_device::generic_socket_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generic_socket_device::generic_socket_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_slot_device(mconfig, GENERIC_SOCKET, tag, owner, clock) { } -generic_cartslot_device::generic_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generic_cartslot_device::generic_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_slot_device(mconfig, GENERIC_CARTSLOT, tag, owner, clock) { } diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h index c6f506a03bf..f15e23ce68a 100644 --- a/src/devices/bus/generic/slot.h +++ b/src/devices/bus/generic/slot.h @@ -196,7 +196,7 @@ public: void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } protected: - generic_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + generic_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override ATTR_COLD; @@ -216,7 +216,7 @@ class generic_socket_device : public generic_slot_device public: template generic_socket_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *intf, char const *exts = nullptr) - : generic_socket_device(mconfig, tag, owner, u32(0)) + : generic_socket_device(mconfig, tag, owner) { opts(*this); set_fixed(false); @@ -225,7 +225,7 @@ public: set_extensions(exts); } - generic_socket_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + generic_socket_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual const char *image_type_name() const noexcept override { return "romimage"; } virtual const char *image_brief_type_name() const noexcept override { return "rom"; } @@ -236,7 +236,7 @@ class generic_cartslot_device : public generic_slot_device public: template generic_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *intf, char const *exts = nullptr) - : generic_cartslot_device(mconfig, tag, owner, u32(0)) + : generic_cartslot_device(mconfig, tag, owner) { opts(*this); set_fixed(false); @@ -245,7 +245,7 @@ public: set_extensions(exts); } - generic_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + generic_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual const char *image_type_name() const noexcept override { return "cartridge"; } virtual const char *image_brief_type_name() const noexcept override { return "cart"; } diff --git a/src/devices/bus/gio64/gio64.cpp b/src/devices/bus/gio64/gio64.cpp index 589e2fdf6d7..e62f774f4d3 100644 --- a/src/devices/bus/gio64/gio64.cpp +++ b/src/devices/bus/gio64/gio64.cpp @@ -21,7 +21,7 @@ void gio64_cards(device_slot_interface &device) DEFINE_DEVICE_TYPE(GIO64_SLOT, gio64_slot_device, "gio64_slot", "SGI GIO64 Slot") -gio64_slot_device::gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, slot_type_t slot_type) +gio64_slot_device::gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, slot_type_t slot_type) : device_t(mconfig, GIO64_SLOT, tag, owner, clock) , device_slot_interface(mconfig, *this) , m_gio64(*this, finder_base::DUMMY_TAG) @@ -60,12 +60,12 @@ device_memory_interface::space_config_vector gio64_device::memory_space_config() }; } -gio64_device::gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gio64_device::gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gio64_device(mconfig, GIO64, tag, owner, clock) { } -gio64_device::gio64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gio64_device::gio64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("gio64", ENDIANNESS_BIG, 64, 32, 0) diff --git a/src/devices/bus/gio64/gio64.h b/src/devices/bus/gio64/gio64.h index df99dc70dd9..109fbd6ba0a 100644 --- a/src/devices/bus/gio64/gio64.h +++ b/src/devices/bus/gio64/gio64.h @@ -26,7 +26,7 @@ public: // construction/destruction template gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gio64_tag, slot_type_t slot_type, U &&opts, const char *dflt) - : gio64_slot_device(mconfig, tag, owner, (uint32_t)0, slot_type) + : gio64_slot_device(mconfig, tag, owner, slot_type) { option_reset(); opts(*this); @@ -34,7 +34,7 @@ public: set_fixed(false); m_gio64.set_tag(std::forward(gio64_tag)); } - gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, slot_type_t slot_type = GIO64_SLOT_EXP0); + gio64_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, slot_type_t slot_type = GIO64_SLOT_EXP0); protected: // device-level overrides @@ -80,11 +80,11 @@ public: // construction/destruction template gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : gio64_device(mconfig, tag, owner, (uint32_t)0) + : gio64_device(mconfig, tag, owner) { } - gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gio64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template auto interrupt_cb() { return m_interrupt_cb[N].bind(); } @@ -113,7 +113,7 @@ public: void write(offs_t offset, u64 data, u64 mem_mask); protected: - gio64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gio64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; diff --git a/src/devices/bus/gio64/newport.cpp b/src/devices/bus/gio64/newport.cpp index ab796ba3645..b30e94c7d74 100644 --- a/src/devices/bus/gio64/newport.cpp +++ b/src/devices/bus/gio64/newport.cpp @@ -63,7 +63,7 @@ DEFINE_DEVICE_TYPE(GIO64_XL24, gio64_xl24_device, "gio64_xl24", "SGI 24-bit XL b * *************************************/ -xmap9_device::xmap9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xmap9_device::xmap9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XMAP9, tag, owner, clock) { } @@ -215,7 +215,7 @@ void xmap9_device::write(uint32_t offset, uint32_t data) * *************************************/ -cmap_device::cmap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cmap_device::cmap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMAP, tag, owner, clock) , device_palette_interface(mconfig, *this) { @@ -297,7 +297,7 @@ uint32_t cmap_device::read(uint32_t offset) /*static*/ const size_t vc2_device::RAM_SIZE = 0x8000; -vc2_device::vc2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vc2_device::vc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VC2, tag, owner, clock) , m_vert_int(*this) , m_screen_timing_changed(*this) @@ -836,7 +836,7 @@ WRITE_LINE_MEMBER(vc2_device::vblank_w) /*static*/ const size_t rb2_device::BUFFER_SIZE = (1280 + 64) * (1024 + 64); -rb2_device::rb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rb2_device::rb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RB2, tag, owner, clock) { } @@ -1079,7 +1079,7 @@ void rb2_device::store_pixel(uint32_t value) /*static*/ const uint32_t newport_base_device::s_host_shifts[4] = { 8, 8, 16, 32 }; -newport_base_device::newport_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +newport_base_device::newport_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_gio64_card_interface(mconfig, *this) , m_screen(*this, "screen") @@ -1095,12 +1095,12 @@ newport_base_device::newport_base_device(const machine_config &mconfig, device_t { } -gio64_xl8_device::gio64_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gio64_xl8_device::gio64_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : newport_base_device(mconfig, GIO64_XL8, tag, owner, clock) { } -gio64_xl24_device::gio64_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gio64_xl24_device::gio64_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : newport_base_device(mconfig, GIO64_XL24, tag, owner, clock) { } @@ -4430,7 +4430,7 @@ void newport_base_device::rex3_w(offs_t offset, uint64_t data, uint64_t mem_mask void newport_base_device::device_add_mconfig(machine_config &config) { - VC2(config, m_vc2, 0); + VC2(config, m_vc2); m_vc2->vert_int().set(FUNC(newport_base_device::vrint_w)); m_vc2->screen_timing_changed().set(FUNC(newport_base_device::update_screen_size)); diff --git a/src/devices/bus/gio64/newport.h b/src/devices/bus/gio64/newport.h index 00a6e36e22d..4423ef64454 100644 --- a/src/devices/bus/gio64/newport.h +++ b/src/devices/bus/gio64/newport.h @@ -28,13 +28,13 @@ class xmap9_device : public device_t { public: - xmap9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t revision) + xmap9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t revision) : xmap9_device(mconfig, tag, owner, clock) { set_revision(revision); } - xmap9_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xmap9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(uint32_t offset); void write(uint32_t offset, uint32_t data); @@ -79,13 +79,13 @@ class cmap_device : public device_t , public device_palette_interface { public: - cmap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t revision) + cmap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t revision) : cmap_device(mconfig, tag, owner, clock) { set_revision(revision); } - cmap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cmap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(uint32_t offset); void write(uint32_t offset, uint32_t data); @@ -125,7 +125,7 @@ DECLARE_DEVICE_TYPE(CMAP, cmap_device) class vc2_device : public device_t { public: - vc2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(uint32_t offset); void write(uint32_t offset, uint32_t data, uint32_t mem_mask); @@ -221,13 +221,13 @@ DECLARE_DEVICE_TYPE(VC2, vc2_device) class rb2_device : public device_t { public: - rb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t global_mask) + rb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t global_mask) : rb2_device(mconfig, tag, owner, clock) { set_global_mask(global_mask); } - rb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Getters const uint32_t *rgbci(int y) const { return &m_rgbci[1344 * y]; } @@ -290,7 +290,7 @@ class newport_base_device : public device_t , public device_gio64_card_interface { public: - newport_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + newport_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint64_t rex3_r(offs_t offset, uint64_t mem_mask = ~0); void rex3_w(offs_t offset, uint64_t data, uint64_t mem_mask = ~0); @@ -528,7 +528,7 @@ protected: class gio64_xl8_device : public newport_base_device { public: - gio64_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + gio64_xl8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -537,7 +537,7 @@ protected: class gio64_xl24_device : public newport_base_device { public: - gio64_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + gio64_xl24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/hexbus/hexbus.cpp b/src/devices/bus/hexbus/hexbus.cpp index 40189262457..ca6ff20250e 100644 --- a/src/devices/bus/hexbus/hexbus.cpp +++ b/src/devices/bus/hexbus/hexbus.cpp @@ -168,7 +168,7 @@ device_hexbus_interface::device_hexbus_interface(const machine_config &mconfig, } -hexbus_device::hexbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hexbus_device::hexbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HEXBUS, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_next_dev(nullptr), @@ -221,7 +221,7 @@ uint8_t hexbus_device::read(int dir) // ------------------------------------------------------------------------ -hexbus_chained_device::hexbus_chained_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock): +hexbus_chained_device::hexbus_chained_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, type, tag, owner, clock), device_hexbus_interface(mconfig, *this), m_hexbus_outbound(nullptr), diff --git a/src/devices/bus/hexbus/hexbus.h b/src/devices/bus/hexbus/hexbus.h index 1d225c55749..3b920d67afd 100644 --- a/src/devices/bus/hexbus/hexbus.h +++ b/src/devices/bus/hexbus/hexbus.h @@ -56,7 +56,7 @@ class hexbus_chained_device : public device_t, public device_hexbus_interface friend class hexbus_device; protected: - hexbus_chained_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hexbus_chained_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void set_outbound_hexbus(hexbus_device *outbound) { m_hexbus_outbound = outbound; } @@ -142,7 +142,7 @@ class hexbus_device : public device_t, public device_single_card_slot_interface< { public: template - hexbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt) + hexbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, U &&opts, const char *dflt) : hexbus_device(mconfig, tag, owner, clock) { option_reset(); @@ -151,7 +151,7 @@ public: set_fixed(false); } - hexbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hexbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Used to establish the reverse link (inbound) void set_chain_element(hexbus_chained_device* chain) { m_chain_element = chain; } diff --git a/src/devices/bus/hexbus/hx5102.cpp b/src/devices/bus/hexbus/hx5102.cpp index 740b5f93f4c..f80c0b9a4ab 100644 --- a/src/devices/bus/hexbus/hx5102.cpp +++ b/src/devices/bus/hexbus/hx5102.cpp @@ -126,7 +126,7 @@ void hx5102_device::crumap(address_map &map) map(0x17f0, 0x17ff).w(m_crulatch[1], FUNC(ls259_device::write_d0)); } -hx5102_device::hx5102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +hx5102_device::hx5102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): hexbus_chained_device(mconfig, HX5102, tag, owner, clock), m_flopcpu(*this, TMS9995_TAG), m_ready_old(CLEAR_LINE), @@ -663,7 +663,7 @@ INPUT_PORTS_END void hx5102_device::device_add_mconfig(machine_config& config) { // Hexbus controller - IBC(config, m_hexbus_ctrl, 0); + IBC(config, m_hexbus_ctrl); m_hexbus_ctrl->hexbus_cb().set(FUNC(hx5102_device::hexbus_out)); m_hexbus_ctrl->hsklatch_cb().set(FUNC(hx5102_device::hsklatch_out)); @@ -722,7 +722,7 @@ void hx5102_device::device_add_mconfig(machine_config& config) m_speedmf->out_cb().set(FUNC(hx5102_device::mspeed_w)); // READY flipflop - TTL7474(config, m_readyff, 0); + TTL7474(config, m_readyff); m_readyff->comp_output_cb().set(FUNC(hx5102_device::board_ready)); // RAM diff --git a/src/devices/bus/hexbus/hx5102.h b/src/devices/bus/hexbus/hx5102.h index 15d717bd028..b225e669c5f 100644 --- a/src/devices/bus/hexbus/hx5102.h +++ b/src/devices/bus/hexbus/hx5102.h @@ -33,7 +33,7 @@ namespace bus::hexbus { class hx5102_device : public hexbus_chained_device { public: - hx5102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hx5102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/hexbus/tp0370.cpp b/src/devices/bus/hexbus/tp0370.cpp index e4d1ac50863..2677f1f74db 100644 --- a/src/devices/bus/hexbus/tp0370.cpp +++ b/src/devices/bus/hexbus/tp0370.cpp @@ -132,7 +132,7 @@ DEFINE_DEVICE_TYPE(IBC, bus::hexbus::ibc_device, "hexbus_ibc", "Intelligent Pe namespace bus::hexbus { -ibc_device::ibc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ibc_device::ibc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IBC, tag, owner, clock), m_int(*this), m_hexout(*this), diff --git a/src/devices/bus/hexbus/tp0370.h b/src/devices/bus/hexbus/tp0370.h index 9aafc27804a..81302099c19 100644 --- a/src/devices/bus/hexbus/tp0370.h +++ b/src/devices/bus/hexbus/tp0370.h @@ -21,7 +21,7 @@ namespace bus::hexbus { class ibc_device : public device_t { public: - ibc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void device_start() override; void device_reset() override; diff --git a/src/devices/bus/hp80_io/82900.cpp b/src/devices/bus/hp80_io/82900.cpp index 72b9c08c092..b8b2a5ac3fa 100644 --- a/src/devices/bus/hp80_io/82900.cpp +++ b/src/devices/bus/hp80_io/82900.cpp @@ -28,7 +28,7 @@ namespace { } } -hp82900_io_card_device::hp82900_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp82900_io_card_device::hp82900_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP82900_IO_CARD , tag , owner , clock), device_hp80_io_interface(mconfig, *this), m_cpu(*this , "cpu"), @@ -163,7 +163,7 @@ void hp82900_io_card_device::device_add_mconfig(machine_config &config) m_cpu->set_addrmap(AS_IO , &hp82900_io_card_device::cpu_io_map); m_cpu->refresh_cb().set(FUNC(hp82900_io_card_device::z80_m1_w)); - HP_1MB5(config, m_translator, 0); + HP_1MB5(config, m_translator); m_translator->irl_handler().set(FUNC(hp82900_io_card_device::irl_w)); m_translator->halt_handler().set(FUNC(hp82900_io_card_device::halt_w)); m_translator->reset_handler().set(FUNC(hp82900_io_card_device::reset_w)); diff --git a/src/devices/bus/hp80_io/82900.h b/src/devices/bus/hp80_io/82900.h index 613783cbc3f..b233de376b6 100644 --- a/src/devices/bus/hp80_io/82900.h +++ b/src/devices/bus/hp80_io/82900.h @@ -21,7 +21,7 @@ class hp82900_io_card_device : public device_t, public device_hp80_io_interface { public: // construction/destruction - hp82900_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp82900_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp82900_io_card_device(); protected: diff --git a/src/devices/bus/hp80_io/82937.cpp b/src/devices/bus/hp80_io/82937.cpp index 24fae1d68c6..8ef6ee169e2 100644 --- a/src/devices/bus/hp80_io/82937.cpp +++ b/src/devices/bus/hp80_io/82937.cpp @@ -54,7 +54,7 @@ constexpr unsigned P1_DAV_BIT = 2; constexpr unsigned P1_NDAC_BIT = 1; constexpr unsigned P1_NRFD_BIT = 0; -hp82937_io_card_device::hp82937_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp82937_io_card_device::hp82937_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP82937_IO_CARD , tag , owner , clock), device_hp80_io_interface(mconfig, *this), m_cpu(*this , "cpu"), @@ -337,17 +337,17 @@ void hp82937_io_card_device::device_add_mconfig(machine_config &config) m_cpu->p2_in_cb().set(FUNC(hp82937_io_card_device::dio_r)); m_cpu->p2_out_cb().set(FUNC(hp82937_io_card_device::dio_w)); - HP_1MB5(config, m_translator, 0); + HP_1MB5(config, m_translator); m_translator->irl_handler().set(FUNC(hp82937_io_card_device::irl_w)); m_translator->halt_handler().set(FUNC(hp82937_io_card_device::halt_w)); m_translator->reset_handler().set(FUNC(hp82937_io_card_device::reset_w)); - ieee488_slot_device &ieee_dev(IEEE488_SLOT(config, "ieee_dev", 0)); + ieee488_slot_device &ieee_dev(IEEE488_SLOT(config, "ieee_dev")); hp_ieee488_devices(ieee_dev); - ieee488_slot_device &ieee_rem(IEEE488_SLOT(config, "ieee_rem", 0)); + ieee488_slot_device &ieee_rem(IEEE488_SLOT(config, "ieee_rem")); remote488_devices(ieee_rem); - IEEE488(config, m_ieee488, 0); + IEEE488(config, m_ieee488); m_ieee488->ifc_callback().set(FUNC(hp82937_io_card_device::ieee488_ctrl_w)); m_ieee488->atn_callback().set(FUNC(hp82937_io_card_device::ieee488_ctrl_w)); m_ieee488->ren_callback().set(FUNC(hp82937_io_card_device::ieee488_ctrl_w)); diff --git a/src/devices/bus/hp80_io/82937.h b/src/devices/bus/hp80_io/82937.h index 07f3dec991a..f926c4321f1 100644 --- a/src/devices/bus/hp80_io/82937.h +++ b/src/devices/bus/hp80_io/82937.h @@ -22,7 +22,7 @@ class hp82937_io_card_device : public device_t, public device_hp80_io_interface { public: // construction/destruction - hp82937_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp82937_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp82937_io_card_device(); protected: diff --git a/src/devices/bus/hp80_io/82939.cpp b/src/devices/bus/hp80_io/82939.cpp index 4649758f753..ad93da3017a 100644 --- a/src/devices/bus/hp80_io/82939.cpp +++ b/src/devices/bus/hp80_io/82939.cpp @@ -34,7 +34,7 @@ namespace { } } -hp82939_io_card_device::hp82939_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp82939_io_card_device::hp82939_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP82939_IO_CARD , tag , owner , clock), device_hp80_io_interface(mconfig, *this), m_cpu(*this , "cpu"), @@ -203,7 +203,7 @@ void hp82939_io_card_device::device_add_mconfig(machine_config &config) m_cpu->p1_out_cb().set(FUNC(hp82939_io_card_device::p1_w)); m_cpu->p2_in_cb().set(FUNC(hp82939_io_card_device::p2_r)); - HP_1MB5(config, m_translator, 0); + HP_1MB5(config, m_translator); m_translator->irl_handler().set(FUNC(hp82939_io_card_device::irl_w)); m_translator->halt_handler().set(FUNC(hp82939_io_card_device::halt_w)); m_translator->reset_handler().set_inputline(m_cpu , INPUT_LINE_RESET); diff --git a/src/devices/bus/hp80_io/82939.h b/src/devices/bus/hp80_io/82939.h index fb9e07dd3ec..43879059257 100644 --- a/src/devices/bus/hp80_io/82939.h +++ b/src/devices/bus/hp80_io/82939.h @@ -23,7 +23,7 @@ class hp82939_io_card_device : public device_t, public device_hp80_io_interface { public: // construction/destruction - hp82939_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp82939_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp82939_io_card_device(); protected: diff --git a/src/devices/bus/hp80_io/hp80_io.cpp b/src/devices/bus/hp80_io/hp80_io.cpp index 591435bafac..f6ed74c9da1 100644 --- a/src/devices/bus/hp80_io/hp80_io.cpp +++ b/src/devices/bus/hp80_io/hp80_io.cpp @@ -21,13 +21,17 @@ DEFINE_DEVICE_TYPE(HP80_IO_SLOT, hp80_io_slot_device, "hp80_io_slot", "HP80 I/O // +-------------------+ // |hp80_io_slot_device| // +-------------------+ -hp80_io_slot_device::hp80_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hp80_io_slot_device::hp80_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP80_IO_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_irl_cb_func(*this), m_halt_cb_func(*this), m_slot_no(0) { + option_reset(); + hp80_io_slot_devices(*this); + set_default_option(nullptr); + set_fixed(false); } hp80_io_slot_device::~hp80_io_slot_device() diff --git a/src/devices/bus/hp80_io/hp80_io.h b/src/devices/bus/hp80_io/hp80_io.h index 3963d56d29e..86f00677b58 100644 --- a/src/devices/bus/hp80_io/hp80_io.h +++ b/src/devices/bus/hp80_io/hp80_io.h @@ -36,16 +36,7 @@ class hp80_io_slot_device : public device_t, { public: // construction/destruction - hp80_io_slot_device(machine_config const &mconfig, char const *tag, device_t *owner) - : hp80_io_slot_device(mconfig, tag, owner, (uint32_t)0) - { - option_reset(); - hp80_io_slot_devices(*this); - set_default_option(nullptr); - set_fixed(false); - } - - hp80_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp80_io_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~hp80_io_slot_device(); // configuration helpers diff --git a/src/devices/bus/hp9845_io/98032.cpp b/src/devices/bus/hp9845_io/98032.cpp index ecfc92ba706..d12fe1be8fd 100644 --- a/src/devices/bus/hp9845_io/98032.cpp +++ b/src/devices/bus/hp9845_io/98032.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(HP98032_GPIO_LOOPBACK , hp98032_gpio_loopback_device , "hp980 // |hp98032_io_card_device| // +----------------------+ -hp98032_io_card_device::hp98032_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98032_io_card_device::hp98032_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP98032_IO_CARD, tag, owner, clock) , device_hp9845_io_interface(mconfig, *this) , m_gpio(*this, "gpio") @@ -347,7 +347,7 @@ void hp98032_io_card_device::latch_input_LSB() // |hp98032_gpio_slot_device| // +------------------------+ -hp98032_gpio_slot_device::hp98032_gpio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98032_gpio_slot_device::hp98032_gpio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP98032_GPIO_SLOT , tag , owner , clock) , device_single_card_slot_interface(mconfig , *this) , m_pflg_handler(*this) @@ -502,7 +502,7 @@ WRITE_LINE_MEMBER(device_hp98032_gpio_interface::eir_w) // |hp98032_gpio_loopback_device| // +----------------------------+ -hp98032_gpio_loopback_device::hp98032_gpio_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98032_gpio_loopback_device::hp98032_gpio_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP98032_GPIO_LOOPBACK, tag, owner, clock) , device_hp98032_gpio_interface(mconfig, *this) { diff --git a/src/devices/bus/hp9845_io/98032.h b/src/devices/bus/hp9845_io/98032.h index 059b0248ae9..1d1ab475222 100644 --- a/src/devices/bus/hp9845_io/98032.h +++ b/src/devices/bus/hp9845_io/98032.h @@ -22,7 +22,7 @@ class hp98032_io_card_device : public device_t, public device_hp9845_io_interfac { public: // construction/destruction - hp98032_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98032_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp98032_io_card_device(); protected: @@ -67,7 +67,7 @@ class hp98032_gpio_slot_device : public device_t, { public: // construction/destruction - hp98032_gpio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98032_gpio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp98032_gpio_slot_device(); // Bits in jumper configuration @@ -163,7 +163,7 @@ class hp98032_gpio_loopback_device : public device_t, public device_hp98032_gpio { public: // construction/destruction - hp98032_gpio_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98032_gpio_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp98032_gpio_loopback_device(); virtual uint16_t get_jumpers() const override; diff --git a/src/devices/bus/hp9845_io/98034.cpp b/src/devices/bus/hp9845_io/98034.cpp index 988d8e47705..b35eaac9659 100644 --- a/src/devices/bus/hp9845_io/98034.cpp +++ b/src/devices/bus/hp9845_io/98034.cpp @@ -27,7 +27,7 @@ #define BIT_CLR(w , n) ((w) &= ~BIT_MASK(n)) #define BIT_SET(w , n) ((w) |= BIT_MASK(n)) -hp98034_io_card_device::hp98034_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98034_io_card_device::hp98034_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP98034_IO_CARD , tag , owner , clock), device_hp9845_io_interface(mconfig, *this), m_cpu(*this , "np"), @@ -394,7 +394,7 @@ void hp98034_io_card_device::device_add_mconfig(machine_config &config) // Clock for NP is generated by a RC oscillator. Manual says its typical frequency // is around 2 MHz. A quick simulation of the oscillator gives the following data though: // 2.5 MHz frequency, 33% duty cycle. - HP_NANOPROCESSOR(config, m_cpu, 2500000); + HP_NANOPROCESSOR(config, m_cpu, XTAL::u(2500000)); m_cpu->set_addrmap(AS_PROGRAM, &hp98034_io_card_device::np_program_map); m_cpu->set_addrmap(AS_IO, &hp98034_io_card_device::np_io_map); m_cpu->dc_changed().set(FUNC(hp98034_io_card_device::dc_w)); diff --git a/src/devices/bus/hp9845_io/98034.h b/src/devices/bus/hp9845_io/98034.h index c8cb5ff8765..cadffcc1bda 100644 --- a/src/devices/bus/hp9845_io/98034.h +++ b/src/devices/bus/hp9845_io/98034.h @@ -21,7 +21,7 @@ class hp98034_io_card_device : public device_t, public device_hp9845_io_interfac { public: // construction/destruction - hp98034_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98034_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp98034_io_card_device(); protected: diff --git a/src/devices/bus/hp9845_io/98035.cpp b/src/devices/bus/hp9845_io/98035.cpp index 79017edd4c2..0e19d5e0c71 100644 --- a/src/devices/bus/hp9845_io/98035.cpp +++ b/src/devices/bus/hp9845_io/98035.cpp @@ -142,7 +142,7 @@ static const uint8_t dec_2_seven_segs[] = { 0xc8 // 9 }; -hp98035_io_card_device::hp98035_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98035_io_card_device::hp98035_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP98035_IO_CARD , tag , owner , clock), device_hp9845_io_interface(mconfig, *this), device_rtc_interface(mconfig , *this), diff --git a/src/devices/bus/hp9845_io/98035.h b/src/devices/bus/hp9845_io/98035.h index f92e1734047..2833661d74b 100644 --- a/src/devices/bus/hp9845_io/98035.h +++ b/src/devices/bus/hp9845_io/98035.h @@ -21,7 +21,7 @@ class hp98035_io_card_device : public device_t, public device_hp9845_io_interfac { public: // construction/destruction - hp98035_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98035_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp98035_io_card_device(); protected: diff --git a/src/devices/bus/hp9845_io/98036.cpp b/src/devices/bus/hp9845_io/98036.cpp index 6f328062152..c67c406f157 100644 --- a/src/devices/bus/hp9845_io/98036.cpp +++ b/src/devices/bus/hp9845_io/98036.cpp @@ -34,7 +34,7 @@ namespace { // device type definitions DEFINE_DEVICE_TYPE(HP98036_IO_CARD, hp98036_io_card_device, "hp98036", "HP98036 card") -hp98036_io_card_device::hp98036_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98036_io_card_device::hp98036_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP98036_IO_CARD, tag, owner, clock) , device_hp9845_io_interface(mconfig, *this) , m_uart(*this, "uart") @@ -159,7 +159,7 @@ void hp98036_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t void hp98036_io_card_device::device_add_mconfig(machine_config &config) { - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set(FUNC(hp98036_io_card_device::txd_w)); m_uart->dtr_handler().set(FUNC(hp98036_io_card_device::dtr_w)); m_uart->rts_handler().set(FUNC(hp98036_io_card_device::rts_w)); diff --git a/src/devices/bus/hp9845_io/98036.h b/src/devices/bus/hp9845_io/98036.h index c1ee6b351bd..4f97e622fee 100644 --- a/src/devices/bus/hp9845_io/98036.h +++ b/src/devices/bus/hp9845_io/98036.h @@ -22,7 +22,7 @@ class hp98036_io_card_device : public device_t, public device_hp9845_io_interfac { public: // construction/destruction - hp98036_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98036_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp98036_io_card_device(); virtual uint16_t reg_r(address_space &space, offs_t offset) override; diff --git a/src/devices/bus/hp9845_io/98046.cpp b/src/devices/bus/hp9845_io/98046.cpp index 8b7e601f0f4..a76dd77c5d1 100644 --- a/src/devices/bus/hp9845_io/98046.cpp +++ b/src/devices/bus/hp9845_io/98046.cpp @@ -58,7 +58,7 @@ namespace { // device type definition DEFINE_DEVICE_TYPE(HP98046_IO_CARD, hp98046_io_card_device , "hp98046" , "HP98046 card") -hp98046_io_card_device::hp98046_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98046_io_card_device::hp98046_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP98046_IO_CARD, tag, owner, clock) , device_hp9845_io_interface(mconfig, *this) , m_cpu(*this, "cpu") diff --git a/src/devices/bus/hp9845_io/98046.h b/src/devices/bus/hp9845_io/98046.h index 90debbb8c03..d10767a9017 100644 --- a/src/devices/bus/hp9845_io/98046.h +++ b/src/devices/bus/hp9845_io/98046.h @@ -23,7 +23,7 @@ class hp98046_io_card_device : public device_t, public device_hp9845_io_interfac { public: // construction/destruction - hp98046_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98046_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp98046_io_card_device(); virtual uint16_t reg_r(address_space &space, offs_t offset) override; diff --git a/src/devices/bus/hp9845_io/hp9845_io.cpp b/src/devices/bus/hp9845_io/hp9845_io.cpp index bf304622f24..2d3f2a45aa6 100644 --- a/src/devices/bus/hp9845_io/hp9845_io.cpp +++ b/src/devices/bus/hp9845_io/hp9845_io.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(HP9845_IO_SLOT, hp9845_io_slot_device, "hp98x5_io_slot", "HP9 // +---------------------+ // |hp9845_io_slot_device| // +---------------------+ -hp9845_io_slot_device::hp9845_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hp9845_io_slot_device::hp9845_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP9845_IO_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_irq_cb_func(*this), diff --git a/src/devices/bus/hp9845_io/hp9845_io.h b/src/devices/bus/hp9845_io/hp9845_io.h index bebe12c3408..0bb7aed5d55 100644 --- a/src/devices/bus/hp9845_io/hp9845_io.h +++ b/src/devices/bus/hp9845_io/hp9845_io.h @@ -38,7 +38,7 @@ class hp9845_io_slot_device : public device_t, { public: // construction/destruction - hp9845_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9845_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~hp9845_io_slot_device(); // Callback setups diff --git a/src/devices/bus/hp9845_io/hp9885.cpp b/src/devices/bus/hp9845_io/hp9885.cpp index 1fadbc54679..07e82d4800d 100644 --- a/src/devices/bus/hp9845_io/hp9885.cpp +++ b/src/devices/bus/hp9845_io/hp9885.cpp @@ -224,7 +224,7 @@ enum : unsigned { ERR_HW_FAILURE = 8 }; -hp9885_device::hp9885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp9885_device::hp9885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP9885 , tag , owner , clock) , device_hp98032_gpio_interface(mconfig, *this) , m_drive_connector{*this , "floppy"} diff --git a/src/devices/bus/hp9845_io/hp9885.h b/src/devices/bus/hp9845_io/hp9885.h index 1c9af5c3066..99ca3fcd91f 100644 --- a/src/devices/bus/hp9845_io/hp9885.h +++ b/src/devices/bus/hp9845_io/hp9885.h @@ -20,7 +20,7 @@ class hp9885_device : public device_t, public device_hp98032_gpio_interface { public: - hp9885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp9885_device(); // hp98032_gpio_card_device overrides diff --git a/src/devices/bus/hp_dio/hp98265a.cpp b/src/devices/bus/hp_dio/hp98265a.cpp index 5ca9d128b53..7b1d5c0f234 100644 --- a/src/devices/bus/hp_dio/hp98265a.cpp +++ b/src/devices/bus/hp_dio/hp98265a.cpp @@ -32,34 +32,34 @@ void dio16_98265a_device::mb87030_scsi_adapter(device_t *device) void dio16_98265a_device::device_add_mconfig(machine_config &config) { - NSCSI_BUS(config, m_scsibus, 0); - nscsi_connector &scsicon0(NSCSI_CONNECTOR(config, "scsibus:0", 0)); + NSCSI_BUS(config, m_scsibus); + nscsi_connector &scsicon0(NSCSI_CONNECTOR(config, "scsibus:0")); default_scsi_devices(scsicon0); scsicon0.set_default_option("harddisk"); - default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:1", 0)); - default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:2", 0)); - default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:3", 0)); - default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:4", 0)); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:1")); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:2")); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:3")); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:4")); - nscsi_connector &scsicon5(NSCSI_CONNECTOR(config, "scsibus:5", 0)); + nscsi_connector &scsicon5(NSCSI_CONNECTOR(config, "scsibus:5")); default_scsi_devices(scsicon5); scsicon5.set_default_option("cdrom"); - default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:6", 0)); - nscsi_connector &scsicon7(NSCSI_CONNECTOR(config, "scsibus:7", 0)); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:6")); + nscsi_connector &scsicon7(NSCSI_CONNECTOR(config, "scsibus:7")); scsicon7.option_add_internal("mb87030", MB87030); scsicon7.set_default_option("mb87030"); scsicon7.set_fixed(true); scsicon7.set_option_machine_config("mb87030", mb87030_scsi_adapter); } -dio16_98265a_device::dio16_98265a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98265a_device::dio16_98265a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98265a_device(mconfig, HPDIO_98265A, tag, owner, clock) { } -dio16_98265a_device::dio16_98265a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98265a_device::dio16_98265a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio32_card_interface(mconfig, *this), m_scsibus(*this, "scsibus"), diff --git a/src/devices/bus/hp_dio/hp98265a.h b/src/devices/bus/hp_dio/hp98265a.h index 8246f9bb743..11af5fb425f 100644 --- a/src/devices/bus/hp_dio/hp98265a.h +++ b/src/devices/bus/hp_dio/hp98265a.h @@ -19,12 +19,12 @@ class dio16_98265a_device : { public: // construction/destruction - dio16_98265a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98265a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mb87030(device_t *device); protected: - dio16_98265a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98265a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides diff --git a/src/devices/bus/hp_dio/hp98543.cpp b/src/devices/bus/hp_dio/hp98543.cpp index a2bfb82f5ee..ce8e97c913c 100644 --- a/src/devices/bus/hp_dio/hp98543.cpp +++ b/src/devices/bus/hp_dio/hp98543.cpp @@ -56,7 +56,7 @@ void dio16_98543_device::device_add_mconfig(machine_config &config) topcat3.set_planemask(8); topcat3.irq_out_cb().set(FUNC(dio16_98543_device::int3_w)); - NEREID(config, m_nereid, 0); + NEREID(config, m_nereid); } const tiny_rom_entry *dio16_98543_device::device_rom_region() const @@ -76,12 +76,12 @@ device_memory_interface::space_config_vector dio16_98543_device::memory_space_co }; } -dio16_98543_device::dio16_98543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98543_device::dio16_98543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98543_device(mconfig, HPDIO_98543, tag, owner, clock) { } -dio16_98543_device::dio16_98543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98543_device::dio16_98543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/devices/bus/hp_dio/hp98543.h b/src/devices/bus/hp_dio/hp98543.h index c1e86126880..3f4a5727b5a 100644 --- a/src/devices/bus/hp_dio/hp98543.h +++ b/src/devices/bus/hp_dio/hp98543.h @@ -19,7 +19,7 @@ class dio16_98543_device : public device_memory_interface { public: - dio16_98543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t rom_r(offs_t offset); void rom_w(offs_t offset, uint16_t data); @@ -36,7 +36,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - dio16_98543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/hp_dio/hp98544.cpp b/src/devices/bus/hp_dio/hp98544.cpp index 420dc93919f..f5cbf70a4d5 100644 --- a/src/devices/bus/hp_dio/hp98544.cpp +++ b/src/devices/bus/hp_dio/hp98544.cpp @@ -65,12 +65,12 @@ const tiny_rom_entry *dio16_98544_device::device_rom_region() const // dio16_98544_device - constructor //------------------------------------------------- -dio16_98544_device::dio16_98544_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98544_device::dio16_98544_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98544_device(mconfig, HPDIO_98544, tag, owner, clock) { } -dio16_98544_device::dio16_98544_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98544_device::dio16_98544_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/devices/bus/hp_dio/hp98544.h b/src/devices/bus/hp_dio/hp98544.h index a490f765c84..337a1698bd1 100644 --- a/src/devices/bus/hp_dio/hp98544.h +++ b/src/devices/bus/hp_dio/hp98544.h @@ -23,7 +23,7 @@ class dio16_98544_device : { public: // construction/destruction - dio16_98544_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98544_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t rom_r(offs_t offset); void rom_w(offs_t offset, uint16_t data); @@ -31,7 +31,7 @@ public: required_device m_topcat; uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - dio16_98544_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98544_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/hp_dio/hp98550.cpp b/src/devices/bus/hp_dio/hp98550.cpp index 54b89418680..b5023c542a1 100644 --- a/src/devices/bus/hp_dio/hp98550.cpp +++ b/src/devices/bus/hp_dio/hp98550.cpp @@ -42,7 +42,7 @@ void dio32_98550_device::device_add_mconfig(machine_config &config) m_catseye[i]->irq_out_cb().set(FUNC(dio32_98550_device::int_w)); } - NEREID(config, m_nereid, 0); + NEREID(config, m_nereid); } const tiny_rom_entry *dio32_98550_device::device_rom_region() const @@ -63,12 +63,12 @@ device_memory_interface::space_config_vector dio32_98550_device::memory_space_co }; } -dio32_98550_device::dio32_98550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio32_98550_device::dio32_98550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio32_98550_device(mconfig, HPDIO_98550, tag, owner, clock) { } -dio32_98550_device::dio32_98550_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio32_98550_device::dio32_98550_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/devices/bus/hp_dio/hp98550.h b/src/devices/bus/hp_dio/hp98550.h index eca4da5bed6..2989b357a94 100644 --- a/src/devices/bus/hp_dio/hp98550.h +++ b/src/devices/bus/hp_dio/hp98550.h @@ -19,7 +19,7 @@ class dio32_98550_device : public device_memory_interface { public: - dio32_98550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio32_98550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t rom_r(offs_t offset, uint16_t mem_mask = ~0); void rom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -38,7 +38,7 @@ protected: required_device m_nereid; required_device_array m_catseye; - dio32_98550_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio32_98550_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/hp_dio/hp98603a.cpp b/src/devices/bus/hp_dio/hp98603a.cpp index 37458c43c36..d61c1bf7f4b 100644 --- a/src/devices/bus/hp_dio/hp98603a.cpp +++ b/src/devices/bus/hp_dio/hp98603a.cpp @@ -47,12 +47,12 @@ const tiny_rom_entry *dio16_98603a_device::device_rom_region() const return ROM_NAME(hp98603a); } -dio16_98603a_device::dio16_98603a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98603a_device::dio16_98603a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98603a_device(mconfig, HPDIO_98603A, tag, owner, clock) { } -dio16_98603a_device::dio16_98603a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98603a_device::dio16_98603a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this) { diff --git a/src/devices/bus/hp_dio/hp98603a.h b/src/devices/bus/hp_dio/hp98603a.h index 15cccb7ab3d..c1908690c2e 100644 --- a/src/devices/bus/hp_dio/hp98603a.h +++ b/src/devices/bus/hp_dio/hp98603a.h @@ -16,12 +16,12 @@ class dio16_98603a_device : { public: // construction/destruction - dio16_98603a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98603a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t rom_r(offs_t offset); void rom_w(offs_t offset, uint16_t data); protected: - dio16_98603a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98603a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/hp_dio/hp98603b.cpp b/src/devices/bus/hp_dio/hp98603b.cpp index 6210b3b0178..6bb12726edc 100644 --- a/src/devices/bus/hp_dio/hp98603b.cpp +++ b/src/devices/bus/hp_dio/hp98603b.cpp @@ -42,12 +42,12 @@ const tiny_rom_entry *dio16_98603b_device::device_rom_region() const return ROM_NAME(hp98603b); } -dio16_98603b_device::dio16_98603b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98603b_device::dio16_98603b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98603b_device(mconfig, HPDIO_98603B, tag, owner, clock) { } -dio16_98603b_device::dio16_98603b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98603b_device::dio16_98603b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this) { diff --git a/src/devices/bus/hp_dio/hp98603b.h b/src/devices/bus/hp_dio/hp98603b.h index 4f910781dba..9052f8742a5 100644 --- a/src/devices/bus/hp_dio/hp98603b.h +++ b/src/devices/bus/hp_dio/hp98603b.h @@ -16,12 +16,12 @@ class dio16_98603b_device : { public: // construction/destruction - dio16_98603b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98603b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t rom_r(offs_t offset); void rom_w(offs_t offset, uint16_t data); protected: - dio16_98603b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98603b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/hp_dio/hp98620.cpp b/src/devices/bus/hp_dio/hp98620.cpp index 88a8491fae8..e3f89b58fa4 100644 --- a/src/devices/bus/hp_dio/hp98620.cpp +++ b/src/devices/bus/hp_dio/hp98620.cpp @@ -17,12 +17,12 @@ DEFINE_DEVICE_TYPE(HPDIO_98620, bus::hp_dio::dio16_98620_device, "hp98620", "HP9 namespace bus::hp_dio { -dio16_98620_device::dio16_98620_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98620_device::dio16_98620_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98620_device(mconfig, HPDIO_98620, tag, owner, clock) { } -dio16_98620_device::dio16_98620_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98620_device::dio16_98620_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t{mconfig, type, tag, owner, clock}, device_dio32_card_interface{mconfig, *this}, m_installed_io{false}, diff --git a/src/devices/bus/hp_dio/hp98620.h b/src/devices/bus/hp_dio/hp98620.h index d8779f0e852..83df761544f 100644 --- a/src/devices/bus/hp_dio/hp98620.h +++ b/src/devices/bus/hp_dio/hp98620.h @@ -17,10 +17,10 @@ class dio16_98620_device : { public: // construction/destruction - dio16_98620_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98620_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dio16_98620_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98620_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/hp_dio/hp98643.cpp b/src/devices/bus/hp_dio/hp98643.cpp index f665303097a..2c0cdc31c0b 100644 --- a/src/devices/bus/hp_dio/hp98643.cpp +++ b/src/devices/bus/hp_dio/hp98643.cpp @@ -25,12 +25,12 @@ void dio16_98643_device::device_add_mconfig(machine_config &config) m_lance->dma_in().set(FUNC(dio16_98643_device::lance_dma_in)); } -dio16_98643_device::dio16_98643_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98643_device::dio16_98643_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98643_device(mconfig, HPDIO_98643, tag, owner, clock) { } -dio16_98643_device::dio16_98643_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98643_device::dio16_98643_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this), m_lance(*this, "lance"), diff --git a/src/devices/bus/hp_dio/hp98643.h b/src/devices/bus/hp_dio/hp98643.h index c1944bb1b8f..c7f379dcad3 100644 --- a/src/devices/bus/hp_dio/hp98643.h +++ b/src/devices/bus/hp_dio/hp98643.h @@ -34,10 +34,10 @@ class dio16_98643_device : { public: // construction/destruction - dio16_98643_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98643_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dio16_98643_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98643_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides diff --git a/src/devices/bus/hp_dio/hp98644.cpp b/src/devices/bus/hp_dio/hp98644.cpp index d74b8c02fea..ac77bc5a02a 100644 --- a/src/devices/bus/hp_dio/hp98644.cpp +++ b/src/devices/bus/hp_dio/hp98644.cpp @@ -49,12 +49,12 @@ void dio16_98644_device::device_add_mconfig(machine_config &config) // dio16_98644_device - constructor //------------------------------------------------- -dio16_98644_device::dio16_98644_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_98644_device::dio16_98644_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_98644_device(mconfig, HPDIO_98644, tag, owner, clock) { } -dio16_98644_device::dio16_98644_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_98644_device::dio16_98644_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this), m_uart{*this, INS8250_TAG}, diff --git a/src/devices/bus/hp_dio/hp98644.h b/src/devices/bus/hp_dio/hp98644.h index 6cd99123b92..b26a9bceae2 100644 --- a/src/devices/bus/hp_dio/hp98644.h +++ b/src/devices/bus/hp_dio/hp98644.h @@ -23,10 +23,10 @@ class dio16_98644_device : { public: // construction/destruction - dio16_98644_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_98644_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - dio16_98644_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_98644_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides diff --git a/src/devices/bus/hp_dio/hp_dio.cpp b/src/devices/bus/hp_dio/hp_dio.cpp index 647b28f83c9..74726b327e2 100644 --- a/src/devices/bus/hp_dio/hp_dio.cpp +++ b/src/devices/bus/hp_dio/hp_dio.cpp @@ -34,12 +34,12 @@ namespace bus::hp_dio { // LIVE DEVICE //************************************************************************** -dio16_slot_device::dio16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_slot_device::dio16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_slot_device(mconfig, DIO16_SLOT, tag, owner, clock) { } -dio16_slot_device::dio16_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_slot_device::dio16_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_slot_interface(mconfig, *this), m_dio(*this, finder_base::DUMMY_TAG) @@ -74,7 +74,7 @@ void dio16_slot_device::device_start() //------------------------------------------------- // dio32_slot_device - constructor //------------------------------------------------- -dio32_slot_device::dio32_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio32_slot_device::dio32_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_slot_device(mconfig, DIO32_SLOT, tag, owner, clock) { } @@ -96,12 +96,12 @@ void dio32_slot_device::device_start() // dio16_device - constructor //------------------------------------------------- -dio16_device::dio16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio16_device::dio16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_device(mconfig, DIO16, tag, owner, clock) { } -dio16_device::dio16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dio16_device::dio16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_prgspace(*this, finder_base::DUMMY_TAG, -1), m_bus_index{0}, @@ -321,7 +321,7 @@ void device_dio16_card_interface::interface_pre_start() // DIO32 DEVICE //************************************************************************** -dio32_device::dio32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dio32_device::dio32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dio16_device(mconfig, DIO32, tag, owner, clock) { } diff --git a/src/devices/bus/hp_dio/hp_dio.h b/src/devices/bus/hp_dio/hp_dio.h index c3ad5e0d178..3b5988cfee3 100644 --- a/src/devices/bus/hp_dio/hp_dio.h +++ b/src/devices/bus/hp_dio/hp_dio.h @@ -31,8 +31,8 @@ class dio16_slot_device : public device_t, public device_slot_interface public: // construction/destruction template - dio16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&dio_tag, U &&opts, const char *dflt, bool fixed) : - dio16_slot_device(mconfig, tag, owner, clock) + dio16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&dio_tag, U &&opts, const char *dflt, bool fixed) : + dio16_slot_device(mconfig, tag, owner) { set_dio(std::forward(dio_tag)); option_reset(); @@ -40,13 +40,13 @@ public: set_default_option(dflt); set_fixed(fixed); } - dio16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template void set_dio(T &&dio_tag) { m_dio.set_tag(std::forward(dio_tag)); } protected: - dio16_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -62,7 +62,7 @@ class dio16_device : public device_t { public: // construction/destruction - dio16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_program_space(T &&tag, int spacenum) { m_prgspace.set_tag(std::forward(tag), spacenum); } @@ -128,7 +128,7 @@ public: void set_dmar(unsigned int index, unsigned int num, int state); protected: - dio16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dio16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void install_space(int spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); // device-level overrides @@ -232,8 +232,8 @@ class dio32_slot_device : public dio16_slot_device public: // construction/destruction template - dio32_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&dio_tag, U &&opts, const char *dflt, bool fixed) : - dio32_slot_device(mconfig, tag, owner, clock) + dio32_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&dio_tag, U &&opts, const char *dflt, bool fixed) : + dio32_slot_device(mconfig, tag, owner) { set_dio(std::forward(dio_tag)); option_reset(); @@ -241,7 +241,7 @@ public: set_default_option(dflt); set_fixed(fixed); } - dio32_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio32_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -253,7 +253,7 @@ class dio32_device : public dio16_device { public: // construction/destruction - dio32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dio32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler); diff --git a/src/devices/bus/hp_dio/human_interface.cpp b/src/devices/bus/hp_dio/human_interface.cpp index a0957977f10..fa9ba0c9af7 100644 --- a/src/devices/bus/hp_dio/human_interface.cpp +++ b/src/devices/bus/hp_dio/human_interface.cpp @@ -39,7 +39,7 @@ void human_interface_device::device_add_mconfig(machine_config &config) HP_HIL_SLOT(config, "hil2", m_mlc, hp_hil_devices, "hp_46060b"); SPEAKER(config, "mono").front_center(); - sn76494_device &sound(SN76494(config, "sn76494", 333333)); + sn76494_device &sound(SN76494(config, "sn76494", XTAL::u(333333))); sound.add_route(ALL_OUTPUTS, "mono", 0.75); msm58321_device &rtc(MSM58321(config, "rtc", 32.768_kHz_XTAL)); @@ -63,7 +63,7 @@ void human_interface_device::device_add_mconfig(machine_config &config) gpib.int_write_cb().set(FUNC(human_interface_device::gpib_irq)); gpib.accrq_write_cb().set(FUNC(human_interface_device::gpib_dreq)); - ieee488_device &ieee488(IEEE488(config, IEEE488_TAG, 0)); + ieee488_device &ieee488(IEEE488(config, IEEE488_TAG)); ieee488.eoi_callback().set(m_tms9914, FUNC(tms9914_device::eoi_w)); ieee488.dav_callback().set(m_tms9914, FUNC(tms9914_device::dav_w)); ieee488.nrfd_callback().set(m_tms9914, FUNC(tms9914_device::nrfd_w)); @@ -74,7 +74,7 @@ void human_interface_device::device_add_mconfig(machine_config &config) ieee488.ren_callback().set(m_tms9914, FUNC(tms9914_device::ren_w)); ieee488.dio_callback().set(FUNC(human_interface_device::ieee488_dio_w)); - ieee488_slot_device &slot0(IEEE488_SLOT(config, "ieee0", 0)); + ieee488_slot_device &slot0(IEEE488_SLOT(config, "ieee0")); hp_ieee488_devices(slot0); slot0.set_default_option("hp9122c"); } @@ -94,12 +94,12 @@ void human_interface_device::iocpu_map(address_map& map) map(0x0000, 0x07ff).rom().region("iocpu", 0); } -human_interface_device::human_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +human_interface_device::human_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : human_interface_device(mconfig, HPDIO_HUMAN_INTERFACE, tag, owner, clock) { } -human_interface_device::human_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +human_interface_device::human_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_dio16_card_interface(mconfig, *this), m_iocpu(*this, "iocpu"), diff --git a/src/devices/bus/hp_dio/human_interface.h b/src/devices/bus/hp_dio/human_interface.h index 2e1d1376211..84b0cc7e7d0 100644 --- a/src/devices/bus/hp_dio/human_interface.h +++ b/src/devices/bus/hp_dio/human_interface.h @@ -22,10 +22,10 @@ class human_interface_device : public device_dio16_card_interface { public: - human_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + human_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - human_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + human_interface_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/hp_hil/hlebase.cpp b/src/devices/bus/hp_hil/hlebase.cpp index 247dafeea51..8296e188190 100644 --- a/src/devices/bus/hp_hil/hlebase.cpp +++ b/src/devices/bus/hp_hil/hlebase.cpp @@ -17,7 +17,7 @@ namespace bus::hp_hil { designated device constructor --------------------------------------------------*/ -hle_device_base::hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock) +hle_device_base::hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_hp_hil_interface(mconfig, *this) , m_powerup(true) diff --git a/src/devices/bus/hp_hil/hlebase.h b/src/devices/bus/hp_hil/hlebase.h index 96efcdd2073..bdf95b59975 100644 --- a/src/devices/bus/hp_hil/hlebase.h +++ b/src/devices/bus/hp_hil/hlebase.h @@ -20,7 +20,7 @@ public: void transmit_byte(uint8_t byte); protected: // constructor/destructor - hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device overrides virtual void device_start() override; diff --git a/src/devices/bus/hp_hil/hlekbd.cpp b/src/devices/bus/hp_hil/hlekbd.cpp index 25414fc2de5..c02584386c7 100644 --- a/src/devices/bus/hp_hil/hlekbd.cpp +++ b/src/devices/bus/hp_hil/hlekbd.cpp @@ -436,7 +436,7 @@ void hle_hp_itf_device::transmit_byte(uint8_t byte) abbreviated constructor --------------------------------------------------*/ -hle_hp_ipc_device::hle_hp_ipc_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +hle_hp_ipc_device::hle_hp_ipc_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : hle_device_base(mconfig, HP_IPC_HLE_KEYBOARD, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "COL1", "COL2", "COL3", "COL4", "COL5", "COL6", "COL7", "COL8", "COL9", "COL10", "COL11", "COL12", "COL13", "COL14", "COL15") , m_modifiers(*this, "COL8") @@ -568,7 +568,7 @@ ioport_constructor hle_hp_ipc_device::device_input_ports() const abbreviated constructor --------------------------------------------------*/ -hle_hp_itf_device::hle_hp_itf_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +hle_hp_itf_device::hle_hp_itf_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : hle_device_base(mconfig, HP_ITF_HLE_KEYBOARD, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "COL1", "COL2", "COL3", "COL4", "COL5", "COL6", "COL7", "COL8", "COL9", "COL10", "COL11", "COL12", "COL13", "COL14", "COL15") { } diff --git a/src/devices/bus/hp_hil/hlekbd.h b/src/devices/bus/hp_hil/hlekbd.h index e1b5c08fd5a..cdc507ab16e 100644 --- a/src/devices/bus/hp_hil/hlekbd.h +++ b/src/devices/bus/hp_hil/hlekbd.h @@ -17,7 +17,7 @@ class hle_hp_ipc_device , protected device_matrix_keyboard_interface<15U> { public: - hle_hp_ipc_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_hp_ipc_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; virtual void device_reset() override; @@ -50,7 +50,7 @@ class hle_hp_itf_device , protected device_matrix_keyboard_interface<15U> { public: - hle_hp_itf_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_hp_itf_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/hp_hil/hlemouse.cpp b/src/devices/bus/hp_hil/hlemouse.cpp index 215912b5cc6..b13366ca75b 100644 --- a/src/devices/bus/hp_hil/hlemouse.cpp +++ b/src/devices/bus/hp_hil/hlemouse.cpp @@ -33,7 +33,7 @@ INPUT_PORTS_START( hle_hp_46060b_device ) INPUT_PORTS_END } // anonymous namespace -hle_hp_46060b_device::hle_hp_46060b_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +hle_hp_46060b_device::hle_hp_46060b_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : hle_device_base(mconfig, HP_46060B_MOUSE, tag, owner, clock), mouse_x_delta{0}, mouse_y_delta{0}, diff --git a/src/devices/bus/hp_hil/hlemouse.h b/src/devices/bus/hp_hil/hlemouse.h index 830ffd20bfe..6fbb256da1b 100644 --- a/src/devices/bus/hp_hil/hlemouse.h +++ b/src/devices/bus/hp_hil/hlemouse.h @@ -16,7 +16,7 @@ class hle_hp_46060b_device : public hle_device_base { public: - hle_hp_46060b_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_hp_46060b_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; virtual ioport_constructor device_input_ports() const override; virtual int hil_poll() override; diff --git a/src/devices/bus/hp_hil/hp_hil.cpp b/src/devices/bus/hp_hil/hp_hil.cpp index e86b9b24a9c..ae14ba2280c 100644 --- a/src/devices/bus/hp_hil/hp_hil.cpp +++ b/src/devices/bus/hp_hil/hp_hil.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(HP_HIL_SLOT, hp_hil_slot_device, "hp_hil_slot", "HP-HIL Slot" //------------------------------------------------- // hp_hil_slot_device - constructor //------------------------------------------------- -hp_hil_slot_device::hp_hil_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_hil_slot_device::hp_hil_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP_HIL_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_mlc(*this, finder_base::DUMMY_TAG) @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(HP_HIL_MLC, hp_hil_mlc_device, "hp_hil_mlc", "HP-HIL Master L //------------------------------------------------- // hp_hil_mlc_device - constructor //------------------------------------------------- -hp_hil_mlc_device::hp_hil_mlc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_hil_mlc_device::hp_hil_mlc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t{mconfig, HP_HIL_MLC, tag, owner, clock} , m_r2{0} , m_r3{0} diff --git a/src/devices/bus/hp_hil/hp_hil.h b/src/devices/bus/hp_hil/hp_hil.h index c50c4742340..c1ad4566efd 100644 --- a/src/devices/bus/hp_hil/hp_hil.h +++ b/src/devices/bus/hp_hil/hp_hil.h @@ -89,7 +89,7 @@ public: // construction/destruction template hp_hil_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&mlc_tag, U &&opts, const char *dflt) - : hp_hil_slot_device(mconfig, tag, owner, 0) + : hp_hil_slot_device(mconfig, tag, owner) { m_mlc.set_tag(std::forward(mlc_tag)); option_reset(); @@ -97,7 +97,7 @@ public: set_default_option(dflt); set_fixed(false); } - hp_hil_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_hil_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -116,7 +116,7 @@ class hp_hil_mlc_device : public device_t { public: // construction/destruction - hp_hil_mlc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_hil_mlc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~hp_hil_mlc_device() { m_device_list.detach_all(); } auto int_callback() { return int_cb.bind(); } diff --git a/src/devices/bus/hp_ipc_io/82919.cpp b/src/devices/bus/hp_ipc_io/82919.cpp index e5835ebafc7..4dd2bb264b3 100644 --- a/src/devices/bus/hp_ipc_io/82919.cpp +++ b/src/devices/bus/hp_ipc_io/82919.cpp @@ -32,7 +32,7 @@ namespace { } } -hp82919_io_card_device::hp82919_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp82919_io_card_device::hp82919_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP82919_IO_CARD , tag , owner , clock) , device_hp_ipc_io_interface(mconfig, *this) , m_rs232_prim(*this , "rs232_prim") diff --git a/src/devices/bus/hp_ipc_io/82919.h b/src/devices/bus/hp_ipc_io/82919.h index 331a42b0b00..d5df86e38f5 100644 --- a/src/devices/bus/hp_ipc_io/82919.h +++ b/src/devices/bus/hp_ipc_io/82919.h @@ -21,7 +21,7 @@ class hp82919_io_card_device : public device_t, public device_hp_ipc_io_interfac { public: // construction/destruction - hp82919_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp82919_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp82919_io_card_device(); uint8_t read(offs_t addr); diff --git a/src/devices/bus/hp_ipc_io/hp_ipc_io.cpp b/src/devices/bus/hp_ipc_io/hp_ipc_io.cpp index 8d5648754bf..a79fc2db3fe 100644 --- a/src/devices/bus/hp_ipc_io/hp_ipc_io.cpp +++ b/src/devices/bus/hp_ipc_io/hp_ipc_io.cpp @@ -21,12 +21,16 @@ DEFINE_DEVICE_TYPE(HP_IPC_IO_SLOT, hp_ipc_io_slot_device, "hp_ipc_io_slot", "HP // +---------------------+ // |hp_ipc_io_slot_device| // +---------------------+ -hp_ipc_io_slot_device::hp_ipc_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hp_ipc_io_slot_device::hp_ipc_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP_IPC_IO_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_irq_cb_func(*this), m_slot_idx(0) { + option_reset(); + hp_ipc_io_slot_devices(*this); + set_default_option(nullptr); + set_fixed(false); } hp_ipc_io_slot_device::~hp_ipc_io_slot_device() diff --git a/src/devices/bus/hp_ipc_io/hp_ipc_io.h b/src/devices/bus/hp_ipc_io/hp_ipc_io.h index 856b140c7ef..f0fcc4f620a 100644 --- a/src/devices/bus/hp_ipc_io/hp_ipc_io.h +++ b/src/devices/bus/hp_ipc_io/hp_ipc_io.h @@ -22,16 +22,7 @@ class hp_ipc_io_slot_device : public device_t, { public: // construction/destruction - hp_ipc_io_slot_device(machine_config const &mconfig, char const *tag, device_t *owner) - : hp_ipc_io_slot_device(mconfig, tag, owner, (uint32_t)0) - { - option_reset(); - hp_ipc_io_slot_devices(*this); - set_default_option(nullptr); - set_fixed(false); - } - - hp_ipc_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_ipc_io_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~hp_ipc_io_slot_device(); // Set A/B slot diff --git a/src/devices/bus/ieee488/c2031.cpp b/src/devices/bus/ieee488/c2031.cpp index 4efdd03e7b5..9a41957ab46 100644 --- a/src/devices/bus/ieee488/c2031.cpp +++ b/src/devices/bus/ieee488/c2031.cpp @@ -320,7 +320,7 @@ void c2031_device::device_add_mconfig(machine_config &config) C64H156(config, m_ga, XTAL(16'000'000)); m_ga->byte_callback().set(FUNC(c2031_device::byte_w)); - floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0", 0)); + floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0")); connector.option_add("525ssqd", FLOPPY_525_SSQD); connector.set_default_option("525ssqd"); connector.set_fixed(true); @@ -386,7 +386,7 @@ inline int c2031_device::get_device_number() // c2031_device - constructor //------------------------------------------------- -c2031_device::c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c2031_device::c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C2031, tag, owner, clock) , device_ieee488_interface(mconfig, *this) , m_maincpu(*this, M6502_TAG) diff --git a/src/devices/bus/ieee488/c2031.h b/src/devices/bus/ieee488/c2031.h index f3a0dc02074..783fa06c4fd 100644 --- a/src/devices/bus/ieee488/c2031.h +++ b/src/devices/bus/ieee488/c2031.h @@ -30,7 +30,7 @@ class c2031_device : public device_t, { public: // construction/destruction - c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c2031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ieee488/c2040.cpp b/src/devices/bus/ieee488/c2040.cpp index 886dd01bbf2..237e7739df0 100644 --- a/src/devices/bus/ieee488/c2040.cpp +++ b/src/devices/bus/ieee488/c2040.cpp @@ -573,7 +573,7 @@ inline void c2040_device::update_ieee_signals() // c2040_device - constructor //------------------------------------------------- -c2040_device::c2040_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +c2040_device::c2040_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_ieee488_interface(mconfig, *this), m_maincpu(*this, M6502_TAG), @@ -595,7 +595,7 @@ c2040_device::c2040_device(const machine_config &mconfig, device_type type, cons { } -c2040_device::c2040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c2040_device::c2040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c2040_device(mconfig, C2040, tag, owner, clock) { } @@ -605,7 +605,7 @@ c2040_device::c2040_device(const machine_config &mconfig, const char *tag, devic // c3040_device - constructor //------------------------------------------------- -c3040_device::c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c3040_device::c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c2040_device(mconfig, C3040, tag, owner, clock) { } @@ -615,7 +615,7 @@ c3040_device::c3040_device(const machine_config &mconfig, const char *tag, devic // c4040_device - constructor //------------------------------------------------- -c4040_device::c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c4040_device::c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c2040_device(mconfig, C4040, tag, owner, clock) { } diff --git a/src/devices/bus/ieee488/c2040.h b/src/devices/bus/ieee488/c2040.h index 41f4f4f967e..0dc7195f20d 100644 --- a/src/devices/bus/ieee488/c2040.h +++ b/src/devices/bus/ieee488/c2040.h @@ -30,7 +30,7 @@ class c2040_device : public device_t, public device_ieee488_interface { public: // construction/destruction - c2040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c2040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t dio_r(); void dio_w(uint8_t data); @@ -43,7 +43,7 @@ public: void c2040_fdc_mem(address_map &map); void c2040_main_mem(address_map &map); protected: - c2040_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c2040_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -98,7 +98,7 @@ class c3040_device : public c2040_device { public: // construction/destruction - c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -116,7 +116,7 @@ class c4040_device : public c2040_device { public: // construction/destruction - c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/ieee488/c2040fdc.cpp b/src/devices/bus/ieee488/c2040fdc.cpp index 18c02bba831..fb14726d397 100644 --- a/src/devices/bus/ieee488/c2040fdc.cpp +++ b/src/devices/bus/ieee488/c2040fdc.cpp @@ -70,7 +70,7 @@ const tiny_rom_entry *c2040_fdc_device::device_rom_region() const // c2040_fdc_device - constructor //------------------------------------------------- -c2040_fdc_device::c2040_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c2040_fdc_device::c2040_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C2040_FDC, tag, owner, clock), m_write_sync(*this), m_write_ready(*this), diff --git a/src/devices/bus/ieee488/c2040fdc.h b/src/devices/bus/ieee488/c2040fdc.h index 2198f6aa738..2b97150d2fe 100644 --- a/src/devices/bus/ieee488/c2040fdc.h +++ b/src/devices/bus/ieee488/c2040fdc.h @@ -28,7 +28,7 @@ class c2040_fdc_device : public device_t { public: // construction/destruction - c2040_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c2040_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto sync_wr_callback() { return m_write_sync.bind(); } auto ready_wr_callback() { return m_write_ready.bind(); } diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp index 60358de4944..7c2ec038ebe 100644 --- a/src/devices/bus/ieee488/c8050.cpp +++ b/src/devices/bus/ieee488/c8050.cpp @@ -680,7 +680,7 @@ inline void c8050_device::update_ieee_signals() // c8050_device - constructor //------------------------------------------------- -c8050_device::c8050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +c8050_device::c8050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_ieee488_interface(mconfig, *this), m_maincpu(*this, M6502_TAG), @@ -701,7 +701,7 @@ c8050_device::c8050_device(const machine_config &mconfig, device_type type, cons { } -c8050_device::c8050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c8050_device::c8050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c8050_device(mconfig, C8050, tag, owner, clock) { } @@ -711,7 +711,7 @@ c8050_device::c8050_device(const machine_config &mconfig, const char *tag, devic // c8250_device - constructor //------------------------------------------------- -c8250_device::c8250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c8250_device::c8250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c8050_device(mconfig, C8250, tag, owner, clock) { } @@ -721,7 +721,7 @@ c8250_device::c8250_device(const machine_config &mconfig, const char *tag, devic // c8250lp_device - constructor //------------------------------------------------- -c8250lp_device::c8250lp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c8250lp_device::c8250lp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c8050_device(mconfig, C8250LP, tag, owner, clock) { } @@ -731,7 +731,7 @@ c8250lp_device::c8250lp_device(const machine_config &mconfig, const char *tag, d // sfd1001_device - constructor //------------------------------------------------- -sfd1001_device::sfd1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sfd1001_device::sfd1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c8050_device(mconfig, SFD1001, tag, owner, clock) { } diff --git a/src/devices/bus/ieee488/c8050.h b/src/devices/bus/ieee488/c8050.h index a8047617408..284704ab608 100644 --- a/src/devices/bus/ieee488/c8050.h +++ b/src/devices/bus/ieee488/c8050.h @@ -30,7 +30,7 @@ class c8050_device : public device_t, public device_ieee488_interface { public: // construction/destruction - c8050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c8050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t dio_r(); void dio_w(uint8_t data); @@ -45,7 +45,7 @@ public: void c8250lp_fdc_mem(address_map &map); void sfd1001_fdc_mem(address_map &map); protected: - c8050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c8050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -92,7 +92,7 @@ class c8250_device : public c8050_device { public: // construction/destruction - c8250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c8250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -109,7 +109,7 @@ class c8250lp_device : public c8050_device { public: // construction/destruction - c8250lp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c8250lp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -127,7 +127,7 @@ class sfd1001_device : public c8050_device { public: // construction/destruction - sfd1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sfd1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/ieee488/c8050fdc.cpp b/src/devices/bus/ieee488/c8050fdc.cpp index eea107417c9..b044566b5c5 100644 --- a/src/devices/bus/ieee488/c8050fdc.cpp +++ b/src/devices/bus/ieee488/c8050fdc.cpp @@ -72,7 +72,7 @@ const tiny_rom_entry *c8050_fdc_device::device_rom_region() const // c8050_fdc_device - constructor //------------------------------------------------- -c8050_fdc_device::c8050_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c8050_fdc_device::c8050_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C8050_FDC, tag, owner, clock), m_write_sync(*this), m_write_ready(*this), diff --git a/src/devices/bus/ieee488/c8050fdc.h b/src/devices/bus/ieee488/c8050fdc.h index dd390b1b7c5..03248c63379 100644 --- a/src/devices/bus/ieee488/c8050fdc.h +++ b/src/devices/bus/ieee488/c8050fdc.h @@ -28,7 +28,7 @@ class c8050_fdc_device : public device_t { public: // construction/destruction - c8050_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c8050_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto sync_wr_callback() { return m_write_sync.bind(); } auto ready_wr_callback() { return m_write_ready.bind(); } diff --git a/src/devices/bus/ieee488/c8280.cpp b/src/devices/bus/ieee488/c8280.cpp index 1d9eb476110..a347272ec06 100644 --- a/src/devices/bus/ieee488/c8280.cpp +++ b/src/devices/bus/ieee488/c8280.cpp @@ -379,7 +379,7 @@ inline void c8280_device::update_ieee_signals() // c8280_device - constructor //------------------------------------------------- -c8280_device::c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c8280_device::c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C8280, tag, owner, clock), device_ieee488_interface(mconfig, *this), m_maincpu(*this, M6502_DOS_TAG), diff --git a/src/devices/bus/ieee488/c8280.h b/src/devices/bus/ieee488/c8280.h index 1317a6c13f7..c8196f60033 100644 --- a/src/devices/bus/ieee488/c8280.h +++ b/src/devices/bus/ieee488/c8280.h @@ -30,7 +30,7 @@ class c8280_device : public device_t, public device_ieee488_interface { public: // construction/destruction - c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ieee488/d9060.cpp b/src/devices/bus/ieee488/d9060.cpp index 464db8cc902..b88ab032d9c 100644 --- a/src/devices/bus/ieee488/d9060.cpp +++ b/src/devices/bus/ieee488/d9060.cpp @@ -469,7 +469,7 @@ inline void d9060_device_base::update_ieee_signals() // d9060_device_base - constructor //------------------------------------------------- -d9060_device_base::d9060_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +d9060_device_base::d9060_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock) , device_ieee488_interface(mconfig, *this) , m_maincpu(*this, M6502_DOS_TAG) @@ -496,7 +496,7 @@ d9060_device_base::d9060_device_base(const machine_config &mconfig, device_type // d9060_device - constructor //------------------------------------------------- -d9060_device::d9060_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +d9060_device::d9060_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : d9060_device_base(mconfig, D9060, tag, owner, clock, TYPE_9060) { } @@ -506,7 +506,7 @@ d9060_device::d9060_device(const machine_config &mconfig, const char *tag, devic // d9090_device - constructor //------------------------------------------------- -d9090_device::d9090_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +d9090_device::d9090_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : d9060_device_base(mconfig, D9090, tag, owner, clock, TYPE_9090) { } diff --git a/src/devices/bus/ieee488/d9060.h b/src/devices/bus/ieee488/d9060.h index a5da444dbcf..0027bad7dcf 100644 --- a/src/devices/bus/ieee488/d9060.h +++ b/src/devices/bus/ieee488/d9060.h @@ -36,7 +36,7 @@ protected: }; // construction/destruction - d9060_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + d9060_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -97,7 +97,7 @@ class d9060_device : public d9060_device_base { public: // construction/destruction - d9060_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + d9060_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -107,7 +107,7 @@ class d9090_device : public d9060_device_base { public: // construction/destruction - d9090_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + d9090_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/ieee488/grid2102.cpp b/src/devices/bus/ieee488/grid2102.cpp index 4e6bc92c391..3a0bc8e5a20 100644 --- a/src/devices/bus/ieee488/grid2102.cpp +++ b/src/devices/bus/ieee488/grid2102.cpp @@ -65,7 +65,7 @@ uint8_t grid2101_hdd_device::identify_response[56] = { }; -grid210x_device::grid210x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int bus_addr, uint8_t *identify_response, attotime read_delay) +grid210x_device::grid210x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int bus_addr, uint8_t *identify_response, attotime read_delay) : device_t(mconfig, type, tag, owner, clock), device_ieee488_interface(mconfig, *this), device_image_interface(mconfig, *this), @@ -298,18 +298,18 @@ void grid210x_device::ieee488_ren(int state) { LOG("grid210x_device ren state set to %d\n", state); } -grid2101_hdd_device::grid2101_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +grid2101_hdd_device::grid2101_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : grid210x_device(mconfig, GRID2101_HDD, tag, owner, clock, 4, identify_response, attotime::from_usec(150)) { } -grid2101_floppy_device::grid2101_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : grid210x_device(mconfig, GRID2101_FLOPPY, tag, owner, clock, 5, identify_response) +grid2101_floppy_device::grid2101_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : grid210x_device(mconfig, GRID2101_FLOPPY, tag, owner, clock, 5, identify_response) { } -grid2102_device::grid2102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : grid210x_device(mconfig, GRID2102, tag, owner, clock, 6, identify_response) +grid2102_device::grid2102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : grid210x_device(mconfig, GRID2102, tag, owner, clock, 6, identify_response) { } diff --git a/src/devices/bus/ieee488/grid2102.h b/src/devices/bus/ieee488/grid2102.h index 11cdbcecdd0..501cf62f41c 100644 --- a/src/devices/bus/ieee488/grid2102.h +++ b/src/devices/bus/ieee488/grid2102.h @@ -28,7 +28,7 @@ class grid210x_device : public device_t, { public: // construction/destruction - grid210x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int bus_addr, uint8_t *identify_response, attotime read_delay = attotime::from_msec(5)); + grid210x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int bus_addr, uint8_t *identify_response, attotime read_delay = attotime::from_msec(5)); protected: // device-level overrides @@ -84,7 +84,7 @@ protected: class grid2102_device : public grid210x_device { public: // construction/destruction - grid2102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + grid2102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint8_t identify_response[]; }; @@ -92,7 +92,7 @@ private: class grid2101_floppy_device : public grid210x_device { public: // construction/destruction - grid2101_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + grid2101_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint8_t identify_response[]; }; @@ -100,7 +100,7 @@ private: class grid2101_hdd_device : public grid210x_device { public: // construction/destruction - grid2101_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + grid2101_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual const char *image_type_name() const noexcept override { return "harddisk"; } diff --git a/src/devices/bus/ieee488/hardbox.cpp b/src/devices/bus/ieee488/hardbox.cpp index 0ad2db1abfb..96dca16c18a 100644 --- a/src/devices/bus/ieee488/hardbox.cpp +++ b/src/devices/bus/ieee488/hardbox.cpp @@ -286,7 +286,7 @@ void hardbox_device::device_add_mconfig(machine_config &config) ppi1.in_pc_callback().set(FUNC(hardbox_device::ppi1_pc_r)); ppi1.out_pc_callback().set(FUNC(hardbox_device::ppi1_pc_w)); - CORVUS_HDC(config, m_hdc, 0); + CORVUS_HDC(config, m_hdc); HARDDISK(config, "harddisk1", "corvus_hdd"); HARDDISK(config, "harddisk2", "corvus_hdd"); HARDDISK(config, "harddisk3", "corvus_hdd"); @@ -336,7 +336,7 @@ ioport_constructor hardbox_device::device_input_ports() const // hardbox_device - constructor //------------------------------------------------- -hardbox_device::hardbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hardbox_device::hardbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HARDBOX, tag, owner, clock) , device_ieee488_interface(mconfig, *this) , m_maincpu(*this, Z80_TAG) diff --git a/src/devices/bus/ieee488/hardbox.h b/src/devices/bus/ieee488/hardbox.h index 4b22ab57354..6b9fdcc194c 100644 --- a/src/devices/bus/ieee488/hardbox.h +++ b/src/devices/bus/ieee488/hardbox.h @@ -31,7 +31,7 @@ class hardbox_device : public device_t, { public: // construction/destruction - hardbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hardbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ieee488/hp9122c.cpp b/src/devices/bus/ieee488/hp9122c.cpp index f9619617ca1..cc8328ba658 100644 --- a/src/devices/bus/ieee488/hp9122c.cpp +++ b/src/devices/bus/ieee488/hp9122c.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(HP9122C, hp9122c_device, "hp9122c", "HP9122C Dual High density disk drive") -hp9122c_device::hp9122c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp9122c_device::hp9122c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t{mconfig, HP9122C, tag, owner, clock}, device_ieee488_interface{mconfig, *this}, m_cpu{*this , "cpu"}, diff --git a/src/devices/bus/ieee488/hp9122c.h b/src/devices/bus/ieee488/hp9122c.h index 0c2d4854251..4d31493f6f0 100644 --- a/src/devices/bus/ieee488/hp9122c.h +++ b/src/devices/bus/ieee488/hp9122c.h @@ -25,7 +25,7 @@ class hp9122c_device : public device_t, { public: // construction/destruction - hp9122c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9122c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/ieee488/hp9895.cpp b/src/devices/bus/ieee488/hp9895.cpp index aead54c0a18..fa9f4cd8925 100644 --- a/src/devices/bus/ieee488/hp9895.cpp +++ b/src/devices/bus/ieee488/hp9895.cpp @@ -132,7 +132,7 @@ static const uint8_t xv_drive_masks[] = { BIT_MASK(REG_XV_DRIVE1_BIT) }; -hp9895_device::hp9895_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp9895_device::hp9895_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP9895, tag, owner, clock), device_ieee488_interface(mconfig, *this), m_cpu(*this , "cpu"), @@ -870,12 +870,12 @@ const tiny_rom_entry *hp9895_device::device_rom_region() const void hp9895_device::device_add_mconfig(machine_config &config) { - Z80(config, m_cpu, 4000000); + Z80(config, m_cpu, XTAL::u(4000000)); m_cpu->set_addrmap(AS_PROGRAM, &hp9895_device::z80_program_map); m_cpu->set_addrmap(AS_IO, &hp9895_device::z80_io_map); m_cpu->refresh_cb().set(FUNC(hp9895_device::z80_m1_w)); - PHI(config, m_phi, 0); + PHI(config, m_phi); m_phi->eoi_write_cb().set(FUNC(hp9895_device::phi_eoi_w)); m_phi->dav_write_cb().set(FUNC(hp9895_device::phi_dav_w)); m_phi->nrfd_write_cb().set(FUNC(hp9895_device::phi_nrfd_w)); diff --git a/src/devices/bus/ieee488/hp9895.h b/src/devices/bus/ieee488/hp9895.h index 1cb77d60090..8ee212a7a78 100644 --- a/src/devices/bus/ieee488/hp9895.h +++ b/src/devices/bus/ieee488/hp9895.h @@ -24,7 +24,7 @@ class hp9895_device : public device_t, { public: // construction/destruction - hp9895_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9895_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/ieee488/ieee488.cpp b/src/devices/bus/ieee488/ieee488.cpp index 947aad2d1f7..6caf46b2f72 100644 --- a/src/devices/bus/ieee488/ieee488.cpp +++ b/src/devices/bus/ieee488/ieee488.cpp @@ -64,7 +64,7 @@ device_ieee488_interface::~device_ieee488_interface() // ieee488_slot_device - constructor //------------------------------------------------- -ieee488_slot_device::ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ieee488_slot_device::ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IEEE488_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), m_address(0) @@ -95,7 +95,7 @@ void ieee488_slot_device::device_start() void ieee488_slot_device::add_cbm_slot(machine_config &config, const char *_tag, int _address, const char *_def_slot) { - ieee488_slot_device &slot(IEEE488_SLOT(config, _tag, 0)); + ieee488_slot_device &slot(IEEE488_SLOT(config, _tag)); cbm_ieee488_devices(slot); slot.set_default_option(_def_slot); slot.set_address(_address); @@ -109,7 +109,7 @@ void ieee488_slot_device::add_cbm_slot(machine_config &config, const char *_tag, // ieee488_device - constructor //------------------------------------------------- -ieee488_device::ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ieee488_device::ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IEEE488, tag, owner, clock), m_write_eoi(*this), m_write_dav(*this), diff --git a/src/devices/bus/ieee488/ieee488.h b/src/devices/bus/ieee488/ieee488.h index 5a83d0fe927..cb5c3f06501 100644 --- a/src/devices/bus/ieee488/ieee488.h +++ b/src/devices/bus/ieee488/ieee488.h @@ -41,7 +41,7 @@ class ieee488_device : public device_t { public: // construction/destruction - ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto eoi_callback() { return m_write_eoi.bind(); } auto dav_callback() { return m_write_dav.bind(); } @@ -171,7 +171,7 @@ public: // construction/destruction template ieee488_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, int address, T &&opts, char const *dflt) - : ieee488_slot_device(mconfig, tag, owner, (uint32_t)0) + : ieee488_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -179,7 +179,7 @@ public: set_fixed(false); set_address(address); } - ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ieee488_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); static void add_cbm_slot(machine_config &config, const char *_tag, int _address, const char *_def_slot); static void add_cbm_defaults(machine_config &config, const char *_default_drive) diff --git a/src/devices/bus/ieee488/remote488.cpp b/src/devices/bus/ieee488/remote488.cpp index d559622dad6..83843d09c95 100644 --- a/src/devices/bus/ieee488/remote488.cpp +++ b/src/devices/bus/ieee488/remote488.cpp @@ -243,7 +243,7 @@ constexpr unsigned AH_TO_MS = 10; // Timeout in AH to report a byte st // device type definition DEFINE_DEVICE_TYPE(REMOTE488, remote488_device, "remote488", "IEEE-488 Remotizer") -remote488_device::remote488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +remote488_device::remote488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , REMOTE488 , tag , owner , clock), device_ieee488_interface(mconfig , *this), m_stream(*this , "stream") @@ -252,7 +252,7 @@ remote488_device::remote488_device(const machine_config &mconfig, const char *ta void remote488_device::device_add_mconfig(machine_config &config) { - BITBANGER(config, m_stream, 0); + BITBANGER(config, m_stream); } void remote488_device::ieee488_eoi(int state) diff --git a/src/devices/bus/ieee488/remote488.h b/src/devices/bus/ieee488/remote488.h index bcb64866a05..3112fa607bc 100644 --- a/src/devices/bus/ieee488/remote488.h +++ b/src/devices/bus/ieee488/remote488.h @@ -19,7 +19,7 @@ class remote488_device : public device_t, { public: // construction/destruction - remote488_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + remote488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_ieee488_interface overrides virtual void ieee488_eoi(int state) override; diff --git a/src/devices/bus/ieee488/shark.cpp b/src/devices/bus/ieee488/shark.cpp index 1e160b6c310..0d4db989a43 100644 --- a/src/devices/bus/ieee488/shark.cpp +++ b/src/devices/bus/ieee488/shark.cpp @@ -83,12 +83,12 @@ void mshark_device::mshark_io(address_map &map) void mshark_device::device_add_mconfig(machine_config &config) { // basic machine hardware - I8085A(config, m_maincpu, 1000000); + I8085A(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mshark_device::mshark_mem); m_maincpu->set_addrmap(AS_IO, &mshark_device::mshark_io); // devices - HARDDISK(config, "harddisk1", 0); + HARDDISK(config, "harddisk1"); RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr); } @@ -120,7 +120,7 @@ ioport_constructor mshark_device::device_input_ports() const // mshark_device - constructor //------------------------------------------------- -mshark_device::mshark_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mshark_device::mshark_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSHARK, tag, owner, clock) , device_ieee488_interface(mconfig, *this) , m_maincpu(*this, I8085_TAG) diff --git a/src/devices/bus/ieee488/shark.h b/src/devices/bus/ieee488/shark.h index 6ba13e138e8..a79c7b4d4db 100644 --- a/src/devices/bus/ieee488/shark.h +++ b/src/devices/bus/ieee488/shark.h @@ -28,7 +28,7 @@ class mshark_device : public device_t, { public: // construction/destruction - mshark_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mshark_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp index 0a38d5ce9cf..c834e999812 100644 --- a/src/devices/bus/ieee488/softbox.cpp +++ b/src/devices/bus/ieee488/softbox.cpp @@ -239,7 +239,7 @@ void softbox_device::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_IO, &softbox_device::softbox_io); // devices - i8251_device &i8251(I8251(config, I8251_TAG, 0)); + i8251_device &i8251(I8251(config, I8251_TAG)); i8251.txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); i8251.dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); i8251.rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); @@ -264,7 +264,7 @@ void softbox_device::device_add_mconfig(machine_config &config) m_dbrg->fr_handler().set(I8251_TAG, FUNC(i8251_device::write_rxc)); m_dbrg->ft_handler().set(I8251_TAG, FUNC(i8251_device::write_txc)); - CORVUS_HDC(config, m_hdc, 0); + CORVUS_HDC(config, m_hdc); HARDDISK(config, "harddisk1", "corvus_hdd"); HARDDISK(config, "harddisk2", "corvus_hdd"); HARDDISK(config, "harddisk3", "corvus_hdd"); @@ -312,7 +312,7 @@ ioport_constructor softbox_device::device_input_ports() const // softbox_device - constructor //------------------------------------------------- -softbox_device::softbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +softbox_device::softbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SOFTBOX, tag, owner, clock) , device_ieee488_interface(mconfig, *this) , m_maincpu(*this, Z80_TAG) diff --git a/src/devices/bus/ieee488/softbox.h b/src/devices/bus/ieee488/softbox.h index 6b1f4a1dee0..656cc4d268a 100644 --- a/src/devices/bus/ieee488/softbox.h +++ b/src/devices/bus/ieee488/softbox.h @@ -33,7 +33,7 @@ class softbox_device : public device_t, { public: // construction/destruction - softbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + softbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/imi7000/imi5000h.cpp b/src/devices/bus/imi7000/imi5000h.cpp index f32e7fdf2b3..f7af91e4276 100644 --- a/src/devices/bus/imi7000/imi5000h.cpp +++ b/src/devices/bus/imi7000/imi5000h.cpp @@ -380,7 +380,7 @@ void imi5000h_device::device_add_mconfig(machine_config & config) pio3.out_pb_callback().set(FUNC(imi5000h_device::pio3_pb_w)); pio3.out_brdy_callback().set(Z80PIO_3_TAG, FUNC(z80pio_device::strobe_b)); - //HARDDISK(config, "harddisk1", 0); + //HARDDISK(config, "harddisk1"); } @@ -438,7 +438,7 @@ ioport_constructor imi5000h_device::device_input_ports() const // imi5000h_device - constructor //------------------------------------------------- -imi5000h_device::imi5000h_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +imi5000h_device::imi5000h_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IMI5000H, tag, owner, clock), device_imi7000_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/imi7000/imi5000h.h b/src/devices/bus/imi7000/imi5000h.h index 77d276b154b..a4beb0e0c81 100644 --- a/src/devices/bus/imi7000/imi5000h.h +++ b/src/devices/bus/imi7000/imi5000h.h @@ -32,7 +32,7 @@ class imi5000h_device : public device_t, { public: // construction/destruction - imi5000h_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + imi5000h_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/imi7000/imi7000.cpp b/src/devices/bus/imi7000/imi7000.cpp index 3c9e417867b..ce18864b0f4 100644 --- a/src/devices/bus/imi7000/imi7000.cpp +++ b/src/devices/bus/imi7000/imi7000.cpp @@ -52,7 +52,7 @@ device_imi7000_interface::device_imi7000_interface(const machine_config &mconfig // imi7000_slot_device - constructor //------------------------------------------------- -imi7000_slot_device::imi7000_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +imi7000_slot_device::imi7000_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IMI7000_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_card(nullptr) @@ -78,7 +78,7 @@ void imi7000_slot_device::device_start() // imi7000_bus_device - constructor //------------------------------------------------- -imi7000_bus_device::imi7000_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +imi7000_bus_device::imi7000_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IMI7000_BUS, tag, owner, clock) , m_units(*this, "%u", 0U) { diff --git a/src/devices/bus/imi7000/imi7000.h b/src/devices/bus/imi7000/imi7000.h index c1cf590091c..a89d5acce03 100644 --- a/src/devices/bus/imi7000/imi7000.h +++ b/src/devices/bus/imi7000/imi7000.h @@ -52,14 +52,14 @@ public: // construction/destruction template imi7000_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : imi7000_slot_device(mconfig, tag, owner, (uint32_t)0) + : imi7000_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - imi7000_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + imi7000_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -75,7 +75,7 @@ class imi7000_bus_device : public device_t { public: // construction/destruction - imi7000_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + imi7000_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_slot_default_options(T &&def1, U &&def2, V &&def3, W &&def4) diff --git a/src/devices/bus/intellec4/insdatastor.cpp b/src/devices/bus/intellec4/insdatastor.cpp index 81bbf713db7..18f68688d13 100644 --- a/src/devices/bus/intellec4/insdatastor.cpp +++ b/src/devices/bus/intellec4/insdatastor.cpp @@ -166,7 +166,7 @@ class imm4_22_device , public device_image_interface { public: - imm4_22_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + imm4_22_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual image_init_result call_load() override; virtual void call_unload() override; @@ -208,7 +208,7 @@ private: }; -imm4_22_device::imm4_22_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +imm4_22_device::imm4_22_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTELLEC4_INST_DATA_STORAGE, tag, owner, clock) , bus::intellec4::device_univ_card_interface(mconfig, *this) , device_image_interface(mconfig, *this) diff --git a/src/devices/bus/intellec4/intellec4.cpp b/src/devices/bus/intellec4/intellec4.cpp index f1eb0934448..f6bfa73f496 100644 --- a/src/devices/bus/intellec4/intellec4.cpp +++ b/src/devices/bus/intellec4/intellec4.cpp @@ -17,7 +17,7 @@ namespace bus::intellec4 { SLOT DEVICE ***********************************************************************/ -univ_slot_device::univ_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +univ_slot_device::univ_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTELLEC4_UNIV_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) @@ -45,7 +45,7 @@ void univ_slot_device::device_start() BUS DEVICE ***********************************************************************/ -univ_bus_device::univ_bus_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +univ_bus_device::univ_bus_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTELLEC4_UNIV_BUS, tag, owner, clock) , m_rom_space(*this, finder_base::DUMMY_TAG, -1) , m_rom_ports_space(*this, finder_base::DUMMY_TAG, -1) diff --git a/src/devices/bus/intellec4/intellec4.h b/src/devices/bus/intellec4/intellec4.h index 287c23681bf..a08b9fb0283 100644 --- a/src/devices/bus/intellec4/intellec4.h +++ b/src/devices/bus/intellec4/intellec4.h @@ -125,7 +125,7 @@ class univ_slot_device : public device_t, public device_single_card_slot_interfa { public: template - univ_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&bus_tag, U &&opts, const char *dflt) + univ_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&bus_tag, U &&opts, const char *dflt) : univ_slot_device(mconfig, tag, owner, clock) { m_bus.set_tag(std::forward(bus_tag)); @@ -134,7 +134,7 @@ public: set_default_option(dflt); set_fixed(false); } - univ_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + univ_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t implementation @@ -164,7 +164,7 @@ public: auto reset_4002_out_cb() { return m_reset_4002_out_cb.bind(); } auto user_reset_out_cb() { return m_user_reset_out_cb.bind(); } - univ_bus_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + univ_bus_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // input lines DECLARE_WRITE_LINE_MEMBER(sync_in); diff --git a/src/devices/bus/intellec4/prommemory.cpp b/src/devices/bus/intellec4/prommemory.cpp index 7af8a5757f2..d45861a85af 100644 --- a/src/devices/bus/intellec4/prommemory.cpp +++ b/src/devices/bus/intellec4/prommemory.cpp @@ -95,7 +95,7 @@ class imm6_26_device , public device_image_interface { public: - imm6_26_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + imm6_26_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual image_init_result call_load() override; virtual void call_unload() override; @@ -119,7 +119,7 @@ private: }; -imm6_26_device::imm6_26_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +imm6_26_device::imm6_26_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTELLEC4_PROM_MEMORY, tag, owner, clock) , bus::intellec4::device_univ_card_interface(mconfig, *this) , device_image_interface(mconfig, *this) diff --git a/src/devices/bus/intellec4/tapereader.cpp b/src/devices/bus/intellec4/tapereader.cpp index aa1acd9e963..4759b28457a 100644 --- a/src/devices/bus/intellec4/tapereader.cpp +++ b/src/devices/bus/intellec4/tapereader.cpp @@ -26,7 +26,7 @@ class imm4_90_device , public bus::intellec4::device_univ_card_interface { public: - imm4_90_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + imm4_90_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual image_init_result call_load() override; virtual void call_unload() override; @@ -53,7 +53,7 @@ private: }; -imm4_90_device::imm4_90_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +imm4_90_device::imm4_90_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : paper_tape_reader_device(mconfig, INTELLEC4_TAPE_READER, tag, owner, clock) , bus::intellec4::device_univ_card_interface(mconfig, *this) , m_step_timer(nullptr) diff --git a/src/devices/bus/interpro/keyboard/hle.cpp b/src/devices/bus/interpro/keyboard/hle.cpp index 8d773a9fa85..670c7a507d7 100644 --- a/src/devices/bus/interpro/keyboard/hle.cpp +++ b/src/devices/bus/interpro/keyboard/hle.cpp @@ -254,7 +254,7 @@ INPUT_PORTS_END } // anonymous namespace -hle_device_base::hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +hle_device_base::hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_buffered_serial_interface(mconfig, *this) , device_interpro_keyboard_port_interface(mconfig, *this) @@ -429,7 +429,7 @@ void hle_device_base::received_byte(u8 byte) } } -hle_en_us_device::hle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +hle_en_us_device::hle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : hle_device_base(mconfig, INTERPRO_HLE_EN_US_KEYBOARD, tag, owner, clock), m_modifiers(*this, "modifiers") { diff --git a/src/devices/bus/interpro/keyboard/hle.h b/src/devices/bus/interpro/keyboard/hle.h index 607b7b42087..d1663f3d4e9 100644 --- a/src/devices/bus/interpro/keyboard/hle.h +++ b/src/devices/bus/interpro/keyboard/hle.h @@ -25,7 +25,7 @@ public: protected: // constructor/destructor - hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + hle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device overrides virtual void device_add_mconfig(machine_config &config) override; @@ -105,7 +105,7 @@ private: class hle_en_us_device : public hle_device_base { public: - hle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + hle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/interpro/keyboard/keyboard.cpp b/src/devices/bus/interpro/keyboard/keyboard.cpp index 2e31ee7e258..4943d7f72b0 100644 --- a/src/devices/bus/interpro/keyboard/keyboard.cpp +++ b/src/devices/bus/interpro/keyboard/keyboard.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(INTERPRO_KEYBOARD_PORT, interpro_keyboard_port_device, "interpro_keyboard_port", "InterPro Keyboard Port") -interpro_keyboard_port_device::interpro_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +interpro_keyboard_port_device::interpro_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTERPRO_KEYBOARD_PORT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_rxd_handler(*this) diff --git a/src/devices/bus/interpro/keyboard/keyboard.h b/src/devices/bus/interpro/keyboard/keyboard.h index a51c254d7f8..2d40a2e769a 100644 --- a/src/devices/bus/interpro/keyboard/keyboard.h +++ b/src/devices/bus/interpro/keyboard/keyboard.h @@ -22,7 +22,7 @@ public: set_fixed(false); } - interpro_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + interpro_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto rxd_handler_cb() { return m_rxd_handler.bind(); } diff --git a/src/devices/bus/interpro/keyboard/lle.cpp b/src/devices/bus/interpro/keyboard/lle.cpp index 1556a3f4779..56a798b602e 100644 --- a/src/devices/bus/interpro/keyboard/lle.cpp +++ b/src/devices/bus/interpro/keyboard/lle.cpp @@ -421,7 +421,7 @@ ROM_END } // anonymous namespace -lle_device_base::lle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +lle_device_base::lle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_interpro_keyboard_port_interface(mconfig, *this) , m_mcu(*this, "mcu") @@ -447,7 +447,7 @@ void lle_device_base::device_add_mconfig(machine_config &config) ADDRESS_MAP_BANK(config, m_ext).set_map(&lle_device_base::ext_map).set_options(ENDIANNESS_NATIVE, 8, 12, 0x100); SPEAKER(config, "keyboard").front_center(); - SPEAKER_SOUND(config, m_speaker, 0).add_route(ALL_OUTPUTS, "keyboard", 0.25); + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "keyboard", 0.25); } void lle_device_base::device_start() @@ -595,7 +595,7 @@ void lle_device_base::bus_w(u8 data) m_bus = data; } -lle_en_us_device::lle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +lle_en_us_device::lle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : lle_device_base(mconfig, INTERPRO_LLE_EN_US_KEYBOARD, tag, owner, clock) { } diff --git a/src/devices/bus/interpro/keyboard/lle.h b/src/devices/bus/interpro/keyboard/lle.h index 385f2484fab..aa3edf5a215 100644 --- a/src/devices/bus/interpro/keyboard/lle.h +++ b/src/devices/bus/interpro/keyboard/lle.h @@ -20,7 +20,7 @@ class lle_device_base { protected: // constructor/destructor - lle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + lle_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device overrides virtual void device_add_mconfig(machine_config &config) override; @@ -60,7 +60,7 @@ private: class lle_en_us_device : public lle_device_base { public: - lle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + lle_en_us_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; virtual tiny_rom_entry const *device_rom_region() const override; diff --git a/src/devices/bus/interpro/mouse/mouse.cpp b/src/devices/bus/interpro/mouse/mouse.cpp index 835bcd1f68d..c32d80b0884 100644 --- a/src/devices/bus/interpro/mouse/mouse.cpp +++ b/src/devices/bus/interpro/mouse/mouse.cpp @@ -36,7 +36,7 @@ static INPUT_PORTS_START(interpro_mouse) PORT_BIT(0xff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(50) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_CHANGED_MEMBER(DEVICE_SELF, interpro_mouse_device, mouse_y, 0) INPUT_PORTS_END -interpro_mouse_port_device::interpro_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +interpro_mouse_port_device::interpro_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTERPRO_MOUSE_PORT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_state_func(*this) @@ -60,7 +60,7 @@ device_interpro_mouse_port_interface::device_interpro_mouse_port_interface(machi { } -interpro_mouse_device::interpro_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +interpro_mouse_device::interpro_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTERPRO_MOUSE, tag, owner, clock) , device_interpro_mouse_port_interface(mconfig, *this) { diff --git a/src/devices/bus/interpro/mouse/mouse.h b/src/devices/bus/interpro/mouse/mouse.h index f10019605cb..98988eb2841 100644 --- a/src/devices/bus/interpro/mouse/mouse.h +++ b/src/devices/bus/interpro/mouse/mouse.h @@ -22,7 +22,7 @@ public: set_fixed(false); } - interpro_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + interpro_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto state_func() { return m_state_func.bind(); } @@ -66,7 +66,7 @@ public: }; // constructor/destructor - interpro_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + interpro_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(mouse_button); DECLARE_INPUT_CHANGED_MEMBER(mouse_x); diff --git a/src/devices/bus/interpro/sr/edge.cpp b/src/devices/bus/interpro/sr/edge.cpp index 7b5dc82d95f..26466c79261 100644 --- a/src/devices/bus/interpro/sr/edge.cpp +++ b/src/devices/bus/interpro/sr/edge.cpp @@ -477,7 +477,7 @@ void mpcb828_device::device_add_mconfig(machine_config &config) m_dsp->set_disable(); //m_dsp->set_addrmap(0, map_dynamic<2>); - BT458(config, "ramdac", 83'020'800); + BT458(config, "ramdac", XTAL::u(83'020'800)); SCC8530N(config, m_scc, 4.9152_MHz_XTAL); m_scc->out_int_callback().set(FUNC(mpcb828_device::scc_irq)); @@ -508,7 +508,7 @@ void mpcb849_device::device_add_mconfig(machine_config &config) m_dsp->holda().set(FUNC(mpcb828_device::holda)); m_dsp->set_disable(); - BT458(config, "ramdac", 0); // unconfirmed clock + BT458(config, "ramdac"); // unconfirmed clock SCC8530N(config, m_scc, 4.9152_MHz_XTAL); m_scc->out_int_callback().set(FUNC(mpcb849_device::scc_irq)); @@ -536,9 +536,9 @@ void mpcba63_device::device_add_mconfig(machine_config &config) //m_screen->set_raw(83'020'800, 1504, 296 + 20, 1184 + 296 + 20, 920, 34, 884 + 34); //m_screen->set_screen_update().set(FUNC(mpcba63_device::screen_update)); //m_screen->screen_vblank().set(FUNC(?, vblank)); - //BT457(config, "ramdac0", 0); // PS045701-165 - //BT457(config, "ramdac1", 0); - //BT457(config, "ramdac2", 0); + //BT457(config, "ramdac0"); // PS045701-165 + //BT457(config, "ramdac1"); + //BT457(config, "ramdac2"); } /* @@ -579,12 +579,12 @@ void mpcb896_device::device_add_mconfig(machine_config &config) RAM(config, "sram").set_default_size("256KiB").set_default_value(0); RAM(config, "vram").set_default_size("18MiB").set_default_value(0); - BT457(config, "ramdac0", 164'609'300); - BT457(config, "ramdac1", 164'609'300); - BT457(config, "ramdac2", 164'609'300); + BT457(config, "ramdac0", XTAL::u(164'609'300)); + BT457(config, "ramdac1", XTAL::u(164'609'300)); + BT457(config, "ramdac2", XTAL::u(164'609'300)); } -edge1_device_base::edge1_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +edge1_device_base::edge1_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_srx_card_interface(mconfig, *this) , m_screen(*this, "screen") @@ -596,13 +596,13 @@ edge1_device_base::edge1_device_base(const machine_config &mconfig, device_type { } -edge2_processor_device_base::edge2_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +edge2_processor_device_base::edge2_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_srx_card_interface(mconfig, *this) { } -edge2plus_processor_device_base::edge2plus_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +edge2plus_processor_device_base::edge2plus_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_srx_card_interface(mconfig, *this) , m_dsp1(*this, "dsp1") @@ -611,13 +611,13 @@ edge2plus_processor_device_base::edge2plus_processor_device_base(const machine_c { } -edge2_framebuffer_device_base::edge2_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +edge2_framebuffer_device_base::edge2_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_srx_card_interface(mconfig, *this) { } -edge2plus_framebuffer_device_base::edge2plus_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +edge2plus_framebuffer_device_base::edge2plus_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_srx_card_interface(mconfig, *this) , m_screen(*this, "screen") @@ -627,32 +627,32 @@ edge2plus_framebuffer_device_base::edge2plus_framebuffer_device_base(const machi { } -mpcb828_device::mpcb828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcb828_device::mpcb828_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edge1_device_base(mconfig, MPCB828, tag, owner, clock) { } -mpcb849_device::mpcb849_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcb849_device::mpcb849_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edge1_device_base(mconfig, MPCB849, tag, owner, clock) { } -mpcb030_device::mpcb030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcb030_device::mpcb030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edge2_processor_device_base(mconfig, MPCB030, tag, owner, clock) { } -mpcba63_device::mpcba63_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcba63_device::mpcba63_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edge2_framebuffer_device_base(mconfig, MPCBA63, tag, owner, clock) { } -msmt094_device::msmt094_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msmt094_device::msmt094_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edge2plus_processor_device_base(mconfig, MSMT094, tag, owner, clock) { } -mpcb896_device::mpcb896_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcb896_device::mpcb896_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edge2plus_framebuffer_device_base(mconfig, MPCB896, tag, owner, clock) { } diff --git a/src/devices/bus/interpro/sr/edge.h b/src/devices/bus/interpro/sr/edge.h index d96896dd187..1a8852f976e 100644 --- a/src/devices/bus/interpro/sr/edge.h +++ b/src/devices/bus/interpro/sr/edge.h @@ -21,7 +21,7 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank); protected: - edge1_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + edge1_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; virtual void map_dynamic(address_map &map); @@ -77,7 +77,7 @@ private: class edge2_processor_device_base : public device_t, public device_srx_card_interface { protected: - edge2_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + edge2_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -87,7 +87,7 @@ protected: class edge2_framebuffer_device_base : public device_t, public device_srx_card_interface { protected: - edge2_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + edge2_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -101,7 +101,7 @@ public: required_device m_dsp1; protected: - edge2plus_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + edge2plus_processor_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -150,7 +150,7 @@ class edge2plus_framebuffer_device_base : public device_t, public device_srx_car protected: friend class edge2plus_processor_device_base; - edge2plus_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + edge2plus_framebuffer_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; virtual void device_start() override; @@ -179,7 +179,7 @@ private: class mpcb828_device : public edge1_device_base { public: - mpcb828_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcb828_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -189,7 +189,7 @@ protected: class mpcb849_device : public edge1_device_base { public: - mpcb849_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcb849_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -201,7 +201,7 @@ protected: class mpcb030_device : public edge2_processor_device_base { public: - mpcb030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcb030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -211,7 +211,7 @@ protected: class msmt094_device : public edge2plus_processor_device_base { public: - msmt094_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msmt094_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -221,7 +221,7 @@ protected: class mpcba63_device : public edge2_framebuffer_device_base { public: - mpcba63_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcba63_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -233,7 +233,7 @@ protected: class mpcb896_device : public edge2plus_framebuffer_device_base { public: - mpcb896_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcb896_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/interpro/sr/gt.cpp b/src/devices/bus/interpro/sr/gt.cpp index 15158ede040..4a636d44bea 100644 --- a/src/devices/bus/interpro/sr/gt.cpp +++ b/src/devices/bus/interpro/sr/gt.cpp @@ -296,8 +296,8 @@ ROM_END void gt_device_base::device_add_mconfig(machine_config &config) { - DP8510(config, m_bpu[0], 0); - DP8510(config, m_bpu[1], 0); + DP8510(config, m_bpu[0]); + DP8510(config, m_bpu[1]); } void interpro_digitizer_devices(device_slot_interface &device) @@ -349,8 +349,8 @@ void mpcb963_device::device_add_mconfig(machine_config &config) m_screen[0]->set_screen_update(FUNC(mpcb963_device::screen_update<0>)); m_screen[0]->screen_vblank().set(FUNC(device_cbus_card_interface::irq3)); BT459(config, m_ramdac[0], pixclock); - RAM(config, m_vram[0], 0).set_default_size("1M"); - RAM(config, m_mram[0], 0).set_default_size("128K"); + RAM(config, m_vram[0]).set_default_size("1M"); + RAM(config, m_mram[0]).set_default_size("128K"); } void mpcba79_device::device_add_mconfig(machine_config &config) @@ -364,15 +364,15 @@ void mpcba79_device::device_add_mconfig(machine_config &config) m_screen[0]->set_screen_update(FUNC(mpcba79_device::screen_update<0>)); m_screen[0]->screen_vblank().set(FUNC(device_cbus_card_interface::irq3)); BT459(config, m_ramdac[0], pixclock); - RAM(config, m_vram[0], 0).set_default_size("1M"); - RAM(config, m_mram[0], 0).set_default_size("128K"); + RAM(config, m_vram[0]).set_default_size("1M"); + RAM(config, m_mram[0]).set_default_size("128K"); SCREEN(config, m_screen[1], SCREEN_TYPE_RASTER); m_screen[1]->set_raw(pixclock, 1504, 296 + GT_X_DELTA, 1184 + 296 + GT_X_DELTA, 920, 34, 884 + 34); m_screen[1]->set_screen_update(FUNC(mpcba79_device::screen_update<1>)); BT459(config, m_ramdac[1], pixclock); - RAM(config, m_vram[1], 0).set_default_size("1M"); - RAM(config, m_mram[1], 0).set_default_size("128K"); + RAM(config, m_vram[1]).set_default_size("1M"); + RAM(config, m_mram[1]).set_default_size("128K"); } /* @@ -397,8 +397,8 @@ void msmt070_device::device_add_mconfig(machine_config &config) m_screen[0]->set_screen_update(FUNC(msmt070_device::screen_update<0>)); m_screen[0]->screen_vblank().set(FUNC(device_cbus_card_interface::irq3)); BT459(config, m_ramdac[0], pixclock); - RAM(config, m_vram[0], 0).set_default_size("2M"); - RAM(config, m_mram[0], 0).set_default_size("128K"); + RAM(config, m_vram[0]).set_default_size("2M"); + RAM(config, m_mram[0]).set_default_size("128K"); } void msmt071_device::device_add_mconfig(machine_config &config) @@ -412,15 +412,15 @@ void msmt071_device::device_add_mconfig(machine_config &config) m_screen[0]->set_screen_update(FUNC(msmt071_device::screen_update<0>)); m_screen[0]->screen_vblank().set(FUNC(device_cbus_card_interface::irq3)); BT459(config, m_ramdac[0], pixclock); - RAM(config, m_vram[0], 0).set_default_size("2M"); - RAM(config, m_mram[0], 0).set_default_size("128K"); + RAM(config, m_vram[0]).set_default_size("2M"); + RAM(config, m_mram[0]).set_default_size("128K"); SCREEN(config, m_screen[1], SCREEN_TYPE_RASTER); m_screen[1]->set_raw(pixclock, 1472, 264 + GT_X_DELTA, 1184 + 264 + GT_X_DELTA, 944, 57, 884 + 57); m_screen[1]->set_screen_update(FUNC(msmt071_device::screen_update<1>)); BT459(config, m_ramdac[1], pixclock); - RAM(config, m_vram[1], 0).set_default_size("2M"); - RAM(config, m_mram[1], 0).set_default_size("128K"); + RAM(config, m_vram[1]).set_default_size("2M"); + RAM(config, m_mram[1]).set_default_size("128K"); } /* @@ -447,8 +447,8 @@ void msmt081_device::device_add_mconfig(machine_config &config) BT459(config, m_ramdac[0], pixclock); // FIXME: following memory sizes are pure speculation - RAM(config, m_vram[0], 0).set_default_size("4M"); // guess - RAM(config, m_mram[0], 0).set_default_size("256K"); // guess + RAM(config, m_vram[0]).set_default_size("4M"); // guess + RAM(config, m_mram[0]).set_default_size("256K"); // guess } /* @@ -467,9 +467,9 @@ void mpcbb68_device::device_add_mconfig(machine_config &config) BT459(config, m_ramdac[0], pixclock); // FIXME: pure speculation - RAM(config, m_vram[0], 0).set_default_size("2M"); - RAM(config, m_mram[0], 0).set_default_size("128K"); - RAM(config, m_hram[0], 0).set_default_size("512K"); + RAM(config, m_vram[0]).set_default_size("2M"); + RAM(config, m_mram[0]).set_default_size("128K"); + RAM(config, m_hram[0]).set_default_size("512K"); } /* @@ -494,12 +494,12 @@ void mpcbb92_device::device_add_mconfig(machine_config &config) BT459(config, m_ramdac[0], pixclock); // FIXME: following memory sizes are pure speculation (40 parts @ 256Kx4?) - RAM(config, m_vram[0], 0).set_default_size("4M"); - RAM(config, m_mram[0], 0).set_default_size("256K"); - RAM(config, m_hram[0], 0).set_default_size("1M"); + RAM(config, m_vram[0]).set_default_size("4M"); + RAM(config, m_mram[0]).set_default_size("256K"); + RAM(config, m_hram[0]).set_default_size("1M"); } -gt_device_base::gt_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool double_buffered, const bool masked_reads) +gt_device_base::gt_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool double_buffered, const bool masked_reads) : device_t(mconfig, type, tag, owner, clock) , m_screen(*this, "screen%u", 0) , m_ramdac(*this, "ramdac%u", 0) @@ -512,13 +512,13 @@ gt_device_base::gt_device_base(const machine_config &mconfig, device_type type, { } -gt_device::gt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool double_buffered) +gt_device::gt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool double_buffered) : gt_device_base(mconfig, type, tag, owner, clock, double_buffered, true) , device_cbus_card_interface(mconfig, *this) { } -gtdb_device::gtdb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gtdb_device::gtdb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : gt_device_base(mconfig, type, tag, owner, clock, true, false) , device_srx_card_interface(mconfig, *this) , m_hram(*this, "hram%u", 0) @@ -526,37 +526,37 @@ gtdb_device::gtdb_device(const machine_config &mconfig, device_type type, const { } -mpcb963_device::mpcb963_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcb963_device::mpcb963_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt_device(mconfig, MPCB963, tag, owner, clock, false) { } -mpcba79_device::mpcba79_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcba79_device::mpcba79_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt_device(mconfig, MPCBA79, tag, owner, clock, false) { } -msmt070_device::msmt070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msmt070_device::msmt070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt_device(mconfig, MSMT070, tag, owner, clock, true) { } -msmt071_device::msmt071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msmt071_device::msmt071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt_device(mconfig, MSMT071, tag, owner, clock, true) { } -msmt081_device::msmt081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msmt081_device::msmt081_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt_device(mconfig, MSMT081, tag, owner, clock, true) { } -mpcbb68_device::mpcbb68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcbb68_device::mpcbb68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gtdb_device(mconfig, MPCBB68, tag, owner, clock) { } -mpcbb92_device::mpcbb92_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcbb92_device::mpcbb92_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gtdb_device(mconfig, MPCBB92, tag, owner, clock) { } diff --git a/src/devices/bus/interpro/sr/gt.h b/src/devices/bus/interpro/sr/gt.h index aeeb70941ea..d5bb514d230 100644 --- a/src/devices/bus/interpro/sr/gt.h +++ b/src/devices/bus/interpro/sr/gt.h @@ -15,7 +15,7 @@ class gt_device_base : public device_t { protected: - gt_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool double_buffered, const bool masked_reads); + gt_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool double_buffered, const bool masked_reads); virtual void map(address_map &map); @@ -248,7 +248,7 @@ private: class gt_device : public gt_device_base, public device_cbus_card_interface { protected: - gt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool double_buffered); + gt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool double_buffered); virtual void map(address_map &map) override; }; @@ -256,7 +256,7 @@ protected: class gtdb_device : public gt_device_base, public device_srx_card_interface { protected: - gtdb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gtdb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; virtual void map_dynamic(address_map &map); @@ -306,7 +306,7 @@ private: class mpcb963_device : public gt_device { public: - mpcb963_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcb963_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -316,7 +316,7 @@ protected: class mpcba79_device : public gt_device { public: - mpcba79_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcba79_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -327,7 +327,7 @@ protected: class msmt070_device : public gt_device { public: - msmt070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msmt070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -337,7 +337,7 @@ protected: class msmt071_device : public gt_device { public: - msmt071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msmt071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -347,7 +347,7 @@ protected: class msmt081_device : public gt_device { public: - msmt081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msmt081_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -357,7 +357,7 @@ protected: class mpcbb68_device : public gtdb_device { public: - mpcbb68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcbb68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -367,7 +367,7 @@ protected: class mpcbb92_device : public gtdb_device { public: - mpcbb92_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcbb92_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/interpro/sr/sr.cpp b/src/devices/bus/interpro/sr/sr.cpp index 82071af86d2..634ba65ed4e 100644 --- a/src/devices/bus/interpro/sr/sr.cpp +++ b/src/devices/bus/interpro/sr/sr.cpp @@ -274,7 +274,7 @@ void interpro_bus_device::device_resolve_objects() m_out_irq3_cb.resolve_safe(); } -cbus_bus_device::cbus_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cbus_bus_device::cbus_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : interpro_bus_device(mconfig, CBUS_BUS, tag, owner, clock) , m_slot_count(0) { @@ -285,7 +285,7 @@ void cbus_bus_device::device_start() { } -cbus_slot_device::cbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cbus_slot_device::cbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CBUS_SLOT, tag, owner, clock) , device_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) @@ -313,7 +313,7 @@ void device_cbus_card_interface::set_bus_device(cbus_bus_device &bus_device) m_bus->install_card(*this, device().memregion(m_idprom_region), &device_cbus_card_interface::map); } -srx_bus_device::srx_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +srx_bus_device::srx_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : interpro_bus_device(mconfig, SRX_BUS, tag, owner, clock) , m_slot_count(1) // first slot is used by the system board { @@ -324,7 +324,7 @@ void srx_bus_device::device_start() { } -srx_slot_device::srx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +srx_slot_device::srx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SRX_SLOT, tag, owner, clock) , device_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/bus/interpro/sr/sr.h b/src/devices/bus/interpro/sr/sr.h index 0d30905943b..0e6ed8e46aa 100644 --- a/src/devices/bus/interpro/sr/sr.h +++ b/src/devices/bus/interpro/sr/sr.h @@ -26,7 +26,7 @@ public: protected: // construction/destruction - interpro_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + interpro_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_main_space(*this, finder_base::DUMMY_TAG, -1) , m_io_space(*this, finder_base::DUMMY_TAG, -1) @@ -57,7 +57,7 @@ class cbus_bus_device : public interpro_bus_device { public: // construction/destruction - cbus_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cbus_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const u32 CBUS_BASE = 0x87000000; static const u32 CBUS_SIZE = 0x01000000; @@ -100,8 +100,8 @@ class cbus_slot_device : public device_t, public device_slot_interface public: // construction/destruction template - cbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, T &&bus_tag, U &&slot_options, const char *default_option, const bool fixed) - : cbus_slot_device(mconfig, tag, owner, clock) + cbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, const char *default_option, const bool fixed) + : cbus_slot_device(mconfig, tag, owner) { m_bus.set_tag(std::forward(bus_tag)); option_reset(); @@ -109,7 +109,7 @@ public: set_default_option(default_option); set_fixed(fixed); } - cbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -154,7 +154,7 @@ class srx_bus_device : public interpro_bus_device { public: // construction/destruction - srx_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + srx_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const u32 SRX_BASE = 0x8f000000; static const u32 SRX_SIZE = 0x8000; @@ -212,8 +212,8 @@ class srx_slot_device : public device_t, public device_slot_interface public: // construction/destruction template - srx_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, T &&bus_tag, U &&slot_options, const char *default_option, const bool fixed) - : srx_slot_device(mconfig, tag, owner, clock) + srx_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, const char *default_option, const bool fixed) + : srx_slot_device(mconfig, tag, owner) { m_bus.set_tag(std::forward(bus_tag)); option_reset(); @@ -221,7 +221,7 @@ public: set_default_option(default_option); set_fixed(fixed); } - srx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + srx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/devices/bus/intv/ecs.cpp b/src/devices/bus/intv/ecs.cpp index 50d52a85c77..cd9bedf54f7 100644 --- a/src/devices/bus/intv/ecs.cpp +++ b/src/devices/bus/intv/ecs.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(INTV_ROM_ECS, intv_ecs_device, "intv_ecs", "Intellivision ECS Expansion") -intv_ecs_device::intv_ecs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +intv_ecs_device::intv_ecs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intv_rom_device(mconfig, INTV_ROM_ECS, tag, owner, clock), m_snd(*this, "ay8914"), m_subslot(*this, "subslot"), diff --git a/src/devices/bus/intv/ecs.h b/src/devices/bus/intv/ecs.h index 68911831c0a..e8b4d543ae8 100644 --- a/src/devices/bus/intv/ecs.h +++ b/src/devices/bus/intv/ecs.h @@ -17,7 +17,7 @@ class intv_ecs_device : public intv_rom_device { public: // construction/destruction - intv_ecs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intv_ecs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing diff --git a/src/devices/bus/intv/rom.cpp b/src/devices/bus/intv/rom.cpp index f320d1cae49..af2f0dbe29b 100644 --- a/src/devices/bus/intv/rom.cpp +++ b/src/devices/bus/intv/rom.cpp @@ -23,28 +23,28 @@ DEFINE_DEVICE_TYPE(INTV_ROM_GFACT, intv_gfact_device, "intv_gfact", "Intellivisi DEFINE_DEVICE_TYPE(INTV_ROM_WSMLB, intv_wsmlb_device, "intv_wsmlb", "Intellivision World Series Baseball Cart") -intv_rom_device::intv_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +intv_rom_device::intv_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_intv_cart_interface(mconfig, *this) { } -intv_rom_device::intv_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intv_rom_device::intv_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intv_rom_device(mconfig, INTV_ROM_STD, tag, owner, clock) { } -intv_ram_device::intv_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intv_ram_device::intv_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intv_rom_device(mconfig, INTV_ROM_RAM, tag, owner, clock) { } -intv_gfact_device::intv_gfact_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intv_gfact_device::intv_gfact_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intv_rom_device(mconfig, INTV_ROM_GFACT, tag, owner, clock) { } -intv_wsmlb_device::intv_wsmlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intv_wsmlb_device::intv_wsmlb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intv_rom_device(mconfig, INTV_ROM_WSMLB, tag, owner, clock) { } diff --git a/src/devices/bus/intv/rom.h b/src/devices/bus/intv/rom.h index 5266220e1ec..485bf8cb472 100644 --- a/src/devices/bus/intv/rom.h +++ b/src/devices/bus/intv/rom.h @@ -13,7 +13,7 @@ class intv_rom_device : public device_t, { public: // construction/destruction - intv_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intv_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_rom04(offs_t offset) override { return INTV_ROM16_READ(offset + 0x0400); } @@ -33,7 +33,7 @@ public: virtual uint16_t read_romf0(offs_t offset) override { return INTV_ROM16_READ(offset + 0xf000); } protected: - intv_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + intv_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override {} @@ -46,7 +46,7 @@ class intv_ram_device : public intv_rom_device { public: // construction/destruction - intv_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intv_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_ram(offs_t offset) override { return (int)m_ram[offset & (m_ram.size() - 1)]; } @@ -59,7 +59,7 @@ class intv_gfact_device : public intv_rom_device { public: // construction/destruction - intv_gfact_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intv_gfact_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_ram(offs_t offset) override { return (int)m_ram[offset & (m_ram.size() - 1)]; } @@ -72,7 +72,7 @@ class intv_wsmlb_device : public intv_rom_device { public: // construction/destruction - intv_wsmlb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intv_wsmlb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/intv/slot.cpp b/src/devices/bus/intv/slot.cpp index 97d5b9ee308..061fdc9d311 100644 --- a/src/devices/bus/intv/slot.cpp +++ b/src/devices/bus/intv/slot.cpp @@ -144,7 +144,7 @@ void device_intv_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- // intv_cart_slot_device - constructor //------------------------------------------------- -intv_cart_slot_device::intv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +intv_cart_slot_device::intv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTV_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h index 4e4bc130730..54c419e3ff0 100644 --- a/src/devices/bus/intv/slot.h +++ b/src/devices/bus/intv/slot.h @@ -100,7 +100,7 @@ public: // construction/destruction template intv_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : intv_cart_slot_device(mconfig, tag, owner, 0) + : intv_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -108,7 +108,7 @@ public: set_fixed(false); } - intv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~intv_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/intv/voice.cpp b/src/devices/bus/intv/voice.cpp index 8f5e542b0e2..e5c825f7855 100644 --- a/src/devices/bus/intv/voice.cpp +++ b/src/devices/bus/intv/voice.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(INTV_ROM_VOICE, intv_voice_device, "intv_voice", "Intellivision Intellivoice Expansion") -intv_voice_device::intv_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intv_voice_device::intv_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intv_rom_device(mconfig, INTV_ROM_VOICE, tag, owner, clock), m_speech(*this, "sp0256_speech"), m_subslot(*this, "subslot"), @@ -73,7 +73,7 @@ void intv_voice_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono_voice").front_center(); - SP0256(config, m_speech, 3120000); + SP0256(config, m_speech, XTAL::u(3120000)); /* The Intellivoice uses a speaker with its own volume control so the relative volumes to use are subjective */ m_speech->add_route(ALL_OUTPUTS, "mono_voice", 1.00); diff --git a/src/devices/bus/intv/voice.h b/src/devices/bus/intv/voice.h index 7369058c435..b9262b718b8 100644 --- a/src/devices/bus/intv/voice.h +++ b/src/devices/bus/intv/voice.h @@ -14,7 +14,7 @@ class intv_voice_device : public intv_rom_device { public: // construction/destruction - intv_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intv_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing // actual IntelliVoice access diff --git a/src/devices/bus/intv_ctrl/ctrl.cpp b/src/devices/bus/intv_ctrl/ctrl.cpp index 287789296a9..2ab75c508c6 100644 --- a/src/devices/bus/intv_ctrl/ctrl.cpp +++ b/src/devices/bus/intv_ctrl/ctrl.cpp @@ -51,7 +51,7 @@ device_intv_control_port_interface::~device_intv_control_port_interface() // intv_control_port_device - constructor //------------------------------------------------- -intv_control_port_device::intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +intv_control_port_device::intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTV_CONTROL_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) diff --git a/src/devices/bus/intv_ctrl/ctrl.h b/src/devices/bus/intv_ctrl/ctrl.h index b68d6bbba7d..e69fc0dcfe3 100644 --- a/src/devices/bus/intv_ctrl/ctrl.h +++ b/src/devices/bus/intv_ctrl/ctrl.h @@ -42,7 +42,7 @@ public: // construction/destruction template intv_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : intv_control_port_device(mconfig, tag, owner, 0) + : intv_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -50,7 +50,7 @@ public: set_fixed(false); } - intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intv_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~intv_control_port_device(); uint8_t ctrl_r() { return m_device ? m_device->read_ctrl() : 0; } diff --git a/src/devices/bus/intv_ctrl/ecs_ctrl.cpp b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp index ef873489015..de584b8c884 100644 --- a/src/devices/bus/intv_ctrl/ecs_ctrl.cpp +++ b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp @@ -65,7 +65,7 @@ device_intvecs_control_port_interface::~device_intvecs_control_port_interface() // intvecs_control_port_device - constructor //------------------------------------------------- -intvecs_control_port_device::intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +intvecs_control_port_device::intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTVECS_CONTROL_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) @@ -130,7 +130,7 @@ void intvecs_ctrls_device::device_add_mconfig(machine_config &config) } -intvecs_ctrls_device::intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +intvecs_ctrls_device::intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECS_CTRLS, tag, owner, clock), device_intvecs_control_port_interface(mconfig, *this), m_hand1(*this, "port1"), @@ -256,7 +256,7 @@ ioport_constructor intvecs_keybd_device::device_input_ports() const return INPUT_PORTS_NAME( intvecs_keybd ); } -intvecs_keybd_device::intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intvecs_keybd_device::intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECS_KEYBD, tag, owner, clock) , device_intvecs_control_port_interface(mconfig, *this) , m_keybd(*this, "ROW.%u", 0) @@ -389,7 +389,7 @@ ioport_constructor intvecs_synth_device::device_input_ports() const } -intvecs_synth_device::intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +intvecs_synth_device::intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ECS_SYNTH, tag, owner, clock), device_intvecs_control_port_interface(mconfig, *this), m_synth(*this, "SYNTH.%u", 0) diff --git a/src/devices/bus/intv_ctrl/ecs_ctrl.h b/src/devices/bus/intv_ctrl/ecs_ctrl.h index 77fdfc72a92..6cd18cdf73d 100644 --- a/src/devices/bus/intv_ctrl/ecs_ctrl.h +++ b/src/devices/bus/intv_ctrl/ecs_ctrl.h @@ -47,7 +47,7 @@ public: // construction/destruction template intvecs_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : intvecs_control_port_device(mconfig, tag, owner, 0) + : intvecs_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -55,7 +55,7 @@ public: set_fixed(false); } - intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intvecs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~intvecs_control_port_device(); uint8_t porta_r() { return m_device ? m_device->read_portA() : 0; } @@ -88,7 +88,7 @@ class intvecs_ctrls_device : public device_t, { public: // construction/destruction - intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intvecs_ctrls_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -113,7 +113,7 @@ class intvecs_keybd_device : public device_t, { public: // construction/destruction - intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; @@ -138,7 +138,7 @@ class intvecs_synth_device : public device_t, { public: // construction/destruction - intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/intv_ctrl/handctrl.cpp b/src/devices/bus/intv_ctrl/handctrl.cpp index 43cdfad91b1..eb131ca4850 100644 --- a/src/devices/bus/intv_ctrl/handctrl.cpp +++ b/src/devices/bus/intv_ctrl/handctrl.cpp @@ -86,7 +86,7 @@ ioport_constructor intv_handctrl_device::device_input_ports() const // intv_handctrl_device - constructor //------------------------------------------------- -intv_handctrl_device::intv_handctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +intv_handctrl_device::intv_handctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTV_HANDCTRL, tag, owner, clock), device_intv_control_port_interface(mconfig, *this), m_cfg(*this, "OPTIONS"), diff --git a/src/devices/bus/intv_ctrl/handctrl.h b/src/devices/bus/intv_ctrl/handctrl.h index 4aa021c1ff8..4fe312cc6ac 100644 --- a/src/devices/bus/intv_ctrl/handctrl.h +++ b/src/devices/bus/intv_ctrl/handctrl.h @@ -25,7 +25,7 @@ class intv_handctrl_device : public device_t, { public: // construction/destruction - intv_handctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + intv_handctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/iq151/disc2.cpp b/src/devices/bus/iq151/disc2.cpp index 76dfcf2ce13..eedae5a43cd 100644 --- a/src/devices/bus/iq151/disc2.cpp +++ b/src/devices/bus/iq151/disc2.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(IQ151_DISC2, iq151_disc2_device, "iq151_disc2", "IQ151 Disc2" // iq151_disc2_device - constructor //------------------------------------------------- -iq151_disc2_device::iq151_disc2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_disc2_device::iq151_disc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151_DISC2, tag, owner, clock) , device_iq151cart_interface(mconfig, *this) , m_fdc(*this, "fdc"), m_rom(nullptr), m_rom_enabled(false) @@ -76,7 +76,7 @@ void iq151_disc2_device::device_reset() void iq151_disc2_device::device_add_mconfig(machine_config &config) { - UPD765A(config, m_fdc, 8'000'000, false, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, true); FLOPPY_CONNECTOR(config, "fdc:1", iq151_disc2_floppies, "8sssd", iq151_disc2_device::floppy_formats); FLOPPY_CONNECTOR(config, "fdc:2", iq151_disc2_floppies, "8sssd", iq151_disc2_device::floppy_formats); } diff --git a/src/devices/bus/iq151/disc2.h b/src/devices/bus/iq151/disc2.h index 776bb9363fd..d488a68a902 100644 --- a/src/devices/bus/iq151/disc2.h +++ b/src/devices/bus/iq151/disc2.h @@ -21,7 +21,7 @@ class iq151_disc2_device : { public: // construction/destruction - iq151_disc2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_disc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/iq151/grafik.cpp b/src/devices/bus/iq151/grafik.cpp index 497012cf2cd..ebf61a23bc5 100644 --- a/src/devices/bus/iq151/grafik.cpp +++ b/src/devices/bus/iq151/grafik.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(IQ151_GRAFIK, iq151_grafik_device, "iq151_grafik", "IQ151 gra // iq151_grafik_device - constructor //------------------------------------------------- -iq151_grafik_device::iq151_grafik_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_grafik_device::iq151_grafik_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151_GRAFIK, tag, owner, clock) , device_iq151cart_interface(mconfig, *this) , m_ppi8255(*this, "ppi8255"), m_posx(0), m_posy(0), m_all(0), m_pen(0), m_fast(0), m_ev(0), m_ex(0), m_sel(0) diff --git a/src/devices/bus/iq151/grafik.h b/src/devices/bus/iq151/grafik.h index 5ac4ef42723..65edc0e43e4 100644 --- a/src/devices/bus/iq151/grafik.h +++ b/src/devices/bus/iq151/grafik.h @@ -20,7 +20,7 @@ class iq151_grafik_device : { public: // construction/destruction - iq151_grafik_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_grafik_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/iq151/iq151.cpp b/src/devices/bus/iq151/iq151.cpp index d4ad9a8a865..c0f3882042e 100644 --- a/src/devices/bus/iq151/iq151.cpp +++ b/src/devices/bus/iq151/iq151.cpp @@ -53,7 +53,7 @@ device_iq151cart_interface::~device_iq151cart_interface() //------------------------------------------------- // iq151cart_slot_device - constructor //------------------------------------------------- -iq151cart_slot_device::iq151cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151cart_slot_device::iq151cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151CART_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , device_cartrom_image_interface(mconfig, *this) diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h index ff3992c7585..5e74c029152 100644 --- a/src/devices/bus/iq151/iq151.h +++ b/src/devices/bus/iq151/iq151.h @@ -89,7 +89,7 @@ public: // construction/destruction template iq151cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : iq151cart_slot_device(mconfig, tag, owner, 0) + : iq151cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -97,7 +97,7 @@ public: set_fixed(false); } - iq151cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + iq151cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~iq151cart_slot_device(); template void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/iq151/minigraf.cpp b/src/devices/bus/iq151/minigraf.cpp index b3d51bdf8d3..ebb78d671ae 100644 --- a/src/devices/bus/iq151/minigraf.cpp +++ b/src/devices/bus/iq151/minigraf.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(IQ151_MINIGRAF, iq151_minigraf_device, "iq151_minigraf", "IQ1 // iq151_minigraf_device - constructor //------------------------------------------------- -iq151_minigraf_device::iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_minigraf_device::iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151_MINIGRAF, tag, owner, clock) , device_iq151cart_interface(mconfig, *this) , m_rom(nullptr), m_posx(0), m_posy(0), m_pen(0), m_control(0), m_paper(nullptr) diff --git a/src/devices/bus/iq151/minigraf.h b/src/devices/bus/iq151/minigraf.h index 16113288094..81669197a21 100644 --- a/src/devices/bus/iq151/minigraf.h +++ b/src/devices/bus/iq151/minigraf.h @@ -19,7 +19,7 @@ class iq151_minigraf_device : { public: // construction/destruction - iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_minigraf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/iq151/ms151a.cpp b/src/devices/bus/iq151/ms151a.cpp index 6b4116f3d42..6e6ec4f21b3 100644 --- a/src/devices/bus/iq151/ms151a.cpp +++ b/src/devices/bus/iq151/ms151a.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(IQ151_MS151A, iq151_ms151a_device, "iq151_ms15a", "IQ151 MS15 // iq151_ms151a_device - constructor //------------------------------------------------- -iq151_ms151a_device::iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_ms151a_device::iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151_MS151A, tag, owner, clock) , device_iq151cart_interface(mconfig, *this) , m_rom(nullptr), m_posx(0), m_posy(0), m_pen(0), m_paper(nullptr) diff --git a/src/devices/bus/iq151/ms151a.h b/src/devices/bus/iq151/ms151a.h index 735729b15f1..89d4e3954fa 100644 --- a/src/devices/bus/iq151/ms151a.h +++ b/src/devices/bus/iq151/ms151a.h @@ -19,7 +19,7 @@ class iq151_ms151a_device : { public: // construction/destruction - iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_ms151a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/iq151/rom.cpp b/src/devices/bus/iq151/rom.cpp index 94658c100db..41927f4bb75 100644 --- a/src/devices/bus/iq151/rom.cpp +++ b/src/devices/bus/iq151/rom.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(IQ151_AMOS3, iq151_amos3_device, "iq151_amos3", "IQ151 AMO // iq151_rom_device - constructor //------------------------------------------------- -iq151_rom_device::iq151_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +iq151_rom_device::iq151_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_iq151cart_interface(mconfig, *this), m_rom(*this, "rom") @@ -83,7 +83,7 @@ uint8_t* iq151_rom_device::get_cart_base() // iq151_basic6_device - constructor //------------------------------------------------- -iq151_basic6_device::iq151_basic6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_basic6_device::iq151_basic6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : iq151_rom_device(mconfig, IQ151_BASIC6, tag, owner, clock) { } @@ -108,7 +108,7 @@ void iq151_basic6_device::read(offs_t offset, uint8_t &data) // iq151_basicg_device - constructor //------------------------------------------------- -iq151_basicg_device::iq151_basicg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_basicg_device::iq151_basicg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : iq151_rom_device(mconfig, IQ151_BASICG, tag, owner, clock) { } @@ -134,7 +134,7 @@ void iq151_basicg_device::read(offs_t offset, uint8_t &data) // iq151_amos1_device - constructor //------------------------------------------------- -iq151_amos1_device::iq151_amos1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_amos1_device::iq151_amos1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : iq151_rom_device(mconfig, IQ151_AMOS1, tag, owner, clock) , m_active(true) { @@ -168,7 +168,7 @@ void iq151_amos1_device::io_write(offs_t offset, uint8_t data) // iq151_amos2_device - constructor //------------------------------------------------- -iq151_amos2_device::iq151_amos2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_amos2_device::iq151_amos2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : iq151_rom_device(mconfig, IQ151_AMOS2, tag, owner, clock) , m_active(false) { @@ -202,7 +202,7 @@ void iq151_amos2_device::io_write(offs_t offset, uint8_t data) // iq151_amos3_device - constructor //------------------------------------------------- -iq151_amos3_device::iq151_amos3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_amos3_device::iq151_amos3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : iq151_rom_device(mconfig, IQ151_AMOS3, tag, owner, clock) , m_active(true) { diff --git a/src/devices/bus/iq151/rom.h b/src/devices/bus/iq151/rom.h index 56544a24d9f..af727ffd216 100644 --- a/src/devices/bus/iq151/rom.h +++ b/src/devices/bus/iq151/rom.h @@ -24,7 +24,7 @@ public: protected: // construction/destruction - iq151_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + iq151_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -43,7 +43,7 @@ class iq151_basic6_device : { public: // construction/destruction - iq151_basic6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_basic6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // iq151cart_interface overrides @@ -57,7 +57,7 @@ class iq151_basicg_device : { public: // construction/destruction - iq151_basicg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_basicg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // iq151cart_interface overrides @@ -72,7 +72,7 @@ class iq151_amos1_device : { public: // construction/destruction - iq151_amos1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_amos1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // iq151cart_interface overrides @@ -90,7 +90,7 @@ class iq151_amos2_device : { public: // construction/destruction - iq151_amos2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_amos2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // iq151cart_interface overrides @@ -108,7 +108,7 @@ class iq151_amos3_device : { public: // construction/destruction - iq151_amos3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_amos3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // iq151cart_interface overrides diff --git a/src/devices/bus/iq151/staper.cpp b/src/devices/bus/iq151/staper.cpp index 63a365282d0..60cb78bff5d 100644 --- a/src/devices/bus/iq151/staper.cpp +++ b/src/devices/bus/iq151/staper.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(IQ151_STAPER, iq151_staper_device, "iq151_staper", "IQ151 STA // iq151_staper_device - constructor //------------------------------------------------- -iq151_staper_device::iq151_staper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_staper_device::iq151_staper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151_STAPER, tag, owner, clock) , device_iq151cart_interface(mconfig, *this) , m_ppi(*this, "ppi8255") @@ -74,7 +74,7 @@ void iq151_staper_device::device_add_mconfig(machine_config &config) m_ppi->out_pb_callback().set(FUNC(iq151_staper_device::ppi_portb_w)); m_ppi->out_pc_callback().set(FUNC(iq151_staper_device::ppi_portc_w)); - PRINTER(config, "printer", 0); + PRINTER(config, "printer"); } //------------------------------------------------- diff --git a/src/devices/bus/iq151/staper.h b/src/devices/bus/iq151/staper.h index 98aefb609d1..8820428d580 100644 --- a/src/devices/bus/iq151/staper.h +++ b/src/devices/bus/iq151/staper.h @@ -21,7 +21,7 @@ class iq151_staper_device : { public: // construction/destruction - iq151_staper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_staper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/iq151/video32.cpp b/src/devices/bus/iq151/video32.cpp index 2d3f75b66ed..66d3089fb67 100644 --- a/src/devices/bus/iq151/video32.cpp +++ b/src/devices/bus/iq151/video32.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(IQ151_VIDEO32, iq151_video32_device, "iq151_video32", "IQ151 // iq151_video32_device - constructor //------------------------------------------------- -iq151_video32_device::iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_video32_device::iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151_VIDEO32, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr, "^^palette") , device_iq151cart_interface(mconfig, *this) diff --git a/src/devices/bus/iq151/video32.h b/src/devices/bus/iq151/video32.h index 9dc32765f6b..1625f8cdd56 100644 --- a/src/devices/bus/iq151/video32.h +++ b/src/devices/bus/iq151/video32.h @@ -20,7 +20,7 @@ class iq151_video32_device : { public: // construction/destruction - iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_video32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/iq151/video64.cpp b/src/devices/bus/iq151/video64.cpp index 487bf63ca33..ab009f1a63e 100644 --- a/src/devices/bus/iq151/video64.cpp +++ b/src/devices/bus/iq151/video64.cpp @@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(IQ151_VIDEO64, iq151_video64_device, "iq151_video64", "IQ151 // iq151_video64_device - constructor //------------------------------------------------- -iq151_video64_device::iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iq151_video64_device::iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IQ151_VIDEO64, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr, "^^palette") , device_iq151cart_interface( mconfig, *this ) diff --git a/src/devices/bus/iq151/video64.h b/src/devices/bus/iq151/video64.h index 7b152fc8fd6..90b4c89c43d 100644 --- a/src/devices/bus/iq151/video64.h +++ b/src/devices/bus/iq151/video64.h @@ -20,7 +20,7 @@ class iq151_video64_device : { public: // construction/destruction - iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iq151_video64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/isa/3c503.cpp b/src/devices/bus/isa/3c503.cpp index 0bf96c34f53..eeba392b7aa 100644 --- a/src/devices/bus/isa/3c503.cpp +++ b/src/devices/bus/isa/3c503.cpp @@ -7,7 +7,7 @@ void el2_3c503_device::device_add_mconfig(machine_config &config) { - DP8390D(config, m_dp8390, 0); + DP8390D(config, m_dp8390); m_dp8390->irq_callback().set(FUNC(el2_3c503_device::el2_3c503_irq_w)); m_dp8390->mem_read_callback().set(FUNC(el2_3c503_device::el2_3c503_mem_read)); m_dp8390->mem_write_callback().set(FUNC(el2_3c503_device::el2_3c503_mem_write)); @@ -15,7 +15,7 @@ void el2_3c503_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(EL2_3C503, el2_3c503_device, "el2_3c503", "3C503 Network Adapter") -el2_3c503_device::el2_3c503_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +el2_3c503_device::el2_3c503_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, EL2_3C503, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_dp8390(*this, "dp8390d") diff --git a/src/devices/bus/isa/3c503.h b/src/devices/bus/isa/3c503.h index f9597f00137..a4b8685203b 100644 --- a/src/devices/bus/isa/3c503.h +++ b/src/devices/bus/isa/3c503.h @@ -13,7 +13,7 @@ class el2_3c503_device : public device_t, public device_isa8_card_interface { public: - el2_3c503_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + el2_3c503_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t el2_3c503_loport_r(offs_t offset); void el2_3c503_loport_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp index a50c28b2c1b..6ed4325b597 100644 --- a/src/devices/bus/isa/3c505.cpp +++ b/src/devices/bus/isa/3c505.cpp @@ -193,7 +193,7 @@ static INPUT_PORTS_START(3c505) PORT_DIPSETTING( 0x01, DEF_STR(On)) INPUT_PORTS_END -isa16_3c505_device::isa16_3c505_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +isa16_3c505_device::isa16_3c505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_3C505, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_cpu(*this, "cpu") diff --git a/src/devices/bus/isa/3c505.h b/src/devices/bus/isa/3c505.h index 4c1c22383a2..f4f9acc6462 100644 --- a/src/devices/bus/isa/3c505.h +++ b/src/devices/bus/isa/3c505.h @@ -17,7 +17,7 @@ class isa16_3c505_device , public device_isa16_card_interface { public: - isa16_3c505_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + isa16_3c505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/isa/3xtwin.cpp b/src/devices/bus/isa/3xtwin.cpp index b30c83ab1ce..12310ead4a9 100644 --- a/src/devices/bus/isa/3xtwin.cpp +++ b/src/devices/bus/isa/3xtwin.cpp @@ -25,7 +25,7 @@ // device type definition DEFINE_DEVICE_TYPE(ISA8_3XTWIN, isa8_3xtwin_device, "3xtwin", "Emerald Technology 3XTwin Twinax Emulation Card") -isa8_3xtwin_device::isa8_3xtwin_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +isa8_3xtwin_device::isa8_3xtwin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_3XTWIN, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) { diff --git a/src/devices/bus/isa/3xtwin.h b/src/devices/bus/isa/3xtwin.h index cb9aeb286eb..62f86f2934d 100644 --- a/src/devices/bus/isa/3xtwin.h +++ b/src/devices/bus/isa/3xtwin.h @@ -20,7 +20,7 @@ class isa8_3xtwin_device : public device_t, public device_isa8_card_interface { public: // device type constructor - isa8_3xtwin_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + isa8_3xtwin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/acb2072.cpp b/src/devices/bus/isa/acb2072.cpp index c9d7917a114..a8022006f75 100644 --- a/src/devices/bus/isa/acb2072.cpp +++ b/src/devices/bus/isa/acb2072.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(ACB2072, acb2072_device, "acb2072", "ACB-2072 RLL Drive Controller") -acb2072_device::acb2072_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +acb2072_device::acb2072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACB2072, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_mcu(*this, "mcu") diff --git a/src/devices/bus/isa/acb2072.h b/src/devices/bus/isa/acb2072.h index be4185400b9..26af89897d9 100644 --- a/src/devices/bus/isa/acb2072.h +++ b/src/devices/bus/isa/acb2072.h @@ -16,7 +16,7 @@ class acb2072_device : public device_t, public device_isa8_card_interface { public: - acb2072_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + acb2072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/adlib.cpp b/src/devices/bus/isa/adlib.cpp index 0f859a0ebbd..9f72e98f75b 100644 --- a/src/devices/bus/isa/adlib.cpp +++ b/src/devices/bus/isa/adlib.cpp @@ -58,7 +58,7 @@ void isa8_adlib_device::device_add_mconfig(machine_config &config) // isa8_adlib_device - constructor //------------------------------------------------- -isa8_adlib_device::isa8_adlib_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa8_adlib_device::isa8_adlib_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_ADLIB, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_ym3812(*this, "ym3812") diff --git a/src/devices/bus/isa/adlib.h b/src/devices/bus/isa/adlib.h index 511d0b4663c..6ab31e7c216 100644 --- a/src/devices/bus/isa/adlib.h +++ b/src/devices/bus/isa/adlib.h @@ -20,7 +20,7 @@ class isa8_adlib_device : { public: // construction/destruction - isa8_adlib_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_adlib_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t ym3812_16_r(offs_t offset); void ym3812_16_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp index 81e6ba053fe..0658b428900 100644 --- a/src/devices/bus/isa/aga.cpp +++ b/src/devices/bus/isa/aga.cpp @@ -62,12 +62,12 @@ DEFINE_DEVICE_TYPE(ISA8_AGA_PC200, isa8_aga_pc200_device, "isa_aga_pc200", "AGA // isa8_aga_device - constructor //------------------------------------------------- -isa8_aga_device::isa8_aga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_aga_device::isa8_aga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_aga_device(mconfig, ISA8_AGA, tag, owner, clock) { } -isa8_aga_device::isa8_aga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_aga_device::isa8_aga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_palette(*this, "palette"), @@ -148,7 +148,7 @@ ioport_constructor isa8_aga_device::device_input_ports() const // isa8_aga_pc200_device - constructor //------------------------------------------------- -isa8_aga_pc200_device::isa8_aga_pc200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_aga_pc200_device::isa8_aga_pc200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_aga_device(mconfig, ISA8_AGA_PC200, tag, owner, clock), m_port8(0), m_portd(0), diff --git a/src/devices/bus/isa/aga.h b/src/devices/bus/isa/aga.h index b5f986e9a34..180dbf42195 100644 --- a/src/devices/bus/isa/aga.h +++ b/src/devices/bus/isa/aga.h @@ -36,10 +36,10 @@ public: enum mode_t { AGA_OFF, AGA_COLOR, AGA_MONO }; // construction/destruction - isa8_aga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_aga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - isa8_aga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_aga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint8_t pc_aga_mda_r(offs_t offset); void pc_aga_mda_w(offs_t offset, uint8_t data); @@ -105,7 +105,7 @@ class isa8_aga_pc200_device : { public: // construction/destruction - isa8_aga_pc200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_aga_pc200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: uint8_t pc200_videoram_r(offs_t offset); diff --git a/src/devices/bus/isa/aha1542b.cpp b/src/devices/bus/isa/aha1542b.cpp index bba0bb76d41..15a21fd38d0 100644 --- a/src/devices/bus/isa/aha1542b.cpp +++ b/src/devices/bus/isa/aha1542b.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(AHA1542A, aha1542a_device, "aha1542a", "AHA-1542A SCSI Contro DEFINE_DEVICE_TYPE(AHA1542B, aha1542b_device, "aha1542b", "AHA-1542B SCSI Controller") -aha154x_device::aha154x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +aha154x_device::aha154x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_localcpu(*this, "localcpu") @@ -33,12 +33,12 @@ aha154x_device::aha154x_device(const machine_config &mconfig, device_type type, { } -aha1542a_device::aha1542a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aha1542a_device::aha1542a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aha154x_device(mconfig, AHA1542A, tag, owner, clock) { } -aha1542b_device::aha1542b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aha1542b_device::aha1542b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aha154x_device(mconfig, AHA1542B, tag, owner, clock) , m_busaic(*this, "busaic") { diff --git a/src/devices/bus/isa/aha1542b.h b/src/devices/bus/isa/aha1542b.h index c46f456bfe9..1673fb03ef7 100644 --- a/src/devices/bus/isa/aha1542b.h +++ b/src/devices/bus/isa/aha1542b.h @@ -19,7 +19,7 @@ class aha154x_device : public device_t, public device_isa16_card_interface { protected: - aha154x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + aha154x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -37,7 +37,7 @@ protected: class aha1542a_device : public aha154x_device { public: - aha1542a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aha1542a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } @@ -61,7 +61,7 @@ private: class aha1542b_device : public aha154x_device { public: - aha1542b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aha1542b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/aha1542c.cpp b/src/devices/bus/isa/aha1542c.cpp index 34e716647ac..9fb169d4b57 100644 --- a/src/devices/bus/isa/aha1542c.cpp +++ b/src/devices/bus/isa/aha1542c.cpp @@ -344,7 +344,7 @@ const tiny_rom_entry *aha1542cp_device::device_rom_region() const void aha1542c_device::device_add_mconfig(machine_config &config) { - z80_device &cpu(Z80(config, Z84C0010_TAG, 10'000'000)); + z80_device &cpu(Z80(config, Z84C0010_TAG, XTAL::u(10'000'000))); cpu.set_addrmap(AS_PROGRAM, &aha1542c_device::z84c0010_mem); EEPROM_93C46_16BIT(config, m_eeprom); @@ -352,30 +352,30 @@ void aha1542c_device::device_add_mconfig(machine_config &config) void aha1542cp_device::device_add_mconfig(machine_config &config) { - z80_device &cpu(Z80(config, Z84C0010_TAG, 10'000'000)); + z80_device &cpu(Z80(config, Z84C0010_TAG, XTAL::u(10'000'000))); cpu.set_addrmap(AS_PROGRAM, &aha1542cp_device::local_mem); EEPROM_93C46_16BIT(config, m_eeprom); } -aha1542c_device::aha1542c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +aha1542c_device::aha1542c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_eeprom(*this, "eeprom") { } -aha1542c_device::aha1542c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aha1542c_device::aha1542c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aha1542c_device(mconfig, AHA1542C, tag, owner, clock) { } -aha1542cf_device::aha1542cf_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aha1542cf_device::aha1542cf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aha1542c_device(mconfig, AHA1542CF, tag, owner, clock) { } -aha1542cp_device::aha1542cp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aha1542cp_device::aha1542cp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aha1542c_device(mconfig, AHA1542CP, tag, owner, clock) { } diff --git a/src/devices/bus/isa/aha1542c.h b/src/devices/bus/isa/aha1542c.h index 3a79fb3125f..9f3a618da47 100644 --- a/src/devices/bus/isa/aha1542c.h +++ b/src/devices/bus/isa/aha1542c.h @@ -31,13 +31,13 @@ class aha1542c_device : public device_t, public: static constexpr feature_type unemulated_features() { return feature::DISK; } // construction/destruction - aha1542c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aha1542c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 aha1542_r(offs_t offset); void aha1542_w(offs_t offset, u8 data); protected: - aha1542c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + aha1542c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void local_latch_w(u8 data); @@ -62,7 +62,7 @@ class aha1542cf_device : public aha1542c_device { public: // construction/destruction - aha1542cf_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aha1542cf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -74,7 +74,7 @@ class aha1542cp_device : public aha1542c_device { public: // construction/destruction - aha1542cp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aha1542cp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/isa/aha174x.cpp b/src/devices/bus/isa/aha174x.cpp index 1b212fe6ae2..945566c5d1d 100644 --- a/src/devices/bus/isa/aha174x.cpp +++ b/src/devices/bus/isa/aha174x.cpp @@ -42,7 +42,7 @@ DEFINE_DEVICE_TYPE(AHA1740, aha1740_device, "aha1740", "AHA-1740 Fast SCSI Host DEFINE_DEVICE_TYPE(AHA1742A, aha1742a_device, "aha1742a", "AHA-1742A Fast SCSI Host Adapter") -aha174x_device::aha174x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +aha174x_device::aha174x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_hpc(*this, "hpc") @@ -52,12 +52,12 @@ aha174x_device::aha174x_device(const machine_config &mconfig, device_type type, { } -aha1740_device::aha1740_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aha1740_device::aha1740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aha174x_device(mconfig, AHA1740, tag, owner, clock) { } -aha1742a_device::aha1742a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aha1742a_device::aha1742a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aha174x_device(mconfig, AHA1742A, tag, owner, clock) , m_fdc(*this, "fdc") { @@ -94,7 +94,7 @@ void aha1740_device::device_add_mconfig(machine_config &config) m_busaic->hrst_callback().set_inputline(m_hpc, INPUT_LINE_RESET); //m_busaic->srst_callback().set_inputline(m_hpc, hpc_device::EI_LINE); - I82355(config, "bmic", 0); + I82355(config, "bmic"); //bmic.lint_callback().set_inputline(m_hpc, hpc_device::I2_LINE); IDT7201(config, m_fifo[0]); @@ -121,7 +121,7 @@ void aha1742a_device::device_add_mconfig(machine_config &config) m_busaic->hrst_callback().set_inputline(m_hpc, INPUT_LINE_RESET); //m_busaic->srst_callback().set_inputline(m_hpc, hpc_device::EI_LINE); - I82355(config, "bmic", 0); + I82355(config, "bmic"); //bmic.lint_callback().set_inputline(m_hpc, hpc_device::I2_LINE); IDT7201(config, m_fifo[0]); diff --git a/src/devices/bus/isa/aha174x.h b/src/devices/bus/isa/aha174x.h index 1b96d78a690..f6da5d51c42 100644 --- a/src/devices/bus/isa/aha174x.h +++ b/src/devices/bus/isa/aha174x.h @@ -20,7 +20,7 @@ class aha174x_device : public device_t, public device_isa16_card_interface { protected: - aha174x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + aha174x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -36,7 +36,7 @@ protected: class aha1740_device : public aha174x_device { public: - aha1740_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aha1740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } @@ -48,7 +48,7 @@ protected: class aha1742a_device : public aha174x_device { public: - aha1742a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aha1742a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/asc88.cpp b/src/devices/bus/isa/asc88.cpp index 7bdb707f6a6..0eefbf7296f 100644 --- a/src/devices/bus/isa/asc88.cpp +++ b/src/devices/bus/isa/asc88.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(ASC88, asc88_device, "asc88", "ASC-88 SCSI Adapter") -asc88_device::asc88_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +asc88_device::asc88_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASC88, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_scsic(*this, "scsi:7:scsic") diff --git a/src/devices/bus/isa/asc88.h b/src/devices/bus/isa/asc88.h index 8cfdd784b98..4bfc3a50b22 100644 --- a/src/devices/bus/isa/asc88.h +++ b/src/devices/bus/isa/asc88.h @@ -19,7 +19,7 @@ class asc88_device : public device_t, public device_isa8_card_interface { public: - asc88_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + asc88_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/isa/bblue2.cpp b/src/devices/bus/isa/bblue2.cpp index ad997664cc2..f9dc8c1d772 100644 --- a/src/devices/bus/isa/bblue2.cpp +++ b/src/devices/bus/isa/bblue2.cpp @@ -163,7 +163,7 @@ INPUT_PORTS_END // isa8_adlib_device - constructor //------------------------------------------------- -isa8_babyblue2_device::isa8_babyblue2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa8_babyblue2_device::isa8_babyblue2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_BABYBLUE2, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_z80(*this, "z80cpu") diff --git a/src/devices/bus/isa/bblue2.h b/src/devices/bus/isa/bblue2.h index cdce099d883..de1a22645a6 100644 --- a/src/devices/bus/isa/bblue2.h +++ b/src/devices/bus/isa/bblue2.h @@ -23,7 +23,7 @@ class isa8_babyblue2_device : { public: // construction/destruction - isa8_babyblue2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_babyblue2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t z80_control_r(offs_t offset); void z80_control_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/bt54x.cpp b/src/devices/bus/isa/bt54x.cpp index 1c3c4bdf3f1..d9682fc45e3 100644 --- a/src/devices/bus/isa/bt54x.cpp +++ b/src/devices/bus/isa/bt54x.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(BT542B, bt542b_device, "bt542b", "BusTek BT-542B SCSI Host Ad DEFINE_DEVICE_TYPE(BT542BH, bt542bh_device, "bt542bh", "BusLogic BT-542B SCSI Host Adapter (Rev. H)") DEFINE_DEVICE_TYPE(BT545S, bt545s_device, "bt545s", "BusLogic BT-545S Fast SCSI Host Adapter") -bt54x_device::bt54x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +bt54x_device::bt54x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_mpu(*this, "mpu") @@ -34,17 +34,17 @@ bt54x_device::bt54x_device(const machine_config &mconfig, device_type type, cons { } -bt542b_device::bt542b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +bt542b_device::bt542b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt54x_device(mconfig, BT542B, tag, owner, clock) { } -bt542bh_device::bt542bh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +bt542bh_device::bt542bh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt54x_device(mconfig, BT542BH, tag, owner, clock) { } -bt545s_device::bt545s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +bt545s_device::bt545s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt54x_device(mconfig, BT545S, tag, owner, clock) { } @@ -89,7 +89,7 @@ void bt54x_device::fsc_config(device_t *device) void bt54x_device::fsc_base(machine_config &config) { - //ncr86c05_device &busintf(NCR86C05(config, "busintf", 0)); + //ncr86c05_device &busintf(NCR86C05(config, "busintf")); //busintf.mint_callback().set(m_mpu, FUNC(i80188_cpu_device::int1_w)); //busintf.dma_ack_callback().set("scsi:7:scsic", FUNC(ncr53cf94_device::dma_w)); @@ -111,7 +111,7 @@ void bt542b_device::device_add_mconfig(machine_config &config) I80188(config, m_mpu, 16_MHz_XTAL); m_mpu->set_addrmap(AS_PROGRAM, &bt542b_device::local_map); - //ncr86c05_device &busintf(NCR86C05(config, "busintf", 0)); + //ncr86c05_device &busintf(NCR86C05(config, "busintf")); //busintf.mint_callback().set(m_mpu, FUNC(i80188_cpu_device::int1_w)); //busintf.dma_ack_callback().set("scsi:7:scsic", FUNC(ncr53c94_device::dma_w)); diff --git a/src/devices/bus/isa/bt54x.h b/src/devices/bus/isa/bt54x.h index dfdd0009416..a5266794360 100644 --- a/src/devices/bus/isa/bt54x.h +++ b/src/devices/bus/isa/bt54x.h @@ -21,7 +21,7 @@ public: static constexpr feature_type unemulated_features() { return feature::DISK; } protected: - bt54x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + bt54x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -40,7 +40,7 @@ protected: class bt542b_device : public bt54x_device { public: - bt542b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + bt542b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -50,7 +50,7 @@ protected: class bt542bh_device : public bt54x_device { public: - bt542bh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + bt542bh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -60,7 +60,7 @@ protected: class bt545s_device : public bt54x_device { public: - bt545s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + bt545s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp index 77595bbbfb0..28c3628694f 100644 --- a/src/devices/bus/isa/cga.cpp +++ b/src/devices/bus/isa/cga.cpp @@ -298,12 +298,12 @@ const tiny_rom_entry *isa8_cga_device::device_rom_region() const // isa8_cga_device - constructor //------------------------------------------------- -isa8_cga_device::isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_device::isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_CGA, tag, owner, clock) { } -isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_crtc(*this, CGA_MC6845_NAME), m_cga_config(*this, "cga_config"), m_framecnt(0), m_mode_control(0), m_color_select(0), @@ -426,7 +426,7 @@ DEFINE_DEVICE_TYPE(ISA8_CGA_POISK2, isa8_cga_poisk2_device, "cga_poisk2", "ISA8_ // isa8_cga_poisk2_device - constructor //------------------------------------------------- -isa8_cga_poisk2_device::isa8_cga_poisk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_poisk2_device::isa8_cga_poisk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_CGA_POISK2, tag, owner, clock) { m_chr_gen_offset[0] = 0x0000; @@ -455,12 +455,12 @@ DEFINE_DEVICE_TYPE(ISA8_CGA_SUPERIMPOSE, isa8_cga_superimpose_device, "cga_super // isa8_cga_superimpose_device - constructor //------------------------------------------------- -isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_superimpose_device(mconfig, ISA8_CGA_SUPERIMPOSE, tag, owner, clock) { } -isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_superimpose_device::isa8_cga_superimpose_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, type, tag, owner, clock) { m_superimpose = true; @@ -1310,7 +1310,7 @@ const uint8_t isa8_cga_pc1512_device::mc6845_writeonce_register[31] = // isa8_cga_pc1512_device - constructor //------------------------------------------------- -isa8_cga_pc1512_device::isa8_cga_pc1512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_pc1512_device::isa8_cga_pc1512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_CGA_PC1512, tag, owner, clock), m_write(0), m_read(0), m_mc6845_address(0) { m_vram_size = 0x10000; @@ -1436,7 +1436,7 @@ DEFINE_DEVICE_TYPE(ISA8_WYSE700, isa8_wyse700_device, "wyse700", "Wyse 700") // isa8_wyse700_device - constructor //------------------------------------------------- -isa8_wyse700_device::isa8_wyse700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_wyse700_device::isa8_wyse700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_WYSE700, tag, owner, clock), m_vrambank(*this, "wy1"), m_bank_offset(0), m_bank_base(0), m_control(0) { m_vram_size = 0x20000; @@ -1535,7 +1535,7 @@ DEFINE_DEVICE_TYPE(ISA8_EC1841_0002, isa8_ec1841_0002_device, "ec1841_0002", "EC // isa8_ec1841_0002_device - constructor //------------------------------------------------- -isa8_ec1841_0002_device::isa8_ec1841_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_ec1841_0002_device::isa8_ec1841_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_EC1841_0002, tag, owner, clock), m_p3df(0) { } @@ -1645,7 +1645,7 @@ MC6845_RECONFIGURE( isa8_cga_mc1502_device::reconfigure ) // isa8_cga_mc1502_device - constructor //------------------------------------------------- -isa8_cga_mc1502_device::isa8_cga_mc1502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_mc1502_device::isa8_cga_mc1502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_CGA_MC1502, tag, owner, clock) { m_vram_size = 0x8000; @@ -1674,7 +1674,7 @@ DEFINE_DEVICE_TYPE(ISA8_CGA_ISKR1031, isa8_cga_iskr1031_device, "cga_iskr1031", // isa8_cga_iskr1031_device - constructor //------------------------------------------------- -isa8_cga_iskr1031_device::isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_iskr1031_device::isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_CGA_ISKR1031, tag, owner, clock) { } @@ -1699,7 +1699,7 @@ DEFINE_DEVICE_TYPE(ISA8_CGA_ISKR1030M, isa8_cga_iskr1030m_device, "cga_iskr1030m // isa8_cga_iskr1030m_device - constructor //------------------------------------------------- -isa8_cga_iskr1030m_device::isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_iskr1030m_device::isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_CGA_ISKR1030M, tag, owner, clock) { } @@ -1737,12 +1737,12 @@ void isa8_cga_m24_device::device_add_mconfig(machine_config &config) m_crtc->set_reconfigure_callback(FUNC(isa8_cga_m24_device::reconfigure)); } -isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_m24_device(mconfig, ISA8_CGA_M24, tag, owner, clock) { } -isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, type, tag, owner, clock), m_mode2(0), m_index(0) { m_vram_size = 0x8000; @@ -1930,7 +1930,7 @@ void isa8_cga_cportiii_device::device_add_mconfig(machine_config &config) subdevice(CGA_SCREEN_NAME)->set_color(rgb_t(255, 125, 0)); } -isa8_cga_cportiii_device::isa8_cga_cportiii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_cportiii_device::isa8_cga_cportiii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_m24_device(mconfig, ISA8_CGA_CPORTIII, tag, owner, clock) { } diff --git a/src/devices/bus/isa/cga.h b/src/devices/bus/isa/cga.h index 029dc35095f..a9978e1e338 100644 --- a/src/devices/bus/isa/cga.h +++ b/src/devices/bus/isa/cga.h @@ -29,7 +29,7 @@ class isa8_cga_device : public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual MC6845_UPDATE_ROW( crtc_update_row ); template MC6845_UPDATE_ROW( cga_text ); @@ -39,7 +39,7 @@ public: MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ); protected: - isa8_cga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_crtc; required_ioport m_cga_config; @@ -103,9 +103,9 @@ class isa8_cga_superimpose_device : { public: // construction/destruction - isa8_cga_superimpose_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_superimpose_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - isa8_cga_superimpose_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_superimpose_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition @@ -119,7 +119,7 @@ class isa8_cga_poisk2_device : { public: // construction/destruction - isa8_cga_poisk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_poisk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -135,7 +135,7 @@ class isa8_cga_pc1512_device : { public: // construction/destruction - isa8_cga_pc1512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_pc1512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -177,7 +177,7 @@ class isa8_wyse700_device : { public: // construction/destruction - isa8_wyse700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_wyse700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -208,7 +208,7 @@ class isa8_ec1841_0002_device : { public: // construction/destruction - isa8_ec1841_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_ec1841_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -234,7 +234,7 @@ class isa8_cga_iskr1030m_device : { public: // construction/destruction - isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_iskr1030m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -248,7 +248,7 @@ class isa8_cga_iskr1031_device : { public: // construction/destruction - isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_iskr1031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -262,7 +262,7 @@ class isa8_cga_mc1502_device : { public: // construction/destruction - isa8_cga_mc1502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_mc1502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -279,7 +279,7 @@ class isa8_cga_m24_device : { public: // construction/destruction - isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t io_read(offs_t offset) override; virtual void io_write(offs_t offset, uint8_t data) override; virtual MC6845_UPDATE_ROW( crtc_update_row ) override; @@ -287,7 +287,7 @@ public: MC6845_RECONFIGURE(reconfigure); protected: - isa8_cga_m24_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_m24_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -302,7 +302,7 @@ class isa8_cga_cportiii_device : public isa8_cga_m24_device { public: - isa8_cga_cportiii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_cportiii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t port_13c6_r(); void port_13c6_w(uint8_t data); uint8_t port_23c6_r(); diff --git a/src/devices/bus/isa/chessmdr.cpp b/src/devices/bus/isa/chessmdr.cpp index b1035945761..326f90c361c 100644 --- a/src/devices/bus/isa/chessmdr.cpp +++ b/src/devices/bus/isa/chessmdr.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(ISA8_CHESSMDR, isa8_chessmdr_device, "isa_chessmdr", "The Che // constructor //------------------------------------------------- -isa8_chessmdr_device::isa8_chessmdr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_chessmdr_device::isa8_chessmdr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_CHESSMDR, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_chessm(*this, "chessm") @@ -97,7 +97,7 @@ ioport_constructor isa8_chessmdr_device::device_input_ports() const void isa8_chessmdr_device::device_add_mconfig(machine_config &config) { - CHESSMACHINE(config, m_chessm, 15'000'000); + CHESSMACHINE(config, m_chessm, XTAL::u(15'000'000)); } diff --git a/src/devices/bus/isa/chessmdr.h b/src/devices/bus/isa/chessmdr.h index 9f5d1bf270f..1efde0ede38 100644 --- a/src/devices/bus/isa/chessmdr.h +++ b/src/devices/bus/isa/chessmdr.h @@ -21,7 +21,7 @@ class isa8_chessmdr_device : { public: // construction/destruction - isa8_chessmdr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_chessmdr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/chessmsr.cpp b/src/devices/bus/isa/chessmsr.cpp index f466f392227..1a7681d64cc 100644 --- a/src/devices/bus/isa/chessmsr.cpp +++ b/src/devices/bus/isa/chessmsr.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ISA8_CHESSMSR, isa8_chessmsr_device, "isa_chessmsr", "The Che // constructor //------------------------------------------------- -isa8_chessmsr_device::isa8_chessmsr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_chessmsr_device::isa8_chessmsr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_CHESSMSR, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_maincpu(*this, "maincpu"), diff --git a/src/devices/bus/isa/chessmsr.h b/src/devices/bus/isa/chessmsr.h index 6d4becc4b64..b8f86cc3bfe 100644 --- a/src/devices/bus/isa/chessmsr.h +++ b/src/devices/bus/isa/chessmsr.h @@ -22,7 +22,7 @@ class isa8_chessmsr_device : { public: // construction/destruction - isa8_chessmsr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_chessmsr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/cl_sh260.cpp b/src/devices/bus/isa/cl_sh260.cpp index a06b7b625a6..f33971fbac1 100644 --- a/src/devices/bus/isa/cl_sh260.cpp +++ b/src/devices/bus/isa/cl_sh260.cpp @@ -16,19 +16,19 @@ DEFINE_DEVICE_TYPE(EV346, isa16_ev346_device, "ev346", "Everex EV-346 disk controller") DEFINE_DEVICE_TYPE(JC1310, isa16_jc1310_device, "jc1310", "Joincom JC-1310 disk controller") -isa16_cl_sh260_device::isa16_cl_sh260_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +isa16_cl_sh260_device::isa16_cl_sh260_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_fdc(*this, "fdc") { } -isa16_ev346_device::isa16_ev346_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +isa16_ev346_device::isa16_ev346_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa16_cl_sh260_device(mconfig, EV346, tag, owner, clock) { } -isa16_jc1310_device::isa16_jc1310_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +isa16_jc1310_device::isa16_jc1310_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa16_cl_sh260_device(mconfig, JC1310, tag, owner, clock) { } diff --git a/src/devices/bus/isa/cl_sh260.h b/src/devices/bus/isa/cl_sh260.h index 18612ab6456..cbe94a6c0a4 100644 --- a/src/devices/bus/isa/cl_sh260.h +++ b/src/devices/bus/isa/cl_sh260.h @@ -19,7 +19,7 @@ class isa16_cl_sh260_device : public device_t, public device_isa16_card_interface { protected: - isa16_cl_sh260_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + isa16_cl_sh260_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -31,7 +31,7 @@ protected: class isa16_ev346_device : public isa16_cl_sh260_device { public: - isa16_ev346_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + isa16_ev346_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } @@ -46,7 +46,7 @@ private: class isa16_jc1310_device : public isa16_cl_sh260_device { public: - isa16_jc1310_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + isa16_jc1310_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/com.cpp b/src/devices/bus/isa/com.cpp index 4a1cc1ebd00..2af209675a2 100644 --- a/src/devices/bus/isa/com.cpp +++ b/src/devices/bus/isa/com.cpp @@ -99,12 +99,12 @@ void isa8_com_device::device_add_mconfig(machine_config &config) // isa8_com_device - constructor //------------------------------------------------- -isa8_com_device::isa8_com_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_com_device::isa8_com_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_com_device(mconfig, ISA8_COM, tag, owner, clock) { } -isa8_com_device::isa8_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_com_device::isa8_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this) { @@ -187,7 +187,7 @@ void isa8_com_at_device::device_add_mconfig(machine_config &config) // isa8_com_device - constructor //------------------------------------------------- -isa8_com_at_device::isa8_com_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_com_at_device::isa8_com_at_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_com_device(mconfig, ISA8_COM_AT, tag, owner, clock) { } diff --git a/src/devices/bus/isa/com.h b/src/devices/bus/isa/com.h index ff7b5e4eef8..433d38cf583 100644 --- a/src/devices/bus/isa/com.h +++ b/src/devices/bus/isa/com.h @@ -20,13 +20,13 @@ class isa8_com_device : { public: // construction/destruction - isa8_com_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_com_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(pc_com_interrupt_1) { m_isa->irq4_w(state); } DECLARE_WRITE_LINE_MEMBER(pc_com_interrupt_2) { m_isa->irq3_w(state); } protected: - isa8_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -47,7 +47,7 @@ class isa8_com_at_device : { public: // construction/destruction - isa8_com_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_com_at_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/isa/dcb.cpp b/src/devices/bus/isa/dcb.cpp index db5768d6758..902b219cd7b 100644 --- a/src/devices/bus/isa/dcb.cpp +++ b/src/devices/bus/isa/dcb.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(NOVELL_DCB, novell_dcb_device, "novell_dcb", "Novell Disk Coprocessor Board (#738-133-001)") -novell_dcb_device::novell_dcb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +novell_dcb_device::novell_dcb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NOVELL_DCB, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_localcpu(*this, "localcpu") diff --git a/src/devices/bus/isa/dcb.h b/src/devices/bus/isa/dcb.h index fbca0303978..4fdf8809bf5 100644 --- a/src/devices/bus/isa/dcb.h +++ b/src/devices/bus/isa/dcb.h @@ -18,7 +18,7 @@ class novell_dcb_device : public device_t, public device_isa16_card_interface { public: - novell_dcb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + novell_dcb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp index 9312d063158..82bb547a9cd 100644 --- a/src/devices/bus/isa/dectalk.cpp +++ b/src/devices/bus/isa/dectalk.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(ISA8_DECTALK, dectalk_isa_device, "dectalk_isa", "DECTalk-PC") -dectalk_isa_device::dectalk_isa_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +dectalk_isa_device::dectalk_isa_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, ISA8_DECTALK, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_cmd(0), @@ -170,7 +170,7 @@ void dectalk_isa_device::device_add_mconfig(machine_config &config) m_dsp->bio().set(FUNC(dectalk_isa_device::bio_line_r)); SPEAKER(config, "speaker").front_center(); - DAC_12BIT_R2R(config, m_dac, 0).add_route(0, "speaker", 1.0); // unknown DAC + DAC_12BIT_R2R(config, m_dac).add_route(0, "speaker", 1.0); // unknown DAC } void dectalk_isa_device::write(offs_t offset, uint8_t data) diff --git a/src/devices/bus/isa/dectalk.h b/src/devices/bus/isa/dectalk.h index 674efa91d5d..6665df8cf4d 100644 --- a/src/devices/bus/isa/dectalk.h +++ b/src/devices/bus/isa/dectalk.h @@ -14,7 +14,7 @@ class dectalk_isa_device : public device_t, public device_isa8_card_interface { public: - dectalk_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dectalk_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp index 1aca9ba7cb2..adc9ec21ae4 100644 --- a/src/devices/bus/isa/ega.cpp +++ b/src/devices/bus/isa/ega.cpp @@ -579,12 +579,12 @@ ioport_constructor isa8_ega_device::device_input_ports() const // isa8_ega_device - constructor //------------------------------------------------- -isa8_ega_device::isa8_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_ega_device::isa8_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_ega_device(mconfig, ISA8_EGA, tag, owner, clock) { } -isa8_ega_device::isa8_ega_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_ega_device::isa8_ega_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_crtc_ega(*this, EGA_CRTC_NAME), m_videoram(nullptr), m_charA(nullptr), m_charB(nullptr), diff --git a/src/devices/bus/isa/ega.h b/src/devices/bus/isa/ega.h index cea8667ba8e..32661a2f29d 100644 --- a/src/devices/bus/isa/ega.h +++ b/src/devices/bus/isa/ega.h @@ -21,7 +21,7 @@ class isa8_ega_device : { public: // construction/destruction - isa8_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); @@ -36,7 +36,7 @@ public: CRTC_EGA_PIXEL_UPDATE(pc_ega_text); protected: - isa8_ega_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_ega_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/eis_hgb107x.cpp b/src/devices/bus/isa/eis_hgb107x.cpp index ed3100c3e97..8adc0365c84 100644 --- a/src/devices/bus/isa/eis_hgb107x.cpp +++ b/src/devices/bus/isa/eis_hgb107x.cpp @@ -174,12 +174,12 @@ const tiny_rom_entry *isa8_epc_mda_device::device_rom_region() const //------------------------------------------------- // isa8_epc_mda_device - constructor //------------------------------------------------- -isa8_epc_mda_device::isa8_epc_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_epc_mda_device::isa8_epc_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_epc_mda_device(mconfig, ISA8_EPC_MDA, tag, owner, clock) { } -isa8_epc_mda_device::isa8_epc_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_epc_mda_device::isa8_epc_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_crtc(*this, MC6845_NAME), diff --git a/src/devices/bus/isa/eis_hgb107x.h b/src/devices/bus/isa/eis_hgb107x.h index 6689e7db0a8..d131af39d9e 100644 --- a/src/devices/bus/isa/eis_hgb107x.h +++ b/src/devices/bus/isa/eis_hgb107x.h @@ -18,7 +18,7 @@ class isa8_epc_mda_device : public device_t, public device_isa8_card_interface { public: // construction/destruction - isa8_epc_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_epc_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t io_read(offs_t offset); void io_write(offs_t offset, uint8_t data); @@ -31,7 +31,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(monitor_changed); protected: - isa8_epc_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_epc_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/eis_sad8852.cpp b/src/devices/bus/isa/eis_sad8852.cpp index d8b1fec4d87..53c171d87f5 100644 --- a/src/devices/bus/isa/eis_sad8852.cpp +++ b/src/devices/bus/isa/eis_sad8852.cpp @@ -208,7 +208,7 @@ void isa16_sad8852_device::device_add_mconfig(machine_config &config) I8274(config, "terminal", XTAL(12'000'000) / 3); // Needs verification } -isa16_sad8852_device::isa16_sad8852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_sad8852_device::isa16_sad8852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SAD8852, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_sw1(*this, "SW1") diff --git a/src/devices/bus/isa/eis_sad8852.h b/src/devices/bus/isa/eis_sad8852.h index 224680c83e7..11237dcb368 100644 --- a/src/devices/bus/isa/eis_sad8852.h +++ b/src/devices/bus/isa/eis_sad8852.h @@ -13,7 +13,7 @@ class isa16_sad8852_device : { public: // construction/destruction - isa16_sad8852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_sad8852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t sad8852_r(offs_t offset); void sad8852_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/eis_twib.cpp b/src/devices/bus/isa/eis_twib.cpp index 4ca179e5055..3292a5a0bc4 100644 --- a/src/devices/bus/isa/eis_twib.cpp +++ b/src/devices/bus/isa/eis_twib.cpp @@ -199,7 +199,7 @@ ioport_constructor isa8_eistwib_device::device_input_ports() const //------------------------------------------------- void isa8_eistwib_device::device_add_mconfig(machine_config &config) { - SDLC_LOGGER(config, m_sdlclogger, 0); // To decode the frames + SDLC_LOGGER(config, m_sdlclogger); // To decode the frames I8274(config, m_uart8274, (XTAL(14'318'181)/ 3) / 2); // Half the 4,77 MHz ISA bus CLK signal //m_uart8274->out_rtsa_callback().set([this] (int state) { m_rts = state; }); m_uart8274->out_txda_callback().set([this] (int state) { m_txd = state; m_sdlclogger->data_w(state); }); @@ -215,7 +215,7 @@ void isa8_eistwib_device::device_add_mconfig(machine_config &config) TIMER(config, "bitclock").configure_periodic(FUNC(isa8_eistwib_device::tick_bitclock), attotime::from_hz(300000)); } -isa8_eistwib_device::isa8_eistwib_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_eistwib_device::isa8_eistwib_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_EIS_TWIB, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_uart8274(*this, "terminal") diff --git a/src/devices/bus/isa/eis_twib.h b/src/devices/bus/isa/eis_twib.h index 03aa10b5544..9b66c89439b 100644 --- a/src/devices/bus/isa/eis_twib.h +++ b/src/devices/bus/isa/eis_twib.h @@ -16,7 +16,7 @@ class isa8_eistwib_device : { public: // construction/destruction - isa8_eistwib_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_eistwib_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t twib_r(offs_t offset); void twib_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/ex1280.cpp b/src/devices/bus/isa/ex1280.cpp index 2d9153616e9..fa15be8434a 100644 --- a/src/devices/bus/isa/ex1280.cpp +++ b/src/devices/bus/isa/ex1280.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(ISA16_EX1280, isa16_ex1280_device, "ex1280", "Vectrix EX1280" // isa16_ex1280_device - constructor //------------------------------------------------- -isa16_ex1280_device::isa16_ex1280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa16_ex1280_device::isa16_ex1280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_EX1280, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_cpu(*this, "maincpu") @@ -64,7 +64,7 @@ void isa16_ex1280_device::main_map(address_map &map) void isa16_ex1280_device::device_add_mconfig(machine_config &config) { - TMS34010(config, m_cpu, 64000000); + TMS34010(config, m_cpu, XTAL::u(64000000)); m_cpu->set_addrmap(AS_PROGRAM, &isa16_ex1280_device::main_map); m_cpu->set_halt_on_reset(false); m_cpu->set_pixel_clock(64000000); @@ -82,7 +82,7 @@ void isa16_ex1280_device::device_add_mconfig(machine_config &config) m_screen->set_screen_update(m_cpu, FUNC(tms34010_device::tms340x0_rgb32)); m_screen->screen_vblank().set(FUNC(isa16_ex1280_device::vblank_w)); - BT451(config, m_ramdac, 0); + BT451(config, m_ramdac); } diff --git a/src/devices/bus/isa/ex1280.h b/src/devices/bus/isa/ex1280.h index a9637a1b1f6..dfc2004b0ed 100644 --- a/src/devices/bus/isa/ex1280.h +++ b/src/devices/bus/isa/ex1280.h @@ -21,7 +21,7 @@ class isa16_ex1280_device : public device_t, { public: // construction/destruction - isa16_ex1280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_ex1280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Flag non working features static constexpr feature_type unemulated_features() { return feature::GRAPHICS | feature::PALETTE; } diff --git a/src/devices/bus/isa/fdc.cpp b/src/devices/bus/isa/fdc.cpp index a08ec8b899a..3969ac95427 100644 --- a/src/devices/bus/isa/fdc.cpp +++ b/src/devices/bus/isa/fdc.cpp @@ -39,7 +39,7 @@ static void pc_hd_floppies(device_slot_interface &device) } -isa8_fdc_device::isa8_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_fdc_device::isa8_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_fdc(*this, "fdc") @@ -77,7 +77,7 @@ void isa8_fdc_device::eop_w(int state) } -isa8_upd765_fdc_device::isa8_upd765_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +isa8_upd765_fdc_device::isa8_upd765_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : isa8_fdc_device(mconfig, type, tag, owner, clock) , dor(0x00) { @@ -179,17 +179,17 @@ void isa8_upd765_fdc_device::check_drq() } -isa8_fdc_xt_device::isa8_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_fdc_xt_device(mconfig, ISA8_FDC_XT, tag, owner, clock) +isa8_fdc_xt_device::isa8_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_fdc_xt_device(mconfig, ISA8_FDC_XT, tag, owner, clock) { } -isa8_fdc_xt_device::isa8_fdc_xt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : isa8_upd765_fdc_device(mconfig, type, tag, owner, clock) +isa8_fdc_xt_device::isa8_fdc_xt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : isa8_upd765_fdc_device(mconfig, type, tag, owner, clock) { } void isa8_fdc_xt_device::device_add_mconfig(machine_config &config) { - upd765a_device &upd765a(UPD765A(config, m_fdc, 8'000'000, false, false)); + upd765a_device &upd765a(UPD765A(config, m_fdc, XTAL::u(8'000'000), false, false)); upd765a.intrq_wr_callback().set(FUNC(isa8_fdc_xt_device::fdc_irq_w)); upd765a.drq_wr_callback().set(FUNC(isa8_fdc_xt_device::fdc_drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", pc_dd_floppies, "525dd", isa8_fdc_device::floppy_formats).enable_sound(true); @@ -222,13 +222,13 @@ void isa8_fdc_xt_device::dor_fifo_w(uint8_t data) } -isa8_fdc_at_device::isa8_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_upd765_fdc_device(mconfig, ISA8_FDC_AT, tag, owner, clock) +isa8_fdc_at_device::isa8_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_upd765_fdc_device(mconfig, ISA8_FDC_AT, tag, owner, clock) { } void isa8_fdc_at_device::device_add_mconfig(machine_config &config) { - upd765a_device &upd765a(UPD765A(config, m_fdc, 8'000'000, false, false)); + upd765a_device &upd765a(UPD765A(config, m_fdc, XTAL::u(8'000'000), false, false)); upd765a.intrq_wr_callback().set(FUNC(isa8_fdc_at_device::fdc_irq_w)); upd765a.drq_wr_callback().set(FUNC(isa8_fdc_at_device::fdc_drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", pc_hd_floppies, "35hd", isa8_fdc_device::floppy_formats).enable_sound(true); @@ -252,13 +252,13 @@ void isa8_fdc_at_device::device_start() isa8_upd765_fdc_device::device_start(); } -isa8_fdc_smc_device::isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_fdc_device(mconfig, ISA8_FDC_SMC, tag, owner, clock) +isa8_fdc_smc_device::isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_fdc_device(mconfig, ISA8_FDC_SMC, tag, owner, clock) { } void isa8_fdc_smc_device::device_add_mconfig(machine_config &config) { - smc37c78_device &smc(SMC37C78(config, m_fdc, 24'000'000)); + smc37c78_device &smc(SMC37C78(config, m_fdc, XTAL::u(24'000'000))); smc.intrq_wr_callback().set(FUNC(isa8_fdc_device::irq_w)); smc.drq_wr_callback().set(FUNC(isa8_fdc_device::drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", pc_hd_floppies, "35hd", isa8_fdc_device::floppy_formats).enable_sound(true); @@ -272,13 +272,13 @@ void isa8_fdc_smc_device::device_start() m_isa->set_dma_channel(2, this, true); } -isa8_fdc_ps2_device::isa8_fdc_ps2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_fdc_device(mconfig, ISA8_FDC_PS2, tag, owner, clock) +isa8_fdc_ps2_device::isa8_fdc_ps2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_fdc_device(mconfig, ISA8_FDC_PS2, tag, owner, clock) { } void isa8_fdc_ps2_device::device_add_mconfig(machine_config &config) { - n82077aa_device &n82077aa(N82077AA(config, m_fdc, 24'000'000)); + n82077aa_device &n82077aa(N82077AA(config, m_fdc, XTAL::u(24'000'000))); n82077aa.set_mode(n82077aa_device::mode_t::PS2); n82077aa.intrq_wr_callback().set(FUNC(isa8_fdc_device::irq_w)); n82077aa.drq_wr_callback().set(FUNC(isa8_fdc_device::drq_w)); @@ -293,13 +293,13 @@ void isa8_fdc_ps2_device::device_start() m_isa->set_dma_channel(2, this, true); } -isa8_fdc_superio_device::isa8_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : isa8_fdc_device(mconfig, ISA8_FDC_SUPERIO, tag, owner, clock) +isa8_fdc_superio_device::isa8_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_fdc_device(mconfig, ISA8_FDC_SUPERIO, tag, owner, clock) { } void isa8_fdc_superio_device::device_add_mconfig(machine_config &config) { - pc_fdc_superio_device &superio(PC_FDC_SUPERIO(config, m_fdc, 24'000'000)); + pc_fdc_superio_device &superio(PC_FDC_SUPERIO(config, m_fdc, XTAL::u(24'000'000))); superio.intrq_wr_callback().set(FUNC(isa8_fdc_device::irq_w)); superio.drq_wr_callback().set(FUNC(isa8_fdc_device::drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", pc_hd_floppies, "35hd", isa8_fdc_device::floppy_formats).enable_sound(true); @@ -313,7 +313,7 @@ void isa8_fdc_superio_device::device_start() m_isa->set_dma_channel(2, this, true); } -isa8_ec1841_0003_device::isa8_ec1841_0003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa8_ec1841_0003_device::isa8_ec1841_0003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_fdc_xt_device(mconfig, ISA8_EC1841_0003, tag, owner, clock) , m_bus_mouse(*this, "bus_mouse") { @@ -334,7 +334,7 @@ void isa8_ec1841_0003_device::device_add_mconfig(machine_config &config) { isa8_fdc_xt_device::device_add_mconfig(config); - BUS_MOUSE(config, "bus_mouse", 0).extint_callback().set(FUNC(isa8_ec1841_0003_device::aux_irq_w)); + BUS_MOUSE(config, "bus_mouse").extint_callback().set(FUNC(isa8_ec1841_0003_device::aux_irq_w)); } diff --git a/src/devices/bus/isa/fdc.h b/src/devices/bus/isa/fdc.h index 00431ef3e5c..e287b808191 100644 --- a/src/devices/bus/isa/fdc.h +++ b/src/devices/bus/isa/fdc.h @@ -32,7 +32,7 @@ public: protected: // construction/destruction - isa8_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t dack_r(int line) override; virtual void dack_w(int line, uint8_t data) override; @@ -46,7 +46,7 @@ class isa8_upd765_fdc_device : public isa8_fdc_device { protected: // construction/destruction - isa8_upd765_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_upd765_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -72,10 +72,10 @@ private: class isa8_fdc_xt_device : public isa8_upd765_fdc_device { public: - isa8_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - isa8_fdc_xt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_fdc_xt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -87,7 +87,7 @@ protected: class isa8_fdc_at_device : public isa8_upd765_fdc_device { public: - isa8_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -99,7 +99,7 @@ protected: class isa8_fdc_smc_device : public isa8_fdc_device { public: - isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -109,7 +109,7 @@ protected: class isa8_fdc_ps2_device : public isa8_fdc_device { public: - isa8_fdc_ps2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_fdc_ps2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -119,7 +119,7 @@ protected: class isa8_fdc_superio_device : public isa8_fdc_device { public: - isa8_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -129,7 +129,7 @@ protected: class isa8_ec1841_0003_device : public isa8_fdc_xt_device { public: - isa8_ec1841_0003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_ec1841_0003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/isa/finalchs.cpp b/src/devices/bus/isa/finalchs.cpp index 2ee3b169371..e643cdcc36b 100644 --- a/src/devices/bus/isa/finalchs.cpp +++ b/src/devices/bus/isa/finalchs.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(ISA8_FINALCHS, isa8_finalchs_device, "isa_finalchs", "The Fin // constructor //------------------------------------------------- -isa8_finalchs_device::isa8_finalchs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_finalchs_device::isa8_finalchs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_FINALCHS, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_maincpu(*this, "maincpu"), diff --git a/src/devices/bus/isa/finalchs.h b/src/devices/bus/isa/finalchs.h index 2b04f69ec6b..24a869c48c8 100644 --- a/src/devices/bus/isa/finalchs.h +++ b/src/devices/bus/isa/finalchs.h @@ -22,7 +22,7 @@ class isa8_finalchs_device : { public: // construction/destruction - isa8_finalchs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_finalchs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/gblaster.cpp b/src/devices/bus/isa/gblaster.cpp index 1cbd9458c04..3baa98d5518 100644 --- a/src/devices/bus/isa/gblaster.cpp +++ b/src/devices/bus/isa/gblaster.cpp @@ -88,7 +88,7 @@ void isa8_gblaster_device::device_add_mconfig(machine_config &config) // isa8_gblaster_device - constructor //------------------------------------------------- -isa8_gblaster_device::isa8_gblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_gblaster_device::isa8_gblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_GAME_BLASTER, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_saa1099_1(*this, "saa1099.1"), diff --git a/src/devices/bus/isa/gblaster.h b/src/devices/bus/isa/gblaster.h index 77cec10eded..2743e66732a 100644 --- a/src/devices/bus/isa/gblaster.h +++ b/src/devices/bus/isa/gblaster.h @@ -20,7 +20,7 @@ class isa8_gblaster_device : { public: // construction/destruction - isa8_gblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_gblaster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t saa1099_16_r(offs_t offset); void saa1099_1_16_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/gus.cpp b/src/devices/bus/isa/gus.cpp index 7884ac37c8d..9ce6ab154cf 100644 --- a/src/devices/bus/isa/gus.cpp +++ b/src/devices/bus/isa/gus.cpp @@ -351,7 +351,7 @@ void gf1_device::sound_stream_update(sound_stream &stream, std::vector m_hdc; protected: - isa8_hdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_hdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -174,7 +174,7 @@ public: class isa8_hdc_ec1841_device : public isa8_hdc_device { public: - isa8_hdc_ec1841_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_hdc_ec1841_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/isa/ibm_mfc.cpp b/src/devices/bus/isa/ibm_mfc.cpp index a6dbfc81efa..40b5b2b9546 100644 --- a/src/devices/bus/isa/ibm_mfc.cpp +++ b/src/devices/bus/isa/ibm_mfc.cpp @@ -390,7 +390,7 @@ void isa8_ibm_mfc_device::device_add_mconfig(machine_config &config) m_d71055c_1->in_pb_callback().set(FUNC(isa8_ibm_mfc_device::ppi1_i_b)); m_d71055c_1->out_pc_callback().set(FUNC(isa8_ibm_mfc_device::ppi1_o_c)); - I8251(config, m_d71051, 0); + I8251(config, m_d71051); clock_device &usart_clock(CLOCK(config, "usart_clock", XTAL(4'000'000) / 8)); // 500KHz usart_clock.signal_handler().set(FUNC(isa8_ibm_mfc_device::write_usart_clock)); @@ -441,7 +441,7 @@ const tiny_rom_entry *isa8_ibm_mfc_device::device_rom_region() const // isa8_ibm_mfc_device - constructor //------------------------------------------------- -isa8_ibm_mfc_device::isa8_ibm_mfc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_ibm_mfc_device::isa8_ibm_mfc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_IBM_MFC, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_tcr(0), m_pc_ppi_c(0), m_z80_ppi_c(0), m_pc_irq_state(0), m_z80_irq_state(0), diff --git a/src/devices/bus/isa/ibm_mfc.h b/src/devices/bus/isa/ibm_mfc.h index c6efe79d0da..8cc10f9231c 100644 --- a/src/devices/bus/isa/ibm_mfc.h +++ b/src/devices/bus/isa/ibm_mfc.h @@ -29,7 +29,7 @@ class isa8_ibm_mfc_device : public device_t, { public: // Construction/destruction - isa8_ibm_mfc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_ibm_mfc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // Device-level overrides diff --git a/src/devices/bus/isa/ide.cpp b/src/devices/bus/isa/ide.cpp index 656995add4e..16c7e2a114f 100644 --- a/src/devices/bus/isa/ide.cpp +++ b/src/devices/bus/isa/ide.cpp @@ -100,7 +100,7 @@ ioport_constructor isa16_ide_device::device_input_ports() const // isa16_ide_device - constructor //------------------------------------------------- -isa16_ide_device::isa16_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa16_ide_device::isa16_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_IDE, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_is_primary(true) diff --git a/src/devices/bus/isa/ide.h b/src/devices/bus/isa/ide.h index 5cdccca6d90..f19afad7c96 100644 --- a/src/devices/bus/isa/ide.h +++ b/src/devices/bus/isa/ide.h @@ -19,7 +19,7 @@ class isa16_ide_device : public device_t, { public: // construction/destruction - isa16_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void cdrom_headphones(device_t *device); diff --git a/src/devices/bus/isa/isa.cpp b/src/devices/bus/isa/isa.cpp index 11aca68d0e7..3746ddb1349 100644 --- a/src/devices/bus/isa/isa.cpp +++ b/src/devices/bus/isa/isa.cpp @@ -23,12 +23,12 @@ DEFINE_DEVICE_TYPE(ISA8_SLOT, isa8_slot_device, "isa8_slot", "8-bit ISA slot") //------------------------------------------------- // isa8_slot_device - constructor //------------------------------------------------- -isa8_slot_device::isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_slot_device::isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_slot_device(mconfig, ISA8_SLOT, tag, owner, clock) { } -isa8_slot_device::isa8_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_slot_device::isa8_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_slot_interface(mconfig, *this), m_isa_bus(*this, finder_base::DUMMY_TAG) @@ -67,7 +67,7 @@ DEFINE_DEVICE_TYPE(ISA16_SLOT, isa16_slot_device, "isa16_slot", "16-bit ISA slot //------------------------------------------------- // isa16_slot_device - constructor //------------------------------------------------- -isa16_slot_device::isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_slot_device::isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_slot_device(mconfig, ISA16_SLOT, tag, owner, clock) { } @@ -99,12 +99,12 @@ DEFINE_DEVICE_TYPE(ISA8, isa8_device, "isa8", "8-bit ISA bus") // isa8_device - constructor //------------------------------------------------- -isa8_device::isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_device::isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_device(mconfig, ISA8, tag, owner, clock) { } -isa8_device::isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_device::isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), m_mem_config("mem8", ENDIANNESS_LITTLE, 8, 24, 0, address_map_constructor()), @@ -507,7 +507,7 @@ DEFINE_DEVICE_TYPE(ISA16, isa16_device, "isa16", "16-bit ISA bus") // isa16_device - constructor //------------------------------------------------- -isa16_device::isa16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_device::isa16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_device(mconfig, ISA16, tag, owner, clock), m_out_irq10_cb(*this), m_out_irq11_cb(*this), diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h index 939f8d88a26..83276cf075a 100644 --- a/src/devices/bus/isa/isa.h +++ b/src/devices/bus/isa/isa.h @@ -81,8 +81,8 @@ class isa8_slot_device : public device_t, public device_slot_interface public: // construction/destruction template - isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&isa_tag, U &&opts, const char *dflt, bool fixed) - : isa8_slot_device(mconfig, tag, owner, clock) + isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&isa_tag, U &&opts, const char *dflt, bool fixed) + : isa8_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -90,10 +90,10 @@ public: set_fixed(fixed); m_isa_bus.set_tag(std::forward(isa_tag)); } - isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: - isa8_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -120,7 +120,7 @@ public: }; // construction/destruction - isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_memspace(T &&tag, int spacenum) { m_memspace.set_tag(std::forward(tag), spacenum); } @@ -206,7 +206,7 @@ public: const address_space_config m_mem_config, m_io_config, m_mem16_config, m_io16_config; protected: - isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template void install_space(int spacenum, offs_t start, offs_t end, R rhandler, W whandler); @@ -286,8 +286,8 @@ class isa16_slot_device : public isa8_slot_device public: // construction/destruction template - isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&isa_tag, U &&opts, const char *dflt, bool fixed) - : isa16_slot_device(mconfig, tag, owner, clock) + isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&isa_tag, U &&opts, const char *dflt, bool fixed) + : isa16_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -295,7 +295,7 @@ public: set_fixed(fixed); m_isa_bus.set_tag(std::forward(isa_tag)); } - isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -311,7 +311,7 @@ class isa16_device : public isa8_device { public: // construction/destruction - isa16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq10_callback() { return m_out_irq10_cb.bind(); } auto irq11_callback() { return m_out_irq11_cb.bind(); } diff --git a/src/devices/bus/isa/lbaenhancer.cpp b/src/devices/bus/isa/lbaenhancer.cpp index 242f1f47afe..b4b02884bde 100644 --- a/src/devices/bus/isa/lbaenhancer.cpp +++ b/src/devices/bus/isa/lbaenhancer.cpp @@ -86,7 +86,7 @@ const tiny_rom_entry *lba_enhancer_device::device_rom_region() const //------------------------------------------------- void lba_enhancer_device::device_add_mconfig(machine_config &config) { -// lba_enhancer(config, "lba_enhancer", 0); +// lba_enhancer(config, "lba_enhancer"); } @@ -143,7 +143,7 @@ void lba_enhancer_device::device_reset() // lba_enhancer_device - constructor //------------------------------------------------- -lba_enhancer_device::lba_enhancer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lba_enhancer_device::lba_enhancer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_LBA_ENHANCER, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) { diff --git a/src/devices/bus/isa/lbaenhancer.h b/src/devices/bus/isa/lbaenhancer.h index 71e36c02665..88ab460febe 100644 --- a/src/devices/bus/isa/lbaenhancer.h +++ b/src/devices/bus/isa/lbaenhancer.h @@ -22,7 +22,7 @@ class lba_enhancer_device : public device_t, { public: // construction/destruction - lba_enhancer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lba_enhancer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/lpt.cpp b/src/devices/bus/isa/lpt.cpp index 268ff2c9caf..e7749180acb 100644 --- a/src/devices/bus/isa/lpt.cpp +++ b/src/devices/bus/isa/lpt.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(ISA8_LPT, isa8_lpt_device, "isa_lpt", "Printer Adapter") -isa8_lpt_device::isa8_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_lpt_device::isa8_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_LPT, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_is_primary(false) diff --git a/src/devices/bus/isa/lpt.h b/src/devices/bus/isa/lpt.h index 1aa2731bfaf..022360650e1 100644 --- a/src/devices/bus/isa/lpt.h +++ b/src/devices/bus/isa/lpt.h @@ -25,7 +25,7 @@ class isa8_lpt_device : public device_t, { public: // construction/destruction - isa8_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bool is_primary() { return m_is_primary; } diff --git a/src/devices/bus/isa/lrk330.cpp b/src/devices/bus/isa/lrk330.cpp index 18cd1bfe29e..d1dd97e6011 100644 --- a/src/devices/bus/isa/lrk330.cpp +++ b/src/devices/bus/isa/lrk330.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(LRK331, lrk331_device, "lrk331", "Lark Associates LRK-331 ESDI Controller") -lrk331_device::lrk331_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +lrk331_device::lrk331_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LRK331, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_mcu(*this, "mcu") diff --git a/src/devices/bus/isa/lrk330.h b/src/devices/bus/isa/lrk330.h index b75a50fa7a3..ca2db1dfd59 100644 --- a/src/devices/bus/isa/lrk330.h +++ b/src/devices/bus/isa/lrk330.h @@ -12,7 +12,7 @@ class lrk331_device : public device_t, public device_isa16_card_interface { public: - lrk331_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + lrk331_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/mach32.cpp b/src/devices/bus/isa/mach32.cpp index 064947d5c7c..daa549754a7 100644 --- a/src/devices/bus/isa/mach32.cpp +++ b/src/devices/bus/isa/mach32.cpp @@ -25,31 +25,31 @@ DEFINE_DEVICE_TYPE(ATIMACH64_8514A, mach64_8514a_device, "mach64_8514a", "ATi ma */ // 8514/A device -mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mach32_8514a_device(mconfig, ATIMACH32_8514A, tag, owner, clock) { } -mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mach8_device(mconfig, type, tag, owner, clock), m_chip_ID(0), m_membounds(0) { } // SVGA device -mach32_device::mach32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mach32_device::mach32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mach32_device(mconfig, ATIMACH32, tag, owner, clock) { } -mach32_device::mach32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mach32_device::mach32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ati_vga_device(mconfig, type, tag, owner, clock), m_8514a(*this,"8514a") { } void mach32_device::device_add_mconfig(machine_config &config) { - ATIMACH32_8514A(config, "8514a", 0).set_vga(DEVICE_SELF); + ATIMACH32_8514A(config, "8514a").set_vga(DEVICE_SELF); EEPROM_93C56_16BIT(config, "ati_eeprom"); } @@ -304,31 +304,31 @@ void mach32_device::mach32_cursor_offset_w(offs_t offset, uint16_t data, uint16_ */ // 8514/A device -mach64_8514a_device::mach64_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mach64_8514a_device::mach64_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mach64_8514a_device(mconfig, ATIMACH64_8514A, tag, owner, clock) { } -mach64_8514a_device::mach64_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mach64_8514a_device::mach64_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mach32_8514a_device(mconfig, type, tag, owner, clock) { } // SVGA device -mach64_device::mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mach64_device::mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mach64_device(mconfig, ATIMACH64, tag, owner, clock) { } -mach64_device::mach64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mach64_device::mach64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mach32_device(mconfig, type, tag, owner, clock), m_8514a(*this, "8514a") { } void mach64_device::device_add_mconfig(machine_config &config) { - ATIMACH64_8514A(config, "8514a", 0).set_vga(DEVICE_SELF); + ATIMACH64_8514A(config, "8514a").set_vga(DEVICE_SELF); EEPROM_93C56_16BIT(config, "ati_eeprom"); } diff --git a/src/devices/bus/isa/mach32.h b/src/devices/bus/isa/mach32.h index 38b4f673530..70a705e8db5 100644 --- a/src/devices/bus/isa/mach32.h +++ b/src/devices/bus/isa/mach32.h @@ -21,7 +21,7 @@ class mach32_8514a_device : public mach8_device { public: // construction/destruction - mach32_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mach32_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t mach32_chipid_r() { return m_chip_ID; } uint16_t mach32_mem_boundary_r() { return m_membounds; } @@ -35,7 +35,7 @@ public: bool has_display_mode_changed() { if(display_mode_change) { display_mode_change = false; return true; } else return false; } protected: - mach32_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mach32_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -51,7 +51,7 @@ class mach32_device : public ati_vga_device { public: // construction/destruction - mach32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mach32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; required_device m_8514a; // provides accelerated 2D drawing, derived from the Mach8 device @@ -160,7 +160,7 @@ public: void mach32_cursor_offset_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); protected: - mach32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mach32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -194,10 +194,10 @@ class mach64_8514a_device : public mach32_8514a_device { public: // construction/destruction - mach64_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mach64_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mach64_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mach64_8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -208,13 +208,13 @@ class mach64_device : public mach32_device { public: // construction/destruction - mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mach64_config1_w(uint16_t data) { } // why does the mach64 BIOS write to these, they are read only on the mach32 and earlier void mach64_config2_w(uint16_t data) { } protected: - mach64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mach64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/mc1502_fdc.cpp b/src/devices/bus/isa/mc1502_fdc.cpp index ad1c1bd8b8c..217feee9317 100644 --- a/src/devices/bus/isa/mc1502_fdc.cpp +++ b/src/devices/bus/isa/mc1502_fdc.cpp @@ -190,7 +190,7 @@ void mc1502_fdc_device::mc1502_fdc_w(offs_t offset, uint8_t data) // mc1502_fdc_device - constructor //------------------------------------------------- -mc1502_fdc_device::mc1502_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc1502_fdc_device::mc1502_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC1502_FDC, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_fdc(*this, "fdc") diff --git a/src/devices/bus/isa/mc1502_fdc.h b/src/devices/bus/isa/mc1502_fdc.h index 45fde02945d..d6de540df6c 100644 --- a/src/devices/bus/isa/mc1502_fdc.h +++ b/src/devices/bus/isa/mc1502_fdc.h @@ -25,7 +25,7 @@ class mc1502_fdc_device : public device_t, { public: // construction/destruction - mc1502_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc1502_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/isa/mc1502_rom.cpp b/src/devices/bus/isa/mc1502_rom.cpp index f3a78cb93a6..655c6a737d7 100644 --- a/src/devices/bus/isa/mc1502_rom.cpp +++ b/src/devices/bus/isa/mc1502_rom.cpp @@ -45,7 +45,7 @@ const tiny_rom_entry *mc1502_rom_device::device_rom_region() const // mc1502_rom_device - constructor //------------------------------------------------- -mc1502_rom_device::mc1502_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc1502_rom_device::mc1502_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC1502_ROM, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) { diff --git a/src/devices/bus/isa/mc1502_rom.h b/src/devices/bus/isa/mc1502_rom.h index bbb152df72f..3a9e8957f3f 100644 --- a/src/devices/bus/isa/mc1502_rom.h +++ b/src/devices/bus/isa/mc1502_rom.h @@ -22,7 +22,7 @@ class mc1502_rom_device : public device_t, { public: // construction/destruction - mc1502_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc1502_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/isa/mcd.cpp b/src/devices/bus/isa/mcd.cpp index 9bb8b82a5da..b40d824554e 100644 --- a/src/devices/bus/isa/mcd.cpp +++ b/src/devices/bus/isa/mcd.cpp @@ -35,7 +35,7 @@ void mcd_isa_device::device_add_mconfig(machine_config &config) // mcd_isa_device - constructor //------------------------------------------------- -mcd_isa_device::mcd_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mcd_isa_device::mcd_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdrom_image_device(mconfig, ISA16_MCD, tag, owner, clock), device_isa16_card_interface( mconfig, *this ), m_cdda(*this, "cdda") diff --git a/src/devices/bus/isa/mcd.h b/src/devices/bus/isa/mcd.h index 4c2b7a0e636..a8dfcf64dfd 100644 --- a/src/devices/bus/isa/mcd.h +++ b/src/devices/bus/isa/mcd.h @@ -20,7 +20,7 @@ class mcd_isa_device : public cdrom_image_device, { public: // construction/destruction - mcd_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcd_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint16_t dack16_r(int line) override; diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp index e3ff8e90f99..542ded743bb 100644 --- a/src/devices/bus/isa/mda.cpp +++ b/src/devices/bus/isa/mda.cpp @@ -158,12 +158,12 @@ const tiny_rom_entry *isa8_mda_device::device_rom_region() const // isa8_mda_device - constructor //------------------------------------------------- -isa8_mda_device::isa8_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_mda_device::isa8_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_mda_device(mconfig, ISA8_MDA, tag, owner, clock) { } -isa8_mda_device::isa8_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_mda_device::isa8_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_crtc(*this, MC6845_NAME), m_lpt(*this, "lpt"), m_framecnt(0), m_mode_control(0), m_update_row_type(-1), m_chr_gen(nullptr), m_vsync(0), m_hsync(0), m_pixel(0), @@ -584,7 +584,7 @@ const tiny_rom_entry *isa8_hercules_device::device_rom_region() const // isa8_hercules_device - constructor //------------------------------------------------- -isa8_hercules_device::isa8_hercules_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_hercules_device::isa8_hercules_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_mda_device(mconfig, ISA8_HERCULES, tag, owner, clock), m_configuration_switch(0) { } @@ -783,7 +783,7 @@ void isa8_ec1840_0002_device::device_add_mconfig(machine_config &config) // isa8_ec1840_0002_device - constructor //------------------------------------------------- -isa8_ec1840_0002_device::isa8_ec1840_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_ec1840_0002_device::isa8_ec1840_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_mda_device(mconfig, ISA8_EC1840_0002, tag, owner, clock), m_soft_chr_gen(nullptr) { } diff --git a/src/devices/bus/isa/mda.h b/src/devices/bus/isa/mda.h index e16c80e8ce1..4be9f20ad98 100644 --- a/src/devices/bus/isa/mda.h +++ b/src/devices/bus/isa/mda.h @@ -24,7 +24,7 @@ public: friend class isa8_hercules_device; // construction/destruction - isa8_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_mda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t io_read(offs_t offset); virtual void io_write(offs_t offset, uint8_t data); @@ -37,7 +37,7 @@ public: virtual MC6845_UPDATE_ROW( crtc_update_row ); protected: - isa8_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_mda_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -81,7 +81,7 @@ class isa8_hercules_device : { public: // construction/destruction - isa8_hercules_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_hercules_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t io_read(offs_t offset) override; virtual void io_write(offs_t offset, uint8_t data) override; @@ -115,7 +115,7 @@ class isa8_ec1840_0002_device : { public: // construction/destruction - isa8_ec1840_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_ec1840_0002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/mpu401.cpp b/src/devices/bus/isa/mpu401.cpp index 7f6a28b87b4..6ca06038fc1 100644 --- a/src/devices/bus/isa/mpu401.cpp +++ b/src/devices/bus/isa/mpu401.cpp @@ -62,7 +62,7 @@ void isa8_mpu401_device::device_add_mconfig(machine_config &config) // isa8_adlib_device - constructor //------------------------------------------------- -isa8_mpu401_device::isa8_mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa8_mpu401_device::isa8_mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_MPU401, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_mpu401(*this, MPU_CORE_TAG) diff --git a/src/devices/bus/isa/mpu401.h b/src/devices/bus/isa/mpu401.h index 89974be7b84..7a811fe3e6d 100644 --- a/src/devices/bus/isa/mpu401.h +++ b/src/devices/bus/isa/mpu401.h @@ -20,7 +20,7 @@ class isa8_mpu401_device : { public: // construction/destruction - isa8_mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/mufdc.cpp b/src/devices/bus/isa/mufdc.cpp index 2a078f812f9..39a29177bdd 100644 --- a/src/devices/bus/isa/mufdc.cpp +++ b/src/devices/bus/isa/mufdc.cpp @@ -128,7 +128,7 @@ const tiny_rom_entry *fdcmag_device::device_rom_region() const // mufdc_device - constructor //------------------------------------------------- -mufdc_device::mufdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mufdc_device::mufdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface( mconfig, *this), m_fdc(*this, "fdc"), @@ -136,12 +136,12 @@ mufdc_device::mufdc_device(const machine_config &mconfig, device_type type, cons { } -fdc344_device::fdc344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +fdc344_device::fdc344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mufdc_device(mconfig, ISA8_FDC344, tag, owner, clock) { } -fdcmag_device::fdcmag_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +fdcmag_device::fdcmag_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mufdc_device(mconfig, ISA8_FDCMAG, tag, owner, clock) { } diff --git a/src/devices/bus/isa/mufdc.h b/src/devices/bus/isa/mufdc.h index b746d135003..5c1457ff679 100644 --- a/src/devices/bus/isa/mufdc.h +++ b/src/devices/bus/isa/mufdc.h @@ -34,7 +34,7 @@ class mufdc_device : public device_t, public device_isa8_card_interface { protected: // construction/destruction - mufdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mufdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -65,7 +65,7 @@ class fdc344_device : public mufdc_device { public: // construction/destruction - fdc344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fdc344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -74,7 +74,7 @@ class fdcmag_device : public mufdc_device { public: // construction/destruction - fdcmag_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fdcmag_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/bus/isa/myb3k_com.cpp b/src/devices/bus/isa/myb3k_com.cpp index b500d95b993..b7347901357 100644 --- a/src/devices/bus/isa/myb3k_com.cpp +++ b/src/devices/bus/isa/myb3k_com.cpp @@ -49,7 +49,7 @@ void isa8_myb3k_com_device::device_add_mconfig(machine_config &config) // TODO: configure RxC and TxC from RS232 connector when these are defined is rs232.h /* Timer chip */ - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(XTAL(15'974'400) / 8); /* TxC */ pit.out_handler<0>().set(FUNC(isa8_myb3k_com_device::pit_txc)); pit.set_clk<1>(XTAL(15'974'400) / 8); /* RxC */ @@ -66,12 +66,12 @@ void isa8_myb3k_com_device::device_add_mconfig(machine_config &config) //------------------------------------------------- // isa8_myb3k_com_device - constructor //------------------------------------------------- -isa8_myb3k_com_device::isa8_myb3k_com_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_myb3k_com_device::isa8_myb3k_com_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_myb3k_com_device(mconfig, ISA8_MYB3K_COM, tag, owner, clock) { } -isa8_myb3k_com_device::isa8_myb3k_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_myb3k_com_device::isa8_myb3k_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_iobase(*this, "DPSW1") diff --git a/src/devices/bus/isa/myb3k_com.h b/src/devices/bus/isa/myb3k_com.h index bdd591b5291..f3267f716be 100644 --- a/src/devices/bus/isa/myb3k_com.h +++ b/src/devices/bus/isa/myb3k_com.h @@ -37,7 +37,7 @@ class isa8_myb3k_com_device : { public: // construction/destruction - isa8_myb3k_com_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_com_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(pit_txc); DECLARE_WRITE_LINE_MEMBER(pit_rxc); @@ -51,7 +51,7 @@ public: uint8_t dce_status(); protected: - isa8_myb3k_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_com_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/myb3k_fdc.cpp b/src/devices/bus/isa/myb3k_fdc.cpp index 1ca69a19be5..8687464c811 100644 --- a/src/devices/bus/isa/myb3k_fdc.cpp +++ b/src/devices/bus/isa/myb3k_fdc.cpp @@ -116,7 +116,7 @@ void isa8_myb3k_fdc4712_device::device_add_mconfig(machine_config &config) //************************************************************************** // LIVE DEVICES //************************************************************************** -isa8_myb3k_fdc471x_device_base::isa8_myb3k_fdc471x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_myb3k_fdc471x_device_base::isa8_myb3k_fdc471x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_fdc(*this, "fdc"), @@ -124,7 +124,7 @@ isa8_myb3k_fdc471x_device_base::isa8_myb3k_fdc471x_device_base(const machine_con { } -isa8_myb3k_fdc4710_device::isa8_myb3k_fdc4710_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_myb3k_fdc4710_device::isa8_myb3k_fdc4710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_myb3k_fdc471x_device_base(mconfig, ISA8_MYB3K_FDC4710, tag, owner, clock) { has_motor_control = true; @@ -132,7 +132,7 @@ isa8_myb3k_fdc4710_device::isa8_myb3k_fdc4710_device(const machine_config &mconf dma_channel = 2; } -isa8_myb3k_fdc4711_device::isa8_myb3k_fdc4711_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_myb3k_fdc4711_device::isa8_myb3k_fdc4711_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_myb3k_fdc471x_device_base(mconfig, ISA8_MYB3K_FDC4711, tag, owner, clock) { has_motor_control = true; @@ -140,7 +140,7 @@ isa8_myb3k_fdc4711_device::isa8_myb3k_fdc4711_device(const machine_config &mconf dma_channel = 2; } -isa8_myb3k_fdc4712_device::isa8_myb3k_fdc4712_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_myb3k_fdc4712_device::isa8_myb3k_fdc4712_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_myb3k_fdc471x_device_base(mconfig, ISA8_MYB3K_FDC4712, tag, owner, clock), selected_drive(0) { diff --git a/src/devices/bus/isa/myb3k_fdc.h b/src/devices/bus/isa/myb3k_fdc.h index b2a645423d6..f1223096c38 100644 --- a/src/devices/bus/isa/myb3k_fdc.h +++ b/src/devices/bus/isa/myb3k_fdc.h @@ -20,7 +20,7 @@ class isa8_myb3k_fdc471x_device_base : public device_isa8_card_interface { protected: - isa8_myb3k_fdc471x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_fdc471x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -67,11 +67,11 @@ class isa8_myb3k_fdc4710_device : public isa8_myb3k_fdc471x_device_base { public: // construction/destruction - isa8_myb3k_fdc4710_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_fdc4710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - isa8_myb3k_fdc4710_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_fdc4710_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -81,11 +81,11 @@ class isa8_myb3k_fdc4711_device : public isa8_myb3k_fdc471x_device_base { public: // construction/destruction - isa8_myb3k_fdc4711_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_fdc4711_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - isa8_myb3k_fdc4711_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_fdc4711_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -95,11 +95,11 @@ class isa8_myb3k_fdc4712_device : public isa8_myb3k_fdc471x_device_base { public: // construction/destruction - isa8_myb3k_fdc4712_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_fdc4712_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - isa8_myb3k_fdc4712_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_myb3k_fdc4712_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/isa/ne1000.cpp b/src/devices/bus/isa/ne1000.cpp index d2234098c34..4f5e5a0a1b6 100644 --- a/src/devices/bus/isa/ne1000.cpp +++ b/src/devices/bus/isa/ne1000.cpp @@ -8,13 +8,13 @@ DEFINE_DEVICE_TYPE(NE1000, ne1000_device, "ne1000", "NE1000 Network Adapter") void ne1000_device::device_add_mconfig(machine_config &config) { - DP8390D(config, m_dp8390, 0); + DP8390D(config, m_dp8390); m_dp8390->irq_callback().set(FUNC(ne1000_device::ne1000_irq_w)); m_dp8390->mem_read_callback().set(FUNC(ne1000_device::ne1000_mem_read)); m_dp8390->mem_write_callback().set(FUNC(ne1000_device::ne1000_mem_write)); } -ne1000_device::ne1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ne1000_device::ne1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NE1000, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_dp8390(*this, "dp8390d"), diff --git a/src/devices/bus/isa/ne1000.h b/src/devices/bus/isa/ne1000.h index fa6011b45e1..af1e4fbfdbd 100644 --- a/src/devices/bus/isa/ne1000.h +++ b/src/devices/bus/isa/ne1000.h @@ -14,7 +14,7 @@ class ne1000_device: public device_t, public device_isa8_card_interface { public: - ne1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ne1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t ne1000_port_r(offs_t offset); void ne1000_port_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/ne2000.cpp b/src/devices/bus/isa/ne2000.cpp index 08c73b96dac..e168dc2f9af 100644 --- a/src/devices/bus/isa/ne2000.cpp +++ b/src/devices/bus/isa/ne2000.cpp @@ -8,13 +8,13 @@ DEFINE_DEVICE_TYPE(NE2000, ne2000_device, "ne2000", "NE2000 Network Adapter") void ne2000_device::device_add_mconfig(machine_config &config) { - DP8390D(config, m_dp8390, 0); + DP8390D(config, m_dp8390); m_dp8390->irq_callback().set(FUNC(ne2000_device::ne2000_irq_w)); m_dp8390->mem_read_callback().set(FUNC(ne2000_device::ne2000_mem_read)); m_dp8390->mem_write_callback().set(FUNC(ne2000_device::ne2000_mem_write)); } -ne2000_device::ne2000_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +ne2000_device::ne2000_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, NE2000, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_dp8390(*this, "dp8390d"), diff --git a/src/devices/bus/isa/ne2000.h b/src/devices/bus/isa/ne2000.h index 328443fd9b2..e812a9881ff 100644 --- a/src/devices/bus/isa/ne2000.h +++ b/src/devices/bus/isa/ne2000.h @@ -12,7 +12,7 @@ class ne2000_device: public device_t, public device_isa16_card_interface { public: - ne2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ne2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t ne2000_port_r(offs_t offset, uint16_t mem_mask = ~0); void ne2000_port_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/isa/np600.cpp b/src/devices/bus/isa/np600.cpp index 5fca3ff1910..3b7da41dc69 100644 --- a/src/devices/bus/isa/np600.cpp +++ b/src/devices/bus/isa/np600.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(NP600A3, np600a3_device, "np600a3", "InterLan NP600A-3 Intelligent Protocol Processor") -np600a3_device::np600a3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +np600a3_device::np600a3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NP600A3, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_npcpu(*this, "npcpu") diff --git a/src/devices/bus/isa/np600.h b/src/devices/bus/isa/np600.h index 51bdf8813c1..57ea34a0d31 100644 --- a/src/devices/bus/isa/np600.h +++ b/src/devices/bus/isa/np600.h @@ -17,7 +17,7 @@ class np600a3_device : public device_t, public device_isa16_card_interface { public: - np600a3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + np600a3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::LAN; } diff --git a/src/devices/bus/isa/num9rev.cpp b/src/devices/bus/isa/num9rev.cpp index c7756b8294b..a9652d60e53 100644 --- a/src/devices/bus/isa/num9rev.cpp +++ b/src/devices/bus/isa/num9rev.cpp @@ -76,7 +76,7 @@ void isa8_number_9_rev_device::device_add_mconfig(machine_config &config) // isa16_vga_device - constructor //------------------------------------------------- -isa8_number_9_rev_device::isa8_number_9_rev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_number_9_rev_device::isa8_number_9_rev_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_NUM_9_REV, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_upd7220(*this, "upd7220"), diff --git a/src/devices/bus/isa/num9rev.h b/src/devices/bus/isa/num9rev.h index 298af6d91f5..e0e12f6a1c7 100644 --- a/src/devices/bus/isa/num9rev.h +++ b/src/devices/bus/isa/num9rev.h @@ -22,7 +22,7 @@ class isa8_number_9_rev_device : { public: // construction/destruction - isa8_number_9_rev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_number_9_rev_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index 186e398c411..35a3a43c6ea 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -51,7 +51,7 @@ class omti_disk_image_device : public harddisk_image_base_device { public: // construction/destruction - omti_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + omti_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual bool support_command_line_image_creation() const noexcept override { return true; } @@ -239,8 +239,8 @@ INPUT_PORTS_END void omti8621_device::device_add_mconfig(machine_config &config) { - OMTI_DISK(config, OMTI_DISK0_TAG, 0); - OMTI_DISK(config, OMTI_DISK1_TAG, 0); + OMTI_DISK(config, OMTI_DISK0_TAG); + OMTI_DISK(config, OMTI_DISK1_TAG); UPD765A(config, m_fdc, 48_MHz_XTAL / 6, false, false); // clocked through FDC9239BT m_fdc->intrq_wr_callback().set(FUNC(omti8621_device::fdc_irq_w)); @@ -370,14 +370,14 @@ void omti8621_device::device_reset() DEFINE_DEVICE_TYPE(ISA16_OMTI8621, omti8621_pc_device, "omti8621isa", "OMTI 8621 ESDI/floppy controller (ISA)") -omti8621_pc_device::omti8621_pc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +omti8621_pc_device::omti8621_pc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : omti8621_device(mconfig, ISA16_OMTI8621, tag, owner, clock) { } DEFINE_DEVICE_TYPE(ISA16_OMTI8621_APOLLO, omti8621_apollo_device, "omti8621ap", "OMTI 8621 ESDI/floppy controller (Apollo)") -omti8621_apollo_device::omti8621_apollo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +omti8621_apollo_device::omti8621_apollo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : omti8621_device(mconfig, ISA16_OMTI8621_APOLLO, tag, owner, clock) { } @@ -1379,7 +1379,7 @@ uint8_t omti8621_device::fd_disk_chg_r() // device type definition DEFINE_DEVICE_TYPE(OMTI_DISK, omti_disk_image_device, "omti_disk_image", "OMTI 8621 ESDI disk") -omti_disk_image_device::omti_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +omti_disk_image_device::omti_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddisk_image_base_device(mconfig, OMTI_DISK, tag, owner, clock) , m_type(0), m_cylinders(0), m_heads(0), m_sectors(0), m_sectorbytes(0), m_sector_count(0), m_image(nullptr) { diff --git a/src/devices/bus/isa/omti8621.h b/src/devices/bus/isa/omti8621.h index 3e5cce1c59a..2d80d8fec01 100644 --- a/src/devices/bus/isa/omti8621.h +++ b/src/devices/bus/isa/omti8621.h @@ -148,7 +148,7 @@ private: class omti8621_pc_device : public omti8621_device { public: - omti8621_pc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + omti8621_pc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(ISA16_OMTI8621, omti8621_pc_device) @@ -158,7 +158,7 @@ DECLARE_DEVICE_TYPE(ISA16_OMTI8621, omti8621_pc_device) class omti8621_apollo_device : public omti8621_device { public: - omti8621_apollo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + omti8621_apollo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // get sector diskaddr of logical unit lun into data_buffer uint32_t get_sector(int32_t diskaddr, uint8_t *buffer, uint32_t length, uint8_t lun); diff --git a/src/devices/bus/isa/p1_fdc.cpp b/src/devices/bus/isa/p1_fdc.cpp index 390f98727b0..46fd1b1bac9 100644 --- a/src/devices/bus/isa/p1_fdc.cpp +++ b/src/devices/bus/isa/p1_fdc.cpp @@ -152,7 +152,7 @@ void p1_fdc_device::p1_fdc_w(offs_t offset, uint8_t data) // p1_fdc_device - constructor //------------------------------------------------- -p1_fdc_device::p1_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +p1_fdc_device::p1_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, P1_FDC, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_fdc(*this, "fdc") diff --git a/src/devices/bus/isa/p1_fdc.h b/src/devices/bus/isa/p1_fdc.h index ceeb278f5c7..7c5fbd9f831 100644 --- a/src/devices/bus/isa/p1_fdc.h +++ b/src/devices/bus/isa/p1_fdc.h @@ -25,7 +25,7 @@ class p1_fdc_device : public device_t, { public: // construction/destruction - p1_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + p1_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/isa/p1_hdc.cpp b/src/devices/bus/isa/p1_hdc.cpp index 9ee84ece875..fe397c371f0 100644 --- a/src/devices/bus/isa/p1_hdc.cpp +++ b/src/devices/bus/isa/p1_hdc.cpp @@ -55,15 +55,15 @@ ROM_END void p1_hdc_device::device_add_mconfig(machine_config &config) { - WD2010(config, m_hdc, 5'000'000); // XXX clock? + WD2010(config, m_hdc, XTAL::u(5'000'000)); // XXX clock? m_hdc->in_drdy_callback().set_constant(1); m_hdc->in_index_callback().set_constant(1); m_hdc->in_wf_callback().set_constant(1); m_hdc->in_tk000_callback().set_constant(1); m_hdc->in_sc_callback().set_constant(1); - HARDDISK(config, "hard0", 0); - HARDDISK(config, "hard1", 0); + HARDDISK(config, "hard0"); + HARDDISK(config, "hard1"); } @@ -111,7 +111,7 @@ void p1_hdc_device::p1_HDC_w(offs_t offset, uint8_t data) // p1_hdc_device - constructor //------------------------------------------------- -p1_hdc_device::p1_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +p1_hdc_device::p1_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, P1_HDC, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_hdc(*this, "d17") diff --git a/src/devices/bus/isa/p1_hdc.h b/src/devices/bus/isa/p1_hdc.h index 2947dba1e84..0109dec1e89 100644 --- a/src/devices/bus/isa/p1_hdc.h +++ b/src/devices/bus/isa/p1_hdc.h @@ -25,7 +25,7 @@ class p1_hdc_device : public device_t, { public: // construction/destruction - p1_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + p1_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/p1_rom.cpp b/src/devices/bus/isa/p1_rom.cpp index 76013aca719..864eaec5e3e 100644 --- a/src/devices/bus/isa/p1_rom.cpp +++ b/src/devices/bus/isa/p1_rom.cpp @@ -50,7 +50,7 @@ const tiny_rom_entry *p1_rom_device::device_rom_region() const // p1_rom_device - constructor //------------------------------------------------- -p1_rom_device::p1_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +p1_rom_device::p1_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, P1_ROM, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) { diff --git a/src/devices/bus/isa/p1_rom.h b/src/devices/bus/isa/p1_rom.h index d5fd89662d5..884a1681e37 100644 --- a/src/devices/bus/isa/p1_rom.h +++ b/src/devices/bus/isa/p1_rom.h @@ -22,7 +22,7 @@ class p1_rom_device : public device_t, { public: // construction/destruction - p1_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + p1_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/isa/p1_sound.cpp b/src/devices/bus/isa/p1_sound.cpp index f2e69debf95..c81c61b15d0 100644 --- a/src/devices/bus/isa/p1_sound.cpp +++ b/src/devices/bus/isa/p1_sound.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(P1_SOUND, p1_sound_device, "p1_sound", "Poisk-1 sound card (B void p1_sound_device::device_add_mconfig(machine_config &config) { - I8251(config, m_midi, 0); + I8251(config, m_midi); m_midi->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_midi->rxrdy_handler().set(":isa", FUNC(isa8_device::irq3_w)); @@ -35,7 +35,7 @@ void p1_sound_device::device_add_mconfig(machine_config &config) MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - PIT8253(config, m_d14, 0); + PIT8253(config, m_d14); m_d14->set_clk<0>(XTAL(12'500'000)/10); // sampler at 10 KHz m_d14->out_handler<0>().set(FUNC(p1_sound_device::sampler_sync)); @@ -44,7 +44,7 @@ void p1_sound_device::device_add_mconfig(machine_config &config) m_d14->set_clk<2>(XTAL(12'500'000)/10); m_d14->out_handler<2>().set(m_midi, FUNC(i8251_device::write_rxc)); - PIT8253(config, m_d16, 0); + PIT8253(config, m_d16); m_d16->set_clk<0>(XTAL(12'500'000)/10); // m_d16->out_handler<0>().set(FUNC(XXX)); m_d16->set_clk<1>(XTAL(12'500'000)/10); @@ -52,7 +52,7 @@ void p1_sound_device::device_add_mconfig(machine_config &config) m_d16->set_clk<2>(XTAL(12'500'000)/10); // m_d16->out_handler<2>().set(FUNC(XXX)); - PIT8253(config, m_d17, 0); + PIT8253(config, m_d17); m_d17->set_clk<0>(XTAL(12'500'000)/10); // m_d17->out_handler<0>().set(FUNC(XXX)); m_d17->set_clk<1>(XTAL(12'500'000)/10); @@ -62,7 +62,7 @@ void p1_sound_device::device_add_mconfig(machine_config &config) SPEAKER(config, "speaker").front_center(); FILTER_RC(config, m_filter).add_route(ALL_OUTPUTS, "speaker", 1.0); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "filter", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "filter", 0.5); // unknown DAC } @@ -74,7 +74,7 @@ void p1_sound_device::device_add_mconfig(machine_config &config) // p1_sound_device - constructor //------------------------------------------------- -p1_sound_device::p1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +p1_sound_device::p1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, P1_SOUND, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_dac(*this, "dac") diff --git a/src/devices/bus/isa/p1_sound.h b/src/devices/bus/isa/p1_sound.h index 3b7f1c40af9..e85c524ff1c 100644 --- a/src/devices/bus/isa/p1_sound.h +++ b/src/devices/bus/isa/p1_sound.h @@ -28,7 +28,7 @@ class p1_sound_device : public device_t, { public: // construction/destruction - p1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + p1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t d14_r(offs_t offset); uint8_t d16_r(offs_t offset); diff --git a/src/devices/bus/isa/pc1640_iga.cpp b/src/devices/bus/isa/pc1640_iga.cpp index 96ae2da109b..6fd14d76f10 100644 --- a/src/devices/bus/isa/pc1640_iga.cpp +++ b/src/devices/bus/isa/pc1640_iga.cpp @@ -66,7 +66,7 @@ const tiny_rom_entry *isa8_pc1640_iga_device::device_rom_region() const // isa8_pc1640_iga_device - constructor //------------------------------------------------- -isa8_pc1640_iga_device::isa8_pc1640_iga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa8_pc1640_iga_device::isa8_pc1640_iga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_ega_device(mconfig, ISA8_PC1640_IGA, tag, owner, clock) { } diff --git a/src/devices/bus/isa/pc1640_iga.h b/src/devices/bus/isa/pc1640_iga.h index 0cee53d6329..d52d8dfaabd 100644 --- a/src/devices/bus/isa/pc1640_iga.h +++ b/src/devices/bus/isa/pc1640_iga.h @@ -26,7 +26,7 @@ class isa8_pc1640_iga_device : public isa8_ega_device { public: // construction/destruction - isa8_pc1640_iga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_pc1640_iga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/isa/pcmidi.cpp b/src/devices/bus/isa/pcmidi.cpp index 45cc41ff4f4..283b23963d6 100644 --- a/src/devices/bus/isa/pcmidi.cpp +++ b/src/devices/bus/isa/pcmidi.cpp @@ -65,7 +65,7 @@ DEFINE_DEVICE_TYPE(ISA8_PCMIDI, isa8_pcmidi_device, "isa_pcmidi", "Music Quest P // isa8_pcmidi_device - constructor //------------------------------------------------- -isa8_pcmidi_device::isa8_pcmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +isa8_pcmidi_device::isa8_pcmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_PCMIDI, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_mpu(*this, "mpu") diff --git a/src/devices/bus/isa/pcmidi.h b/src/devices/bus/isa/pcmidi.h index 90bca2b5752..649e9664f16 100644 --- a/src/devices/bus/isa/pcmidi.h +++ b/src/devices/bus/isa/pcmidi.h @@ -14,7 +14,7 @@ class isa8_pcmidi_device : public device_t, public device_isa8_card_interface { public: - isa8_pcmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + isa8_pcmidi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/isa/pds.cpp b/src/devices/bus/isa/pds.cpp index 255d0f7dbe0..4dc2c8d387f 100644 --- a/src/devices/bus/isa/pds.cpp +++ b/src/devices/bus/isa/pds.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(ISA8_PDS, isa8_pds_device, "isa_pds", "Programmers Development System (host)") -isa8_pds_device::isa8_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa8_pds_device::isa8_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_PDS, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_ppi(*this,"pds_ppi") diff --git a/src/devices/bus/isa/pds.h b/src/devices/bus/isa/pds.h index 3188fdac0ad..92bb842562a 100644 --- a/src/devices/bus/isa/pds.h +++ b/src/devices/bus/isa/pds.h @@ -17,7 +17,7 @@ class isa8_pds_device : public device_isa8_card_interface { public: - isa8_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_pds_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t ppi_r(offs_t offset); void ppi_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp index b8329e0ee53..962e3b99da2 100644 --- a/src/devices/bus/isa/pgc.cpp +++ b/src/devices/bus/isa/pgc.cpp @@ -197,12 +197,12 @@ ioport_constructor isa8_pgc_device::device_input_ports() const // isa8_pgc_device - constructor //------------------------------------------------- -isa8_pgc_device::isa8_pgc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_pgc_device::isa8_pgc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_pgc_device(mconfig, ISA8_PGC, tag, owner, clock) { } -isa8_pgc_device::isa8_pgc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +isa8_pgc_device::isa8_pgc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_cpu(*this, "maincpu"), diff --git a/src/devices/bus/isa/pgc.h b/src/devices/bus/isa/pgc.h index d560dbdda09..c2a06dadb0d 100644 --- a/src/devices/bus/isa/pgc.h +++ b/src/devices/bus/isa/pgc.h @@ -24,10 +24,10 @@ class isa8_pgc_device : { public: // construction/destruction - isa8_pgc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_pgc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - isa8_pgc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + isa8_pgc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/s3virge.cpp b/src/devices/bus/isa/s3virge.cpp index 9fb6f98d204..9a3b395ee50 100644 --- a/src/devices/bus/isa/s3virge.cpp +++ b/src/devices/bus/isa/s3virge.cpp @@ -35,28 +35,28 @@ DEFINE_DEVICE_TYPE(S3VIRGE, s3virge_vga_device, "virge_vga", "S3 DEFINE_DEVICE_TYPE(S3VIRGEDX, s3virgedx_vga_device, "virgedx_vga", "S3 86C375") DEFINE_DEVICE_TYPE(S3VIRGEDX1, s3virgedx_rev1_vga_device, "virgedx_vga_r1", "S3 86C375 (rev 1)") -s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3virge_vga_device(mconfig, S3VIRGE, tag, owner, clock) { } -s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +s3virge_vga_device::s3virge_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : s3_vga_device(mconfig, type, tag, owner, clock) , m_linear_config_changed_cb(*this) { } -s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3virgedx_vga_device(mconfig, S3VIRGEDX, tag, owner, clock) { } -s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +s3virgedx_vga_device::s3virgedx_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : s3virge_vga_device(mconfig, type, tag, owner, clock) { } -s3virgedx_rev1_vga_device::s3virgedx_rev1_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3virgedx_rev1_vga_device::s3virgedx_rev1_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3virgedx_vga_device(mconfig, S3VIRGEDX1, tag, owner, clock) { } diff --git a/src/devices/bus/isa/s3virge.h b/src/devices/bus/isa/s3virge.h index aec31340d7b..6146c8300e0 100644 --- a/src/devices/bus/isa/s3virge.h +++ b/src/devices/bus/isa/s3virge.h @@ -20,7 +20,7 @@ class s3virge_vga_device : public s3_vga_device { public: // construction/destruction - s3virge_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3virge_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto linear_config_changed() { return m_linear_config_changed_cb.bind(); } @@ -75,7 +75,7 @@ public: ibm8514a_device* get_8514() { fatalerror("s3virge requested non-existent 8514/A device\n"); return nullptr; } protected: - s3virge_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + s3virge_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -220,10 +220,10 @@ class s3virgedx_vga_device : public s3virge_vga_device { public: // construction/destruction - s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3virgedx_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - s3virgedx_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + s3virgedx_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -236,7 +236,7 @@ class s3virgedx_rev1_vga_device : public s3virgedx_vga_device { public: // construction/destruction - s3virgedx_rev1_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3virgedx_rev1_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/sb16.cpp b/src/devices/bus/isa/sb16.cpp index 333703f2cfc..4435981f030 100644 --- a/src/devices/bus/isa/sb16.cpp +++ b/src/devices/bus/isa/sb16.cpp @@ -434,8 +434,8 @@ void sb16_lle_device::device_add_mconfig(machine_config &config) ymf262.add_route(2, "lspeaker", 1.00); ymf262.add_route(3, "rspeaker", 1.00); - DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_16BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_16BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC PC_JOY(config, m_joy); } @@ -684,7 +684,7 @@ void sb16_lle_device::mpu401_w(offs_t offset, uint8_t data) } -sb16_lle_device::sb16_lle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sb16_lle_device::sb16_lle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SB16, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_ldac(*this, "ldac"), diff --git a/src/devices/bus/isa/sb16.h b/src/devices/bus/isa/sb16.h index 8710574ba85..06bf6254c8e 100644 --- a/src/devices/bus/isa/sb16.h +++ b/src/devices/bus/isa/sb16.h @@ -20,7 +20,7 @@ class sb16_lle_device : public device_t, public device_isa16_card_interface { public: // construction/destruction - sb16_lle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sb16_lle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index 33905e05da3..9a9c1fd7f02 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -1152,8 +1152,8 @@ void sb_device::common(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_16BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_16BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC PC_JOY(config, m_joy); @@ -1203,7 +1203,7 @@ void isa16_sblaster16_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -sb_device::sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +sb_device::sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_serial_interface(mconfig, *this), m_ldac(*this, "ldac"), @@ -1214,14 +1214,14 @@ sb_device::sb_device(const machine_config &mconfig, device_type type, const char { } -sb8_device::sb8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +sb8_device::sb8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sb_device(mconfig, type, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_ym3812(*this, "ym3812") { } -sb16_device::sb16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +sb16_device::sb16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sb_device(mconfig, type, tag, owner, clock), device_isa16_card_interface(mconfig, *this) { @@ -1231,19 +1231,19 @@ sb16_device::sb16_device(const machine_config &mconfig, device_type type, const // isa8_sblaster_device - constructor //------------------------------------------------- -isa8_sblaster1_0_device::isa8_sblaster1_0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_sblaster1_0_device::isa8_sblaster1_0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sb8_device(mconfig, ISA8_SOUND_BLASTER_1_0, tag, owner, clock), m_saa1099_1(*this, "saa1099.1"), m_saa1099_2(*this, "saa1099.2") { } -isa8_sblaster1_5_device::isa8_sblaster1_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_sblaster1_5_device::isa8_sblaster1_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sb8_device(mconfig, ISA8_SOUND_BLASTER_1_5, tag, owner, clock) { } -isa16_sblaster16_device::isa16_sblaster16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_sblaster16_device::isa16_sblaster16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sb16_device(mconfig, ISA16_SOUND_BLASTER_16, tag, owner, clock) { } @@ -1425,7 +1425,7 @@ void sb_device::device_reset() // MIDI is 31250 baud, 8-N-1 set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rate(31250); + set_rate(XTAL::u(31250)); } uint8_t sb_device::dack_r(int line) diff --git a/src/devices/bus/isa/sblaster.h b/src/devices/bus/isa/sblaster.h index f09f05957be..32748cb8230 100644 --- a/src/devices/bus/isa/sblaster.h +++ b/src/devices/bus/isa/sblaster.h @@ -105,7 +105,7 @@ protected: }; // construction/destruction - sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -157,7 +157,7 @@ public: virtual ioport_constructor device_input_ports() const override; protected: // construction/destruction - sb8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sb8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void drq_w(int state) override; @@ -172,7 +172,7 @@ class isa8_sblaster1_0_device : public sb8_device { public: // construction/destruction - isa8_sblaster1_0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_sblaster1_0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t saa1099_16_r(offs_t offset); void saa1099_1_16_w(offs_t offset, uint8_t data); @@ -195,7 +195,7 @@ class isa8_sblaster1_5_device : public sb8_device { public: // construction/destruction - isa8_sblaster1_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_sblaster1_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -216,7 +216,7 @@ public: virtual ioport_constructor device_input_ports() const override; protected: // construction/destruction - sb16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sb16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual uint16_t dack16_r(int line) override; virtual uint8_t dack_r(int line) override { return sb_device::dack_r(line); } @@ -236,7 +236,7 @@ class isa16_sblaster16_device : public sb16_device { public: // construction/destruction - isa16_sblaster16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_sblaster16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp index a670bb38aa4..ec1ef5cb84b 100644 --- a/src/devices/bus/isa/sc499.cpp +++ b/src/devices/bus/isa/sc499.cpp @@ -177,7 +177,7 @@ INPUT_PORTS_END void sc499_device::device_add_mconfig(machine_config &config) { - SC499_CTAPE(config, m_image, 0); + SC499_CTAPE(config, m_image); } @@ -307,7 +307,7 @@ DEFINE_DEVICE_TYPE(ISA8_SC499, sc499_device, "sc499", "Archive SC-499") // sc499_device - constructor //------------------------------------------------- -sc499_device::sc499_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sc499_device::sc499_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_SC499, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_iobase(*this, "IO_BASE"), @@ -1272,7 +1272,7 @@ void sc499_device::block_set_filemark() DEFINE_DEVICE_TYPE(SC499_CTAPE, sc499_ctape_image_device, "sc499_ctape", "SC-499 Cartridge Tape") -sc499_ctape_image_device::sc499_ctape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sc499_ctape_image_device::sc499_ctape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : microtape_image_device(mconfig, SC499_CTAPE, tag, owner, clock) { } diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h index ffcd8c37a85..582c60a56b4 100644 --- a/src/devices/bus/isa/sc499.h +++ b/src/devices/bus/isa/sc499.h @@ -27,7 +27,7 @@ class sc499_ctape_image_device : public microtape_image_device { public: // construction/destruction - sc499_ctape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sc499_ctape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual image_init_result call_load() override; @@ -56,7 +56,7 @@ class sc499_device: public device_t, public device_isa8_card_interface { public: // construction/destruction - sc499_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sc499_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: required_ioport m_iobase; diff --git a/src/devices/bus/isa/side116.cpp b/src/devices/bus/isa/side116.cpp index bad6645bf5a..7ddb89f6945 100644 --- a/src/devices/bus/isa/side116.cpp +++ b/src/devices/bus/isa/side116.cpp @@ -83,7 +83,7 @@ const tiny_rom_entry *side116_device::device_rom_region() const // side116_device - constructor //------------------------------------------------- -side116_device::side116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +side116_device::side116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_SIDE116, tag, owner, clock), device_isa8_card_interface( mconfig, *this ), m_ata(*this, "ata"), diff --git a/src/devices/bus/isa/side116.h b/src/devices/bus/isa/side116.h index 380e6206222..36d96e2d0b3 100644 --- a/src/devices/bus/isa/side116.h +++ b/src/devices/bus/isa/side116.h @@ -27,7 +27,7 @@ class side116_device : public device_t, public device_isa8_card_interface { public: // construction/destruction - side116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + side116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isa/ssi2001.cpp b/src/devices/bus/isa/ssi2001.cpp index e1d271dc6b4..96b4f2653cf 100644 --- a/src/devices/bus/isa/ssi2001.cpp +++ b/src/devices/bus/isa/ssi2001.cpp @@ -18,7 +18,7 @@ void ssi2001_device::device_add_mconfig(machine_config &config) PC_JOY(config, m_joy); } -ssi2001_device::ssi2001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ssi2001_device::ssi2001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_SSI2001, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_joy(*this, "pc_joy"), diff --git a/src/devices/bus/isa/ssi2001.h b/src/devices/bus/isa/ssi2001.h index 85efa17c5ac..0123785e6b3 100644 --- a/src/devices/bus/isa/ssi2001.h +++ b/src/devices/bus/isa/ssi2001.h @@ -20,7 +20,7 @@ class ssi2001_device : public device_t, { public: // construction/destruction - ssi2001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ssi2001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/stereo_fx.cpp b/src/devices/bus/isa/stereo_fx.cpp index 70f3c5160c7..18336c15149 100644 --- a/src/devices/bus/isa/stereo_fx.cpp +++ b/src/devices/bus/isa/stereo_fx.cpp @@ -131,8 +131,8 @@ void stereo_fx_device::device_add_mconfig(machine_config &config) ym3812.add_route(ALL_OUTPUTS, "rspeaker", 1.00); /* no CM/S support (empty sockets) */ - DAC_8BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_8BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC PC_JOY(config, m_joy); } @@ -194,7 +194,7 @@ uint8_t stereo_fx_device::invalid_r() return 0xff; } -stereo_fx_device::stereo_fx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +stereo_fx_device::stereo_fx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_STEREO_FX, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_joy(*this, "pc_joy"), diff --git a/src/devices/bus/isa/stereo_fx.h b/src/devices/bus/isa/stereo_fx.h index 376d5dbff98..4ad2927d450 100644 --- a/src/devices/bus/isa/stereo_fx.h +++ b/src/devices/bus/isa/stereo_fx.h @@ -21,7 +21,7 @@ class stereo_fx_device : public device_t, { public: // construction/destruction - stereo_fx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + stereo_fx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/svga_cirrus.cpp b/src/devices/bus/isa/svga_cirrus.cpp index 750d0f41142..b68f34df1b9 100644 --- a/src/devices/bus/isa/svga_cirrus.cpp +++ b/src/devices/bus/isa/svga_cirrus.cpp @@ -36,7 +36,7 @@ void isa16_svga_cirrus_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update("vga", FUNC(cirrus_gd5430_device::screen_update)); - CIRRUS_GD5430(config, m_vga, 0); + CIRRUS_GD5430(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x200000); } @@ -58,7 +58,7 @@ const tiny_rom_entry *isa16_svga_cirrus_device::device_rom_region() const // isa16_vga_device - constructor //------------------------------------------------- -isa16_svga_cirrus_device::isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_svga_cirrus_device::isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SVGA_CIRRUS, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") @@ -116,7 +116,7 @@ void isa16_svga_cirrus_gd542x_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update("vga", FUNC(cirrus_gd5428_device::screen_update)); - CIRRUS_GD5428(config, m_vga, 0); + CIRRUS_GD5428(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x200000); } @@ -138,7 +138,7 @@ const tiny_rom_entry *isa16_svga_cirrus_gd542x_device::device_rom_region() const // isa16_vga_device - constructor //------------------------------------------------- -isa16_svga_cirrus_gd542x_device::isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_svga_cirrus_gd542x_device::isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SVGA_CIRRUS_GD542X, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") diff --git a/src/devices/bus/isa/svga_cirrus.h b/src/devices/bus/isa/svga_cirrus.h index d2e7d75595c..bc805319f27 100644 --- a/src/devices/bus/isa/svga_cirrus.h +++ b/src/devices/bus/isa/svga_cirrus.h @@ -18,7 +18,7 @@ class isa16_svga_cirrus_device : { public: // construction/destruction - isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); @@ -41,7 +41,7 @@ class isa16_svga_cirrus_gd542x_device : { public: // construction/destruction - isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); diff --git a/src/devices/bus/isa/svga_s3.cpp b/src/devices/bus/isa/svga_s3.cpp index 58984396d86..a55d9a8c2d3 100644 --- a/src/devices/bus/isa/svga_s3.cpp +++ b/src/devices/bus/isa/svga_s3.cpp @@ -57,7 +57,7 @@ void isa16_svga_s3_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(s3_vga_device::screen_update)); - S3_VGA(config, m_vga, 0); + S3_VGA(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x100000); } @@ -79,7 +79,7 @@ const tiny_rom_entry *isa16_svga_s3_device::device_rom_region() const // isa16_vga_device - constructor //------------------------------------------------- -isa16_svga_s3_device::isa16_svga_s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_svga_s3_device::isa16_svga_s3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SVGA_S3, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga"), m_8514(*this, "vga:8514a") @@ -162,7 +162,7 @@ void isa16_s3virge_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(s3virge_vga_device::screen_update)); - S3VIRGE(config, m_vga, 0); + S3VIRGE(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x400000); m_vga->linear_config_changed().set(FUNC(isa16_s3virge_device::linear_config_changed_w)); @@ -195,7 +195,7 @@ const tiny_rom_entry *isa16_s3virge_device::device_rom_region() const // isa16_vga_device - constructor //------------------------------------------------- -isa16_s3virge_device::isa16_s3virge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_s3virge_device::isa16_s3virge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_S3VIRGE, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") @@ -254,7 +254,7 @@ void isa16_s3virgedx_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(s3virgedx_vga_device::screen_update)); - S3VIRGEDX(config, m_vga, 0); + S3VIRGEDX(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x400000); m_vga->linear_config_changed().set(FUNC(isa16_s3virgedx_device::linear_config_changed_w)); @@ -303,7 +303,7 @@ const tiny_rom_entry *isa16_s3virgedx_device::device_rom_region() const // isa16_vga_device - constructor //------------------------------------------------- -isa16_s3virgedx_device::isa16_s3virgedx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_s3virgedx_device::isa16_s3virgedx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_S3VIRGEDX, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") @@ -370,7 +370,7 @@ void isa16_stealth3d2kpro_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(s3virgedx_rev1_vga_device::screen_update)); - S3VIRGEDX1(config, m_vga, 0); + S3VIRGEDX1(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x400000); m_vga->linear_config_changed().set(FUNC(isa16_stealth3d2kpro_device::linear_config_changed_w)); @@ -403,7 +403,7 @@ const tiny_rom_entry *isa16_stealth3d2kpro_device::device_rom_region() const // isa16_vga_device - constructor //------------------------------------------------- -isa16_stealth3d2kpro_device::isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_stealth3d2kpro_device::isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_DMS3D2KPRO, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") diff --git a/src/devices/bus/isa/svga_s3.h b/src/devices/bus/isa/svga_s3.h index a07b0e039c6..eed9603c59e 100644 --- a/src/devices/bus/isa/svga_s3.h +++ b/src/devices/bus/isa/svga_s3.h @@ -21,7 +21,7 @@ class isa16_svga_s3_device : { public: // construction/destruction - isa16_svga_s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_svga_s3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); @@ -45,7 +45,7 @@ class isa16_s3virge_device : { public: // construction/destruction - isa16_s3virge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_s3virge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); @@ -70,7 +70,7 @@ class isa16_s3virgedx_device : { public: // construction/destruction - isa16_s3virgedx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_s3virgedx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); @@ -98,7 +98,7 @@ class isa16_stealth3d2kpro_device : { public: // construction/destruction - isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); diff --git a/src/devices/bus/isa/svga_trident.cpp b/src/devices/bus/isa/svga_trident.cpp index f3b4e0f9a6f..240874a13ae 100644 --- a/src/devices/bus/isa/svga_trident.cpp +++ b/src/devices/bus/isa/svga_trident.cpp @@ -36,7 +36,7 @@ void isa16_svga_tgui9680_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(trident_vga_device::screen_update)); - TRIDENT_VGA(config, m_vga, 0); + TRIDENT_VGA(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x200000); } @@ -58,7 +58,7 @@ const tiny_rom_entry *isa16_svga_tgui9680_device::device_rom_region() const // isa8_vga_device - constructor //------------------------------------------------- -isa16_svga_tgui9680_device::isa16_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_svga_tgui9680_device::isa16_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SVGA_TGUI9680, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") diff --git a/src/devices/bus/isa/svga_trident.h b/src/devices/bus/isa/svga_trident.h index c5c7bfdcf1d..bd537628845 100644 --- a/src/devices/bus/isa/svga_trident.h +++ b/src/devices/bus/isa/svga_trident.h @@ -25,7 +25,7 @@ class isa16_svga_tgui9680_device : { public: // construction/destruction - isa16_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); diff --git a/src/devices/bus/isa/svga_tseng.cpp b/src/devices/bus/isa/svga_tseng.cpp index 0d1485ad17d..dcbf63ead9d 100644 --- a/src/devices/bus/isa/svga_tseng.cpp +++ b/src/devices/bus/isa/svga_tseng.cpp @@ -35,7 +35,7 @@ void isa8_svga_et4k_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(tseng_vga_device::screen_update)); - TSENG_VGA(config, m_vga, 0); + TSENG_VGA(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x100000); } @@ -57,7 +57,7 @@ const tiny_rom_entry *isa8_svga_et4k_device::device_rom_region() const // isa8_vga_device - constructor //------------------------------------------------- -isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_SVGA_ET4K, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_vga(*this, "vga") diff --git a/src/devices/bus/isa/svga_tseng.h b/src/devices/bus/isa/svga_tseng.h index 690956741b5..602856ecf72 100644 --- a/src/devices/bus/isa/svga_tseng.h +++ b/src/devices/bus/isa/svga_tseng.h @@ -20,7 +20,7 @@ class isa8_svga_et4k_device : { public: // construction/destruction - isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); diff --git a/src/devices/bus/isa/tekram_dc820.cpp b/src/devices/bus/isa/tekram_dc820.cpp index 56ffd8e4ccb..61233af1f3a 100644 --- a/src/devices/bus/isa/tekram_dc820.cpp +++ b/src/devices/bus/isa/tekram_dc820.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(TEKRAM_DC320E, tekram_dc320e_device, "dc320e", "Tekram DC-320 DEFINE_DEVICE_TYPE(TEKRAM_DC820, tekram_dc820_device, "dc820", "Tekram DC-820 SCSI Cache Controller") DEFINE_DEVICE_TYPE(TEKRAM_DC820B, tekram_dc820b_device, "dc820b", "Tekram DC-820B SCSI Cache Controller") -tekram_eisa_scsi_device::tekram_eisa_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +tekram_eisa_scsi_device::tekram_eisa_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_mpu(*this, "mpu") @@ -46,22 +46,22 @@ tekram_eisa_scsi_device::tekram_eisa_scsi_device(const machine_config &mconfig, { } -tekram_dc320b_device::tekram_dc320b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tekram_dc320b_device::tekram_dc320b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tekram_eisa_scsi_device(mconfig, TEKRAM_DC320B, tag, owner, clock) { } -tekram_dc320e_device::tekram_dc320e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tekram_dc320e_device::tekram_dc320e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tekram_eisa_scsi_device(mconfig, TEKRAM_DC320E, tag, owner, clock) { } -tekram_dc820_device::tekram_dc820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tekram_dc820_device::tekram_dc820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tekram_eisa_scsi_device(mconfig, TEKRAM_DC820, tag, owner, clock) { } -tekram_dc820b_device::tekram_dc820b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tekram_dc820b_device::tekram_dc820b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tekram_eisa_scsi_device(mconfig, TEKRAM_DC820B, tag, owner, clock) { } @@ -214,7 +214,7 @@ void tekram_eisa_scsi_device::scsi_add(machine_config &config) void tekram_dc320b_device::device_add_mconfig(machine_config &config) { - I80186(config, m_mpu, 25'000'000); // verified for DC-320, but not DC-320B + I80186(config, m_mpu, XTAL::u(25'000'000)); // verified for DC-320, but not DC-320B m_mpu->set_addrmap(AS_PROGRAM, &tekram_dc320b_device::mpu_map); GENERIC_LATCH_8(config, m_cmdlatch); @@ -224,17 +224,17 @@ void tekram_dc320b_device::device_add_mconfig(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); - i82355_device &bmic(I82355(config, "bmic", 0)); + i82355_device &bmic(I82355(config, "bmic")); bmic.lint_callback().set(m_mpu, FUNC(i80186_cpu_device::int2_w)); scsi_add(config); - WD37C65C(config, m_fdc, 32'000'000, 9'600'000); // clocks verified for DC-320, but not DC-320B + WD37C65C(config, m_fdc, XTAL::u(32'000'000), 9'600'000); // clocks verified for DC-320, but not DC-320B } void tekram_dc320e_device::device_add_mconfig(machine_config &config) { - I80186(config, m_mpu, 32'000'000); // clock guessed to be same as DC-820B due to identical firmware + I80186(config, m_mpu, XTAL::u(32'000'000)); // clock guessed to be same as DC-820B due to identical firmware m_mpu->set_addrmap(AS_PROGRAM, &tekram_dc320e_device::mpu_map); GENERIC_LATCH_8(config, m_cmdlatch); @@ -244,12 +244,12 @@ void tekram_dc320e_device::device_add_mconfig(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); - i82355_device &bmic(I82355(config, "bmic", 0)); + i82355_device &bmic(I82355(config, "bmic")); bmic.lint_callback().set(m_mpu, FUNC(i80186_cpu_device::int2_w)); scsi_add(config); - WD37C65C(config, m_fdc, 32'000'000, 9'600'000); // clocks verified for DC-320, but not DC-320E + WD37C65C(config, m_fdc, XTAL::u(32'000'000), 9'600'000); // clocks verified for DC-320, but not DC-320E } void tekram_dc820_device::device_add_mconfig(machine_config &config) @@ -264,7 +264,7 @@ void tekram_dc820_device::device_add_mconfig(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); - i82355_device &bmic(I82355(config, "bmic", 0)); + i82355_device &bmic(I82355(config, "bmic")); bmic.lint_callback().set(m_mpu, FUNC(i80186_cpu_device::int2_w)); scsi_add(config); @@ -284,7 +284,7 @@ void tekram_dc820b_device::device_add_mconfig(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); - i82355_device &bmic(I82355(config, "bmic", 0)); + i82355_device &bmic(I82355(config, "bmic")); bmic.lint_callback().set(m_mpu, FUNC(i80186_cpu_device::int2_w)); scsi_add(config); diff --git a/src/devices/bus/isa/tekram_dc820.h b/src/devices/bus/isa/tekram_dc820.h index 2308eb8655a..73177ecaef3 100644 --- a/src/devices/bus/isa/tekram_dc820.h +++ b/src/devices/bus/isa/tekram_dc820.h @@ -22,7 +22,7 @@ public: static constexpr feature_type unemulated_features() { return feature::DISK; } protected: - tekram_eisa_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + tekram_eisa_scsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -49,7 +49,7 @@ protected: class tekram_dc320b_device : public tekram_eisa_scsi_device { public: - tekram_dc320b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tekram_dc320b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -66,7 +66,7 @@ private: class tekram_dc320e_device : public tekram_eisa_scsi_device { public: - tekram_dc320e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tekram_dc320e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -79,7 +79,7 @@ private: class tekram_dc820_device : public tekram_eisa_scsi_device { public: - tekram_dc820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tekram_dc820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -94,7 +94,7 @@ private: class tekram_dc820b_device : public tekram_eisa_scsi_device { public: - tekram_dc820b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tekram_dc820b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/isa/trident.cpp b/src/devices/bus/isa/trident.cpp index 943f0de3432..1a91782c2f0 100644 --- a/src/devices/bus/isa/trident.cpp +++ b/src/devices/bus/isa/trident.cpp @@ -23,18 +23,18 @@ DEFINE_DEVICE_TYPE(TVGA9000_VGA, tvga9000_device, "tvga9000_vga", "Trident TVGA9 #define LOG (1) #define LOG_ACCEL (1) -trident_vga_device::trident_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +trident_vga_device::trident_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, type, tag, owner, clock) { } -tgui9860_device::tgui9860_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tgui9860_device::tgui9860_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : trident_vga_device(mconfig, TRIDENT_VGA, tag, owner, clock) { m_version = 0xd3; // 0xd3 identifies at TGUI9660XGi (set to 0xe3 to identify at TGUI9440AGi) } -tvga9000_device::tvga9000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tvga9000_device::tvga9000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : trident_vga_device(mconfig, TVGA9000_VGA, tag, owner, clock) { m_version = 0x43; diff --git a/src/devices/bus/isa/trident.h b/src/devices/bus/isa/trident.h index 3dc8f63947c..6ffe4457dbc 100644 --- a/src/devices/bus/isa/trident.h +++ b/src/devices/bus/isa/trident.h @@ -38,7 +38,7 @@ public: protected: // construction/destruction - trident_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + trident_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -152,13 +152,13 @@ private: class tgui9860_device : public trident_vga_device { public: - tgui9860_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tgui9860_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tvga9000_device : public trident_vga_device { public: - tvga9000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tvga9000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/bus/isa/ultra12f.cpp b/src/devices/bus/isa/ultra12f.cpp index fb5f89e485c..de3133efd6e 100644 --- a/src/devices/bus/isa/ultra12f.cpp +++ b/src/devices/bus/isa/ultra12f.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(ULTRA12F, ultra12f_device, "ultra12f", "Ultra 12F ESDI Caching Disk Controller") DEFINE_DEVICE_TYPE(ULTRA12F32, ultra12f32_device, "ultra12f32", "Ultra 12F/32 ESDI Caching Disk Controller") -ultra12f_device::ultra12f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +ultra12f_device::ultra12f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_hpc(*this, "hpc") @@ -26,12 +26,12 @@ ultra12f_device::ultra12f_device(const machine_config &mconfig, device_type type { } -ultra12f_device::ultra12f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ultra12f_device::ultra12f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ultra12f_device(mconfig, ULTRA12F, tag, owner, clock) { } -ultra12f32_device::ultra12f32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ultra12f32_device::ultra12f32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ultra12f_device(mconfig, ULTRA12F32, tag, owner, clock) { } diff --git a/src/devices/bus/isa/ultra12f.h b/src/devices/bus/isa/ultra12f.h index f4bb05d61c7..5ba993e3920 100644 --- a/src/devices/bus/isa/ultra12f.h +++ b/src/devices/bus/isa/ultra12f.h @@ -18,12 +18,12 @@ class ultra12f_device : public device_t, public device_isa16_card_interface { public: - ultra12f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ultra12f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } protected: - ultra12f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + ultra12f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual ioport_constructor device_input_ports() const override; @@ -41,7 +41,7 @@ private: class ultra12f32_device : public ultra12f_device { public: - ultra12f32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ultra12f32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/isa/ultra14f.cpp b/src/devices/bus/isa/ultra14f.cpp index f97b0acb54e..d5c5cf7447c 100644 --- a/src/devices/bus/isa/ultra14f.cpp +++ b/src/devices/bus/isa/ultra14f.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(ULTRA14F, ultra14f_device, "ultra14f", "Ultra-14F SCSI Host Adapter") -ultra14f_device::ultra14f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ultra14f_device::ultra14f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ULTRA14F, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_uscpu(*this, "uscpu") diff --git a/src/devices/bus/isa/ultra14f.h b/src/devices/bus/isa/ultra14f.h index 9661e24a4b3..b56869bb1c0 100644 --- a/src/devices/bus/isa/ultra14f.h +++ b/src/devices/bus/isa/ultra14f.h @@ -17,7 +17,7 @@ class ultra14f_device : public device_t, public device_isa16_card_interface { public: - ultra14f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ultra14f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/ultra24f.cpp b/src/devices/bus/isa/ultra24f.cpp index 211c1ab4b80..3ea77976752 100644 --- a/src/devices/bus/isa/ultra24f.cpp +++ b/src/devices/bus/isa/ultra24f.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(ULTRA24F, ultra24f_device, "ultra24f", "Ultra-24F SCSI Host Adapter") -ultra24f_device::ultra24f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ultra24f_device::ultra24f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ULTRA24F, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , m_uscpu(*this, "uscpu") @@ -69,7 +69,7 @@ void ultra24f_device::device_add_mconfig(machine_config &config) M68000(config, m_uscpu, 32_MHz_XTAL / 4); // custom-marked as USC080-5-12A; clock guessed m_uscpu->set_addrmap(AS_PROGRAM, &ultra24f_device::uscpu_map); - I82355(config, m_bmic, 0); + I82355(config, m_bmic); NSCSI_BUS(config, "scsi"); NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); diff --git a/src/devices/bus/isa/ultra24f.h b/src/devices/bus/isa/ultra24f.h index 69a5d3a29d2..628561cba86 100644 --- a/src/devices/bus/isa/ultra24f.h +++ b/src/devices/bus/isa/ultra24f.h @@ -18,7 +18,7 @@ class ultra24f_device : public device_t, public device_isa16_card_interface { public: - ultra24f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ultra24f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/isa/vga.cpp b/src/devices/bus/isa/vga.cpp index b573f4c5701..e4b250b99d0 100644 --- a/src/devices/bus/isa/vga.cpp +++ b/src/devices/bus/isa/vga.cpp @@ -33,7 +33,7 @@ void isa8_vga_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(vga_device::screen_update)); - VGA(config, m_vga, 0); + VGA(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x100000); } @@ -55,7 +55,7 @@ const tiny_rom_entry *isa8_vga_device::device_rom_region() const // isa8_vga_device - constructor //------------------------------------------------- -isa8_vga_device::isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_vga_device::isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_VGA, tag, owner, clock), device_isa8_card_interface(mconfig, *this), m_vga(*this, "vga") diff --git a/src/devices/bus/isa/vga.h b/src/devices/bus/isa/vga.h index c1b4d7226aa..6771dc54031 100644 --- a/src/devices/bus/isa/vga.h +++ b/src/devices/bus/isa/vga.h @@ -20,7 +20,7 @@ class isa8_vga_device : { public: // construction/destruction - isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); diff --git a/src/devices/bus/isa/vga_ati.cpp b/src/devices/bus/isa/vga_ati.cpp index aaebcf3969b..99772daaa75 100644 --- a/src/devices/bus/isa/vga_ati.cpp +++ b/src/devices/bus/isa/vga_ati.cpp @@ -82,7 +82,7 @@ void isa16_vga_gfxultra_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(ati_vga_device::screen_update)); - ATI_VGA(config, m_vga, 0); + ATI_VGA(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x100000); } @@ -93,7 +93,7 @@ void isa16_vga_gfxultrapro_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(mach32_device::screen_update)); - ATIMACH32(config, m_vga, 0); + ATIMACH32(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x400000); } @@ -104,7 +104,7 @@ void isa16_vga_mach64_device::device_add_mconfig(machine_config &config) screen.set_raw(25.175_MHz_XTAL, 800, 0, 640, 524, 0, 480); screen.set_screen_update(m_vga, FUNC(mach64_device::screen_update)); - ATIMACH64(config, m_vga, 0); + ATIMACH64(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x400000); } @@ -137,21 +137,21 @@ const tiny_rom_entry *isa16_vga_mach64_device::device_rom_region() const // isa8_vga_device - constructor //------------------------------------------------- -isa16_vga_gfxultra_device::isa16_vga_gfxultra_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_vga_gfxultra_device::isa16_vga_gfxultra_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_VGA_GFXULTRA, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga"), m_8514(*this, "vga:8514a") { } -isa16_vga_gfxultrapro_device::isa16_vga_gfxultrapro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_vga_gfxultrapro_device::isa16_vga_gfxultrapro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SVGA_GFXULTRAPRO, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") { } -isa16_vga_mach64_device::isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa16_vga_mach64_device::isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA16_SVGA_MACH64, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_vga(*this, "vga") diff --git a/src/devices/bus/isa/vga_ati.h b/src/devices/bus/isa/vga_ati.h index f92f3c563ca..6a9c563bc56 100644 --- a/src/devices/bus/isa/vga_ati.h +++ b/src/devices/bus/isa/vga_ati.h @@ -28,7 +28,7 @@ class isa16_vga_gfxultra_device : { public: // construction/destruction - isa16_vga_gfxultra_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_vga_gfxultra_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); @@ -52,7 +52,7 @@ class isa16_vga_gfxultrapro_device : { public: // construction/destruction - isa16_vga_gfxultrapro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_vga_gfxultrapro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); @@ -75,7 +75,7 @@ class isa16_vga_mach64_device : { public: // construction/destruction - isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t input_port_0_r(); diff --git a/src/devices/bus/isa/wd1002a_wx1.cpp b/src/devices/bus/isa/wd1002a_wx1.cpp index 2e86d3b0523..cd52fbfb925 100644 --- a/src/devices/bus/isa/wd1002a_wx1.cpp +++ b/src/devices/bus/isa/wd1002a_wx1.cpp @@ -46,7 +46,7 @@ const tiny_rom_entry *isa8_wd1002a_wx1_device::device_rom_region() const // isa8_wd1002a_wx1_device - constructor //------------------------------------------------- -isa8_wd1002a_wx1_device::isa8_wd1002a_wx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +isa8_wd1002a_wx1_device::isa8_wd1002a_wx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_WD1002A_WX1, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) { diff --git a/src/devices/bus/isa/wd1002a_wx1.h b/src/devices/bus/isa/wd1002a_wx1.h index 7a66db54dd5..9d9e13576b4 100644 --- a/src/devices/bus/isa/wd1002a_wx1.h +++ b/src/devices/bus/isa/wd1002a_wx1.h @@ -26,7 +26,7 @@ class isa8_wd1002a_wx1_device : public device_t, { public: // construction/destruction - isa8_wd1002a_wx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_wd1002a_wx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/isa/wd1007a.cpp b/src/devices/bus/isa/wd1007a.cpp index 22d9863e392..b83ce881fb4 100644 --- a/src/devices/bus/isa/wd1007a.cpp +++ b/src/devices/bus/isa/wd1007a.cpp @@ -34,7 +34,7 @@ const tiny_rom_entry *wd1007a_device::device_rom_region() const // wd1007a_device - constructor //------------------------------------------------- -wd1007a_device::wd1007a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd1007a_device::wd1007a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD1007A, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) { diff --git a/src/devices/bus/isa/wd1007a.h b/src/devices/bus/isa/wd1007a.h index 1a761ecb66d..320acd80e63 100644 --- a/src/devices/bus/isa/wd1007a.h +++ b/src/devices/bus/isa/wd1007a.h @@ -25,7 +25,7 @@ class wd1007a_device : public device_t, public device_isa16_card_interface { public: // construction/destruction - wd1007a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1007a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } protected: diff --git a/src/devices/bus/isa/wdxt_gen.cpp b/src/devices/bus/isa/wdxt_gen.cpp index fb2a8fd1965..dd849835376 100644 --- a/src/devices/bus/isa/wdxt_gen.cpp +++ b/src/devices/bus/isa/wdxt_gen.cpp @@ -139,7 +139,7 @@ void wdxt_gen_device::ram_w(offs_t offset, uint8_t data) void wdxt_gen_device::device_add_mconfig(machine_config &config) { - mcs48_cpu_device &cpu(I8049(config, m_maincpu, 5000000)); + mcs48_cpu_device &cpu(I8049(config, m_maincpu, XTAL::u(5000000))); cpu.set_addrmap(AS_IO, &wdxt_gen_device::wd1015_io); cpu.t0_in_cb().set(m_host, FUNC(wd11c00_17_device::busy_r)); cpu.t1_in_cb().set(FUNC(wdxt_gen_device::wd1015_t1_r)); @@ -148,7 +148,7 @@ void wdxt_gen_device::device_add_mconfig(machine_config &config) cpu.p2_in_cb().set(FUNC(wdxt_gen_device::wd1015_p2_r)); cpu.p2_out_cb().set(FUNC(wdxt_gen_device::wd1015_p2_w)); - WD11C00_17(config, m_host, 5000000); + WD11C00_17(config, m_host, XTAL::u(5000000)); m_host->out_irq5_callback().set(FUNC(wdxt_gen_device::irq5_w)); m_host->out_drq3_callback().set(FUNC(wdxt_gen_device::drq3_w)); m_host->out_mr_callback().set(FUNC(wdxt_gen_device::mr_w)); @@ -159,7 +159,7 @@ void wdxt_gen_device::device_add_mconfig(machine_config &config) m_host->in_cs1010_callback().set(m_hdc, FUNC(wd2010_device::read)); m_host->out_cs1010_callback().set(m_hdc, FUNC(wd2010_device::write)); - WD2010(config, m_hdc, 5000000); + WD2010(config, m_hdc, XTAL::u(5000000)); m_hdc->out_bcr_callback().set(m_host, FUNC(wd11c00_17_device::clct_w)); m_hdc->in_bcs_callback().set(m_host, FUNC(wd11c00_17_device::read)); m_hdc->out_bcs_callback().set(m_host, FUNC(wd11c00_17_device::write)); @@ -169,8 +169,8 @@ void wdxt_gen_device::device_add_mconfig(machine_config &config) m_hdc->in_tk000_callback().set_constant(1); m_hdc->in_sc_callback().set_constant(1); - HARDDISK(config, "hard0", 0); - HARDDISK(config, "hard1", 0); + HARDDISK(config, "hard0"); + HARDDISK(config, "hard1"); } @@ -182,7 +182,7 @@ void wdxt_gen_device::device_add_mconfig(machine_config &config) // wdxt_gen_device - constructor //------------------------------------------------- -wdxt_gen_device::wdxt_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wdxt_gen_device::wdxt_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_WDXT_GEN, tag, owner, clock) , device_isa8_card_interface(mconfig, *this) , m_maincpu(*this, WD1015_TAG) diff --git a/src/devices/bus/isa/wdxt_gen.h b/src/devices/bus/isa/wdxt_gen.h index f238f6750a1..ee55e60bd2c 100644 --- a/src/devices/bus/isa/wdxt_gen.h +++ b/src/devices/bus/isa/wdxt_gen.h @@ -38,7 +38,7 @@ class wdxt_gen_device : public device_t, { public: // construction/destruction - wdxt_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wdxt_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isa/xtide.cpp b/src/devices/bus/isa/xtide.cpp index a22f69a9b13..c62d610e82e 100644 --- a/src/devices/bus/isa/xtide.cpp +++ b/src/devices/bus/isa/xtide.cpp @@ -295,7 +295,7 @@ const tiny_rom_entry *xtide_device::device_rom_region() const // xtide_device - constructor //------------------------------------------------- -xtide_device::xtide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xtide_device::xtide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISA8_XTIDE, tag, owner, clock), device_isa8_card_interface( mconfig, *this ), m_ata(*this, "ata"), diff --git a/src/devices/bus/isa/xtide.h b/src/devices/bus/isa/xtide.h index b06d39d5dbb..b7a450d0a7c 100644 --- a/src/devices/bus/isa/xtide.h +++ b/src/devices/bus/isa/xtide.h @@ -17,7 +17,7 @@ class xtide_device : public device_t, public device_isa8_card_interface { public: // construction/destruction - xtide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xtide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/bus/isbx/compis_fdc.cpp b/src/devices/bus/isbx/compis_fdc.cpp index b4f72b220ef..f061d933a0d 100644 --- a/src/devices/bus/isbx/compis_fdc.cpp +++ b/src/devices/bus/isbx/compis_fdc.cpp @@ -58,7 +58,7 @@ static void compis_floppies(device_slot_interface &device) void compis_fdc_device::device_add_mconfig(machine_config &config) { - I8272A(config, m_fdc, 8'000'000, true); + I8272A(config, m_fdc, XTAL::u(8'000'000), true); m_fdc->intrq_wr_callback().set(FUNC(compis_fdc_device::fdc_irq)); m_fdc->drq_wr_callback().set(FUNC(compis_fdc_device::fdc_drq)); FLOPPY_CONNECTOR(config, m_floppy0, compis_floppies, "525qd", compis_fdc_device::floppy_formats); @@ -75,7 +75,7 @@ void compis_fdc_device::device_add_mconfig(machine_config &config) // compis_fdc_device - constructor //------------------------------------------------- -compis_fdc_device::compis_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +compis_fdc_device::compis_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMPIS_FDC, tag, owner, clock), device_isbx_card_interface(mconfig, *this), m_fdc(*this, I8272_TAG), diff --git a/src/devices/bus/isbx/compis_fdc.h b/src/devices/bus/isbx/compis_fdc.h index 5e50b3a3696..845803ee907 100644 --- a/src/devices/bus/isbx/compis_fdc.h +++ b/src/devices/bus/isbx/compis_fdc.h @@ -29,7 +29,7 @@ class compis_fdc_device : public device_t, { public: // construction/destruction - compis_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + compis_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isbx/isbc_218a.cpp b/src/devices/bus/isbx/isbc_218a.cpp index 3c1dd92b4fa..227b7bc8942 100644 --- a/src/devices/bus/isbx/isbc_218a.cpp +++ b/src/devices/bus/isbx/isbc_218a.cpp @@ -63,7 +63,7 @@ void isbc_218a_device::device_add_mconfig(machine_config &config) // isbc_218a_device - constructor //------------------------------------------------- -isbc_218a_device::isbc_218a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isbc_218a_device::isbc_218a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISBC_218A, tag, owner, clock), device_isbx_card_interface(mconfig, *this), m_fdc(*this, I8272_TAG), @@ -94,7 +94,7 @@ void isbc_218a_device::device_reset() if(m_fd8) { m_floppy0->get_device()->mon_w(0); - m_fdc->set_rate(500000); + m_fdc->set_rate(XTAL::u(500000)); } } diff --git a/src/devices/bus/isbx/isbc_218a.h b/src/devices/bus/isbx/isbc_218a.h index c654c74aae8..791a3f4601c 100644 --- a/src/devices/bus/isbx/isbc_218a.h +++ b/src/devices/bus/isbx/isbc_218a.h @@ -29,7 +29,7 @@ class isbc_218a_device : public device_t, { public: // construction/destruction - isbc_218a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isbc_218a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/isbx/isbx.cpp b/src/devices/bus/isbx/isbx.cpp index 373d147cadd..2fffdd48aac 100644 --- a/src/devices/bus/isbx/isbx.cpp +++ b/src/devices/bus/isbx/isbx.cpp @@ -38,7 +38,7 @@ device_isbx_card_interface::device_isbx_card_interface(const machine_config &mco // isbx_slot_device - constructor //------------------------------------------------- -isbx_slot_device::isbx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isbx_slot_device::isbx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISBX_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_mintr0(*this), diff --git a/src/devices/bus/isbx/isbx.h b/src/devices/bus/isbx/isbx.h index af9c51aa842..54b151d6f20 100644 --- a/src/devices/bus/isbx/isbx.h +++ b/src/devices/bus/isbx/isbx.h @@ -75,15 +75,15 @@ class isbx_slot_device : public device_t, public device_single_card_slot_interfa public: // construction/destruction template - isbx_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) - : isbx_slot_device(mconfig, tag, owner, clock) + isbx_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) + : isbx_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - isbx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isbx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto mintr0() { return m_write_mintr0.bind(); } auto mintr1() { return m_write_mintr1.bind(); } diff --git a/src/devices/bus/jakks_gamekey/rom.cpp b/src/devices/bus/jakks_gamekey/rom.cpp index 4492d62bddb..07887ee976c 100644 --- a/src/devices/bus/jakks_gamekey/rom.cpp +++ b/src/devices/bus/jakks_gamekey/rom.cpp @@ -13,28 +13,28 @@ DEFINE_DEVICE_TYPE(JAKKS_GAMEKEY_ROM_I2C_BASE, jakks_gamekey_rom_i2c_base_d DEFINE_DEVICE_TYPE(JAKKS_GAMEKEY_ROM_I2C_24LC04, jakks_gamekey_rom_i2c_24lc04_device, "jakks_gamekey_rom_i2c_24lc04", "JAKKS Pacific GameKey with I2C 24LC04") -jakks_gamekey_rom_plain_device::jakks_gamekey_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +jakks_gamekey_rom_plain_device::jakks_gamekey_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_jakks_gamekey_interface(mconfig, *this) { } -jakks_gamekey_rom_plain_device::jakks_gamekey_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +jakks_gamekey_rom_plain_device::jakks_gamekey_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jakks_gamekey_rom_plain_device(mconfig, JAKKS_GAMEKEY_ROM_PLAIN, tag, owner, clock) { } -jakks_gamekey_rom_i2c_base_device::jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +jakks_gamekey_rom_i2c_base_device::jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : jakks_gamekey_rom_plain_device(mconfig, type, tag, owner, clock), m_i2cmem(*this, "i2cmem") { } -jakks_gamekey_rom_i2c_base_device::jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +jakks_gamekey_rom_i2c_base_device::jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jakks_gamekey_rom_i2c_base_device(mconfig, JAKKS_GAMEKEY_ROM_I2C_BASE, tag, owner, clock) { } -jakks_gamekey_rom_i2c_24lc04_device::jakks_gamekey_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +jakks_gamekey_rom_i2c_24lc04_device::jakks_gamekey_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jakks_gamekey_rom_i2c_base_device(mconfig, JAKKS_GAMEKEY_ROM_I2C_24LC04, tag, owner, clock) { } @@ -96,7 +96,7 @@ void jakks_gamekey_rom_i2c_base_device::write_cart_seeprom(offs_t offset, uint16 void jakks_gamekey_rom_i2c_24lc04_device::device_add_mconfig(machine_config &config) { - I2C_24C04(config, "i2cmem", 0); // 24LC04 + I2C_24C04(config, "i2cmem"); // 24LC04 } diff --git a/src/devices/bus/jakks_gamekey/rom.h b/src/devices/bus/jakks_gamekey/rom.h index efd9f8d9c7b..00cb33ff2fd 100644 --- a/src/devices/bus/jakks_gamekey/rom.h +++ b/src/devices/bus/jakks_gamekey/rom.h @@ -15,7 +15,7 @@ class jakks_gamekey_rom_plain_device : public device_t, { public: // construction/destruction - jakks_gamekey_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jakks_gamekey_rom_plain_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_cart(offs_t offset) override; @@ -28,7 +28,7 @@ public: virtual void write_rom(offs_t offset, uint16_t data); protected: - jakks_gamekey_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + jakks_gamekey_rom_plain_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -41,10 +41,10 @@ class jakks_gamekey_rom_i2c_base_device : public jakks_gamekey_rom_plain_device { public: // construction/destruction - jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + jakks_gamekey_rom_i2c_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_rom(offs_t offset) override; @@ -63,7 +63,7 @@ class jakks_gamekey_rom_i2c_24lc04_device : public jakks_gamekey_rom_i2c_base_de { public: // construction/destruction - jakks_gamekey_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jakks_gamekey_rom_i2c_24lc04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/jakks_gamekey/slot.cpp b/src/devices/bus/jakks_gamekey/slot.cpp index 40fd58b0713..f79f0cd3e60 100644 --- a/src/devices/bus/jakks_gamekey/slot.cpp +++ b/src/devices/bus/jakks_gamekey/slot.cpp @@ -54,7 +54,7 @@ void device_jakks_gamekey_interface::rom_alloc(uint32_t size, const char *tag) //------------------------------------------------- // jakks_gamekey_slot_device - constructor //------------------------------------------------- -jakks_gamekey_slot_device::jakks_gamekey_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +jakks_gamekey_slot_device::jakks_gamekey_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JAKKS_GAMEKEY_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/jakks_gamekey/slot.h b/src/devices/bus/jakks_gamekey/slot.h index 0f02ca86e43..01df5981f8f 100644 --- a/src/devices/bus/jakks_gamekey/slot.h +++ b/src/devices/bus/jakks_gamekey/slot.h @@ -54,10 +54,10 @@ class jakks_gamekey_slot_device : public device_t, { public: // construction/destruction - jakks_gamekey_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jakks_gamekey_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - jakks_gamekey_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + jakks_gamekey_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : jakks_gamekey_slot_device(mconfig, tag, owner, clock) { option_reset(); diff --git a/src/devices/bus/kc/d002.cpp b/src/devices/bus/kc/d002.cpp index 288d2278578..73abe806583 100644 --- a/src/devices/bus/kc/d002.cpp +++ b/src/devices/bus/kc/d002.cpp @@ -82,7 +82,7 @@ DEFINE_DEVICE_TYPE(KC_D002, kc_d002_device, "kc_d002", "D002 Bus Driver") // kc_d002_device - constructor //------------------------------------------------- -kc_d002_device::kc_d002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_d002_device::kc_d002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KC_D002, tag, owner, clock) , device_kcexp_interface(mconfig, *this) , m_slot(nullptr) diff --git a/src/devices/bus/kc/d002.h b/src/devices/bus/kc/d002.h index 7db1418bf5f..caf734506b6 100644 --- a/src/devices/bus/kc/d002.h +++ b/src/devices/bus/kc/d002.h @@ -19,7 +19,7 @@ class kc_d002_device : { public: // construction/destruction - kc_d002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_d002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/kc/d004.cpp b/src/devices/bus/kc/d004.cpp index 45905b23b1d..aec2ebf859d 100644 --- a/src/devices/bus/kc/d004.cpp +++ b/src/devices/bus/kc/d004.cpp @@ -104,12 +104,12 @@ DEFINE_DEVICE_TYPE(KC_D004_GIDE, kc_d004_gide_device, "kc_d004_gide", "D004 Flop // kc_d004_device - constructor //------------------------------------------------- -kc_d004_device::kc_d004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_d004_device::kc_d004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_d004_device(mconfig, KC_D004, tag, owner, clock) { } -kc_d004_device::kc_d004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +kc_d004_device::kc_d004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_kcexp_interface( mconfig, *this ), m_cpu(*this, Z80_TAG), @@ -364,7 +364,7 @@ WRITE_LINE_MEMBER(kc_d004_device::fdc_irq) // kc_d004_gide_device - constructor //------------------------------------------------- -kc_d004_gide_device::kc_d004_gide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_d004_gide_device::kc_d004_gide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_d004_device(mconfig, KC_D004_GIDE, tag, owner, clock), m_ata(*this, ATA_TAG), m_ata_data(0), m_lh(0) { diff --git a/src/devices/bus/kc/d004.h b/src/devices/bus/kc/d004.h index 570f378b4fa..4bac03dba67 100644 --- a/src/devices/bus/kc/d004.h +++ b/src/devices/bus/kc/d004.h @@ -26,10 +26,10 @@ class kc_d004_device : { public: // construction/destruction - kc_d004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_d004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - kc_d004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + kc_d004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -89,7 +89,7 @@ class kc_d004_gide_device : { public: // construction/destruction - kc_d004_gide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_d004_gide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/kc/kc.cpp b/src/devices/bus/kc/kc.cpp index 5e2b67cdab3..0a8112b6ad9 100644 --- a/src/devices/bus/kc/kc.cpp +++ b/src/devices/bus/kc/kc.cpp @@ -153,12 +153,12 @@ device_kcexp_interface::~device_kcexp_interface() //------------------------------------------------- // kcexp_slot_device - constructor //------------------------------------------------- -kcexp_slot_device::kcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +kcexp_slot_device::kcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kcexp_slot_device(mconfig, KCEXP_SLOT, tag, owner, clock) { } -kcexp_slot_device::kcexp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +kcexp_slot_device::kcexp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_out_irq_cb(*this), @@ -298,7 +298,7 @@ WRITE_LINE_MEMBER( kcexp_slot_device::meo_w ) //------------------------------------------------- // kccart_slot_device - constructor //------------------------------------------------- -kccart_slot_device::kccart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +kccart_slot_device::kccart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kcexp_slot_device(mconfig, KCCART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this) { diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h index fdb9cd467ce..45c8b52efac 100644 --- a/src/devices/bus/kc/kc.h +++ b/src/devices/bus/kc/kc.h @@ -49,14 +49,14 @@ public: // construction/destruction template kcexp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : kcexp_slot_device(mconfig, tag, owner, (uint32_t)0) + : kcexp_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - kcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~kcexp_slot_device(); auto irq() { return m_out_irq_cb.bind(); } @@ -81,7 +81,7 @@ public: devcb_write_line m_out_halt_cb; protected: - kcexp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + kcexp_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; @@ -100,14 +100,14 @@ public: // construction/destruction template kccart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : kccart_slot_device(mconfig, tag, owner, (uint32_t)0) + : kccart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - kccart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kccart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~kccart_slot_device(); // image-level overrides diff --git a/src/devices/bus/kc/ram.cpp b/src/devices/bus/kc/ram.cpp index 5e69b397508..3c654efd5cb 100644 --- a/src/devices/bus/kc/ram.cpp +++ b/src/devices/bus/kc/ram.cpp @@ -42,12 +42,12 @@ DEFINE_DEVICE_TYPE(KC_M036, kc_m036_device, "kc_m036", "M036 128KB segmented RAM // kc_m011_device - constructor //------------------------------------------------- -kc_m011_device::kc_m011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m011_device::kc_m011_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_m011_device(mconfig, KC_M011, tag, owner, clock) { } -kc_m011_device::kc_m011_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +kc_m011_device::kc_m011_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_kcexp_interface(mconfig, *this) , m_slot(nullptr), m_mei(0), m_ram(nullptr), m_enabled(0), m_write_enabled(0), m_base(0), m_segment(0) @@ -147,7 +147,7 @@ WRITE_LINE_MEMBER( kc_m011_device::mei_w ) // kc_m022_device - constructor //------------------------------------------------- -kc_m022_device::kc_m022_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m022_device::kc_m022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_m011_device(mconfig, KC_M022, tag, owner, clock) { } @@ -192,7 +192,7 @@ void kc_m022_device::write(offs_t offset, uint8_t data) // kc_m032_device - constructor //------------------------------------------------- -kc_m032_device::kc_m032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m032_device::kc_m032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_m011_device(mconfig, KC_M032, tag, owner, clock) { } @@ -261,7 +261,7 @@ void kc_m032_device::write(offs_t offset, uint8_t data) // kc_m034_device - constructor //------------------------------------------------- -kc_m034_device::kc_m034_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m034_device::kc_m034_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_m011_device(mconfig, KC_M034, tag, owner, clock) { } @@ -330,7 +330,7 @@ void kc_m034_device::write(offs_t offset, uint8_t data) // kc_m035_device - constructor //------------------------------------------------- -kc_m035_device::kc_m035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m035_device::kc_m035_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_m011_device(mconfig, KC_M035, tag, owner, clock) { } @@ -388,7 +388,7 @@ void kc_m035_device::write(offs_t offset, uint8_t data) // kc_m036_device - constructor //------------------------------------------------- -kc_m036_device::kc_m036_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m036_device::kc_m036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_m011_device(mconfig, KC_M036, tag, owner, clock) { } diff --git a/src/devices/bus/kc/ram.h b/src/devices/bus/kc/ram.h index 823d32bdb31..93811052d74 100644 --- a/src/devices/bus/kc/ram.h +++ b/src/devices/bus/kc/ram.h @@ -19,10 +19,10 @@ class kc_m011_device : { public: // construction/destruction - kc_m011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m011_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - kc_m011_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + kc_m011_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -59,7 +59,7 @@ class kc_m022_device : { public: // construction/destruction - kc_m022_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // kcexp_interface overrides @@ -80,7 +80,7 @@ class kc_m032_device : { public: // construction/destruction - kc_m032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -105,7 +105,7 @@ class kc_m034_device : { public: // construction/destruction - kc_m034_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m034_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -130,7 +130,7 @@ class kc_m035_device : { public: // construction/destruction - kc_m035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m035_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // kcexp_interface overrides @@ -152,7 +152,7 @@ class kc_m036_device : { public: // construction/destruction - kc_m036_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/kc/rom.cpp b/src/devices/bus/kc/rom.cpp index eca6d6a1907..e431a69f788 100644 --- a/src/devices/bus/kc/rom.cpp +++ b/src/devices/bus/kc/rom.cpp @@ -42,12 +42,12 @@ DEFINE_DEVICE_TYPE(KC_M033, kc_m033_device, "kc_m033", "M033 TypeStar") // kc_8k_device - constructor //------------------------------------------------- -kc_8k_device::kc_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_8k_device::kc_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_8k_device(mconfig, KC_STANDARD, tag, owner, clock) { } -kc_8k_device::kc_8k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +kc_8k_device::kc_8k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_kcexp_interface(mconfig, *this) , m_slot(nullptr), m_mei(0), m_rom(nullptr), m_enabled(0), m_base(0) @@ -142,7 +142,7 @@ WRITE_LINE_MEMBER( kc_8k_device::mei_w ) // kc_m006_device - constructor //------------------------------------------------- -kc_m006_device::kc_m006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m006_device::kc_m006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_8k_device(mconfig, KC_M006, tag, owner, clock) { } @@ -184,7 +184,7 @@ void kc_m006_device::read(offs_t offset, uint8_t &data) // kc_m033_device - constructor //------------------------------------------------- -kc_m033_device::kc_m033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kc_m033_device::kc_m033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc_8k_device(mconfig, KC_M033, tag, owner, clock) , m_bank(0) { diff --git a/src/devices/bus/kc/rom.h b/src/devices/bus/kc/rom.h index 024969d68b4..cb6ae70e072 100644 --- a/src/devices/bus/kc/rom.h +++ b/src/devices/bus/kc/rom.h @@ -19,10 +19,10 @@ class kc_8k_device : { public: // construction/destruction - kc_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - kc_8k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + kc_8k_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -54,7 +54,7 @@ class kc_m006_device : { public: // construction/destruction - kc_m006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // kcexp_interface overrides @@ -71,7 +71,7 @@ class kc_m033_device : { public: // construction/destruction - kc_m033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_m033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/lpci/cirrus.cpp b/src/devices/bus/lpci/cirrus.cpp index 659d39677a9..5ed7602e1d2 100644 --- a/src/devices/bus/lpci/cirrus.cpp +++ b/src/devices/bus/lpci/cirrus.cpp @@ -83,7 +83,7 @@ DEFINE_DEVICE_TYPE(PCI_CIRRUS_SVGA, pci_cirrus_svga_device, "pci_cirrus_svga", " // pci_cirrus_svga_device - constructor //------------------------------------------------- -pci_cirrus_svga_device::pci_cirrus_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pci_cirrus_svga_device::pci_cirrus_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCI_CIRRUS_SVGA, tag, owner, clock) , pci_device_interface(mconfig, *this) , m_vga(*this, "vga") diff --git a/src/devices/bus/lpci/cirrus.h b/src/devices/bus/lpci/cirrus.h index 9f158a79178..786132c1c7c 100644 --- a/src/devices/bus/lpci/cirrus.h +++ b/src/devices/bus/lpci/cirrus.h @@ -21,7 +21,7 @@ class pci_cirrus_svga_device : public device_t, public pci_device_interface { public: // construction/destruction - pci_cirrus_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_cirrus_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_vga(T &&tag) { m_vga.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/lpci/i82371ab.cpp b/src/devices/bus/lpci/i82371ab.cpp index 6d9a1c72bc3..2ef0dda0839 100644 --- a/src/devices/bus/lpci/i82371ab.cpp +++ b/src/devices/bus/lpci/i82371ab.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(I82371AB, i82371ab_device, "i82371ab", "Intel 82371AB") -i82371ab_device::i82371ab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82371ab_device::i82371ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : southbridge_extended_device(mconfig, I82371AB, tag, owner, clock) , pci_device_interface(mconfig, *this) { diff --git a/src/devices/bus/lpci/i82371ab.h b/src/devices/bus/lpci/i82371ab.h index 5080c135145..7e570bda6c4 100644 --- a/src/devices/bus/lpci/i82371ab.h +++ b/src/devices/bus/lpci/i82371ab.h @@ -23,7 +23,7 @@ class i82371ab_device : public southbridge_extended_device, { public: // construction/destruction - i82371ab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82371ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t pci_read(pci_bus_device *pcibus, int function, int offset, uint32_t mem_mask) override; virtual void pci_write(pci_bus_device *pcibus, int function, int offset, uint32_t data, uint32_t mem_mask) override; diff --git a/src/devices/bus/lpci/i82371sb.cpp b/src/devices/bus/lpci/i82371sb.cpp index 425fc563364..f38530f8f58 100644 --- a/src/devices/bus/lpci/i82371sb.cpp +++ b/src/devices/bus/lpci/i82371sb.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(I82371SB, i82371sb_device, "i82371sb", "Intel 82371SB") -i82371sb_device::i82371sb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82371sb_device::i82371sb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : southbridge_device(mconfig, I82371SB, tag, owner, clock) , pci_device_interface( mconfig, *this ) , m_smi_callback(*this) diff --git a/src/devices/bus/lpci/i82371sb.h b/src/devices/bus/lpci/i82371sb.h index 1b70d33857b..2f4a2e66c1b 100644 --- a/src/devices/bus/lpci/i82371sb.h +++ b/src/devices/bus/lpci/i82371sb.h @@ -22,7 +22,7 @@ class i82371sb_device : public southbridge_device, public pci_device_interface { public: // construction/destruction - i82371sb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82371sb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/lpci/i82439tx.cpp b/src/devices/bus/lpci/i82439tx.cpp index 0966456831a..4dd49dde714 100644 --- a/src/devices/bus/lpci/i82439tx.cpp +++ b/src/devices/bus/lpci/i82439tx.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(I82439TX_LEGACY, i82439tx_device, "i82439tx_legacy", "Intel 82439TX") -i82439tx_device::i82439tx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i82439tx_device::i82439tx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : northbridge_device(mconfig, I82439TX_LEGACY, tag, owner, clock), pci_device_interface(mconfig, *this), m_region_tag(nullptr), diff --git a/src/devices/bus/lpci/i82439tx.h b/src/devices/bus/lpci/i82439tx.h index af5a0dcf757..4c684124040 100644 --- a/src/devices/bus/lpci/i82439tx.h +++ b/src/devices/bus/lpci/i82439tx.h @@ -22,7 +22,7 @@ class i82439tx_device : public northbridge_device, public pci_device_interface { public: // construction/destruction - i82439tx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82439tx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_region(const char *tag) { m_region_tag = tag; } diff --git a/src/devices/bus/lpci/mpc105.cpp b/src/devices/bus/lpci/mpc105.cpp index de6eee2dcce..4f69fdb1f6f 100644 --- a/src/devices/bus/lpci/mpc105.cpp +++ b/src/devices/bus/lpci/mpc105.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(MPC105, mpc105_device, "mpc105", "Motorola MPC105") // mpc105_device - constructor //------------------------------------------------- -mpc105_device::mpc105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpc105_device::mpc105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MPC105, tag, owner, clock), pci_device_interface( mconfig, *this ), m_bank_base_default(0), diff --git a/src/devices/bus/lpci/mpc105.h b/src/devices/bus/lpci/mpc105.h index e469168189d..c4642ad5f10 100644 --- a/src/devices/bus/lpci/mpc105.h +++ b/src/devices/bus/lpci/mpc105.h @@ -26,7 +26,7 @@ class mpc105_device : public device_t, { public: // construction/destruction - mpc105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpc105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_maincpu.set_tag(std::forward(tag)); } void set_bank_base_default(int bank_base_default) { m_bank_base_default = bank_base_default; } diff --git a/src/devices/bus/lpci/northbridge.cpp b/src/devices/bus/lpci/northbridge.cpp index 0384a9637e4..1181929c872 100644 --- a/src/devices/bus/lpci/northbridge.cpp +++ b/src/devices/bus/lpci/northbridge.cpp @@ -13,7 +13,7 @@ // GLOBAL VARIABLES //************************************************************************** -northbridge_device::northbridge_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) +northbridge_device::northbridge_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_cpu(*this, finder_base::DUMMY_TAG), m_ram(*this, ":" RAM_TAG) diff --git a/src/devices/bus/lpci/northbridge.h b/src/devices/bus/lpci/northbridge.h index 36282d93a9c..49174e07575 100644 --- a/src/devices/bus/lpci/northbridge.h +++ b/src/devices/bus/lpci/northbridge.h @@ -22,7 +22,7 @@ public: protected: // construction/destruction - northbridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + northbridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/lpci/pci.cpp b/src/devices/bus/lpci/pci.cpp index 34470bfa4f9..56a9da9f2a9 100644 --- a/src/devices/bus/lpci/pci.cpp +++ b/src/devices/bus/lpci/pci.cpp @@ -89,7 +89,7 @@ DEFINE_DEVICE_TYPE(PCI_BUS, pci_bus_device, "pci_bus", "PCI Bus") //------------------------------------------------- // pci_bus_device - constructor //------------------------------------------------- -pci_bus_device::pci_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pci_bus_device::pci_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCI_BUS, tag, owner, clock), m_busnum(0), m_address(0), m_devicenum(0), m_busnumber(0), m_busnumaddr(nullptr), m_father(*this, finder_base::DUMMY_TAG) @@ -328,7 +328,7 @@ pci_device_interface::~pci_device_interface() DEFINE_DEVICE_TYPE(PCI_CONNECTOR, pci_connector_device, "pci_connector", "PCI device connector abstraction") -pci_connector_device::pci_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pci_connector_device::pci_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCI_CONNECTOR, tag, owner, clock), device_single_card_slot_interface(mconfig, *this) { diff --git a/src/devices/bus/lpci/pci.h b/src/devices/bus/lpci/pci.h index f962ddd6ff7..b9a647852f5 100644 --- a/src/devices/bus/lpci/pci.h +++ b/src/devices/bus/lpci/pci.h @@ -45,14 +45,14 @@ class pci_connector_device : public device_t, public: template pci_connector_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool fixed) - : pci_connector_device(mconfig, tag, owner, (uint32_t)0) + : pci_connector_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(fixed); } - pci_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pci_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~pci_connector_device(); pci_device_interface *get_device(); @@ -69,7 +69,7 @@ class pci_bus_device : public device_t { public: // construction/destruction - pci_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset, uint32_t mem_mask = ~0); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/bus/lpci/southbridge.cpp b/src/devices/bus/lpci/southbridge.cpp index 2f9faa4aab0..33ded5cf5d4 100644 --- a/src/devices/bus/lpci/southbridge.cpp +++ b/src/devices/bus/lpci/southbridge.cpp @@ -27,7 +27,7 @@ void southbridge_device::device_add_mconfig(machine_config &config) { - PIT8254(config, m_pit8254, 0); + PIT8254(config, m_pit8254); m_pit8254->set_clk<0>(4772720/4); // heartbeat IRQ m_pit8254->out_handler<0>().set(FUNC(southbridge_device::at_pit8254_out0_changed)); m_pit8254->set_clk<1>(4772720/4); // DRAM refresh @@ -68,12 +68,12 @@ void southbridge_device::device_add_mconfig(machine_config &config) m_dma8237_2->out_dack_callback<2>().set(FUNC(southbridge_device::pc_dack6_w)); m_dma8237_2->out_dack_callback<3>().set(FUNC(southbridge_device::pc_dack7_w)); - PIC8259(config, m_pic8259_master, 0); + PIC8259(config, m_pic8259_master); m_pic8259_master->out_int_callback().set_inputline(m_maincpu, 0); m_pic8259_master->in_sp_callback().set_constant(1); m_pic8259_master->read_slave_ack_callback().set(FUNC(southbridge_device::get_slave_ack)); - PIC8259(config, m_pic8259_slave, 0); + PIC8259(config, m_pic8259_slave); m_pic8259_slave->out_int_callback().set(m_pic8259_master, FUNC(pic8259_device::ir2_w)); m_pic8259_slave->in_sp_callback().set_constant(0); @@ -89,7 +89,7 @@ void southbridge_device::device_add_mconfig(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - ISA16(config, m_isabus, 0); + ISA16(config, m_isabus); m_isabus->set_memspace(":maincpu", AS_PROGRAM); m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq3_callback().set("pic8259_master", FUNC(pic8259_device::ir3_w)); @@ -113,7 +113,7 @@ void southbridge_device::device_add_mconfig(machine_config &config) m_isabus->iochck_callback().set(FUNC(southbridge_device::iochck_w)); } -southbridge_device::southbridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +southbridge_device::southbridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_maincpu(*this, ":maincpu"), m_pic8259_master(*this, "pic8259_master"), @@ -536,12 +536,12 @@ void southbridge_extended_device::device_add_mconfig(machine_config &config) rtc.set_century_index(0x32); // on board devices - ISA16_SLOT(config, "board1", 0, "isabus", pc_isa_onboard, "fdcsmc", true); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "board2", 0, "isabus", pc_isa_onboard, "comat", true); - ISA16_SLOT(config, "board3", 0, "isabus", pc_isa_onboard, "lpt", true); + ISA16_SLOT(config, "board1", "isabus", pc_isa_onboard, "fdcsmc", true); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "board2", "isabus", pc_isa_onboard, "comat", true); + ISA16_SLOT(config, "board3", "isabus", pc_isa_onboard, "lpt", true); } -southbridge_extended_device::southbridge_extended_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +southbridge_extended_device::southbridge_extended_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : southbridge_device(mconfig, type, tag, owner, clock), m_keybc(*this, "keybc"), m_ds12885(*this, "rtc"), diff --git a/src/devices/bus/lpci/southbridge.h b/src/devices/bus/lpci/southbridge.h index 92953a5df0f..d4871ba1651 100644 --- a/src/devices/bus/lpci/southbridge.h +++ b/src/devices/bus/lpci/southbridge.h @@ -42,7 +42,7 @@ public: protected: // construction/destruction - southbridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + southbridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -146,7 +146,7 @@ public: protected: // construction/destruction - southbridge_extended_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + southbridge_extended_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/lpci/vt82c505.cpp b/src/devices/bus/lpci/vt82c505.cpp index a7bad9cc0a2..6de6e9b7cf0 100644 --- a/src/devices/bus/lpci/vt82c505.cpp +++ b/src/devices/bus/lpci/vt82c505.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(VT82C505, vt82c505_device, "vt82c505_device", "VIA VT82C505 PCI bridge") -vt82c505_device::vt82c505_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vt82c505_device::vt82c505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VT82C505, tag, owner, clock) , pci_device_interface(mconfig, *this) { diff --git a/src/devices/bus/lpci/vt82c505.h b/src/devices/bus/lpci/vt82c505.h index bbe790781d2..28138781f92 100644 --- a/src/devices/bus/lpci/vt82c505.h +++ b/src/devices/bus/lpci/vt82c505.h @@ -15,7 +15,7 @@ class vt82c505_device : public device_t, public pci_device_interface { public: // construction/destruction - vt82c505_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vt82c505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t pci_read(pci_bus_device *pcibus, int function, int offset, uint32_t mem_mask) override; virtual void pci_write(pci_bus_device *pcibus, int function, int offset, uint32_t data, uint32_t mem_mask) override; diff --git a/src/devices/bus/m5/rom.cpp b/src/devices/bus/m5/rom.cpp index fbf80f5ce29..f619e912b20 100644 --- a/src/devices/bus/m5/rom.cpp +++ b/src/devices/bus/m5/rom.cpp @@ -21,19 +21,19 @@ DEFINE_DEVICE_TYPE(M5_ROM_STD, m5_rom_device, "m5_rom", "M5 Standard ROM Carts") DEFINE_DEVICE_TYPE(M5_ROM_RAM, m5_ram_device, "m5_ram", "M5 Expansion memory cart") -m5_rom_device::m5_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +m5_rom_device::m5_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_m5_cart_interface(mconfig, *this) { } -m5_rom_device::m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m5_rom_device::m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m5_rom_device(mconfig, M5_ROM_STD, tag, owner, clock) { } -m5_ram_device::m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m5_ram_device::m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m5_rom_device(mconfig, M5_ROM_RAM, tag, owner, clock) { } diff --git a/src/devices/bus/m5/rom.h b/src/devices/bus/m5/rom.h index 890f111cca8..27e537f6735 100644 --- a/src/devices/bus/m5/rom.h +++ b/src/devices/bus/m5/rom.h @@ -15,7 +15,7 @@ class m5_rom_device : public device_t, { public: // construction/destruction - m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override {} @@ -25,7 +25,7 @@ public: virtual uint8_t read_rom(offs_t offset) override; protected: - m5_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m5_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> m5_ram_device @@ -34,7 +34,7 @@ class m5_ram_device : public m5_rom_device { public: // construction/destruction - m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_ram(offs_t offset) override; diff --git a/src/devices/bus/m5/slot.cpp b/src/devices/bus/m5/slot.cpp index f82ba409d1e..0a84e25e320 100644 --- a/src/devices/bus/m5/slot.cpp +++ b/src/devices/bus/m5/slot.cpp @@ -71,7 +71,7 @@ void device_m5_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- // m5_cart_slot_device - constructor //------------------------------------------------- -m5_cart_slot_device::m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m5_cart_slot_device::m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M5_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h index 4f0d578cf1b..7518065470c 100644 --- a/src/devices/bus/m5/slot.h +++ b/src/devices/bus/m5/slot.h @@ -68,7 +68,7 @@ public: // construction/destruction template m5_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : m5_cart_slot_device(mconfig, tag, owner, 0) + : m5_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -76,7 +76,7 @@ public: set_fixed(false); } - m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~m5_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/mackbd/keyboard.cpp b/src/devices/bus/mackbd/keyboard.cpp index bda86980a05..8186b13dec6 100644 --- a/src/devices/bus/mackbd/keyboard.cpp +++ b/src/devices/bus/mackbd/keyboard.cpp @@ -256,7 +256,7 @@ public: } protected: - peripheral_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) + peripheral_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_mac_keyboard_interface(mconfig, *this) , m_mpu{ *this, "mpu" } @@ -271,7 +271,7 @@ protected: virtual void device_add_mconfig(machine_config &config) override { - I8021(config, m_mpu, 3'000'000); // 100µH inductor gives approximately 3MHz + I8021(config, m_mpu, XTAL::u(3'000'000)); // 100µH inductor gives approximately 3MHz m_mpu->p0_out_cb().set(FUNC(peripheral_base::host_clock_w)).bit(7); m_mpu->p2_out_cb().set(FUNC(peripheral_base::host_data_w)).bit(0); } @@ -383,7 +383,7 @@ private: class keyboard_base : public peripheral_base<9> { protected: - keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) + keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : peripheral_base<9>(mconfig, type, tag, owner, clock) { } @@ -416,7 +416,7 @@ public: } protected: - keypad_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) + keypad_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : peripheral_base<3>(mconfig, type, tag, owner, clock) , m_keyboard_port(*this, "kbd") { @@ -722,7 +722,7 @@ INPUT_PORTS_END class m0110_device : public keyboard_base { public: - m0110_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0110_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keyboard_base(mconfig, MACKBD_M0110, tag, owner, clock) { } @@ -737,7 +737,7 @@ protected: class m0110b_device : public keyboard_base { public: - m0110b_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0110b_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keyboard_base(mconfig, MACKBD_M0110B, tag, owner, clock) { } @@ -754,7 +754,7 @@ protected: class m0110f_device : public keyboard_base { public: - m0110f_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0110f_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keyboard_base(mconfig, MACKBD_M0110F, tag, owner, clock) { } @@ -771,7 +771,7 @@ protected: class m0110t_device : public keyboard_base { public: - m0110t_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0110t_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keyboard_base(mconfig, MACKBD_M0110T, tag, owner, clock) { } @@ -840,7 +840,7 @@ INPUT_PORTS_END class m0120_device : public keypad_base { public: - m0120_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0120_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keypad_base(mconfig, MACKBD_M0120, tag, owner, clock) { } @@ -857,7 +857,7 @@ protected: class m0120p_device : public keypad_base { public: - m0120p_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0120p_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keypad_base(mconfig, MACKBD_M0120P, tag, owner, clock) { } diff --git a/src/devices/bus/mackbd/mackbd.cpp b/src/devices/bus/mackbd/mackbd.cpp index 0e13787c9cf..853fbac9a6d 100644 --- a/src/devices/bus/mackbd/mackbd.cpp +++ b/src/devices/bus/mackbd/mackbd.cpp @@ -99,7 +99,7 @@ DEFINE_DEVICE_TYPE(MAC_KEYBOARD_PORT, mac_keyboard_port_device, "mackbd_port", " // HOST PORT //************************************************************************** -mac_keyboard_port_device::mac_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +mac_keyboard_port_device::mac_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MAC_KEYBOARD_PORT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_clock_cb{ *this } diff --git a/src/devices/bus/mackbd/mackbd.h b/src/devices/bus/mackbd/mackbd.h index 29be2d6e4ea..f436cca402d 100644 --- a/src/devices/bus/mackbd/mackbd.h +++ b/src/devices/bus/mackbd/mackbd.h @@ -33,14 +33,14 @@ class mac_keyboard_port_device : public device_t, public device_single_card_slot public: template mac_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : mac_keyboard_port_device(mconfig, tag, owner, 0U) + : mac_keyboard_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - mac_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0U); + mac_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~mac_keyboard_port_device() override; auto clock_cb() { return m_clock_cb.bind(); } diff --git a/src/devices/bus/mackbd/pluskbd.cpp b/src/devices/bus/mackbd/pluskbd.cpp index de744f9219b..a477b1b3205 100644 --- a/src/devices/bus/mackbd/pluskbd.cpp +++ b/src/devices/bus/mackbd/pluskbd.cpp @@ -114,7 +114,7 @@ public: } protected: - keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) + keyboard_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_mac_keyboard_interface(mconfig, *this) , m_mpu{ *this, "mpu" } @@ -455,7 +455,7 @@ INPUT_PORTS_END class m0110a_device : public keyboard_base { public: - m0110a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0110a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keyboard_base(mconfig, MACKBD_M0110A, tag, owner, clock) { } @@ -470,7 +470,7 @@ protected: class m0110a_f_device : public keyboard_base { public: - m0110a_f_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0110a_f_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keyboard_base(mconfig, MACKBD_M0110A_F, tag, owner, clock) { } @@ -487,7 +487,7 @@ protected: class m0110a_j_device : public keyboard_base { public: - m0110a_j_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + m0110a_j_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : keyboard_base(mconfig, MACKBD_M0110A_J, tag, owner, clock) { } diff --git a/src/devices/bus/macpds/hyperdrive.cpp b/src/devices/bus/macpds/hyperdrive.cpp index ac688a1a620..329ac587efa 100644 --- a/src/devices/bus/macpds/hyperdrive.cpp +++ b/src/devices/bus/macpds/hyperdrive.cpp @@ -106,7 +106,7 @@ DEFINE_DEVICE_TYPE(PDS_HYPERDRIVE, macpds_hyperdrive_device, "pds_hyper", "GCC H void macpds_hyperdrive_device::device_add_mconfig(machine_config &config) { - WD2010(config, m_hdc, 5000000); + WD2010(config, m_hdc, XTAL::u(5000000)); // m_hdc->out_bcr_callback().set(FUNC(macpds_hyperdrive_device::clct_w)); m_hdc->in_bcs_callback().set(FUNC(macpds_hyperdrive_device::hdd_r)); m_hdc->out_bcs_callback().set(FUNC(macpds_hyperdrive_device::hdd_w)); @@ -116,7 +116,7 @@ void macpds_hyperdrive_device::device_add_mconfig(machine_config &config) m_hdc->in_tk000_callback().set_constant(1); m_hdc->in_sc_callback().set_constant(1); - HARDDISK(config, "hard0", 0); + HARDDISK(config, "hard0"); } //------------------------------------------------- @@ -136,12 +136,12 @@ const tiny_rom_entry *macpds_hyperdrive_device::device_rom_region() const // macpds_hyperdrive_device - constructor //------------------------------------------------- -macpds_hyperdrive_device::macpds_hyperdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +macpds_hyperdrive_device::macpds_hyperdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : macpds_hyperdrive_device(mconfig, PDS_HYPERDRIVE, tag, owner, clock) { } -macpds_hyperdrive_device::macpds_hyperdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +macpds_hyperdrive_device::macpds_hyperdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_macpds_card_interface(mconfig, *this), m_hdc(*this, "wd2010") diff --git a/src/devices/bus/macpds/hyperdrive.h b/src/devices/bus/macpds/hyperdrive.h index d8bc4bc5883..fd6e4635872 100644 --- a/src/devices/bus/macpds/hyperdrive.h +++ b/src/devices/bus/macpds/hyperdrive.h @@ -21,12 +21,12 @@ class macpds_hyperdrive_device : { public: // construction/destruction - macpds_hyperdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + macpds_hyperdrive_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::DISK; } protected: - macpds_hyperdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + macpds_hyperdrive_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/macpds/macpds.cpp b/src/devices/bus/macpds/macpds.cpp index 036cb51bf1f..bf9e3ccb724 100644 --- a/src/devices/bus/macpds/macpds.cpp +++ b/src/devices/bus/macpds/macpds.cpp @@ -25,12 +25,12 @@ DEFINE_DEVICE_TYPE(MACPDS_SLOT, macpds_slot_device, "macpds_slot", "Mac 68000 Pr //------------------------------------------------- // macpds_slot_device - constructor //------------------------------------------------- -macpds_slot_device::macpds_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +macpds_slot_device::macpds_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : macpds_slot_device(mconfig, MACPDS_SLOT, tag, owner, clock) { } -macpds_slot_device::macpds_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +macpds_slot_device::macpds_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_slot_interface(mconfig, *this), m_macpds(*this, finder_base::DUMMY_TAG) @@ -62,12 +62,12 @@ DEFINE_DEVICE_TYPE(MACPDS, macpds_device, "macpds", "Mac 68000 Processor-Direct // macpds_device - constructor //------------------------------------------------- -macpds_device::macpds_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +macpds_device::macpds_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : macpds_device(mconfig, MACPDS, tag, owner, clock) { } -macpds_device::macpds_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +macpds_device::macpds_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_maincpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/bus/macpds/macpds.h b/src/devices/bus/macpds/macpds.h index ad0ce6a2416..a2627706eff 100644 --- a/src/devices/bus/macpds/macpds.h +++ b/src/devices/bus/macpds/macpds.h @@ -26,7 +26,7 @@ public: // construction/destruction template macpds_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *nbtag, T &&opts, const char *dflt) - : macpds_slot_device(mconfig, tag, owner, (uint32_t)0) + : macpds_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -34,14 +34,14 @@ public: set_macpds_slot(nbtag); } - macpds_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + macpds_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template void set_macpds_slot(T &&tag) { m_macpds.set_tag(std::forward(tag));} protected: - macpds_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + macpds_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -62,12 +62,12 @@ class macpds_device : public device_t public: // construction/destruction macpds_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *cputag) - : macpds_device(mconfig, tag, owner, (uint32_t)0) + : macpds_device(mconfig, tag, owner) { set_cputag(cputag); } - macpds_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + macpds_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ~macpds_device() { m_device_list.detach_all(); } // inline configuration @@ -81,7 +81,7 @@ public: void set_irq_line(int line, int state); protected: - macpds_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + macpds_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp index c6eeb68c466..babde5b808a 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.cpp +++ b/src/devices/bus/macpds/pds_tpdfpd.cpp @@ -82,12 +82,12 @@ const tiny_rom_entry *macpds_sedisplay_device::device_rom_region() const // macpds_sedisplay_device - constructor //------------------------------------------------- -macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : macpds_sedisplay_device(mconfig, PDS_SEDISPLAY, tag, owner, clock) { } -macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_macpds_card_interface(mconfig, *this), diff --git a/src/devices/bus/macpds/pds_tpdfpd.h b/src/devices/bus/macpds/pds_tpdfpd.h index 3b9fd803c7e..5380a2d8568 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.h +++ b/src/devices/bus/macpds/pds_tpdfpd.h @@ -20,10 +20,10 @@ class macpds_sedisplay_device : { public: // construction/destruction - macpds_sedisplay_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + macpds_sedisplay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - macpds_sedisplay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + macpds_sedisplay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/mc10/mc10_cart.cpp b/src/devices/bus/mc10/mc10_cart.cpp index cd10e800410..f36e8af44d5 100644 --- a/src/devices/bus/mc10/mc10_cart.cpp +++ b/src/devices/bus/mc10/mc10_cart.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(MC10CART_SLOT, mc10cart_slot_device, "mc10cart_slot", "MC-10 //------------------------------------------------- // mc10cart_slot_device - constructor //------------------------------------------------- -mc10cart_slot_device::mc10cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mc10cart_slot_device::mc10cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC10CART_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/mc10/mc10_cart.h b/src/devices/bus/mc10/mc10_cart.h index 4a4fc02df7c..6d2bfdaf586 100644 --- a/src/devices/bus/mc10/mc10_cart.h +++ b/src/devices/bus/mc10/mc10_cart.h @@ -31,7 +31,7 @@ public: // construction/destruction template - mc10cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt) + mc10cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : mc10cart_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -40,7 +40,7 @@ public: set_fixed(false); } - mc10cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc10cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_memspace(T &&tag, int spacenum) { m_memspace.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/mc10/mcx128.cpp b/src/devices/bus/mc10/mcx128.cpp index d507ad612c5..2245c4544cf 100644 --- a/src/devices/bus/mc10/mcx128.cpp +++ b/src/devices/bus/mc10/mcx128.cpp @@ -66,11 +66,11 @@ class mc10_pak_mcx128_device : { public: // construction/destruction - mc10_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc10_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - mc10_pak_mcx128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + mc10_pak_mcx128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -114,12 +114,12 @@ DEFINE_DEVICE_TYPE_PRIVATE(MC10_PAK_MCX128, device_mc10cart_interface, mc10_pak_ // mc10_pak_device - constructor //------------------------------------------------- -mc10_pak_mcx128_device::mc10_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc10_pak_mcx128_device::mc10_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :mc10_pak_mcx128_device(mconfig, MC10_PAK_MCX128, tag, owner, clock) { } -mc10_pak_mcx128_device::mc10_pak_mcx128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +mc10_pak_mcx128_device::mc10_pak_mcx128_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_mc10cart_interface(mconfig, *this) , m_share(*this, "ext_ram", 1024*128, ENDIANNESS_BIG) @@ -349,7 +349,7 @@ class alice_pak_mcx128_device : public mc10_pak_mcx128_device { public: // construction/destruction - alice_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + alice_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -363,7 +363,7 @@ protected: // mc10_pak_device - constructor //------------------------------------------------- -alice_pak_mcx128_device::alice_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +alice_pak_mcx128_device::alice_pak_mcx128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc10_pak_mcx128_device(mconfig, ALICE_PAK_MCX128, tag, owner, clock) { } diff --git a/src/devices/bus/mc10/pak.cpp b/src/devices/bus/mc10/pak.cpp index 8e27d58ab8b..6f85e0a186d 100644 --- a/src/devices/bus/mc10/pak.cpp +++ b/src/devices/bus/mc10/pak.cpp @@ -24,13 +24,13 @@ DEFINE_DEVICE_TYPE(MC10_PAK, mc10_pak_device, "mc10pak", "MC-10 Program PAK") //------------------------------------------------- // mc10_pak_device - constructor //------------------------------------------------- -mc10_pak_device::mc10_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +mc10_pak_device::mc10_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_mc10cart_interface(mconfig, *this) { } -mc10_pak_device::mc10_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc10_pak_device::mc10_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc10_pak_device(mconfig, MC10_PAK, tag, owner, clock) { } diff --git a/src/devices/bus/mc10/pak.h b/src/devices/bus/mc10/pak.h index 797cea2f691..9d7782c36e1 100644 --- a/src/devices/bus/mc10/pak.h +++ b/src/devices/bus/mc10/pak.h @@ -19,13 +19,13 @@ class mc10_pak_device : { public: // construction/destruction - mc10_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc10_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int max_rom_length() const override; virtual image_init_result load() override; protected: - mc10_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + mc10_pak_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/mc10/ram.cpp b/src/devices/bus/mc10/ram.cpp index f6a6f488955..a73ee28e832 100644 --- a/src/devices/bus/mc10/ram.cpp +++ b/src/devices/bus/mc10/ram.cpp @@ -31,7 +31,7 @@ namespace { public: // construction/destruction - mc10_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc10_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE_PRIVATE(MC10_PAK_RAM, device_mc10cart_interface, mc10_pak_ram // mc10_pak_device - constructor //------------------------------------------------- -mc10_pak_ram_device::mc10_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc10_pak_ram_device::mc10_pak_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC10_PAK_RAM, tag, owner, clock) , device_mc10cart_interface(mconfig, *this) , m_share(*this, "ext_ram", 1024*16, ENDIANNESS_BIG) diff --git a/src/devices/bus/megadrive/eeprom.cpp b/src/devices/bus/megadrive/eeprom.cpp index 533d5d540fa..ceebbdc0449 100644 --- a/src/devices/bus/megadrive/eeprom.cpp +++ b/src/devices/bus/megadrive/eeprom.cpp @@ -62,49 +62,49 @@ DEFINE_DEVICE_TYPE(MD_EEPROM_BLARA, md_eeprom_blara_device, "md_eeprom_bla DEFINE_DEVICE_TYPE(MD_EEPROM_MODE1, md_eeprom_mode1_device, "md_eeprom_mode1", "MD Serial EEPROM Mode 1") -md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_md_cart_interface(mconfig, *this) , m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0) { } -md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_std_eeprom_device::md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_STD_EEPROM, tag, owner, clock) { } -md_eeprom_nbajam_device::md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_nbajam_device::md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_NBAJAM, tag, owner, clock) { } -md_eeprom_nbajamte_device::md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_nbajamte_device::md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_NBAJAMTE, tag, owner, clock) { } -md_eeprom_nflqb_device::md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_nflqb_device::md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_NFLQB, tag, owner, clock) { } -md_eeprom_cslam_device::md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_cslam_device::md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_CSLAM, tag, owner, clock) { } -md_eeprom_nhlpa_device::md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_nhlpa_device::md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_NHLPA, tag, owner, clock) { } -md_eeprom_blara_device::md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_blara_device::md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_BLARA, tag, owner, clock) { } -md_eeprom_mode1_device::md_eeprom_mode1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_mode1_device::md_eeprom_mode1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_MODE1, tag, owner, clock) { } @@ -363,7 +363,7 @@ void md_eeprom_blara_device::write(offs_t offset, uint16_t data, uint16_t mem_ma DEFINE_DEVICE_TYPE(MD_EEPROM_NBAJAM_ALT, md_eeprom_nbajam_alt_device, "md_eeprom_nbajama", "MD NBA Jam (Alt)") -md_eeprom_nbajam_alt_device::md_eeprom_nbajam_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_nbajam_alt_device::md_eeprom_nbajam_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_eeprom_device(mconfig, MD_EEPROM_NBAJAM_ALT, tag, owner, clock) { } diff --git a/src/devices/bus/megadrive/eeprom.h b/src/devices/bus/megadrive/eeprom.h index 7f5b0e450a4..9c0fe1dc10d 100644 --- a/src/devices/bus/megadrive/eeprom.h +++ b/src/devices/bus/megadrive/eeprom.h @@ -20,10 +20,10 @@ class md_std_eeprom_device : public device_t, { public: // construction/destruction - md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - md_std_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_std_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -44,7 +44,7 @@ class md_eeprom_nbajam_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -61,7 +61,7 @@ class md_eeprom_nbajamte_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -78,7 +78,7 @@ class md_eeprom_cslam_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -95,7 +95,7 @@ class md_eeprom_nflqb_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -112,7 +112,7 @@ class md_eeprom_nhlpa_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -129,7 +129,7 @@ class md_eeprom_blara_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -146,7 +146,7 @@ class md_eeprom_mode1_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_mode1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_mode1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -185,7 +185,7 @@ class md_eeprom_nbajam_alt_device : public md_std_eeprom_device { public: // construction/destruction - md_eeprom_nbajam_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_nbajam_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; diff --git a/src/devices/bus/megadrive/ggenie.cpp b/src/devices/bus/megadrive/ggenie.cpp index e4df6f8ef29..87ab9b8aaa4 100644 --- a/src/devices/bus/megadrive/ggenie.cpp +++ b/src/devices/bus/megadrive/ggenie.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(MD_ROM_GAMEGENIE, md_rom_ggenie_device, "md_ggenie", "MD Game Genie") -md_rom_ggenie_device::md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_ggenie_device::md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MD_ROM_GAMEGENIE, tag, owner, clock) , device_md_cart_interface(mconfig, *this) , m_exp(*this, "subslot") diff --git a/src/devices/bus/megadrive/ggenie.h b/src/devices/bus/megadrive/ggenie.h index 025f97fac7f..65d0cf518c2 100644 --- a/src/devices/bus/megadrive/ggenie.h +++ b/src/devices/bus/megadrive/ggenie.h @@ -15,7 +15,7 @@ class md_rom_ggenie_device : public device_t, { public: // construction/destruction - md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/megadrive/jcart.cpp b/src/devices/bus/megadrive/jcart.cpp index d41116d762e..4cb3ca75876 100644 --- a/src/devices/bus/megadrive/jcart.cpp +++ b/src/devices/bus/megadrive/jcart.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(MD_SEPROM_CODEMAST, md_seprom_codemast_device, "md_seprom_cod DEFINE_DEVICE_TYPE(MD_SEPROM_MM96, md_seprom_mm96_device, "md_seprom_mm96", "MD Micro Machine 96") // Sampras, Super Skidmarks? -md_jcart_device::md_jcart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_jcart_device::md_jcart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_md_cart_interface(mconfig, *this) , m_jcart3(*this, "JCART3") @@ -43,25 +43,25 @@ md_jcart_device::md_jcart_device(const machine_config &mconfig, device_type type { } -md_jcart_device::md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_jcart_device::md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_jcart_device(mconfig, MD_JCART, tag, owner, clock) { } // Micro Machines 2, Micro Machines Military -md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : md_jcart_device(mconfig, type, tag, owner, clock) , m_i2cmem(*this, "i2cmem"), m_i2c_mem(0), m_i2c_clk(0) { } -md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_seprom_codemast_device::md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_seprom_codemast_device(mconfig, MD_SEPROM_CODEMAST, tag, owner, clock) { } // Micro Machines 96 -md_seprom_mm96_device::md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_seprom_mm96_device::md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_seprom_codemast_device(mconfig, MD_SEPROM_MM96, tag, owner, clock) { } diff --git a/src/devices/bus/megadrive/jcart.h b/src/devices/bus/megadrive/jcart.h index 473c6ec2ce3..94c891c3429 100644 --- a/src/devices/bus/megadrive/jcart.h +++ b/src/devices/bus/megadrive/jcart.h @@ -18,7 +18,7 @@ class md_jcart_device : public device_t, { public: // construction/destruction - md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -28,7 +28,7 @@ public: virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; protected: - md_jcart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_jcart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -46,10 +46,10 @@ class md_seprom_codemast_device : public md_jcart_device { public: // construction/destruction - md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - md_seprom_codemast_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_seprom_codemast_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -74,7 +74,7 @@ class md_seprom_mm96_device : public md_seprom_codemast_device { public: // construction/destruction - md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp index b62209d549e..f9a4ce65c1b 100644 --- a/src/devices/bus/megadrive/md_slot.cpp +++ b/src/devices/bus/megadrive/md_slot.cpp @@ -159,7 +159,7 @@ uint32_t device_md_cart_interface::get_padded_size(uint32_t size) //------------------------------------------------- // base_md_cart_slot_device - constructor //------------------------------------------------- -base_md_cart_slot_device::base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +base_md_cart_slot_device::base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), @@ -167,17 +167,17 @@ base_md_cart_slot_device::base_md_cart_slot_device(const machine_config &mconfig { } -md_cart_slot_device::md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +md_cart_slot_device::md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_md_cart_slot_device(mconfig, MD_CART_SLOT, tag, owner, clock) { } -pico_cart_slot_device::pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pico_cart_slot_device::pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_md_cart_slot_device(mconfig, PICO_CART_SLOT, tag, owner, clock) { } -copera_cart_slot_device::copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +copera_cart_slot_device::copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_md_cart_slot_device(mconfig, COPERA_CART_SLOT, tag, owner, clock) { } diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h index ede1a032c2e..0c6c1e54655 100644 --- a/src/devices/bus/megadrive/md_slot.h +++ b/src/devices/bus/megadrive/md_slot.h @@ -195,7 +195,7 @@ public: device_md_cart_interface* m_cart; protected: - base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -209,7 +209,7 @@ public: // construction/destruction template md_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : md_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : md_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -217,7 +217,7 @@ public: set_fixed(false); } - md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "megadriv_cart"; } virtual const char *file_extensions() const noexcept override { return "smd,bin,md,gen"; } }; @@ -230,14 +230,14 @@ public: // construction/destruction template pico_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pico_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : pico_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "pico_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,md"; } }; @@ -250,14 +250,14 @@ public: // construction/destruction template copera_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : copera_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : copera_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "copera_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,md"; } }; diff --git a/src/devices/bus/megadrive/rom.cpp b/src/devices/bus/megadrive/rom.cpp index 6c624f2b515..8f2019088ec 100644 --- a/src/devices/bus/megadrive/rom.cpp +++ b/src/devices/bus/megadrive/rom.cpp @@ -67,199 +67,199 @@ DEFINE_DEVICE_TYPE(MD_ROM_STARODYS, md_rom_starodys_device, "md_rom_starodys", " DEFINE_DEVICE_TYPE(MD_ROM_SRAM_ARG96, md_rom_sram_arg96_device, "md_rom_sram_arg96", "MD Futbol Argentino 96") -md_std_rom_device::md_std_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_std_rom_device::md_std_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_md_cart_interface(mconfig, *this) { } -md_std_rom_device::md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_std_rom_device::md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_STD_ROM, tag, owner, clock) { } -md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_rom_sram_device(mconfig, MD_ROM_SRAM, tag, owner, clock) { } -md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, type, tag, owner, clock) { } -md_rom_sram_arg96_device::md_rom_sram_arg96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_sram_arg96_device::md_rom_sram_arg96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_rom_sram_device(mconfig, MD_ROM_SRAM_ARG96, tag, owner, clock) { } -md_rom_fram_device::md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_fram_device::md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_FRAM, tag, owner, clock) { } -md_rom_cm2in1_device::md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_cm2in1_device::md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_CM2IN1, tag, owner, clock), m_base(0) { } -md_rom_ssf2_device::md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_ssf2_device::md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SSF2, tag, owner, clock), m_lastoff(0), m_lastdata(0) { } -md_rom_bugslife_device::md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_bugslife_device::md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_BUGSLIFE, tag, owner, clock) { } -md_rom_smouse_device::md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_smouse_device::md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SMOUSE, tag, owner, clock) { } -md_rom_smw64_device::md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_smw64_device::md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SMW64, tag, owner, clock), m_latch0(0), m_latch1(0) { } -md_rom_smb_device::md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_smb_device::md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SMB, tag, owner, clock) { } -md_rom_smb2_device::md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_smb2_device::md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SMB2, tag, owner, clock) { } -md_rom_sbubl_device::md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_sbubl_device::md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SBUBL, tag, owner, clock) { } -md_rom_rx3_device::md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_rx3_device::md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_RX3, tag, owner, clock) { } -md_rom_mjlov_device::md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_mjlov_device::md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_MJLOV, tag, owner, clock) { } -md_rom_cjmjclub_device::md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_cjmjclub_device::md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_CJMJCLUB, tag, owner, clock) { } -md_rom_kof98_device::md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_kof98_device::md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_KOF98, tag, owner, clock) { } -md_rom_kof99_device::md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_kof99_device::md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_KOF99, tag, owner, clock) { } -md_rom_soulb_device::md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_soulb_device::md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SOULB, tag, owner, clock) { } -md_rom_chinf3_device::md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_chinf3_device::md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_CHINF3, tag, owner, clock), m_bank(0) { } -md_rom_16mj2_device::md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_16mj2_device::md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_16MJ2, tag, owner, clock) { } -md_rom_elfwor_device::md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_elfwor_device::md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_ELFWOR, tag, owner, clock) { } -md_rom_yasech_device::md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_yasech_device::md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_YASECH, tag, owner, clock) { } -md_rom_lion2_device::md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_lion2_device::md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_LION2, tag, owner, clock), m_prot1_data(0), m_prot2_data(0) { } -md_rom_lion3_device::md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_lion3_device::md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_LION3, tag, owner, clock), m_bank(0) { } -md_rom_mcpirate_device::md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_mcpirate_device::md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_MCPIR, tag, owner, clock), m_bank(0) { } -md_rom_pokea_device::md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_pokea_device::md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_POKEA, tag, owner, clock) { } -md_rom_pokestad_device::md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_pokestad_device::md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_POKESTAD, tag, owner, clock), m_bank(0) { } -md_rom_realtec_device::md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_realtec_device::md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_REALTEC, tag, owner, clock), m_bank_addr(0), m_bank_size(0), m_old_bank_addr(0) { } -md_rom_redcl_device::md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_redcl_device::md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_REDCL, tag, owner, clock) { } -md_rom_squir_device::md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_squir_device::md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_SQUIR, tag, owner, clock), m_latch(0) { } -md_rom_tc2000_device::md_rom_tc2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_tc2000_device::md_rom_tc2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_TC2000, tag, owner, clock) { } -md_rom_tekkensp_device::md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_tekkensp_device::md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_TEKKENSP, tag, owner, clock), m_reg(0) { } -md_rom_topf_device::md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_topf_device::md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_TOPF, tag, owner, clock), m_latch(0) { } -md_rom_radica_device::md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_radica_device::md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_RADICA, tag, owner, clock), m_bank(0) { } -md_rom_beggarp_device::md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_beggarp_device::md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_BEGGARP, tag, owner, clock), m_mode(0), m_lock(0) { } -md_rom_wukong_device::md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_wukong_device::md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_WUKONG, tag, owner, clock), m_mode(0) { } -md_rom_starodys_device::md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_starodys_device::md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_std_rom_device(mconfig, MD_ROM_STARODYS, tag, owner, clock), m_mode(0), m_lock(0), m_ram_enable(0), m_base(0) { } diff --git a/src/devices/bus/megadrive/rom.h b/src/devices/bus/megadrive/rom.h index 0acf73061ee..6b4915eda80 100644 --- a/src/devices/bus/megadrive/rom.h +++ b/src/devices/bus/megadrive/rom.h @@ -18,14 +18,14 @@ class md_std_rom_device : public device_t, { public: // construction/destruction - md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override { if (offset < 0x400000/2) return m_rom[MD_ADDR(offset)]; else return 0xffff; } virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { } protected: - md_std_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_std_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -37,10 +37,10 @@ class md_rom_sram_device : public md_std_rom_device { public: // construction/destruction - md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - md_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); public: // reading and writing @@ -54,7 +54,7 @@ public: class md_rom_sram_arg96_device : public md_rom_sram_device { public: - md_rom_sram_arg96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_sram_arg96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; @@ -66,7 +66,7 @@ class md_rom_fram_device : public md_std_rom_device { public: // construction/destruction - md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -81,7 +81,7 @@ class md_rom_ssf2_device : public md_std_rom_device { public: // construction/destruction - md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -103,7 +103,7 @@ class md_rom_cm2in1_device : public md_std_rom_device { public: // construction/destruction - md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -124,7 +124,7 @@ class md_rom_mcpirate_device : public md_std_rom_device { public: // construction/destruction - md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -146,7 +146,7 @@ class md_rom_bugslife_device : public md_std_rom_device { public: // construction/destruction - md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_a13(offs_t offset) override; @@ -158,7 +158,7 @@ class md_rom_chinf3_device : public md_std_rom_device { public: // construction/destruction - md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -179,7 +179,7 @@ class md_rom_16mj2_device : public md_std_rom_device { public: // construction/destruction - md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -191,7 +191,7 @@ class md_rom_elfwor_device : public md_std_rom_device { public: // construction/destruction - md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -203,7 +203,7 @@ class md_rom_yasech_device : public md_std_rom_device { public: // construction/destruction - md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -215,7 +215,7 @@ class md_rom_kof98_device : public md_std_rom_device { public: // construction/destruction - md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -227,7 +227,7 @@ class md_rom_kof99_device : public md_std_rom_device { public: // construction/destruction - md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_a13(offs_t offset) override; @@ -239,7 +239,7 @@ class md_rom_lion2_device : public md_std_rom_device { public: // construction/destruction - md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -260,7 +260,7 @@ class md_rom_lion3_device : public md_std_rom_device { public: // construction/destruction - md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -282,7 +282,7 @@ class md_rom_mjlov_device : public md_std_rom_device { public: // construction/destruction - md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -294,7 +294,7 @@ class md_rom_cjmjclub_device : public md_std_rom_device { public: // construction/destruction - md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -306,7 +306,7 @@ class md_rom_pokea_device : public md_std_rom_device { public: // construction/destruction - md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_a13(offs_t offset) override; @@ -318,7 +318,7 @@ class md_rom_pokestad_device : public md_std_rom_device { public: // construction/destruction - md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -339,7 +339,7 @@ class md_rom_realtec_device : public md_std_rom_device { public: // construction/destruction - md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -360,7 +360,7 @@ class md_rom_redcl_device : public md_std_rom_device { public: // construction/destruction - md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -372,7 +372,7 @@ class md_rom_rx3_device : public md_std_rom_device { public: // construction/destruction - md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_a13(offs_t offset) override; @@ -384,7 +384,7 @@ class md_rom_sbubl_device : public md_std_rom_device { public: // construction/destruction - md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -396,7 +396,7 @@ class md_rom_smb_device : public md_std_rom_device { public: // construction/destruction - md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_a13(offs_t offset) override; @@ -408,7 +408,7 @@ class md_rom_smb2_device : public md_std_rom_device { public: // construction/destruction - md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read_a13(offs_t offset) override; @@ -420,7 +420,7 @@ class md_rom_smw64_device : public md_std_rom_device { public: // construction/destruction - md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -443,7 +443,7 @@ class md_rom_smouse_device : public md_std_rom_device { public: // construction/destruction - md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -456,7 +456,7 @@ class md_rom_soulb_device : public md_std_rom_device { public: // construction/destruction - md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -468,7 +468,7 @@ class md_rom_squir_device : public md_std_rom_device { public: // construction/destruction - md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -489,7 +489,7 @@ class md_rom_tc2000_device : public md_std_rom_device { public: // construction/destruction - md_rom_tc2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_tc2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -511,7 +511,7 @@ class md_rom_tekkensp_device : public md_std_rom_device { public: // construction/destruction - md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -532,7 +532,7 @@ class md_rom_topf_device : public md_std_rom_device { public: // construction/destruction - md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -554,7 +554,7 @@ class md_rom_radica_device : public md_std_rom_device { public: // construction/destruction - md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -575,7 +575,7 @@ class md_rom_beggarp_device : public md_std_rom_device { public: // construction/destruction - md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -597,7 +597,7 @@ class md_rom_wukong_device : public md_std_rom_device { public: // construction/destruction - md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -619,7 +619,7 @@ class md_rom_starodys_device : public md_std_rom_device { public: // construction/destruction - md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; diff --git a/src/devices/bus/megadrive/sk.cpp b/src/devices/bus/megadrive/sk.cpp index 5e0a970c320..9f4c355a17e 100644 --- a/src/devices/bus/megadrive/sk.cpp +++ b/src/devices/bus/megadrive/sk.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(MD_ROM_SK, md_rom_sk_device, "md_rom_sk", "MD Sonic & Knuckles") -md_rom_sk_device::md_rom_sk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_rom_sk_device::md_rom_sk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_md_cart_interface(mconfig, *this) , m_exp(*this, "subslot") @@ -31,7 +31,7 @@ md_rom_sk_device::md_rom_sk_device(const machine_config &mconfig, device_type ty { } -md_rom_sk_device::md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_sk_device::md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_rom_sk_device(mconfig, MD_ROM_SK, tag, owner, clock) { } diff --git a/src/devices/bus/megadrive/sk.h b/src/devices/bus/megadrive/sk.h index c51abce9430..eb78ba872da 100644 --- a/src/devices/bus/megadrive/sk.h +++ b/src/devices/bus/megadrive/sk.h @@ -15,10 +15,10 @@ class md_rom_sk_device : public device_t, { public: // construction/destruction - md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - md_rom_sk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_rom_sk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/megadrive/stm95.cpp b/src/devices/bus/megadrive/stm95.cpp index e3fca0bbffe..088baae65df 100644 --- a/src/devices/bus/megadrive/stm95.cpp +++ b/src/devices/bus/megadrive/stm95.cpp @@ -175,14 +175,14 @@ void stm95_eeprom_device::set_sck_line(int state) DEFINE_DEVICE_TYPE(MD_EEPROM_STM95, md_eeprom_stm95_device, "md_eeprom_stm95", "MD Cart + EEPROM STM95") -md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_md_cart_interface(mconfig, *this) , m_rdcnt(0) { } -md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_eeprom_stm95_device::md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_eeprom_stm95_device(mconfig, MD_EEPROM_STM95, tag, owner, clock) { } diff --git a/src/devices/bus/megadrive/stm95.h b/src/devices/bus/megadrive/stm95.h index c04651d742c..03ce6f2a248 100644 --- a/src/devices/bus/megadrive/stm95.h +++ b/src/devices/bus/megadrive/stm95.h @@ -61,7 +61,7 @@ class md_eeprom_stm95_device : public device_t, public device_md_cart_interface { public: // construction/destruction - md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t read(offs_t offset) override; @@ -69,7 +69,7 @@ public: virtual void write_a13(offs_t offset, uint16_t data) override; protected: - md_eeprom_stm95_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_eeprom_stm95_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/megadrive/svp.cpp b/src/devices/bus/megadrive/svp.cpp index 7850f9d3a80..0c8ef145d0e 100644 --- a/src/devices/bus/megadrive/svp.cpp +++ b/src/devices/bus/megadrive/svp.cpp @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(MD_ROM_SVP, md_rom_svp_device, "md_rom_svp", "MD Virtua Racing") -md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_md_cart_interface(mconfig, *this) , m_svp(*this, "svp") @@ -67,7 +67,7 @@ md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, device_type { } -md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +md_rom_svp_device::md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md_rom_svp_device(mconfig, MD_ROM_SVP, tag, owner, clock) { } @@ -86,7 +86,7 @@ tiny_rom_entry const *md_rom_svp_device::device_rom_region() const #define SSP_PMC_HAVE_ADDR 1 // address written to PMAC, waiting for mode #define SSP_PMC_SET 2 // PMAC is set, PMx can be programmed -#define MASTER_CLOCK_NTSC 53693175 +#define MASTER_CLOCK_NTSC XTAL::u(53693175) // HELPERS diff --git a/src/devices/bus/megadrive/svp.h b/src/devices/bus/megadrive/svp.h index 84d65b90a33..f74171635b8 100644 --- a/src/devices/bus/megadrive/svp.h +++ b/src/devices/bus/megadrive/svp.h @@ -17,10 +17,10 @@ class md_rom_svp_device : public device_t, { public: // construction/destruction - md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + md_rom_svp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - md_rom_svp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + md_rom_svp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; diff --git a/src/devices/bus/midi/midi.cpp b/src/devices/bus/midi/midi.cpp index cff94bfe159..a9161323b5f 100644 --- a/src/devices/bus/midi/midi.cpp +++ b/src/devices/bus/midi/midi.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(MIDI_PORT, midi_port_device, "midi_port", "MIDI port") -midi_port_device::midi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +midi_port_device::midi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDI_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_rxd(0), diff --git a/src/devices/bus/midi/midi.h b/src/devices/bus/midi/midi.h index cdd89a84b6d..0b323314904 100644 --- a/src/devices/bus/midi/midi.h +++ b/src/devices/bus/midi/midi.h @@ -15,14 +15,14 @@ class midi_port_device : public device_t, public device_single_card_slot_interfa public: template midi_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : midi_port_device(mconfig, tag, owner, (uint32_t)0) + : midi_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - midi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + midi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~midi_port_device(); // static configuration helpers diff --git a/src/devices/bus/midi/midiinport.cpp b/src/devices/bus/midi/midiinport.cpp index bad75b6959e..97b46965d4b 100644 --- a/src/devices/bus/midi/midiinport.cpp +++ b/src/devices/bus/midi/midiinport.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(MIDIIN_PORT, midiin_port_device, "midiin_port", "MIDI In port") -midiin_port_device::midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midiin_port_device::midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDIIN_PORT, tag, owner, clock), device_midi_port_interface(mconfig, *this), m_midiin(*this, "midiinimg") @@ -22,6 +22,6 @@ midiin_port_device::midiin_port_device(const machine_config &mconfig, const char void midiin_port_device::device_add_mconfig(machine_config &config) { - MIDIIN(config, m_midiin, 0); + MIDIIN(config, m_midiin); m_midiin->input_callback().set(FUNC(midiin_port_device::read)); } diff --git a/src/devices/bus/midi/midiinport.h b/src/devices/bus/midi/midiinport.h index 526af88bb2a..9777c72e95f 100644 --- a/src/devices/bus/midi/midiinport.h +++ b/src/devices/bus/midi/midiinport.h @@ -20,7 +20,7 @@ class midiin_port_device : public device_t, public device_midi_port_interface { public: - midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/midi/midioutport.cpp b/src/devices/bus/midi/midioutport.cpp index 7f15c79fc70..5f00e87e636 100644 --- a/src/devices/bus/midi/midioutport.cpp +++ b/src/devices/bus/midi/midioutport.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(MIDIOUT_PORT, midiout_port_device, "midiout_port", "MIDI Out port") -midiout_port_device::midiout_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midiout_port_device::midiout_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDIOUT_PORT, tag, owner, clock), device_midi_port_interface(mconfig, *this), m_midiout(*this, "midioutimg") @@ -22,5 +22,5 @@ midiout_port_device::midiout_port_device(const machine_config &mconfig, const ch void midiout_port_device::device_add_mconfig(machine_config &config) { - MIDIOUT(config, m_midiout, 0); + MIDIOUT(config, m_midiout); } diff --git a/src/devices/bus/midi/midioutport.h b/src/devices/bus/midi/midioutport.h index 2cc33ae922f..7c75d3714ba 100644 --- a/src/devices/bus/midi/midioutport.h +++ b/src/devices/bus/midi/midioutport.h @@ -20,7 +20,7 @@ class midiout_port_device : public device_t, public device_midi_port_interface { public: - midiout_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midiout_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) override { if (started()) m_midiout->tx(state); } diff --git a/src/devices/bus/msx_cart/arc.cpp b/src/devices/bus/msx_cart/arc.cpp index 6f5af572bd1..342cdbd3c11 100644 --- a/src/devices/bus/msx_cart/arc.cpp +++ b/src/devices/bus/msx_cart/arc.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_ARC, msx_cart_arc_device, "msx_cart_arc", "MSX Cartridge - Arc") -msx_cart_arc_device::msx_cart_arc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_arc_device::msx_cart_arc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_ARC, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_7f(0) diff --git a/src/devices/bus/msx_cart/arc.h b/src/devices/bus/msx_cart/arc.h index 69f4427a01f..53fa28a016b 100644 --- a/src/devices/bus/msx_cart/arc.h +++ b/src/devices/bus/msx_cart/arc.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_ARC, msx_cart_arc_device) class msx_cart_arc_device : public device_t, public msx_cart_interface { public: - msx_cart_arc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_arc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/ascii.cpp b/src/devices/bus/msx_cart/ascii.cpp index 7d1b354b404..7c198b1a77e 100644 --- a/src/devices/bus/msx_cart/ascii.cpp +++ b/src/devices/bus/msx_cart/ascii.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_ASCII16_SRAM, msx_cart_ascii16_sram_device, "msx_car DEFINE_DEVICE_TYPE(MSX_CART_MSXWRITE, msx_cart_msxwrite_device, "msx_cart_msxwrite", "MSX Cartridge - MSXWRITE") -msx_cart_ascii8_device::msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ascii8_device::msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_ASCII8, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) @@ -99,7 +99,7 @@ void msx_cart_ascii8_device::write_cart(offs_t offset, uint8_t data) -msx_cart_ascii16_device::msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ascii16_device::msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_ASCII16, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) @@ -193,7 +193,7 @@ void msx_cart_ascii16_device::write_cart(offs_t offset, uint8_t data) -msx_cart_ascii8_sram_device::msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ascii8_sram_device::msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_ASCII8_SRAM, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) @@ -322,7 +322,7 @@ void msx_cart_ascii8_sram_device::write_cart(offs_t offset, uint8_t data) -msx_cart_ascii16_sram_device::msx_cart_ascii16_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ascii16_sram_device::msx_cart_ascii16_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_ASCII16_SRAM, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) @@ -461,7 +461,7 @@ void msx_cart_ascii16_sram_device::write_cart(offs_t offset, uint8_t data) -msx_cart_msxwrite_device::msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_msxwrite_device::msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_MSXWRITE, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) diff --git a/src/devices/bus/msx_cart/ascii.h b/src/devices/bus/msx_cart/ascii.h index 0c5898fed40..e040a08e37a 100644 --- a/src/devices/bus/msx_cart/ascii.h +++ b/src/devices/bus/msx_cart/ascii.h @@ -18,7 +18,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_MSXWRITE, msx_cart_msxwrite_device) class msx_cart_ascii8_device : public device_t, public msx_cart_interface { public: - msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -43,7 +43,7 @@ private: class msx_cart_ascii16_device : public device_t, public msx_cart_interface { public: - msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -68,7 +68,7 @@ private: class msx_cart_ascii8_sram_device : public device_t, public msx_cart_interface { public: - msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -96,7 +96,7 @@ private: class msx_cart_ascii16_sram_device : public device_t, public msx_cart_interface { public: - msx_cart_ascii16_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ascii16_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -124,7 +124,7 @@ private: class msx_cart_msxwrite_device : public device_t, public msx_cart_interface { public: - msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/bm_012.cpp b/src/devices/bus/msx_cart/bm_012.cpp index 020348dd843..1f5b566c961 100644 --- a/src/devices/bus/msx_cart/bm_012.cpp +++ b/src/devices/bus/msx_cart/bm_012.cpp @@ -22,7 +22,7 @@ TODO: DEFINE_DEVICE_TYPE(MSX_CART_BM_012, msx_cart_bm_012_device, "msx_cart_bm_012", "MSX Cartridge - BM-012") -msx_cart_bm_012_device::msx_cart_bm_012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_bm_012_device::msx_cart_bm_012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_BM_012, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_tmpz84c015af(*this, "tmpz84c015af") diff --git a/src/devices/bus/msx_cart/bm_012.h b/src/devices/bus/msx_cart/bm_012.h index e54213e8e75..1d66139dc2b 100644 --- a/src/devices/bus/msx_cart/bm_012.h +++ b/src/devices/bus/msx_cart/bm_012.h @@ -16,7 +16,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_BM_012, msx_cart_bm_012_device) class msx_cart_bm_012_device : public device_t, public msx_cart_interface { public: - msx_cart_bm_012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_bm_012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/msx_cart/crossblaim.cpp b/src/devices/bus/msx_cart/crossblaim.cpp index 6494e492f5b..c9d8e95f785 100644 --- a/src/devices/bus/msx_cart/crossblaim.cpp +++ b/src/devices/bus/msx_cart/crossblaim.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_CROSSBLAIM, msx_cart_crossblaim_device, "msx_cart_crossblaim", "MSX Cartridge Cross Blaim") -msx_cart_crossblaim_device::msx_cart_crossblaim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_crossblaim_device::msx_cart_crossblaim_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_CROSSBLAIM, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_selected_bank(1) diff --git a/src/devices/bus/msx_cart/crossblaim.h b/src/devices/bus/msx_cart/crossblaim.h index 04a44c1d905..365d7a06737 100644 --- a/src/devices/bus/msx_cart/crossblaim.h +++ b/src/devices/bus/msx_cart/crossblaim.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_CROSSBLAIM, msx_cart_crossblaim_device) class msx_cart_crossblaim_device : public device_t, public msx_cart_interface { public: - msx_cart_crossblaim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_crossblaim_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/disk.cpp b/src/devices/bus/msx_cart/disk.cpp index b07d9dd6dc0..0c0b5e0d779 100644 --- a/src/devices/bus/msx_cart/disk.cpp +++ b/src/devices/bus/msx_cart/disk.cpp @@ -125,7 +125,7 @@ static void msx_floppies(device_slot_interface &device) } -msx_cart_disk_device::msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_device::msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_floppy0(*this, "fdc:0") @@ -135,14 +135,14 @@ msx_cart_disk_device::msx_cart_disk_device(const machine_config &mconfig, device } -msx_cart_disk_wd_device::msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_wd_device::msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_device(mconfig, type, tag, owner, clock) , m_fdc(*this, "fdc") { } -msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_wd_device(mconfig, type, tag, owner, clock) , m_led(*this, "led0") , m_side_control(0) @@ -151,7 +151,7 @@ msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mco } -msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_wd_device(mconfig, type, tag, owner, clock) , m_led(*this, "led0") , m_control(0) @@ -159,32 +159,32 @@ msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mco } -msx_cart_vy0010_device::msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_vy0010_device::msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_type1_device(mconfig, MSX_CART_VY0010, tag, owner, clock) { } -msx_cart_fsfd1_device::msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fsfd1_device::msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_type1_device(mconfig, MSX_CART_FSFD1, tag, owner, clock) { } -msx_cart_fscf351_device::msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fscf351_device::msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_type2_device(mconfig, MSX_CART_FSCF351, tag, owner, clock) { } -msx_cart_disk_tc8566_device::msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_tc8566_device::msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_device(mconfig, type, tag, owner, clock) , m_fdc(*this, "fdc") { } -msx_cart_fsfd1a_device::msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fsfd1a_device::msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_disk_tc8566_device(mconfig, MSX_CART_FSFD1A, tag, owner, clock) { } @@ -237,7 +237,7 @@ void msx_cart_fsfd1_device::device_add_mconfig(machine_config &config) void msx_cart_fsfd1a_device::device_add_mconfig(machine_config &config) { - TC8566AF(config, m_fdc, 16'000'000); + TC8566AF(config, m_fdc, XTAL::u(16'000'000)); // Double sided 3.5" floppy drive FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_cart_disk_device::floppy_formats); diff --git a/src/devices/bus/msx_cart/disk.h b/src/devices/bus/msx_cart/disk.h index fd8d640157f..46845526847 100644 --- a/src/devices/bus/msx_cart/disk.h +++ b/src/devices/bus/msx_cart/disk.h @@ -23,7 +23,7 @@ public: virtual void initialize_cartridge() override; protected: - msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_floppy0; optional_device m_floppy1; @@ -36,7 +36,7 @@ protected: class msx_cart_disk_wd_device : public msx_cart_disk_device { protected: - msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_fdc; }; @@ -49,7 +49,7 @@ public: virtual void write_cart(offs_t offset, uint8_t data) override; protected: - msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -72,7 +72,7 @@ public: virtual void write_cart(offs_t offset, uint8_t data) override; protected: - msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -89,7 +89,7 @@ protected: class msx_cart_vy0010_device : public msx_cart_disk_type1_device { public: - msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -99,7 +99,7 @@ protected: class msx_cart_fsfd1_device : public msx_cart_disk_type1_device { public: - msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -109,7 +109,7 @@ protected: class msx_cart_fscf351_device : public msx_cart_disk_type2_device { public: - msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -119,7 +119,7 @@ protected: class msx_cart_disk_tc8566_device : public msx_cart_disk_device { protected: - msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_fdc; }; @@ -128,7 +128,7 @@ protected: class msx_cart_fsfd1a_device : public msx_cart_disk_tc8566_device { public: - msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/msx_cart/dooly.cpp b/src/devices/bus/msx_cart/dooly.cpp index a0c4c7b4f83..01cf43fb41a 100644 --- a/src/devices/bus/msx_cart/dooly.cpp +++ b/src/devices/bus/msx_cart/dooly.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_DOOLY, msx_cart_dooly_device, "msx_cart_dooly", "MSX Cartridge - Dooly") -msx_cart_dooly_device::msx_cart_dooly_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_dooly_device::msx_cart_dooly_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_DOOLY, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_prot(0) diff --git a/src/devices/bus/msx_cart/dooly.h b/src/devices/bus/msx_cart/dooly.h index 76f58ae762d..fbfcedd8a63 100644 --- a/src/devices/bus/msx_cart/dooly.h +++ b/src/devices/bus/msx_cart/dooly.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_DOOLY, msx_cart_dooly_device) class msx_cart_dooly_device : public device_t, public msx_cart_interface { public: - msx_cart_dooly_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_dooly_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/easi_speech.cpp b/src/devices/bus/msx_cart/easi_speech.cpp index 0a9d2d5551d..402b0b7aedc 100644 --- a/src/devices/bus/msx_cart/easi_speech.cpp +++ b/src/devices/bus/msx_cart/easi_speech.cpp @@ -17,7 +17,7 @@ a$=usr0("hello") DEFINE_DEVICE_TYPE(MSX_CART_EASISPEECH, msx_cart_easispeech_device, "msx_cart_easispeech", "MSX Cartridge - Easi-Speech") -msx_cart_easispeech_device::msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_easispeech_device::msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_EASISPEECH, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_speech(*this, "speech") @@ -36,7 +36,7 @@ const tiny_rom_entry *msx_cart_easispeech_device::device_rom_region() const void msx_cart_easispeech_device::device_add_mconfig(machine_config &config) { - SP0256(config, m_speech, 3120000); // frequency unknown + SP0256(config, m_speech, XTAL::u(3120000)); // frequency unknown m_speech->add_route(ALL_OUTPUTS, ":speaker", 1.00); } diff --git a/src/devices/bus/msx_cart/easi_speech.h b/src/devices/bus/msx_cart/easi_speech.h index 2aba350c4c7..5d285ebd1e4 100644 --- a/src/devices/bus/msx_cart/easi_speech.h +++ b/src/devices/bus/msx_cart/easi_speech.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_EASISPEECH, msx_cart_easispeech_device) class msx_cart_easispeech_device : public device_t, public msx_cart_interface { public: - msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_cart(offs_t offset) override; virtual void write_cart(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/msx_cart/fmpac.cpp b/src/devices/bus/msx_cart/fmpac.cpp index 75af22353dc..66e8b77f282 100644 --- a/src/devices/bus/msx_cart/fmpac.cpp +++ b/src/devices/bus/msx_cart/fmpac.cpp @@ -14,7 +14,7 @@ with: PAC2 BACKUP DATA. We only store the raw sram contents. DEFINE_DEVICE_TYPE(MSX_CART_FMPAC, msx_cart_fmpac_device, "msx_cart_fmpac", "MSX Cartridge - FM-PAC") -msx_cart_fmpac_device::msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fmpac_device::msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_FMPAC, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_ym2413(*this, "ym2413") diff --git a/src/devices/bus/msx_cart/fmpac.h b/src/devices/bus/msx_cart/fmpac.h index 9175849eaba..b64275c71c0 100644 --- a/src/devices/bus/msx_cart/fmpac.h +++ b/src/devices/bus/msx_cart/fmpac.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_FMPAC, msx_cart_fmpac_device) class msx_cart_fmpac_device : public device_t, public msx_cart_interface { public: - msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/fs_sr022.cpp b/src/devices/bus/msx_cart/fs_sr022.cpp index bb84a759214..7233daa30f7 100644 --- a/src/devices/bus/msx_cart/fs_sr022.cpp +++ b/src/devices/bus/msx_cart/fs_sr022.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_FS_SR022, msx_cart_fs_sr022_device, "msx_cart_fs_sr022", "MSX Cartridge - FS-SR022") -msx_cart_fs_sr022_device::msx_cart_fs_sr022_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fs_sr022_device::msx_cart_fs_sr022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_FS_SR022, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bunsetsu_rom(nullptr) diff --git a/src/devices/bus/msx_cart/fs_sr022.h b/src/devices/bus/msx_cart/fs_sr022.h index 2456b90a101..321677f974d 100644 --- a/src/devices/bus/msx_cart/fs_sr022.h +++ b/src/devices/bus/msx_cart/fs_sr022.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_FS_SR022, msx_cart_fs_sr022_device) class msx_cart_fs_sr022_device : public device_t, public msx_cart_interface { public: - msx_cart_fs_sr022_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fs_sr022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/halnote.cpp b/src/devices/bus/msx_cart/halnote.cpp index 43f7947ec2c..3aa4fe821bb 100644 --- a/src/devices/bus/msx_cart/halnote.cpp +++ b/src/devices/bus/msx_cart/halnote.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_HALNOTE, msx_cart_halnote_device, "msx_cart_halnote", "MSX Cartridge - Halnote") -msx_cart_halnote_device::msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_halnote_device::msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_HALNOTE, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_selected_bank{ 0, 0, 0, 0, 0, 0, 0, 0 } diff --git a/src/devices/bus/msx_cart/halnote.h b/src/devices/bus/msx_cart/halnote.h index a9c1972afeb..90974031c9a 100644 --- a/src/devices/bus/msx_cart/halnote.h +++ b/src/devices/bus/msx_cart/halnote.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_HALNOTE, msx_cart_halnote_device) class msx_cart_halnote_device : public device_t, public msx_cart_interface { public: - msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/hfox.cpp b/src/devices/bus/msx_cart/hfox.cpp index 007155b6e5b..a8e0e995e5b 100644 --- a/src/devices/bus/msx_cart/hfox.cpp +++ b/src/devices/bus/msx_cart/hfox.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_HFOX, msx_cart_hfox_device, "msx_cart_hfox", "MSX Cartridge - Hurry Fox") -msx_cart_hfox_device::msx_cart_hfox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_hfox_device::msx_cart_hfox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_HFOX, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_selected_bank{ 0, 0 } diff --git a/src/devices/bus/msx_cart/hfox.h b/src/devices/bus/msx_cart/hfox.h index 6254bae3610..bd18fe47bac 100644 --- a/src/devices/bus/msx_cart/hfox.h +++ b/src/devices/bus/msx_cart/hfox.h @@ -12,7 +12,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_HFOX, msx_cart_hfox_device) class msx_cart_hfox_device : public device_t, public msx_cart_interface { public: - msx_cart_hfox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_hfox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/holy_quran.cpp b/src/devices/bus/msx_cart/holy_quran.cpp index fbfb799fad5..47c7a8881f7 100644 --- a/src/devices/bus/msx_cart/holy_quran.cpp +++ b/src/devices/bus/msx_cart/holy_quran.cpp @@ -16,7 +16,7 @@ GCMK-16X PCB, 2 ROM chips, Yamaha XE297A0 mapper chip. DEFINE_DEVICE_TYPE(MSX_CART_HOLY_QURAN, msx_cart_holy_quran_device, "msx_cart_holy_quran", "MSX Cartridge - Holy Quran") -msx_cart_holy_quran_device::msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_holy_quran_device::msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_HOLY_QURAN, tag, owner, clock) , msx_cart_interface(mconfig, *this) { diff --git a/src/devices/bus/msx_cart/holy_quran.h b/src/devices/bus/msx_cart/holy_quran.h index 25b1ddf8f50..4c7cdb02b00 100644 --- a/src/devices/bus/msx_cart/holy_quran.h +++ b/src/devices/bus/msx_cart/holy_quran.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_HOLY_QURAN, msx_cart_holy_quran_device) class msx_cart_holy_quran_device : public device_t, public msx_cart_interface { public: - msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/ink.cpp b/src/devices/bus/msx_cart/ink.cpp index e3053a5da7d..90968afafa2 100644 --- a/src/devices/bus/msx_cart/ink.cpp +++ b/src/devices/bus/msx_cart/ink.cpp @@ -15,7 +15,7 @@ for protection. DEFINE_DEVICE_TYPE(MSX_CART_INK, msx_cart_ink_device, "msx_cart_ink", "MSX Cartridge - Ink") -msx_cart_ink_device::msx_cart_ink_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ink_device::msx_cart_ink_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_INK, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_flash(*this, "flash") diff --git a/src/devices/bus/msx_cart/ink.h b/src/devices/bus/msx_cart/ink.h index 933385c575d..cfd4d46b266 100644 --- a/src/devices/bus/msx_cart/ink.h +++ b/src/devices/bus/msx_cart/ink.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_INK, msx_cart_ink_device) class msx_cart_ink_device : public device_t, public msx_cart_interface { public: - msx_cart_ink_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ink_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp index 5954cb95091..b3c7b6f7fb2 100644 --- a/src/devices/bus/msx_cart/konami.cpp +++ b/src/devices/bus/msx_cart/konami.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_SOUND_SDSNATCHER, msx_cart_konami_sound_sdsnatcher_d DEFINE_DEVICE_TYPE(MSX_CART_KEYBOARD_MASTER, msx_cart_keyboard_master_device, "msx_cart_keyboard_master", "MSX Cartridge - Keyboard Master") -msx_cart_konami_device::msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_konami_device::msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_KONAMI, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) @@ -126,7 +126,7 @@ void msx_cart_konami_device::write_cart(offs_t offset, uint8_t data) -msx_cart_konami_scc_device::msx_cart_konami_scc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_konami_scc_device::msx_cart_konami_scc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_KONAMI_SCC, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_k051649(*this, "k051649") @@ -300,7 +300,7 @@ void msx_cart_konami_scc_device::write_cart(offs_t offset, uint8_t data) -msx_cart_gamemaster2_device::msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_gamemaster2_device::msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_GAMEMASTER2, tag, owner, clock) , msx_cart_interface(mconfig, *this) { @@ -474,7 +474,7 @@ void msx_cart_gamemaster2_device::write_cart(offs_t offset, uint8_t data) -msx_cart_synthesizer_device::msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_synthesizer_device::msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_SYNTHESIZER, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_base(nullptr) @@ -487,7 +487,7 @@ void msx_cart_synthesizer_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC } @@ -528,7 +528,7 @@ void msx_cart_synthesizer_device::write_cart(offs_t offset, uint8_t data) -msx_cart_konami_sound_device::msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_konami_sound_device::msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_k052539(*this, "k052539") @@ -822,7 +822,7 @@ void msx_cart_konami_sound_device::write_cart(offs_t offset, uint8_t data) } -msx_cart_konami_sound_snatcher_device::msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_konami_sound_snatcher_device::msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_konami_sound_device(mconfig, MSX_CART_SOUND_SNATCHER, tag, owner, clock) { } @@ -846,7 +846,7 @@ void msx_cart_konami_sound_snatcher_device::initialize_cartridge() } -msx_cart_konami_sound_sdsnatcher_device::msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_konami_sound_sdsnatcher_device::msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_konami_sound_device(mconfig, MSX_CART_SOUND_SDSNATCHER, tag, owner, clock) { } @@ -872,7 +872,7 @@ void msx_cart_konami_sound_sdsnatcher_device::initialize_cartridge() -msx_cart_keyboard_master_device::msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_keyboard_master_device::msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_KEYBOARD_MASTER, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_vlm5030(*this, "vlm5030") diff --git a/src/devices/bus/msx_cart/konami.h b/src/devices/bus/msx_cart/konami.h index 58ad4f3cfb7..fa5860a1040 100644 --- a/src/devices/bus/msx_cart/konami.h +++ b/src/devices/bus/msx_cart/konami.h @@ -21,7 +21,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_KEYBOARD_MASTER, msx_cart_keyboard_master_device) class msx_cart_konami_device : public device_t, public msx_cart_interface { public: - msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -46,7 +46,7 @@ private: class msx_cart_konami_scc_device : public device_t, public msx_cart_interface { public: - msx_cart_konami_scc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_scc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -76,7 +76,7 @@ private: class msx_cart_gamemaster2_device : public device_t, public msx_cart_interface { public: - msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -102,7 +102,7 @@ private: class msx_cart_synthesizer_device : public device_t, public msx_cart_interface { public: - msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -130,7 +130,7 @@ public: virtual void write_cart(offs_t offset, uint8_t data) override; protected: - msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -161,7 +161,7 @@ private: class msx_cart_konami_sound_snatcher_device : public msx_cart_konami_sound_device { public: - msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; }; @@ -170,7 +170,7 @@ public: class msx_cart_konami_sound_sdsnatcher_device : public msx_cart_konami_sound_device { public: - msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; }; @@ -180,7 +180,7 @@ public: class msx_cart_keyboard_master_device : public device_t, public msx_cart_interface { public: - msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/msx_cart/korean.cpp b/src/devices/bus/msx_cart/korean.cpp index e12f15bd43d..92f4469bd00 100644 --- a/src/devices/bus/msx_cart/korean.cpp +++ b/src/devices/bus/msx_cart/korean.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_90IN1, msx_cart_korean_90in1_device, "msx_c DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_126IN1, msx_cart_korean_126in1_device, "msx_cart_korean_126in1", "MSX Cartridge - Korean 126-in-1") -msx_cart_korean_80in1_device::msx_cart_korean_80in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_korean_80in1_device::msx_cart_korean_80in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_KOREAN_80IN1, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) @@ -102,7 +102,7 @@ void msx_cart_korean_80in1_device::write_cart(offs_t offset, uint8_t data) -msx_cart_korean_90in1_device::msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_korean_90in1_device::msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_KOREAN_90IN1, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) @@ -209,7 +209,7 @@ void msx_cart_korean_90in1_device::banking(uint8_t data) -msx_cart_korean_126in1_device::msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_korean_126in1_device::msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_KOREAN_126IN1, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_bank_mask(0) diff --git a/src/devices/bus/msx_cart/korean.h b/src/devices/bus/msx_cart/korean.h index 62c5a6ba82b..4e4ac8dfea8 100644 --- a/src/devices/bus/msx_cart/korean.h +++ b/src/devices/bus/msx_cart/korean.h @@ -16,7 +16,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_KOREAN_126IN1, msx_cart_korean_126in1_device) class msx_cart_korean_80in1_device : public device_t, public msx_cart_interface { public: - msx_cart_korean_80in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_korean_80in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -42,7 +42,7 @@ private: class msx_cart_korean_90in1_device : public device_t, public msx_cart_interface { public: - msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -68,7 +68,7 @@ private: class msx_cart_korean_126in1_device : public device_t, public msx_cart_interface { public: - msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/majutsushi.cpp b/src/devices/bus/msx_cart/majutsushi.cpp index c94f5a00dc5..0d3611d7499 100644 --- a/src/devices/bus/msx_cart/majutsushi.cpp +++ b/src/devices/bus/msx_cart/majutsushi.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_MAJUTSUSHI, msx_cart_majutsushi_device, "msx_cart_majutsushi", "MSX Cartridge - Majutsushi") -msx_cart_majutsushi_device::msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_majutsushi_device::msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_MAJUTSUSHI, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_dac(*this, "dac") @@ -29,7 +29,7 @@ void msx_cart_majutsushi_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC } diff --git a/src/devices/bus/msx_cart/majutsushi.h b/src/devices/bus/msx_cart/majutsushi.h index ebdf549272e..6856a206d2d 100644 --- a/src/devices/bus/msx_cart/majutsushi.h +++ b/src/devices/bus/msx_cart/majutsushi.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_MAJUTSUSHI, msx_cart_majutsushi_device) class msx_cart_majutsushi_device : public device_t, public msx_cart_interface { public: - msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/moonsound.cpp b/src/devices/bus/msx_cart/moonsound.cpp index 07ae53f6fca..075d97cfc0e 100644 --- a/src/devices/bus/msx_cart/moonsound.cpp +++ b/src/devices/bus/msx_cart/moonsound.cpp @@ -21,7 +21,7 @@ TODO: DEFINE_DEVICE_TYPE(MSX_CART_MOONSOUND, msx_cart_moonsound_device, "msx_moonsound", "MSX Cartridge - MoonSound") -msx_cart_moonsound_device::msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_moonsound_device::msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_MOONSOUND, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_ymf278b(*this, "ymf278b") diff --git a/src/devices/bus/msx_cart/moonsound.h b/src/devices/bus/msx_cart/moonsound.h index 62f614ae729..174f0a1850f 100644 --- a/src/devices/bus/msx_cart/moonsound.h +++ b/src/devices/bus/msx_cart/moonsound.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_MOONSOUND, msx_cart_moonsound_device) class msx_cart_moonsound_device : public device_t, public msx_cart_interface { public: - msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/msx_cart/msx_audio.cpp b/src/devices/bus/msx_cart/msx_audio.cpp index 3f8fd1fd772..381cd3dd891 100644 --- a/src/devices/bus/msx_cart/msx_audio.cpp +++ b/src/devices/bus/msx_cart/msx_audio.cpp @@ -72,7 +72,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_MSX_AUDIO_NMS1205, msx_cart_msx_audio_nms1205_device DEFINE_DEVICE_TYPE(MSX_CART_MSX_AUDIO_FSCA1, msx_cart_msx_audio_fsca1_device, "msx_audio_fsca1", "MSX Cartridge - MSX-AUDIO FS-CA1") -msx_cart_msx_audio_hxmu900_device::msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_msx_audio_hxmu900_device::msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_MSX_AUDIO_HXMU900, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_y8950(*this, "y8950") @@ -134,7 +134,7 @@ const tiny_rom_entry *msx_cart_msx_audio_hxmu900_device::device_rom_region() con -msx_cart_msx_audio_nms1205_device::msx_cart_msx_audio_nms1205_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_msx_audio_nms1205_device::msx_cart_msx_audio_nms1205_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_MSX_AUDIO_NMS1205, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_y8950(*this, "y8950") @@ -159,7 +159,7 @@ void msx_cart_msx_audio_nms1205_device::device_add_mconfig(machine_config &confi MSX_AUDIO_KBDC_PORT(config, "kbdc", msx_audio_keyboards, nullptr); // There is a 2 MHz crystal on the PCB, the 6850 TX and RX clocks are derived from it - ACIA6850(config, m_acia6850, 0); + ACIA6850(config, m_acia6850); m_acia6850->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(FUNC(msx_cart_msx_audio_nms1205_device::midi_in)); @@ -231,7 +231,7 @@ uint8_t msx_cart_msx_audio_nms1205_device::read_cart(offs_t offset) -msx_cart_msx_audio_fsca1_device::msx_cart_msx_audio_fsca1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_msx_audio_fsca1_device::msx_cart_msx_audio_fsca1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_MSX_AUDIO_FSCA1, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_y8950(*this, "y8950") diff --git a/src/devices/bus/msx_cart/msx_audio.h b/src/devices/bus/msx_cart/msx_audio.h index 490169244af..dd58e93fb69 100644 --- a/src/devices/bus/msx_cart/msx_audio.h +++ b/src/devices/bus/msx_cart/msx_audio.h @@ -19,7 +19,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_MSX_AUDIO_FSCA1, msx_cart_msx_audio_fsca1_device) class msx_cart_msx_audio_hxmu900_device : public device_t, public msx_cart_interface { public: - msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -40,7 +40,7 @@ private: class msx_cart_msx_audio_nms1205_device : public device_t, public msx_cart_interface { public: - msx_cart_msx_audio_nms1205_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msx_audio_nms1205_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; @@ -67,7 +67,7 @@ private: class msx_cart_msx_audio_fsca1_device : public device_t, public msx_cart_interface { public: - msx_cart_msx_audio_fsca1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msx_audio_fsca1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/msx_audio_kb.cpp b/src/devices/bus/msx_cart/msx_audio_kb.cpp index aba915ed718..ff931a2df5f 100644 --- a/src/devices/bus/msx_cart/msx_audio_kb.cpp +++ b/src/devices/bus/msx_cart/msx_audio_kb.cpp @@ -13,7 +13,7 @@ msx_audio_kb_port_interface::msx_audio_kb_port_interface(machine_config const &m } -msx_audio_kbdc_port_device::msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_audio_kbdc_port_device::msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_AUDIO_KBDC_PORT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_keyboard(nullptr) @@ -50,7 +50,7 @@ DECLARE_DEVICE_TYPE(MSX_AUDIO_KB_NMS1160, msx_nms1160_device) class msx_hxmu901_device : public device_t, public msx_audio_kb_port_interface { public: - msx_hxmu901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + msx_hxmu901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_AUDIO_KB_HXMU901, tag, owner, clock) , msx_audio_kb_port_interface(mconfig, *this) , m_row(0) @@ -180,7 +180,7 @@ ioport_constructor msx_hxmu901_device::device_input_ports() const class msx_nms1160_device : public device_t, public msx_audio_kb_port_interface { public: - msx_nms1160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + msx_nms1160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_AUDIO_KB_NMS1160, tag, owner, clock) , msx_audio_kb_port_interface(mconfig, *this) , m_row(0) diff --git a/src/devices/bus/msx_cart/msx_audio_kb.h b/src/devices/bus/msx_cart/msx_audio_kb.h index ecab5732c98..04f6c1eb18f 100644 --- a/src/devices/bus/msx_cart/msx_audio_kb.h +++ b/src/devices/bus/msx_cart/msx_audio_kb.h @@ -25,14 +25,14 @@ public: // construction/destruction template msx_audio_kbdc_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : msx_audio_kbdc_port_device(mconfig, tag, owner, (uint32_t)0) + : msx_audio_kbdc_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Physical connection simply consists of 8 input and 8 output lines split across 2 connectors void write(uint8_t data); diff --git a/src/devices/bus/msx_cart/msxdos2.cpp b/src/devices/bus/msx_cart/msxdos2.cpp index 7f3e506b007..d39bb0aed42 100644 --- a/src/devices/bus/msx_cart/msxdos2.cpp +++ b/src/devices/bus/msx_cart/msxdos2.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_MSXDOS2, msx_cart_msxdos2_device, "msx_cart_msxdos2", "MSX Cartridge - MSXDOS2") -msx_cart_msxdos2_device::msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_msxdos2_device::msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_MSXDOS2, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_selected_bank(0) diff --git a/src/devices/bus/msx_cart/msxdos2.h b/src/devices/bus/msx_cart/msxdos2.h index dd5eb51d245..be703c19e5d 100644 --- a/src/devices/bus/msx_cart/msxdos2.h +++ b/src/devices/bus/msx_cart/msxdos2.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_MSXDOS2, msx_cart_msxdos2_device) class msx_cart_msxdos2_device : public device_t, public msx_cart_interface { public: - msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/nomapper.cpp b/src/devices/bus/msx_cart/nomapper.cpp index 24ebbb38e0d..af3b97c17b5 100644 --- a/src/devices/bus/msx_cart/nomapper.cpp +++ b/src/devices/bus/msx_cart/nomapper.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_NOMAPPER, msx_cart_nomapper_device, "msx_cart_nomapper", "MSX Cartridge - ROM") -msx_cart_nomapper_device::msx_cart_nomapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_nomapper_device::msx_cart_nomapper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_NOMAPPER, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_start_address(0) diff --git a/src/devices/bus/msx_cart/nomapper.h b/src/devices/bus/msx_cart/nomapper.h index eb5e40e1d08..09f410018a0 100644 --- a/src/devices/bus/msx_cart/nomapper.h +++ b/src/devices/bus/msx_cart/nomapper.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_NOMAPPER, msx_cart_nomapper_device) class msx_cart_nomapper_device : public device_t, public msx_cart_interface { public: - msx_cart_nomapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_nomapper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/msx_cart/rtype.cpp b/src/devices/bus/msx_cart/rtype.cpp index 6cda0efb4e8..74549401b46 100644 --- a/src/devices/bus/msx_cart/rtype.cpp +++ b/src/devices/bus/msx_cart/rtype.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_RTYPE, msx_cart_rtype_device, "msx_cart_rtype", "MSX Cartridge - R-Type") -msx_cart_rtype_device::msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_rtype_device::msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_RTYPE, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_selected_bank(0) diff --git a/src/devices/bus/msx_cart/rtype.h b/src/devices/bus/msx_cart/rtype.h index 31583455a0a..937534c2277 100644 --- a/src/devices/bus/msx_cart/rtype.h +++ b/src/devices/bus/msx_cart/rtype.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_RTYPE, msx_cart_rtype_device) class msx_cart_rtype_device : public device_t, public msx_cart_interface { public: - msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/super_swangi.cpp b/src/devices/bus/msx_cart/super_swangi.cpp index b3385f96e29..0ac5847a368 100644 --- a/src/devices/bus/msx_cart/super_swangi.cpp +++ b/src/devices/bus/msx_cart/super_swangi.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_SUPER_SWANGI, msx_cart_super_swangi_device, "msx_cart_super_swangi", "MSX Cartridge - Super Swangi") -msx_cart_super_swangi_device::msx_cart_super_swangi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_super_swangi_device::msx_cart_super_swangi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_SUPER_SWANGI, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_selected_bank(0) diff --git a/src/devices/bus/msx_cart/super_swangi.h b/src/devices/bus/msx_cart/super_swangi.h index f0f5ee216bd..16f7a21e6de 100644 --- a/src/devices/bus/msx_cart/super_swangi.h +++ b/src/devices/bus/msx_cart/super_swangi.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_SUPER_SWANGI, msx_cart_super_swangi_device) class msx_cart_super_swangi_device : public device_t, public msx_cart_interface { public: - msx_cart_super_swangi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_super_swangi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/superloderunner.cpp b/src/devices/bus/msx_cart/superloderunner.cpp index 168f9187f8d..e853f677c05 100644 --- a/src/devices/bus/msx_cart/superloderunner.cpp +++ b/src/devices/bus/msx_cart/superloderunner.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_SUPERLODERUNNER, msx_cart_superloderunner_device, "msx_cart_superloderunner", "MSX Cartridge - Super Lode Runner") -msx_cart_superloderunner_device::msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_superloderunner_device::msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_CART_SUPERLODERUNNER, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_selected_bank(0) diff --git a/src/devices/bus/msx_cart/superloderunner.h b/src/devices/bus/msx_cart/superloderunner.h index bd763ca2c08..79c56d374a5 100644 --- a/src/devices/bus/msx_cart/superloderunner.h +++ b/src/devices/bus/msx_cart/superloderunner.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_SUPERLODERUNNER, msx_cart_superloderunner_device) class msx_cart_superloderunner_device : public device_t, public msx_cart_interface { public: - msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void initialize_cartridge() override; diff --git a/src/devices/bus/msx_cart/yamaha.cpp b/src/devices/bus/msx_cart/yamaha.cpp index b2cb15a37b0..72a44a59d1c 100644 --- a/src/devices/bus/msx_cart/yamaha.cpp +++ b/src/devices/bus/msx_cart/yamaha.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_SFG01, msx_cart_sfg01_device, "msx_cart_sfg01", "MSX DEFINE_DEVICE_TYPE(MSX_CART_SFG05, msx_cart_sfg05_device, "msx_cart_sfg05", "MSX Cartridge - SFG05") -msx_cart_sfg_device::msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_sfg_device::msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_region_sfg(*this, "sfg") @@ -31,13 +31,13 @@ msx_cart_sfg_device::msx_cart_sfg_device(const machine_config &mconfig, const de } -msx_cart_sfg01_device::msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_sfg01_device::msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_sfg_device(mconfig, MSX_CART_SFG01, tag, owner, clock) { } -msx_cart_sfg05_device::msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_sfg05_device::msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_cart_sfg_device(mconfig, MSX_CART_SFG05, tag, owner, clock) { } diff --git a/src/devices/bus/msx_cart/yamaha.h b/src/devices/bus/msx_cart/yamaha.h index cd4c036cab8..f865bb980aa 100644 --- a/src/devices/bus/msx_cart/yamaha.h +++ b/src/devices/bus/msx_cart/yamaha.h @@ -22,7 +22,7 @@ public: virtual void write_cart(offs_t offset, uint8_t data) override; protected: - msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -49,7 +49,7 @@ protected: class msx_cart_sfg01_device : public msx_cart_sfg_device { public: - msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -58,7 +58,7 @@ public: class msx_cart_sfg05_device : public msx_cart_sfg_device { public: - msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/msx_slot/bunsetsu.cpp b/src/devices/bus/msx_slot/bunsetsu.cpp index 9c73a37dbd8..caaa0d62eec 100644 --- a/src/devices/bus/msx_slot/bunsetsu.cpp +++ b/src/devices/bus/msx_slot/bunsetsu.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_BUNSETSU, msx_slot_bunsetsu_device, "msx_slot_bunsetsu", "MSX Internal BUNSETSU") -msx_slot_bunsetsu_device::msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_bunsetsu_device::msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_rom_device(mconfig, MSX_SLOT_BUNSETSU, tag, owner, clock) , m_bunsetsu_region(*this, finder_base::DUMMY_TAG) , m_bunsetsu_address(0) diff --git a/src/devices/bus/msx_slot/bunsetsu.h b/src/devices/bus/msx_slot/bunsetsu.h index df0bcedb32f..c11492a7156 100644 --- a/src/devices/bus/msx_slot/bunsetsu.h +++ b/src/devices/bus/msx_slot/bunsetsu.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_BUNSETSU, msx_slot_bunsetsu_device) class msx_slot_bunsetsu_device : public msx_slot_rom_device { public: - msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers void set_bunsetsu_region_tag(const char *tag) { m_bunsetsu_region.set_tag(tag); } diff --git a/src/devices/bus/msx_slot/cartridge.cpp b/src/devices/bus/msx_slot/cartridge.cpp index 667bbaf3cc7..793882e2211 100644 --- a/src/devices/bus/msx_slot/cartridge.cpp +++ b/src/devices/bus/msx_slot/cartridge.cpp @@ -33,13 +33,13 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_CARTRIDGE, msx_slot_cartridge_device, DEFINE_DEVICE_TYPE(MSX_SLOT_YAMAHA_EXPANSION, msx_slot_yamaha_expansion_device, "msx_slot_yamaha_expansion", "MSX Yamaha Expansion slot") -msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_cartridge_device(mconfig, MSX_SLOT_CARTRIDGE, tag, owner, clock) { } -msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_slot_interface(mconfig, *this) @@ -361,7 +361,7 @@ void msx_slot_cartridge_device::write(offs_t offset, uint8_t data) -msx_slot_yamaha_expansion_device::msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_yamaha_expansion_device::msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_cartridge_device(mconfig, MSX_SLOT_YAMAHA_EXPANSION, tag, owner, clock) { } diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h index 68d827edc93..ad1944a091b 100644 --- a/src/devices/bus/msx_slot/cartridge.h +++ b/src/devices/bus/msx_slot/cartridge.h @@ -21,7 +21,7 @@ class msx_slot_cartridge_device : public device_t { public: // construction/destruction - msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } @@ -43,7 +43,7 @@ public: DECLARE_WRITE_LINE_MEMBER(irq_out); protected: - msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -60,7 +60,7 @@ class msx_slot_yamaha_expansion_device : public msx_slot_cartridge_device { public: // construction/destruction - msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "msx_yamaha_60pin"; } virtual const char *image_type_name() const noexcept override { return "cartridge60pin"; } diff --git a/src/devices/bus/msx_slot/disk.cpp b/src/devices/bus/msx_slot/disk.cpp index 78a15b7d841..3c894fdc500 100644 --- a/src/devices/bus/msx_slot/disk.cpp +++ b/src/devices/bus/msx_slot/disk.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_DISK5, msx_slot_disk5_device, "msx_slot_disk5", "MSX DEFINE_DEVICE_TYPE(MSX_SLOT_DISK6, msx_slot_disk6_device, "msx_slot_disk6", "MSX Internal floppy type 6") -msx_slot_disk_device::msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk_device::msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_rom_device(mconfig, type, tag, owner, clock) , m_floppy0(nullptr) , m_floppy1(nullptr) @@ -80,7 +80,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 *tag, device_t *owner, uint32_t clock) +msx_slot_wd_disk_device::msx_slot_wd_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_disk_device(mconfig, type, tag, owner, clock) , m_fdc(nullptr) , m_led(*this, "led0") @@ -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 *tag, device_t *owner, uint32_t clock) +msx_slot_tc8566_disk_device::msx_slot_tc8566_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_disk_device(mconfig, type, tag, owner, clock) , m_fdc(nullptr) { @@ -123,7 +123,7 @@ void msx_slot_tc8566_disk_device::device_start() -msx_slot_disk1_device::msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk1_device::msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK1, tag, owner, clock) , m_side_control(0) , m_control(0) @@ -284,7 +284,7 @@ void msx_slot_disk1_device::write(offs_t offset, uint8_t data) } -msx_slot_disk2_device::msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk2_device::msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK2, tag, owner, clock) , m_control(0) { @@ -421,7 +421,7 @@ void msx_slot_disk2_device::write(offs_t offset, uint8_t data) -msx_slot_disk3_device::msx_slot_disk3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk3_device::msx_slot_disk3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_tc8566_disk_device(mconfig, MSX_SLOT_DISK3, tag, owner, clock) { } @@ -467,7 +467,7 @@ uint8_t msx_slot_disk3_device::read(offs_t offset) -msx_slot_disk4_device::msx_slot_disk4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk4_device::msx_slot_disk4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_tc8566_disk_device(mconfig, MSX_SLOT_DISK4, tag, owner, clock) { } @@ -519,7 +519,7 @@ uint8_t msx_slot_disk4_device::read(offs_t offset) -msx_slot_disk5_device::msx_slot_disk5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk5_device::msx_slot_disk5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK5, tag, owner, clock) , m_control(0) { @@ -639,7 +639,7 @@ void msx_slot_disk5_device::io_write(offs_t offset, uint8_t data) -msx_slot_disk6_device::msx_slot_disk6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk6_device::msx_slot_disk6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK6, tag, owner, clock) , m_side_motor(0) , m_drive_select0(0) diff --git a/src/devices/bus/msx_slot/disk.h b/src/devices/bus/msx_slot/disk.h index 184ea2caf66..f2dc88f1184 100644 --- a/src/devices/bus/msx_slot/disk.h +++ b/src/devices/bus/msx_slot/disk.h @@ -52,7 +52,7 @@ public: } protected: - msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -73,7 +73,7 @@ protected: class msx_slot_wd_disk_device : public msx_slot_disk_device { protected: - msx_slot_wd_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_slot_wd_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void device_start() override; @@ -85,7 +85,7 @@ protected: class msx_slot_tc8566_disk_device : public msx_slot_disk_device { protected: - msx_slot_tc8566_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_slot_tc8566_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void device_start() override; @@ -96,7 +96,7 @@ protected: class msx_slot_disk1_device : public msx_slot_wd_disk_device { public: - msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -118,7 +118,7 @@ private: class msx_slot_disk2_device : public msx_slot_wd_disk_device { public: - msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -138,7 +138,7 @@ private: class msx_slot_disk3_device : public msx_slot_tc8566_disk_device { public: - msx_slot_disk3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -148,7 +148,7 @@ public: class msx_slot_disk4_device : public msx_slot_tc8566_disk_device { public: - msx_slot_disk4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -158,7 +158,7 @@ public: class msx_slot_disk5_device : public msx_slot_wd_disk_device { public: - msx_slot_disk5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; @@ -178,7 +178,7 @@ private: class msx_slot_disk6_device : public msx_slot_wd_disk_device { public: - msx_slot_disk6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/msx_slot/fs4600.cpp b/src/devices/bus/msx_slot/fs4600.cpp index 0f328985f6f..be7a3ab0996 100644 --- a/src/devices/bus/msx_slot/fs4600.cpp +++ b/src/devices/bus/msx_slot/fs4600.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_FS4600, msx_slot_fs4600_device, "msx_slot_fs4600", "MSX Internal FS4600 Firmware") -msx_slot_fs4600_device::msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_fs4600_device::msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_SLOT_FS4600, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_nvram(*this, "nvram") diff --git a/src/devices/bus/msx_slot/fs4600.h b/src/devices/bus/msx_slot/fs4600.h index 4b571c2ef56..9eb6949ce03 100644 --- a/src/devices/bus/msx_slot/fs4600.h +++ b/src/devices/bus/msx_slot/fs4600.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_FS4600, msx_slot_fs4600_device) class msx_slot_fs4600_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } diff --git a/src/devices/bus/msx_slot/music.cpp b/src/devices/bus/msx_slot/music.cpp index 1c5daf86b67..01dec988016 100644 --- a/src/devices/bus/msx_slot/music.cpp +++ b/src/devices/bus/msx_slot/music.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_MUSIC, msx_slot_music_device, "msx_slot_music", "MSX Internal MSX-MUSIC") -msx_slot_music_device::msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_music_device::msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_rom_device(mconfig, MSX_SLOT_MUSIC, tag, owner, clock) , m_ym2413(nullptr) , m_ym2413_tag(nullptr) diff --git a/src/devices/bus/msx_slot/music.h b/src/devices/bus/msx_slot/music.h index 0d9240079ab..732855c0f54 100644 --- a/src/devices/bus/msx_slot/music.h +++ b/src/devices/bus/msx_slot/music.h @@ -16,7 +16,7 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_MUSIC, msx_slot_music_device) class msx_slot_music_device : public msx_slot_rom_device { public: - msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers void set_ym2413_tag(const char *tag) { m_ym2413_tag = tag; } diff --git a/src/devices/bus/msx_slot/panasonic08.cpp b/src/devices/bus/msx_slot/panasonic08.cpp index 0c46350051e..74785572927 100644 --- a/src/devices/bus/msx_slot/panasonic08.cpp +++ b/src/devices/bus/msx_slot/panasonic08.cpp @@ -16,7 +16,7 @@ Todo: DEFINE_DEVICE_TYPE(MSX_SLOT_PANASONIC08, msx_slot_panasonic08_device, "msx_slot_panasonic08", "MSX Internal Panasonic08") -msx_slot_panasonic08_device::msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_panasonic08_device::msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_SLOT_PANASONIC08, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_nvram(*this, "nvram") diff --git a/src/devices/bus/msx_slot/panasonic08.h b/src/devices/bus/msx_slot/panasonic08.h index b21a4964e3b..547a17a779d 100644 --- a/src/devices/bus/msx_slot/panasonic08.h +++ b/src/devices/bus/msx_slot/panasonic08.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_PANASONIC08, msx_slot_panasonic08_device) class msx_slot_panasonic08_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } diff --git a/src/devices/bus/msx_slot/ram.cpp b/src/devices/bus/msx_slot/ram.cpp index 835a5551b92..3f1c52c0d95 100644 --- a/src/devices/bus/msx_slot/ram.cpp +++ b/src/devices/bus/msx_slot/ram.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_RAM, msx_slot_ram_device, "msx_slot_ram", "MSX Internal RAM") -msx_slot_ram_device::msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_ram_device::msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_SLOT_RAM, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) { diff --git a/src/devices/bus/msx_slot/ram.h b/src/devices/bus/msx_slot/ram.h index f96271ad066..30c6219151c 100644 --- a/src/devices/bus/msx_slot/ram.h +++ b/src/devices/bus/msx_slot/ram.h @@ -9,7 +9,7 @@ class msx_slot_ram_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Set to 0xe000 for 8KB RAM void force_start_address(uint16_t start) { m_start_address = start; } diff --git a/src/devices/bus/msx_slot/ram_mm.cpp b/src/devices/bus/msx_slot/ram_mm.cpp index 84498f9afe1..91b10920bcf 100644 --- a/src/devices/bus/msx_slot/ram_mm.cpp +++ b/src/devices/bus/msx_slot/ram_mm.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_RAM_MM, msx_slot_ram_mm_device, "msx_slot_ram_mm", "MSX Internal Memory Mapped RAM") -msx_slot_ram_mm_device::msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_ram_mm_device::msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_SLOT_RAM_MM, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_total_size(0) diff --git a/src/devices/bus/msx_slot/ram_mm.h b/src/devices/bus/msx_slot/ram_mm.h index 55f13659a4c..6de3c795f05 100644 --- a/src/devices/bus/msx_slot/ram_mm.h +++ b/src/devices/bus/msx_slot/ram_mm.h @@ -8,7 +8,7 @@ class msx_slot_ram_mm_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); msx_slot_ram_mm_device &set_total_size(uint32_t total_size) { m_total_size = total_size; return *this; } msx_slot_ram_mm_device &set_ramio_bits(uint8_t ramio_set_bits) { m_ramio_set_bits = ramio_set_bits; return *this; } diff --git a/src/devices/bus/msx_slot/rom.cpp b/src/devices/bus/msx_slot/rom.cpp index aafc37b345b..fdf56673e6e 100644 --- a/src/devices/bus/msx_slot/rom.cpp +++ b/src/devices/bus/msx_slot/rom.cpp @@ -7,13 +7,13 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_ROM, msx_slot_rom_device, "msx_slot_rom", "MSX Internal ROM") -msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msx_slot_rom_device(mconfig, MSX_SLOT_ROM, tag, owner, clock) { } -msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_rom_region(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/bus/msx_slot/rom.h b/src/devices/bus/msx_slot/rom.h index 6bcd480a5a3..6ff46ff5ddb 100644 --- a/src/devices/bus/msx_slot/rom.h +++ b/src/devices/bus/msx_slot/rom.h @@ -11,7 +11,7 @@ class msx_slot_rom_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } @@ -19,7 +19,7 @@ public: virtual uint8_t read(offs_t offset) override; protected: - msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; diff --git a/src/devices/bus/msx_slot/sony08.cpp b/src/devices/bus/msx_slot/sony08.cpp index 652ed134457..e8a0fa60d75 100644 --- a/src/devices/bus/msx_slot/sony08.cpp +++ b/src/devices/bus/msx_slot/sony08.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_SONY08, msx_slot_sony08_device, "msx_slot_sony08", "MSX Internal SONY08") -msx_slot_sony08_device::msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_sony08_device::msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_SLOT_SONY08, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_nvram(*this, "nvram") diff --git a/src/devices/bus/msx_slot/sony08.h b/src/devices/bus/msx_slot/sony08.h index 74c8fd95f35..19920bbe1d9 100644 --- a/src/devices/bus/msx_slot/sony08.h +++ b/src/devices/bus/msx_slot/sony08.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_SONY08, msx_slot_sony08_device) class msx_slot_sony08_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } diff --git a/src/devices/bus/mtx/cfx.cpp b/src/devices/bus/mtx/cfx.cpp index d80290606c9..4cc4e953761 100644 --- a/src/devices/bus/mtx/cfx.cpp +++ b/src/devices/bus/mtx/cfx.cpp @@ -70,7 +70,7 @@ const tiny_rom_entry *mtx_cfx_device::device_rom_region() const // mtx_cfx_device - constructor //------------------------------------------------- -mtx_cfx_device::mtx_cfx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mtx_cfx_device::mtx_cfx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MTX_CFX, tag, owner, clock) , device_mtx_exp_interface(mconfig, *this) , m_flash(*this, "flash") diff --git a/src/devices/bus/mtx/cfx.h b/src/devices/bus/mtx/cfx.h index 1f19fd5648f..113d6917a63 100644 --- a/src/devices/bus/mtx/cfx.h +++ b/src/devices/bus/mtx/cfx.h @@ -23,7 +23,7 @@ class mtx_cfx_device : public device_t, public device_mtx_exp_interface { public: // construction/destruction - mtx_cfx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mtx_cfx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/mtx/exp.cpp b/src/devices/bus/mtx/exp.cpp index e2a4f9c8ed0..6175e562399 100644 --- a/src/devices/bus/mtx/exp.cpp +++ b/src/devices/bus/mtx/exp.cpp @@ -56,7 +56,7 @@ void device_mtx_exp_interface::rom_alloc(uint32_t size, const char *tag) // mtx_exp_slot_device - constructor //------------------------------------------------- -mtx_exp_slot_device::mtx_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mtx_exp_slot_device::mtx_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MTX_EXP_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , device_cartrom_image_interface(mconfig, *this) diff --git a/src/devices/bus/mtx/exp.h b/src/devices/bus/mtx/exp.h index dd23586c05e..1e93a4852f8 100644 --- a/src/devices/bus/mtx/exp.h +++ b/src/devices/bus/mtx/exp.h @@ -38,7 +38,7 @@ public: set_fixed(false); } - mtx_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + mtx_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_program_space(T &&tag, int spacenum) { m_program.set_tag(std::forward(tag), spacenum); } template void set_io_space(T &&tag, int spacenum) { m_io.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/mtx/magrom.cpp b/src/devices/bus/mtx/magrom.cpp index 5b75a9d4f1e..f9b8b82e5e1 100644 --- a/src/devices/bus/mtx/magrom.cpp +++ b/src/devices/bus/mtx/magrom.cpp @@ -52,7 +52,7 @@ ioport_constructor mtx_magrom_device::device_input_ports() const // mtx_magrom_device - constructor //------------------------------------------------- -mtx_magrom_device::mtx_magrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mtx_magrom_device::mtx_magrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MTX_MAGROM, tag, owner, clock) , device_mtx_exp_interface(mconfig, *this) , m_bank(*this, "bank") diff --git a/src/devices/bus/mtx/magrom.h b/src/devices/bus/mtx/magrom.h index a4868024150..ce5375e60c9 100644 --- a/src/devices/bus/mtx/magrom.h +++ b/src/devices/bus/mtx/magrom.h @@ -23,7 +23,7 @@ class mtx_magrom_device : public device_t, public device_mtx_exp_interface { public: // construction/destruction - mtx_magrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mtx_magrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/mtx/rompak.cpp b/src/devices/bus/mtx/rompak.cpp index 6f870c540ce..83c49ab2766 100644 --- a/src/devices/bus/mtx/rompak.cpp +++ b/src/devices/bus/mtx/rompak.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(MTX_ROMPAK, mtx_rompak_device, "rompak", "MTX ROMPAK") // mtx_rompak_device - constructor //------------------------------------------------- -mtx_rompak_device::mtx_rompak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mtx_rompak_device::mtx_rompak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MTX_ROMPAK, tag, owner, clock) , device_mtx_exp_interface(mconfig, *this) { diff --git a/src/devices/bus/mtx/rompak.h b/src/devices/bus/mtx/rompak.h index f26af1fbe34..1ca658d96ba 100644 --- a/src/devices/bus/mtx/rompak.h +++ b/src/devices/bus/mtx/rompak.h @@ -24,7 +24,7 @@ class mtx_rompak_device : public device_t, public device_mtx_exp_interface { public: // construction/destruction - mtx_rompak_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mtx_rompak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/mtx/sdx.cpp b/src/devices/bus/mtx/sdx.cpp index 0a27e48f309..8754fc99f48 100644 --- a/src/devices/bus/mtx/sdx.cpp +++ b/src/devices/bus/mtx/sdx.cpp @@ -184,7 +184,7 @@ const tiny_rom_entry *mtx_sdxcpm_device::device_rom_region() const // mtx_sdx_device - constructor //------------------------------------------------- -mtx_sdx_device::mtx_sdx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mtx_sdx_device::mtx_sdx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_mtx_exp_interface(mconfig, *this) , m_sdx_rom(*this, "sdx_rom") @@ -195,12 +195,12 @@ mtx_sdx_device::mtx_sdx_device(const machine_config &mconfig, device_type type, { } -mtx_sdxbas_device::mtx_sdxbas_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mtx_sdxbas_device::mtx_sdxbas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mtx_sdx_device(mconfig, MTX_SDXBAS, tag, owner, clock) { } -mtx_sdxcpm_device::mtx_sdxcpm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mtx_sdxcpm_device::mtx_sdxcpm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mtx_sdx_device(mconfig, MTX_SDXCPM, tag, owner, clock) , m_screen(*this, "screen") , m_palette(*this, "palette") diff --git a/src/devices/bus/mtx/sdx.h b/src/devices/bus/mtx/sdx.h index 5bed06258aa..0bff7f117a2 100644 --- a/src/devices/bus/mtx/sdx.h +++ b/src/devices/bus/mtx/sdx.h @@ -38,7 +38,7 @@ public: protected: // construction/destruction - mtx_sdx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mtx_sdx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_memory_region m_sdx_rom; required_device m_fdc; @@ -53,7 +53,7 @@ class mtx_sdxbas_device : public mtx_sdx_device { public: // construction/destruction - mtx_sdxbas_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mtx_sdxbas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -69,7 +69,7 @@ class mtx_sdxcpm_device : public mtx_sdx_device { public: // construction/destruction - mtx_sdxcpm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mtx_sdxcpm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/multibus/cpuap.cpp b/src/devices/bus/multibus/cpuap.cpp index 7e271be8114..015ee83650f 100644 --- a/src/devices/bus/multibus/cpuap.cpp +++ b/src/devices/bus/multibus/cpuap.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(CPUAP, cpuap_device, "cpuap", "Siemens S26361-D333 CPUAP") -cpuap_device::cpuap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +cpuap_device::cpuap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPUAP, tag, owner, clock) , device_multibus_interface(mconfig, *this) , m_cpu(*this, "cpu") diff --git a/src/devices/bus/multibus/cpuap.h b/src/devices/bus/multibus/cpuap.h index cc4d2ae5a5f..8065483e47d 100644 --- a/src/devices/bus/multibus/cpuap.h +++ b/src/devices/bus/multibus/cpuap.h @@ -20,7 +20,7 @@ class cpuap_device , public device_multibus_interface { public: - cpuap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + cpuap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/multibus/isbc202.cpp b/src/devices/bus/multibus/isbc202.cpp index 502737837d1..b33c2c3c904 100644 --- a/src/devices/bus/multibus/isbc202.cpp +++ b/src/devices/bus/multibus/isbc202.cpp @@ -206,7 +206,7 @@ offs_t isbc202_disassembler::disassemble(std::ostream &stream, offs_t pc, const } // isbc202_device -isbc202_device::isbc202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +isbc202_device::isbc202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig , ISBC202 , tag , owner , DERIVED_CLOCK(1, 4)) , device_multibus_interface(mconfig , *this) , m_mcu(*this , "mcu") diff --git a/src/devices/bus/multibus/isbc202.h b/src/devices/bus/multibus/isbc202.h index 6fc94179364..86f120e6694 100644 --- a/src/devices/bus/multibus/isbc202.h +++ b/src/devices/bus/multibus/isbc202.h @@ -24,7 +24,7 @@ class isbc202_device : public cpu_device, { public: // Construction/destruction - isbc202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + isbc202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~isbc202_device(); // Access to I/O space by CPU diff --git a/src/devices/bus/multibus/isbc8024.cpp b/src/devices/bus/multibus/isbc8024.cpp index b61ae56db45..0f264c932e5 100644 --- a/src/devices/bus/multibus/isbc8024.cpp +++ b/src/devices/bus/multibus/isbc8024.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(ISBC8024, isbc8024_device, "isbc8024", "Intel iSBC 80/24 Single Board Computer") -isbc8024_device::isbc8024_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +isbc8024_device::isbc8024_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISBC8024, tag, owner, clock) , device_multibus_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -108,10 +108,10 @@ void isbc8024_device::device_add_mconfig(machine_config &config) m_pit->out_handler<2>().append(m_pci, FUNC(i8251_device::write_rxc)); m_pit->out_handler<2>().append(m_pci, FUNC(i8251_device::write_txc)); - I8251(config, m_pci, 0); + I8251(config, m_pci); - I8255(config, m_ppi[0], 0); // j1 - I8255(config, m_ppi[1], 0); // j2 + I8255(config, m_ppi[0]); // j1 + I8255(config, m_ppi[1]); // j2 PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_cpu, I8085_INTR_LINE); diff --git a/src/devices/bus/multibus/isbc8024.h b/src/devices/bus/multibus/isbc8024.h index 4827c20bbe6..7f3ea05c1aa 100644 --- a/src/devices/bus/multibus/isbc8024.h +++ b/src/devices/bus/multibus/isbc8024.h @@ -21,7 +21,7 @@ class isbc8024_device , public device_multibus_interface { public: - isbc8024_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + isbc8024_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/multibus/labtam_3232.cpp b/src/devices/bus/multibus/labtam_3232.cpp index 35181ea4a78..5a47602e4c3 100644 --- a/src/devices/bus/multibus/labtam_3232.cpp +++ b/src/devices/bus/multibus/labtam_3232.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(LABTAM_3232, labtam_3232_device, "labtam_3232", "Labtam 3232") -labtam_3232_device::labtam_3232_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +labtam_3232_device::labtam_3232_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LABTAM_3232, tag, owner, clock) , device_multibus_interface(mconfig, *this) , m_cpu(*this, "cpu") diff --git a/src/devices/bus/multibus/labtam_3232.h b/src/devices/bus/multibus/labtam_3232.h index 4cd89999778..ed75fd54dee 100644 --- a/src/devices/bus/multibus/labtam_3232.h +++ b/src/devices/bus/multibus/labtam_3232.h @@ -18,7 +18,7 @@ class labtam_3232_device , public device_multibus_interface { public: - labtam_3232_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + labtam_3232_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/multibus/labtam_vducom.cpp b/src/devices/bus/multibus/labtam_vducom.cpp index 3ea3647ad5b..cad6ac0bd81 100644 --- a/src/devices/bus/multibus/labtam_vducom.cpp +++ b/src/devices/bus/multibus/labtam_vducom.cpp @@ -30,7 +30,7 @@ enum u7_mask : u8 DEFINE_DEVICE_TYPE(LABTAM_VDUCOM, labtam_vducom_device, "labtam_vducom", "Labtam 8086 VDU COMM") -labtam_vducom_device::labtam_vducom_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +labtam_vducom_device::labtam_vducom_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LABTAM_VDUCOM, tag, owner, clock) , device_multibus_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -144,12 +144,12 @@ void labtam_vducom_device::device_add_mconfig(machine_config &config) m_cpu->set_addrmap(AS_IO, &labtam_vducom_device::cpu_pio); m_cpu->set_irq_acknowledge_callback(m_pic, FUNC(pic8259_device::inta_cb)); - AM9513(config, m_ctc[0], 4'000'000); + AM9513(config, m_ctc[0], XTAL::u(4'000'000)); //m_ctc[0]->out1_cb().set(m_pic, FUNC(pic8259_device::ir0_w)); m_ctc[0]->out4_cb().set(m_ctc[0], FUNC(am9513_device::gate5_w)); // ? m_ctc[0]->out5_cb().set(m_ctc[0], FUNC(am9513_device::source4_w)); // ? - AM9513(config, m_ctc[1], 4'000'000); + AM9513(config, m_ctc[1], XTAL::u(4'000'000)); m_ctc[1]->out1_cb().set(m_com[1], FUNC(upd7201_device::txcb_w)); m_ctc[1]->out2_cb().set(m_com[1], FUNC(upd7201_device::rxcb_w)); m_ctc[1]->out3_cb().set(m_com[1], FUNC(upd7201_device::rxca_w)); @@ -161,15 +161,15 @@ void labtam_vducom_device::device_add_mconfig(machine_config &config) PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_cpu, INPUT_LINE_INT0); - UPD7201(config, m_com[0], 4'000'000); + UPD7201(config, m_com[0], XTAL::u(4'000'000)); m_com[0]->out_int_callback().set(m_pic, FUNC(pic8259_device::ir3_w)); - UPD7201(config, m_com[1], 4'000'000); + UPD7201(config, m_com[1], XTAL::u(4'000'000)); m_com[1]->out_int_callback().set(m_pic, FUNC(pic8259_device::ir2_w)); X2212(config, m_nvram[0]); X2212(config, m_nvram[1]); - MC6845(config, m_crtc, 1'000'000); + MC6845(config, m_crtc, XTAL::u(1'000'000)); m_crtc->set_show_border_area(false); m_crtc->set_hpixels_per_column(16); m_crtc->set_update_row_callback(FUNC(labtam_vducom_device::update_row)); @@ -179,7 +179,7 @@ void labtam_vducom_device::device_add_mconfig(machine_config &config) PALETTE(config, m_palette, FUNC(labtam_vducom_device::palette_init), 4); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(1'000'000, 62*16, 2*16, 52*16, 78*4, 3*4, 75*4); + m_screen->set_raw(XTAL::u(1'000'000), 62*16, 2*16, 52*16, 78*4, 3*4, 75*4); m_screen->set_screen_update(m_crtc, FUNC(mc6845_device::screen_update)); // gfxdecode is only to show the font data in the tile viewer diff --git a/src/devices/bus/multibus/labtam_vducom.h b/src/devices/bus/multibus/labtam_vducom.h index 9db27d05fdd..d497c2a107f 100644 --- a/src/devices/bus/multibus/labtam_vducom.h +++ b/src/devices/bus/multibus/labtam_vducom.h @@ -26,7 +26,7 @@ class labtam_vducom_device , public device_multibus_interface { public: - labtam_vducom_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + labtam_vducom_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/multibus/labtam_z80sbc.cpp b/src/devices/bus/multibus/labtam_z80sbc.cpp index 013add4f7e8..5c4f0e50cc4 100644 --- a/src/devices/bus/multibus/labtam_z80sbc.cpp +++ b/src/devices/bus/multibus/labtam_z80sbc.cpp @@ -68,7 +68,7 @@ enum drvstatus_mask : u8 DEFINE_DEVICE_TYPE(LABTAM_Z80SBC, labtam_z80sbc_device, "labtam_z80sbc", "Labtam Z80 SBC") -labtam_z80sbc_device::labtam_z80sbc_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +labtam_z80sbc_device::labtam_z80sbc_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LABTAM_Z80SBC, tag, owner, clock) , device_multibus_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -332,13 +332,13 @@ void labtam_z80sbc_device::device_add_mconfig(machine_config &config) AM9519(config, m_uic); m_uic->out_int_callback().set(m_int, FUNC(input_merger_any_high_device::in_w<3>)); - WD2793(config, m_fdc, 2'000'000); + WD2793(config, m_fdc, XTAL::u(2'000'000)); m_fdc->intrq_wr_callback().set(FUNC(labtam_z80sbc_device::fdcint_w)); m_fdc->drq_wr_callback().set(m_dma[0], FUNC(z80dma_device::rdy_w)); // WD1002 irq -> Am9519 ireq3 - AM9513(config, m_stc, 4'000'000); + AM9513(config, m_stc, XTAL::u(4'000'000)); m_stc->out4_cb().set(m_uic, FUNC(am9519_device::ireq5_w)); MM58167(config, m_rtc, 32.768_kHz_XTAL); diff --git a/src/devices/bus/multibus/labtam_z80sbc.h b/src/devices/bus/multibus/labtam_z80sbc.h index 2e20d6cd7ca..20c307f3049 100644 --- a/src/devices/bus/multibus/labtam_z80sbc.h +++ b/src/devices/bus/multibus/labtam_z80sbc.h @@ -25,7 +25,7 @@ class labtam_z80sbc_device , public device_multibus_interface { public: - labtam_z80sbc_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + labtam_z80sbc_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/multibus/multibus.cpp b/src/devices/bus/multibus/multibus.cpp index f8c64ac0d08..2ccc2042153 100644 --- a/src/devices/bus/multibus/multibus.cpp +++ b/src/devices/bus/multibus/multibus.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(MULTIBUS, multibus_device, "multibus", "Intel Multibus") DEFINE_DEVICE_TYPE(MULTIBUS_SLOT, multibus_slot_device, "multibus_slot", "Intel Multibus slot") -multibus_device::multibus_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +multibus_device::multibus_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MULTIBUS, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_mem_config("mem", ENDIANNESS_LITTLE, 16, 24) @@ -45,7 +45,7 @@ void multibus_device::device_start() m_xack_cb.resolve_safe(); } -multibus_slot_device::multibus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +multibus_slot_device::multibus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MULTIBUS_SLOT, tag, owner, clock) , device_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/bus/multibus/multibus.h b/src/devices/bus/multibus/multibus.h index d753db25778..f07dbaa7982 100644 --- a/src/devices/bus/multibus/multibus.h +++ b/src/devices/bus/multibus/multibus.h @@ -81,7 +81,7 @@ class multibus_device , public device_memory_interface { public: - multibus_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + multibus_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // interrupt interface template auto int_callback() { return m_int_cb[I].bind(); } @@ -113,7 +113,7 @@ class multibus_slot_device , public device_slot_interface { public: - multibus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + multibus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); template multibus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option, bool const fixed) diff --git a/src/devices/bus/multibus/serad.cpp b/src/devices/bus/multibus/serad.cpp index f4fa2346a6c..cbbf5c86f26 100644 --- a/src/devices/bus/multibus/serad.cpp +++ b/src/devices/bus/multibus/serad.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SERAD, serad_device, "serad", "Siemens S26361-D279 SERAD") -serad_device::serad_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +serad_device::serad_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERAD, tag, owner, clock) , device_multibus_interface(mconfig, *this) , m_cpu(*this, "cpu") diff --git a/src/devices/bus/multibus/serad.h b/src/devices/bus/multibus/serad.h index 5f82e1c0ec7..4db17508a1d 100644 --- a/src/devices/bus/multibus/serad.h +++ b/src/devices/bus/multibus/serad.h @@ -18,7 +18,7 @@ class serad_device , public device_multibus_interface { public: - serad_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + serad_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/nasbus/avc.cpp b/src/devices/bus/nasbus/avc.cpp index f4590b2ac3f..1f20ec2d9a9 100644 --- a/src/devices/bus/nasbus/avc.cpp +++ b/src/devices/bus/nasbus/avc.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(NASCOM_AVC, nascom_avc_device, "nascom_avc", "Nascom Advanced void nascom_avc_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(16250000, 1024, 0, 768, 320, 0, 256); + screen.set_raw(XTAL::u(16250000), 1024, 0, 768, 320, 0, 256); screen.set_screen_update("mc6845", FUNC(mc6845_device::screen_update)); PALETTE(config, m_palette, palette_device::RGB_3BIT); @@ -46,7 +46,7 @@ void nascom_avc_device::device_add_mconfig(machine_config &config) // nascom_avc_device - constructor //------------------------------------------------- -nascom_avc_device::nascom_avc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nascom_avc_device::nascom_avc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NASCOM_AVC, tag, owner, clock), device_nasbus_card_interface(mconfig, *this), m_crtc(*this, "mc6845"), diff --git a/src/devices/bus/nasbus/avc.h b/src/devices/bus/nasbus/avc.h index 58eaaa44626..7bf49486be7 100644 --- a/src/devices/bus/nasbus/avc.h +++ b/src/devices/bus/nasbus/avc.h @@ -26,7 +26,7 @@ class nascom_avc_device : public device_t, public device_nasbus_card_interface { public: // construction/destruction - nascom_avc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nascom_avc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void control_w(uint8_t data); uint8_t vram_r(offs_t offset); diff --git a/src/devices/bus/nasbus/floppy.cpp b/src/devices/bus/nasbus/floppy.cpp index 905f5eef087..c117ae19417 100644 --- a/src/devices/bus/nasbus/floppy.cpp +++ b/src/devices/bus/nasbus/floppy.cpp @@ -59,7 +59,7 @@ void nascom_fdc_device::device_add_mconfig(machine_config &config) // wordpro_device - constructor //------------------------------------------------- -nascom_fdc_device::nascom_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nascom_fdc_device::nascom_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NASCOM_FDC, tag, owner, clock), device_nasbus_card_interface(mconfig, *this), m_fdc(*this, "fd1793"), diff --git a/src/devices/bus/nasbus/floppy.h b/src/devices/bus/nasbus/floppy.h index abf623e5e10..b85f901c1ac 100644 --- a/src/devices/bus/nasbus/floppy.h +++ b/src/devices/bus/nasbus/floppy.h @@ -26,7 +26,7 @@ class nascom_fdc_device : public device_t, public device_nasbus_card_interface { public: // construction/destruction - nascom_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nascom_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t select_r(); void select_w(uint8_t data); diff --git a/src/devices/bus/nasbus/nasbus.cpp b/src/devices/bus/nasbus/nasbus.cpp index 29fff032d39..96b94155e24 100644 --- a/src/devices/bus/nasbus/nasbus.cpp +++ b/src/devices/bus/nasbus/nasbus.cpp @@ -22,12 +22,12 @@ DEFINE_DEVICE_TYPE(NASBUS_SLOT, nasbus_slot_device, "nasbus_slot", "NASBUS Slot" // nasbus_slot_device - constructor //------------------------------------------------- -nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nasbus_slot_device(mconfig, NASBUS_SLOT, tag, owner, clock) { } -nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) @@ -56,7 +56,7 @@ DEFINE_DEVICE_TYPE(NASBUS, nasbus_device, "nasbus", "NASBUS Backplane") // nasbus_device - constructor //------------------------------------------------- -nasbus_device::nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nasbus_device::nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NASBUS, tag, owner, clock), m_program(*this, finder_base::DUMMY_TAG, -1), m_io(*this, finder_base::DUMMY_TAG, -1), diff --git a/src/devices/bus/nasbus/nasbus.h b/src/devices/bus/nasbus/nasbus.h index 04e1c3942f7..2bdc1a082be 100644 --- a/src/devices/bus/nasbus/nasbus.h +++ b/src/devices/bus/nasbus/nasbus.h @@ -110,7 +110,7 @@ public: // construction/destruction template nasbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus, U &&opts, char const *dflt) - : nasbus_slot_device(mconfig, tag, owner, (uint32_t)0) + : nasbus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -118,12 +118,12 @@ public: set_fixed(false); set_bus(std::forward(bus)); } - nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_bus(T &&tag) { m_bus.set_tag(std::forward(tag)); } protected: - nasbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nasbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -142,7 +142,7 @@ class nasbus_device : public device_t friend class device_nasbus_card_interface; public: // construction/destruction - nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~nasbus_device(); auto ram_disable() { return m_ram_disable_handler.bind(); } diff --git a/src/devices/bus/neogeo/boot_cthd.cpp b/src/devices/bus/neogeo/boot_cthd.cpp index 70c4d891ad5..c14608fb574 100644 --- a/src/devices/bus/neogeo/boot_cthd.cpp +++ b/src/devices/bus/neogeo/boot_cthd.cpp @@ -73,7 +73,7 @@ void neogeo_cthd2k3_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CT2K3SP_CART, neogeo_ct2k3sp_cart_device, "neocart_ct2k3sp", "Neo Geo CTHD 2003 Sp Cart") -neogeo_ct2k3sp_cart_device::neogeo_ct2k3sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_ct2k3sp_cart_device::neogeo_ct2k3sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cthd2k3_cart_device(mconfig, NEOGEO_CT2K3SP_CART, tag, owner, clock) { } @@ -90,7 +90,7 @@ void neogeo_ct2k3sp_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CT2K3SA_CART, neogeo_ct2k3sa_cart_device, "neocart_ct2k3sa", "Neo Geo CTHD 2003 Sp Alt Cart") -neogeo_ct2k3sa_cart_device::neogeo_ct2k3sa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_ct2k3sa_cart_device::neogeo_ct2k3sa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cthd2k3_cart_device(mconfig, NEOGEO_CT2K3SA_CART, tag, owner, clock) { } @@ -108,7 +108,7 @@ void neogeo_ct2k3sa_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_MATRIMBL_CART, neogeo_matrimbl_cart_device, "neocart_matrimbl", "Neo Geo Matrimelee Bootleg Cart") -neogeo_matrimbl_cart_device::neogeo_matrimbl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_matrimbl_cart_device::neogeo_matrimbl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cthd2k3_cart_device(mconfig, NEOGEO_MATRIMBL_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_kof2k2_prot(*this, "kof2k2_prot") diff --git a/src/devices/bus/neogeo/boot_cthd.h b/src/devices/bus/neogeo/boot_cthd.h index d99eeaea941..8e63e214e24 100644 --- a/src/devices/bus/neogeo/boot_cthd.h +++ b/src/devices/bus/neogeo/boot_cthd.h @@ -49,7 +49,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CTHD2K3_CART, neogeo_cthd2k3_cart_device) class neogeo_ct2k3sp_cart_device : public neogeo_cthd2k3_cart_device { public: - neogeo_ct2k3sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_ct2k3sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -64,7 +64,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CT2K3SP_CART, neogeo_ct2k3sp_cart_device) class neogeo_ct2k3sa_cart_device : public neogeo_cthd2k3_cart_device { public: - neogeo_ct2k3sa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_ct2k3sa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -79,7 +79,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CT2K3SA_CART, neogeo_ct2k3sa_cart_device) class neogeo_matrimbl_cart_device : public neogeo_cthd2k3_cart_device { public: - neogeo_matrimbl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_matrimbl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 2; } diff --git a/src/devices/bus/neogeo/boot_kof2k2.cpp b/src/devices/bus/neogeo/boot_kof2k2.cpp index 8bbf3ab0962..64aec4370ef 100644 --- a/src/devices/bus/neogeo/boot_kof2k2.cpp +++ b/src/devices/bus/neogeo/boot_kof2k2.cpp @@ -40,7 +40,7 @@ void neogeo_kf2k2mp2_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_KOF2002B_CART, neogeo_kof2002b_cart_device, "neocart_kof2002b", "Neo Geo KoF 2002 Bootleg Cart") -neogeo_kof2002b_cart_device::neogeo_kof2002b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kof2002b_cart_device::neogeo_kof2002b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KOF2002B_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_pcm2_prot(*this, "pcm2_prot"), @@ -64,7 +64,7 @@ void neogeo_kof2002b_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KF2K2MP_CART, neogeo_kf2k2mp_cart_device, "neocart_kf2k2mp", "Neo Geo KoF 2002 MP Cart") -neogeo_kf2k2mp_cart_device::neogeo_kf2k2mp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k2mp_cart_device::neogeo_kf2k2mp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K2MP_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_pcm2_prot(*this, "pcm2_prot") @@ -87,7 +87,7 @@ void neogeo_kf2k2mp_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KF2K2MP2_CART, neogeo_kf2k2mp2_cart_device, "neocart_kf2k2mp2", "Neo Geo KoF 2002 MP2 Cart") -neogeo_kf2k2mp2_cart_device::neogeo_kf2k2mp2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k2mp2_cart_device::neogeo_kf2k2mp2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K2MP2_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_pcm2_prot(*this, "pcm2_prot") diff --git a/src/devices/bus/neogeo/boot_kof2k2.h b/src/devices/bus/neogeo/boot_kof2k2.h index f7b926a4a2a..61d84e1fc80 100644 --- a/src/devices/bus/neogeo/boot_kof2k2.h +++ b/src/devices/bus/neogeo/boot_kof2k2.h @@ -20,7 +20,7 @@ class neogeo_kof2002b_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kof2002b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kof2002b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } @@ -44,7 +44,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KOF2002B_CART, neogeo_kof2002b_cart_device) class neogeo_kf2k2mp_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf2k2mp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k2mp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } @@ -67,7 +67,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KF2K2MP_CART, neogeo_kf2k2mp_cart_device) class neogeo_kf2k2mp2_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf2k2mp2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k2mp2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/boot_kof2k3.cpp b/src/devices/bus/neogeo/boot_kof2k3.cpp index 172a0ad56db..266549edce1 100644 --- a/src/devices/bus/neogeo/boot_kof2k3.cpp +++ b/src/devices/bus/neogeo/boot_kof2k3.cpp @@ -42,7 +42,7 @@ void neogeo_kf2k3upl_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_KF2K3BL_CART, neogeo_kf2k3bl_cart_device, "neocart_kf2k3bl", "Neo Geo KoF 2003 Bootleg Cart") -neogeo_kf2k3bl_cart_device::neogeo_kf2k3bl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k3bl_cart_device::neogeo_kf2k3bl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K3BL_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_pcm2_prot(*this, "pcm2_prot"), @@ -64,7 +64,7 @@ void neogeo_kf2k3bl_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KF2K3PL_CART, neogeo_kf2k3pl_cart_device, "neocart_kf2k3pl", "Neo Geo KoF 2003 PL Cart") -neogeo_kf2k3pl_cart_device::neogeo_kf2k3pl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k3pl_cart_device::neogeo_kf2k3pl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K3PL_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_pcm2_prot(*this, "pcm2_prot"), @@ -87,7 +87,7 @@ void neogeo_kf2k3pl_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KF2K3UPL_CART, neogeo_kf2k3upl_cart_device, "neocart_kf2k3upl", "Neo Geo KoF 2003 UPL Cart") -neogeo_kf2k3upl_cart_device::neogeo_kf2k3upl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k3upl_cart_device::neogeo_kf2k3upl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K3UPL_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_pcm2_prot(*this, "pcm2_prot"), diff --git a/src/devices/bus/neogeo/boot_kof2k3.h b/src/devices/bus/neogeo/boot_kof2k3.h index a8e3efc5721..620b7b52dbc 100644 --- a/src/devices/bus/neogeo/boot_kof2k3.h +++ b/src/devices/bus/neogeo/boot_kof2k3.h @@ -17,7 +17,7 @@ class neogeo_kf2k3bl_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf2k3bl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k3bl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } @@ -45,7 +45,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KF2K3BL_CART, neogeo_kf2k3bl_cart_device) class neogeo_kf2k3pl_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf2k3pl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k3pl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } @@ -72,7 +72,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KF2K3PL_CART, neogeo_kf2k3pl_cart_device) class neogeo_kf2k3upl_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf2k3upl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k3upl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/boot_misc.cpp b/src/devices/bus/neogeo/boot_misc.cpp index 8476123fbc7..8a7749384d3 100644 --- a/src/devices/bus/neogeo/boot_misc.cpp +++ b/src/devices/bus/neogeo/boot_misc.cpp @@ -60,7 +60,7 @@ void neogeo_bootleg_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_GAROUBL_CART, neogeo_garoubl_cart_device, "neocart_garoubl", "Neo Geo Garou Bootleg Cart") -neogeo_garoubl_cart_device::neogeo_garoubl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_garoubl_cart_device::neogeo_garoubl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_GAROUBL_CART, tag, owner, clock) { } @@ -79,7 +79,7 @@ void neogeo_garoubl_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KOF97ORO_CART, neogeo_kof97oro_cart_device, "neocart_kof97oro", "Neo Geo KoF 97 Orochi Bootleg Cart") -neogeo_kof97oro_cart_device::neogeo_kof97oro_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kof97oro_cart_device::neogeo_kof97oro_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KOF97ORO_CART, tag, owner, clock) { } @@ -99,7 +99,7 @@ void neogeo_kof97oro_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KF10THEP_CART, neogeo_kf10thep_cart_device, "neocart_kf10thep", "Neo Geo KoF 10th Ann. EP Bootleg Cart") -neogeo_kf10thep_cart_device::neogeo_kf10thep_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf10thep_cart_device::neogeo_kf10thep_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF10THEP_CART, tag, owner, clock) { } @@ -118,7 +118,7 @@ void neogeo_kf10thep_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KF2K5UNI_CART, neogeo_kf2k5uni_cart_device, "neocart_kf2k5uni", "Neo Geo KoF 2005 Unique Bootleg Cart") -neogeo_kf2k5uni_cart_device::neogeo_kf2k5uni_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k5uni_cart_device::neogeo_kf2k5uni_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K5UNI_CART, tag, owner, clock) { } @@ -138,7 +138,7 @@ void neogeo_kf2k5uni_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KF2K4SE_CART, neogeo_kf2k4se_cart_device, "neocart_kf2k4se", "Neo Geo KoF 2004 SE Bootleg Cart") -neogeo_kf2k4se_cart_device::neogeo_kf2k4se_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k4se_cart_device::neogeo_kf2k4se_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K4SE_CART, tag, owner, clock) { } @@ -156,7 +156,7 @@ void neogeo_kf2k4se_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_LANS2004_CART, neogeo_lans2004_cart_device, "neocart_lans2004", "Neo Geo Lansquenet 2004 Bootleg Cart") -neogeo_lans2004_cart_device::neogeo_lans2004_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_lans2004_cart_device::neogeo_lans2004_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_LANS2004_CART, tag, owner, clock) { } @@ -176,7 +176,7 @@ void neogeo_lans2004_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_SAMSHO5B_CART, neogeo_samsho5b_cart_device, "neocart_samsho5b", "Neo Geo Samurai Shodown 5 Bootleg Cart") -neogeo_samsho5b_cart_device::neogeo_samsho5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_samsho5b_cart_device::neogeo_samsho5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_SAMSHO5B_CART, tag, owner, clock) { } @@ -196,7 +196,7 @@ void neogeo_samsho5b_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_MSLUG3B6_CART, neogeo_mslug3b6_cart_device, "neocart_mslug3b6", "Neo Geo Metal Slug 6 Bootleg Cart") -neogeo_mslug3b6_cart_device::neogeo_mslug3b6_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_mslug3b6_cart_device::neogeo_mslug3b6_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_MSLUG3B6_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot") { @@ -221,7 +221,7 @@ void neogeo_mslug3b6_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_MS5PLUS_CART, neogeo_ms5plus_cart_device, "neocart_ms5plus", "Neo Geo Metal Slug 5 Plus Bootleg Cart") -neogeo_ms5plus_cart_device::neogeo_ms5plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_ms5plus_cart_device::neogeo_ms5plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_MS5PLUS_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_pcm2_prot(*this, "pcm2_prot") @@ -250,7 +250,7 @@ void neogeo_ms5plus_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_MSLUG5B_CART, neogeo_mslug5b_cart_device, "neocart_mslug5b", "Neo Geo Metal Slug 5 Bootleg Cart") -neogeo_mslug5b_cart_device::neogeo_mslug5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_mslug5b_cart_device::neogeo_mslug5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_MSLUG5B_CART, tag, owner, clock) { } @@ -269,7 +269,7 @@ void neogeo_mslug5b_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_KOG_CART, neogeo_kog_cart_device, "neocart_kog", "Neo Geo King of Gladiators Bootleg Cart") -neogeo_kog_cart_device::neogeo_kog_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kog_cart_device::neogeo_kog_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_KOG_CART, tag, owner, clock), m_jumper(*this, "JUMPER") { diff --git a/src/devices/bus/neogeo/boot_misc.h b/src/devices/bus/neogeo/boot_misc.h index cf07a67e774..e77d0c6c483 100644 --- a/src/devices/bus/neogeo/boot_misc.h +++ b/src/devices/bus/neogeo/boot_misc.h @@ -44,7 +44,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_BOOTLEG_CART, neogeo_bootleg_cart_device) class neogeo_garoubl_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_garoubl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_garoubl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -59,7 +59,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_GAROUBL_CART, neogeo_garoubl_cart_device) class neogeo_kof97oro_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kof97oro_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kof97oro_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -74,7 +74,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KOF97ORO_CART, neogeo_kof97oro_cart_device) class neogeo_kf10thep_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf10thep_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf10thep_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -89,7 +89,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KF10THEP_CART, neogeo_kf10thep_cart_device) class neogeo_kf2k5uni_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf2k5uni_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k5uni_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -103,7 +103,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KF2K5UNI_CART, neogeo_kf2k5uni_cart_device) class neogeo_kf2k4se_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kf2k4se_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k4se_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -118,7 +118,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_KF2K4SE_CART, neogeo_kf2k4se_cart_device) class neogeo_lans2004_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_lans2004_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_lans2004_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -133,7 +133,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_LANS2004_CART, neogeo_lans2004_cart_device) class neogeo_samsho5b_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_samsho5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_samsho5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -148,7 +148,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SAMSHO5B_CART, neogeo_samsho5b_cart_device) class neogeo_mslug3b6_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_mslug3b6_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_mslug3b6_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } @@ -169,7 +169,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_MSLUG3B6_CART, neogeo_mslug3b6_cart_device) class neogeo_ms5plus_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_ms5plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_ms5plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } @@ -194,7 +194,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_MS5PLUS_CART, neogeo_ms5plus_cart_device) class neogeo_mslug5b_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_mslug5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_mslug5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -209,7 +209,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_MSLUG5B_CART, neogeo_mslug5b_cart_device) class neogeo_kog_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_kog_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kog_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/neogeo/boot_svc.cpp b/src/devices/bus/neogeo/boot_svc.cpp index aac306be5ce..bfcbeaca3a8 100644 --- a/src/devices/bus/neogeo/boot_svc.cpp +++ b/src/devices/bus/neogeo/boot_svc.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(NEOGEO_SVCBOOT_CART, neogeo_svcboot_cart_device, "neocart_svcboot", "Neo Geo SVC Bootleg Cart") -neogeo_svcboot_cart_device::neogeo_svcboot_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_svcboot_cart_device::neogeo_svcboot_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_SVCBOOT_CART, tag, owner, clock), m_pvc_prot(*this, "pvc_prot") { @@ -43,7 +43,7 @@ void neogeo_svcboot_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_SVCPLUS_CART, neogeo_svcplus_cart_device, "neocart_svcplus", "Neo Geo SVC Plus Bootleg Cart") -neogeo_svcplus_cart_device::neogeo_svcplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_svcplus_cart_device::neogeo_svcplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_SVCPLUS_CART, tag, owner, clock) { } @@ -63,7 +63,7 @@ void neogeo_svcplus_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_SVCPLUSA_CART, neogeo_svcplusa_cart_device, "neocart_svcplusa", "Neo Geo SVC Plus Alt Bootleg Cart") -neogeo_svcplusa_cart_device::neogeo_svcplusa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_svcplusa_cart_device::neogeo_svcplusa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_SVCPLUSA_CART, tag, owner, clock) { } @@ -82,7 +82,7 @@ void neogeo_svcplusa_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_SVCSPLUS_CART, neogeo_svcsplus_cart_device, "neocart_svcsplus", "Neo Geo SVC S.Plus Bootleg Cart") -neogeo_svcsplus_cart_device::neogeo_svcsplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_svcsplus_cart_device::neogeo_svcsplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_bootleg_cart_device(mconfig, NEOGEO_SVCSPLUS_CART, tag, owner, clock), m_pvc_prot(*this, "pvc_prot") { diff --git a/src/devices/bus/neogeo/boot_svc.h b/src/devices/bus/neogeo/boot_svc.h index 74a064500e3..64ab27081a0 100644 --- a/src/devices/bus/neogeo/boot_svc.h +++ b/src/devices/bus/neogeo/boot_svc.h @@ -17,7 +17,7 @@ class neogeo_svcboot_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_svcboot_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_svcboot_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t get_bank_base(uint16_t sel) override { return m_pvc_prot->get_bank_base(); } virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_pvc_prot->protection_r(offset); } @@ -41,7 +41,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SVCBOOT_CART, neogeo_svcboot_cart_device) class neogeo_svcplus_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_svcplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_svcplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -56,7 +56,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SVCPLUS_CART, neogeo_svcplus_cart_device) class neogeo_svcplusa_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_svcplusa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_svcplusa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -71,7 +71,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SVCPLUSA_CART, neogeo_svcplusa_cart_device) class neogeo_svcsplus_cart_device : public neogeo_bootleg_cart_device { public: - neogeo_svcsplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_svcsplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t get_bank_base(uint16_t sel) override { return m_pvc_prot->get_bank_base(); } virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_pvc_prot->protection_r(offset); } diff --git a/src/devices/bus/neogeo/cmc.cpp b/src/devices/bus/neogeo/cmc.cpp index d1fb1b699f8..736a1a6d042 100644 --- a/src/devices/bus/neogeo/cmc.cpp +++ b/src/devices/bus/neogeo/cmc.cpp @@ -56,7 +56,7 @@ void neogeo_cmc_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_CMC_ZUPAPA_CART, neogeo_cmc_zupapa_cart_device, "neocart_zupapa", "Neo Geo Zupapa CMC42 Cart") -neogeo_cmc_zupapa_cart_device::neogeo_cmc_zupapa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_zupapa_cart_device::neogeo_cmc_zupapa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_ZUPAPA_CART, tag, owner, clock) { } @@ -74,7 +74,7 @@ void neogeo_cmc_zupapa_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_MSLUG3H_CART, neogeo_cmc_mslug3h_cart_device, "neocart_mslug3h", "Neo Geo Metal Slug 3 AES CMC42 Cart") -neogeo_cmc_mslug3h_cart_device::neogeo_cmc_mslug3h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_mslug3h_cart_device::neogeo_cmc_mslug3h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_MSLUG3H_CART, tag, owner, clock) { } @@ -92,7 +92,7 @@ void neogeo_cmc_mslug3h_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_GANRYU_CART, neogeo_cmc_ganryu_cart_device, "neocart_ganryu", "Neo Geo Ganryu CMC42 Cart") -neogeo_cmc_ganryu_cart_device::neogeo_cmc_ganryu_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_ganryu_cart_device::neogeo_cmc_ganryu_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_GANRYU_CART, tag, owner, clock) { } @@ -110,7 +110,7 @@ void neogeo_cmc_ganryu_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_S1945P_CART, neogeo_cmc_s1945p_cart_device, "neocart_s1945p", "Neo Geo Strikers 1945 Plus CMC42 Cart") -neogeo_cmc_s1945p_cart_device::neogeo_cmc_s1945p_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_s1945p_cart_device::neogeo_cmc_s1945p_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_S1945P_CART, tag, owner, clock) { } @@ -127,7 +127,7 @@ void neogeo_cmc_s1945p_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_PREISLE2_CART, neogeo_cmc_preisle2_cart_device, "neocart_preisle2", "Neo Geo Prehistoric Isle 2 CMC42 Cart") -neogeo_cmc_preisle2_cart_device::neogeo_cmc_preisle2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_preisle2_cart_device::neogeo_cmc_preisle2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_PREISLE2_CART, tag, owner, clock) { } @@ -144,7 +144,7 @@ void neogeo_cmc_preisle2_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_BANGBEAD_CART, neogeo_cmc_bangbead_cart_device, "neocart_bangbead", "Neo Geo Bangbead CMC42 Cart") -neogeo_cmc_bangbead_cart_device::neogeo_cmc_bangbead_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_bangbead_cart_device::neogeo_cmc_bangbead_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_BANGBEAD_CART, tag, owner, clock) { } @@ -161,7 +161,7 @@ void neogeo_cmc_bangbead_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_NITD_CART, neogeo_cmc_nitd_cart_device, "neocart_nitd", "Neo Geo NITD CMC42 Cart") -neogeo_cmc_nitd_cart_device::neogeo_cmc_nitd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_nitd_cart_device::neogeo_cmc_nitd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_NITD_CART, tag, owner, clock) { } @@ -179,7 +179,7 @@ void neogeo_cmc_nitd_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_SENGOKU3_CART, neogeo_cmc_sengoku3_cart_device, "neocart_sengoku3", "Neo Geo Sengoku 3 CMC42 Cart") -neogeo_cmc_sengoku3_cart_device::neogeo_cmc_sengoku3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_sengoku3_cart_device::neogeo_cmc_sengoku3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_SENGOKU3_CART, tag, owner, clock) { } @@ -196,7 +196,7 @@ void neogeo_cmc_sengoku3_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_KOF99K_CART, neogeo_cmc_kof99k_cart_device, "neocart_kof99k", "Neo Geo KoF 99 Korea CMC42 Cart") -neogeo_cmc_kof99k_cart_device::neogeo_cmc_kof99k_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_kof99k_cart_device::neogeo_cmc_kof99k_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_KOF99K_CART, tag, owner, clock) { } @@ -214,7 +214,7 @@ void neogeo_cmc_kof99k_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_KOF2001_CART, neogeo_cmc_kof2001_cart_device, "neocart_kof2001", "Neo Geo KoF 2001 CMC50 Cart") -neogeo_cmc_kof2001_cart_device::neogeo_cmc_kof2001_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_kof2001_cart_device::neogeo_cmc_kof2001_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_KOF2001_CART, tag, owner, clock) { } @@ -232,7 +232,7 @@ void neogeo_cmc_kof2001_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_KOF2000N_CART, neogeo_cmc_kof2000n_cart_device, "neocart_kof2000n", "Neo Geo KoF 2000 CMC50 Cart") -neogeo_cmc_kof2000n_cart_device::neogeo_cmc_kof2000n_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_kof2000n_cart_device::neogeo_cmc_kof2000n_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_KOF2000N_CART, tag, owner, clock) { } @@ -251,7 +251,7 @@ void neogeo_cmc_kof2000n_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_CMC_JOCKEYGP_CART, neogeo_cmc_jockeygp_cart_device, "neocart_jockeygp", "Neo Geo Jockey GP CMC50 Cart") -neogeo_cmc_jockeygp_cart_device::neogeo_cmc_jockeygp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_cmc_jockeygp_cart_device::neogeo_cmc_jockeygp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_cmc_cart_device(mconfig, NEOGEO_CMC_JOCKEYGP_CART, tag, owner, clock), m_nvram(*this, "nvram") { diff --git a/src/devices/bus/neogeo/cmc.h b/src/devices/bus/neogeo/cmc.h index 0852574c9f8..871f0163967 100644 --- a/src/devices/bus/neogeo/cmc.h +++ b/src/devices/bus/neogeo/cmc.h @@ -45,7 +45,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_CART, neogeo_cmc_cart_device) class neogeo_cmc_zupapa_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_zupapa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_zupapa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -60,7 +60,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_ZUPAPA_CART, neogeo_cmc_zupapa_cart_device) class neogeo_cmc_mslug3h_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_mslug3h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_mslug3h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -75,7 +75,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_MSLUG3H_CART, neogeo_cmc_mslug3h_cart_device) class neogeo_cmc_ganryu_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_ganryu_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_ganryu_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -90,7 +90,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_GANRYU_CART, neogeo_cmc_ganryu_cart_device) class neogeo_cmc_s1945p_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_s1945p_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_s1945p_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -105,7 +105,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_S1945P_CART, neogeo_cmc_s1945p_cart_device) class neogeo_cmc_preisle2_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_preisle2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_preisle2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -120,7 +120,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_PREISLE2_CART, neogeo_cmc_preisle2_cart_device) class neogeo_cmc_bangbead_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_bangbead_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_bangbead_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -135,7 +135,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_BANGBEAD_CART, neogeo_cmc_bangbead_cart_device) class neogeo_cmc_nitd_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_nitd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_nitd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -150,7 +150,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_NITD_CART, neogeo_cmc_nitd_cart_device) class neogeo_cmc_sengoku3_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_sengoku3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_sengoku3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -165,7 +165,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_SENGOKU3_CART, neogeo_cmc_sengoku3_cart_device) class neogeo_cmc_kof99k_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_kof99k_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_kof99k_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -180,7 +180,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_KOF99K_CART, neogeo_cmc_kof99k_cart_device) class neogeo_cmc_kof2001_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_kof2001_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_kof2001_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -195,7 +195,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_KOF2001_CART, neogeo_cmc_kof2001_cart_device) class neogeo_cmc_kof2000n_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_kof2000n_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_kof2000n_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 2; } }; @@ -210,7 +210,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_CMC_KOF2000N_CART, neogeo_cmc_kof2000n_cart_device) class neogeo_cmc_jockeygp_cart_device : public neogeo_cmc_cart_device { public: - neogeo_cmc_jockeygp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_cmc_jockeygp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } diff --git a/src/devices/bus/neogeo/kof2k2.cpp b/src/devices/bus/neogeo/kof2k2.cpp index 8ff5f040d3a..98b3e428604 100644 --- a/src/devices/bus/neogeo/kof2k2.cpp +++ b/src/devices/bus/neogeo/kof2k2.cpp @@ -64,7 +64,7 @@ void neogeo_kof2k2type_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_K2K2_KOF2002_CART, neogeo_kof2002_cart_device, "neocart_kof2002", "Neo Geo KoF 2002 Cart") -neogeo_kof2002_cart_device::neogeo_kof2002_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kof2002_cart_device::neogeo_kof2002_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_kof2k2type_cart_device(mconfig, NEOGEO_K2K2_KOF2002_CART, tag, owner, clock) { } @@ -84,7 +84,7 @@ void neogeo_kof2002_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_K2K2_KF2K2PLS_CART, neogeo_kf2k2pls_cart_device, "neocart_kf2k2pls", "Neo Geo KoF 2002 Plus Cart") -neogeo_kf2k2pls_cart_device::neogeo_kf2k2pls_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kf2k2pls_cart_device::neogeo_kf2k2pls_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_kof2k2type_cart_device(mconfig, NEOGEO_K2K2_KF2K2PLS_CART, tag, owner, clock) { } @@ -104,7 +104,7 @@ void neogeo_kf2k2pls_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_K2K2_MATRIM_CART, neogeo_matrim_cart_device, "neocart_matrim", "Neo Geo Matrimelee Cart") -neogeo_matrim_cart_device::neogeo_matrim_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_matrim_cart_device::neogeo_matrim_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_kof2k2type_cart_device(mconfig, NEOGEO_K2K2_MATRIM_CART, tag, owner, clock) { } @@ -124,7 +124,7 @@ void neogeo_matrim_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_K2K2_SAMSHO5_CART, neogeo_samsho5_cart_device, "neocart_samsho5", "Neo Geo Samurai Shodown 5 Cart") -neogeo_samsho5_cart_device::neogeo_samsho5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_samsho5_cart_device::neogeo_samsho5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_kof2k2type_cart_device(mconfig, NEOGEO_K2K2_SAMSHO5_CART, tag, owner, clock) { } @@ -144,7 +144,7 @@ void neogeo_samsho5_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_K2K2_SAMSHO5SP_CART, neogeo_samsho5sp_cart_device, "neocart_samsh5sp", "Neo Geo Samurai Shodown 5 Special Cart") -neogeo_samsho5sp_cart_device::neogeo_samsho5sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_samsho5sp_cart_device::neogeo_samsho5sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_kof2k2type_cart_device(mconfig, NEOGEO_K2K2_SAMSHO5SP_CART, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/kof2k2.h b/src/devices/bus/neogeo/kof2k2.h index f5ade4c4444..f0db84a6adc 100644 --- a/src/devices/bus/neogeo/kof2k2.h +++ b/src/devices/bus/neogeo/kof2k2.h @@ -49,7 +49,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_K2K2_CART, neogeo_kof2k2type_cart_device) class neogeo_kof2002_cart_device : public neogeo_kof2k2type_cart_device { public: - neogeo_kof2002_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kof2002_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -61,7 +61,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_K2K2_KOF2002_CART, neogeo_kof2002_cart_device) class neogeo_kf2k2pls_cart_device : public neogeo_kof2k2type_cart_device { public: - neogeo_kf2k2pls_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kf2k2pls_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -76,7 +76,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_K2K2_KF2K2PLS_CART, neogeo_kf2k2pls_cart_device) class neogeo_matrim_cart_device : public neogeo_kof2k2type_cart_device { public: - neogeo_matrim_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_matrim_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 2; } }; @@ -91,7 +91,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_K2K2_MATRIM_CART, neogeo_matrim_cart_device) class neogeo_samsho5_cart_device : public neogeo_kof2k2type_cart_device { public: - neogeo_samsho5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_samsho5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -106,7 +106,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_K2K2_SAMSHO5_CART, neogeo_samsho5_cart_device) class neogeo_samsho5sp_cart_device : public neogeo_kof2k2type_cart_device { public: - neogeo_samsho5sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_samsho5sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; diff --git a/src/devices/bus/neogeo/pcm2.cpp b/src/devices/bus/neogeo/pcm2.cpp index 521c796d59a..9b28ed8164c 100644 --- a/src/devices/bus/neogeo/pcm2.cpp +++ b/src/devices/bus/neogeo/pcm2.cpp @@ -62,7 +62,7 @@ void neogeo_pcm2_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_PCM2_MSLUG4_CART, neogeo_pcm2_mslug4_cart_device, "neocart_mslug4", "Neo Geo Metal Slug 3 PCM2 Cart") -neogeo_pcm2_mslug4_cart_device::neogeo_pcm2_mslug4_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pcm2_mslug4_cart_device::neogeo_pcm2_mslug4_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pcm2_cart_device(mconfig, NEOGEO_PCM2_MSLUG4_CART, tag, owner, clock) { } @@ -82,7 +82,7 @@ void neogeo_pcm2_mslug4_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_PCM2_MS4PLUS_CART, neogeo_pcm2_ms4plus_cart_device, "neocart_ms4plus", "Neo Geo Metal Slug 4 Plus PCM2 Cart") -neogeo_pcm2_ms4plus_cart_device::neogeo_pcm2_ms4plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pcm2_ms4plus_cart_device::neogeo_pcm2_ms4plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pcm2_cart_device(mconfig, NEOGEO_PCM2_MS4PLUS_CART, tag, owner, clock) { } @@ -101,7 +101,7 @@ void neogeo_pcm2_ms4plus_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_PCM2_ROTD_CART, neogeo_pcm2_rotd_cart_device, "neocart_rotd", "Neo Geo Rage of the Dragon PCM2 Cart") -neogeo_pcm2_rotd_cart_device::neogeo_pcm2_rotd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pcm2_rotd_cart_device::neogeo_pcm2_rotd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pcm2_cart_device(mconfig, NEOGEO_PCM2_ROTD_CART, tag, owner, clock) { } @@ -120,7 +120,7 @@ void neogeo_pcm2_rotd_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_PCM2_PNYAA_CART, neogeo_pcm2_pnyaa_cart_device, "neocart_pnyaa", "Neo Geo Pnyaa PCM2 Cart") -neogeo_pcm2_pnyaa_cart_device::neogeo_pcm2_pnyaa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pcm2_pnyaa_cart_device::neogeo_pcm2_pnyaa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pcm2_cart_device(mconfig, NEOGEO_PCM2_PNYAA_CART, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/pcm2.h b/src/devices/bus/neogeo/pcm2.h index a088d9b0172..5832e1b4955 100644 --- a/src/devices/bus/neogeo/pcm2.h +++ b/src/devices/bus/neogeo/pcm2.h @@ -43,7 +43,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PCM2_CART, neogeo_pcm2_cart_device) class neogeo_pcm2_mslug4_cart_device : public neogeo_pcm2_cart_device { public: - neogeo_pcm2_mslug4_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pcm2_mslug4_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -58,7 +58,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PCM2_MSLUG4_CART, neogeo_pcm2_mslug4_cart_device) class neogeo_pcm2_ms4plus_cart_device : public neogeo_pcm2_cart_device { public: - neogeo_pcm2_ms4plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pcm2_ms4plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } }; @@ -73,7 +73,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PCM2_MS4PLUS_CART, neogeo_pcm2_ms4plus_cart_device) class neogeo_pcm2_rotd_cart_device : public neogeo_pcm2_cart_device { public: - neogeo_pcm2_rotd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pcm2_rotd_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -88,7 +88,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PCM2_ROTD_CART, neogeo_pcm2_rotd_cart_device) class neogeo_pcm2_pnyaa_cart_device : public neogeo_pcm2_cart_device { public: - neogeo_pcm2_pnyaa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pcm2_pnyaa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; diff --git a/src/devices/bus/neogeo/prot_cmc.cpp b/src/devices/bus/neogeo/prot_cmc.cpp index 77591827f54..73f61c7e449 100644 --- a/src/devices/bus/neogeo/prot_cmc.cpp +++ b/src/devices/bus/neogeo/prot_cmc.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(NG_CMC_PROT, cmc_prot_device, "ng_cmc_prot", "Neo Geo CMC42/CMC40 Protection") -cmc_prot_device::cmc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cmc_prot_device::cmc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_CMC_PROT, tag, owner, clock), type0_t03(nullptr), type0_t12(nullptr), diff --git a/src/devices/bus/neogeo/prot_cmc.h b/src/devices/bus/neogeo/prot_cmc.h index 2853c71aa8f..fd2c46cdd93 100644 --- a/src/devices/bus/neogeo/prot_cmc.h +++ b/src/devices/bus/neogeo/prot_cmc.h @@ -41,7 +41,7 @@ class cmc_prot_device : public device_t { public: // construction/destruction - cmc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cmc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void decrypt(uint8_t *r0, uint8_t *r1, uint8_t c0, uint8_t c1, diff --git a/src/devices/bus/neogeo/prot_cthd.cpp b/src/devices/bus/neogeo/prot_cthd.cpp index d4cbc5c2a79..9c3310ba0ea 100644 --- a/src/devices/bus/neogeo/prot_cthd.cpp +++ b/src/devices/bus/neogeo/prot_cthd.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(NG_CTHD_PROT, cthd_prot_device, "ng_cthd_prot", "Neo Geo CTHD Protection (bootleg)") -cthd_prot_device::cthd_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cthd_prot_device::cthd_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_CTHD_PROT, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/prot_cthd.h b/src/devices/bus/neogeo/prot_cthd.h index a331742da4f..add29bd214f 100644 --- a/src/devices/bus/neogeo/prot_cthd.h +++ b/src/devices/bus/neogeo/prot_cthd.h @@ -12,7 +12,7 @@ class cthd_prot_device : public device_t { public: // construction/destruction - cthd_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cthd_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void fix_do(uint8_t* sprrom, uint32_t sprrom_size, int start, int end, int bit3shift, int bit2shift, int bit1shift, int bit0shift); void gfx_address_fix(uint8_t* sprrom, uint32_t sprrom_size, int start, int end); diff --git a/src/devices/bus/neogeo/prot_fatfury2.cpp b/src/devices/bus/neogeo/prot_fatfury2.cpp index d28b417b33d..c88e23fe5e3 100644 --- a/src/devices/bus/neogeo/prot_fatfury2.cpp +++ b/src/devices/bus/neogeo/prot_fatfury2.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(NG_FATFURY2_PROT, fatfury2_prot_device, "ng_fatfury_prot", "Neo Geo Fatal Fury 2 Protection") -fatfury2_prot_device::fatfury2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +fatfury2_prot_device::fatfury2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_FATFURY2_PROT, tag, owner, clock), m_pro_ct0(*this, "pro_ct0") { @@ -18,7 +18,7 @@ fatfury2_prot_device::fatfury2_prot_device(const machine_config &mconfig, const void fatfury2_prot_device::device_add_mconfig(machine_config &config) { - ALPHA_8921(config, m_pro_ct0, 0); // PRO-CT0 or SNK-9201 + ALPHA_8921(config, m_pro_ct0); // PRO-CT0 or SNK-9201 } void fatfury2_prot_device::device_start() diff --git a/src/devices/bus/neogeo/prot_fatfury2.h b/src/devices/bus/neogeo/prot_fatfury2.h index 1cab87cb26a..7057e37d4d7 100644 --- a/src/devices/bus/neogeo/prot_fatfury2.h +++ b/src/devices/bus/neogeo/prot_fatfury2.h @@ -15,7 +15,7 @@ class fatfury2_prot_device : public device_t { public: // construction/destruction - fatfury2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fatfury2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint16_t protection_r(offs_t offset); void protection_w(offs_t offset, uint16_t data); diff --git a/src/devices/bus/neogeo/prot_kof2k2.cpp b/src/devices/bus/neogeo/prot_kof2k2.cpp index 75b79172d29..69b7f59ce36 100644 --- a/src/devices/bus/neogeo/prot_kof2k2.cpp +++ b/src/devices/bus/neogeo/prot_kof2k2.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(NG_KOF2002_PROT, kof2002_prot_device, "ng_kof2002_prot", "Neo Geo KoF 2002 Protection") -kof2002_prot_device::kof2002_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kof2002_prot_device::kof2002_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_KOF2002_PROT, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/prot_kof2k2.h b/src/devices/bus/neogeo/prot_kof2k2.h index 324da5a8918..2cf38c13b77 100644 --- a/src/devices/bus/neogeo/prot_kof2k2.h +++ b/src/devices/bus/neogeo/prot_kof2k2.h @@ -14,7 +14,7 @@ class kof2002_prot_device : public device_t { public: // construction/destruction - kof2002_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + kof2002_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void kof2002_decrypt_68k(uint8_t* cpurom, uint32_t cpurom_size); void matrim_decrypt_68k(uint8_t* cpurom, uint32_t cpurom_size); diff --git a/src/devices/bus/neogeo/prot_kof2k3bl.cpp b/src/devices/bus/neogeo/prot_kof2k3bl.cpp index 67262d15bc8..298e100612e 100644 --- a/src/devices/bus/neogeo/prot_kof2k3bl.cpp +++ b/src/devices/bus/neogeo/prot_kof2k3bl.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(NG_KOF2K3BL_PROT, kof2k3bl_prot_device, "ng_kof2k3bl_prot", "Neo Geo KoF 2003 Bootleg Protection") -kof2k3bl_prot_device::kof2k3bl_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +kof2k3bl_prot_device::kof2k3bl_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_KOF2K3BL_PROT, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/prot_kof2k3bl.h b/src/devices/bus/neogeo/prot_kof2k3bl.h index c4c83d30e5d..0e42c2240ed 100644 --- a/src/devices/bus/neogeo/prot_kof2k3bl.h +++ b/src/devices/bus/neogeo/prot_kof2k3bl.h @@ -13,7 +13,7 @@ class kof2k3bl_prot_device : public device_t { public: // construction/destruction - kof2k3bl_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + kof2k3bl_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint16_t protection_r(offs_t offset); void kof2003_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/neogeo/prot_kof98.cpp b/src/devices/bus/neogeo/prot_kof98.cpp index 528bb2bf691..b3c95e377db 100644 --- a/src/devices/bus/neogeo/prot_kof98.cpp +++ b/src/devices/bus/neogeo/prot_kof98.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(NG_KOF98_PROT, kof98_prot_device, "ng_kof98_prot", "Neo Geo KoF 98 Protection") -kof98_prot_device::kof98_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +kof98_prot_device::kof98_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_KOF98_PROT, tag, owner, clock), m_prot_state(0) { diff --git a/src/devices/bus/neogeo/prot_kof98.h b/src/devices/bus/neogeo/prot_kof98.h index eef9fa47a7e..df0e9a3d788 100644 --- a/src/devices/bus/neogeo/prot_kof98.h +++ b/src/devices/bus/neogeo/prot_kof98.h @@ -14,7 +14,7 @@ class kof98_prot_device : public device_t { public: // construction/destruction - kof98_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + kof98_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void decrypt_68k(uint8_t* cpurom, uint32_t cpurom_size); void protection_w(uint16_t data); diff --git a/src/devices/bus/neogeo/prot_misc.cpp b/src/devices/bus/neogeo/prot_misc.cpp index 3cd4b6db75c..d1eb29d3abb 100644 --- a/src/devices/bus/neogeo/prot_misc.cpp +++ b/src/devices/bus/neogeo/prot_misc.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(NEOBOOT_PROT, neoboot_prot_device, "ngboot_prot", "Neo Geo Bootleg Protection(s)") -neoboot_prot_device::neoboot_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neoboot_prot_device::neoboot_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOBOOT_PROT, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/prot_misc.h b/src/devices/bus/neogeo/prot_misc.h index b7e89224573..3974a9a4ebb 100644 --- a/src/devices/bus/neogeo/prot_misc.h +++ b/src/devices/bus/neogeo/prot_misc.h @@ -13,7 +13,7 @@ class neoboot_prot_device : public device_t { public: // construction/destruction - neoboot_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + neoboot_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void cx_decrypt(uint8_t* sprrom, uint32_t sprrom_size); void sx_decrypt(uint8_t* fixed, uint32_t fixed_size, int value); diff --git a/src/devices/bus/neogeo/prot_mslugx.cpp b/src/devices/bus/neogeo/prot_mslugx.cpp index 38cbb0b436b..e6913ad785e 100644 --- a/src/devices/bus/neogeo/prot_mslugx.cpp +++ b/src/devices/bus/neogeo/prot_mslugx.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(NG_MSLUGX_PROT, mslugx_prot_device, "ng_mslugx_prot", "Neo Geo Metal Slug X Protection") -mslugx_prot_device::mslugx_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mslugx_prot_device::mslugx_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_MSLUGX_PROT, tag, owner, clock), m_counter(0), m_command(0) diff --git a/src/devices/bus/neogeo/prot_mslugx.h b/src/devices/bus/neogeo/prot_mslugx.h index 0280ad1bbe5..9efcf1501b3 100644 --- a/src/devices/bus/neogeo/prot_mslugx.h +++ b/src/devices/bus/neogeo/prot_mslugx.h @@ -14,7 +14,7 @@ class mslugx_prot_device : public device_t { public: // construction/destruction - mslugx_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mslugx_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void protection_w(offs_t offset, uint16_t data); uint16_t protection_r(address_space &space, offs_t offset); diff --git a/src/devices/bus/neogeo/prot_pcm2.cpp b/src/devices/bus/neogeo/prot_pcm2.cpp index 82f3175eb8b..7e70be9cd15 100644 --- a/src/devices/bus/neogeo/prot_pcm2.cpp +++ b/src/devices/bus/neogeo/prot_pcm2.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(NG_PCM2_PROT, pcm2_prot_device, "ng_pcm2_prot", "Neo Geo NEOPCM2 Protection") -pcm2_prot_device::pcm2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcm2_prot_device::pcm2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_PCM2_PROT, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/prot_pcm2.h b/src/devices/bus/neogeo/prot_pcm2.h index 707e9ab94b4..69f321a0751 100644 --- a/src/devices/bus/neogeo/prot_pcm2.h +++ b/src/devices/bus/neogeo/prot_pcm2.h @@ -14,7 +14,7 @@ class pcm2_prot_device : public device_t { public: // construction/destruction - pcm2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pcm2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void decrypt(uint8_t* ymrom, uint32_t ymsize, int value); void swap(uint8_t* ymrom, uint32_t ymsize, int value); diff --git a/src/devices/bus/neogeo/prot_pvc.cpp b/src/devices/bus/neogeo/prot_pvc.cpp index 1f0d734e732..5a8cd625b73 100644 --- a/src/devices/bus/neogeo/prot_pvc.cpp +++ b/src/devices/bus/neogeo/prot_pvc.cpp @@ -10,7 +10,7 @@ DEFINE_DEVICE_TYPE(NG_PVC_PROT, pvc_prot_device, "ng_pvc_prot", "Neo Geo PVC Protection") -pvc_prot_device::pvc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pvc_prot_device::pvc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_PVC_PROT, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/prot_pvc.h b/src/devices/bus/neogeo/prot_pvc.h index f133424c2fa..bc1a0545c36 100644 --- a/src/devices/bus/neogeo/prot_pvc.h +++ b/src/devices/bus/neogeo/prot_pvc.h @@ -13,7 +13,7 @@ class pvc_prot_device : public device_t { public: // construction/destruction - pvc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pvc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void pvc_write_unpack_color(); void pvc_write_pack_color(); diff --git a/src/devices/bus/neogeo/prot_sma.cpp b/src/devices/bus/neogeo/prot_sma.cpp index ccb569fec6e..b6877be8d76 100644 --- a/src/devices/bus/neogeo/prot_sma.cpp +++ b/src/devices/bus/neogeo/prot_sma.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(NG_SMA_PROT, sma_prot_device, "ng_sma_prot", "Neo Geo SMA Protection") -sma_prot_device::sma_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sma_prot_device::sma_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_SMA_PROT, tag, owner, clock), m_sma_rng(0) { diff --git a/src/devices/bus/neogeo/prot_sma.h b/src/devices/bus/neogeo/prot_sma.h index bb19fe43f40..554c05a24b9 100644 --- a/src/devices/bus/neogeo/prot_sma.h +++ b/src/devices/bus/neogeo/prot_sma.h @@ -14,7 +14,7 @@ class sma_prot_device : public device_t { public: // construction/destruction - sma_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sma_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); //void kof99_bankswitch_w(uint16_t data); //void garou_bankswitch_w(uint16_t data); diff --git a/src/devices/bus/neogeo/pvc.cpp b/src/devices/bus/neogeo/pvc.cpp index 26987ab33dc..909b9ff41af 100644 --- a/src/devices/bus/neogeo/pvc.cpp +++ b/src/devices/bus/neogeo/pvc.cpp @@ -64,7 +64,7 @@ void neogeo_pvc_cart_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NEOGEO_PVC_MSLUG5_CART, neogeo_pvc_mslug5_cart_device, "neocart_mslug5", "Neo Geo Metal Slug 5 PVC Cart") -neogeo_pvc_mslug5_cart_device::neogeo_pvc_mslug5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pvc_mslug5_cart_device::neogeo_pvc_mslug5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pvc_cart_device(mconfig, NEOGEO_PVC_MSLUG5_CART, tag, owner, clock) { } @@ -84,7 +84,7 @@ void neogeo_pvc_mslug5_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_PVC_SVC_CART, neogeo_pvc_svc_cart_device, "neocart_svc", "Neo Geo SNK vs Capcom PVC Cart") -neogeo_pvc_svc_cart_device::neogeo_pvc_svc_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pvc_svc_cart_device::neogeo_pvc_svc_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pvc_cart_device(mconfig, NEOGEO_PVC_SVC_CART, tag, owner, clock) { } @@ -105,7 +105,7 @@ void neogeo_pvc_svc_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_PVC_KOF2003_CART, neogeo_pvc_kof2003_cart_device, "neocart_kof2003", "Neo Geo KoF 2003 PVC Cart") -neogeo_pvc_kof2003_cart_device::neogeo_pvc_kof2003_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pvc_kof2003_cart_device::neogeo_pvc_kof2003_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pvc_cart_device(mconfig, NEOGEO_PVC_KOF2003_CART, tag, owner, clock) { } @@ -125,7 +125,7 @@ void neogeo_pvc_kof2003_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) DEFINE_DEVICE_TYPE(NEOGEO_PVC_KOF2003H_CART, neogeo_pvc_kof2003h_cart_device, "neocart_kof2003h", "Neo Geo KoF 2003 AES PVC Cart") -neogeo_pvc_kof2003h_cart_device::neogeo_pvc_kof2003h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_pvc_kof2003h_cart_device::neogeo_pvc_kof2003h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_pvc_cart_device(mconfig, NEOGEO_PVC_KOF2003H_CART, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/pvc.h b/src/devices/bus/neogeo/pvc.h index 23f1bbfede5..79ebb4931c0 100644 --- a/src/devices/bus/neogeo/pvc.h +++ b/src/devices/bus/neogeo/pvc.h @@ -53,7 +53,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PVC_CART, neogeo_pvc_cart_device) class neogeo_pvc_mslug5_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_mslug5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_mslug5_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } }; @@ -68,7 +68,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PVC_MSLUG5_CART, neogeo_pvc_mslug5_cart_device) class neogeo_pvc_svc_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_svc_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_svc_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 2; } }; @@ -83,7 +83,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PVC_SVC_CART, neogeo_pvc_svc_cart_device) class neogeo_pvc_kof2003_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_kof2003_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_kof2003_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 2; } }; @@ -98,7 +98,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_PVC_KOF2003_CART, neogeo_pvc_kof2003_cart_device) class neogeo_pvc_kof2003h_cart_device : public neogeo_pvc_cart_device { public: - neogeo_pvc_kof2003h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_pvc_kof2003h_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 2; } }; diff --git a/src/devices/bus/neogeo/rom.cpp b/src/devices/bus/neogeo/rom.cpp index 290ea9f3a5d..a4a31bf1ab9 100644 --- a/src/devices/bus/neogeo/rom.cpp +++ b/src/devices/bus/neogeo/rom.cpp @@ -72,7 +72,7 @@ void neogeo_rom_device::banksel_w(uint16_t data) DEFINE_DEVICE_TYPE(NEOGEO_VLINER_CART, neogeo_vliner_cart_device, "neocart_vliner", "Neo Geo V-Liner Cart") -neogeo_vliner_cart_device::neogeo_vliner_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_vliner_cart_device::neogeo_vliner_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_rom_device(mconfig, NEOGEO_VLINER_CART, tag, owner, clock), m_nvram(*this, "nvram") { diff --git a/src/devices/bus/neogeo/rom.h b/src/devices/bus/neogeo/rom.h index 638154d919a..8394c3c4315 100644 --- a/src/devices/bus/neogeo/rom.h +++ b/src/devices/bus/neogeo/rom.h @@ -42,7 +42,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_ROM, neogeo_rom_device) class neogeo_vliner_cart_device : public neogeo_rom_device { public: - neogeo_vliner_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_vliner_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t ram_r(offs_t offset) override { return m_cart_ram[offset]; } virtual void ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { COMBINE_DATA(&m_cart_ram[offset]); } diff --git a/src/devices/bus/neogeo/sbp.cpp b/src/devices/bus/neogeo/sbp.cpp index 0ce1d179248..9c17cb635a9 100644 --- a/src/devices/bus/neogeo/sbp.cpp +++ b/src/devices/bus/neogeo/sbp.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(NEOGEO_SBP_CART, neogeo_sbp_cart_device, "neocart_sbp", "Neo Geo Super Bubble Pop Cart") -neogeo_sbp_cart_device::neogeo_sbp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_sbp_cart_device::neogeo_sbp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_rom_device(mconfig, NEOGEO_SBP_CART, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/sbp.h b/src/devices/bus/neogeo/sbp.h index 25fd920f281..a424e8b6030 100644 --- a/src/devices/bus/neogeo/sbp.h +++ b/src/devices/bus/neogeo/sbp.h @@ -15,7 +15,7 @@ class neogeo_sbp_cart_device : public neogeo_rom_device { public: - neogeo_sbp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_sbp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; virtual uint16_t protection_r(address_space &space, offs_t offset) override; diff --git a/src/devices/bus/neogeo/sma.cpp b/src/devices/bus/neogeo/sma.cpp index ee031e4f44f..83aea5c185c 100644 --- a/src/devices/bus/neogeo/sma.cpp +++ b/src/devices/bus/neogeo/sma.cpp @@ -66,7 +66,7 @@ void neogeo_sma_cart_device::device_add_mconfig(machine_config &config) kof99 **************************************************/ -neogeo_sma_kof99_cart_device::neogeo_sma_kof99_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_sma_kof99_cart_device::neogeo_sma_kof99_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_sma_cart_device(mconfig, NEOGEO_SMA_KOF99_CART, tag, owner, clock) { } @@ -83,7 +83,7 @@ void neogeo_sma_kof99_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) garou **************************************************/ -neogeo_sma_garou_cart_device::neogeo_sma_garou_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_sma_garou_cart_device::neogeo_sma_garou_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_sma_cart_device(mconfig, NEOGEO_SMA_GAROU_CART, tag, owner, clock) { } @@ -100,7 +100,7 @@ void neogeo_sma_garou_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) garouh **************************************************/ -neogeo_sma_garouh_cart_device::neogeo_sma_garouh_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_sma_garouh_cart_device::neogeo_sma_garouh_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_sma_cart_device(mconfig, NEOGEO_SMA_GAROUH_CART, tag, owner, clock) { } @@ -117,7 +117,7 @@ void neogeo_sma_garouh_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) mslug3 **************************************************/ -neogeo_sma_mslug3_cart_device::neogeo_sma_mslug3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_sma_mslug3_cart_device::neogeo_sma_mslug3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_sma_cart_device(mconfig, NEOGEO_SMA_MSLUG3_CART, tag, owner, clock) { } @@ -129,7 +129,7 @@ void neogeo_sma_mslug3_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) m_cmc_prot->sfix_decrypt(spr_region, spr_region_size, fix_region, fix_region_size); } -neogeo_sma_mslug3a_cart_device::neogeo_sma_mslug3a_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_sma_mslug3a_cart_device::neogeo_sma_mslug3a_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_sma_cart_device(mconfig, NEOGEO_SMA_MSLUG3A_CART, tag, owner, clock) { } @@ -146,7 +146,7 @@ void neogeo_sma_mslug3a_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) kof2000 **************************************************/ -neogeo_sma_kof2000_cart_device::neogeo_sma_kof2000_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_sma_kof2000_cart_device::neogeo_sma_kof2000_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_sma_cart_device(mconfig, NEOGEO_SMA_KOF2000_CART, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo/sma.h b/src/devices/bus/neogeo/sma.h index 1eb1a05e6ba..8c3cfc6ea47 100644 --- a/src/devices/bus/neogeo/sma.h +++ b/src/devices/bus/neogeo/sma.h @@ -48,7 +48,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SMA_CART, neogeo_sma_cart_device) class neogeo_sma_kof99_cart_device : public neogeo_sma_cart_device { public: - neogeo_sma_kof99_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_sma_kof99_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_sma_prot->kof99_bank_base(sel); } @@ -64,7 +64,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SMA_KOF99_CART, neogeo_sma_kof99_cart_device) class neogeo_sma_garou_cart_device : public neogeo_sma_cart_device { public: - neogeo_sma_garou_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_sma_garou_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_sma_prot->garou_bank_base(sel); } @@ -80,7 +80,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SMA_GAROU_CART, neogeo_sma_garou_cart_device) class neogeo_sma_garouh_cart_device : public neogeo_sma_cart_device { public: - neogeo_sma_garouh_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_sma_garouh_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_sma_prot->garouh_bank_base(sel); } @@ -96,7 +96,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SMA_GAROUH_CART, neogeo_sma_garouh_cart_device) class neogeo_sma_mslug3_cart_device : public neogeo_sma_cart_device { public: - neogeo_sma_mslug3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_sma_mslug3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_sma_prot->mslug3_bank_base(sel); } @@ -107,7 +107,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SMA_MSLUG3_CART, neogeo_sma_mslug3_cart_device) class neogeo_sma_mslug3a_cart_device : public neogeo_sma_cart_device { public: - neogeo_sma_mslug3a_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_sma_mslug3a_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_sma_prot->mslug3a_bank_base(sel); } @@ -123,7 +123,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SMA_MSLUG3A_CART, neogeo_sma_mslug3a_cart_device) class neogeo_sma_kof2000_cart_device : public neogeo_sma_cart_device { public: - neogeo_sma_kof2000_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_sma_kof2000_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 2; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_sma_prot->kof2000_bank_base(sel); } diff --git a/src/devices/bus/neogeo_ctrl/ctrl.cpp b/src/devices/bus/neogeo_ctrl/ctrl.cpp index 93ff26640f8..df2338aec20 100644 --- a/src/devices/bus/neogeo_ctrl/ctrl.cpp +++ b/src/devices/bus/neogeo_ctrl/ctrl.cpp @@ -86,7 +86,7 @@ device_neogeo_ctrl_edge_interface::~device_neogeo_ctrl_edge_interface() // neogeo_control_port_device - constructor //------------------------------------------------- -neogeo_control_port_device::neogeo_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_control_port_device::neogeo_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOGEO_CONTROL_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) @@ -135,7 +135,7 @@ void neogeo_control_port_device::write_ctrlsel(uint8_t data) // neogeo_ctrl_edge_port_device - constructor //------------------------------------------------- -neogeo_ctrl_edge_port_device::neogeo_ctrl_edge_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_ctrl_edge_port_device::neogeo_ctrl_edge_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOGEO_CTRL_EDGE_CONNECTOR, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) diff --git a/src/devices/bus/neogeo_ctrl/ctrl.h b/src/devices/bus/neogeo_ctrl/ctrl.h index 552f80eced4..16828f58cf4 100644 --- a/src/devices/bus/neogeo_ctrl/ctrl.h +++ b/src/devices/bus/neogeo_ctrl/ctrl.h @@ -42,14 +42,14 @@ public: // construction/destruction template neogeo_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool const fixed) - : neogeo_control_port_device(mconfig, tag, owner, (uint32_t)0) + : neogeo_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(fixed); } - neogeo_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~neogeo_control_port_device(); uint8_t read_ctrl(); @@ -88,14 +88,14 @@ public: // construction/destruction template neogeo_ctrl_edge_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool const fixed) - : neogeo_ctrl_edge_port_device(mconfig, tag, owner, (uint32_t)0) + : neogeo_ctrl_edge_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(fixed); } - neogeo_ctrl_edge_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_ctrl_edge_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~neogeo_ctrl_edge_port_device(); uint8_t read_start_sel(); diff --git a/src/devices/bus/neogeo_ctrl/dial.cpp b/src/devices/bus/neogeo_ctrl/dial.cpp index 6ee2a75840c..564562c784f 100644 --- a/src/devices/bus/neogeo_ctrl/dial.cpp +++ b/src/devices/bus/neogeo_ctrl/dial.cpp @@ -66,7 +66,7 @@ ioport_constructor neogeo_dial_device::device_input_ports() const // neogeo_dial_device - constructor //------------------------------------------------- -neogeo_dial_device::neogeo_dial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_dial_device::neogeo_dial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOGEO_DIAL, tag, owner, clock), device_neogeo_ctrl_edge_interface(mconfig, *this), m_joy1(*this, "JOY1"), diff --git a/src/devices/bus/neogeo_ctrl/dial.h b/src/devices/bus/neogeo_ctrl/dial.h index 676e1b51316..56abc6b9241 100644 --- a/src/devices/bus/neogeo_ctrl/dial.h +++ b/src/devices/bus/neogeo_ctrl/dial.h @@ -24,7 +24,7 @@ class neogeo_dial_device : public device_t, public device_neogeo_ctrl_edge_inter { public: // construction/destruction - neogeo_dial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_dial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/neogeo_ctrl/irrmaze.cpp b/src/devices/bus/neogeo_ctrl/irrmaze.cpp index 59374e6f99a..94e143bf1a0 100644 --- a/src/devices/bus/neogeo_ctrl/irrmaze.cpp +++ b/src/devices/bus/neogeo_ctrl/irrmaze.cpp @@ -45,7 +45,7 @@ INPUT_PORTS_END // neogeo_irrmaze_device - constructor //------------------------------------------------- -neogeo_irrmaze_device::neogeo_irrmaze_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_irrmaze_device::neogeo_irrmaze_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOGEO_IRRMAZE, tag, owner, clock), device_neogeo_ctrl_edge_interface(mconfig, *this), m_tx(*this, "TRACK_X"), diff --git a/src/devices/bus/neogeo_ctrl/irrmaze.h b/src/devices/bus/neogeo_ctrl/irrmaze.h index 78a00801f8c..8cc9ef2e9fa 100644 --- a/src/devices/bus/neogeo_ctrl/irrmaze.h +++ b/src/devices/bus/neogeo_ctrl/irrmaze.h @@ -23,7 +23,7 @@ class neogeo_irrmaze_device : public device_t, public device_neogeo_ctrl_edge_in { public: // construction/destruction - neogeo_irrmaze_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_irrmaze_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/neogeo_ctrl/joystick.cpp b/src/devices/bus/neogeo_ctrl/joystick.cpp index fe2712d00a8..c81b81fdc3f 100644 --- a/src/devices/bus/neogeo_ctrl/joystick.cpp +++ b/src/devices/bus/neogeo_ctrl/joystick.cpp @@ -61,7 +61,7 @@ ioport_constructor neogeo_joystick_device::device_input_ports() const // neogeo_joystick_device - constructor //------------------------------------------------- -neogeo_joystick_device::neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_joystick_device::neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOGEO_JOY, tag, owner, clock), device_neogeo_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), @@ -169,7 +169,7 @@ ioport_constructor neogeo_joy_ac_device::device_input_ports() const // neogeo_joy_ac_device / neogeo_joystick_device - constructor //------------------------------------------------- -neogeo_joy_ac_device::neogeo_joy_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_joy_ac_device::neogeo_joy_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOGEO_JOY_AC, tag, owner, clock), device_neogeo_ctrl_edge_interface(mconfig, *this), m_joy(*this, "JOY%u", 1U), diff --git a/src/devices/bus/neogeo_ctrl/joystick.h b/src/devices/bus/neogeo_ctrl/joystick.h index b817e672ca3..33a9c554e68 100644 --- a/src/devices/bus/neogeo_ctrl/joystick.h +++ b/src/devices/bus/neogeo_ctrl/joystick.h @@ -23,7 +23,7 @@ class neogeo_joystick_device : public device_t, public device_neogeo_control_por { public: // construction/destruction - neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -48,7 +48,7 @@ class neogeo_joy_ac_device : public device_t, public device_neogeo_ctrl_edge_int { public: // construction/destruction - neogeo_joy_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_joy_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/neogeo_ctrl/kizuna4p.cpp b/src/devices/bus/neogeo_ctrl/kizuna4p.cpp index ccc08ef61ed..269d00f309c 100644 --- a/src/devices/bus/neogeo_ctrl/kizuna4p.cpp +++ b/src/devices/bus/neogeo_ctrl/kizuna4p.cpp @@ -95,7 +95,7 @@ ioport_constructor neogeo_kizuna4p_device::device_input_ports() const // neogeo_kizuna4p_device - constructor //------------------------------------------------- -neogeo_kizuna4p_device::neogeo_kizuna4p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +neogeo_kizuna4p_device::neogeo_kizuna4p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEOGEO_KIZ4P, tag, owner, clock), device_neogeo_ctrl_edge_interface(mconfig, *this), m_joy(*this, "JOY%u", 1U), diff --git a/src/devices/bus/neogeo_ctrl/kizuna4p.h b/src/devices/bus/neogeo_ctrl/kizuna4p.h index 404055cdec6..0a909edb868 100644 --- a/src/devices/bus/neogeo_ctrl/kizuna4p.h +++ b/src/devices/bus/neogeo_ctrl/kizuna4p.h @@ -24,7 +24,7 @@ class neogeo_kizuna4p_device : public device_t, public device_neogeo_ctrl_edge_i { public: // construction/destruction - neogeo_kizuna4p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_kizuna4p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/neogeo_ctrl/mahjong.cpp b/src/devices/bus/neogeo_ctrl/mahjong.cpp index 1ac8d1e2d20..bb28903e36a 100644 --- a/src/devices/bus/neogeo_ctrl/mahjong.cpp +++ b/src/devices/bus/neogeo_ctrl/mahjong.cpp @@ -85,7 +85,7 @@ ioport_constructor neogeo_mjctrl_device::device_input_ports() const // neogeo_joystick_device - constructor //------------------------------------------------- -neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_neogeo_control_port_interface(mconfig, *this) , m_ctrl_sel(0x00) @@ -94,12 +94,12 @@ neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, { } -neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_mjctrl_ac_device(mconfig, NEOGEO_MJCTRL_AC, tag, owner, clock) { } -neogeo_mjctrl_device::neogeo_mjctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +neogeo_mjctrl_device::neogeo_mjctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neogeo_mjctrl_ac_device(mconfig, NEOGEO_MJCTRL, tag, owner, clock) { } diff --git a/src/devices/bus/neogeo_ctrl/mahjong.h b/src/devices/bus/neogeo_ctrl/mahjong.h index d4fd1646ece..5e9085b72d1 100644 --- a/src/devices/bus/neogeo_ctrl/mahjong.h +++ b/src/devices/bus/neogeo_ctrl/mahjong.h @@ -23,10 +23,10 @@ class neogeo_mjctrl_ac_device : public device_t, public device_neogeo_control_po { public: // construction/destruction - neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -50,7 +50,7 @@ class neogeo_mjctrl_device : public neogeo_mjctrl_ac_device { public: // construction/destruction - neogeo_mjctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neogeo_mjctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/nes/2a03pur.cpp b/src/devices/bus/nes/2a03pur.cpp index 9105c518844..40e71fea88c 100644 --- a/src/devices/bus/nes/2a03pur.cpp +++ b/src/devices/bus/nes/2a03pur.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(NES_2A03PURITANS, nes_2a03pur_device, "nes_2a03pur", "NES Cart 2A03 Puritans Album PCB") -nes_2a03pur_device::nes_2a03pur_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_2a03pur_device::nes_2a03pur_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_2A03PURITANS, tag, owner, clock) { } diff --git a/src/devices/bus/nes/2a03pur.h b/src/devices/bus/nes/2a03pur.h index 27b4127b5f1..0284000c5dd 100644 --- a/src/devices/bus/nes/2a03pur.h +++ b/src/devices/bus/nes/2a03pur.h @@ -14,7 +14,7 @@ class nes_2a03pur_device : public nes_nrom_device { public: // construction/destruction - nes_2a03pur_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_2a03pur_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/act53.cpp b/src/devices/bus/nes/act53.cpp index 9fd4ced2a6b..94cb7f4adf3 100644 --- a/src/devices/bus/nes/act53.cpp +++ b/src/devices/bus/nes/act53.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(NES_ACTION53, nes_action53_device, "nes_action53", "NES Cart Action 53 PCB") -nes_action53_device::nes_action53_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_action53_device::nes_action53_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_ACTION53, tag, owner, clock) , m_sel(0) { diff --git a/src/devices/bus/nes/act53.h b/src/devices/bus/nes/act53.h index ead18a54ad6..5e101217b40 100644 --- a/src/devices/bus/nes/act53.h +++ b/src/devices/bus/nes/act53.h @@ -12,7 +12,7 @@ class nes_action53_device : public nes_nrom_device { public: // construction/destruction - nes_action53_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_action53_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp index 00b444cd395..2bac94c91e3 100644 --- a/src/devices/bus/nes/aladdin.cpp +++ b/src/devices/bus/nes/aladdin.cpp @@ -66,7 +66,7 @@ uint8_t aladdin_cart_interface::read(offs_t offset) DEFINE_DEVICE_TYPE(NES_ALADDIN_SLOT, nes_aladdin_slot_device, "nes_ade_slot", "NES Aladdin Deck Enhancer Cartridge Slot") -nes_aladdin_slot_device::nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_aladdin_slot_device::nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_ALADDIN_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) @@ -176,18 +176,18 @@ ROM_END DEFINE_DEVICE_TYPE(NES_ALGN_ROM, nes_algn_rom_device, "nes_algn_rom", "NES Aladdin Deck Enhancer ALGN ROM") DEFINE_DEVICE_TYPE(NES_ALGQ_ROM, nes_algq_rom_device, "nes_algq_rom", "NES Aladdin Deck Enhancer ALGQ ROM") -nes_algn_rom_device::nes_algn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_algn_rom_device::nes_algn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , aladdin_cart_interface(mconfig, *this) { } -nes_algn_rom_device::nes_algn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_algn_rom_device::nes_algn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_algn_rom_device(mconfig, NES_ALGN_ROM, tag, owner, clock) { } -nes_algq_rom_device::nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_algq_rom_device::nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_algn_rom_device(mconfig, NES_ALGQ_ROM, tag, owner, clock) , m_bank_base(0) { @@ -263,7 +263,7 @@ void nes_algq_rom_device::write_prg(uint32_t offset, uint8_t data) DEFINE_DEVICE_TYPE(NES_ALADDIN, nes_aladdin_device, "nes_aladdin", "NES Cart Camerica Aladdin PCB") -nes_aladdin_device::nes_aladdin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_aladdin_device::nes_aladdin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_ALADDIN, tag, owner, clock) , m_subslot(*this, "ade_slot") { diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h index 170649fdd30..f9891c5700a 100644 --- a/src/devices/bus/nes/aladdin.h +++ b/src/devices/bus/nes/aladdin.h @@ -52,7 +52,7 @@ public: // construction/destruction template nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts) - : nes_aladdin_slot_device(mconfig, tag, owner, (uint32_t)0) + : nes_aladdin_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -60,7 +60,7 @@ public: set_fixed(false); } - nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~nes_aladdin_slot_device(); // image-level overrides @@ -100,7 +100,7 @@ class nes_algn_rom_device : public device_t, { public: // construction/destruction - nes_algn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_algn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -108,7 +108,7 @@ public: virtual void write_prg(uint32_t offset, uint8_t data) override; protected: - nes_algn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_algn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -122,7 +122,7 @@ class nes_algq_rom_device : public nes_algn_rom_device { public: // construction/destruction - nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_algq_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void write_prg(uint32_t offset, uint8_t data) override; @@ -152,7 +152,7 @@ class nes_aladdin_device : public nes_nrom_device { public: // construction/destruction - nes_aladdin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_aladdin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_h(offs_t offset) override; virtual void write_h(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/ave.cpp b/src/devices/bus/nes/ave.cpp index f0f1196191c..d88468f2767 100644 --- a/src/devices/bus/nes/ave.cpp +++ b/src/devices/bus/nes/ave.cpp @@ -38,17 +38,17 @@ DEFINE_DEVICE_TYPE(NES_NINA006, nes_nina006_device, "nes_nina006", "NES Cart AVE DEFINE_DEVICE_TYPE(NES_MAXI15, nes_maxi15_device, "nes_maxi15", "NES Cart AVE Maxi 15 PCB") -nes_nina001_device::nes_nina001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_nina001_device::nes_nina001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NINA001, tag, owner, clock) { } -nes_nina006_device::nes_nina006_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_nina006_device::nes_nina006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NINA006, tag, owner, clock) { } -nes_maxi15_device::nes_maxi15_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_maxi15_device::nes_maxi15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_MAXI15, tag, owner, clock) { } diff --git a/src/devices/bus/nes/ave.h b/src/devices/bus/nes/ave.h index b21a99ac4f2..3e447d15d7b 100644 --- a/src/devices/bus/nes/ave.h +++ b/src/devices/bus/nes/ave.h @@ -14,7 +14,7 @@ class nes_nina001_device : public nes_nrom_device { public: // construction/destruction - nes_nina001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_nina001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; }; @@ -26,7 +26,7 @@ class nes_nina006_device : public nes_nrom_device { public: // construction/destruction - nes_nina006_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_nina006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; }; @@ -38,7 +38,7 @@ class nes_maxi15_device : public nes_nrom_device { public: // construction/destruction - nes_maxi15_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_maxi15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; diff --git a/src/devices/bus/nes/bandai.cpp b/src/devices/bus/nes/bandai.cpp index 5954aacff62..26e6c5c6489 100644 --- a/src/devices/bus/nes/bandai.cpp +++ b/src/devices/bus/nes/bandai.cpp @@ -56,47 +56,47 @@ DEFINE_DEVICE_TYPE(NES_LZ93D50_24C02, nes_lz93d50_24c02_device, "nes_lz93d50_ep2 DEFINE_DEVICE_TYPE(NES_FJUMP2, nes_fjump2_device, "nes_fjump2", "NES Cart Bandai Famicom Jump II PCB") -nes_oekakids_device::nes_oekakids_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_oekakids_device::nes_oekakids_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_OEKAKIDS, tag, owner, clock), m_reg(0), m_latch(0) { } -nes_fcg_device::nes_fcg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_fcg_device::nes_fcg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_fcg_device::nes_fcg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_fcg_device::nes_fcg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fcg_device(mconfig, NES_FCG, tag, owner, clock) { } -nes_lz93d50_device::nes_lz93d50_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_lz93d50_device::nes_lz93d50_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_fcg_device(mconfig, type, tag, owner, clock) { } -nes_lz93d50_device::nes_lz93d50_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_lz93d50_device::nes_lz93d50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_lz93d50_device(mconfig, NES_LZ93D50, tag, owner, clock) { } -nes_lz93d50_24c01_device::nes_lz93d50_24c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_lz93d50_24c01_device::nes_lz93d50_24c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_lz93d50_device(mconfig, type, tag, owner, clock), m_i2cmem(*this, "i2cmem"), m_i2c_dir(0) { } -nes_lz93d50_24c01_device::nes_lz93d50_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_lz93d50_24c01_device::nes_lz93d50_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_lz93d50_24c01_device(mconfig, NES_LZ93D50_24C01, tag, owner, clock) { } -nes_lz93d50_24c02_device::nes_lz93d50_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_lz93d50_24c02_device::nes_lz93d50_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_lz93d50_24c01_device(mconfig, NES_LZ93D50_24C02, tag, owner, clock) { } -nes_fjump2_device::nes_fjump2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_fjump2_device::nes_fjump2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_lz93d50_device(mconfig, NES_FJUMP2, tag, owner, clock) { } diff --git a/src/devices/bus/nes/bandai.h b/src/devices/bus/nes/bandai.h index 1a21f8a3052..6e5308fd158 100644 --- a/src/devices/bus/nes/bandai.h +++ b/src/devices/bus/nes/bandai.h @@ -15,7 +15,7 @@ class nes_oekakids_device : public nes_nrom_device { public: // construction/destruction - nes_oekakids_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_oekakids_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; virtual uint8_t nt_r(offs_t offset) override; @@ -43,7 +43,7 @@ class nes_fcg_device : public nes_nrom_device { public: // construction/destruction - nes_fcg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fcg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void fcg_write(offs_t offset, uint8_t data); virtual void write_m(offs_t offset, uint8_t data) override; @@ -51,7 +51,7 @@ public: virtual void pcb_reset() override; protected: - nes_fcg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_fcg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -71,12 +71,12 @@ class nes_lz93d50_device : public nes_fcg_device { public: // construction/destruction - nes_lz93d50_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_lz93d50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override { fcg_write(offset, data); } protected: - nes_lz93d50_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_lz93d50_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -86,7 +86,7 @@ class nes_lz93d50_24c01_device : public nes_lz93d50_device { public: // construction/destruction - nes_lz93d50_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_lz93d50_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_h(offs_t offset, uint8_t data) override; @@ -94,7 +94,7 @@ public: virtual void pcb_reset() override; protected: - nes_lz93d50_24c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_lz93d50_24c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -113,7 +113,7 @@ class nes_lz93d50_24c02_device : public nes_lz93d50_24c01_device { public: // construction/destruction - nes_lz93d50_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_lz93d50_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -127,7 +127,7 @@ class nes_fjump2_device : public nes_lz93d50_device { public: // construction/destruction - nes_fjump2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fjump2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/batlab.cpp b/src/devices/bus/nes/batlab.cpp index e117e6fbf5e..ae4643effca 100644 --- a/src/devices/bus/nes/batlab.cpp +++ b/src/devices/bus/nes/batlab.cpp @@ -37,12 +37,12 @@ DEFINE_DEVICE_TYPE(NES_BATMAP_000, nes_batmap_000_device, "nes_batmap_000", " DEFINE_DEVICE_TYPE(NES_BATMAP_SRRX, nes_batmap_srrx_device, "nes_batmap_srrx", "NES Cart Batlab BATMAP-SRR-X PCB") -nes_batmap_000_device::nes_batmap_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_batmap_000_device::nes_batmap_000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BATMAP_000, tag, owner, clock) { } -nes_batmap_srrx_device::nes_batmap_srrx_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_batmap_srrx_device::nes_batmap_srrx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BATMAP_SRRX, tag, owner, clock), m_reg(0), m_dpcm_addr(0), m_dpcm_ctrl(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0) { } diff --git a/src/devices/bus/nes/batlab.h b/src/devices/bus/nes/batlab.h index 9861afe8a87..2a5e2f09ea1 100644 --- a/src/devices/bus/nes/batlab.h +++ b/src/devices/bus/nes/batlab.h @@ -14,7 +14,7 @@ class nes_batmap_000_device : public nes_txrom_device { public: // construction/destruction - nes_batmap_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_batmap_000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -28,7 +28,7 @@ class nes_batmap_srrx_device : public nes_nrom_device { public: // construction/destruction - nes_batmap_srrx_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_batmap_srrx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual u8 read_m(offs_t offset) override; diff --git a/src/devices/bus/nes/benshieng.cpp b/src/devices/bus/nes/benshieng.cpp index 9fadad83386..5284b8a45a9 100644 --- a/src/devices/bus/nes/benshieng.cpp +++ b/src/devices/bus/nes/benshieng.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(NES_BENSHIENG, nes_benshieng_device, "nes_benshieng", "NES Cart Benshieng PCB") -nes_benshieng_device::nes_benshieng_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_benshieng_device::nes_benshieng_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BENSHIENG, tag, owner, clock), m_dipsetting(0) { } diff --git a/src/devices/bus/nes/benshieng.h b/src/devices/bus/nes/benshieng.h index 2292b57a270..92d5bdfe11e 100644 --- a/src/devices/bus/nes/benshieng.h +++ b/src/devices/bus/nes/benshieng.h @@ -14,7 +14,7 @@ class nes_benshieng_device : public nes_nrom_device { public: // construction/destruction - nes_benshieng_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_benshieng_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/bootleg.cpp b/src/devices/bus/nes/bootleg.cpp index c0ac3e1a35c..5ae2aa88406 100644 --- a/src/devices/bus/nes/bootleg.cpp +++ b/src/devices/bus/nes/bootleg.cpp @@ -72,167 +72,167 @@ DEFINE_DEVICE_TYPE(NES_RT01, nes_rt01_device, "nes_rt01", "N DEFINE_DEVICE_TYPE(NES_YUNG08, nes_yung08_device, "nes_yung08", "NES Cart Super Mario Bros. 2 YUNG-08 PCB") -nes_sc127_device::nes_sc127_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sc127_device::nes_sc127_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SC127, tag, owner, clock), m_irq_count(0), m_irq_enable(0) { } -nes_mbaby_device::nes_mbaby_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_mbaby_device::nes_mbaby_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_MARIOBABY, tag, owner, clock), m_irq_count(0), m_irq_enable(0), m_latch(0), irq_timer(nullptr) { } -nes_asn_device::nes_asn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_asn_device::nes_asn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_ASN, tag, owner, clock), m_latch(0) { } -nes_smb3p_device::nes_smb3p_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_smb3p_device::nes_smb3p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SMB3PIRATE, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_btl_cj_device::nes_btl_cj_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_btl_cj_device::nes_btl_cj_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BTL_CONTRAJ, tag, owner, clock) { } -nes_btl_dn_device::nes_btl_dn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_btl_dn_device::nes_btl_dn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BTL_DNINJA, tag, owner, clock), m_irq_count(0) { } -nes_smb2j_device::nes_smb2j_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_smb2j_device::nes_smb2j_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SMB2J, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_smb2ja_device::nes_smb2ja_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_smb2ja_device::nes_smb2ja_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SMB2JA, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_smb2jb_device::nes_smb2jb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bank67) +nes_smb2jb_device::nes_smb2jb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bank67) : nes_nrom_device(mconfig, type, tag, owner, clock), m_irq_count(0), m_irq_enable(0), m_reg(0), m_bank67(bank67), irq_timer(nullptr) { } -nes_smb2jb_device::nes_smb2jb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_smb2jb_device::nes_smb2jb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_smb2jb_device(mconfig, NES_SMB2JB, tag, owner, clock, 0x0f) { } -nes_n32_4in1_device::nes_n32_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_n32_4in1_device::nes_n32_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_smb2jb_device(mconfig, NES_N32_4IN1, tag, owner, clock, 0x07) { } -nes_0353_device::nes_0353_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_0353_device::nes_0353_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_0353, tag, owner, clock), m_reg(0) { } -nes_09034a_device::nes_09034a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_09034a_device::nes_09034a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_09034A, tag, owner, clock), m_irq_count(0), m_irq_enable(0), m_reg(0), irq_timer(nullptr) { } -nes_l001_device::nes_l001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_l001_device::nes_l001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_L001, tag, owner, clock), m_irq_count(0), irq_timer(nullptr) { } -nes_batmanfs_device::nes_batmanfs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_batmanfs_device::nes_batmanfs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BATMANFS, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_palthena_device::nes_palthena_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_palthena_device::nes_palthena_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_PALTHENA, tag, owner, clock), m_reg(0) { } -nes_tobidase_device::nes_tobidase_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_tobidase_device::nes_tobidase_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_TOBIDASE, tag, owner, clock), m_latch(0) { } -nes_whirlwind_device::nes_whirlwind_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_whirlwind_device::nes_whirlwind_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_reg(0) { } -nes_dh08_device::nes_dh08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_dh08_device::nes_dh08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_whirlwind_device(mconfig, NES_DH08, tag, owner, clock) { } -nes_le05_device::nes_le05_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_le05_device::nes_le05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_whirlwind_device(mconfig, NES_LE05, tag, owner, clock) { } -nes_lh28_lh54_device::nes_lh28_lh54_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_lh28_lh54_device::nes_lh28_lh54_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_whirlwind_device(mconfig, NES_LH28_LH54, tag, owner, clock) { } -nes_lh31_device::nes_lh31_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_lh31_device::nes_lh31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_whirlwind_device(mconfig, NES_LH31, tag, owner, clock) { } -nes_lh32_device::nes_lh32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_lh32_device::nes_lh32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_LH32, tag, owner, clock), m_latch(0) { } -nes_lh42_device::nes_lh42_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_lh42_device::nes_lh42_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_LH42, tag, owner, clock), m_latch(0) { } -nes_lg25_device::nes_lg25_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_lg25_device::nes_lg25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_LG25, tag, owner, clock), m_latch(0) { } -nes_lh10_device::nes_lh10_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_lh10_device::nes_lh10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_LH10, tag, owner, clock), m_latch(0) { } -nes_lh51_device::nes_lh51_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_lh51_device::nes_lh51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_LH51, tag, owner, clock) { } -nes_lh53_device::nes_lh53_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_lh53_device::nes_lh53_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_LH53, tag, owner, clock), m_irq_count(0), m_irq_enable(0), m_reg(0), irq_timer(nullptr) { } -nes_2708_device::nes_2708_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_2708_device::nes_2708_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_2708, tag, owner, clock) { } -nes_ac08_device::nes_ac08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_ac08_device::nes_ac08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_AC08, tag, owner, clock), m_latch(0) { } -nes_mmalee_device::nes_mmalee_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_mmalee_device::nes_mmalee_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_MMALEE, tag, owner, clock) { } -nes_rt01_device::nes_rt01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_rt01_device::nes_rt01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_RT01, tag, owner, clock) { } -nes_yung08_device::nes_yung08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_yung08_device::nes_yung08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_YUNG08, tag, owner, clock), m_irq_count(0), m_irq_latch(0), irq_timer(nullptr) { } diff --git a/src/devices/bus/nes/bootleg.h b/src/devices/bus/nes/bootleg.h index 93cdaa2ec6f..0fbcef72aa0 100644 --- a/src/devices/bus/nes/bootleg.h +++ b/src/devices/bus/nes/bootleg.h @@ -12,7 +12,7 @@ class nes_sc127_device : public nes_nrom_device { public: // construction/destruction - nes_sc127_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sc127_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; virtual void hblank_irq(int scanline, bool vblank, bool blanked) override; @@ -34,7 +34,7 @@ class nes_mbaby_device : public nes_nrom_device { public: // construction/destruction - nes_mbaby_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_mbaby_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -62,7 +62,7 @@ class nes_asn_device : public nes_nrom_device { public: // construction/destruction - nes_asn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_asn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_h(offs_t offset, uint8_t data) override; @@ -84,7 +84,7 @@ class nes_smb3p_device : public nes_nrom_device { public: // construction/destruction - nes_smb3p_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_smb3p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -111,7 +111,7 @@ class nes_btl_cj_device : public nes_nrom_device { public: // construction/destruction - nes_btl_cj_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_btl_cj_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void pcb_reset() override; @@ -124,7 +124,7 @@ class nes_btl_dn_device : public nes_nrom_device { public: // construction/destruction - nes_btl_dn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_btl_dn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; virtual void hblank_irq(int scanline, bool vblank, bool blanked) override; @@ -145,7 +145,7 @@ class nes_smb2j_device : public nes_nrom_device { public: // construction/destruction - nes_smb2j_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_smb2j_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual u8 read_m(offs_t offset) override; @@ -177,7 +177,7 @@ class nes_smb2ja_device : public nes_nrom_device { public: // construction/destruction - nes_smb2ja_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_smb2ja_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -204,7 +204,7 @@ class nes_smb2jb_device : public nes_nrom_device { public: // construction/destruction - nes_smb2jb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_smb2jb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -213,7 +213,7 @@ public: virtual void pcb_reset() override; protected: - nes_smb2jb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bank67); + nes_smb2jb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bank67); // device-level overrides virtual void device_start() override; @@ -238,7 +238,7 @@ class nes_n32_4in1_device : public nes_smb2jb_device { public: // construction/destruction - nes_n32_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_n32_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -252,7 +252,7 @@ class nes_0353_device : public nes_nrom_device { public: // construction/destruction - nes_0353_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_0353_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -274,7 +274,7 @@ class nes_09034a_device : public nes_nrom_device { public: // construction/destruction - nes_09034a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_09034a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_ex(offs_t offset, u8 data) override; virtual u8 read_ex(offs_t offset) override; @@ -303,7 +303,7 @@ class nes_l001_device : public nes_nrom_device { public: // construction/destruction - nes_l001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_l001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -328,7 +328,7 @@ class nes_batmanfs_device : public nes_nrom_device { public: // construction/destruction - nes_batmanfs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_batmanfs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -354,7 +354,7 @@ class nes_palthena_device : public nes_nrom_device { public: // construction/destruction - nes_palthena_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_palthena_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual u8 read_h(offs_t offset) override; @@ -378,7 +378,7 @@ class nes_tobidase_device : public nes_nrom_device { public: // construction/destruction - nes_tobidase_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_tobidase_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_l(offs_t offset, uint8_t data) override; @@ -405,7 +405,7 @@ public: protected: // construction/destruction - nes_whirlwind_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_whirlwind_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -420,7 +420,7 @@ class nes_dh08_device : public nes_whirlwind_device { public: // construction/destruction - nes_dh08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_dh08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -432,7 +432,7 @@ class nes_le05_device : public nes_whirlwind_device { public: // construction/destruction - nes_le05_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_le05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -444,7 +444,7 @@ class nes_lh28_lh54_device : public nes_whirlwind_device { public: // construction/destruction - nes_lh28_lh54_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_lh28_lh54_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -456,7 +456,7 @@ class nes_lh31_device : public nes_whirlwind_device { public: // construction/destruction - nes_lh31_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_lh31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -468,7 +468,7 @@ class nes_lh32_device : public nes_nrom_device { public: // construction/destruction - nes_lh32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_lh32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; @@ -492,7 +492,7 @@ class nes_lh42_device : public nes_nrom_device { public: // construction/destruction - nes_lh42_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_lh42_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -513,7 +513,7 @@ class nes_lg25_device : public nes_nrom_device { public: // construction/destruction - nes_lg25_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_lg25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -534,7 +534,7 @@ class nes_lh10_device : public nes_nrom_device { public: // construction/destruction - nes_lh10_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_lh10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual u8 read_m(offs_t offset) override; @@ -557,7 +557,7 @@ class nes_lh51_device : public nes_nrom_device { public: // construction/destruction - nes_lh51_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_lh51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -571,7 +571,7 @@ class nes_lh53_device : public nes_nrom_device { public: // construction/destruction - nes_lh53_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_lh53_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; @@ -602,7 +602,7 @@ class nes_2708_device : public nes_nrom_device { public: // construction/destruction - nes_2708_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_2708_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; @@ -626,7 +626,7 @@ class nes_ac08_device : public nes_nrom_device { public: // nes_ac08_device/destruction - nes_ac08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_ac08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_ex(offs_t offset, uint8_t data) override; @@ -649,7 +649,7 @@ class nes_mmalee_device : public nes_nrom_device { public: // construction/destruction - nes_mmalee_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_mmalee_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; @@ -662,7 +662,7 @@ class nes_rt01_device : public nes_nrom_device { public: // construction/destruction - nes_rt01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_rt01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_h(offs_t offset) override; @@ -676,7 +676,7 @@ class nes_yung08_device : public nes_nrom_device { public: // construction/destruction - nes_yung08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_yung08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual u8 read_m(offs_t offset) override; diff --git a/src/devices/bus/nes/camerica.cpp b/src/devices/bus/nes/camerica.cpp index fd80dca08b0..577f2bce2aa 100644 --- a/src/devices/bus/nes/camerica.cpp +++ b/src/devices/bus/nes/camerica.cpp @@ -46,27 +46,27 @@ DEFINE_DEVICE_TYPE(NES_BF9096A, nes_bf9096a_device, "nes_bf9096a", "NES Cart Cam DEFINE_DEVICE_TYPE(NES_GOLDEN5, nes_golden5_device, "nes_golden5", "NES Cart Camerica Golden 5 PCB") -nes_bf9093_device::nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bf9093_device::nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BF9093, tag, owner, clock) { } -nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool page_swap) +nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool page_swap) : nes_nrom_device(mconfig, type, tag, owner, clock), m_reg(0), m_page_swap(page_swap) { } -nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bf9096_device(mconfig, NES_BF9096, tag, owner, clock, false) { } -nes_bf9096a_device::nes_bf9096a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bf9096a_device::nes_bf9096a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bf9096_device(mconfig, NES_BF9096A, tag, owner, clock, true) { } -nes_golden5_device::nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_golden5_device::nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_GOLDEN5, tag, owner, clock), m_lock(0), m_reg(0) { } diff --git a/src/devices/bus/nes/camerica.h b/src/devices/bus/nes/camerica.h index 0c2c2487361..9a060383dff 100644 --- a/src/devices/bus/nes/camerica.h +++ b/src/devices/bus/nes/camerica.h @@ -14,7 +14,7 @@ class nes_bf9093_device : public nes_nrom_device { public: // construction/destruction - nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -28,14 +28,14 @@ class nes_bf9096_device : public nes_nrom_device { public: // construction/destruction - nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void pcb_reset() override; protected: - nes_bf9096_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool page_swap); + nes_bf9096_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool page_swap); // device-level overrides virtual void device_start() override; @@ -52,7 +52,7 @@ class nes_bf9096a_device : public nes_bf9096_device { public: // construction/destruction - nes_bf9096a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bf9096a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -62,7 +62,7 @@ class nes_golden5_device : public nes_nrom_device { public: // construction/destruction - nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/cne.cpp b/src/devices/bus/nes/cne.cpp index 8300c56928c..f78c69ad698 100644 --- a/src/devices/bus/nes/cne.cpp +++ b/src/devices/bus/nes/cne.cpp @@ -37,17 +37,17 @@ DEFINE_DEVICE_TYPE(NES_CNE_FSB, nes_cne_fsb_device, "nes_cne_fsb", "NES DEFINE_DEVICE_TYPE(NES_CNE_SHLZ, nes_cne_shlz_device, "nes_cne_shlz", "NES Cart C&E Sheng Huo Lie Zhuan PCB") -nes_cne_decathl_device::nes_cne_decathl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cne_decathl_device::nes_cne_decathl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CNE_DECATHL, tag, owner, clock) { } -nes_cne_fsb_device::nes_cne_fsb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cne_fsb_device::nes_cne_fsb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CNE_FSB, tag, owner, clock) { } -nes_cne_shlz_device::nes_cne_shlz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cne_shlz_device::nes_cne_shlz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CNE_SHLZ, tag, owner, clock) { } diff --git a/src/devices/bus/nes/cne.h b/src/devices/bus/nes/cne.h index 9e704443503..be3765c88e0 100644 --- a/src/devices/bus/nes/cne.h +++ b/src/devices/bus/nes/cne.h @@ -14,7 +14,7 @@ class nes_cne_decathl_device : public nes_nrom_device { public: // construction/destruction - nes_cne_decathl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cne_decathl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -26,7 +26,7 @@ class nes_cne_fsb_device : public nes_nrom_device { public: // construction/destruction - nes_cne_fsb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cne_fsb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -41,7 +41,7 @@ class nes_cne_shlz_device : public nes_nrom_device { public: // construction/destruction - nes_cne_shlz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cne_shlz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; }; diff --git a/src/devices/bus/nes/cony.cpp b/src/devices/bus/nes/cony.cpp index 3e73f35a4bf..d174cf8406b 100644 --- a/src/devices/bus/nes/cony.cpp +++ b/src/devices/bus/nes/cony.cpp @@ -36,22 +36,22 @@ DEFINE_DEVICE_TYPE(NES_CONY1K, nes_cony1k_device, "nes_cony1k", "NES Cart Cony 1 DEFINE_DEVICE_TYPE(NES_YOKO, nes_yoko_device, "nes_yoko", "NES Cart Yoko PCB") -nes_cony_device::nes_cony_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 extra_addr, u8 mask) +nes_cony_device::nes_cony_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 extra_addr, u8 mask) : nes_nrom_device(mconfig, type, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_extra_addr(extra_addr), m_mask(mask), m_mode_reg(0), m_outer_reg(0) { } -nes_cony_device::nes_cony_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cony_device::nes_cony_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_cony_device(mconfig, NES_CONY, tag, owner, clock, 0x1100, 0x1f) { } -nes_cony1k_device::nes_cony1k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cony1k_device::nes_cony1k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_cony_device(mconfig, NES_CONY1K, tag, owner, clock, 0x1100, 0x1f) { } -nes_yoko_device::nes_yoko_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_yoko_device::nes_yoko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_cony_device(mconfig, NES_YOKO, tag, owner, clock, 0x1400, 0x0f) { } diff --git a/src/devices/bus/nes/cony.h b/src/devices/bus/nes/cony.h index 8f2faea4a40..ebdfb615526 100644 --- a/src/devices/bus/nes/cony.h +++ b/src/devices/bus/nes/cony.h @@ -14,7 +14,7 @@ class nes_cony_device : public nes_nrom_device { public: // construction/destruction - nes_cony_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cony_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual u8 read_m(offs_t offset) override; @@ -26,7 +26,7 @@ public: protected: // construction/destruction - nes_cony_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 extra_addr, u8 mask); + nes_cony_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 extra_addr, u8 mask); // device-level overrides virtual void device_start() override; @@ -57,7 +57,7 @@ class nes_cony1k_device : public nes_cony_device { public: // construction/destruction - nes_cony1k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cony1k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void set_chr() override; }; @@ -69,7 +69,7 @@ class nes_yoko_device : public nes_cony_device { public: // construction/destruction - nes_yoko_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_yoko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; diff --git a/src/devices/bus/nes/datach.cpp b/src/devices/bus/nes/datach.cpp index 5e71e0af6bc..a99de3a4063 100644 --- a/src/devices/bus/nes/datach.cpp +++ b/src/devices/bus/nes/datach.cpp @@ -66,7 +66,7 @@ uint8_t datach_cart_interface::read(offs_t offset) DEFINE_DEVICE_TYPE(NES_DATACH_SLOT, nes_datach_slot_device, "nes_datach_slot", "NES Datach Cartridge Slot") -nes_datach_slot_device::nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_datach_slot_device::nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_DATACH_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) @@ -162,18 +162,18 @@ ROM_END DEFINE_DEVICE_TYPE(NES_DATACH_ROM, nes_datach_rom_device, "nes_datach_rom", "NES Datach ROM") DEFINE_DEVICE_TYPE(NES_DATACH_24C01, nes_datach_24c01_device, "nes_datach_ep1", "NES Datach + 24C01 PCB") -nes_datach_rom_device::nes_datach_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_datach_rom_device::nes_datach_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , datach_cart_interface(mconfig, *this) { } -nes_datach_rom_device::nes_datach_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_datach_rom_device::nes_datach_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_datach_rom_device(mconfig, NES_DATACH_ROM, tag, owner, clock) { } -nes_datach_24c01_device::nes_datach_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_datach_24c01_device::nes_datach_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_datach_rom_device(mconfig, NES_DATACH_24C01, tag, owner, clock) { } @@ -216,7 +216,7 @@ void nes_datach_24c01_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(NES_DATACH, nes_datach_device, "nes_datach", "NES Cart Bandai Datach PCB") -nes_datach_device::nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_datach_device::nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_lz93d50_device(mconfig, NES_DATACH, tag, owner, clock) , m_datach_latch(0) , m_i2cmem(*this, "i2cmem") @@ -370,7 +370,7 @@ static void datach_cart(device_slot_interface &device) void nes_datach_device::device_add_mconfig(machine_config &config) { - BARCODE_READER(config, m_reader, 0); + BARCODE_READER(config, m_reader); NES_DATACH_SLOT(config, m_subslot, 0, datach_cart); I2C_24C02(config, m_i2cmem); } diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h index 80770904596..362654708ca 100644 --- a/src/devices/bus/nes/datach.h +++ b/src/devices/bus/nes/datach.h @@ -53,7 +53,7 @@ class nes_datach_slot_device : public device_t, public: // construction/destruction template - nes_datach_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts) + nes_datach_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts) : nes_datach_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -61,7 +61,7 @@ public: set_default_option(nullptr); set_fixed(false); } - nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_datach_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~nes_datach_slot_device(); // image-level overrides @@ -100,14 +100,14 @@ class nes_datach_rom_device : public device_t, public datach_cart_interface { public: // construction/destruction - nes_datach_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_datach_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; virtual uint8_t* get_cart_base(); protected: - nes_datach_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_datach_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -120,7 +120,7 @@ class nes_datach_24c01_device : public nes_datach_rom_device { public: // construction/destruction - nes_datach_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_datach_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -144,7 +144,7 @@ class nes_datach_device : public nes_lz93d50_device { public: // construction/destruction - nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_datach_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; diff --git a/src/devices/bus/nes/discrete.cpp b/src/devices/bus/nes/discrete.cpp index 5b047a2daad..19b23431d45 100644 --- a/src/devices/bus/nes/discrete.cpp +++ b/src/devices/bus/nes/discrete.cpp @@ -38,22 +38,22 @@ DEFINE_DEVICE_TYPE(NES_74X377, nes_74x377_device, "nes_74x377", DEFINE_DEVICE_TYPE(NES_74X161X138, nes_74x161x138_device, "nes_bitcorp_dis", "NES Cart Discrete Logic (74*161/138) PCB") -nes_74x161x161x32_device::nes_74x161x161x32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_74x161x161x32_device::nes_74x161x161x32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_74X161X161X32, tag, owner, clock) { } -nes_74x139x74_device::nes_74x139x74_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_74x139x74_device::nes_74x139x74_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_74X139X74, tag, owner, clock) { } -nes_74x377_device::nes_74x377_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_74x377_device::nes_74x377_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_74X377, tag, owner, clock) { } -nes_74x161x138_device::nes_74x161x138_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_74x161x138_device::nes_74x161x138_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_74X161X138, tag, owner, clock) { } diff --git a/src/devices/bus/nes/discrete.h b/src/devices/bus/nes/discrete.h index ec3ad88d824..4d99f881856 100644 --- a/src/devices/bus/nes/discrete.h +++ b/src/devices/bus/nes/discrete.h @@ -14,7 +14,7 @@ class nes_74x161x161x32_device : public nes_nrom_device { public: // construction/destruction - nes_74x161x161x32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_74x161x161x32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -28,7 +28,7 @@ class nes_74x139x74_device : public nes_nrom_device { public: // construction/destruction - nes_74x139x74_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_74x139x74_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; }; @@ -40,7 +40,7 @@ class nes_74x377_device : public nes_nrom_device { public: // construction/destruction - nes_74x377_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_74x377_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -52,7 +52,7 @@ class nes_74x161x138_device : public nes_nrom_device { public: // construction/destruction - nes_74x161x138_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_74x161x138_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; }; diff --git a/src/devices/bus/nes/disksys.cpp b/src/devices/bus/nes/disksys.cpp index d53a2be2aab..618fb0352fb 100644 --- a/src/devices/bus/nes/disksys.cpp +++ b/src/devices/bus/nes/disksys.cpp @@ -101,7 +101,7 @@ void nes_disksys_device::unload_proc(device_image_interface &image) DEFINE_DEVICE_TYPE(NES_DISKSYS, nes_disksys_device, "fc_disksys", "FC RAM Expansion + Disk System PCB") -nes_disksys_device::nes_disksys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_disksys_device::nes_disksys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_DISKSYS, tag, owner, clock) , m_2c33_rom(*this, "drive") , m_fds_data(nullptr) diff --git a/src/devices/bus/nes/disksys.h b/src/devices/bus/nes/disksys.h index 021be514029..99d8bff849c 100644 --- a/src/devices/bus/nes/disksys.h +++ b/src/devices/bus/nes/disksys.h @@ -16,7 +16,7 @@ class nes_disksys_device : public nes_nrom_device { public: // construction/destruction - nes_disksys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_disksys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_ex(offs_t offset) override; virtual uint8_t read_m(offs_t offset) override; diff --git a/src/devices/bus/nes/event.cpp b/src/devices/bus/nes/event.cpp index 70aee4b90e0..dd30b5a64d4 100644 --- a/src/devices/bus/nes/event.cpp +++ b/src/devices/bus/nes/event.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(NES_EVENT, nes_event_device, "nes_event", "NES Cart EVENT DEFINE_DEVICE_TYPE(NES_EVENT2, nes_event2_device, "nes_event2", "NES Cart EVENT2 PCB") -nes_event_device::nes_event_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_event_device::nes_event_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_EVENT, tag, owner, clock) , m_dsw(*this, "DIPSW") , m_nwc_init(0) @@ -46,7 +46,7 @@ nes_event_device::nes_event_device(const machine_config &mconfig, const char *ta { } -nes_event2_device::nes_event2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_event2_device::nes_event2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_tqrom_device(mconfig, NES_EVENT2, tag, owner, clock) , m_dsw(*this, "DIPSW") , m_tqrom_mode(false) diff --git a/src/devices/bus/nes/event.h b/src/devices/bus/nes/event.h index b10a3f95ee1..bb73beacd4f 100644 --- a/src/devices/bus/nes/event.h +++ b/src/devices/bus/nes/event.h @@ -15,7 +15,7 @@ class nes_event_device : public nes_sxrom_device { public: // construction/destruction - nes_event_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_event_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; @@ -45,7 +45,7 @@ class nes_event2_device : public nes_tqrom_device { public: // construction/destruction - nes_event2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_event2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/ggenie.cpp b/src/devices/bus/nes/ggenie.cpp index bddebcad512..b925a5d35d2 100644 --- a/src/devices/bus/nes/ggenie.cpp +++ b/src/devices/bus/nes/ggenie.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(NES_GGENIE, nes_ggenie_device, "nes_ggenie", "NES Cart Game Genie PCB") -nes_ggenie_device::nes_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ggenie_device::nes_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_GGENIE, tag, owner, clock) , m_ggslot(*this, "gg_slot") , m_gg_bypass(false) diff --git a/src/devices/bus/nes/ggenie.h b/src/devices/bus/nes/ggenie.h index 6370301d19a..99b58770cc0 100644 --- a/src/devices/bus/nes/ggenie.h +++ b/src/devices/bus/nes/ggenie.h @@ -14,7 +14,7 @@ class nes_ggenie_device : public nes_nrom_device { public: // construction/destruction - nes_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ggenie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual u8 read_m(offs_t offset) override; diff --git a/src/devices/bus/nes/henggedianzi.cpp b/src/devices/bus/nes/henggedianzi.cpp index a8de6e93783..243a2d0ea24 100644 --- a/src/devices/bus/nes/henggedianzi.cpp +++ b/src/devices/bus/nes/henggedianzi.cpp @@ -39,12 +39,12 @@ DEFINE_DEVICE_TYPE(NES_HENGG_SRICH, nes_hengg_srich_device, "nes_hengg_srich", " DEFINE_DEVICE_TYPE(NES_HENGG_XHZS, nes_hengg_xhzs_device, "nes_hengg_xhzs", "NES Cart Henggedianzi Xing He Zhan Shi PCB") -nes_hengg_srich_device::nes_hengg_srich_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_hengg_srich_device::nes_hengg_srich_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_HENGG_SRICH, tag, owner, clock) { } -nes_hengg_xhzs_device::nes_hengg_xhzs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_hengg_xhzs_device::nes_hengg_xhzs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_HENGG_XHZS, tag, owner, clock) { } diff --git a/src/devices/bus/nes/henggedianzi.h b/src/devices/bus/nes/henggedianzi.h index fc5922a1c4e..3d5d8695dce 100644 --- a/src/devices/bus/nes/henggedianzi.h +++ b/src/devices/bus/nes/henggedianzi.h @@ -14,7 +14,7 @@ class nes_hengg_srich_device : public nes_nrom_device { public: // construction/destruction - nes_hengg_srich_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_hengg_srich_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -26,7 +26,7 @@ class nes_hengg_xhzs_device : public nes_nrom_device { public: // construction/destruction - nes_hengg_xhzs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_hengg_xhzs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void write_h(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/hes.cpp b/src/devices/bus/nes/hes.cpp index b23ad6c9f74..9a6a3d3e630 100644 --- a/src/devices/bus/nes/hes.cpp +++ b/src/devices/bus/nes/hes.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(NES_HES, nes_hes_device, "nes_hes", "NES Cart HES PCB") -nes_hes_device::nes_hes_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_hes_device::nes_hes_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_HES, tag, owner, clock) { } diff --git a/src/devices/bus/nes/hes.h b/src/devices/bus/nes/hes.h index 24577f416cb..d0a36c5f4d4 100644 --- a/src/devices/bus/nes/hes.h +++ b/src/devices/bus/nes/hes.h @@ -14,7 +14,7 @@ class nes_hes_device : public nes_nrom_device { public: // construction/destruction - nes_hes_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_hes_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; }; diff --git a/src/devices/bus/nes/irem.cpp b/src/devices/bus/nes/irem.cpp index f90959825a9..ecd40733114 100644 --- a/src/devices/bus/nes/irem.cpp +++ b/src/devices/bus/nes/irem.cpp @@ -40,32 +40,32 @@ DEFINE_DEVICE_TYPE(NES_G101, nes_g101_device, "nes_g101", "NES Cart DEFINE_DEVICE_TYPE(NES_H3001, nes_h3001_device, "ns_h3001", "NES Cart Irem H-3001 PCB") -nes_lrog017_device::nes_lrog017_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_lrog017_device::nes_lrog017_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_LROG017, tag, owner, clock) { } -nes_holydivr_device::nes_holydivr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_holydivr_device::nes_holydivr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_HOLYDIVR, tag, owner, clock) { } -nes_tam_s1_device::nes_tam_s1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tam_s1_device::nes_tam_s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_TAM_S1, tag, owner, clock) { } -nes_g101_device::nes_g101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 prg_mask) +nes_g101_device::nes_g101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 prg_mask) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_reg(0), m_prg_mask(prg_mask) { } -nes_g101_device::nes_g101_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_g101_device::nes_g101_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_g101_device(mconfig, NES_G101, tag, owner, clock, 0x1f) { } -nes_h3001_device::nes_h3001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_h3001_device::nes_h3001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_g101_device(mconfig, NES_H3001, tag, owner, clock, 0x3f), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), irq_timer(nullptr) { } diff --git a/src/devices/bus/nes/irem.h b/src/devices/bus/nes/irem.h index eef809ca7b5..088bf52239d 100644 --- a/src/devices/bus/nes/irem.h +++ b/src/devices/bus/nes/irem.h @@ -14,7 +14,7 @@ class nes_lrog017_device : public nes_nrom_device { public: // construction/destruction - nes_lrog017_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_lrog017_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -28,7 +28,7 @@ class nes_holydivr_device : public nes_nrom_device { public: // construction/destruction - nes_holydivr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_holydivr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -42,7 +42,7 @@ class nes_tam_s1_device : public nes_nrom_device { public: // construction/destruction - nes_tam_s1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tam_s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -56,7 +56,7 @@ class nes_g101_device : public nes_nrom_device { public: // construction/destruction - nes_g101_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_g101_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -64,7 +64,7 @@ public: protected: // construction/destruction - nes_g101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 prg_mask); + nes_g101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 prg_mask); // device-level overrides virtual void device_start() override; @@ -84,7 +84,7 @@ class nes_h3001_device : public nes_g101_device { public: // construction/destruction - nes_h3001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_h3001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/jaleco.cpp b/src/devices/bus/nes/jaleco.cpp index a83ebfb5a04..6375e17615b 100644 --- a/src/devices/bus/nes/jaleco.cpp +++ b/src/devices/bus/nes/jaleco.cpp @@ -51,23 +51,23 @@ DEFINE_DEVICE_TYPE(NES_JF29, nes_jf29_device, "nes_jf29", "NES C DEFINE_DEVICE_TYPE(NES_JF33, nes_jf33_device, "nes_jf33", "NES Cart Jaleco JF-33 (Moe Pro! Saikyou-hen) PCB") -nes_jf11_device::nes_jf11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf11_device::nes_jf11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_JF11, tag, owner, clock) { } -nes_jf13_device::nes_jf13_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf13_device::nes_jf13_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_JF13, tag, owner, clock) , m_samples(*this, "samples") { } -nes_jf16_device::nes_jf16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf16_device::nes_jf16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_JF16, tag, owner, clock) { } -nes_jf17_device::nes_jf17_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool prg_flip) +nes_jf17_device::nes_jf17_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool prg_flip) : nes_nrom_device(mconfig, type, tag, owner, clock) , m_samples(*this, "samples") , m_latch(0) @@ -75,27 +75,27 @@ nes_jf17_device::nes_jf17_device(const machine_config &mconfig, device_type type { } -nes_jf17_device::nes_jf17_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf17_device::nes_jf17_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_jf17_device(mconfig, NES_JF17, tag, owner, clock, false) { } -nes_jf17_adpcm_device::nes_jf17_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf17_adpcm_device::nes_jf17_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_jf17_device(mconfig, NES_JF17_ADPCM, tag, owner, clock, false) { } -nes_jf19_device::nes_jf19_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf19_device::nes_jf19_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_jf17_device(mconfig, NES_JF19, tag, owner, clock, true) { } -nes_jf19_adpcm_device::nes_jf19_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf19_adpcm_device::nes_jf19_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_jf17_device(mconfig, NES_JF19_ADPCM, tag, owner, clock, true) { } -nes_ss88006_device::nes_ss88006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_ss88006_device::nes_ss88006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock) , m_samples(*this, "samples") , m_irq_count(0) @@ -107,27 +107,27 @@ nes_ss88006_device::nes_ss88006_device(const machine_config &mconfig, device_typ { } -nes_ss88006_device::nes_ss88006_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ss88006_device::nes_ss88006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ss88006_device(mconfig, NES_SS88006, tag, owner, clock) { } -nes_jf23_device::nes_jf23_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf23_device::nes_jf23_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ss88006_device(mconfig, NES_JF23, tag, owner, clock) { } -nes_jf24_device::nes_jf24_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf24_device::nes_jf24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ss88006_device(mconfig, NES_JF24, tag, owner, clock) { } -nes_jf29_device::nes_jf29_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf29_device::nes_jf29_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ss88006_device(mconfig, NES_JF29, tag, owner, clock) { } -nes_jf33_device::nes_jf33_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jf33_device::nes_jf33_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ss88006_device(mconfig, NES_JF33, tag, owner, clock) { } diff --git a/src/devices/bus/nes/jaleco.h b/src/devices/bus/nes/jaleco.h index 7ed1b13d25a..134af0bd4d5 100644 --- a/src/devices/bus/nes/jaleco.h +++ b/src/devices/bus/nes/jaleco.h @@ -15,7 +15,7 @@ class nes_jf11_device : public nes_nrom_device { public: // construction/destruction - nes_jf11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; }; @@ -27,7 +27,7 @@ class nes_jf13_device : public nes_nrom_device { public: // construction/destruction - nes_jf13_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf13_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -46,7 +46,7 @@ class nes_jf16_device : public nes_nrom_device { public: // construction/destruction - nes_jf16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -60,14 +60,14 @@ class nes_jf17_device : public nes_nrom_device { public: // construction/destruction - nes_jf17_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf17_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void pcb_reset() override; protected: - nes_jf17_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool m_prg_flip); + nes_jf17_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool m_prg_flip); // device-level overrides virtual void device_start() override; @@ -86,7 +86,7 @@ class nes_jf17_adpcm_device : public nes_jf17_device { public: // construction/destruction - nes_jf17_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf17_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -99,7 +99,7 @@ class nes_jf19_device : public nes_jf17_device { public: // construction/destruction - nes_jf19_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf19_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -109,7 +109,7 @@ class nes_jf19_adpcm_device : public nes_jf17_device { public: // construction/destruction - nes_jf19_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf19_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -122,7 +122,7 @@ class nes_ss88006_device : public nes_nrom_device { public: // construction/destruction - nes_ss88006_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ss88006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -131,7 +131,7 @@ public: virtual void pcb_reset() override; protected: - nes_ss88006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_ss88006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -159,7 +159,7 @@ class nes_jf23_device : public nes_ss88006_device { public: // construction/destruction - nes_jf23_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf23_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -172,7 +172,7 @@ class nes_jf24_device : public nes_ss88006_device { public: // construction/destruction - nes_jf24_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -185,7 +185,7 @@ class nes_jf29_device : public nes_ss88006_device { public: // construction/destruction - nes_jf29_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf29_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -198,7 +198,7 @@ class nes_jf33_device : public nes_ss88006_device { public: // construction/destruction - nes_jf33_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jf33_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/nes/jncota.cpp b/src/devices/bus/nes/jncota.cpp index 1206a0dd79b..f81068b60ab 100644 --- a/src/devices/bus/nes/jncota.cpp +++ b/src/devices/bus/nes/jncota.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(NES_JNCOTA_KT1001, nes_jncota_kt1001_device, "nes_jncota_kt1001", "NES Cart Shenzhen Jncota KT-1001 PCB") -nes_jncota_kt1001_device::nes_jncota_kt1001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jncota_kt1001_device::nes_jncota_kt1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_JNCOTA_KT1001, tag, owner, clock) { } diff --git a/src/devices/bus/nes/jncota.h b/src/devices/bus/nes/jncota.h index 441e6723969..3e8af2e0257 100644 --- a/src/devices/bus/nes/jncota.h +++ b/src/devices/bus/nes/jncota.h @@ -14,7 +14,7 @@ class nes_jncota_kt1001_device : public nes_nrom_device { public: // construction/destruction - nes_jncota_kt1001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jncota_kt1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/jy.cpp b/src/devices/bus/nes/jy.cpp index 655634f22ef..2c8553a05c1 100644 --- a/src/devices/bus/nes/jy.cpp +++ b/src/devices/bus/nes/jy.cpp @@ -41,28 +41,28 @@ DEFINE_DEVICE_TYPE(NES_JY_TYPEB, nes_jy_typeb_device, "nes_jyb", "NES Cart JY Co DEFINE_DEVICE_TYPE(NES_JY_TYPEC, nes_jy_typec_device, "nes_jyc", "NES Cart JY Company Type C PCB") -nes_jy_typea_device::nes_jy_typea_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_jy_typea_device::nes_jy_typea_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_extra_chr_bank(0), m_extra_chr_mask(0), m_bank_6000(0), m_irq_mode(0), m_irq_count(0), m_irq_prescale(0), m_irq_prescale_mask(0), m_irq_flip(0), m_irq_enable(0), m_irq_up(0), m_irq_down(0), irq_timer(nullptr) { } -nes_jy_typea_device::nes_jy_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_jy_typea_device::nes_jy_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_JY_TYPEA, tag, owner, clock) { } -nes_jy_typeb_device::nes_jy_typeb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_jy_typeb_device::nes_jy_typeb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_jy_typea_device(mconfig, type, tag, owner, clock) { } -nes_jy_typeb_device::nes_jy_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_jy_typeb_device::nes_jy_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_jy_typeb_device(mconfig, NES_JY_TYPEB, tag, owner, clock) { } -nes_jy_typec_device::nes_jy_typec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_jy_typec_device::nes_jy_typec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_jy_typeb_device(mconfig, NES_JY_TYPEC, tag, owner, clock) { } diff --git a/src/devices/bus/nes/jy.h b/src/devices/bus/nes/jy.h index 69c4ea8b04e..99db06bfe17 100644 --- a/src/devices/bus/nes/jy.h +++ b/src/devices/bus/nes/jy.h @@ -14,7 +14,7 @@ class nes_jy_typea_device : public nes_nrom_device { public: // construction/destruction - nes_jy_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_jy_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual uint8_t read_m(offs_t offset) override; @@ -28,7 +28,7 @@ public: virtual void pcb_reset() override; protected: - nes_jy_typea_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_jy_typea_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -73,10 +73,10 @@ class nes_jy_typeb_device : public nes_jy_typea_device { public: // construction/destruction - nes_jy_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_jy_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nes_jy_typeb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_jy_typeb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void update_mirror_typeb(); virtual void update_mirror() override { update_mirror_typeb(); } @@ -88,7 +88,7 @@ class nes_jy_typec_device : public nes_jy_typeb_device { public: // construction/destruction - nes_jy_typec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_jy_typec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t chr_r(offs_t offset) override; diff --git a/src/devices/bus/nes/kaiser.cpp b/src/devices/bus/nes/kaiser.cpp index 4635c699895..a69a058f304 100644 --- a/src/devices/bus/nes/kaiser.cpp +++ b/src/devices/bus/nes/kaiser.cpp @@ -63,92 +63,92 @@ DEFINE_DEVICE_TYPE(NES_KS7057, nes_ks7057_device, "nes_ks7057", "NES Cart Kai DEFINE_DEVICE_TYPE(NES_KS7058, nes_ks7058_device, "nes_ks7058", "NES Cart Kaiser KS-7058 PCB") -nes_ks106c_device::nes_ks106c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks106c_device::nes_ks106c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS106C, tag, owner, clock), m_latch(0) { } -nes_ks7058_device::nes_ks7058_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7058_device::nes_ks7058_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7058, tag, owner, clock) { } -nes_ks7022_device::nes_ks7022_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7022_device::nes_ks7022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7022, tag, owner, clock), m_latch(0) { } -nes_ks7032_device::nes_ks7032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_ks7032_device::nes_ks7032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_ks7032_device::nes_ks7032_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7032_device::nes_ks7032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ks7032_device(mconfig, NES_KS7032, tag, owner, clock) { } -nes_ks202_device::nes_ks202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks202_device::nes_ks202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ks7032_device(mconfig, NES_KS202, tag, owner, clock) { } -nes_ks7016_device::nes_ks7016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 a15_flip) +nes_ks7016_device::nes_ks7016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 a15_flip) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_a15_flip(a15_flip) { } -nes_ks7016_device::nes_ks7016_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7016_device::nes_ks7016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ks7016_device(mconfig, NES_KS7016, tag, owner, clock, 0x00) { } -nes_ks7016b_device::nes_ks7016b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7016b_device::nes_ks7016b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ks7016_device(mconfig, NES_KS7016B, tag, owner, clock, 0x04) { } -nes_ks7017_device::nes_ks7017_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7017_device::nes_ks7017_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7017, tag, owner, clock), m_latch(0), m_irq_count(0), m_irq_status(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_ks7021a_device::nes_ks7021a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7021a_device::nes_ks7021a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7021A, tag, owner, clock) { } -nes_ks7010_device::nes_ks7010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7010_device::nes_ks7010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7010, tag, owner, clock), m_latch(0) { } -nes_ks7012_device::nes_ks7012_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7012_device::nes_ks7012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7012, tag, owner, clock) { } -nes_ks7013b_device::nes_ks7013b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7013b_device::nes_ks7013b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7013B, tag, owner, clock) { } -nes_ks7030_device::nes_ks7030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7030_device::nes_ks7030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7030, tag, owner, clock) { } -nes_ks7031_device::nes_ks7031_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7031_device::nes_ks7031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7031, tag, owner, clock) { } -nes_ks7037_device::nes_ks7037_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7037_device::nes_ks7037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7037, tag, owner, clock), m_reg(0) { } -nes_ks7057_device::nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ks7057_device::nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KS7057, tag, owner, clock) { } diff --git a/src/devices/bus/nes/kaiser.h b/src/devices/bus/nes/kaiser.h index bfed01f40f9..e01a8e51446 100644 --- a/src/devices/bus/nes/kaiser.h +++ b/src/devices/bus/nes/kaiser.h @@ -14,7 +14,7 @@ class nes_ks106c_device : public nes_nrom_device { public: // construction/destruction - nes_ks106c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks106c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; @@ -33,7 +33,7 @@ class nes_ks7058_device : public nes_nrom_device { public: // construction/destruction - nes_ks7058_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7058_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -45,7 +45,7 @@ class nes_ks7022_device : public nes_nrom_device { public: // construction/destruction - nes_ks7022_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -67,7 +67,7 @@ class nes_ks7032_device : public nes_nrom_device { public: // construction/destruction - nes_ks7032_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -76,7 +76,7 @@ public: protected: // construction/destruction - nes_ks7032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_ks7032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -102,7 +102,7 @@ class nes_ks202_device : public nes_ks7032_device { public: // construction/destruction - nes_ks202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -115,7 +115,7 @@ class nes_ks7016_device : public nes_nrom_device { public: // construction/destruction - nes_ks7016_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -124,7 +124,7 @@ public: protected: // construction/destruction - nes_ks7016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 a15_flip); + nes_ks7016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 a15_flip); // device-level overrides virtual void device_start() override; @@ -141,7 +141,7 @@ class nes_ks7016b_device : public nes_ks7016_device { public: // construction/destruction - nes_ks7016b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7016b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -151,7 +151,7 @@ class nes_ks7017_device : public nes_nrom_device { public: // construction/destruction - nes_ks7017_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7017_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_ex(offs_t offset) override; virtual void write_ex(offs_t offset, u8 data) override; @@ -182,7 +182,7 @@ class nes_ks7021a_device : public nes_nrom_device { public: // construction/destruction - nes_ks7021a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7021a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -196,7 +196,7 @@ class nes_ks7010_device : public nes_nrom_device { public: // construction/destruction - nes_ks7010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual u8 read_h(offs_t offset) override; @@ -218,7 +218,7 @@ class nes_ks7012_device : public nes_nrom_device { public: // construction/destruction - nes_ks7012_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -232,7 +232,7 @@ class nes_ks7013b_device : public nes_nrom_device { public: // construction/destruction - nes_ks7013b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7013b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -247,7 +247,7 @@ class nes_ks7030_device : public nes_nrom_device { public: // construction/destruction - nes_ks7030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual u8 read_h(offs_t offset) override; @@ -271,7 +271,7 @@ class nes_ks7031_device : public nes_nrom_device { public: // construction/destruction - nes_ks7031_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual u8 read_h(offs_t offset) override; @@ -294,7 +294,7 @@ class nes_ks7037_device : public nes_nrom_device { public: // construction/destruction - nes_ks7037_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual u8 read_h(offs_t offset) override; @@ -318,7 +318,7 @@ class nes_ks7057_device : public nes_nrom_device { public: // construction/destruction - nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual u8 read_h(offs_t offset) override; diff --git a/src/devices/bus/nes/karastudio.cpp b/src/devices/bus/nes/karastudio.cpp index 3b8801bbf52..ce734a36183 100644 --- a/src/devices/bus/nes/karastudio.cpp +++ b/src/devices/bus/nes/karastudio.cpp @@ -70,7 +70,7 @@ uint8_t kstudio_cart_interface::read(offs_t offset) DEFINE_DEVICE_TYPE(NES_KSEXPANSION_SLOT, nes_kstudio_slot_device, "nes_ks_slot", "NES Karaoke Studio Expansion Slot") -nes_kstudio_slot_device::nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_kstudio_slot_device::nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_KSEXPANSION_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) @@ -144,7 +144,7 @@ ROM_END DEFINE_DEVICE_TYPE(NES_KSEXPANSION_ROM, nes_kstudio_rom_device, "nes_ks_rom", "NES Karaoke Studio Expansion ROM") -nes_kstudio_rom_device::nes_kstudio_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_kstudio_rom_device::nes_kstudio_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_KSEXPANSION_ROM, tag, owner, clock) , kstudio_cart_interface( mconfig, *this ) { @@ -181,7 +181,7 @@ uint8_t *nes_kstudio_rom_device::get_cart_base() DEFINE_DEVICE_TYPE(NES_KARAOKESTUDIO, nes_karaokestudio_device, "nes_karaoke", "NES Cart Bandai Karaoke Studio PCB") -nes_karaokestudio_device::nes_karaokestudio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_karaokestudio_device::nes_karaokestudio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KARAOKESTUDIO, tag, owner, clock) , m_exp_active(0) , m_subslot(*this, "exp_slot") diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h index 95ea9b14881..0b2219d7a96 100644 --- a/src/devices/bus/nes/karastudio.h +++ b/src/devices/bus/nes/karastudio.h @@ -51,7 +51,7 @@ public: // construction/destruction template nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts) - : nes_kstudio_slot_device(mconfig, tag, owner, (uint32_t)0) + : nes_kstudio_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -59,7 +59,7 @@ public: set_fixed(false); } - nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~nes_kstudio_slot_device(); // image-level overrides @@ -99,7 +99,7 @@ class nes_kstudio_rom_device : public device_t, { public: // construction/destruction - nes_kstudio_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_kstudio_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -127,7 +127,7 @@ class nes_karaokestudio_device : public nes_nrom_device { public: // construction/destruction - nes_karaokestudio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_karaokestudio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; diff --git a/src/devices/bus/nes/konami.cpp b/src/devices/bus/nes/konami.cpp index 64835930218..498c9cfcef9 100644 --- a/src/devices/bus/nes/konami.cpp +++ b/src/devices/bus/nes/konami.cpp @@ -45,42 +45,42 @@ DEFINE_DEVICE_TYPE(NES_VRC6, nes_konami_vrc6_device, "nes_vrc6", "NES Cart Konam DEFINE_DEVICE_TYPE(NES_VRC7, nes_konami_vrc7_device, "nes_vrc7", "NES Cart Konami VRC-7 PCB") -nes_konami_vrc1_device::nes_konami_vrc1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc1_device::nes_konami_vrc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_VRC1, tag, owner, clock) { } -nes_konami_vrc2_device::nes_konami_vrc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc2_device::nes_konami_vrc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0) { } -nes_konami_vrc2_device::nes_konami_vrc2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc2_device::nes_konami_vrc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc2_device(mconfig, NES_VRC2, tag, owner, clock) { } -nes_konami_vrc3_device::nes_konami_vrc3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc3_device::nes_konami_vrc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_VRC3, tag, owner, clock), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_enable_latch(0), m_irq_mode(0), irq_timer(nullptr) { } -nes_konami_vrc4_device::nes_konami_vrc4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc4_device::nes_konami_vrc4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_prg_flip(0), m_wram_enable(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_enable_latch(0), m_irq_mode(0), m_irq_prescale(0), irq_timer(nullptr) { } -nes_konami_vrc4_device::nes_konami_vrc4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc4_device::nes_konami_vrc4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_VRC4, tag, owner, clock) { } -nes_konami_vrc6_device::nes_konami_vrc6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc6_device::nes_konami_vrc6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_VRC6, tag, owner, clock), m_vrc6snd(*this, "vrc6snd") { } -nes_konami_vrc7_device::nes_konami_vrc7_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konami_vrc7_device::nes_konami_vrc7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_VRC7, tag, owner, clock), m_vrc7snd(*this, "vrc7snd") { } diff --git a/src/devices/bus/nes/konami.h b/src/devices/bus/nes/konami.h index ced0f7f4648..f7ec85929e2 100644 --- a/src/devices/bus/nes/konami.h +++ b/src/devices/bus/nes/konami.h @@ -16,7 +16,7 @@ class nes_konami_vrc1_device : public nes_nrom_device { public: // construction/destruction - nes_konami_vrc1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -37,7 +37,7 @@ class nes_konami_vrc2_device : public nes_nrom_device { public: // construction/destruction - nes_konami_vrc2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -47,7 +47,7 @@ public: protected: // construction/destruction - nes_konami_vrc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -64,7 +64,7 @@ class nes_konami_vrc3_device : public nes_nrom_device { public: // construction/destruction - nes_konami_vrc3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -91,7 +91,7 @@ class nes_konami_vrc4_device : public nes_nrom_device { public: // construction/destruction - nes_konami_vrc4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -101,7 +101,7 @@ public: protected: // construction/destruction - nes_konami_vrc4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -137,7 +137,7 @@ class nes_konami_vrc6_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_konami_vrc6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -156,7 +156,7 @@ class nes_konami_vrc7_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_konami_vrc7_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konami_vrc7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/legacy.cpp b/src/devices/bus/nes/legacy.cpp index 8625c4fab97..12cc5178d45 100644 --- a/src/devices/bus/nes/legacy.cpp +++ b/src/devices/bus/nes/legacy.cpp @@ -37,22 +37,22 @@ DEFINE_DEVICE_TYPE(NES_FFE4, nes_ffe4_device, "nes_ff4", "NES Cart FFE-4 PCB") DEFINE_DEVICE_TYPE(NES_FFE8, nes_ffe8_device, "nes_ff8", "NES Cart FFE-8 PCB") -nes_ffe3_device::nes_ffe3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_ffe3_device::nes_ffe3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_FFE3, tag, owner, clock) { } -nes_ffe4_device::nes_ffe4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_ffe4_device::nes_ffe4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0), m_exram_enabled(0), m_exram_bank(0) { } -nes_ffe4_device::nes_ffe4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_ffe4_device::nes_ffe4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ffe4_device(mconfig, NES_FFE4, tag, owner, clock) { } -nes_ffe8_device::nes_ffe8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_ffe8_device::nes_ffe8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_ffe4_device(mconfig, NES_FFE8, tag, owner, clock) { } diff --git a/src/devices/bus/nes/legacy.h b/src/devices/bus/nes/legacy.h index 191a718da45..be2b093f4f1 100644 --- a/src/devices/bus/nes/legacy.h +++ b/src/devices/bus/nes/legacy.h @@ -14,7 +14,7 @@ class nes_ffe3_device : public nes_nrom_device { public: // construction/destruction - nes_ffe3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_ffe3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -26,7 +26,7 @@ class nes_ffe4_device : public nes_nrom_device { public: // construction/destruction - nes_ffe4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_ffe4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void write_h(offs_t offset, uint8_t data) override; @@ -36,7 +36,7 @@ public: virtual void pcb_reset() override; protected: - nes_ffe4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_ffe4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -61,7 +61,7 @@ class nes_ffe8_device : public nes_ffe4_device { public: // construction/destruction - nes_ffe8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_ffe8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void write_h(offs_t offset, uint8_t data) override {} diff --git a/src/devices/bus/nes/mmc1.cpp b/src/devices/bus/nes/mmc1.cpp index 221b81e294e..722e879ceb2 100644 --- a/src/devices/bus/nes/mmc1.cpp +++ b/src/devices/bus/nes/mmc1.cpp @@ -45,22 +45,22 @@ DEFINE_DEVICE_TYPE(NES_SZROM, nes_szrom_device, "nes_szrom", "NES Cart SZROM (MM -nes_sxrom_device::nes_sxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_sxrom_device::nes_sxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_reg_write_enable(0), m_latch(0), m_count(0) { } -nes_sxrom_device::nes_sxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sxrom_device::nes_sxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_SXROM, tag, owner, clock) { } -nes_sorom_device::nes_sorom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sorom_device::nes_sorom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_SOROM, tag, owner, clock) { } -nes_szrom_device::nes_szrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_szrom_device::nes_szrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_SZROM, tag, owner, clock) { } diff --git a/src/devices/bus/nes/mmc1.h b/src/devices/bus/nes/mmc1.h index cdeee5056c6..665558997b0 100644 --- a/src/devices/bus/nes/mmc1.h +++ b/src/devices/bus/nes/mmc1.h @@ -14,7 +14,7 @@ class nes_sxrom_device : public nes_nrom_device { public: // construction/destruction - nes_sxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -23,7 +23,7 @@ public: virtual void pcb_reset() override; protected: - nes_sxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_sxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class nes_sorom_device : public nes_sxrom_device { public: // construction/destruction - nes_sorom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sorom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -66,7 +66,7 @@ class nes_szrom_device : public nes_sxrom_device { public: // construction/destruction - nes_szrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_szrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/mmc1_clones.cpp b/src/devices/bus/nes/mmc1_clones.cpp index 58ee73330cd..c19ae14b802 100644 --- a/src/devices/bus/nes/mmc1_clones.cpp +++ b/src/devices/bus/nes/mmc1_clones.cpp @@ -37,37 +37,37 @@ DEFINE_DEVICE_TYPE(NES_SRPG_5IN1, nes_srpg5in1_device, "nes_srpg5in1", DEFINE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device, "nes_txc_22110", "NES Cart TXC 01-22110-000 PCB") -nes_bmc_jy012005_device::nes_bmc_jy012005_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_jy012005_device::nes_bmc_jy012005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_BMC_JY012005, tag, owner, clock), m_latch0(0) { } -nes_bmc_jy820845c_device::nes_bmc_jy820845c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_jy820845c_device::nes_bmc_jy820845c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_BMC_JY820845C, tag, owner, clock), m_latch0(0), m_mode(0) { } -nes_farid_slrom_device::nes_farid_slrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_farid_slrom_device::nes_farid_slrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_FARID_SLROM, tag, owner, clock), m_outer(0) { } -nes_ninjaryu_device::nes_ninjaryu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ninjaryu_device::nes_ninjaryu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_NINJARYU, tag, owner, clock) { } -nes_resetsxrom_device::nes_resetsxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_resetsxrom_device::nes_resetsxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_RESETSXROM, tag, owner, clock), m_reset_count(-1) { } -nes_srpg5in1_device::nes_srpg5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_srpg5in1_device::nes_srpg5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_SRPG_5IN1, tag, owner, clock), m_outer(0), m_outer_count(0), m_outer_latch(0) { } -nes_txc_22110_device::nes_txc_22110_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_txc_22110_device::nes_txc_22110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sxrom_device(mconfig, NES_TXC_22110, tag, owner, clock), m_latch0(0), m_mode(0) { } diff --git a/src/devices/bus/nes/mmc1_clones.h b/src/devices/bus/nes/mmc1_clones.h index 993a0c1366d..35b4f1dfb2f 100644 --- a/src/devices/bus/nes/mmc1_clones.h +++ b/src/devices/bus/nes/mmc1_clones.h @@ -14,7 +14,7 @@ class nes_bmc_jy012005_device : public nes_sxrom_device { public: // construction/destruction - nes_bmc_jy012005_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_jy012005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -38,7 +38,7 @@ class nes_bmc_jy820845c_device : public nes_sxrom_device { public: // construction/destruction - nes_bmc_jy820845c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_jy820845c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -64,7 +64,7 @@ class nes_farid_slrom_device : public nes_sxrom_device { public: // construction/destruction - nes_farid_slrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_farid_slrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -88,7 +88,7 @@ class nes_ninjaryu_device : public nes_sxrom_device { public: // construction/destruction - nes_ninjaryu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ninjaryu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -104,7 +104,7 @@ class nes_resetsxrom_device : public nes_sxrom_device { public: // construction/destruction - nes_resetsxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_resetsxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; @@ -126,7 +126,7 @@ class nes_srpg5in1_device : public nes_sxrom_device { public: // construction/destruction - nes_srpg5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_srpg5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -152,7 +152,7 @@ class nes_txc_22110_device : public nes_sxrom_device { public: // construction/destruction - nes_txc_22110_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_txc_22110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/mmc2.cpp b/src/devices/bus/nes/mmc2.cpp index 02da59b7aad..4d2ab7556ca 100644 --- a/src/devices/bus/nes/mmc2.cpp +++ b/src/devices/bus/nes/mmc2.cpp @@ -32,17 +32,17 @@ DEFINE_DEVICE_TYPE(NES_PXROM, nes_pxrom_device, "nes_pxrom", "NES Cart PxROM (MM DEFINE_DEVICE_TYPE(NES_FXROM, nes_fxrom_device, "nes_fxrom", "NES Cart FxROM (MMC-2) PCB") -nes_pxrom_device::nes_pxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_pxrom_device::nes_pxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch1(0), m_latch2(0) { } -nes_pxrom_device::nes_pxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_pxrom_device::nes_pxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_pxrom_device(mconfig, NES_PXROM, tag, owner, clock) { } -nes_fxrom_device::nes_fxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_fxrom_device::nes_fxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_pxrom_device(mconfig, NES_FXROM, tag, owner, clock) { } diff --git a/src/devices/bus/nes/mmc2.h b/src/devices/bus/nes/mmc2.h index 1a6c8963826..4de5dc5d4a2 100644 --- a/src/devices/bus/nes/mmc2.h +++ b/src/devices/bus/nes/mmc2.h @@ -14,7 +14,7 @@ class nes_pxrom_device : public nes_nrom_device { public: // construction/destruction - nes_pxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_pxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pxrom_write(offs_t offset, uint8_t data); virtual void write_h(offs_t offset, uint8_t data) override { pxrom_write(offset, data); } @@ -23,7 +23,7 @@ public: virtual void pcb_reset() override; protected: - nes_pxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_pxrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -39,7 +39,7 @@ class nes_fxrom_device : public nes_pxrom_device { public: // construction/destruction - nes_fxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/mmc3.cpp b/src/devices/bus/nes/mmc3.cpp index ff9774882fd..4a2201f84a0 100644 --- a/src/devices/bus/nes/mmc3.cpp +++ b/src/devices/bus/nes/mmc3.cpp @@ -51,48 +51,48 @@ DEFINE_DEVICE_TYPE(NES_QJ_PCB, nes_qj_device, "nes_qj", "NES Cart NES-QJ DEFINE_DEVICE_TYPE(NES_ZZ_PCB, nes_zz_device, "nes_zz", "NES Cart PAL-ZZ PCB") -nes_txrom_device::nes_txrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_txrom_device::nes_txrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_mmc_mirror(0), m_prg_base(0), m_prg_mask(0), m_chr_base(0), m_chr_mask(0) , m_latch(0), m_wram_protect(0), m_alt_irq(0), m_irq_count(0), m_irq_count_latch(0), m_irq_clear(0), m_irq_enable(0) { } -nes_txrom_device::nes_txrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_txrom_device::nes_txrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_TXROM, tag, owner, clock) { } -nes_hkrom_device::nes_hkrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_hkrom_device::nes_hkrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_HKROM, tag, owner, clock), m_wram_enable(0), m_mmc6_reg(0) { } -nes_txsrom_device::nes_txsrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_txsrom_device::nes_txsrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock) { } -nes_txsrom_device::nes_txsrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_txsrom_device::nes_txsrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txsrom_device(mconfig, NES_TXSROM, tag, owner, clock) { } -nes_tqrom_device::nes_tqrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_tqrom_device::nes_tqrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock) { } -nes_tqrom_device::nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tqrom_device::nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_tqrom_device(mconfig, NES_TQROM, tag, owner, clock) { } -nes_qj_device::nes_qj_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_qj_device::nes_qj_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_QJ_PCB, tag, owner, clock) { } -nes_zz_device::nes_zz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_zz_device::nes_zz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_ZZ_PCB, tag, owner, clock) { } diff --git a/src/devices/bus/nes/mmc3.h b/src/devices/bus/nes/mmc3.h index 1bc3cc0536c..fba36a9e2c7 100644 --- a/src/devices/bus/nes/mmc3.h +++ b/src/devices/bus/nes/mmc3.h @@ -14,7 +14,7 @@ class nes_txrom_device : public nes_nrom_device { public: // construction/destruction - nes_txrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_txrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; @@ -27,7 +27,7 @@ public: virtual void pcb_reset() override; protected: - nes_txrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_txrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { mmc3_start(); } @@ -61,7 +61,7 @@ class nes_hkrom_device : public nes_txrom_device { public: // construction/destruction - nes_hkrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_hkrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; @@ -87,13 +87,13 @@ class nes_txsrom_device : public nes_txrom_device { public: // construction/destruction - nes_txsrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_txsrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; protected: // construction/destruction - nes_txsrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_txsrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void set_chr(u8 chr, int chr_base, int chr_mask) override; }; @@ -105,13 +105,13 @@ class nes_tqrom_device : public nes_txrom_device { public: // construction/destruction - nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tqrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void chr_cb(int start, int bank, int source) override; protected: // construction/destruction - nes_tqrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_tqrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -121,7 +121,7 @@ class nes_qj_device : public nes_txrom_device { public: // construction/destruction - nes_qj_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_qj_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -135,7 +135,7 @@ class nes_zz_device : public nes_txrom_device { public: // construction/destruction - nes_zz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_zz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/mmc3_clones.cpp b/src/devices/bus/nes/mmc3_clones.cpp index b74ec375e55..f8a9721e556 100644 --- a/src/devices/bus/nes/mmc3_clones.cpp +++ b/src/devices/bus/nes/mmc3_clones.cpp @@ -157,338 +157,338 @@ ioport_constructor nes_bmc_kc885_device::device_input_ports() const // LIVE DEVICE //************************************************************************** -nes_nitra_device::nes_nitra_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_nitra_device::nes_nitra_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_NITRA, tag, owner, clock) { } -nes_bmw8544_device::nes_bmw8544_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmw8544_device::nes_bmw8544_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMW8544, tag, owner, clock), m_reg(0) { } -nes_fs6_device::nes_fs6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_fs6_device::nes_fs6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_FS6, tag, owner, clock) { } -nes_sbros11_device::nes_sbros11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sbros11_device::nes_sbros11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_SBROS11, tag, owner, clock) { } -nes_malisb_device::nes_malisb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_malisb_device::nes_malisb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_MALISB, tag, owner, clock) { } -nes_family4646_device::nes_family4646_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_family4646_device::nes_family4646_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_FAMILY4646, tag, owner, clock) { } -nes_pikay2k_device::nes_pikay2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_pikay2k_device::nes_pikay2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_PIKAY2K, tag, owner, clock) { } -nes_8237_device::nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board) +nes_8237_device::nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 board) : nes_txrom_device(mconfig, type, tag, owner, clock), m_board(board) { } -nes_8237_device::nes_8237_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_8237_device::nes_8237_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_8237_device(mconfig, NES_8237, tag, owner, clock, 0) { } -nes_8237a_device::nes_8237a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_8237a_device::nes_8237a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_8237_device(mconfig, NES_8237A, tag, owner, clock, 1) { } -nes_158b_device::nes_158b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_158b_device::nes_158b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_8237_device(mconfig, NES_158B, tag, owner, clock, 0) { } -nes_kasing_device::nes_kasing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_kasing_device::nes_kasing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock), m_mmc3_mode(true) { } -nes_kasing_device::nes_kasing_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_kasing_device::nes_kasing_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_kasing_device(mconfig, NES_KASING, tag, owner, clock) { } -nes_sglionk_device::nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board) +nes_sglionk_device::nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 board) : nes_kasing_device(mconfig, type, tag, owner, clock), m_board(board) { } -nes_sglionk_device::nes_sglionk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sglionk_device::nes_sglionk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sglionk_device(mconfig, NES_SG_LIONK, tag, owner, clock, 0) { } -nes_sgboog_device::nes_sgboog_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sgboog_device::nes_sgboog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sglionk_device(mconfig, NES_SG_BOOG, tag, owner, clock, 1) { } -nes_kay_device::nes_kay_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_kay_device::nes_kay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_KAY, tag, owner, clock), m_low_reg(0) { } -nes_h2288_device::nes_h2288_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_h2288_device::nes_h2288_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_H2288, tag, owner, clock), m_mmc3_mode(true) { } -nes_6035052_device::nes_6035052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_6035052_device::nes_6035052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_6035052, tag, owner, clock), m_prot(0) { } -nes_txc_tw_device::nes_txc_tw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_txc_tw_device::nes_txc_tw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_TXC_TW, tag, owner, clock) { } -nes_kof97_device::nes_kof97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_kof97_device::nes_kof97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_KOF97, tag, owner, clock) { } -nes_kof96_device::nes_kof96_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_kof96_device::nes_kof96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_KOF96, tag, owner, clock), m_mmc3_mode(true) { } -nes_sf3_device::nes_sf3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sf3_device::nes_sf3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_SF3, tag, owner, clock) { } -nes_cocoma_device::nes_cocoma_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cocoma_device::nes_cocoma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_COCOMA, tag, owner, clock) { } -nes_gouder_device::nes_gouder_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_gouder_device::nes_gouder_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_GOUDER, tag, owner, clock) { } -nes_sa9602b_device::nes_sa9602b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sa9602b_device::nes_sa9602b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_SA9602B, tag, owner, clock), m_reg(0), m_prg_chip(0) { } -nes_sachen_shero_device::nes_sachen_shero_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sachen_shero_device::nes_sachen_shero_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_SACHEN_SHERO, tag, owner, clock) , m_jumper(*this, "JUMPER") , m_reg(0) { } -nes_sachen_zgdh_device::nes_sachen_zgdh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sachen_zgdh_device::nes_sachen_zgdh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_SACHEN_ZGDH, tag, owner, clock), m_reg(0) { } -nes_a9746_device::nes_a9746_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_a9746_device::nes_a9746_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_A9746, tag, owner, clock) { } -nes_a88s1_device::nes_a88s1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_a88s1_device::nes_a88s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_A88S1, tag, owner, clock) { } -nes_bmc_el86xc_device::nes_bmc_el86xc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_el86xc_device::nes_bmc_el86xc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_EL86XC, tag, owner, clock) { } -nes_fk23c_device::nes_fk23c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_fk23c_device::nes_fk23c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock), m_mmc_cmd1(0) { } -nes_fk23c_device::nes_fk23c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_fk23c_device::nes_fk23c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fk23c_device(mconfig, NES_FK23C, tag, owner, clock) { } -nes_fk23ca_device::nes_fk23ca_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_fk23ca_device::nes_fk23ca_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fk23c_device(mconfig, NES_FK23CA, tag, owner, clock) { } -nes_nt639_device::nes_nt639_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_nt639_device::nes_nt639_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_NT639, tag, owner, clock) { } -nes_resettxrom_device::nes_resettxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_resettxrom_device::nes_resettxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_RESETTXROM, tag, owner, clock), m_count(-1) { } -nes_s24in1sc03_device::nes_s24in1sc03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_s24in1sc03_device::nes_s24in1sc03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_S24IN1SC03, tag, owner, clock) { } -nes_tech9in1_device::nes_tech9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tech9in1_device::nes_tech9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_TECHLINE9IN1, tag, owner, clock) { } -nes_bmc_5in1_device::nes_bmc_5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_5in1_device::nes_bmc_5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_5IN1, tag, owner, clock) , m_jumper(*this, "JUMPER") { } -nes_bmc_8in1_device::nes_bmc_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_8in1_device::nes_bmc_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_8IN1, tag, owner, clock) { } -nes_bmc_15in1_device::nes_bmc_15in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_15in1_device::nes_bmc_15in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_15IN1, tag, owner, clock), m_jumper(0) { } -nes_bmc_sbig7_device::nes_bmc_sbig7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_sbig7_device::nes_bmc_sbig7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_SBIG7, tag, owner, clock) { } -nes_bmc_hik8_device::nes_bmc_hik8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_bmc_hik8_device::nes_bmc_hik8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock), m_count(0) { } -nes_bmc_hik8_device::nes_bmc_hik8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_hik8_device::nes_bmc_hik8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_hik8_device(mconfig, NES_BMC_HIK8, tag, owner, clock) { } -nes_bmc_jy208_device::nes_bmc_jy208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_jy208_device::nes_bmc_jy208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_hik8_device(mconfig, NES_BMC_JY208, tag, owner, clock) { } -nes_bmc_jy302_device::nes_bmc_jy302_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_jy302_device::nes_bmc_jy302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_hik8_device(mconfig, NES_BMC_JY302, tag, owner, clock) { } -nes_bmc_kc885_device::nes_bmc_kc885_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_kc885_device::nes_bmc_kc885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_hik8_device(mconfig, NES_BMC_KC885, tag, owner, clock) , m_jumper(*this, "JUMPER") { } -nes_bmc_sfc12_device::nes_bmc_sfc12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_sfc12_device::nes_bmc_sfc12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_hik8_device(mconfig, NES_BMC_SFC12, tag, owner, clock) { } -nes_bmc_hik4_device::nes_bmc_hik4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_hik4_device::nes_bmc_hik4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_HIK4, tag, owner, clock), m_mmc3_mode(true) { } -nes_bmc_f15_device::nes_bmc_f15_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_f15_device::nes_bmc_f15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_F15, tag, owner, clock) { } -nes_bmc_f600_device::nes_bmc_f600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_f600_device::nes_bmc_f600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txsrom_device(mconfig, NES_BMC_F600, tag, owner, clock) , m_jumper(*this, "JUMPER") , m_reg(0) { } -nes_bmc_gn45_device::nes_bmc_gn45_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_gn45_device::nes_bmc_gn45_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_GN45, tag, owner, clock), m_lock(false) { } -nes_bmc_gold7in1_device::nes_bmc_gold7in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_gold7in1_device::nes_bmc_gold7in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_GOLD7IN1, tag, owner, clock), m_lock(false) { } -nes_bmc_k3006_device::nes_bmc_k3006_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_k3006_device::nes_bmc_k3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_K3006, tag, owner, clock) { } -nes_bmc_k3033_device::nes_bmc_k3033_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_k3033_device::nes_bmc_k3033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_K3033, tag, owner, clock), m_mmc3_mode(false) { } -nes_bmc_l6in1_device::nes_bmc_l6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_l6in1_device::nes_bmc_l6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_L6IN1, tag, owner, clock), m_reg(0) { } -nes_bmc_00202650_device::nes_bmc_00202650_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_00202650_device::nes_bmc_00202650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_00202650, tag, owner, clock), m_mmc3_mode(false) { } -nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_411120C, tag, owner, clock), m_reg(0) { } -nes_bmc_810305c_device::nes_bmc_810305c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_810305c_device::nes_bmc_810305c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txsrom_device(mconfig, NES_BMC_810305C, tag, owner, clock), m_outer(0) { } -nes_bmc_820720c_device::nes_bmc_820720c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_820720c_device::nes_bmc_820720c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_820720C, tag, owner, clock), m_reg(0) { } -nes_bmc_830118c_device::nes_bmc_830118c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_830118c_device::nes_bmc_830118c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_830118C, tag, owner, clock) { } -nes_bmc_830832c_device::nes_bmc_830832c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_830832c_device::nes_bmc_830832c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_830832C, tag, owner, clock) { } -nes_bmc_yy841101c_device::nes_bmc_yy841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_yy841101c_device::nes_bmc_yy841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_YY841101C, tag, owner, clock) { } -nes_bmc_yy841155c_device::nes_bmc_yy841155c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_yy841155c_device::nes_bmc_yy841155c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_BMC_YY841155C, tag, owner, clock) { } -nes_pjoy84_device::nes_pjoy84_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_pjoy84_device::nes_pjoy84_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_PJOY84, tag, owner, clock) { } -nes_smd133_device::nes_smd133_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_smd133_device::nes_smd133_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_SMD133, tag, owner, clock) { } diff --git a/src/devices/bus/nes/mmc3_clones.h b/src/devices/bus/nes/mmc3_clones.h index 47f0d4cff5f..1f9d001d1a2 100644 --- a/src/devices/bus/nes/mmc3_clones.h +++ b/src/devices/bus/nes/mmc3_clones.h @@ -14,7 +14,7 @@ class nes_nitra_device : public nes_txrom_device { public: // construction/destruction - nes_nitra_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_nitra_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -26,7 +26,7 @@ class nes_bmw8544_device : public nes_txrom_device { public: // construction/destruction - nes_bmw8544_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmw8544_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -50,7 +50,7 @@ class nes_fs6_device : public nes_txrom_device { public: // construction/destruction - nes_fs6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_fs6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -62,7 +62,7 @@ class nes_sbros11_device : public nes_txrom_device { public: // construction/destruction - nes_sbros11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sbros11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -74,7 +74,7 @@ class nes_malisb_device : public nes_txrom_device { public: // construction/destruction - nes_malisb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_malisb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -88,7 +88,7 @@ class nes_family4646_device : public nes_txrom_device { public: // construction/destruction - nes_family4646_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_family4646_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -110,7 +110,7 @@ class nes_pikay2k_device : public nes_txrom_device { public: // construction/destruction - nes_pikay2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_pikay2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; @@ -133,7 +133,7 @@ class nes_8237_device : public nes_txrom_device { public: // construction/destruction - nes_8237_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_8237_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -143,7 +143,7 @@ public: protected: // construction/destruction - nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board); + nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 board); // device-level overrides virtual void device_start() override; @@ -161,7 +161,7 @@ class nes_8237a_device : public nes_8237_device { public: // construction/destruction - nes_8237a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_8237a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -171,7 +171,7 @@ class nes_158b_device : public nes_8237_device { public: // construction/destruction - nes_158b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_158b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -193,7 +193,7 @@ class nes_kasing_device : public nes_txrom_device { public: // construction/destruction - nes_kasing_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_kasing_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -202,7 +202,7 @@ public: protected: // construction/destruction - nes_kasing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_kasing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -218,13 +218,13 @@ class nes_sglionk_device : public nes_kasing_device { public: // construction/destruction - nes_sglionk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sglionk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; protected: // construction/destruction - nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board); + nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 board); private: const u8 m_board; @@ -237,7 +237,7 @@ class nes_sgboog_device : public nes_sglionk_device { public: // construction/destruction - nes_sgboog_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sgboog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -247,7 +247,7 @@ class nes_kay_device : public nes_txrom_device { public: // construction/destruction - nes_kay_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_kay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -274,7 +274,7 @@ class nes_h2288_device : public nes_txrom_device { public: // construction/destruction - nes_h2288_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_h2288_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // FIXME: This is a hack and should be removed once open bus behavior is properly working. UMK3 depends on an open bus read (F51F: lda $5f74) at bootup. virtual u8 read_l(offs_t offset) override { return 0x5f; } @@ -300,7 +300,7 @@ class nes_6035052_device : public nes_txrom_device { public: // construction/destruction - nes_6035052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_6035052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_ex(offs_t offset) override; virtual void write_ex(offs_t offset, uint8_t data) override; @@ -326,7 +326,7 @@ class nes_txc_tw_device : public nes_txrom_device { public: // construction/destruction - nes_txc_tw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_txc_tw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void write_m(offs_t offset, uint8_t data) override { write_l(offset & 0xff, data); } // offset does not really count for this mapper } @@ -340,7 +340,7 @@ class nes_kof97_device : public nes_txrom_device { public: // construction/destruction - nes_kof97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_kof97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -352,7 +352,7 @@ class nes_kof96_device : public nes_txrom_device { public: // construction/destruction - nes_kof96_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_kof96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -376,7 +376,7 @@ class nes_sf3_device : public nes_txrom_device { public: // construction/destruction - nes_sf3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sf3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -391,7 +391,7 @@ class nes_cocoma_device : public nes_txrom_device { public: // construction/destruction - nes_cocoma_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cocoma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -405,7 +405,7 @@ class nes_gouder_device : public nes_txrom_device { public: // construction/destruction - nes_gouder_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_gouder_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual void write_l(offs_t offset, uint8_t data) override; @@ -428,7 +428,7 @@ class nes_sa9602b_device : public nes_txrom_device { public: // construction/destruction - nes_sa9602b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sa9602b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; virtual void prg_cb(int start, int bank) override; @@ -451,7 +451,7 @@ class nes_sachen_shero_device : public nes_txrom_device { public: // construction/destruction - nes_sachen_shero_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sachen_shero_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -475,7 +475,7 @@ class nes_sachen_zgdh_device : public nes_txrom_device { public: // construction/destruction - nes_sachen_zgdh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sachen_zgdh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual u8 nt_r(offs_t offset) override; @@ -499,7 +499,7 @@ class nes_a9746_device : public nes_txrom_device { public: // construction/destruction - nes_a9746_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_a9746_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -521,7 +521,7 @@ class nes_a88s1_device : public nes_txrom_device { public: // construction/destruction - nes_a88s1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_a88s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -544,7 +544,7 @@ class nes_bmc_el86xc_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_el86xc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_el86xc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -558,7 +558,7 @@ class nes_fk23c_device : public nes_txrom_device { public: // construction/destruction - nes_fk23c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fk23c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void write_h(offs_t offset, uint8_t data) override; @@ -568,7 +568,7 @@ public: virtual void pcb_reset() override; protected: - nes_fk23c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_fk23c_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -586,7 +586,7 @@ class nes_fk23ca_device : public nes_fk23c_device { public: // construction/destruction - nes_fk23ca_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fk23ca_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; }; @@ -598,7 +598,7 @@ class nes_nt639_device : public nes_txrom_device { public: // construction/destruction - nes_nt639_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_nt639_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -612,7 +612,7 @@ class nes_resettxrom_device : public nes_txrom_device { public: // construction/destruction - nes_resettxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_resettxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; @@ -631,7 +631,7 @@ class nes_s24in1sc03_device : public nes_txrom_device { public: // construction/destruction - nes_s24in1sc03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_s24in1sc03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void prg_cb(int start, int bank) override; @@ -654,7 +654,7 @@ class nes_tech9in1_device : public nes_txrom_device { public: // construction/destruction - nes_tech9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tech9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; @@ -676,7 +676,7 @@ class nes_bmc_5in1_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_5in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -698,7 +698,7 @@ class nes_bmc_8in1_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -712,7 +712,7 @@ class nes_bmc_15in1_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_15in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_15in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -729,7 +729,7 @@ class nes_bmc_sbig7_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_sbig7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_sbig7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -743,7 +743,7 @@ class nes_bmc_hik8_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_hik8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_hik8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -751,7 +751,7 @@ public: protected: // construction/destruction - nes_bmc_hik8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_bmc_hik8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -767,7 +767,7 @@ class nes_bmc_jy208_device : public nes_bmc_hik8_device { public: // construction/destruction - nes_bmc_jy208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_jy208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -782,7 +782,7 @@ class nes_bmc_jy302_device : public nes_bmc_hik8_device { public: // construction/destruction - nes_bmc_jy302_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_jy302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void set_chr(u8 chr, int chr_base, int chr_mask) override; @@ -795,7 +795,7 @@ class nes_bmc_kc885_device : public nes_bmc_hik8_device { public: // construction/destruction - nes_bmc_kc885_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_kc885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -817,7 +817,7 @@ class nes_bmc_sfc12_device : public nes_bmc_hik8_device { public: // construction/destruction - nes_bmc_sfc12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_sfc12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void set_chr(u8 chr, int chr_base, int chr_mask) override; @@ -830,7 +830,7 @@ class nes_bmc_hik4_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_hik4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_hik4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -852,7 +852,7 @@ class nes_bmc_f15_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_f15_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_f15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -867,7 +867,7 @@ class nes_bmc_f600_device : public nes_txsrom_device { public: // construction/destruction - nes_bmc_f600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_f600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -894,7 +894,7 @@ class nes_bmc_gn45_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_gn45_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_gn45_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -915,7 +915,7 @@ class nes_bmc_gold7in1_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_gold7in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_gold7in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -936,7 +936,7 @@ class nes_bmc_k3006_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_k3006_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_k3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -950,7 +950,7 @@ class nes_bmc_k3033_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_k3033_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_k3033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -972,7 +972,7 @@ class nes_bmc_l6in1_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_l6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_l6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -997,7 +997,7 @@ class nes_bmc_00202650_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_00202650_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_00202650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -1021,7 +1021,7 @@ class nes_bmc_411120c_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -1043,7 +1043,7 @@ class nes_bmc_810305c_device : public nes_txsrom_device { public: // construction/destruction - nes_bmc_810305c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_810305c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -1067,7 +1067,7 @@ class nes_bmc_820720c_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_820720c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_820720c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -1092,7 +1092,7 @@ class nes_bmc_830118c_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_830118c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_830118c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void prg_cb(int start, int bank) override; @@ -1107,7 +1107,7 @@ class nes_bmc_830832c_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_830832c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_830832c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -1121,7 +1121,7 @@ class nes_bmc_yy841101c_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_yy841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_yy841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -1135,7 +1135,7 @@ class nes_bmc_yy841155c_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_yy841155c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_yy841155c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -1156,7 +1156,7 @@ class nes_pjoy84_device : public nes_txrom_device { public: // construction/destruction - nes_pjoy84_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_pjoy84_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, uint8_t data) override; virtual void prg_cb(int start, int bank) override; @@ -1180,7 +1180,7 @@ class nes_smd133_device : public nes_txrom_device { public: // construction/destruction - nes_smd133_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_smd133_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual void write_m(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/mmc5.cpp b/src/devices/bus/nes/mmc5.cpp index f15b1a7658b..a2ae5b61f87 100644 --- a/src/devices/bus/nes/mmc5.cpp +++ b/src/devices/bus/nes/mmc5.cpp @@ -41,7 +41,7 @@ static const int m_mmc5_attrib[4] = {0x00, 0x55, 0xaa, 0xff}; DEFINE_DEVICE_TYPE(NES_EXROM, nes_exrom_device, "nes_exrom", "NES Cart ExROM (MMC-5) PCB") -nes_exrom_device::nes_exrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_exrom_device::nes_exrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_EXROM, tag, owner, clock), m_irq_count(0) , m_irq_status(0), m_irq_enable(0), m_mult1(0), m_mult2(0), m_mmc5_scanline(0), m_vrom_page_a(0), m_vrom_page_b(0), m_floodtile(0), m_floodattr(0) , m_prg_mode(0), m_chr_mode(0), m_wram_protect_1(0), m_wram_protect_2(0), m_exram_control(0), m_wram_base(0), m_last_chr(0), m_ex1_chr(0) diff --git a/src/devices/bus/nes/mmc5.h b/src/devices/bus/nes/mmc5.h index a806c704883..1bdd4eaebe5 100644 --- a/src/devices/bus/nes/mmc5.h +++ b/src/devices/bus/nes/mmc5.h @@ -17,7 +17,7 @@ class nes_exrom_device : public nes_nrom_device { public: // construction/destruction - nes_exrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_exrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~nes_exrom_device(); virtual uint8_t read_l(offs_t offset) override; diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index 2e13e22a73e..8e2c0c13078 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -130,404 +130,404 @@ ioport_constructor nes_bmc_8157_device::device_input_ports() const // LIVE DEVICE //************************************************************************** -nes_action52_device::nes_action52_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_action52_device::nes_action52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_ACTION52, tag, owner, clock) { } -nes_caltron6in1_device::nes_caltron6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_caltron6in1_device::nes_caltron6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CALTRON6IN1, tag, owner, clock), m_latch(0), m_reg(0) { } -nes_caltron9in1_device::nes_caltron9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_caltron9in1_device::nes_caltron9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CALTRON9IN1, tag, owner, clock) { } -nes_rumblestat_device::nes_rumblestat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_rumblestat_device::nes_rumblestat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_RUMBLESTATION, tag, owner, clock), m_prg(0), m_chr(0) { } -nes_svision16_device::nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_svision16_device::nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SVISION16, tag, owner, clock), m_latch1(0), m_latch2(0) { } -nes_farid_unrom_device::nes_farid_unrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_farid_unrom_device::nes_farid_unrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_FARID_UNROM, tag, owner, clock), m_reg(0) { } -nes_kn42_device::nes_kn42_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_kn42_device::nes_kn42_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_KN42, tag, owner, clock), m_latch(0) { } -nes_a65as_device::nes_a65as_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_a65as_device::nes_a65as_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_A65AS, tag, owner, clock) { } -nes_t262_device::nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_t262_device::nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_T262, tag, owner, clock), m_latch(0) { } -nes_studyngame_device::nes_studyngame_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_studyngame_device::nes_studyngame_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_STUDYNGAME, tag, owner, clock) { } -nes_sgun20in1_device::nes_sgun20in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_sgun20in1_device::nes_sgun20in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock) { } -nes_sgun20in1_device::nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sgun20in1_device::nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sgun20in1_device(mconfig, NES_SUPERGUN20IN1, tag, owner, clock) { } -nes_bmc_190in1_device::nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_190in1_device::nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sgun20in1_device(mconfig, NES_BMC_190IN1, tag, owner, clock) { } -nes_vt5201_device::nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_vt5201_device::nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_VT5201, tag, owner, clock), m_latch(0), m_jumper(0) { } -nes_bmc_80013b_device::nes_bmc_80013b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_80013b_device::nes_bmc_80013b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_80013B, tag, owner, clock), m_latch(0) { } -nes_bmc_810544c_device::nes_bmc_810544c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_810544c_device::nes_bmc_810544c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_810544C, tag, owner, clock) { } -nes_bmc_830425c_device::nes_bmc_830425c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_830425c_device::nes_bmc_830425c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_830425C, tag, owner, clock), m_latch(0) { } -nes_bmc_830928c_device::nes_bmc_830928c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_830928c_device::nes_bmc_830928c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_830928C, tag, owner, clock), m_latch(0) { } -nes_bmc_850437c_device::nes_bmc_850437c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_850437c_device::nes_bmc_850437c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_850437C, tag, owner, clock) { } -nes_bmc_970630c_device::nes_bmc_970630c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_970630c_device::nes_bmc_970630c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_970630C, tag, owner, clock), m_latch(0) { } -nes_ntd03_device::nes_ntd03_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ntd03_device::nes_ntd03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NTD03, tag, owner, clock) { } -nes_bmc_ctc09_device::nes_bmc_ctc09_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_ctc09_device::nes_bmc_ctc09_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_CTC09, tag, owner, clock) { } -nes_bmc_ds927_device::nes_bmc_ds927_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_ds927_device::nes_bmc_ds927_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_DS927, tag, owner, clock), m_latch(0), m_mode(0) { } -nes_bmc_gka_device::nes_bmc_gka_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_gka_device::nes_bmc_gka_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_GKA, tag, owner, clock) { } -nes_bmc_gkb_device::nes_bmc_gkb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_gkb_device::nes_bmc_gkb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_GKB, tag, owner, clock) { } -nes_bmc_gkcxin1_device::nes_bmc_gkcxin1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_gkcxin1_device::nes_bmc_gkcxin1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_GKCXIN1, tag, owner, clock) { } -nes_bmc_gn91b_device::nes_bmc_gn91b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_gn91b_device::nes_bmc_gn91b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_GN91B, tag, owner, clock), m_latch(0) { } -nes_bmc_hp898f_device::nes_bmc_hp898f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_hp898f_device::nes_bmc_hp898f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_HP898F, tag, owner, clock) { } -nes_bmc_k3036_device::nes_bmc_k3036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_k3036_device::nes_bmc_k3036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_K3036, tag, owner, clock) { } -nes_bmc_k3046_device::nes_bmc_k3046_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_k3046_device::nes_bmc_k3046_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_K3046, tag, owner, clock) { } -nes_bmc_k3071_device::nes_bmc_k3071_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_k3071_device::nes_bmc_k3071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_K3071, tag, owner, clock) { } -nes_bmc_s009_device::nes_bmc_s009_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_s009_device::nes_bmc_s009_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_S009, tag, owner, clock), m_reg(0) { } -nes_bmc_sa005a_device::nes_bmc_sa005a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_sa005a_device::nes_bmc_sa005a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_SA005A, tag, owner, clock) { } -nes_bmc_tf2740_device::nes_bmc_tf2740_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_tf2740_device::nes_bmc_tf2740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_TF2740, tag, owner, clock), m_jumper(0) { } -nes_bmc_th2348_device::nes_bmc_th2348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_th2348_device::nes_bmc_th2348_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_TH2348, tag, owner, clock), m_latch(0) { } -nes_bmc_tj03_device::nes_bmc_tj03_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_tj03_device::nes_bmc_tj03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_TJ03, tag, owner, clock) { } -nes_bmc_ws_device::nes_bmc_ws_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_ws_device::nes_bmc_ws_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_WS, tag, owner, clock), m_latch(0) { } -nes_bmc_11160_device::nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_11160_device::nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_11160, tag, owner, clock) { } -nes_bmc_g146_device::nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_g146_device::nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_G146, tag, owner, clock) { } -nes_bmc_2751_device::nes_bmc_2751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_2751_device::nes_bmc_2751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_2751, tag, owner, clock) { } -nes_bmc_8157_device::nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_8157_device::nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_8157, tag, owner, clock) , m_jumper(*this, "JUMPER") , m_latch(0) { } -nes_bmc_hik300_device::nes_bmc_hik300_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_hik300_device::nes_bmc_hik300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_HIK300, tag, owner, clock) { } -nes_bmc_s700_device::nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_s700_device::nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_S700, tag, owner, clock) { } -nes_bmc_ball11_device::nes_bmc_ball11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_ball11_device::nes_bmc_ball11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_BALL11, tag, owner, clock) { } -nes_bmc_22games_device::nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_22games_device::nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_22GAMES, tag, owner, clock), m_latch(0), m_reset(0) { } -nes_bmc_64y2k_device::nes_bmc_64y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_64y2k_device::nes_bmc_64y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_64Y2K, tag, owner, clock), m_reg_mask(0) { } -nes_bmc_420y2k_device::nes_bmc_420y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_420y2k_device::nes_bmc_420y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_420Y2K, tag, owner, clock), m_latch(0), m_reg(0) { } -nes_bmc_12in1_device::nes_bmc_12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_12in1_device::nes_bmc_12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_12IN1, tag, owner, clock) { } -nes_bmc_20in1_device::nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_20in1_device::nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_20IN1, tag, owner, clock) { } -nes_bmc_21in1_device::nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_21in1_device::nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_21IN1, tag, owner, clock) { } -nes_bmc_31in1_device::nes_bmc_31in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_31in1_device::nes_bmc_31in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_31IN1, tag, owner, clock) { } -nes_bmc_35in1_device::nes_bmc_35in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_35in1_device::nes_bmc_35in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_35IN1, tag, owner, clock) { } -nes_bmc_36in1_device::nes_bmc_36in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_36in1_device::nes_bmc_36in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_36IN1, tag, owner, clock) { } -nes_bmc_64in1_device::nes_bmc_64in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_64in1_device::nes_bmc_64in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_64IN1, tag, owner, clock) { } -nes_bmc_70in1_device::nes_bmc_70in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_bmc_70in1_device::nes_bmc_70in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_jumper(type == NES_BMC_70IN1 ? 0x0d : 0x06) { } -nes_bmc_70in1_device::nes_bmc_70in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_70in1_device::nes_bmc_70in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_70in1_device(mconfig, NES_BMC_70IN1, tag, owner, clock) { } -nes_bmc_800in1_device::nes_bmc_800in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_800in1_device::nes_bmc_800in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_70in1_device(mconfig, NES_BMC_800IN1, tag, owner, clock) { } -nes_bmc_72in1_device::nes_bmc_72in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_72in1_device::nes_bmc_72in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_72IN1, tag, owner, clock) { } -nes_bmc_76in1_device::nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_76in1_device::nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_76IN1, tag, owner, clock) { } -nes_bmc_150in1_device::nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_150in1_device::nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_150IN1, tag, owner, clock) { } -nes_bmc_500in1_device::nes_bmc_500in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_500in1_device::nes_bmc_500in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_500IN1, tag, owner, clock) { } -nes_bmc_1200in1_device::nes_bmc_1200in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_1200in1_device::nes_bmc_1200in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_1200IN1, tag, owner, clock), m_vram_protect(0) { } -nes_bmc_gold260_device::nes_bmc_gold260_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_gold260_device::nes_bmc_gold260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_GOLD260, tag, owner, clock) { } -nes_bmc_4in1reset_device::nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_4in1reset_device::nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_4IN1RESET, tag, owner, clock), m_latch(0) { } -nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mirror_flip) +nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mirror_flip) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_mirror_flip(mirror_flip) { } -nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_42in1reset_device(mconfig, NES_BMC_42IN1RESET, tag, owner, clock, 0) { } -nes_bmc_nc20mb_device::nes_bmc_nc20mb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_nc20mb_device::nes_bmc_nc20mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_42in1reset_device(mconfig, NES_BMC_NC20MB, tag, owner, clock, 1) { } -nes_bmc_lc160_device::nes_bmc_lc160_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_lc160_device::nes_bmc_lc160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BMC_LC160, tag, owner, clock) { } -nes_vram_protect_device::nes_vram_protect_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_vram_protect_device::nes_vram_protect_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_vram_protect(false) { } -nes_bmc_60311c_device::nes_bmc_60311c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_60311c_device::nes_bmc_60311c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_vram_protect_device(mconfig, NES_BMC_60311C, tag, owner, clock) { } -nes_bmc_ctc12in1_device::nes_bmc_ctc12in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_bmc_ctc12in1_device::nes_bmc_ctc12in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_vram_protect_device(mconfig, type, tag, owner, clock) { } -nes_bmc_ctc12in1_device::nes_bmc_ctc12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_ctc12in1_device::nes_bmc_ctc12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_ctc12in1_device(mconfig, NES_BMC_CTC12IN1, tag, owner, clock) { } -nes_bmc_891227_device::nes_bmc_891227_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_891227_device::nes_bmc_891227_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_ctc12in1_device(mconfig, NES_BMC_891227, tag, owner, clock) { } -nes_bmc_k1029_device::nes_bmc_k1029_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_bmc_k1029_device::nes_bmc_k1029_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_vram_protect_device(mconfig, type, tag, owner, clock) { } -nes_bmc_k1029_device::nes_bmc_k1029_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_k1029_device::nes_bmc_k1029_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_k1029_device(mconfig, NES_BMC_K1029, tag, owner, clock) { } -nes_bmc_fam250_device::nes_bmc_fam250_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_fam250_device::nes_bmc_fam250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_k1029_device(mconfig, NES_BMC_FAM250, tag, owner, clock), m_latch(0), m_reg(0) { } -nes_n625092_device::nes_n625092_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_n625092_device::nes_n625092_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_vram_protect_device(mconfig, NES_N625092, tag, owner, clock) { } -nes_bmc_th22913_device::nes_bmc_th22913_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 vram_prot_bit) +nes_bmc_th22913_device::nes_bmc_th22913_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 vram_prot_bit) : nes_vram_protect_device(mconfig, type, tag, owner, clock), m_vram_prot_bit(vram_prot_bit) { } -nes_bmc_th22913_device::nes_bmc_th22913_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_th22913_device::nes_bmc_th22913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_th22913_device(mconfig, NES_BMC_TH22913, tag, owner, clock, 10) { } -nes_bmc_82ab_device::nes_bmc_82ab_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_82ab_device::nes_bmc_82ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_bmc_th22913_device(mconfig, NES_BMC_82AB, tag, owner, clock, 9) { } diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index e7c401ee3ab..3612691eeb8 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -14,7 +14,7 @@ class nes_action52_device : public nes_nrom_device { public: // construction/destruction - nes_action52_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_action52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -26,7 +26,7 @@ class nes_caltron6in1_device : public nes_nrom_device { public: // construction/destruction - nes_caltron6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_caltron6in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -49,7 +49,7 @@ class nes_caltron9in1_device : public nes_nrom_device { public: // construction/destruction - nes_caltron9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_caltron9in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -70,7 +70,7 @@ class nes_rumblestat_device : public nes_nrom_device { public: // construction/destruction - nes_rumblestat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_rumblestat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, uint8_t data) override; virtual void write_h(offs_t offset, uint8_t data) override; @@ -92,7 +92,7 @@ class nes_svision16_device : public nes_nrom_device { public: // construction/destruction - nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -116,7 +116,7 @@ class nes_farid_unrom_device : public nes_nrom_device { public: // construction/destruction - nes_farid_unrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_farid_unrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -137,7 +137,7 @@ class nes_kn42_device : public nes_nrom_device { public: // construction/destruction - nes_kn42_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_kn42_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -158,7 +158,7 @@ class nes_a65as_device : public nes_nrom_device { public: // construction/destruction - nes_a65as_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_a65as_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -172,7 +172,7 @@ class nes_t262_device : public nes_nrom_device { public: // construction/destruction - nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -193,7 +193,7 @@ class nes_studyngame_device : public nes_nrom_device { public: // construction/destruction - nes_studyngame_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_studyngame_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -205,14 +205,14 @@ class nes_sgun20in1_device : public nes_nrom_device { public: // construction/destruction - nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sgun20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void pcb_reset() override; protected: - nes_sgun20in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_sgun20in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -222,7 +222,7 @@ class nes_bmc_190in1_device : public nes_sgun20in1_device { public: // construction/destruction - nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_190in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -234,7 +234,7 @@ class nes_vt5201_device : public nes_nrom_device { public: // construction/destruction - nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -256,7 +256,7 @@ class nes_bmc_80013b_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_80013b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_80013b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -278,7 +278,7 @@ class nes_bmc_810544c_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_810544c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_810544c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -292,7 +292,7 @@ class nes_bmc_830425c_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_830425c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_830425c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -313,7 +313,7 @@ class nes_bmc_830928c_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_830928c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_830928c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -334,7 +334,7 @@ class nes_bmc_850437c_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_850437c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_850437c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -355,7 +355,7 @@ class nes_bmc_970630c_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_970630c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_970630c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -377,7 +377,7 @@ class nes_ntd03_device : public nes_nrom_device { public: // construction/destruction - nes_ntd03_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ntd03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -389,7 +389,7 @@ class nes_bmc_ctc09_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_ctc09_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_ctc09_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -403,7 +403,7 @@ class nes_bmc_ds927_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_ds927_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_ds927_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -425,7 +425,7 @@ class nes_bmc_gka_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_gka_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_gka_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -447,7 +447,7 @@ class nes_bmc_gkb_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_gkb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_gkb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -459,7 +459,7 @@ class nes_bmc_gkcxin1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_gkcxin1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_gkcxin1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -471,7 +471,7 @@ class nes_bmc_gn91b_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_gn91b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_gn91b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -492,7 +492,7 @@ class nes_bmc_hp898f_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_hp898f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_hp898f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -505,7 +505,7 @@ class nes_bmc_k3036_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_k3036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_k3036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -519,7 +519,7 @@ class nes_bmc_k3046_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_k3046_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_k3046_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -533,7 +533,7 @@ class nes_bmc_k3071_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_k3071_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_k3071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -547,7 +547,7 @@ class nes_bmc_s009_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_s009_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_s009_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -569,7 +569,7 @@ class nes_bmc_sa005a_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_sa005a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_sa005a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -583,7 +583,7 @@ class nes_bmc_tf2740_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_tf2740_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_tf2740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -608,7 +608,7 @@ class nes_bmc_th2348_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_th2348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_th2348_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -630,7 +630,7 @@ class nes_bmc_tj03_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_tj03_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_tj03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -642,7 +642,7 @@ class nes_bmc_ws_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_ws_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_ws_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, uint8_t data) override; @@ -663,7 +663,7 @@ class nes_bmc_11160_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_11160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -675,7 +675,7 @@ class nes_bmc_g146_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_g146_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -687,7 +687,7 @@ class nes_bmc_2751_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_2751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_2751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -702,7 +702,7 @@ class nes_bmc_8157_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_8157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -726,7 +726,7 @@ class nes_bmc_hik300_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_hik300_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_hik300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -741,7 +741,7 @@ class nes_bmc_s700_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -753,7 +753,7 @@ class nes_bmc_ball11_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_ball11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_ball11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -777,7 +777,7 @@ class nes_bmc_22games_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_22games_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -798,7 +798,7 @@ class nes_bmc_64y2k_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_64y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_64y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -822,7 +822,7 @@ class nes_bmc_420y2k_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_420y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_420y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -844,7 +844,7 @@ class nes_bmc_12in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -866,7 +866,7 @@ class nes_bmc_20in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -878,7 +878,7 @@ class nes_bmc_21in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -890,7 +890,7 @@ class nes_bmc_31in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_31in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_31in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -902,7 +902,7 @@ class nes_bmc_35in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_35in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_35in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -916,7 +916,7 @@ class nes_bmc_36in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_36in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_36in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -930,7 +930,7 @@ class nes_bmc_64in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_64in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_64in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -944,7 +944,7 @@ class nes_bmc_70in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_70in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_70in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -953,7 +953,7 @@ public: protected: // construction/destruction - nes_bmc_70in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_bmc_70in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -974,7 +974,7 @@ class nes_bmc_800in1_device : public nes_bmc_70in1_device { public: // construction/destruction - nes_bmc_800in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_800in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void update_banks() override; @@ -987,7 +987,7 @@ class nes_bmc_72in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_72in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_72in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -1010,7 +1010,7 @@ class nes_bmc_76in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -1031,7 +1031,7 @@ class nes_bmc_150in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -1045,7 +1045,7 @@ class nes_bmc_500in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_500in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_500in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -1057,7 +1057,7 @@ class nes_bmc_1200in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_1200in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_1200in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; virtual void chr_w(offs_t offset, uint8_t data) override; @@ -1079,7 +1079,7 @@ class nes_bmc_gold260_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_gold260_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_gold260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -1091,7 +1091,7 @@ class nes_bmc_4in1reset_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; @@ -1110,7 +1110,7 @@ class nes_bmc_42in1reset_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -1118,7 +1118,7 @@ public: protected: // construction/destruction - nes_bmc_42in1reset_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mirror_flip); + nes_bmc_42in1reset_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mirror_flip); // device-level overrides virtual void device_start() override; @@ -1135,7 +1135,7 @@ class nes_bmc_nc20mb_device : public nes_bmc_42in1reset_device { public: // construction/destruction - nes_bmc_nc20mb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_nc20mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -1145,7 +1145,7 @@ class nes_bmc_lc160_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_lc160_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_lc160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -1162,7 +1162,7 @@ public: protected: // construction/destruction - nes_vram_protect_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_vram_protect_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -1177,7 +1177,7 @@ class nes_bmc_60311c_device : public nes_vram_protect_device { public: // construction/destruction - nes_bmc_60311c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_60311c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -1200,7 +1200,7 @@ class nes_bmc_ctc12in1_device : public nes_vram_protect_device { public: // construction/destruction - nes_bmc_ctc12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_ctc12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -1209,7 +1209,7 @@ public: protected: // construction/destruction - nes_bmc_ctc12in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_bmc_ctc12in1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -1224,7 +1224,7 @@ class nes_bmc_891227_device : public nes_bmc_ctc12in1_device { public: // construction/destruction - nes_bmc_891227_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_891227_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -1236,13 +1236,13 @@ class nes_bmc_k1029_device : public nes_vram_protect_device { public: // construction/destruction - nes_bmc_k1029_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_k1029_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; protected: // construction/destruction - nes_bmc_k1029_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_bmc_k1029_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -1252,7 +1252,7 @@ class nes_bmc_fam250_device : public nes_bmc_k1029_device { public: // construction/destruction - nes_bmc_fam250_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_fam250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -1274,7 +1274,7 @@ class nes_n625092_device : public nes_vram_protect_device { public: // construction/destruction - nes_n625092_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_n625092_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -1295,7 +1295,7 @@ class nes_bmc_th22913_device : public nes_vram_protect_device { public: // construction/destruction - nes_bmc_th22913_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_th22913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -1303,7 +1303,7 @@ public: protected: // construction/destruction - nes_bmc_th22913_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 vram_prot_bit); + nes_bmc_th22913_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 vram_prot_bit); private: const u8 m_vram_prot_bit; @@ -1316,7 +1316,7 @@ class nes_bmc_82ab_device : public nes_bmc_th22913_device { public: // construction/destruction - nes_bmc_82ab_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_82ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/nes/namcot.cpp b/src/devices/bus/nes/namcot.cpp index 31f72761751..ac04dfb6b07 100644 --- a/src/devices/bus/nes/namcot.cpp +++ b/src/devices/bus/nes/namcot.cpp @@ -48,42 +48,42 @@ DEFINE_DEVICE_TYPE(NES_NAMCOT175, nes_namcot175_device, "nes_namcot175", "NES DEFINE_DEVICE_TYPE(NES_NAMCOT163, nes_namcot163_device, "nes_namcot163", "NES Cart Namcot 163 PCB") -nes_namcot3433_device::nes_namcot3433_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_namcot3433_device::nes_namcot3433_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0) { } -nes_namcot3433_device::nes_namcot3433_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_namcot3433_device::nes_namcot3433_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NAMCOT3433, tag, owner, clock), m_latch(0) { } -nes_namcot3446_device::nes_namcot3446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_namcot3446_device::nes_namcot3446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NAMCOT3446, tag, owner, clock), m_latch(0) { } -nes_namcot3425_device::nes_namcot3425_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_namcot3425_device::nes_namcot3425_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NAMCOT3425, tag, owner, clock), m_latch(0) { } -nes_namcot340_device::nes_namcot340_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_namcot340_device::nes_namcot340_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_namcot340_device::nes_namcot340_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_namcot340_device::nes_namcot340_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_namcot340_device(mconfig, NES_NAMCOT340, tag, owner, clock) { } -nes_namcot175_device::nes_namcot175_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_namcot175_device::nes_namcot175_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_namcot340_device(mconfig, NES_NAMCOT175, tag, owner, clock), m_wram_protect(0) { } -nes_namcot163_device::nes_namcot163_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_namcot163_device::nes_namcot163_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_namcot340_device(mconfig, NES_NAMCOT163, tag, owner, clock), m_wram_protect(0), m_latch(0), m_chr_bank(0), m_namco163snd(*this, "n163") { } diff --git a/src/devices/bus/nes/namcot.h b/src/devices/bus/nes/namcot.h index 13d30804b8a..2e1872a5cc7 100644 --- a/src/devices/bus/nes/namcot.h +++ b/src/devices/bus/nes/namcot.h @@ -15,7 +15,7 @@ class nes_namcot3433_device : public nes_nrom_device { public: // construction/destruction - nes_namcot3433_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_namcot3433_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void dxrom_write(offs_t offset, uint8_t data); virtual void write_h(offs_t offset, uint8_t data) override { dxrom_write(offset, data); } @@ -23,7 +23,7 @@ public: virtual void pcb_reset() override; protected: - nes_namcot3433_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_namcot3433_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -39,7 +39,7 @@ class nes_namcot3446_device : public nes_nrom_device { public: // construction/destruction - nes_namcot3446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_namcot3446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -60,7 +60,7 @@ class nes_namcot3425_device : public nes_nrom_device { public: // construction/destruction - nes_namcot3425_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_namcot3425_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -82,7 +82,7 @@ class nes_namcot340_device : public nes_nrom_device { public: // construction/destruction - nes_namcot340_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_namcot340_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t n340_loread(offs_t offset); void n340_lowrite(offs_t offset, uint8_t data); @@ -94,7 +94,7 @@ public: virtual void pcb_reset() override; protected: - nes_namcot340_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_namcot340_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -118,7 +118,7 @@ class nes_namcot175_device : public nes_namcot340_device { public: // construction/destruction - nes_namcot175_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_namcot175_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -139,7 +139,7 @@ class nes_namcot163_device : public nes_namcot340_device { public: // construction/destruction - nes_namcot163_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_namcot163_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual uint8_t read_m(offs_t offset) override; diff --git a/src/devices/bus/nes/nanjing.cpp b/src/devices/bus/nes/nanjing.cpp index 6a451b3c59d..71e9149b034 100644 --- a/src/devices/bus/nes/nanjing.cpp +++ b/src/devices/bus/nes/nanjing.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(NES_NANJING, nes_nanjing_device, "nes_nanjing", "NES Cart Nanjing PCB") -nes_nanjing_device::nes_nanjing_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_nanjing_device::nes_nanjing_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NANJING, tag, owner, clock) , m_count(0) , m_latch1(0) diff --git a/src/devices/bus/nes/nanjing.h b/src/devices/bus/nes/nanjing.h index 979fbb1e5ee..df84e5e0767 100644 --- a/src/devices/bus/nes/nanjing.h +++ b/src/devices/bus/nes/nanjing.h @@ -16,7 +16,7 @@ class nes_nanjing_device : public nes_nrom_device { public: // construction/destruction - nes_nanjing_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_nanjing_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~nes_nanjing_device(); virtual uint8_t read_l(offs_t offset) override; diff --git a/src/devices/bus/nes/nes_slot.cpp b/src/devices/bus/nes/nes_slot.cpp index aae391d27c9..aeddae28fd1 100644 --- a/src/devices/bus/nes/nes_slot.cpp +++ b/src/devices/bus/nes/nes_slot.cpp @@ -650,7 +650,7 @@ void device_nes_cart_interface::nes_banks_restore() //------------------------------------------------- // nes_cart_slot_device - constructor //------------------------------------------------- -nes_cart_slot_device::nes_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_cart_slot_device::nes_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_CART_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index b135f957afe..21441fa8a81 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -387,7 +387,7 @@ class nes_cart_slot_device : public device_t, public: // construction/destruction template - nes_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + nes_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : nes_cart_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -395,7 +395,7 @@ public: set_default_option(dflt); set_fixed(false); } - nes_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~nes_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/nes/ntdec.cpp b/src/devices/bus/nes/ntdec.cpp index fd207f20a00..cfe96acc201 100644 --- a/src/devices/bus/nes/ntdec.cpp +++ b/src/devices/bus/nes/ntdec.cpp @@ -40,17 +40,17 @@ DEFINE_DEVICE_TYPE(NES_NTDEC_FH, nes_ntdec_fh_device, "nes_ntdec_fh", DEFINE_DEVICE_TYPE(NES_NTDEC_N715021, nes_ntdec_n715021_device, "nes_ntdec_n715021", "NES Cart NTDEC N715021 PCB") -nes_ntdec_asder_device::nes_ntdec_asder_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ntdec_asder_device::nes_ntdec_asder_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NTDEC_ASDER, tag, owner, clock), m_latch(0), m_chr_outer(0) { } -nes_ntdec_fh_device::nes_ntdec_fh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ntdec_fh_device::nes_ntdec_fh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NTDEC_FH, tag, owner, clock) { } -nes_ntdec_n715021_device::nes_ntdec_n715021_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ntdec_n715021_device::nes_ntdec_n715021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NTDEC_N715021, tag, owner, clock) { } diff --git a/src/devices/bus/nes/ntdec.h b/src/devices/bus/nes/ntdec.h index 160511a388a..1185ce6f832 100644 --- a/src/devices/bus/nes/ntdec.h +++ b/src/devices/bus/nes/ntdec.h @@ -14,7 +14,7 @@ class nes_ntdec_asder_device : public nes_nrom_device { public: // construction/destruction - nes_ntdec_asder_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ntdec_asder_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -35,7 +35,7 @@ class nes_ntdec_fh_device : public nes_nrom_device { public: // construction/destruction - nes_ntdec_fh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ntdec_fh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -49,7 +49,7 @@ class nes_ntdec_n715021_device : public nes_nrom_device { public: // construction/destruction - nes_ntdec_n715021_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ntdec_n715021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/nxrom.cpp b/src/devices/bus/nes/nxrom.cpp index 9f2e35aa0ed..0d02cc10cf2 100644 --- a/src/devices/bus/nes/nxrom.cpp +++ b/src/devices/bus/nes/nxrom.cpp @@ -57,72 +57,72 @@ DEFINE_DEVICE_TYPE(NES_UN1ROM, nes_un1rom_device, "nes_un1rom", "NES Cart DEFINE_DEVICE_TYPE(NES_NOCHR, nes_nochr_device, "nes_nochr", "NES Cart NoCash NOCHR PCB") -nes_nrom_device::nes_nrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_nrom_device::nes_nrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nes_cart_interface(mconfig, *this) { } -nes_nrom_device::nes_nrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_nrom_device::nes_nrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NROM, tag, owner, clock) { } -nes_nrom368_device::nes_nrom368_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_nrom368_device::nes_nrom368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NROM368, tag, owner, clock) { } -nes_fcbasic_device::nes_fcbasic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_fcbasic_device::nes_fcbasic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_FCBASIC, tag, owner, clock) { } -nes_axrom_device::nes_axrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_axrom_device::nes_axrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_AXROM, tag, owner, clock) { } -nes_bxrom_device::nes_bxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bxrom_device::nes_bxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_BXROM, tag, owner, clock) { } -nes_cnrom_device::nes_cnrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_cnrom_device::nes_cnrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_chr_open_bus(0) { } -nes_cnrom_device::nes_cnrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_cnrom_device::nes_cnrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_cnrom_device(mconfig, NES_CNROM, tag, owner, clock) { } -nes_cprom_device::nes_cprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_cprom_device::nes_cprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CPROM, tag, owner, clock) { } -nes_gxrom_device::nes_gxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_gxrom_device::nes_gxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_GXROM, tag, owner, clock) { } -nes_uxrom_device::nes_uxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_uxrom_device::nes_uxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_UXROM, tag, owner, clock) { } -nes_uxrom_cc_device::nes_uxrom_cc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_uxrom_cc_device::nes_uxrom_cc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_UXROM_CC, tag, owner, clock) { } -nes_un1rom_device::nes_un1rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_un1rom_device::nes_un1rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_UN1ROM, tag, owner, clock) { } -nes_nochr_device::nes_nochr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_nochr_device::nes_nochr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_NOCHR, tag, owner, clock) { } diff --git a/src/devices/bus/nes/nxrom.h b/src/devices/bus/nes/nxrom.h index 7dedbdb0cad..b0a62e6cffe 100644 --- a/src/devices/bus/nes/nxrom.h +++ b/src/devices/bus/nes/nxrom.h @@ -14,12 +14,12 @@ class nes_nrom_device : public device_t, public device_nes_cart_interface { public: // construction/destruction - nes_nrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_nrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; protected: - nes_nrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_nrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override { common_start(); } @@ -33,7 +33,7 @@ class nes_nrom368_device : public nes_nrom_device { public: // construction/destruction - nes_nrom368_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_nrom368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual uint8_t read_m(offs_t offset) override; @@ -47,7 +47,7 @@ class nes_fcbasic_device : public nes_nrom_device { public: // construction/destruction - nes_fcbasic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fcbasic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // emulate the additional WRAM }; @@ -59,7 +59,7 @@ class nes_axrom_device : public nes_nrom_device { public: // construction/destruction - nes_axrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_axrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -73,7 +73,7 @@ class nes_bxrom_device : public nes_nrom_device { public: // construction/destruction - nes_bxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -85,7 +85,7 @@ class nes_cnrom_device : public nes_nrom_device { public: // construction/destruction - nes_cnrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_cnrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t chr_r(offs_t offset) override; virtual void write_h(offs_t offset, uint8_t data) override; @@ -93,7 +93,7 @@ public: virtual void pcb_reset() override; protected: - nes_cnrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_cnrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -109,7 +109,7 @@ class nes_cprom_device : public nes_nrom_device { public: // construction/destruction - nes_cprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_cprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -123,7 +123,7 @@ class nes_gxrom_device : public nes_nrom_device { public: // construction/destruction - nes_gxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_gxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -135,7 +135,7 @@ class nes_uxrom_device : public nes_nrom_device { public: // construction/destruction - nes_uxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_uxrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -149,7 +149,7 @@ class nes_uxrom_cc_device : public nes_nrom_device { public: // construction/destruction - nes_uxrom_cc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_uxrom_cc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -161,7 +161,7 @@ class nes_un1rom_device : public nes_nrom_device { public: // construction/destruction - nes_un1rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_un1rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -175,7 +175,7 @@ class nes_nochr_device : public nes_nrom_device { public: // construction/destruction - nes_nochr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_nochr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 chr_r(offs_t offset) override; virtual void chr_w(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/pirate.cpp b/src/devices/bus/nes/pirate.cpp index 81a06c7d655..e8484eac863 100644 --- a/src/devices/bus/nes/pirate.cpp +++ b/src/devices/bus/nes/pirate.cpp @@ -47,62 +47,62 @@ DEFINE_DEVICE_TYPE(NES_43272, nes_43272_device, "nes_43272", " DEFINE_DEVICE_TYPE(NES_EH8813A, nes_eh8813a_device, "nes_eh8813a", "NES Cart UNL-EH8813A PCB") -nes_agci_device::nes_agci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_agci_device::nes_agci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_AGCI_50282, tag, owner, clock) { } -nes_dreamtech_device::nes_dreamtech_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_dreamtech_device::nes_dreamtech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_DREAMTECH01, tag, owner, clock) { } -nes_fukutake_device::nes_fukutake_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_fukutake_device::nes_fukutake_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_FUKUTAKE, tag, owner, clock), m_latch(0) { } -nes_futuremedia_device::nes_futuremedia_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_futuremedia_device::nes_futuremedia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_FUTUREMEDIA, tag, owner, clock), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0) { } -nes_magseries_device::nes_magseries_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_magseries_device::nes_magseries_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_MAGSERIES, tag, owner, clock) { } -nes_daou306_device::nes_daou306_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_daou306_device::nes_daou306_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_DAOU306, tag, owner, clock) { } -nes_cc21_device::nes_cc21_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cc21_device::nes_cc21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CC21, tag, owner, clock) { } -nes_xiaozy_device::nes_xiaozy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_xiaozy_device::nes_xiaozy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_XIAOZY, tag, owner, clock) { } -nes_edu2k_device::nes_edu2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_edu2k_device::nes_edu2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_EDU2K, tag, owner, clock) { } -nes_jy830623c_device::nes_jy830623c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_jy830623c_device::nes_jy830623c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_JY830623C, tag, owner, clock), m_latch(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0) { } -nes_43272_device::nes_43272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_43272_device::nes_43272_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_43272, tag, owner, clock), m_latch(0) { } -nes_eh8813a_device::nes_eh8813a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_eh8813a_device::nes_eh8813a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_EH8813A, tag, owner, clock), m_jumper(0), m_latch(0), m_reg(0) { } diff --git a/src/devices/bus/nes/pirate.h b/src/devices/bus/nes/pirate.h index 9f7be76cc56..b70a8373bc9 100644 --- a/src/devices/bus/nes/pirate.h +++ b/src/devices/bus/nes/pirate.h @@ -14,7 +14,7 @@ class nes_agci_device : public nes_nrom_device { public: // construction/destruction - nes_agci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_agci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -26,7 +26,7 @@ class nes_dreamtech_device : public nes_nrom_device { public: // construction/destruction - nes_dreamtech_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_dreamtech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override; @@ -40,7 +40,7 @@ class nes_fukutake_device : public nes_nrom_device { public: // construction/destruction - nes_fukutake_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fukutake_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual uint8_t read_m(offs_t offset) override; @@ -65,7 +65,7 @@ class nes_futuremedia_device : public nes_nrom_device { public: // construction/destruction - nes_futuremedia_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_futuremedia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -88,7 +88,7 @@ class nes_magseries_device : public nes_nrom_device { public: // construction/destruction - nes_magseries_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_magseries_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -100,7 +100,7 @@ class nes_daou306_device : public nes_nrom_device { public: // construction/destruction - nes_daou306_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_daou306_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -121,7 +121,7 @@ class nes_cc21_device : public nes_nrom_device { public: // construction/destruction - nes_cc21_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cc21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -135,7 +135,7 @@ class nes_xiaozy_device : public nes_nrom_device { public: // construction/destruction - nes_xiaozy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_xiaozy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; @@ -149,7 +149,7 @@ class nes_edu2k_device : public nes_nrom_device { public: // construction/destruction - nes_edu2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_edu2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; @@ -172,7 +172,7 @@ class nes_jy830623c_device : public nes_nrom_device { public: // construction/destruction - nes_jy830623c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_jy830623c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; virtual void write_h(offs_t offset, u8 data) override; @@ -200,7 +200,7 @@ class nes_43272_device : public nes_nrom_device { public: // construction/destruction - nes_43272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_43272_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_h(offs_t offset) override; virtual void write_h(offs_t offset, uint8_t data) override; @@ -222,7 +222,7 @@ class nes_eh8813a_device : public nes_nrom_device { public: // construction/destruction - nes_eh8813a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_eh8813a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -248,7 +248,7 @@ class nes_fujiya_device : public nes_nrom_device { public: // construction/destruction - nes_fujiya_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_fujiya_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/pt554.cpp b/src/devices/bus/nes/pt554.cpp index 024da1655a5..f21471edf88 100644 --- a/src/devices/bus/nes/pt554.cpp +++ b/src/devices/bus/nes/pt554.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(NES_BANDAI_PT554, nes_bandai_pt554_device, "nes_bandai_pt554", "NES Cart Bandai PT-554 PCB") -nes_bandai_pt554_device::nes_bandai_pt554_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bandai_pt554_device::nes_bandai_pt554_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_cnrom_device(mconfig, NES_BANDAI_PT554, tag, owner, clock) , m_samples(*this, "samples") { diff --git a/src/devices/bus/nes/pt554.h b/src/devices/bus/nes/pt554.h index 51c2bdd9af3..44b1b0ce2c2 100644 --- a/src/devices/bus/nes/pt554.h +++ b/src/devices/bus/nes/pt554.h @@ -15,7 +15,7 @@ class nes_bandai_pt554_device : public nes_cnrom_device { public: // construction/destruction - nes_bandai_pt554_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bandai_pt554_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/racermate.cpp b/src/devices/bus/nes/racermate.cpp index 6ebc898721f..5bf55b9d151 100644 --- a/src/devices/bus/nes/racermate.cpp +++ b/src/devices/bus/nes/racermate.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(NES_RACERMATE, nes_racermate_device, "nes_racermate", "NES Cart Racermate PCB") -nes_racermate_device::nes_racermate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_racermate_device::nes_racermate_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_RACERMATE, tag, owner, clock) , m_latch(0) { diff --git a/src/devices/bus/nes/racermate.h b/src/devices/bus/nes/racermate.h index cb74a06a6b0..70d8191406c 100644 --- a/src/devices/bus/nes/racermate.h +++ b/src/devices/bus/nes/racermate.h @@ -12,7 +12,7 @@ class nes_racermate_device : public nes_nrom_device { public: // construction/destruction - nes_racermate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_racermate_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nes/rcm.cpp b/src/devices/bus/nes/rcm.cpp index 4378d65c4df..133d8eb1c34 100644 --- a/src/devices/bus/nes/rcm.cpp +++ b/src/devices/bus/nes/rcm.cpp @@ -42,32 +42,32 @@ DEFINE_DEVICE_TYPE(NES_TF9IN1, nes_tf9_device, "nes_tetrisfam", "NES Cart R DEFINE_DEVICE_TYPE(NES_3DBLOCK, nes_3dblock_device, "nes_3dblock", "NES Cart RCM 3D Block PCB") -nes_gs2015_device::nes_gs2015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_gs2015_device::nes_gs2015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_GS2015, tag, owner, clock) { } -nes_gs2004_device::nes_gs2004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int bank) +nes_gs2004_device::nes_gs2004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int bank) : nes_nrom_device(mconfig, type, tag, owner, clock), m_base(bank * 0x2000) { } -nes_gs2004_device::nes_gs2004_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_gs2004_device::nes_gs2004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_gs2004_device(mconfig, NES_GS2004, tag, owner, clock, 0x20) { } -nes_gs2013_device::nes_gs2013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_gs2013_device::nes_gs2013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_gs2004_device(mconfig, NES_GS2013, tag, owner, clock, 0x1f) { } -nes_tf9_device::nes_tf9_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tf9_device::nes_tf9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_TF9IN1, tag, owner, clock) { } -nes_3dblock_device::nes_3dblock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_3dblock_device::nes_3dblock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_3DBLOCK, tag, owner, clock) { } diff --git a/src/devices/bus/nes/rcm.h b/src/devices/bus/nes/rcm.h index 2f60fafef42..8e9ed96a343 100644 --- a/src/devices/bus/nes/rcm.h +++ b/src/devices/bus/nes/rcm.h @@ -14,7 +14,7 @@ class nes_gs2015_device : public nes_nrom_device { public: // construction/destruction - nes_gs2015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_gs2015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override { return read_m(offset); } virtual uint8_t read_m(offs_t offset) override; @@ -28,14 +28,14 @@ class nes_gs2004_device : public nes_nrom_device { public: // construction/destruction - nes_gs2004_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_gs2004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; protected: // construction/destruction - nes_gs2004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int bank); + nes_gs2004_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int bank); private: const u32 m_base; @@ -48,7 +48,7 @@ class nes_gs2013_device : public nes_gs2004_device { public: // construction/destruction - nes_gs2013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_gs2013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -58,7 +58,7 @@ class nes_tf9_device : public nes_nrom_device { public: // construction/destruction - nes_tf9_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tf9_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -70,7 +70,7 @@ class nes_3dblock_device : public nes_nrom_device { public: // construction/destruction - nes_3dblock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_3dblock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/nes/rexsoft.cpp b/src/devices/bus/nes/rexsoft.cpp index fdab817e515..e9e055a25e4 100644 --- a/src/devices/bus/nes/rexsoft.cpp +++ b/src/devices/bus/nes/rexsoft.cpp @@ -38,12 +38,12 @@ DEFINE_DEVICE_TYPE(NES_REX_DBZ5, nes_rex_dbz5_device, "nes_rex_dbz5", "NES DEFINE_DEVICE_TYPE(NES_REX_SL1632, nes_rex_sl1632_device, "nes_rex_sl1632", "NES Cart Rex Soft SL-1632 PCB") -nes_rex_dbz5_device::nes_rex_dbz5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_rex_dbz5_device::nes_rex_dbz5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_REX_DBZ5, tag, owner, clock), m_extra(0) { } -nes_rex_sl1632_device::nes_rex_sl1632_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_rex_sl1632_device::nes_rex_sl1632_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_REX_SL1632, tag, owner, clock), m_mode(0) { } diff --git a/src/devices/bus/nes/rexsoft.h b/src/devices/bus/nes/rexsoft.h index 205dffce4d1..687bb15ebda 100644 --- a/src/devices/bus/nes/rexsoft.h +++ b/src/devices/bus/nes/rexsoft.h @@ -14,7 +14,7 @@ class nes_rex_dbz5_device : public nes_txrom_device { public: // construction/destruction - nes_rex_dbz5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_rex_dbz5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual uint8_t read_m(offs_t offset) override { return read_l(offset); } @@ -38,7 +38,7 @@ class nes_rex_sl1632_device : public nes_txrom_device { public: // construction/destruction - nes_rex_sl1632_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_rex_sl1632_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void chr_cb(int start, int bank, int source) override; diff --git a/src/devices/bus/nes/sachen.cpp b/src/devices/bus/nes/sachen.cpp index 8e21943f97f..2c1ec1b4199 100644 --- a/src/devices/bus/nes/sachen.cpp +++ b/src/devices/bus/nes/sachen.cpp @@ -60,92 +60,92 @@ DEFINE_DEVICE_TYPE(NES_SACHEN_8259C, nes_sachen_8259c_device, "nes_s82 DEFINE_DEVICE_TYPE(NES_SACHEN_8259D, nes_sachen_8259d_device, "nes_s8259d", "NES Cart Sachen 8259D PCB") -nes_sachen_sa009_device::nes_sachen_sa009_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_sa009_device::nes_sachen_sa009_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_SA009, tag, owner, clock) { } -nes_sachen_sa0036_device::nes_sachen_sa0036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sachen_sa0036_device::nes_sachen_sa0036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_SA0036, tag, owner, clock) { } -nes_sachen_sa0037_device::nes_sachen_sa0037_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_sa0037_device::nes_sachen_sa0037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_SA0037, tag, owner, clock) { } -nes_sachen_sa72007_device::nes_sachen_sa72007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_sa72007_device::nes_sachen_sa72007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_SA72007, tag, owner, clock) { } -nes_sachen_sa72008_device::nes_sachen_sa72008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_sa72008_device::nes_sachen_sa72008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_SA72008, tag, owner, clock) { } -nes_sachen_tca01_device::nes_sachen_tca01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_tca01_device::nes_sachen_tca01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_TCA01, tag, owner, clock) { } -nes_sachen_tcu01_device::nes_sachen_tcu01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_tcu01_device::nes_sachen_tcu01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_TCU01, tag, owner, clock) { } -nes_sachen_tcu02_device::nes_sachen_tcu02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_tcu02_device::nes_sachen_tcu02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_TCU02, tag, owner, clock), m_latch(0) { } -nes_sachen_3013_device::nes_sachen_3013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sachen_3013_device::nes_sachen_3013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_3013, tag, owner, clock) { } -nes_sachen_3014_device::nes_sachen_3014_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sachen_3014_device::nes_sachen_3014_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SACHEN_3014, tag, owner, clock), m_latch(0) { } -nes_sachen_74x374_device::nes_sachen_74x374_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_74x374_device::nes_sachen_74x374_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_mmc_vrom_bank(0) { } -nes_sachen_74x374_device::nes_sachen_74x374_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_74x374_device::nes_sachen_74x374_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sachen_74x374_device(mconfig, NES_SACHEN_74X374, tag, owner, clock) { } -nes_sachen_74x374_alt_device::nes_sachen_74x374_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_74x374_alt_device::nes_sachen_74x374_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sachen_74x374_device(mconfig, NES_SACHEN_74X374_ALT, tag, owner, clock) { } -nes_sachen_8259a_device::nes_sachen_8259a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_8259a_device::nes_sachen_8259a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_sachen_74x374_device(mconfig, type, tag, owner, clock) { } -nes_sachen_8259a_device::nes_sachen_8259a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_8259a_device::nes_sachen_8259a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sachen_8259a_device(mconfig, NES_SACHEN_8259A, tag, owner, clock) { } -nes_sachen_8259b_device::nes_sachen_8259b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_8259b_device::nes_sachen_8259b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sachen_8259a_device(mconfig, NES_SACHEN_8259B, tag, owner, clock) { } -nes_sachen_8259c_device::nes_sachen_8259c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_8259c_device::nes_sachen_8259c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sachen_8259a_device(mconfig, NES_SACHEN_8259C, tag, owner, clock) { } -nes_sachen_8259d_device::nes_sachen_8259d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sachen_8259d_device::nes_sachen_8259d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sachen_8259a_device(mconfig, NES_SACHEN_8259D, tag, owner, clock) { } diff --git a/src/devices/bus/nes/sachen.h b/src/devices/bus/nes/sachen.h index 51d80966380..cb835737b3f 100644 --- a/src/devices/bus/nes/sachen.h +++ b/src/devices/bus/nes/sachen.h @@ -14,7 +14,7 @@ class nes_sachen_sa009_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_sa009_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_sa009_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; }; @@ -26,7 +26,7 @@ class nes_sachen_sa0036_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_sa0036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sachen_sa0036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -38,7 +38,7 @@ class nes_sachen_sa0037_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_sa0037_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sachen_sa0037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; }; @@ -50,7 +50,7 @@ class nes_sachen_sa72007_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_sa72007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_sa72007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; }; @@ -62,7 +62,7 @@ class nes_sachen_sa72008_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_sa72008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_sa72008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; }; @@ -74,7 +74,7 @@ class nes_sachen_tca01_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_tca01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_tca01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; @@ -88,7 +88,7 @@ class nes_sachen_tcu01_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_tcu01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_tcu01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void write_m(offs_t offset, uint8_t data) override { write_l((offset + 0x100) & 0xfff, data); } @@ -102,7 +102,7 @@ class nes_sachen_tcu02_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_tcu02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_tcu02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual void write_l(offs_t offset, uint8_t data) override; @@ -124,7 +124,7 @@ class nes_sachen_3013_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_3013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sachen_3013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; }; @@ -136,7 +136,7 @@ class nes_sachen_3014_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_3014_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sachen_3014_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_h(offs_t offset) override; virtual void write_h(offs_t offset, u8 data) override; @@ -158,7 +158,7 @@ class nes_sachen_74x374_device : public nes_nrom_device { public: // construction/destruction - nes_sachen_74x374_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_74x374_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual void write_l(offs_t offset, uint8_t data) override; @@ -166,7 +166,7 @@ public: virtual void pcb_reset() override; protected: - nes_sachen_74x374_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_74x374_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -182,7 +182,7 @@ class nes_sachen_74x374_alt_device : public nes_sachen_74x374_device { public: // construction/destruction - nes_sachen_74x374_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_74x374_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override { return 0xff; } // no read_l here virtual void write_l(offs_t offset, uint8_t data) override; @@ -195,7 +195,7 @@ class nes_sachen_8259a_device : public nes_sachen_74x374_device { public: // construction/destruction - nes_sachen_8259a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_8259a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void write_m(offs_t offset, uint8_t data) override { write_l((offset + 0x100) & 0xfff, data); } @@ -203,7 +203,7 @@ public: virtual void pcb_reset() override; protected: - nes_sachen_8259a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_8259a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -219,7 +219,7 @@ class nes_sachen_8259b_device : public nes_sachen_8259a_device { public: // construction/destruction - nes_sachen_8259b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_8259b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void chr_update() override; @@ -232,7 +232,7 @@ class nes_sachen_8259c_device : public nes_sachen_8259a_device { public: // construction/destruction - nes_sachen_8259c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_8259c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void chr_update() override; @@ -245,7 +245,7 @@ class nes_sachen_8259d_device : public nes_sachen_8259a_device { public: // construction/destruction - nes_sachen_8259d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sachen_8259d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void pcb_reset() override; diff --git a/src/devices/bus/nes/sealie.cpp b/src/devices/bus/nes/sealie.cpp index 32adda5680c..38f7af9ec3e 100644 --- a/src/devices/bus/nes/sealie.cpp +++ b/src/devices/bus/nes/sealie.cpp @@ -39,27 +39,27 @@ DEFINE_DEVICE_TYPE(NES_DPCMCART, nes_dpcmcart_device, "nes_dpcmcart", "NES Cart DEFINE_DEVICE_TYPE(NES_UNROM512, nes_unrom512_device, "nes_unrom512", "NES Cart Sealie UNROM 512 PCB") -nes_cufrom_device::nes_cufrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cufrom_device::nes_cufrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_CUFROM, tag, owner, clock) { } -nes_dpcmcart_device::nes_dpcmcart_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_dpcmcart_device::nes_dpcmcart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_DPCMCART, tag, owner, clock) { } -nes_unrom512_device::nes_unrom512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_unrom512_device::nes_unrom512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock) { } -nes_unrom512_device::nes_unrom512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_unrom512_device::nes_unrom512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_unrom512_device(mconfig, NES_UNROM512, tag, owner, clock) { } -nes_8bitxmas_device::nes_8bitxmas_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_8bitxmas_device::nes_8bitxmas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_unrom512_device(mconfig, NES_8BITXMAS, tag, owner, clock), m_led(0) { } diff --git a/src/devices/bus/nes/sealie.h b/src/devices/bus/nes/sealie.h index 734d69741c6..7827b9584e5 100644 --- a/src/devices/bus/nes/sealie.h +++ b/src/devices/bus/nes/sealie.h @@ -14,7 +14,7 @@ class nes_cufrom_device : public nes_nrom_device { public: // construction/destruction - nes_cufrom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cufrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -28,7 +28,7 @@ class nes_dpcmcart_device : public nes_nrom_device { public: // construction/destruction - nes_dpcmcart_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_dpcmcart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -42,7 +42,7 @@ class nes_unrom512_device : public nes_nrom_device { public: // construction/destruction - nes_unrom512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_unrom512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -50,7 +50,7 @@ public: protected: // construction/destruction - nes_unrom512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_unrom512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -60,7 +60,7 @@ class nes_8bitxmas_device : public nes_unrom512_device { public: // construction/destruction - nes_8bitxmas_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_8bitxmas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/somari.cpp b/src/devices/bus/nes/somari.cpp index bdf5b21b885..b31be0ca2ae 100644 --- a/src/devices/bus/nes/somari.cpp +++ b/src/devices/bus/nes/somari.cpp @@ -37,17 +37,17 @@ DEFINE_DEVICE_TYPE(NES_SOMARI, nes_somari_device, "nes_somari", "NES Cart Team S DEFINE_DEVICE_TYPE(NES_HUANG2, nes_huang2_device, "nes_huang2", "NES Cart Huang-2 PCB") -nes_somari_device::nes_somari_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mmc1_prg_shift) +nes_somari_device::nes_somari_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mmc1_prg_shift) : nes_txrom_device(mconfig, type, tag, owner, clock), m_board_mode(0), m_mmc1_count(0), m_mmc1_latch(0), m_mmc1_prg_shift(mmc1_prg_shift), m_vrc_mirror(0) { } -nes_somari_device::nes_somari_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_somari_device::nes_somari_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_somari_device(mconfig, NES_SOMARI, tag, owner, clock, 0) { } -nes_huang2_device::nes_huang2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_huang2_device::nes_huang2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_somari_device(mconfig, NES_HUANG2, tag, owner, clock, 1) { } diff --git a/src/devices/bus/nes/somari.h b/src/devices/bus/nes/somari.h index 2c566696242..f5d868aacfc 100644 --- a/src/devices/bus/nes/somari.h +++ b/src/devices/bus/nes/somari.h @@ -14,7 +14,7 @@ class nes_somari_device : public nes_txrom_device { public: // construction/destruction - nes_somari_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_somari_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, u8 data) override { write_m(offset + 0x100, data); } virtual void write_m(offs_t offset, u8 data) override; @@ -24,7 +24,7 @@ public: protected: // construction/destruction - nes_somari_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mmc1_prg_shift); + nes_somari_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mmc1_prg_shift); // device-level overrides virtual void device_start() override; @@ -59,7 +59,7 @@ class nes_huang2_device : public nes_somari_device { public: // construction/destruction - nes_huang2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_huang2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/nes/subor.cpp b/src/devices/bus/nes/subor.cpp index 2c9daf203ee..f04963767df 100644 --- a/src/devices/bus/nes/subor.cpp +++ b/src/devices/bus/nes/subor.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(NES_SUBOR2, nes_subor2_device, "nes_subor2", "NES Cart Subor // nes_subor0_device - constructor //------------------------------------------------- -nes_subor0_device::nes_subor0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_subor0_device::nes_subor0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SUBOR0, tag, owner, clock) { } @@ -49,7 +49,7 @@ nes_subor0_device::nes_subor0_device(const machine_config &mconfig, const char * // nes_subor1_device - constructor //------------------------------------------------- -nes_subor1_device::nes_subor1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_subor1_device::nes_subor1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SUBOR1, tag, owner, clock) { } @@ -58,7 +58,7 @@ nes_subor1_device::nes_subor1_device(const machine_config &mconfig, const char * // nes_subor2_device - constructor //------------------------------------------------- -nes_subor2_device::nes_subor2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_subor2_device::nes_subor2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SUBOR2, tag, owner, clock) , m_switch_reg(0) , m_bank_reg(0) diff --git a/src/devices/bus/nes/subor.h b/src/devices/bus/nes/subor.h index a4ffc13a553..3cbbf9db606 100644 --- a/src/devices/bus/nes/subor.h +++ b/src/devices/bus/nes/subor.h @@ -18,7 +18,7 @@ class nes_subor0_device : { public: // construction/destruction - nes_subor0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_subor0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -39,7 +39,7 @@ class nes_subor1_device : { public: // construction/destruction - nes_subor1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_subor1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -60,7 +60,7 @@ class nes_subor2_device : { public: // construction/destruction - nes_subor2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_subor2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t nt_r(offs_t offset) override; virtual void write_l(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/sunsoft.cpp b/src/devices/bus/nes/sunsoft.cpp index ffe5aec9005..ae84d6f726f 100644 --- a/src/devices/bus/nes/sunsoft.cpp +++ b/src/devices/bus/nes/sunsoft.cpp @@ -49,42 +49,42 @@ DEFINE_DEVICE_TYPE(NES_SUNSOFT_FME7, nes_sunsoft_fme7_device, "nes_fme7", "NES C DEFINE_DEVICE_TYPE(NES_SUNSOFT_5, nes_sunsoft_5_device, "nes_sun5", "NES Cart Sunsoft 5A/5B PCB") -nes_sunsoft_1_device::nes_sunsoft_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sunsoft_1_device::nes_sunsoft_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SUNSOFT_1, tag, owner, clock) { } -nes_sunsoft_2_device::nes_sunsoft_2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sunsoft_2_device::nes_sunsoft_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SUNSOFT_2, tag, owner, clock) { } -nes_sunsoft_3_device::nes_sunsoft_3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sunsoft_3_device::nes_sunsoft_3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_SUNSOFT_3, tag, owner, clock), m_irq_count(0), m_irq_enable(0), m_irq_toggle(0), irq_timer(nullptr) { } -nes_sunsoft_4_device::nes_sunsoft_4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_sunsoft_4_device::nes_sunsoft_4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_wram_enable(0) { } -nes_sunsoft_4_device::nes_sunsoft_4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_sunsoft_4_device::nes_sunsoft_4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sunsoft_4_device(mconfig, NES_SUNSOFT_4, tag, owner, clock) { } -nes_sunsoft_fme7_device::nes_sunsoft_fme7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_sunsoft_fme7_device::nes_sunsoft_fme7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr), m_latch(0), m_wram_bank(0) { } -nes_sunsoft_fme7_device::nes_sunsoft_fme7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sunsoft_fme7_device::nes_sunsoft_fme7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sunsoft_fme7_device(mconfig, NES_SUNSOFT_FME7, tag, owner, clock) { } -nes_sunsoft_5_device::nes_sunsoft_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sunsoft_5_device::nes_sunsoft_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sunsoft_fme7_device(mconfig, NES_SUNSOFT_5, tag, owner, clock) , m_ym2149(*this, "ay") { diff --git a/src/devices/bus/nes/sunsoft.h b/src/devices/bus/nes/sunsoft.h index 000150922c7..d2c4e41a622 100644 --- a/src/devices/bus/nes/sunsoft.h +++ b/src/devices/bus/nes/sunsoft.h @@ -15,7 +15,7 @@ class nes_sunsoft_1_device : public nes_nrom_device { public: // construction/destruction - nes_sunsoft_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sunsoft_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, uint8_t data) override; @@ -29,7 +29,7 @@ class nes_sunsoft_2_device : public nes_nrom_device { public: // construction/destruction - nes_sunsoft_2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sunsoft_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -43,7 +43,7 @@ class nes_sunsoft_3_device : public nes_nrom_device { public: // construction/destruction - nes_sunsoft_3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sunsoft_3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -69,7 +69,7 @@ class nes_sunsoft_4_device : public nes_nrom_device { public: // construction/destruction - nes_sunsoft_4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_sunsoft_4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -79,7 +79,7 @@ public: virtual void pcb_reset() override; protected: - nes_sunsoft_4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_sunsoft_4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -99,7 +99,7 @@ class nes_sunsoft_fme7_device : public nes_nrom_device { public: // construction/destruction - nes_sunsoft_fme7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sunsoft_fme7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual void write_m(offs_t offset, uint8_t data) override; @@ -109,7 +109,7 @@ public: virtual void pcb_reset() override; protected: - nes_sunsoft_fme7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_sunsoft_fme7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -133,7 +133,7 @@ class nes_sunsoft_5_device : public nes_sunsoft_fme7_device { public: // construction/destruction - nes_sunsoft_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sunsoft_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/sunsoft_dcs.cpp b/src/devices/bus/nes/sunsoft_dcs.cpp index 7f291e741ed..2b271d2dd9f 100644 --- a/src/devices/bus/nes/sunsoft_dcs.cpp +++ b/src/devices/bus/nes/sunsoft_dcs.cpp @@ -50,7 +50,7 @@ ntb_cart_interface::~ntb_cart_interface() DEFINE_DEVICE_TYPE(NES_NTB_SLOT, nes_ntb_slot_device, "nes_ntb_slot", "NES NTB Cartridge Slot") -nes_ntb_slot_device::nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_ntb_slot_device::nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_NTB_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) @@ -123,7 +123,7 @@ ROM_END DEFINE_DEVICE_TYPE(NES_NTB_ROM, nes_ntb_rom_device, "nes_ntbrom", "NES NTB ROM") -nes_ntb_rom_device::nes_ntb_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_ntb_rom_device::nes_ntb_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_NTB_ROM, tag, owner, clock) , ntb_cart_interface(mconfig, *this) { @@ -157,7 +157,7 @@ uint8_t *nes_ntb_rom_device::get_cart_base() DEFINE_DEVICE_TYPE(NES_SUNSOFT_DCS, nes_sunsoft_dcs_device, "nes_dcs", "NES Cart Sunsoft DCS PCB") -nes_sunsoft_dcs_device::nes_sunsoft_dcs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_sunsoft_dcs_device::nes_sunsoft_dcs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_sunsoft_4_device(mconfig, NES_SUNSOFT_DCS, tag, owner, clock), m_timer_on(0), m_exrom_enable(0) , m_subslot(*this, "ntb_slot"), ntb_enable_timer(nullptr) { diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h index e9f6594a452..a3f90b4acfc 100644 --- a/src/devices/bus/nes/sunsoft_dcs.h +++ b/src/devices/bus/nes/sunsoft_dcs.h @@ -48,7 +48,7 @@ public: // construction/destruction template nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts) - : nes_ntb_slot_device(mconfig, tag, owner, (uint32_t)0) + : nes_ntb_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -56,7 +56,7 @@ public: set_fixed(false); } - nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~nes_ntb_slot_device(); // image-level overrides @@ -95,7 +95,7 @@ class nes_ntb_rom_device : public device_t, { public: // construction/destruction - nes_ntb_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_ntb_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -125,7 +125,7 @@ class nes_sunsoft_dcs_device : public nes_sunsoft_4_device { public: // construction/destruction - nes_sunsoft_dcs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_sunsoft_dcs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_m(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; diff --git a/src/devices/bus/nes/taito.cpp b/src/devices/bus/nes/taito.cpp index a3689c8f4a7..47b0621f741 100644 --- a/src/devices/bus/nes/taito.cpp +++ b/src/devices/bus/nes/taito.cpp @@ -46,27 +46,27 @@ DEFINE_DEVICE_TYPE(NES_X1_005, nes_x1_005_device, "nes_x1_ DEFINE_DEVICE_TYPE(NES_X1_017, nes_x1_017_device, "nes_x1_017", "NES Cart Taito X1-017 PCB") -nes_tc0190fmc_device::nes_tc0190fmc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_tc0190fmc_device::nes_tc0190fmc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock) { } -nes_tc0190fmc_device::nes_tc0190fmc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tc0190fmc_device::nes_tc0190fmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_tc0190fmc_device(mconfig, NES_TC0190FMC, tag, owner, clock) { } -nes_tc0190fmc_pal16r4_device::nes_tc0190fmc_pal16r4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tc0190fmc_pal16r4_device::nes_tc0190fmc_pal16r4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_tc0190fmc_device(mconfig, NES_TC0190FMC_PAL16R4, tag, owner, clock), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0) { } -nes_x1_005_device::nes_x1_005_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_x1_005_device::nes_x1_005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_X1_005, tag, owner, clock), m_latch(0) { } -nes_x1_017_device::nes_x1_017_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_x1_017_device::nes_x1_017_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_X1_017, tag, owner, clock), m_latch(0), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), irq_timer(nullptr) { } diff --git a/src/devices/bus/nes/taito.h b/src/devices/bus/nes/taito.h index 6f3981aa993..843f662edcf 100644 --- a/src/devices/bus/nes/taito.h +++ b/src/devices/bus/nes/taito.h @@ -14,14 +14,14 @@ class nes_tc0190fmc_device : public nes_nrom_device { public: // construction/destruction - nes_tc0190fmc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tc0190fmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void pcb_reset() override; protected: - nes_tc0190fmc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_tc0190fmc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -31,7 +31,7 @@ class nes_tc0190fmc_pal16r4_device : public nes_tc0190fmc_device { public: // construction/destruction - nes_tc0190fmc_pal16r4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tc0190fmc_pal16r4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -54,7 +54,7 @@ class nes_x1_005_device : public nes_nrom_device { public: // construction/destruction - nes_x1_005_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_x1_005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -78,7 +78,7 @@ class nes_x1_017_device : public nes_nrom_device { public: // construction/destruction - nes_x1_017_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_x1_017_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_ex(offs_t offset) override { return 0; } // no open bus virtual u8 read_l(offs_t offset) override { return 0; } // no open bus diff --git a/src/devices/bus/nes/tengen.cpp b/src/devices/bus/nes/tengen.cpp index 3b74a13f2cd..735dcc52c7a 100644 --- a/src/devices/bus/nes/tengen.cpp +++ b/src/devices/bus/nes/tengen.cpp @@ -39,17 +39,17 @@ DEFINE_DEVICE_TYPE(NES_TENGEN_800032, nes_tengen032_device, "nes_tengen032", "NE DEFINE_DEVICE_TYPE(NES_TENGEN_800037, nes_tengen037_device, "nes_tengen037", "NES Cart Tengen 800037 PCB") -nes_tengen032_device::nes_tengen032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_tengen032_device::nes_tengen032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_irq_count(0), m_irq_count_latch(0), m_irq_mode(0), m_irq_reset(0), m_irq_enable(0), m_irq_pending(0), irq_timer(nullptr) { } -nes_tengen032_device::nes_tengen032_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tengen032_device::nes_tengen032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_tengen032_device(mconfig, NES_TENGEN_800032, tag, owner, clock) { } -nes_tengen037_device::nes_tengen037_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tengen037_device::nes_tengen037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_tengen032_device(mconfig, NES_TENGEN_800037, tag, owner, clock) { } diff --git a/src/devices/bus/nes/tengen.h b/src/devices/bus/nes/tengen.h index d5dbec1e88b..efa07c88332 100644 --- a/src/devices/bus/nes/tengen.h +++ b/src/devices/bus/nes/tengen.h @@ -12,7 +12,7 @@ class nes_tengen032_device : public nes_nrom_device { public: // construction/destruction - nes_tengen032_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tengen032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -20,7 +20,7 @@ public: virtual void pcb_reset() override; protected: - nes_tengen032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_tengen032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class nes_tengen037_device : public nes_tengen032_device { public: // construction/destruction - nes_tengen037_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tengen037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes/txc.cpp b/src/devices/bus/nes/txc.cpp index 398adbd17f3..1d4616b2775 100644 --- a/src/devices/bus/nes/txc.cpp +++ b/src/devices/bus/nes/txc.cpp @@ -44,32 +44,32 @@ DEFINE_DEVICE_TYPE(NES_TXC_STRIKEW, nes_txc_strikew_device, "nes_txc_strike DEFINE_DEVICE_TYPE(NES_TXC_COMMANDOS, nes_txc_commandos_device, "nes_txc_comm", "NES Cart TXC Cart Commandos PCB") // and others -nes_txc_22211_device::nes_txc_22211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_txc_22211_device::nes_txc_22211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, type, tag, owner, clock) { } -nes_txc_22211_device::nes_txc_22211_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_txc_22211_device::nes_txc_22211_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_TXC_22211, tag, owner, clock) { } -nes_txc_dumarc_device::nes_txc_dumarc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_txc_dumarc_device::nes_txc_dumarc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txc_22211_device(mconfig, NES_TXC_DUMARACING, tag, owner, clock) { } -nes_txc_mjblock_device::nes_txc_mjblock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_txc_mjblock_device::nes_txc_mjblock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txc_22211_device(mconfig, NES_TXC_MJBLOCK, tag, owner, clock) { } -nes_txc_strikew_device::nes_txc_strikew_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_txc_strikew_device::nes_txc_strikew_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_TXC_STRIKEW, tag, owner, clock) { } -nes_txc_commandos_device::nes_txc_commandos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_txc_commandos_device::nes_txc_commandos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_TXC_COMMANDOS, tag, owner, clock) { } diff --git a/src/devices/bus/nes/txc.h b/src/devices/bus/nes/txc.h index 4e7f938c1a8..9e546f440dc 100644 --- a/src/devices/bus/nes/txc.h +++ b/src/devices/bus/nes/txc.h @@ -14,7 +14,7 @@ class nes_txc_22211_device : public nes_nrom_device { public: // construction/destruction - nes_txc_22211_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_txc_22211_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual void write_l(offs_t offset, uint8_t data) override; @@ -23,7 +23,7 @@ public: virtual void pcb_reset() override; protected: - nes_txc_22211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_txc_22211_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -38,7 +38,7 @@ class nes_txc_dumarc_device : public nes_txc_22211_device { public: // construction/destruction - nes_txc_dumarc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_txc_dumarc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -50,7 +50,7 @@ class nes_txc_mjblock_device : public nes_txc_22211_device { public: // construction/destruction - nes_txc_mjblock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_txc_mjblock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; }; @@ -62,7 +62,7 @@ class nes_txc_strikew_device : public nes_nrom_device { public: // construction/destruction - nes_txc_strikew_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_txc_strikew_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; @@ -84,7 +84,7 @@ class nes_txc_commandos_device : public nes_nrom_device { public: // construction/destruction - nes_txc_commandos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_txc_commandos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual void write_h(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/vrc_clones.cpp b/src/devices/bus/nes/vrc_clones.cpp index 506857df85f..fa28b0a1b9b 100644 --- a/src/devices/bus/nes/vrc_clones.cpp +++ b/src/devices/bus/nes/vrc_clones.cpp @@ -44,77 +44,77 @@ DEFINE_DEVICE_TYPE(NES_WAIXING_SGZ, nes_waixing_sgz_device, "nes_waixing_sgz", " DEFINE_DEVICE_TYPE(NES_HENGG_SHJY3, nes_hengg_shjy3_device, "nes_hengg_shjy3", "NES Cart Henggedianzi Shen Hua Jian Yun III PCB") -nes_2yudb_device::nes_2yudb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_2yudb_device::nes_2yudb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_2YUDB, tag, owner, clock), m_outer(0) { } -nes_900218_device::nes_900218_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_900218_device::nes_900218_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc2_device(mconfig, NES_900218, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_ax40g_device::nes_ax40g_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ax40g_device::nes_ax40g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc2_device(mconfig, NES_AX40G, tag, owner, clock) { } -nes_ax5705_device::nes_ax5705_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ax5705_device::nes_ax5705_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_AX5705, tag, owner, clock) { } -nes_bmc_830506c_device::nes_bmc_830506c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_830506c_device::nes_bmc_830506c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_BMC_830506C, tag, owner, clock), m_outer(0) { } -nes_bmc_831128c_device::nes_bmc_831128c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_831128c_device::nes_bmc_831128c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_BMC_831128C, tag, owner, clock), m_reg(0) { } -nes_bmc_kl06_device::nes_bmc_kl06_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bmc_kl06_device::nes_bmc_kl06_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_BMC_KL06, tag, owner, clock), m_reg(0) { } -nes_cityfight_device::nes_cityfight_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_cityfight_device::nes_cityfight_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_CITYFIGHT, tag, owner, clock) { } -nes_shuiguan_device::nes_shuiguan_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_shuiguan_device::nes_shuiguan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_SHUIGUAN, tag, owner, clock) { } -nes_t230_device::nes_t230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_t230_device::nes_t230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_T230, tag, owner, clock) { } -nes_tf1201_device::nes_tf1201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_tf1201_device::nes_tf1201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc4_device(mconfig, NES_TF1201, tag, owner, clock) { } -nes_th21311_device::nes_th21311_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_th21311_device::nes_th21311_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_konami_vrc2_device(mconfig, NES_TH21311, tag, owner, clock), m_irq_count(0), m_irq_enable(0), irq_timer(nullptr) { } -nes_waixing_sgz_device::nes_waixing_sgz_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 chr_match) +nes_waixing_sgz_device::nes_waixing_sgz_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 chr_match) : nes_konami_vrc4_device(mconfig, type, tag, owner, clock), m_chr_match(chr_match) { } -nes_waixing_sgz_device::nes_waixing_sgz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_waixing_sgz_device::nes_waixing_sgz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_sgz_device(mconfig, NES_WAIXING_SGZ, tag, owner, clock, 0x06) { } -nes_hengg_shjy3_device::nes_hengg_shjy3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_hengg_shjy3_device::nes_hengg_shjy3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_sgz_device(mconfig, NES_HENGG_SHJY3, tag, owner, clock, 0x04) { } diff --git a/src/devices/bus/nes/vrc_clones.h b/src/devices/bus/nes/vrc_clones.h index c6fe5b55550..c48e35c8216 100644 --- a/src/devices/bus/nes/vrc_clones.h +++ b/src/devices/bus/nes/vrc_clones.h @@ -14,7 +14,7 @@ class nes_2yudb_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_2yudb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_2yudb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -37,7 +37,7 @@ class nes_900218_device : public nes_konami_vrc2_device { public: // construction/destruction - nes_900218_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_900218_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -63,7 +63,7 @@ class nes_ax40g_device : public nes_konami_vrc2_device { public: // construction/destruction - nes_ax40g_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ax40g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -79,7 +79,7 @@ class nes_ax5705_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_ax5705_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ax5705_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -95,7 +95,7 @@ class nes_bmc_830506c_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_bmc_830506c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_830506c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -119,7 +119,7 @@ class nes_bmc_831128c_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_bmc_831128c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_831128c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -142,7 +142,7 @@ class nes_bmc_kl06_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_bmc_kl06_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_kl06_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_m(offs_t offset, u8 data) override; @@ -166,7 +166,7 @@ class nes_cityfight_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_cityfight_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_cityfight_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -182,7 +182,7 @@ class nes_shuiguan_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_shuiguan_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_shuiguan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_m(offs_t offset) override; virtual void write_m(offs_t offset, u8 data) override; @@ -205,7 +205,7 @@ class nes_t230_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_t230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_t230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -221,7 +221,7 @@ class nes_tf1201_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_tf1201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_tf1201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -237,7 +237,7 @@ class nes_th21311_device : public nes_konami_vrc2_device { public: // construction/destruction - nes_th21311_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_th21311_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; @@ -264,14 +264,14 @@ class nes_waixing_sgz_device : public nes_konami_vrc4_device { public: // construction/destruction - nes_waixing_sgz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_waixing_sgz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; virtual void chr_w(offs_t offset, u8 data) override; protected: // construction/destruction - nes_waixing_sgz_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 chr_match); + nes_waixing_sgz_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 chr_match); // device-level overrides virtual void device_start() override; @@ -286,7 +286,7 @@ class nes_hengg_shjy3_device : public nes_waixing_sgz_device { public: // construction/destruction - nes_hengg_shjy3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_hengg_shjy3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/nes/waixing.cpp b/src/devices/bus/nes/waixing.cpp index 1f286c00485..6427b540691 100644 --- a/src/devices/bus/nes/waixing.cpp +++ b/src/devices/bus/nes/waixing.cpp @@ -54,122 +54,122 @@ DEFINE_DEVICE_TYPE(NES_WAIXING_WXZS2, nes_waixing_wxzs2_device, "nes_waixing_wxz DEFINE_DEVICE_TYPE(NES_WAIXING_FS304, nes_waixing_fs304_device, "nes_waixing_fs304", "NES Cart Waixing FS-304 PCB") -nes_waixing_a_device::nes_waixing_a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_a_device::nes_waixing_a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock) { } -nes_waixing_a_device::nes_waixing_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_a_device::nes_waixing_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_A, tag, owner, clock) { } -nes_waixing_a1_device::nes_waixing_a1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_a1_device::nes_waixing_a1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_A1, tag, owner, clock) { } -nes_waixing_b_device::nes_waixing_b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_b_device::nes_waixing_b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_B, tag, owner, clock) { } -nes_waixing_c_device::nes_waixing_c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_c_device::nes_waixing_c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_C, tag, owner, clock) { } -nes_waixing_d_device::nes_waixing_d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_d_device::nes_waixing_d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_D, tag, owner, clock) { } -nes_waixing_e_device::nes_waixing_e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_e_device::nes_waixing_e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_E, tag, owner, clock) { } -nes_waixing_f_device::nes_waixing_f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_waixing_f_device::nes_waixing_f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock) { } -nes_waixing_f_device::nes_waixing_f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_waixing_f_device::nes_waixing_f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_f_device(mconfig, NES_WAIXING_F, tag, owner, clock) { } -nes_waixing_f1_device::nes_waixing_f1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_waixing_f1_device::nes_waixing_f1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_f_device(mconfig, NES_WAIXING_F1, tag, owner, clock) { } -nes_waixing_g_device::nes_waixing_g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_g_device::nes_waixing_g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_G, tag, owner, clock) { } -nes_waixing_h_device::nes_waixing_h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_h_device::nes_waixing_h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, type, tag, owner, clock) { } -nes_waixing_h_device::nes_waixing_h_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_h_device::nes_waixing_h_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_h_device(mconfig, NES_WAIXING_H, tag, owner, clock) { } -nes_waixing_h1_device::nes_waixing_h1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_h1_device::nes_waixing_h1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_h_device(mconfig, NES_WAIXING_H1, tag, owner, clock) { } -nes_waixing_i_device::nes_waixing_i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_i_device::nes_waixing_i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_I, tag, owner, clock) { } -nes_waixing_j_device::nes_waixing_j_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_j_device::nes_waixing_j_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_waixing_a_device(mconfig, NES_WAIXING_J, tag, owner, clock) { } -nes_waixing_sh2_device::nes_waixing_sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_waixing_sh2_device::nes_waixing_sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_WAIXING_SH2, tag, owner, clock) { } -nes_waixing_sec_device::nes_waixing_sec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_sec_device::nes_waixing_sec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_txrom_device(mconfig, NES_WAIXING_SEC, tag, owner, clock), m_reg(0) { } -nes_waixing_sgzlz_device::nes_waixing_sgzlz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_sgzlz_device::nes_waixing_sgzlz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_WAIXING_SGZLZ, tag, owner, clock), m_reg{ 0, 0, 0, 0 } { } -nes_waixing_ffv_device::nes_waixing_ffv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_ffv_device::nes_waixing_ffv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_WAIXING_FFV, tag, owner, clock) { } -nes_waixing_wxzs_device::nes_waixing_wxzs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_wxzs_device::nes_waixing_wxzs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_WAIXING_WXZS, tag, owner, clock) { } -nes_waixing_dq8_device::nes_waixing_dq8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_dq8_device::nes_waixing_dq8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_WAIXING_DQ8, tag, owner, clock) { } -nes_waixing_wxzs2_device::nes_waixing_wxzs2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_wxzs2_device::nes_waixing_wxzs2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_WAIXING_WXZS2, tag, owner, clock) { } -nes_waixing_fs304_device::nes_waixing_fs304_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_waixing_fs304_device::nes_waixing_fs304_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_WAIXING_FS304, tag, owner, clock) { } diff --git a/src/devices/bus/nes/waixing.h b/src/devices/bus/nes/waixing.h index 78a979f4b0b..2f660c8f299 100644 --- a/src/devices/bus/nes/waixing.h +++ b/src/devices/bus/nes/waixing.h @@ -14,7 +14,7 @@ class nes_waixing_a_device : public nes_txrom_device { public: // construction/destruction - nes_waixing_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_l(offs_t offset) override; virtual void write_l(offs_t offset, uint8_t data) override; @@ -25,7 +25,7 @@ public: virtual void pcb_reset() override; protected: - nes_waixing_a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -42,7 +42,7 @@ class nes_waixing_a1_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_a1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_a1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void chr_cb(int start, int bank, int source) override; }; @@ -54,7 +54,7 @@ class nes_waixing_b_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void chr_cb(int start, int bank, int source) override; }; @@ -66,7 +66,7 @@ class nes_waixing_c_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void chr_cb(int start, int bank, int source) override; }; @@ -78,7 +78,7 @@ class nes_waixing_d_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void chr_cb(int start, int bank, int source) override; }; @@ -90,7 +90,7 @@ class nes_waixing_e_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void chr_cb(int start, int bank, int source) override; }; @@ -102,14 +102,14 @@ class nes_waixing_f_device : public nes_txrom_device { public: // construction/destruction - nes_waixing_f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_waixing_f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_l(offs_t offset) override; virtual void write_l(offs_t offset, u8 data) override; protected: // construction/destruction - nes_waixing_f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_waixing_f_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -119,7 +119,7 @@ class nes_waixing_f1_device : public nes_waixing_f_device { public: // construction/destruction - nes_waixing_f1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_waixing_f1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void set_chr(uint8_t chr, int chr_base, int chr_mask) override; @@ -132,7 +132,7 @@ class nes_waixing_g_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; virtual void chr_cb(int start, int bank, int source) override; @@ -150,7 +150,7 @@ class nes_waixing_h_device : public nes_txrom_device { public: // construction/destruction - nes_waixing_h_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_h_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; virtual void chr_cb(int start, int bank, int source) override; @@ -158,7 +158,7 @@ public: // This PCB does not have 1K of internal RAM, so it's not derived from nes_waixing_a_device!! protected: - nes_waixing_h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -168,7 +168,7 @@ class nes_waixing_h1_device : public nes_waixing_h_device { public: // construction/destruction - nes_waixing_h1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_h1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -182,7 +182,7 @@ class nes_waixing_i_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // still to emulate this variant }; @@ -194,7 +194,7 @@ class nes_waixing_j_device : public nes_waixing_a_device { public: // construction/destruction - nes_waixing_j_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_j_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; @@ -215,7 +215,7 @@ class nes_waixing_sh2_device : public nes_txrom_device { public: // construction/destruction - nes_waixing_sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_waixing_sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 chr_r(offs_t offset) override; @@ -238,7 +238,7 @@ class nes_waixing_sec_device : public nes_txrom_device { public: // construction/destruction - nes_waixing_sec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_sec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; virtual void prg_cb(int start, int bank) override; @@ -260,7 +260,7 @@ class nes_waixing_sgzlz_device : public nes_nrom_device { public: // construction/destruction - nes_waixing_sgzlz_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_sgzlz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; @@ -280,7 +280,7 @@ class nes_waixing_ffv_device : public nes_nrom_device { public: // construction/destruction - nes_waixing_ffv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_ffv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; @@ -300,7 +300,7 @@ class nes_waixing_wxzs_device : public nes_nrom_device { public: // construction/destruction - nes_waixing_wxzs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_wxzs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -312,7 +312,7 @@ class nes_waixing_dq8_device : public nes_nrom_device { public: // construction/destruction - nes_waixing_dq8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_dq8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -324,7 +324,7 @@ class nes_waixing_wxzs2_device : public nes_nrom_device { public: // construction/destruction - nes_waixing_wxzs2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_wxzs2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, uint8_t data) override; }; @@ -336,7 +336,7 @@ class nes_waixing_fs304_device : public nes_nrom_device { public: // construction/destruction - nes_waixing_fs304_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_waixing_fs304_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_l(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/nes/zemina.cpp b/src/devices/bus/nes/zemina.cpp index b46da0e7561..7aa684b8cfb 100644 --- a/src/devices/bus/nes/zemina.cpp +++ b/src/devices/bus/nes/zemina.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(NES_ZEMINA, nes_zemina_device, "nes_zemina", "NES Cart Zemina // constructor //------------------------------------------------- -nes_zemina_device::nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_zemina_device::nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_nrom_device(mconfig, NES_ZEMINA, tag, owner, clock) { } diff --git a/src/devices/bus/nes/zemina.h b/src/devices/bus/nes/zemina.h index 992ecdb2c13..6adb9fad091 100644 --- a/src/devices/bus/nes/zemina.h +++ b/src/devices/bus/nes/zemina.h @@ -15,7 +15,7 @@ class nes_zemina_device : public nes_nrom_device { public: // construction/destruction - nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_h(offs_t offset, u8 data) override; diff --git a/src/devices/bus/nes_ctrl/4score.cpp b/src/devices/bus/nes_ctrl/4score.cpp index d786124d1a5..7d401826098 100644 --- a/src/devices/bus/nes_ctrl/4score.cpp +++ b/src/devices/bus/nes_ctrl/4score.cpp @@ -111,21 +111,21 @@ ioport_constructor nes_4score_p2p4_device::device_input_ports() const // nes_4score_device - constructor //------------------------------------------------- -nes_4score_device::nes_4score_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nes_4score_device::nes_4score_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_latch(0) { } -nes_4score_p1p3_device::nes_4score_p1p3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_4score_p1p3_device::nes_4score_p1p3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_4score_device(mconfig, NES_4SCORE_P1P3, tag, owner, clock) , m_joypad1(*this, "PAD1") , m_joypad3(*this, "PAD3") { } -nes_4score_p2p4_device::nes_4score_p2p4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_4score_p2p4_device::nes_4score_p2p4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_4score_device(mconfig, NES_4SCORE_P2P4, tag, owner, clock) , m_joypad2(*this, "PAD2") , m_joypad4(*this, "PAD4") diff --git a/src/devices/bus/nes_ctrl/4score.h b/src/devices/bus/nes_ctrl/4score.h index 64e5cba8002..81e416b77c9 100644 --- a/src/devices/bus/nes_ctrl/4score.h +++ b/src/devices/bus/nes_ctrl/4score.h @@ -28,7 +28,7 @@ public: protected: // construction/destruction - nes_4score_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_4score_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -43,7 +43,7 @@ class nes_4score_p1p3_device : public nes_4score_device { public: // construction/destruction - nes_4score_p1p3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_4score_p1p3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write(uint8_t data) override; @@ -62,7 +62,7 @@ class nes_4score_p2p4_device : public nes_4score_device { public: // construction/destruction - nes_4score_p2p4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_4score_p2p4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write(uint8_t data) override; diff --git a/src/devices/bus/nes_ctrl/arkpaddle.cpp b/src/devices/bus/nes_ctrl/arkpaddle.cpp index cad203bc45e..80e32c93072 100644 --- a/src/devices/bus/nes_ctrl/arkpaddle.cpp +++ b/src/devices/bus/nes_ctrl/arkpaddle.cpp @@ -84,7 +84,7 @@ void nes_vausfc_device::device_add_mconfig(machine_config &config) // nes_vaus_device - constructor //------------------------------------------------- -nes_vaus_device::nes_vaus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_vaus_device::nes_vaus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_paddle(*this, "PADDLE") @@ -93,12 +93,12 @@ nes_vaus_device::nes_vaus_device(const machine_config &mconfig, device_type type { } -nes_vaus_device::nes_vaus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_vaus_device::nes_vaus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_vaus_device(mconfig, NES_ARKPADDLE, tag, owner, clock) { } -nes_vausfc_device::nes_vausfc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_vausfc_device::nes_vausfc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_vaus_device(mconfig, NES_ARKPADDLE_FC, tag, owner, clock) , m_daisychain(*this, "subexp") { diff --git a/src/devices/bus/nes_ctrl/arkpaddle.h b/src/devices/bus/nes_ctrl/arkpaddle.h index 7ac48917adb..71ff66668e7 100644 --- a/src/devices/bus/nes_ctrl/arkpaddle.h +++ b/src/devices/bus/nes_ctrl/arkpaddle.h @@ -25,13 +25,13 @@ class nes_vaus_device : public device_t, public device_nes_control_port_interfac { public: // construction/destruction - nes_vaus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_vaus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit34() override; virtual void write(u8 data) override; protected: - nes_vaus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_vaus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -49,7 +49,7 @@ class nes_vausfc_device : public nes_vaus_device { public: // construction/destruction - nes_vausfc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_vausfc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit34() override { return 0; } virtual u8 read_exp(offs_t offset) override; diff --git a/src/devices/bus/nes_ctrl/bcbattle.cpp b/src/devices/bus/nes_ctrl/bcbattle.cpp index 26973cfc51c..5e2b846877e 100644 --- a/src/devices/bus/nes_ctrl/bcbattle.cpp +++ b/src/devices/bus/nes_ctrl/bcbattle.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(NES_BARCODE_BATTLER, nes_bcbattle_device, "nes_bcbattle", "Ep void nes_bcbattle_device::device_add_mconfig(machine_config &config) { - BARCODE_READER(config, "battler", 0); + BARCODE_READER(config, "battler"); } @@ -75,7 +75,7 @@ TIMER_CALLBACK_MEMBER(nes_bcbattle_device::scan_tick) // nes_bcbattle_device - constructor //------------------------------------------------- -nes_bcbattle_device::nes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bcbattle_device::nes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_BARCODE_BATTLER, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_reader(*this, "battler") diff --git a/src/devices/bus/nes_ctrl/bcbattle.h b/src/devices/bus/nes_ctrl/bcbattle.h index c51f2db64ac..f3d79c4063f 100644 --- a/src/devices/bus/nes_ctrl/bcbattle.h +++ b/src/devices/bus/nes_ctrl/bcbattle.h @@ -26,7 +26,7 @@ class nes_bcbattle_device : public device_t, { public: // construction/destruction - nes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_exp(offs_t offset) override; diff --git a/src/devices/bus/nes_ctrl/ctrl.cpp b/src/devices/bus/nes_ctrl/ctrl.cpp index aaeec552b4e..7aa01cda926 100644 --- a/src/devices/bus/nes_ctrl/ctrl.cpp +++ b/src/devices/bus/nes_ctrl/ctrl.cpp @@ -108,7 +108,7 @@ device_nes_control_port_interface::~device_nes_control_port_interface() // nes_control_port_device - constructor //------------------------------------------------- -nes_control_port_device::nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +nes_control_port_device::nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_CONTROL_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_screen(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/bus/nes_ctrl/ctrl.h b/src/devices/bus/nes_ctrl/ctrl.h index 01777358cda..e424913099b 100644 --- a/src/devices/bus/nes_ctrl/ctrl.h +++ b/src/devices/bus/nes_ctrl/ctrl.h @@ -60,14 +60,14 @@ public: // construction/destruction template nes_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : nes_control_port_device(mconfig, tag, owner, (u32)0) + : nes_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~nes_control_port_device(); u8 read_bit0(); diff --git a/src/devices/bus/nes_ctrl/dorepiano.cpp b/src/devices/bus/nes_ctrl/dorepiano.cpp index 6fd4179d2f0..71391e98515 100644 --- a/src/devices/bus/nes_ctrl/dorepiano.cpp +++ b/src/devices/bus/nes_ctrl/dorepiano.cpp @@ -93,7 +93,7 @@ ioport_constructor nes_dorepiano_device::device_input_ports() const // nes_dorepiano_device - constructor //------------------------------------------------- -nes_dorepiano_device::nes_dorepiano_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_dorepiano_device::nes_dorepiano_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_DOREPIANO, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_port(*this, "PIANO.%u", 0) diff --git a/src/devices/bus/nes_ctrl/dorepiano.h b/src/devices/bus/nes_ctrl/dorepiano.h index 63f6c1eb7af..2a68ed21422 100644 --- a/src/devices/bus/nes_ctrl/dorepiano.h +++ b/src/devices/bus/nes_ctrl/dorepiano.h @@ -26,7 +26,7 @@ class nes_dorepiano_device : { public: // construction/destruction - nes_dorepiano_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_dorepiano_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/fckeybrd.cpp b/src/devices/bus/nes_ctrl/fckeybrd.cpp index 3fd78131bc7..58f312103cd 100644 --- a/src/devices/bus/nes_ctrl/fckeybrd.cpp +++ b/src/devices/bus/nes_ctrl/fckeybrd.cpp @@ -142,7 +142,7 @@ void nes_fckeybrd_device::device_add_mconfig(machine_config &config) // nes_fckeybrd_device - constructor //------------------------------------------------- -nes_fckeybrd_device::nes_fckeybrd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_fckeybrd_device::nes_fckeybrd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_FCKEYBOARD, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_cassette(*this, "tape") diff --git a/src/devices/bus/nes_ctrl/fckeybrd.h b/src/devices/bus/nes_ctrl/fckeybrd.h index 137ff90fc1f..f6d13cee4d8 100644 --- a/src/devices/bus/nes_ctrl/fckeybrd.h +++ b/src/devices/bus/nes_ctrl/fckeybrd.h @@ -26,7 +26,7 @@ class nes_fckeybrd_device : public device_t, { public: // construction/destruction - nes_fckeybrd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_fckeybrd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/fcmat.cpp b/src/devices/bus/nes_ctrl/fcmat.cpp index f40bb9df48a..35669e37cab 100644 --- a/src/devices/bus/nes_ctrl/fcmat.cpp +++ b/src/devices/bus/nes_ctrl/fcmat.cpp @@ -117,7 +117,7 @@ ioport_constructor nes_taptapmat_device::device_input_ports() const // constructor //------------------------------------------------- -nes_fcmat_device::nes_fcmat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_fcmat_device::nes_fcmat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_mat(*this, "MAT_COL.%u", 0) @@ -125,12 +125,12 @@ nes_fcmat_device::nes_fcmat_device(const machine_config &mconfig, device_type ty { } -nes_ftrainer_device::nes_ftrainer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ftrainer_device::nes_ftrainer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fcmat_device(mconfig, NES_FTRAINER, tag, owner, clock) { } -nes_taptapmat_device::nes_taptapmat_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_taptapmat_device::nes_taptapmat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fcmat_device(mconfig, NES_TAPTAPMAT, tag, owner, clock) { } diff --git a/src/devices/bus/nes_ctrl/fcmat.h b/src/devices/bus/nes_ctrl/fcmat.h index 0ed731c9067..d9406aefc90 100644 --- a/src/devices/bus/nes_ctrl/fcmat.h +++ b/src/devices/bus/nes_ctrl/fcmat.h @@ -31,7 +31,7 @@ public: protected: // construction/destruction - nes_fcmat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_fcmat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -48,7 +48,7 @@ class nes_ftrainer_device : public nes_fcmat_device { public: // construction/destruction - nes_ftrainer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ftrainer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -62,7 +62,7 @@ class nes_taptapmat_device : public nes_fcmat_device { public: // construction/destruction - nes_taptapmat_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_taptapmat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/nes_ctrl/hori.cpp b/src/devices/bus/nes_ctrl/hori.cpp index 7b1351af3fd..3ac9c815a30 100644 --- a/src/devices/bus/nes_ctrl/hori.cpp +++ b/src/devices/bus/nes_ctrl/hori.cpp @@ -93,14 +93,14 @@ void nes_hori4p_device::device_add_mconfig(machine_config &config) // nes_horitwin_device - constructor //------------------------------------------------- -nes_horitwin_device::nes_horitwin_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_horitwin_device::nes_horitwin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_HORITWIN, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_subexp(*this, "subexp%u", 0) { } -nes_hori4p_device::nes_hori4p_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_hori4p_device::nes_hori4p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_HORI4P, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_subexp(*this, "subexp%u", 0) diff --git a/src/devices/bus/nes_ctrl/hori.h b/src/devices/bus/nes_ctrl/hori.h index 6146aa90d52..3e08d2c3a6b 100644 --- a/src/devices/bus/nes_ctrl/hori.h +++ b/src/devices/bus/nes_ctrl/hori.h @@ -25,7 +25,7 @@ class nes_horitwin_device : public device_t, { public: // construction/destruction - nes_horitwin_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_horitwin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; @@ -47,7 +47,7 @@ class nes_hori4p_device : public device_t, { public: // construction/destruction - nes_hori4p_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_hori4p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/joypad.cpp b/src/devices/bus/nes_ctrl/joypad.cpp index c4972912d78..dcf52df6601 100644 --- a/src/devices/bus/nes_ctrl/joypad.cpp +++ b/src/devices/bus/nes_ctrl/joypad.cpp @@ -203,7 +203,7 @@ void nes_arcstick_device::device_add_mconfig(machine_config &config) // nes_joypad_device - constructor //------------------------------------------------- -nes_joypad_device::nes_joypad_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 latch_fill) +nes_joypad_device::nes_joypad_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 latch_fill) : device_t(mconfig, type, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_joypad(*this, "JOYPAD") @@ -212,45 +212,45 @@ nes_joypad_device::nes_joypad_device(const machine_config &mconfig, device_type { } -nes_joypad_device::nes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_joypad_device::nes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_joypad_device(mconfig, NES_JOYPAD, tag, owner, clock) { } -nes_fcpadexp_device::nes_fcpadexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 latch_fill) +nes_fcpadexp_device::nes_fcpadexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 latch_fill) : nes_joypad_device(mconfig, type, tag, owner, clock, latch_fill) { } -nes_fcpadexp_device::nes_fcpadexp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_fcpadexp_device::nes_fcpadexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fcpadexp_device(mconfig, NES_FCPAD_EXP, tag, owner, clock) { } -nes_fcpad2_device::nes_fcpad2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_fcpad2_device::nes_fcpad2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_joypad_device(mconfig, NES_FCPAD_P2, tag, owner, clock) , m_mic(*this, "MIC") { } -nes_ccpadl_device::nes_ccpadl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ccpadl_device::nes_ccpadl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_joypad_device(mconfig, NES_CCPAD_LEFT, tag, owner, clock) { } -nes_ccpadr_device::nes_ccpadr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_ccpadr_device::nes_ccpadr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_joypad_device(mconfig, NES_CCPAD_RIGHT, tag, owner, clock) { } -nes_arcstick_device::nes_arcstick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_arcstick_device::nes_arcstick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fcpadexp_device(mconfig, NES_ARCSTICK, tag, owner, clock) , m_daisychain(*this, "subexp") , m_cfg(*this, "CONFIG") { } -nes_vboyctrl_device::nes_vboyctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_vboyctrl_device::nes_vboyctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_joypad_device(mconfig, NES_VBOYCTRL, tag, owner, clock, 0x8000) { } diff --git a/src/devices/bus/nes_ctrl/joypad.h b/src/devices/bus/nes_ctrl/joypad.h index 5e54f26a079..fbead0ff6a6 100644 --- a/src/devices/bus/nes_ctrl/joypad.h +++ b/src/devices/bus/nes_ctrl/joypad.h @@ -26,13 +26,13 @@ class nes_joypad_device : public device_t, { public: // construction/destruction - nes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit0() override; virtual void write(u8 data) override; protected: - nes_joypad_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 latch_fill = 0x80); + nes_joypad_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 latch_fill = 0x80); // device-level overrides virtual void device_start() override; @@ -52,13 +52,13 @@ class nes_fcpadexp_device : public nes_joypad_device { public: // construction/destruction - nes_fcpadexp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_fcpadexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit0() override { return 0; } virtual u8 read_exp(offs_t offset) override; protected: - nes_fcpadexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 latch_fill = 0x80); + nes_fcpadexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 latch_fill = 0x80); }; @@ -68,7 +68,7 @@ class nes_fcpad2_device : public nes_joypad_device { public: // construction/destruction - nes_fcpad2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_fcpad2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit2() override; @@ -87,7 +87,7 @@ class nes_ccpadl_device : public nes_joypad_device { public: // construction/destruction - nes_ccpadl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ccpadl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -101,7 +101,7 @@ class nes_ccpadr_device : public nes_joypad_device { public: // construction/destruction - nes_ccpadr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_ccpadr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -115,7 +115,7 @@ class nes_arcstick_device : public nes_fcpadexp_device { public: // construction/destruction - nes_arcstick_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_arcstick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; @@ -137,7 +137,7 @@ class nes_vboyctrl_device : public nes_joypad_device { public: // construction/destruction - nes_vboyctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_vboyctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/nes_ctrl/konamibag.cpp b/src/devices/bus/nes_ctrl/konamibag.cpp index bef79cfde60..77038bafbfe 100644 --- a/src/devices/bus/nes_ctrl/konamibag.cpp +++ b/src/devices/bus/nes_ctrl/konamibag.cpp @@ -50,7 +50,7 @@ ioport_constructor nes_konamibag_device::device_input_ports() const // nes_konamibag_device - constructor //------------------------------------------------- -nes_konamibag_device::nes_konamibag_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konamibag_device::nes_konamibag_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_KONAMIBAG, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_sensor(*this, "BAG.%u", 0) diff --git a/src/devices/bus/nes_ctrl/konamibag.h b/src/devices/bus/nes_ctrl/konamibag.h index ff98808c058..c5062493ff2 100644 --- a/src/devices/bus/nes_ctrl/konamibag.h +++ b/src/devices/bus/nes_ctrl/konamibag.h @@ -28,7 +28,7 @@ public: static constexpr feature_type imperfect_features() { return feature::CONTROLS; } // construction/destruction - nes_konamibag_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konamibag_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/konamihs.cpp b/src/devices/bus/nes_ctrl/konamihs.cpp index d8d95c9bbd6..7113ab9d0ef 100644 --- a/src/devices/bus/nes_ctrl/konamihs.cpp +++ b/src/devices/bus/nes_ctrl/konamihs.cpp @@ -43,7 +43,7 @@ ioport_constructor nes_konamihs_device::device_input_ports() const // nes_konamihs_device - constructor //------------------------------------------------- -nes_konamihs_device::nes_konamihs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_konamihs_device::nes_konamihs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_KONAMIHS, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_ipt(*this, "P%u", 1) diff --git a/src/devices/bus/nes_ctrl/konamihs.h b/src/devices/bus/nes_ctrl/konamihs.h index 9e8f94b6823..5fe08ce9bec 100644 --- a/src/devices/bus/nes_ctrl/konamihs.h +++ b/src/devices/bus/nes_ctrl/konamihs.h @@ -25,7 +25,7 @@ class nes_konamihs_device : public device_t, { public: // construction/destruction - nes_konamihs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_konamihs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/miracle.cpp b/src/devices/bus/nes_ctrl/miracle.cpp index 4945358c028..839e9d709c5 100644 --- a/src/devices/bus/nes_ctrl/miracle.cpp +++ b/src/devices/bus/nes_ctrl/miracle.cpp @@ -47,7 +47,7 @@ TIMER_CALLBACK_MEMBER(nes_miracle_device::strobe_tick) // nes_miracle_device - constructor //------------------------------------------------- -nes_miracle_device::nes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nes_miracle_device::nes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_MIRACLE, tag, owner, clock), device_serial_interface(mconfig, *this), device_nes_control_port_interface(mconfig, *this), @@ -86,8 +86,8 @@ void nes_miracle_device::device_reset() // set standard MIDI parameters set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(31250); - set_tra_rate(31250); + set_rcv_rate(XTAL::u(31250)); + set_tra_rate(XTAL::u(31250)); m_xmit_read = m_xmit_write = 0; m_recv_read = m_recv_write = 0; diff --git a/src/devices/bus/nes_ctrl/miracle.h b/src/devices/bus/nes_ctrl/miracle.h index f06480d9a43..462ef7afc10 100644 --- a/src/devices/bus/nes_ctrl/miracle.h +++ b/src/devices/bus/nes_ctrl/miracle.h @@ -28,7 +28,7 @@ class nes_miracle_device : public device_t, { public: // construction/destruction - nes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_bit0() override; virtual void write(uint8_t data) override; diff --git a/src/devices/bus/nes_ctrl/mjpanel.cpp b/src/devices/bus/nes_ctrl/mjpanel.cpp index 9624ff95226..c08ef5507c4 100644 --- a/src/devices/bus/nes_ctrl/mjpanel.cpp +++ b/src/devices/bus/nes_ctrl/mjpanel.cpp @@ -77,7 +77,7 @@ ioport_constructor nes_mjpanel_device::device_input_ports() const // nes_mjpanel_device - constructor //------------------------------------------------- -nes_mjpanel_device::nes_mjpanel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_mjpanel_device::nes_mjpanel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_MJPANEL, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_panel(*this, "MJPANEL.%u", 0) diff --git a/src/devices/bus/nes_ctrl/mjpanel.h b/src/devices/bus/nes_ctrl/mjpanel.h index bbe18208426..557368cd313 100644 --- a/src/devices/bus/nes_ctrl/mjpanel.h +++ b/src/devices/bus/nes_ctrl/mjpanel.h @@ -25,7 +25,7 @@ class nes_mjpanel_device : public device_t, { public: // construction/destruction - nes_mjpanel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_mjpanel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/pachinko.cpp b/src/devices/bus/nes_ctrl/pachinko.cpp index e5b7dd5a6ac..f9462578099 100644 --- a/src/devices/bus/nes_ctrl/pachinko.cpp +++ b/src/devices/bus/nes_ctrl/pachinko.cpp @@ -40,7 +40,7 @@ ioport_constructor nes_pachinko_device::device_input_ports() const // nes_pachinko_device - constructor //------------------------------------------------- -nes_pachinko_device::nes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_pachinko_device::nes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_fcpadexp_device(mconfig, NES_PACHINKO, tag, owner, clock, 0) , m_trigger(*this, "TRIGGER") { diff --git a/src/devices/bus/nes_ctrl/pachinko.h b/src/devices/bus/nes_ctrl/pachinko.h index d70503c6fcf..e546de49228 100644 --- a/src/devices/bus/nes_ctrl/pachinko.h +++ b/src/devices/bus/nes_ctrl/pachinko.h @@ -24,7 +24,7 @@ class nes_pachinko_device : public nes_fcpadexp_device { public: // construction/destruction - nes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/nes_ctrl/partytap.cpp b/src/devices/bus/nes_ctrl/partytap.cpp index b06be261e49..63de3ae0d0d 100644 --- a/src/devices/bus/nes_ctrl/partytap.cpp +++ b/src/devices/bus/nes_ctrl/partytap.cpp @@ -44,7 +44,7 @@ ioport_constructor nes_partytap_device::device_input_ports() const // nes_partytap_device - constructor //------------------------------------------------- -nes_partytap_device::nes_partytap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_partytap_device::nes_partytap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_PARTYTAP, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_inputs(*this, "INPUTS") diff --git a/src/devices/bus/nes_ctrl/partytap.h b/src/devices/bus/nes_ctrl/partytap.h index a8531a2b84d..ef03e1feb56 100644 --- a/src/devices/bus/nes_ctrl/partytap.h +++ b/src/devices/bus/nes_ctrl/partytap.h @@ -25,7 +25,7 @@ class nes_partytap_device : public device_t, { public: // construction/destruction - nes_partytap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_partytap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/powerpad.cpp b/src/devices/bus/nes_ctrl/powerpad.cpp index 688e73e3b12..64da7402259 100644 --- a/src/devices/bus/nes_ctrl/powerpad.cpp +++ b/src/devices/bus/nes_ctrl/powerpad.cpp @@ -78,7 +78,7 @@ ioport_constructor nes_powerpad_device::device_input_ports() const // nes_powerpad_device - constructor //------------------------------------------------- -nes_powerpad_device::nes_powerpad_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_powerpad_device::nes_powerpad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_POWERPAD, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_ipt(*this, "POWERPAD.%u", 0) diff --git a/src/devices/bus/nes_ctrl/powerpad.h b/src/devices/bus/nes_ctrl/powerpad.h index a6d76c81192..75099fc0305 100644 --- a/src/devices/bus/nes_ctrl/powerpad.h +++ b/src/devices/bus/nes_ctrl/powerpad.h @@ -25,7 +25,7 @@ class nes_powerpad_device : public device_t, { public: // construction/destruction - nes_powerpad_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_powerpad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit34() override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/rob.cpp b/src/devices/bus/nes_ctrl/rob.cpp index 24747e6a088..11128900a35 100644 --- a/src/devices/bus/nes_ctrl/rob.cpp +++ b/src/devices/bus/nes_ctrl/rob.cpp @@ -51,7 +51,7 @@ ioport_constructor nes_rob_device::device_input_ports() const // constructor //------------------------------------------------- -nes_rob_device::nes_rob_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_rob_device::nes_rob_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_ROB, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -121,7 +121,7 @@ void nes_rob_device::device_add_mconfig(machine_config &config) m_maincpu->write_r<2>().set(FUNC(nes_rob_device::output_w)); m_maincpu->write_r<3>().set(FUNC(nes_rob_device::output_w)); - NES_ZAPPER_SENSOR(config, m_sensor, 0); + NES_ZAPPER_SENSOR(config, m_sensor); if (m_port != nullptr) m_sensor->set_screen_tag(m_port->m_screen); diff --git a/src/devices/bus/nes_ctrl/rob.h b/src/devices/bus/nes_ctrl/rob.h index 05e529f45e2..24cb03939ea 100644 --- a/src/devices/bus/nes_ctrl/rob.h +++ b/src/devices/bus/nes_ctrl/rob.h @@ -27,7 +27,7 @@ class nes_rob_device : public device_t, { public: // construction/destruction - nes_rob_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_rob_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/nes_ctrl/snesadapter.cpp b/src/devices/bus/nes_ctrl/snesadapter.cpp index 8b26824a80d..e7f36497e00 100644 --- a/src/devices/bus/nes_ctrl/snesadapter.cpp +++ b/src/devices/bus/nes_ctrl/snesadapter.cpp @@ -45,7 +45,7 @@ void nes_snesadapter_device::device_add_mconfig(machine_config &config) // nes_snesadapter_device - constructor //------------------------------------------------- -nes_snesadapter_device::nes_snesadapter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_snesadapter_device::nes_snesadapter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_SNESADAPTER, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_snesctrl(*this, "port") diff --git a/src/devices/bus/nes_ctrl/snesadapter.h b/src/devices/bus/nes_ctrl/snesadapter.h index 903581466c7..cf99a3e4885 100644 --- a/src/devices/bus/nes_ctrl/snesadapter.h +++ b/src/devices/bus/nes_ctrl/snesadapter.h @@ -25,7 +25,7 @@ class nes_snesadapter_device : public device_t, public device_nes_control_port_i { public: // construction/destruction - nes_snesadapter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_snesadapter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit0() override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/suborkey.cpp b/src/devices/bus/nes_ctrl/suborkey.cpp index ce752762913..b335b9376e1 100644 --- a/src/devices/bus/nes_ctrl/suborkey.cpp +++ b/src/devices/bus/nes_ctrl/suborkey.cpp @@ -161,7 +161,7 @@ ioport_constructor nes_suborkey_device::device_input_ports() const // nes_suborkey_device - constructor //------------------------------------------------- -nes_suborkey_device::nes_suborkey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_suborkey_device::nes_suborkey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_SUBORKEYBOARD, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_kbd(*this, "SUBOR.%u", 0) diff --git a/src/devices/bus/nes_ctrl/suborkey.h b/src/devices/bus/nes_ctrl/suborkey.h index a72c1dbaca7..20b31023869 100644 --- a/src/devices/bus/nes_ctrl/suborkey.h +++ b/src/devices/bus/nes_ctrl/suborkey.h @@ -25,7 +25,7 @@ class nes_suborkey_device : public device_t, { public: // construction/destruction - nes_suborkey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_suborkey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_exp(offs_t offset) override; virtual void write(uint8_t data) override; diff --git a/src/devices/bus/nes_ctrl/turbofile.cpp b/src/devices/bus/nes_ctrl/turbofile.cpp index 5f4db5c1641..1197b38b0dd 100644 --- a/src/devices/bus/nes_ctrl/turbofile.cpp +++ b/src/devices/bus/nes_ctrl/turbofile.cpp @@ -62,7 +62,7 @@ void nes_turbofile_device::device_add_mconfig(machine_config &config) // nes_turbofile_device - constructor //------------------------------------------------- -nes_turbofile_device::nes_turbofile_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_turbofile_device::nes_turbofile_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_TURBOFILE, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_nvram(*this, "nvram") diff --git a/src/devices/bus/nes_ctrl/turbofile.h b/src/devices/bus/nes_ctrl/turbofile.h index ba8545082d4..d9fda2a2154 100644 --- a/src/devices/bus/nes_ctrl/turbofile.h +++ b/src/devices/bus/nes_ctrl/turbofile.h @@ -26,7 +26,7 @@ class nes_turbofile_device : public device_t, { public: // construction/destruction - nes_turbofile_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_turbofile_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/zapper.cpp b/src/devices/bus/nes_ctrl/zapper.cpp index 5d55b1f2d3f..837ecbe4d43 100644 --- a/src/devices/bus/nes_ctrl/zapper.cpp +++ b/src/devices/bus/nes_ctrl/zapper.cpp @@ -63,7 +63,7 @@ ioport_constructor nes_bandaihs_device::device_input_ports() const void nes_zapper_device::device_add_mconfig(machine_config &config) { - NES_ZAPPER_SENSOR(config, m_sensor, 0); + NES_ZAPPER_SENSOR(config, m_sensor); if (m_port != nullptr) m_sensor->set_screen_tag(m_port->m_screen); } @@ -77,7 +77,7 @@ void nes_zapper_device::device_add_mconfig(machine_config &config) // constructor //------------------------------------------------- -nes_zapper_device::nes_zapper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nes_zapper_device::nes_zapper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nes_control_port_interface(mconfig, *this) , m_sensor(*this, "sensor") @@ -87,12 +87,12 @@ nes_zapper_device::nes_zapper_device(const machine_config &mconfig, device_type { } -nes_zapper_device::nes_zapper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_zapper_device::nes_zapper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_zapper_device(mconfig, NES_ZAPPER, tag, owner, clock) { } -nes_bandaihs_device::nes_bandaihs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_bandaihs_device::nes_bandaihs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nes_zapper_device(mconfig, NES_BANDAIHS, tag, owner, clock) , m_joypad(*this, "JOYPAD") , m_latch(0) diff --git a/src/devices/bus/nes_ctrl/zapper.h b/src/devices/bus/nes_ctrl/zapper.h index d3ca9a298bf..8f3ecedfe59 100644 --- a/src/devices/bus/nes_ctrl/zapper.h +++ b/src/devices/bus/nes_ctrl/zapper.h @@ -27,14 +27,14 @@ class nes_zapper_device : public device_t, { public: // construction/destruction - nes_zapper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_zapper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_bit34() override; virtual u8 read_exp(offs_t offset) override; protected: // construction/destruction - nes_zapper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nes_zapper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -55,7 +55,7 @@ class nes_bandaihs_device : public nes_zapper_device { public: // construction/destruction - nes_bandaihs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bandaihs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read_exp(offs_t offset) override; virtual void write(u8 data) override; diff --git a/src/devices/bus/nes_ctrl/zapper_sensor.cpp b/src/devices/bus/nes_ctrl/zapper_sensor.cpp index 6d0bf53fc6d..1e3054a1aa9 100644 --- a/src/devices/bus/nes_ctrl/zapper_sensor.cpp +++ b/src/devices/bus/nes_ctrl/zapper_sensor.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(NES_ZAPPER_SENSOR, nes_zapper_sensor_device, "nes_zapper_sens // constructor //------------------------------------------------- -nes_zapper_sensor_device::nes_zapper_sensor_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nes_zapper_sensor_device::nes_zapper_sensor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NES_ZAPPER_SENSOR, tag, owner, clock) , m_screen(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/bus/nes_ctrl/zapper_sensor.h b/src/devices/bus/nes_ctrl/zapper_sensor.h index f63a38e6b01..5f795d79473 100644 --- a/src/devices/bus/nes_ctrl/zapper_sensor.h +++ b/src/devices/bus/nes_ctrl/zapper_sensor.h @@ -25,7 +25,7 @@ class nes_zapper_sensor_device : public device_t { public: // construction/destruction - nes_zapper_sensor_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_zapper_sensor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/newbrain/eim.cpp b/src/devices/bus/newbrain/eim.cpp index 7b3685eeea7..823c78998ea 100644 --- a/src/devices/bus/newbrain/eim.cpp +++ b/src/devices/bus/newbrain/eim.cpp @@ -77,7 +77,7 @@ void newbrain_eim_device::device_add_mconfig(machine_config &config) TIMER(config, "z80ctc_c2").configure_periodic(FUNC(newbrain_eim_device::ctc_c2_tick), attotime::from_hz(XTAL(16'000'000)/4/13)); - adc0809_device &adc(ADC0809(config, ADC0809_TAG, 500000)); + adc0809_device &adc(ADC0809(config, ADC0809_TAG, XTAL::u(500000))); adc.eoc_callback().set(FUNC(newbrain_eim_device::adc_eoc_w)); adc.in_callback<0>().set_constant(0); adc.in_callback<1>().set_constant(0); @@ -88,7 +88,7 @@ void newbrain_eim_device::device_add_mconfig(machine_config &config) adc.in_callback<6>().set_constant(0); adc.in_callback<7>().set_constant(0); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->irq_handler().set(FUNC(newbrain_eim_device::acia_interrupt)); RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr); @@ -108,7 +108,7 @@ void newbrain_eim_device::device_add_mconfig(machine_config &config) // newbrain_eim_device - constructor //------------------------------------------------- -newbrain_eim_device::newbrain_eim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +newbrain_eim_device::newbrain_eim_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEWBRAIN_EIM, tag, owner, clock), device_newbrain_expansion_slot_interface(mconfig, *this), m_ctc(*this, Z80CTC_TAG), diff --git a/src/devices/bus/newbrain/eim.h b/src/devices/bus/newbrain/eim.h index 4241fd4b69a..615ab6529bb 100644 --- a/src/devices/bus/newbrain/eim.h +++ b/src/devices/bus/newbrain/eim.h @@ -31,7 +31,7 @@ class newbrain_eim_device : public device_t, public device_newbrain_expansion_s { public: // construction/destruction - newbrain_eim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + newbrain_eim_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t anout_r(); void anout_w(uint8_t data); diff --git a/src/devices/bus/newbrain/exp.cpp b/src/devices/bus/newbrain/exp.cpp index 66f7d9d302a..bb69373ec94 100644 --- a/src/devices/bus/newbrain/exp.cpp +++ b/src/devices/bus/newbrain/exp.cpp @@ -43,7 +43,7 @@ device_newbrain_expansion_slot_interface::device_newbrain_expansion_slot_interfa // newbrain_expansion_slot_device - constructor //------------------------------------------------- -newbrain_expansion_slot_device::newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +newbrain_expansion_slot_device::newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEWBRAIN_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr) diff --git a/src/devices/bus/newbrain/exp.h b/src/devices/bus/newbrain/exp.h index 922ef17213a..861109c9b0b 100644 --- a/src/devices/bus/newbrain/exp.h +++ b/src/devices/bus/newbrain/exp.h @@ -56,7 +56,7 @@ class newbrain_expansion_slot_device : public device_t, public: // construction/destruction template - newbrain_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + newbrain_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : newbrain_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -65,7 +65,7 @@ public: set_fixed(false); } - newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + newbrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // computer interface uint8_t mreq_r(offs_t offset, uint8_t data, bool &romov, int &exrm, bool &raminh); diff --git a/src/devices/bus/newbrain/fdc.cpp b/src/devices/bus/newbrain/fdc.cpp index fa046e0d5a9..490c14de6ed 100644 --- a/src/devices/bus/newbrain/fdc.cpp +++ b/src/devices/bus/newbrain/fdc.cpp @@ -110,7 +110,7 @@ void newbrain_fdc_device::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &newbrain_fdc_device::newbrain_fdc_mem); m_maincpu->set_addrmap(AS_IO, &newbrain_fdc_device::newbrain_fdc_io); - UPD765A(config, m_fdc, 8'000'000, false, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, true); m_fdc->intrq_wr_callback().set(FUNC(newbrain_fdc_device::fdc_int_w)); FLOPPY_CONNECTOR(config, UPD765_TAG ":0", newbrain_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); @@ -130,7 +130,7 @@ void newbrain_fdc_device::device_add_mconfig(machine_config &config) // newbrain_fdc_device - constructor //------------------------------------------------- -newbrain_fdc_device::newbrain_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +newbrain_fdc_device::newbrain_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEWBRAIN_FDC, tag, owner, clock), device_newbrain_expansion_slot_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/newbrain/fdc.h b/src/devices/bus/newbrain/fdc.h index 3ac24faffa6..1a9649efa76 100644 --- a/src/devices/bus/newbrain/fdc.h +++ b/src/devices/bus/newbrain/fdc.h @@ -28,7 +28,7 @@ class newbrain_fdc_device : public device_t, public device_newbrain_expansion_s { public: // construction/destruction - newbrain_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + newbrain_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/nscsi/applecd.cpp b/src/devices/bus/nscsi/applecd.cpp index aec8a154c7a..b75bfe4d329 100644 --- a/src/devices/bus/nscsi/applecd.cpp +++ b/src/devices/bus/nscsi/applecd.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(APPLECD150, applecd150_device, "aplcd150", "AppleCD 150") -applecd150_device::applecd150_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +applecd150_device::applecd150_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLECD150, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "scsic") { diff --git a/src/devices/bus/nscsi/applecd.h b/src/devices/bus/nscsi/applecd.h index 577dfcf5b01..a2b8b6002d5 100644 --- a/src/devices/bus/nscsi/applecd.h +++ b/src/devices/bus/nscsi/applecd.h @@ -11,7 +11,7 @@ class applecd150_device : public device_t, public nscsi_slot_card_interface { public: - applecd150_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + applecd150_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/cd.cpp b/src/devices/bus/nscsi/cd.cpp index db71c61a1e8..b2149bfd885 100644 --- a/src/devices/bus/nscsi/cd.cpp +++ b/src/devices/bus/nscsi/cd.cpp @@ -17,58 +17,58 @@ DEFINE_DEVICE_TYPE(NSCSI_XM5701, nscsi_toshiba_xm5701_device, "nxm5701", "XM-570 DEFINE_DEVICE_TYPE(NSCSI_XM5701SUN, nscsi_toshiba_xm5701_sun_device, "nxm5701sun", "XM-5701B Sun 12x CD-ROM (New)") DEFINE_DEVICE_TYPE(NSCSI_CDROM_APPLE, nscsi_cdrom_apple_device, "scsi_cdrom_apple", "Apple SCSI CD-ROM") -nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_CDROM, tag, owner, "Sony", "CDU-76S", "1.0", 0x00, 0x05) { } -nscsi_cdrom_sgi_device::nscsi_cdrom_sgi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_cdrom_sgi_device::nscsi_cdrom_sgi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_CDROM_SGI, tag, owner, "Sony", "CDU-76S", "1.0", 0x00, 0x05) { } -nscsi_cdrom_news_device::nscsi_cdrom_news_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_cdrom_news_device::nscsi_cdrom_news_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_CDROM_NEWS, tag, owner, "Sony", "CD-ROM CDU-541", "1.0A", 0x00, 0x05) { } -nscsi_dec_rrd45_device::nscsi_dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_dec_rrd45_device::nscsi_dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_RRD45, tag, owner, "DEC ", "RRD45 (C) DEC ", "0436", 0x98, 0x02) { } -nscsi_toshiba_xm3301_device::nscsi_toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_toshiba_xm3301_device::nscsi_toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_XM3301, tag, owner, "TOSHIBA ", "CD-ROM XM-3301TA", "0272", 0x88, 0x02) { } -nscsi_toshiba_xm5301_sun_device::nscsi_toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_toshiba_xm5301_sun_device::nscsi_toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_XM5301SUN, tag, owner, "TOSHIBA ", "XM-5301TASUN4XCD", "2915", 0x98, 0x02) { } -nscsi_toshiba_xm5401_sun_device::nscsi_toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_toshiba_xm5401_sun_device::nscsi_toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_XM5401SUN, tag, owner, "TOSHIBA ", "XM-5401TASUN4XCD", "1036", 0x98, 0x02) { } -nscsi_toshiba_xm5701_device::nscsi_toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_toshiba_xm5701_device::nscsi_toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_XM5701, tag, owner, "TOSHIBA ", "CD-ROM XM-5701TA", "3136", 0x98, 0x02) { } -nscsi_toshiba_xm5701_sun_device::nscsi_toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_toshiba_xm5701_sun_device::nscsi_toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_XM5701SUN, tag, owner, "TOSHIBA ", "XM5701TASUN12XCD", "0997", 0x98, 0x02) { } // drive identifies as an original Apple CDSC (Sony CDU-8001 with custom firmware) -nscsi_cdrom_apple_device::nscsi_cdrom_apple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_cdrom_apple_device::nscsi_cdrom_apple_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_cdrom_device(mconfig, NSCSI_CDROM_APPLE, tag, owner, "Sony", "CD-ROM CDU-8001", "1.0", 0x00, 0x05) { } -nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_full_device(mconfig, type, tag, owner, clock) , cdrom(nullptr) , bytes_per_block(bytes_per_sector) diff --git a/src/devices/bus/nscsi/cd.h b/src/devices/bus/nscsi/cd.h index c1745615474..b48ec459c5d 100644 --- a/src/devices/bus/nscsi/cd.h +++ b/src/devices/bus/nscsi/cd.h @@ -12,15 +12,15 @@ class nscsi_cdrom_device : public nscsi_full_device { public: - nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_block_size(u32 block_size); protected: - nscsi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); nscsi_cdrom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const char *mfr, const char *product, const char *rev, uint8_t inq_data, uint8_t compliance) - : nscsi_cdrom_device(mconfig, type, tag, owner, 0) + : nscsi_cdrom_device(mconfig, type, tag, owner) { strncpy(manufacturer, mfr, 8); strncpy(this->product, product, 16); @@ -61,7 +61,7 @@ private: class nscsi_cdrom_sgi_device : public nscsi_cdrom_device { public: - nscsi_cdrom_sgi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_cdrom_sgi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void scsi_command() override; @@ -77,43 +77,43 @@ public: class nscsi_dec_rrd45_device : public nscsi_cdrom_device { public: - nscsi_dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class nscsi_toshiba_xm3301_device : public nscsi_cdrom_device { public: - nscsi_toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class nscsi_toshiba_xm5301_sun_device : public nscsi_cdrom_device { public: - nscsi_toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class nscsi_toshiba_xm5401_sun_device : public nscsi_cdrom_device { public: - nscsi_toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class nscsi_toshiba_xm5701_device : public nscsi_cdrom_device { public: - nscsi_toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class nscsi_toshiba_xm5701_sun_device : public nscsi_cdrom_device { public: - nscsi_toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class nscsi_cdrom_apple_device : public nscsi_cdrom_device { public: - nscsi_cdrom_apple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_cdrom_apple_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void scsi_command() override; diff --git a/src/devices/bus/nscsi/cdd2000.cpp b/src/devices/bus/nscsi/cdd2000.cpp index 4a2e9c57811..4cb57266e00 100644 --- a/src/devices/bus/nscsi/cdd2000.cpp +++ b/src/devices/bus/nscsi/cdd2000.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(CDD2000, cdd2000_device, "cdd2000", "Philips CDD2000 CD-R") -cdd2000_device::cdd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cdd2000_device::cdd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDD2000, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "scsic") , m_cdcpu(*this, "cdcpu") @@ -34,11 +34,11 @@ void cdd2000_device::mem_map(address_map &map) void cdd2000_device::device_add_mconfig(machine_config &config) { - mc68hc11f1_device &cdcpu(MC68HC11F1(config, m_cdcpu, 8'000'000)); // type and clock guessed + mc68hc11f1_device &cdcpu(MC68HC11F1(config, m_cdcpu, XTAL::u(8'000'000))); // type and clock guessed cdcpu.set_addrmap(AS_PROGRAM, &cdd2000_device::mem_map); cdcpu.set_default_config(0x0b); - NCR53CF94(config, "scsic", 25'000'000); // type and clock guessed + NCR53CF94(config, "scsic", XTAL::u(25'000'000)); // type and clock guessed } ROM_START(cdd2000) diff --git a/src/devices/bus/nscsi/cdd2000.h b/src/devices/bus/nscsi/cdd2000.h index 8f2b6eb6a20..80139a8e550 100644 --- a/src/devices/bus/nscsi/cdd2000.h +++ b/src/devices/bus/nscsi/cdd2000.h @@ -11,7 +11,7 @@ class cdd2000_device : public device_t, public nscsi_slot_card_interface { public: - cdd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cdd2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/cdrn820s.cpp b/src/devices/bus/nscsi/cdrn820s.cpp index 9c74b8a31d4..703432a8e10 100644 --- a/src/devices/bus/nscsi/cdrn820s.cpp +++ b/src/devices/bus/nscsi/cdrn820s.cpp @@ -12,14 +12,14 @@ DEFINE_DEVICE_TYPE(CDRN820S, cdrn820s_device, "cdrn820s", "Caravelle CDR-N820s") -cdrn820s_device::cdrn820s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +cdrn820s_device::cdrn820s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "scsic") , m_h8(*this, "h8") { } -cdrn820s_device::cdrn820s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cdrn820s_device::cdrn820s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdrn820s_device(mconfig, CDRN820S, tag, owner, clock) { } @@ -35,11 +35,11 @@ void cdrn820s_device::mem_map(address_map &map) void cdrn820s_device::device_add_mconfig(machine_config &config) { - H83048(config, m_h8, 8'000'000); // type and clock unknown + H83048(config, m_h8, XTAL::u(8'000'000)); // type and clock unknown m_h8->set_addrmap(AS_PROGRAM, &cdrn820s_device::mem_map); m_h8->set_mode_a20(); - WD33C93A(config, "scsic", 10'000'000); // type and clock unknown + WD33C93A(config, "scsic", XTAL::u(10'000'000)); // type and clock unknown } ROM_START(cdrn820s) diff --git a/src/devices/bus/nscsi/cdrn820s.h b/src/devices/bus/nscsi/cdrn820s.h index c76fb007bbd..178db17f212 100644 --- a/src/devices/bus/nscsi/cdrn820s.h +++ b/src/devices/bus/nscsi/cdrn820s.h @@ -12,12 +12,12 @@ class cdrn820s_device : public device_t, public nscsi_slot_card_interface { public: - cdrn820s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cdrn820s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } protected: - cdrn820s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + cdrn820s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/nscsi/cdu415.cpp b/src/devices/bus/nscsi/cdu415.cpp index a3b733b01d7..65cfb90af4a 100644 --- a/src/devices/bus/nscsi/cdu415.cpp +++ b/src/devices/bus/nscsi/cdu415.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(CDU415, cdu415_device, "cdu415", "Sony CDU415 CD-R") -cdu415_device::cdu415_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cdu415_device::cdu415_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDU415, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "cxd1804ar") , m_mcu(*this, "mcu") @@ -46,11 +46,11 @@ void cdu415_device::io_map(address_map &map) void cdu415_device::device_add_mconfig(machine_config &config) { - H83032(config, m_mcu, 10000000); + H83032(config, m_mcu, XTAL::u(10000000)); m_mcu->set_addrmap(AS_PROGRAM, &cdu415_device::mem_map); m_mcu->set_addrmap(AS_IO, &cdu415_device::io_map); - NCR53C94(config, m_scsi, 25'000'000); // Temporary placeholder + NCR53C94(config, m_scsi, XTAL::u(25'000'000)); // Temporary placeholder } ROM_START(cdu415) diff --git a/src/devices/bus/nscsi/cdu415.h b/src/devices/bus/nscsi/cdu415.h index 2874c69a8cf..8549ef45577 100644 --- a/src/devices/bus/nscsi/cdu415.h +++ b/src/devices/bus/nscsi/cdu415.h @@ -13,7 +13,7 @@ class cdu415_device : public device_t, public nscsi_slot_card_interface { public: - cdu415_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cdu415_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/cdu561.cpp b/src/devices/bus/nscsi/cdu561.cpp index 2382ab23382..f1389cfdda5 100644 --- a/src/devices/bus/nscsi/cdu561.cpp +++ b/src/devices/bus/nscsi/cdu561.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(CDU561_25, cdu561_25_device, "cdu561_25", "Sony CDU561-25") -cdu561_25_device::cdu561_25_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cdu561_25_device::cdu561_25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDU561_25, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "scsic") { diff --git a/src/devices/bus/nscsi/cdu561.h b/src/devices/bus/nscsi/cdu561.h index 1e61ec179c9..bd96d81d7eb 100644 --- a/src/devices/bus/nscsi/cdu561.h +++ b/src/devices/bus/nscsi/cdu561.h @@ -11,7 +11,7 @@ class cdu561_25_device : public device_t, public nscsi_slot_card_interface { public: - cdu561_25_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cdu561_25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/cdu75s.cpp b/src/devices/bus/nscsi/cdu75s.cpp index 40fd92c72fc..05a4015fc12 100644 --- a/src/devices/bus/nscsi/cdu75s.cpp +++ b/src/devices/bus/nscsi/cdu75s.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(CDU75S, cdu75s_device, "cdu75s", "Sony/Apple CDU75S CD-R") -cdu75s_device::cdu75s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cdu75s_device::cdu75s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDU75S, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "fas204") , m_mcu(*this, "mcu") @@ -61,7 +61,7 @@ void cdu75s_device::device_add_mconfig(machine_config &config) m_mcu->set_addrmap(AS_PROGRAM, &cdu75s_device::mem_map); m_mcu->set_addrmap(AS_IO, &cdu75s_device::io_map); - NCR53C94(config, m_scsi, 25'000'000); // FAS204, compatible + NCR53C94(config, m_scsi, XTAL::u(25'000'000)); // FAS204, compatible } ROM_START(cdu75s) diff --git a/src/devices/bus/nscsi/cdu75s.h b/src/devices/bus/nscsi/cdu75s.h index b57550f9033..0ab63028f11 100644 --- a/src/devices/bus/nscsi/cdu75s.h +++ b/src/devices/bus/nscsi/cdu75s.h @@ -13,7 +13,7 @@ class cdu75s_device : public device_t, public nscsi_slot_card_interface { public: - cdu75s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cdu75s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/cfp1080s.cpp b/src/devices/bus/nscsi/cfp1080s.cpp index 8425348d78c..949f78b4867 100644 --- a/src/devices/bus/nscsi/cfp1080s.cpp +++ b/src/devices/bus/nscsi/cfp1080s.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(CFP1080S, cfp1080s_device, "cfp1080s", "Conner CFP1080S") -cfp1080s_device::cfp1080s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cfp1080s_device::cfp1080s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, CFP1080S, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_hdcpu(*this, "hdcpu") @@ -80,7 +80,7 @@ void cfp1080s_device::mem_map(address_map &map) void cfp1080s_device::device_add_mconfig(machine_config &config) { - MC68HC16Z1(config, m_hdcpu, 20'000'000); // exact type and clock unknown + MC68HC16Z1(config, m_hdcpu, XTAL::u(20'000'000)); // exact type and clock unknown m_hdcpu->set_addrmap(AS_PROGRAM, &cfp1080s_device::mem_map); } diff --git a/src/devices/bus/nscsi/cfp1080s.h b/src/devices/bus/nscsi/cfp1080s.h index 8b0ea6d568b..8ee9f31f3f0 100644 --- a/src/devices/bus/nscsi/cfp1080s.h +++ b/src/devices/bus/nscsi/cfp1080s.h @@ -11,7 +11,7 @@ class cfp1080s_device : public nscsi_device, public nscsi_slot_card_interface { public: - cfp1080s_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cfp1080s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/crd254sh.cpp b/src/devices/bus/nscsi/crd254sh.cpp index 80fc5fae740..c06728c1f67 100644 --- a/src/devices/bus/nscsi/crd254sh.cpp +++ b/src/devices/bus/nscsi/crd254sh.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(CRD254SH, crd254sh_device, "crd254sh", "Sanyo CRD-254SH CD-ROM") -crd254sh_device::crd254sh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +crd254sh_device::crd254sh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CRD254SH, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "dummy_scsi") , m_mcu(*this, "mcu") diff --git a/src/devices/bus/nscsi/crd254sh.h b/src/devices/bus/nscsi/crd254sh.h index c1ac2e4123d..1a01595adb8 100644 --- a/src/devices/bus/nscsi/crd254sh.h +++ b/src/devices/bus/nscsi/crd254sh.h @@ -13,7 +13,7 @@ class crd254sh_device : public device_t, public nscsi_slot_card_interface { public: - crd254sh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + crd254sh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/cw7501.cpp b/src/devices/bus/nscsi/cw7501.cpp index c3ff2286f57..5eb085d1658 100644 --- a/src/devices/bus/nscsi/cw7501.cpp +++ b/src/devices/bus/nscsi/cw7501.cpp @@ -13,19 +13,19 @@ DEFINE_DEVICE_TYPE(CW7501, cw7501_device, "cw7501", "Panasonic CW-7501 CD-R") DEFINE_DEVICE_TYPE(CDR4210, cdr4210_device, "cdr4210", "Creative Technology Blaster CD-R 4210") -cw7501_device::cw7501_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +cw7501_device::cw7501_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "scsic") , m_cdcpu(*this, "cdcpu") { } -cw7501_device::cw7501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cw7501_device::cw7501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cw7501_device(mconfig, CW7501, tag, owner, clock) { } -cdr4210_device::cdr4210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cdr4210_device::cdr4210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cw7501_device(mconfig, CDR4210, tag, owner, clock) { } @@ -67,10 +67,10 @@ void cw7501_device::mem_map(address_map &map) void cw7501_device::device_add_mconfig(machine_config &config) { - M37710S4(config, m_cdcpu, 12'500'000); // type and clock are total guesses + M37710S4(config, m_cdcpu, XTAL::u(12'500'000)); // type and clock are total guesses m_cdcpu->set_addrmap(AS_PROGRAM, &cw7501_device::mem_map); - NCR53CF94(config, "scsic", 25'000'000); // type and clock guessed + NCR53CF94(config, "scsic", XTAL::u(25'000'000)); // type and clock guessed } ROM_START(cw7501) diff --git a/src/devices/bus/nscsi/cw7501.h b/src/devices/bus/nscsi/cw7501.h index 0b785c4d3ba..437708f0244 100644 --- a/src/devices/bus/nscsi/cw7501.h +++ b/src/devices/bus/nscsi/cw7501.h @@ -12,12 +12,12 @@ class cw7501_device : public device_t, public nscsi_slot_card_interface { public: - cw7501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cw7501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } protected: - cw7501_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + cw7501_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; @@ -38,7 +38,7 @@ private: class cdr4210_device : public cw7501_device { public: - cdr4210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cdr4210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nscsi/hd.cpp b/src/devices/bus/nscsi/hd.cpp index 7e0f48730a8..4bcf0864a7e 100644 --- a/src/devices/bus/nscsi/hd.cpp +++ b/src/devices/bus/nscsi/hd.cpp @@ -15,12 +15,12 @@ DEFINE_DEVICE_TYPE(NSCSI_HARDDISK, nscsi_harddisk_device, "scsi_harddisk", "SCSI Hard Disk") -nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_harddisk_device(mconfig, NSCSI_HARDDISK, tag, owner, clock) { } -nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nscsi_harddisk_device::nscsi_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_full_device(mconfig, type, tag, owner, clock), image(*this, "image"), harddisk(nullptr), lba(0), cur_lba(0), blocks(0), bytes_per_sector(0) { } diff --git a/src/devices/bus/nscsi/hd.h b/src/devices/bus/nscsi/hd.h index 7ee1f851d26..ac563c647a0 100644 --- a/src/devices/bus/nscsi/hd.h +++ b/src/devices/bus/nscsi/hd.h @@ -11,10 +11,10 @@ class nscsi_harddisk_device : public nscsi_full_device { public: - nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nscsi_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nscsi_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nscsi_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/nscsi/s1410.cpp b/src/devices/bus/nscsi/s1410.cpp index 4667ce04b98..c0812a6db52 100644 --- a/src/devices/bus/nscsi/s1410.cpp +++ b/src/devices/bus/nscsi/s1410.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(NSCSI_S1410, nscsi_s1410_device, "scsi_s1410", "Xebec S1410 5.25 Inch Winchester Disk Controller") -nscsi_s1410_device::nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_s1410_device::nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_harddisk_device(mconfig, NSCSI_S1410, tag, owner, clock) { } diff --git a/src/devices/bus/nscsi/s1410.h b/src/devices/bus/nscsi/s1410.h index bd44a53c830..d9f0263e07e 100644 --- a/src/devices/bus/nscsi/s1410.h +++ b/src/devices/bus/nscsi/s1410.h @@ -11,7 +11,7 @@ class nscsi_s1410_device : public nscsi_harddisk_device { public: - nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nscsi_s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // SCSI status returns diff --git a/src/devices/bus/nscsi/smoc501.cpp b/src/devices/bus/nscsi/smoc501.cpp index 48ede8a888c..c2abb92bbc9 100644 --- a/src/devices/bus/nscsi/smoc501.cpp +++ b/src/devices/bus/nscsi/smoc501.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SMOC501, smoc501_device, "smoc501", "Sony SMO-C501 MO Disk Controller") -smoc501_device::smoc501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +smoc501_device::smoc501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMOC501, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, "scsic") { @@ -73,10 +73,10 @@ ioport_constructor smoc501_device::device_input_ports() const void smoc501_device::device_add_mconfig(machine_config &config) { - v40_device &mpu(V40(config, "mpu", 16'000'000)); // clock is guessed + v40_device &mpu(V40(config, "mpu", XTAL::u(16'000'000))); // clock is guessed mpu.set_addrmap(AS_PROGRAM, &smoc501_device::mem_map); - wd33c93_device &scsic(WD33C93(config, "scsic", 10'000'000)); // clock is guessed + wd33c93_device &scsic(WD33C93(config, "scsic", XTAL::u(10'000'000))); // clock is guessed scsic.irq_cb().set_inputline("mpu", INPUT_LINE_IRQ5); } diff --git a/src/devices/bus/nscsi/smoc501.h b/src/devices/bus/nscsi/smoc501.h index a5a30179f82..76950aea0a1 100644 --- a/src/devices/bus/nscsi/smoc501.h +++ b/src/devices/bus/nscsi/smoc501.h @@ -11,7 +11,7 @@ class smoc501_device : public device_t, public nscsi_slot_card_interface { public: - smoc501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + smoc501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/nubus/bootbug.cpp b/src/devices/bus/nubus/bootbug.cpp index 5c59fff0f3f..d8d28bb14ec 100644 --- a/src/devices/bus/nubus/bootbug.cpp +++ b/src/devices/bus/nubus/bootbug.cpp @@ -78,12 +78,12 @@ const tiny_rom_entry *nubus_bootbug_device::device_rom_region() const // nubus_bootbug_device - constructor //------------------------------------------------- -nubus_bootbug_device::nubus_bootbug_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_bootbug_device::nubus_bootbug_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_bootbug_device(mconfig, NUBUS_BOOTBUG, tag, owner, clock) { } -nubus_bootbug_device::nubus_bootbug_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_bootbug_device::nubus_bootbug_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), m_uart(*this, "uart_0") diff --git a/src/devices/bus/nubus/bootbug.h b/src/devices/bus/nubus/bootbug.h index 735d343eb6c..598e625f922 100644 --- a/src/devices/bus/nubus/bootbug.h +++ b/src/devices/bus/nubus/bootbug.h @@ -20,10 +20,10 @@ class nubus_bootbug_device : { public: // construction/destruction - nubus_bootbug_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_bootbug_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_bootbug_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_bootbug_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_uart; diff --git a/src/devices/bus/nubus/laserview.cpp b/src/devices/bus/nubus/laserview.cpp index 9e9d8ef131b..a61976b3208 100644 --- a/src/devices/bus/nubus/laserview.cpp +++ b/src/devices/bus/nubus/laserview.cpp @@ -64,12 +64,12 @@ const tiny_rom_entry *nubus_laserview_device::device_rom_region() const // nubus_laserview_device - constructor //------------------------------------------------- -nubus_laserview_device::nubus_laserview_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_laserview_device::nubus_laserview_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_laserview_device(mconfig, NUBUS_LASERVIEW, tag, owner, clock) { } -nubus_laserview_device::nubus_laserview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_laserview_device::nubus_laserview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), m_vbl_disable(0) diff --git a/src/devices/bus/nubus/laserview.h b/src/devices/bus/nubus/laserview.h index a2d99227566..aeb04a9f01e 100644 --- a/src/devices/bus/nubus/laserview.h +++ b/src/devices/bus/nubus/laserview.h @@ -19,10 +19,10 @@ class nubus_laserview_device : { public: // construction/destruction - nubus_laserview_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_laserview_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_laserview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_laserview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/nubus.cpp b/src/devices/bus/nubus/nubus.cpp index 8ac4ea719b9..4fbbc80ada6 100644 --- a/src/devices/bus/nubus/nubus.cpp +++ b/src/devices/bus/nubus/nubus.cpp @@ -27,12 +27,12 @@ DEFINE_DEVICE_TYPE(NUBUS_SLOT, nubus_slot_device, "nubus_slot", "NuBus slot") //------------------------------------------------- // nubus_slot_device - constructor //------------------------------------------------- -nubus_slot_device::nubus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_slot_device::nubus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_slot_device(mconfig, NUBUS_SLOT, tag, owner, clock) { } -nubus_slot_device::nubus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_slot_device::nubus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_nubus(*this, finder_base::DUMMY_TAG), @@ -79,12 +79,12 @@ DEFINE_DEVICE_TYPE(NUBUS, nubus_device, "nubus", "NuBus") // nubus_device - constructor //------------------------------------------------- -nubus_device::nubus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_device::nubus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_device(mconfig, NUBUS, tag, owner, clock) { } -nubus_device::nubus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_device::nubus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_space(*this, finder_base::DUMMY_TAG, -1), m_out_irq9_cb(*this), diff --git a/src/devices/bus/nubus/nubus.h b/src/devices/bus/nubus/nubus.h index c99f25b33d6..deb2ccbdeaa 100644 --- a/src/devices/bus/nubus/nubus.h +++ b/src/devices/bus/nubus/nubus.h @@ -70,7 +70,7 @@ public: // construction/destruction template nubus_slot_device(const machine_config &mconfig, T &&tag, device_t *owner, const char *nbtag, U &&opts, const char *dflt) - : nubus_slot_device(mconfig, tag, owner, (uint32_t)0) + : nubus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -78,7 +78,7 @@ public: set_nubus_slot(std::forward(nbtag), tag); } - nubus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template @@ -89,7 +89,7 @@ public: } protected: - nubus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -110,7 +110,7 @@ class nubus_device : public device_t { public: // construction/destruction - nubus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ~nubus_device() { m_device_list.detach_all(); } // inline configuration @@ -138,7 +138,7 @@ public: DECLARE_WRITE_LINE_MEMBER( irqe_w ); protected: - nubus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; diff --git a/src/devices/bus/nubus/nubus_48gc.cpp b/src/devices/bus/nubus/nubus_48gc.cpp index 9237b893150..070350fe451 100644 --- a/src/devices/bus/nubus/nubus_48gc.cpp +++ b/src/devices/bus/nubus/nubus_48gc.cpp @@ -323,7 +323,7 @@ uint32_t jmfb_device::palette_entries() const noexcept // jmfb_device - constructor //------------------------------------------------- -jmfb_device::jmfb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +jmfb_device::jmfb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), device_video_interface(mconfig, *this), @@ -335,12 +335,12 @@ jmfb_device::jmfb_device(const machine_config &mconfig, device_type type, const set_screen(*this, GC48_SCREEN_NAME); } -nubus_48gc_device::nubus_48gc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_48gc_device::nubus_48gc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jmfb_device(mconfig, NUBUS_MDC48, tag, owner, clock) { } -nubus_824gc_device::nubus_824gc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_824gc_device::nubus_824gc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jmfb_device(mconfig, NUBUS_MDC824, tag, owner, clock) { } diff --git a/src/devices/bus/nubus/nubus_asntmc3b.cpp b/src/devices/bus/nubus/nubus_asntmc3b.cpp index 2a45e2f2f3f..34630090bde 100644 --- a/src/devices/bus/nubus/nubus_asntmc3b.cpp +++ b/src/devices/bus/nubus/nubus_asntmc3b.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(NUBUS_APPLEENET, nubus_appleenet_device, "nb_aenet", "Apple N void nubus_mac8390_device::device_add_mconfig(machine_config &config) { - DP8390D(config, m_dp83902, 0); + DP8390D(config, m_dp83902); m_dp83902->irq_callback().set(FUNC(nubus_mac8390_device::dp_irq_w)); m_dp83902->mem_read_callback().set(FUNC(nubus_mac8390_device::dp_mem_read)); m_dp83902->mem_write_callback().set(FUNC(nubus_mac8390_device::dp_mem_write)); @@ -71,19 +71,19 @@ const tiny_rom_entry *nubus_appleenet_device::device_rom_region() const // nubus_mac8390_device - constructor //------------------------------------------------- -nubus_mac8390_device::nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_mac8390_device::nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), m_dp83902(*this, MAC8390_839X) { } -nubus_asntmc3nb_device::nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_asntmc3nb_device::nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_mac8390_device(mconfig, NUBUS_ASNTMC3NB, tag, owner, clock) { } -nubus_appleenet_device::nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_appleenet_device::nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_mac8390_device(mconfig, NUBUS_APPLEENET, tag, owner, clock) { } diff --git a/src/devices/bus/nubus/nubus_asntmc3b.h b/src/devices/bus/nubus/nubus_asntmc3b.h index 20b3cbe0190..04a685ab93a 100644 --- a/src/devices/bus/nubus/nubus_asntmc3b.h +++ b/src/devices/bus/nubus/nubus_asntmc3b.h @@ -20,7 +20,7 @@ class nubus_mac8390_device : { protected: // construction/destruction - nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_mac8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -49,13 +49,13 @@ private: class nubus_asntmc3nb_device : public nubus_mac8390_device { public: - nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_asntmc3nb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class nubus_appleenet_device : public nubus_mac8390_device { public: - nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_appleenet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/devices/bus/nubus/nubus_cb264.cpp b/src/devices/bus/nubus/nubus_cb264.cpp index bc9f436e6bf..139da8cb1fd 100644 --- a/src/devices/bus/nubus/nubus_cb264.cpp +++ b/src/devices/bus/nubus/nubus_cb264.cpp @@ -47,7 +47,7 @@ void nubus_cb264_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, CB264_SCREEN_NAME, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(nubus_cb264_device::screen_update)); - screen.set_raw(25175000, 800, 0, 640, 525, 0, 480); + screen.set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); screen.set_size(1024, 768); screen.set_visarea(0, 640-1, 0, 480-1); } @@ -69,12 +69,12 @@ const tiny_rom_entry *nubus_cb264_device::device_rom_region() const // nubus_cb264_device - constructor //------------------------------------------------- -nubus_cb264_device::nubus_cb264_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_cb264_device::nubus_cb264_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_cb264_device(mconfig, NUBUS_CB264, tag, owner, clock) { } -nubus_cb264_device::nubus_cb264_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_cb264_device::nubus_cb264_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), m_cb264_mode(0), m_cb264_vbl_disable(0), m_cb264_toggle(0), m_count(0), m_clutoffs(0) diff --git a/src/devices/bus/nubus/nubus_cb264.h b/src/devices/bus/nubus/nubus_cb264.h index bb7d0e3ac98..fa6781c30ff 100644 --- a/src/devices/bus/nubus/nubus_cb264.h +++ b/src/devices/bus/nubus/nubus_cb264.h @@ -19,10 +19,10 @@ class nubus_cb264_device : { public: // construction/destruction - nubus_cb264_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_cb264_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_cb264_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_cb264_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/nubus_image.cpp b/src/devices/bus/nubus/nubus_image.cpp index 577411e3ff6..1bd830999d1 100644 --- a/src/devices/bus/nubus/nubus_image.cpp +++ b/src/devices/bus/nubus/nubus_image.cpp @@ -38,7 +38,7 @@ class nubus_image_device::messimg_disk_image_device : public device_t, public de { public: // construction/destruction - messimg_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + messimg_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual bool is_readable() const noexcept override { return true; } @@ -67,7 +67,7 @@ public: // device type definition DEFINE_DEVICE_TYPE(MESSIMG_DISK, nubus_image_device::messimg_disk_image_device, "messimg_disk_image", "Mac image") -nubus_image_device::messimg_disk_image_device::messimg_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_image_device::messimg_disk_image_device::messimg_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MESSIMG_DISK, tag, owner, clock), device_image_interface(mconfig, *this), m_size(0), m_data(nullptr), m_ejected(false) @@ -142,7 +142,7 @@ DEFINE_DEVICE_TYPE(NUBUS_IMAGE, nubus_image_device, "nb_image", "NuBus Disk Imag void nubus_image_device::device_add_mconfig(machine_config &config) { - MESSIMG_DISK(config, IMAGE_DISK0_TAG, 0); + MESSIMG_DISK(config, IMAGE_DISK0_TAG); } //------------------------------------------------- @@ -162,12 +162,12 @@ const tiny_rom_entry *nubus_image_device::device_rom_region() const // nubus_image_device - constructor //------------------------------------------------- -nubus_image_device::nubus_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_image_device::nubus_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_image_device(mconfig, NUBUS_IMAGE, tag, owner, clock) { } -nubus_image_device::nubus_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_image_device::nubus_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), m_image(nullptr) diff --git a/src/devices/bus/nubus/nubus_image.h b/src/devices/bus/nubus/nubus_image.h index ae9257ac0c4..0e70cab520d 100644 --- a/src/devices/bus/nubus/nubus_image.h +++ b/src/devices/bus/nubus/nubus_image.h @@ -22,7 +22,7 @@ public: class messimg_disk_image_device; // construction/destruction - nubus_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum @@ -46,7 +46,7 @@ protected: uint32_t bytecount; }; - nubus_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/nubus_m2hires.cpp b/src/devices/bus/nubus/nubus_m2hires.cpp index 2e8d5cd0657..69504a6d693 100644 --- a/src/devices/bus/nubus/nubus_m2hires.cpp +++ b/src/devices/bus/nubus/nubus_m2hires.cpp @@ -43,7 +43,7 @@ void nubus_m2hires_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, M2HIRES_SCREEN_NAME, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(nubus_m2hires_device::screen_update)); - screen.set_raw(25175000, 800, 0, 640, 525, 0, 480); + screen.set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); screen.set_size(1024, 768); screen.set_visarea(0, 640-1, 0, 480-1); } @@ -65,12 +65,12 @@ const tiny_rom_entry *nubus_m2hires_device::device_rom_region() const // nubus_m2hires_device - constructor //------------------------------------------------- -nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_m2hires_device(mconfig, NUBUS_M2HIRES, tag, owner, clock) { } -nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/nubus_m2hires.h b/src/devices/bus/nubus/nubus_m2hires.h index 91af4aedafd..f5836fd14b7 100644 --- a/src/devices/bus/nubus/nubus_m2hires.h +++ b/src/devices/bus/nubus/nubus_m2hires.h @@ -20,10 +20,10 @@ class nubus_m2hires_device : { public: // construction/destruction - nubus_m2hires_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_m2hires_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_m2hires_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_m2hires_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/nubus_m2video.cpp b/src/devices/bus/nubus/nubus_m2video.cpp index 688acf0ec1f..fa48c6966a5 100644 --- a/src/devices/bus/nubus/nubus_m2video.cpp +++ b/src/devices/bus/nubus/nubus_m2video.cpp @@ -44,7 +44,7 @@ void nubus_m2video_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, M2VIDEO_SCREEN_NAME, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(nubus_m2video_device::screen_update)); - screen.set_raw(25175000, 800, 0, 640, 525, 0, 480); + screen.set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); screen.set_size(1024, 768); screen.set_visarea(0, 640-1, 0, 480-1); } @@ -66,12 +66,12 @@ const tiny_rom_entry *nubus_m2video_device::device_rom_region() const // nubus_m2video_device - constructor //------------------------------------------------- -nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_m2video_device(mconfig, NUBUS_M2VIDEO, tag, owner, clock) { } -nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/nubus_m2video.h b/src/devices/bus/nubus/nubus_m2video.h index 79f0f777eed..e7e6245b90b 100644 --- a/src/devices/bus/nubus/nubus_m2video.h +++ b/src/devices/bus/nubus/nubus_m2video.h @@ -20,10 +20,10 @@ class nubus_m2video_device : { public: // construction/destruction - nubus_m2video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_m2video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_m2video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_m2video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/nubus_radiustpd.cpp b/src/devices/bus/nubus/nubus_radiustpd.cpp index 5bd9cb26475..99c834152d8 100644 --- a/src/devices/bus/nubus/nubus_radiustpd.cpp +++ b/src/devices/bus/nubus/nubus_radiustpd.cpp @@ -63,14 +63,14 @@ const tiny_rom_entry *nubus_radiustpd_device::device_rom_region() const // nubus_radiustpd_device - constructor //------------------------------------------------- -nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_radiustpd_device(mconfig, NUBUS_RADIUSTPD, tag, owner, clock) { (void)m_toggle; (void)&m_colors[0]; } -nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/nubus_radiustpd.h b/src/devices/bus/nubus/nubus_radiustpd.h index 54fbbaa329e..c3d92be0045 100644 --- a/src/devices/bus/nubus/nubus_radiustpd.h +++ b/src/devices/bus/nubus/nubus_radiustpd.h @@ -20,10 +20,10 @@ class nubus_radiustpd_device : { public: // construction/destruction - nubus_radiustpd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_radiustpd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_radiustpd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_radiustpd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/nubus_spec8.cpp b/src/devices/bus/nubus/nubus_spec8.cpp index e85430b0f17..aa10712ded6 100644 --- a/src/devices/bus/nubus/nubus_spec8.cpp +++ b/src/devices/bus/nubus/nubus_spec8.cpp @@ -198,12 +198,12 @@ uint32_t nubus_spec8s3_device::palette_entries() const noexcept // nubus_spec8s3_device - constructor //------------------------------------------------- -nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_spec8s3_device(mconfig, NUBUS_SPEC8S3, tag, owner, clock) { } -nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp index c496fa77d05..f1b865f30ae 100644 --- a/src/devices/bus/nubus/nubus_specpdq.cpp +++ b/src/devices/bus/nubus/nubus_specpdq.cpp @@ -185,12 +185,12 @@ uint32_t nubus_specpdq_device::palette_entries() const noexcept // nubus_specpdq_device - constructor //------------------------------------------------- -nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_specpdq_device(mconfig, NUBUS_SPECPDQ, tag, owner, clock) { } -nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/nubus_vikbw.cpp b/src/devices/bus/nubus/nubus_vikbw.cpp index af61f6dc45f..81a1770ed9f 100644 --- a/src/devices/bus/nubus/nubus_vikbw.cpp +++ b/src/devices/bus/nubus/nubus_vikbw.cpp @@ -62,12 +62,12 @@ const tiny_rom_entry *nubus_vikbw_device::device_rom_region() const // nubus_vikbw_device - constructor //------------------------------------------------- -nubus_vikbw_device::nubus_vikbw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_vikbw_device::nubus_vikbw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_vikbw_device(mconfig, NUBUS_VIKBW, tag, owner, clock) { } -nubus_vikbw_device::nubus_vikbw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_vikbw_device::nubus_vikbw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), m_vbl_disable(0) diff --git a/src/devices/bus/nubus/nubus_vikbw.h b/src/devices/bus/nubus/nubus_vikbw.h index 9cd8a0f295a..a98b31c86bb 100644 --- a/src/devices/bus/nubus/nubus_vikbw.h +++ b/src/devices/bus/nubus/nubus_vikbw.h @@ -19,10 +19,10 @@ class nubus_vikbw_device : { public: // construction/destruction - nubus_vikbw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_vikbw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_vikbw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_vikbw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/nubus_wsportrait.cpp b/src/devices/bus/nubus/nubus_wsportrait.cpp index 41d96442987..bd0eab275bb 100644 --- a/src/devices/bus/nubus/nubus_wsportrait.cpp +++ b/src/devices/bus/nubus/nubus_wsportrait.cpp @@ -68,12 +68,12 @@ const tiny_rom_entry *nubus_wsportrait_device::device_rom_region() const // nubus_wsportrait_device - constructor //------------------------------------------------- -nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_wsportrait_device(mconfig, NUBUS_WSPORTRAIT, tag, owner, clock) { } -nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/nubus_wsportrait.h b/src/devices/bus/nubus/nubus_wsportrait.h index e25292c792d..a5338a8c4c7 100644 --- a/src/devices/bus/nubus/nubus_wsportrait.h +++ b/src/devices/bus/nubus/nubus_wsportrait.h @@ -20,10 +20,10 @@ class nubus_wsportrait_device : { public: // construction/destruction - nubus_wsportrait_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_wsportrait_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_wsportrait_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_wsportrait_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/pds30_30hr.cpp b/src/devices/bus/nubus/pds30_30hr.cpp index 064932d8f5c..185012bfb04 100644 --- a/src/devices/bus/nubus/pds30_30hr.cpp +++ b/src/devices/bus/nubus/pds30_30hr.cpp @@ -43,7 +43,7 @@ void nubus_xceed30hr_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, XCEED30HR_SCREEN_NAME, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(nubus_xceed30hr_device::screen_update)); - screen.set_raw(25175000, 800, 0, 640, 525, 0, 480); + screen.set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); screen.set_size(1024, 768); screen.set_visarea(0, 640-1, 0, 480-1); } @@ -65,12 +65,12 @@ const tiny_rom_entry *nubus_xceed30hr_device::device_rom_region() const // nubus_xceed30hr_device - constructor //------------------------------------------------- -nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_xceed30hr_device(mconfig, PDS030_XCEED30HR, tag, owner, clock) { } -nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/pds30_30hr.h b/src/devices/bus/nubus/pds30_30hr.h index 6114a5dcfa8..de041355221 100644 --- a/src/devices/bus/nubus/pds30_30hr.h +++ b/src/devices/bus/nubus/pds30_30hr.h @@ -20,10 +20,10 @@ class nubus_xceed30hr_device : { public: // construction/destruction - nubus_xceed30hr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_xceed30hr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_xceed30hr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_xceed30hr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/pds30_cb264.cpp b/src/devices/bus/nubus/pds30_cb264.cpp index c485772c843..b9c47bd16f6 100644 --- a/src/devices/bus/nubus/pds30_cb264.cpp +++ b/src/devices/bus/nubus/pds30_cb264.cpp @@ -39,7 +39,7 @@ void nubus_cb264se30_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, CB264SE30_SCREEN_NAME, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(nubus_cb264se30_device::screen_update)); - screen.set_raw(25175000, 800, 0, 640, 525, 0, 480); + screen.set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); screen.set_size(1024, 768); screen.set_visarea(0, 640-1, 0, 480-1); } @@ -61,13 +61,13 @@ const tiny_rom_entry *nubus_cb264se30_device::device_rom_region() const // nubus_cb264se30_device - constructor //------------------------------------------------- -nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_cb264se30_device(mconfig, PDS030_CB264SE30, tag, owner, clock) { (void)m_toggle; } -nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/pds30_cb264.h b/src/devices/bus/nubus/pds30_cb264.h index b991dc44d1f..a0ac713121f 100644 --- a/src/devices/bus/nubus/pds30_cb264.h +++ b/src/devices/bus/nubus/pds30_cb264.h @@ -20,10 +20,10 @@ class nubus_cb264se30_device : { public: // construction/destruction - nubus_cb264se30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_cb264se30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_cb264se30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_cb264se30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/pds30_mc30.cpp b/src/devices/bus/nubus/pds30_mc30.cpp index 2363f23517d..271694d4c4d 100644 --- a/src/devices/bus/nubus/pds30_mc30.cpp +++ b/src/devices/bus/nubus/pds30_mc30.cpp @@ -42,7 +42,7 @@ void nubus_xceedmc30_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, XCEEDMC30_SCREEN_NAME, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(nubus_xceedmc30_device::screen_update)); - screen.set_raw(25175000, 800, 0, 640, 525, 0, 480); + screen.set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); screen.set_size(1024, 768); screen.set_visarea(0, 640-1, 0, 480-1); } @@ -64,12 +64,12 @@ const tiny_rom_entry *nubus_xceedmc30_device::device_rom_region() const // nubus_xceedmc30_device - constructor //------------------------------------------------- -nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_xceedmc30_device(mconfig, PDS030_XCEEDMC30, tag, owner, clock) { } -nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/pds30_mc30.h b/src/devices/bus/nubus/pds30_mc30.h index 33cdabed6dc..93d72e6e9c1 100644 --- a/src/devices/bus/nubus/pds30_mc30.h +++ b/src/devices/bus/nubus/pds30_mc30.h @@ -20,10 +20,10 @@ class nubus_xceedmc30_device : { public: // construction/destruction - nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_xceedmc30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_xceedmc30_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/pds30_procolor816.cpp b/src/devices/bus/nubus/pds30_procolor816.cpp index e58f55ac07d..5251b83daab 100644 --- a/src/devices/bus/nubus/pds30_procolor816.cpp +++ b/src/devices/bus/nubus/pds30_procolor816.cpp @@ -45,7 +45,7 @@ void nubus_procolor816_device::device_add_mconfig(machine_config &config) { screen_device &screen(SCREEN(config, PROCOLOR816_SCREEN_NAME, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(nubus_procolor816_device::screen_update)); - screen.set_raw(25175000, 800, 0, 640, 525, 0, 480); + screen.set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); screen.set_size(1024, 768); screen.set_visarea(0, 640-1, 0, 480-1); } @@ -67,12 +67,12 @@ const tiny_rom_entry *nubus_procolor816_device::device_rom_region() const // nubus_procolor816_device - constructor //------------------------------------------------- -nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_procolor816_device(mconfig, PDS030_PROCOLOR816, tag, owner, clock) { } -nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/pds30_procolor816.h b/src/devices/bus/nubus/pds30_procolor816.h index 653186d572b..5caf1a58d7e 100644 --- a/src/devices/bus/nubus/pds30_procolor816.h +++ b/src/devices/bus/nubus/pds30_procolor816.h @@ -20,10 +20,10 @@ class nubus_procolor816_device : { public: // construction/destruction - nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_procolor816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_procolor816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/pds30_sigmalview.cpp b/src/devices/bus/nubus/pds30_sigmalview.cpp index 0e82f923cda..f3494fd1f38 100644 --- a/src/devices/bus/nubus/pds30_sigmalview.cpp +++ b/src/devices/bus/nubus/pds30_sigmalview.cpp @@ -61,13 +61,13 @@ const tiny_rom_entry *nubus_lview_device::device_rom_region() const // nubus_lview_device - constructor //------------------------------------------------- -nubus_lview_device::nubus_lview_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_lview_device::nubus_lview_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_lview_device(mconfig, PDS030_LVIEW, tag, owner, clock) { (void)m_toggle; } -nubus_lview_device::nubus_lview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_lview_device::nubus_lview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this), diff --git a/src/devices/bus/nubus/pds30_sigmalview.h b/src/devices/bus/nubus/pds30_sigmalview.h index e120b00ab53..4548ce0ad69 100644 --- a/src/devices/bus/nubus/pds30_sigmalview.h +++ b/src/devices/bus/nubus/pds30_sigmalview.h @@ -20,10 +20,10 @@ class nubus_lview_device : { public: // construction/destruction - nubus_lview_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_lview_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_lview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_lview_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/nubus/quadralink.cpp b/src/devices/bus/nubus/quadralink.cpp index 0e6ecd1a567..35232431ed3 100644 --- a/src/devices/bus/nubus/quadralink.cpp +++ b/src/devices/bus/nubus/quadralink.cpp @@ -85,12 +85,12 @@ const tiny_rom_entry *nubus_quadralink_device::device_rom_region() const // nubus_quadralink_device - constructor //------------------------------------------------- -nubus_quadralink_device::nubus_quadralink_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nubus_quadralink_device::nubus_quadralink_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nubus_quadralink_device(mconfig, NUBUS_QUADRALINK, tag, owner, clock) { } -nubus_quadralink_device::nubus_quadralink_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nubus_quadralink_device::nubus_quadralink_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nubus_card_interface(mconfig, *this), m_scc1(*this, "scc1"), diff --git a/src/devices/bus/nubus/quadralink.h b/src/devices/bus/nubus/quadralink.h index 3960c24d069..6b8ea46e091 100644 --- a/src/devices/bus/nubus/quadralink.h +++ b/src/devices/bus/nubus/quadralink.h @@ -20,10 +20,10 @@ class nubus_quadralink_device : { public: // construction/destruction - nubus_quadralink_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nubus_quadralink_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - nubus_quadralink_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nubus_quadralink_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_scc1, m_scc2; diff --git a/src/devices/bus/odyssey2/4in1.cpp b/src/devices/bus/odyssey2/4in1.cpp index c0c3788a05e..7c0cda11b63 100644 --- a/src/devices/bus/odyssey2/4in1.cpp +++ b/src/devices/bus/odyssey2/4in1.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_4IN1, o2_4in1_device, "o2_4in1", "Videopac 40 Cartridg // o2_4in1_device - constructor //------------------------------------------------- -o2_4in1_device::o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_4in1_device::o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_4IN1, tag, owner, clock), device_o2_cart_interface(mconfig, *this) { } diff --git a/src/devices/bus/odyssey2/4in1.h b/src/devices/bus/odyssey2/4in1.h index 2840361bfe0..663c5335b63 100644 --- a/src/devices/bus/odyssey2/4in1.h +++ b/src/devices/bus/odyssey2/4in1.h @@ -21,7 +21,7 @@ class o2_4in1_device : public device_t, { public: // construction/destruction - o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/chess.cpp b/src/devices/bus/odyssey2/chess.cpp index 3bb5fed470c..c26febc2087 100644 --- a/src/devices/bus/odyssey2/chess.cpp +++ b/src/devices/bus/odyssey2/chess.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_CHESS, o2_chess_device, "o2_chess", "Videopac C7010 Ca // o2_chess_device - constructor //------------------------------------------------- -o2_chess_device::o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_chess_device::o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_CHESS, tag, owner, clock), device_o2_cart_interface(mconfig, *this), m_maincpu(*this, "maincpu"), diff --git a/src/devices/bus/odyssey2/chess.h b/src/devices/bus/odyssey2/chess.h index 0b37c50684c..986d16a3090 100644 --- a/src/devices/bus/odyssey2/chess.h +++ b/src/devices/bus/odyssey2/chess.h @@ -24,7 +24,7 @@ class o2_chess_device : public device_t, { public: // construction/destruction - o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_chess_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/homecomp.cpp b/src/devices/bus/odyssey2/homecomp.cpp index 2ab6f45b153..91788c9db30 100644 --- a/src/devices/bus/odyssey2/homecomp.cpp +++ b/src/devices/bus/odyssey2/homecomp.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_HOMECOMP, o2_homecomp_device, "o2_homecomp", "Videopac // o2_homecomp_device - constructor //------------------------------------------------- -o2_homecomp_device::o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_homecomp_device::o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_HOMECOMP, tag, owner, clock), device_o2_cart_interface(mconfig, *this), m_maincpu(*this, "maincpu"), diff --git a/src/devices/bus/odyssey2/homecomp.h b/src/devices/bus/odyssey2/homecomp.h index 7971afbff02..0fd5ab0fa61 100644 --- a/src/devices/bus/odyssey2/homecomp.h +++ b/src/devices/bus/odyssey2/homecomp.h @@ -25,7 +25,7 @@ class o2_homecomp_device : public device_t, { public: // construction/destruction - o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_homecomp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/ktaa.cpp b/src/devices/bus/odyssey2/ktaa.cpp index b9cf38bbf95..4f885f23bbb 100644 --- a/src/devices/bus/odyssey2/ktaa.cpp +++ b/src/devices/bus/odyssey2/ktaa.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_KTAA, o2_ktaa_device, "o2_ktaa", "Videopac+ KTAA Cartr // o2_ktaa_device - constructor //------------------------------------------------- -o2_ktaa_device::o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_ktaa_device::o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_KTAA, tag, owner, clock), device_o2_cart_interface(mconfig, *this) { } diff --git a/src/devices/bus/odyssey2/ktaa.h b/src/devices/bus/odyssey2/ktaa.h index ebb2da83a0b..53789a817db 100644 --- a/src/devices/bus/odyssey2/ktaa.h +++ b/src/devices/bus/odyssey2/ktaa.h @@ -21,7 +21,7 @@ class o2_ktaa_device : public device_t, { public: // construction/destruction - o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_ktaa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/rally.cpp b/src/devices/bus/odyssey2/rally.cpp index e2d9adb135d..1245a501052 100644 --- a/src/devices/bus/odyssey2/rally.cpp +++ b/src/devices/bus/odyssey2/rally.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_RALLY, o2_rally_device, "o2_rally", "Videopac+ 60 Cart // o2_rally_device - constructor //------------------------------------------------- -o2_rally_device::o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_rally_device::o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_RALLY, tag, owner, clock), device_o2_cart_interface(mconfig, *this) { } diff --git a/src/devices/bus/odyssey2/rally.h b/src/devices/bus/odyssey2/rally.h index 8d359362dce..63f6e16974f 100644 --- a/src/devices/bus/odyssey2/rally.h +++ b/src/devices/bus/odyssey2/rally.h @@ -21,7 +21,7 @@ class o2_rally_device : public device_t, { public: // construction/destruction - o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/rom.cpp b/src/devices/bus/odyssey2/rom.cpp index b964d99b584..75664e64168 100644 --- a/src/devices/bus/odyssey2/rom.cpp +++ b/src/devices/bus/odyssey2/rom.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_STD, o2_rom_device, "o2_rom", "Odyssey 2 Standard Cart // o2_rom_device - constructor //------------------------------------------------- -o2_rom_device::o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_rom_device::o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_STD, tag, owner, clock), device_o2_cart_interface(mconfig, *this) { } diff --git a/src/devices/bus/odyssey2/rom.h b/src/devices/bus/odyssey2/rom.h index 204d96030ce..17545c90633 100644 --- a/src/devices/bus/odyssey2/rom.h +++ b/src/devices/bus/odyssey2/rom.h @@ -21,7 +21,7 @@ class o2_rom_device : public device_t, { public: // construction/destruction - o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/slot.cpp b/src/devices/bus/odyssey2/slot.cpp index 1e85ca3d4fa..8c3762b816a 100644 --- a/src/devices/bus/odyssey2/slot.cpp +++ b/src/devices/bus/odyssey2/slot.cpp @@ -50,7 +50,7 @@ device_o2_cart_interface::~device_o2_cart_interface() // o2_cart_slot_device - constructor //------------------------------------------------- -o2_cart_slot_device::o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +o2_cart_slot_device::o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_CART_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h index 09fcd34891e..7031bd5856a 100644 --- a/src/devices/bus/odyssey2/slot.h +++ b/src/devices/bus/odyssey2/slot.h @@ -101,7 +101,7 @@ public: // construction/destruction template o2_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : o2_cart_slot_device(mconfig, tag, owner, 0) + : o2_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -109,7 +109,7 @@ public: set_fixed(false); } - o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~o2_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/odyssey2/test.cpp b/src/devices/bus/odyssey2/test.cpp index 60141698f3c..ccee1c6a0f4 100644 --- a/src/devices/bus/odyssey2/test.cpp +++ b/src/devices/bus/odyssey2/test.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_TEST, o2_test_device, "o2_test", "Videopac Service Tes // o2_test_device - constructor //------------------------------------------------- -o2_test_device::o2_test_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_test_device::o2_test_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_TEST, tag, owner, clock), device_o2_cart_interface(mconfig, *this), m_digit_out(*this, "tc_digit") diff --git a/src/devices/bus/odyssey2/test.h b/src/devices/bus/odyssey2/test.h index 9227a9d6ea1..d7a93a71f0c 100644 --- a/src/devices/bus/odyssey2/test.h +++ b/src/devices/bus/odyssey2/test.h @@ -21,7 +21,7 @@ class o2_test_device : public device_t, { public: // construction/destruction - o2_test_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_test_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp index 831a02bcc1a..3c2b5b0b6e3 100644 --- a/src/devices/bus/odyssey2/voice.cpp +++ b/src/devices/bus/odyssey2/voice.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(O2_ROM_VOICE, o2_voice_device, "o2_voice", "Odyssey 2 The Voi // o2_voice_device - constructor //------------------------------------------------- -o2_voice_device::o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +o2_voice_device::o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, O2_ROM_VOICE, tag, owner, clock), device_o2_cart_interface(mconfig, *this), m_speech(*this, "speech"), diff --git a/src/devices/bus/odyssey2/voice.h b/src/devices/bus/odyssey2/voice.h index a8e3000032f..32ca5383dab 100644 --- a/src/devices/bus/odyssey2/voice.h +++ b/src/devices/bus/odyssey2/voice.h @@ -22,7 +22,7 @@ class o2_voice_device : public device_t, { public: // construction/destruction - o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + o2_voice_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void cart_init() override; diff --git a/src/devices/bus/oricext/jasmin.cpp b/src/devices/bus/oricext/jasmin.cpp index a50ab9d742d..4652f474671 100644 --- a/src/devices/bus/oricext/jasmin.cpp +++ b/src/devices/bus/oricext/jasmin.cpp @@ -37,7 +37,7 @@ void oric_jasmin_device::map(address_map &map) map(0x3f8, 0x3ff).w(m_fdlatch, FUNC(ls259_device::write_d0)); } -oric_jasmin_device::oric_jasmin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +oric_jasmin_device::oric_jasmin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ORIC_JASMIN, tag, owner, clock), device_oricext_interface(mconfig, *this), m_fdc(*this, "fdc"), diff --git a/src/devices/bus/oricext/jasmin.h b/src/devices/bus/oricext/jasmin.h index 17baba8aaad..d215ef9a334 100644 --- a/src/devices/bus/oricext/jasmin.h +++ b/src/devices/bus/oricext/jasmin.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(ORIC_JASMIN, oric_jasmin_device) class oric_jasmin_device : public device_t, public device_oricext_interface { public: - oric_jasmin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + oric_jasmin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~oric_jasmin_device(); DECLARE_INPUT_CHANGED_MEMBER(boot_pressed); diff --git a/src/devices/bus/oricext/microdisc.cpp b/src/devices/bus/oricext/microdisc.cpp index 31ef1a7941d..a7d539b0bf8 100644 --- a/src/devices/bus/oricext/microdisc.cpp +++ b/src/devices/bus/oricext/microdisc.cpp @@ -29,7 +29,7 @@ void oric_microdisc_device::map(address_map &map) map(0x318, 0x318).r(FUNC(oric_microdisc_device::port_318_r)); } -oric_microdisc_device::oric_microdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +oric_microdisc_device::oric_microdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ORIC_MICRODISC, tag, owner, clock), device_oricext_interface(mconfig, *this), fdc(*this, "fdc"), microdisc_rom(nullptr), diff --git a/src/devices/bus/oricext/microdisc.h b/src/devices/bus/oricext/microdisc.h index 312a9b69954..75a3a7a9228 100644 --- a/src/devices/bus/oricext/microdisc.h +++ b/src/devices/bus/oricext/microdisc.h @@ -12,7 +12,7 @@ DECLARE_DEVICE_TYPE(ORIC_MICRODISC, oric_microdisc_device) class oric_microdisc_device : public device_t, public device_oricext_interface { public: - oric_microdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + oric_microdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~oric_microdisc_device(); protected: diff --git a/src/devices/bus/oricext/oricext.cpp b/src/devices/bus/oricext/oricext.cpp index c678edc0ef6..8511329445b 100644 --- a/src/devices/bus/oricext/oricext.cpp +++ b/src/devices/bus/oricext/oricext.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(ORICEXT_CONNECTOR, oricext_connector, "oricext_connector", "ORIC extension connector") -oricext_connector::oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +oricext_connector::oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ORICEXT_CONNECTOR, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), irq_handler(*this), diff --git a/src/devices/bus/oricext/oricext.h b/src/devices/bus/oricext/oricext.h index 2d017f1e376..4aaaab64fef 100644 --- a/src/devices/bus/oricext/oricext.h +++ b/src/devices/bus/oricext/oricext.h @@ -22,7 +22,7 @@ class oricext_connector: public device_t, public device_single_card_slot_interfa public: template oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, U &&cputag) - : oricext_connector(mconfig, tag, owner, (uint32_t)0) + : oricext_connector(mconfig, tag, owner) { option_reset(); opts(*this); @@ -31,7 +31,7 @@ public: set_cputag(std::forward(cputag)); } - oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + oricext_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~oricext_connector(); template void set_cputag(T &&tag) { cpu.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/pasopia/pac2.cpp b/src/devices/bus/pasopia/pac2.cpp index 13955bba61f..66022726e44 100644 --- a/src/devices/bus/pasopia/pac2.cpp +++ b/src/devices/bus/pasopia/pac2.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(PASOPIA_PAC2, pasopia_pac2_slot_device, "pasopia_pac2", "Paso // pasopia_pac2_slot_device - construction //------------------------------------------------- -pasopia_pac2_slot_device::pasopia_pac2_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pasopia_pac2_slot_device::pasopia_pac2_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PASOPIA_PAC2, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_card(nullptr) diff --git a/src/devices/bus/pasopia/pac2.h b/src/devices/bus/pasopia/pac2.h index 9bbf30b44ca..8c0dafeec3b 100644 --- a/src/devices/bus/pasopia/pac2.h +++ b/src/devices/bus/pasopia/pac2.h @@ -29,7 +29,7 @@ public: // construction/destruction template pasopia_pac2_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pasopia_pac2_slot_device(mconfig, tag, owner, 0) + : pasopia_pac2_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -37,7 +37,7 @@ public: set_fixed(false); } - pasopia_pac2_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + pasopia_pac2_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // memory accesses u8 read(offs_t offset); diff --git a/src/devices/bus/pasopia/pac2exp.cpp b/src/devices/bus/pasopia/pac2exp.cpp index 2638a7bc645..521dd9344c0 100644 --- a/src/devices/bus/pasopia/pac2exp.cpp +++ b/src/devices/bus/pasopia/pac2exp.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(PASOPIA_PA7234, pasopia_pa7234_device, "pa7234", "PA7234 Paso // pasopia_pa7234_device - construction //------------------------------------------------- -pasopia_pa7234_device::pasopia_pa7234_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pasopia_pa7234_device::pasopia_pa7234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PASOPIA_PA7234, tag, owner, clock) , pac2_card_interface(mconfig, *this) , m_slot(*this, "slot%u", 1U) diff --git a/src/devices/bus/pasopia/pac2exp.h b/src/devices/bus/pasopia/pac2exp.h index ae874c01490..56ec5b6862e 100644 --- a/src/devices/bus/pasopia/pac2exp.h +++ b/src/devices/bus/pasopia/pac2exp.h @@ -19,7 +19,7 @@ class pasopia_pa7234_device : public device_t, public pac2_card_interface { public: // device type constructor - pasopia_pa7234_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pasopia_pa7234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pasopia/rampac2.cpp b/src/devices/bus/pasopia/rampac2.cpp index 3c128a10266..f5ca4cd089c 100644 --- a/src/devices/bus/pasopia/rampac2.cpp +++ b/src/devices/bus/pasopia/rampac2.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(PASOPIA_PA7248, pasopia_pa7248_device, "pa7248", "PA7248 Paso // pasopia_rampac2_device - construction //------------------------------------------------- -pasopia_rampac2_device::pasopia_rampac2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 ram_size) +pasopia_rampac2_device::pasopia_rampac2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 ram_size) : device_t(mconfig, type, tag, owner, clock) , pac2_card_interface(mconfig, *this) , device_nvram_interface(mconfig, *this) @@ -43,7 +43,7 @@ pasopia_rampac2_device::pasopia_rampac2_device(const machine_config &mconfig, de // pasopia_pa7243_device - construction //------------------------------------------------- -pasopia_pa7243_device::pasopia_pa7243_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pasopia_pa7243_device::pasopia_pa7243_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pasopia_rampac2_device(mconfig, PASOPIA_PA7243, tag, owner, clock, 0x4000) { } @@ -53,7 +53,7 @@ pasopia_pa7243_device::pasopia_pa7243_device(const machine_config &mconfig, cons // pasopia_pa7245_device - construction //------------------------------------------------- -pasopia_pa7245_device::pasopia_pa7245_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pasopia_pa7245_device::pasopia_pa7245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pasopia_rampac2_device(mconfig, PASOPIA_PA7245, tag, owner, clock, 0x8000) { } @@ -63,7 +63,7 @@ pasopia_pa7245_device::pasopia_pa7245_device(const machine_config &mconfig, cons // pasopia_pa7248_device - construction //------------------------------------------------- -pasopia_pa7248_device::pasopia_pa7248_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pasopia_pa7248_device::pasopia_pa7248_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pasopia_rampac2_device(mconfig, PASOPIA_PA7248, tag, owner, clock, 0x10000) { } diff --git a/src/devices/bus/pasopia/rampac2.h b/src/devices/bus/pasopia/rampac2.h index 54e8a652049..45858466861 100644 --- a/src/devices/bus/pasopia/rampac2.h +++ b/src/devices/bus/pasopia/rampac2.h @@ -19,7 +19,7 @@ class pasopia_rampac2_device : public device_t, public pac2_card_interface, publ { protected: // construction/destruction - pasopia_rampac2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 ram_size); + pasopia_rampac2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 ram_size); // device-level overrides virtual void device_start() override; @@ -47,7 +47,7 @@ class pasopia_pa7243_device : public pasopia_rampac2_device { public: // device type constructor - pasopia_pa7243_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pasopia_pa7243_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> pasopia_pa7245_device @@ -56,7 +56,7 @@ class pasopia_pa7245_device : public pasopia_rampac2_device { public: // device type constructor - pasopia_pa7245_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pasopia_pa7245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> pasopia_pa7248_device @@ -65,7 +65,7 @@ class pasopia_pa7248_device : public pasopia_rampac2_device { public: // device type constructor - pasopia_pa7248_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pasopia_pa7248_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/bus/pasopia/rompac2.cpp b/src/devices/bus/pasopia/rompac2.cpp index 5ec120ac120..1cb73ad3154 100644 --- a/src/devices/bus/pasopia/rompac2.cpp +++ b/src/devices/bus/pasopia/rompac2.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(PASOPIA_PA7246, pasopia_pa7246_device, "pa7246", "PA7246 Paso // pasopia_pa7246_device - construction //------------------------------------------------- -pasopia_pa7246_device::pasopia_pa7246_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pasopia_pa7246_device::pasopia_pa7246_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PASOPIA_PA7246, tag, owner, clock) , pac2_card_interface(mconfig, *this) , m_kanji_rom(*this, "kanji") diff --git a/src/devices/bus/pasopia/rompac2.h b/src/devices/bus/pasopia/rompac2.h index 1b734e3b29f..9b3dbaf4f37 100644 --- a/src/devices/bus/pasopia/rompac2.h +++ b/src/devices/bus/pasopia/rompac2.h @@ -19,7 +19,7 @@ class pasopia_pa7246_device : public device_t, public pac2_card_interface { public: // device type constructor - pasopia_pa7246_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pasopia_pa7246_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pc1512/mouse.cpp b/src/devices/bus/pc1512/mouse.cpp index f1d92ce4df5..f40e5f8ef7a 100644 --- a/src/devices/bus/pc1512/mouse.cpp +++ b/src/devices/bus/pc1512/mouse.cpp @@ -44,7 +44,7 @@ device_pc1512_mouse_port_interface::device_pc1512_mouse_port_interface(const mac // pc1512_mouse_port_device - constructor //------------------------------------------------- -pc1512_mouse_port_device::pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc1512_mouse_port_device::pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC1512_MOUSE_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_x(*this), @@ -55,7 +55,7 @@ pc1512_mouse_port_device::pc1512_mouse_port_device(const machine_config &mconfig { } -pc1512_mouse_device::pc1512_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc1512_mouse_device::pc1512_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC1512_MOUSE, tag, owner, clock), device_pc1512_mouse_port_interface(mconfig, *this) { diff --git a/src/devices/bus/pc1512/mouse.h b/src/devices/bus/pc1512/mouse.h index 8b2215fe1c0..a1dc2e054af 100644 --- a/src/devices/bus/pc1512/mouse.h +++ b/src/devices/bus/pc1512/mouse.h @@ -56,7 +56,7 @@ public: // construction/destruction template pc1512_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pc1512_mouse_port_device(mconfig, tag, owner, 0) + : pc1512_mouse_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -64,7 +64,7 @@ public: set_fixed(false); } - pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc1512_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // static configuration helpers auto x_wr_callback() { return m_write_x.bind(); } @@ -97,7 +97,7 @@ class pc1512_mouse_device : public device_t, public device_pc1512_mouse_port_int { public: // construction/destruction - pc1512_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc1512_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/pc8801/jmbx1.cpp b/src/devices/bus/pc8801/jmbx1.cpp index 33a48019a20..07ebc63e5c0 100644 --- a/src/devices/bus/pc8801/jmbx1.cpp +++ b/src/devices/bus/pc8801/jmbx1.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(JMBX1, jmbx1_device, "jmbx1", "JMB-X1 \"Sound Board X\"") -jmbx1_device::jmbx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jmbx1_device::jmbx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc8801_exp_device(mconfig, JMBX1, tag, owner, clock) , m_opm1(*this, "opm1") , m_opm2(*this, "opm2") diff --git a/src/devices/bus/pc8801/jmbx1.h b/src/devices/bus/pc8801/jmbx1.h index 27f9050cae5..94e7b779456 100644 --- a/src/devices/bus/pc8801/jmbx1.h +++ b/src/devices/bus/pc8801/jmbx1.h @@ -13,7 +13,7 @@ class jmbx1_device : public pc8801_exp_device { public: - jmbx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jmbx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void io_map(address_map &map) override; diff --git a/src/devices/bus/pc8801/pc8801_23.cpp b/src/devices/bus/pc8801/pc8801_23.cpp index f0b11773d2c..ab6628f6f5f 100644 --- a/src/devices/bus/pc8801/pc8801_23.cpp +++ b/src/devices/bus/pc8801/pc8801_23.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(PC8801_23, pc8801_23_device, "pc8801_23", "NEC PC-8801-23 \"Sound Board II\"") -pc8801_23_device::pc8801_23_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc8801_23_device::pc8801_23_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc8801_exp_device(mconfig, PC8801_23, tag, owner, clock) , m_opna(*this, "opna") { diff --git a/src/devices/bus/pc8801/pc8801_23.h b/src/devices/bus/pc8801/pc8801_23.h index b112274c7d0..c8405bf900a 100644 --- a/src/devices/bus/pc8801/pc8801_23.h +++ b/src/devices/bus/pc8801/pc8801_23.h @@ -12,7 +12,7 @@ class pc8801_23_device : public pc8801_exp_device { public: - pc8801_23_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc8801_23_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::SOUND; } diff --git a/src/devices/bus/pc8801/pc8801_31.cpp b/src/devices/bus/pc8801/pc8801_31.cpp index f979e59162b..1250342bc9a 100644 --- a/src/devices/bus/pc8801/pc8801_31.cpp +++ b/src/devices/bus/pc8801/pc8801_31.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(PC8801_31, pc8801_31_device, "pc8801_31", "NEC PC8801-31 CD-R //------------------------------------------------- -pc8801_31_device::pc8801_31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc8801_31_device::pc8801_31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC8801_31, tag, owner, clock) , m_scsibus(*this, "scsi") , m_rom_bank_cb(*this) diff --git a/src/devices/bus/pc8801/pc8801_31.h b/src/devices/bus/pc8801/pc8801_31.h index fd580002610..0a5ac3e9d88 100644 --- a/src/devices/bus/pc8801/pc8801_31.h +++ b/src/devices/bus/pc8801/pc8801_31.h @@ -22,7 +22,7 @@ class pc8801_31_device : public device_t { public: // construction/destruction - pc8801_31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc8801_31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/pc8801/pc8801_exp.cpp b/src/devices/bus/pc8801/pc8801_exp.cpp index d99a6d252ff..4bd40698a49 100644 --- a/src/devices/bus/pc8801/pc8801_exp.cpp +++ b/src/devices/bus/pc8801/pc8801_exp.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(PC8801_EXP_SLOT, pc8801_exp_slot_device, "pc8801_exp_slot", "PC-8801 Expansion Slot") -pc8801_exp_slot_device::pc8801_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc8801_exp_slot_device::pc8801_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC8801_EXP_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_iospace(*this, finder_base::DUMMY_TAG, -1) @@ -99,7 +99,7 @@ WRITE_LINE_MEMBER( device_pc8801_exp_interface::int3_w ) { m_slot->m_int3_cb(sta WRITE_LINE_MEMBER( device_pc8801_exp_interface::int4_w ) { m_slot->m_int4_cb(state); } WRITE_LINE_MEMBER( device_pc8801_exp_interface::int5_w ) { m_slot->m_int5_cb(state); } -pc8801_exp_device::pc8801_exp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pc8801_exp_device::pc8801_exp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_pc8801_exp_interface(mconfig, *this) { diff --git a/src/devices/bus/pc8801/pc8801_exp.h b/src/devices/bus/pc8801/pc8801_exp.h index f3f540a1c9b..63274aae605 100644 --- a/src/devices/bus/pc8801/pc8801_exp.h +++ b/src/devices/bus/pc8801/pc8801_exp.h @@ -16,14 +16,14 @@ public: // construction/destruction template pc8801_exp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pc8801_exp_slot_device(mconfig, tag, owner, (uint32_t)0) + : pc8801_exp_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - pc8801_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc8801_exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~pc8801_exp_slot_device(); template void set_iospace(T &&tag, int spacenum) { m_iospace.set_tag(std::forward(tag), spacenum); } @@ -77,7 +77,7 @@ class pc8801_exp_device : public device_t, public device_pc8801_exp_interface { public: // construction/destruction - pc8801_exp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc8801_exp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: diff --git a/src/devices/bus/pc8801/pcg8100.cpp b/src/devices/bus/pc8801/pcg8100.cpp index c2bf07c7f73..bc565d988fe 100644 --- a/src/devices/bus/pc8801/pcg8100.cpp +++ b/src/devices/bus/pc8801/pcg8100.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(PCG8100, pcg8100_device, "pcg8100", "HAL Laboratory PCG-8100") -pcg8100_device::pcg8100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcg8100_device::pcg8100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc8801_exp_device(mconfig, PCG8100, tag, owner, clock) , m_pit(*this, "pit") , m_dac1bit(*this, "dac1bit%u", 0L) @@ -35,7 +35,7 @@ void pcg8100_device::device_add_mconfig(machine_config &config) { constexpr XTAL pcg_clock = XTAL(31'948'800) / 8; - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(pcg_clock); m_pit->out_handler<0>().set(m_dac1bit[0], FUNC(speaker_sound_device::level_w)); m_pit->set_clk<1>(pcg_clock); diff --git a/src/devices/bus/pc8801/pcg8100.h b/src/devices/bus/pc8801/pcg8100.h index 4d71f8509d1..eaac2ef5de3 100644 --- a/src/devices/bus/pc8801/pcg8100.h +++ b/src/devices/bus/pc8801/pcg8100.h @@ -13,7 +13,7 @@ class pcg8100_device : public pc8801_exp_device { public: - pcg8100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcg8100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void io_map(address_map &map) override; diff --git a/src/devices/bus/pc_joy/pc_joy.cpp b/src/devices/bus/pc_joy/pc_joy.cpp index 2171a9ddbf7..44278790488 100644 --- a/src/devices/bus/pc_joy/pc_joy.cpp +++ b/src/devices/bus/pc_joy/pc_joy.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(PC_JOY, pc_joy_device, "pc_joy", "PC joystick port") -pc_joy_device::pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_joy_device::pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_JOY, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_dev(nullptr) @@ -84,7 +84,7 @@ ioport_constructor pc_basic_joy_device::device_input_ports() const DEFINE_DEVICE_TYPE(PC_BASIC_JOY, pc_basic_joy_device, "pc_basic_joy", "PC basic joystick") -pc_basic_joy_device::pc_basic_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_basic_joy_device::pc_basic_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_BASIC_JOY, tag, owner, clock), device_pc_joy_interface(mconfig, *this), m_btn(*this, "btn"), diff --git a/src/devices/bus/pc_joy/pc_joy.h b/src/devices/bus/pc_joy/pc_joy.h index e09520f6436..416938427ce 100644 --- a/src/devices/bus/pc_joy/pc_joy.h +++ b/src/devices/bus/pc_joy/pc_joy.h @@ -35,7 +35,7 @@ protected: class pc_joy_device : public device_t, public device_single_card_slot_interface { public: - pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t joy_port_r(); void joy_port_w(uint8_t data); @@ -55,7 +55,7 @@ class pc_basic_joy_device : public device_t, public device_pc_joy_interface { public: - pc_basic_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_basic_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ioport_constructor device_input_ports() const override; virtual uint8_t x1(int delta) override { return (m_x1->read() > delta); } diff --git a/src/devices/bus/pc_joy/pc_joy_sw.cpp b/src/devices/bus/pc_joy/pc_joy_sw.cpp index 8c9b2c75d4b..7e20651c3ad 100644 --- a/src/devices/bus/pc_joy/pc_joy_sw.cpp +++ b/src/devices/bus/pc_joy/pc_joy_sw.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(PC_MSSW_PAD, pc_mssw_pad_device, "mssw_pad", "Microsoft Sidewinder Pad") -pc_mssw_pad_device::pc_mssw_pad_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +pc_mssw_pad_device::pc_mssw_pad_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, PC_MSSW_PAD, tag, owner, clock), device_pc_joy_interface(mconfig, *this), m_btn1(*this, "btn1"), diff --git a/src/devices/bus/pc_joy/pc_joy_sw.h b/src/devices/bus/pc_joy/pc_joy_sw.h index 5d83a10d0c1..b27a143af70 100644 --- a/src/devices/bus/pc_joy/pc_joy_sw.h +++ b/src/devices/bus/pc_joy/pc_joy_sw.h @@ -9,7 +9,7 @@ class pc_mssw_pad_device : public device_t, public device_pc_joy_interface { public: - pc_mssw_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_mssw_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; virtual uint8_t btn() override { return m_state; } diff --git a/src/devices/bus/pc_kbd/ec1841.cpp b/src/devices/bus/pc_kbd/ec1841.cpp index c9f5aa57f98..4f1e1600415 100644 --- a/src/devices/bus/pc_kbd/ec1841.cpp +++ b/src/devices/bus/pc_kbd/ec1841.cpp @@ -284,7 +284,7 @@ ioport_constructor ec_1841_keyboard_device::device_input_ports() const // ec_1841_keyboard_device - constructor //------------------------------------------------- -ec_1841_keyboard_device::ec_1841_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ec_1841_keyboard_device::ec_1841_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_KBD_EC_1841, tag, owner, clock), device_pc_kbd_interface(mconfig, *this), m_maincpu(*this, I8048_TAG), diff --git a/src/devices/bus/pc_kbd/ec1841.h b/src/devices/bus/pc_kbd/ec1841.h index 08309b35d9e..00a94c31bdf 100644 --- a/src/devices/bus/pc_kbd/ec1841.h +++ b/src/devices/bus/pc_kbd/ec1841.h @@ -26,7 +26,7 @@ class ec_1841_keyboard_device : public device_t, public device_pc_kbd_interface { public: // construction/destruction - ec_1841_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ec_1841_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pc_kbd/hle_mouse.cpp b/src/devices/bus/pc_kbd/hle_mouse.cpp index 15ac7854d09..dc59b332543 100644 --- a/src/devices/bus/pc_kbd/hle_mouse.cpp +++ b/src/devices/bus/pc_kbd/hle_mouse.cpp @@ -67,7 +67,7 @@ INPUT_PORTS_END static constexpr attotime serial_cycle = attotime::from_usec(25); -hle_ps2_mouse_device::hle_ps2_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hle_ps2_mouse_device::hle_ps2_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HLE_PS2_MOUSE, tag, owner, clock) , device_pc_kbd_interface(mconfig, *this) , m_port_x_axis(*this, "mouse_x_axis") diff --git a/src/devices/bus/pc_kbd/hle_mouse.h b/src/devices/bus/pc_kbd/hle_mouse.h index d4222a35fd2..53b567adaaa 100644 --- a/src/devices/bus/pc_kbd/hle_mouse.h +++ b/src/devices/bus/pc_kbd/hle_mouse.h @@ -13,7 +13,7 @@ class hle_ps2_mouse_device , public device_pc_kbd_interface { public: - hle_ps2_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hle_ps2_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/pc_kbd/iskr1030.cpp b/src/devices/bus/pc_kbd/iskr1030.cpp index 5a39c103b50..c0b83d0f8cb 100644 --- a/src/devices/bus/pc_kbd/iskr1030.cpp +++ b/src/devices/bus/pc_kbd/iskr1030.cpp @@ -251,7 +251,7 @@ ioport_constructor iskr_1030_keyboard_device::device_input_ports() const // iskr_1030_keyboard_device - constructor //------------------------------------------------- -iskr_1030_keyboard_device::iskr_1030_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iskr_1030_keyboard_device::iskr_1030_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_KBD_ISKR_1030, tag, owner, clock), device_pc_kbd_interface(mconfig, *this), m_maincpu(*this, I8048_TAG), diff --git a/src/devices/bus/pc_kbd/iskr1030.h b/src/devices/bus/pc_kbd/iskr1030.h index 5c849a2b6b0..32562c62935 100644 --- a/src/devices/bus/pc_kbd/iskr1030.h +++ b/src/devices/bus/pc_kbd/iskr1030.h @@ -27,7 +27,7 @@ class iskr_1030_keyboard_device : public device_t, public device_pc_kbd_interfac { public: // construction/destruction - iskr_1030_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iskr_1030_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pc_kbd/keytro.cpp b/src/devices/bus/pc_kbd/keytro.cpp index d178bfceb6f..16c9207d6c9 100644 --- a/src/devices/bus/pc_kbd/keytro.cpp +++ b/src/devices/bus/pc_kbd/keytro.cpp @@ -364,7 +364,7 @@ ROM_START( keytronic_pc3270 ) ROM_END -pc_kbd_keytronic_pc3270_device::pc_kbd_keytronic_pc3270_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_kbd_keytronic_pc3270_device::pc_kbd_keytronic_pc3270_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_kbd_keytronic_pc3270_device(mconfig, PC_KBD_KEYTRONIC_PC3270, tag, owner, clock) { } @@ -383,7 +383,7 @@ pc_kbd_keytronic_pc3270_device::pc_kbd_keytronic_pc3270_device( } -pc_kbd_keytronic_pc3270_at_device::pc_kbd_keytronic_pc3270_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_kbd_keytronic_pc3270_at_device::pc_kbd_keytronic_pc3270_at_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_kbd_keytronic_pc3270_device(mconfig, PC_KBD_KEYTRONIC_PC3270_AT, tag, owner, clock) { } @@ -422,7 +422,7 @@ void pc_kbd_keytronic_pc3270_device::device_reset() void pc_kbd_keytronic_pc3270_device::device_add_mconfig(machine_config &config) { - I8051(config, m_cpu, 11060250); + I8051(config, m_cpu, XTAL::u(11060250)); m_cpu->set_addrmap(AS_PROGRAM, &pc_kbd_keytronic_pc3270_device::keytronic_pc3270_program); m_cpu->set_addrmap(AS_IO, &pc_kbd_keytronic_pc3270_device::keytronic_pc3270_io); m_cpu->port_in_cb<1>().set(FUNC(pc_kbd_keytronic_pc3270_device::p1_read)); diff --git a/src/devices/bus/pc_kbd/keytro.h b/src/devices/bus/pc_kbd/keytro.h index 8fb6f021967..7ec801205cf 100644 --- a/src/devices/bus/pc_kbd/keytro.h +++ b/src/devices/bus/pc_kbd/keytro.h @@ -25,7 +25,7 @@ class pc_kbd_keytronic_pc3270_device : public device_t, { public: // construction/destruction - pc_kbd_keytronic_pc3270_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_kbd_keytronic_pc3270_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: pc_kbd_keytronic_pc3270_device( @@ -73,7 +73,7 @@ class pc_kbd_keytronic_pc3270_at_device : public pc_kbd_keytronic_pc3270_device { public: // construction/destruction - pc_kbd_keytronic_pc3270_at_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_kbd_keytronic_pc3270_at_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; }; diff --git a/src/devices/bus/pc_kbd/msnat.cpp b/src/devices/bus/pc_kbd/msnat.cpp index 058a1ef39ff..9a406e29315 100644 --- a/src/devices/bus/pc_kbd/msnat.cpp +++ b/src/devices/bus/pc_kbd/msnat.cpp @@ -205,7 +205,7 @@ ROM_START( microsoft_natural ) ROM_END -pc_kbd_microsoft_natural_device::pc_kbd_microsoft_natural_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc_kbd_microsoft_natural_device::pc_kbd_microsoft_natural_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_KBD_MICROSOFT_NATURAL, tag, owner, clock) , device_pc_kbd_interface(mconfig, *this) , m_cpu(*this, "ms_natrl_cpu") diff --git a/src/devices/bus/pc_kbd/msnat.h b/src/devices/bus/pc_kbd/msnat.h index 6ec5327675e..9ec831cd1e0 100644 --- a/src/devices/bus/pc_kbd/msnat.h +++ b/src/devices/bus/pc_kbd/msnat.h @@ -23,7 +23,7 @@ class pc_kbd_microsoft_natural_device : public device_t, { public: // construction/destruction - pc_kbd_microsoft_natural_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_kbd_microsoft_natural_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pc_kbd/pc83.cpp b/src/devices/bus/pc_kbd/pc83.cpp index 5e214660257..4c7c1fd23db 100644 --- a/src/devices/bus/pc_kbd/pc83.cpp +++ b/src/devices/bus/pc_kbd/pc83.cpp @@ -230,7 +230,7 @@ ioport_constructor ibm_pc_83_keyboard_device::device_input_ports() const // ibm_pc_83_keyboard_device - constructor //------------------------------------------------- -ibm_pc_83_keyboard_device::ibm_pc_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ibm_pc_83_keyboard_device::ibm_pc_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_KBD_IBM_PC_83, tag, owner, clock), device_pc_kbd_interface(mconfig, *this), m_maincpu(*this, I8048_TAG), diff --git a/src/devices/bus/pc_kbd/pc83.h b/src/devices/bus/pc_kbd/pc83.h index 44b58dfbc7f..a25a61fbddf 100644 --- a/src/devices/bus/pc_kbd/pc83.h +++ b/src/devices/bus/pc_kbd/pc83.h @@ -28,7 +28,7 @@ class ibm_pc_83_keyboard_device : public device_t, { public: // construction/destruction - ibm_pc_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm_pc_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pc_kbd/pc_kbdc.cpp b/src/devices/bus/pc_kbd/pc_kbdc.cpp index 4461648de7f..a7b9cb99e6f 100644 --- a/src/devices/bus/pc_kbd/pc_kbdc.cpp +++ b/src/devices/bus/pc_kbd/pc_kbdc.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(PC_KBDC, pc_kbdc_device, "pc_kbdc", "PC keyboard connector") //------------------------------------------------- // pc_kbdc_device - constructor //------------------------------------------------- -pc_kbdc_device::pc_kbdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_kbdc_device::pc_kbdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_KBDC, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_out_clock_cb(*this), diff --git a/src/devices/bus/pc_kbd/pc_kbdc.h b/src/devices/bus/pc_kbd/pc_kbdc.h index 4cbff6fc890..a962630953e 100644 --- a/src/devices/bus/pc_kbd/pc_kbdc.h +++ b/src/devices/bus/pc_kbd/pc_kbdc.h @@ -29,14 +29,14 @@ public: // construction/destruction template pc_kbdc_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pc_kbdc_device(mconfig, tag, owner, (uint32_t)0) + : pc_kbdc_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - pc_kbdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_kbdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_clock_cb() { return m_out_clock_cb.bind(); } auto out_data_cb() { return m_out_data_cb.bind(); } diff --git a/src/devices/bus/pc_kbd/pcat101.cpp b/src/devices/bus/pc_kbd/pcat101.cpp index 955e9d17f48..706bc20a2e1 100644 --- a/src/devices/bus/pc_kbd/pcat101.cpp +++ b/src/devices/bus/pc_kbd/pcat101.cpp @@ -233,7 +233,7 @@ ioport_constructor ibm_pc_at_101_keyboard_device::device_input_ports() const return INPUT_PORTS_NAME(ibm_pc_at_101_keyboard); } -ibm_pc_at_101_keyboard_device::ibm_pc_at_101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm_pc_at_101_keyboard_device::ibm_pc_at_101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_KBD_IBM_PC_AT_101, tag, owner, clock) , device_pc_kbd_interface(mconfig, *this) , m_mcu(*this, "mcu") diff --git a/src/devices/bus/pc_kbd/pcat101.h b/src/devices/bus/pc_kbd/pcat101.h index 449947eccad..8a3f2d4f35e 100644 --- a/src/devices/bus/pc_kbd/pcat101.h +++ b/src/devices/bus/pc_kbd/pcat101.h @@ -15,7 +15,7 @@ class ibm_pc_at_101_keyboard_device { public: // construction/destruction - ibm_pc_at_101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm_pc_at_101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pc_kbd/pcat84.cpp b/src/devices/bus/pc_kbd/pcat84.cpp index d45588eea34..2643dcafd78 100644 --- a/src/devices/bus/pc_kbd/pcat84.cpp +++ b/src/devices/bus/pc_kbd/pcat84.cpp @@ -107,7 +107,7 @@ const tiny_rom_entry *ibm_3270pc_122_keyboard_device::device_rom_region() const void ibm_pc_at_84_keyboard_device::device_add_mconfig(machine_config &config) { - I8048(config, m_maincpu, 5364000); + I8048(config, m_maincpu, XTAL::u(5364000)); m_maincpu->bus_out_cb().set(FUNC(ibm_pc_at_84_keyboard_device::bus_w)); m_maincpu->p1_in_cb().set(FUNC(ibm_pc_at_84_keyboard_device::p1_r)); m_maincpu->p1_out_cb().set(FUNC(ibm_pc_at_84_keyboard_device::p1_w)); @@ -339,7 +339,7 @@ ioport_constructor ibm_3270pc_122_keyboard_device::device_input_ports() const // ibm_pc_at_84_keyboard_device - constructor //------------------------------------------------- -ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_pc_kbd_interface(mconfig, *this), m_maincpu(*this, I8048_TAG), @@ -354,12 +354,12 @@ ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config { } -ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm_pc_at_84_keyboard_device(mconfig, PC_KBD_IBM_PC_AT_84, tag, owner, clock) { } -ibm_3270pc_122_keyboard_device::ibm_3270pc_122_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ibm_3270pc_122_keyboard_device::ibm_3270pc_122_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm_pc_at_84_keyboard_device(mconfig, PC_KBD_IBM_3270PC_122, tag, owner, clock) { } diff --git a/src/devices/bus/pc_kbd/pcat84.h b/src/devices/bus/pc_kbd/pcat84.h index 3953786f900..24067260936 100644 --- a/src/devices/bus/pc_kbd/pcat84.h +++ b/src/devices/bus/pc_kbd/pcat84.h @@ -28,10 +28,10 @@ class ibm_pc_at_84_keyboard_device : public device_t, { public: // construction/destruction - ibm_pc_at_84_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm_pc_at_84_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - ibm_pc_at_84_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm_pc_at_84_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -83,7 +83,7 @@ class ibm_3270pc_122_keyboard_device : public ibm_pc_at_84_keyboard_device { public: // construction/destruction - ibm_3270pc_122_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm_3270pc_122_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/pc_kbd/pcxt83.cpp b/src/devices/bus/pc_kbd/pcxt83.cpp index f155e9c853c..e22ddb9063b 100644 --- a/src/devices/bus/pc_kbd/pcxt83.cpp +++ b/src/devices/bus/pc_kbd/pcxt83.cpp @@ -232,7 +232,7 @@ ioport_constructor ibm_pc_xt_83_keyboard_device::device_input_ports() const // ibm_pc_xt_83_keyboard_device - constructor //------------------------------------------------- -ibm_pc_xt_83_keyboard_device::ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm_pc_xt_83_keyboard_device::ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_KBD_IBM_PC_XT_83, tag, owner, clock), device_pc_kbd_interface(mconfig, *this), m_maincpu(*this, I8048_TAG), diff --git a/src/devices/bus/pc_kbd/pcxt83.h b/src/devices/bus/pc_kbd/pcxt83.h index 6044141610e..0a690652344 100644 --- a/src/devices/bus/pc_kbd/pcxt83.h +++ b/src/devices/bus/pc_kbd/pcxt83.h @@ -27,7 +27,7 @@ class ibm_pc_xt_83_keyboard_device : public device_t, public device_pc_kbd_inter { public: // construction/destruction - ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pce/pce_rom.cpp b/src/devices/bus/pce/pce_rom.cpp index fea0d9f7dcc..c4e71571bf7 100644 --- a/src/devices/bus/pce/pce_rom.cpp +++ b/src/devices/bus/pce/pce_rom.cpp @@ -25,33 +25,33 @@ DEFINE_DEVICE_TYPE(PCE_ROM_SF2, pce_sf2_device, "pce_sf2", "PCE S DEFINE_DEVICE_TYPE(PCE_ROM_TENNOKOE, pce_tennokoe_device, "pce_tennokoe", "PCE Tennokoe Bank Cart") -pce_rom_device::pce_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pce_rom_device::pce_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_pce_cart_interface( mconfig, *this ) { } -pce_rom_device::pce_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pce_rom_device::pce_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_rom_device(mconfig, PCE_ROM_STD, tag, owner, clock) { } -pce_cdsys3_device::pce_cdsys3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pce_cdsys3_device::pce_cdsys3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_rom_device(mconfig, PCE_ROM_CDSYS3, tag, owner, clock) { } -pce_populous_device::pce_populous_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pce_populous_device::pce_populous_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_rom_device(mconfig, PCE_ROM_POPULOUS, tag, owner, clock) { } -pce_sf2_device::pce_sf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pce_sf2_device::pce_sf2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_rom_device(mconfig, PCE_ROM_SF2, tag, owner, clock), m_bank_base(0) { } -pce_tennokoe_device::pce_tennokoe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pce_tennokoe_device::pce_tennokoe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_rom_device(mconfig, PCE_ROM_TENNOKOE, tag, owner, clock), device_nvram_interface(mconfig, *this) { diff --git a/src/devices/bus/pce/pce_rom.h b/src/devices/bus/pce/pce_rom.h index 43499851eb7..fb79b81fc6a 100644 --- a/src/devices/bus/pce/pce_rom.h +++ b/src/devices/bus/pce/pce_rom.h @@ -16,13 +16,13 @@ class pce_rom_device : public device_t, { public: // construction/destruction - pce_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; protected: - pce_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pce_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -35,7 +35,7 @@ class pce_cdsys3_device : public pce_rom_device { public: // construction/destruction - pce_cdsys3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce_cdsys3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -49,7 +49,7 @@ class pce_populous_device : public pce_rom_device { public: // construction/destruction - pce_populous_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce_populous_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -63,7 +63,7 @@ class pce_sf2_device : public pce_rom_device { public: // construction/destruction - pce_sf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce_sf2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -85,7 +85,7 @@ class pce_tennokoe_device : public pce_rom_device, { public: // construction/destruction - pce_tennokoe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce_tennokoe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; diff --git a/src/devices/bus/pce/pce_slot.cpp b/src/devices/bus/pce/pce_slot.cpp index e49642447de..356bfe0c546 100644 --- a/src/devices/bus/pce/pce_slot.cpp +++ b/src/devices/bus/pce/pce_slot.cpp @@ -134,7 +134,7 @@ void device_pce_cart_interface::rom_map_setup(uint32_t size) //------------------------------------------------- // pce_cart_slot_device - constructor //------------------------------------------------- -pce_cart_slot_device::pce_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pce_cart_slot_device::pce_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCE_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h index 3770002ca5c..b8499dee0c0 100644 --- a/src/devices/bus/pce/pce_slot.h +++ b/src/devices/bus/pce/pce_slot.h @@ -68,7 +68,7 @@ public: // construction/destruction template pce_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, const char *interface) - : pce_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : pce_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -77,7 +77,7 @@ public: set_intf(interface); } - pce_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~pce_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/pce_ctrl/joypad2.cpp b/src/devices/bus/pce_ctrl/joypad2.cpp index 2da64ed49ce..192fa78142f 100644 --- a/src/devices/bus/pce_ctrl/joypad2.cpp +++ b/src/devices/bus/pce_ctrl/joypad2.cpp @@ -99,14 +99,14 @@ ioport_constructor pce_joypad2_turbo_device::device_input_ports() const // pce_joypad2_device - constructor //------------------------------------------------- -pce_joypad2_device::pce_joypad2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +pce_joypad2_device::pce_joypad2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_pce_control_port_interface(mconfig, *this), m_muxer(*this, "mux") { } -pce_joypad2_device::pce_joypad2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pce_joypad2_device::pce_joypad2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_joypad2_device(mconfig, PCE_JOYPAD2, tag, owner, clock) { } @@ -116,7 +116,7 @@ pce_joypad2_device::pce_joypad2_device(const machine_config &mconfig, const char // pce_joypad2_turbo_device - constructor //------------------------------------------------- -pce_joypad2_turbo_device::pce_joypad2_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pce_joypad2_turbo_device::pce_joypad2_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_joypad2_device(mconfig, PCE_JOYPAD2_TURBO, tag, owner, clock), m_buttons_io(*this, "BUTTONS"), m_turbo_io(*this, "TURBO"), diff --git a/src/devices/bus/pce_ctrl/joypad2.h b/src/devices/bus/pce_ctrl/joypad2.h index 13fc0cbe7de..b156bcd96b4 100644 --- a/src/devices/bus/pce_ctrl/joypad2.h +++ b/src/devices/bus/pce_ctrl/joypad2.h @@ -28,11 +28,11 @@ class pce_joypad2_device : public device_t, { public: // construction/destruction - pce_joypad2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pce_joypad2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - pce_joypad2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + pce_joypad2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; @@ -56,7 +56,7 @@ class pce_joypad2_turbo_device : public pce_joypad2_device { public: // construction/destruction - pce_joypad2_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pce_joypad2_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/pce_ctrl/joypad6.cpp b/src/devices/bus/pce_ctrl/joypad6.cpp index b11d400d5d1..101ab068cb5 100644 --- a/src/devices/bus/pce_ctrl/joypad6.cpp +++ b/src/devices/bus/pce_ctrl/joypad6.cpp @@ -131,7 +131,7 @@ ioport_constructor pce_arcade_pad_6_device::device_input_ports() const // pce_joypad6_base_device - constructor //------------------------------------------------- -pce_joypad6_base_device::pce_joypad6_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +pce_joypad6_base_device::pce_joypad6_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_pce_control_port_interface(mconfig, *this), m_muxer(*this, "mux_%u", 0U), @@ -146,7 +146,7 @@ pce_joypad6_base_device::pce_joypad6_base_device(const machine_config &mconfig, // pce_avenue_pad_6_device - constructor //------------------------------------------------- -pce_avenue_pad_6_device::pce_avenue_pad_6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +pce_avenue_pad_6_device::pce_avenue_pad_6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pce_joypad6_base_device(mconfig, type, tag, owner, clock), m_buttons_io(*this, "BUTTONS_%u", 0U), m_turbo_io(*this, "TURBO") @@ -154,7 +154,7 @@ pce_avenue_pad_6_device::pce_avenue_pad_6_device(const machine_config &mconfig, } -pce_avenue_pad_6_device::pce_avenue_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pce_avenue_pad_6_device::pce_avenue_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_avenue_pad_6_device(mconfig, PCE_AVENUE_PAD_6, tag, owner, clock) { } @@ -164,7 +164,7 @@ pce_avenue_pad_6_device::pce_avenue_pad_6_device(const machine_config &mconfig, // pce_arcade_pad_6_device - constructor //------------------------------------------------- -pce_arcade_pad_6_device::pce_arcade_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pce_arcade_pad_6_device::pce_arcade_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pce_avenue_pad_6_device(mconfig, PCE_ARCADE_PAD_6, tag, owner, clock) { } diff --git a/src/devices/bus/pce_ctrl/joypad6.h b/src/devices/bus/pce_ctrl/joypad6.h index fedac375a22..66b579309b6 100644 --- a/src/devices/bus/pce_ctrl/joypad6.h +++ b/src/devices/bus/pce_ctrl/joypad6.h @@ -31,7 +31,7 @@ public: protected: // construction/destruction - pce_joypad6_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + pce_joypad6_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -64,11 +64,11 @@ class pce_avenue_pad_6_device : public pce_joypad6_base_device { public: // construction/destruction - pce_avenue_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pce_avenue_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - pce_avenue_pad_6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + pce_avenue_pad_6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; @@ -90,7 +90,7 @@ class pce_arcade_pad_6_device : public pce_avenue_pad_6_device { public: // construction/destruction - pce_arcade_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pce_arcade_pad_6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/pce_ctrl/multitap.cpp b/src/devices/bus/pce_ctrl/multitap.cpp index 22d08658b77..f71961d73d7 100644 --- a/src/devices/bus/pce_ctrl/multitap.cpp +++ b/src/devices/bus/pce_ctrl/multitap.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(PCE_MULTITAP, pce_multitap_device, "pce_multitap", "NEC PC En // pce_multitap_device - constructor //------------------------------------------------- -pce_multitap_device::pce_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pce_multitap_device::pce_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCE_MULTITAP, tag, owner, clock), device_pce_control_port_interface(mconfig, *this), m_subctrl_port(*this, "ctrl%u", 1U), diff --git a/src/devices/bus/pce_ctrl/multitap.h b/src/devices/bus/pce_ctrl/multitap.h index 5dd3234114b..214053fff3c 100644 --- a/src/devices/bus/pce_ctrl/multitap.h +++ b/src/devices/bus/pce_ctrl/multitap.h @@ -27,7 +27,7 @@ class pce_multitap_device : public device_t, { public: // construction/destruction - pce_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pce_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pce_ctrl/pcectrl.cpp b/src/devices/bus/pce_ctrl/pcectrl.cpp index 71e2d9db525..a474b69e493 100644 --- a/src/devices/bus/pce_ctrl/pcectrl.cpp +++ b/src/devices/bus/pce_ctrl/pcectrl.cpp @@ -103,7 +103,7 @@ device_pce_control_port_interface::~device_pce_control_port_interface() // pce_control_port_device - constructor //------------------------------------------------- -pce_control_port_device::pce_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pce_control_port_device::pce_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCE_CONTROL_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_device(nullptr) diff --git a/src/devices/bus/pce_ctrl/pcectrl.h b/src/devices/bus/pce_ctrl/pcectrl.h index 3d190f5e1f3..ff5a180810d 100644 --- a/src/devices/bus/pce_ctrl/pcectrl.h +++ b/src/devices/bus/pce_ctrl/pcectrl.h @@ -27,7 +27,7 @@ public: // construction/destruction template pce_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pce_control_port_device(mconfig, tag, owner, 0) + : pce_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -35,7 +35,7 @@ public: set_fixed(false); } - pce_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pce_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~pce_control_port_device(); u8 port_r(); diff --git a/src/devices/bus/pet/2joysnd.cpp b/src/devices/bus/pet/2joysnd.cpp index 6d65b70542a..0e20f4a7e5c 100644 --- a/src/devices/bus/pet/2joysnd.cpp +++ b/src/devices/bus/pet/2joysnd.cpp @@ -95,7 +95,7 @@ ioport_constructor pet_userport_joystick_and_sound_device::device_input_ports() void pet_userport_joystick_and_sound_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.99); } //************************************************************************** @@ -106,7 +106,7 @@ void pet_userport_joystick_and_sound_device::device_add_mconfig(machine_config & // pet_user_port_dual_joystick_and_sound_device - constructor //------------------------------------------------- -pet_userport_joystick_and_sound_device::pet_userport_joystick_and_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_userport_joystick_and_sound_device::pet_userport_joystick_and_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_USERPORT_JOYSTICK_AND_SOUND_DEVICE, tag, owner, clock), device_pet_user_port_interface(mconfig, *this), m_dac(*this, "dac"), diff --git a/src/devices/bus/pet/2joysnd.h b/src/devices/bus/pet/2joysnd.h index 644d64fc564..6822c3a4bef 100644 --- a/src/devices/bus/pet/2joysnd.h +++ b/src/devices/bus/pet/2joysnd.h @@ -26,7 +26,7 @@ class pet_userport_joystick_and_sound_device : public device_t, public device_pe { public: // construction/destruction - pet_userport_joystick_and_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_userport_joystick_and_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_m ) override; diff --git a/src/devices/bus/pet/64k.cpp b/src/devices/bus/pet/64k.cpp index 7e335ba97ff..b03a0802217 100644 --- a/src/devices/bus/pet/64k.cpp +++ b/src/devices/bus/pet/64k.cpp @@ -76,7 +76,7 @@ inline void pet_64k_expansion_device::write_ram(offs_t offset, uint8_t data) // pet_64k_expansion_device - constructor //------------------------------------------------- -pet_64k_expansion_device::pet_64k_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_64k_expansion_device::pet_64k_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_64K, tag, owner, clock), device_pet_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", 0x10000, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/pet/64k.h b/src/devices/bus/pet/64k.h index 6b55cc3098e..02e30d1ab2c 100644 --- a/src/devices/bus/pet/64k.h +++ b/src/devices/bus/pet/64k.h @@ -25,7 +25,7 @@ class pet_64k_expansion_device : public device_t, public device_pet_expansion_ca { public: // construction/destruction - pet_64k_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_64k_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pet/c2n.cpp b/src/devices/bus/pet/c2n.cpp index 94f0dc4dca3..665102fedbc 100644 --- a/src/devices/bus/pet/c2n.cpp +++ b/src/devices/bus/pet/c2n.cpp @@ -42,7 +42,7 @@ void c2n_device::device_add_mconfig(machine_config &config) // c2n_device - constructor //------------------------------------------------- -c2n_device::c2n_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +c2n_device::c2n_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_pet_datassette_port_interface(mconfig, *this) , m_cassette(*this, "cassette") @@ -51,7 +51,7 @@ c2n_device::c2n_device(const machine_config &mconfig, device_type type, const ch { } -c2n_device::c2n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c2n_device::c2n_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c2n_device(mconfig, C2N, tag, owner, clock) { } @@ -61,7 +61,7 @@ c2n_device::c2n_device(const machine_config &mconfig, const char *tag, device_t // c1530_device - constructor //------------------------------------------------- -c1530_device::c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1530_device::c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c2n_device(mconfig, C1530, tag, owner, clock) { } @@ -71,7 +71,7 @@ c1530_device::c1530_device(const machine_config &mconfig, const char *tag, devic // c1531_device - constructor //------------------------------------------------- -c1531_device::c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1531_device::c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c2n_device(mconfig, C1531, tag, owner, clock) { } diff --git a/src/devices/bus/pet/c2n.h b/src/devices/bus/pet/c2n.h index 86d8e5df288..67824fc2977 100644 --- a/src/devices/bus/pet/c2n.h +++ b/src/devices/bus/pet/c2n.h @@ -28,10 +28,10 @@ class c2n_device : public device_t, { public: // construction/destruction - c2n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c2n_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - c2n_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c2n_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -63,7 +63,7 @@ class c1530_device : public c2n_device { public: // construction/destruction - c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -73,7 +73,7 @@ class c1531_device : public c2n_device { public: // construction/destruction - c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/pet/cass.cpp b/src/devices/bus/pet/cass.cpp index 301633e6d73..bea32856dfe 100644 --- a/src/devices/bus/pet/cass.cpp +++ b/src/devices/bus/pet/cass.cpp @@ -52,7 +52,7 @@ device_pet_datassette_port_interface::~device_pet_datassette_port_interface() // pet_datassette_port_device - constructor //------------------------------------------------- -pet_datassette_port_device::pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_datassette_port_device::pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_DATASSETTE_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_read_handler(*this), m_cart(nullptr) diff --git a/src/devices/bus/pet/cass.h b/src/devices/bus/pet/cass.h index a6a6eac11f9..2c6f484822d 100644 --- a/src/devices/bus/pet/cass.h +++ b/src/devices/bus/pet/cass.h @@ -44,7 +44,7 @@ class pet_datassette_port_device : public device_t, public device_single_card_sl public: template pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : pet_datassette_port_device(mconfig, tag, owner, 0) + : pet_datassette_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -52,7 +52,7 @@ public: set_fixed(false); } - pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~pet_datassette_port_device(); // static configuration helpers diff --git a/src/devices/bus/pet/cb2snd.cpp b/src/devices/bus/pet/cb2snd.cpp index b80d2efcce8..70e30bb10eb 100644 --- a/src/devices/bus/pet/cb2snd.cpp +++ b/src/devices/bus/pet/cb2snd.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(PET_USERPORT_CB2_SOUND_DEVICE, pet_userport_cb2_sound_device, void pet_userport_cb2_sound_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.99); } //************************************************************************** @@ -39,7 +39,7 @@ void pet_userport_cb2_sound_device::device_add_mconfig(machine_config &config) // pet_userport_cb2_sound_device - constructor //------------------------------------------------- -pet_userport_cb2_sound_device::pet_userport_cb2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_userport_cb2_sound_device::pet_userport_cb2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_USERPORT_CB2_SOUND_DEVICE, tag, owner, clock), device_pet_user_port_interface(mconfig, *this), m_dac(*this, "dac") diff --git a/src/devices/bus/pet/cb2snd.h b/src/devices/bus/pet/cb2snd.h index cd39cc5bbb8..c5b08100514 100644 --- a/src/devices/bus/pet/cb2snd.h +++ b/src/devices/bus/pet/cb2snd.h @@ -23,7 +23,7 @@ class pet_userport_cb2_sound_device : public device_t, { public: // construction/destruction - pet_userport_cb2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_userport_cb2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_m ) override; diff --git a/src/devices/bus/pet/diag.cpp b/src/devices/bus/pet/diag.cpp index 42e915e6d19..db40d342b5d 100644 --- a/src/devices/bus/pet/diag.cpp +++ b/src/devices/bus/pet/diag.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(PET_USERPORT_DIAGNOSTIC_CONNECTOR, pet_userport_diagnostic_co // pet_userport_diagnostic_connector_t - constructor //------------------------------------------------- -pet_userport_diagnostic_connector_device::pet_userport_diagnostic_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_userport_diagnostic_connector_device::pet_userport_diagnostic_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_USERPORT_DIAGNOSTIC_CONNECTOR, tag, owner, clock), device_pet_user_port_interface(mconfig, *this) { diff --git a/src/devices/bus/pet/diag.h b/src/devices/bus/pet/diag.h index 8bcf1bfd415..98fcf2721b1 100644 --- a/src/devices/bus/pet/diag.h +++ b/src/devices/bus/pet/diag.h @@ -25,7 +25,7 @@ class pet_userport_diagnostic_connector_device : public device_t, public device_ { public: // construction/destruction - pet_userport_diagnostic_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_userport_diagnostic_connector_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_pet_user_port_interface overrides virtual DECLARE_WRITE_LINE_MEMBER( input_2 ) override { output_b(state); } diff --git a/src/devices/bus/pet/diag264_lb_tape.cpp b/src/devices/bus/pet/diag264_lb_tape.cpp index afe5efab4dd..38345feb7f2 100644 --- a/src/devices/bus/pet/diag264_lb_tape.cpp +++ b/src/devices/bus/pet/diag264_lb_tape.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(DIAG264_CASSETTE_LOOPBACK, diag264_cassette_loopback_device, // diag264_cassette_loopback_device - constructor //------------------------------------------------- -diag264_cassette_loopback_device::diag264_cassette_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +diag264_cassette_loopback_device::diag264_cassette_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DIAG264_CASSETTE_LOOPBACK, tag, owner, clock) , device_pet_datassette_port_interface(mconfig, *this) , m_read(1) diff --git a/src/devices/bus/pet/diag264_lb_tape.h b/src/devices/bus/pet/diag264_lb_tape.h index 6eb11fd395d..4ac7756986b 100644 --- a/src/devices/bus/pet/diag264_lb_tape.h +++ b/src/devices/bus/pet/diag264_lb_tape.h @@ -26,7 +26,7 @@ class diag264_cassette_loopback_device : public device_t, { public: // construction/destruction - diag264_cassette_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diag264_cassette_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pet/exp.cpp b/src/devices/bus/pet/exp.cpp index aef8c5dfbf4..cc2409b9860 100644 --- a/src/devices/bus/pet/exp.cpp +++ b/src/devices/bus/pet/exp.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(PET_EXPANSION_SLOT, pet_expansion_slot_device, "pet_expansion // pet_expansion_slot_device - constructor //------------------------------------------------- -pet_expansion_slot_device::pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_expansion_slot_device::pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/pet/exp.h b/src/devices/bus/pet/exp.h index e8018bdd732..b2a3b6f5669 100644 --- a/src/devices/bus/pet/exp.h +++ b/src/devices/bus/pet/exp.h @@ -29,7 +29,7 @@ class pet_expansion_slot_device : public device_t, { public: template - pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : pet_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -38,7 +38,7 @@ public: set_fixed(false); } - pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~pet_expansion_slot_device(); auto dma_read_callback() { return m_read_dma.bind(); } diff --git a/src/devices/bus/pet/hsg.cpp b/src/devices/bus/pet/hsg.cpp index 7c6e7c657d6..894f4e46b3b 100644 --- a/src/devices/bus/pet/hsg.cpp +++ b/src/devices/bus/pet/hsg.cpp @@ -100,7 +100,7 @@ void cbm8000_hsg_a_device::device_add_mconfig(machine_config &config) screen.set_refresh_hz(25); PALETTE(config, "palette", palette_device::MONOCHROME); - EF9365(config, m_gdc, 1750000); + EF9365(config, m_gdc, XTAL::u(1750000)); m_gdc->set_screen(SCREEN_TAG); m_gdc->set_addrmap(0, &cbm8000_hsg_a_device::hsg_a_map); m_gdc->set_palette_tag("palette"); @@ -117,7 +117,7 @@ void cbm8000_hsg_b_device::device_add_mconfig(machine_config &config) screen.set_refresh_hz(50); PALETTE(config, "palette", palette_device::MONOCHROME); - EF9365(config, m_gdc, 1750000); //EF9366 + EF9365(config, m_gdc, XTAL::u(1750000)); //EF9366 m_gdc->set_screen(SCREEN_TAG); m_gdc->set_addrmap(0, &cbm8000_hsg_b_device::hsg_b_map); m_gdc->set_palette_tag("palette"); @@ -135,7 +135,7 @@ void cbm8000_hsg_b_device::device_add_mconfig(machine_config &config) // cbm8000_hsg_device - constructor //------------------------------------------------- -cbm8000_hsg_device::cbm8000_hsg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +cbm8000_hsg_device::cbm8000_hsg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_pet_expansion_card_interface(mconfig, *this), m_gdc(*this, EF9365_TAG), @@ -144,12 +144,12 @@ cbm8000_hsg_device::cbm8000_hsg_device(const machine_config &mconfig, device_typ { } -cbm8000_hsg_a_device::cbm8000_hsg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm8000_hsg_a_device::cbm8000_hsg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cbm8000_hsg_device(mconfig, CBM8000_HSG_A, tag, owner, clock) { } -cbm8000_hsg_b_device::cbm8000_hsg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cbm8000_hsg_b_device::cbm8000_hsg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cbm8000_hsg_device(mconfig, CBM8000_HSG_B, tag, owner, clock) { } diff --git a/src/devices/bus/pet/hsg.h b/src/devices/bus/pet/hsg.h index e86cb101ac3..62696045338 100644 --- a/src/devices/bus/pet/hsg.h +++ b/src/devices/bus/pet/hsg.h @@ -26,7 +26,7 @@ class cbm8000_hsg_device : public device_t, public device_pet_expansion_card_int { protected: // construction/destruction - cbm8000_hsg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cbm8000_hsg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -54,7 +54,7 @@ class cbm8000_hsg_a_device : public cbm8000_hsg_device { public: // construction/destruction - cbm8000_hsg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm8000_hsg_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -71,7 +71,7 @@ class cbm8000_hsg_b_device : public cbm8000_hsg_device { public: // construction/destruction - cbm8000_hsg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cbm8000_hsg_b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/pet/petuja.cpp b/src/devices/bus/pet/petuja.cpp index aee8c2a1f0f..63eeed343c0 100644 --- a/src/devices/bus/pet/petuja.cpp +++ b/src/devices/bus/pet/petuja.cpp @@ -60,7 +60,7 @@ ioport_constructor pet_userport_joystick_adapter_device::device_input_ports() co // pet_userport_joystick_adapter_device - constructor //------------------------------------------------- -pet_userport_joystick_adapter_device::pet_userport_joystick_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_userport_joystick_adapter_device::pet_userport_joystick_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_USERPORT_JOYSTICK_ADAPTER, tag, owner, clock), device_pet_user_port_interface(mconfig, *this), m_up1(1), diff --git a/src/devices/bus/pet/petuja.h b/src/devices/bus/pet/petuja.h index b268c0d1519..a4a9c0e54c5 100644 --- a/src/devices/bus/pet/petuja.h +++ b/src/devices/bus/pet/petuja.h @@ -27,7 +27,7 @@ class pet_userport_joystick_adapter_device : public device_t, { public: // construction/destruction - pet_userport_joystick_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_userport_joystick_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/pet/superpet.cpp b/src/devices/bus/pet/superpet.cpp index df5c0071600..c6e3a626693 100644 --- a/src/devices/bus/pet/superpet.cpp +++ b/src/devices/bus/pet/superpet.cpp @@ -77,7 +77,7 @@ void superpet_device::device_add_mconfig(machine_config &config) MOS6702(config, m_dongle, 16_MHz_XTAL / 16); - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(1.8432_MHz_XTAL); m_acia->irq_handler().set(FUNC(superpet_device::acia_irq_w)); m_acia->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); @@ -166,7 +166,7 @@ inline bool superpet_device::is_ram_writable() // superpet_device - constructor //------------------------------------------------- -superpet_device::superpet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +superpet_device::superpet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SUPERPET, tag, owner, clock), device_pet_expansion_card_interface(mconfig, *this), m_maincpu(*this, M6809_TAG), diff --git a/src/devices/bus/pet/superpet.h b/src/devices/bus/pet/superpet.h index 56c07df525f..9077ada1f88 100644 --- a/src/devices/bus/pet/superpet.h +++ b/src/devices/bus/pet/superpet.h @@ -28,7 +28,7 @@ class superpet_device : public device_t, { public: // construction/destruction - superpet_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + superpet_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pet/user.cpp b/src/devices/bus/pet/user.cpp index 574c6c9afe9..03ec82d699e 100644 --- a/src/devices/bus/pet/user.cpp +++ b/src/devices/bus/pet/user.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(PET_USER_PORT, pet_user_port_device, "pet_user_port", "PET user port") -pet_user_port_device::pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pet_user_port_device::pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PET_USER_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_2_handler(*this), diff --git a/src/devices/bus/pet/user.h b/src/devices/bus/pet/user.h index 4a6a64c3081..e907a2022ba 100644 --- a/src/devices/bus/pet/user.h +++ b/src/devices/bus/pet/user.h @@ -38,14 +38,14 @@ class pet_user_port_device : public device_t, public device_slot_interface public: template pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : pet_user_port_device(mconfig, tag, owner, 0) + : pet_user_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto p2_handler() { return m_2_handler.bind(); } auto p3_handler() { return m_3_handler.bind(); } diff --git a/src/devices/bus/plus4/c1551.cpp b/src/devices/bus/plus4/c1551.cpp index 42bca7daa57..16592c2a53f 100644 --- a/src/devices/bus/plus4/c1551.cpp +++ b/src/devices/bus/plus4/c1551.cpp @@ -344,7 +344,7 @@ void c1551_device::device_add_mconfig(machine_config &config) PLS100(config, m_pla); - TPI6525(config, m_tpi0, 0); + TPI6525(config, m_tpi0); m_tpi0->in_pa_cb().set(FUNC(c1551_device::tcbm_data_r)); m_tpi0->out_pa_cb().set(FUNC(c1551_device::tcbm_data_w)); m_tpi0->in_pb_cb().set(m_ga, FUNC(c64h156_device::yb_r)); @@ -352,7 +352,7 @@ void c1551_device::device_add_mconfig(machine_config &config) m_tpi0->in_pc_cb().set(FUNC(c1551_device::tpi0_pc_r)); m_tpi0->out_pc_cb().set(FUNC(c1551_device::tpi0_pc_w)); - TPI6525(config, m_tpi1, 0); + TPI6525(config, m_tpi1); m_tpi1->in_pa_cb().set(FUNC(c1551_device::tcbm_data_r)); m_tpi1->out_pa_cb().set(FUNC(c1551_device::tcbm_data_w)); m_tpi1->in_pb_cb().set(FUNC(c1551_device::tpi1_pb_r)); @@ -362,7 +362,7 @@ void c1551_device::device_add_mconfig(machine_config &config) C64H156(config, m_ga, XTAL(16'000'000)); m_ga->byte_callback().set(m_ga, FUNC(c64h156_device::atni_w)); - floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0", 0)); + floppy_connector &connector(FLOPPY_CONNECTOR(config, C64H156_TAG":0")); connector.option_add("525ssqd", FLOPPY_525_SSQD); connector.set_default_option("525ssqd"); connector.set_fixed(true); @@ -408,7 +408,7 @@ ioport_constructor c1551_device::device_input_ports() const // c1551_device - constructor //------------------------------------------------- -c1551_device::c1551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c1551_device::c1551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C1551, tag, owner, clock) , device_plus4_expansion_card_interface(mconfig, *this) , m_maincpu(*this, M6510T_TAG) diff --git a/src/devices/bus/plus4/c1551.h b/src/devices/bus/plus4/c1551.h index eddad2c8046..b44f4275bd3 100644 --- a/src/devices/bus/plus4/c1551.h +++ b/src/devices/bus/plus4/c1551.h @@ -30,7 +30,7 @@ class c1551_device : public device_t, public device_plus4_expansion_card_interfa { public: // construction/destruction - c1551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c1551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/plus4/diag264_lb_user.cpp b/src/devices/bus/plus4/diag264_lb_user.cpp index a8e4dc32b8c..82113623c3d 100644 --- a/src/devices/bus/plus4/diag264_lb_user.cpp +++ b/src/devices/bus/plus4/diag264_lb_user.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(DIAG264_USER_PORT_LOOPBACK, diag264_user_port_loopback_device // diag264_user_port_loopback_device - constructor //------------------------------------------------- -diag264_user_port_loopback_device::diag264_user_port_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +diag264_user_port_loopback_device::diag264_user_port_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DIAG264_USER_PORT_LOOPBACK, tag, owner, clock) , device_pet_user_port_interface(mconfig, *this) { diff --git a/src/devices/bus/plus4/diag264_lb_user.h b/src/devices/bus/plus4/diag264_lb_user.h index dd45e469106..611d0c95f7c 100644 --- a/src/devices/bus/plus4/diag264_lb_user.h +++ b/src/devices/bus/plus4/diag264_lb_user.h @@ -25,7 +25,7 @@ class diag264_user_port_loopback_device : public device_t, public device_pet_use { public: // construction/destruction - diag264_user_port_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diag264_user_port_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/plus4/exp.cpp b/src/devices/bus/plus4/exp.cpp index 1086683c02a..ab260c33548 100644 --- a/src/devices/bus/plus4/exp.cpp +++ b/src/devices/bus/plus4/exp.cpp @@ -64,7 +64,7 @@ device_plus4_expansion_card_interface::~device_plus4_expansion_card_interface() // plus4_expansion_slot_device - constructor //------------------------------------------------- -plus4_expansion_slot_device::plus4_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +plus4_expansion_slot_device::plus4_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PLUS4_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h index bac19750c2d..2744e46dae8 100644 --- a/src/devices/bus/plus4/exp.h +++ b/src/devices/bus/plus4/exp.h @@ -57,7 +57,7 @@ class plus4_expansion_slot_device : public device_t, public: // construction/destruction template - plus4_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + plus4_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : plus4_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -65,7 +65,7 @@ public: set_default_option(dflt); set_fixed(false); } - plus4_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + plus4_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_wr_callback() { return m_write_irq.bind(); } auto cd_rd_callback() { return m_read_dma_cd.bind(); } @@ -81,7 +81,7 @@ public: void dma_cd_w(offs_t offset, uint8_t data) { m_write_dma_cd(offset, data); } DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); } DECLARE_WRITE_LINE_MEMBER( aec_w ) { m_write_aec(state); } - int phi2() { return clock(); } + XTAL phi2() { return clock(); } protected: // device-level overrides diff --git a/src/devices/bus/plus4/sid.cpp b/src/devices/bus/plus4/sid.cpp index b5c6e9d897f..5c0b9dcfbb6 100644 --- a/src/devices/bus/plus4/sid.cpp +++ b/src/devices/bus/plus4/sid.cpp @@ -82,7 +82,7 @@ void plus4_sid_cartridge_device::device_add_mconfig(machine_config &config) // plus4_sid_cartridge_device - constructor //------------------------------------------------- -plus4_sid_cartridge_device::plus4_sid_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +plus4_sid_cartridge_device::plus4_sid_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PLUS4_SID, tag, owner, clock), device_plus4_expansion_card_interface(mconfig, *this), m_sid(*this, MOS8580_TAG), diff --git a/src/devices/bus/plus4/sid.h b/src/devices/bus/plus4/sid.h index 1566381e6d2..73045f5a4e7 100644 --- a/src/devices/bus/plus4/sid.h +++ b/src/devices/bus/plus4/sid.h @@ -28,7 +28,7 @@ class plus4_sid_cartridge_device : public device_t, { public: // construction/destruction - plus4_sid_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + plus4_sid_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/plus4/std.cpp b/src/devices/bus/plus4/std.cpp index ed9e9ff83a5..73157b36292 100644 --- a/src/devices/bus/plus4/std.cpp +++ b/src/devices/bus/plus4/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(PLUS4_STD, plus4_standard_cartridge_device, "plus4_standard", // plus4_standard_cartridge_device - constructor //------------------------------------------------- -plus4_standard_cartridge_device::plus4_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +plus4_standard_cartridge_device::plus4_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PLUS4_STD, tag, owner, clock), device_plus4_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/plus4/std.h b/src/devices/bus/plus4/std.h index f1f3ae75328..6a3de9f252b 100644 --- a/src/devices/bus/plus4/std.h +++ b/src/devices/bus/plus4/std.h @@ -26,7 +26,7 @@ class plus4_standard_cartridge_device : public device_t, { public: // construction/destruction - plus4_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + plus4_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pofo/ccm.cpp b/src/devices/bus/pofo/ccm.cpp index d491af7266f..aa9ff2767f4 100644 --- a/src/devices/bus/pofo/ccm.cpp +++ b/src/devices/bus/pofo/ccm.cpp @@ -45,7 +45,7 @@ device_portfolio_memory_card_slot_interface::device_portfolio_memory_card_slot_i // portfolio_memory_card_slot_device - constructor //------------------------------------------------- -portfolio_memory_card_slot_device::portfolio_memory_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +portfolio_memory_card_slot_device::portfolio_memory_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PORTFOLIO_MEMORY_CARD_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_memcard_image_interface(mconfig, *this), diff --git a/src/devices/bus/pofo/ccm.h b/src/devices/bus/pofo/ccm.h index 53e3c7a65ea..0605dc919d8 100644 --- a/src/devices/bus/pofo/ccm.h +++ b/src/devices/bus/pofo/ccm.h @@ -98,7 +98,7 @@ public: // construction/destruction template portfolio_memory_card_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : portfolio_memory_card_slot_device(mconfig, tag, owner, 0) + : portfolio_memory_card_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -106,7 +106,7 @@ public: set_fixed(false); } - portfolio_memory_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + portfolio_memory_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // computer interface bool cdet_r() { return (m_card != nullptr) ? m_card->cdet() : 1; } diff --git a/src/devices/bus/pofo/exp.cpp b/src/devices/bus/pofo/exp.cpp index 8dc14ecfd03..cba649e965a 100644 --- a/src/devices/bus/pofo/exp.cpp +++ b/src/devices/bus/pofo/exp.cpp @@ -47,7 +47,7 @@ WRITE_LINE_MEMBER( device_portfolio_expansion_slot_interface::wake_w ) { m_slot- // portfolio_expansion_slot_device - constructor //------------------------------------------------- -portfolio_expansion_slot_device::portfolio_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +portfolio_expansion_slot_device::portfolio_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PORTFOLIO_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_eint(*this), diff --git a/src/devices/bus/pofo/exp.h b/src/devices/bus/pofo/exp.h index 0790aa04123..30e63837c07 100644 --- a/src/devices/bus/pofo/exp.h +++ b/src/devices/bus/pofo/exp.h @@ -89,7 +89,7 @@ class portfolio_expansion_slot_device : public device_t, public device_single_ca public: // construction/destruction template - portfolio_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + portfolio_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : portfolio_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -98,7 +98,7 @@ public: set_fixed(false); } - portfolio_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + portfolio_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto eint_wr_callback() { return m_write_eint.bind(); } auto nmio_wr_callback() { return m_write_nmio.bind(); } diff --git a/src/devices/bus/pofo/hpc101.cpp b/src/devices/bus/pofo/hpc101.cpp index 692c42ae7fc..210ae88004e 100644 --- a/src/devices/bus/pofo/hpc101.cpp +++ b/src/devices/bus/pofo/hpc101.cpp @@ -68,7 +68,7 @@ void pofo_hpc101_device::device_add_mconfig(machine_config &config) // pofo_hpc101_device - constructor //------------------------------------------------- -pofo_hpc101_device::pofo_hpc101_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pofo_hpc101_device::pofo_hpc101_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, POFO_HPC101, tag, owner, clock), device_portfolio_expansion_slot_interface(mconfig, *this), m_ppi(*this, M82C55A_TAG) diff --git a/src/devices/bus/pofo/hpc101.h b/src/devices/bus/pofo/hpc101.h index fa18b5d6d4d..152440ba049 100644 --- a/src/devices/bus/pofo/hpc101.h +++ b/src/devices/bus/pofo/hpc101.h @@ -27,7 +27,7 @@ class pofo_hpc101_device : public device_t, public device_portfolio_expansion_sl { public: // construction/destruction - pofo_hpc101_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pofo_hpc101_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pofo/hpc102.cpp b/src/devices/bus/pofo/hpc102.cpp index 00838036bf0..01c740e6219 100644 --- a/src/devices/bus/pofo/hpc102.cpp +++ b/src/devices/bus/pofo/hpc102.cpp @@ -58,7 +58,7 @@ void pofo_hpc102_device::device_add_mconfig(machine_config &config) // pofo_hpc102_device - constructor //------------------------------------------------- -pofo_hpc102_device::pofo_hpc102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pofo_hpc102_device::pofo_hpc102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, POFO_HPC102, tag, owner, clock), device_portfolio_expansion_slot_interface(mconfig, *this), m_uart(*this, M82C50A_TAG) diff --git a/src/devices/bus/pofo/hpc102.h b/src/devices/bus/pofo/hpc102.h index c7168b12787..d1d7f1bc82a 100644 --- a/src/devices/bus/pofo/hpc102.h +++ b/src/devices/bus/pofo/hpc102.h @@ -27,7 +27,7 @@ class pofo_hpc102_device : public device_t, public device_portfolio_expansion_sl { public: // construction/destruction - pofo_hpc102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pofo_hpc102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pofo/hpc104.cpp b/src/devices/bus/pofo/hpc104.cpp index 0d8953b20c6..c492e656029 100644 --- a/src/devices/bus/pofo/hpc104.cpp +++ b/src/devices/bus/pofo/hpc104.cpp @@ -95,7 +95,7 @@ ioport_constructor pofo_hpc104_2_device::device_input_ports() const // pofo_hpc104_device - constructor //------------------------------------------------- -pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_portfolio_expansion_slot_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -106,7 +106,7 @@ pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, device_typ { } -pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pofo_hpc104_device(mconfig, POFO_HPC104, tag, owner, clock) { } @@ -116,7 +116,7 @@ pofo_hpc104_device::pofo_hpc104_device(const machine_config &mconfig, const char // pofo_hpc104_2_device - constructor //------------------------------------------------- -pofo_hpc104_2_device::pofo_hpc104_2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pofo_hpc104_2_device::pofo_hpc104_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pofo_hpc104_device(mconfig, POFO_HPC104_2, tag, owner, clock) { } diff --git a/src/devices/bus/pofo/hpc104.h b/src/devices/bus/pofo/hpc104.h index d5d1c36c3d3..45a78faec87 100644 --- a/src/devices/bus/pofo/hpc104.h +++ b/src/devices/bus/pofo/hpc104.h @@ -28,10 +28,10 @@ class pofo_hpc104_device : public device_t, { public: // construction/destruction - pofo_hpc104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pofo_hpc104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - pofo_hpc104_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pofo_hpc104_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -71,7 +71,7 @@ class pofo_hpc104_2_device : public pofo_hpc104_device { public: // construction/destruction - pofo_hpc104_2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pofo_hpc104_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/pofo/ram.cpp b/src/devices/bus/pofo/ram.cpp index 7f1298b8b95..027cdd394fe 100644 --- a/src/devices/bus/pofo/ram.cpp +++ b/src/devices/bus/pofo/ram.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(PORTFOLIO_RAM_CARD, portfolio_ram_card_device, "portfolio_ram // portfolio_ram_card_device - constructor //------------------------------------------------- -portfolio_ram_card_device::portfolio_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +portfolio_ram_card_device::portfolio_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PORTFOLIO_RAM_CARD, tag, owner, clock), device_portfolio_memory_card_slot_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/bus/pofo/ram.h b/src/devices/bus/pofo/ram.h index 7217299a989..47fa1fbcb74 100644 --- a/src/devices/bus/pofo/ram.h +++ b/src/devices/bus/pofo/ram.h @@ -27,7 +27,7 @@ class portfolio_ram_card_device : public device_t, { public: // construction/destruction - portfolio_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + portfolio_ram_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/pofo/rom.cpp b/src/devices/bus/pofo/rom.cpp index 2e49c3df8dd..05aa1fee9b0 100644 --- a/src/devices/bus/pofo/rom.cpp +++ b/src/devices/bus/pofo/rom.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(PORTFOLIO_ROM_CARD, portfolio_rom_card_device, "portfolio_rom // portfolio_rom_card_device - constructor //------------------------------------------------- -portfolio_rom_card_device::portfolio_rom_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +portfolio_rom_card_device::portfolio_rom_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PORTFOLIO_ROM_CARD, tag, owner, clock), device_portfolio_memory_card_slot_interface(mconfig, *this) { diff --git a/src/devices/bus/pofo/rom.h b/src/devices/bus/pofo/rom.h index 6df19402a36..bbad55d288e 100644 --- a/src/devices/bus/pofo/rom.h +++ b/src/devices/bus/pofo/rom.h @@ -26,7 +26,7 @@ class portfolio_rom_card_device : public device_t, { public: // construction/destruction - portfolio_rom_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + portfolio_rom_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/psi_kbd/ergoline.cpp b/src/devices/bus/psi_kbd/ergoline.cpp index 7b892cf861b..e519e99fc1c 100644 --- a/src/devices/bus/psi_kbd/ergoline.cpp +++ b/src/devices/bus/psi_kbd/ergoline.cpp @@ -74,7 +74,7 @@ void ergoline_keyboard_device::device_add_mconfig(machine_config &config) // ergoline_keyboard_device - constructor //------------------------------------------------- -ergoline_keyboard_device::ergoline_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ergoline_keyboard_device::ergoline_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ERGOLINE_KEYBOARD, tag, owner, clock), device_psi_keyboard_interface(mconfig, *this) { diff --git a/src/devices/bus/psi_kbd/ergoline.h b/src/devices/bus/psi_kbd/ergoline.h index 3b3329d45cb..8655671cc14 100644 --- a/src/devices/bus/psi_kbd/ergoline.h +++ b/src/devices/bus/psi_kbd/ergoline.h @@ -26,7 +26,7 @@ class ergoline_keyboard_device : public device_t, public device_psi_keyboard_int { public: // construction/destruction - ergoline_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ergoline_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::KEYBOARD; } diff --git a/src/devices/bus/psi_kbd/hle.cpp b/src/devices/bus/psi_kbd/hle.cpp index 7fd1b02677f..03988bc7092 100644 --- a/src/devices/bus/psi_kbd/hle.cpp +++ b/src/devices/bus/psi_kbd/hle.cpp @@ -217,7 +217,7 @@ ioport_constructor psi_hle_keyboard_device::device_input_ports() const // psi_hle_keyboard_device - constructor //------------------------------------------------- -psi_hle_keyboard_device::psi_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psi_hle_keyboard_device::psi_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSI_HLE_KEYBOARD, tag, owner, clock), device_psi_keyboard_interface(mconfig, *this), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6"), diff --git a/src/devices/bus/psi_kbd/hle.h b/src/devices/bus/psi_kbd/hle.h index b563489ef22..1266e280679 100644 --- a/src/devices/bus/psi_kbd/hle.h +++ b/src/devices/bus/psi_kbd/hle.h @@ -27,7 +27,7 @@ class psi_hle_keyboard_device : public device_t, { public: // construction/destruction - psi_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psi_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/psi_kbd/psi_kbd.cpp b/src/devices/bus/psi_kbd/psi_kbd.cpp index 1ba3a0e2620..e59165a7ae1 100644 --- a/src/devices/bus/psi_kbd/psi_kbd.cpp +++ b/src/devices/bus/psi_kbd/psi_kbd.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(PSI_KEYBOARD_INTERFACE, psi_keyboard_bus_device, "psi_kbd", " // psi_keyboard_bus_device - constructor //------------------------------------------------- -psi_keyboard_bus_device::psi_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psi_keyboard_bus_device::psi_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSI_KEYBOARD_INTERFACE, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_kbd(nullptr), diff --git a/src/devices/bus/psi_kbd/psi_kbd.h b/src/devices/bus/psi_kbd/psi_kbd.h index 364ef98586a..a4a70a39142 100644 --- a/src/devices/bus/psi_kbd/psi_kbd.h +++ b/src/devices/bus/psi_kbd/psi_kbd.h @@ -46,14 +46,14 @@ class psi_keyboard_bus_device : public device_t, public device_single_card_slot_ public: // construction/destruction psi_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *dflt) - : psi_keyboard_bus_device(mconfig, tag, owner, (uint32_t)0) + : psi_keyboard_bus_device(mconfig, tag, owner) { option_reset(); psi_keyboard_devices(*this); set_default_option(dflt); set_fixed(false); } - psi_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psi_keyboard_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~psi_keyboard_bus_device(); // callbacks diff --git a/src/devices/bus/psx/analogue.cpp b/src/devices/bus/psx/analogue.cpp index 61feefeb311..805c75f41b7 100644 --- a/src/devices/bus/psx/analogue.cpp +++ b/src/devices/bus/psx/analogue.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(PSX_DUALSHOCK, psx_dualshock_device, "psx_dualshock_pad", "Playstation Dualshock Pad") DEFINE_DEVICE_TYPE(PSX_ANALOG_JOYSTICK, psx_analog_joystick_device, "psx_analog_joystick", "Playstation Analog Joystick") -psx_analog_controller_device::psx_analog_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, model mod) : +psx_analog_controller_device::psx_analog_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, model mod) : device_t(mconfig, type, tag, owner, clock), device_psx_controller_interface(mconfig, *this), m_model(mod), @@ -24,12 +24,12 @@ psx_analog_controller_device::psx_analog_controller_device(const machine_config { } -psx_dualshock_device::psx_dualshock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psx_dualshock_device::psx_dualshock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psx_analog_controller_device(mconfig, PSX_DUALSHOCK, tag, owner, clock, model::DUALSHOCK) { } -psx_analog_joystick_device::psx_analog_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psx_analog_joystick_device::psx_analog_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psx_analog_controller_device(mconfig, PSX_ANALOG_JOYSTICK, tag, owner, clock, model::JOYSTICK) { } diff --git a/src/devices/bus/psx/analogue.h b/src/devices/bus/psx/analogue.h index 09eaf9baa65..f4e1abd72f5 100644 --- a/src/devices/bus/psx/analogue.h +++ b/src/devices/bus/psx/analogue.h @@ -19,7 +19,7 @@ public: protected: enum class model { JOYSTICK, DUALSHOCK }; - psx_analog_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, model mod); + psx_analog_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, model mod); virtual void device_start() override { } virtual void device_reset() override; @@ -48,13 +48,13 @@ private: class psx_dualshock_device : public psx_analog_controller_device { public: - psx_dualshock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psx_dualshock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class psx_analog_joystick_device : public psx_analog_controller_device { public: - psx_analog_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psx_analog_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_BUS_PSX_ANALOGUE_H diff --git a/src/devices/bus/psx/ctlrport.cpp b/src/devices/bus/psx/ctlrport.cpp index 1e6158ff614..908b6ce91f4 100644 --- a/src/devices/bus/psx/ctlrport.cpp +++ b/src/devices/bus/psx/ctlrport.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(PSX_CONTROLLER_PORT, psx_controller_port_device, "psx DEFINE_DEVICE_TYPE(PSXCONTROLLERPORTS, psxcontrollerports_device, "psxcontrollerports", "Playstation Controller Bus") DEFINE_DEVICE_TYPE(PSX_STANDARD_CONTROLLER, psx_standard_controller_device, "psx_standard_controller", "Playstation Standard Controller") -psx_controller_port_device::psx_controller_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psx_controller_port_device::psx_controller_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_CONTROLLER_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_tx(false), @@ -27,7 +27,7 @@ void psx_controller_port_device::device_config_complete() void psx_controller_port_device::device_add_mconfig(machine_config &config) { - PSXCARD(config, m_card, 0); + PSXCARD(config, m_card); } void psx_controller_port_device::disable_card(bool state) @@ -38,7 +38,7 @@ void psx_controller_port_device::disable_card(bool state) m_card->disable(state); } -psxcontrollerports_device::psxcontrollerports_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psxcontrollerports_device::psxcontrollerports_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSXCONTROLLERPORTS, tag, owner, clock), m_port0(*this, "^port1"), m_port1(*this, "^port2"), @@ -177,7 +177,7 @@ void device_psx_controller_interface::sel_w(bool state) { m_sel = state; } -psx_standard_controller_device::psx_standard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psx_standard_controller_device::psx_standard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_STANDARD_CONTROLLER, tag, owner, clock), device_psx_controller_interface(mconfig, *this), m_pad0(*this, "PSXPAD0"), diff --git a/src/devices/bus/psx/ctlrport.h b/src/devices/bus/psx/ctlrport.h index 5c8fc82dd22..baf48895c4b 100644 --- a/src/devices/bus/psx/ctlrport.h +++ b/src/devices/bus/psx/ctlrport.h @@ -65,7 +65,7 @@ class psx_standard_controller_device : public device_t, public device_psx_controller_interface { public: - psx_standard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psx_standard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; @@ -82,7 +82,7 @@ private: class psxcontrollerports_device : public device_t { public: - psxcontrollerports_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxcontrollerports_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void ack(); @@ -110,14 +110,14 @@ class psx_controller_port_device : public device_t, public: template psx_controller_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : psx_controller_port_device(mconfig, tag, owner, (uint32_t)0) + : psx_controller_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - psx_controller_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psx_controller_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); typedef delegate void_cb; void ack() { if(!ack_cb.isnull()) ack_cb(); } diff --git a/src/devices/bus/psx/gamebooster.cpp b/src/devices/bus/psx/gamebooster.cpp index 1c414ca41a2..96416856073 100644 --- a/src/devices/bus/psx/gamebooster.cpp +++ b/src/devices/bus/psx/gamebooster.cpp @@ -46,7 +46,7 @@ ROM_END // psx_gamebooster_device - constructor //------------------------------------------------- -psx_gamebooster_device::psx_gamebooster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +psx_gamebooster_device::psx_gamebooster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_GAMEBOOSTER, tag, owner, clock) , psx_parallel_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/bus/psx/gamebooster.h b/src/devices/bus/psx/gamebooster.h index 9e990f726d5..caa6b08a0db 100644 --- a/src/devices/bus/psx/gamebooster.h +++ b/src/devices/bus/psx/gamebooster.h @@ -22,7 +22,7 @@ class psx_gamebooster_device : { public: // construction/destruction - psx_gamebooster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psx_gamebooster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // psx_parallel_interface implementation virtual uint16_t exp_r(offs_t offset, uint16_t mem_mask = ~0) override; diff --git a/src/devices/bus/psx/memcard.cpp b/src/devices/bus/psx/memcard.cpp index 682439ff76e..451115ed9ff 100644 --- a/src/devices/bus/psx/memcard.cpp +++ b/src/devices/bus/psx/memcard.cpp @@ -41,7 +41,7 @@ enum transfer_states state_end }; -psxcard_device::psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +psxcard_device::psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSXCARD, tag, owner, clock), device_memcard_image_interface(mconfig, *this), pkt_ptr(0), diff --git a/src/devices/bus/psx/memcard.h b/src/devices/bus/psx/memcard.h index a558f07164c..21705316c87 100644 --- a/src/devices/bus/psx/memcard.h +++ b/src/devices/bus/psx/memcard.h @@ -15,7 +15,7 @@ class psxcard_device : public device_t, public device_memcard_image_interface { public: - psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual bool is_reset_on_load() const noexcept override { return false; } virtual const char *file_extensions() const noexcept override { return "mc"; } diff --git a/src/devices/bus/psx/multitap.cpp b/src/devices/bus/psx/multitap.cpp index 5de09102287..447d9f56abc 100644 --- a/src/devices/bus/psx/multitap.cpp +++ b/src/devices/bus/psx/multitap.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(PSX_MULTITAP, psx_multitap_device, "psx_multitap", "Playstation Multitap") -psx_multitap_device::psx_multitap_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +psx_multitap_device::psx_multitap_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, PSX_MULTITAP, tag, owner, clock), device_psx_controller_interface(mconfig, *this), m_activeport(0), diff --git a/src/devices/bus/psx/multitap.h b/src/devices/bus/psx/multitap.h index 0ac7e6626f7..446eeedb8da 100644 --- a/src/devices/bus/psx/multitap.h +++ b/src/devices/bus/psx/multitap.h @@ -11,7 +11,7 @@ class psx_multitap_device : public device_t, public device_psx_controller_interface { public: - psx_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psx_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/psx/parallel.cpp b/src/devices/bus/psx/parallel.cpp index 8faf038cfec..01112b1cd79 100644 --- a/src/devices/bus/psx/parallel.cpp +++ b/src/devices/bus/psx/parallel.cpp @@ -46,7 +46,7 @@ psx_parallel_interface::~psx_parallel_interface() // psx_parallel_slot_device - constructor //------------------------------------------------- -psx_parallel_slot_device::psx_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psx_parallel_slot_device::psx_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_PARALLEL_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr) diff --git a/src/devices/bus/psx/parallel.h b/src/devices/bus/psx/parallel.h index 313a2ecc951..52fe3a43233 100644 --- a/src/devices/bus/psx/parallel.h +++ b/src/devices/bus/psx/parallel.h @@ -20,14 +20,14 @@ public: // construction/destruction template psx_parallel_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : psx_parallel_slot_device(mconfig, tag, owner, (uint32_t)0) + : psx_parallel_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - psx_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psx_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~psx_parallel_slot_device(); uint16_t exp_r(offs_t offset); diff --git a/src/devices/bus/qbus/dsd4432.cpp b/src/devices/bus/qbus/dsd4432.cpp index eebb97f05fc..7ff765f5e65 100644 --- a/src/devices/bus/qbus/dsd4432.cpp +++ b/src/devices/bus/qbus/dsd4432.cpp @@ -24,7 +24,7 @@ // device type definition DEFINE_DEVICE_TYPE(DSD4432, dsd4432_device, "dsd4432", "DSD A4432 Floppy Disk Interface") -dsd4432_device::dsd4432_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dsd4432_device::dsd4432_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DSD4432, tag, owner, clock) , device_qbus_card_interface(mconfig, *this) , m_bootstrap(*this, "bootstrap") diff --git a/src/devices/bus/qbus/dsd4432.h b/src/devices/bus/qbus/dsd4432.h index 6f59404077c..55f95036e6d 100644 --- a/src/devices/bus/qbus/dsd4432.h +++ b/src/devices/bus/qbus/dsd4432.h @@ -23,7 +23,7 @@ class dsd4432_device : public device_t, public device_qbus_card_interface { public: // device type constructor - dsd4432_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dsd4432_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/qbus/dvk_kgd.cpp b/src/devices/bus/qbus/dvk_kgd.cpp index 1c7f28c5fc8..92548fda2d7 100644 --- a/src/devices/bus/qbus/dvk_kgd.cpp +++ b/src/devices/bus/qbus/dvk_kgd.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(DVK_KGD, dvk_kgd_device, "kgd", "DVK KGD framebuffer") // dvk_kgd_device - constructor //------------------------------------------------- -dvk_kgd_device::dvk_kgd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dvk_kgd_device::dvk_kgd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DVK_KGD, tag, owner, clock) , device_qbus_card_interface(mconfig, *this) , m_screen(*this, "screen") diff --git a/src/devices/bus/qbus/dvk_kgd.h b/src/devices/bus/qbus/dvk_kgd.h index 8ecd4ef23e2..aa1cb031ae0 100644 --- a/src/devices/bus/qbus/dvk_kgd.h +++ b/src/devices/bus/qbus/dvk_kgd.h @@ -33,7 +33,7 @@ class dvk_kgd_device : public device_t, { public: // construction/destruction - dvk_kgd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dvk_kgd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/qbus/pc11.cpp b/src/devices/bus/qbus/pc11.cpp index 2fc73ada4df..014bb336658 100644 --- a/src/devices/bus/qbus/pc11.cpp +++ b/src/devices/bus/qbus/pc11.cpp @@ -54,7 +54,7 @@ const char* pc11_regnames[] = { // pc11_device - constructor //------------------------------------------------- -pc11_device::pc11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc11_device::pc11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_reader_device(mconfig, DEC_PC11, tag, owner, clock) , device_qbus_card_interface(mconfig, *this) , m_rxvec(070) diff --git a/src/devices/bus/qbus/pc11.h b/src/devices/bus/qbus/pc11.h index cbc0d134f47..9a938a57fa6 100644 --- a/src/devices/bus/qbus/pc11.h +++ b/src/devices/bus/qbus/pc11.h @@ -34,7 +34,7 @@ class pc11_device : public paper_tape_reader_device, { public: // construction/destruction - pc11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual const char *image_interface() const noexcept override { return "pdp11_ptap"; } diff --git a/src/devices/bus/qbus/qbus.cpp b/src/devices/bus/qbus/qbus.cpp index c159bb976ff..b6866f12165 100644 --- a/src/devices/bus/qbus/qbus.cpp +++ b/src/devices/bus/qbus/qbus.cpp @@ -53,7 +53,7 @@ device_qbus_card_interface::device_qbus_card_interface(const machine_config &mco //------------------------------------------------- // qbus_slot_device - constructor //------------------------------------------------- -qbus_slot_device::qbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +qbus_slot_device::qbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QBUS_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), m_write_birq4(*this), @@ -88,7 +88,7 @@ void qbus_slot_device::device_start() // qbus_device - constructor //------------------------------------------------- -qbus_device::qbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +qbus_device::qbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QBUS, tag, owner, clock), device_memory_interface(mconfig, *this), device_z80daisy_interface(mconfig, *this), diff --git a/src/devices/bus/qbus/qbus.h b/src/devices/bus/qbus/qbus.h index 3b5ca881292..6b091185a61 100644 --- a/src/devices/bus/qbus/qbus.h +++ b/src/devices/bus/qbus/qbus.h @@ -60,12 +60,12 @@ public: // construction/destruction template qbus_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cputag, int spacenum) - : qbus_device(mconfig, tag, owner, (uint32_t)0) + : qbus_device(mconfig, tag, owner) { set_cputag(std::forward(cputag), spacenum); } - qbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + qbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ~qbus_device() { m_device_list.detach_all(); } @@ -135,7 +135,7 @@ public: set_default_option(dflt); set_fixed(false); } - qbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + qbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // computer interface DECLARE_WRITE_LINE_MEMBER( biaki_w ) { if (m_card) m_card->biaki_w(state); } diff --git a/src/devices/bus/qbus/qtx.cpp b/src/devices/bus/qbus/qtx.cpp index b4e684577d1..08140fa27ee 100644 --- a/src/devices/bus/qbus/qtx.cpp +++ b/src/devices/bus/qbus/qtx.cpp @@ -29,7 +29,7 @@ Other: LED, 20MHz crystal. Next to the MC68901P is another chip just as large (4 DEFINE_DEVICE_TYPE(TTI_QTS1, qts1_device, "qts1", "TTI QTS-1 SCSI Host Adapter") -qts1_device::qts1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +qts1_device::qts1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTI_QTS1, tag, owner, clock) , device_qbus_card_interface(mconfig, *this) , m_localcpu(*this, "localcpu") diff --git a/src/devices/bus/qbus/qtx.h b/src/devices/bus/qbus/qtx.h index 99c38f9f3ec..f5a817e42e5 100644 --- a/src/devices/bus/qbus/qtx.h +++ b/src/devices/bus/qbus/qtx.h @@ -21,7 +21,7 @@ class qts1_device : public device_t, public device_qbus_card_interface { public: // device type constructor - qts1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + qts1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ql/cst_q_plus4.cpp b/src/devices/bus/ql/cst_q_plus4.cpp index 96269dc6ef5..13cabc98e59 100644 --- a/src/devices/bus/ql/cst_q_plus4.cpp +++ b/src/devices/bus/ql/cst_q_plus4.cpp @@ -52,7 +52,7 @@ const tiny_rom_entry *cst_q_plus4_device::device_rom_region() const void cst_q_plus4_device::device_add_mconfig(machine_config &config) { - PIA6821(config, MC6821_TAG, 0); + PIA6821(config, MC6821_TAG); QL_EXPANSION_SLOT(config, m_exp1, DERIVED_CLOCK(1, 1), ql_expansion_cards, nullptr); m_exp1->extintl_wr_callback().set(FUNC(cst_q_plus4_device::exp1_extintl_w)); @@ -77,7 +77,7 @@ void cst_q_plus4_device::device_add_mconfig(machine_config &config) // cst_q_plus4_device - constructor //------------------------------------------------- -cst_q_plus4_device::cst_q_plus4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cst_q_plus4_device::cst_q_plus4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CST_Q_PLUS4, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this), m_exp1(*this, "exp1"), diff --git a/src/devices/bus/ql/cst_q_plus4.h b/src/devices/bus/ql/cst_q_plus4.h index 4c8ea616f51..5e5a16f8c04 100644 --- a/src/devices/bus/ql/cst_q_plus4.h +++ b/src/devices/bus/ql/cst_q_plus4.h @@ -26,7 +26,7 @@ class cst_q_plus4_device : public device_t, public device_ql_expansion_card_inte { public: // construction/destruction - cst_q_plus4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cst_q_plus4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ql/cst_qdisc.cpp b/src/devices/bus/ql/cst_qdisc.cpp index 2fe46dc4f5e..e3e4112b3d3 100644 --- a/src/devices/bus/ql/cst_qdisc.cpp +++ b/src/devices/bus/ql/cst_qdisc.cpp @@ -51,7 +51,7 @@ const tiny_rom_entry *cst_ql_disc_interface_device::device_rom_region() const // cst_ql_disc_interface_device - constructor //------------------------------------------------- -cst_ql_disc_interface_device::cst_ql_disc_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cst_ql_disc_interface_device::cst_ql_disc_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CST_QL_DISC_INTERFACE, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/cst_qdisc.h b/src/devices/bus/ql/cst_qdisc.h index fdd492f1230..87206ae8a2d 100644 --- a/src/devices/bus/ql/cst_qdisc.h +++ b/src/devices/bus/ql/cst_qdisc.h @@ -26,7 +26,7 @@ class cst_ql_disc_interface_device : public device_t, { public: // construction/destruction - cst_ql_disc_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cst_ql_disc_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/cumana_fdi.cpp b/src/devices/bus/ql/cumana_fdi.cpp index 204dea12608..e73a21a103d 100644 --- a/src/devices/bus/ql/cumana_fdi.cpp +++ b/src/devices/bus/ql/cumana_fdi.cpp @@ -51,7 +51,7 @@ const tiny_rom_entry *cumana_floppy_disk_interface_device::device_rom_region() c // cumana_floppy_disk_interface_device - constructor //------------------------------------------------- -cumana_floppy_disk_interface_device::cumana_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cumana_floppy_disk_interface_device::cumana_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CUMANA_FLOPPY_DISK_INTERFACE, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/cumana_fdi.h b/src/devices/bus/ql/cumana_fdi.h index 2080251fcf3..4a7957892fd 100644 --- a/src/devices/bus/ql/cumana_fdi.h +++ b/src/devices/bus/ql/cumana_fdi.h @@ -25,7 +25,7 @@ class cumana_floppy_disk_interface_device : public device_t, public device_ql_ex { public: // construction/destruction - cumana_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cumana_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/exp.cpp b/src/devices/bus/ql/exp.cpp index aadb3905b86..cce48b3e552 100644 --- a/src/devices/bus/ql/exp.cpp +++ b/src/devices/bus/ql/exp.cpp @@ -50,7 +50,7 @@ void device_ql_expansion_card_interface::interface_post_start() // ql_expansion_slot_device - constructor //------------------------------------------------- -ql_expansion_slot_device::ql_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ql_expansion_slot_device::ql_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QL_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_ipl0l(*this), diff --git a/src/devices/bus/ql/exp.h b/src/devices/bus/ql/exp.h index 31948566bfd..1c9cbb580f1 100644 --- a/src/devices/bus/ql/exp.h +++ b/src/devices/bus/ql/exp.h @@ -84,7 +84,7 @@ class ql_expansion_slot_device : public device_t, public device_single_card_slot public: // construction/destruction template - ql_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + ql_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : ql_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -92,7 +92,7 @@ public: set_default_option(dflt); set_fixed(false); } - ql_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ql_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ipl0l_wr_callback() { return m_write_ipl0l.bind(); } auto ipl1l_wr_callback() { return m_write_ipl1l.bind(); } diff --git a/src/devices/bus/ql/kempston_di.cpp b/src/devices/bus/ql/kempston_di.cpp index 1535f171ff6..adc1778caa5 100644 --- a/src/devices/bus/ql/kempston_di.cpp +++ b/src/devices/bus/ql/kempston_di.cpp @@ -49,7 +49,7 @@ const tiny_rom_entry *kempston_disk_interface_device::device_rom_region() const // kempston_disk_interface_device - constructor //------------------------------------------------- -kempston_disk_interface_device::kempston_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +kempston_disk_interface_device::kempston_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KEMPSTON_DISK_INTERFACE, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/kempston_di.h b/src/devices/bus/ql/kempston_di.h index cc75a5fe0fc..7172ba35cda 100644 --- a/src/devices/bus/ql/kempston_di.h +++ b/src/devices/bus/ql/kempston_di.h @@ -25,7 +25,7 @@ class kempston_disk_interface_device : public device_t, public device_ql_expansi { public: // construction/destruction - kempston_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kempston_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/miracle_gold_card.cpp b/src/devices/bus/ql/miracle_gold_card.cpp index bf6be7fe136..871058db347 100644 --- a/src/devices/bus/ql/miracle_gold_card.cpp +++ b/src/devices/bus/ql/miracle_gold_card.cpp @@ -51,7 +51,7 @@ const tiny_rom_entry *miracle_gold_card_device::device_rom_region() const // miracle_gold_card_device - constructor //------------------------------------------------- -miracle_gold_card_device::miracle_gold_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +miracle_gold_card_device::miracle_gold_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIRACLE_GOLD_CARD, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/miracle_gold_card.h b/src/devices/bus/ql/miracle_gold_card.h index 7ed9d0e2eb8..c5931bcf77f 100644 --- a/src/devices/bus/ql/miracle_gold_card.h +++ b/src/devices/bus/ql/miracle_gold_card.h @@ -25,7 +25,7 @@ class miracle_gold_card_device : public device_t, public device_ql_expansion_car { public: // construction/destruction - miracle_gold_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + miracle_gold_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/miracle_hd.cpp b/src/devices/bus/ql/miracle_hd.cpp index f2f16715c72..b8464b64be9 100644 --- a/src/devices/bus/ql/miracle_hd.cpp +++ b/src/devices/bus/ql/miracle_hd.cpp @@ -49,7 +49,7 @@ const tiny_rom_entry *miracle_hard_disk_device::device_rom_region() const // miracle_hard_disk_device - constructor //------------------------------------------------- -miracle_hard_disk_device::miracle_hard_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +miracle_hard_disk_device::miracle_hard_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIRACLE_HARD_DISK, tag, owner, clock), device_ql_rom_cartridge_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/miracle_hd.h b/src/devices/bus/ql/miracle_hd.h index 983dce66f8b..37210b346c8 100644 --- a/src/devices/bus/ql/miracle_hd.h +++ b/src/devices/bus/ql/miracle_hd.h @@ -26,7 +26,7 @@ class miracle_hard_disk_device : public device_t, { public: // construction/destruction - miracle_hard_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + miracle_hard_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/mp_fdi.cpp b/src/devices/bus/ql/mp_fdi.cpp index 4e2a90ce52d..76c14e4cb46 100644 --- a/src/devices/bus/ql/mp_fdi.cpp +++ b/src/devices/bus/ql/mp_fdi.cpp @@ -49,7 +49,7 @@ const tiny_rom_entry *micro_peripherals_floppy_disk_interface_device::device_rom // micro_peripherals_floppy_disk_interface_device - constructor //------------------------------------------------- -micro_peripherals_floppy_disk_interface_device::micro_peripherals_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +micro_peripherals_floppy_disk_interface_device::micro_peripherals_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MICRO_PERIPHERALS_FLOPPY_DISK_INTERFACE, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/mp_fdi.h b/src/devices/bus/ql/mp_fdi.h index 3fc9d9d8c83..fc1fbdcddf2 100644 --- a/src/devices/bus/ql/mp_fdi.h +++ b/src/devices/bus/ql/mp_fdi.h @@ -24,7 +24,7 @@ class micro_peripherals_floppy_disk_interface_device : public device_t, public d { public: // construction/destruction - micro_peripherals_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + micro_peripherals_floppy_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/opd_basic_master.cpp b/src/devices/bus/ql/opd_basic_master.cpp index b3b6f18dc19..3081ea7ffc7 100644 --- a/src/devices/bus/ql/opd_basic_master.cpp +++ b/src/devices/bus/ql/opd_basic_master.cpp @@ -47,7 +47,7 @@ const tiny_rom_entry *opd_basic_master_device::device_rom_region() const // opd_basic_master_device - constructor //------------------------------------------------- -opd_basic_master_device::opd_basic_master_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +opd_basic_master_device::opd_basic_master_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OPD_BASIC_MASTER, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/opd_basic_master.h b/src/devices/bus/ql/opd_basic_master.h index 3592823dd2b..976f97bc135 100644 --- a/src/devices/bus/ql/opd_basic_master.h +++ b/src/devices/bus/ql/opd_basic_master.h @@ -25,7 +25,7 @@ class opd_basic_master_device : public device_t, public device_ql_expansion_card { public: // construction/destruction - opd_basic_master_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + opd_basic_master_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/pcml_qdisk.cpp b/src/devices/bus/ql/pcml_qdisk.cpp index ed92c569509..87c279f7dac 100644 --- a/src/devices/bus/ql/pcml_qdisk.cpp +++ b/src/devices/bus/ql/pcml_qdisk.cpp @@ -49,7 +49,7 @@ const tiny_rom_entry *pcml_q_disk_interface_device::device_rom_region() const // pcml_q_disk_interface_device - constructor //------------------------------------------------- -pcml_q_disk_interface_device::pcml_q_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pcml_q_disk_interface_device::pcml_q_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCML_Q_DISK_INTERFACE, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/pcml_qdisk.h b/src/devices/bus/ql/pcml_qdisk.h index cedd3f953f7..74480c9c0de 100644 --- a/src/devices/bus/ql/pcml_qdisk.h +++ b/src/devices/bus/ql/pcml_qdisk.h @@ -25,7 +25,7 @@ class pcml_q_disk_interface_device : public device_t, public device_ql_expansion { public: // construction/destruction - pcml_q_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcml_q_disk_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/ql/qubide.cpp b/src/devices/bus/ql/qubide.cpp index 7ed66ef8886..0abe98a57d3 100644 --- a/src/devices/bus/ql/qubide.cpp +++ b/src/devices/bus/ql/qubide.cpp @@ -160,7 +160,7 @@ ioport_constructor qubide_device::device_input_ports() const // qubide_device - constructor //------------------------------------------------- -qubide_device::qubide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +qubide_device::qubide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QUBIDE, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this), m_ata(*this, "ata"), diff --git a/src/devices/bus/ql/qubide.h b/src/devices/bus/ql/qubide.h index 8f4d88d37ee..13c40449397 100644 --- a/src/devices/bus/ql/qubide.h +++ b/src/devices/bus/ql/qubide.h @@ -26,7 +26,7 @@ class qubide_device : public device_t, public device_ql_expansion_card_interface { public: // construction/destruction - qubide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + qubide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ql/rom.cpp b/src/devices/bus/ql/rom.cpp index a3186b9a5b8..14523499980 100644 --- a/src/devices/bus/ql/rom.cpp +++ b/src/devices/bus/ql/rom.cpp @@ -59,7 +59,7 @@ void device_ql_rom_cartridge_card_interface::interface_post_start() // ql_rom_cartridge_slot_device - constructor //------------------------------------------------- -ql_rom_cartridge_slot_device::ql_rom_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ql_rom_cartridge_slot_device::ql_rom_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QL_ROM_CARTRIDGE_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/ql/rom.h b/src/devices/bus/ql/rom.h index 690b3c231bc..88b3364e47b 100644 --- a/src/devices/bus/ql/rom.h +++ b/src/devices/bus/ql/rom.h @@ -76,14 +76,14 @@ public: // construction/destruction template ql_rom_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : ql_rom_cartridge_slot_device(mconfig, tag, owner, 0) + : ql_rom_cartridge_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - ql_rom_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ql_rom_cartridge_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // computer interface uint8_t read(offs_t offset, uint8_t data) { if (m_card) data = m_card->read(offset, data); return data; } diff --git a/src/devices/bus/ql/sandy_superdisk.cpp b/src/devices/bus/ql/sandy_superdisk.cpp index 45b0f3035a4..a458a996c6a 100644 --- a/src/devices/bus/ql/sandy_superdisk.cpp +++ b/src/devices/bus/ql/sandy_superdisk.cpp @@ -86,7 +86,7 @@ WRITE_LINE_MEMBER( sandy_super_disk_device::busy_w ) void sandy_super_disk_device::device_add_mconfig(machine_config &config) { - WD1772(config, m_fdc, 8000000); + WD1772(config, m_fdc, XTAL::u(8000000)); FLOPPY_CONNECTOR(config, m_floppy0, sandy_super_disk_floppies, "35dd", sandy_super_disk_device::floppy_formats); FLOPPY_CONNECTOR(config, m_floppy1, sandy_super_disk_floppies, nullptr, sandy_super_disk_device::floppy_formats); @@ -106,7 +106,7 @@ void sandy_super_disk_device::device_add_mconfig(machine_config &config) // sandy_super_disk_device - constructor //------------------------------------------------- -sandy_super_disk_device::sandy_super_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sandy_super_disk_device::sandy_super_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SANDY_SUPER_DISK, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this), m_fdc(*this, WD1772_TAG), diff --git a/src/devices/bus/ql/sandy_superdisk.h b/src/devices/bus/ql/sandy_superdisk.h index 8f821e953ad..80d85193148 100644 --- a/src/devices/bus/ql/sandy_superdisk.h +++ b/src/devices/bus/ql/sandy_superdisk.h @@ -29,7 +29,7 @@ class sandy_super_disk_device : public device_t, public device_ql_expansion_card { public: // construction/destruction - sandy_super_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sandy_super_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ql/sandy_superqboard.cpp b/src/devices/bus/ql/sandy_superqboard.cpp index ad1ce340524..05bdec1f658 100644 --- a/src/devices/bus/ql/sandy_superqboard.cpp +++ b/src/devices/bus/ql/sandy_superqboard.cpp @@ -207,12 +207,12 @@ ioport_constructor sandy_superqmouse_512k_device::device_input_ports() const // sandy_superqboard_device - constructor //------------------------------------------------- -sandy_superqboard_device::sandy_superqboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sandy_superqboard_device::sandy_superqboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sandy_superqboard_device(mconfig, SANDY_SUPERQBOARD, tag, owner, clock, 256*1024) { } -sandy_superqboard_device::sandy_superqboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int ram_size) : +sandy_superqboard_device::sandy_superqboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int ram_size) : device_t(mconfig, type, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this), m_fdc(*this, WD1772_TAG), @@ -230,17 +230,17 @@ sandy_superqboard_device::sandy_superqboard_device(const machine_config &mconfig { } -sandy_superqboard_512k_device::sandy_superqboard_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sandy_superqboard_512k_device::sandy_superqboard_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sandy_superqboard_device(mconfig, SANDY_SUPERQBOARD_512K, tag, owner, clock, 512*1024) { } -sandy_superqmouse_device::sandy_superqmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sandy_superqmouse_device::sandy_superqmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sandy_superqboard_device(mconfig, SANDY_SUPERQMOUSE, tag, owner, clock, 256*1024) { } -sandy_superqmouse_512k_device::sandy_superqmouse_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sandy_superqmouse_512k_device::sandy_superqmouse_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sandy_superqboard_device(mconfig, SANDY_SUPERQMOUSE_512K, tag, owner, clock, 512*1024) { } diff --git a/src/devices/bus/ql/sandy_superqboard.h b/src/devices/bus/ql/sandy_superqboard.h index 244d0e8a54f..287a9deebdc 100644 --- a/src/devices/bus/ql/sandy_superqboard.h +++ b/src/devices/bus/ql/sandy_superqboard.h @@ -29,13 +29,13 @@ class sandy_superqboard_device : public device_t, public device_ql_expansion_car { public: // construction/destruction - sandy_superqboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sandy_superqboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER( mouse_x_changed ); DECLARE_INPUT_CHANGED_MEMBER( mouse_y_changed ); protected: - sandy_superqboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int ram_size); + sandy_superqboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int ram_size); // device-level overrides virtual void device_start() override; @@ -91,7 +91,7 @@ class sandy_superqboard_512k_device : public sandy_superqboard_device { public: // construction/destruction - sandy_superqboard_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sandy_superqboard_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -101,7 +101,7 @@ class sandy_superqmouse_device : public sandy_superqboard_device { public: // construction/destruction - sandy_superqmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sandy_superqmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; @@ -114,7 +114,7 @@ class sandy_superqmouse_512k_device : public sandy_superqboard_device { public: // construction/destruction - sandy_superqmouse_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sandy_superqmouse_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/ql/std.cpp b/src/devices/bus/ql/std.cpp index 7524cc1693d..305f4f1a569 100644 --- a/src/devices/bus/ql/std.cpp +++ b/src/devices/bus/ql/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(QL_STANDARD_ROM_CARTRIDGE, ql_standard_rom_cartridge_device, // ql_standard_rom_cartridge_device - constructor //------------------------------------------------- -ql_standard_rom_cartridge_device::ql_standard_rom_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ql_standard_rom_cartridge_device::ql_standard_rom_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QL_STANDARD_ROM_CARTRIDGE, tag, owner, clock), device_ql_rom_cartridge_card_interface(mconfig, *this) { diff --git a/src/devices/bus/ql/std.h b/src/devices/bus/ql/std.h index 823c3a70008..f369a5f5771 100644 --- a/src/devices/bus/ql/std.h +++ b/src/devices/bus/ql/std.h @@ -25,7 +25,7 @@ class ql_standard_rom_cartridge_device : public device_t, public device_ql_rom_c { public: // construction/destruction - ql_standard_rom_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ql_standard_rom_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/ql/trumpcard.cpp b/src/devices/bus/ql/trumpcard.cpp index 7c51ad3c220..c33b4bc35fb 100644 --- a/src/devices/bus/ql/trumpcard.cpp +++ b/src/devices/bus/ql/trumpcard.cpp @@ -90,7 +90,7 @@ void ql_trump_card_device::floppy_formats(format_registration &fr) void ql_trump_card_device::device_add_mconfig(machine_config &config) { - WD1772(config, m_fdc, 8000000); + WD1772(config, m_fdc, XTAL::u(8000000)); FLOPPY_CONNECTOR(config, m_floppy0, ql_trump_card_floppies, "35dd", ql_trump_card_device::floppy_formats); FLOPPY_CONNECTOR(config, m_floppy1, ql_trump_card_floppies, nullptr, ql_trump_card_device::floppy_formats); } @@ -104,12 +104,12 @@ void ql_trump_card_device::device_add_mconfig(machine_config &config) // ql_trump_card_device - constructor //------------------------------------------------- -ql_trump_card_device::ql_trump_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ql_trump_card_device::ql_trump_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ql_trump_card_device(mconfig, QL_TRUMP_CARD, tag, owner, clock, 0) { } -ql_trump_card_device::ql_trump_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int ram_size) : +ql_trump_card_device::ql_trump_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int ram_size) : device_t(mconfig, type, tag, owner, clock), device_ql_expansion_card_interface(mconfig, *this), m_fdc(*this, WD1772_TAG), @@ -122,17 +122,17 @@ ql_trump_card_device::ql_trump_card_device(const machine_config &mconfig, device { } -ql_trump_card_256k_device::ql_trump_card_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ql_trump_card_256k_device::ql_trump_card_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ql_trump_card_device(mconfig, QL_TRUMP_CARD_256K, tag, owner, clock, 256*1024) { } -ql_trump_card_512k_device::ql_trump_card_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ql_trump_card_512k_device::ql_trump_card_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ql_trump_card_device(mconfig, QL_TRUMP_CARD_512K, tag, owner, clock, 512*1024) { } -ql_trump_card_768k_device::ql_trump_card_768k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ql_trump_card_768k_device::ql_trump_card_768k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ql_trump_card_device(mconfig, QL_TRUMP_CARD_768K, tag, owner, clock, 768*1024) { } diff --git a/src/devices/bus/ql/trumpcard.h b/src/devices/bus/ql/trumpcard.h index 42fad0633e1..8bc6ee48524 100644 --- a/src/devices/bus/ql/trumpcard.h +++ b/src/devices/bus/ql/trumpcard.h @@ -28,10 +28,10 @@ class ql_trump_card_device : public device_t, public device_ql_expansion_card_in { public: // construction/destruction - ql_trump_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ql_trump_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - ql_trump_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int ram_size); + ql_trump_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int ram_size); // device-level overrides virtual void device_start() override; @@ -66,7 +66,7 @@ class ql_trump_card_256k_device : public ql_trump_card_device { public: // construction/destruction - ql_trump_card_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ql_trump_card_256k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -76,7 +76,7 @@ class ql_trump_card_512k_device : public ql_trump_card_device { public: // construction/destruction - ql_trump_card_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ql_trump_card_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -86,7 +86,7 @@ class ql_trump_card_768k_device : public ql_trump_card_device { public: // construction/destruction - ql_trump_card_768k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ql_trump_card_768k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/rc2014/cf.cpp b/src/devices/bus/rc2014/cf.cpp index 9640853da86..a40380f45f0 100644 --- a/src/devices/bus/rc2014/cf.cpp +++ b/src/devices/bus/rc2014/cf.cpp @@ -21,7 +21,7 @@ class compact_flash_device : public device_t, public device_rc2014_card_interfac { public: // construction/destruction - compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -37,7 +37,7 @@ private: required_device m_ata; }; -compact_flash_device::compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +compact_flash_device::compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_COMPACT_FLASH, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_ata(*this, "ata") diff --git a/src/devices/bus/rc2014/clock.cpp b/src/devices/bus/rc2014/clock.cpp index bb73143edc2..dbbb097d7c6 100644 --- a/src/devices/bus/rc2014/clock.cpp +++ b/src/devices/bus/rc2014/clock.cpp @@ -21,7 +21,7 @@ class single_clock_device : public device_t, public device_rc2014_card_interface { public: // construction/destruction - single_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + single_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -31,7 +31,7 @@ protected: DECLARE_WRITE_LINE_MEMBER( clk_w ) { m_bus->clk_w(state); } }; -single_clock_device::single_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +single_clock_device::single_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_SINGLE_CLOCK, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) { @@ -61,7 +61,7 @@ class dual_clock_base : public device_t { protected: // construction/destruction - dual_clock_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + dual_clock_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -79,7 +79,7 @@ protected: required_ioport m_clk_sel_2; }; -dual_clock_base::dual_clock_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +dual_clock_base::dual_clock_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_clock_1(*this, "clock1") , m_clock_2(*this, "clock2") @@ -151,10 +151,10 @@ ioport_constructor dual_clock_base::device_input_ports() const void dual_clock_base::device_add_mconfig(machine_config &config) { - CLOCK(config, m_clock_1, 0); + CLOCK(config, m_clock_1); m_clock_1->signal_handler().set(FUNC(dual_clock_base::clk_w)); - CLOCK(config, m_clock_2, 0); + CLOCK(config, m_clock_2); m_clock_2->signal_handler().set(FUNC(dual_clock_base::clk2_w)); } @@ -166,7 +166,7 @@ class dual_clock_device : public dual_clock_base, public device_rc2014_ext_card_ { public: // construction/destruction - dual_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dual_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -177,7 +177,7 @@ protected: DECLARE_WRITE_LINE_MEMBER( clk2_w ) override { m_bus->clk2_w(state); } }; -dual_clock_device::dual_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dual_clock_device::dual_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dual_clock_base(mconfig, RC2014_DUAL_CLOCK, tag, owner, clock) , device_rc2014_ext_card_interface(mconfig, *this) { @@ -197,7 +197,7 @@ class dual_clock_device_40pin : public dual_clock_base, public device_rc2014_car { public: // construction/destruction - dual_clock_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dual_clock_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -208,7 +208,7 @@ protected: DECLARE_WRITE_LINE_MEMBER( clk2_w ) override { } }; -dual_clock_device_40pin::dual_clock_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dual_clock_device_40pin::dual_clock_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dual_clock_base(mconfig, RC2014_DUAL_CLOCK_40P, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) { diff --git a/src/devices/bus/rc2014/edge.cpp b/src/devices/bus/rc2014/edge.cpp index 5585c790d17..94a5bbc7802 100644 --- a/src/devices/bus/rc2014/edge.cpp +++ b/src/devices/bus/rc2014/edge.cpp @@ -21,10 +21,10 @@ class sc106_device : public device_t, public device_rc2014_rc80_card_interface { public: // construction/destruction - sc106_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sc106_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sc106_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + sc106_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -34,14 +34,14 @@ private: required_device m_rc80_bus; }; -sc106_device::sc106_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +sc106_device::sc106_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rc2014_rc80_card_interface(mconfig, *this) , m_rc80_bus(*this, ":bus") { } -sc106_device::sc106_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sc106_device::sc106_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sc106_device(mconfig, RC2014_SC106, tag, owner, clock) { } @@ -73,10 +73,10 @@ class sc107_device : public sc106_device { public: // construction/destruction - sc107_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sc107_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; -sc107_device::sc107_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sc107_device::sc107_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sc106_device(mconfig, RC2014_SC107, tag, owner, clock) { } @@ -92,10 +92,10 @@ class sc113_device : public sc106_device { public: // construction/destruction - sc113_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sc113_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; -sc113_device::sc113_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sc113_device::sc113_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sc106_device(mconfig, RC2014_SC113, tag, owner, clock) { } @@ -109,7 +109,7 @@ class sc141_device : public device_t, public device_rc2014_card_interface { public: // construction/destruction - sc141_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sc141_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -120,7 +120,7 @@ private: required_device m_rc40_bus; }; -sc141_device::sc141_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sc141_device::sc141_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_SC141, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_rc40_bus(*this, ":bus") @@ -157,7 +157,7 @@ class sc147_device : public device_t, public device_rc2014_card_interface { public: // construction/destruction - sc147_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sc147_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -168,7 +168,7 @@ private: required_device m_rc40_bus; }; -sc147_device::sc147_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sc147_device::sc147_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_SC147, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_rc40_bus(*this, ":bus") diff --git a/src/devices/bus/rc2014/fdc.cpp b/src/devices/bus/rc2014/fdc.cpp index ba8ce96d7ab..41cd7846744 100644 --- a/src/devices/bus/rc2014/fdc.cpp +++ b/src/devices/bus/rc2014/fdc.cpp @@ -25,7 +25,7 @@ class rc2014_fdc9266_device : public device_t, public device_rc2014_card_interfa { public: // construction/destruction - rc2014_fdc9266_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_fdc9266_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -42,7 +42,7 @@ private: required_device_array m_floppy; }; -rc2014_fdc9266_device::rc2014_fdc9266_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_fdc9266_device::rc2014_fdc9266_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_FDC9266, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_addr(*this, "SV1") @@ -151,7 +151,7 @@ class rc2014_wd37c65_device : public device_t, public device_rc2014_card_interfa { public: // construction/destruction - rc2014_wd37c65_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_wd37c65_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -169,7 +169,7 @@ private: required_device_array m_floppy; }; -rc2014_wd37c65_device::rc2014_wd37c65_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_wd37c65_device::rc2014_wd37c65_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_WD37C65, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_addr(*this, "SV1") diff --git a/src/devices/bus/rc2014/ide.cpp b/src/devices/bus/rc2014/ide.cpp index e81a168cba6..9a4b580af5b 100644 --- a/src/devices/bus/rc2014/ide.cpp +++ b/src/devices/bus/rc2014/ide.cpp @@ -21,7 +21,7 @@ class rc2014_ide_base : public device_t, public device_rc2014_card_interface { protected: // construction/destruction - rc2014_ide_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + rc2014_ide_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -41,7 +41,7 @@ protected: uint8_t m_prev; }; -rc2014_ide_base::rc2014_ide_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +rc2014_ide_base::rc2014_ide_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_ata(*this, "ata") @@ -56,7 +56,7 @@ void rc2014_ide_base::device_start() void rc2014_ide_base::device_add_mconfig(machine_config &config) { - I8255(config, m_ppi, 0); + I8255(config, m_ppi); m_ppi->in_pa_callback().set(FUNC(rc2014_ide_base::ppi_pa_r)); m_ppi->in_pb_callback().set(FUNC(rc2014_ide_base::ppi_pb_r)); m_ppi->out_pa_callback().set(FUNC(rc2014_ide_base::ppi_pa_w)); @@ -75,7 +75,7 @@ class rc2014_82c55_ide_device : public rc2014_ide_base { public: // construction/destruction - rc2014_82c55_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_82c55_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -93,7 +93,7 @@ private: uint8_t m_dior; }; -rc2014_82c55_ide_device::rc2014_82c55_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_82c55_ide_device::rc2014_82c55_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ide_base(mconfig, RC2014_82C55_IDE, tag, owner, clock) , m_sw(*this, "SW1") , m_jp(*this, "JP%u", 1U) @@ -206,7 +206,7 @@ class rc2014_ide_hdd_device : public rc2014_ide_base { public: // construction/destruction - rc2014_ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -218,7 +218,7 @@ private: required_ioport m_jp; }; -rc2014_ide_hdd_device::rc2014_ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_ide_hdd_device::rc2014_ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ide_base(mconfig, RC2014_IDE_HDD, tag, owner, clock) , m_jp(*this, "J1") { diff --git a/src/devices/bus/rc2014/micro.cpp b/src/devices/bus/rc2014/micro.cpp index f818dcd8c7f..be085f2dbe1 100644 --- a/src/devices/bus/rc2014/micro.cpp +++ b/src/devices/bus/rc2014/micro.cpp @@ -27,7 +27,7 @@ class rc2014_micro : public device_t, public device_rc2014_card_interface { public: // construction/destruction - rc2014_micro(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_micro(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: // device-level overrides @@ -55,7 +55,7 @@ private: static constexpr XTAL MAIN_CLOCK = XTAL(7'372'800); }; -rc2014_micro::rc2014_micro(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_micro::rc2014_micro(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_MICRO, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -121,7 +121,7 @@ void rc2014_micro::device_add_mconfig(machine_config &config) clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_txc)); clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->txd_handler().append(FUNC(rc2014_micro::tx_w)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -175,7 +175,7 @@ class rc2014_mini_cpm : public device_t, public device_rc2014_card_interface { public: // construction/destruction - rc2014_mini_cpm(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_mini_cpm(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -209,7 +209,7 @@ private: memory_bank_creator m_rambank; }; -rc2014_mini_cpm::rc2014_mini_cpm(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_mini_cpm::rc2014_mini_cpm(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_MINI_CPM, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_ata(*this, "ata") diff --git a/src/devices/bus/rc2014/ram.cpp b/src/devices/bus/rc2014/ram.cpp index dc7c89ae170..46ea505b9bb 100644 --- a/src/devices/bus/rc2014/ram.cpp +++ b/src/devices/bus/rc2014/ram.cpp @@ -20,7 +20,7 @@ class ram_32k_device : public device_t, public device_rc2014_card_interface { public: // construction/destruction - ram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -30,7 +30,7 @@ private: std::unique_ptr m_ram; }; -ram_32k_device::ram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ram_32k_device::ram_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_RAM_32K, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_ram(nullptr) @@ -59,7 +59,7 @@ class ram_64k_base : public device_t { protected: // construction/destruction - ram_64k_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + ram_64k_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -79,7 +79,7 @@ protected: required_ioport m_paged; }; -ram_64k_base::ram_64k_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +ram_64k_base::ram_64k_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_bank(0) , m_ram(nullptr) @@ -128,7 +128,7 @@ class ram_64k_device : public ram_64k_base, public device_rc2014_ext_card_interf { public: // construction/destruction - ram_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ram_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -139,7 +139,7 @@ protected: void update_banks() override; }; -ram_64k_device::ram_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ram_64k_device::ram_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ram_64k_base(mconfig, RC2014_RAM_64K, tag, owner, clock) , device_rc2014_ext_card_interface(mconfig, *this) { @@ -177,7 +177,7 @@ class ram_64k_device_40pin : public ram_64k_base, public device_rc2014_card_inte { public: // construction/destruction - ram_64k_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ram_64k_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -187,7 +187,7 @@ protected: void update_banks() override {}; }; -ram_64k_device_40pin::ram_64k_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ram_64k_device_40pin::ram_64k_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ram_64k_base(mconfig, RC2014_RAM_64K_40P, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) { diff --git a/src/devices/bus/rc2014/rc2014.cpp b/src/devices/bus/rc2014/rc2014.cpp index afe6ba6172a..589db6ebe63 100644 --- a/src/devices/bus/rc2014/rc2014.cpp +++ b/src/devices/bus/rc2014/rc2014.cpp @@ -17,7 +17,7 @@ // rc2014_bus_device //------------------------------------------------- -rc2014_bus_device::rc2014_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rc2014_bus_device::rc2014_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_installer{} , m_clk(*this) @@ -32,7 +32,7 @@ rc2014_bus_device::rc2014_bus_device(const machine_config &mconfig, device_type { } -rc2014_bus_device::rc2014_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rc2014_bus_device::rc2014_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_bus_device(mconfig, RC2014_BUS, tag, owner, clock) { } @@ -115,14 +115,14 @@ void device_rc2014_card_interface::set_bus_device(rc2014_bus_device *bus_device) // rc2014_slot_device //------------------------------------------------- -rc2014_slot_device::rc2014_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rc2014_slot_device::rc2014_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) { } -rc2014_slot_device::rc2014_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rc2014_slot_device::rc2014_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_slot_device(mconfig, RC2014_SLOT, tag, owner, clock) { } @@ -147,12 +147,12 @@ void rc2014_slot_device::device_resolve_objects() // rc2014_ext_bus_device //------------------------------------------------- -rc2014_ext_bus_device::rc2014_ext_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rc2014_ext_bus_device::rc2014_ext_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ext_bus_device(mconfig, RC2014_EXT_BUS, tag, owner, clock) { } -rc2014_ext_bus_device::rc2014_ext_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rc2014_ext_bus_device::rc2014_ext_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : rc2014_bus_device(mconfig, type, tag, owner, clock) , m_clk2(*this) , m_page(*this) @@ -199,12 +199,12 @@ void device_rc2014_ext_card_interface::set_bus_device(rc2014_ext_bus_device *bus // rc2014_ext_slot_device //------------------------------------------------- -rc2014_ext_slot_device::rc2014_ext_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rc2014_ext_slot_device::rc2014_ext_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ext_slot_device(mconfig, RC2014_EXT_SLOT, tag, owner, clock) { } -rc2014_ext_slot_device::rc2014_ext_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rc2014_ext_slot_device::rc2014_ext_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : rc2014_slot_device(mconfig, type, tag, owner, clock) { } @@ -230,12 +230,12 @@ void rc2014_ext_slot_device::device_resolve_objects() // rc2014_rc80_bus_device //------------------------------------------------- -rc2014_rc80_bus_device::rc2014_rc80_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rc2014_rc80_bus_device::rc2014_rc80_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_rc80_bus_device(mconfig, RC2014_RC80_BUS, tag, owner, clock) { } -rc2014_rc80_bus_device::rc2014_rc80_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rc2014_rc80_bus_device::rc2014_rc80_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ext_bus_device(mconfig, type, tag, owner, clock) { @@ -265,7 +265,7 @@ void device_rc2014_rc80_card_interface::set_bus_device(rc2014_rc80_bus_device *b // rc2014_rc80_slot_device //------------------------------------------------- -rc2014_rc80_slot_device::rc2014_rc80_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rc2014_rc80_slot_device::rc2014_rc80_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ext_slot_device(mconfig, RC2014_RC80_SLOT, tag, owner, clock) { } diff --git a/src/devices/bus/rc2014/rc2014.h b/src/devices/bus/rc2014/rc2014.h index a40355af389..5dc190b805a 100644 --- a/src/devices/bus/rc2014/rc2014.h +++ b/src/devices/bus/rc2014/rc2014.h @@ -74,7 +74,7 @@ class rc2014_bus_device : public device_t { public: // construction/destruction - rc2014_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rc2014_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~rc2014_bus_device(); auto clk_callback() { return m_clk.bind(); } @@ -103,7 +103,7 @@ public: const z80_daisy_config* get_daisy_chain(); protected: - rc2014_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rc2014_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; virtual void device_reset() override; @@ -144,7 +144,7 @@ protected: class rc2014_slot_device : public device_t, public device_slot_interface { public: - rc2014_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + rc2014_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); template rc2014_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option, bool fixed = false) @@ -158,7 +158,7 @@ public: } protected: - rc2014_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + rc2014_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; virtual void device_resolve_objects() override; @@ -176,7 +176,7 @@ class rc2014_ext_bus_device : public rc2014_bus_device { public: // construction/destruction - rc2014_ext_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rc2014_ext_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto clk2_callback() { return m_clk2.bind(); } auto page_callback() { return m_page.bind(); } @@ -199,7 +199,7 @@ public: DECLARE_WRITE_LINE_MEMBER( user8_w ) { m_user8(state); } protected: - rc2014_ext_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rc2014_ext_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -237,7 +237,7 @@ protected: class rc2014_ext_slot_device : public rc2014_slot_device { public: - rc2014_ext_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + rc2014_ext_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); template rc2014_ext_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option, bool fixed = false) @@ -251,7 +251,7 @@ public: } protected: - rc2014_ext_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + rc2014_ext_slot_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; virtual void device_resolve_objects() override; @@ -267,10 +267,10 @@ class rc2014_rc80_bus_device : public rc2014_ext_bus_device { public: // construction/destruction - rc2014_rc80_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rc2014_rc80_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - rc2014_rc80_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rc2014_rc80_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; }; @@ -297,7 +297,7 @@ protected: class rc2014_rc80_slot_device : public rc2014_ext_slot_device { public: - rc2014_rc80_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + rc2014_rc80_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); template rc2014_rc80_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus_tag, U &&slot_options, char const *default_option, bool fixed = false) diff --git a/src/devices/bus/rc2014/rom.cpp b/src/devices/bus/rc2014/rom.cpp index 61d0d8bb191..48a15c2b6e4 100644 --- a/src/devices/bus/rc2014/rom.cpp +++ b/src/devices/bus/rc2014/rom.cpp @@ -20,7 +20,7 @@ class switchable_rom_device : public device_t, public device_rc2014_card_interfa { public: // construction/destruction - switchable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + switchable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -33,7 +33,7 @@ private: required_ioport m_rom_selector; }; -switchable_rom_device::switchable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +switchable_rom_device::switchable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_SWITCHABLE_ROM, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_rom(*this, "rom") @@ -112,7 +112,7 @@ class pagable_rom_device : public device_t, public device_rc2014_ext_card_interf { public: // construction/destruction - pagable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pagable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -135,7 +135,7 @@ private: required_ioport_array<6> m_page_addr_conf; }; -pagable_rom_device::pagable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pagable_rom_device::pagable_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_PAGABLE_ROM, tag, owner, clock) , device_rc2014_ext_card_interface(mconfig, *this) , m_bank(0) diff --git a/src/devices/bus/rc2014/romram.cpp b/src/devices/bus/rc2014/romram.cpp index e0fcc03fa39..5840bc950eb 100644 --- a/src/devices/bus/rc2014/romram.cpp +++ b/src/devices/bus/rc2014/romram.cpp @@ -21,7 +21,7 @@ class rom_ram_512k_device : public device_t, public device_rc2014_card_interface { public: // construction/destruction - rom_ram_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rom_ram_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -43,7 +43,7 @@ private: required_device m_flash; }; -rom_ram_512k_device::rom_ram_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rom_ram_512k_device::rom_ram_512k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_ROM_RAM_512, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_page_reg{0,0,0,0} @@ -163,7 +163,7 @@ class sc119_device : public device_t, public device_rc2014_rc80_card_interface { public: // construction/destruction - sc119_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sc119_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -176,7 +176,7 @@ private: required_device m_flash; }; -sc119_device::sc119_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sc119_device::sc119_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_SC119, tag, owner, clock) , device_rc2014_rc80_card_interface(mconfig, *this) , m_ram(nullptr) diff --git a/src/devices/bus/rc2014/rtc.cpp b/src/devices/bus/rc2014/rtc.cpp index 4e8659c2771..20dfc29f271 100644 --- a/src/devices/bus/rc2014/rtc.cpp +++ b/src/devices/bus/rc2014/rtc.cpp @@ -21,7 +21,7 @@ class rc2014_ds1302_device : public device_t, public device_rc2014_card_interfac { public: // construction/destruction - rc2014_ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -37,7 +37,7 @@ private: required_ioport m_addr; }; -rc2014_ds1302_device::rc2014_ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_ds1302_device::rc2014_ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_DS1302_RTC, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_rtc(*this, "rtc") diff --git a/src/devices/bus/rc2014/serial.cpp b/src/devices/bus/rc2014/serial.cpp index 9453055f2ce..5cea66b6ee6 100644 --- a/src/devices/bus/rc2014/serial.cpp +++ b/src/devices/bus/rc2014/serial.cpp @@ -23,7 +23,7 @@ class serial_io_device : public device_t, public device_rc2014_card_interface { public: // construction/destruction - serial_io_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + serial_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -38,7 +38,7 @@ private: required_device m_acia; }; -serial_io_device::serial_io_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +serial_io_device::serial_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC2014_SERIAL_IO, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_acia(*this, "acia") @@ -75,7 +75,7 @@ DEVICE_INPUT_DEFAULTS_END void serial_io_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->txd_handler().append(FUNC(serial_io_device::tx_w)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -100,7 +100,7 @@ class dual_serial_base : public device_t { protected: // construction/destruction - dual_serial_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + dual_serial_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -120,7 +120,7 @@ protected: required_device m_sio; }; -dual_serial_base::dual_serial_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +dual_serial_base::dual_serial_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_clk_portb(0) , m_portb(*this, "JP1") @@ -139,7 +139,7 @@ void dual_serial_base::device_reset() void dual_serial_base::device_add_mconfig(machine_config &config) { - Z80SIO(config, m_sio, 0); + Z80SIO(config, m_sio); m_sio->out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd)); m_sio->out_txda_callback().append(FUNC(dual_serial_base::tx_w)); m_sio->out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -180,7 +180,7 @@ class dual_serial_device : public dual_serial_base, public device_rc2014_ext_car { public: // construction/destruction - dual_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dual_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -193,7 +193,7 @@ protected: DECLARE_WRITE_LINE_MEMBER( tx2_w ) override { m_bus->tx2_w(state); } }; -dual_serial_device::dual_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dual_serial_device::dual_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dual_serial_base(mconfig, RC2014_DUAL_SERIAL, tag, owner, clock) , device_rc2014_ext_card_interface(mconfig, *this) { @@ -230,7 +230,7 @@ class dual_serial_device_40pin : public dual_serial_base, public device_rc2014_c { public: // construction/destruction - dual_serial_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dual_serial_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -243,7 +243,7 @@ protected: DECLARE_WRITE_LINE_MEMBER( tx2_w ) override { } }; -dual_serial_device_40pin::dual_serial_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dual_serial_device_40pin::dual_serial_device_40pin(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dual_serial_base(mconfig, RC2014_DUAL_SERIAL_40P, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) { diff --git a/src/devices/bus/rc2014/sound.cpp b/src/devices/bus/rc2014/sound.cpp index 204d52f9f6c..d0d27df54bf 100644 --- a/src/devices/bus/rc2014/sound.cpp +++ b/src/devices/bus/rc2014/sound.cpp @@ -22,7 +22,7 @@ class rc2014_ym_ay_device : public device_t, public device_rc2014_card_interface { protected: // construction/destruction - rc2014_ym_ay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + rc2014_ym_ay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -34,7 +34,7 @@ protected: required_ioport_array<6> m_jp; }; -rc2014_ym_ay_device::rc2014_ym_ay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +rc2014_ym_ay_device::rc2014_ym_ay_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) , m_psg(*this, "psg") @@ -133,7 +133,7 @@ class rc2014_ym2149_device : public rc2014_ym_ay_device { public: // construction/destruction - rc2014_ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -141,7 +141,7 @@ protected: virtual void device_add_mconfig(machine_config &config) override; }; -rc2014_ym2149_device::rc2014_ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_ym2149_device::rc2014_ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ym_ay_device(mconfig, RC2014_YM2149_SOUND, tag, owner, clock) { } @@ -161,7 +161,7 @@ void rc2014_ym2149_device::device_add_mconfig(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2149(config, m_psg, 0); + YM2149(config, m_psg); m_psg->add_route(0, "rspeaker", 0.25); m_psg->add_route(2, "rspeaker", 0.25); m_psg->add_route(1, "lspeaker", 0.25); @@ -176,14 +176,14 @@ class rc2014_ay8190_device : public rc2014_ym_ay_device { public: // construction/destruction - rc2014_ay8190_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rc2014_ay8190_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides virtual void device_add_mconfig(machine_config &config) override; }; -rc2014_ay8190_device::rc2014_ay8190_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rc2014_ay8190_device::rc2014_ay8190_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rc2014_ym_ay_device(mconfig, RC2014_AY8190_SOUND, tag, owner, clock) { } @@ -193,7 +193,7 @@ void rc2014_ay8190_device::device_add_mconfig(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - AY8910(config, m_psg, 0); + AY8910(config, m_psg); m_psg->add_route(0, "rspeaker", 0.25); m_psg->add_route(2, "rspeaker", 0.25); m_psg->add_route(1, "lspeaker", 0.25); diff --git a/src/devices/bus/rc2014/z180cpu.cpp b/src/devices/bus/rc2014/z180cpu.cpp index c715970b299..0d7dd2f5a32 100644 --- a/src/devices/bus/rc2014/z180cpu.cpp +++ b/src/devices/bus/rc2014/z180cpu.cpp @@ -23,7 +23,7 @@ class z180cpu_base : public device_t, public device_rc2014_rc80_card_interface { protected: // construction/destruction - z180cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + z180cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -43,7 +43,7 @@ protected: static constexpr XTAL MAIN_CLOCK = XTAL(18'432'000); }; -z180cpu_base::z180cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +z180cpu_base::z180cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rc2014_rc80_card_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -109,14 +109,14 @@ class sc111_device : public z180cpu_base { public: // construction/destruction - sc111_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sc111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides virtual void device_start() override; }; -sc111_device::sc111_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sc111_device::sc111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180cpu_base(mconfig, RC2014_SC111, tag, owner, clock) { } diff --git a/src/devices/bus/rc2014/z80cpu.cpp b/src/devices/bus/rc2014/z80cpu.cpp index 9723c947e2e..d7cd0d200af 100644 --- a/src/devices/bus/rc2014/z80cpu.cpp +++ b/src/devices/bus/rc2014/z80cpu.cpp @@ -21,7 +21,7 @@ class z80cpu_base : public device_t { protected: // construction/destruction - z80cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + z80cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -34,7 +34,7 @@ protected: required_device m_maincpu; }; -z80cpu_base::z80cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +z80cpu_base::z80cpu_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_maincpu(*this, "maincpu") { @@ -60,7 +60,7 @@ class z80cpu_device : public z80cpu_base, public device_rc2014_card_interface { public: // construction/destruction - z80cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z80cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -68,7 +68,7 @@ protected: virtual void device_resolve_objects() override; }; -z80cpu_device::z80cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +z80cpu_device::z80cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80cpu_base(mconfig, RC2014_Z80CPU, tag, owner, clock) , device_rc2014_card_interface(mconfig, *this) { @@ -96,14 +96,14 @@ class z80cpu21_device : public z80cpu_base, public device_rc2014_ext_card_interf { public: // construction/destruction - z80cpu21_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z80cpu21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides virtual void device_start() override; virtual void device_resolve_objects() override; }; -z80cpu21_device::z80cpu21_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +z80cpu21_device::z80cpu21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80cpu_base(mconfig, RC2014_Z80CPU_21, tag, owner, clock) , device_rc2014_ext_card_interface(mconfig, *this) { diff --git a/src/devices/bus/rs232/exorterm.cpp b/src/devices/bus/rs232/exorterm.cpp index a4980d53538..58957a878e3 100644 --- a/src/devices/bus/rs232/exorterm.cpp +++ b/src/devices/bus/rs232/exorterm.cpp @@ -4,7 +4,7 @@ #include "emu.h" #include "exorterm.h" -exorterm155_terminal_device::exorterm155_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +exorterm155_terminal_device::exorterm155_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERIAL_TERMINAL_EXORTERM155, tag, owner, clock) , device_rs232_port_interface(mconfig, *this) , m_exorterm155(*this, "exorterm155") @@ -14,7 +14,7 @@ exorterm155_terminal_device::exorterm155_terminal_device(const machine_config &m void exorterm155_terminal_device::device_add_mconfig(machine_config &config) { - EXORTERM155(config, m_exorterm155, 0); + EXORTERM155(config, m_exorterm155); m_exorterm155->rs232_conn_txd_handler().set(FUNC(exorterm155_terminal_device::output_rxd)); m_exorterm155->rs232_conn_rts_handler().set(FUNC(exorterm155_terminal_device::route_term_rts)); m_exorterm155->rs232_conn_dtr_handler().set(FUNC(exorterm155_terminal_device::route_term_dtr)); diff --git a/src/devices/bus/rs232/exorterm.h b/src/devices/bus/rs232/exorterm.h index c8ae8298b13..76f1abc6563 100644 --- a/src/devices/bus/rs232/exorterm.h +++ b/src/devices/bus/rs232/exorterm.h @@ -13,7 +13,7 @@ class exorterm155_terminal_device : public device_t, public device_rs232_port_interface { public: - exorterm155_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + exorterm155_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER(input_txd) override; diff --git a/src/devices/bus/rs232/hlemouse.cpp b/src/devices/bus/rs232/hlemouse.cpp index 7b25b1e327b..4f04b4c6042 100644 --- a/src/devices/bus/rs232/hlemouse.cpp +++ b/src/devices/bus/rs232/hlemouse.cpp @@ -343,7 +343,7 @@ void hle_msft_mouse_device::transmit_extensions(uint8_t btn_val, uint8_t btn_sen // Logitech 3-button mouse //************************************************** -hle_logitech_mouse_device::hle_logitech_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +hle_logitech_mouse_device::hle_logitech_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : hle_msmouse_device_base(mconfig, LOGITECH_HLE_SERIAL_MOUSE, tag, owner, clock) { } diff --git a/src/devices/bus/rs232/hlemouse.h b/src/devices/bus/rs232/hlemouse.h index d2fae5bd4d1..93deff4d8a5 100644 --- a/src/devices/bus/rs232/hlemouse.h +++ b/src/devices/bus/rs232/hlemouse.h @@ -28,7 +28,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(input_changed); protected: - hle_msmouse_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + hle_msmouse_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -65,7 +65,7 @@ private: class hle_msft_mouse_device : public hle_msmouse_device_base { public: - hle_msft_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_msft_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; @@ -83,7 +83,7 @@ private: class hle_logitech_mouse_device : public hle_msmouse_device_base { public: - hle_logitech_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_logitech_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; @@ -101,7 +101,7 @@ private: class hle_wheel_mouse_device : public hle_msmouse_device_base { public: - hle_wheel_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_wheel_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; @@ -129,7 +129,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(input_changed); protected: - hle_msystems_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + hle_msystems_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -157,10 +157,10 @@ private: class hle_msystems_mouse_device : public hle_msystems_device_base { public: - hle_msystems_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_msystems_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: - hle_msystems_mouse_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + hle_msystems_mouse_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; @@ -187,7 +187,7 @@ private: class hle_rotatable_mouse_device : public hle_msystems_device_base { public: - hle_rotatable_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_rotatable_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual ioport_constructor device_input_ports() const override; @@ -214,7 +214,7 @@ private: class hle_sgi_mouse_device : public hle_msystems_mouse_device { public: - hle_sgi_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_sgi_mouse_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/rs232/ie15.cpp b/src/devices/bus/rs232/ie15.cpp index 904d65f246c..f729f7857c2 100644 --- a/src/devices/bus/rs232/ie15.cpp +++ b/src/devices/bus/rs232/ie15.cpp @@ -11,7 +11,7 @@ namespace { class ie15_terminal_device : public device_t, public device_rs232_port_interface { public: - ie15_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + ie15_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERIAL_TERMINAL_IE15, tag, owner, clock) , device_rs232_port_interface(mconfig, *this) , m_ie15(*this, "ie15") @@ -33,7 +33,7 @@ private: void ie15_terminal_device::device_add_mconfig(machine_config &config) { - IE15(config, m_ie15, 0); + IE15(config, m_ie15); m_ie15->rs232_conn_txd_handler().set(FUNC(ie15_terminal_device::output_rxd)); //m_ie15->rs232_conn_rts_handler().set(FUNC(ie15_terminal_device::route_term_rts)); diff --git a/src/devices/bus/rs232/keyboard.cpp b/src/devices/bus/rs232/keyboard.cpp index 64beb75d6f2..76422a71baa 100644 --- a/src/devices/bus/rs232/keyboard.cpp +++ b/src/devices/bus/rs232/keyboard.cpp @@ -14,12 +14,12 @@ INPUT_PORTS_START(serial_keyboard) INPUT_PORTS_END } // anonymous namespace -serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : serial_keyboard_device(mconfig, SERIAL_KEYBOARD, tag, owner, clock) { } -serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : generic_keyboard_device(mconfig, type, tag, owner, clock) , device_buffered_serial_interface(mconfig, *this) , device_rs232_port_interface(mconfig, *this) diff --git a/src/devices/bus/rs232/keyboard.h b/src/devices/bus/rs232/keyboard.h index 190a33a49e4..0db97ff59af 100644 --- a/src/devices/bus/rs232/keyboard.h +++ b/src/devices/bus/rs232/keyboard.h @@ -14,7 +14,7 @@ class serial_keyboard_device , public device_rs232_port_interface { public: - serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; @@ -23,7 +23,7 @@ public: DECLARE_WRITE_LINE_MEMBER(update_serial); protected: - serial_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + serial_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; virtual void tra_callback() override; diff --git a/src/devices/bus/rs232/loopback.cpp b/src/devices/bus/rs232/loopback.cpp index de1f07f3cd7..6552bda2fda 100644 --- a/src/devices/bus/rs232/loopback.cpp +++ b/src/devices/bus/rs232/loopback.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(RS232_LOOPBACK, rs232_loopback_device, "rs232_loopback", "RS232 Loopback") -rs232_loopback_device::rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rs232_loopback_device::rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RS232_LOOPBACK, tag, owner, clock) , device_rs232_port_interface(mconfig, *this) { @@ -45,7 +45,7 @@ WRITE_LINE_MEMBER( rs232_loopback_device::input_dtr ) DEFINE_DEVICE_TYPE(DEC_RS232_LOOPBACK, dec_rs232_loopback_device, "dec_rs232_loopback", "RS232 Loopback (DEC 12-15336-00)") -dec_rs232_loopback_device::dec_rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dec_rs232_loopback_device::dec_rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DEC_RS232_LOOPBACK, tag, owner, clock) , device_rs232_port_interface(mconfig, *this) { diff --git a/src/devices/bus/rs232/loopback.h b/src/devices/bus/rs232/loopback.h index b7f499d08d0..52022afef7f 100644 --- a/src/devices/bus/rs232/loopback.h +++ b/src/devices/bus/rs232/loopback.h @@ -11,7 +11,7 @@ class rs232_loopback_device : public device_t, public device_rs232_port_interface { public: - rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual WRITE_LINE_MEMBER( input_txd ) override; virtual WRITE_LINE_MEMBER( input_rts ) override; @@ -24,7 +24,7 @@ protected: class dec_rs232_loopback_device : public device_t, public device_rs232_port_interface { public: - dec_rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dec_rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual WRITE_LINE_MEMBER( input_txd ) override; virtual WRITE_LINE_MEMBER( input_rts ) override; diff --git a/src/devices/bus/rs232/mboardd.cpp b/src/devices/bus/rs232/mboardd.cpp index b2b44a6db70..104584c9dd9 100644 --- a/src/devices/bus/rs232/mboardd.cpp +++ b/src/devices/bus/rs232/mboardd.cpp @@ -34,7 +34,7 @@ ROM_END class mockingboard_d_device : public device_t, public device_rs232_port_interface { public: - mockingboard_d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mockingboard_d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) override; @@ -61,7 +61,7 @@ private: u8 m_c000_latch; }; -mockingboard_d_device::mockingboard_d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mockingboard_d_device::mockingboard_d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERIAL_MOCKINGBOARD_D, tag, owner, clock) , device_rs232_port_interface(mconfig, *this) , m_cpu(*this, "mbdcpu") @@ -80,9 +80,9 @@ void mockingboard_d_device::device_add_mconfig(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - AY8913(config, m_ay1, 1022727); + AY8913(config, m_ay1, XTAL::u(1022727)); m_ay1->add_route(ALL_OUTPUTS, "lspeaker", 0.5); - AY8913(config, m_ay2, 1022727); + AY8913(config, m_ay2, XTAL::u(1022727)); m_ay2->add_route(ALL_OUTPUTS, "lspeaker", 0.5); } diff --git a/src/devices/bus/rs232/null_modem.cpp b/src/devices/bus/rs232/null_modem.cpp index 5b19f1d8e29..af693a9860d 100644 --- a/src/devices/bus/rs232/null_modem.cpp +++ b/src/devices/bus/rs232/null_modem.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "null_modem.h" -null_modem_device::null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +null_modem_device::null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NULL_MODEM, tag, owner, clock), device_serial_interface(mconfig, *this), device_rs232_port_interface(mconfig, *this), @@ -25,7 +25,7 @@ null_modem_device::null_modem_device(const machine_config &mconfig, const char * void null_modem_device::device_add_mconfig(machine_config &config) { - BITBANGER(config, m_stream, 0); + BITBANGER(config, m_stream); } static INPUT_PORTS_START(null_modem) diff --git a/src/devices/bus/rs232/null_modem.h b/src/devices/bus/rs232/null_modem.h index bd9b2520fc4..235d073f982 100644 --- a/src/devices/bus/rs232/null_modem.h +++ b/src/devices/bus/rs232/null_modem.h @@ -14,7 +14,7 @@ class null_modem_device : public device_t, public device_rs232_port_interface { public: - null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual WRITE_LINE_MEMBER( input_txd ) override { device_serial_interface::rx_w(state); } virtual WRITE_LINE_MEMBER( input_rts ) override { m_rts = state; } diff --git a/src/devices/bus/rs232/printer.cpp b/src/devices/bus/rs232/printer.cpp index 19347b84002..4078e7cb3da 100644 --- a/src/devices/bus/rs232/printer.cpp +++ b/src/devices/bus/rs232/printer.cpp @@ -15,12 +15,12 @@ #include "emu.h" #include "printer.h" -serial_printer_device::serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +serial_printer_device::serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : serial_printer_device(mconfig, SERIAL_PRINTER, tag, owner, clock) { } -serial_printer_device::serial_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +serial_printer_device::serial_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_serial_interface(mconfig, *this), device_rs232_port_interface(mconfig, *this), @@ -35,7 +35,7 @@ serial_printer_device::serial_printer_device(const machine_config &mconfig, devi void serial_printer_device::device_add_mconfig(machine_config &config) { - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); m_printer->online_callback().set(FUNC(serial_printer_device::printer_online)); } @@ -90,7 +90,7 @@ void serial_printer_device::rcv_complete() m_printer->output(get_received_char()); } -radio_shack_serial_printer_device::radio_shack_serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +radio_shack_serial_printer_device::radio_shack_serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : serial_printer_device(mconfig, RADIO_SHACK_SERIAL_PRINTER, tag, owner, clock) { m_initial_rx_state = 0; diff --git a/src/devices/bus/rs232/printer.h b/src/devices/bus/rs232/printer.h index cdc0fbbbbf7..9e2722ba7cf 100644 --- a/src/devices/bus/rs232/printer.h +++ b/src/devices/bus/rs232/printer.h @@ -14,14 +14,14 @@ class serial_printer_device : public device_t, public device_rs232_port_interface { public: - serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) override { device_serial_interface::rx_w(state); } DECLARE_WRITE_LINE_MEMBER(update_serial); protected: - serial_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + serial_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; @@ -44,7 +44,7 @@ private: class radio_shack_serial_printer_device : public serial_printer_device { public: - radio_shack_serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + radio_shack_serial_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SERIAL_PRINTER, serial_printer_device) diff --git a/src/devices/bus/rs232/pty.cpp b/src/devices/bus/rs232/pty.cpp index 3cef298dc6c..11f0bd17d10 100644 --- a/src/devices/bus/rs232/pty.cpp +++ b/src/devices/bus/rs232/pty.cpp @@ -9,7 +9,7 @@ static constexpr int TIMER_POLL = 1; -pseudo_terminal_device::pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pseudo_terminal_device::pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSEUDO_TERMINAL, tag, owner, clock), device_serial_interface(mconfig, *this), device_rs232_port_interface(mconfig, *this), diff --git a/src/devices/bus/rs232/pty.h b/src/devices/bus/rs232/pty.h index f9fefec5e72..aecc336a61c 100644 --- a/src/devices/bus/rs232/pty.h +++ b/src/devices/bus/rs232/pty.h @@ -15,7 +15,7 @@ class pseudo_terminal_device : public device_t, public device_pty_interface { public: - pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) override { device_serial_interface::rx_w(state); } diff --git a/src/devices/bus/rs232/rs232.cpp b/src/devices/bus/rs232/rs232.cpp index 805d295c4de..7a396b2471e 100644 --- a/src/devices/bus/rs232/rs232.cpp +++ b/src/devices/bus/rs232/rs232.cpp @@ -44,12 +44,12 @@ DEFINE_DEVICE_TYPE(RS232_PORT, rs232_port_device, "rs232", "RS-232 Port") -rs232_port_device::rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +rs232_port_device::rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rs232_port_device(mconfig, RS232_PORT, tag, owner, clock) { } -rs232_port_device::rs232_port_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +rs232_port_device::rs232_port_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_rxd(0), diff --git a/src/devices/bus/rs232/rs232.h b/src/devices/bus/rs232/rs232.h index 576b0797dc4..ecfc05e1013 100644 --- a/src/devices/bus/rs232/rs232.h +++ b/src/devices/bus/rs232/rs232.h @@ -108,14 +108,14 @@ class rs232_port_device : public device_t, public device_single_card_slot_interf public: template rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : rs232_port_device(mconfig, tag, owner, 0) + : rs232_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~rs232_port_device(); // static configuration helpers @@ -144,7 +144,7 @@ public: DECLARE_READ_LINE_MEMBER( txc_r ) { return m_dce_txc; } // DB25 pin 15 V.24 circuit 114 Transmitter signal element timing (DCE) protected: - rs232_port_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rs232_port_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_reset() override; @@ -283,7 +283,7 @@ public: } protected: - buffered_rs232_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + buffered_rs232_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : device_t(mconfig, type, tag, owner, clock) , device_buffered_serial_interface(mconfig, *this) , device_rs232_port_interface(mconfig, *this) diff --git a/src/devices/bus/rs232/rs232_sync_io.cpp b/src/devices/bus/rs232/rs232_sync_io.cpp index 8403c41e2cf..cc8a1c9c2ef 100644 --- a/src/devices/bus/rs232/rs232_sync_io.cpp +++ b/src/devices/bus/rs232/rs232_sync_io.cpp @@ -55,7 +55,7 @@ namespace { } } -rs232_sync_io_device::rs232_sync_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rs232_sync_io_device::rs232_sync_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , RS232_SYNC_IO , tag , owner , clock) , device_rs232_port_interface(mconfig , *this) , m_stream(*this , "stream") diff --git a/src/devices/bus/rs232/rs232_sync_io.h b/src/devices/bus/rs232/rs232_sync_io.h index a5b6818de48..e140114c243 100644 --- a/src/devices/bus/rs232/rs232_sync_io.h +++ b/src/devices/bus/rs232/rs232_sync_io.h @@ -20,7 +20,7 @@ class rs232_sync_io_device : public device_t, public device_rs232_port_interface { public: // construction/destruction - rs232_sync_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rs232_sync_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~rs232_sync_io_device(); virtual DECLARE_WRITE_LINE_MEMBER(input_txd) override; diff --git a/src/devices/bus/rs232/swtpc8212.cpp b/src/devices/bus/rs232/swtpc8212.cpp index b7265aea5d5..efa48cf2680 100644 --- a/src/devices/bus/rs232/swtpc8212.cpp +++ b/src/devices/bus/rs232/swtpc8212.cpp @@ -4,7 +4,7 @@ #include "emu.h" #include "swtpc8212.h" -swtpc8212_terminal_device::swtpc8212_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +swtpc8212_terminal_device::swtpc8212_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERIAL_TERMINAL_SWTPC8212, tag, owner, clock) , device_rs232_port_interface(mconfig, *this) , m_swtpc8212(*this, "swtpc8212") @@ -14,7 +14,7 @@ swtpc8212_terminal_device::swtpc8212_terminal_device(const machine_config &mconf void swtpc8212_terminal_device::device_add_mconfig(machine_config &config) { - SWTPC8212(config, m_swtpc8212, 0); + SWTPC8212(config, m_swtpc8212); m_swtpc8212->rs232_conn_txd_handler().set(FUNC(swtpc8212_terminal_device::output_rxd)); m_swtpc8212->rs232_conn_rts_handler().set(FUNC(swtpc8212_terminal_device::route_term_rts)); m_swtpc8212->rs232_conn_dtr_handler().set(FUNC(swtpc8212_terminal_device::route_term_dtr)); diff --git a/src/devices/bus/rs232/swtpc8212.h b/src/devices/bus/rs232/swtpc8212.h index 2af82fa3215..4797da5a7df 100644 --- a/src/devices/bus/rs232/swtpc8212.h +++ b/src/devices/bus/rs232/swtpc8212.h @@ -13,7 +13,7 @@ class swtpc8212_terminal_device : public device_t, public device_rs232_port_interface { public: - swtpc8212_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swtpc8212_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER(input_txd) override; diff --git a/src/devices/bus/rs232/terminal.cpp b/src/devices/bus/rs232/terminal.cpp index 24c37f5a0e2..5db97affccb 100644 --- a/src/devices/bus/rs232/terminal.cpp +++ b/src/devices/bus/rs232/terminal.cpp @@ -13,7 +13,7 @@ class serial_terminal_device : public generic_terminal_device, public device_rs232_port_interface { public: - serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) override { device_buffered_serial_interface::rx_w(state); } @@ -36,7 +36,7 @@ private: required_ioport m_rs232_stopbits; }; -serial_terminal_device::serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +serial_terminal_device::serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_terminal_device(mconfig, SERIAL_TERMINAL, tag, owner, clock, TERMINAL_WIDTH, TERMINAL_HEIGHT) , device_buffered_serial_interface(mconfig, *this) , device_rs232_port_interface(mconfig, *this) diff --git a/src/devices/bus/rs232/xvd701.cpp b/src/devices/bus/rs232/xvd701.cpp index a04365f2239..0411eea7a9e 100644 --- a/src/devices/bus/rs232/xvd701.cpp +++ b/src/devices/bus/rs232/xvd701.cpp @@ -13,7 +13,7 @@ #define LOGCMD(...) LOGMASKED(LOG_COMMAND, __VA_ARGS__) -jvc_xvd701_device::jvc_xvd701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jvc_xvd701_device::jvc_xvd701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JVC_XVD701, tag, owner, clock), device_serial_interface(mconfig, *this), device_rs232_port_interface(mconfig, *this), diff --git a/src/devices/bus/rs232/xvd701.h b/src/devices/bus/rs232/xvd701.h index 8e85e377f76..93a907c9a16 100644 --- a/src/devices/bus/rs232/xvd701.h +++ b/src/devices/bus/rs232/xvd701.h @@ -11,7 +11,7 @@ class jvc_xvd701_device : public device_t, public device_rs232_port_interface { public: - jvc_xvd701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jvc_xvd701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual WRITE_LINE_MEMBER( input_txd ) override { device_serial_interface::rx_w(state); } protected: diff --git a/src/devices/bus/rtpc/kbd.cpp b/src/devices/bus/rtpc/kbd.cpp index 13cc1759a2d..33234f03694 100644 --- a/src/devices/bus/rtpc/kbd.cpp +++ b/src/devices/bus/rtpc/kbd.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(RTPC_KBD, rtpc_kbd_device, "rtpc_kbd", "IBM PC RT Keyboard") -rtpc_kbd_device::rtpc_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +rtpc_kbd_device::rtpc_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTPC_KBD, tag, owner, clock) , device_rtpc_kbd_interface(mconfig, *this) , m_mcu(*this, "mcu") diff --git a/src/devices/bus/rtpc/kbd.h b/src/devices/bus/rtpc/kbd.h index 860cb5c2218..b9962577122 100644 --- a/src/devices/bus/rtpc/kbd.h +++ b/src/devices/bus/rtpc/kbd.h @@ -14,7 +14,7 @@ class rtpc_kbd_device , public device_rtpc_kbd_interface { public: - rtpc_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + rtpc_kbd_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/rtpc/kbd_con.cpp b/src/devices/bus/rtpc/kbd_con.cpp index f8617fe3ef5..6b4c552b462 100644 --- a/src/devices/bus/rtpc/kbd_con.cpp +++ b/src/devices/bus/rtpc/kbd_con.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(RTPC_KBD_CON, rtpc_kbd_con_device, "rtpc_kbd_con", "RT PC keyboard connector") -rtpc_kbd_con_device::rtpc_kbd_con_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +rtpc_kbd_con_device::rtpc_kbd_con_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTPC_KBD_CON, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_out_clock_cb(*this) diff --git a/src/devices/bus/rtpc/kbd_con.h b/src/devices/bus/rtpc/kbd_con.h index b066fc56137..18e7e13ecb3 100644 --- a/src/devices/bus/rtpc/kbd_con.h +++ b/src/devices/bus/rtpc/kbd_con.h @@ -15,14 +15,14 @@ class rtpc_kbd_con_device public: template rtpc_kbd_con_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : rtpc_kbd_con_device(mconfig, tag, owner, 0U) + : rtpc_kbd_con_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - rtpc_kbd_con_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0U); + rtpc_kbd_con_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_clock_cb() { return m_out_clock_cb.bind(); } auto out_data_cb() { return m_out_data_cb.bind(); } diff --git a/src/devices/bus/s100/am310.cpp b/src/devices/bus/s100/am310.cpp index 5eee55b1a2e..857a9031f6d 100644 --- a/src/devices/bus/s100/am310.cpp +++ b/src/devices/bus/s100/am310.cpp @@ -29,7 +29,7 @@ class s100_am310_device : public device_t, public device_s100_card_interface { public: // construction/destruction - s100_am310_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + s100_am310_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -69,7 +69,7 @@ private: DEFINE_DEVICE_TYPE_PRIVATE(S100_AM310, device_s100_card_interface, s100_am310_device, "s100_am310", "Alpha Micro AM-310 Communications Controller") -s100_am310_device::s100_am310_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +s100_am310_device::s100_am310_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_AM310, tag, owner, clock) , device_s100_card_interface(mconfig, *this) , m_z80(*this, "z80") diff --git a/src/devices/bus/s100/ascsasi.cpp b/src/devices/bus/s100/ascsasi.cpp index 73cacf9680a..0606b07e401 100644 --- a/src/devices/bus/s100/ascsasi.cpp +++ b/src/devices/bus/s100/ascsasi.cpp @@ -30,7 +30,7 @@ class asc_sasi_device : public device_t, public device_s100_card_interface public: // construction/destruction - asc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + asc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -72,7 +72,7 @@ constexpr attotime asc_sasi_device::s_pulse_width; // stupid non-inline semantic DEFINE_DEVICE_TYPE_PRIVATE(S100_ASC_SASI, device_s100_card_interface, asc_sasi_device, "ascsasi", "ASC Associates SASI Host Computer Adapter") -asc_sasi_device::asc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +asc_sasi_device::asc_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_ASC_SASI, tag, owner, clock) , device_s100_card_interface(mconfig, *this) , m_sasi(*this, "sasi") diff --git a/src/devices/bus/s100/dg640.cpp b/src/devices/bus/s100/dg640.cpp index f6adb27cfa8..cab365d23ee 100644 --- a/src/devices/bus/s100/dg640.cpp +++ b/src/devices/bus/s100/dg640.cpp @@ -21,7 +21,7 @@ in the April 1978 issue of Electronics Today International (Australia). DEFINE_DEVICE_TYPE(S100_DG640, dg640_device, "dg640", "DG640 VDU") -dg640_device::dg640_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dg640_device::dg640_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_DG640, tag, owner, clock) , device_s100_card_interface(mconfig, *this) , m_p_chargen(*this, "chargen") diff --git a/src/devices/bus/s100/dg640.h b/src/devices/bus/s100/dg640.h index 97d1a3ecbc3..b835dc55673 100644 --- a/src/devices/bus/s100/dg640.h +++ b/src/devices/bus/s100/dg640.h @@ -17,7 +17,7 @@ class dg640_device : public device_t, public device_s100_card_interface { public: // construction/destruction - dg640_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dg640_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/s100/dj2db.cpp b/src/devices/bus/s100/dj2db.cpp index 6ee50a89840..c55c957d832 100644 --- a/src/devices/bus/s100/dj2db.cpp +++ b/src/devices/bus/s100/dj2db.cpp @@ -242,7 +242,7 @@ ioport_constructor s100_dj2db_device::device_input_ports() const // s100_dj2db_device - constructor //------------------------------------------------- -s100_dj2db_device::s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s100_dj2db_device::s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_DJ2DB, tag, owner, clock), device_s100_card_interface(mconfig, *this), m_fdc(*this, MB8866_TAG), diff --git a/src/devices/bus/s100/dj2db.h b/src/devices/bus/s100/dj2db.h index e285ab43f42..49eb999c4d7 100644 --- a/src/devices/bus/s100/dj2db.h +++ b/src/devices/bus/s100/dj2db.h @@ -30,7 +30,7 @@ class s100_dj2db_device : public device_t, { public: // construction/destruction - s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s100_dj2db_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/s100/djdma.cpp b/src/devices/bus/s100/djdma.cpp index 0ee7dab0a0c..a6bf49d36aa 100644 --- a/src/devices/bus/s100/djdma.cpp +++ b/src/devices/bus/s100/djdma.cpp @@ -109,7 +109,7 @@ void s100_djdma_device::device_add_mconfig(machine_config &config) // s100_djdma_device - constructor //------------------------------------------------- -s100_djdma_device::s100_djdma_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +s100_djdma_device::s100_djdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_DJDMA, tag, owner, clock) , device_s100_card_interface(mconfig, *this) , m_diskcpu(*this, Z80_TAG) diff --git a/src/devices/bus/s100/djdma.h b/src/devices/bus/s100/djdma.h index d9453aef25c..428d6a25aa6 100644 --- a/src/devices/bus/s100/djdma.h +++ b/src/devices/bus/s100/djdma.h @@ -26,7 +26,7 @@ class s100_djdma_device : public device_t, public device_s100_card_interface { public: // construction/destruction - s100_djdma_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + s100_djdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/s100/mm65k16s.cpp b/src/devices/bus/s100/mm65k16s.cpp index 5f64ce67aa4..49f6f5f1c64 100644 --- a/src/devices/bus/s100/mm65k16s.cpp +++ b/src/devices/bus/s100/mm65k16s.cpp @@ -202,7 +202,7 @@ ioport_constructor s100_mm65k16s_device::device_input_ports() const // s100_mm65k16s_device - constructor //------------------------------------------------- -s100_mm65k16s_device::s100_mm65k16s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s100_mm65k16s_device::s100_mm65k16s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_MM65K16S, tag, owner, clock), device_s100_card_interface(mconfig, *this), m_ram(*this, "ram", 0x10000, ENDIANNESS_LITTLE) diff --git a/src/devices/bus/s100/mm65k16s.h b/src/devices/bus/s100/mm65k16s.h index 706d7e697b6..0eaa8ad07ef 100644 --- a/src/devices/bus/s100/mm65k16s.h +++ b/src/devices/bus/s100/mm65k16s.h @@ -26,7 +26,7 @@ class s100_mm65k16s_device : public device_t, { public: // construction/destruction - s100_mm65k16s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s100_mm65k16s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/s100/nsmdsa.cpp b/src/devices/bus/s100/nsmdsa.cpp index 53441107c7d..dda0971e2fe 100644 --- a/src/devices/bus/s100/nsmdsa.cpp +++ b/src/devices/bus/s100/nsmdsa.cpp @@ -73,7 +73,7 @@ void s100_mds_a_device::device_add_mconfig(machine_config &config) // s100_mds_a_device - constructor //------------------------------------------------- -s100_mds_a_device::s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s100_mds_a_device::s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_MDS_A, tag, owner, clock), device_s100_card_interface(mconfig, *this), m_floppy(*this, "floppy%u", 0U), diff --git a/src/devices/bus/s100/nsmdsa.h b/src/devices/bus/s100/nsmdsa.h index a36f39127ec..e8e3a59647b 100644 --- a/src/devices/bus/s100/nsmdsa.h +++ b/src/devices/bus/s100/nsmdsa.h @@ -27,7 +27,7 @@ class s100_mds_a_device : public device_t, { public: // construction/destruction - s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s100_mds_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/s100/nsmdsad.cpp b/src/devices/bus/s100/nsmdsad.cpp index 00343623711..c365e0abe57 100644 --- a/src/devices/bus/s100/nsmdsad.cpp +++ b/src/devices/bus/s100/nsmdsad.cpp @@ -74,7 +74,7 @@ void s100_mds_ad_device::device_add_mconfig(machine_config &config) // s100_mds_ad_device - constructor //------------------------------------------------- -s100_mds_ad_device::s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s100_mds_ad_device::s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_MDS_AD, tag, owner, clock), device_s100_card_interface(mconfig, *this), m_floppy(*this, "floppy%u", 0U), diff --git a/src/devices/bus/s100/nsmdsad.h b/src/devices/bus/s100/nsmdsad.h index ce5a248d553..16d5faeda6f 100644 --- a/src/devices/bus/s100/nsmdsad.h +++ b/src/devices/bus/s100/nsmdsad.h @@ -27,7 +27,7 @@ class s100_mds_ad_device : public device_t, { public: // construction/destruction - s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s100_mds_ad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/s100/poly16k.cpp b/src/devices/bus/s100/poly16k.cpp index 98861545d39..0e8f0f7f485 100644 --- a/src/devices/bus/s100/poly16k.cpp +++ b/src/devices/bus/s100/poly16k.cpp @@ -26,7 +26,7 @@ class poly_16k_ram_device : public device_t, public device_s100_card_interface { public: // construction/destruction - poly_16k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + poly_16k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-specific overrides @@ -82,7 +82,7 @@ INPUT_PORTS_END // poly_16k_ram_device - constructor //------------------------------------------------- -poly_16k_ram_device::poly_16k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +poly_16k_ram_device::poly_16k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_POLY_16K, tag, owner, clock) , device_s100_card_interface(mconfig, *this) , m_dsw(*this, "DSW") diff --git a/src/devices/bus/s100/polyfdc.cpp b/src/devices/bus/s100/polyfdc.cpp index 962424324e0..fed3a81d6ea 100644 --- a/src/devices/bus/s100/polyfdc.cpp +++ b/src/devices/bus/s100/polyfdc.cpp @@ -20,7 +20,7 @@ class poly_fdc_device : public device_t, public device_s100_card_interface { public: // construction/destruction - poly_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + poly_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } @@ -45,7 +45,7 @@ private: DEFINE_DEVICE_TYPE_PRIVATE(S100_POLY_FDC, device_s100_card_interface, poly_fdc_device, "polyfdc", "PolyMorphic Systems Disk Controller") -poly_fdc_device::poly_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +poly_fdc_device::poly_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_POLY_FDC, tag, owner, clock) , device_s100_card_interface(mconfig, *this) , m_usrt(*this, "usrt") @@ -115,7 +115,7 @@ void poly_fdc_device::pc_w(u8 data) void poly_fdc_device::device_add_mconfig(machine_config &config) { - MC6852(config, m_usrt, 0); // E generated from PDBIN+ and PWR- + MC6852(config, m_usrt); // E generated from PDBIN+ and PWR- I8255(config, m_pio); m_pio->out_pa_callback().set(FUNC(poly_fdc_device::pa_w)); diff --git a/src/devices/bus/s100/polyvti.cpp b/src/devices/bus/s100/polyvti.cpp index 242d13a8fe2..a07bbacd513 100644 --- a/src/devices/bus/s100/polyvti.cpp +++ b/src/devices/bus/s100/polyvti.cpp @@ -36,7 +36,7 @@ class poly_vti_device : public device_t, public device_s100_card_interface public: // construction/destruction - poly_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + poly_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -69,7 +69,7 @@ private: DEFINE_DEVICE_TYPE_PRIVATE(S100_POLY_VTI, device_s100_card_interface, poly_vti_device, "polyvti", "PolyMorphic Systems Video Terminal Interface") -poly_vti_device::poly_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +poly_vti_device::poly_vti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_POLY_VTI, tag, owner, clock) , device_s100_card_interface(mconfig, *this) , m_kbdlatch(*this, "kbdlatch") @@ -324,7 +324,7 @@ void poly_vti_device::device_add_mconfig(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_vti); PALETTE(config, "palette", palette_device::MONOCHROME); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(poly_vti_device::kbd_put)); I8212(config, m_kbdlatch); diff --git a/src/devices/bus/s100/s100.cpp b/src/devices/bus/s100/s100.cpp index 67a5df55124..60ad6e85665 100644 --- a/src/devices/bus/s100/s100.cpp +++ b/src/devices/bus/s100/s100.cpp @@ -44,7 +44,7 @@ void device_s100_card_interface::interface_pre_start() //------------------------------------------------- // s100_slot_device - constructor //------------------------------------------------- -s100_slot_device::s100_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s100_slot_device::s100_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_bus(*this, DEVICE_SELF_OWNER) @@ -68,7 +68,7 @@ void s100_slot_device::device_start() // s100_bus_device - constructor //------------------------------------------------- -s100_bus_device::s100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s100_bus_device::s100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_BUS, tag, owner, clock), m_write_irq(*this), m_write_nmi(*this), diff --git a/src/devices/bus/s100/s100.h b/src/devices/bus/s100/s100.h index ae10f4e70bc..97efdba57b2 100644 --- a/src/devices/bus/s100/s100.h +++ b/src/devices/bus/s100/s100.h @@ -138,7 +138,7 @@ class s100_bus_device : public device_t { public: // construction/destruction - s100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~s100_bus_device() { m_device_list.detach_all(); } auto irq() { return m_write_irq.bind(); } @@ -228,7 +228,7 @@ public: set_default_option(dflt); set_fixed(false); } - s100_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s100_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_bus(T &&tag) { m_bus.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/s100/seals8k.cpp b/src/devices/bus/s100/seals8k.cpp index 58a040efad4..25383ef342a 100644 --- a/src/devices/bus/s100/seals8k.cpp +++ b/src/devices/bus/s100/seals8k.cpp @@ -40,11 +40,11 @@ class s100_8k_sc_device : public device_t, public device_s100_card_interface { public: // construction/destruction - s100_8k_sc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + s100_8k_sc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // delegated construction - s100_8k_sc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + s100_8k_sc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-specific overrides virtual ioport_constructor device_input_ports() const override; @@ -71,7 +71,7 @@ class s100_8k_sc_bb_device : public s100_8k_sc_device, public device_nvram_inter { public: // construction/destruction - s100_8k_sc_bb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + s100_8k_sc_bb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_nvram_interface overrides @@ -112,7 +112,7 @@ INPUT_PORTS_END // s100_8k_sc_device - constructor //------------------------------------------------- -s100_8k_sc_device::s100_8k_sc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +s100_8k_sc_device::s100_8k_sc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_s100_card_interface(mconfig, *this), m_dsw(*this, "DSW") @@ -120,7 +120,7 @@ s100_8k_sc_device::s100_8k_sc_device(const machine_config &mconfig, device_type } -s100_8k_sc_device::s100_8k_sc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +s100_8k_sc_device::s100_8k_sc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s100_8k_sc_device(mconfig, S100_8K_SC, tag, owner, clock) { } @@ -130,7 +130,7 @@ s100_8k_sc_device::s100_8k_sc_device(const machine_config &mconfig, const char * // s100_8k_sc_bb_device - constructor //------------------------------------------------- -s100_8k_sc_bb_device::s100_8k_sc_bb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +s100_8k_sc_bb_device::s100_8k_sc_bb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s100_8k_sc_device(mconfig, S100_8K_SC_BB, tag, owner, clock), device_nvram_interface(mconfig, *this) { diff --git a/src/devices/bus/s100/wunderbus.cpp b/src/devices/bus/s100/wunderbus.cpp index 29efc80b185..9faf42fa31d 100644 --- a/src/devices/bus/s100/wunderbus.cpp +++ b/src/devices/bus/s100/wunderbus.cpp @@ -88,7 +88,7 @@ WRITE_LINE_MEMBER( s100_wunderbus_device::rtc_tp_w ) void s100_wunderbus_device::device_add_mconfig(machine_config &config) { - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set(FUNC(s100_wunderbus_device::pic_int_w)); m_pic->in_sp_callback().set_constant(1); @@ -233,7 +233,7 @@ ioport_constructor s100_wunderbus_device::device_input_ports() const // s100_wunderbus_device - constructor //------------------------------------------------- -s100_wunderbus_device::s100_wunderbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s100_wunderbus_device::s100_wunderbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S100_WUNDERBUS, tag, owner, clock), device_s100_card_interface(mconfig, *this), m_pic(*this, I8259A_TAG), diff --git a/src/devices/bus/s100/wunderbus.h b/src/devices/bus/s100/wunderbus.h index ca9a6d0e641..7d5ae782215 100644 --- a/src/devices/bus/s100/wunderbus.h +++ b/src/devices/bus/s100/wunderbus.h @@ -29,7 +29,7 @@ class s100_wunderbus_device : public device_t, { public: // construction/destruction - s100_wunderbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s100_wunderbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/saitek_osa/expansion.cpp b/src/devices/bus/saitek_osa/expansion.cpp index 76a4ac6b6cd..41e3270857b 100644 --- a/src/devices/bus/saitek_osa/expansion.cpp +++ b/src/devices/bus/saitek_osa/expansion.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(SAITEKOSA_EXPANSION, saitekosa_expansion_device, "saitekosa_e // saitekosa_expansion_device - constructor //------------------------------------------------- -saitekosa_expansion_device::saitekosa_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +saitekosa_expansion_device::saitekosa_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAITEKOSA_EXPANSION, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_stb_handler(*this), diff --git a/src/devices/bus/saitek_osa/expansion.h b/src/devices/bus/saitek_osa/expansion.h index 47364d492ec..b85450c417d 100644 --- a/src/devices/bus/saitek_osa/expansion.h +++ b/src/devices/bus/saitek_osa/expansion.h @@ -48,7 +48,7 @@ public: // construction/destruction template saitekosa_expansion_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts) : - saitekosa_expansion_device(mconfig, tag, owner, u32(0)) + saitekosa_expansion_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -56,7 +56,7 @@ public: set_fixed(false); } - saitekosa_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + saitekosa_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~saitekosa_expansion_device(); // callbacks diff --git a/src/devices/bus/saitek_osa/maestro.cpp b/src/devices/bus/saitek_osa/maestro.cpp index 7237eb78d22..8f8cb930e2f 100644 --- a/src/devices/bus/saitek_osa/maestro.cpp +++ b/src/devices/bus/saitek_osa/maestro.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(OSA_ANALYST, saitekosa_analyst_device, "osa_analyst", "Analys // initialization //------------------------------------------------- -saitekosa_maestro_device::saitekosa_maestro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +saitekosa_maestro_device::saitekosa_maestro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_saitekosa_expansion_interface(mconfig, *this), m_maincpu(*this, "maincpu"), @@ -57,11 +57,11 @@ saitekosa_maestro_device::saitekosa_maestro_device(const machine_config &mconfig m_extrom(*this, "extrom") { } -saitekosa_maestro_device::saitekosa_maestro_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +saitekosa_maestro_device::saitekosa_maestro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saitekosa_maestro_device(mconfig, OSA_MAESTRO, tag, owner, clock) { } -saitekosa_analyst_device::saitekosa_analyst_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +saitekosa_analyst_device::saitekosa_analyst_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saitekosa_maestro_device(mconfig, OSA_ANALYST, tag, owner, clock), m_lcd(*this, "lcd") { } @@ -237,7 +237,7 @@ void saitekosa_analyst_device::device_add_mconfig(machine_config &config) saitekosa_maestro_device::device_add_mconfig(config); // video hardware - HD44780(config, m_lcd, 0); + HD44780(config, m_lcd); } diff --git a/src/devices/bus/saitek_osa/maestro.h b/src/devices/bus/saitek_osa/maestro.h index 1b79423e424..38cb3b72e58 100644 --- a/src/devices/bus/saitek_osa/maestro.h +++ b/src/devices/bus/saitek_osa/maestro.h @@ -24,7 +24,7 @@ class saitekosa_maestro_device : public device_t, public device_saitekosa_expans { public: // construction/destruction - saitekosa_maestro_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + saitekosa_maestro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(switch_cpu_freq) { set_cpu_freq(); } @@ -34,7 +34,7 @@ public: virtual void ack_w(int state) override; protected: - saitekosa_maestro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + saitekosa_maestro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; virtual ioport_constructor device_input_ports() const override; @@ -68,7 +68,7 @@ protected: class saitekosa_analyst_device : public saitekosa_maestro_device { public: - saitekosa_analyst_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + saitekosa_analyst_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; diff --git a/src/devices/bus/saitek_osa/maestroa.cpp b/src/devices/bus/saitek_osa/maestroa.cpp index c7b82583f5b..9526994ec10 100644 --- a/src/devices/bus/saitek_osa/maestroa.cpp +++ b/src/devices/bus/saitek_osa/maestroa.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(OSA_MAESTROA, saitekosa_maestroa_device, "osa_maestroa", "Mae // initialization //------------------------------------------------- -saitekosa_maestroa_device::saitekosa_maestroa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +saitekosa_maestroa_device::saitekosa_maestroa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OSA_MAESTROA, tag, owner, clock), device_saitekosa_expansion_interface(mconfig, *this), m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/saitek_osa/maestroa.h b/src/devices/bus/saitek_osa/maestroa.h index 35b5744f07d..d9765b066a9 100644 --- a/src/devices/bus/saitek_osa/maestroa.h +++ b/src/devices/bus/saitek_osa/maestroa.h @@ -20,7 +20,7 @@ class saitekosa_maestroa_device : public device_t, public device_saitekosa_expan { public: // construction/destruction - saitekosa_maestroa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + saitekosa_maestroa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(switch_cpu_freq) { set_cpu_freq(); } diff --git a/src/devices/bus/saitek_osa/sparc.cpp b/src/devices/bus/saitek_osa/sparc.cpp index 61a215b68cf..be950c9a361 100644 --- a/src/devices/bus/saitek_osa/sparc.cpp +++ b/src/devices/bus/saitek_osa/sparc.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(OSA_SPARC, saitekosa_sparc_device, "osa_sparc", "Sparc") // initialization //------------------------------------------------- -saitekosa_sparc_device::saitekosa_sparc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +saitekosa_sparc_device::saitekosa_sparc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OSA_SPARC, tag, owner, clock), device_saitekosa_expansion_interface(mconfig, *this), m_maincpu(*this, "maincpu"), diff --git a/src/devices/bus/saitek_osa/sparc.h b/src/devices/bus/saitek_osa/sparc.h index ffdda735502..6436a8dcaa1 100644 --- a/src/devices/bus/saitek_osa/sparc.h +++ b/src/devices/bus/saitek_osa/sparc.h @@ -22,7 +22,7 @@ class saitekosa_sparc_device : public device_t, public device_saitekosa_expansio { public: // construction/destruction - saitekosa_sparc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + saitekosa_sparc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual u8 data_r() override; diff --git a/src/devices/bus/samcoupe/drive/atom.cpp b/src/devices/bus/samcoupe/drive/atom.cpp index 5ca86f5d327..7d4fc2731b8 100644 --- a/src/devices/bus/samcoupe/drive/atom.cpp +++ b/src/devices/bus/samcoupe/drive/atom.cpp @@ -34,7 +34,7 @@ void sam_atom_hdd_device::device_add_mconfig(machine_config &config) // sam_atom_hdd_device - constructor //------------------------------------------------- -sam_atom_hdd_device::sam_atom_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_atom_hdd_device::sam_atom_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_ATOM_HDD, tag, owner, clock), device_samcoupe_drive_interface(mconfig, *this), m_ata(*this, "ata"), diff --git a/src/devices/bus/samcoupe/drive/atom.h b/src/devices/bus/samcoupe/drive/atom.h index 0abfee86749..1ad0bc7b4bc 100644 --- a/src/devices/bus/samcoupe/drive/atom.h +++ b/src/devices/bus/samcoupe/drive/atom.h @@ -25,7 +25,7 @@ class sam_atom_hdd_device : public device_t, public device_samcoupe_drive_interf { public: // construction/destruction - sam_atom_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_atom_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t read(offs_t offset) override; diff --git a/src/devices/bus/samcoupe/drive/drive.cpp b/src/devices/bus/samcoupe/drive/drive.cpp index 564b2299fc2..6cc796e033a 100644 --- a/src/devices/bus/samcoupe/drive/drive.cpp +++ b/src/devices/bus/samcoupe/drive/drive.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SAMCOUPE_DRIVE_PORT, samcoupe_drive_port_device, "samcoupe_dr // samcoupe_drive_port_device - constructor //------------------------------------------------- -samcoupe_drive_port_device::samcoupe_drive_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +samcoupe_drive_port_device::samcoupe_drive_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAMCOUPE_DRIVE_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_module(nullptr) diff --git a/src/devices/bus/samcoupe/drive/drive.h b/src/devices/bus/samcoupe/drive/drive.h index 83f7ce0f069..66f968f81b1 100644 --- a/src/devices/bus/samcoupe/drive/drive.h +++ b/src/devices/bus/samcoupe/drive/drive.h @@ -45,7 +45,7 @@ public: // construction/destruction template samcoupe_drive_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, const char *dflt) - : samcoupe_drive_port_device(mconfig, tag, owner, uint32_t(0)) + : samcoupe_drive_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -53,7 +53,7 @@ public: set_fixed(false); } - samcoupe_drive_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + samcoupe_drive_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~samcoupe_drive_port_device(); // called from host diff --git a/src/devices/bus/samcoupe/drive/floppy.cpp b/src/devices/bus/samcoupe/drive/floppy.cpp index 3940e9f5ddb..c78e5bbb1b6 100644 --- a/src/devices/bus/samcoupe/drive/floppy.cpp +++ b/src/devices/bus/samcoupe/drive/floppy.cpp @@ -47,7 +47,7 @@ void sam_floppy_device::device_add_mconfig(machine_config &config) // sam_floppy_device - constructor //------------------------------------------------- -sam_floppy_device::sam_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_floppy_device::sam_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_FLOPPY, tag, owner, clock), device_samcoupe_drive_interface(mconfig, *this), m_fdc(*this, "fdc"), diff --git a/src/devices/bus/samcoupe/drive/floppy.h b/src/devices/bus/samcoupe/drive/floppy.h index 8f227009cbb..58109ed8b2a 100644 --- a/src/devices/bus/samcoupe/drive/floppy.h +++ b/src/devices/bus/samcoupe/drive/floppy.h @@ -26,7 +26,7 @@ class sam_floppy_device : public device_t, public device_samcoupe_drive_interfac { public: // construction/destruction - sam_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_floppy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t read(offs_t offset) override; diff --git a/src/devices/bus/samcoupe/expansion/blue_sampler.cpp b/src/devices/bus/samcoupe/expansion/blue_sampler.cpp index 9a70d3cac3d..c31e1274c29 100644 --- a/src/devices/bus/samcoupe/expansion/blue_sampler.cpp +++ b/src/devices/bus/samcoupe/expansion/blue_sampler.cpp @@ -31,7 +31,7 @@ void sam_blue_sound_sampler_device::device_add_mconfig(machine_config &config) m_ppi->out_pb_callback().set(FUNC(sam_blue_sound_sampler_device::ppi_portb_w)); m_ppi->in_pc_callback().set(FUNC(sam_blue_sound_sampler_device::ppi_portc_r)); - ZN426E(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.5); + ZN426E(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.5); // TODO: ZN449E ADC @@ -48,7 +48,7 @@ void sam_blue_sound_sampler_device::device_add_mconfig(machine_config &config) // sam_blue_sound_sampler_device - constructor //------------------------------------------------- -sam_blue_sound_sampler_device::sam_blue_sound_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_blue_sound_sampler_device::sam_blue_sound_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_BLUE_SOUND_SAMPLER, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_ppi(*this, "ppi"), diff --git a/src/devices/bus/samcoupe/expansion/blue_sampler.h b/src/devices/bus/samcoupe/expansion/blue_sampler.h index 56c1298345c..41caa6d78f9 100644 --- a/src/devices/bus/samcoupe/expansion/blue_sampler.h +++ b/src/devices/bus/samcoupe/expansion/blue_sampler.h @@ -27,7 +27,7 @@ class sam_blue_sound_sampler_device : public device_t, public device_samcoupe_ex { public: // construction/destruction - sam_blue_sound_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_blue_sound_sampler_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t iorq_r(offs_t offset) override; diff --git a/src/devices/bus/samcoupe/expansion/dallas.cpp b/src/devices/bus/samcoupe/expansion/dallas.cpp index 30e7a1d0005..1d35d82add5 100644 --- a/src/devices/bus/samcoupe/expansion/dallas.cpp +++ b/src/devices/bus/samcoupe/expansion/dallas.cpp @@ -35,7 +35,7 @@ void sam_dallas_clock_device::device_add_mconfig(machine_config &config) // sam_dallas_clock_device - constructor //------------------------------------------------- -sam_dallas_clock_device::sam_dallas_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_dallas_clock_device::sam_dallas_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_DALLAS_CLOCK, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_rtc(*this, "rtc"), diff --git a/src/devices/bus/samcoupe/expansion/dallas.h b/src/devices/bus/samcoupe/expansion/dallas.h index 4b011e5db34..d08e62813d3 100644 --- a/src/devices/bus/samcoupe/expansion/dallas.h +++ b/src/devices/bus/samcoupe/expansion/dallas.h @@ -25,7 +25,7 @@ class sam_dallas_clock_device : public device_t, public device_samcoupe_expansio { public: // construction/destruction - sam_dallas_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_dallas_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual void print_w(int state) override; diff --git a/src/devices/bus/samcoupe/expansion/expansion.cpp b/src/devices/bus/samcoupe/expansion/expansion.cpp index b52792eb43d..1463bea6376 100644 --- a/src/devices/bus/samcoupe/expansion/expansion.cpp +++ b/src/devices/bus/samcoupe/expansion/expansion.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SAMCOUPE_EXPANSION, samcoupe_expansion_device, "samcoupe_expa // samcoupe_expansion_device - constructor //------------------------------------------------- -samcoupe_expansion_device::samcoupe_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +samcoupe_expansion_device::samcoupe_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAMCOUPE_EXPANSION, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_int_handler(*this), diff --git a/src/devices/bus/samcoupe/expansion/expansion.h b/src/devices/bus/samcoupe/expansion/expansion.h index 90390286ac2..a78400f7d20 100644 --- a/src/devices/bus/samcoupe/expansion/expansion.h +++ b/src/devices/bus/samcoupe/expansion/expansion.h @@ -61,7 +61,7 @@ public: // construction/destruction template samcoupe_expansion_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts) - : samcoupe_expansion_device(mconfig, tag, owner, uint32_t(0)) + : samcoupe_expansion_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -69,7 +69,7 @@ public: set_fixed(false); } - samcoupe_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + samcoupe_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~samcoupe_expansion_device(); // callbacks diff --git a/src/devices/bus/samcoupe/expansion/onemeg.cpp b/src/devices/bus/samcoupe/expansion/onemeg.cpp index 05c7c01860d..39326df125c 100644 --- a/src/devices/bus/samcoupe/expansion/onemeg.cpp +++ b/src/devices/bus/samcoupe/expansion/onemeg.cpp @@ -43,7 +43,7 @@ ioport_constructor sam_onemeg_device::device_input_ports() const // sam_onemeg_device - constructor //------------------------------------------------- -sam_onemeg_device::sam_onemeg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_onemeg_device::sam_onemeg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_ONEMEG, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_dip(*this, "dip"), diff --git a/src/devices/bus/samcoupe/expansion/onemeg.h b/src/devices/bus/samcoupe/expansion/onemeg.h index 40b60accf82..73f3de3e448 100644 --- a/src/devices/bus/samcoupe/expansion/onemeg.h +++ b/src/devices/bus/samcoupe/expansion/onemeg.h @@ -24,7 +24,7 @@ class sam_onemeg_device : public device_t, public device_samcoupe_expansion_inte { public: // construction/destruction - sam_onemeg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_onemeg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual void xmem_w(int state) override; diff --git a/src/devices/bus/samcoupe/expansion/sambus.cpp b/src/devices/bus/samcoupe/expansion/sambus.cpp index 5b68ff49f88..817354e9478 100644 --- a/src/devices/bus/samcoupe/expansion/sambus.cpp +++ b/src/devices/bus/samcoupe/expansion/sambus.cpp @@ -39,7 +39,7 @@ void sam_sambus_device::device_add_mconfig(machine_config &config) // sam_sambus_device - constructor //------------------------------------------------- -sam_sambus_device::sam_sambus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_sambus_device::sam_sambus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_SAMBUS, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_rtc(*this, "rtc"), diff --git a/src/devices/bus/samcoupe/expansion/sambus.h b/src/devices/bus/samcoupe/expansion/sambus.h index 4d17ed4ae74..ecfc53b495f 100644 --- a/src/devices/bus/samcoupe/expansion/sambus.h +++ b/src/devices/bus/samcoupe/expansion/sambus.h @@ -25,7 +25,7 @@ class sam_sambus_device : public device_t, public device_samcoupe_expansion_inte { public: // construction/destruction - sam_sambus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_sambus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual void xmem_w(int state) override; diff --git a/src/devices/bus/samcoupe/expansion/sdide.cpp b/src/devices/bus/samcoupe/expansion/sdide.cpp index 4c442b816c6..c676acc90ae 100644 --- a/src/devices/bus/samcoupe/expansion/sdide.cpp +++ b/src/devices/bus/samcoupe/expansion/sdide.cpp @@ -34,7 +34,7 @@ void sam_sdide_device::device_add_mconfig(machine_config &config) // sam_sdide_device - constructor //------------------------------------------------- -sam_sdide_device::sam_sdide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_sdide_device::sam_sdide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_SDIDE, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_ata(*this, "ata"), diff --git a/src/devices/bus/samcoupe/expansion/sdide.h b/src/devices/bus/samcoupe/expansion/sdide.h index 75974d885f8..09db6d50752 100644 --- a/src/devices/bus/samcoupe/expansion/sdide.h +++ b/src/devices/bus/samcoupe/expansion/sdide.h @@ -25,7 +25,7 @@ class sam_sdide_device : public device_t, public device_samcoupe_expansion_inter { public: // construction/destruction - sam_sdide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_sdide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t iorq_r(offs_t offset) override; diff --git a/src/devices/bus/samcoupe/expansion/sid.cpp b/src/devices/bus/samcoupe/expansion/sid.cpp index 45c3c0c7f83..29ef3458fe2 100644 --- a/src/devices/bus/samcoupe/expansion/sid.cpp +++ b/src/devices/bus/samcoupe/expansion/sid.cpp @@ -45,7 +45,7 @@ void sam_sid8580_device::device_add_mconfig(machine_config &config) // sam_sid_device - constructor //------------------------------------------------- -sam_sid_device::sam_sid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +sam_sid_device::sam_sid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_sid(*this, "sid") @@ -56,7 +56,7 @@ sam_sid_device::sam_sid_device(const machine_config &mconfig, device_type type, // sam_sid6581_device - constructor //------------------------------------------------- -sam_sid6581_device::sam_sid6581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_sid6581_device::sam_sid6581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sam_sid_device(mconfig, SAM_SID6581, tag, owner, clock) { } @@ -65,7 +65,7 @@ sam_sid6581_device::sam_sid6581_device(const machine_config &mconfig, const char // sam_sid8580_device - constructor //------------------------------------------------- -sam_sid8580_device::sam_sid8580_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_sid8580_device::sam_sid8580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sam_sid_device(mconfig, SAM_SID8580, tag, owner, clock) { } diff --git a/src/devices/bus/samcoupe/expansion/sid.h b/src/devices/bus/samcoupe/expansion/sid.h index 9580f00af65..0189ff1387c 100644 --- a/src/devices/bus/samcoupe/expansion/sid.h +++ b/src/devices/bus/samcoupe/expansion/sid.h @@ -25,7 +25,7 @@ class sam_sid_device : public device_t, public device_samcoupe_expansion_interfa { public: // construction/destruction - sam_sid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sam_sid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // from host virtual void iorq_w(offs_t offset, uint8_t data) override; @@ -42,7 +42,7 @@ class sam_sid6581_device : public sam_sid_device { public: // construction/destruction - sam_sid6581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_sid6581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -54,7 +54,7 @@ class sam_sid8580_device : public sam_sid_device { public: // construction/destruction - sam_sid8580_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_sid8580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/samcoupe/expansion/spi.cpp b/src/devices/bus/samcoupe/expansion/spi.cpp index 47343f32dc1..39cf4cd4c4e 100644 --- a/src/devices/bus/samcoupe/expansion/spi.cpp +++ b/src/devices/bus/samcoupe/expansion/spi.cpp @@ -38,7 +38,7 @@ void sam_spi_device::device_add_mconfig(machine_config &config) // sambus_device - constructor //------------------------------------------------- -sam_spi_device::sam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_spi_device::sam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_SPI, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_data_out(*this, "data_out"), diff --git a/src/devices/bus/samcoupe/expansion/spi.h b/src/devices/bus/samcoupe/expansion/spi.h index 38e813bd6ee..4968d7901ef 100644 --- a/src/devices/bus/samcoupe/expansion/spi.h +++ b/src/devices/bus/samcoupe/expansion/spi.h @@ -25,7 +25,7 @@ class sam_spi_device : public device_t, public device_samcoupe_expansion_interfa { public: // construction/destruction - sam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual void print_w(int state) override; diff --git a/src/devices/bus/samcoupe/expansion/voicebox.cpp b/src/devices/bus/samcoupe/expansion/voicebox.cpp index d52fc3275a7..9bd6ebd84bd 100644 --- a/src/devices/bus/samcoupe/expansion/voicebox.cpp +++ b/src/devices/bus/samcoupe/expansion/voicebox.cpp @@ -38,7 +38,7 @@ const tiny_rom_entry *sam_voicebox_device::device_rom_region() const void sam_voicebox_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SP0256(config, m_sp0256, 3000000); // ??? + SP0256(config, m_sp0256, XTAL::u(3000000)); // ??? m_sp0256->add_route(ALL_OUTPUTS, "mono", 1.00); } @@ -51,7 +51,7 @@ void sam_voicebox_device::device_add_mconfig(machine_config &config) // sam_voicebox_device - constructor //------------------------------------------------- -sam_voicebox_device::sam_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_voicebox_device::sam_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_VOICEBOX, tag, owner, clock), device_samcoupe_expansion_interface(mconfig, *this), m_sp0256(*this, "sp0256") diff --git a/src/devices/bus/samcoupe/expansion/voicebox.h b/src/devices/bus/samcoupe/expansion/voicebox.h index 775bc544a49..9dcbe660d43 100644 --- a/src/devices/bus/samcoupe/expansion/voicebox.h +++ b/src/devices/bus/samcoupe/expansion/voicebox.h @@ -25,7 +25,7 @@ class sam_voicebox_device : public device_t, public device_samcoupe_expansion_in { public: // construction/destruction - sam_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t iorq_r(offs_t offset) override; diff --git a/src/devices/bus/samcoupe/mouse/mouse.cpp b/src/devices/bus/samcoupe/mouse/mouse.cpp index fbacfa67c7a..f29b870cb1f 100644 --- a/src/devices/bus/samcoupe/mouse/mouse.cpp +++ b/src/devices/bus/samcoupe/mouse/mouse.cpp @@ -48,7 +48,7 @@ ioport_constructor sam_mouse_device::device_input_ports() const // sam_mouse_device - constructor //------------------------------------------------- -sam_mouse_device::sam_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sam_mouse_device::sam_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM_MOUSE, tag, owner, clock), device_samcoupe_mouse_interface(mconfig, *this), m_io_buttons(*this, "buttons"), diff --git a/src/devices/bus/samcoupe/mouse/mouse.h b/src/devices/bus/samcoupe/mouse/mouse.h index 076f3035b6d..4c4f136aa54 100644 --- a/src/devices/bus/samcoupe/mouse/mouse.h +++ b/src/devices/bus/samcoupe/mouse/mouse.h @@ -24,7 +24,7 @@ class sam_mouse_device : public device_t, public device_samcoupe_mouse_interface { public: // construction/destruction - sam_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t read() override; diff --git a/src/devices/bus/samcoupe/mouse/mouseport.cpp b/src/devices/bus/samcoupe/mouse/mouseport.cpp index 3bfc609c093..7875214a3dc 100644 --- a/src/devices/bus/samcoupe/mouse/mouseport.cpp +++ b/src/devices/bus/samcoupe/mouse/mouseport.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SAMCOUPE_MOUSE_PORT, samcoupe_mouse_port_device, "samcoupe_mo // samcoupe_mouse_port_device - constructor //------------------------------------------------- -samcoupe_mouse_port_device::samcoupe_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +samcoupe_mouse_port_device::samcoupe_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAMCOUPE_MOUSE_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_mseint_handler(*this), diff --git a/src/devices/bus/samcoupe/mouse/mouseport.h b/src/devices/bus/samcoupe/mouse/mouseport.h index 92943f39a7c..6e73bb9b6c1 100644 --- a/src/devices/bus/samcoupe/mouse/mouseport.h +++ b/src/devices/bus/samcoupe/mouse/mouseport.h @@ -37,7 +37,7 @@ public: // construction/destruction template samcoupe_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts) - : samcoupe_mouse_port_device(mconfig, tag, owner, uint32_t(0)) + : samcoupe_mouse_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -45,7 +45,7 @@ public: set_fixed(false); } - samcoupe_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + samcoupe_mouse_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~samcoupe_mouse_port_device(); // callbacks diff --git a/src/devices/bus/sat_ctrl/analog.cpp b/src/devices/bus/sat_ctrl/analog.cpp index 6e513b18d47..794348ade35 100644 --- a/src/devices/bus/sat_ctrl/analog.cpp +++ b/src/devices/bus/sat_ctrl/analog.cpp @@ -63,7 +63,7 @@ ioport_constructor saturn_analog_device::device_input_ports() const // saturn_analog_device - constructor //------------------------------------------------- -saturn_analog_device::saturn_analog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_analog_device::saturn_analog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_ANALOG, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), diff --git a/src/devices/bus/sat_ctrl/analog.h b/src/devices/bus/sat_ctrl/analog.h index d86313e59a1..b6cddd3b4d5 100644 --- a/src/devices/bus/sat_ctrl/analog.h +++ b/src/devices/bus/sat_ctrl/analog.h @@ -25,7 +25,7 @@ class saturn_analog_device : public device_t, { public: // construction/destruction - saturn_analog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_analog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sat_ctrl/ctrl.cpp b/src/devices/bus/sat_ctrl/ctrl.cpp index aeff9244cc8..8b3dc45a800 100644 --- a/src/devices/bus/sat_ctrl/ctrl.cpp +++ b/src/devices/bus/sat_ctrl/ctrl.cpp @@ -60,7 +60,7 @@ device_saturn_control_port_interface::~device_saturn_control_port_interface() // saturn_control_port_device - constructor //------------------------------------------------- -saturn_control_port_device::saturn_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_control_port_device::saturn_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_CONTROL_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) diff --git a/src/devices/bus/sat_ctrl/ctrl.h b/src/devices/bus/sat_ctrl/ctrl.h index d17bed9b067..88a5a9fe9c0 100644 --- a/src/devices/bus/sat_ctrl/ctrl.h +++ b/src/devices/bus/sat_ctrl/ctrl.h @@ -46,7 +46,7 @@ public: // construction/destruction template saturn_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const* dflt) - : saturn_control_port_device(mconfig, tag, owner, (uint32_t)0) + : saturn_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -54,7 +54,7 @@ public: set_fixed(false); } - saturn_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + saturn_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~saturn_control_port_device(); uint16_t read_direct(); diff --git a/src/devices/bus/sat_ctrl/joy.cpp b/src/devices/bus/sat_ctrl/joy.cpp index f44b0f6b4ee..b98b6e7e53d 100644 --- a/src/devices/bus/sat_ctrl/joy.cpp +++ b/src/devices/bus/sat_ctrl/joy.cpp @@ -54,7 +54,7 @@ ioport_constructor saturn_joy_device::device_input_ports() const // saturn_joy_device - constructor //------------------------------------------------- -saturn_joy_device::saturn_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_joy_device::saturn_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_JOY, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_joy(*this, "JOY") diff --git a/src/devices/bus/sat_ctrl/joy.h b/src/devices/bus/sat_ctrl/joy.h index b4e124fc034..9f4775f9ce6 100644 --- a/src/devices/bus/sat_ctrl/joy.h +++ b/src/devices/bus/sat_ctrl/joy.h @@ -25,7 +25,7 @@ class saturn_joy_device : public device_t, { public: // construction/destruction - saturn_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sat_ctrl/joy_md.cpp b/src/devices/bus/sat_ctrl/joy_md.cpp index 987dffcf528..9db15d42fb9 100644 --- a/src/devices/bus/sat_ctrl/joy_md.cpp +++ b/src/devices/bus/sat_ctrl/joy_md.cpp @@ -70,7 +70,7 @@ ioport_constructor saturn_joymd6b_device::device_input_ports() const // constructors //------------------------------------------------- -saturn_joymd3b_device::saturn_joymd3b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_joymd3b_device::saturn_joymd3b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_JOYMD3B, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_joy(*this, "JOY") @@ -79,7 +79,7 @@ saturn_joymd3b_device::saturn_joymd3b_device(const machine_config &mconfig, cons } -saturn_joymd6b_device::saturn_joymd6b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_joymd6b_device::saturn_joymd6b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_JOYMD6B, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_joy(*this, "JOY") diff --git a/src/devices/bus/sat_ctrl/joy_md.h b/src/devices/bus/sat_ctrl/joy_md.h index 845c6bce9da..9ccf2905f10 100644 --- a/src/devices/bus/sat_ctrl/joy_md.h +++ b/src/devices/bus/sat_ctrl/joy_md.h @@ -25,7 +25,7 @@ class saturn_joymd3b_device : public device_t, { public: // construction/destruction - saturn_joymd3b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_joymd3b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; @@ -52,7 +52,7 @@ class saturn_joymd6b_device : public device_t, { public: // construction/destruction - saturn_joymd6b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_joymd6b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sat_ctrl/keybd.cpp b/src/devices/bus/sat_ctrl/keybd.cpp index 3ab0d8dc4ab..8fa1486a4e3 100644 --- a/src/devices/bus/sat_ctrl/keybd.cpp +++ b/src/devices/bus/sat_ctrl/keybd.cpp @@ -206,7 +206,7 @@ ioport_constructor saturn_keybd_device::device_input_ports() const // saturn_keybd_device - constructor //------------------------------------------------- -saturn_keybd_device::saturn_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_keybd_device::saturn_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_KEYBD, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_key(*this, "KEY.%u", 0), diff --git a/src/devices/bus/sat_ctrl/keybd.h b/src/devices/bus/sat_ctrl/keybd.h index dafb932974c..1011763826d 100644 --- a/src/devices/bus/sat_ctrl/keybd.h +++ b/src/devices/bus/sat_ctrl/keybd.h @@ -25,7 +25,7 @@ class saturn_keybd_device : public device_t, { public: // construction/destruction - saturn_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sat_ctrl/mouse.cpp b/src/devices/bus/sat_ctrl/mouse.cpp index acef9feb8fd..12607c84758 100644 --- a/src/devices/bus/sat_ctrl/mouse.cpp +++ b/src/devices/bus/sat_ctrl/mouse.cpp @@ -51,7 +51,7 @@ ioport_constructor saturn_mouse_device::device_input_ports() const // saturn_mouse_device - constructor //------------------------------------------------- -saturn_mouse_device::saturn_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_mouse_device::saturn_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_MOUSE, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_pointx(*this, "MOUSE_X"), diff --git a/src/devices/bus/sat_ctrl/mouse.h b/src/devices/bus/sat_ctrl/mouse.h index 2b896ca6b49..28b80e494eb 100644 --- a/src/devices/bus/sat_ctrl/mouse.h +++ b/src/devices/bus/sat_ctrl/mouse.h @@ -25,7 +25,7 @@ class saturn_mouse_device : public device_t, { public: // construction/destruction - saturn_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sat_ctrl/multitap.cpp b/src/devices/bus/sat_ctrl/multitap.cpp index 71eacdf0053..04a5075982d 100644 --- a/src/devices/bus/sat_ctrl/multitap.cpp +++ b/src/devices/bus/sat_ctrl/multitap.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(SATURN_MULTITAP, saturn_multitap_device, "saturn_multitap", " // LIVE DEVICE //************************************************************************** -saturn_multitap_device::saturn_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_multitap_device::saturn_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_MULTITAP, tag, owner, clock) , device_saturn_control_port_interface(mconfig, *this) , m_subctrl_port(*this, "ctrl%u", 1U) diff --git a/src/devices/bus/sat_ctrl/multitap.h b/src/devices/bus/sat_ctrl/multitap.h index 5aa98dacf3b..62091210e10 100644 --- a/src/devices/bus/sat_ctrl/multitap.h +++ b/src/devices/bus/sat_ctrl/multitap.h @@ -23,7 +23,7 @@ class saturn_multitap_device : public device_t, public device_saturn_control_por { public: // construction/destruction - saturn_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/sat_ctrl/pointer.cpp b/src/devices/bus/sat_ctrl/pointer.cpp index 10eceae1a2d..79900245e2f 100644 --- a/src/devices/bus/sat_ctrl/pointer.cpp +++ b/src/devices/bus/sat_ctrl/pointer.cpp @@ -51,7 +51,7 @@ ioport_constructor saturn_track_device::device_input_ports() const // saturn_track_device - constructor //------------------------------------------------- -saturn_track_device::saturn_track_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_track_device::saturn_track_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_TRACK, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_pointx(*this, "POINT_X"), diff --git a/src/devices/bus/sat_ctrl/pointer.h b/src/devices/bus/sat_ctrl/pointer.h index 869455706ef..0bfdcdf5581 100644 --- a/src/devices/bus/sat_ctrl/pointer.h +++ b/src/devices/bus/sat_ctrl/pointer.h @@ -25,7 +25,7 @@ class saturn_track_device : public device_t, { public: // construction/destruction - saturn_track_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_track_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sat_ctrl/racing.cpp b/src/devices/bus/sat_ctrl/racing.cpp index 91444de2b6a..c7ea15801ce 100644 --- a/src/devices/bus/sat_ctrl/racing.cpp +++ b/src/devices/bus/sat_ctrl/racing.cpp @@ -57,7 +57,7 @@ ioport_constructor saturn_wheel_device::device_input_ports() const // saturn_wheel_device - constructor //------------------------------------------------- -saturn_wheel_device::saturn_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saturn_wheel_device::saturn_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_WHEEL, tag, owner, clock), device_saturn_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), diff --git a/src/devices/bus/sat_ctrl/racing.h b/src/devices/bus/sat_ctrl/racing.h index 9f426c9ef51..de09eda8c7d 100644 --- a/src/devices/bus/sat_ctrl/racing.h +++ b/src/devices/bus/sat_ctrl/racing.h @@ -25,7 +25,7 @@ class saturn_wheel_device : public device_t, { public: // construction/destruction - saturn_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sat_ctrl/segatap.cpp b/src/devices/bus/sat_ctrl/segatap.cpp index baaa52071ed..8591daa4491 100644 --- a/src/devices/bus/sat_ctrl/segatap.cpp +++ b/src/devices/bus/sat_ctrl/segatap.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(SATURN_SEGATAP, saturn_segatap_device, "saturn_segatap", "sat // LIVE DEVICE //************************************************************************** -saturn_segatap_device::saturn_segatap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_segatap_device::saturn_segatap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_SEGATAP, tag, owner, clock) , device_saturn_control_port_interface(mconfig, *this) , m_subctrl_port(*this, "ctrl%u", 1U) diff --git a/src/devices/bus/sat_ctrl/segatap.h b/src/devices/bus/sat_ctrl/segatap.h index 799d4d8356a..d0b0d166c94 100644 --- a/src/devices/bus/sat_ctrl/segatap.h +++ b/src/devices/bus/sat_ctrl/segatap.h @@ -24,7 +24,7 @@ class saturn_segatap_device : public device_t, public device_saturn_control_port { public: // construction/destruction - saturn_segatap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_segatap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/saturn/bram.cpp b/src/devices/bus/saturn/bram.cpp index 604948343ed..d6854366eb1 100644 --- a/src/devices/bus/saturn/bram.cpp +++ b/src/devices/bus/saturn/bram.cpp @@ -21,29 +21,29 @@ DEFINE_DEVICE_TYPE(SATURN_BRAM_16MB, saturn_bram16mb_device, "sat_bram_16mb", "S DEFINE_DEVICE_TYPE(SATURN_BRAM_32MB, saturn_bram32mb_device, "sat_bram_32mb", "Saturn Battery RAM 32Mbit Cart") -saturn_bram_device::saturn_bram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type) +saturn_bram_device::saturn_bram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cart_type) : device_t(mconfig, type, tag, owner, clock) , device_sat_cart_interface(mconfig, *this, cart_type) , device_nvram_interface(mconfig, *this) { } -saturn_bram4mb_device::saturn_bram4mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_bram4mb_device::saturn_bram4mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saturn_bram_device(mconfig, SATURN_BRAM_4MB, tag, owner, clock, 0x21) { } -saturn_bram8mb_device::saturn_bram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_bram8mb_device::saturn_bram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saturn_bram_device(mconfig, SATURN_BRAM_8MB, tag, owner, clock, 0x22) { } -saturn_bram16mb_device::saturn_bram16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_bram16mb_device::saturn_bram16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saturn_bram_device(mconfig, SATURN_BRAM_16MB, tag, owner, clock, 0x23) { } -saturn_bram32mb_device::saturn_bram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_bram32mb_device::saturn_bram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saturn_bram_device(mconfig, SATURN_BRAM_32MB, tag, owner, clock, 0x24) { } diff --git a/src/devices/bus/saturn/bram.h b/src/devices/bus/saturn/bram.h index 97e419b19fd..873f0c75711 100644 --- a/src/devices/bus/saturn/bram.h +++ b/src/devices/bus/saturn/bram.h @@ -19,7 +19,7 @@ public: protected: // construction/destruction - saturn_bram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type); + saturn_bram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cart_type); // device-level overrides virtual void device_start() override; @@ -35,28 +35,28 @@ class saturn_bram4mb_device : public saturn_bram_device { public: // construction/destruction - saturn_bram4mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_bram4mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class saturn_bram8mb_device : public saturn_bram_device { public: // construction/destruction - saturn_bram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_bram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class saturn_bram16mb_device : public saturn_bram_device { public: // construction/destruction - saturn_bram16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_bram16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class saturn_bram32mb_device : public saturn_bram_device { public: // construction/destruction - saturn_bram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_bram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/saturn/dram.cpp b/src/devices/bus/saturn/dram.cpp index c0380752aea..0cb154ee7f5 100644 --- a/src/devices/bus/saturn/dram.cpp +++ b/src/devices/bus/saturn/dram.cpp @@ -19,18 +19,18 @@ DEFINE_DEVICE_TYPE(SATURN_DRAM_8MB, saturn_dram8mb_device, "sat_dram_8mb", "S DEFINE_DEVICE_TYPE(SATURN_DRAM_32MB, saturn_dram32mb_device, "sat_dram_32mb", "Saturn Data RAM 32Mbit Cart") -saturn_dram_device::saturn_dram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type) +saturn_dram_device::saturn_dram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cart_type) : device_t(mconfig, type, tag, owner, clock) , device_sat_cart_interface(mconfig, *this, cart_type) { } -saturn_dram8mb_device::saturn_dram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_dram8mb_device::saturn_dram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saturn_dram_device(mconfig, SATURN_DRAM_8MB, tag, owner, clock, 0x5a) { } -saturn_dram32mb_device::saturn_dram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_dram32mb_device::saturn_dram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saturn_dram_device(mconfig, SATURN_DRAM_32MB, tag, owner, clock, 0x5c) { } diff --git a/src/devices/bus/saturn/dram.h b/src/devices/bus/saturn/dram.h index 847c90a9955..8cebdf86f88 100644 --- a/src/devices/bus/saturn/dram.h +++ b/src/devices/bus/saturn/dram.h @@ -20,7 +20,7 @@ public: protected: // construction/destruction - saturn_dram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type); + saturn_dram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cart_type); // device-level overrides virtual void device_start() override; @@ -31,14 +31,14 @@ class saturn_dram8mb_device : public saturn_dram_device { public: // construction/destruction - saturn_dram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_dram8mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class saturn_dram32mb_device : public saturn_dram_device { public: // construction/destruction - saturn_dram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_dram32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/saturn/rom.cpp b/src/devices/bus/saturn/rom.cpp index 5853a7b4bdb..38a437214a3 100644 --- a/src/devices/bus/saturn/rom.cpp +++ b/src/devices/bus/saturn/rom.cpp @@ -18,13 +18,13 @@ DEFINE_DEVICE_TYPE(SATURN_ROM, saturn_rom_device, "sat_rom", "Saturn ROM Carts") -saturn_rom_device::saturn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type) +saturn_rom_device::saturn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cart_type) : device_t(mconfig, type, tag, owner, clock) , device_sat_cart_interface(mconfig, *this, cart_type) { } -saturn_rom_device::saturn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_rom_device::saturn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saturn_rom_device(mconfig, SATURN_ROM, tag, owner, clock, 0xff) // actually not clear if ROM carts have a type ID like DRAM/BRAM carts { } diff --git a/src/devices/bus/saturn/rom.h b/src/devices/bus/saturn/rom.h index 0706a74a420..ee77b98bb29 100644 --- a/src/devices/bus/saturn/rom.h +++ b/src/devices/bus/saturn/rom.h @@ -12,13 +12,13 @@ class saturn_rom_device : public device_t, public device_sat_cart_interface { public: // construction/destruction - saturn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint32_t read_rom(offs_t offset) override; protected: - saturn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type); + saturn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cart_type); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/saturn/sat_slot.cpp b/src/devices/bus/saturn/sat_slot.cpp index 975a67403f0..cd8dc9c0026 100644 --- a/src/devices/bus/saturn/sat_slot.cpp +++ b/src/devices/bus/saturn/sat_slot.cpp @@ -102,7 +102,7 @@ void device_sat_cart_interface::dram1_alloc(uint32_t size) //------------------------------------------------- // sat_cart_slot_device - constructor //------------------------------------------------- -sat_cart_slot_device::sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sat_cart_slot_device::sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h index 0a501866374..57a3dd33ae3 100644 --- a/src/devices/bus/saturn/sat_slot.h +++ b/src/devices/bus/saturn/sat_slot.h @@ -69,14 +69,14 @@ public: // construction/destruction template sat_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : sat_cart_slot_device(mconfig, tag, owner, 0) + : sat_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sat_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~sat_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/sbus/artecon.cpp b/src/devices/bus/sbus/artecon.cpp index 0117ec12cd9..6f24ad471e5 100644 --- a/src/devices/bus/sbus/artecon.cpp +++ b/src/devices/bus/sbus/artecon.cpp @@ -39,7 +39,7 @@ void sbus_artecon_device::device_add_mconfig(machine_config &config) } -sbus_artecon_device::sbus_artecon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_artecon_device::sbus_artecon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SBUS_SB300P, tag, owner, clock) , device_sbus_card_interface(mconfig, *this) , m_rom(*this, "prom") diff --git a/src/devices/bus/sbus/artecon.h b/src/devices/bus/sbus/artecon.h index 9b0d9a4cbbb..cb4c39b2b44 100644 --- a/src/devices/bus/sbus/artecon.h +++ b/src/devices/bus/sbus/artecon.h @@ -18,7 +18,7 @@ class sbus_artecon_device : public device_t, public device_sbus_card_interface { public: // construction/destruction - sbus_artecon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_artecon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/sbus/bwtwo.cpp b/src/devices/bus/sbus/bwtwo.cpp index c034d43e05f..422d55e307f 100644 --- a/src/devices/bus/sbus/bwtwo.cpp +++ b/src/devices/bus/sbus/bwtwo.cpp @@ -46,7 +46,7 @@ void sbus_bwtwo_device::device_add_mconfig(machine_config &config) } -sbus_bwtwo_device::sbus_bwtwo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_bwtwo_device::sbus_bwtwo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SBUS_BWTWO, tag, owner, clock) , device_sbus_card_interface(mconfig, *this) , m_rom(*this, "prom") diff --git a/src/devices/bus/sbus/bwtwo.h b/src/devices/bus/sbus/bwtwo.h index d307f16f977..3296f2ca9b8 100644 --- a/src/devices/bus/sbus/bwtwo.h +++ b/src/devices/bus/sbus/bwtwo.h @@ -18,7 +18,7 @@ class sbus_bwtwo_device : public device_t, public device_sbus_card_interface { public: // construction/destruction - sbus_bwtwo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_bwtwo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/sbus/cgsix.cpp b/src/devices/bus/sbus/cgsix.cpp index 4ae3301c285..319778513d4 100644 --- a/src/devices/bus/sbus/cgsix.cpp +++ b/src/devices/bus/sbus/cgsix.cpp @@ -28,7 +28,7 @@ void sbus_cgsix_device::base_map(address_map &map) map(0x00700000, 0x00700fff).rw(FUNC(sbus_cgsix_device::fbc_r), FUNC(sbus_cgsix_device::fbc_w)); } -sbus_cgsix_device::sbus_cgsix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sbus_cgsix_device::sbus_cgsix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sbus_card_interface(mconfig, *this) , m_rom(*this, "prom") @@ -1322,10 +1322,10 @@ void sbus_turbogx_device::device_add_mconfig(machine_config &config) m_screen->set_raw(105.561_MHz_XTAL, 1472, 0, 1152, 943, 0, 900); m_screen->screen_vblank().set(FUNC(sbus_turbogx_device::vblank_w)); - BT458(config, m_ramdac, 0); + BT458(config, m_ramdac); } -sbus_turbogx_device::sbus_turbogx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_turbogx_device::sbus_turbogx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sbus_cgsix_device(mconfig, SBUS_TURBOGX, tag, owner, clock, 0x100000) { } @@ -1364,10 +1364,10 @@ void sbus_turbogxp_device::device_add_mconfig(machine_config &config) m_screen->set_refresh_hz(72); m_screen->screen_vblank().set(FUNC(sbus_turbogxp_device::vblank_w)); - BT467(config, m_ramdac, 0); + BT467(config, m_ramdac); } -sbus_turbogxp_device::sbus_turbogxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_turbogxp_device::sbus_turbogxp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sbus_cgsix_device(mconfig, SBUS_TURBOGXP, tag, owner, clock, 0x400000) { } diff --git a/src/devices/bus/sbus/cgsix.h b/src/devices/bus/sbus/cgsix.h index b6f3fe7520d..096add5dae6 100644 --- a/src/devices/bus/sbus/cgsix.h +++ b/src/devices/bus/sbus/cgsix.h @@ -22,13 +22,13 @@ public: protected: // construction/destruction - sbus_cgsix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint32_t vram_size) + sbus_cgsix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint32_t vram_size) : sbus_cgsix_device(mconfig, type, tag, owner, clock) { set_vram_size(vram_size); } - sbus_cgsix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sbus_cgsix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_vram_size(uint32_t vram_size) { m_vram_size = vram_size; } @@ -520,7 +520,7 @@ protected: class sbus_turbogx_device : public sbus_cgsix_device { public: - sbus_turbogx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_turbogx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides @@ -536,7 +536,7 @@ protected: class sbus_turbogxp_device : public sbus_cgsix_device { public: - sbus_turbogxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_turbogxp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/sbus/cgthree.cpp b/src/devices/bus/sbus/cgthree.cpp index 2ca7e930c04..ebd57c13c2a 100644 --- a/src/devices/bus/sbus/cgthree.cpp +++ b/src/devices/bus/sbus/cgthree.cpp @@ -38,10 +38,10 @@ void sbus_cgthree_device::device_add_mconfig(machine_config &config) m_screen->set_screen_update(FUNC(sbus_cgthree_device::screen_update)); m_screen->set_raw(92.9405_MHz_XTAL, 1504, 0, 1152, 937, 0, 900); - BT458(config, m_ramdac, 0); + BT458(config, m_ramdac); } -sbus_cgthree_device::sbus_cgthree_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_cgthree_device::sbus_cgthree_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SBUS_CGTHREE, tag, owner, clock) , device_sbus_card_interface(mconfig, *this) , m_rom(*this, "prom") diff --git a/src/devices/bus/sbus/cgthree.h b/src/devices/bus/sbus/cgthree.h index d95a104aef5..741051f66b9 100644 --- a/src/devices/bus/sbus/cgthree.h +++ b/src/devices/bus/sbus/cgthree.h @@ -20,7 +20,7 @@ public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - sbus_cgthree_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_cgthree_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/sbus/hme.cpp b/src/devices/bus/sbus/hme.cpp index b11354f8e1e..a37de672eef 100644 --- a/src/devices/bus/sbus/hme.cpp +++ b/src/devices/bus/sbus/hme.cpp @@ -38,7 +38,7 @@ void sbus_hme_device::device_add_mconfig(machine_config &config) } -sbus_hme_device::sbus_hme_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_hme_device::sbus_hme_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SBUS_HME, tag, owner, clock) , device_sbus_card_interface(mconfig, *this) , m_rom(*this, "prom") diff --git a/src/devices/bus/sbus/hme.h b/src/devices/bus/sbus/hme.h index fde0571c755..b996272a259 100644 --- a/src/devices/bus/sbus/hme.h +++ b/src/devices/bus/sbus/hme.h @@ -18,7 +18,7 @@ class sbus_hme_device : public device_t, public device_sbus_card_interface { public: // construction/destruction - sbus_hme_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_hme_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/sbus/sbus.cpp b/src/devices/bus/sbus/sbus.cpp index 6640509d3ec..aa4766cab39 100644 --- a/src/devices/bus/sbus/sbus.cpp +++ b/src/devices/bus/sbus/sbus.cpp @@ -35,12 +35,12 @@ void sbus_cards(device_slot_interface &device) DEFINE_DEVICE_TYPE(SBUS_SLOT, sbus_slot_device, "sbus_slot", "Sun SBus Slot") -sbus_slot_device::sbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_slot_device::sbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sbus_slot_device(mconfig, SBUS_SLOT, tag, owner, clock) { } -sbus_slot_device::sbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sbus_slot_device::sbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_sbus(*this, finder_base::DUMMY_TAG) @@ -75,12 +75,12 @@ device_memory_interface::space_config_vector sbus_device::memory_space_config() }; } -sbus_device::sbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_device::sbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sbus_device(mconfig, SBUS, tag, owner, clock) { } -sbus_device::sbus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sbus_device::sbus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("sbus", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor()) diff --git a/src/devices/bus/sbus/sbus.h b/src/devices/bus/sbus/sbus.h index 2c66318c8aa..df8674d4a7f 100644 --- a/src/devices/bus/sbus/sbus.h +++ b/src/devices/bus/sbus/sbus.h @@ -23,7 +23,7 @@ class sbus_slot_device : public device_t, public device_single_card_slot_interfa public: // construction/destruction template - sbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&sbus_tag, int slot, U &&opts, const char *dflt, bool fixed = false) + sbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&sbus_tag, int slot, U &&opts, const char *dflt, bool fixed = false) : sbus_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -33,10 +33,10 @@ public: m_sbus.set_tag(std::forward(sbus_tag)); m_slot = slot; } - sbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sbus_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; @@ -58,14 +58,14 @@ class sbus_device : public device_t, public: // construction/destruction template - sbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&space_tag, int space_num) + sbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&space_tag, int space_num) : sbus_device(mconfig, tag, owner, clock) { set_cpu(std::forward(cpu_tag)); set_type1space(std::forward(space_tag), space_num); } - sbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration template void set_cpu(T &&tag) { m_maincpu.set_tag(std::forward(tag)); } @@ -91,7 +91,7 @@ public: void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); protected: - sbus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sbus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; diff --git a/src/devices/bus/sbus/sunpc.cpp b/src/devices/bus/sbus/sunpc.cpp index bfb88b4726f..7968e6d405d 100644 --- a/src/devices/bus/sbus/sunpc.cpp +++ b/src/devices/bus/sbus/sunpc.cpp @@ -38,7 +38,7 @@ void sbus_sunpc_device::device_add_mconfig(machine_config &config) } -sbus_sunpc_device::sbus_sunpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbus_sunpc_device::sbus_sunpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SBUS_SUNPC, tag, owner, clock) , device_sbus_card_interface(mconfig, *this) , m_rom(*this, "prom") diff --git a/src/devices/bus/sbus/sunpc.h b/src/devices/bus/sbus/sunpc.h index 951b0c6f7d6..6c41d38b70b 100644 --- a/src/devices/bus/sbus/sunpc.h +++ b/src/devices/bus/sbus/sunpc.h @@ -18,7 +18,7 @@ class sbus_sunpc_device : public device_t, public device_sbus_card_interface { public: // construction/destruction - sbus_sunpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbus_sunpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/scsi/acb4070.cpp b/src/devices/bus/scsi/acb4070.cpp index 0b9e67b438f..3c4886d2da3 100644 --- a/src/devices/bus/scsi/acb4070.cpp +++ b/src/devices/bus/scsi/acb4070.cpp @@ -11,7 +11,7 @@ // device type definition DEFINE_DEVICE_TYPE(ACB4070, acb4070_device, "acb4070", "ACB4070") -acb4070_device::acb4070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acb4070_device::acb4070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsihd_device(mconfig, ACB4070, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/acb4070.h b/src/devices/bus/scsi/acb4070.h index 848798152a5..d0fd4f4fa8f 100644 --- a/src/devices/bus/scsi/acb4070.h +++ b/src/devices/bus/scsi/acb4070.h @@ -11,7 +11,7 @@ class acb4070_device : public scsihd_device { public: // construction/destruction - acb4070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acb4070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ExecCommand() override; virtual void WriteData( uint8_t *data, int dataLength ) override; diff --git a/src/devices/bus/scsi/cdu76s.cpp b/src/devices/bus/scsi/cdu76s.cpp index 01860e7f31c..e4e581efe5e 100644 --- a/src/devices/bus/scsi/cdu76s.cpp +++ b/src/devices/bus/scsi/cdu76s.cpp @@ -42,7 +42,7 @@ void sony_cdu76s_device::ReadData( uint8_t *data, int dataLength ) // device type definition DEFINE_DEVICE_TYPE(CDU76S, sony_cdu76s_device, "cdu76s", "Sony CDU-76S") -sony_cdu76s_device::sony_cdu76s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sony_cdu76s_device::sony_cdu76s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd_device(mconfig, CDU76S, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/cdu76s.h b/src/devices/bus/scsi/cdu76s.h index 7eb6f7487ea..6d0ab4ef5cc 100644 --- a/src/devices/bus/scsi/cdu76s.h +++ b/src/devices/bus/scsi/cdu76s.h @@ -19,7 +19,7 @@ class sony_cdu76s_device : public scsicd_device { public: - sony_cdu76s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sony_cdu76s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ExecCommand() override; virtual void ReadData( uint8_t *data, int dataLength ) override; diff --git a/src/devices/bus/scsi/d9060hd.cpp b/src/devices/bus/scsi/d9060hd.cpp index 1d7ee7e503d..4b41a8f2c14 100644 --- a/src/devices/bus/scsi/d9060hd.cpp +++ b/src/devices/bus/scsi/d9060hd.cpp @@ -11,7 +11,7 @@ // device type definition DEFINE_DEVICE_TYPE(D9060HD, d9060hd_device, "d9060hd", "D9060HD") -d9060hd_device::d9060hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +d9060hd_device::d9060hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsihd_device(mconfig, D9060HD, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/d9060hd.h b/src/devices/bus/scsi/d9060hd.h index 3e7140e74cd..3bf3091fceb 100644 --- a/src/devices/bus/scsi/d9060hd.h +++ b/src/devices/bus/scsi/d9060hd.h @@ -11,7 +11,7 @@ class d9060hd_device : public scsihd_device { public: // construction/destruction - d9060hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + d9060hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ExecCommand() override; }; diff --git a/src/devices/bus/scsi/omti5100.cpp b/src/devices/bus/scsi/omti5100.cpp index a76893fd12c..df75fa490bc 100644 --- a/src/devices/bus/scsi/omti5100.cpp +++ b/src/devices/bus/scsi/omti5100.cpp @@ -24,7 +24,7 @@ const tiny_rom_entry *omti5100_device::device_rom_region() const } #endif -omti5100_device::omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +omti5100_device::omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsihd_device(mconfig, OMTI5100, tag, owner, clock) , m_image0(*this, "image0") , m_image1(*this, "image1") diff --git a/src/devices/bus/scsi/omti5100.h b/src/devices/bus/scsi/omti5100.h index 4b1e1dda59a..fcccc2bc9a7 100644 --- a/src/devices/bus/scsi/omti5100.h +++ b/src/devices/bus/scsi/omti5100.h @@ -10,7 +10,7 @@ class omti5100_device : public scsihd_device { public: - omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + omti5100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ExecCommand() override; virtual void ReadData( uint8_t *data, int dataLength ) override; diff --git a/src/devices/bus/scsi/pc9801_sasi.cpp b/src/devices/bus/scsi/pc9801_sasi.cpp index b7c93f98094..03a51c8b199 100644 --- a/src/devices/bus/scsi/pc9801_sasi.cpp +++ b/src/devices/bus/scsi/pc9801_sasi.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(PC9801_SASI, pc9801_sasi_device, "pc9801_sasi", "PC9801 SASI Controller") -pc9801_sasi_device::pc9801_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_sasi_device::pc9801_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsihd_device(mconfig, PC9801_SASI, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/pc9801_sasi.h b/src/devices/bus/scsi/pc9801_sasi.h index 773de463c61..34b7c2d1b07 100644 --- a/src/devices/bus/scsi/pc9801_sasi.h +++ b/src/devices/bus/scsi/pc9801_sasi.h @@ -9,7 +9,7 @@ class pc9801_sasi_device : public scsihd_device { public: // construction/destruction - pc9801_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_sasi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ExecCommand() override; }; diff --git a/src/devices/bus/scsi/s1410.cpp b/src/devices/bus/scsi/s1410.cpp index 0aec38db1b2..eddb80fe4bc 100644 --- a/src/devices/bus/scsi/s1410.cpp +++ b/src/devices/bus/scsi/s1410.cpp @@ -186,7 +186,7 @@ void s1410_device::device_add_mconfig(machine_config &config) // s1410_device - constructor //------------------------------------------------- -s1410_device::s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s1410_device::s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsihd_device(mconfig, S1410, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/s1410.h b/src/devices/bus/scsi/s1410.h index 03ec288b76a..27de1531d64 100644 --- a/src/devices/bus/scsi/s1410.h +++ b/src/devices/bus/scsi/s1410.h @@ -17,7 +17,7 @@ class s1410_device : public scsihd_device { public: // construction/destruction - s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s1410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/scsi/sa1403d.cpp b/src/devices/bus/scsi/sa1403d.cpp index 5ab22288835..029f0298905 100644 --- a/src/devices/bus/scsi/sa1403d.cpp +++ b/src/devices/bus/scsi/sa1403d.cpp @@ -113,7 +113,7 @@ ioport_constructor sa1403d_device::device_input_ports() const // sa1403d_device - constructor //------------------------------------------------- -sa1403d_device::sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sa1403d_device::sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsihd_device(mconfig, SA1403D, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/sa1403d.h b/src/devices/bus/scsi/sa1403d.h index f4b229d6514..b7ba6c0c409 100644 --- a/src/devices/bus/scsi/sa1403d.h +++ b/src/devices/bus/scsi/sa1403d.h @@ -18,7 +18,7 @@ class sa1403d_device : public scsihd_device { public: // construction/destruction - sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sa1403d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ExecCommand() override; virtual void WriteData( uint8_t *data, int dataLength ) override; diff --git a/src/devices/bus/scsi/scsi.cpp b/src/devices/bus/scsi/scsi.cpp index a4477483766..3646fd36c32 100644 --- a/src/devices/bus/scsi/scsi.cpp +++ b/src/devices/bus/scsi/scsi.cpp @@ -4,7 +4,7 @@ #include "emu.h" #include "scsi.h" -scsi_port_device::scsi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scsi_port_device::scsi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCSI_PORT, tag, owner, clock), m_bsy_handler(*this), m_sel_handler(*this), @@ -671,7 +671,7 @@ void scsi_port_device::set_output_latch(output_latch_device &latch) DEFINE_DEVICE_TYPE(SCSI_PORT, scsi_port_device, "scsi", "SCSI Port") -scsi_port_slot_device::scsi_port_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scsi_port_slot_device::scsi_port_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCSI_PORT_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_dev(nullptr), diff --git a/src/devices/bus/scsi/scsi.h b/src/devices/bus/scsi/scsi.h index 07e64d5f102..01f72064c0d 100644 --- a/src/devices/bus/scsi/scsi.h +++ b/src/devices/bus/scsi/scsi.h @@ -27,7 +27,7 @@ class scsi_port_device : public device_t public: // construction/destruction - scsi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + scsi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto bsy_handler() { return m_bsy_handler.bind(); } auto sel_handler() { return m_sel_handler.bind(); } @@ -174,7 +174,7 @@ class scsi_port_slot_device : public device_t, public device_single_card_slot_in friend class scsi_port_interface; public: - scsi_port_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + scsi_port_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); scsi_port_interface *dev() { return m_dev; } scsi_port_device *port() { return m_port; } diff --git a/src/devices/bus/scsi/scsicd.cpp b/src/devices/bus/scsi/scsicd.cpp index 0f577ea44d3..4bad210f21f 100644 --- a/src/devices/bus/scsi/scsicd.cpp +++ b/src/devices/bus/scsi/scsicd.cpp @@ -12,12 +12,12 @@ // device type definition DEFINE_DEVICE_TYPE(SCSICD, scsicd_device, "scsicd", "SCSI CD") -scsicd_device::scsicd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scsicd_device::scsicd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd_device(mconfig, SCSICD, tag, owner, clock) { } -scsicd_device::scsicd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +scsicd_device::scsicd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : scsihle_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/scsicd.h b/src/devices/bus/scsi/scsicd.h index 9d88f6bd1a8..97fc4a1cf83 100644 --- a/src/devices/bus/scsi/scsicd.h +++ b/src/devices/bus/scsi/scsicd.h @@ -16,10 +16,10 @@ class scsicd_device : public scsihle_device, public t10mmc { public: // construction/destruction - scsicd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scsicd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - scsicd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + scsicd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/scsi/scsicd512.cpp b/src/devices/bus/scsi/scsicd512.cpp index 5395d9ff5b4..9b521dc62b5 100644 --- a/src/devices/bus/scsi/scsicd512.cpp +++ b/src/devices/bus/scsi/scsicd512.cpp @@ -66,37 +66,37 @@ void scsicd512_device::ReadData(uint8_t *data, int dataLength) } } -scsicd512_device::scsicd512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +scsicd512_device::scsicd512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : scsicd_device(mconfig, type, tag, owner, clock) { } -dec_rrd45_device::dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dec_rrd45_device::dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd512_device(mconfig, RRD45, tag, owner, "DEC ", "RRD45 (C) DEC ", "0436", 0x98) { } -toshiba_xm3301_device::toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +toshiba_xm3301_device::toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd512_device(mconfig, XM3301, tag, owner, "TOSHIBA ", "CD-ROM XM-3301TA", "0272", 0x88) { } -toshiba_xm5301_sun_device::toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +toshiba_xm5301_sun_device::toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd512_device(mconfig, XM5301SUN, tag, owner, "TOSHIBA ", "XM-5301TASUN4XCD", "2915", 0x98) { } -toshiba_xm5401_sun_device::toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +toshiba_xm5401_sun_device::toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd512_device(mconfig, XM5401SUN, tag, owner, "TOSHIBA ", "XM-5401TASUN4XCD", "1036", 0x98) { } -toshiba_xm5701_device::toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +toshiba_xm5701_device::toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd512_device(mconfig, XM5701, tag, owner, "TOSHIBA ", "CD-ROM XM-5701TA", "3136", 0x98) { } -toshiba_xm5701_sun_device::toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +toshiba_xm5701_sun_device::toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsicd512_device(mconfig, XM5701SUN, tag, owner, "TOSHIBA ", "XM5701TASUN12XCD", "0997", 0x98) { } diff --git a/src/devices/bus/scsi/scsicd512.h b/src/devices/bus/scsi/scsicd512.h index 0345a74ca9a..ea0ec296a0f 100644 --- a/src/devices/bus/scsi/scsicd512.h +++ b/src/devices/bus/scsi/scsicd512.h @@ -20,11 +20,11 @@ public: virtual void ReadData(uint8_t *data, int dataLength) override; protected: - scsicd512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + scsicd512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); scsicd512_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const char *mfr, const char *product, const char *rev, uint8_t data) - : scsicd512_device(mconfig, type, tag, owner, 0) + : scsicd512_device(mconfig, type, tag, owner) { strncpy(m_manufacturer, mfr, 8); strncpy(m_product, product, 16); @@ -43,37 +43,37 @@ protected: class dec_rrd45_device : public scsicd512_device { public: - dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + dec_rrd45_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class toshiba_xm3301_device : public scsicd512_device { public: - toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + toshiba_xm3301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class toshiba_xm5301_sun_device : public scsicd512_device { public: - toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + toshiba_xm5301_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class toshiba_xm5401_sun_device : public scsicd512_device { public: - toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + toshiba_xm5401_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class toshiba_xm5701_device : public scsicd512_device { public: - toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + toshiba_xm5701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class toshiba_xm5701_sun_device : public scsicd512_device { public: - toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + toshiba_xm5701_sun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(RRD45, dec_rrd45_device) diff --git a/src/devices/bus/scsi/scsihd.cpp b/src/devices/bus/scsi/scsihd.cpp index 4fb01e02130..806e9f8fa5e 100644 --- a/src/devices/bus/scsi/scsihd.cpp +++ b/src/devices/bus/scsi/scsihd.cpp @@ -12,12 +12,12 @@ // device type definition DEFINE_DEVICE_TYPE(SCSIHD, scsihd_device, "scsihd", "SCSI HD") -scsihd_device::scsihd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scsihd_device::scsihd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scsihd_device(mconfig, SCSIHD, tag, owner, clock) { } -scsihd_device::scsihd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +scsihd_device::scsihd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : scsihle_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/bus/scsi/scsihd.h b/src/devices/bus/scsi/scsihd.h index 3cc50af8ec2..69673f68b2b 100644 --- a/src/devices/bus/scsi/scsihd.h +++ b/src/devices/bus/scsi/scsihd.h @@ -18,10 +18,10 @@ class scsihd_device : public scsihle_device, public t10sbc { public: // construction/destruction - scsihd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scsihd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - scsihd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + scsihd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/scsi/scsihle.cpp b/src/devices/bus/scsi/scsihle.cpp index 09a0fa84eca..3d5a35b68ae 100644 --- a/src/devices/bus/scsi/scsihle.cpp +++ b/src/devices/bus/scsi/scsihle.cpp @@ -11,7 +11,7 @@ Base class for HLE'd SCSI devices. #include "emu.h" #include "scsihle.h" -scsihle_device::scsihle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +scsihle_device::scsihle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), scsi_port_interface(mconfig, *this), m_scsi_id(*this, "SCSI_ID"), diff --git a/src/devices/bus/scsi/scsihle.h b/src/devices/bus/scsi/scsihle.h index ea6f577a592..edf5a6d4e46 100644 --- a/src/devices/bus/scsi/scsihle.h +++ b/src/devices/bus/scsi/scsihle.h @@ -37,7 +37,7 @@ public: protected: // construction/destruction - scsihle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + scsihle_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/scv/rom.cpp b/src/devices/bus/scv/rom.cpp index 8be6a020752..e5c802b6e0e 100644 --- a/src/devices/bus/scv/rom.cpp +++ b/src/devices/bus/scv/rom.cpp @@ -26,42 +26,42 @@ DEFINE_DEVICE_TYPE(SCV_ROM128K, scv_rom128_device, "scv_rom128", DEFINE_DEVICE_TYPE(SCV_ROM128K_RAM4K, scv_rom128ram4_device, "scv_rom128_ram4", "SCV 128K + RAM 4K Carts") -scv_rom8_device::scv_rom8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +scv_rom8_device::scv_rom8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_scv_cart_interface(mconfig, *this) { } -scv_rom8_device::scv_rom8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scv_rom8_device::scv_rom8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scv_rom8_device(mconfig, SCV_ROM8K, tag, owner, clock) { } -scv_rom16_device::scv_rom16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scv_rom16_device::scv_rom16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scv_rom8_device(mconfig, SCV_ROM16K, tag, owner, clock) { } -scv_rom32_device::scv_rom32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scv_rom32_device::scv_rom32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scv_rom8_device(mconfig, SCV_ROM32K, tag, owner, clock) { } -scv_rom32ram8_device::scv_rom32ram8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scv_rom32ram8_device::scv_rom32ram8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scv_rom8_device(mconfig, SCV_ROM32K_RAM8K, tag, owner, clock), m_ram_enabled(0) { } -scv_rom64_device::scv_rom64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scv_rom64_device::scv_rom64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scv_rom8_device(mconfig, SCV_ROM64K, tag, owner, clock), m_bank_base(0) { } -scv_rom128_device::scv_rom128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scv_rom128_device::scv_rom128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scv_rom8_device(mconfig, SCV_ROM128K, tag, owner, clock), m_bank_base(0) { } -scv_rom128ram4_device::scv_rom128ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scv_rom128ram4_device::scv_rom128ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scv_rom8_device(mconfig, SCV_ROM128K_RAM4K, tag, owner, clock), m_bank_base(0), m_ram_enabled(0) { } diff --git a/src/devices/bus/scv/rom.h b/src/devices/bus/scv/rom.h index 74fa0591179..c1cd3de8abd 100644 --- a/src/devices/bus/scv/rom.h +++ b/src/devices/bus/scv/rom.h @@ -15,13 +15,13 @@ class scv_rom8_device : public device_t, { public: // construction/destruction - scv_rom8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scv_rom8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; protected: - scv_rom8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + scv_rom8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -34,7 +34,7 @@ class scv_rom16_device : public scv_rom8_device { public: // construction/destruction - scv_rom16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scv_rom16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -47,7 +47,7 @@ class scv_rom32_device : public scv_rom8_device { public: // construction/destruction - scv_rom32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scv_rom32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -60,7 +60,7 @@ class scv_rom32ram8_device : public scv_rom8_device { public: // construction/destruction - scv_rom32ram8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scv_rom32ram8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -83,7 +83,7 @@ class scv_rom64_device : public scv_rom8_device { public: // construction/destruction - scv_rom64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scv_rom64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -104,7 +104,7 @@ class scv_rom128_device : public scv_rom8_device { public: // construction/destruction - scv_rom128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scv_rom128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -126,7 +126,7 @@ class scv_rom128ram4_device : public scv_rom8_device { public: // construction/destruction - scv_rom128ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scv_rom128ram4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; diff --git a/src/devices/bus/scv/slot.cpp b/src/devices/bus/scv/slot.cpp index b3ca1e08873..6339c144a16 100644 --- a/src/devices/bus/scv/slot.cpp +++ b/src/devices/bus/scv/slot.cpp @@ -71,7 +71,7 @@ void device_scv_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- // scv_cart_slot_device - constructor //------------------------------------------------- -scv_cart_slot_device::scv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scv_cart_slot_device::scv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCV_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h index 24ce208ab3d..7f302bc8b01 100644 --- a/src/devices/bus/scv/slot.h +++ b/src/devices/bus/scv/slot.h @@ -68,7 +68,7 @@ public: // construction/destruction template scv_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : scv_cart_slot_device(mconfig, tag, owner, 0) + : scv_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -76,7 +76,7 @@ public: set_fixed(false); } - scv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + scv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~scv_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/sdk85/i8755.cpp b/src/devices/bus/sdk85/i8755.cpp index 8c1d7a79fbf..7f3382195be 100644 --- a/src/devices/bus/sdk85/i8755.cpp +++ b/src/devices/bus/sdk85/i8755.cpp @@ -7,7 +7,7 @@ // device type definition DEFINE_DEVICE_TYPE(SDK85_I8755, sdk85exp_i8755_device, "sdk85exp_i8755", "SDK-85 PROM I/O Expansion (Intel 8755)") -sdk85exp_i8755_device::sdk85exp_i8755_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sdk85exp_i8755_device::sdk85exp_i8755_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SDK85_I8755, tag, owner, clock) , device_sdk85_romexp_card_interface(mconfig, *this) , m_i8755(*this, "i8755") diff --git a/src/devices/bus/sdk85/i8755.h b/src/devices/bus/sdk85/i8755.h index 2960be386e7..ec040f7fbf8 100644 --- a/src/devices/bus/sdk85/i8755.h +++ b/src/devices/bus/sdk85/i8755.h @@ -15,7 +15,7 @@ class sdk85exp_i8755_device : public device_t, public device_sdk85_romexp_card_i { public: // construction/destruction - sdk85exp_i8755_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sdk85exp_i8755_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/sdk85/memexp.cpp b/src/devices/bus/sdk85/memexp.cpp index a5a752c4339..827454d4956 100644 --- a/src/devices/bus/sdk85/memexp.cpp +++ b/src/devices/bus/sdk85/memexp.cpp @@ -14,7 +14,7 @@ // device type definition DEFINE_DEVICE_TYPE(SDK85_ROMEXP, sdk85_romexp_device, "sdk85_romexp", "SDK-85 expansion ROM socket") -sdk85_romexp_device::sdk85_romexp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sdk85_romexp_device::sdk85_romexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SDK85_ROMEXP, tag, owner, clock) , device_rom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) diff --git a/src/devices/bus/sdk85/memexp.h b/src/devices/bus/sdk85/memexp.h index fbd005c48c2..d93763caa72 100644 --- a/src/devices/bus/sdk85/memexp.h +++ b/src/devices/bus/sdk85/memexp.h @@ -33,9 +33,9 @@ class sdk85_romexp_device : public device_t, { public: // construction/destruction - sdk85_romexp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sdk85_romexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - sdk85_romexp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt) + sdk85_romexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : sdk85_romexp_device(mconfig, tag, owner, clock) { option_reset(); diff --git a/src/devices/bus/sega8/ccatch.cpp b/src/devices/bus/sega8/ccatch.cpp index baf7fc52151..2c52d99b108 100644 --- a/src/devices/bus/sega8/ccatch.cpp +++ b/src/devices/bus/sega8/ccatch.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(SEGA8_ROM_CARDCATCH, sega8_cardcatch_device, "sega8_ccatch", -sega8_cardcatch_device::sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_cardcatch_device::sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_CARDCATCH, tag, owner, clock), m_card(*this, "cardslot") { } diff --git a/src/devices/bus/sega8/ccatch.h b/src/devices/bus/sega8/ccatch.h index ab00942904f..141d86fa3ed 100644 --- a/src/devices/bus/sega8/ccatch.h +++ b/src/devices/bus/sega8/ccatch.h @@ -14,7 +14,7 @@ class sega8_cardcatch_device : public sega8_rom_device { public: // construction/destruction - sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_cardcatch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; diff --git a/src/devices/bus/sega8/mgear.cpp b/src/devices/bus/sega8/mgear.cpp index 1c128c830ec..7969d275959 100644 --- a/src/devices/bus/sega8/mgear.cpp +++ b/src/devices/bus/sega8/mgear.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(SEGA8_ROM_MGEAR, sega8_mgear_device, "sega8_mgear", "Master Gear Converter") -sega8_mgear_device::sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_mgear_device::sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_MGEAR, tag, owner, clock), m_subslot(*this, "subslot") { } diff --git a/src/devices/bus/sega8/mgear.h b/src/devices/bus/sega8/mgear.h index 3e8e5f64fc9..85a51f8fa72 100644 --- a/src/devices/bus/sega8/mgear.h +++ b/src/devices/bus/sega8/mgear.h @@ -15,7 +15,7 @@ class sega8_mgear_device : public sega8_rom_device { public: // construction/destruction - sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_mgear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override { return m_subslot->read_cart(offset); } diff --git a/src/devices/bus/sega8/rom.cpp b/src/devices/bus/sega8/rom.cpp index 6d7abd8338c..e26de175ed7 100644 --- a/src/devices/bus/sega8/rom.cpp +++ b/src/devices/bus/sega8/rom.cpp @@ -50,7 +50,7 @@ DEFINE_DEVICE_TYPE(SEGA8_ROM_MULTICART, sega8_multicart_device, "sega8_mul DEFINE_DEVICE_TYPE(SEGA8_ROM_MEGACART, sega8_megacart_device, "sega8_megacart", "SC-3000 Megacart Cart") -sega8_rom_device::sega8_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sega8_rom_device::sega8_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sega8_cart_interface(mconfig, *this) , m_ram_base(0) @@ -58,7 +58,7 @@ sega8_rom_device::sega8_rom_device(const machine_config &mconfig, device_type ty { } -sega8_rom_device::sega8_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_rom_device::sega8_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_STD, tag, owner, clock) { } @@ -66,31 +66,31 @@ sega8_rom_device::sega8_rom_device(const machine_config &mconfig, const char *ta -sega8_othello_device::sega8_othello_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_othello_device::sega8_othello_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_OTHELLO, tag, owner, clock) { } -sega8_castle_device::sega8_castle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_castle_device::sega8_castle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_CASTLE, tag, owner, clock) { } -sega8_basic_l3_device::sega8_basic_l3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_basic_l3_device::sega8_basic_l3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_BASIC_L3, tag, owner, clock) { } -sega8_music_editor_device::sega8_music_editor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_music_editor_device::sega8_music_editor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_MUSIC_EDITOR, tag, owner, clock) { } -sega8_terebi_device::sega8_terebi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_terebi_device::sega8_terebi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_TEREBI, tag, owner, clock) , m_tvdraw_x(*this, "TVDRAW_X") , m_tvdraw_y(*this, "TVDRAW_Y") @@ -100,13 +100,13 @@ sega8_terebi_device::sega8_terebi_device(const machine_config &mconfig, const ch } -sega8_dahjee_typea_device::sega8_dahjee_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_dahjee_typea_device::sega8_dahjee_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_DAHJEE_TYPEA, tag, owner, clock) { } -sega8_dahjee_typeb_device::sega8_dahjee_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_dahjee_typeb_device::sega8_dahjee_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_DAHJEE_TYPEB, tag, owner, clock) { } @@ -114,7 +114,7 @@ sega8_dahjee_typeb_device::sega8_dahjee_typeb_device(const machine_config &mconf -sega8_eeprom_device::sega8_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_eeprom_device::sega8_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA8_ROM_EEPROM, tag, owner, clock) , device_sega8_cart_interface(mconfig, *this) , m_eeprom(*this, "eeprom") @@ -124,7 +124,7 @@ sega8_eeprom_device::sega8_eeprom_device(const machine_config &mconfig, const ch } -sega8_codemasters_device::sega8_codemasters_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_codemasters_device::sega8_codemasters_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA8_ROM_CODEMASTERS, tag, owner, clock) , device_sega8_cart_interface(mconfig, *this) , m_ram_base(0) @@ -133,13 +133,13 @@ sega8_codemasters_device::sega8_codemasters_device(const machine_config &mconfig } -sega8_4pak_device::sega8_4pak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_4pak_device::sega8_4pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_4PAK, tag, owner, clock) { } -sega8_zemina_device::sega8_zemina_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sega8_zemina_device::sega8_zemina_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sega8_cart_interface(mconfig, *this) , m_ram_base(0) @@ -147,64 +147,64 @@ sega8_zemina_device::sega8_zemina_device(const machine_config &mconfig, device_t { } -sega8_zemina_device::sega8_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_zemina_device::sega8_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_zemina_device(mconfig, SEGA8_ROM_ZEMINA, tag, owner, clock) { } -sega8_nemesis_device::sega8_nemesis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_nemesis_device::sega8_nemesis_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_zemina_device(mconfig, SEGA8_ROM_NEMESIS, tag, owner, clock) { } -sega8_janggun_device::sega8_janggun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_janggun_device::sega8_janggun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA8_ROM_JANGGUN, tag, owner, clock) , device_sega8_cart_interface(mconfig, *this) { } -sega8_hicom_device::sega8_hicom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_hicom_device::sega8_hicom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_HICOM, tag, owner, clock) , m_rom_bank_base(0) { } -sega8_korean_device::sega8_korean_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_korean_device::sega8_korean_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_KOREAN, tag, owner, clock) { } -sega8_korean_188_device::sega8_korean_188_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega8_korean_188_device::sega8_korean_188_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_KOREAN_188, tag, owner, clock) , m_rom_bank_base(0) { } -sega8_korean_nb_device::sega8_korean_nb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_korean_nb_device::sega8_korean_nb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_KOREAN_NB, tag, owner, clock) { } -sega8_seojin_device::sega8_seojin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_seojin_device::sega8_seojin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_SEOJIN, tag, owner, clock) { } -sega8_multicart_device::sega8_multicart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_multicart_device::sega8_multicart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_MULTICART, tag, owner, clock) { } -sega8_megacart_device::sega8_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_megacart_device::sega8_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_MEGACART, tag, owner, clock) { } @@ -1208,7 +1208,7 @@ into the X-Terminator to search for cheat codes. -------------------------------------------------*/ -sega8_x_terminator_device::sega8_x_terminator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_x_terminator_device::sega8_x_terminator_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_rom_device(mconfig, SEGA8_ROM_X_TERMINATOR, tag, owner, clock) , m_subslot(*this, "subslot") , m_switch(*this, "SWITCH") diff --git a/src/devices/bus/sega8/rom.h b/src/devices/bus/sega8/rom.h index ec4928fba22..01a8a5f555c 100644 --- a/src/devices/bus/sega8/rom.h +++ b/src/devices/bus/sega8/rom.h @@ -15,7 +15,7 @@ class sega8_rom_device : public device_t, { public: // construction/destruction - sega8_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; @@ -25,7 +25,7 @@ public: virtual void write_mapper(offs_t offset, uint8_t data) override; protected: - sega8_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega8_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -45,7 +45,7 @@ class sega8_othello_device : public sega8_rom_device { public: // construction/destruction - sega8_othello_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_othello_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -60,7 +60,7 @@ class sega8_castle_device : public sega8_rom_device { public: // construction/destruction - sega8_castle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_castle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -75,7 +75,7 @@ class sega8_basic_l3_device : public sega8_rom_device { public: // construction/destruction - sega8_basic_l3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_basic_l3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -94,7 +94,7 @@ class sega8_music_editor_device : public sega8_rom_device { public: // construction/destruction - sega8_music_editor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_music_editor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -113,7 +113,7 @@ class sega8_terebi_device : public sega8_rom_device { public: // construction/destruction - sega8_terebi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_terebi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -141,7 +141,7 @@ class sega8_dahjee_typea_device : public sega8_rom_device { public: // construction/destruction - sega8_dahjee_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_dahjee_typea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -160,7 +160,7 @@ class sega8_dahjee_typeb_device : public sega8_rom_device { public: // construction/destruction - sega8_dahjee_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_dahjee_typeb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -182,7 +182,7 @@ class sega8_eeprom_device : public device_t, { public: // construction/destruction - sega8_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; @@ -213,7 +213,7 @@ class sega8_codemasters_device : public device_t, { public: // construction/destruction - sega8_codemasters_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_codemasters_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; @@ -239,7 +239,7 @@ class sega8_4pak_device : public sega8_rom_device { public: // construction/destruction - sega8_4pak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_4pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -262,7 +262,7 @@ class sega8_zemina_device : public device_t, { public: // construction/destruction - sega8_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; @@ -272,7 +272,7 @@ public: // no mapper write for this! protected: - sega8_zemina_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega8_zemina_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -290,7 +290,7 @@ class sega8_nemesis_device : public sega8_zemina_device { public: // construction/destruction - sega8_nemesis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_nemesis_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; }; @@ -303,7 +303,7 @@ class sega8_janggun_device : public device_t, { public: // construction/destruction - sega8_janggun_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_janggun_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; @@ -326,7 +326,7 @@ class sega8_hicom_device : public sega8_rom_device { public: // construction/destruction - sega8_hicom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_hicom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; @@ -349,7 +349,7 @@ class sega8_korean_device : public sega8_rom_device { public: // construction/destruction - sega8_korean_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_korean_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void late_bank_setup() override; @@ -365,7 +365,7 @@ class sega8_korean_188_device : public sega8_rom_device { public: // construction/destruction - sega8_korean_188_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega8_korean_188_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual u8 read_cart(offs_t offset) override; @@ -387,7 +387,7 @@ class sega8_korean_nb_device : public sega8_rom_device { public: // construction/destruction - sega8_korean_nb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_korean_nb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual void write_mapper(offs_t offset, uint8_t data) override {} @@ -400,7 +400,7 @@ class sega8_seojin_device : public sega8_rom_device { public: // construction/destruction - sega8_seojin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_seojin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -425,7 +425,7 @@ class sega8_multicart_device : public sega8_rom_device { public: // construction/destruction - sega8_multicart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_multicart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -452,7 +452,7 @@ class sega8_megacart_device : public sega8_rom_device { public: // construction/destruction - sega8_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_cart(offs_t offset) override; @@ -475,7 +475,7 @@ private: class sega8_x_terminator_device : public sega8_rom_device { public: - sega8_x_terminator_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_x_terminator_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sega8/sega8_slot.cpp b/src/devices/bus/sega8/sega8_slot.cpp index f2ac85c896e..6fcfe03c547 100644 --- a/src/devices/bus/sega8/sega8_slot.cpp +++ b/src/devices/bus/sega8/sega8_slot.cpp @@ -116,7 +116,7 @@ void device_sega8_cart_interface::ram_alloc(uint32_t size) // sega8_cart_slot_device - constructor //------------------------------------------------- -sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_card) +sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_card) : device_t(mconfig, type, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) @@ -126,59 +126,59 @@ sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, de { } -sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_cart_slot_device::sega8_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, SEGA8_CART_SLOT, tag, owner, clock, false) { } -sega8_card_slot_device::sega8_card_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sega8_card_slot_device::sega8_card_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, type, tag, owner, clock, true) { } -sega8_card_slot_device::sega8_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega8_card_slot_device::sega8_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_card_slot_device(mconfig, SEGA8_CARD_SLOT, tag, owner, clock) { } -sg1000_cart_slot_device::sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sg1000_cart_slot_device::sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, SG1000_CART_SLOT, tag, owner, clock) { } -omv_cart_slot_device::omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +omv_cart_slot_device::omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, OMV_CART_SLOT, tag, owner, clock) { } -sc3000_cart_slot_device::sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sc3000_cart_slot_device::sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, SC3000_CART_SLOT, tag, owner, clock) { } -sg1000mk3_cart_slot_device::sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sg1000mk3_cart_slot_device::sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, SG1000MK3_CART_SLOT, tag, owner, clock) { } -sms_cart_slot_device::sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sms_cart_slot_device::sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, SMS_CART_SLOT, tag, owner, clock) { } -gamegear_cart_slot_device::gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gamegear_cart_slot_device::gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_cart_slot_device(mconfig, GAMEGEAR_CART_SLOT, tag, owner, clock) { } -sms_card_slot_device::sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sms_card_slot_device::sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_card_slot_device(mconfig, SMS_CARD_SLOT, tag, owner, clock) { } -sg1000_card_slot_device::sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sg1000_card_slot_device::sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega8_card_slot_device(mconfig, SG1000_CARD_SLOT, tag, owner, clock) { } diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h index 01f34842343..ad553ae4b9b 100644 --- a/src/devices/bus/sega8/sega8_slot.h +++ b/src/devices/bus/sega8/sega8_slot.h @@ -113,7 +113,7 @@ class sega8_cart_slot_device : public device_t, { public: // construction/destruction - sega8_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~sega8_cart_slot_device(); // image-level overrides @@ -150,7 +150,7 @@ public: int get_sms_mode() { return m_cart->get_sms_mode(); } protected: - sega8_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_card = false); + sega8_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_card = false); // device-level overrides virtual void device_start() override; @@ -166,14 +166,14 @@ class sega8_card_slot_device : public sega8_cart_slot_device { public: // construction/destruction - sega8_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega8_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_type_name() const noexcept override { return "card"; } virtual const char *image_brief_type_name() const noexcept override { return "card"; } protected: // construction/destruction - sega8_card_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega8_card_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> sg1000_cart_slot_device @@ -184,14 +184,14 @@ public: // construction/destruction template sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sg1000_cart_slot_device(mconfig, tag, owner, u32(0)) + : sg1000_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,sg"; } }; @@ -204,14 +204,14 @@ public: // construction/destruction template omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : omv_cart_slot_device(mconfig, tag, owner, u32(0)) + : omv_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,sg"; } }; @@ -224,14 +224,14 @@ public: // construction/destruction template sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sc3000_cart_slot_device(mconfig, tag, owner, u32(0)) + : sc3000_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,sg,sc"; } }; @@ -244,14 +244,14 @@ public: // construction/destruction template sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sg1000mk3_cart_slot_device(mconfig, tag, owner, u32(0)) + : sg1000mk3_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "sms_cart,sg1000_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,sms,sg"; } }; @@ -264,14 +264,14 @@ public: // construction/destruction template sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sms_cart_slot_device(mconfig, tag, owner, u32(0)) + : sms_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "sms_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,sms"; } }; @@ -284,14 +284,14 @@ public: // construction/destruction template gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : gamegear_cart_slot_device(mconfig, tag, owner, u32(0)) + : gamegear_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "gamegear_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,gg"; } }; @@ -305,14 +305,14 @@ public: // construction/destruction template sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sms_card_slot_device(mconfig, tag, owner, u32(0)) + : sms_card_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "sms_card"; } virtual const char *file_extensions() const noexcept override { return "bin"; } }; @@ -325,14 +325,14 @@ public: // construction/destruction template sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sg1000_card_slot_device(mconfig, tag, owner, u32(0)) + : sg1000_card_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } virtual const char *file_extensions() const noexcept override { return "bin,sg"; } }; diff --git a/src/devices/bus/sg1000_exp/fm_unit.cpp b/src/devices/bus/sg1000_exp/fm_unit.cpp index 339b41254b2..c39799a3cc7 100644 --- a/src/devices/bus/sg1000_exp/fm_unit.cpp +++ b/src/devices/bus/sg1000_exp/fm_unit.cpp @@ -67,7 +67,7 @@ void sega_fm_unit_device::device_add_mconfig(machine_config &config) // sega_fm_unit_device - constructor //------------------------------------------------- -sega_fm_unit_device::sega_fm_unit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_fm_unit_device::sega_fm_unit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_FM_UNIT, tag, owner, clock), device_sg1000_expansion_slot_interface(mconfig, *this), m_ym(*this, "ym2413"), diff --git a/src/devices/bus/sg1000_exp/fm_unit.h b/src/devices/bus/sg1000_exp/fm_unit.h index d1c80e0b178..ffe6d6230c8 100644 --- a/src/devices/bus/sg1000_exp/fm_unit.h +++ b/src/devices/bus/sg1000_exp/fm_unit.h @@ -29,7 +29,7 @@ class sega_fm_unit_device : public device_t, { public: // construction/destruction - sega_fm_unit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_fm_unit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/sg1000_exp/kblink.cpp b/src/devices/bus/sg1000_exp/kblink.cpp index 8d98e006f94..c32604cfaa9 100644 --- a/src/devices/bus/sg1000_exp/kblink.cpp +++ b/src/devices/bus/sg1000_exp/kblink.cpp @@ -56,7 +56,7 @@ DEFINE_DEVICE_TYPE(SK1100_LINK_CABLE, sk1100_link_cable_device, "sk1100_link_cab // sk1100_link_cable_device - constructor //------------------------------------------------- -sk1100_link_cable_device::sk1100_link_cable_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sk1100_link_cable_device::sk1100_link_cable_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SK1100_LINK_CABLE, tag, owner, clock), device_sk1100_printer_port_interface(mconfig, *this), m_stream(*this, "stream"), @@ -113,7 +113,7 @@ void sk1100_link_cable_device::device_reset() void sk1100_link_cable_device::device_add_mconfig(machine_config &config) { - BITBANGER(config, m_stream, 0); + BITBANGER(config, m_stream); } TIMER_CALLBACK_MEMBER(sk1100_link_cable_device::update_queue) diff --git a/src/devices/bus/sg1000_exp/kblink.h b/src/devices/bus/sg1000_exp/kblink.h index 561c1b79455..5a051921685 100644 --- a/src/devices/bus/sg1000_exp/kblink.h +++ b/src/devices/bus/sg1000_exp/kblink.h @@ -31,7 +31,7 @@ class sk1100_link_cable_device : public device_t, { public: // construction/destruction - sk1100_link_cable_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sk1100_link_cable_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/sg1000_exp/sg1000exp.cpp b/src/devices/bus/sg1000_exp/sg1000exp.cpp index ad568d7cb27..fd3ff0c2514 100644 --- a/src/devices/bus/sg1000_exp/sg1000exp.cpp +++ b/src/devices/bus/sg1000_exp/sg1000exp.cpp @@ -55,7 +55,7 @@ device_sg1000_expansion_slot_interface::~device_sg1000_expansion_slot_interface( // sg1000_expansion_slot_device - constructor //------------------------------------------------- -sg1000_expansion_slot_device::sg1000_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sg1000_expansion_slot_device::sg1000_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SG1000_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) diff --git a/src/devices/bus/sg1000_exp/sg1000exp.h b/src/devices/bus/sg1000_exp/sg1000exp.h index d297e255d97..d2af7bff3ab 100644 --- a/src/devices/bus/sg1000_exp/sg1000exp.h +++ b/src/devices/bus/sg1000_exp/sg1000exp.h @@ -29,7 +29,7 @@ public: // construction/destruction template sg1000_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, bool const fixed) - : sg1000_expansion_slot_device(mconfig, tag, owner, 0) + : sg1000_expansion_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -37,7 +37,7 @@ public: set_fixed(fixed); } - sg1000_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sg1000_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~sg1000_expansion_slot_device(); uint8_t read(offs_t offset); diff --git a/src/devices/bus/sg1000_exp/sk1100.cpp b/src/devices/bus/sg1000_exp/sk1100.cpp index e5a2ae238c9..0b60be32db9 100644 --- a/src/devices/bus/sg1000_exp/sk1100.cpp +++ b/src/devices/bus/sg1000_exp/sk1100.cpp @@ -182,7 +182,7 @@ void sega_sk1100_device::device_add_mconfig(machine_config &config) // sega_sk1100_device - constructor //------------------------------------------------- -sega_sk1100_device::sega_sk1100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_sk1100_device::sega_sk1100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_SK1100, tag, owner, clock), device_sg1000_expansion_slot_interface(mconfig, *this), m_cassette(*this, "cassette"), diff --git a/src/devices/bus/sg1000_exp/sk1100.h b/src/devices/bus/sg1000_exp/sk1100.h index f2e94920e22..e48c47745cb 100644 --- a/src/devices/bus/sg1000_exp/sk1100.h +++ b/src/devices/bus/sg1000_exp/sk1100.h @@ -33,7 +33,7 @@ class sega_sk1100_device : public device_t, { public: // construction/destruction - sega_sk1100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_sk1100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sg1000_exp/sk1100prn.cpp b/src/devices/bus/sg1000_exp/sk1100prn.cpp index 8f80306588b..a5a6c4946fc 100644 --- a/src/devices/bus/sg1000_exp/sk1100prn.cpp +++ b/src/devices/bus/sg1000_exp/sk1100prn.cpp @@ -54,7 +54,7 @@ device_sk1100_printer_port_interface::~device_sk1100_printer_port_interface() // sk1100_printer_port_device - constructor //------------------------------------------------- -sk1100_printer_port_device::sk1100_printer_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sk1100_printer_port_device::sk1100_printer_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SK1100_PRINTER_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) diff --git a/src/devices/bus/sg1000_exp/sk1100prn.h b/src/devices/bus/sg1000_exp/sk1100prn.h index 8e1988102c8..4c2d83cb917 100644 --- a/src/devices/bus/sg1000_exp/sk1100prn.h +++ b/src/devices/bus/sg1000_exp/sk1100prn.h @@ -29,7 +29,7 @@ public: // construction/destruction template sk1100_printer_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : sk1100_printer_port_device(mconfig, tag, owner, 0) + : sk1100_printer_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -37,7 +37,7 @@ public: set_fixed(false); } - sk1100_printer_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + sk1100_printer_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~sk1100_printer_port_device(); DECLARE_READ_LINE_MEMBER(fault_r); diff --git a/src/devices/bus/sgikbd/hlekbd.cpp b/src/devices/bus/sgikbd/hlekbd.cpp index 42ffb0eb76c..e4d736b1777 100644 --- a/src/devices/bus/sgikbd/hlekbd.cpp +++ b/src/devices/bus/sgikbd/hlekbd.cpp @@ -160,7 +160,7 @@ INPUT_PORTS_END } // anonymous namespace -hle_device::hle_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +hle_device::hle_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_HLE_KEYBOARD, tag, owner, clock) , device_buffered_serial_interface(mconfig, *this) , device_sgi_keyboard_port_interface(mconfig, *this) diff --git a/src/devices/bus/sgikbd/hlekbd.h b/src/devices/bus/sgikbd/hlekbd.h index ce066e90c55..9c93eadeb1b 100644 --- a/src/devices/bus/sgikbd/hlekbd.h +++ b/src/devices/bus/sgikbd/hlekbd.h @@ -20,7 +20,7 @@ class hle_device : public device_t { public: // constructor/destructor - hle_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + hle_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual ~hle_device() override; diff --git a/src/devices/bus/sgikbd/sgikbd.cpp b/src/devices/bus/sgikbd/sgikbd.cpp index 80138f1d7a3..4486e95c718 100644 --- a/src/devices/bus/sgikbd/sgikbd.cpp +++ b/src/devices/bus/sgikbd/sgikbd.cpp @@ -8,12 +8,12 @@ DEFINE_DEVICE_TYPE(SGIKBD_PORT, sgi_keyboard_port_device, "sgikbd", "SGI Keyboard Port") -sgi_keyboard_port_device::sgi_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +sgi_keyboard_port_device::sgi_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : sgi_keyboard_port_device(mconfig, SGIKBD_PORT, tag, owner, clock) { } -sgi_keyboard_port_device::sgi_keyboard_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock) +sgi_keyboard_port_device::sgi_keyboard_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_rxd(0) diff --git a/src/devices/bus/sgikbd/sgikbd.h b/src/devices/bus/sgikbd/sgikbd.h index bf64fd34b6a..2635e3448e0 100644 --- a/src/devices/bus/sgikbd/sgikbd.h +++ b/src/devices/bus/sgikbd/sgikbd.h @@ -16,14 +16,14 @@ class sgi_keyboard_port_device : public device_t, public device_single_card_slot public: template sgi_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : sgi_keyboard_port_device(mconfig, tag, owner, 0) + : sgi_keyboard_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sgi_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + sgi_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~sgi_keyboard_port_device(); // configuration helpers @@ -34,7 +34,7 @@ public: DECLARE_READ_LINE_MEMBER( rxd_r ) { return m_rxd; } protected: - sgi_keyboard_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + sgi_keyboard_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); virtual void device_config_complete() override; virtual void device_resolve_objects() override; diff --git a/src/devices/bus/sms_ctrl/graphic.cpp b/src/devices/bus/sms_ctrl/graphic.cpp index 1ada76748e7..2d94267d26b 100644 --- a/src/devices/bus/sms_ctrl/graphic.cpp +++ b/src/devices/bus/sms_ctrl/graphic.cpp @@ -76,7 +76,7 @@ ioport_constructor sms_graphic_device::device_input_ports() const // sms_graphic_device - constructor //------------------------------------------------- -sms_graphic_device::sms_graphic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sms_graphic_device::sms_graphic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_GRAPHIC, tag, owner, clock) , device_sms_control_port_interface(mconfig, *this) , m_buttons(*this, "BUTTONS") diff --git a/src/devices/bus/sms_ctrl/graphic.h b/src/devices/bus/sms_ctrl/graphic.h index 036f4660033..ca9c25f9f1f 100644 --- a/src/devices/bus/sms_ctrl/graphic.h +++ b/src/devices/bus/sms_ctrl/graphic.h @@ -27,7 +27,7 @@ class sms_graphic_device : public device_t, { public: // construction/destruction - sms_graphic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_graphic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sms_ctrl/joypad.cpp b/src/devices/bus/sms_ctrl/joypad.cpp index 4cd664a952e..e298357a9e1 100644 --- a/src/devices/bus/sms_ctrl/joypad.cpp +++ b/src/devices/bus/sms_ctrl/joypad.cpp @@ -65,7 +65,7 @@ ioport_constructor sms_joypad_device::device_input_ports() const // sms_joypad_device - constructor //------------------------------------------------- -sms_joypad_device::sms_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_joypad_device::sms_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_JOYPAD, tag, owner, clock), device_sms_control_port_interface(mconfig, *this), m_joypad(*this, "JOYPAD") diff --git a/src/devices/bus/sms_ctrl/joypad.h b/src/devices/bus/sms_ctrl/joypad.h index 60b4fe9f4c0..475b501e1e5 100644 --- a/src/devices/bus/sms_ctrl/joypad.h +++ b/src/devices/bus/sms_ctrl/joypad.h @@ -27,7 +27,7 @@ class sms_joypad_device : public device_t, { public: // construction/destruction - sms_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sms_ctrl/lphaser.cpp b/src/devices/bus/sms_ctrl/lphaser.cpp index 7e64e7c7236..655c7e83cb7 100644 --- a/src/devices/bus/sms_ctrl/lphaser.cpp +++ b/src/devices/bus/sms_ctrl/lphaser.cpp @@ -84,7 +84,7 @@ ioport_constructor sms_light_phaser_device::device_input_ports() const // sms_light_phaser_device - constructor //------------------------------------------------- -sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_LIGHT_PHASER, tag, owner, clock), device_sms_control_port_interface(mconfig, *this), m_lphaser_pins(*this, "CTRL_PORT"), diff --git a/src/devices/bus/sms_ctrl/lphaser.h b/src/devices/bus/sms_ctrl/lphaser.h index a75f4a0d042..ac2333dfb47 100644 --- a/src/devices/bus/sms_ctrl/lphaser.h +++ b/src/devices/bus/sms_ctrl/lphaser.h @@ -27,7 +27,7 @@ class sms_light_phaser_device : public device_t, { public: // construction/destruction - sms_light_phaser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_light_phaser_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sms_ctrl/multitap.cpp b/src/devices/bus/sms_ctrl/multitap.cpp index 74d6c749cb5..96e4990bc90 100644 --- a/src/devices/bus/sms_ctrl/multitap.cpp +++ b/src/devices/bus/sms_ctrl/multitap.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(SMS_MULTITAP, sms_multitap_device, "sms_multitap", "Furrtek S // sms_multitap_device - constructor //------------------------------------------------- -sms_multitap_device::sms_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_multitap_device::sms_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_MULTITAP, tag, owner, clock), device_sms_control_port_interface(mconfig, *this), m_subctrl1_port(*this, "ctrl1"), diff --git a/src/devices/bus/sms_ctrl/multitap.h b/src/devices/bus/sms_ctrl/multitap.h index 6a2351c48f5..1d9adec2737 100644 --- a/src/devices/bus/sms_ctrl/multitap.h +++ b/src/devices/bus/sms_ctrl/multitap.h @@ -27,7 +27,7 @@ class sms_multitap_device : public device_t, { public: // construction/destruction - sms_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/sms_ctrl/paddle.cpp b/src/devices/bus/sms_ctrl/paddle.cpp index 06f1c9bfa16..88e55a2c152 100644 --- a/src/devices/bus/sms_ctrl/paddle.cpp +++ b/src/devices/bus/sms_ctrl/paddle.cpp @@ -90,7 +90,7 @@ ioport_constructor sms_paddle_device::device_input_ports() const // sms_paddle_device - constructor //------------------------------------------------- -sms_paddle_device::sms_paddle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_paddle_device::sms_paddle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_PADDLE, tag, owner, clock), device_sms_control_port_interface(mconfig, *this), m_paddle_pins(*this, "CTRL_PORT"), diff --git a/src/devices/bus/sms_ctrl/paddle.h b/src/devices/bus/sms_ctrl/paddle.h index 21604a882ed..3dcce109a21 100644 --- a/src/devices/bus/sms_ctrl/paddle.h +++ b/src/devices/bus/sms_ctrl/paddle.h @@ -27,7 +27,7 @@ class sms_paddle_device : public device_t, { public: // construction/destruction - sms_paddle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_paddle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sms_ctrl/rfu.cpp b/src/devices/bus/sms_ctrl/rfu.cpp index d28a2ded703..8800c349077 100644 --- a/src/devices/bus/sms_ctrl/rfu.cpp +++ b/src/devices/bus/sms_ctrl/rfu.cpp @@ -63,7 +63,7 @@ ioport_constructor sms_rapid_fire_device::device_input_ports() const // sms_rapid_fire_device - constructor //------------------------------------------------- -sms_rapid_fire_device::sms_rapid_fire_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_rapid_fire_device::sms_rapid_fire_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_RAPID_FIRE, tag, owner, clock), device_sms_control_port_interface(mconfig, *this), m_rfire_sw(*this, "rfu_sw"), diff --git a/src/devices/bus/sms_ctrl/rfu.h b/src/devices/bus/sms_ctrl/rfu.h index f37b70b1c92..49bf5dc62f8 100644 --- a/src/devices/bus/sms_ctrl/rfu.h +++ b/src/devices/bus/sms_ctrl/rfu.h @@ -27,7 +27,7 @@ class sms_rapid_fire_device : public device_t, { public: // construction/destruction - sms_rapid_fire_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_rapid_fire_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/sms_ctrl/smsctrl.cpp b/src/devices/bus/sms_ctrl/smsctrl.cpp index cec153b863e..8476c6ae56d 100644 --- a/src/devices/bus/sms_ctrl/smsctrl.cpp +++ b/src/devices/bus/sms_ctrl/smsctrl.cpp @@ -63,7 +63,7 @@ device_sms_control_port_interface::~device_sms_control_port_interface() // sms_control_port_device - constructor //------------------------------------------------- -sms_control_port_device::sms_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_control_port_device::sms_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_CONTROL_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_screen(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/bus/sms_ctrl/smsctrl.h b/src/devices/bus/sms_ctrl/smsctrl.h index cee1daa0cb9..c002f6ad84d 100644 --- a/src/devices/bus/sms_ctrl/smsctrl.h +++ b/src/devices/bus/sms_ctrl/smsctrl.h @@ -32,7 +32,7 @@ public: // construction/destruction template sms_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : sms_control_port_device(mconfig, tag, owner, 0) + : sms_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -40,7 +40,7 @@ public: set_fixed(false); } - sms_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~sms_control_port_device(); // static configuration helpers diff --git a/src/devices/bus/sms_ctrl/sports.cpp b/src/devices/bus/sms_ctrl/sports.cpp index d58cfb68095..96e6a0c293e 100644 --- a/src/devices/bus/sms_ctrl/sports.cpp +++ b/src/devices/bus/sms_ctrl/sports.cpp @@ -151,7 +151,7 @@ ioport_constructor sms_sports_pad_device::device_input_ports() const // sms_sports_pad_device - constructor //------------------------------------------------- -sms_sports_pad_device::sms_sports_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_sports_pad_device::sms_sports_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_SPORTS_PAD, tag, owner, clock), device_sms_control_port_interface(mconfig, *this), m_sports_in(*this, "SPORTS_IN"), diff --git a/src/devices/bus/sms_ctrl/sports.h b/src/devices/bus/sms_ctrl/sports.h index cdf1202befd..c8aaa7e2624 100644 --- a/src/devices/bus/sms_ctrl/sports.h +++ b/src/devices/bus/sms_ctrl/sports.h @@ -27,7 +27,7 @@ class sms_sports_pad_device : public device_t, { public: // construction/destruction - sms_sports_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_sports_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sms_ctrl/sportsjp.cpp b/src/devices/bus/sms_ctrl/sportsjp.cpp index a0c2a69d2ad..892b7032367 100644 --- a/src/devices/bus/sms_ctrl/sportsjp.cpp +++ b/src/devices/bus/sms_ctrl/sportsjp.cpp @@ -103,7 +103,7 @@ ioport_constructor sms_sports_pad_jp_device::device_input_ports() const // sms_sports_pad_jp_device - constructor //------------------------------------------------- -sms_sports_pad_jp_device::sms_sports_pad_jp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_sports_pad_jp_device::sms_sports_pad_jp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_SPORTS_PAD_JP, tag, owner, clock), device_sms_control_port_interface(mconfig, *this), m_sports_jp_in(*this, "SPORTS_JP_IN"), diff --git a/src/devices/bus/sms_ctrl/sportsjp.h b/src/devices/bus/sms_ctrl/sportsjp.h index 92ee2ccd70c..63a5caee291 100644 --- a/src/devices/bus/sms_ctrl/sportsjp.h +++ b/src/devices/bus/sms_ctrl/sportsjp.h @@ -27,7 +27,7 @@ class sms_sports_pad_jp_device : public device_t, { public: // construction/destruction - sms_sports_pad_jp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_sports_pad_jp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/sms_exp/gender.cpp b/src/devices/bus/sms_exp/gender.cpp index 87bb97ea7a2..3c5c0155386 100644 --- a/src/devices/bus/sms_exp/gender.cpp +++ b/src/devices/bus/sms_exp/gender.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(SMS_GENDER_ADAPTER, sms_gender_adapter_device, "sms_gender_ad // sms_gender_adapter_device - constructor //------------------------------------------------- -sms_gender_adapter_device::sms_gender_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_gender_adapter_device::sms_gender_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_GENDER_ADAPTER, tag, owner, clock), device_sms_expansion_slot_interface(mconfig, *this), m_subslot(*this, "subslot") diff --git a/src/devices/bus/sms_exp/gender.h b/src/devices/bus/sms_exp/gender.h index 7620d5c5cec..286b357d18b 100644 --- a/src/devices/bus/sms_exp/gender.h +++ b/src/devices/bus/sms_exp/gender.h @@ -28,7 +28,7 @@ class sms_gender_adapter_device : public device_t, { public: // construction/destruction - sms_gender_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sms_gender_adapter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_sms_expansion_slot_interface overrides virtual uint8_t read(offs_t offset) override; diff --git a/src/devices/bus/sms_exp/smsexp.cpp b/src/devices/bus/sms_exp/smsexp.cpp index 0d330f888b6..ec348d46646 100644 --- a/src/devices/bus/sms_exp/smsexp.cpp +++ b/src/devices/bus/sms_exp/smsexp.cpp @@ -55,7 +55,7 @@ device_sms_expansion_slot_interface::~device_sms_expansion_slot_interface() // sms_expansion_slot_device - constructor //------------------------------------------------- -sms_expansion_slot_device::sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sms_expansion_slot_device::sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMS_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_device(nullptr) diff --git a/src/devices/bus/sms_exp/smsexp.h b/src/devices/bus/sms_exp/smsexp.h index 1fb6a709468..a210444e06e 100644 --- a/src/devices/bus/sms_exp/smsexp.h +++ b/src/devices/bus/sms_exp/smsexp.h @@ -50,14 +50,14 @@ public: // construction/destruction template sms_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : sms_expansion_slot_device(mconfig, tag, owner, 0) + : sms_expansion_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sms_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~sms_expansion_slot_device(); // reading and writing diff --git a/src/devices/bus/snes/bsx.cpp b/src/devices/bus/snes/bsx.cpp index 6aacaa3ed2c..8b776ac3d45 100644 --- a/src/devices/bus/snes/bsx.cpp +++ b/src/devices/bus/snes/bsx.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(SNS_HIROM_BSX, sns_rom_bsxhi_device, "sns_rom_bsxhi", "SNE DEFINE_DEVICE_TYPE(SNS_BSMEMPAK, sns_rom_bsmempak_device, "sns_bsmempak", "SNES BS-X Memory packs") -sns_rom_bsx_device::sns_rom_bsx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom_bsx_device::sns_rom_bsx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, type, tag, owner, clock) , m_base_unit(nullptr) , access_00_1f(0) @@ -37,24 +37,24 @@ sns_rom_bsx_device::sns_rom_bsx_device(const machine_config &mconfig, device_typ { } -sns_rom_bsx_device::sns_rom_bsx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_bsx_device::sns_rom_bsx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_bsx_device(mconfig, SNS_ROM_BSX, tag, owner, clock) { } -sns_rom_bsxlo_device::sns_rom_bsxlo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_bsxlo_device::sns_rom_bsxlo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_BSX, tag, owner, clock) , m_slot(*this, "bs_slot") { } -sns_rom_bsxhi_device::sns_rom_bsxhi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_bsxhi_device::sns_rom_bsxhi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom21_device(mconfig, SNS_HIROM_BSX, tag, owner, clock) , m_slot(*this, "bs_slot") { } -sns_rom_bsmempak_device::sns_rom_bsmempak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_bsmempak_device::sns_rom_bsmempak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_BSMEMPAK, tag, owner, clock) , m_command(0), m_write_old(0), m_write_new(0), m_flash_enable(0), m_read_enable(0), m_write_enable(0) { diff --git a/src/devices/bus/snes/bsx.h b/src/devices/bus/snes/bsx.h index e144ff118ff..ad556887300 100644 --- a/src/devices/bus/snes/bsx.h +++ b/src/devices/bus/snes/bsx.h @@ -15,7 +15,7 @@ class sns_rom_bsx_device : public sns_rom_device { public: // construction/destruction - sns_rom_bsx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_bsx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -47,7 +47,7 @@ protected: running_machine& m_machine; }; - sns_rom_bsx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom_bsx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -81,7 +81,7 @@ class sns_rom_bsxlo_device : public sns_rom_device { public: // construction/destruction - sns_rom_bsxlo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_bsxlo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -103,7 +103,7 @@ class sns_rom_bsxhi_device : public sns_rom21_device { public: // construction/destruction - sns_rom_bsxhi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_bsxhi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -126,7 +126,7 @@ class sns_rom_bsmempak_device : public sns_rom_device { public: // construction/destruction - sns_rom_bsmempak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_bsmempak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional reading and writing virtual uint8_t read_l(offs_t offset) override; diff --git a/src/devices/bus/snes/event.cpp b/src/devices/bus/snes/event.cpp index 5ce5bbca97c..6f0fb541634 100644 --- a/src/devices/bus/snes/event.cpp +++ b/src/devices/bus/snes/event.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(SNS_PFEST94, sns_pfest94_device, "sns_pfest94", "SNES Powerfest '94") -sns_pfest94_device::sns_pfest94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_pfest94_device::sns_pfest94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNS_PFEST94, tag, owner, clock) , device_sns_cart_interface(mconfig, *this) , m_upd7725(*this, "dsp") @@ -222,7 +222,7 @@ void sns_pfest94_device::dsp_data_map_lorom(address_map &map) void sns_pfest94_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_pfest94_device::dsp_prg_map_lorom); m_upd7725->set_addrmap(AS_DATA, &sns_pfest94_device::dsp_data_map_lorom); } diff --git a/src/devices/bus/snes/event.h b/src/devices/bus/snes/event.h index 5c075b50b27..bc22060bff9 100644 --- a/src/devices/bus/snes/event.h +++ b/src/devices/bus/snes/event.h @@ -16,7 +16,7 @@ class sns_pfest94_device : public device_t, { public: // construction/destruction - sns_pfest94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_pfest94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/snes/rom.cpp b/src/devices/bus/snes/rom.cpp index 0bfa07ac6af..d774a125a33 100644 --- a/src/devices/bus/snes/rom.cpp +++ b/src/devices/bus/snes/rom.cpp @@ -29,17 +29,17 @@ DEFINE_DEVICE_TYPE(SNS_LOROM_MCPIR2, sns_rom_mcpirate2_device, "sns_rom_mcpira DEFINE_DEVICE_TYPE(SNS_LOROM_20COL, sns_rom_20col_device, "sns_rom_20col", "SNES Super 20 Collection") -sns_rom_device::sns_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom_device::sns_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_sns_cart_interface(mconfig, *this) { } -sns_rom_device::sns_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_device::sns_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM, tag, owner, clock) { } -sns_rom_obc1_device::sns_rom_obc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_obc1_device::sns_rom_obc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_OBC1, tag, owner, clock), m_address(0), m_offset(0), m_shift(0) { } @@ -47,43 +47,43 @@ sns_rom_obc1_device::sns_rom_obc1_device(const machine_config &mconfig, const ch // Pirate LoROM 'mappers' -sns_rom_pokemon_device::sns_rom_pokemon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_pokemon_device::sns_rom_pokemon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_POKEMON, tag, owner, clock), m_latch(0) { } -sns_rom_tekken2_device::sns_rom_tekken2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_tekken2_device::sns_rom_tekken2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_TEKKEN2, tag, owner, clock), m_prot(0) { } -sns_rom_soulblad_device::sns_rom_soulblad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_soulblad_device::sns_rom_soulblad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_SOULBLAD, tag, owner, clock) { } -sns_rom_banana_device::sns_rom_banana_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_banana_device::sns_rom_banana_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_BANANA, tag, owner, clock) { } -sns_rom_bugs_device::sns_rom_bugs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_bugs_device::sns_rom_bugs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_BUGSLIFE, tag, owner, clock) { } // Multigame LoROM 'mappers' -sns_rom_mcpirate1_device::sns_rom_mcpirate1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_mcpirate1_device::sns_rom_mcpirate1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_MCPIR1, tag, owner, clock), m_base_bank(0) { } -sns_rom_mcpirate2_device::sns_rom_mcpirate2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_mcpirate2_device::sns_rom_mcpirate2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_MCPIR2, tag, owner, clock), m_base_bank(0) { } -sns_rom_20col_device::sns_rom_20col_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_20col_device::sns_rom_20col_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_20COL, tag, owner, clock), m_base_bank(0) { } diff --git a/src/devices/bus/snes/rom.h b/src/devices/bus/snes/rom.h index d2a09b774c1..0a47f00dc8f 100644 --- a/src/devices/bus/snes/rom.h +++ b/src/devices/bus/snes/rom.h @@ -14,14 +14,14 @@ class sns_rom_device : public device_t, public device_sns_cart_interface { public: // construction/destruction - sns_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_l(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; protected: - sns_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -33,7 +33,7 @@ class sns_rom_obc1_device : public sns_rom_device { public: // construction/destruction - sns_rom_obc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_obc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional reading and writing virtual uint8_t chip_read(offs_t offset) override; @@ -58,7 +58,7 @@ class sns_rom_pokemon_device : public sns_rom_device { public: // construction/destruction - sns_rom_pokemon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_pokemon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing (protection device) virtual uint8_t chip_read(offs_t offset) override; @@ -78,7 +78,7 @@ class sns_rom_tekken2_device : public sns_rom_device { public: // construction/destruction - sns_rom_tekken2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_tekken2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing (protection device) virtual uint8_t chip_read(offs_t offset) override; @@ -102,7 +102,7 @@ class sns_rom_soulblad_device : public sns_rom_device { public: // construction/destruction - sns_rom_soulblad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_soulblad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing (protection device) virtual uint8_t chip_read(offs_t offset) override; @@ -114,7 +114,7 @@ class sns_rom_mcpirate1_device : public sns_rom_device { public: // construction/destruction - sns_rom_mcpirate1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_mcpirate1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -135,7 +135,7 @@ class sns_rom_mcpirate2_device : public sns_rom_device { public: // construction/destruction - sns_rom_mcpirate2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_mcpirate2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -156,7 +156,7 @@ class sns_rom_20col_device : public sns_rom_device { public: // construction/destruction - sns_rom_20col_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_20col_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -176,7 +176,7 @@ class sns_rom_banana_device : public sns_rom_device { public: // construction/destruction - sns_rom_banana_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_banana_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing (protection device) virtual uint8_t chip_read(offs_t offset) override; @@ -196,7 +196,7 @@ class sns_rom_bugs_device : public sns_rom_device { public: // construction/destruction - sns_rom_bugs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_bugs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing (protection device) virtual uint8_t chip_read(offs_t offset) override; diff --git a/src/devices/bus/snes/rom21.cpp b/src/devices/bus/snes/rom21.cpp index 9bf43d05894..36aff77badb 100644 --- a/src/devices/bus/snes/rom21.cpp +++ b/src/devices/bus/snes/rom21.cpp @@ -19,17 +19,17 @@ DEFINE_DEVICE_TYPE(SNS_HIROM, sns_rom21_device, "sns_rom21", "SNES DEFINE_DEVICE_TYPE(SNS_HIROM_SRTC, sns_rom21_srtc_device, "sns_rom21_rtc", "SNES Cart (HiROM) + S-RTC") -sns_rom21_device::sns_rom21_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom21_device::sns_rom21_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_sns_cart_interface( mconfig, *this ) { } -sns_rom21_device::sns_rom21_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom21_device::sns_rom21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom21_device(mconfig, SNS_HIROM, tag, owner, clock) { } -sns_rom21_srtc_device::sns_rom21_srtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom21_srtc_device::sns_rom21_srtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom21_device(mconfig, SNS_HIROM_SRTC, tag, owner, clock), m_mode(0), m_index(0) { } diff --git a/src/devices/bus/snes/rom21.h b/src/devices/bus/snes/rom21.h index fb9b0b6c65a..b8935031de9 100644 --- a/src/devices/bus/snes/rom21.h +++ b/src/devices/bus/snes/rom21.h @@ -15,14 +15,14 @@ class sns_rom21_device : public device_t, { public: // construction/destruction - sns_rom21_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom21_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_l(offs_t offset) override; virtual uint8_t read_h(offs_t offset) override; protected: - sns_rom21_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom21_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -35,7 +35,7 @@ class sns_rom21_srtc_device : public sns_rom21_device { public: // construction/destruction - sns_rom21_srtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom21_srtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t chip_read(offs_t offset) override; diff --git a/src/devices/bus/snes/sa1.cpp b/src/devices/bus/snes/sa1.cpp index 65ff3d5b251..7f3a12e5b38 100644 --- a/src/devices/bus/snes/sa1.cpp +++ b/src/devices/bus/snes/sa1.cpp @@ -86,7 +86,7 @@ DEFINE_DEVICE_TYPE(SNS_LOROM_SA1, sns_sa1_device, "sns_rom_sa1", "SNES Cart + SA-1") -sns_sa1_device::sns_sa1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sns_sa1_device::sns_sa1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNS_LOROM_SA1, tag, owner, clock) , device_sns_cart_interface(mconfig, *this) , m_sa1(*this, "sa1cpu") diff --git a/src/devices/bus/snes/sa1.h b/src/devices/bus/snes/sa1.h index 8b68820a826..15a5397c24d 100644 --- a/src/devices/bus/snes/sa1.h +++ b/src/devices/bus/snes/sa1.h @@ -17,7 +17,7 @@ class sns_sa1_device : public device_t, { public: // construction/destruction - sns_sa1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sns_sa1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/snes/sdd1.cpp b/src/devices/bus/snes/sdd1.cpp index 3b60be87609..e7ed3b92c28 100644 --- a/src/devices/bus/snes/sdd1.cpp +++ b/src/devices/bus/snes/sdd1.cpp @@ -411,14 +411,14 @@ void sns_rom_sdd1_device::SDD1_emu::SDD1emu_decompress(uint8_t *ROM, uint32_t *m DEFINE_DEVICE_TYPE(SNS_LOROM_SDD1, sns_rom_sdd1_device, "sns_rom_sdd1", "SNES Cart + S-DD1") -sns_rom_sdd1_device::sns_rom_sdd1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom_sdd1_device::sns_rom_sdd1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sns_cart_interface(mconfig, *this) , m_sdd1_enable(0), m_xfer_enable(0), m_sdd1emu(nullptr) { } -sns_rom_sdd1_device::sns_rom_sdd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_sdd1_device::sns_rom_sdd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_sdd1_device(mconfig, SNS_LOROM_SDD1, tag, owner, clock) { } diff --git a/src/devices/bus/snes/sdd1.h b/src/devices/bus/snes/sdd1.h index 5164a169f65..f38ee93f0d0 100644 --- a/src/devices/bus/snes/sdd1.h +++ b/src/devices/bus/snes/sdd1.h @@ -16,7 +16,7 @@ class sns_rom_sdd1_device : public device_t, { public: // construction/destruction - sns_rom_sdd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_sdd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -27,7 +27,7 @@ public: virtual void chip_write(offs_t offset, uint8_t data) override; protected: - sns_rom_sdd1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom_sdd1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/snes/sfx.cpp b/src/devices/bus/snes/sfx.cpp index 8051fe9c8f8..af535799ea5 100644 --- a/src/devices/bus/snes/sfx.cpp +++ b/src/devices/bus/snes/sfx.cpp @@ -18,18 +18,18 @@ DEFINE_DEVICE_TYPE(SNS_LOROM_SUPERFX1, sns_rom_superfx1_device, "sns_rom_superfx DEFINE_DEVICE_TYPE(SNS_LOROM_SUPERFX2, sns_rom_superfx2_device, "sns_rom_superfx2", "SNES Cart (LoROM) + SuperFX 2") -sns_rom_superfx_device::sns_rom_superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom_superfx_device::sns_rom_superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, type, tag, owner, clock) , m_superfx(*this, "superfx") { } -sns_rom_superfx1_device::sns_rom_superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_superfx1_device::sns_rom_superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_superfx_device(mconfig, SNS_LOROM_SUPERFX1, tag, owner, clock) { } -sns_rom_superfx2_device::sns_rom_superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_superfx2_device::sns_rom_superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_superfx_device(mconfig, SNS_LOROM_SUPERFX2, tag, owner, clock) { } diff --git a/src/devices/bus/snes/sfx.h b/src/devices/bus/snes/sfx.h index 54df5a8018b..e7a614d0923 100644 --- a/src/devices/bus/snes/sfx.h +++ b/src/devices/bus/snes/sfx.h @@ -14,7 +14,7 @@ class sns_rom_superfx_device : public sns_rom_device { protected: // construction/destruction - sns_rom_superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom_superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -48,7 +48,7 @@ class sns_rom_superfx1_device : public sns_rom_superfx_device { public: // construction/destruction - sns_rom_superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -58,7 +58,7 @@ class sns_rom_superfx2_device : public sns_rom_superfx_device { public: // construction/destruction - sns_rom_superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/snes/sgb.cpp b/src/devices/bus/snes/sgb.cpp index 8ce9ebfab65..84392ef3e02 100644 --- a/src/devices/bus/snes/sgb.cpp +++ b/src/devices/bus/snes/sgb.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(SNS_LOROM_SUPERGB, sns_rom_sgb1_device, "sns_rom_sgb", "SNE DEFINE_DEVICE_TYPE(SNS_LOROM_SUPERGB2, sns_rom_sgb2_device, "sns_rom_sgb2", "SNES Super Game Boy 2 Cart") -sns_rom_sgb_device::sns_rom_sgb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +sns_rom_sgb_device::sns_rom_sgb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, type, tag, owner, clock), m_sgb_cpu(*this, "sgb_cpu"), m_sgb_apu(*this, "sgb_apu"), @@ -50,13 +50,13 @@ sns_rom_sgb_device::sns_rom_sgb_device(const machine_config &mconfig, device_typ } -sns_rom_sgb1_device::sns_rom_sgb1_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +sns_rom_sgb1_device::sns_rom_sgb1_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : sns_rom_sgb_device(mconfig, SNS_LOROM_SUPERGB, tag, owner, clock) { } -sns_rom_sgb2_device::sns_rom_sgb2_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +sns_rom_sgb2_device::sns_rom_sgb2_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : sns_rom_sgb_device(mconfig, SNS_LOROM_SUPERGB2, tag, owner, clock) { } @@ -134,14 +134,14 @@ void sns_rom_sgb_device::gb_timer_callback(uint8_t data) void sns_rom_sgb1_device::device_add_mconfig(machine_config &config) { - LR35902(config, m_sgb_cpu, 4295454); /* 4.295454 MHz */ + LR35902(config, m_sgb_cpu, XTAL::u(4295454)); /* 4.295454 MHz */ m_sgb_cpu->set_addrmap(AS_PROGRAM, &sns_rom_sgb1_device::supergb_map); m_sgb_cpu->timer_cb().set(FUNC(sns_rom_sgb_device::gb_timer_callback)); m_sgb_cpu->set_halt_bug(true); SGB_PPU(config, m_sgb_ppu, m_sgb_cpu); - DMG_APU(config, m_sgb_apu, 4295454); + DMG_APU(config, m_sgb_apu, XTAL::u(4295454)); GB_CART_SLOT(config, m_cartslot, gameboy_cartridges, nullptr); m_cartslot->set_space(m_sgb_cpu, AS_PROGRAM); diff --git a/src/devices/bus/snes/sgb.h b/src/devices/bus/snes/sgb.h index 46d600a704b..c783971c404 100644 --- a/src/devices/bus/snes/sgb.h +++ b/src/devices/bus/snes/sgb.h @@ -23,7 +23,7 @@ public: protected: // construction/destruction - sns_rom_sgb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom_sgb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -77,7 +77,7 @@ class sns_rom_sgb1_device : public sns_rom_sgb_device { public: // construction/destruction - sns_rom_sgb1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_sgb1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -90,7 +90,7 @@ class sns_rom_sgb2_device : public sns_rom_sgb_device { public: // construction/destruction - sns_rom_sgb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_sgb2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/snes/snes_slot.cpp b/src/devices/bus/snes/snes_slot.cpp index 7d9dbf5e9a2..e7af9baba7e 100644 --- a/src/devices/bus/snes/snes_slot.cpp +++ b/src/devices/bus/snes/snes_slot.cpp @@ -219,7 +219,7 @@ offs_t device_sns_cart_interface::address_r() //------------------------------------------------- // base_sns_cart_slot_device - constructor //------------------------------------------------- -base_sns_cart_slot_device::base_sns_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +base_sns_cart_slot_device::base_sns_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_slot_interface(mconfig, *this), @@ -231,17 +231,17 @@ base_sns_cart_slot_device::base_sns_cart_slot_device(const machine_config &mconf { } -sns_cart_slot_device::sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sns_cart_slot_device::sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_sns_cart_slot_device(mconfig, SNS_CART_SLOT, tag, owner, clock) { } -sns_sufami_cart_slot_device::sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sns_sufami_cart_slot_device::sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_sns_cart_slot_device(mconfig, SNS_SUFAMI_CART_SLOT, tag, owner, clock) { } -sns_bsx_cart_slot_device::sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sns_bsx_cart_slot_device::sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_sns_cart_slot_device(mconfig, SNS_BSX_CART_SLOT, tag, owner, clock) { } diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h index ec777ee8cc1..4077d64be1f 100644 --- a/src/devices/bus/snes/snes_slot.h +++ b/src/devices/bus/snes/snes_slot.h @@ -234,7 +234,7 @@ public: device_sns_cart_interface* m_cart; protected: - base_sns_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + base_sns_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -253,7 +253,7 @@ class sns_cart_slot_device : public base_sns_cart_slot_device public: // construction/destruction template - sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&opts, const char *dflt) + sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : sns_cart_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -261,7 +261,7 @@ public: set_default_option(dflt); set_fixed(false); } - sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "snes_cart"; } virtual const char *file_extensions() const noexcept override { return "sfc"; } }; @@ -274,14 +274,14 @@ public: // construction/destruction template sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sns_sufami_cart_slot_device(mconfig, tag, owner, 0) + : sns_sufami_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "st_cart"; } virtual const char *file_extensions() const noexcept override { return "st"; } }; @@ -294,14 +294,14 @@ public: // construction/destruction template sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : sns_bsx_cart_slot_device(mconfig, tag, owner, 0) + : sns_bsx_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const char *image_interface() const noexcept override { return "bspack"; } virtual const char *file_extensions() const noexcept override { return "bs"; } }; diff --git a/src/devices/bus/snes/spc7110.cpp b/src/devices/bus/snes/spc7110.cpp index 20d59dc681a..9c975d17bee 100644 --- a/src/devices/bus/snes/spc7110.cpp +++ b/src/devices/bus/snes/spc7110.cpp @@ -42,7 +42,7 @@ DEFINE_DEVICE_TYPE(SNS_HIROM_SPC7110, sns_rom_spc7110_device, "sns_rom_sp DEFINE_DEVICE_TYPE(SNS_HIROM_SPC7110_RTC, sns_rom_spc7110rtc_device, "sns_rom_spc7110rtc", "SNES Cart + SPC7110 + RTC") -sns_rom_spc7110_device::sns_rom_spc7110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom_spc7110_device::sns_rom_spc7110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sns_rom21_device(mconfig, type, tag, owner, clock) , m_r4801(0), m_r4802(0), m_r4803(0), m_r4804(0), m_r4805(0), m_r4806(0), m_r4807(0), m_r4808(0), m_r4809(0), m_r480a(0), m_r480b(0), m_r480c(0) , m_decomp(nullptr) @@ -55,12 +55,12 @@ sns_rom_spc7110_device::sns_rom_spc7110_device(const machine_config &mconfig, de { } -sns_rom_spc7110_device::sns_rom_spc7110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_spc7110_device::sns_rom_spc7110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_spc7110_device(mconfig, SNS_HIROM_SPC7110, tag, owner, clock) { } -sns_rom_spc7110rtc_device::sns_rom_spc7110rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_spc7110rtc_device::sns_rom_spc7110rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_spc7110_device(mconfig, SNS_HIROM_SPC7110_RTC, tag, owner, clock) { } diff --git a/src/devices/bus/snes/spc7110.h b/src/devices/bus/snes/spc7110.h index a7c798244c1..d364c26dfc3 100644 --- a/src/devices/bus/snes/spc7110.h +++ b/src/devices/bus/snes/spc7110.h @@ -15,7 +15,7 @@ class sns_rom_spc7110_device : public sns_rom21_device { public: // construction/destruction - sns_rom_spc7110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_spc7110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -27,7 +27,7 @@ public: virtual void chip_write(offs_t offset, uint8_t data) override; protected: - sns_rom_spc7110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom_spc7110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -194,7 +194,7 @@ class sns_rom_spc7110rtc_device : public sns_rom_spc7110_device { public: // construction/destruction - sns_rom_spc7110rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_spc7110rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing diff --git a/src/devices/bus/snes/sufami.cpp b/src/devices/bus/snes/sufami.cpp index 7589fb84fa4..42d1154d630 100644 --- a/src/devices/bus/snes/sufami.cpp +++ b/src/devices/bus/snes/sufami.cpp @@ -24,14 +24,14 @@ DEFINE_DEVICE_TYPE(SNS_LOROM_SUFAMI, sns_rom_sufami_device, "sns_rom_sufami", "S DEFINE_DEVICE_TYPE(SNS_STROM, sns_rom_strom_device, "sns_strom", "SNES Sufami Turbo Minicart") -sns_rom_sufami_device::sns_rom_sufami_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_sufami_device::sns_rom_sufami_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_LOROM_SUFAMI, tag, owner, clock) , m_slot1(*this, "st_slot1") , m_slot2(*this, "st_slot2") { } -sns_rom_strom_device::sns_rom_strom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_strom_device::sns_rom_strom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, SNS_STROM, tag, owner, clock) { } diff --git a/src/devices/bus/snes/sufami.h b/src/devices/bus/snes/sufami.h index 1b231131a2b..6ab2e6f2d5b 100644 --- a/src/devices/bus/snes/sufami.h +++ b/src/devices/bus/snes/sufami.h @@ -15,7 +15,7 @@ class sns_rom_sufami_device : public sns_rom_device { public: // construction/destruction - sns_rom_sufami_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_sufami_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional reading and writing virtual uint8_t read_l(offs_t offset) override; @@ -40,7 +40,7 @@ class sns_rom_strom_device : public sns_rom_device { public: // construction/destruction - sns_rom_strom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_strom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional reading and writing virtual uint8_t read_l(offs_t offset) override; diff --git a/src/devices/bus/snes/upd.cpp b/src/devices/bus/snes/upd.cpp index 476a1b42544..dd97cdf6626 100644 --- a/src/devices/bus/snes/upd.cpp +++ b/src/devices/bus/snes/upd.cpp @@ -32,37 +32,37 @@ DEFINE_DEVICE_TYPE(SNS_LOROM_SETA10, sns_rom_seta10dsp_device, "sns_rom_seta10", DEFINE_DEVICE_TYPE(SNS_LOROM_SETA11, sns_rom_seta11dsp_device, "sns_rom_seta11", "SNES Cart (LoROM) + Seta ST011 DSP") -sns_rom20_necdsp_device::sns_rom20_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom20_necdsp_device::sns_rom20_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, type, tag, owner, clock), m_upd7725(*this, "dsp") { } -sns_rom20_necdsp_device::sns_rom20_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom20_necdsp_device::sns_rom20_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP, tag, owner, clock) { } -sns_rom21_necdsp_device::sns_rom21_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom21_necdsp_device::sns_rom21_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sns_rom21_device(mconfig, type, tag, owner, clock), m_upd7725(*this, "dsp") { } -sns_rom21_necdsp_device::sns_rom21_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom21_necdsp_device::sns_rom21_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom21_necdsp_device(mconfig, SNS_HIROM_NECDSP, tag, owner, clock) { } -sns_rom_setadsp_device::sns_rom_setadsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sns_rom_setadsp_device::sns_rom_setadsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_device(mconfig, type, tag, owner, clock), m_upd96050(*this, "dsp") { } -sns_rom_seta10dsp_device::sns_rom_seta10dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_seta10dsp_device::sns_rom_seta10dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_setadsp_device(mconfig, SNS_LOROM_SETA10, tag, owner, clock) { } -sns_rom_seta11dsp_device::sns_rom_seta11dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_seta11dsp_device::sns_rom_seta11dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_setadsp_device(mconfig, SNS_LOROM_SETA11, tag, owner, clock) { } @@ -134,7 +134,7 @@ void sns_rom20_necdsp_device::dsp_data_map_lorom(address_map &map) void sns_rom20_necdsp_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom20_necdsp_device::dsp_prg_map_lorom); m_upd7725->set_addrmap(AS_DATA, &sns_rom20_necdsp_device::dsp_data_map_lorom); } @@ -192,7 +192,7 @@ void sns_rom21_necdsp_device::dsp_data_map_hirom(address_map &map) void sns_rom21_necdsp_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom21_necdsp_device::dsp_prg_map_hirom); m_upd7725->set_addrmap(AS_DATA, &sns_rom21_necdsp_device::dsp_data_map_hirom); } @@ -304,7 +304,7 @@ void sns_rom_setadsp_device::st01x_data_map(address_map &map) void sns_rom_seta10dsp_device::device_add_mconfig(machine_config &config) { - UPD96050(config, m_upd96050, 10000000); + UPD96050(config, m_upd96050, XTAL::u(10000000)); m_upd96050->set_addrmap(AS_PROGRAM, &sns_rom_seta10dsp_device::st01x_prg_map); m_upd96050->set_addrmap(AS_DATA, &sns_rom_seta10dsp_device::st01x_data_map); } @@ -312,7 +312,7 @@ void sns_rom_seta10dsp_device::device_add_mconfig(machine_config &config) void sns_rom_seta11dsp_device::device_add_mconfig(machine_config &config) { - UPD96050(config, m_upd96050, 15000000); + UPD96050(config, m_upd96050, XTAL::u(15000000)); m_upd96050->set_addrmap(AS_PROGRAM, &sns_rom_seta11dsp_device::st01x_prg_map); m_upd96050->set_addrmap(AS_DATA, &sns_rom_seta11dsp_device::st01x_data_map); } @@ -368,42 +368,42 @@ DEFINE_DEVICE_TYPE(SNS_LOROM_SETA10_LEG, sns_rom_seta10dsp_legacy_device, "sn DEFINE_DEVICE_TYPE(SNS_LOROM_SETA11_LEG, sns_rom_seta11dsp_legacy_device, "sns_seta11leg", "SNES Cart (LoROM) + SETA ST011 DSP Legacy") -sns_rom20_necdsp1_legacy_device::sns_rom20_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom20_necdsp1_legacy_device::sns_rom20_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP1_LEG, tag, owner, clock) { } -sns_rom20_necdsp1b_legacy_device::sns_rom20_necdsp1b_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom20_necdsp1b_legacy_device::sns_rom20_necdsp1b_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP1B_LEG, tag, owner, clock) { } -sns_rom20_necdsp2_legacy_device::sns_rom20_necdsp2_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom20_necdsp2_legacy_device::sns_rom20_necdsp2_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP2_LEG, tag, owner, clock) { } -sns_rom20_necdsp3_legacy_device::sns_rom20_necdsp3_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom20_necdsp3_legacy_device::sns_rom20_necdsp3_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP3_LEG, tag, owner, clock) { } -sns_rom20_necdsp4_legacy_device::sns_rom20_necdsp4_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom20_necdsp4_legacy_device::sns_rom20_necdsp4_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom20_necdsp_device(mconfig, SNS_LOROM_NECDSP4_LEG, tag, owner, clock) { } -sns_rom21_necdsp1_legacy_device::sns_rom21_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom21_necdsp1_legacy_device::sns_rom21_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom21_necdsp_device(mconfig, SNS_HIROM_NECDSP1_LEG, tag, owner, clock) { } -sns_rom_seta10dsp_legacy_device::sns_rom_seta10dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_seta10dsp_legacy_device::sns_rom_seta10dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_setadsp_device(mconfig, SNS_LOROM_SETA10_LEG, tag, owner, clock) { } -sns_rom_seta11dsp_legacy_device::sns_rom_seta11dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sns_rom_seta11dsp_legacy_device::sns_rom_seta11dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sns_rom_setadsp_device(mconfig, SNS_LOROM_SETA11_LEG, tag, owner, clock) { } @@ -411,56 +411,56 @@ sns_rom_seta11dsp_legacy_device::sns_rom_seta11dsp_legacy_device(const machine_c void sns_rom20_necdsp1_legacy_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom20_necdsp1_legacy_device::dsp_prg_map_lorom); m_upd7725->set_addrmap(AS_DATA, &sns_rom20_necdsp1_legacy_device::dsp_data_map_lorom); } void sns_rom20_necdsp1b_legacy_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom20_necdsp1b_legacy_device::dsp_prg_map_lorom); m_upd7725->set_addrmap(AS_DATA, &sns_rom20_necdsp1b_legacy_device::dsp_data_map_lorom); } void sns_rom20_necdsp2_legacy_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom20_necdsp2_legacy_device::dsp_prg_map_lorom); m_upd7725->set_addrmap(AS_DATA, &sns_rom20_necdsp2_legacy_device::dsp_data_map_lorom); } void sns_rom20_necdsp3_legacy_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom20_necdsp3_legacy_device::dsp_prg_map_lorom); m_upd7725->set_addrmap(AS_DATA, &sns_rom20_necdsp3_legacy_device::dsp_data_map_lorom); } void sns_rom20_necdsp4_legacy_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom20_necdsp4_legacy_device::dsp_prg_map_lorom); m_upd7725->set_addrmap(AS_DATA, &sns_rom20_necdsp4_legacy_device::dsp_data_map_lorom); } void sns_rom21_necdsp1_legacy_device::device_add_mconfig(machine_config &config) { - UPD7725(config, m_upd7725, 8000000); + UPD7725(config, m_upd7725, XTAL::u(8000000)); m_upd7725->set_addrmap(AS_PROGRAM, &sns_rom21_necdsp1_legacy_device::dsp_prg_map_hirom); m_upd7725->set_addrmap(AS_DATA, &sns_rom21_necdsp1_legacy_device::dsp_data_map_hirom); } void sns_rom_seta10dsp_legacy_device::device_add_mconfig(machine_config &config) { - UPD96050(config, m_upd96050, 10000000); + UPD96050(config, m_upd96050, XTAL::u(10000000)); m_upd96050->set_addrmap(AS_PROGRAM, &sns_rom_seta10dsp_legacy_device::st01x_prg_map); m_upd96050->set_addrmap(AS_DATA, &sns_rom_seta10dsp_legacy_device::st01x_data_map); } void sns_rom_seta11dsp_legacy_device::device_add_mconfig(machine_config &config) { - UPD96050(config, m_upd96050, 15000000); + UPD96050(config, m_upd96050, XTAL::u(15000000)); m_upd96050->set_addrmap(AS_PROGRAM, &sns_rom_seta11dsp_legacy_device::st01x_prg_map); m_upd96050->set_addrmap(AS_DATA, &sns_rom_seta11dsp_legacy_device::st01x_data_map); } diff --git a/src/devices/bus/snes/upd.h b/src/devices/bus/snes/upd.h index 65dd780c725..cdeffeca499 100644 --- a/src/devices/bus/snes/upd.h +++ b/src/devices/bus/snes/upd.h @@ -16,10 +16,10 @@ class sns_rom20_necdsp_device : public sns_rom_device { public: // construction/destruction - sns_rom20_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom20_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sns_rom20_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom20_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -50,10 +50,10 @@ class sns_rom21_necdsp_device : public sns_rom21_device { public: // construction/destruction - sns_rom21_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom21_necdsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sns_rom21_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom21_necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -87,7 +87,7 @@ public: protected: // construction/destruction - sns_rom_setadsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sns_rom_setadsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -115,7 +115,7 @@ class sns_rom_seta10dsp_device : public sns_rom_setadsp_device { public: // construction/destruction - sns_rom_seta10dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_seta10dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -128,7 +128,7 @@ class sns_rom_seta11dsp_device : public sns_rom_setadsp_device { public: // construction/destruction - sns_rom_seta11dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_seta11dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -150,7 +150,7 @@ class sns_rom20_necdsp1_legacy_device : public sns_rom20_necdsp_device { public: // construction/destruction - sns_rom20_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom20_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -162,7 +162,7 @@ class sns_rom20_necdsp1b_legacy_device : public sns_rom20_necdsp_device { public: // construction/destruction - sns_rom20_necdsp1b_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom20_necdsp1b_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -174,7 +174,7 @@ class sns_rom20_necdsp2_legacy_device : public sns_rom20_necdsp_device { public: // construction/destruction - sns_rom20_necdsp2_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom20_necdsp2_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -186,7 +186,7 @@ class sns_rom20_necdsp3_legacy_device : public sns_rom20_necdsp_device { public: // construction/destruction - sns_rom20_necdsp3_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom20_necdsp3_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -198,7 +198,7 @@ class sns_rom20_necdsp4_legacy_device : public sns_rom20_necdsp_device { public: // construction/destruction - sns_rom20_necdsp4_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom20_necdsp4_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -210,7 +210,7 @@ class sns_rom21_necdsp1_legacy_device : public sns_rom21_necdsp_device { public: // construction/destruction - sns_rom21_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom21_necdsp1_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -222,7 +222,7 @@ class sns_rom_seta10dsp_legacy_device : public sns_rom_setadsp_device { public: // construction/destruction - sns_rom_seta10dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_seta10dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -234,7 +234,7 @@ class sns_rom_seta11dsp_legacy_device : public sns_rom_setadsp_device { public: // construction/destruction - sns_rom_seta11dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sns_rom_seta11dsp_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/snes_ctrl/bcbattle.cpp b/src/devices/bus/snes_ctrl/bcbattle.cpp index c5d78bc04b3..aea7e65ffdb 100644 --- a/src/devices/bus/snes_ctrl/bcbattle.cpp +++ b/src/devices/bus/snes_ctrl/bcbattle.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(SNES_BARCODE_BATTLER, snes_bcbattle_device, "snes_bcbattle", void snes_bcbattle_device::device_add_mconfig(machine_config &config) { - BARCODE_READER(config, "battler", 0); + BARCODE_READER(config, "battler"); } @@ -71,7 +71,7 @@ TIMER_CALLBACK_MEMBER(snes_bcbattle_device::scan_tick) // snes_bcbattle_device - constructor //------------------------------------------------- -snes_bcbattle_device::snes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_bcbattle_device::snes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_BARCODE_BATTLER, tag, owner, clock), device_snes_control_port_interface(mconfig, *this), m_reader(*this, "battler"), diff --git a/src/devices/bus/snes_ctrl/bcbattle.h b/src/devices/bus/snes_ctrl/bcbattle.h index a7073ac4ba0..45b7eb21ffd 100644 --- a/src/devices/bus/snes_ctrl/bcbattle.h +++ b/src/devices/bus/snes_ctrl/bcbattle.h @@ -26,7 +26,7 @@ class snes_bcbattle_device : public device_t, { public: // construction/destruction - snes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_bcbattle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/snes_ctrl/ctrl.cpp b/src/devices/bus/snes_ctrl/ctrl.cpp index 68e69ee0a8b..f8cb2b98708 100644 --- a/src/devices/bus/snes_ctrl/ctrl.cpp +++ b/src/devices/bus/snes_ctrl/ctrl.cpp @@ -59,7 +59,7 @@ device_snes_control_port_interface::~device_snes_control_port_interface() // snes_control_port_device - constructor //------------------------------------------------- -snes_control_port_device::snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_control_port_device::snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_CONTROL_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_onscreen_cb(*this), diff --git a/src/devices/bus/snes_ctrl/ctrl.h b/src/devices/bus/snes_ctrl/ctrl.h index b6e6ddc869e..9fd5a81a481 100644 --- a/src/devices/bus/snes_ctrl/ctrl.h +++ b/src/devices/bus/snes_ctrl/ctrl.h @@ -52,14 +52,14 @@ public: // construction/destruction template snes_control_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : snes_control_port_device(mconfig, tag, owner, 0) + : snes_control_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + snes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~snes_control_port_device(); template void set_onscreen_callback(T &&... args) { m_onscreen_cb.set(std::forward(args)...); } diff --git a/src/devices/bus/snes_ctrl/joypad.cpp b/src/devices/bus/snes_ctrl/joypad.cpp index b421ba1de11..61fd75e8c80 100644 --- a/src/devices/bus/snes_ctrl/joypad.cpp +++ b/src/devices/bus/snes_ctrl/joypad.cpp @@ -53,7 +53,7 @@ ioport_constructor snes_joypad_device::device_input_ports() const // snes_joypad_device - constructor //------------------------------------------------- -snes_joypad_device::snes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_joypad_device::snes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_JOYPAD, tag, owner, clock), device_snes_control_port_interface(mconfig, *this), m_joypad(*this, "JOYPAD"), diff --git a/src/devices/bus/snes_ctrl/joypad.h b/src/devices/bus/snes_ctrl/joypad.h index 204cceac6d5..07207ec37d0 100644 --- a/src/devices/bus/snes_ctrl/joypad.h +++ b/src/devices/bus/snes_ctrl/joypad.h @@ -25,7 +25,7 @@ class snes_joypad_device : public device_t, { public: // construction/destruction - snes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_joypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/snes_ctrl/miracle.cpp b/src/devices/bus/snes_ctrl/miracle.cpp index f20647a10b4..fb51444523b 100644 --- a/src/devices/bus/snes_ctrl/miracle.cpp +++ b/src/devices/bus/snes_ctrl/miracle.cpp @@ -48,7 +48,7 @@ TIMER_CALLBACK_MEMBER(snes_miracle_device::strobe_tick) // snes_miracle_device - constructor //------------------------------------------------- -snes_miracle_device::snes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_miracle_device::snes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_MIRACLE, tag, owner, clock), device_serial_interface(mconfig, *this), device_snes_control_port_interface(mconfig, *this), @@ -89,8 +89,8 @@ void snes_miracle_device::device_reset() // set standard MIDI parameters set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(31250); - set_tra_rate(31250); + set_rcv_rate(XTAL::u(31250)); + set_tra_rate(XTAL::u(31250)); m_xmit_read = m_xmit_write = 0; m_recv_read = m_recv_write = 0; diff --git a/src/devices/bus/snes_ctrl/miracle.h b/src/devices/bus/snes_ctrl/miracle.h index b2bf08d2a49..79bd86caca9 100644 --- a/src/devices/bus/snes_ctrl/miracle.h +++ b/src/devices/bus/snes_ctrl/miracle.h @@ -28,7 +28,7 @@ class snes_miracle_device : public device_t, { public: // construction/destruction - snes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_miracle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: static constexpr int XMIT_RING_SIZE = 64; diff --git a/src/devices/bus/snes_ctrl/mouse.cpp b/src/devices/bus/snes_ctrl/mouse.cpp index 24e3e13ba23..fc829b1975a 100644 --- a/src/devices/bus/snes_ctrl/mouse.cpp +++ b/src/devices/bus/snes_ctrl/mouse.cpp @@ -59,7 +59,7 @@ ioport_constructor snes_mouse_device::device_input_ports() const // snes_mouse_device - constructor //------------------------------------------------- -snes_mouse_device::snes_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_mouse_device::snes_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_MOUSE, tag, owner, clock), device_snes_control_port_interface(mconfig, *this), m_buttons(*this, "BUTTONS"), diff --git a/src/devices/bus/snes_ctrl/mouse.h b/src/devices/bus/snes_ctrl/mouse.h index cd6f3839950..40174e899c7 100644 --- a/src/devices/bus/snes_ctrl/mouse.h +++ b/src/devices/bus/snes_ctrl/mouse.h @@ -25,7 +25,7 @@ class snes_mouse_device : public device_t, { public: // construction/destruction - snes_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/snes_ctrl/multitap.cpp b/src/devices/bus/snes_ctrl/multitap.cpp index ef630439276..b6d4b60ba6e 100644 --- a/src/devices/bus/snes_ctrl/multitap.cpp +++ b/src/devices/bus/snes_ctrl/multitap.cpp @@ -64,7 +64,7 @@ void snes_multitap_device::device_add_mconfig(machine_config &config) // snes_multitap_device - constructor //------------------------------------------------- -snes_multitap_device::snes_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_multitap_device::snes_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_MULTITAP, tag, owner, clock), device_snes_control_port_interface(mconfig, *this), m_port1(*this, "port1"), diff --git a/src/devices/bus/snes_ctrl/multitap.h b/src/devices/bus/snes_ctrl/multitap.h index 779744fe753..e29189d06e2 100644 --- a/src/devices/bus/snes_ctrl/multitap.h +++ b/src/devices/bus/snes_ctrl/multitap.h @@ -25,7 +25,7 @@ class snes_multitap_device : public device_t, { public: // construction/destruction - snes_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_multitap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/snes_ctrl/pachinko.cpp b/src/devices/bus/snes_ctrl/pachinko.cpp index 010385e6459..36a40ee1eb5 100644 --- a/src/devices/bus/snes_ctrl/pachinko.cpp +++ b/src/devices/bus/snes_ctrl/pachinko.cpp @@ -45,7 +45,7 @@ ioport_constructor snes_pachinko_device::device_input_ports() const // snes_pachinko_device - constructor //------------------------------------------------- -snes_pachinko_device::snes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_pachinko_device::snes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_PACHINKO, tag, owner, clock), device_snes_control_port_interface(mconfig, *this), m_dial(*this, "DIAL"), diff --git a/src/devices/bus/snes_ctrl/pachinko.h b/src/devices/bus/snes_ctrl/pachinko.h index 0fffa05767a..9fea189f060 100644 --- a/src/devices/bus/snes_ctrl/pachinko.h +++ b/src/devices/bus/snes_ctrl/pachinko.h @@ -25,7 +25,7 @@ class snes_pachinko_device : public device_t, { public: // construction/destruction - snes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_pachinko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/snes_ctrl/sscope.cpp b/src/devices/bus/snes_ctrl/sscope.cpp index 71a049adb82..6ae8097a616 100644 --- a/src/devices/bus/snes_ctrl/sscope.cpp +++ b/src/devices/bus/snes_ctrl/sscope.cpp @@ -54,7 +54,7 @@ ioport_constructor snes_sscope_device::device_input_ports() const // snes_sscope_device - constructor //------------------------------------------------- -snes_sscope_device::snes_sscope_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_sscope_device::snes_sscope_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_SUPERSCOPE, tag, owner, clock), device_snes_control_port_interface(mconfig, *this), m_buttons(*this, "BUTTONS"), diff --git a/src/devices/bus/snes_ctrl/sscope.h b/src/devices/bus/snes_ctrl/sscope.h index b81afda179d..742f88c402d 100644 --- a/src/devices/bus/snes_ctrl/sscope.h +++ b/src/devices/bus/snes_ctrl/sscope.h @@ -25,7 +25,7 @@ class snes_sscope_device : public device_t, { public: // construction/destruction - snes_sscope_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_sscope_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/snes_ctrl/twintap.cpp b/src/devices/bus/snes_ctrl/twintap.cpp index 25327786b10..d59317687e4 100644 --- a/src/devices/bus/snes_ctrl/twintap.cpp +++ b/src/devices/bus/snes_ctrl/twintap.cpp @@ -50,7 +50,7 @@ ioport_constructor snes_twintap_device::device_input_ports() const // snes_twintap_device - constructor //------------------------------------------------- -snes_twintap_device::snes_twintap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snes_twintap_device::snes_twintap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_TWINTAP, tag, owner, clock), device_snes_control_port_interface(mconfig, *this), m_inputs(*this, "INPUTS"), diff --git a/src/devices/bus/snes_ctrl/twintap.h b/src/devices/bus/snes_ctrl/twintap.h index ccd1d4cfef8..c745b169729 100644 --- a/src/devices/bus/snes_ctrl/twintap.h +++ b/src/devices/bus/snes_ctrl/twintap.h @@ -25,7 +25,7 @@ class snes_twintap_device : public device_t, { public: // construction/destruction - snes_twintap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_twintap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/spc1000/exp.cpp b/src/devices/bus/spc1000/exp.cpp index ba8b22c1456..12575e10f2a 100644 --- a/src/devices/bus/spc1000/exp.cpp +++ b/src/devices/bus/spc1000/exp.cpp @@ -35,7 +35,7 @@ device_spc1000_card_interface::~device_spc1000_card_interface() //------------------------------------------------- // spc1000_exp_device - constructor //------------------------------------------------- -spc1000_exp_device::spc1000_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spc1000_exp_device::spc1000_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPC1000_EXP_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr) diff --git a/src/devices/bus/spc1000/exp.h b/src/devices/bus/spc1000/exp.h index e2b1baeb958..7042058ebd4 100644 --- a/src/devices/bus/spc1000/exp.h +++ b/src/devices/bus/spc1000/exp.h @@ -30,14 +30,14 @@ public: // construction/destruction template spc1000_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts) - : spc1000_exp_device(mconfig, tag, owner, (uint32_t)0) + : spc1000_exp_device(mconfig, tag, owner) { opts(*this); set_default_option(nullptr); set_fixed(false); } - spc1000_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spc1000_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~spc1000_exp_device(); // reading and writing diff --git a/src/devices/bus/spc1000/fdd.cpp b/src/devices/bus/spc1000/fdd.cpp index fe668127328..8129c1751d2 100644 --- a/src/devices/bus/spc1000/fdd.cpp +++ b/src/devices/bus/spc1000/fdd.cpp @@ -138,7 +138,7 @@ DEFINE_DEVICE_TYPE(SPC1000_FDD_EXP, spc1000_fdd_exp_device, "spc1000_fdd_exp", " // spc1000_fdd_exp_device - constructor //------------------------------------------------- -spc1000_fdd_exp_device::spc1000_fdd_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spc1000_fdd_exp_device::spc1000_fdd_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPC1000_FDD_EXP, tag, owner, clock), device_spc1000_card_interface(mconfig, *this), m_cpu(*this, "fdccpu"), diff --git a/src/devices/bus/spc1000/fdd.h b/src/devices/bus/spc1000/fdd.h index 1275f1b9bfb..235f8e65fde 100644 --- a/src/devices/bus/spc1000/fdd.h +++ b/src/devices/bus/spc1000/fdd.h @@ -21,7 +21,7 @@ class spc1000_fdd_exp_device : public device_t, public device_spc1000_card_inter { public: // construction/destruction - spc1000_fdd_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spc1000_fdd_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spc1000/vdp.cpp b/src/devices/bus/spc1000/vdp.cpp index f85a64f59b9..4f6147d8e00 100644 --- a/src/devices/bus/spc1000/vdp.cpp +++ b/src/devices/bus/spc1000/vdp.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(SPC1000_VDP_EXP, spc1000_vdp_exp_device, "spc1000_vdp_exp", " // spc1000_vdp_exp_device - constructor //------------------------------------------------- -spc1000_vdp_exp_device::spc1000_vdp_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spc1000_vdp_exp_device::spc1000_vdp_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPC1000_VDP_EXP, tag, owner, clock) , device_spc1000_card_interface(mconfig, *this) , m_vdp(*this, "tms") diff --git a/src/devices/bus/spc1000/vdp.h b/src/devices/bus/spc1000/vdp.h index 989b25d5a90..c18aa6c228d 100644 --- a/src/devices/bus/spc1000/vdp.h +++ b/src/devices/bus/spc1000/vdp.h @@ -19,7 +19,7 @@ class spc1000_vdp_exp_device : public device_t, public device_spc1000_card_inter { public: // construction/destruction - spc1000_vdp_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spc1000_vdp_exp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/beta.cpp b/src/devices/bus/spectrum/beta.cpp index 8578cf46b3d..c9aea116a63 100644 --- a/src/devices/bus/spectrum/beta.cpp +++ b/src/devices/bus/spectrum/beta.cpp @@ -311,7 +311,7 @@ void spectrum_gamma_device::device_add_mconfig(machine_config& config) m_centronics->busy_handler().set([this](u8 data) { m_centronics_busy = data; }); m_centronics->set_output_latch(cent_data_out); - ACIA6850(config, m_acia, 0); // schematics missing, wiring unknown + ACIA6850(config, m_acia); // schematics missing, wiring unknown } const tiny_rom_entry *spectrum_betav2_device::device_rom_region() const @@ -353,7 +353,7 @@ const tiny_rom_entry *spectrum_gamma_device::device_rom_region() const // spectrum_betav2_device - constructor //------------------------------------------------- -spectrum_betav2_device::spectrum_betav2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_betav2_device::spectrum_betav2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -364,54 +364,54 @@ spectrum_betav2_device::spectrum_betav2_device(const machine_config &mconfig, de { } -spectrum_betav2_device::spectrum_betav2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_betav2_device::spectrum_betav2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betav2_device(mconfig, SPECTRUM_BETAV2, tag, owner, clock) { } -spectrum_betav3_device::spectrum_betav3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_betav3_device::spectrum_betav3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betav2_device(mconfig, type, tag, owner, clock) { } -spectrum_betav3_device::spectrum_betav3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_betav3_device::spectrum_betav3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betav3_device(mconfig, SPECTRUM_BETAV3, tag, owner, clock) { } -spectrum_betaplus_device::spectrum_betaplus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_betaplus_device::spectrum_betaplus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betav3_device(mconfig, type, tag, owner, clock) { } -spectrum_betaplus_device::spectrum_betaplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_betaplus_device::spectrum_betaplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betaplus_device(mconfig, SPECTRUM_BETAPLUS, tag, owner, clock) { } -spectrum_betaclone_device::spectrum_betaclone_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_betaclone_device::spectrum_betaclone_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betaplus_device(mconfig, type, tag, owner, clock) { } -spectrum_betaclone_device::spectrum_betaclone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_betaclone_device::spectrum_betaclone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betaclone_device(mconfig, SPECTRUM_BETACLONE, tag, owner, clock) { } -spectrum_betacbi_device::spectrum_betacbi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_betacbi_device::spectrum_betacbi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betaclone_device(mconfig, type, tag, owner, clock) , m_centronics(*this, "centronics") , m_centronics_busy(0) { } -spectrum_betacbi_device::spectrum_betacbi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_betacbi_device::spectrum_betacbi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betacbi_device(mconfig, SPECTRUM_BETACBI, tag, owner, clock) { } -spectrum_gamma_device::spectrum_gamma_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_gamma_device::spectrum_gamma_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_betaplus_device(mconfig, type, tag, owner, clock) , m_ppi(*this, "ppi") , m_acia(*this, "acia") @@ -420,7 +420,7 @@ spectrum_gamma_device::spectrum_gamma_device(const machine_config &mconfig, devi { } -spectrum_gamma_device::spectrum_gamma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_gamma_device::spectrum_gamma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_gamma_device(mconfig, SPECTRUM_GAMMA, tag, owner, clock) { } diff --git a/src/devices/bus/spectrum/beta.h b/src/devices/bus/spectrum/beta.h index 1827c741355..90837ac6d1b 100644 --- a/src/devices/bus/spectrum/beta.h +++ b/src/devices/bus/spectrum/beta.h @@ -28,8 +28,8 @@ class spectrum_betav2_device : { public: // construction/destruction - spectrum_betav2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spectrum_betav2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_betav2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spectrum_betav2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); @@ -75,8 +75,8 @@ class spectrum_betav3_device : { public: // construction/destruction - spectrum_betav3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spectrum_betav3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_betav3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spectrum_betav3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -91,8 +91,8 @@ class spectrum_betaplus_device : { public: // construction/destruction - spectrum_betaplus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spectrum_betaplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_betaplus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spectrum_betaplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(magic_button); @@ -107,8 +107,8 @@ class spectrum_betaclone_device : { public: // construction/destruction - spectrum_betaclone_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spectrum_betaclone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_betaclone_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spectrum_betaclone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t mreq_r(offs_t offset) override; @@ -121,8 +121,8 @@ class spectrum_betacbi_device : { public: // construction/destruction - spectrum_betacbi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spectrum_betacbi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_betacbi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spectrum_betacbi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -142,8 +142,8 @@ class spectrum_gamma_device : { public: // construction/destruction - spectrum_gamma_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spectrum_gamma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_gamma_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spectrum_gamma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_CUSTOM_INPUT_MEMBER(busy_r) { return !m_centronics_busy; } protected: diff --git a/src/devices/bus/spectrum/beta128.cpp b/src/devices/bus/spectrum/beta128.cpp index 09b95763a27..e79c6b72930 100644 --- a/src/devices/bus/spectrum/beta128.cpp +++ b/src/devices/bus/spectrum/beta128.cpp @@ -131,7 +131,7 @@ const tiny_rom_entry *spectrum_beta128_device::device_rom_region() const // spectrum_beta128_device - constructor //------------------------------------------------- -spectrum_beta128_device::spectrum_beta128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_beta128_device::spectrum_beta128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_BETA128, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/beta128.h b/src/devices/bus/spectrum/beta128.h index bcbc889c94d..fe4a58042e9 100644 --- a/src/devices/bus/spectrum/beta128.h +++ b/src/devices/bus/spectrum/beta128.h @@ -25,7 +25,7 @@ class spectrum_beta128_device : { public: // construction/destruction - spectrum_beta128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_beta128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); DECLARE_INPUT_CHANGED_MEMBER(magic_button); diff --git a/src/devices/bus/spectrum/d40.cpp b/src/devices/bus/spectrum/d40.cpp index 9a7811b7936..f7b95a56337 100644 --- a/src/devices/bus/spectrum/d40.cpp +++ b/src/devices/bus/spectrum/d40.cpp @@ -145,7 +145,7 @@ const tiny_rom_entry *spectrum_d80v2_device::device_rom_region() const // spectrum_d40base_device - constructor //------------------------------------------------- -spectrum_d40base_device::spectrum_d40base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_d40base_device::spectrum_d40base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -154,26 +154,26 @@ spectrum_d40base_device::spectrum_d40base_device(const machine_config &mconfig, { } -spectrum_d40_device::spectrum_d40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_d40_device::spectrum_d40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_d40base_device(mconfig, SPECTRUM_D40, tag, owner, clock) , m_fdc(*this, "fdc") , m_floppy(*this, "fdc:%u", 0) { } -spectrum_d40_device::spectrum_d40_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_d40_device::spectrum_d40_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) :spectrum_d40base_device(mconfig, type, tag, owner, clock) , m_fdc(*this, "fdc") , m_floppy(*this, "fdc:%u", 0) { } -spectrum_d80_device::spectrum_d80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_d80_device::spectrum_d80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_d40_device(mconfig, SPECTRUM_D80, tag, owner, clock) { } -spectrum_d80v2_device::spectrum_d80v2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_d80v2_device::spectrum_d80v2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_d40base_device(mconfig, SPECTRUM_D80V2, tag, owner, clock) , m_fdc(*this, "fdc") , m_floppy(*this, "fdc:%u", 0) diff --git a/src/devices/bus/spectrum/d40.h b/src/devices/bus/spectrum/d40.h index 250b2feccd8..ca1fd9161bf 100644 --- a/src/devices/bus/spectrum/d40.h +++ b/src/devices/bus/spectrum/d40.h @@ -29,7 +29,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(snapshot_button); protected: - spectrum_d40base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_d40base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -66,10 +66,10 @@ class spectrum_d40_device : public spectrum_d40base_device { public: - spectrum_d40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_d40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - spectrum_d40_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_d40_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; @@ -95,7 +95,7 @@ class spectrum_d80_device : public spectrum_d40_device { public: - spectrum_d80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_d80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -105,7 +105,7 @@ class spectrum_d80v2_device : public spectrum_d40base_device { public: - spectrum_d80v2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_d80v2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/spectrum/exp.cpp b/src/devices/bus/spectrum/exp.cpp index a0c79eeaec8..2359f555463 100644 --- a/src/devices/bus/spectrum/exp.cpp +++ b/src/devices/bus/spectrum/exp.cpp @@ -40,7 +40,7 @@ device_spectrum_expansion_interface::device_spectrum_expansion_interface(const m // spectrum_expansion_slot_device - constructor //------------------------------------------------- -spectrum_expansion_slot_device::spectrum_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spectrum_expansion_slot_device::spectrum_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/spectrum/exp.h b/src/devices/bus/spectrum/exp.h index 04e3e942889..86ba437c48f 100644 --- a/src/devices/bus/spectrum/exp.h +++ b/src/devices/bus/spectrum/exp.h @@ -71,7 +71,7 @@ public: set_fixed(false); } - spectrum_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + spectrum_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/bus/spectrum/floppyone.cpp b/src/devices/bus/spectrum/floppyone.cpp index 4291199501d..22ec40a2588 100644 --- a/src/devices/bus/spectrum/floppyone.cpp +++ b/src/devices/bus/spectrum/floppyone.cpp @@ -148,7 +148,7 @@ const tiny_rom_entry *spectrum_flpone_device::device_rom_region() const // spectrum_flpone_device - constructor //------------------------------------------------- -spectrum_flpone_device::spectrum_flpone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_flpone_device::spectrum_flpone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_FLPONE, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/floppyone.h b/src/devices/bus/spectrum/floppyone.h index 8eeea6bad0f..6916c2933d4 100644 --- a/src/devices/bus/spectrum/floppyone.h +++ b/src/devices/bus/spectrum/floppyone.h @@ -28,7 +28,7 @@ class spectrum_flpone_device : { public: // construction/destruction - spectrum_flpone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_flpone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); DECLARE_INPUT_CHANGED_MEMBER(snapshot_button) { m_slot->nmi_w(newval ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/devices/bus/spectrum/fuller.cpp b/src/devices/bus/spectrum/fuller.cpp index 0346a806171..95dd6cc83c7 100644 --- a/src/devices/bus/spectrum/fuller.cpp +++ b/src/devices/bus/spectrum/fuller.cpp @@ -66,7 +66,7 @@ void spectrum_fuller_device::device_add_mconfig(machine_config &config) // spectrum_fuller_device - constructor //------------------------------------------------- -spectrum_fuller_device::spectrum_fuller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_fuller_device::spectrum_fuller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_FULLER, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_exp(*this, "exp") diff --git a/src/devices/bus/spectrum/fuller.h b/src/devices/bus/spectrum/fuller.h index fa16ec01579..00239d1abce 100644 --- a/src/devices/bus/spectrum/fuller.h +++ b/src/devices/bus/spectrum/fuller.h @@ -27,7 +27,7 @@ class spectrum_fuller_device : { public: // construction/destruction - spectrum_fuller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_fuller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/intf1.cpp b/src/devices/bus/spectrum/intf1.cpp index df40de1f9d6..ee821c657ee 100644 --- a/src/devices/bus/spectrum/intf1.cpp +++ b/src/devices/bus/spectrum/intf1.cpp @@ -72,7 +72,7 @@ const tiny_rom_entry *spectrum_intf1_device::device_rom_region() const // spectrum_intf1_device - constructor //------------------------------------------------- -spectrum_intf1_device::spectrum_intf1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_intf1_device::spectrum_intf1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_INTF1, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_exp(*this, "exp") diff --git a/src/devices/bus/spectrum/intf1.h b/src/devices/bus/spectrum/intf1.h index 787c64b843d..5700e66d222 100644 --- a/src/devices/bus/spectrum/intf1.h +++ b/src/devices/bus/spectrum/intf1.h @@ -25,7 +25,7 @@ class spectrum_intf1_device: { public: // construction/destruction - spectrum_intf1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_intf1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK | feature::LAN; } diff --git a/src/devices/bus/spectrum/intf2.cpp b/src/devices/bus/spectrum/intf2.cpp index 5b407d88df3..f0f32a8c359 100644 --- a/src/devices/bus/spectrum/intf2.cpp +++ b/src/devices/bus/spectrum/intf2.cpp @@ -72,7 +72,7 @@ void spectrum_intf2_device::device_add_mconfig(machine_config &config) // spectrum_intf2_device - constructor //------------------------------------------------- -spectrum_intf2_device::spectrum_intf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_intf2_device::spectrum_intf2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_INTF2, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_cart(*this, "cartslot") diff --git a/src/devices/bus/spectrum/intf2.h b/src/devices/bus/spectrum/intf2.h index 4faecbae93a..5597f8d6ff1 100644 --- a/src/devices/bus/spectrum/intf2.h +++ b/src/devices/bus/spectrum/intf2.h @@ -25,7 +25,7 @@ class spectrum_intf2_device: { public: // construction/destruction - spectrum_intf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_intf2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/spectrum/kempdisc.cpp b/src/devices/bus/spectrum/kempdisc.cpp index 32573ebf969..96dd410e352 100644 --- a/src/devices/bus/spectrum/kempdisc.cpp +++ b/src/devices/bus/spectrum/kempdisc.cpp @@ -118,7 +118,7 @@ const tiny_rom_entry *spectrum_spdos_device::device_rom_region() const // spectrum_kempdisc_device - constructor //------------------------------------------------- -spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -129,12 +129,12 @@ spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig { } -spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_kempdisc_device::spectrum_kempdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_kempdisc_device(mconfig, SPECTRUM_KEMPDISC, tag, owner, clock) { } -spectrum_spdos_device::spectrum_spdos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_spdos_device::spectrum_spdos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_kempdisc_device(mconfig, SPECTRUM_SPDOS, tag, owner, clock) { } diff --git a/src/devices/bus/spectrum/kempdisc.h b/src/devices/bus/spectrum/kempdisc.h index 3a3b5118402..c8914264e59 100644 --- a/src/devices/bus/spectrum/kempdisc.h +++ b/src/devices/bus/spectrum/kempdisc.h @@ -25,12 +25,12 @@ class spectrum_kempdisc_device : { public: // construction/destruction - spectrum_kempdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_kempdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); protected: - spectrum_kempdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_kempdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; virtual void device_reset() override; @@ -65,7 +65,7 @@ class spectrum_spdos_device : { public: // construction/destruction - spectrum_spdos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_spdos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides diff --git a/src/devices/bus/spectrum/kempjoy.cpp b/src/devices/bus/spectrum/kempjoy.cpp index 4dee6eabba0..ef6d980254c 100644 --- a/src/devices/bus/spectrum/kempjoy.cpp +++ b/src/devices/bus/spectrum/kempjoy.cpp @@ -48,7 +48,7 @@ ioport_constructor spectrum_kempjoy_device::device_input_ports() const // spectrum_kempjoy_device - constructor //------------------------------------------------- -spectrum_kempjoy_device::spectrum_kempjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_kempjoy_device::spectrum_kempjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_KEMPJOY, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_joy(*this, "JOY") diff --git a/src/devices/bus/spectrum/kempjoy.h b/src/devices/bus/spectrum/kempjoy.h index 466dceb7517..35bff2c8775 100644 --- a/src/devices/bus/spectrum/kempjoy.h +++ b/src/devices/bus/spectrum/kempjoy.h @@ -26,7 +26,7 @@ class spectrum_kempjoy_device : { public: // construction/destruction - spectrum_kempjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_kempjoy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/logitek.cpp b/src/devices/bus/spectrum/logitek.cpp index 6406231ce47..8d75701439d 100644 --- a/src/devices/bus/spectrum/logitek.cpp +++ b/src/devices/bus/spectrum/logitek.cpp @@ -66,7 +66,7 @@ ROM_END void spectrum_proceed_device::device_add_mconfig(machine_config &config) { - Z80PIO(config, m_z80pio, 3500000); + Z80PIO(config, m_z80pio, XTAL::u(3500000)); m_z80pio->out_pa_callback().set(FUNC(spectrum_proceed_device::pioa_w)); m_z80pio->in_pb_callback().set(FUNC(spectrum_proceed_device::piob_r)); m_z80pio->out_pb_callback().set(FUNC(spectrum_proceed_device::piob_w)); @@ -92,7 +92,7 @@ const tiny_rom_entry *spectrum_proceed_device::device_rom_region() const // spectrum_proceed_device - constructor //------------------------------------------------- -spectrum_proceed_device::spectrum_proceed_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_proceed_device::spectrum_proceed_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_PROCEED, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/logitek.h b/src/devices/bus/spectrum/logitek.h index a6d807d7236..aa023f50eac 100644 --- a/src/devices/bus/spectrum/logitek.h +++ b/src/devices/bus/spectrum/logitek.h @@ -26,7 +26,7 @@ class spectrum_proceed_device : { public: // construction/destruction - spectrum_proceed_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_proceed_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/spectrum/lprint.cpp b/src/devices/bus/spectrum/lprint.cpp index 912c26d6c74..2a8b82e0736 100644 --- a/src/devices/bus/spectrum/lprint.cpp +++ b/src/devices/bus/spectrum/lprint.cpp @@ -142,7 +142,7 @@ const tiny_rom_entry *spectrum_kempcentreu_device::device_rom_region() const // spectrum_lprint_device - constructors //------------------------------------------------- -spectrum_lprint_device::spectrum_lprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_lprint_device::spectrum_lprint_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_LPRINT, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -150,7 +150,7 @@ spectrum_lprint_device::spectrum_lprint_device(const machine_config &mconfig, co { } -spectrum_lprint3_device::spectrum_lprint3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_lprint3_device::spectrum_lprint3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_LPRINT3, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -160,14 +160,14 @@ spectrum_lprint3_device::spectrum_lprint3_device(const machine_config &mconfig, { } -spectrum_kempcentrs_device::spectrum_kempcentrs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_kempcentrs_device::spectrum_kempcentrs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_KEMPCENTRS, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_centronics(*this, "centronics") { } -spectrum_kempcentre_device::spectrum_kempcentre_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_kempcentre_device::spectrum_kempcentre_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -175,12 +175,12 @@ spectrum_kempcentre_device::spectrum_kempcentre_device(const machine_config &mco { } -spectrum_kempcentre_device::spectrum_kempcentre_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_kempcentre_device::spectrum_kempcentre_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_kempcentre_device(mconfig, SPECTRUM_KEMPCENTREF, tag, owner, clock) { } -spectrum_kempcentreu_device::spectrum_kempcentreu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_kempcentreu_device::spectrum_kempcentreu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_kempcentre_device(mconfig, SPECTRUM_KEMPCENTREU, tag, owner, clock) { } diff --git a/src/devices/bus/spectrum/lprint.h b/src/devices/bus/spectrum/lprint.h index d58793607c6..a0ca51f2b0a 100644 --- a/src/devices/bus/spectrum/lprint.h +++ b/src/devices/bus/spectrum/lprint.h @@ -23,7 +23,7 @@ class spectrum_lprint_device : { public: // construction/destruction - spectrum_lprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_lprint_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -57,7 +57,7 @@ class spectrum_lprint3_device : { public: // construction/destruction - spectrum_lprint3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_lprint3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -98,7 +98,7 @@ class spectrum_kempcentrs_device : { public: // construction/destruction - spectrum_kempcentrs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_kempcentrs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -125,10 +125,10 @@ class spectrum_kempcentre_device : { public: // construction/destruction - spectrum_kempcentre_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_kempcentre_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - spectrum_kempcentre_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_kempcentre_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -160,7 +160,7 @@ class spectrum_kempcentreu_device : { public: // construction/destruction - spectrum_kempcentreu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_kempcentreu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/melodik.cpp b/src/devices/bus/spectrum/melodik.cpp index 0b77635c051..72c09910877 100644 --- a/src/devices/bus/spectrum/melodik.cpp +++ b/src/devices/bus/spectrum/melodik.cpp @@ -43,7 +43,7 @@ void spectrum_melodik_device::device_add_mconfig(machine_config &config) // spectrum_melodik_device - constructor //------------------------------------------------- -spectrum_melodik_device::spectrum_melodik_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_melodik_device::spectrum_melodik_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_MELODIK, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_exp(*this, "exp") diff --git a/src/devices/bus/spectrum/melodik.h b/src/devices/bus/spectrum/melodik.h index 6c0d4f6b3fd..5a41f9fe8ad 100644 --- a/src/devices/bus/spectrum/melodik.h +++ b/src/devices/bus/spectrum/melodik.h @@ -27,7 +27,7 @@ class spectrum_melodik_device : { public: // construction/destruction - spectrum_melodik_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_melodik_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/mface.cpp b/src/devices/bus/spectrum/mface.cpp index 693b3eb4fcf..9a2d04bff1c 100644 --- a/src/devices/bus/spectrum/mface.cpp +++ b/src/devices/bus/spectrum/mface.cpp @@ -354,7 +354,7 @@ const tiny_rom_entry *spectrum_mprint_device::device_rom_region() const // spectrum_mface_base_device - constructor //------------------------------------------------- -spectrum_mface_base_device::spectrum_mface_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface_base_device::spectrum_mface_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -362,64 +362,64 @@ spectrum_mface_base_device::spectrum_mface_base_device(const machine_config &mco { } -spectrum_mface1v2_device::spectrum_mface1v2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface1v2_device::spectrum_mface1v2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface_base_device(mconfig, type, tag, owner, clock) , m_joy(*this, "JOY") , m_hwconfig(*this, "CONFIG") { } -spectrum_mface1v2_device::spectrum_mface1v2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface1v2_device::spectrum_mface1v2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface1v2_device(mconfig, SPECTRUM_MFACE1V2, tag, owner, clock) { } -spectrum_mface1v1_device::spectrum_mface1v1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface1v1_device::spectrum_mface1v1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface1v2_device(mconfig, SPECTRUM_MFACE1V1, tag, owner, clock) { } -spectrum_mface1v3_device::spectrum_mface1v3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface1v3_device::spectrum_mface1v3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface1v2_device(mconfig, type, tag, owner, clock) { } -spectrum_mface1v3_device::spectrum_mface1v3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface1v3_device::spectrum_mface1v3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface1v3_device(mconfig, SPECTRUM_MFACE1V3, tag, owner, clock) { } -spectrum_mface1_device::spectrum_mface1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface1_device::spectrum_mface1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface1v3_device(mconfig, SPECTRUM_MFACE1, tag, owner, clock) { } -spectrum_mface128_base_device::spectrum_mface128_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface128_base_device::spectrum_mface128_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface_base_device(mconfig, type, tag, owner, clock) { } -spectrum_mface128v1_device::spectrum_mface128v1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface128v1_device::spectrum_mface128v1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface128_base_device(mconfig, type, tag, owner, clock) { } -spectrum_mface128v1_device::spectrum_mface128v1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface128v1_device::spectrum_mface128v1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface128v1_device(mconfig, SPECTRUM_MFACE128V1, tag, owner, clock) { } -spectrum_mface128_device::spectrum_mface128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface128_device::spectrum_mface128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface128v1_device(mconfig, SPECTRUM_MFACE128, tag, owner, clock) { } -spectrum_mface3_device::spectrum_mface3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mface3_device::spectrum_mface3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface128_base_device(mconfig, SPECTRUM_MFACE3, tag, owner, clock) { } -spectrum_mprint_device::spectrum_mprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mprint_device::spectrum_mprint_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_mface128_base_device(mconfig, SPECTRUM_MPRINT, tag, owner, clock) , m_centronics(*this, "centronics") { diff --git a/src/devices/bus/spectrum/mface.h b/src/devices/bus/spectrum/mface.h index 7b3fbf03e72..0f379119f17 100644 --- a/src/devices/bus/spectrum/mface.h +++ b/src/devices/bus/spectrum/mface.h @@ -21,12 +21,12 @@ class spectrum_mface_base_device : { public: // construction/destruction - spectrum_mface_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_INPUT_CHANGED_MEMBER(magic_button) { m_slot->nmi_w(newval ? CLEAR_LINE : ASSERT_LINE); } protected: - spectrum_mface_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -61,12 +61,12 @@ protected: class spectrum_mface1v2_device : public spectrum_mface_base_device { public: - spectrum_mface1v2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface1v2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(magic_button) override; protected: - spectrum_mface1v2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface1v2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -85,7 +85,7 @@ protected: class spectrum_mface1v1_device : public spectrum_mface1v2_device { public: - spectrum_mface1v1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface1v1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -101,10 +101,10 @@ protected: class spectrum_mface1v3_device : public spectrum_mface1v2_device { public: - spectrum_mface1v3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface1v3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - spectrum_mface1v3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface1v3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -116,7 +116,7 @@ protected: class spectrum_mface1_device : public spectrum_mface1v3_device { public: - spectrum_mface1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(magic_button) override; @@ -132,12 +132,12 @@ protected: class spectrum_mface128_base_device : public spectrum_mface_base_device { public: - spectrum_mface128_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface128_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(magic_button) override; protected: - spectrum_mface128_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface128_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -149,10 +149,10 @@ protected: class spectrum_mface128v1_device : public spectrum_mface128_base_device { public: - spectrum_mface128v1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface128v1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - spectrum_mface128v1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface128v1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -169,7 +169,7 @@ protected: class spectrum_mface128_device : public spectrum_mface128v1_device { public: - spectrum_mface128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -183,7 +183,7 @@ protected: class spectrum_mface3_device : public spectrum_mface128_base_device { public: - spectrum_mface3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mface3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(magic_button) override; @@ -207,7 +207,7 @@ private: class spectrum_mprint_device : public spectrum_mface128_base_device { public: - spectrum_mprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mprint_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/mgt.cpp b/src/devices/bus/spectrum/mgt.cpp index 581a748dcea..0f54be726cc 100644 --- a/src/devices/bus/spectrum/mgt.cpp +++ b/src/devices/bus/spectrum/mgt.cpp @@ -329,7 +329,7 @@ const tiny_rom_entry *spectrum_disciple_device::device_rom_region() const // spectrum_plusd_device - constructor //------------------------------------------------- -spectrum_plusd_device::spectrum_plusd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_plusd_device::spectrum_plusd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -340,7 +340,7 @@ spectrum_plusd_device::spectrum_plusd_device(const machine_config &mconfig, devi { } -spectrum_plusd_device::spectrum_plusd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_plusd_device::spectrum_plusd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_plusd_device(mconfig, SPECTRUM_PLUSD, tag, owner, clock) { } @@ -349,7 +349,7 @@ spectrum_plusd_device::spectrum_plusd_device(const machine_config &mconfig, cons // spectrum_disciple_device - constructor //------------------------------------------------- -spectrum_disciple_device::spectrum_disciple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_disciple_device::spectrum_disciple_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_plusd_device(mconfig, SPECTRUM_DISCIPLE, tag, owner, clock) , m_exp(*this, "exp") , m_joy1(*this, "JOY1") diff --git a/src/devices/bus/spectrum/mgt.h b/src/devices/bus/spectrum/mgt.h index 35d168b10ae..a58502a76a6 100644 --- a/src/devices/bus/spectrum/mgt.h +++ b/src/devices/bus/spectrum/mgt.h @@ -29,13 +29,13 @@ class spectrum_plusd_device: public device_t, public device_spectrum_expansion_i { public: // construction/destruction - spectrum_plusd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_plusd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); DECLARE_INPUT_CHANGED_MEMBER(snapshot_button); protected: - spectrum_plusd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_plusd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -69,7 +69,7 @@ class spectrum_disciple_device: public spectrum_plusd_device { public: // construction/destruction - spectrum_disciple_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_disciple_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(inhibit_button) { if (!newval) m_romcs = 0; } diff --git a/src/devices/bus/spectrum/mikroplus.cpp b/src/devices/bus/spectrum/mikroplus.cpp index 9f46bc1b7db..4b99263a312 100644 --- a/src/devices/bus/spectrum/mikroplus.cpp +++ b/src/devices/bus/spectrum/mikroplus.cpp @@ -67,7 +67,7 @@ const tiny_rom_entry *spectrum_mikroplus_device::device_rom_region() const // spectrum_mikroplus_device - constructor //------------------------------------------------- -spectrum_mikroplus_device::spectrum_mikroplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mikroplus_device::spectrum_mikroplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_MIKROPLUS, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/mikroplus.h b/src/devices/bus/spectrum/mikroplus.h index e06cb38bb2c..a66939af1fc 100644 --- a/src/devices/bus/spectrum/mikroplus.h +++ b/src/devices/bus/spectrum/mikroplus.h @@ -26,7 +26,7 @@ class spectrum_mikroplus_device : { public: // construction/destruction - spectrum_mikroplus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mikroplus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/mpoker.cpp b/src/devices/bus/spectrum/mpoker.cpp index c2d84d13c1b..40304099e4d 100644 --- a/src/devices/bus/spectrum/mpoker.cpp +++ b/src/devices/bus/spectrum/mpoker.cpp @@ -99,7 +99,7 @@ const tiny_rom_entry *spectrum_mpoker_device::device_rom_region() const // spectrum_mpoker_device - constructor //------------------------------------------------- -spectrum_mpoker_device::spectrum_mpoker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_mpoker_device::spectrum_mpoker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_MPOKER, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/mpoker.h b/src/devices/bus/spectrum/mpoker.h index 27f7cef19b0..b043f20349a 100644 --- a/src/devices/bus/spectrum/mpoker.h +++ b/src/devices/bus/spectrum/mpoker.h @@ -21,7 +21,7 @@ class spectrum_mpoker_device : public device_t, public device_spectrum_expansion { public: // construction/destruction - spectrum_mpoker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_mpoker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(freeze_button); diff --git a/src/devices/bus/spectrum/opus.cpp b/src/devices/bus/spectrum/opus.cpp index 37eff23bce6..d41050ef063 100644 --- a/src/devices/bus/spectrum/opus.cpp +++ b/src/devices/bus/spectrum/opus.cpp @@ -91,7 +91,7 @@ void spectrum_opus_device::device_add_mconfig(machine_config &config) m_centronics->busy_handler().set(FUNC(spectrum_opus_device::busy_w)); /* pia */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(spectrum_opus_device::pia_out_a)); m_pia->writepb_handler().set(FUNC(spectrum_opus_device::pia_out_b)); m_pia->cb2_handler().set("centronics", FUNC(centronics_device::write_strobe)); @@ -119,7 +119,7 @@ const tiny_rom_entry *spectrum_opus_device::device_rom_region() const // spectrum_opus_device - constructor //------------------------------------------------- -spectrum_opus_device::spectrum_opus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_opus_device::spectrum_opus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_OPUS, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_joy(*this, "JOY") diff --git a/src/devices/bus/spectrum/opus.h b/src/devices/bus/spectrum/opus.h index 2c175621820..a308e8c12bd 100644 --- a/src/devices/bus/spectrum/opus.h +++ b/src/devices/bus/spectrum/opus.h @@ -28,7 +28,7 @@ class spectrum_opus_device: { public: // construction/destruction - spectrum_opus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_opus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/spectrum/plus2test.cpp b/src/devices/bus/spectrum/plus2test.cpp index 3d90ed4dee3..a5b744f162d 100644 --- a/src/devices/bus/spectrum/plus2test.cpp +++ b/src/devices/bus/spectrum/plus2test.cpp @@ -42,7 +42,7 @@ const tiny_rom_entry *spectrum_plus2test_device::device_rom_region() const // spectrum_plus2test_device - constructor //------------------------------------------------- -spectrum_plus2test_device::spectrum_plus2test_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_plus2test_device::spectrum_plus2test_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_PLUS2TEST, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/plus2test.h b/src/devices/bus/spectrum/plus2test.h index f8caad2fa26..3d596a43674 100644 --- a/src/devices/bus/spectrum/plus2test.h +++ b/src/devices/bus/spectrum/plus2test.h @@ -26,7 +26,7 @@ class spectrum_plus2test_device : { public: // construction/destruction - spectrum_plus2test_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_plus2test_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/protek.cpp b/src/devices/bus/spectrum/protek.cpp index 6e21268682e..7b6a33ec1b2 100644 --- a/src/devices/bus/spectrum/protek.cpp +++ b/src/devices/bus/spectrum/protek.cpp @@ -50,7 +50,7 @@ ioport_constructor spectrum_protek_device::device_input_ports() const // spectrum_protek_device - constructor //------------------------------------------------- -spectrum_protek_device::spectrum_protek_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_protek_device::spectrum_protek_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_PROTEK, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_exp_line3(*this, "LINE3") diff --git a/src/devices/bus/spectrum/protek.h b/src/devices/bus/spectrum/protek.h index 9edd5a82f29..248c6ecf63e 100644 --- a/src/devices/bus/spectrum/protek.h +++ b/src/devices/bus/spectrum/protek.h @@ -26,7 +26,7 @@ class spectrum_protek_device : { public: // construction/destruction - spectrum_protek_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_protek_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/sdi.cpp b/src/devices/bus/spectrum/sdi.cpp index ab8becb80f8..356b9098cfd 100644 --- a/src/devices/bus/spectrum/sdi.cpp +++ b/src/devices/bus/spectrum/sdi.cpp @@ -66,7 +66,7 @@ const tiny_rom_entry *spectrum_sdi_device::device_rom_region() const // spectrum_sdi_device - constructor //------------------------------------------------- -spectrum_sdi_device::spectrum_sdi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_sdi_device::spectrum_sdi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_SDI, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/sdi.h b/src/devices/bus/spectrum/sdi.h index 619ec52f44f..1f2c26efe7d 100644 --- a/src/devices/bus/spectrum/sdi.h +++ b/src/devices/bus/spectrum/sdi.h @@ -24,7 +24,7 @@ class spectrum_sdi_device : { public: // construction/destruction - spectrum_sdi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_sdi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/spectrum/sixword.cpp b/src/devices/bus/spectrum/sixword.cpp index c85a9347dc9..247e93e9a4e 100644 --- a/src/devices/bus/spectrum/sixword.cpp +++ b/src/devices/bus/spectrum/sixword.cpp @@ -193,7 +193,7 @@ const tiny_rom_entry *spectrum_swiftdisc2_device::device_rom_region() const // spectrum_swiftdisc_device - constructor //------------------------------------------------- -spectrum_swiftdisc_device::spectrum_swiftdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spectrum_swiftdisc_device::spectrum_swiftdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") @@ -205,12 +205,12 @@ spectrum_swiftdisc_device::spectrum_swiftdisc_device(const machine_config &mconf { } -spectrum_swiftdisc_device::spectrum_swiftdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_swiftdisc_device::spectrum_swiftdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_swiftdisc_device(mconfig, SPECTRUM_SWIFTDISC, tag, owner, clock) { } -spectrum_swiftdisc2_device::spectrum_swiftdisc2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_swiftdisc2_device::spectrum_swiftdisc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spectrum_swiftdisc_device(mconfig, SPECTRUM_SWIFTDISC2, tag, owner, clock) , m_centronics(*this, "centronics") , m_conf(*this, "CONF") diff --git a/src/devices/bus/spectrum/sixword.h b/src/devices/bus/spectrum/sixword.h index c11108454f6..893c5aaab36 100644 --- a/src/devices/bus/spectrum/sixword.h +++ b/src/devices/bus/spectrum/sixword.h @@ -27,13 +27,13 @@ class spectrum_swiftdisc_device : { public: // construction/destruction - spectrum_swiftdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_swiftdisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); DECLARE_INPUT_CHANGED_MEMBER(nmi_button) { m_rombank |= newval << 12; m_slot->nmi_w(newval ? ASSERT_LINE : CLEAR_LINE); } protected: - spectrum_swiftdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spectrum_swiftdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -75,7 +75,7 @@ class spectrum_swiftdisc2_device : { public: // construction/destruction - spectrum_swiftdisc2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_swiftdisc2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/speccydos.cpp b/src/devices/bus/spectrum/speccydos.cpp index 1afbb52da26..b13ddcfe4d8 100644 --- a/src/devices/bus/spectrum/speccydos.cpp +++ b/src/devices/bus/spectrum/speccydos.cpp @@ -131,7 +131,7 @@ const tiny_rom_entry *spectrum_speccydos_device::device_rom_region() const // spectrum_speccydos_device - constructor //------------------------------------------------- -spectrum_speccydos_device::spectrum_speccydos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_speccydos_device::spectrum_speccydos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_SPECCYDOS, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/speccydos.h b/src/devices/bus/spectrum/speccydos.h index 3cdb29b7b38..19004176bc5 100644 --- a/src/devices/bus/spectrum/speccydos.h +++ b/src/devices/bus/spectrum/speccydos.h @@ -25,7 +25,7 @@ class spectrum_speccydos_device : { public: // construction/destruction - spectrum_speccydos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_speccydos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); DECLARE_INPUT_CHANGED_MEMBER(magic_button) { m_slot->nmi_w(newval ? ASSERT_LINE : CLEAR_LINE); } diff --git a/src/devices/bus/spectrum/specdrum.cpp b/src/devices/bus/spectrum/specdrum.cpp index 49764da5da5..221898db24c 100644 --- a/src/devices/bus/spectrum/specdrum.cpp +++ b/src/devices/bus/spectrum/specdrum.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(SPECTRUM_SPECDRUM, spectrum_specdrum_device, "spectrum_specdr void spectrum_specdrum_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "speaker").front_center(); - ZN428E(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + ZN428E(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); } @@ -37,7 +37,7 @@ void spectrum_specdrum_device::device_add_mconfig(machine_config &config) // spectrum_specdrum_device - constructor //------------------------------------------------- -spectrum_specdrum_device::spectrum_specdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_specdrum_device::spectrum_specdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_SPECDRUM, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_dac(*this, "dac") diff --git a/src/devices/bus/spectrum/specdrum.h b/src/devices/bus/spectrum/specdrum.h index 7412a8509c0..9d4e1992dc5 100644 --- a/src/devices/bus/spectrum/specdrum.h +++ b/src/devices/bus/spectrum/specdrum.h @@ -28,7 +28,7 @@ class spectrum_specdrum_device : { public: // construction/destruction - spectrum_specdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_specdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/specmate.cpp b/src/devices/bus/spectrum/specmate.cpp index 4177a74f814..95c7f0f786d 100644 --- a/src/devices/bus/spectrum/specmate.cpp +++ b/src/devices/bus/spectrum/specmate.cpp @@ -120,7 +120,7 @@ const tiny_rom_entry *spectrum_specmate_device::device_rom_region() const // spectrum_specmate_device - constructor //------------------------------------------------- -spectrum_specmate_device::spectrum_specmate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_specmate_device::spectrum_specmate_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_SPECMATE, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/specmate.h b/src/devices/bus/spectrum/specmate.h index cc361b49171..192918b3339 100644 --- a/src/devices/bus/spectrum/specmate.h +++ b/src/devices/bus/spectrum/specmate.h @@ -21,7 +21,7 @@ class spectrum_specmate_device : public device_t, public device_spectrum_expansi { public: // construction/destruction - spectrum_specmate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_specmate_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(freeze_button) { m_slot->nmi_w(newval ? CLEAR_LINE : ASSERT_LINE); } diff --git a/src/devices/bus/spectrum/uslot.cpp b/src/devices/bus/spectrum/uslot.cpp index eeef849a8fe..3b08cb3f222 100644 --- a/src/devices/bus/spectrum/uslot.cpp +++ b/src/devices/bus/spectrum/uslot.cpp @@ -40,7 +40,7 @@ void spectrum_uslot_device::device_add_mconfig(machine_config &config) // spectrum_uslot_device - constructor //------------------------------------------------- -spectrum_uslot_device::spectrum_uslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_uslot_device::spectrum_uslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_USLOT, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_exp1(*this, "exp1") diff --git a/src/devices/bus/spectrum/uslot.h b/src/devices/bus/spectrum/uslot.h index 0764d014147..119203c8d22 100644 --- a/src/devices/bus/spectrum/uslot.h +++ b/src/devices/bus/spectrum/uslot.h @@ -26,7 +26,7 @@ class spectrum_uslot_device : { public: // construction/destruction - spectrum_uslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_uslot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/usource.cpp b/src/devices/bus/spectrum/usource.cpp index 3c368297fef..37e263f858d 100644 --- a/src/devices/bus/spectrum/usource.cpp +++ b/src/devices/bus/spectrum/usource.cpp @@ -46,7 +46,7 @@ const tiny_rom_entry *spectrum_usource_device::device_rom_region() const // spectrum_usource_device - constructor //------------------------------------------------- -spectrum_usource_device::spectrum_usource_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spectrum_usource_device::spectrum_usource_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_USOURCE, tag, owner, clock), device_spectrum_expansion_interface(mconfig, *this), m_rom(*this, "rom") diff --git a/src/devices/bus/spectrum/usource.h b/src/devices/bus/spectrum/usource.h index 1f0d7d44e58..092a4bcc2a5 100644 --- a/src/devices/bus/spectrum/usource.h +++ b/src/devices/bus/spectrum/usource.h @@ -28,7 +28,7 @@ class spectrum_usource_device : { public: // construction/destruction - spectrum_usource_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_usource_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/uspeech.cpp b/src/devices/bus/spectrum/uspeech.cpp index 06e48dca0fd..0261570d1af 100644 --- a/src/devices/bus/spectrum/uspeech.cpp +++ b/src/devices/bus/spectrum/uspeech.cpp @@ -61,7 +61,7 @@ void spectrum_uspeech_device::device_add_mconfig(machine_config &config) // spectrum_uspeech_device - constructor //------------------------------------------------- -spectrum_uspeech_device::spectrum_uspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spectrum_uspeech_device::spectrum_uspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_USPEECH, tag, owner, clock), device_spectrum_expansion_interface(mconfig, *this), m_nsp(*this, "sp0256"), @@ -151,12 +151,12 @@ void spectrum_uspeech_device::mreq_w(offs_t offset, uint8_t data) case 0x3000: // intonation low - m_nsp->set_clock(3050000); // oscillator frequency read from hardware + m_nsp->set_clock(XTAL::u(3050000)); // oscillator frequency read from hardware break; case 0x3001: // intonation high - m_nsp->set_clock(3260000); // oscillator frequency read from hardware + m_nsp->set_clock(XTAL::u(3260000)); // oscillator frequency read from hardware break; } } diff --git a/src/devices/bus/spectrum/uspeech.h b/src/devices/bus/spectrum/uspeech.h index 078e33599af..8a9946e6156 100644 --- a/src/devices/bus/spectrum/uspeech.h +++ b/src/devices/bus/spectrum/uspeech.h @@ -29,7 +29,7 @@ class spectrum_uspeech_device : { public: // construction/destruction - spectrum_uspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_uspeech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/spectrum/wafa.cpp b/src/devices/bus/spectrum/wafa.cpp index c5af195289c..ced9ac85ac0 100644 --- a/src/devices/bus/spectrum/wafa.cpp +++ b/src/devices/bus/spectrum/wafa.cpp @@ -71,7 +71,7 @@ const tiny_rom_entry *spectrum_wafa_device::device_rom_region() const // spectrum_wafa_device - constructor //------------------------------------------------- -spectrum_wafa_device::spectrum_wafa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spectrum_wafa_device::spectrum_wafa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECTRUM_WAFA, tag, owner, clock) , device_spectrum_expansion_interface(mconfig, *this) , m_exp(*this, "exp") diff --git a/src/devices/bus/spectrum/wafa.h b/src/devices/bus/spectrum/wafa.h index 6ca1f4d256a..3797a3ca667 100644 --- a/src/devices/bus/spectrum/wafa.h +++ b/src/devices/bus/spectrum/wafa.h @@ -27,7 +27,7 @@ class spectrum_wafa_device: { public: // construction/destruction - spectrum_wafa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spectrum_wafa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK | feature::LAN; } diff --git a/src/devices/bus/ss50/dc5.cpp b/src/devices/bus/ss50/dc5.cpp index d3c105bc2a8..16c574ca3b7 100644 --- a/src/devices/bus/ss50/dc5.cpp +++ b/src/devices/bus/ss50/dc5.cpp @@ -40,7 +40,7 @@ class ss50_dc5_device : public device_t, public ss50_card_interface { public: - ss50_dc5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + ss50_dc5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SS50_DC5, tag, owner, clock) , ss50_card_interface(mconfig, *this) , m_fdc(*this, "fdc") @@ -786,7 +786,7 @@ void ss50_dc5_device::register_write(offs_t offset, uint8_t data) uint32_t expected_clock_div = m_expected_clock->read(); if (expected_clock_div && clock_div != expected_clock_div) { - logerror("%s Unexpected clock rate of %dHz expected %dHz.\n", machine().describe_context(), 12'000'000 / clock_div, 12'000'000 / expected_clock_div); + logerror("%s Unexpected clock rate of %dHz expected %dHz.\n", machine().describe_context(), XTAL::u(12'000'000) / clock_div, 12'000'000 / expected_clock_div); clock_div = expected_clock_div; } diff --git a/src/devices/bus/ss50/interface.cpp b/src/devices/bus/ss50/interface.cpp index a3100585a76..123bdeb32c2 100644 --- a/src/devices/bus/ss50/interface.cpp +++ b/src/devices/bus/ss50/interface.cpp @@ -103,7 +103,7 @@ DEFINE_DEVICE_TYPE(SS50_INTERFACE, ss50_interface_port_device, "ss50_interface", // ss50_interface_port_device - construction //------------------------------------------------- -ss50_interface_port_device::ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ss50_interface_port_device::ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SS50_INTERFACE, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_irq_cb(*this), diff --git a/src/devices/bus/ss50/interface.h b/src/devices/bus/ss50/interface.h index 28e8f82c8c9..79e209f51cc 100644 --- a/src/devices/bus/ss50/interface.h +++ b/src/devices/bus/ss50/interface.h @@ -29,7 +29,7 @@ public: // construction/destruction template ss50_interface_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : ss50_interface_port_device(mconfig, tag, owner, 0) + : ss50_interface_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -37,7 +37,7 @@ public: set_fixed(false); } - ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ss50_interface_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // static configuration auto irq_cb() { return m_irq_cb.bind(); } diff --git a/src/devices/bus/ss50/mpc.cpp b/src/devices/bus/ss50/mpc.cpp index 99c476684b3..dbea6e692b4 100644 --- a/src/devices/bus/ss50/mpc.cpp +++ b/src/devices/bus/ss50/mpc.cpp @@ -24,7 +24,7 @@ class ss50_mpc_device : public device_t, public ss50_card_interface { public: // construction/destruction - ss50_mpc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + ss50_mpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SS50_MPC, tag, owner, clock) , ss50_card_interface(mconfig, *this) , m_pia(*this, "pia") @@ -101,7 +101,7 @@ DEVICE_INPUT_DEFAULTS_END void ss50_mpc_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); // actually MC6820 + PIA6821(config, m_pia); // actually MC6820 m_pia->writepa_handler().set("outgate", FUNC(input_merger_device::in_w<0>)).bit(0); m_pia->cb2_handler().set(FUNC(ss50_mpc_device::reader_control_w)); m_pia->readpb_handler().set_ioport("STOP").mask(0x01).lshift(6); diff --git a/src/devices/bus/ss50/mps.cpp b/src/devices/bus/ss50/mps.cpp index b79d1dddbc0..3220ae97ec6 100644 --- a/src/devices/bus/ss50/mps.cpp +++ b/src/devices/bus/ss50/mps.cpp @@ -22,7 +22,7 @@ class ss50_mps_device : public device_t, public ss50_card_interface { public: // construction/destruction - ss50_mps_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + ss50_mps_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SS50_MPS, tag, owner, clock) , ss50_card_interface(mconfig, *this) , m_acia(*this, "acia") @@ -109,7 +109,7 @@ DEVICE_INPUT_DEFAULTS_END void ss50_mps_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); //m_acia->rts_handler().set(FUNC(ss50_mps_device::reader_control_w)); m_acia->irq_handler().set(FUNC(ss50_mps_device::acia_irq_w)); diff --git a/src/devices/bus/ss50/mps2.cpp b/src/devices/bus/ss50/mps2.cpp index f0d9350bfb8..28bce3c6b4c 100644 --- a/src/devices/bus/ss50/mps2.cpp +++ b/src/devices/bus/ss50/mps2.cpp @@ -24,7 +24,7 @@ class ss50_mps2_device : public device_t, public ss50_card_interface { public: // construction/destruction - ss50_mps2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + ss50_mps2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SS50_MPS2, tag, owner, clock) , ss50_card_interface(mconfig, *this) , m_acia_upper(*this, "acia_upper") @@ -130,7 +130,7 @@ DEVICE_INPUT_DEFAULTS_END void ss50_mps2_device::device_add_mconfig(machine_config &config) { - ACIA6850(config, m_acia_upper, 0); + ACIA6850(config, m_acia_upper); m_acia_upper->txd_handler().set("rs232_upper", FUNC(rs232_port_device::write_txd)); m_acia_upper->rts_handler().set("rs232_upper", FUNC(rs232_port_device::write_rts)); m_acia_upper->irq_handler().set("irq", FUNC(input_merger_device::in_w<0>)); @@ -141,7 +141,7 @@ void ss50_mps2_device::device_add_mconfig(machine_config &config) rs232_upper.dcd_handler().set(m_acia_upper, FUNC(acia6850_device::write_dcd)); rs232_upper.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal_upper)); - ACIA6850(config, m_acia_lower, 0); + ACIA6850(config, m_acia_lower); m_acia_lower->txd_handler().set("rs232_lower", FUNC(rs232_port_device::write_txd)); m_acia_lower->rts_handler().set("rs232_lower", FUNC(rs232_port_device::write_rts)); m_acia_lower->irq_handler().set("irq", FUNC(input_merger_device::in_w<1>)); diff --git a/src/devices/bus/ss50/mpt.cpp b/src/devices/bus/ss50/mpt.cpp index f9078aee4ac..3513856336e 100644 --- a/src/devices/bus/ss50/mpt.cpp +++ b/src/devices/bus/ss50/mpt.cpp @@ -17,7 +17,7 @@ class ss50_mpt_device : public device_t, public ss50_card_interface { public: - ss50_mpt_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + ss50_mpt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SS50_MPT, tag, owner, clock) , ss50_card_interface(mconfig, *this) , m_pia(*this, "pia") @@ -80,7 +80,7 @@ ioport_constructor ss50_mpt_device::device_input_ports() const void ss50_mpt_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepb_handler().set(FUNC(ss50_mpt_device::pia_b_w)); m_pia->cb1_w(0); m_pia->irqa_handler().set(FUNC(ss50_mpt_device::pia_irqa_w)); diff --git a/src/devices/bus/ss50/piaide.cpp b/src/devices/bus/ss50/piaide.cpp index a8ac76efdf6..b7e62c8dd97 100644 --- a/src/devices/bus/ss50/piaide.cpp +++ b/src/devices/bus/ss50/piaide.cpp @@ -49,7 +49,7 @@ class ss50_piaide_device : public device_t, public ss50_card_interface { public: // construction/destruction - ss50_piaide_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + ss50_piaide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SS50_PIAIDE, tag, owner, clock) , ss50_card_interface(mconfig, *this) , m_pia(*this, "pia") @@ -93,7 +93,7 @@ void ss50_piaide_device::device_start() void ss50_piaide_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(ss50_piaide_device::pia_a_r)); m_pia->readpb_handler().set(FUNC(ss50_piaide_device::pia_b_r)); m_pia->writepa_handler().set(FUNC(ss50_piaide_device::pia_a_w)); diff --git a/src/devices/bus/sunkbd/sunkbd.h b/src/devices/bus/sunkbd/sunkbd.h index 8a210025912..f38f9c10ffa 100644 --- a/src/devices/bus/sunkbd/sunkbd.h +++ b/src/devices/bus/sunkbd/sunkbd.h @@ -18,14 +18,14 @@ class sun_keyboard_port_device : public device_t, public device_single_card_slot public: template sun_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : sun_keyboard_port_device(mconfig, tag, owner, 0) + : sun_keyboard_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sun_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + sun_keyboard_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~sun_keyboard_port_device(); // configuration helpers @@ -36,7 +36,7 @@ public: DECLARE_READ_LINE_MEMBER( rxd_r ) { return m_rxd; } protected: - sun_keyboard_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + sun_keyboard_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); virtual void device_config_complete() override; virtual void device_resolve_objects() override; diff --git a/src/devices/bus/sunmouse/sunmouse.h b/src/devices/bus/sunmouse/sunmouse.h index e665529bdfe..1de841a01bb 100644 --- a/src/devices/bus/sunmouse/sunmouse.h +++ b/src/devices/bus/sunmouse/sunmouse.h @@ -18,14 +18,14 @@ class sun_mouse_port_device : public device_t, public device_single_card_slot_in public: template sun_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : sun_mouse_port_device(mconfig, tag, owner, 0) + : sun_mouse_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - sun_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + sun_mouse_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~sun_mouse_port_device(); // configuration helpers @@ -36,7 +36,7 @@ public: DECLARE_READ_LINE_MEMBER( rxd_r ) { return m_rxd; } protected: - sun_mouse_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + sun_mouse_port_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); virtual void device_config_complete() override; virtual void device_resolve_objects() override; diff --git a/src/devices/bus/svi3x8/expander/expander.cpp b/src/devices/bus/svi3x8/expander/expander.cpp index ea1fab43f93..7fadb19858e 100644 --- a/src/devices/bus/svi3x8/expander/expander.cpp +++ b/src/devices/bus/svi3x8/expander/expander.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SVI_EXPANDER, svi_expander_device, "svi_expander", "SVI 318/3 // svi_expander_device - constructor //------------------------------------------------- -svi_expander_device::svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +svi_expander_device::svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SVI_EXPANDER, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_module(nullptr), diff --git a/src/devices/bus/svi3x8/expander/expander.h b/src/devices/bus/svi3x8/expander/expander.h index f7bba16eba3..36c1a9bac3f 100644 --- a/src/devices/bus/svi3x8/expander/expander.h +++ b/src/devices/bus/svi3x8/expander/expander.h @@ -54,7 +54,7 @@ public: // construction/destruction template svi_expander_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts) - : svi_expander_device(mconfig, tag, owner, uint32_t(0)) + : svi_expander_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -62,7 +62,7 @@ public: set_fixed(false); } - svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + svi_expander_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~svi_expander_device(); // callbacks diff --git a/src/devices/bus/svi3x8/expander/sv601.cpp b/src/devices/bus/svi3x8/expander/sv601.cpp index 662f3cb0c2e..9a200c27cc6 100644 --- a/src/devices/bus/svi3x8/expander/sv601.cpp +++ b/src/devices/bus/svi3x8/expander/sv601.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(SV601, sv601_device, "sv601", "SV-601 Super Expander") void sv601_device::device_add_mconfig(machine_config &config) { - SVI_SLOT_BUS(config, m_slotbus, 0); + SVI_SLOT_BUS(config, m_slotbus); m_slotbus->int_handler().set(FUNC(sv601_device::int_w)); m_slotbus->romdis_handler().set(FUNC(sv601_device::romdis_w)); m_slotbus->ramdis_handler().set(FUNC(sv601_device::ramdis_w)); @@ -44,7 +44,7 @@ void sv601_device::device_add_mconfig(machine_config &config) // sv601_device - constructor //------------------------------------------------- -sv601_device::sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv601_device::sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV601, tag, owner, clock), device_svi_expander_interface(mconfig, *this), m_slotbus(*this, "slotbus") diff --git a/src/devices/bus/svi3x8/expander/sv601.h b/src/devices/bus/svi3x8/expander/sv601.h index 692191a7ea9..7b83ebfecc1 100644 --- a/src/devices/bus/svi3x8/expander/sv601.h +++ b/src/devices/bus/svi3x8/expander/sv601.h @@ -25,7 +25,7 @@ class sv601_device : public device_t, public device_svi_expander_interface { public: // construction/destruction - sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from slots WRITE_LINE_MEMBER( int_w ); diff --git a/src/devices/bus/svi3x8/expander/sv602.cpp b/src/devices/bus/svi3x8/expander/sv602.cpp index 1f5d0c0d352..8d68ff4780f 100644 --- a/src/devices/bus/svi3x8/expander/sv602.cpp +++ b/src/devices/bus/svi3x8/expander/sv602.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(SV602, sv602_device, "sv602", "SV-602 Single Slot Expander") void sv602_device::device_add_mconfig(machine_config &config) { - SVI_SLOT_BUS(config, m_slotbus, 0); + SVI_SLOT_BUS(config, m_slotbus); m_slotbus->int_handler().set(FUNC(sv602_device::int_w)); m_slotbus->romdis_handler().set(FUNC(sv602_device::romdis_w)); m_slotbus->ramdis_handler().set(FUNC(sv602_device::ramdis_w)); @@ -38,7 +38,7 @@ void sv602_device::device_add_mconfig(machine_config &config) // sv602_device - constructor //------------------------------------------------- -sv602_device::sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv602_device::sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV602, tag, owner, clock), device_svi_expander_interface(mconfig, *this), m_slotbus(*this, "slotbus") diff --git a/src/devices/bus/svi3x8/expander/sv602.h b/src/devices/bus/svi3x8/expander/sv602.h index 607d1cf6c17..3a1fd9a1e67 100644 --- a/src/devices/bus/svi3x8/expander/sv602.h +++ b/src/devices/bus/svi3x8/expander/sv602.h @@ -25,7 +25,7 @@ class sv602_device : public device_t, public device_svi_expander_interface { public: // construction/destruction - sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t mreq_r(offs_t offset) override; diff --git a/src/devices/bus/svi3x8/expander/sv603.cpp b/src/devices/bus/svi3x8/expander/sv603.cpp index fb0fd3428f9..7d9f56a9236 100644 --- a/src/devices/bus/svi3x8/expander/sv603.cpp +++ b/src/devices/bus/svi3x8/expander/sv603.cpp @@ -61,7 +61,7 @@ void sv603_device::device_add_mconfig(machine_config &config) // sv603_device - constructor //------------------------------------------------- -sv603_device::sv603_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv603_device::sv603_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV603, tag, owner, clock), device_svi_expander_interface(mconfig, *this), m_bios(*this, "bios"), diff --git a/src/devices/bus/svi3x8/expander/sv603.h b/src/devices/bus/svi3x8/expander/sv603.h index a6b3fde21b8..5dc9a3e8e55 100644 --- a/src/devices/bus/svi3x8/expander/sv603.h +++ b/src/devices/bus/svi3x8/expander/sv603.h @@ -27,7 +27,7 @@ class sv603_device : public device_t, public device_svi_expander_interface { public: // construction/destruction - sv603_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv603_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t mreq_r(offs_t offset) override; diff --git a/src/devices/bus/svi3x8/slot/slot.cpp b/src/devices/bus/svi3x8/slot/slot.cpp index 705734dea4c..3de46842122 100644 --- a/src/devices/bus/svi3x8/slot/slot.cpp +++ b/src/devices/bus/svi3x8/slot/slot.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(SVI_SLOT_BUS, svi_slot_bus_device, "svislotbus", "SVI Slot Bu // svi_slot_bus_device - constructor //------------------------------------------------- -svi_slot_bus_device::svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +svi_slot_bus_device::svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SVI_SLOT_BUS, tag, owner, clock) , m_int_handler(*this) , m_romdis_handler(*this) @@ -196,7 +196,7 @@ DEFINE_DEVICE_TYPE(SVI_SLOT, svi_slot_device, "svislot", "SVI Slot") // svi_slot_device - constructor //------------------------------------------------- -svi_slot_device::svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +svi_slot_device::svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SVI_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_bus(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/bus/svi3x8/slot/slot.h b/src/devices/bus/svi3x8/slot/slot.h index 11b94d07e5d..854c89739ee 100644 --- a/src/devices/bus/svi3x8/slot/slot.h +++ b/src/devices/bus/svi3x8/slot/slot.h @@ -53,7 +53,7 @@ class svi_slot_bus_device : public device_t { public: // construction/destruction - svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + svi_slot_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~svi_slot_bus_device(); // callbacks @@ -101,7 +101,7 @@ public: // construction/destruction template svi_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus, U &&opts, char const *dflt) - : svi_slot_device(mconfig, tag, owner, 0) + : svi_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -110,7 +110,7 @@ public: set_bus(std::forward(bus)); } - svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + svi_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_bus(T &&tag) { m_bus.set_tag(std::forward(tag)); } diff --git a/src/devices/bus/svi3x8/slot/sv801.cpp b/src/devices/bus/svi3x8/slot/sv801.cpp index 5695cfd5957..1433773b93c 100644 --- a/src/devices/bus/svi3x8/slot/sv801.cpp +++ b/src/devices/bus/svi3x8/slot/sv801.cpp @@ -54,7 +54,7 @@ void sv801_device::device_add_mconfig(machine_config &config) // sv801_device - constructor //------------------------------------------------- -sv801_device::sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv801_device::sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV801, tag, owner, clock), device_svi_slot_interface(mconfig, *this), m_fdc(*this, "fdc"), diff --git a/src/devices/bus/svi3x8/slot/sv801.h b/src/devices/bus/svi3x8/slot/sv801.h index 5651e519fb7..8d594b66d14 100644 --- a/src/devices/bus/svi3x8/slot/sv801.h +++ b/src/devices/bus/svi3x8/slot/sv801.h @@ -26,7 +26,7 @@ class sv801_device : public device_t, public device_svi_slot_interface { public: // construction/destruction - sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t iorq_r(offs_t offset) override; virtual void iorq_w(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/svi3x8/slot/sv802.cpp b/src/devices/bus/svi3x8/slot/sv802.cpp index 909ed2fa712..7aa33750963 100644 --- a/src/devices/bus/svi3x8/slot/sv802.cpp +++ b/src/devices/bus/svi3x8/slot/sv802.cpp @@ -38,7 +38,7 @@ void sv802_device::device_add_mconfig(machine_config &config) // sv802_device - constructor //------------------------------------------------- -sv802_device::sv802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv802_device::sv802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV802, tag, owner, clock), device_svi_slot_interface(mconfig, *this), m_centronics(*this, "centronics"), diff --git a/src/devices/bus/svi3x8/slot/sv802.h b/src/devices/bus/svi3x8/slot/sv802.h index aabea33bbaf..06fb433245d 100644 --- a/src/devices/bus/svi3x8/slot/sv802.h +++ b/src/devices/bus/svi3x8/slot/sv802.h @@ -26,7 +26,7 @@ class sv802_device : public device_t, public device_svi_slot_interface { public: // construction/destruction - sv802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t iorq_r(offs_t offset) override; virtual void iorq_w(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/svi3x8/slot/sv803.cpp b/src/devices/bus/svi3x8/slot/sv803.cpp index 6adc07fd193..af094eb68c5 100644 --- a/src/devices/bus/svi3x8/slot/sv803.cpp +++ b/src/devices/bus/svi3x8/slot/sv803.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(SV803, sv803_device, "sv803", "SV-803 16k RAM Cartridge") // sv803_device - constructor //------------------------------------------------- -sv803_device::sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv803_device::sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV803, tag, owner, clock), device_svi_slot_interface(mconfig, *this) { diff --git a/src/devices/bus/svi3x8/slot/sv803.h b/src/devices/bus/svi3x8/slot/sv803.h index 8cae18acf64..cb6359d0ac2 100644 --- a/src/devices/bus/svi3x8/slot/sv803.h +++ b/src/devices/bus/svi3x8/slot/sv803.h @@ -24,7 +24,7 @@ class sv803_device : public device_t, public device_svi_slot_interface { public: // construction/destruction - sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t mreq_r(offs_t offset) override; virtual void mreq_w(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/svi3x8/slot/sv805.cpp b/src/devices/bus/svi3x8/slot/sv805.cpp index a5ceadf3577..1f4f9324617 100644 --- a/src/devices/bus/svi3x8/slot/sv805.cpp +++ b/src/devices/bus/svi3x8/slot/sv805.cpp @@ -44,7 +44,7 @@ void sv805_device::device_add_mconfig(machine_config &config) // sv805_device - constructor //------------------------------------------------- -sv805_device::sv805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv805_device::sv805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV805, tag, owner, clock), device_svi_slot_interface(mconfig, *this), m_uart(*this, "uart"), diff --git a/src/devices/bus/svi3x8/slot/sv805.h b/src/devices/bus/svi3x8/slot/sv805.h index 892dc23b432..3e43a4eb9dc 100644 --- a/src/devices/bus/svi3x8/slot/sv805.h +++ b/src/devices/bus/svi3x8/slot/sv805.h @@ -26,7 +26,7 @@ class sv805_device : public device_t, public device_svi_slot_interface { public: // construction/destruction - sv805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t iorq_r(offs_t offset) override; virtual void iorq_w(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/svi3x8/slot/sv806.cpp b/src/devices/bus/svi3x8/slot/sv806.cpp index 5a7d858d38b..34d05a75746 100644 --- a/src/devices/bus/svi3x8/slot/sv806.cpp +++ b/src/devices/bus/svi3x8/slot/sv806.cpp @@ -64,7 +64,7 @@ void sv806_device::device_add_mconfig(machine_config &config) // sv806_device - constructor //------------------------------------------------- -sv806_device::sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv806_device::sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV806, tag, owner, clock), device_svi_slot_interface(mconfig, *this), m_crtc(*this, "crtc"), diff --git a/src/devices/bus/svi3x8/slot/sv806.h b/src/devices/bus/svi3x8/slot/sv806.h index 095e8291acc..3b70ff36796 100644 --- a/src/devices/bus/svi3x8/slot/sv806.h +++ b/src/devices/bus/svi3x8/slot/sv806.h @@ -26,7 +26,7 @@ class sv806_device : public device_t, public device_svi_slot_interface { public: // construction/destruction - sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t mreq_r(offs_t offset) override; virtual void mreq_w(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/svi3x8/slot/sv807.cpp b/src/devices/bus/svi3x8/slot/sv807.cpp index 281b7845c64..c223495bea7 100644 --- a/src/devices/bus/svi3x8/slot/sv807.cpp +++ b/src/devices/bus/svi3x8/slot/sv807.cpp @@ -76,7 +76,7 @@ ioport_constructor sv807_device::device_input_ports() const // sv807_device - constructor //------------------------------------------------- -sv807_device::sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sv807_device::sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SV807, tag, owner, clock), device_svi_slot_interface(mconfig, *this), m_switch(*this, "S"), diff --git a/src/devices/bus/svi3x8/slot/sv807.h b/src/devices/bus/svi3x8/slot/sv807.h index 8d12befff79..a373cea15f2 100644 --- a/src/devices/bus/svi3x8/slot/sv807.h +++ b/src/devices/bus/svi3x8/slot/sv807.h @@ -24,7 +24,7 @@ class sv807_device : public device_t, public device_svi_slot_interface { public: // construction/destruction - sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sv807_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/tanbus/bullsnd.cpp b/src/devices/bus/tanbus/bullsnd.cpp index 3dcd7a9897b..937113f2a65 100644 --- a/src/devices/bus/tanbus/bullsnd.cpp +++ b/src/devices/bus/tanbus/bullsnd.cpp @@ -40,7 +40,7 @@ void tanbus_bullsnd_device::device_add_mconfig(machine_config &config) // tanbus_bullsnd_device - constructor //------------------------------------------------- -tanbus_bullsnd_device::tanbus_bullsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_bullsnd_device::tanbus_bullsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_BULLSND, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_ay8910(*this, "ay8910%u", 0) diff --git a/src/devices/bus/tanbus/bullsnd.h b/src/devices/bus/tanbus/bullsnd.h index 1573eab6351..5a645b88fa0 100644 --- a/src/devices/bus/tanbus/bullsnd.h +++ b/src/devices/bus/tanbus/bullsnd.h @@ -25,7 +25,7 @@ class tanbus_bullsnd_device : { public: // construction/destruction - tanbus_bullsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_bullsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/mpvdu.cpp b/src/devices/bus/tanbus/mpvdu.cpp index 43c303dff4b..dbd015f87b3 100644 --- a/src/devices/bus/tanbus/mpvdu.cpp +++ b/src/devices/bus/tanbus/mpvdu.cpp @@ -57,7 +57,7 @@ void tanbus_mpvdu_device::device_add_mconfig(machine_config &config) // tanbus_mpvdu_device - constructor //------------------------------------------------- -tanbus_mpvdu_device::tanbus_mpvdu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_mpvdu_device::tanbus_mpvdu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_MPVDU, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_screen(*this, "screen") diff --git a/src/devices/bus/tanbus/mpvdu.h b/src/devices/bus/tanbus/mpvdu.h index ddde01e0611..141159aa59f 100644 --- a/src/devices/bus/tanbus/mpvdu.h +++ b/src/devices/bus/tanbus/mpvdu.h @@ -29,7 +29,7 @@ public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - tanbus_mpvdu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_mpvdu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/ra32k.cpp b/src/devices/bus/tanbus/ra32k.cpp index 9b83afc96f0..1d3aee47fe7 100644 --- a/src/devices/bus/tanbus/ra32k.cpp +++ b/src/devices/bus/tanbus/ra32k.cpp @@ -138,7 +138,7 @@ const tiny_rom_entry *tanbus_ra32k_device::device_rom_region() const // tanbus_ra32k_device - constructor //------------------------------------------------- -tanbus_ra32k_device::tanbus_ra32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_ra32k_device::tanbus_ra32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_RA32K, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_rom(*this, "rom") diff --git a/src/devices/bus/tanbus/ra32k.h b/src/devices/bus/tanbus/ra32k.h index a67e9c859bb..7e16bd9152f 100644 --- a/src/devices/bus/tanbus/ra32k.h +++ b/src/devices/bus/tanbus/ra32k.h @@ -25,7 +25,7 @@ class tanbus_ra32k_device : { public: // construction/destruction - tanbus_ra32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_ra32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/radisc.cpp b/src/devices/bus/tanbus/radisc.cpp index b302e33c80d..f612a4c6ca4 100644 --- a/src/devices/bus/tanbus/radisc.cpp +++ b/src/devices/bus/tanbus/radisc.cpp @@ -58,7 +58,7 @@ void tanbus_radisc_device::device_add_mconfig(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1000); // TODO: unknown frequency + BEEP(config, m_beeper, XTAL::u(1000)); // TODO: unknown frequency m_beeper->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -70,7 +70,7 @@ void tanbus_radisc_device::device_add_mconfig(machine_config &config) // tanbus_radisc_device - constructor //------------------------------------------------- -tanbus_radisc_device::tanbus_radisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_radisc_device::tanbus_radisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_RADISC, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_fdc(*this, "fdc") diff --git a/src/devices/bus/tanbus/radisc.h b/src/devices/bus/tanbus/radisc.h index bbcfc2298ac..2fc5391c599 100644 --- a/src/devices/bus/tanbus/radisc.h +++ b/src/devices/bus/tanbus/radisc.h @@ -30,7 +30,7 @@ class tanbus_radisc_device : { public: // construction/destruction - tanbus_radisc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_radisc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/tanbus/ravdu.cpp b/src/devices/bus/tanbus/ravdu.cpp index 43cd6ff45ab..7d1e6068949 100644 --- a/src/devices/bus/tanbus/ravdu.cpp +++ b/src/devices/bus/tanbus/ravdu.cpp @@ -59,7 +59,7 @@ void tanbus_ravdu_device::device_add_mconfig(machine_config &config) // tanbus_ravdu_device - constructor //------------------------------------------------- -tanbus_ravdu_device::tanbus_ravdu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_ravdu_device::tanbus_ravdu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_RAVDU, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_screen(*this, "screen") diff --git a/src/devices/bus/tanbus/ravdu.h b/src/devices/bus/tanbus/ravdu.h index f21dc73c4f5..f85d63ad9ff 100644 --- a/src/devices/bus/tanbus/ravdu.h +++ b/src/devices/bus/tanbus/ravdu.h @@ -29,7 +29,7 @@ public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - tanbus_ravdu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_ravdu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/tanbus.cpp b/src/devices/bus/tanbus/tanbus.cpp index b84d625c80f..7feb8ad9564 100644 --- a/src/devices/bus/tanbus/tanbus.cpp +++ b/src/devices/bus/tanbus/tanbus.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(TANBUS_SLOT, tanbus_slot_device, "tanbus_slot", "Microtan Bus //------------------------------------------------- // tanbus_slot_device - constructor //------------------------------------------------- -tanbus_slot_device::tanbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_slot_device::tanbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_SLOT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_tanbus(*this, DEVICE_SELF_OWNER) @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(TANBUS, tanbus_device, "tanbus", "Microtan Bus") // tanbus_device - constructor //------------------------------------------------- -tanbus_device::tanbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_device::tanbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS, tag, owner, clock) , m_out_irq_cb(*this) , m_out_nmi_cb(*this) diff --git a/src/devices/bus/tanbus/tanbus.h b/src/devices/bus/tanbus/tanbus.h index 7f5e87eb0aa..ddfb4377df3 100644 --- a/src/devices/bus/tanbus/tanbus.h +++ b/src/devices/bus/tanbus/tanbus.h @@ -39,7 +39,7 @@ public: set_fixed(false); set_tanbus_slot(num); } - tanbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration void set_tanbus_slot(int num) { m_bus_num = num; } @@ -65,7 +65,7 @@ class tanbus_device : public device_t { public: // construction/destruction - tanbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~tanbus_device() { m_device_list.detach_all(); } // inline configuration diff --git a/src/devices/bus/tanbus/tandos.cpp b/src/devices/bus/tanbus/tandos.cpp index ae971913254..9855b6ffd44 100644 --- a/src/devices/bus/tanbus/tandos.cpp +++ b/src/devices/bus/tanbus/tandos.cpp @@ -74,7 +74,7 @@ const tiny_rom_entry *tanbus_tandos_device::device_rom_region() const // tanbus_tandos_device - constructor //------------------------------------------------- -tanbus_tandos_device::tanbus_tandos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tandos_device::tanbus_tandos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TANDOS, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_dos_rom(*this, "dos_rom") diff --git a/src/devices/bus/tanbus/tandos.h b/src/devices/bus/tanbus/tandos.h index 60a157809f8..2489aebe63c 100644 --- a/src/devices/bus/tanbus/tandos.h +++ b/src/devices/bus/tanbus/tandos.h @@ -28,7 +28,7 @@ public: static constexpr feature_type imperfect_features() { return feature::DISK; } // construction/destruction - tanbus_tandos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tandos_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void floppy_formats(format_registration &fr); diff --git a/src/devices/bus/tanbus/tanex.cpp b/src/devices/bus/tanbus/tanex.cpp index f99a9d6cdf4..82b362a1f2b 100644 --- a/src/devices/bus/tanbus/tanex.cpp +++ b/src/devices/bus/tanbus/tanex.cpp @@ -103,7 +103,7 @@ void tanbus_tanex_device::device_add_mconfig(machine_config &config) INPUT_MERGER_ANY_HIGH(config, m_irq_line).output_handler().set(FUNC(tanbus_tanex_device::bus_irq_w)); /* acia */ - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(1.8432_MHz_XTAL); m_acia->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts)); @@ -165,7 +165,7 @@ const tiny_rom_entry *tanbus_tanex_device::device_rom_region() const // tanbus_tanex_device - constructor //------------------------------------------------- -tanbus_tanex_device::tanbus_tanex_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tanex_device::tanbus_tanex_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TANEX, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_rom_tanex(*this, "rom_tanex") diff --git a/src/devices/bus/tanbus/tanex.h b/src/devices/bus/tanbus/tanex.h index ec3f75fb344..f1e491d0b8f 100644 --- a/src/devices/bus/tanbus/tanex.h +++ b/src/devices/bus/tanbus/tanex.h @@ -32,7 +32,7 @@ class tanbus_tanex_device : { public: // construction/destruction - tanbus_tanex_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tanex_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/tanhrg.cpp b/src/devices/bus/tanbus/tanhrg.cpp index b857e84ac69..d3edbceb2b6 100644 --- a/src/devices/bus/tanbus/tanhrg.cpp +++ b/src/devices/bus/tanbus/tanhrg.cpp @@ -161,7 +161,7 @@ void tanbus_tanhrgc_device::device_add_mconfig(machine_config &config) // tanbus_tanhrg_device - constructor //------------------------------------------------- -tanbus_tanhrg_device::tanbus_tanhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tanhrg_device::tanbus_tanhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TANHRG, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_dsw(*this, "DSW") @@ -171,7 +171,7 @@ tanbus_tanhrg_device::tanbus_tanhrg_device(const machine_config &mconfig, const } -tanbus_tanhrgc_device::tanbus_tanhrgc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tanhrgc_device::tanbus_tanhrgc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TANHRGC, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_dsw(*this, "DSW_%u", 1) diff --git a/src/devices/bus/tanbus/tanhrg.h b/src/devices/bus/tanbus/tanhrg.h index bce2c68bd78..cfb6b4b64b8 100644 --- a/src/devices/bus/tanbus/tanhrg.h +++ b/src/devices/bus/tanbus/tanhrg.h @@ -26,7 +26,7 @@ class tanbus_tanhrg_device : { public: // construction/destruction - tanbus_tanhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tanhrg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -57,7 +57,7 @@ class tanbus_tanhrgc_device : { public: // construction/destruction - tanbus_tanhrgc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tanhrgc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/tanram.cpp b/src/devices/bus/tanbus/tanram.cpp index 0e3dadf9d15..791a822bd08 100644 --- a/src/devices/bus/tanbus/tanram.cpp +++ b/src/devices/bus/tanbus/tanram.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(TANBUS_TANRAM, tanbus_tanram_device, "tanbus_tanram", "Tanger // tanbus_tanram_device - constructor //------------------------------------------------- -tanbus_tanram_device::tanbus_tanram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tanram_device::tanbus_tanram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TANRAM, tag, owner, clock) , device_tanbus_interface(mconfig, *this) { diff --git a/src/devices/bus/tanbus/tanram.h b/src/devices/bus/tanbus/tanram.h index 9cdf7970c77..acb78ab353e 100644 --- a/src/devices/bus/tanbus/tanram.h +++ b/src/devices/bus/tanbus/tanram.h @@ -24,7 +24,7 @@ class tanbus_tanram_device : { public: // construction/destruction - tanbus_tanram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tanram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/tug64k.cpp b/src/devices/bus/tanbus/tug64k.cpp index 3f5d834cd92..a3ae1437b33 100644 --- a/src/devices/bus/tanbus/tug64k.cpp +++ b/src/devices/bus/tanbus/tug64k.cpp @@ -83,7 +83,7 @@ ioport_constructor tanbus_tug64k_device::device_input_ports() const // tanbus_tug64k_device - constructor //------------------------------------------------- -tanbus_tug64k_device::tanbus_tug64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tug64k_device::tanbus_tug64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TUG64K, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_dsw(*this, "SW%u", 1) diff --git a/src/devices/bus/tanbus/tug64k.h b/src/devices/bus/tanbus/tug64k.h index e6163d7a187..afc77911a17 100644 --- a/src/devices/bus/tanbus/tug64k.h +++ b/src/devices/bus/tanbus/tug64k.h @@ -24,7 +24,7 @@ class tanbus_tug64k_device : { public: // construction/destruction - tanbus_tug64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tug64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/tug8082.cpp b/src/devices/bus/tanbus/tug8082.cpp index 582ab726c8e..8cf0d9c0427 100644 --- a/src/devices/bus/tanbus/tug8082.cpp +++ b/src/devices/bus/tanbus/tug8082.cpp @@ -113,12 +113,12 @@ void tanbus_tug8082_device::device_add_mconfig(machine_config &config) M6502(config, m_maincpu, DERIVED_CLOCK(1, 4)); m_maincpu->set_addrmap(AS_PROGRAM, &tanbus_tug8082_device::vid8082_map); - I8212(config, m_iop[0], 0); + I8212(config, m_iop[0]); //m_iop[0]->md_rd_callback().set(CONSTANT(0)); m_iop[0]->int_wr_callback().set(FUNC(tanbus_tug8082_device::bus_irq_w)); //m_iop->do_wr_callback().set(FUNC(tanbus_tug8082_device::write)); - I8212(config, m_iop[1], 0); + I8212(config, m_iop[1]); //m_iop[1]->md_rd_callback().set(CONSTANT(0)); m_iop[1]->int_wr_callback().set(FUNC(tanbus_tug8082_device::vdu_irq_w)); //m_iop->di_rd_callback().set(FUNC(tanbus_tug8082_device::read)); @@ -150,7 +150,7 @@ const tiny_rom_entry *tanbus_tug8082_device::device_rom_region() const // tanbus_tug8082_device - constructor //------------------------------------------------- -tanbus_tug8082_device::tanbus_tug8082_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tug8082_device::tanbus_tug8082_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TUG8082, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_maincpu(*this, "maincpu") diff --git a/src/devices/bus/tanbus/tug8082.h b/src/devices/bus/tanbus/tug8082.h index 979e47180e5..ee04e7a6c08 100644 --- a/src/devices/bus/tanbus/tug8082.h +++ b/src/devices/bus/tanbus/tug8082.h @@ -31,7 +31,7 @@ public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - tanbus_tug8082_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tug8082_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tanbus/tugpgm.cpp b/src/devices/bus/tanbus/tugpgm.cpp index e97b0853f64..160c9fb2111 100644 --- a/src/devices/bus/tanbus/tugpgm.cpp +++ b/src/devices/bus/tanbus/tugpgm.cpp @@ -55,7 +55,7 @@ ioport_constructor tanbus_tugpgm_device::device_input_ports() const // tanbus_tugpgm_device - constructor //------------------------------------------------- -tanbus_tugpgm_device::tanbus_tugpgm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tanbus_tugpgm_device::tanbus_tugpgm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANBUS_TUGPGM, tag, owner, clock) , device_tanbus_interface(mconfig, *this) , m_links(*this, "LINKS") diff --git a/src/devices/bus/tanbus/tugpgm.h b/src/devices/bus/tanbus/tugpgm.h index 215f66a397c..1c44903ae0b 100644 --- a/src/devices/bus/tanbus/tugpgm.h +++ b/src/devices/bus/tanbus/tugpgm.h @@ -26,7 +26,7 @@ public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // construction/destruction - tanbus_tugpgm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tanbus_tugpgm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/thomson/cd90_015.cpp b/src/devices/bus/thomson/cd90_015.cpp index 6f9b2822647..b8ee6b1eea5 100644 --- a/src/devices/bus/thomson/cd90_015.cpp +++ b/src/devices/bus/thomson/cd90_015.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(CD90_015, cd90_015_device, "cd90_015", "Thomson CD90-015 floppy drive selectler") -cd90_015_device::cd90_015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cd90_015_device::cd90_015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CD90_015, tag, owner, clock), thomson_extension_interface(mconfig, *this), m_fdc(*this, "fdc"), diff --git a/src/devices/bus/thomson/cd90_015.h b/src/devices/bus/thomson/cd90_015.h index b2a4069e8cc..c17e8ae2f4c 100644 --- a/src/devices/bus/thomson/cd90_015.h +++ b/src/devices/bus/thomson/cd90_015.h @@ -15,7 +15,7 @@ class cd90_015_device : public device_t, public thomson_extension_interface { public: - cd90_015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cd90_015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~cd90_015_device() = default; virtual void rom_map(address_map &map) override; diff --git a/src/devices/bus/thomson/cd90_351.cpp b/src/devices/bus/thomson/cd90_351.cpp index 44962c00115..a4904dfb7a4 100644 --- a/src/devices/bus/thomson/cd90_351.cpp +++ b/src/devices/bus/thomson/cd90_351.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(CD90_351, cd90_351_device, "cd90_351", "Thomson CD90-351 floppy drive controller") -cd90_351_device::cd90_351_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cd90_351_device::cd90_351_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CD90_351, tag, owner, 16000000), thomson_extension_interface(mconfig, *this), m_floppy(*this, "%u", 0U), diff --git a/src/devices/bus/thomson/cd90_351.h b/src/devices/bus/thomson/cd90_351.h index 6609eddf7a8..580c0e7c923 100644 --- a/src/devices/bus/thomson/cd90_351.h +++ b/src/devices/bus/thomson/cd90_351.h @@ -15,7 +15,7 @@ class cd90_351_device : public device_t, public thomson_extension_interface { public: - cd90_351_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16000000); + cd90_351_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 16000000); virtual ~cd90_351_device() = default; virtual void rom_map(address_map &map) override; diff --git a/src/devices/bus/thomson/cd90_640.cpp b/src/devices/bus/thomson/cd90_640.cpp index 4cae4efb97a..9a153849b22 100644 --- a/src/devices/bus/thomson/cd90_640.cpp +++ b/src/devices/bus/thomson/cd90_640.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(CD90_640, cd90_640_device, "cd90_640", "Thomson CD90-640 floppy drive controller") -cd90_640_device::cd90_640_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cd90_640_device::cd90_640_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CD90_640, tag, owner, clock), thomson_extension_interface(mconfig, *this), m_fdc(*this, "fdc"), diff --git a/src/devices/bus/thomson/cd90_640.h b/src/devices/bus/thomson/cd90_640.h index 5598a71546d..7bcd9f39238 100644 --- a/src/devices/bus/thomson/cd90_640.h +++ b/src/devices/bus/thomson/cd90_640.h @@ -15,7 +15,7 @@ class cd90_640_device : public device_t, public thomson_extension_interface { public: - cd90_640_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cd90_640_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~cd90_640_device() = default; virtual void rom_map(address_map &map) override; diff --git a/src/devices/bus/thomson/cq90_028.cpp b/src/devices/bus/thomson/cq90_028.cpp index fd14c5302f7..347fbc28935 100644 --- a/src/devices/bus/thomson/cq90_028.cpp +++ b/src/devices/bus/thomson/cq90_028.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(CQ90_028, cq90_028_device, "cq90_028", "Thomson CQ90-028 QDD controller") -cq90_028_device::cq90_028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cq90_028_device::cq90_028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CQ90_028, tag, owner, clock), thomson_extension_interface(mconfig, *this), m_serial(*this, "serial"), diff --git a/src/devices/bus/thomson/cq90_028.h b/src/devices/bus/thomson/cq90_028.h index d0a44448e38..e91eb475a55 100644 --- a/src/devices/bus/thomson/cq90_028.h +++ b/src/devices/bus/thomson/cq90_028.h @@ -14,7 +14,7 @@ class cq90_028_device : public device_t, public thomson_extension_interface { public: - cq90_028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cq90_028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~cq90_028_device() = default; static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/thomson/extension.cpp b/src/devices/bus/thomson/extension.cpp index 12462b9898a..ad99ef2c310 100644 --- a/src/devices/bus/thomson/extension.cpp +++ b/src/devices/bus/thomson/extension.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(THOMSON_EXTENSION, thomson_extension_device, "thomson_extension", "Thomson TO*/MO* extension port") -thomson_extension_device::thomson_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +thomson_extension_device::thomson_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, THOMSON_EXTENSION, tag, owner, clock), device_single_card_slot_interface(mconfig, *this) { diff --git a/src/devices/bus/thomson/extension.h b/src/devices/bus/thomson/extension.h index bbe9db92915..6682acef364 100644 --- a/src/devices/bus/thomson/extension.h +++ b/src/devices/bus/thomson/extension.h @@ -24,7 +24,7 @@ public: class thomson_extension_device : public device_t, public device_single_card_slot_interface { public: - thomson_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + thomson_extension_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~thomson_extension_device() = default; void rom_map(address_space_installer &space, offs_t start, offs_t end); diff --git a/src/devices/bus/thomson/nanoreseau.cpp b/src/devices/bus/thomson/nanoreseau.cpp index 418d9ce59e5..3b8e7d0d510 100644 --- a/src/devices/bus/thomson/nanoreseau.cpp +++ b/src/devices/bus/thomson/nanoreseau.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(NANORESEAU_TO, nanoreseau_to_device, "nanoreseau_to", "Nanoreseau controller (TO rom)") DEFINE_DEVICE_TYPE(NANORESEAU_MO, nanoreseau_mo_device, "nanoreseau_mo", "Nanoreseau controller (MO rom)") - nanoreseau_device::nanoreseau_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool no_id) : + nanoreseau_device::nanoreseau_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool no_id) : device_t(mconfig, type, tag, owner, clock), thomson_extension_interface(mconfig, *this), m_mc6854(*this, "mc6854"), @@ -21,12 +21,12 @@ DEFINE_DEVICE_TYPE(NANORESEAU_MO, nanoreseau_mo_device, "nanoreseau_mo", "Nanore { } -nanoreseau_to_device::nanoreseau_to_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool no_id) : +nanoreseau_to_device::nanoreseau_to_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool no_id) : nanoreseau_device(mconfig, NANORESEAU_TO, tag, owner, clock) { } -nanoreseau_mo_device::nanoreseau_mo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool no_id) : +nanoreseau_mo_device::nanoreseau_mo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool no_id) : nanoreseau_device(mconfig, NANORESEAU_MO, tag, owner, clock) { } diff --git a/src/devices/bus/thomson/nanoreseau.h b/src/devices/bus/thomson/nanoreseau.h index 1d7cde2ce9a..406932970e8 100644 --- a/src/devices/bus/thomson/nanoreseau.h +++ b/src/devices/bus/thomson/nanoreseau.h @@ -14,7 +14,7 @@ class nanoreseau_device : public device_t, public thomson_extension_interface { public: - nanoreseau_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool no_id = false); + nanoreseau_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool no_id = false); virtual ~nanoreseau_device() = default; virtual void rom_map(address_map &map) override; @@ -44,7 +44,7 @@ private: class nanoreseau_mo_device : public nanoreseau_device { public: - nanoreseau_mo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0, bool no_id = false); + nanoreseau_mo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL(), bool no_id = false); virtual ~nanoreseau_mo_device() = default; protected: @@ -54,7 +54,7 @@ protected: class nanoreseau_to_device : public nanoreseau_device { public: - nanoreseau_to_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0, bool no_id = false); + nanoreseau_to_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL(), bool no_id = false); virtual ~nanoreseau_to_device() = default; protected: diff --git a/src/devices/bus/ti8x/bitsocket.cpp b/src/devices/bus/ti8x/bitsocket.cpp index 1c4feb4ed4f..bf0853c0e44 100644 --- a/src/devices/bus/ti8x/bitsocket.cpp +++ b/src/devices/bus/ti8x/bitsocket.cpp @@ -23,7 +23,7 @@ class bit_socket_device , public device_ti8x_link_port_interface { public: - bit_socket_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + bit_socket_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -58,7 +58,7 @@ bit_socket_device::bit_socket_device( void bit_socket_device::device_add_mconfig(machine_config &config) { - BITBANGER(config, m_stream, 0); + BITBANGER(config, m_stream); } diff --git a/src/devices/bus/ti8x/graphlinkhle.cpp b/src/devices/bus/ti8x/graphlinkhle.cpp index 6322f2b422d..a9a22ddf78e 100644 --- a/src/devices/bus/ti8x/graphlinkhle.cpp +++ b/src/devices/bus/ti8x/graphlinkhle.cpp @@ -19,7 +19,7 @@ class graph_link_hle_device , public device_serial_interface { public: - graph_link_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + graph_link_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -75,7 +75,7 @@ void graph_link_hle_device::device_start() void graph_link_hle_device::device_reset() { set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rate(9600); + set_rate(XTAL::u(9600)); receive_register_reset(); transmit_register_reset(); diff --git a/src/devices/bus/ti8x/teeconn.cpp b/src/devices/bus/ti8x/teeconn.cpp index b0774684dc7..ce2e4f2a35a 100644 --- a/src/devices/bus/ti8x/teeconn.cpp +++ b/src/devices/bus/ti8x/teeconn.cpp @@ -13,7 +13,7 @@ namespace { class tee_connector_device : public device_t, public device_ti8x_link_port_interface { public: - tee_connector_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + tee_connector_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/ti8x/ti8x.h b/src/devices/bus/ti8x/ti8x.h index 759b3523eb1..045200ccb6e 100644 --- a/src/devices/bus/ti8x/ti8x.h +++ b/src/devices/bus/ti8x/ti8x.h @@ -50,14 +50,14 @@ class ti8x_link_port_device : public device_t, public device_single_card_slot_in public: template ti8x_link_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : ti8x_link_port_device(mconfig, tag, owner, 0) + : ti8x_link_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - ti8x_link_port_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + ti8x_link_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // static configuration helpers auto tip_handler() { return m_tip_handler.bind(); } diff --git a/src/devices/bus/ti8x/tispeaker.cpp b/src/devices/bus/ti8x/tispeaker.cpp index 2aa5afdcf7d..d64ad6ae185 100644 --- a/src/devices/bus/ti8x/tispeaker.cpp +++ b/src/devices/bus/ti8x/tispeaker.cpp @@ -32,9 +32,9 @@ protected: SPEAKER(config, "outl").front_left(); SPEAKER(config, "outr").front_right(); - SPEAKER_SOUND(config, m_left_speaker, 0).add_route(ALL_OUTPUTS, "outl", 0.50); + SPEAKER_SOUND(config, m_left_speaker).add_route(ALL_OUTPUTS, "outl", 0.50); - SPEAKER_SOUND(config, m_right_speaker, 0).add_route(ALL_OUTPUTS, "outr", 0.50); + SPEAKER_SOUND(config, m_right_speaker).add_route(ALL_OUTPUTS, "outr", 0.50); } virtual void device_start() override @@ -79,7 +79,7 @@ protected: { SPEAKER(config, "mono").front_center(); - SPEAKER_SOUND(config, m_speaker, 0).add_route(ALL_OUTPUTS, "mono", 0.50); + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); } virtual void device_start() override diff --git a/src/devices/bus/ti99/colorbus/busmouse.cpp b/src/devices/bus/ti99/colorbus/busmouse.cpp index ccaf9c66f25..5a28d449701 100644 --- a/src/devices/bus/ti99/colorbus/busmouse.cpp +++ b/src/devices/bus/ti99/colorbus/busmouse.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(V9938_BUSMOUSE, bus::ti99::colorbus::v9938_busmouse_device, " namespace bus::ti99::colorbus { -v9938_busmouse_device::v9938_busmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v9938_busmouse_device::v9938_busmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, V9938_BUSMOUSE, tag, owner, clock), device_v9938_colorbus_interface(mconfig, *this), m_buttons(*this, "MOUSEBUT"), diff --git a/src/devices/bus/ti99/colorbus/busmouse.h b/src/devices/bus/ti99/colorbus/busmouse.h index d12e550fa11..b9332181acd 100644 --- a/src/devices/bus/ti99/colorbus/busmouse.h +++ b/src/devices/bus/ti99/colorbus/busmouse.h @@ -22,7 +22,7 @@ namespace bus::ti99::colorbus { class v9938_busmouse_device : public device_t, public device_v9938_colorbus_interface { public: - v9938_busmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v9938_busmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER( mouse_button_changed ); DECLARE_INPUT_CHANGED_MEMBER( mouse_pos_changed ); diff --git a/src/devices/bus/ti99/colorbus/colorbus.cpp b/src/devices/bus/ti99/colorbus/colorbus.cpp index e3decb6ba61..8453494c203 100644 --- a/src/devices/bus/ti99/colorbus/colorbus.cpp +++ b/src/devices/bus/ti99/colorbus/colorbus.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(V9938_COLORBUS, bus::ti99::colorbus::v9938_colorbus_device, " namespace bus::ti99::colorbus { -v9938_colorbus_device::v9938_colorbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v9938_colorbus_device::v9938_colorbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, V9938_COLORBUS, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_v9938(*owner, TIGEN_V9938_TAG), diff --git a/src/devices/bus/ti99/colorbus/colorbus.h b/src/devices/bus/ti99/colorbus/colorbus.h index edd088b480a..973daca2d27 100644 --- a/src/devices/bus/ti99/colorbus/colorbus.h +++ b/src/devices/bus/ti99/colorbus/colorbus.h @@ -45,7 +45,7 @@ class v9938_colorbus_device : public device_t, public device_single_card_slot_in { public: template - v9938_colorbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt) + v9938_colorbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, U &&opts, const char *dflt) : v9938_colorbus_device(mconfig, tag, owner, clock) { option_reset(); @@ -54,7 +54,7 @@ public: set_fixed(false); } - v9938_colorbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v9938_colorbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // For the extra button (V9938 only handles 2) auto extra_button_cb() { return m_extra_button.bind(); } diff --git a/src/devices/bus/ti99/gromport/cartridges.cpp b/src/devices/bus/ti99/gromport/cartridges.cpp index 6ed6d19366f..d8571ab96f4 100644 --- a/src/devices/bus/ti99/gromport/cartridges.cpp +++ b/src/devices/bus/ti99/gromport/cartridges.cpp @@ -90,7 +90,7 @@ static const pcb_type sw_pcbdefs[] = { 0, nullptr} }; -ti99_cartridge_device::ti99_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti99_cartridge_device::ti99_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_CART, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), m_pcbtype(0), diff --git a/src/devices/bus/ti99/gromport/cartridges.h b/src/devices/bus/ti99/gromport/cartridges.h index 68593bf1ac8..43e47c39b3d 100644 --- a/src/devices/bus/ti99/gromport/cartridges.h +++ b/src/devices/bus/ti99/gromport/cartridges.h @@ -26,7 +26,7 @@ class ti99_cartridge_pcb; class ti99_cartridge_device : public device_t, public device_cartrom_image_interface { public: - ti99_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti99_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value); void write(offs_t offset, uint8_t data); diff --git a/src/devices/bus/ti99/gromport/gkracker.cpp b/src/devices/bus/ti99/gromport/gkracker.cpp index 212207665e2..09285a10cf3 100644 --- a/src/devices/bus/ti99/gromport/gkracker.cpp +++ b/src/devices/bus/ti99/gromport/gkracker.cpp @@ -132,7 +132,7 @@ enum #define GKRACKER_NVRAM_TAG "gkracker_nvram" #define GKRACKER_ROM_TAG "gkracker_rom" -ti99_gkracker_device::ti99_gkracker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti99_gkracker_device::ti99_gkracker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cartridge_connector_device(mconfig, TI99_GROMPORT_GK, tag, owner, clock), device_nvram_interface(mconfig, *this), m_romspace_selected(false), @@ -439,7 +439,7 @@ const tiny_rom_entry *ti99_gkracker_device::device_rom_region() const void ti99_gkracker_device::device_add_mconfig(machine_config &config) { - TI99_CART(config, "cartridge", 0); + TI99_CART(config, "cartridge"); } INPUT_PORTS_START(gkracker) diff --git a/src/devices/bus/ti99/gromport/gkracker.h b/src/devices/bus/ti99/gromport/gkracker.h index 76bc457a11e..fd47a47762e 100644 --- a/src/devices/bus/ti99/gromport/gkracker.h +++ b/src/devices/bus/ti99/gromport/gkracker.h @@ -15,7 +15,7 @@ namespace bus::ti99::gromport { class ti99_gkracker_device : public cartridge_connector_device, public device_nvram_interface { public: - ti99_gkracker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti99_gkracker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/gromport/gromport.cpp b/src/devices/bus/ti99/gromport/gromport.cpp index 1a53362416c..0b188c6b26b 100644 --- a/src/devices/bus/ti99/gromport/gromport.cpp +++ b/src/devices/bus/ti99/gromport/gromport.cpp @@ -125,7 +125,7 @@ DEFINE_DEVICE_TYPE(TI99_GROMPORT, bus::ti99::gromport::gromport_device, "grompor namespace bus::ti99::gromport { -gromport_device::gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gromport_device::gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_GROMPORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_connector(nullptr), @@ -272,7 +272,7 @@ ioport_constructor gromport_device::device_input_ports() const ***************************************************************************/ -cartridge_connector_device::cartridge_connector_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +cartridge_connector_device::cartridge_connector_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_gromport(nullptr) { diff --git a/src/devices/bus/ti99/gromport/gromport.h b/src/devices/bus/ti99/gromport/gromport.h index 74c844d7ed7..64f58be536c 100644 --- a/src/devices/bus/ti99/gromport/gromport.h +++ b/src/devices/bus/ti99/gromport/gromport.h @@ -29,7 +29,7 @@ class gromport_device : public device_t, public device_slot_interface { public: template - gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt) + gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, U &&opts, const char *dflt) : gromport_device(mconfig, tag, owner, clock) { option_reset(); @@ -38,7 +38,7 @@ public: set_fixed(false); } - gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gromport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value); void write(offs_t offset, uint8_t data); @@ -95,7 +95,7 @@ public: virtual bool is_grom_idle() = 0; protected: - cartridge_connector_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cartridge_connector_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_config_complete() override; gromport_device* m_gromport; diff --git a/src/devices/bus/ti99/gromport/multiconn.cpp b/src/devices/bus/ti99/gromport/multiconn.cpp index 595a6ab1a29..037c091ad5d 100644 --- a/src/devices/bus/ti99/gromport/multiconn.cpp +++ b/src/devices/bus/ti99/gromport/multiconn.cpp @@ -55,7 +55,7 @@ namespace bus::ti99::gromport { #define AUTO -1 -ti99_multi_cart_conn_device::ti99_multi_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti99_multi_cart_conn_device::ti99_multi_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cartridge_connector_device(mconfig, TI99_GROMPORT_MULTI, tag, owner, clock), m_active_slot(0), m_fixed_slot(0), @@ -303,10 +303,10 @@ void ti99_multi_cart_conn_device::device_reset(void) void ti99_multi_cart_conn_device::device_add_mconfig(machine_config &config) { - TI99_CART(config, "cartridge1", 0); - TI99_CART(config, "cartridge2", 0); - TI99_CART(config, "cartridge3", 0); - TI99_CART(config, "cartridge4", 0); + TI99_CART(config, "cartridge1"); + TI99_CART(config, "cartridge2"); + TI99_CART(config, "cartridge3"); + TI99_CART(config, "cartridge4"); } INPUT_CHANGED_MEMBER( ti99_multi_cart_conn_device::switch_changed ) diff --git a/src/devices/bus/ti99/gromport/multiconn.h b/src/devices/bus/ti99/gromport/multiconn.h index 517224eff14..1cfcef62963 100644 --- a/src/devices/bus/ti99/gromport/multiconn.h +++ b/src/devices/bus/ti99/gromport/multiconn.h @@ -20,7 +20,7 @@ namespace bus::ti99::gromport { class ti99_multi_cart_conn_device : public cartridge_connector_device { public: - ti99_multi_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti99_multi_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/gromport/singleconn.cpp b/src/devices/bus/ti99/gromport/singleconn.cpp index e24a3ba416a..3bf6f6caa9d 100644 --- a/src/devices/bus/ti99/gromport/singleconn.cpp +++ b/src/devices/bus/ti99/gromport/singleconn.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(TI99_GROMPORT_SINGLE, bus::ti99::gromport::ti99_single_cart_c namespace bus::ti99::gromport { -ti99_single_cart_conn_device::ti99_single_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti99_single_cart_conn_device::ti99_single_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cartridge_connector_device(mconfig, TI99_GROMPORT_SINGLE, tag, owner, clock), m_cartridge(nullptr) { @@ -85,7 +85,7 @@ void ti99_single_cart_conn_device::device_reset() void ti99_single_cart_conn_device::device_add_mconfig(machine_config &config) { - TI99_CART(config, "cartridge", 0); + TI99_CART(config, "cartridge"); } } // end namespace bus::ti99::gromport diff --git a/src/devices/bus/ti99/gromport/singleconn.h b/src/devices/bus/ti99/gromport/singleconn.h index 40627a07867..2ea8437e3b7 100644 --- a/src/devices/bus/ti99/gromport/singleconn.h +++ b/src/devices/bus/ti99/gromport/singleconn.h @@ -16,7 +16,7 @@ namespace bus::ti99::gromport { class ti99_single_cart_conn_device : public cartridge_connector_device { public: - ti99_single_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti99_single_cart_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/internal/992board.cpp b/src/devices/bus/ti99/internal/992board.cpp index 7dae38759ee..a1df885841c 100644 --- a/src/devices/bus/ti99/internal/992board.cpp +++ b/src/devices/bus/ti99/internal/992board.cpp @@ -139,7 +139,7 @@ DEFINE_DEVICE_TYPE(TI992_RAM32K, bus::ti99::internal::ti992_expram_device, "ti99 namespace bus::ti99::internal { -video992_device::video992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +video992_device::video992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), m_mem_read_cb(*this), @@ -149,13 +149,13 @@ video992_device::video992_device(const machine_config &mconfig, device_type type { } -video992_24_device::video992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +video992_24_device::video992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : video992_device(mconfig, VIDEO99224, tag, owner, clock) { m_beol = 0x70; } -video992_32_device::video992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +video992_32_device::video992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : video992_device(mconfig, VIDEO99232, tag, owner, clock) { m_beol = 0x7f; @@ -354,7 +354,7 @@ void video992_device::device_reset() [3] I/O Controller CF40051, Preliminary specification, Texas Instruments */ -io992_device::io992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +io992_device::io992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : bus::hexbus::hexbus_chained_device(mconfig, type, tag, owner, clock), m_hexbus(*owner, TI992_HEXBUS_TAG), m_cassette(*owner, TI992_CASSETTE), @@ -366,13 +366,13 @@ io992_device::io992_device(const machine_config &mconfig, device_type type, cons { } -io992_24_device::io992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +io992_24_device::io992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : io992_device(mconfig, IO99224, tag, owner, clock) { m_have_banked_rom = false; } -io992_32_device::io992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +io992_32_device::io992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : io992_device(mconfig, IO99232, tag, owner, clock) { m_have_banked_rom = true; @@ -608,7 +608,7 @@ ioport_constructor io992_device::device_input_ports() const Expansion port ********************************************************************/ -ti992_expport_device::ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti992_expport_device::ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI992_EXPPORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_connected(nullptr) @@ -637,7 +637,7 @@ void ti992_expport_device::device_config_complete() Maps at 6000 - DFFF This is the only known expansion device */ -ti992_expram_device::ti992_expram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ti992_expram_device::ti992_expram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ti992_expport_attached_device(mconfig, TI992_RAM32K, tag, owner, clock), m_ram(*this, "ram32k") { @@ -671,7 +671,7 @@ void ti992_expram_device::write(offs_t offset, uint8_t value) void ti992_expram_device::device_add_mconfig(machine_config &config) { - RAM(config, m_ram, 0); + RAM(config, m_ram); m_ram->set_default_size("32k"); m_ram->set_default_value(0); } diff --git a/src/devices/bus/ti99/internal/992board.h b/src/devices/bus/ti99/internal/992board.h index 5a6ab8b5a8f..0d948491230 100644 --- a/src/devices/bus/ti99/internal/992board.h +++ b/src/devices/bus/ti99/internal/992board.h @@ -54,7 +54,7 @@ public: auto int_cb() { return m_int_cb.bind(); } protected: - video992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + video992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); int m_beol; virtual void device_start() override; @@ -89,14 +89,14 @@ private: class video992_24_device : public video992_device { public: - video992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + video992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; /* Variant for TI-99/2 32K */ class video992_32_device : public video992_device { public: - video992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + video992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; /* @@ -105,14 +105,14 @@ public: class io992_device : public bus::hexbus::hexbus_chained_device { public: - io992_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + io992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t cruread(offs_t offset); void cruwrite(offs_t offset, uint8_t data); auto rombank_cb() { return m_set_rom_bank.bind(); } protected: - io992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + io992_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); bool m_have_banked_rom; virtual void device_start() override; @@ -141,14 +141,14 @@ private: class io992_24_device : public io992_device { public: - io992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + io992_24_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; /* Variant for TI-99/2 32K */ class io992_32_device : public io992_device { public: - io992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + io992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; /******************************************************************** @@ -166,7 +166,7 @@ public: class ti992_expport_attached_device : public device_t { public: - ti992_expport_attached_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + ti992_expport_attached_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } @@ -181,7 +181,7 @@ class ti992_expport_device : public device_t, public device_slot_interface public: template - ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt) + ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, U &&opts, const char *dflt) : ti992_expport_device(mconfig, tag, owner, clock) { option_reset(); @@ -190,7 +190,7 @@ public: set_fixed(false); } - ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Methods called from the console // More methods should be added, once we can find further 99/2 cartridges @@ -210,7 +210,7 @@ private: class ti992_expram_device : public ti992_expport_attached_device { public: - ti992_expram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti992_expram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void readz(offs_t offset, uint8_t *value) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/internal/998board.cpp b/src/devices/bus/ti99/internal/998board.cpp index bebd7762ec4..7f155423e50 100644 --- a/src/devices/bus/ti99/internal/998board.cpp +++ b/src/devices/bus/ti99/internal/998board.cpp @@ -145,7 +145,7 @@ enum VIDSEL = 16 }; -mainboard8_device::mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mainboard8_device::mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_MAINBOARD8, tag, owner, clock), m_A14_set(false), m_pending_write(false), @@ -1068,10 +1068,10 @@ void mainboard8_device::device_reset() void mainboard8_device::device_add_mconfig(machine_config &config) { - TI99_VAQUERRO(config, TI998_VAQUERRO_TAG, 0); - TI99_MOFETTA(config, TI998_MOFETTA_TAG, 0); - TI99_AMIGO(config, TI998_AMIGO_TAG, 0); - TI99_OSO(config, TI998_OSO_TAG, 0); + TI99_VAQUERRO(config, TI998_VAQUERRO_TAG); + TI99_MOFETTA(config, TI998_MOFETTA_TAG); + TI99_AMIGO(config, TI998_AMIGO_TAG); + TI99_OSO(config, TI998_OSO_TAG); } /*************************************************************************** @@ -1150,7 +1150,7 @@ void mainboard8_device::device_add_mconfig(machine_config &config) ***************************************************************************/ -vaquerro_device::vaquerro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vaquerro_device::vaquerro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_VAQUERRO, tag, owner, clock), m_crus(ASSERT_LINE), m_crugl(ASSERT_LINE), @@ -1601,7 +1601,7 @@ enum INTERNAL }; -mofetta_device::mofetta_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mofetta_device::mofetta_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_MOFETTA, tag, owner, clock), m_gotfirstword(false) { @@ -1896,7 +1896,7 @@ void mofetta_device::device_reset() ***************************************************************************/ -amigo_device::amigo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amigo_device::amigo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_AMIGO, tag, owner, clock), m_logical_space(true), m_crus(ASSERT_LINE) @@ -2268,7 +2268,7 @@ void amigo_device::device_reset() ****************************************************************************/ -oso_device::oso_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +oso_device::oso_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bus::hexbus::hexbus_chained_device(mconfig, TI99_OSO, tag, owner, clock), m_int(*this), m_hexbusout(*this, ":" TI998_HEXBUS_TAG), diff --git a/src/devices/bus/ti99/internal/998board.h b/src/devices/bus/ti99/internal/998board.h index f699b8d02cf..0e92529c64e 100644 --- a/src/devices/bus/ti99/internal/998board.h +++ b/src/devices/bus/ti99/internal/998board.h @@ -98,7 +98,7 @@ class mainboard8_device; class vaquerro_device : public device_t { public: - vaquerro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vaquerro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void device_start() override; void device_reset() override; @@ -246,7 +246,7 @@ private: class mofetta_device : public device_t { public: - mofetta_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mofetta_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void device_start() override; void device_reset() override; @@ -333,7 +333,7 @@ private: class amigo_device : public device_t { public: - amigo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + amigo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void device_start() override; void device_reset() override; @@ -454,7 +454,7 @@ typedef enum class oso_device : public bus::hexbus::hexbus_chained_device { public: - oso_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + oso_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); void device_start() override; @@ -540,7 +540,7 @@ private: class mainboard8_device : public device_t { public: - mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mainboard8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Memory space uint8_t read(offs_t offset); diff --git a/src/devices/bus/ti99/internal/buffram.cpp b/src/devices/bus/ti99/internal/buffram.cpp index 2747db9dd92..699408bbdab 100644 --- a/src/devices/bus/ti99/internal/buffram.cpp +++ b/src/devices/bus/ti99/internal/buffram.cpp @@ -23,7 +23,7 @@ namespace bus::ti99::internal { // ========== Buffered SRAM ============ -buffered_ram_device::buffered_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +buffered_ram_device::buffered_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BUFF_RAM, tag, owner, clock), device_nvram_interface(mconfig, *this), m_size(0), diff --git a/src/devices/bus/ti99/internal/buffram.h b/src/devices/bus/ti99/internal/buffram.h index 646716d665b..e852b8eba94 100644 --- a/src/devices/bus/ti99/internal/buffram.h +++ b/src/devices/bus/ti99/internal/buffram.h @@ -20,7 +20,7 @@ namespace bus::ti99::internal { class buffered_ram_device : public device_t, public device_nvram_interface { public: - buffered_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + buffered_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); buffered_ram_device &set_size(int size) { m_size = size; return *this; } // read/write diff --git a/src/devices/bus/ti99/internal/datamux.cpp b/src/devices/bus/ti99/internal/datamux.cpp index 95412e296e9..0eb9b6c349f 100644 --- a/src/devices/bus/ti99/internal/datamux.cpp +++ b/src/devices/bus/ti99/internal/datamux.cpp @@ -89,7 +89,7 @@ namespace bus::ti99::internal { /* Constructor */ -datamux_device::datamux_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +datamux_device::datamux_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_DATAMUX, tag, owner, clock), m_video(*owner, TI99_VDP_TAG), m_sound(*owner, TI99_SOUNDCHIP_TAG), diff --git a/src/devices/bus/ti99/internal/datamux.h b/src/devices/bus/ti99/internal/datamux.h index 8fb9a7a8c08..b705034d21c 100644 --- a/src/devices/bus/ti99/internal/datamux.h +++ b/src/devices/bus/ti99/internal/datamux.h @@ -43,7 +43,7 @@ namespace bus::ti99::internal { class datamux_device : public device_t { public: - datamux_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + datamux_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data); void setaddress(offs_t offset, uint16_t busctrl); diff --git a/src/devices/bus/ti99/internal/evpcconn.cpp b/src/devices/bus/ti99/internal/evpcconn.cpp index 2b7647d52dd..f1f88dac7d8 100644 --- a/src/devices/bus/ti99/internal/evpcconn.cpp +++ b/src/devices/bus/ti99/internal/evpcconn.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(TI99_EVPCCONN, bus::ti99::internal::evpc_clock_connector, "ti namespace bus::ti99::internal { -evpc_clock_connector::evpc_clock_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +evpc_clock_connector::evpc_clock_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_EVPCCONN, tag, owner, clock), m_vdpint(*this) { diff --git a/src/devices/bus/ti99/internal/evpcconn.h b/src/devices/bus/ti99/internal/evpcconn.h index 4216b7e0028..eb138d8d353 100644 --- a/src/devices/bus/ti99/internal/evpcconn.h +++ b/src/devices/bus/ti99/internal/evpcconn.h @@ -18,7 +18,7 @@ namespace bus::ti99::internal { class evpc_clock_connector : public device_t { public: - evpc_clock_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + evpc_clock_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( vclock_line ); void device_start() override; diff --git a/src/devices/bus/ti99/internal/genboard.cpp b/src/devices/bus/ti99/internal/genboard.cpp index e22bb72caa8..a64a404d34b 100644 --- a/src/devices/bus/ti99/internal/genboard.cpp +++ b/src/devices/bus/ti99/internal/genboard.cpp @@ -440,7 +440,7 @@ DEFINE_DEVICE_TYPE(GENEVE_PAL, bus::ti99::internal::geneve_pal_device, "g namespace bus::ti99::internal { -geneve_gate_array_device::geneve_gate_array_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +geneve_gate_array_device::geneve_gate_array_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_have_waitstate(false), m_have_extra_waitstate(false), @@ -473,7 +473,7 @@ geneve_gate_array_device::geneve_gate_array_device(const machine_config &mconfig { } -geneve_gate_array_device::geneve_gate_array_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +geneve_gate_array_device::geneve_gate_array_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : geneve_gate_array_device(mconfig, GENEVE_GATE_ARRAY, tag, owner, clock) { } @@ -1173,7 +1173,7 @@ void geneve_gate_array_device::device_reset() ======================================================================== */ -geneve_pal_device::geneve_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +geneve_pal_device::geneve_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GENEVE_PAL, tag, owner, clock), m_pin3(true), m_pin4(true), @@ -1409,7 +1409,7 @@ void geneve_pal_device::device_start() ********************************************************************/ -genmod_decoder_device::genmod_decoder_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +genmod_decoder_device::genmod_decoder_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GENMOD_DECODER, tag, owner, clock), m_debug(false), m_turbo(false), diff --git a/src/devices/bus/ti99/internal/genboard.h b/src/devices/bus/ti99/internal/genboard.h index 4b5dd21124e..592bbc5027e 100644 --- a/src/devices/bus/ti99/internal/genboard.h +++ b/src/devices/bus/ti99/internal/genboard.h @@ -55,7 +55,7 @@ class geneve_gate_array_device : public device_t // friend class genmod_decoder_device; public: - geneve_gate_array_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + geneve_gate_array_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Set the internal state and output lines according to the address void setaddress(offs_t offset, uint8_t busctrl); @@ -113,7 +113,7 @@ public: int get_function() { return m_debug? m_decdebug.function : m_decoded.function; } private: - geneve_gate_array_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + geneve_gate_array_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void common_reset(); // Mapper function @@ -250,7 +250,7 @@ private: class geneve_pal_device : public device_t { public: - geneve_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + geneve_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( gaready_in ); DECLARE_WRITE_LINE_MEMBER( csw_in ); @@ -289,7 +289,7 @@ private: class genmod_decoder_device : public device_t { public: - genmod_decoder_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + genmod_decoder_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Set the internal state and output lines according to the address void set_function(int func, int page); diff --git a/src/devices/bus/ti99/internal/genkbd.cpp b/src/devices/bus/ti99/internal/genkbd.cpp index 5e22f27ee33..7f334436e3c 100644 --- a/src/devices/bus/ti99/internal/genkbd.cpp +++ b/src/devices/bus/ti99/internal/genkbd.cpp @@ -188,7 +188,7 @@ ioport_constructor geneve_xt_101_hle_keyboard_device::device_input_ports() const // ibm_pc_xt_83_keyboard_device - constructor //------------------------------------------------- -geneve_xt_101_hle_keyboard_device::geneve_xt_101_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +geneve_xt_101_hle_keyboard_device::geneve_xt_101_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KBD_GENEVE_XT_101_HLE, tag, owner, clock), device_pc_kbd_interface(mconfig, *this), m_keys(*this, "KEY%u", 0), diff --git a/src/devices/bus/ti99/internal/genkbd.h b/src/devices/bus/ti99/internal/genkbd.h index cf67ea8ee6c..45d2a473d90 100644 --- a/src/devices/bus/ti99/internal/genkbd.h +++ b/src/devices/bus/ti99/internal/genkbd.h @@ -25,7 +25,7 @@ class geneve_xt_101_hle_keyboard_device : public device_t, public device_pc_kbd_ { public: // construction/destruction - geneve_xt_101_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + geneve_xt_101_hle_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(reset_line); protected: diff --git a/src/devices/bus/ti99/internal/ioport.cpp b/src/devices/bus/ti99/internal/ioport.cpp index 4ab42b201b4..63972212364 100644 --- a/src/devices/bus/ti99/internal/ioport.cpp +++ b/src/devices/bus/ti99/internal/ioport.cpp @@ -84,7 +84,7 @@ DEFINE_DEVICE_TYPE(TI99_IOPORT, bus::ti99::internal::ioport_device, "ti99_ioport namespace bus::ti99::internal { -ioport_device::ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ioport_device::ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_IOPORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_console_extint(*this), diff --git a/src/devices/bus/ti99/internal/ioport.h b/src/devices/bus/ti99/internal/ioport.h index 5c08beec760..1977a1e9c87 100644 --- a/src/devices/bus/ti99/internal/ioport.h +++ b/src/devices/bus/ti99/internal/ioport.h @@ -23,7 +23,7 @@ class ioport_device; class ioport_attached_device : public device_t { public: - ioport_attached_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + ioport_attached_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_ioport(nullptr) { } @@ -59,7 +59,7 @@ class ioport_device : public device_t, public device_slot_interface public: template - ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt) + ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, U &&opts, const char *dflt) : ioport_device(mconfig, tag, owner, clock) { option_reset(); @@ -68,7 +68,7 @@ public: set_fixed(false); } - ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Methods called from the console void readz(offs_t offset, uint8_t *value); diff --git a/src/devices/bus/ti99/joyport/handset.cpp b/src/devices/bus/ti99/joyport/handset.cpp index 046873f5fe6..2a6b84fb72b 100644 --- a/src/devices/bus/ti99/joyport/handset.cpp +++ b/src/devices/bus/ti99/joyport/handset.cpp @@ -54,7 +54,7 @@ DEFINE_DEVICE_TYPE(TI99_HANDSET, bus::ti99::joyport::ti99_handset_device, "ti99_ namespace bus::ti99::joyport { -ti99_handset_device::ti99_handset_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti99_handset_device::ti99_handset_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_HANDSET, tag, owner, clock) , device_ti99_joyport_interface(mconfig, *this) , m_joyx(*this, "JOYX%u", 0U) @@ -506,7 +506,7 @@ INPUT_PORTS_START( joysticks ) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1/*, "(2FIRE)", CODE_NONE, OSD_JOY2_FIRE, 0*/) PORT_PLAYER(2) INPUT_PORTS_END -ti99_twin_joystick_device::ti99_twin_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti99_twin_joystick_device::ti99_twin_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_JOYSTICK, tag, owner, clock), device_ti99_joyport_interface(mconfig, *this) , m_joystick(0) , m_joys(*this, "JOY%u", 1U) diff --git a/src/devices/bus/ti99/joyport/handset.h b/src/devices/bus/ti99/joyport/handset.h index 344f74bed7a..caa12d8ff31 100644 --- a/src/devices/bus/ti99/joyport/handset.h +++ b/src/devices/bus/ti99/joyport/handset.h @@ -26,7 +26,7 @@ namespace bus::ti99::joyport { class ti99_handset_device : public device_t, public device_ti99_joyport_interface { public: - ti99_handset_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti99_handset_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read_dev() override; void write_dev(uint8_t data) override; @@ -68,7 +68,7 @@ private: class ti99_twin_joystick_device : public device_t, public device_ti99_joyport_interface { public: - ti99_twin_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti99_twin_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; uint8_t read_dev() override; diff --git a/src/devices/bus/ti99/joyport/joyport.cpp b/src/devices/bus/ti99/joyport/joyport.cpp index 77825e85f96..b3669226720 100644 --- a/src/devices/bus/ti99/joyport/joyport.cpp +++ b/src/devices/bus/ti99/joyport/joyport.cpp @@ -50,7 +50,7 @@ device_ti99_joyport_interface::device_ti99_joyport_interface(const machine_confi { } -joyport_device::joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +joyport_device::joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_JOYPORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_interrupt(*this), diff --git a/src/devices/bus/ti99/joyport/joyport.h b/src/devices/bus/ti99/joyport/joyport.h index 40f7b358ac6..3b7996bd4e3 100644 --- a/src/devices/bus/ti99/joyport/joyport.h +++ b/src/devices/bus/ti99/joyport/joyport.h @@ -59,7 +59,7 @@ class joyport_device : public device_t, public device_single_card_slot_interface { public: template - joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt) + joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, U &&opts, const char *dflt) : joyport_device(mconfig, tag, owner, clock) { option_reset(); @@ -68,7 +68,7 @@ public: set_fixed(false); } - joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + joyport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read_port(); void write_port(int data); void set_interrupt(int state); diff --git a/src/devices/bus/ti99/joyport/mecmouse.cpp b/src/devices/bus/ti99/joyport/mecmouse.cpp index 68e17da3ec1..781b7b9d35e 100644 --- a/src/devices/bus/ti99/joyport/mecmouse.cpp +++ b/src/devices/bus/ti99/joyport/mecmouse.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(TI99_MECMOUSE, bus::ti99::joyport::mecmouse_device, "ti99_mec namespace bus::ti99::joyport { -mecmouse_device::mecmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mecmouse_device::mecmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_MECMOUSE, tag, owner, clock) , device_ti99_joyport_interface(mconfig, *this) , m_mousex(*this, "MOUSEX") diff --git a/src/devices/bus/ti99/joyport/mecmouse.h b/src/devices/bus/ti99/joyport/mecmouse.h index 0ee23ade546..393bfcb26da 100644 --- a/src/devices/bus/ti99/joyport/mecmouse.h +++ b/src/devices/bus/ti99/joyport/mecmouse.h @@ -21,7 +21,7 @@ namespace bus::ti99::joyport { class mecmouse_device : public device_t, public device_ti99_joyport_interface { public: - mecmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mecmouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read_dev() override; void write_dev(uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/bwg.cpp b/src/devices/bus/ti99/peb/bwg.cpp index 4950943a8a8..8d2526fbe4b 100644 --- a/src/devices/bus/ti99/peb/bwg.cpp +++ b/src/devices/bus/ti99/peb/bwg.cpp @@ -79,7 +79,7 @@ namespace bus::ti99::peb { Modern implementation */ -snug_bwg_device::snug_bwg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +snug_bwg_device::snug_bwg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_BWG, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_DRQ(), m_IRQ(), @@ -637,7 +637,7 @@ void snug_bwg_device::device_add_mconfig(machine_config& config) m_crulatch8_15->q_out_cb<2>().set(FUNC(snug_bwg_device::dden_w)); // TODO: Replace this by the actual 74HC4538 - TTL74123(config, m_motormf, 0); + TTL74123(config, m_motormf); m_motormf->out_cb().set(FUNC(snug_bwg_device::motorona_w)); m_motormf->set_connection_type(TTL74123_GROUNDED); m_motormf->set_resistor_value(RES_K(200)); diff --git a/src/devices/bus/ti99/peb/bwg.h b/src/devices/bus/ti99/peb/bwg.h index 671f584dc9a..2dfdd61a59a 100644 --- a/src/devices/bus/ti99/peb/bwg.h +++ b/src/devices/bus/ti99/peb/bwg.h @@ -29,7 +29,7 @@ namespace bus::ti99::peb { class snug_bwg_device : public device_t, public device_ti99_peribox_card_interface { public: - snug_bwg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snug_bwg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/cc_fdc.cpp b/src/devices/bus/ti99/peb/cc_fdc.cpp index 6762dea8a05..f66600182ee 100644 --- a/src/devices/bus/ti99/peb/cc_fdc.cpp +++ b/src/devices/bus/ti99/peb/cc_fdc.cpp @@ -72,7 +72,7 @@ namespace bus::ti99::peb { // ---------------------------------- -corcomp_fdc_device::corcomp_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock): +corcomp_fdc_device::corcomp_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, type, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_wdc(*this, WDC_TAG), @@ -490,7 +490,7 @@ void corcomp_fdc_device::common_config(machine_config& config) m_wdc->drq_wr_callback().set(FUNC(corcomp_fdc_device::fdc_drq_w)); m_wdc->hld_wr_callback().set(FUNC(corcomp_fdc_device::fdc_hld_w)); - TMS9901(config, m_tms9901, 0); + TMS9901(config, m_tms9901); m_tms9901->read_cb().set(FUNC(corcomp_fdc_device::tms9901_input)); // Outputs @@ -519,7 +519,7 @@ void corcomp_fdc_device::common_config(machine_config& config) m_tms9901->p_out_cb(11).set(FUNC(corcomp_fdc_device::select_bank)); // Motor monoflop - TTL74123(config, m_motormf, 0); + TTL74123(config, m_motormf); m_motormf->set_connection_type(TTL74123_GROUNDED); m_motormf->set_resistor_value(RES_K(100)); m_motormf->set_capacitor_value(CAP_U(47)); @@ -541,7 +541,7 @@ void corcomp_fdc_device::common_config(machine_config& config) // Original CorComp Disk Controller Card (PEB-DCC) // ============================================================================ -corcomp_dcc_device::corcomp_dcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +corcomp_dcc_device::corcomp_dcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): corcomp_fdc_device(mconfig, TI99_CCDCC, tag, owner, clock) { } @@ -555,8 +555,8 @@ void corcomp_dcc_device::device_add_mconfig(machine_config& config) m_tms9901->p_out_cb(3).set(WDC_TAG, FUNC(wd_fdc_device_base::hlt_w)); // PAL circuits are connected in device_config_complete - CCDCC_PALU2(config, CCDCC_PALU2_TAG, 0); - CCDCC_PALU1(config, CCDCC_PALU1_TAG, 0); + CCDCC_PALU2(config, CCDCC_PALU2_TAG); + CCDCC_PALU1(config, CCDCC_PALU1_TAG); } ROM_START( cc_dcc ) @@ -586,14 +586,14 @@ const tiny_rom_entry *corcomp_dcc_device::device_rom_region() const // PAL circuits on the CorComp board // ======================================================================== -ccfdc_dec_pal_device::ccfdc_dec_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ccfdc_dec_pal_device::ccfdc_dec_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_board(nullptr), m_tms9901(*owner, TMS9901_TAG) { } -ccfdc_sel_pal_device::ccfdc_sel_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ccfdc_sel_pal_device::ccfdc_sel_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_board(nullptr), m_decpal(nullptr), @@ -677,12 +677,12 @@ READ_LINE_MEMBER( ccfdc_sel_pal_device::selectdsr ) // selector PAL u1. // ======================================================================== -ccdcc_palu2_device::ccdcc_palu2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ccdcc_palu2_device::ccdcc_palu2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ccfdc_dec_pal_device(mconfig, CCDCC_PALU2, tag, owner, clock) { } -ccdcc_palu1_device::ccdcc_palu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ccdcc_palu1_device::ccdcc_palu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ccfdc_sel_pal_device(mconfig, CCDCC_PALU1, tag, owner, clock) { } @@ -715,7 +715,7 @@ void ccdcc_palu1_device::device_config_complete() // Revised CorComp floppy disk controller card REV A // ============================================================================ -corcomp_fdca_device::corcomp_fdca_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +corcomp_fdca_device::corcomp_fdca_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): corcomp_fdc_device(mconfig, TI99_CCFDC, tag, owner, clock) { } @@ -726,8 +726,8 @@ void corcomp_fdca_device::device_add_mconfig(machine_config& config) common_config(config); // PAL circuits are connected in device_config_complete - CCFDC_PALU12(config, CCFDC_PALU12_TAG, 0); - CCFDC_PALU6(config, CCFDC_PALU6_TAG, 0); + CCFDC_PALU12(config, CCFDC_PALU12_TAG); + CCFDC_PALU6(config, CCFDC_PALU6_TAG); } /* @@ -764,7 +764,7 @@ const tiny_rom_entry *corcomp_fdca_device::device_rom_region() const // selector PAL u6. // ======================================================================== -ccfdc_palu12_device::ccfdc_palu12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ccfdc_palu12_device::ccfdc_palu12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ccfdc_dec_pal_device(mconfig, CCFDC_PALU12, tag, owner, clock) { } @@ -778,7 +778,7 @@ READ_LINE_MEMBER( ccfdc_palu12_device::address9901 ) return ((m_board->get_address() & 0xffc0)==0x1100)? ASSERT_LINE : CLEAR_LINE; } -ccfdc_palu6_device::ccfdc_palu6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ccfdc_palu6_device::ccfdc_palu6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ccfdc_sel_pal_device(mconfig, CCFDC_PALU6, tag, owner, clock) { } diff --git a/src/devices/bus/ti99/peb/cc_fdc.h b/src/devices/bus/ti99/peb/cc_fdc.h index e72bfa3ea57..cc7ad85a924 100644 --- a/src/devices/bus/ti99/peb/cc_fdc.h +++ b/src/devices/bus/ti99/peb/cc_fdc.h @@ -57,7 +57,7 @@ public: DECLARE_WRITE_LINE_MEMBER( select_bank ); protected: - corcomp_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + corcomp_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void device_start() override; void device_reset() override; @@ -130,7 +130,7 @@ protected: class corcomp_dcc_device : public corcomp_fdc_device { public: - corcomp_dcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + corcomp_dcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: void device_add_mconfig(machine_config &config) override; void device_config_complete() override; @@ -147,7 +147,7 @@ public: virtual DECLARE_READ_LINE_MEMBER(address9901); protected: - ccfdc_dec_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ccfdc_dec_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void device_start() override { } void device_config_complete() override; @@ -167,7 +167,7 @@ public: virtual DECLARE_READ_LINE_MEMBER(ready_out) =0; protected: - ccfdc_sel_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ccfdc_sel_pal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void device_start() override { } virtual void device_config_complete() override =0; @@ -184,7 +184,7 @@ protected: class ccdcc_palu2_device : public ccfdc_dec_pal_device { public: - ccdcc_palu2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ccdcc_palu2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // =========== Specific selector PAL circuit of the CCDCC ================ @@ -192,7 +192,7 @@ public: class ccdcc_palu1_device : public ccfdc_sel_pal_device { public: - ccdcc_palu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ccdcc_palu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_READ_LINE_MEMBER(ready_out) override; private: @@ -208,7 +208,7 @@ class corcomp_fdca_device : public corcomp_fdc_device friend class ccfdc_palu6_device; public: - corcomp_fdca_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + corcomp_fdca_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: void device_add_mconfig(machine_config &config) override; void device_config_complete() override; @@ -221,7 +221,7 @@ private: class ccfdc_palu12_device : public ccfdc_dec_pal_device { public: - ccfdc_palu12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ccfdc_palu12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_READ_LINE_MEMBER(address9901) override; }; @@ -230,7 +230,7 @@ public: class ccfdc_palu6_device : public ccfdc_sel_pal_device { public: - ccfdc_palu6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ccfdc_palu6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_READ_LINE_MEMBER(selectwdc) override; DECLARE_READ_LINE_MEMBER(selectdsr) override; diff --git a/src/devices/bus/ti99/peb/evpc.cpp b/src/devices/bus/ti99/peb/evpc.cpp index 974d786d8ee..df8352bffd0 100644 --- a/src/devices/bus/ti99/peb/evpc.cpp +++ b/src/devices/bus/ti99/peb/evpc.cpp @@ -61,7 +61,7 @@ namespace bus::ti99::peb { #define EVPC_CRU_BASE 0x1400 #define SOUNDCHIP_TAG "soundchip" -snug_enhanced_video_device::snug_enhanced_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +snug_enhanced_video_device::snug_enhanced_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_EVPC, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/bus/ti99/peb/evpc.h b/src/devices/bus/ti99/peb/evpc.h index 683933a5780..cea096e7507 100644 --- a/src/devices/bus/ti99/peb/evpc.h +++ b/src/devices/bus/ti99/peb/evpc.h @@ -29,7 +29,7 @@ namespace bus::ti99::peb { class snug_enhanced_video_device : public device_t, public device_ti99_peribox_card_interface, public device_nvram_interface { public: - snug_enhanced_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snug_enhanced_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; void setaddress_dbin(offs_t offset, int state) override; diff --git a/src/devices/bus/ti99/peb/forti.cpp b/src/devices/bus/ti99/peb/forti.cpp index 0ee053a740c..b573ea5556d 100644 --- a/src/devices/bus/ti99/peb/forti.cpp +++ b/src/devices/bus/ti99/peb/forti.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(TI99_FORTI, bus::ti99::peb::forti_device, "ti99_forti", "FORT namespace bus::ti99::peb { -forti_device::forti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +forti_device::forti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_FORTI, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_generator1(*this, FORTI_GEN1_TAG), diff --git a/src/devices/bus/ti99/peb/forti.h b/src/devices/bus/ti99/peb/forti.h index 69ad6ddfcab..991640621d0 100644 --- a/src/devices/bus/ti99/peb/forti.h +++ b/src/devices/bus/ti99/peb/forti.h @@ -25,7 +25,7 @@ namespace bus::ti99::peb { class forti_device : public device_t, public device_ti99_peribox_card_interface { public: - forti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + forti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data) override; void readz(offs_t offset, uint8_t *value) override; void crureadz(offs_t offset, uint8_t *value) override { } diff --git a/src/devices/bus/ti99/peb/hfdc.cpp b/src/devices/bus/ti99/peb/hfdc.cpp index d760f09da20..e7e5c244c38 100644 --- a/src/devices/bus/ti99/peb/hfdc.cpp +++ b/src/devices/bus/ti99/peb/hfdc.cpp @@ -95,7 +95,7 @@ namespace bus::ti99::peb { /* Constructor for the HFDC card. */ -myarc_hfdc_device::myarc_hfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +myarc_hfdc_device::myarc_hfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_HFDC, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_motor_on_timer(nullptr), @@ -1070,7 +1070,7 @@ ROM_END void myarc_hfdc_device::device_add_mconfig(machine_config& config) { - HDC9234(config, m_hdc9234, 0); + HDC9234(config, m_hdc9234); m_hdc9234->intrq_cb().set(FUNC(myarc_hfdc_device::intrq_w)); m_hdc9234->dmarq_cb().set(FUNC(myarc_hfdc_device::dmarq_w)); m_hdc9234->dip_cb().set(FUNC(myarc_hfdc_device::dip_w)); @@ -1089,7 +1089,7 @@ void myarc_hfdc_device::device_add_mconfig(machine_config& config) MFM_HD_CONNECTOR(config, "h2", hfdc_harddisks, nullptr, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT); MFM_HD_CONNECTOR(config, "h3", hfdc_harddisks, nullptr, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT); - MM58274C(config, CLOCK_TAG, 0).set_mode_and_day(1, 0); // 24h, sunday + MM58274C(config, CLOCK_TAG).set_mode_and_day(1, 0); // 24h, sunday RAM(config, BUFFER).set_default_size("32K").set_default_value(0); } diff --git a/src/devices/bus/ti99/peb/hfdc.h b/src/devices/bus/ti99/peb/hfdc.h index ee167421e48..4eeb5cc823d 100644 --- a/src/devices/bus/ti99/peb/hfdc.h +++ b/src/devices/bus/ti99/peb/hfdc.h @@ -35,7 +35,7 @@ namespace bus::ti99::peb { class myarc_hfdc_device : public device_t, public device_ti99_peribox_card_interface { public: - myarc_hfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + myarc_hfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void readz(offs_t offset, uint8_t *value) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/horizon.cpp b/src/devices/bus/ti99/peb/horizon.cpp index 4f45d0021e9..aaba4095e6c 100644 --- a/src/devices/bus/ti99/peb/horizon.cpp +++ b/src/devices/bus/ti99/peb/horizon.cpp @@ -150,7 +150,7 @@ namespace bus::ti99::peb { #define OPT32K_TAG "m32_ram" #define RAM16M_TAG "m31_m0_ram" -horizon_ramdisk_device::horizon_ramdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +horizon_ramdisk_device::horizon_ramdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_HORIZON, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/bus/ti99/peb/horizon.h b/src/devices/bus/ti99/peb/horizon.h index 77643cd9ba3..bb13b7a9987 100644 --- a/src/devices/bus/ti99/peb/horizon.h +++ b/src/devices/bus/ti99/peb/horizon.h @@ -25,7 +25,7 @@ namespace bus::ti99::peb { class horizon_ramdisk_device : public device_t, public device_ti99_peribox_card_interface, public device_nvram_interface { public: - horizon_ramdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + horizon_ramdisk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/hsgpl.cpp b/src/devices/bus/ti99/peb/hsgpl.cpp index fc687b25785..70086b2bec4 100644 --- a/src/devices/bus/ti99/peb/hsgpl.cpp +++ b/src/devices/bus/ti99/peb/hsgpl.cpp @@ -151,7 +151,7 @@ namespace bus::ti99::peb { #define GROM_A_EEPROM "u1_grom" #define ROM6_EEPROM "u6_rom6" -snug_high_speed_gpl_device::snug_high_speed_gpl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +snug_high_speed_gpl_device::snug_high_speed_gpl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_HSGPL, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_dsr_eeprom(*this, DSR_EEPROM), diff --git a/src/devices/bus/ti99/peb/hsgpl.h b/src/devices/bus/ti99/peb/hsgpl.h index 6d946b1ac64..3f229c63363 100644 --- a/src/devices/bus/ti99/peb/hsgpl.h +++ b/src/devices/bus/ti99/peb/hsgpl.h @@ -27,7 +27,7 @@ namespace bus::ti99::peb { class snug_high_speed_gpl_device : public device_t, public device_ti99_peribox_card_interface { public: - snug_high_speed_gpl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snug_high_speed_gpl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/memex.cpp b/src/devices/bus/ti99/peb/memex.cpp index 1ee9bf423e1..5de2aa8bf2d 100644 --- a/src/devices/bus/ti99/peb/memex.cpp +++ b/src/devices/bus/ti99/peb/memex.cpp @@ -43,7 +43,7 @@ enum MDIP8 = 0x80 }; -geneve_memex_device::geneve_memex_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +geneve_memex_device::geneve_memex_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_MEMEX, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_ram(*this, RAMREGION) @@ -171,7 +171,7 @@ INPUT_PORTS_END void geneve_memex_device::device_add_mconfig(machine_config &config) { - RAM(config, m_ram, 0); + RAM(config, m_ram); m_ram->set_default_size("2M"); m_ram->set_default_value(0); } diff --git a/src/devices/bus/ti99/peb/memex.h b/src/devices/bus/ti99/peb/memex.h index 32c56326d47..114e61d4cae 100644 --- a/src/devices/bus/ti99/peb/memex.h +++ b/src/devices/bus/ti99/peb/memex.h @@ -23,7 +23,7 @@ namespace bus::ti99::peb { class geneve_memex_device : public device_t, public device_ti99_peribox_card_interface { public: - geneve_memex_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + geneve_memex_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/myarcfdc.cpp b/src/devices/bus/ti99/peb/myarcfdc.cpp index 7df7cf0d261..560213d39d1 100644 --- a/src/devices/bus/ti99/peb/myarcfdc.cpp +++ b/src/devices/bus/ti99/peb/myarcfdc.cpp @@ -54,7 +54,7 @@ namespace bus::ti99::peb { // ---------------------------------- -myarc_fdc_device::myarc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +myarc_fdc_device::myarc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_DDCC1, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_wdc(nullptr), @@ -456,7 +456,7 @@ void myarc_fdc_device::device_add_mconfig(machine_config& config) RAM(config, BUFFER_TAG).set_default_size("2k").set_default_value(0); // PAL circuit - DDCC1_PAL(config, PAL_TAG, 0); + DDCC1_PAL(config, PAL_TAG); // Floppy drives FLOPPY_CONNECTOR(config, "0", myarc_ddcc_floppies, "525dd", myarc_fdc_device::floppy_formats).enable_sound(true); @@ -479,7 +479,7 @@ const tiny_rom_entry *myarc_fdc_device::device_rom_region() const // PAL circuit on the DDCC-1 board // ======================================================================== -ddcc1_pal_device::ddcc1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ddcc1_pal_device::ddcc1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DDCC1_PAL, tag, owner, clock), m_board(nullptr) { diff --git a/src/devices/bus/ti99/peb/myarcfdc.h b/src/devices/bus/ti99/peb/myarcfdc.h index 89106b73e5a..156a5a9a2fd 100644 --- a/src/devices/bus/ti99/peb/myarcfdc.h +++ b/src/devices/bus/ti99/peb/myarcfdc.h @@ -29,7 +29,7 @@ class myarc_fdc_device : public device_t, public device_ti99_peribox_card_interf friend class ddcc1_pal_device; public: - myarc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + myarc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; @@ -112,7 +112,7 @@ private: class ddcc1_pal_device : public device_t { public: - ddcc1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ddcc1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Selector output lines of the PAL bool ramsel(); diff --git a/src/devices/bus/ti99/peb/myarcmem.cpp b/src/devices/bus/ti99/peb/myarcmem.cpp index edee7601c80..09c2aeb14f2 100644 --- a/src/devices/bus/ti99/peb/myarcmem.cpp +++ b/src/devices/bus/ti99/peb/myarcmem.cpp @@ -44,7 +44,7 @@ enum SIZE_512 }; -myarc_memory_expansion_device::myarc_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +myarc_memory_expansion_device::myarc_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_MYARCMEM, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_ram(*this, RAM_TAG), diff --git a/src/devices/bus/ti99/peb/myarcmem.h b/src/devices/bus/ti99/peb/myarcmem.h index b641dfafcc3..641c4a8cb7b 100644 --- a/src/devices/bus/ti99/peb/myarcmem.h +++ b/src/devices/bus/ti99/peb/myarcmem.h @@ -23,7 +23,7 @@ namespace bus::ti99::peb { class myarc_memory_expansion_device : public device_t, public device_ti99_peribox_card_interface { public: - myarc_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + myarc_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/pcode.cpp b/src/devices/bus/ti99/peb/pcode.cpp index 0c5e4e4fb57..867b97f4d5b 100644 --- a/src/devices/bus/ti99/peb/pcode.cpp +++ b/src/devices/bus/ti99/peb/pcode.cpp @@ -97,7 +97,7 @@ namespace bus::ti99::peb { #define CRU_BASE 0x1f00 -ti_pcode_card_device::ti_pcode_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ti_pcode_card_device::ti_pcode_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_P_CODE, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_groms(*this, "grom%u", 0U), diff --git a/src/devices/bus/ti99/peb/pcode.h b/src/devices/bus/ti99/peb/pcode.h index dd1ce542d1a..0ae6811c2ff 100644 --- a/src/devices/bus/ti99/peb/pcode.h +++ b/src/devices/bus/ti99/peb/pcode.h @@ -26,7 +26,7 @@ namespace bus::ti99::peb { class ti_pcode_card_device : public device_t, public device_ti99_peribox_card_interface { public: - ti_pcode_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti_pcode_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; void crureadz(offs_t offset, uint8_t *value) override; diff --git a/src/devices/bus/ti99/peb/peribox.cpp b/src/devices/bus/ti99/peb/peribox.cpp index cc8b07500f0..f110de2c535 100644 --- a/src/devices/bus/ti99/peb/peribox.cpp +++ b/src/devices/bus/ti99/peb/peribox.cpp @@ -243,7 +243,7 @@ namespace bus::ti99::peb { /* Constructor called from subclasses. */ -peribox_device::peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock): +peribox_device::peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock): bus::ti99::internal::ioport_attached_device(mconfig, type, tag, owner, clock), m_slot1_inta(*this), m_slot1_intb(*this), @@ -268,7 +268,7 @@ peribox_device::peribox_device(const machine_config &mconfig, device_type type, for (int i=2; i <= 8; i++) m_slot[i] = nullptr; } -peribox_device::peribox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +peribox_device::peribox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : peribox_device(mconfig, TI99_PERIBOX, tag, owner, clock) { // The address prefix represents a set of pull-up resistors for the @@ -522,7 +522,7 @@ void peribox_device::device_add_mconfig(machine_config &config) A variant of the box used for the TI-99/4A with EVPC. *****************************************************************************/ -peribox_ev_device::peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +peribox_ev_device::peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : peribox_device(mconfig, TI99_PERIBOX_EV, tag, owner, clock) { m_address_prefix = 0x70000; @@ -569,7 +569,7 @@ void peribox_ev_device::device_add_mconfig(machine_config &config) A variant of the box used for the Geneve. *****************************************************************************/ -peribox_gen_device::peribox_gen_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock): +peribox_gen_device::peribox_gen_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock): peribox_device(mconfig, type, tag, owner, clock) { // The Geneve sits in slot 1; there is no prefix here - it can control @@ -578,12 +578,12 @@ peribox_gen_device::peribox_gen_device(const machine_config &mconfig, device_typ m_address_prefix = 0x00000; } -peribox_gen_device::peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +peribox_gen_device::peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : peribox_gen_device(mconfig, TI99_PERIBOX_GEN, tag, owner, clock) { } -peribox_genmod_device::peribox_genmod_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +peribox_genmod_device::peribox_genmod_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : peribox_gen_device(mconfig, TI99_PERIBOX_GENMOD, tag, owner, clock) { } @@ -638,7 +638,7 @@ void peribox_genmod_device::device_add_mconfig(machine_config &config) A variant of the box used for the SGCPU (aka TI-99/4P). *****************************************************************************/ -peribox_sg_device::peribox_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +peribox_sg_device::peribox_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : peribox_device(mconfig, TI99_PERIBOX_SG, tag, owner, clock) { // The SGCPU card contains pull-up registers for the AMA/AMB/AMC lines @@ -685,7 +685,7 @@ void peribox_sg_device::device_add_mconfig(machine_config &config) Implementation of a slot within the box. ****************************************************************************/ -peribox_slot_device::peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +peribox_slot_device::peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_PERIBOX_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_card(nullptr), diff --git a/src/devices/bus/ti99/peb/peribox.h b/src/devices/bus/ti99/peb/peribox.h index b54467f1055..803431dd97a 100644 --- a/src/devices/bus/ti99/peb/peribox.h +++ b/src/devices/bus/ti99/peb/peribox.h @@ -34,7 +34,7 @@ class peribox_device : public bus::ti99::internal::ioport_attached_device { friend class peribox_slot_device; public: - peribox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + peribox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Next eight methods are called from the console void readz(offs_t offset, uint8_t *value) override; @@ -63,7 +63,7 @@ public: auto lcp_cb() { return m_slot1_lcp.bind(); } protected: - peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_config_complete() override; @@ -122,7 +122,7 @@ protected: class peribox_sg_device : public peribox_device { public: - peribox_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + peribox_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void device_add_mconfig(machine_config &config) override; @@ -134,7 +134,7 @@ protected: class peribox_ev_device : public peribox_device { public: - peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void device_add_mconfig(machine_config &config) override; @@ -147,10 +147,10 @@ protected: class peribox_gen_device : public peribox_device { public: - peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - peribox_gen_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + peribox_gen_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; }; @@ -160,7 +160,7 @@ protected: class peribox_genmod_device : public peribox_gen_device { public: - peribox_genmod_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + peribox_genmod_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void device_add_mconfig(machine_config &config) override; @@ -217,7 +217,7 @@ class peribox_slot_device : public device_t, public device_single_card_slot_inte public: template peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, int slot, U &&opts, const char *dflt) - : peribox_slot_device(mconfig, tag, owner, 0) + : peribox_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -226,7 +226,7 @@ public: m_slotnumber = slot; } - peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Called from the box (direction to card) void readz(offs_t offset, uint8_t *value); diff --git a/src/devices/bus/ti99/peb/pgram.cpp b/src/devices/bus/ti99/peb/pgram.cpp index c6ece9407a0..e01781b52b6 100644 --- a/src/devices/bus/ti99/peb/pgram.cpp +++ b/src/devices/bus/ti99/peb/pgram.cpp @@ -145,7 +145,7 @@ DEFINE_DEVICE_TYPE(TI99_PGRAM, bus::ti99::peb::pgram_device, "ti99_pgram", "PGRA namespace bus::ti99::peb { -pgram_device::pgram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +pgram_device::pgram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, TI99_PGRAM, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_gram3(*this, GRAM3_TAG), @@ -500,12 +500,12 @@ void pgram_device::device_add_mconfig(machine_config& config) LS259(config, m_crulatch); // u14 // Bank switch - TTL7474(config, m_bankff, 0); + TTL7474(config, m_bankff); // We allocate the space for PGRAM+ - BUFF_RAM(config, GRAM4567_TAG, 0).set_size(128*1024); - BUFF_RAM(config, GRAM3_TAG, 0).set_size(32*1024); - BUFF_RAM(config, DSRRAM_TAG, 0).set_size(32*1024); + BUFF_RAM(config, GRAM4567_TAG).set_size(128*1024); + BUFF_RAM(config, GRAM3_TAG).set_size(32*1024); + BUFF_RAM(config, DSRRAM_TAG).set_size(32*1024); // Real-time clock MM58167(config, CLOCK_TAG, 32.768_kHz_XTAL); diff --git a/src/devices/bus/ti99/peb/pgram.h b/src/devices/bus/ti99/peb/pgram.h index d050c3deac7..1c5ef98343a 100644 --- a/src/devices/bus/ti99/peb/pgram.h +++ b/src/devices/bus/ti99/peb/pgram.h @@ -29,7 +29,7 @@ namespace bus::ti99::peb { class pgram_device : public device_t, public device_ti99_peribox_card_interface { public: - pgram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pgram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data) override; void readz(offs_t offset, uint8_t *value) override; void crureadz(offs_t offset, uint8_t *value) override { } diff --git a/src/devices/bus/ti99/peb/samsmem.cpp b/src/devices/bus/ti99/peb/samsmem.cpp index d38f877fc9f..497f33439a0 100644 --- a/src/devices/bus/ti99/peb/samsmem.cpp +++ b/src/devices/bus/ti99/peb/samsmem.cpp @@ -34,7 +34,7 @@ namespace bus::ti99::peb { #define SAMS_CRU_BASE 0x1e00 -sams_memory_expansion_device::sams_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sams_memory_expansion_device::sams_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_SAMSMEM, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_ram(*this, RAM_TAG), diff --git a/src/devices/bus/ti99/peb/samsmem.h b/src/devices/bus/ti99/peb/samsmem.h index 8cf3105cc85..4bc8fd745dd 100644 --- a/src/devices/bus/ti99/peb/samsmem.h +++ b/src/devices/bus/ti99/peb/samsmem.h @@ -26,7 +26,7 @@ namespace bus::ti99::peb { class sams_memory_expansion_device : public device_t, public device_ti99_peribox_card_interface { public: - sams_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sams_memory_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/scsicard.cpp b/src/devices/bus/ti99/peb/scsicard.cpp index 5f9dfbf19e6..ec612ee3018 100644 --- a/src/devices/bus/ti99/peb/scsicard.cpp +++ b/src/devices/bus/ti99/peb/scsicard.cpp @@ -141,7 +141,7 @@ DEFINE_DEVICE_TYPE(WHTSCSI_PLD, bus::ti99::peb::whtscsi_pld_device, PLD_TAG, "WH namespace bus::ti99::peb { -whtech_scsi_card_device::whtech_scsi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +whtech_scsi_card_device::whtech_scsi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_WHTSCSI, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_buffer_ram(*this, BUFFER), @@ -373,7 +373,7 @@ void whtech_scsi_card_device::device_add_mconfig(machine_config &config) RAM(config, BUFFER).set_default_size("32K").set_default_value(0); // PLD circuit - WHTSCSI_PLD(config, PLD_TAG, 0); + WHTSCSI_PLD(config, PLD_TAG); // SCSI bus NSCSI_BUS(config, m_scsibus); @@ -487,7 +487,7 @@ ioport_constructor whtech_scsi_card_device::device_input_ports() const // PLD circuit on the board // ======================================================================== -whtscsi_pld_device::whtscsi_pld_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +whtscsi_pld_device::whtscsi_pld_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WHTSCSI_PLD, tag, owner, clock), m_board(nullptr), m_selected(false), diff --git a/src/devices/bus/ti99/peb/scsicard.h b/src/devices/bus/ti99/peb/scsicard.h index a55ad228886..998879005c0 100644 --- a/src/devices/bus/ti99/peb/scsicard.h +++ b/src/devices/bus/ti99/peb/scsicard.h @@ -27,7 +27,7 @@ class whtech_scsi_card_device : public device_t, public device_ti99_peribox_card friend class whtscsi_pld_device; public: - whtech_scsi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + whtech_scsi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; void setaddress_dbin(offs_t offset, int state) override; @@ -91,7 +91,7 @@ private: class whtscsi_pld_device : public device_t { public: - whtscsi_pld_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + whtscsi_pld_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void crureadz(offs_t offset, uint8_t *value); void cruwrite(offs_t offset, uint8_t data); diff --git a/src/devices/bus/ti99/peb/sidmaster.cpp b/src/devices/bus/ti99/peb/sidmaster.cpp index 9b6eb0af129..8a3aa2b6ca6 100644 --- a/src/devices/bus/ti99/peb/sidmaster.cpp +++ b/src/devices/bus/ti99/peb/sidmaster.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(TI99_SIDMASTER, bus::ti99::peb::sidmaster_device, "ti99_sidma namespace bus::ti99::peb { -sidmaster_device::sidmaster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sidmaster_device::sidmaster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_SIDMASTER, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_sid(*this, "sid") diff --git a/src/devices/bus/ti99/peb/sidmaster.h b/src/devices/bus/ti99/peb/sidmaster.h index 63965c9c5d0..8f1622d8aea 100644 --- a/src/devices/bus/ti99/peb/sidmaster.h +++ b/src/devices/bus/ti99/peb/sidmaster.h @@ -24,7 +24,7 @@ namespace bus::ti99::peb { class sidmaster_device : public device_t, public device_ti99_peribox_card_interface { public: - sidmaster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sidmaster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override { }; // No read void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/spchsyn.cpp b/src/devices/bus/ti99/peb/spchsyn.cpp index 302758f3f4e..230139e5a3c 100644 --- a/src/devices/bus/ti99/peb/spchsyn.cpp +++ b/src/devices/bus/ti99/peb/spchsyn.cpp @@ -42,7 +42,7 @@ namespace bus::ti99::peb { /****************************************************************************/ -ti_speech_synthesizer_device::ti_speech_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ti_speech_synthesizer_device::ti_speech_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_SPEECH, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_vsp(*this, "vsp"), @@ -154,7 +154,7 @@ ROM_END void ti_speech_synthesizer_device::device_add_mconfig(machine_config& config) { - SPEECHROM(config, "vsm", 0).set_reverse_bit_order(true); + SPEECHROM(config, "vsm").set_reverse_bit_order(true); SPEAKER(config, "speech_out").front_center(); CD2501E(config, m_vsp, 640000L); m_vsp->set_speechrom_tag("vsm"); diff --git a/src/devices/bus/ti99/peb/spchsyn.h b/src/devices/bus/ti99/peb/spchsyn.h index 5bf71658e4b..10844cccedd 100644 --- a/src/devices/bus/ti99/peb/spchsyn.h +++ b/src/devices/bus/ti99/peb/spchsyn.h @@ -24,7 +24,7 @@ namespace bus::ti99::peb { class ti_speech_synthesizer_device : public device_t, public device_ti99_peribox_card_interface { public: - ti_speech_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti_speech_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; void setaddress_dbin(offs_t offset, int state) override; diff --git a/src/devices/bus/ti99/peb/ti_32kmem.cpp b/src/devices/bus/ti99/peb/ti_32kmem.cpp index 1f9404bd1e1..22b02ace4dc 100644 --- a/src/devices/bus/ti99/peb/ti_32kmem.cpp +++ b/src/devices/bus/ti99/peb/ti_32kmem.cpp @@ -37,7 +37,7 @@ namespace bus::ti99::peb { #define RAMREGION "ram32k" -ti_32k_expcard_device::ti_32k_expcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ti_32k_expcard_device::ti_32k_expcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_32KMEM, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_ram(*this, RAMREGION) @@ -102,7 +102,7 @@ void ti_32k_expcard_device::device_start() void ti_32k_expcard_device::device_add_mconfig(machine_config &config) { - RAM(config, m_ram, 0); + RAM(config, m_ram); m_ram->set_default_size("32k"); m_ram->set_default_value(0); } diff --git a/src/devices/bus/ti99/peb/ti_32kmem.h b/src/devices/bus/ti99/peb/ti_32kmem.h index 275f85fc6a7..469d2e6ba45 100644 --- a/src/devices/bus/ti99/peb/ti_32kmem.h +++ b/src/devices/bus/ti99/peb/ti_32kmem.h @@ -24,7 +24,7 @@ namespace bus::ti99::peb { class ti_32k_expcard_device : public device_t, public device_ti99_peribox_card_interface { public: - ti_32k_expcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti_32k_expcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99/peb/ti_fdc.cpp b/src/devices/bus/ti99/peb/ti_fdc.cpp index b68147a8193..36ecf8a907c 100644 --- a/src/devices/bus/ti99/peb/ti_fdc.cpp +++ b/src/devices/bus/ti99/peb/ti_fdc.cpp @@ -42,7 +42,7 @@ namespace bus::ti99::peb { #define TI_FDC_TAG "ti_dssd_controller" -ti_fdc_device::ti_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ti_fdc_device::ti_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_FDC, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_address(0), @@ -418,7 +418,7 @@ void ti_fdc_device::device_add_mconfig(machine_config& config) m_crulatch->q_out_cb<6>().set(FUNC(ti_fdc_device::dsel3_w)); m_crulatch->q_out_cb<7>().set(FUNC(ti_fdc_device::sidsel_w)); - TTL74123(config, m_motormf, 0); + TTL74123(config, m_motormf); m_motormf->out_cb().set(FUNC(ti_fdc_device::dvena_w)); m_motormf->set_connection_type(TTL74123_GROUNDED); m_motormf->set_resistor_value(RES_K(200)); diff --git a/src/devices/bus/ti99/peb/ti_fdc.h b/src/devices/bus/ti99/peb/ti_fdc.h index 81c2324dbc9..3fe56cc0d0e 100644 --- a/src/devices/bus/ti99/peb/ti_fdc.h +++ b/src/devices/bus/ti99/peb/ti_fdc.h @@ -27,7 +27,7 @@ namespace bus::ti99::peb { class ti_fdc_device : public device_t, public device_ti99_peribox_card_interface { public: - ti_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; void setaddress_dbin(offs_t offset, int state) override; diff --git a/src/devices/bus/ti99/peb/ti_rs232.cpp b/src/devices/bus/ti99/peb/ti_rs232.cpp index 841acf44ac7..2c9f8e8c7d6 100644 --- a/src/devices/bus/ti99/peb/ti_rs232.cpp +++ b/src/devices/bus/ti99/peb/ti_rs232.cpp @@ -140,7 +140,7 @@ namespace bus::ti99::peb { #define SERDEV1 "serdev1" #define PIODEV "piodev" -ti_rs232_pio_device::ti_rs232_pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ti_rs232_pio_device::ti_rs232_pio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_RS232, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_crulatch(*this, "crulatch"), @@ -170,14 +170,14 @@ ti_rs232_pio_device::ti_rs232_pio_device(const machine_config &mconfig, const ch /**************************************************************************/ /* Ports */ -ti_rs232_attached_device::ti_rs232_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti_rs232_attached_device::ti_rs232_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_RS232_DEV, tag, owner, clock), device_image_interface(mconfig, *this), m_uart(nullptr) { } -ti_pio_attached_device::ti_pio_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti_pio_attached_device::ti_pio_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_PIO_DEV, tag, owner, clock), device_image_interface(mconfig, *this) { @@ -1092,22 +1092,22 @@ INPUT_PORTS_END void ti_rs232_pio_device::device_add_mconfig(machine_config &config) { - TMS9902(config, m_uart0, 3000000); + TMS9902(config, m_uart0, XTAL::u(3000000)); m_uart0->int_cb().set(FUNC(ti_rs232_pio_device::int0_callback)); m_uart0->rcv_cb().set(FUNC(ti_rs232_pio_device::rcv0_callback)); m_uart0->xmit_cb().set(FUNC(ti_rs232_pio_device::xmit0_callback)); m_uart0->ctrl_cb().set(FUNC(ti_rs232_pio_device::ctrl0_callback)); - TMS9902(config, m_uart1, 3000000); + TMS9902(config, m_uart1, XTAL::u(3000000)); m_uart1->int_cb().set(FUNC(ti_rs232_pio_device::int1_callback)); m_uart1->rcv_cb().set(FUNC(ti_rs232_pio_device::rcv1_callback)); m_uart1->xmit_cb().set(FUNC(ti_rs232_pio_device::xmit1_callback)); m_uart1->ctrl_cb().set(FUNC(ti_rs232_pio_device::ctrl1_callback)); - TI99_RS232_DEV(config, m_serdev0, 0); + TI99_RS232_DEV(config, m_serdev0); m_serdev0->connect(m_uart0); - TI99_RS232_DEV(config, m_serdev1, 0); + TI99_RS232_DEV(config, m_serdev1); m_serdev1->connect(m_uart1); - TI99_PIO_DEV(config, m_piodev, 0); + TI99_PIO_DEV(config, m_piodev); LS259(config, m_crulatch); // U12 m_crulatch->q_out_cb<0>().set(FUNC(ti_rs232_pio_device::selected_w)); diff --git a/src/devices/bus/ti99/peb/ti_rs232.h b/src/devices/bus/ti99/peb/ti_rs232.h index e7970538504..e22725dab95 100644 --- a/src/devices/bus/ti99/peb/ti_rs232.h +++ b/src/devices/bus/ti99/peb/ti_rs232.h @@ -30,7 +30,7 @@ class ti_rs232_pio_device : public device_t, public device_ti99_peribox_card_int friend class ti_rs232_attached_device; public: - ti_rs232_pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti_rs232_pio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; @@ -131,7 +131,7 @@ private: class ti_rs232_attached_device : public device_t, public device_image_interface { public: - ti_rs232_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti_rs232_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bool is_readable() const noexcept override { return true; } bool is_writeable() const noexcept override { return true; } @@ -160,7 +160,7 @@ private: class ti_pio_attached_device : public device_t, public device_image_interface { public: - ti_pio_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti_pio_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bool is_readable() const noexcept override { return true; } bool is_writeable() const noexcept override { return true; } diff --git a/src/devices/bus/ti99/peb/tipi.cpp b/src/devices/bus/ti99/peb/tipi.cpp index 92f45710d33..ebe63388352 100644 --- a/src/devices/bus/ti99/peb/tipi.cpp +++ b/src/devices/bus/ti99/peb/tipi.cpp @@ -95,7 +95,7 @@ DEFINE_DEVICE_TYPE(TI99_TIPI_RPI, bus::ti99::peb::tipi_attached_device, "ti99_ti namespace bus::ti99::peb { -tipi_card_device::tipi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tipi_card_device::tipi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_TIPI, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_rpi(*this, RASPI), @@ -643,7 +643,7 @@ INPUT_PORTS_END void tipi_card_device::device_add_mconfig(machine_config &config) { - TI99_TIPI_RPI(config, m_rpi, 0); + TI99_TIPI_RPI(config, m_rpi); } ROM_START( tipi ) @@ -666,7 +666,7 @@ ioport_constructor tipi_card_device::device_input_ports() const /* Connection to the external device, a Raspberry PI */ -tipi_attached_device::tipi_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tipi_attached_device::tipi_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_TIPI_RPI, tag, owner, clock), device_image_interface(mconfig, *this) { diff --git a/src/devices/bus/ti99/peb/tipi.h b/src/devices/bus/ti99/peb/tipi.h index 3703e246599..b4c5c8de1b0 100644 --- a/src/devices/bus/ti99/peb/tipi.h +++ b/src/devices/bus/ti99/peb/tipi.h @@ -28,7 +28,7 @@ class tipi_card_device : public device_t, public device_ti99_peribox_card_interf { public: - tipi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tipi_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; void setaddress_dbin(offs_t offset, int state) override; @@ -101,7 +101,7 @@ private: class tipi_attached_device : public device_t, public device_image_interface { public: - tipi_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tipi_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bool is_readable() const noexcept override { return true; } bool is_writeable() const noexcept override { return true; } diff --git a/src/devices/bus/ti99/peb/tn_ide.cpp b/src/devices/bus/ti99/peb/tn_ide.cpp index f4ae600ce67..a47c8787824 100644 --- a/src/devices/bus/ti99/peb/tn_ide.cpp +++ b/src/devices/bus/ti99/peb/tn_ide.cpp @@ -163,7 +163,7 @@ enum RTC52 }; -nouspikel_ide_card_device::nouspikel_ide_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nouspikel_ide_card_device::nouspikel_ide_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_IDE, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_rtc65(*this, CLOCK65_TAG), @@ -621,10 +621,10 @@ WRITE_LINE_MEMBER(nouspikel_ide_card_device::resetdr_callback) void nouspikel_ide_card_device::device_add_mconfig(machine_config &config) { // Choice of RTC chips - RTC65271(config, m_rtc65, 0); - BQ4847(config, m_rtc47, 0); - BQ4842(config, m_rtc42, 0); - BQ4852(config, m_rtc52, 0); + RTC65271(config, m_rtc65); + BQ4847(config, m_rtc47); + BQ4842(config, m_rtc42); + BQ4852(config, m_rtc52); m_rtc65->interrupt_cb().set(FUNC(nouspikel_ide_card_device::rtc_int_callback)).invert(); m_rtc47->int_handler().set(FUNC(nouspikel_ide_card_device::rtc_int_callback)); @@ -634,18 +634,18 @@ void nouspikel_ide_card_device::device_add_mconfig(machine_config &config) ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, false); m_ata->irq_handler().set(FUNC(nouspikel_ide_card_device::ide_interrupt_callback)); - TTL74543(config, m_latch0_7, 0); + TTL74543(config, m_latch0_7); m_latch0_7->set_ceab_pin_value(0); m_latch0_7->set_ceba_pin_value(0); - TTL74543(config, m_latch8_15, 0); + TTL74543(config, m_latch8_15); m_latch8_15->set_ceab_pin_value(0); m_latch8_15->set_ceba_pin_value(0); LS259(config, m_crulatch); m_crulatch->q_out_cb<7>().set(FUNC(nouspikel_ide_card_device::resetdr_callback)); - BUFF_RAM(config, RAM512_TAG, 0).set_size(512*1024); + BUFF_RAM(config, RAM512_TAG).set_size(512*1024); } void nouspikel_ide_card_device::device_start() diff --git a/src/devices/bus/ti99/peb/tn_ide.h b/src/devices/bus/ti99/peb/tn_ide.h index f3174e2c0ee..32fe4f174cc 100644 --- a/src/devices/bus/ti99/peb/tn_ide.h +++ b/src/devices/bus/ti99/peb/tn_ide.h @@ -29,7 +29,7 @@ namespace bus::ti99::peb { class nouspikel_ide_card_device : public device_t, public device_ti99_peribox_card_interface { public: - nouspikel_ide_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nouspikel_ide_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; void crureadz(offs_t offset, uint8_t *value) override; diff --git a/src/devices/bus/ti99/peb/tn_usbsm.cpp b/src/devices/bus/ti99/peb/tn_usbsm.cpp index 5a2a266661b..36d3935665d 100644 --- a/src/devices/bus/ti99/peb/tn_usbsm.cpp +++ b/src/devices/bus/ti99/peb/tn_usbsm.cpp @@ -65,7 +65,7 @@ enum FEEPROM_WRITE_ENABLE = 0x10 }; -nouspikel_usb_smartmedia_device::nouspikel_usb_smartmedia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nouspikel_usb_smartmedia_device::nouspikel_usb_smartmedia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99_USBSM, tag, owner, clock), device_ti99_peribox_card_interface(mconfig, *this), m_feeprom_page(0), @@ -357,8 +357,8 @@ INPUT_PORTS_END void nouspikel_usb_smartmedia_device::device_add_mconfig(machine_config &config) { - SMARTMEDIA(config, "smartmedia", 0); - STRATAFLASH(config, STRATA_TAG, 0); + SMARTMEDIA(config, "smartmedia"); + STRATAFLASH(config, STRATA_TAG); RAM(config, RAM1_TAG).set_default_size("512K").set_default_value(0); RAM(config, RAM2_TAG).set_default_size("512K").set_default_value(0); } diff --git a/src/devices/bus/ti99/peb/tn_usbsm.h b/src/devices/bus/ti99/peb/tn_usbsm.h index 314e9ec5a5a..e5b0b479026 100644 --- a/src/devices/bus/ti99/peb/tn_usbsm.h +++ b/src/devices/bus/ti99/peb/tn_usbsm.h @@ -26,7 +26,7 @@ namespace bus::ti99::peb { class nouspikel_usb_smartmedia_device : public device_t, public device_ti99_peribox_card_interface { public: - nouspikel_usb_smartmedia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nouspikel_usb_smartmedia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void readz(offs_t offset, uint8_t *value) override; void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/ti99x/990_dk.cpp b/src/devices/bus/ti99x/990_dk.cpp index f9815b2302a..6d1b5ca358c 100644 --- a/src/devices/bus/ti99x/990_dk.cpp +++ b/src/devices/bus/ti99x/990_dk.cpp @@ -42,7 +42,7 @@ enum DEFINE_DEVICE_TYPE(TI99X_FD800, fd800_legacy_device, "ti99x_fd800", "TI FD800 Diablo floppy disk controller") -fd800_legacy_device::fd800_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fd800_legacy_device::fd800_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI99X_FD800, tag, owner, clock), m_recv_buf(0), m_stat_reg(0), m_xmit_buf(0), m_cmd_reg(0), m_interrupt_f_f(0), m_int_line(*this), m_buf_pos(0), m_buf_mode(), m_unit(0), m_sector(0) diff --git a/src/devices/bus/ti99x/990_dk.h b/src/devices/bus/ti99x/990_dk.h index f5079462ccc..809864e0f9f 100644 --- a/src/devices/bus/ti99x/990_dk.h +++ b/src/devices/bus/ti99x/990_dk.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(TI99X_FD800, fd800_legacy_device) class fd800_legacy_device : public device_t { public: - fd800_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd800_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t cru_r(offs_t offset); void cru_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/ti99x/990_hd.cpp b/src/devices/bus/ti99x/990_hd.cpp index d9a35d67b30..f94079ba9e4 100644 --- a/src/devices/bus/ti99x/990_hd.cpp +++ b/src/devices/bus/ti99x/990_hd.cpp @@ -959,7 +959,7 @@ void ti990_hdc_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) DEFINE_DEVICE_TYPE(TI990_HDC, ti990_hdc_device, "ti990_hdc", "Generic TI-990 Hard Disk Controller") -ti990_hdc_device::ti990_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti990_hdc_device::ti990_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI990_HDC, tag, owner, clock) , m_memory_space(*this, finder_base::DUMMY_TAG, -1) , m_interrupt_callback(*this) diff --git a/src/devices/bus/ti99x/990_hd.h b/src/devices/bus/ti99x/990_hd.h index f934775654e..aed1e78395f 100644 --- a/src/devices/bus/ti99x/990_hd.h +++ b/src/devices/bus/ti99x/990_hd.h @@ -13,7 +13,7 @@ class ti990_hdc_device : public device_t { public: - ti990_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti990_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/ti99x/990_tap.cpp b/src/devices/bus/ti99x/990_tap.cpp index dff4f68a7a0..f1b23e56993 100644 --- a/src/devices/bus/ti99x/990_tap.cpp +++ b/src/devices/bus/ti99x/990_tap.cpp @@ -893,7 +893,7 @@ class ti990_tape_image_device : public magtape_image_device { public: // construction/destruction - ti990_tape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti990_tape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual const char *file_extensions() const noexcept override { return "tap"; } @@ -911,7 +911,7 @@ private: DEFINE_DEVICE_TYPE(TI990_TAPE, ti990_tape_image_device, "ti990_tape_image", "TI-990 Magnetic Tape") -ti990_tape_image_device::ti990_tape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti990_tape_image_device::ti990_tape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : magtape_image_device(mconfig, TI990_TAPE, tag, owner, clock) { } @@ -955,7 +955,7 @@ void ti990_tape_image_device::call_unload() DEFINE_DEVICE_TYPE(TI990_TAPE_CTRL, tap_990_device, "ti990_tap", "Generic TI-900 Tape Controller") -tap_990_device::tap_990_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tap_990_device::tap_990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TI990_TAPE_CTRL, tag, owner, clock) , m_memory_space(*this, finder_base::DUMMY_TAG, -1) , m_int_line(*this) @@ -984,8 +984,8 @@ void tap_990_device::device_start() void tap_990_device::device_add_mconfig(machine_config &config) { - TI990_TAPE(config, "tape0", 0); - TI990_TAPE(config, "tape1", 0); - TI990_TAPE(config, "tape2", 0); - TI990_TAPE(config, "tape3", 0); + TI990_TAPE(config, "tape0"); + TI990_TAPE(config, "tape1"); + TI990_TAPE(config, "tape2"); + TI990_TAPE(config, "tape3"); } diff --git a/src/devices/bus/ti99x/990_tap.h b/src/devices/bus/ti99x/990_tap.h index 00168cd896b..bc6db4c5cb6 100644 --- a/src/devices/bus/ti99x/990_tap.h +++ b/src/devices/bus/ti99x/990_tap.h @@ -13,7 +13,7 @@ DECLARE_DEVICE_TYPE(TI990_TAPE_CTRL, tap_990_device) class tap_990_device : public device_t { public: - tap_990_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tap_990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/tiki100/8088.cpp b/src/devices/bus/tiki100/8088.cpp index 28fd3e16c0d..39628b91d90 100644 --- a/src/devices/bus/tiki100/8088.cpp +++ b/src/devices/bus/tiki100/8088.cpp @@ -73,7 +73,7 @@ void tiki100_8088_device::i8088_io(address_map &map) void tiki100_8088_device::device_add_mconfig(machine_config &config) { - I8088(config, m_maincpu, 6000000); + I8088(config, m_maincpu, XTAL::u(6000000)); m_maincpu->set_addrmap(AS_PROGRAM, &tiki100_8088_device::i8088_mem); m_maincpu->set_addrmap(AS_IO, &tiki100_8088_device::i8088_io); } @@ -88,7 +88,7 @@ void tiki100_8088_device::device_add_mconfig(machine_config &config) // tiki100_8088_device - constructor //------------------------------------------------- -tiki100_8088_device::tiki100_8088_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tiki100_8088_device::tiki100_8088_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIKI100_8088, tag, owner, clock), device_tiki100bus_card_interface(mconfig, *this), m_maincpu(*this, I8088_TAG), diff --git a/src/devices/bus/tiki100/8088.h b/src/devices/bus/tiki100/8088.h index a997389ddf4..3d85637d2e7 100644 --- a/src/devices/bus/tiki100/8088.h +++ b/src/devices/bus/tiki100/8088.h @@ -27,7 +27,7 @@ class tiki100_8088_device : public device_t, { public: // construction/destruction - tiki100_8088_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tiki100_8088_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tiki100/exp.cpp b/src/devices/bus/tiki100/exp.cpp index fee968f40d7..f5c3943c9c5 100644 --- a/src/devices/bus/tiki100/exp.cpp +++ b/src/devices/bus/tiki100/exp.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(TIKI100_BUS_SLOT, tiki100_bus_slot_device, "tiki100bus_slot", // tiki100_bus_slot_device - constructor //------------------------------------------------- -tiki100_bus_slot_device::tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tiki100_bus_slot_device::tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIKI100_BUS_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_z80daisy_interface(mconfig, *this), @@ -53,7 +53,7 @@ void tiki100_bus_slot_device::device_start() // tiki100_bus_device - constructor //------------------------------------------------- -tiki100_bus_device::tiki100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tiki100_bus_device::tiki100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIKI100_BUS, tag, owner, clock), m_irq_cb(*this), m_nmi_cb(*this), diff --git a/src/devices/bus/tiki100/exp.h b/src/devices/bus/tiki100/exp.h index 7625971a47d..cb807f5dff5 100644 --- a/src/devices/bus/tiki100/exp.h +++ b/src/devices/bus/tiki100/exp.h @@ -78,7 +78,7 @@ public: // construction/destruction template tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&bus, U &&opts, const char *dflt) - : tiki100_bus_slot_device(mconfig, tag, owner, 0) + : tiki100_bus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -87,7 +87,7 @@ public: set_bus(std::forward(bus)); } - tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tiki100_bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_bus(T &&tag) { m_bus.set_tag(std::forward(tag)); } @@ -117,7 +117,7 @@ class tiki100_bus_device : public device_t { public: // construction/destruction - tiki100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tiki100_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~tiki100_bus_device() { m_device_list.detach_all(); } auto irq_wr_callback() { return m_irq_cb.bind(); } diff --git a/src/devices/bus/tiki100/hdc.cpp b/src/devices/bus/tiki100/hdc.cpp index a351d83daca..3adde10dc32 100644 --- a/src/devices/bus/tiki100/hdc.cpp +++ b/src/devices/bus/tiki100/hdc.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(TIKI100_HDC, tiki100_hdc_device, "tiki100_hdc", "TIKI-100 Win void tiki100_hdc_device::device_add_mconfig(machine_config & config) { - WD2010(config, m_hdc, 5000000); + WD2010(config, m_hdc, XTAL::u(5000000)); //m_hdc->out_intr_callback().set(); m_hdc->in_drdy_callback().set_constant(1); m_hdc->in_index_callback().set_constant(1); @@ -40,8 +40,8 @@ void tiki100_hdc_device::device_add_mconfig(machine_config & config) m_hdc->in_tk000_callback().set_constant(1); m_hdc->in_sc_callback().set_constant(1); - HARDDISK(config, "hard0", 0); - HARDDISK(config, "hard1", 0); + HARDDISK(config, "hard0"); + HARDDISK(config, "hard1"); } @@ -54,7 +54,7 @@ void tiki100_hdc_device::device_add_mconfig(machine_config & config) // tiki100_hdc_device - constructor //------------------------------------------------- -tiki100_hdc_device::tiki100_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tiki100_hdc_device::tiki100_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIKI100_HDC, tag, owner, clock), device_tiki100bus_card_interface(mconfig, *this), m_hdc(*this, WD1010_TAG) diff --git a/src/devices/bus/tiki100/hdc.h b/src/devices/bus/tiki100/hdc.h index d38927ff004..d089d3390da 100644 --- a/src/devices/bus/tiki100/hdc.h +++ b/src/devices/bus/tiki100/hdc.h @@ -27,7 +27,7 @@ class tiki100_hdc_device : public device_t, public device_tiki100bus_card_interf { public: // construction/destruction - tiki100_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tiki100_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tmc600/euro.cpp b/src/devices/bus/tmc600/euro.cpp index 9da4cf80227..df7490941c5 100644 --- a/src/devices/bus/tmc600/euro.cpp +++ b/src/devices/bus/tmc600/euro.cpp @@ -38,7 +38,7 @@ device_tmc600_eurobus_card_interface::device_tmc600_eurobus_card_interface(const // tmc600_eurobus_slot_device - constructor //------------------------------------------------- -tmc600_eurobus_slot_device::tmc600_eurobus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tmc600_eurobus_slot_device::tmc600_eurobus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMC600_EUROBUS_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this) { diff --git a/src/devices/bus/tmc600/euro.h b/src/devices/bus/tmc600/euro.h index 699de5b8383..9d941ae7b42 100644 --- a/src/devices/bus/tmc600/euro.h +++ b/src/devices/bus/tmc600/euro.h @@ -77,7 +77,7 @@ public: // construction/destruction template tmc600_eurobus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : tmc600_eurobus_slot_device(mconfig, tag, owner, 0) + : tmc600_eurobus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -85,7 +85,7 @@ public: set_fixed(false); } - tmc600_eurobus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tmc600_eurobus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/devices/bus/tvc/hbf.cpp b/src/devices/bus/tvc/hbf.cpp index c12b4ab90cc..0b803f618aa 100644 --- a/src/devices/bus/tvc/hbf.cpp +++ b/src/devices/bus/tvc/hbf.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(TVC_HBF, tvc_hbf_device, "tvc_hbf", "HBF floppy interface") // tvc_hbf_device - constructor //------------------------------------------------- -tvc_hbf_device::tvc_hbf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tvc_hbf_device::tvc_hbf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TVC_HBF, tag, owner, clock), device_tvcexp_interface( mconfig, *this ), m_fdc(*this, "fdc"), m_rom(nullptr), m_ram(nullptr), m_rom_bank(0) diff --git a/src/devices/bus/tvc/hbf.h b/src/devices/bus/tvc/hbf.h index b53a3b7520d..27e38c06344 100644 --- a/src/devices/bus/tvc/hbf.h +++ b/src/devices/bus/tvc/hbf.h @@ -23,7 +23,7 @@ class tvc_hbf_device : { public: // construction/destruction - tvc_hbf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tvc_hbf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/tvc/tvc.cpp b/src/devices/bus/tvc/tvc.cpp index d3b4cee5652..3d466bc0f3c 100644 --- a/src/devices/bus/tvc/tvc.cpp +++ b/src/devices/bus/tvc/tvc.cpp @@ -51,7 +51,7 @@ device_tvcexp_interface::~device_tvcexp_interface() //------------------------------------------------- // tvcexp_slot_device - constructor //------------------------------------------------- -tvcexp_slot_device::tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tvcexp_slot_device::tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TVCEXP_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_out_irq_cb(*this), diff --git a/src/devices/bus/tvc/tvc.h b/src/devices/bus/tvc/tvc.h index bf184967685..38adeaa9913 100644 --- a/src/devices/bus/tvc/tvc.h +++ b/src/devices/bus/tvc/tvc.h @@ -92,7 +92,7 @@ public: // construction/destruction template tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : tvcexp_slot_device(mconfig, tag, owner, 0) + : tvcexp_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -100,7 +100,7 @@ public: set_fixed(false); } - tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tvcexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~tvcexp_slot_device(); auto out_irq_callback() { return m_out_irq_cb.bind(); } diff --git a/src/devices/bus/uts_kbd/400kbd.cpp b/src/devices/bus/uts_kbd/400kbd.cpp index 37d54c7d670..20884abefce 100644 --- a/src/devices/bus/uts_kbd/400kbd.cpp +++ b/src/devices/bus/uts_kbd/400kbd.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(UTS_400_KEYBOARD, uts_400_keyboard_device, "uts_400kbd", "UTS 400-Format Keyboard (F3621-04-000)") -uts_400_keyboard_device::uts_400_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +uts_400_keyboard_device::uts_400_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UTS_400_KEYBOARD, tag, owner, clock) , device_uts_keyboard_interface(mconfig, *this) , m_keys(*this, "KEY%X", 0U) diff --git a/src/devices/bus/uts_kbd/400kbd.h b/src/devices/bus/uts_kbd/400kbd.h index 8e73bc10dbd..1d919ce0317 100644 --- a/src/devices/bus/uts_kbd/400kbd.h +++ b/src/devices/bus/uts_kbd/400kbd.h @@ -11,7 +11,7 @@ class uts_400_keyboard_device : public device_t, public device_uts_keyboard_interface { public: - uts_400_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + uts_400_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual DECLARE_WRITE_LINE_MEMBER(ready_w) override; diff --git a/src/devices/bus/uts_kbd/extw.cpp b/src/devices/bus/uts_kbd/extw.cpp index 950d8b244f2..712cc659397 100644 --- a/src/devices/bus/uts_kbd/extw.cpp +++ b/src/devices/bus/uts_kbd/extw.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(UTS_EXTW_KEYBOARD, uts_extw_keyboard_device, "uts_extw", "UTS Expanded Typewriter Keyboard (F4725-25)") -uts_extw_keyboard_device::uts_extw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +uts_extw_keyboard_device::uts_extw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UTS_EXTW_KEYBOARD, tag, owner, clock) , device_uts_keyboard_interface(mconfig, *this) , m_keys(*this, "KEY%X", 0U) diff --git a/src/devices/bus/uts_kbd/extw.h b/src/devices/bus/uts_kbd/extw.h index 21599139ec1..eddff8ab82d 100644 --- a/src/devices/bus/uts_kbd/extw.h +++ b/src/devices/bus/uts_kbd/extw.h @@ -11,7 +11,7 @@ class uts_extw_keyboard_device : public device_t, public device_uts_keyboard_interface { public: - uts_extw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + uts_extw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual DECLARE_WRITE_LINE_MEMBER(ready_w) override; diff --git a/src/devices/bus/uts_kbd/uts_kbd.cpp b/src/devices/bus/uts_kbd/uts_kbd.cpp index 8a379b69f0c..efce4bbeb63 100644 --- a/src/devices/bus/uts_kbd/uts_kbd.cpp +++ b/src/devices/bus/uts_kbd/uts_kbd.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(UTS_KEYBOARD, uts_keyboard_port_device, "uts_kbd", "UTS Keyboard Port") -uts_keyboard_port_device::uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +uts_keyboard_port_device::uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UTS_KEYBOARD, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_rxd_callback(*this) diff --git a/src/devices/bus/uts_kbd/uts_kbd.h b/src/devices/bus/uts_kbd/uts_kbd.h index c0d6d9b0824..28afe2ccb8c 100644 --- a/src/devices/bus/uts_kbd/uts_kbd.h +++ b/src/devices/bus/uts_kbd/uts_kbd.h @@ -27,10 +27,10 @@ class uts_keyboard_port_device : public device_t, public device_single_card_slot public: // construction/destruction - uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template uts_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : uts_keyboard_port_device(mconfig, tag, owner, 0U) + : uts_keyboard_port_device(mconfig, tag, owner) { option_reset(); opts(*this); diff --git a/src/devices/bus/vboy/rom.cpp b/src/devices/bus/vboy/rom.cpp index d2ee88d09e8..d2ca0b80473 100644 --- a/src/devices/bus/vboy/rom.cpp +++ b/src/devices/bus/vboy/rom.cpp @@ -26,13 +26,13 @@ DEFINE_DEVICE_TYPE(VBOY_FLAT_ROM_SRAM, vboy_flat_rom_sram_device, "vboy_flatrom_ // vboy_flat_rom_device //************************************************************************** -vboy_flat_rom_device::vboy_flat_rom_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +vboy_flat_rom_device::vboy_flat_rom_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : vboy_flat_rom_device(mconfig, VBOY_FLAT_ROM, tag, owner, clock) { } -vboy_flat_rom_device::vboy_flat_rom_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : +vboy_flat_rom_device::vboy_flat_rom_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vboy_cart_interface(mconfig, *this) { @@ -91,7 +91,7 @@ void vboy_flat_rom_device::device_start() // vboy_flat_rom_sram_device //************************************************************************** -vboy_flat_rom_sram_device::vboy_flat_rom_sram_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +vboy_flat_rom_sram_device::vboy_flat_rom_sram_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : vboy_flat_rom_device(mconfig, VBOY_FLAT_ROM_SRAM, tag, owner, clock) { } diff --git a/src/devices/bus/vboy/rom.h b/src/devices/bus/vboy/rom.h index 79ad95f2e9a..a6665da029c 100644 --- a/src/devices/bus/vboy/rom.h +++ b/src/devices/bus/vboy/rom.h @@ -15,13 +15,13 @@ class vboy_flat_rom_device : public device_t, public device_vboy_cart_interface { public: - vboy_flat_rom_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + vboy_flat_rom_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device_vboy_cart_interface implementation virtual image_init_result load() override ATTR_COLD; protected: - vboy_flat_rom_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + vboy_flat_rom_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t implementation virtual void device_start() override ATTR_COLD; @@ -31,7 +31,7 @@ protected: class vboy_flat_rom_sram_device : public vboy_flat_rom_device { public: - vboy_flat_rom_sram_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + vboy_flat_rom_sram_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device_vboy_cart_interface implementation virtual image_init_result load() override ATTR_COLD; diff --git a/src/devices/bus/vboy/slot.cpp b/src/devices/bus/vboy/slot.cpp index 65ecdfa8f88..09b9037fd93 100644 --- a/src/devices/bus/vboy/slot.cpp +++ b/src/devices/bus/vboy/slot.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(VBOY_CART_SLOT, vboy_cart_slot_device, "vboy_cart_slot", "Nin // vboy_cart_slot_device //************************************************************************** -vboy_cart_slot_device::vboy_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +vboy_cart_slot_device::vboy_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VBOY_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/vboy/slot.h b/src/devices/bus/vboy/slot.h index b628db8af0d..f413b2b943a 100644 --- a/src/devices/bus/vboy/slot.h +++ b/src/devices/bus/vboy/slot.h @@ -89,14 +89,14 @@ class vboy_cart_slot_device : public: template vboy_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) : - vboy_cart_slot_device(mconfig, tag, owner, 0U) + vboy_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - vboy_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0U); + vboy_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto intcro() { return m_intcro.bind(); } diff --git a/src/devices/bus/vc4000/rom.cpp b/src/devices/bus/vc4000/rom.cpp index ffd9a21ffb5..8d17e587897 100644 --- a/src/devices/bus/vc4000/rom.cpp +++ b/src/devices/bus/vc4000/rom.cpp @@ -198,27 +198,27 @@ DEFINE_DEVICE_TYPE(VC4000_ROM_RAM1K, vc4000_ram1k_device, "vc4000_ram1k", "VC DEFINE_DEVICE_TYPE(VC4000_ROM_CHESS2, vc4000_chess2_device, "vc4000_chess2", "VC 4000 Chess II Cart") -vc4000_rom_device::vc4000_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vc4000_rom_device::vc4000_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vc4000_cart_interface(mconfig, *this) { } -vc4000_rom_device::vc4000_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vc4000_rom_device::vc4000_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vc4000_rom_device(mconfig, VC4000_ROM_STD, tag, owner, clock) { } -vc4000_rom4k_device::vc4000_rom4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vc4000_rom4k_device::vc4000_rom4k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vc4000_rom_device(mconfig, VC4000_ROM_ROM4K, tag, owner, clock) { } -vc4000_ram1k_device::vc4000_ram1k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vc4000_ram1k_device::vc4000_ram1k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vc4000_rom_device(mconfig, VC4000_ROM_RAM1K, tag, owner, clock) { } -vc4000_chess2_device::vc4000_chess2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vc4000_chess2_device::vc4000_chess2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vc4000_rom_device(mconfig, VC4000_ROM_CHESS2, tag, owner, clock) { } diff --git a/src/devices/bus/vc4000/rom.h b/src/devices/bus/vc4000/rom.h index 623e4c248c9..9b31e62663a 100644 --- a/src/devices/bus/vc4000/rom.h +++ b/src/devices/bus/vc4000/rom.h @@ -13,13 +13,13 @@ class vc4000_rom_device : public device_t, { public: // construction/destruction - vc4000_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vc4000_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; protected: - vc4000_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vc4000_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -32,7 +32,7 @@ class vc4000_rom4k_device : public vc4000_rom_device { public: // construction/destruction - vc4000_rom4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vc4000_rom4k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> vc4000_ram1k_device @@ -41,7 +41,7 @@ class vc4000_ram1k_device : public vc4000_rom_device { public: // construction/destruction - vc4000_ram1k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vc4000_ram1k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_ram(offs_t offset) override; @@ -54,7 +54,7 @@ class vc4000_chess2_device : public vc4000_rom_device { public: // construction/destruction - vc4000_chess2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vc4000_chess2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t extra_rom(offs_t offset) override; diff --git a/src/devices/bus/vc4000/slot.cpp b/src/devices/bus/vc4000/slot.cpp index 4c8f2dd77c4..d9821be5af4 100644 --- a/src/devices/bus/vc4000/slot.cpp +++ b/src/devices/bus/vc4000/slot.cpp @@ -72,7 +72,7 @@ void device_vc4000_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- // vc4000_cart_slot_device - constructor //------------------------------------------------- -vc4000_cart_slot_device::vc4000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vc4000_cart_slot_device::vc4000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vc4000_cart_slot_device(mconfig, VC4000_CART_SLOT, tag, owner, clock) { } @@ -113,7 +113,7 @@ void vc4000_cart_slot_device::device_start() // trq h-21 slot //------------------------------------------------- -h21_cart_slot_device::h21_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +h21_cart_slot_device::h21_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vc4000_cart_slot_device(mconfig, H21_CART_SLOT, tag, owner, clock) { } diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h index 90f75232699..50f70b0ca1f 100644 --- a/src/devices/bus/vc4000/slot.h +++ b/src/devices/bus/vc4000/slot.h @@ -59,14 +59,14 @@ public: // construction/destruction template vc4000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const *dflt) - : vc4000_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : vc4000_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - vc4000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vc4000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vc4000_cart_slot_device(); // image-level overrides @@ -111,14 +111,14 @@ public: // construction/destruction template h21_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const *dflt) - : h21_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : h21_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - h21_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h21_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~h21_cart_slot_device(); virtual const char *image_interface() const noexcept override { return "h21_cart"; } diff --git a/src/devices/bus/vcs/compumat.cpp b/src/devices/bus/vcs/compumat.cpp index ff1beac7287..279e57aee4d 100644 --- a/src/devices/bus/vcs/compumat.cpp +++ b/src/devices/bus/vcs/compumat.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(A26_ROM_COMPUMATE, a26_rom_cm_device, "a2600_cm", "Atari 2600 ROM Cart Compumate") -a26_rom_cm_device::a26_rom_cm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_cm_device::a26_rom_cm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_COMPUMATE, tag, owner, clock) , m_bank(*this, "bank") { diff --git a/src/devices/bus/vcs/compumat.h b/src/devices/bus/vcs/compumat.h index 2d16f24db88..16603404bb1 100644 --- a/src/devices/bus/vcs/compumat.h +++ b/src/devices/bus/vcs/compumat.h @@ -17,7 +17,7 @@ class a26_rom_cm_device : public a26_rom_base_device { public: // construction/destruction - a26_rom_cm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_cm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/vcs/dpc.cpp b/src/devices/bus/vcs/dpc.cpp index deb5ba74748..0cc490a857b 100644 --- a/src/devices/bus/vcs/dpc.cpp +++ b/src/devices/bus/vcs/dpc.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(ATARI_DPC, dpc_device, "atari_dpc", "Atari DPC") -dpc_device::dpc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +dpc_device::dpc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, ATARI_DPC, tag, owner, clock), m_movamt(0), m_latch_62(0), @@ -234,7 +234,7 @@ void dpc_device::write(offs_t offset, uint8_t data) DEFINE_DEVICE_TYPE(A26_ROM_DPC, a26_rom_dpc_device, "a2600_dpc", "Atari 2600 ROM Cart Pitfall II") -a26_rom_dpc_device::a26_rom_dpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_dpc_device::a26_rom_dpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_f8_device(mconfig, A26_ROM_DPC, tag, owner, clock), m_dpc(*this, "dpc") { } @@ -251,7 +251,7 @@ void a26_rom_dpc_device::setup_addon_ptr(uint8_t *ptr) void a26_rom_dpc_device::device_add_mconfig(machine_config &config) { - ATARI_DPC(config, m_dpc, 0); + ATARI_DPC(config, m_dpc); } void a26_rom_dpc_device::install_memory_handlers(address_space *space) diff --git a/src/devices/bus/vcs/dpc.h b/src/devices/bus/vcs/dpc.h index 9bbf4382b95..c26453da073 100644 --- a/src/devices/bus/vcs/dpc.h +++ b/src/devices/bus/vcs/dpc.h @@ -17,7 +17,7 @@ class dpc_device : public device_t { public: // construction/destruction - dpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_display_data(uint8_t *data) { m_displaydata = data; } @@ -67,7 +67,7 @@ DECLARE_DEVICE_TYPE(ATARI_DPC, dpc_device) class a26_rom_dpc_device : public a26_rom_f8_device { public: - a26_rom_dpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_dpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); required_device m_dpc; diff --git a/src/devices/bus/vcs/harmony_melody.cpp b/src/devices/bus/vcs/harmony_melody.cpp index 3b3d5385e4a..04c78933d1c 100644 --- a/src/devices/bus/vcs/harmony_melody.cpp +++ b/src/devices/bus/vcs/harmony_melody.cpp @@ -64,7 +64,7 @@ map: DEFINE_DEVICE_TYPE(A26_ROM_HARMONY, a26_rom_harmony_device, "a2600_harmony", "Atari 2600 ROM Cart HARMONY/MELODY") -a26_rom_harmony_device::a26_rom_harmony_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_harmony_device::a26_rom_harmony_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_HARMONY, tag, owner, clock) , m_cpu(*this, "arm") , m_base_bank(0) @@ -81,7 +81,7 @@ void a26_rom_harmony_device::harmony_arm7_map(address_map &map) void a26_rom_harmony_device::device_add_mconfig(machine_config &config) { - LPC2103(config, m_cpu, 70000000); + LPC2103(config, m_cpu, XTAL::u(70000000)); m_cpu->set_addrmap(AS_PROGRAM, &a26_rom_harmony_device::harmony_arm7_map); } diff --git a/src/devices/bus/vcs/harmony_melody.h b/src/devices/bus/vcs/harmony_melody.h index eb23afcbec3..35b88302731 100644 --- a/src/devices/bus/vcs/harmony_melody.h +++ b/src/devices/bus/vcs/harmony_melody.h @@ -14,7 +14,7 @@ class a26_rom_harmony_device : public a26_rom_base_device { public: - a26_rom_harmony_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_harmony_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; diff --git a/src/devices/bus/vcs/rom.cpp b/src/devices/bus/vcs/rom.cpp index f40591e1173..4f30ac56330 100644 --- a/src/devices/bus/vcs/rom.cpp +++ b/src/devices/bus/vcs/rom.cpp @@ -67,7 +67,7 @@ void a26_rom_base_device::write_ram(offs_t offset, uint8_t data) GAMES: a large majority -------------------------------------------------*/ -a26_rom_2k_4k_device::a26_rom_2k_4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_2k_4k_device::a26_rom_2k_4k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_2K_4K, tag, owner, clock) { } @@ -92,13 +92,13 @@ void a26_rom_2k_4k_device::install_memory_handlers(address_space *space) -------------------------------------------------*/ -a26_rom_f6_device::a26_rom_f6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a26_rom_f6_device::a26_rom_f6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, type, tag, owner, clock) , m_bank(*this, "bank") { } -a26_rom_f6_device::a26_rom_f6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_f6_device::a26_rom_f6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_f6_device(mconfig, A26_ROM_F6, tag, owner, clock) { } @@ -141,7 +141,7 @@ void a26_rom_f6_device::switch_bank(offs_t offset, uint8_t data) GAMES: Fatal Run -------------------------------------------------*/ -a26_rom_f4_device::a26_rom_f4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_f4_device::a26_rom_f4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_f6_device(mconfig, A26_ROM_F4, tag, owner, clock) { } @@ -167,12 +167,12 @@ void a26_rom_f4_device::install_memory_handlers(address_space *space) -------------------------------------------------*/ -a26_rom_f8_device::a26_rom_f8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +a26_rom_f8_device::a26_rom_f8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_f6_device(mconfig, type, tag, owner, clock) { } -a26_rom_f8_device::a26_rom_f8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_f8_device::a26_rom_f8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_f8_device(mconfig, A26_ROM_F8, tag, owner, clock) { } @@ -188,7 +188,7 @@ void a26_rom_f8_device::install_memory_handlers(address_space *space) } -a26_rom_f8_sw_device::a26_rom_f8_sw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_f8_sw_device::a26_rom_f8_sw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_f8_device(mconfig, A26_ROM_F8_SW, tag, owner, clock) { } @@ -206,7 +206,7 @@ a26_rom_f8_sw_device::a26_rom_f8_sw_device(const machine_config &mconfig, const -------------------------------------------------*/ -a26_rom_fa_device::a26_rom_fa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_fa_device::a26_rom_fa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_f6_device(mconfig, A26_ROM_FA, tag, owner, clock) { } @@ -233,7 +233,7 @@ void a26_rom_fa_device::install_memory_handlers(address_space *space) -------------------------------------------------*/ -a26_rom_fe_device::a26_rom_fe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_fe_device::a26_rom_fe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_FE, tag, owner, clock) , m_bank(*this, "bank") , m_trigger_on_next_access(false) @@ -311,7 +311,7 @@ void a26_rom_fe_device::trigger_bank() -------------------------------------------------*/ -a26_rom_3e_device::a26_rom_3e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_3e_device::a26_rom_3e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_3E, tag, owner, clock) , m_rom_bank(*this, "rom_bank") , m_ram_bank(*this, "ram_bank") @@ -374,7 +374,7 @@ void a26_rom_3e_device::select_rom_bank(offs_t address, uint8_t data) -------------------------------------------------*/ -a26_rom_3f_device::a26_rom_3f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_3f_device::a26_rom_3f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_3F, tag, owner, clock) , m_bank(*this, "bank") , m_bank_mask(0) @@ -415,7 +415,7 @@ void a26_rom_3f_device::select_bank(offs_t offset, uint8_t data) -------------------------------------------------*/ -a26_rom_e0_device::a26_rom_e0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_e0_device::a26_rom_e0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_E0, tag, owner, clock) , m_bank(*this, "bank%u", 0U) { @@ -477,7 +477,7 @@ void a26_rom_e0_device::switch_bank(offs_t offset, uint8_t data) -------------------------------------------------*/ -a26_rom_e7_device::a26_rom_e7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_e7_device::a26_rom_e7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_E7, tag, owner, clock) , m_rom_bank(*this, "rom_bank") , m_lo_ram_bank(*this, "low_ram") @@ -541,7 +541,7 @@ void a26_rom_e7_device::switch_ram_bank(offs_t offset, uint8_t data) -------------------------------------------------*/ -a26_rom_ua_device::a26_rom_ua_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_ua_device::a26_rom_ua_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_UA, tag, owner, clock) , m_bank(*this, "bank") { @@ -579,7 +579,7 @@ void a26_rom_ua_device::change_bank(offs_t offset) -------------------------------------------------*/ -a26_rom_cv_device::a26_rom_cv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_cv_device::a26_rom_cv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_CV, tag, owner, clock) { } @@ -603,7 +603,7 @@ void a26_rom_cv_device::install_memory_handlers(address_space *space) -------------------------------------------------*/ -a26_rom_dc_device::a26_rom_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_dc_device::a26_rom_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_DC, tag, owner, clock) , m_bank(*this, "bank") { @@ -645,7 +645,7 @@ void a26_rom_dc_device::switch_bank(offs_t offset, uint8_t data) -------------------------------------------------*/ -a26_rom_fv_device::a26_rom_fv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_fv_device::a26_rom_fv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_FV, tag, owner, clock) , m_bank(*this, "bank") { @@ -682,7 +682,7 @@ void a26_rom_fv_device::switch_bank(offs_t offset, uint8_t data) -------------------------------------------------*/ -a26_rom_jvp_device::a26_rom_jvp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_jvp_device::a26_rom_jvp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_JVP, tag, owner, clock) , m_bank(*this, "bank") { @@ -721,7 +721,7 @@ void a26_rom_jvp_device::change_bank() -------------------------------------------------*/ -a26_rom_4in1_device::a26_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_4in1_device::a26_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_4IN1, tag, owner, clock) , m_bank(*this, "bank") , m_current_game(0) @@ -758,7 +758,7 @@ void a26_rom_4in1_device::install_memory_handlers(address_space *space) -------------------------------------------------*/ -a26_rom_8in1_device::a26_rom_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_8in1_device::a26_rom_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_8IN1, tag, owner, clock) , m_bank(*this, "bank") { @@ -803,7 +803,7 @@ void a26_rom_8in1_device::switch_bank(offs_t offset, uint8_t data) -------------------------------------------------*/ -a26_rom_32in1_device::a26_rom_32in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_32in1_device::a26_rom_32in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_32IN1, tag, owner, clock) , m_bank(*this, "bank") , m_current_game(0) @@ -838,7 +838,7 @@ void a26_rom_32in1_device::install_memory_handlers(address_space *space) http://blog.kevtris.org/blogfiles/Atari%202600%20Mappers.txt --------------------------------------------------*/ -a26_rom_x07_device::a26_rom_x07_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a26_rom_x07_device::a26_rom_x07_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_X07, tag, owner, clock) , m_bank(*this, "bank") { diff --git a/src/devices/bus/vcs/rom.h b/src/devices/bus/vcs/rom.h index 039a0d4ca1d..989f3526b44 100644 --- a/src/devices/bus/vcs/rom.h +++ b/src/devices/bus/vcs/rom.h @@ -14,7 +14,7 @@ class a26_rom_base_device : public device_t, public device_vcs_cart_interface { protected: - a26_rom_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + a26_rom_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_vcs_cart_interface(mconfig, *this) { } @@ -41,12 +41,12 @@ public: class a26_rom_f6_device : public a26_rom_base_device { public: - a26_rom_f6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_f6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; protected: - a26_rom_f6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a26_rom_f6_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void install_super_chip_handlers(address_space *space); virtual void device_reset() override; @@ -62,7 +62,7 @@ protected: class a26_rom_f4_device : public a26_rom_f6_device { public: - a26_rom_f4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_f4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -76,12 +76,12 @@ protected: class a26_rom_f8_device : public a26_rom_f6_device { public: - a26_rom_f8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_f8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; protected: - a26_rom_f8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + a26_rom_f8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; @@ -90,7 +90,7 @@ protected: class a26_rom_f8_sw_device : public a26_rom_f8_device { public: - a26_rom_f8_sw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_f8_sw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // Snow White proto starts from bank 1 @@ -103,7 +103,7 @@ protected: class a26_rom_fa_device : public a26_rom_f6_device { public: - a26_rom_fa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_fa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; }; @@ -114,7 +114,7 @@ public: class a26_rom_fe_device : public a26_rom_base_device { public: - a26_rom_fe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_fe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -135,7 +135,7 @@ protected: class a26_rom_3e_device : public a26_rom_base_device { public: - a26_rom_3e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_3e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -157,7 +157,7 @@ protected: class a26_rom_3f_device : public a26_rom_base_device { public: - a26_rom_3f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_3f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -175,7 +175,7 @@ protected: class a26_rom_e0_device : public a26_rom_base_device { public: - a26_rom_e0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_e0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -192,7 +192,7 @@ protected: class a26_rom_e7_device : public a26_rom_base_device { public: - a26_rom_e7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_e7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -213,7 +213,7 @@ protected: class a26_rom_ua_device : public a26_rom_base_device { public: - a26_rom_ua_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_ua_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -230,7 +230,7 @@ protected: class a26_rom_cv_device : public a26_rom_base_device { public: - a26_rom_cv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_cv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; }; @@ -241,7 +241,7 @@ public: class a26_rom_dc_device : public a26_rom_base_device { public: - a26_rom_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -259,7 +259,7 @@ protected: class a26_rom_fv_device : public a26_rom_base_device { public: - a26_rom_fv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_fv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -276,7 +276,7 @@ protected: class a26_rom_jvp_device : public a26_rom_base_device { public: - a26_rom_jvp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_jvp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -293,7 +293,7 @@ protected: class a26_rom_4in1_device : public a26_rom_base_device { public: - a26_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_4in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -311,7 +311,7 @@ protected: class a26_rom_8in1_device : public a26_rom_base_device { public: - a26_rom_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_8in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -330,7 +330,7 @@ protected: class a26_rom_32in1_device : public a26_rom_base_device { public: - a26_rom_32in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_32in1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; @@ -348,7 +348,7 @@ protected: class a26_rom_x07_device : public a26_rom_base_device { public: - a26_rom_x07_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_x07_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; diff --git a/src/devices/bus/vcs/scharger.cpp b/src/devices/bus/vcs/scharger.cpp index 1aa1b143328..d337893309a 100644 --- a/src/devices/bus/vcs/scharger.cpp +++ b/src/devices/bus/vcs/scharger.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(A26_ROM_SUPERCHARGER, a26_rom_ss_device, "a2600_ss", "Atari 2600 ROM Cart Supercharger") -a26_rom_ss_device::a26_rom_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +a26_rom_ss_device::a26_rom_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a26_rom_base_device(mconfig, A26_ROM_SUPERCHARGER, tag, owner, clock), m_cassette(*this, "cassette"), m_data(0), diff --git a/src/devices/bus/vcs/scharger.h b/src/devices/bus/vcs/scharger.h index 25544868ab4..66e4543cfe6 100644 --- a/src/devices/bus/vcs/scharger.h +++ b/src/devices/bus/vcs/scharger.h @@ -17,7 +17,7 @@ class a26_rom_ss_device : public a26_rom_base_device { public: - a26_rom_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a26_rom_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void install_memory_handlers(address_space *space) override; uint8_t read_lo(offs_t offset); diff --git a/src/devices/bus/vcs/vcs_slot.cpp b/src/devices/bus/vcs/vcs_slot.cpp index 7b9e620c740..4ec8c5552a3 100644 --- a/src/devices/bus/vcs/vcs_slot.cpp +++ b/src/devices/bus/vcs/vcs_slot.cpp @@ -104,7 +104,7 @@ void device_vcs_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- // vcs_cart_slot_device - constructor //------------------------------------------------- -vcs_cart_slot_device::vcs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_cart_slot_device::vcs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h index 4595602961a..b57ef66f575 100644 --- a/src/devices/bus/vcs/vcs_slot.h +++ b/src/devices/bus/vcs/vcs_slot.h @@ -19,14 +19,14 @@ public: // construction/destruction template vcs_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : vcs_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : vcs_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - vcs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vcs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vcs_cart_slot_device(); template void set_address_space(T &&tag, int no) { m_address_space.set_tag(std::forward(tag), no); } diff --git a/src/devices/bus/vcs_ctrl/ctrl.cpp b/src/devices/bus/vcs_ctrl/ctrl.cpp index 248fcf2b584..64cf822c7aa 100644 --- a/src/devices/bus/vcs_ctrl/ctrl.cpp +++ b/src/devices/bus/vcs_ctrl/ctrl.cpp @@ -43,7 +43,7 @@ device_vcs_control_port_interface::device_vcs_control_port_interface(const machi // vcs_control_port_device - constructor //------------------------------------------------- -vcs_control_port_device::vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_control_port_device::vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_CONTROL_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_device(nullptr), m_write_trigger(*this) diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h index 6e129ba62c9..6b766968e79 100644 --- a/src/devices/bus/vcs_ctrl/ctrl.h +++ b/src/devices/bus/vcs_ctrl/ctrl.h @@ -63,7 +63,7 @@ public: set_default_option(dflt); set_fixed(false); } - vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vcs_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // static configuration helpers auto trigger_wr_callback() { return m_write_trigger.bind(); } diff --git a/src/devices/bus/vcs_ctrl/joybooster.cpp b/src/devices/bus/vcs_ctrl/joybooster.cpp index 933928a0dd0..e3aeb527db2 100644 --- a/src/devices/bus/vcs_ctrl/joybooster.cpp +++ b/src/devices/bus/vcs_ctrl/joybooster.cpp @@ -57,7 +57,7 @@ ioport_constructor vcs_joystick_booster_device::device_input_ports() const // vcs_joystick_booster_device - constructor //------------------------------------------------- -vcs_joystick_booster_device::vcs_joystick_booster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_joystick_booster_device::vcs_joystick_booster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_JOYSTICK_BOOSTER, tag, owner, clock), device_vcs_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), diff --git a/src/devices/bus/vcs_ctrl/joybooster.h b/src/devices/bus/vcs_ctrl/joybooster.h index 23f97fdb7a7..2927f8bf43b 100644 --- a/src/devices/bus/vcs_ctrl/joybooster.h +++ b/src/devices/bus/vcs_ctrl/joybooster.h @@ -27,7 +27,7 @@ class vcs_joystick_booster_device : public device_t, { public: // construction/destruction - vcs_joystick_booster_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vcs_joystick_booster_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_vcs_control_port_interface overrides virtual uint8_t vcs_joy_r() override; diff --git a/src/devices/bus/vcs_ctrl/joystick.cpp b/src/devices/bus/vcs_ctrl/joystick.cpp index e68ec423d67..05a3130d041 100644 --- a/src/devices/bus/vcs_ctrl/joystick.cpp +++ b/src/devices/bus/vcs_ctrl/joystick.cpp @@ -48,7 +48,7 @@ ioport_constructor vcs_joystick_device::device_input_ports() const // vcs_joystick_device - constructor //------------------------------------------------- -vcs_joystick_device::vcs_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_joystick_device::vcs_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_JOYSTICK, tag, owner, clock), device_vcs_control_port_interface(mconfig, *this), m_joy(*this, "JOY") diff --git a/src/devices/bus/vcs_ctrl/joystick.h b/src/devices/bus/vcs_ctrl/joystick.h index 1c8f941a633..7f6627b43eb 100644 --- a/src/devices/bus/vcs_ctrl/joystick.h +++ b/src/devices/bus/vcs_ctrl/joystick.h @@ -26,7 +26,7 @@ class vcs_joystick_device : public device_t, { public: // construction/destruction - vcs_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vcs_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_vcs_control_port_interface overrides virtual uint8_t vcs_joy_r() override; diff --git a/src/devices/bus/vcs_ctrl/keypad.cpp b/src/devices/bus/vcs_ctrl/keypad.cpp index 888cae738f5..5e6644281f2 100644 --- a/src/devices/bus/vcs_ctrl/keypad.cpp +++ b/src/devices/bus/vcs_ctrl/keypad.cpp @@ -54,7 +54,7 @@ ioport_constructor vcs_keypad_device::device_input_ports() const // vcs_keypad_device - constructor //------------------------------------------------- -vcs_keypad_device::vcs_keypad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_keypad_device::vcs_keypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_KEYPAD, tag, owner, clock), device_vcs_control_port_interface(mconfig, *this), m_keypad(*this, "KEYPAD"), diff --git a/src/devices/bus/vcs_ctrl/keypad.h b/src/devices/bus/vcs_ctrl/keypad.h index 13218b0bf0c..397922687ad 100644 --- a/src/devices/bus/vcs_ctrl/keypad.h +++ b/src/devices/bus/vcs_ctrl/keypad.h @@ -26,7 +26,7 @@ class vcs_keypad_device : public device_t, { public: // construction/destruction - vcs_keypad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vcs_keypad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_vcs_control_port_interface overrides virtual uint8_t vcs_joy_r() override { return ~read_keys(2); } diff --git a/src/devices/bus/vcs_ctrl/lightpen.cpp b/src/devices/bus/vcs_ctrl/lightpen.cpp index b79f447a809..cec693992cd 100644 --- a/src/devices/bus/vcs_ctrl/lightpen.cpp +++ b/src/devices/bus/vcs_ctrl/lightpen.cpp @@ -57,7 +57,7 @@ ioport_constructor vcs_lightpen_device::device_input_ports() const // vcs_lightpen_device - constructor //------------------------------------------------- -vcs_lightpen_device::vcs_lightpen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_lightpen_device::vcs_lightpen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_LIGHTPEN, tag, owner, clock), device_vcs_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), diff --git a/src/devices/bus/vcs_ctrl/lightpen.h b/src/devices/bus/vcs_ctrl/lightpen.h index 82c4f06c5aa..8583fbf61a9 100644 --- a/src/devices/bus/vcs_ctrl/lightpen.h +++ b/src/devices/bus/vcs_ctrl/lightpen.h @@ -26,7 +26,7 @@ class vcs_lightpen_device : public device_t, { public: // construction/destruction - vcs_lightpen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vcs_lightpen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_vcs_control_port_interface overrides virtual uint8_t vcs_joy_r() override; diff --git a/src/devices/bus/vcs_ctrl/mouse.cpp b/src/devices/bus/vcs_ctrl/mouse.cpp index c1087bb32c1..31a72697e14 100644 --- a/src/devices/bus/vcs_ctrl/mouse.cpp +++ b/src/devices/bus/vcs_ctrl/mouse.cpp @@ -58,7 +58,7 @@ ioport_constructor vcs_mouse_device::device_input_ports() const // vcs_mouse_device - constructor //------------------------------------------------- -vcs_mouse_device::vcs_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_mouse_device::vcs_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_MOUSE, tag, owner, clock), device_vcs_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), diff --git a/src/devices/bus/vcs_ctrl/mouse.h b/src/devices/bus/vcs_ctrl/mouse.h index e90f413f8b3..9f56299174e 100644 --- a/src/devices/bus/vcs_ctrl/mouse.h +++ b/src/devices/bus/vcs_ctrl/mouse.h @@ -26,7 +26,7 @@ class vcs_mouse_device : public device_t, { public: // construction/destruction - vcs_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vcs_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_vcs_control_port_interface overrides virtual uint8_t vcs_joy_r() override; diff --git a/src/devices/bus/vcs_ctrl/paddles.cpp b/src/devices/bus/vcs_ctrl/paddles.cpp index c1dffd6152b..682b7171a15 100644 --- a/src/devices/bus/vcs_ctrl/paddles.cpp +++ b/src/devices/bus/vcs_ctrl/paddles.cpp @@ -67,7 +67,7 @@ ioport_constructor vcs_paddles_device::device_input_ports() const // vcs_paddles_device - constructor //------------------------------------------------- -vcs_paddles_device::vcs_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_paddles_device::vcs_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_PADDLES, tag, owner, clock), device_vcs_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), diff --git a/src/devices/bus/vcs_ctrl/paddles.h b/src/devices/bus/vcs_ctrl/paddles.h index 941bea3fc5a..28a1a2c0c24 100644 --- a/src/devices/bus/vcs_ctrl/paddles.h +++ b/src/devices/bus/vcs_ctrl/paddles.h @@ -26,7 +26,7 @@ class vcs_paddles_device : public device_t, { public: // construction/destruction - vcs_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vcs_paddles_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void reverse_players(device_t *device) { downcast(*device).m_reverse_players = true; } diff --git a/src/devices/bus/vcs_ctrl/wheel.cpp b/src/devices/bus/vcs_ctrl/wheel.cpp index 57c5c9863ed..711c0a07f21 100644 --- a/src/devices/bus/vcs_ctrl/wheel.cpp +++ b/src/devices/bus/vcs_ctrl/wheel.cpp @@ -47,7 +47,7 @@ ioport_constructor vcs_wheel_device::device_input_ports() const // vcs_wheel_device - constructor //------------------------------------------------- -vcs_wheel_device::vcs_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vcs_wheel_device::vcs_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VCS_WHEEL, tag, owner, clock), device_vcs_control_port_interface(mconfig, *this), m_joy(*this, "JOY"), diff --git a/src/devices/bus/vcs_ctrl/wheel.h b/src/devices/bus/vcs_ctrl/wheel.h index 8919e2d2888..8d08c3bf046 100644 --- a/src/devices/bus/vcs_ctrl/wheel.h +++ b/src/devices/bus/vcs_ctrl/wheel.h @@ -26,7 +26,7 @@ class vcs_wheel_device : public device_t, { public: // construction/destruction - vcs_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vcs_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_vcs_control_port_interface overrides virtual uint8_t vcs_joy_r() override; diff --git a/src/devices/bus/vectrex/rom.cpp b/src/devices/bus/vectrex/rom.cpp index 04410dd5623..5d26afabfe5 100644 --- a/src/devices/bus/vectrex/rom.cpp +++ b/src/devices/bus/vectrex/rom.cpp @@ -25,22 +25,22 @@ DEFINE_DEVICE_TYPE(VECTREX_ROM_64K, vectrex_rom64k_device, "vectrex_64k", "Vec DEFINE_DEVICE_TYPE(VECTREX_ROM_SRAM, vectrex_sram_device, "vectrex_sram", "Vectrex Carts w/SRAM") -vectrex_rom_device::vectrex_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vectrex_rom_device::vectrex_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vectrex_cart_interface(mconfig, *this) { } -vectrex_rom_device::vectrex_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vectrex_rom_device::vectrex_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vectrex_rom_device(mconfig, VECTREX_ROM_STD, tag, owner, clock) { } -vectrex_rom64k_device::vectrex_rom64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vectrex_rom64k_device::vectrex_rom64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vectrex_rom_device(mconfig, VECTREX_ROM_64K, tag, owner, clock), m_bank(0) { } -vectrex_sram_device::vectrex_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vectrex_sram_device::vectrex_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vectrex_rom_device(mconfig, VECTREX_ROM_SRAM, tag, owner, clock) { } diff --git a/src/devices/bus/vectrex/rom.h b/src/devices/bus/vectrex/rom.h index dd83f54042c..7fe203fbb6e 100644 --- a/src/devices/bus/vectrex/rom.h +++ b/src/devices/bus/vectrex/rom.h @@ -15,13 +15,13 @@ class vectrex_rom_device : public device_t, { public: // construction/destruction - vectrex_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vectrex_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; protected: - vectrex_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vectrex_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override { } @@ -34,7 +34,7 @@ class vectrex_rom64k_device : public vectrex_rom_device { public: // construction/destruction - vectrex_rom64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vectrex_rom64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint8_t read_rom(offs_t offset) override; @@ -55,7 +55,7 @@ class vectrex_sram_device : public vectrex_rom_device { public: // construction/destruction - vectrex_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vectrex_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual void write_ram(offs_t offset, uint8_t data) override; diff --git a/src/devices/bus/vectrex/slot.cpp b/src/devices/bus/vectrex/slot.cpp index 0b527eaeb27..60dddce4280 100644 --- a/src/devices/bus/vectrex/slot.cpp +++ b/src/devices/bus/vectrex/slot.cpp @@ -61,7 +61,7 @@ void device_vectrex_cart_interface::rom_alloc(uint32_t size) //------------------------------------------------- // vectrex_cart_slot_device - constructor //------------------------------------------------- -vectrex_cart_slot_device::vectrex_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vectrex_cart_slot_device::vectrex_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VECTREX_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/vectrex/slot.h b/src/devices/bus/vectrex/slot.h index 577338f80fa..b559fbc4ad6 100644 --- a/src/devices/bus/vectrex/slot.h +++ b/src/devices/bus/vectrex/slot.h @@ -64,7 +64,7 @@ class vectrex_cart_slot_device : public device_t, { public: // construction/destruction - vectrex_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vectrex_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~vectrex_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/vic10/exp.cpp b/src/devices/bus/vic10/exp.cpp index c09651066ba..3543474c756 100644 --- a/src/devices/bus/vic10/exp.cpp +++ b/src/devices/bus/vic10/exp.cpp @@ -53,7 +53,7 @@ device_vic10_expansion_card_interface::~device_vic10_expansion_card_interface() // vic10_expansion_slot_device - constructor //------------------------------------------------- -vic10_expansion_slot_device::vic10_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vic10_expansion_slot_device::vic10_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC10_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h index 36098dfc2cf..aa32f8a7252 100644 --- a/src/devices/bus/vic10/exp.h +++ b/src/devices/bus/vic10/exp.h @@ -55,7 +55,7 @@ class vic10_expansion_slot_device : public device_t, public: // construction/destruction template - vic10_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + vic10_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : vic10_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -63,7 +63,7 @@ public: set_default_option(dflt); set_fixed(false); } - vic10_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic10_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_write_irq.bind(); } auto res_callback() { return m_write_res.bind(); } diff --git a/src/devices/bus/vic10/multimax.cpp b/src/devices/bus/vic10/multimax.cpp index 98f67a48187..dfef6373aa4 100644 --- a/src/devices/bus/vic10/multimax.cpp +++ b/src/devices/bus/vic10/multimax.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VIC10_MULTIMAX, vic10_multimax_device, "vic10_multimax", "VIC // vic10_multimax_device - constructor //------------------------------------------------- -vic10_multimax_device::vic10_multimax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vic10_multimax_device::vic10_multimax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC10_MULTIMAX, tag, owner, clock), device_vic10_expansion_card_interface(mconfig, *this), m_latch(0) { diff --git a/src/devices/bus/vic10/multimax.h b/src/devices/bus/vic10/multimax.h index 51175fc7bd8..678697c1747 100644 --- a/src/devices/bus/vic10/multimax.h +++ b/src/devices/bus/vic10/multimax.h @@ -25,7 +25,7 @@ class vic10_multimax_device : public device_t, public device_vic10_expansion_car { public: // construction/destruction - vic10_multimax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic10_multimax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic10/std.cpp b/src/devices/bus/vic10/std.cpp index a4eff1853ac..e26e96d3c30 100644 --- a/src/devices/bus/vic10/std.cpp +++ b/src/devices/bus/vic10/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VIC10_STD, vic10_standard_cartridge_device, "vic10_standard", // vic10_standard_cartridge_device - constructor //------------------------------------------------- -vic10_standard_cartridge_device::vic10_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic10_standard_cartridge_device::vic10_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC10_STD, tag, owner, clock), device_vic10_expansion_card_interface(mconfig, *this) { } diff --git a/src/devices/bus/vic10/std.h b/src/devices/bus/vic10/std.h index 3279a58333c..2a14011ae3b 100644 --- a/src/devices/bus/vic10/std.h +++ b/src/devices/bus/vic10/std.h @@ -26,7 +26,7 @@ class vic10_standard_cartridge_device : public device_t, { public: // construction/destruction - vic10_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic10_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/4cga.cpp b/src/devices/bus/vic20/4cga.cpp index f806598433a..0025c44a443 100644 --- a/src/devices/bus/vic20/4cga.cpp +++ b/src/devices/bus/vic20/4cga.cpp @@ -59,7 +59,7 @@ ioport_constructor c64_4cga_device::device_input_ports() const // c64_4cga_device - constructor //------------------------------------------------- -c64_4cga_device::c64_4cga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64_4cga_device::c64_4cga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64_4CGA, tag, owner, clock), device_pet_user_port_interface(mconfig, *this), m_port(0), diff --git a/src/devices/bus/vic20/4cga.h b/src/devices/bus/vic20/4cga.h index b4e1ada9a05..9e63863848e 100644 --- a/src/devices/bus/vic20/4cga.h +++ b/src/devices/bus/vic20/4cga.h @@ -27,7 +27,7 @@ class c64_4cga_device : public device_t, { public: // construction/destruction - c64_4cga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64_4cga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/vic20/exp.cpp b/src/devices/bus/vic20/exp.cpp index 0746b3092da..a84f967499a 100644 --- a/src/devices/bus/vic20/exp.cpp +++ b/src/devices/bus/vic20/exp.cpp @@ -52,7 +52,7 @@ device_vic20_expansion_card_interface::~device_vic20_expansion_card_interface() // vic20_expansion_slot_device - constructor //------------------------------------------------- -vic20_expansion_slot_device::vic20_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vic20_expansion_slot_device::vic20_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC20_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h index 124bc7bb9c1..36518a31ce3 100644 --- a/src/devices/bus/vic20/exp.h +++ b/src/devices/bus/vic20/exp.h @@ -54,7 +54,7 @@ class vic20_expansion_slot_device : public device_t, public: // construction/destruction template - vic20_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + vic20_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : vic20_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -62,7 +62,7 @@ public: set_default_option(dflt); set_fixed(false); } - vic20_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic20_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static void add_passthrough(machine_config &config, const char *_tag); diff --git a/src/devices/bus/vic20/fe3.cpp b/src/devices/bus/vic20/fe3.cpp index 230dc076bb4..91a7a9573eb 100644 --- a/src/devices/bus/vic20/fe3.cpp +++ b/src/devices/bus/vic20/fe3.cpp @@ -101,7 +101,7 @@ void vic20_final_expansion_3_device::device_add_mconfig(machine_config &config) // vic20_final_expansion_3_device - constructor //------------------------------------------------- -vic20_final_expansion_3_device::vic20_final_expansion_3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vic20_final_expansion_3_device::vic20_final_expansion_3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC20_FE3, tag, owner, clock), device_vic20_expansion_card_interface(mconfig, *this), m_flash_rom(*this, AM29F040_TAG), diff --git a/src/devices/bus/vic20/fe3.h b/src/devices/bus/vic20/fe3.h index c82fff2f7ee..20619cfb8a0 100644 --- a/src/devices/bus/vic20/fe3.h +++ b/src/devices/bus/vic20/fe3.h @@ -27,7 +27,7 @@ class vic20_final_expansion_3_device : public device_t, { public: // construction/destruction - vic20_final_expansion_3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic20_final_expansion_3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/megacart.cpp b/src/devices/bus/vic20/megacart.cpp index 21171bf4343..44c89fdd62c 100644 --- a/src/devices/bus/vic20/megacart.cpp +++ b/src/devices/bus/vic20/megacart.cpp @@ -35,7 +35,7 @@ void vic20_megacart_device::device_add_mconfig(machine_config &config) // vic20_megacart_device - constructor //------------------------------------------------- -vic20_megacart_device::vic20_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic20_megacart_device::vic20_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC20_MEGACART, tag, owner, clock) , device_vic20_expansion_card_interface(mconfig, *this) , device_nvram_interface(mconfig, *this) diff --git a/src/devices/bus/vic20/megacart.h b/src/devices/bus/vic20/megacart.h index e1c691a9a4b..05adc6ac641 100644 --- a/src/devices/bus/vic20/megacart.h +++ b/src/devices/bus/vic20/megacart.h @@ -27,7 +27,7 @@ class vic20_megacart_device : public device_t, { public: // construction/destruction - vic20_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic20_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/speakeasy.cpp b/src/devices/bus/vic20/speakeasy.cpp index 6128852d540..5401592c783 100644 --- a/src/devices/bus/vic20/speakeasy.cpp +++ b/src/devices/bus/vic20/speakeasy.cpp @@ -37,7 +37,7 @@ void vic20_speakeasy_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - VOTRAX_SC01(config, m_votrax, 720000).add_route(ALL_OUTPUTS, "mono", 0.85); + VOTRAX_SC01(config, m_votrax, XTAL::u(720000)).add_route(ALL_OUTPUTS, "mono", 0.85); } @@ -50,7 +50,7 @@ void vic20_speakeasy_device::device_add_mconfig(machine_config &config) // vic20_speakeasy_device - constructor //------------------------------------------------- -vic20_speakeasy_device::vic20_speakeasy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vic20_speakeasy_device::vic20_speakeasy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC20_SPEAKEASY, tag, owner, clock), device_vic20_expansion_card_interface(mconfig, *this), m_votrax(*this, SC01A_TAG) diff --git a/src/devices/bus/vic20/speakeasy.h b/src/devices/bus/vic20/speakeasy.h index 6df3880d2df..9bbcba26c67 100644 --- a/src/devices/bus/vic20/speakeasy.h +++ b/src/devices/bus/vic20/speakeasy.h @@ -28,7 +28,7 @@ class vic20_speakeasy_device : public device_t, { public: // construction/destruction - vic20_speakeasy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic20_speakeasy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/std.cpp b/src/devices/bus/vic20/std.cpp index 988540719d8..77f1d54eda0 100644 --- a/src/devices/bus/vic20/std.cpp +++ b/src/devices/bus/vic20/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VIC20_STD, vic20_standard_cartridge_device, "vic20_standard", // vic20_standard_cartridge_device - constructor //------------------------------------------------- -vic20_standard_cartridge_device::vic20_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic20_standard_cartridge_device::vic20_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC20_STD, tag, owner, clock), device_vic20_expansion_card_interface(mconfig, *this) { } diff --git a/src/devices/bus/vic20/std.h b/src/devices/bus/vic20/std.h index 0318f80aa54..f07040551e1 100644 --- a/src/devices/bus/vic20/std.h +++ b/src/devices/bus/vic20/std.h @@ -26,7 +26,7 @@ class vic20_standard_cartridge_device : public device_t, { public: // construction/destruction - vic20_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic20_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/vic1010.cpp b/src/devices/bus/vic20/vic1010.cpp index 651ac37156e..a5429a7a51f 100644 --- a/src/devices/bus/vic20/vic1010.cpp +++ b/src/devices/bus/vic20/vic1010.cpp @@ -41,7 +41,7 @@ void vic1010_device::device_add_mconfig(machine_config &config) // vic1010_device - constructor //------------------------------------------------- -vic1010_device::vic1010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic1010_device::vic1010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1010, tag, owner, clock) , device_vic20_expansion_card_interface(mconfig, *this) , m_expansion_slot(*this, "slot%u", 1) diff --git a/src/devices/bus/vic20/vic1010.h b/src/devices/bus/vic20/vic1010.h index af85f4bfc3c..f4a7bbdf08b 100644 --- a/src/devices/bus/vic20/vic1010.h +++ b/src/devices/bus/vic20/vic1010.h @@ -26,7 +26,7 @@ class vic1010_device : public device_t, { public: // construction/destruction - vic1010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic1010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/vic1011.cpp b/src/devices/bus/vic20/vic1011.cpp index 893536a5b09..bd20cb1b7d1 100644 --- a/src/devices/bus/vic20/vic1011.cpp +++ b/src/devices/bus/vic20/vic1011.cpp @@ -40,7 +40,7 @@ void vic1011_device::device_add_mconfig(machine_config &config) // vic1011_device - constructor //------------------------------------------------- -vic1011_device::vic1011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic1011_device::vic1011_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1011, tag, owner, clock) , device_pet_user_port_interface(mconfig, *this) , m_rs232(*this, "rs232") diff --git a/src/devices/bus/vic20/vic1011.h b/src/devices/bus/vic20/vic1011.h index e13bc6550ba..6d3bbfe1dcc 100644 --- a/src/devices/bus/vic20/vic1011.h +++ b/src/devices/bus/vic20/vic1011.h @@ -26,7 +26,7 @@ class vic1011_device : public device_t, public device_pet_user_port_interface { public: // construction/destruction - vic1011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic1011_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_pet_user_port_interface overrides virtual DECLARE_WRITE_LINE_MEMBER( input_d ) override; diff --git a/src/devices/bus/vic20/vic1110.cpp b/src/devices/bus/vic20/vic1110.cpp index f9ee69fd8b1..efc690509fd 100644 --- a/src/devices/bus/vic20/vic1110.cpp +++ b/src/devices/bus/vic20/vic1110.cpp @@ -66,7 +66,7 @@ ioport_constructor vic1110_device::device_input_ports() const // vic1110_device - constructor //------------------------------------------------- -vic1110_device::vic1110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic1110_device::vic1110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1110, tag, owner, clock) , device_vic20_expansion_card_interface(mconfig, *this) , m_ram(*this, "ram", 0x2000, ENDIANNESS_LITTLE) diff --git a/src/devices/bus/vic20/vic1110.h b/src/devices/bus/vic20/vic1110.h index 831bc478bf4..bb4e194cdb2 100644 --- a/src/devices/bus/vic20/vic1110.h +++ b/src/devices/bus/vic20/vic1110.h @@ -26,7 +26,7 @@ class vic1110_device : public device_t, { public: // construction/destruction - vic1110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic1110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/vic20/vic1111.cpp b/src/devices/bus/vic20/vic1111.cpp index 4bb3a492ef2..cd56b5780b3 100644 --- a/src/devices/bus/vic20/vic1111.cpp +++ b/src/devices/bus/vic20/vic1111.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VIC1111, vic1111_device, "vic1111", "VIC-1111 16K RAM Expansi // vic1111_device - constructor //------------------------------------------------- -vic1111_device::vic1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic1111_device::vic1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1111, tag, owner, clock) , device_vic20_expansion_card_interface(mconfig, *this) , m_ram(*this, "ram", 0x4000, ENDIANNESS_LITTLE) diff --git a/src/devices/bus/vic20/vic1111.h b/src/devices/bus/vic20/vic1111.h index 7d391875732..80b8e1218d8 100644 --- a/src/devices/bus/vic20/vic1111.h +++ b/src/devices/bus/vic20/vic1111.h @@ -26,7 +26,7 @@ class vic1111_device : public device_t, { public: // construction/destruction - vic1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/vic1112.cpp b/src/devices/bus/vic20/vic1112.cpp index ce878ee5f9f..a17638efa44 100644 --- a/src/devices/bus/vic20/vic1112.cpp +++ b/src/devices/bus/vic20/vic1112.cpp @@ -111,7 +111,7 @@ void vic1112_device::device_add_mconfig(machine_config &config) m_via1->cb2_handler().set(IEEE488_TAG, FUNC(ieee488_device::host_eoi_w)); m_via1->irq_handler().set(FUNC(vic1112_device::via1_irq_w)); - IEEE488(config, m_bus, 0); + IEEE488(config, m_bus); ieee488_slot_device::add_cbm_defaults(config, nullptr); m_bus->srq_callback().set(m_via1, FUNC(via6522_device::write_cb1)); } @@ -126,7 +126,7 @@ void vic1112_device::device_add_mconfig(machine_config &config) // vic1112_device - constructor //------------------------------------------------- -vic1112_device::vic1112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic1112_device::vic1112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1112, tag, owner, clock) , device_vic20_expansion_card_interface(mconfig, *this) , m_via0(*this, M6522_0_TAG) diff --git a/src/devices/bus/vic20/vic1112.h b/src/devices/bus/vic20/vic1112.h index 8353ad2390d..37d23586a27 100644 --- a/src/devices/bus/vic20/vic1112.h +++ b/src/devices/bus/vic20/vic1112.h @@ -31,7 +31,7 @@ class vic1112_device : public device_t, { public: // construction/destruction - vic1112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic1112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/vic1210.cpp b/src/devices/bus/vic20/vic1210.cpp index 88c94e8fbbd..fe7bfbb1cbd 100644 --- a/src/devices/bus/vic20/vic1210.cpp +++ b/src/devices/bus/vic20/vic1210.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(VIC1210, vic1210_device, "vic1210", "VIC-1210 3K RAM Expansio // vic1210_device - constructor //------------------------------------------------- -vic1210_device::vic1210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic1210_device::vic1210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC1210, tag, owner, clock) , device_vic20_expansion_card_interface(mconfig, *this) , m_ram(*this, "ram", 0xc00, ENDIANNESS_LITTLE) diff --git a/src/devices/bus/vic20/vic1210.h b/src/devices/bus/vic20/vic1210.h index 9f20f9164ad..7dedfc838bc 100644 --- a/src/devices/bus/vic20/vic1210.h +++ b/src/devices/bus/vic20/vic1210.h @@ -27,7 +27,7 @@ class vic1210_device : public device_t, { public: // construction/destruction - vic1210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic1210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vic20/videopak.cpp b/src/devices/bus/vic20/videopak.cpp index 542c2fb8320..4a0e4798e23 100644 --- a/src/devices/bus/vic20/videopak.cpp +++ b/src/devices/bus/vic20/videopak.cpp @@ -125,7 +125,7 @@ void vic20_video_pak_device::device_add_mconfig(machine_config &config) // vic20_video_pak_device - constructor //------------------------------------------------- -vic20_video_pak_device::vic20_video_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vic20_video_pak_device::vic20_video_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC20_VIDEO_PAK, tag, owner, clock), device_vic20_expansion_card_interface(mconfig, *this), m_crtc(*this, MC6845_TAG), diff --git a/src/devices/bus/vic20/videopak.h b/src/devices/bus/vic20/videopak.h index d87b04d35c1..75af909654f 100644 --- a/src/devices/bus/vic20/videopak.h +++ b/src/devices/bus/vic20/videopak.h @@ -30,7 +30,7 @@ class vic20_video_pak_device : public device_t, { public: // construction/destruction - vic20_video_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic20_video_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vidbrain/exp.cpp b/src/devices/bus/vidbrain/exp.cpp index 42cd7ebe9ba..ddfa6c75c4b 100644 --- a/src/devices/bus/vidbrain/exp.cpp +++ b/src/devices/bus/vidbrain/exp.cpp @@ -79,7 +79,7 @@ uint8_t* device_videobrain_expansion_card_interface::videobrain_ram_pointer(runn // videobrain_expansion_slot_device - constructor //------------------------------------------------- -videobrain_expansion_slot_device::videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +videobrain_expansion_slot_device::videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIDEOBRAIN_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), device_cartrom_image_interface(mconfig, *this), diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h index a72cc410adc..a0fd3882124 100644 --- a/src/devices/bus/vidbrain/exp.h +++ b/src/devices/bus/vidbrain/exp.h @@ -90,14 +90,14 @@ public: // construction/destruction template videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, char const* dflt) - : videobrain_expansion_slot_device(mconfig, tag, owner, 0) + : videobrain_expansion_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto extres_wr_callback() { return m_write_extres.bind(); } diff --git a/src/devices/bus/vidbrain/money_minder.cpp b/src/devices/bus/vidbrain/money_minder.cpp index b0f4826ca5d..690f0ec2424 100644 --- a/src/devices/bus/vidbrain/money_minder.cpp +++ b/src/devices/bus/vidbrain/money_minder.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VB_MONEY_MINDER, videobrain_money_minder_cartridge_device, "v // videobrain_money_minder_cartridge_device - constructor //------------------------------------------------- -videobrain_money_minder_cartridge_device::videobrain_money_minder_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +videobrain_money_minder_cartridge_device::videobrain_money_minder_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VB_MONEY_MINDER, tag, owner, clock), device_videobrain_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/vidbrain/money_minder.h b/src/devices/bus/vidbrain/money_minder.h index 23f219c4962..5df7cd20669 100644 --- a/src/devices/bus/vidbrain/money_minder.h +++ b/src/devices/bus/vidbrain/money_minder.h @@ -26,7 +26,7 @@ class videobrain_money_minder_cartridge_device : public device_t, { public: // construction/destruction - videobrain_money_minder_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + videobrain_money_minder_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vidbrain/std.cpp b/src/devices/bus/vidbrain/std.cpp index 55b5c3ce22d..598418a96b1 100644 --- a/src/devices/bus/vidbrain/std.cpp +++ b/src/devices/bus/vidbrain/std.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VB_STD, videobrain_standard_cartridge_device, "vb_std", "Vide // videobrain_standard_cartridge_device - constructor //------------------------------------------------- -videobrain_standard_cartridge_device::videobrain_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +videobrain_standard_cartridge_device::videobrain_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VB_STD, tag, owner, clock), device_videobrain_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/vidbrain/std.h b/src/devices/bus/vidbrain/std.h index 7939501909f..5c6147fd33b 100644 --- a/src/devices/bus/vidbrain/std.h +++ b/src/devices/bus/vidbrain/std.h @@ -26,7 +26,7 @@ class videobrain_standard_cartridge_device : public device_t, { public: // construction/destruction - videobrain_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + videobrain_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vidbrain/timeshare.cpp b/src/devices/bus/vidbrain/timeshare.cpp index 709f16f5c74..29edfaa1858 100644 --- a/src/devices/bus/vidbrain/timeshare.cpp +++ b/src/devices/bus/vidbrain/timeshare.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VB_TIMESHARE, videobrain_timeshare_cartridge_device, "vb_time // videobrain_timeshare_cartridge_device - constructor //------------------------------------------------- -videobrain_timeshare_cartridge_device::videobrain_timeshare_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +videobrain_timeshare_cartridge_device::videobrain_timeshare_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VB_TIMESHARE, tag, owner, clock), device_videobrain_expansion_card_interface(mconfig, *this) { diff --git a/src/devices/bus/vidbrain/timeshare.h b/src/devices/bus/vidbrain/timeshare.h index 7885772149d..1cdaae9059c 100644 --- a/src/devices/bus/vidbrain/timeshare.h +++ b/src/devices/bus/vidbrain/timeshare.h @@ -26,7 +26,7 @@ class videobrain_timeshare_cartridge_device : public device_t, { public: // construction/destruction - videobrain_timeshare_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + videobrain_timeshare_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vip/byteio.cpp b/src/devices/bus/vip/byteio.cpp index 83236247ae7..744c5016d87 100644 --- a/src/devices/bus/vip/byteio.cpp +++ b/src/devices/bus/vip/byteio.cpp @@ -43,7 +43,7 @@ device_vip_byteio_port_interface::device_vip_byteio_port_interface(const machine // vip_byteio_port_device - constructor //------------------------------------------------- -vip_byteio_port_device::vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vip_byteio_port_device::vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIP_BYTEIO_PORT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_inst(*this), diff --git a/src/devices/bus/vip/byteio.h b/src/devices/bus/vip/byteio.h index 5cca82aea45..829d3ed1982 100644 --- a/src/devices/bus/vip/byteio.h +++ b/src/devices/bus/vip/byteio.h @@ -59,7 +59,7 @@ public: // construction/destruction template vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : vip_byteio_port_device(mconfig, tag, owner, 0) + : vip_byteio_port_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -67,7 +67,7 @@ public: set_fixed(false); } - vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vip_byteio_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto inst_callback() { return m_write_inst.bind(); } diff --git a/src/devices/bus/vip/exp.cpp b/src/devices/bus/vip/exp.cpp index f6abf579f18..b6751fc26c3 100644 --- a/src/devices/bus/vip/exp.cpp +++ b/src/devices/bus/vip/exp.cpp @@ -51,7 +51,7 @@ device_vip_expansion_card_interface::device_vip_expansion_card_interface(const m // vip_expansion_slot_device - constructor //------------------------------------------------- -vip_expansion_slot_device::vip_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vip_expansion_slot_device::vip_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIP_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_write_int(*this), diff --git a/src/devices/bus/vip/exp.h b/src/devices/bus/vip/exp.h index aa50074e9ca..ec7065d6ead 100644 --- a/src/devices/bus/vip/exp.h +++ b/src/devices/bus/vip/exp.h @@ -52,7 +52,7 @@ class vip_expansion_slot_device : public device_t, public device_single_card_slo public: // construction/destruction template - vip_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock, T &&opts, char const *dflt) + vip_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, T &&opts, char const *dflt) : vip_expansion_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -60,7 +60,7 @@ public: set_default_option(dflt); set_fixed(false); } - vip_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vip_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_wr_callback() { return m_write_int.bind(); } auto dma_out_wr_callback() { return m_write_dma_out.bind(); } diff --git a/src/devices/bus/vip/vp550.cpp b/src/devices/bus/vip/vp550.cpp index 4fc501154da..e3e2e2f88fd 100644 --- a/src/devices/bus/vip/vp550.cpp +++ b/src/devices/bus/vip/vp550.cpp @@ -32,11 +32,11 @@ void vp550_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - CDP1863(config, m_pfg[0], 0); + CDP1863(config, m_pfg[0]); m_pfg[0]->set_clock2(0); m_pfg[0]->add_route(ALL_OUTPUTS, "mono", 1.0); - CDP1863(config, m_pfg[1], 0); + CDP1863(config, m_pfg[1]); m_pfg[1]->set_clock2(0); m_pfg[1]->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -51,7 +51,7 @@ void vp550_device::device_add_mconfig(machine_config &config) // vp550_device - constructor //------------------------------------------------- -vp550_device::vp550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp550_device::vp550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP550, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_pfg(*this, "u%u", 1U), diff --git a/src/devices/bus/vip/vp550.h b/src/devices/bus/vip/vp550.h index c7f629bbf9d..8ef8bc70398 100644 --- a/src/devices/bus/vip/vp550.h +++ b/src/devices/bus/vip/vp550.h @@ -27,7 +27,7 @@ class vp550_device : public device_t, { public: // construction/destruction - vp550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vip/vp570.cpp b/src/devices/bus/vip/vp570.cpp index f2e32dffd35..cd81d9121d9 100644 --- a/src/devices/bus/vip/vp570.cpp +++ b/src/devices/bus/vip/vp570.cpp @@ -60,7 +60,7 @@ ioport_constructor vp570_device::device_input_ports() const // vp570_device - constructor //------------------------------------------------- -vp570_device::vp570_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp570_device::vp570_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP570, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_ram(*this, "ram", 0x1000, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/vip/vp570.h b/src/devices/bus/vip/vp570.h index 2f026bd1eac..0387500bdfa 100644 --- a/src/devices/bus/vip/vp570.h +++ b/src/devices/bus/vip/vp570.h @@ -26,7 +26,7 @@ class vp570_device : public device_t, { public: // construction/destruction - vp570_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp570_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/vip/vp575.cpp b/src/devices/bus/vip/vp575.cpp index 685c05be7c6..57ba7ba7dd1 100644 --- a/src/devices/bus/vip/vp575.cpp +++ b/src/devices/bus/vip/vp575.cpp @@ -83,7 +83,7 @@ void vp575_device::device_add_mconfig(machine_config &config) // vp575_device - constructor //------------------------------------------------- -vp575_device::vp575_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp575_device::vp575_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP575, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_expansion_slot(*this, "exp%u", 1) diff --git a/src/devices/bus/vip/vp575.h b/src/devices/bus/vip/vp575.h index fb5c22f5628..56ad04fa4a9 100644 --- a/src/devices/bus/vip/vp575.h +++ b/src/devices/bus/vip/vp575.h @@ -26,7 +26,7 @@ class vp575_device : public device_t, { public: // construction/destruction - vp575_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp575_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vip/vp585.cpp b/src/devices/bus/vip/vp585.cpp index 2112637ae6b..e384d706754 100644 --- a/src/devices/bus/vip/vp585.cpp +++ b/src/devices/bus/vip/vp585.cpp @@ -80,7 +80,7 @@ ioport_constructor vp585_device::device_input_ports() const // vp585_device - constructor //------------------------------------------------- -vp585_device::vp585_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp585_device::vp585_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP585, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_j1(*this, "J1"), diff --git a/src/devices/bus/vip/vp585.h b/src/devices/bus/vip/vp585.h index f32bf055e91..66410ff95a8 100644 --- a/src/devices/bus/vip/vp585.h +++ b/src/devices/bus/vip/vp585.h @@ -26,7 +26,7 @@ class vp585_device : public device_t, { public: // construction/destruction - vp585_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp585_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/vip/vp590.cpp b/src/devices/bus/vip/vp590.cpp index 296ce70fb8b..acf53f07256 100644 --- a/src/devices/bus/vip/vp590.cpp +++ b/src/devices/bus/vip/vp590.cpp @@ -127,7 +127,7 @@ ioport_constructor vp590_device::device_input_ports() const // vp590_device - constructor //------------------------------------------------- -vp590_device::vp590_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp590_device::vp590_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP590, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_cgc(*this, CDP1862_TAG), diff --git a/src/devices/bus/vip/vp590.h b/src/devices/bus/vip/vp590.h index 9c69762f7be..93e11fdb05f 100644 --- a/src/devices/bus/vip/vp590.h +++ b/src/devices/bus/vip/vp590.h @@ -28,7 +28,7 @@ class vp590_device : public device_t, { public: // construction/destruction - vp590_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp590_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vip/vp595.cpp b/src/devices/bus/vip/vp595.cpp index 670b0926f90..35f0840ac71 100644 --- a/src/devices/bus/vip/vp595.cpp +++ b/src/devices/bus/vip/vp595.cpp @@ -37,7 +37,7 @@ void vp595_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - CDP1863(config, m_pfg, 0); + CDP1863(config, m_pfg); m_pfg->set_clock2(CDP1863_XTAL); m_pfg->add_route(ALL_OUTPUTS, "mono", 0.25); } @@ -52,7 +52,7 @@ void vp595_device::device_add_mconfig(machine_config &config) // vp595_device - constructor //------------------------------------------------- -vp595_device::vp595_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp595_device::vp595_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP595, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_pfg(*this, CDP1863_TAG) diff --git a/src/devices/bus/vip/vp595.h b/src/devices/bus/vip/vp595.h index 5c98b33fe7c..0d7f9742ea5 100644 --- a/src/devices/bus/vip/vp595.h +++ b/src/devices/bus/vip/vp595.h @@ -27,7 +27,7 @@ class vp595_device : public device_t, { public: // construction/destruction - vp595_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp595_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vip/vp620.cpp b/src/devices/bus/vip/vp620.cpp index ba6a938f660..189520b4e79 100644 --- a/src/devices/bus/vip/vp620.cpp +++ b/src/devices/bus/vip/vp620.cpp @@ -38,7 +38,7 @@ void vp620_device::kb_w(uint8_t data) void vp620_device::device_add_mconfig(machine_config &config) { - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(vp620_device::kb_w)); } @@ -52,7 +52,7 @@ void vp620_device::device_add_mconfig(machine_config &config) // vp620_device - constructor //------------------------------------------------- -vp620_device::vp620_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp620_device::vp620_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP620, tag, owner, clock), device_vip_byteio_port_interface(mconfig, *this), m_keydata(0), diff --git a/src/devices/bus/vip/vp620.h b/src/devices/bus/vip/vp620.h index 3541db5d8e5..62f178320f5 100644 --- a/src/devices/bus/vip/vp620.h +++ b/src/devices/bus/vip/vp620.h @@ -27,7 +27,7 @@ class vp620_device : public device_t, { public: // construction/destruction - vp620_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp620_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/vip/vp700.cpp b/src/devices/bus/vip/vp700.cpp index f64574a23fc..d07752aa976 100644 --- a/src/devices/bus/vip/vp700.cpp +++ b/src/devices/bus/vip/vp700.cpp @@ -46,7 +46,7 @@ const tiny_rom_entry *vp700_device::device_rom_region() const // vp700_device - constructor //------------------------------------------------- -vp700_device::vp700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vp700_device::vp700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VP700, tag, owner, clock), device_vip_expansion_card_interface(mconfig, *this), m_rom(*this, "vp700") diff --git a/src/devices/bus/vip/vp700.h b/src/devices/bus/vip/vp700.h index 4927005742e..b3fc77238c4 100644 --- a/src/devices/bus/vip/vp700.h +++ b/src/devices/bus/vip/vp700.h @@ -27,7 +27,7 @@ class vp700_device : public device_t, { public: // construction/destruction - vp700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vp700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/vme/vme.cpp b/src/devices/bus/vme/vme.cpp index 1353f36ae22..f75e47d159a 100644 --- a/src/devices/bus/vme/vme.cpp +++ b/src/devices/bus/vme/vme.cpp @@ -101,12 +101,12 @@ DEFINE_DEVICE_TYPE(VME_SLOT, vme_slot_device, "vme_slot", "VME slot") //------------------------------------------------- // vme_slot_device - constructor //------------------------------------------------- -vme_slot_device::vme_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_slot_device::vme_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_slot_device(mconfig, VME_SLOT, tag, owner, clock) { } -vme_slot_device::vme_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vme_slot_device::vme_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_slot_interface(mconfig, *this) , m_vme(*this, finder_base::DUMMY_TAG) @@ -203,12 +203,12 @@ void vme_device::use_owner_spaces() m_allocspaces = false; } -vme_device::vme_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_device::vme_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_device(mconfig, VME, tag, owner, clock) { } -vme_device::vme_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vme_device::vme_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_a32_config("a32", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor()) diff --git a/src/devices/bus/vme/vme.h b/src/devices/bus/vme/vme.h index e49b23cbbbe..519908b6e2d 100644 --- a/src/devices/bus/vme/vme.h +++ b/src/devices/bus/vme/vme.h @@ -86,7 +86,7 @@ public: // construction/destruction template vme_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, uint32_t slot_nbr, U &&bus_tag) - : vme_slot_device(mconfig, tag, owner, 0) + : vme_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -95,7 +95,7 @@ public: set_vme_slot(std::forward(bus_tag), slot_nbr); } - vme_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // Callbacks to the board from the VME bus comes through here auto vme_j1_callback() { return m_vme_j1_callback.bind(); } @@ -106,7 +106,7 @@ public: virtual void write8(offs_t offset, uint8_t data); protected: - vme_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -130,7 +130,7 @@ class vme_device : public device_t, public device_memory_interface { public: - vme_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~vme_device(); // inline configuration @@ -185,7 +185,7 @@ public: void install_device(vme_amod_t amod, offs_t start, offs_t end, read32_delegate rhandler, write32_delegate whandler, uint32_t mask); protected: - vme_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/vme/vme_cp31.cpp b/src/devices/bus/vme/vme_cp31.cpp index 2a59f92b7ed..53ba901154f 100644 --- a/src/devices/bus/vme/vme_cp31.cpp +++ b/src/devices/bus/vme/vme_cp31.cpp @@ -176,7 +176,7 @@ void vme_cp31_card_device::device_add_mconfig(machine_config &config) m_rtc->out_int_handler().set(m_pit1, FUNC(pit68230_device::h2_w)); // H1 is SYSFAIL and H3 is ACFAIL - PIT68230(config, m_pit1, 8064000); // via c33_txt + PIT68230(config, m_pit1, XTAL::u(8064000)); // via c33_txt m_pit1->pa_in_callback().set_ioport("SA1"); m_pit1->pb_out_callback().set(*this, FUNC(vme_cp31_card_device::pit1_pb_w)); m_pit1->pc_in_callback().set(*this, FUNC(vme_cp31_card_device::pit1_pc_r)); @@ -184,7 +184,7 @@ void vme_cp31_card_device::device_add_mconfig(machine_config &config) m_pit1->timer_irq_callback().set(m_bim, FUNC(bim68153_device::int2_w)); m_pit1->port_irq_callback().set(m_bim, FUNC(bim68153_device::int3_w)); - PIT68230(config, m_pit2, 8064000); // via c33_txt + PIT68230(config, m_pit2, XTAL::u(8064000)); // via c33_txt m_pit2->port_irq_callback().set(m_pit1, FUNC(pit68230_device::h4_w)); } @@ -264,7 +264,7 @@ void vme_cp31_card_device::set_bus_error(uint32_t address, bool rw, uint32_t mem m_bus_error_timer->adjust(m_maincpu->cycles_to_attotime(16)); // let rmw cycles complete } -vme_cp31_card_device::vme_cp31_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vme_cp31_card_device::vme_cp31_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_vme_card_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -281,7 +281,7 @@ vme_cp31_card_device::vme_cp31_card_device(const machine_config &mconfig, device // -vme_cp31_card_device::vme_cp31_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_cp31_card_device::vme_cp31_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_cp31_card_device(mconfig, VME_CP31, tag, owner, clock) { } diff --git a/src/devices/bus/vme/vme_cp31.h b/src/devices/bus/vme/vme_cp31.h index 588ca7fb4fc..4f9dae99bbc 100644 --- a/src/devices/bus/vme/vme_cp31.h +++ b/src/devices/bus/vme/vme_cp31.h @@ -20,10 +20,10 @@ DECLARE_DEVICE_TYPE(VME_CP31, vme_cp31_card_device) class vme_cp31_card_device : public device_t, public device_vme_card_interface { public: - vme_cp31_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_cp31_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_cp31_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_cp31_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vme/vme_fccpu20.cpp b/src/devices/bus/vme/vme_fccpu20.cpp index 6bf01e23b06..2936037f712 100644 --- a/src/devices/bus/vme/vme_fccpu20.cpp +++ b/src/devices/bus/vme/vme_fccpu20.cpp @@ -372,7 +372,7 @@ void vme_fccpu21yb_card_device::device_add_mconfig(machine_config &config) //************************************************************************** // Base Device //************************************************************************** -vme_fccpu20_device::vme_fccpu20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, fc_board_t board_id) : +vme_fccpu20_device::vme_fccpu20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, fc_board_t board_id) : device_t(mconfig, type, tag, owner, clock) , device_vme_card_interface(mconfig, *this) , m_maincpu (*this, "maincpu") @@ -389,46 +389,46 @@ vme_fccpu20_device::vme_fccpu20_device(const machine_config &mconfig, device_typ //************************************************************************** // Card Devices //************************************************************************** -vme_fccpu20_card_device::vme_fccpu20_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fccpu20_card_device::vme_fccpu20_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_card_device(mconfig, VME_FCCPU20, tag, owner, clock) { LOG("vme_fccpu20_card_device ctor: %s\n", tag); } -vme_fccpu21s_card_device::vme_fccpu21s_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fccpu21s_card_device::vme_fccpu21s_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu21s_card_device(mconfig, VME_FCCPU21S, tag, owner, clock) { LOG("vme_fccpu21s_card_device ctor: %s\n", tag); } -vme_fccpu21_card_device::vme_fccpu21_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fccpu21_card_device::vme_fccpu21_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu21_card_device(mconfig, VME_FCCPU21, tag, owner, clock) { LOG("vme_fccpu21_card_device ctor: %s\n", tag); } -vme_fccpu21a_card_device::vme_fccpu21a_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fccpu21a_card_device::vme_fccpu21a_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu21a_card_device(mconfig, VME_FCCPU21A, tag, owner, clock) { LOG("vme_fccpu21a_card_device ctor: %s\n", tag); } // TODO: Change to 2MB on board RAM and move FLME memory and find/verify memory map -vme_fccpu21ya_card_device::vme_fccpu21ya_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fccpu21ya_card_device::vme_fccpu21ya_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu21ya_card_device(mconfig, VME_FCCPU21YA, tag, owner, clock) { LOG("vme_fccpu21ya_card_device ctor: %s\n", tag); } -vme_fccpu21b_card_device::vme_fccpu21b_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fccpu21b_card_device::vme_fccpu21b_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu21b_card_device(mconfig, VME_FCCPU21B, tag, owner, clock) { LOG("vme_fccpu21b_card_device ctor: %s\n", tag); } // TODO: Change to 2MB on board RAM and move FLME memory and find/verify memory map -vme_fccpu21yb_card_device::vme_fccpu21yb_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fccpu21yb_card_device::vme_fccpu21yb_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu21yb_card_device(mconfig, VME_FCCPU21YB, tag, owner, clock) { LOG("vme_fccpu21yb_card_device ctor: %s\n", tag); diff --git a/src/devices/bus/vme/vme_fccpu20.h b/src/devices/bus/vme/vme_fccpu20.h index 42569041f87..a10569d2039 100644 --- a/src/devices/bus/vme/vme_fccpu20.h +++ b/src/devices/bus/vme/vme_fccpu20.h @@ -39,7 +39,7 @@ protected: cpu21s }; - vme_fccpu20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, fc_board_t board_id); + vme_fccpu20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, fc_board_t board_id); virtual void device_start() override; virtual void device_reset() override; @@ -92,10 +92,10 @@ private: class vme_fccpu20_card_device : public vme_fccpu20_device { public : - vme_fccpu20_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fccpu20_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fccpu20_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_fccpu20_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_device(mconfig, type, tag, owner, clock, cpu20) { } @@ -106,10 +106,10 @@ protected: class vme_fccpu21s_card_device : public vme_fccpu20_device { public : - vme_fccpu21s_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fccpu21s_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fccpu21s_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_fccpu21s_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_device(mconfig, type, tag, owner, clock, cpu21s) { } @@ -120,10 +120,10 @@ protected: class vme_fccpu21_card_device : public vme_fccpu20_device { public : - vme_fccpu21_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fccpu21_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fccpu21_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_fccpu21_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_device(mconfig, type, tag, owner, clock, cpu21) { } @@ -134,10 +134,10 @@ protected: class vme_fccpu21a_card_device : public vme_fccpu20_device { public : - vme_fccpu21a_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fccpu21a_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fccpu21a_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_fccpu21a_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_device(mconfig, type, tag, owner, clock, cpu21a) { } @@ -148,10 +148,10 @@ protected: class vme_fccpu21ya_card_device : public vme_fccpu20_device { public : - vme_fccpu21ya_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fccpu21ya_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fccpu21ya_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_fccpu21ya_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_device(mconfig, type, tag, owner, clock, cpu21ya) { } @@ -162,10 +162,10 @@ protected: class vme_fccpu21b_card_device : public vme_fccpu20_device { public : - vme_fccpu21b_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fccpu21b_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fccpu21b_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_fccpu21b_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_device(mconfig, type, tag, owner, clock, cpu21b) { } @@ -176,10 +176,10 @@ protected: class vme_fccpu21yb_card_device : public vme_fccpu20_device { public : - vme_fccpu21yb_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fccpu21yb_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fccpu21yb_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_fccpu21yb_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_fccpu20_device(mconfig, type, tag, owner, clock, cpu21yb) { } diff --git a/src/devices/bus/vme/vme_fcisio.cpp b/src/devices/bus/vme/vme_fcisio.cpp index 9003384ce4d..92965d618a5 100644 --- a/src/devices/bus/vme/vme_fcisio.cpp +++ b/src/devices/bus/vme/vme_fcisio.cpp @@ -292,7 +292,7 @@ void vme_fcisio1_card_device::device_add_mconfig(machine_config &config) #define RS232P8_TAG "rs232p8" DUSCC68562(config, m_duscc0, DUSCC_CLOCK); - m_duscc0->configure_channels(0, 0, 0, 0); + m_duscc0->configure_channels(XTAL(), XTAL(), XTAL(), XTAL()); /* Port 1 on DUSCC 0 Port A */ m_duscc0->out_txda_callback().set(RS232P1_TAG, FUNC(rs232_port_device::write_txd)); m_duscc0->out_dtra_callback().set(RS232P1_TAG, FUNC(rs232_port_device::write_dtr)); @@ -311,7 +311,7 @@ void vme_fcisio1_card_device::device_add_mconfig(machine_config &config) rs232p2.cts_handler().set(m_duscc0, FUNC(duscc68562_device::ctsb_w)); DUSCC68562(config, m_duscc1, DUSCC_CLOCK); - m_duscc1->configure_channels(0, 0, 0, 0); + m_duscc1->configure_channels(XTAL(), XTAL(), XTAL(), XTAL()); /* Port 3 on DUSCC 1 Port A */ m_duscc1->out_txda_callback().set(RS232P3_TAG, FUNC(rs232_port_device::write_txd)); m_duscc1->out_dtra_callback().set(RS232P3_TAG, FUNC(rs232_port_device::write_dtr)); @@ -330,7 +330,7 @@ void vme_fcisio1_card_device::device_add_mconfig(machine_config &config) rs232p4.cts_handler().set(m_duscc1, FUNC(duscc68562_device::ctsb_w)); DUSCC68562(config, m_duscc2, DUSCC_CLOCK); - m_duscc2->configure_channels(0, 0, 0, 0); + m_duscc2->configure_channels(XTAL(), XTAL(), XTAL(), XTAL()); /* Port 5 on DUSCC 2 Port A */ m_duscc2->out_txda_callback().set(RS232P5_TAG, FUNC(rs232_port_device::write_txd)); m_duscc2->out_dtra_callback().set(RS232P5_TAG, FUNC(rs232_port_device::write_dtr)); @@ -349,7 +349,7 @@ void vme_fcisio1_card_device::device_add_mconfig(machine_config &config) rs232p6.cts_handler().set(m_duscc2, FUNC(duscc68562_device::ctsb_w)); DUSCC68562(config, m_duscc3, DUSCC_CLOCK); - m_duscc3->configure_channels(0, 0, 0, 0); + m_duscc3->configure_channels(XTAL(), XTAL(), XTAL(), XTAL()); /* Port 7 on DUSCC 3 Port A */ m_duscc3->out_txda_callback().set(RS232P7_TAG, FUNC(rs232_port_device::write_txd)); m_duscc3->out_dtra_callback().set(RS232P7_TAG, FUNC(rs232_port_device::write_dtr)); @@ -382,7 +382,7 @@ const tiny_rom_entry *vme_fcisio1_card_device::device_rom_region() const //************************************************************************** // LIVE DEVICE //************************************************************************** -vme_fcisio1_card_device::vme_fcisio1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vme_fcisio1_card_device::vme_fcisio1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_vme_card_interface(mconfig, *this) , m_maincpu (*this, "maincpu") @@ -396,7 +396,7 @@ vme_fcisio1_card_device::vme_fcisio1_card_device(const machine_config &mconfig, LOG("%s\n", FUNCNAME); } -vme_fcisio1_card_device::vme_fcisio1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fcisio1_card_device::vme_fcisio1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fcisio1_card_device(mconfig, VME_FCISIO1, tag, owner, clock) { } diff --git a/src/devices/bus/vme/vme_fcisio.h b/src/devices/bus/vme/vme_fcisio.h index 6ffecb0e6af..56d3abfdb31 100644 --- a/src/devices/bus/vme/vme_fcisio.h +++ b/src/devices/bus/vme/vme_fcisio.h @@ -15,10 +15,10 @@ DECLARE_DEVICE_TYPE(VME_FCISIO1, vme_fcisio1_card_device) class vme_fcisio1_card_device : public device_t, public device_vme_card_interface { public: - vme_fcisio1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fcisio1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fcisio1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_fcisio1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vme/vme_fcscsi.cpp b/src/devices/bus/vme/vme_fcscsi.cpp index 92f6cac9791..7bdb17820cb 100644 --- a/src/devices/bus/vme/vme_fcscsi.cpp +++ b/src/devices/bus/vme/vme_fcscsi.cpp @@ -308,7 +308,7 @@ const tiny_rom_entry *vme_fcscsi1_card_device::device_rom_region() const //************************************************************************** // LIVE DEVICE //************************************************************************** -vme_fcscsi1_card_device::vme_fcscsi1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vme_fcscsi1_card_device::vme_fcscsi1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_vme_card_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -320,7 +320,7 @@ vme_fcscsi1_card_device::vme_fcscsi1_card_device(const machine_config &mconfig, LOG("%s\n", FUNCNAME); } -vme_fcscsi1_card_device::vme_fcscsi1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_fcscsi1_card_device::vme_fcscsi1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_fcscsi1_card_device(mconfig, VME_FCSCSI1, tag, owner, clock) { } diff --git a/src/devices/bus/vme/vme_fcscsi.h b/src/devices/bus/vme/vme_fcscsi.h index 58c57c88fdc..5e00ad42716 100644 --- a/src/devices/bus/vme/vme_fcscsi.h +++ b/src/devices/bus/vme/vme_fcscsi.h @@ -16,10 +16,10 @@ DECLARE_DEVICE_TYPE(VME_FCSCSI1, vme_fcscsi1_card_device) class vme_fcscsi1_card_device : public device_t, public device_vme_card_interface { public: - vme_fcscsi1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_fcscsi1_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_fcscsi1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_fcscsi1_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vme/vme_hcpu30.cpp b/src/devices/bus/vme/vme_hcpu30.cpp index a68cdb319f2..db1b7a01500 100644 --- a/src/devices/bus/vme/vme_hcpu30.cpp +++ b/src/devices/bus/vme/vme_hcpu30.cpp @@ -172,14 +172,14 @@ static void hcpu_floppies(device_slot_interface &device) void vme_hcpu30_card_device::device_add_mconfig(machine_config &config) { // I/O CPU - M68020(config, m_maincpu, 16670000); + M68020(config, m_maincpu, XTAL::u(16670000)); m_maincpu->set_addrmap(AS_PROGRAM, &vme_hcpu30_card_device::hcpu30_mem); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &vme_hcpu30_card_device::cpu_space_map); m_maincpu->disable_interrupt_mixer(); // FIXME: functional test expects dtr->dcd, rts->cts connections on both ports and tx->rx connection on port B DUSCC68562(config, m_dusccterm, DUSCC_CLOCK); - m_dusccterm->configure_channels(0, 0, 0, 0); + m_dusccterm->configure_channels(XTAL(), XTAL(), XTAL(), XTAL()); m_dusccterm->out_txda_callback().set(RS232P1_TAG, FUNC(rs232_port_device::write_txd)); m_dusccterm->out_dtra_callback().set(RS232P1_TAG, FUNC(rs232_port_device::write_dtr)); m_dusccterm->out_rtsa_callback().set(RS232P1_TAG, FUNC(rs232_port_device::write_rts)); @@ -526,7 +526,7 @@ void vme_hcpu30_card_device::set_bus_error(uint32_t address, bool rw, uint32_t m m_bus_error_timer->adjust(m_oscpu->cycles_to_attotime(16)); // let rmw cycles complete } -vme_hcpu30_card_device::vme_hcpu30_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vme_hcpu30_card_device::vme_hcpu30_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_vme_card_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -551,7 +551,7 @@ vme_hcpu30_card_device::vme_hcpu30_card_device(const machine_config &mconfig, de // -vme_hcpu30_card_device::vme_hcpu30_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_hcpu30_card_device::vme_hcpu30_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_hcpu30_card_device(mconfig, VME_HCPU30, tag, owner, clock) { } diff --git a/src/devices/bus/vme/vme_hcpu30.h b/src/devices/bus/vme/vme_hcpu30.h index 7592a4dad66..b808b66504e 100644 --- a/src/devices/bus/vme/vme_hcpu30.h +++ b/src/devices/bus/vme/vme_hcpu30.h @@ -25,10 +25,10 @@ DECLARE_DEVICE_TYPE(VME_HCPU30, vme_hcpu30_card_device) class vme_hcpu30_card_device : public device_t, public device_vme_card_interface { public: - vme_hcpu30_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_hcpu30_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_hcpu30_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_hcpu30_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vme/vme_mvme120.cpp b/src/devices/bus/vme/vme_mvme120.cpp index 19ddaf9b391..578798f95d0 100644 --- a/src/devices/bus/vme/vme_mvme120.cpp +++ b/src/devices/bus/vme/vme_mvme120.cpp @@ -125,7 +125,7 @@ ioport_constructor vme_mvme120_device::device_input_ports() const return INPUT_PORTS_NAME(mvme120); } -vme_mvme120_device::vme_mvme120_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, mvme12x_variant board_id) : +vme_mvme120_device::vme_mvme120_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, mvme12x_variant board_id) : device_t(mconfig, type, tag, owner, clock) , device_vme_card_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -139,24 +139,24 @@ vme_mvme120_device::vme_mvme120_device(const machine_config &mconfig, device_typ } -vme_mvme120_card_device::vme_mvme120_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_mvme120_card_device::vme_mvme120_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme120_card_device(mconfig, VME_MVME120, tag, owner, clock) { } -vme_mvme121_card_device::vme_mvme121_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_mvme121_card_device::vme_mvme121_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme121_card_device(mconfig, VME_MVME121, tag, owner, clock) { } -vme_mvme122_card_device::vme_mvme122_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_mvme122_card_device::vme_mvme122_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme122_card_device(mconfig, VME_MVME122, tag, owner, clock) { } -vme_mvme123_card_device::vme_mvme123_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vme_mvme123_card_device::vme_mvme123_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme123_card_device(mconfig, VME_MVME123, tag, owner, clock) { @@ -386,7 +386,7 @@ void vme_mvme120_device::device_add_mconfig(machine_config &config) // Missing: MMU, VMEbus - VME(config, "vme", 0); + VME(config, "vme"); /* // Onboard RAM is always visible to VMEbus. (Decoding controlled by U28.) diff --git a/src/devices/bus/vme/vme_mvme120.h b/src/devices/bus/vme/vme_mvme120.h index 1ecafbcf794..3e02f9061d7 100644 --- a/src/devices/bus/vme/vme_mvme120.h +++ b/src/devices/bus/vme/vme_mvme120.h @@ -31,7 +31,7 @@ public: mvme123_board }; - vme_mvme120_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, mvme12x_variant board_id); + vme_mvme120_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, mvme12x_variant board_id); // Switch and jumper handlers DECLARE_INPUT_CHANGED_MEMBER(s3_autoboot); @@ -95,10 +95,10 @@ protected: class vme_mvme120_card_device : public vme_mvme120_device { public: - vme_mvme120_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_mvme120_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_mvme120_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_mvme120_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme120_device(mconfig, type, tag, owner, clock, mvme120_board) { } @@ -109,10 +109,10 @@ protected: class vme_mvme121_card_device : public vme_mvme120_device { public: - vme_mvme121_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_mvme121_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_mvme121_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_mvme121_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme120_device(mconfig, type, tag, owner, clock, mvme121_board) { } @@ -124,10 +124,10 @@ protected: class vme_mvme122_card_device : public vme_mvme120_device { public: - vme_mvme122_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_mvme122_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_mvme122_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_mvme122_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme120_device(mconfig, type, tag, owner, clock, mvme122_board) { } @@ -139,10 +139,10 @@ protected: class vme_mvme123_card_device : public vme_mvme120_device { public: - vme_mvme123_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_mvme123_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_mvme123_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + vme_mvme123_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme120_device(mconfig, type, tag, owner, clock, mvme123_board) { } diff --git a/src/devices/bus/vme/vme_mvme350.cpp b/src/devices/bus/vme/vme_mvme350.cpp index 2ca5c966b7b..a2ec60ddefd 100644 --- a/src/devices/bus/vme/vme_mvme350.cpp +++ b/src/devices/bus/vme/vme_mvme350.cpp @@ -208,14 +208,14 @@ const tiny_rom_entry *vme_mvme350_card_device::device_rom_region() const // LIVE DEVICE //************************************************************************** -vme_mvme350_card_device::vme_mvme350_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +vme_mvme350_card_device::vme_mvme350_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vme_card_interface(mconfig, *this) { LOG("%s %s\n", tag, FUNCNAME); } -vme_mvme350_card_device::vme_mvme350_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vme_mvme350_card_device::vme_mvme350_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_mvme350_card_device(mconfig, VME_MVME350, tag, owner, clock) { LOG("%s %s\n", tag, FUNCNAME); diff --git a/src/devices/bus/vme/vme_mvme350.h b/src/devices/bus/vme/vme_mvme350.h index a328f3e7c53..4e6735de267 100644 --- a/src/devices/bus/vme/vme_mvme350.h +++ b/src/devices/bus/vme/vme_mvme350.h @@ -12,14 +12,14 @@ DECLARE_DEVICE_TYPE(VME_MVME350, vme_mvme350_card_device) class vme_mvme350_card_device : public device_t, public device_vme_card_interface { public: - vme_mvme350_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_mvme350_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Shared memory methods to be exported to the VME bus // virtual uint16_t read16() override; // virtual void write16(uint16_t data) override; protected: - vme_mvme350_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_mvme350_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vme/vme_mzr8105.cpp b/src/devices/bus/vme/vme_mzr8105.cpp index fe63e92ee28..5f18f02c4b1 100644 --- a/src/devices/bus/vme/vme_mzr8105.cpp +++ b/src/devices/bus/vme/vme_mzr8105.cpp @@ -41,18 +41,18 @@ void vme_mzr8105_card_device::device_add_mconfig(machine_config &config) M68000(config, m_maincpu, XTAL(10'000'000)) m_maincpu->set_addrmap(AS_PROGRAM, &vme_mzr8105_card_device::mzr8105_mem); - VME(config, "vme", 0).use_owner_spaces(); + VME(config, "vme").use_owner_spaces(); VME_SLOT(config, "slot1", mzr8105_vme_cards, "mzr8300", 1, "vme"); } -vme_mzr8105_card_device::vme_mzr8105_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vme_mzr8105_card_device::vme_mzr8105_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_mzr8105_card_device(mconfig, VME_MZR8105, tag, owner, clock) { m_slot = 1; LOG("%s %s\n", tag, FUNCNAME); } -vme_mzr8105_card_device::vme_mzr8105_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +vme_mzr8105_card_device::vme_mzr8105_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vme_card_interface(mconfig, *this) { diff --git a/src/devices/bus/vme/vme_mzr8105.h b/src/devices/bus/vme/vme_mzr8105.h index 9d5e371b47f..67a13c1061a 100644 --- a/src/devices/bus/vme/vme_mzr8105.h +++ b/src/devices/bus/vme/vme_mzr8105.h @@ -12,10 +12,10 @@ DECLARE_DEVICE_TYPE(VME_MZR8105, vme_mzr8105_card_device) class vme_mzr8105_card_device : public device_t, public device_vme_card_interface { public: - vme_mzr8105_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_mzr8105_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - vme_mzr8105_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_mzr8105_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vme/vme_mzr8300.cpp b/src/devices/bus/vme/vme_mzr8300.cpp index 99e2e8c0889..58c5e476902 100644 --- a/src/devices/bus/vme/vme_mzr8300.cpp +++ b/src/devices/bus/vme/vme_mzr8300.cpp @@ -153,14 +153,14 @@ void vme_mzr8300_card_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -vme_mzr8300_card_device::vme_mzr8300_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +vme_mzr8300_card_device::vme_mzr8300_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vme_card_interface(mconfig, *this) { LOG("%s %s\n", tag, FUNCNAME); } -vme_mzr8300_card_device::vme_mzr8300_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vme_mzr8300_card_device::vme_mzr8300_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vme_mzr8300_card_device(mconfig, VME_MZR8300, tag, owner, clock) { } diff --git a/src/devices/bus/vme/vme_mzr8300.h b/src/devices/bus/vme/vme_mzr8300.h index d551bb2f077..e5ae2d22913 100644 --- a/src/devices/bus/vme/vme_mzr8300.h +++ b/src/devices/bus/vme/vme_mzr8300.h @@ -12,13 +12,13 @@ DECLARE_DEVICE_TYPE(VME_MZR8300, vme_mzr8300_card_device) class vme_mzr8300_card_device : public device_t, public device_vme_card_interface { public: - vme_mzr8300_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vme_mzr8300_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // virtual uint8_t read8(offs_t offset) override; // virtual void write8(offs_t offset, uint8_t data) override; protected: - vme_mzr8300_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vme_mzr8300_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/bus/vme/vme_smvme2000.cpp b/src/devices/bus/vme/vme_smvme2000.cpp index ddce242739a..114be0f5f7f 100644 --- a/src/devices/bus/vme/vme_smvme2000.cpp +++ b/src/devices/bus/vme/vme_smvme2000.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(VME_SMVME2000, vme_smvme2000_device, "smvme2000", "Signetics SMVME2000") -vme_smvme2000_device::vme_smvme2000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +vme_smvme2000_device::vme_smvme2000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VME_SMVME2000, tag, owner, clock) , device_vme_card_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -96,7 +96,7 @@ void vme_smvme2000_device::device_add_mconfig(machine_config &config) SCN2681(config, m_duart, 3.6864_MHz_XTAL); m_duart->irq_cb().set(m_pit, FUNC(pit68230_device::h3_w)); // TODO: verify destination - PIT68230(config, m_pit, 0); + PIT68230(config, m_pit); m_pit->pc_out_callback().set( [this](u8 data) { diff --git a/src/devices/bus/vme/vme_smvme2000.h b/src/devices/bus/vme/vme_smvme2000.h index cffea3cb469..df41c9ebe1a 100644 --- a/src/devices/bus/vme/vme_smvme2000.h +++ b/src/devices/bus/vme/vme_smvme2000.h @@ -20,7 +20,7 @@ class vme_smvme2000_device , public device_vme_card_interface { public: - vme_smvme2000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + vme_smvme2000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/bus/vsmile/keyboard.cpp b/src/devices/bus/vsmile/keyboard.cpp index 2c2501ecd8e..6b08f59f84b 100644 --- a/src/devices/bus/vsmile/keyboard.cpp +++ b/src/devices/bus/vsmile/keyboard.cpp @@ -25,22 +25,22 @@ DEFINE_DEVICE_TYPE(VSMILE_KEYBOARD_GE, vsmile_keyboard_ge_device, "vsmile_keyboa // V.Smile Keyboard //************************************************************************** -vsmile_keyboard_us_device::vsmile_keyboard_us_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +vsmile_keyboard_us_device::vsmile_keyboard_us_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : vsmile_keyboard_device(mconfig, VSMILE_KEYBOARD_US, tag, owner, clock, 0x40) { } -vsmile_keyboard_fr_device::vsmile_keyboard_fr_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +vsmile_keyboard_fr_device::vsmile_keyboard_fr_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : vsmile_keyboard_device(mconfig, VSMILE_KEYBOARD_FR, tag, owner, clock, 0x42) { } -vsmile_keyboard_ge_device::vsmile_keyboard_ge_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +vsmile_keyboard_ge_device::vsmile_keyboard_ge_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : vsmile_keyboard_device(mconfig, VSMILE_KEYBOARD_GE, tag, owner, clock, 0x44) { } -vsmile_keyboard_device::vsmile_keyboard_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock, uint8_t layout_type) +vsmile_keyboard_device::vsmile_keyboard_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, uint8_t layout_type) : vsmile_ctrl_device_base(mconfig, type, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "ROW0", "ROW1", "ROW2", "ROW3", "ROW4") , m_io_joy(*this, "JOY") diff --git a/src/devices/bus/vsmile/keyboard.h b/src/devices/bus/vsmile/keyboard.h index 2d01776ee39..2e01f3bb460 100644 --- a/src/devices/bus/vsmile/keyboard.h +++ b/src/devices/bus/vsmile/keyboard.h @@ -53,7 +53,7 @@ public: }; protected: - vsmile_keyboard_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock, uint8_t layout_type); + vsmile_keyboard_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, uint8_t layout_type); // device_t implementation virtual void device_start() override; @@ -103,7 +103,7 @@ class vsmile_keyboard_us_device : public vsmile_keyboard_device { public: // construction/destruction - vsmile_keyboard_us_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + vsmile_keyboard_us_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device_t implementation @@ -114,7 +114,7 @@ class vsmile_keyboard_fr_device : public vsmile_keyboard_device { public: // construction/destruction - vsmile_keyboard_fr_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + vsmile_keyboard_fr_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device_t implementation @@ -125,7 +125,7 @@ class vsmile_keyboard_ge_device : public vsmile_keyboard_device { public: // construction/destruction - vsmile_keyboard_ge_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + vsmile_keyboard_ge_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device_t implementation diff --git a/src/devices/bus/vsmile/mat.cpp b/src/devices/bus/vsmile/mat.cpp index 6dfeac5be98..53df8a925a1 100644 --- a/src/devices/bus/vsmile/mat.cpp +++ b/src/devices/bus/vsmile/mat.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(VSMILE_MAT, vsmile_mat_device, "vsmile_mat", "V.Smile Gym Mat // V.Smile gym mat //************************************************************************** -vsmile_mat_device::vsmile_mat_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +vsmile_mat_device::vsmile_mat_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : vsmile_pad_device(mconfig, VSMILE_MAT, tag, owner, clock) , m_io_joy(*this, "JOY") , m_io_colors(*this, "COLORS") diff --git a/src/devices/bus/vsmile/mat.h b/src/devices/bus/vsmile/mat.h index 253930ff085..06eb1facd45 100644 --- a/src/devices/bus/vsmile/mat.h +++ b/src/devices/bus/vsmile/mat.h @@ -17,7 +17,7 @@ class vsmile_mat_device : public vsmile_pad_device { public: // construction/destruction - vsmile_mat_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + vsmile_mat_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vsmile_mat_device(); // input handlers diff --git a/src/devices/bus/vsmile/pad.cpp b/src/devices/bus/vsmile/pad.cpp index 7383de09475..39a65084c3b 100644 --- a/src/devices/bus/vsmile/pad.cpp +++ b/src/devices/bus/vsmile/pad.cpp @@ -21,12 +21,12 @@ DEFINE_DEVICE_TYPE(VSMILE_PAD, vsmile_pad_device, "vsmile_pad", "V.Smile Joystic // V.Smile control pad //************************************************************************** -vsmile_pad_device::vsmile_pad_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +vsmile_pad_device::vsmile_pad_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : vsmile_pad_device(mconfig, VSMILE_PAD, tag, owner, clock) { } -vsmile_pad_device::vsmile_pad_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock) +vsmile_pad_device::vsmile_pad_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : vsmile_ctrl_device_base(mconfig, type, tag, owner, clock) , m_io_joy(*this, "JOY") , m_io_colors(*this, "COLORS") diff --git a/src/devices/bus/vsmile/pad.h b/src/devices/bus/vsmile/pad.h index e5e08ce410c..e218d3984ba 100644 --- a/src/devices/bus/vsmile/pad.h +++ b/src/devices/bus/vsmile/pad.h @@ -17,7 +17,7 @@ class vsmile_pad_device : public vsmile_ctrl_device_base { public: // construction/destruction - vsmile_pad_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + vsmile_pad_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vsmile_pad_device(); // input handlers @@ -42,7 +42,7 @@ public: }; protected: - vsmile_pad_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock = 0U); + vsmile_pad_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // device_t implementation virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/vsmile/rom.cpp b/src/devices/bus/vsmile/rom.cpp index bc69099d698..bfcbff986fb 100644 --- a/src/devices/bus/vsmile/rom.cpp +++ b/src/devices/bus/vsmile/rom.cpp @@ -21,23 +21,23 @@ DEFINE_DEVICE_TYPE(VSMILE_ROM_STD, vsmile_rom_device, "vsmile_rom", DEFINE_DEVICE_TYPE(VSMILE_ROM_NVRAM, vsmile_rom_nvram_device, "vsmile_rom_nvram", "V.Smile Cart + NVRAM") -vsmile_rom_device::vsmile_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vsmile_rom_device::vsmile_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_vsmile_cart_interface(mconfig, *this) { } -vsmile_rom_device::vsmile_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vsmile_rom_device::vsmile_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vsmile_rom_device(mconfig, VSMILE_ROM_STD, tag, owner, clock) { } -vsmile_rom_nvram_device::vsmile_rom_nvram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vsmile_rom_nvram_device::vsmile_rom_nvram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vsmile_rom_device(mconfig, type, tag, owner, clock) { } -vsmile_rom_nvram_device::vsmile_rom_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vsmile_rom_nvram_device::vsmile_rom_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vsmile_rom_nvram_device(mconfig, VSMILE_ROM_NVRAM, tag, owner, clock) { } diff --git a/src/devices/bus/vsmile/rom.h b/src/devices/bus/vsmile/rom.h index b9ac8ef0b07..29051590990 100644 --- a/src/devices/bus/vsmile/rom.h +++ b/src/devices/bus/vsmile/rom.h @@ -13,7 +13,7 @@ class vsmile_rom_device : public device_t, public device_vsmile_cart_interface { public: // construction/destruction - vsmile_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vsmile_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual uint16_t bank0_r(offs_t offset) override { return m_rom[m_bank_offset + 0x000000 + offset]; } @@ -25,7 +25,7 @@ public: virtual void set_cs2(bool cs2) override; protected: - vsmile_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vsmile_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -41,13 +41,13 @@ class vsmile_rom_nvram_device : public vsmile_rom_device { public: // construction/destruction - vsmile_rom_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vsmile_rom_nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t bank2_r(offs_t offset) override; virtual void bank2_w(offs_t offset, uint16_t data) override; protected: - vsmile_rom_nvram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vsmile_rom_nvram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/bus/vsmile/vsmile_ctrl.h b/src/devices/bus/vsmile/vsmile_ctrl.h index 99369dc6cbf..193a7016abd 100644 --- a/src/devices/bus/vsmile/vsmile_ctrl.h +++ b/src/devices/bus/vsmile/vsmile_ctrl.h @@ -58,14 +58,14 @@ public: // construction/destruction template vsmile_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : vsmile_ctrl_port_device(mconfig, tag, owner, 0U) + : vsmile_ctrl_port_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - vsmile_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0U); + vsmile_ctrl_port_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vsmile_ctrl_port_device(); // input signals @@ -96,7 +96,7 @@ public: protected: // construction - vsmile_ctrl_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + vsmile_ctrl_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t implementation virtual void device_start() override; diff --git a/src/devices/bus/vsmile/vsmile_slot.cpp b/src/devices/bus/vsmile/vsmile_slot.cpp index 5be96466c64..6f60dc7cb8e 100644 --- a/src/devices/bus/vsmile/vsmile_slot.cpp +++ b/src/devices/bus/vsmile/vsmile_slot.cpp @@ -72,7 +72,7 @@ void device_vsmile_cart_interface::nvram_alloc(uint32_t size) //------------------------------------------------- // vsmile_cart_slot_device - constructor //------------------------------------------------- -vsmile_cart_slot_device::vsmile_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vsmile_cart_slot_device::vsmile_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VSMILE_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/vsmile/vsmile_slot.h b/src/devices/bus/vsmile/vsmile_slot.h index 5313abe092b..3866a58855a 100644 --- a/src/devices/bus/vsmile/vsmile_slot.h +++ b/src/devices/bus/vsmile/vsmile_slot.h @@ -69,14 +69,14 @@ public: // construction/destruction template vsmile_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : vsmile_cart_slot_device(mconfig, tag, owner, (uint32_t)0) + : vsmile_cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - vsmile_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vsmile_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~vsmile_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/vtech/ioexp/ioexp.cpp b/src/devices/bus/vtech/ioexp/ioexp.cpp index 475f287201e..1258438dda5 100644 --- a/src/devices/bus/vtech/ioexp/ioexp.cpp +++ b/src/devices/bus/vtech/ioexp/ioexp.cpp @@ -27,11 +27,15 @@ DEFINE_DEVICE_TYPE(VTECH_IOEXP_SLOT, vtech_ioexp_slot_device, "vtech_ioexp_slot" // vtech_ioexp_slot_device - constructor //------------------------------------------------- -vtech_ioexp_slot_device::vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_ioexp_slot_device::vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VTECH_IOEXP_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_iospace(*this, finder_base::DUMMY_TAG, -1) { + option_reset(); + vtech_ioexp_slot_carts(*this); + set_default_option(nullptr); + set_fixed(false); } //------------------------------------------------- @@ -100,7 +104,7 @@ device_vtech_ioexp_interface::~device_vtech_ioexp_interface() // vtech_ioexp_device - constructor //------------------------------------------------- -vtech_ioexp_device::vtech_ioexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +vtech_ioexp_device::vtech_ioexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vtech_ioexp_interface(mconfig, *this), m_io(*this, "iospace") diff --git a/src/devices/bus/vtech/ioexp/ioexp.h b/src/devices/bus/vtech/ioexp/ioexp.h index c851d0e0d48..266121ab207 100644 --- a/src/devices/bus/vtech/ioexp/ioexp.h +++ b/src/devices/bus/vtech/ioexp/ioexp.h @@ -46,15 +46,7 @@ class vtech_ioexp_slot_device : public device_t, public device_single_card_slot_ friend class device_vtech_ioexp_interface; public: // construction/destruction - vtech_ioexp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner) - : vtech_ioexp_slot_device(mconfig, tag, owner, (uint32_t)0) - { - option_reset(); - vtech_ioexp_slot_carts(*this); - set_default_option(nullptr); - set_fixed(false); - } - vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vtech_ioexp_slot_device(); template void set_iospace(T &&tag, int spacenum) { m_iospace.set_tag(std::forward(tag), spacenum); } @@ -90,7 +82,7 @@ class vtech_ioexp_device : public device_t, public device_vtech_ioexp_interface { public: // construction/destruction - vtech_ioexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vtech_ioexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t iorq_r(offs_t offset) override; diff --git a/src/devices/bus/vtech/ioexp/joystick.cpp b/src/devices/bus/vtech/ioexp/joystick.cpp index f54125c64ae..c6b9e2ae7f9 100644 --- a/src/devices/bus/vtech/ioexp/joystick.cpp +++ b/src/devices/bus/vtech/ioexp/joystick.cpp @@ -75,7 +75,7 @@ ioport_constructor vtech_joystick_interface_device::device_input_ports() const // vtech_joystick_interface_device - constructor //------------------------------------------------- -vtech_joystick_interface_device::vtech_joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_joystick_interface_device::vtech_joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_ioexp_device(mconfig, VTECH_JOYSTICK_INTERFACE, tag, owner, clock), m_joy0(*this, "joystick_0"), m_joy0_arm(*this, "joystick_0_arm"), diff --git a/src/devices/bus/vtech/ioexp/joystick.h b/src/devices/bus/vtech/ioexp/joystick.h index 2d59f7d4951..57d9a5dbc45 100644 --- a/src/devices/bus/vtech/ioexp/joystick.h +++ b/src/devices/bus/vtech/ioexp/joystick.h @@ -27,7 +27,7 @@ class vtech_joystick_interface_device : public vtech_ioexp_device { public: // construction/destruction - vtech_joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t joystick_r(offs_t offset); diff --git a/src/devices/bus/vtech/ioexp/lpen.cpp b/src/devices/bus/vtech/ioexp/lpen.cpp index 732340218e1..32accdeeeb5 100644 --- a/src/devices/bus/vtech/ioexp/lpen.cpp +++ b/src/devices/bus/vtech/ioexp/lpen.cpp @@ -37,7 +37,7 @@ void vtech_lpen_interface_device::io_map(address_map &map) // vtech_lpen_interface_device - constructor //------------------------------------------------- -vtech_lpen_interface_device::vtech_lpen_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_lpen_interface_device::vtech_lpen_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_ioexp_device(mconfig, VTECH_LPEN_INTERFACE, tag, owner, clock) { } diff --git a/src/devices/bus/vtech/ioexp/lpen.h b/src/devices/bus/vtech/ioexp/lpen.h index 95759e5fcff..285d884da44 100644 --- a/src/devices/bus/vtech/ioexp/lpen.h +++ b/src/devices/bus/vtech/ioexp/lpen.h @@ -24,7 +24,7 @@ class vtech_lpen_interface_device : public vtech_ioexp_device { public: // construction/destruction - vtech_lpen_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_lpen_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::CONTROLS; } diff --git a/src/devices/bus/vtech/ioexp/printer.cpp b/src/devices/bus/vtech/ioexp/printer.cpp index b5eaa4e8a4b..1947862a911 100644 --- a/src/devices/bus/vtech/ioexp/printer.cpp +++ b/src/devices/bus/vtech/ioexp/printer.cpp @@ -55,7 +55,7 @@ void vtech_printer_interface_device::device_add_mconfig(machine_config &config) // vtech_printer_interface_device - constructor //------------------------------------------------- -vtech_printer_interface_device::vtech_printer_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_printer_interface_device::vtech_printer_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_ioexp_device(mconfig, VTECH_PRINTER_INTERFACE, tag, owner, clock), m_centronics(*this, "centronics"), m_latch(*this, "latch"), diff --git a/src/devices/bus/vtech/ioexp/printer.h b/src/devices/bus/vtech/ioexp/printer.h index be25c7fd614..8668eb80901 100644 --- a/src/devices/bus/vtech/ioexp/printer.h +++ b/src/devices/bus/vtech/ioexp/printer.h @@ -27,7 +27,7 @@ class vtech_printer_interface_device : public vtech_ioexp_device { public: // construction/destruction - vtech_printer_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_printer_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/vtech/memexp/floppy.cpp b/src/devices/bus/vtech/memexp/floppy.cpp index 4e641947aaf..55f1c249309 100644 --- a/src/devices/bus/vtech/memexp/floppy.cpp +++ b/src/devices/bus/vtech/memexp/floppy.cpp @@ -95,7 +95,7 @@ void vtech_floppy_controller_device::device_add_mconfig(machine_config &config) // vtech_floppy_controller_device - constructor //------------------------------------------------- -vtech_floppy_controller_device::vtech_floppy_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_floppy_controller_device::vtech_floppy_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_FLOPPY_CONTROLLER, tag, owner, clock), m_memexp(*this, "mem"), m_floppy0(*this, "0"), diff --git a/src/devices/bus/vtech/memexp/floppy.h b/src/devices/bus/vtech/memexp/floppy.h index 167cbf5ba63..abe89105ed1 100644 --- a/src/devices/bus/vtech/memexp/floppy.h +++ b/src/devices/bus/vtech/memexp/floppy.h @@ -28,7 +28,7 @@ class vtech_floppy_controller_device : public vtech_memexp_device { public: // construction/destruction - vtech_floppy_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_floppy_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/vtech/memexp/memexp.cpp b/src/devices/bus/vtech/memexp/memexp.cpp index 74d2213009a..b5df1a3040d 100644 --- a/src/devices/bus/vtech/memexp/memexp.cpp +++ b/src/devices/bus/vtech/memexp/memexp.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VTECH_MEMEXP_SLOT, vtech_memexp_slot_device, "vtech_memexp_sl // vtech_memexp_slot_device - constructor //------------------------------------------------- -vtech_memexp_slot_device::vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_memexp_slot_device::vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VTECH_MEMEXP_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_memspace(*this, finder_base::DUMMY_TAG, -1), @@ -36,6 +36,10 @@ vtech_memexp_slot_device::vtech_memexp_slot_device(const machine_config &mconfig m_nmi_handler(*this), m_reset_handler(*this) { + option_reset(); + vtech_memexp_carts(*this); + set_default_option(nullptr); + set_fixed(false); } //------------------------------------------------- @@ -125,7 +129,7 @@ device_vtech_memexp_interface::~device_vtech_memexp_interface() // vtech_memexp_device - constructor //------------------------------------------------- -vtech_memexp_device::vtech_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +vtech_memexp_device::vtech_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_vtech_memexp_interface(mconfig, *this), m_mem(*this, "memspace"), diff --git a/src/devices/bus/vtech/memexp/memexp.h b/src/devices/bus/vtech/memexp/memexp.h index 5fd3ee6a449..75013fe98a4 100644 --- a/src/devices/bus/vtech/memexp/memexp.h +++ b/src/devices/bus/vtech/memexp/memexp.h @@ -53,15 +53,7 @@ class vtech_memexp_slot_device : public device_t, public device_single_card_slot friend class device_vtech_memexp_interface; public: // construction/destruction - vtech_memexp_slot_device(machine_config const &mconfig, char const *tag, device_t *owner) - : vtech_memexp_slot_device(mconfig, tag, owner, (uint32_t)0) - { - option_reset(); - vtech_memexp_carts(*this); - set_default_option(nullptr); - set_fixed(false); - } - vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vtech_memexp_slot_device(); template void set_memspace(T &&tag, int spacenum) { m_memspace.set_tag(std::forward(tag), spacenum); } @@ -114,7 +106,7 @@ class vtech_memexp_device : public device_t, public device_vtech_memexp_interfac { public: // construction/destruction - vtech_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vtech_memexp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // from host virtual uint8_t mreq_r(offs_t offset) override; diff --git a/src/devices/bus/vtech/memexp/memory.cpp b/src/devices/bus/vtech/memexp/memory.cpp index bfac5f06b4c..b770f4a66f9 100644 --- a/src/devices/bus/vtech/memexp/memory.cpp +++ b/src/devices/bus/vtech/memexp/memory.cpp @@ -38,7 +38,7 @@ void vtech_laser110_16k_device::mem_map(address_map &map) // laser110_16k_device - constructor //------------------------------------------------- -vtech_laser110_16k_device::vtech_laser110_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_laser110_16k_device::vtech_laser110_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_LASER110_16K, tag, owner, clock) { } @@ -71,7 +71,7 @@ void vtech_laser210_16k_device::mem_map(address_map &map) // vtech_laser210_16k_device - constructor //------------------------------------------------- -vtech_laser210_16k_device::vtech_laser210_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_laser210_16k_device::vtech_laser210_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_LASER210_16K, tag, owner, clock) { } @@ -104,7 +104,7 @@ void vtech_laser310_16k_device::mem_map(address_map &map) // vtech_laser310_16k_device - constructor //------------------------------------------------- -vtech_laser310_16k_device::vtech_laser310_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_laser310_16k_device::vtech_laser310_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_LASER310_16K, tag, owner, clock) { } @@ -148,7 +148,7 @@ void vtech_laser_64k_device::io_map(address_map &map) // vtech_laser_64k_device - constructor //------------------------------------------------- -vtech_laser_64k_device::vtech_laser_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_laser_64k_device::vtech_laser_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_LASER_64K, tag, owner, clock), m_fixed_bank(*this, "fixed_bank"), m_bank(*this, "bank") diff --git a/src/devices/bus/vtech/memexp/memory.h b/src/devices/bus/vtech/memexp/memory.h index 5af19fd27f1..c61844fb447 100644 --- a/src/devices/bus/vtech/memexp/memory.h +++ b/src/devices/bus/vtech/memexp/memory.h @@ -24,7 +24,7 @@ class vtech_laser110_16k_device : public vtech_memexp_device { public: // construction/destruction - vtech_laser110_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_laser110_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -38,7 +38,7 @@ class vtech_laser210_16k_device : public vtech_memexp_device { public: // construction/destruction - vtech_laser210_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_laser210_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -52,7 +52,7 @@ class vtech_laser310_16k_device : public vtech_memexp_device { public: // construction/destruction - vtech_laser310_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_laser310_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -66,7 +66,7 @@ class vtech_laser_64k_device : public vtech_memexp_device { public: // construction/destruction - vtech_laser_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_laser_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/bus/vtech/memexp/rs232.cpp b/src/devices/bus/vtech/memexp/rs232.cpp index cf07b2055d6..ea2d65f14b6 100644 --- a/src/devices/bus/vtech/memexp/rs232.cpp +++ b/src/devices/bus/vtech/memexp/rs232.cpp @@ -67,7 +67,7 @@ void vtech_rs232_interface_device::device_add_mconfig(machine_config &config) // vtech_rs232_interface_device - constructor //------------------------------------------------- -vtech_rs232_interface_device::vtech_rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_rs232_interface_device::vtech_rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_RS232_INTERFACE, tag, owner, clock), m_rs232(*this, "rs232"), m_rx(1) diff --git a/src/devices/bus/vtech/memexp/rs232.h b/src/devices/bus/vtech/memexp/rs232.h index 30af4a2eaaf..75749c83742 100644 --- a/src/devices/bus/vtech/memexp/rs232.h +++ b/src/devices/bus/vtech/memexp/rs232.h @@ -25,7 +25,7 @@ class vtech_rs232_interface_device : public vtech_memexp_device { public: // construction/destruction - vtech_rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/vtech/memexp/rtty.cpp b/src/devices/bus/vtech/memexp/rtty.cpp index 6a0f96c58a8..337cd5c848b 100644 --- a/src/devices/bus/vtech/memexp/rtty.cpp +++ b/src/devices/bus/vtech/memexp/rtty.cpp @@ -52,7 +52,7 @@ const tiny_rom_entry *vtech_rtty_interface_device::device_rom_region() const // vtech_rtty_interface_device - constructor //------------------------------------------------- -vtech_rtty_interface_device::vtech_rtty_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_rtty_interface_device::vtech_rtty_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_RTTY_INTERFACE, tag, owner, clock) { } diff --git a/src/devices/bus/vtech/memexp/rtty.h b/src/devices/bus/vtech/memexp/rtty.h index 62d1f5b94af..24796e6b5ea 100644 --- a/src/devices/bus/vtech/memexp/rtty.h +++ b/src/devices/bus/vtech/memexp/rtty.h @@ -24,7 +24,7 @@ class vtech_rtty_interface_device : public vtech_memexp_device { public: // construction/destruction - vtech_rtty_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_rtty_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/vtech/memexp/sdloader.cpp b/src/devices/bus/vtech/memexp/sdloader.cpp index 84df085c86a..7e533c0bc7c 100644 --- a/src/devices/bus/vtech/memexp/sdloader.cpp +++ b/src/devices/bus/vtech/memexp/sdloader.cpp @@ -87,7 +87,7 @@ void vtech_sdloader_device::device_add_mconfig(machine_config &config) { vtech_memexp_device::device_add_mconfig(config); - SPI_SDCARD(config, m_sdcard, 0); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set(FUNC(vtech_sdloader_device::spi_miso_w)); } @@ -100,7 +100,7 @@ void vtech_sdloader_device::device_add_mconfig(machine_config &config) // vtech_sdloader_device - constructor //------------------------------------------------- -vtech_sdloader_device::vtech_sdloader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_sdloader_device::vtech_sdloader_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_SDLOADER, tag, owner, clock), m_sdcard(*this, "sdcard"), m_dosbank(*this, "dosbank"), diff --git a/src/devices/bus/vtech/memexp/sdloader.h b/src/devices/bus/vtech/memexp/sdloader.h index fe1fa6ea313..8ab77f287bd 100644 --- a/src/devices/bus/vtech/memexp/sdloader.h +++ b/src/devices/bus/vtech/memexp/sdloader.h @@ -25,7 +25,7 @@ class vtech_sdloader_device : public vtech_memexp_device { public: // construction/destruction - vtech_sdloader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_sdloader_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/devices/bus/vtech/memexp/wordpro.cpp b/src/devices/bus/vtech/memexp/wordpro.cpp index 811cb953a83..7bffe76b49a 100644 --- a/src/devices/bus/vtech/memexp/wordpro.cpp +++ b/src/devices/bus/vtech/memexp/wordpro.cpp @@ -52,7 +52,7 @@ const tiny_rom_entry *vtech_wordpro_device::device_rom_region() const // vtech_wordpro_device - constructor //------------------------------------------------- -vtech_wordpro_device::vtech_wordpro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vtech_wordpro_device::vtech_wordpro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vtech_memexp_device(mconfig, VTECH_WORDPRO, tag, owner, clock) { } diff --git a/src/devices/bus/vtech/memexp/wordpro.h b/src/devices/bus/vtech/memexp/wordpro.h index 0515a12bb36..e5484556923 100644 --- a/src/devices/bus/vtech/memexp/wordpro.h +++ b/src/devices/bus/vtech/memexp/wordpro.h @@ -24,7 +24,7 @@ class vtech_wordpro_device : public vtech_memexp_device { public: // construction/destruction - vtech_wordpro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vtech_wordpro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/wangpc/emb.cpp b/src/devices/bus/wangpc/emb.cpp index 6a69c1a0fee..4aaba0da0da 100644 --- a/src/devices/bus/wangpc/emb.cpp +++ b/src/devices/bus/wangpc/emb.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(WANGPC_EMB, wangpc_emb_device, "wangpc_emb", "Wang PC-PM031-B // wangpc_emb_device - constructor //------------------------------------------------- -wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_EMB, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_ram(*this, "ram", RAM_SIZE, ENDIANNESS_LITTLE), diff --git a/src/devices/bus/wangpc/emb.h b/src/devices/bus/wangpc/emb.h index 1f23fed9f09..10ad045bf06 100644 --- a/src/devices/bus/wangpc/emb.h +++ b/src/devices/bus/wangpc/emb.h @@ -26,7 +26,7 @@ class wangpc_emb_device : public device_t, { public: // construction/destruction - wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wangpc/lic.cpp b/src/devices/bus/wangpc/lic.cpp index f56c673fd26..1ae230fa8c2 100644 --- a/src/devices/bus/wangpc/lic.cpp +++ b/src/devices/bus/wangpc/lic.cpp @@ -63,7 +63,7 @@ void wangpc_lic_device::device_add_mconfig(machine_config &config) // wangpc_lic_device - constructor //------------------------------------------------- -wangpc_lic_device::wangpc_lic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_lic_device::wangpc_lic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_LIC, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this) { diff --git a/src/devices/bus/wangpc/lic.h b/src/devices/bus/wangpc/lic.h index 8ead2c65f0a..e798f0c1de5 100644 --- a/src/devices/bus/wangpc/lic.h +++ b/src/devices/bus/wangpc/lic.h @@ -26,7 +26,7 @@ class wangpc_lic_device : public device_t, { public: // construction/destruction - wangpc_lic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_lic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wangpc/lvc.cpp b/src/devices/bus/wangpc/lvc.cpp index 2eb45e47db0..948e8c074c0 100644 --- a/src/devices/bus/wangpc/lvc.cpp +++ b/src/devices/bus/wangpc/lvc.cpp @@ -160,7 +160,7 @@ inline void wangpc_lvc_device::set_irq(int state) // wangpc_lvc_device - constructor //------------------------------------------------- -wangpc_lvc_device::wangpc_lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_lvc_device::wangpc_lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_LVC, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_crtc(*this, MC6845_TAG), diff --git a/src/devices/bus/wangpc/lvc.h b/src/devices/bus/wangpc/lvc.h index 7f0cb5ac816..9947ec7c3e8 100644 --- a/src/devices/bus/wangpc/lvc.h +++ b/src/devices/bus/wangpc/lvc.h @@ -27,7 +27,7 @@ class wangpc_lvc_device : public device_t, { public: // construction/destruction - wangpc_lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wangpc/mcc.cpp b/src/devices/bus/wangpc/mcc.cpp index 7eb56eb479e..aaf89f9be24 100644 --- a/src/devices/bus/wangpc/mcc.cpp +++ b/src/devices/bus/wangpc/mcc.cpp @@ -57,8 +57,8 @@ DEFINE_DEVICE_TYPE(WANGPC_MCC, wangpc_mcc_device, "wangpc_mcc", "Wang PC-PM043 M void wangpc_mcc_device::device_add_mconfig(machine_config &config) { - Z80SIO(config, m_sio, 4000000); // SIO/2? - Z80DART(config, m_dart, 4000000); + Z80SIO(config, m_sio, XTAL::u(4000000)); // SIO/2? + Z80DART(config, m_dart, XTAL::u(4000000)); } @@ -93,7 +93,7 @@ inline void wangpc_mcc_device::set_irq(int state) // wangpc_mcc_device - constructor //------------------------------------------------- -wangpc_mcc_device::wangpc_mcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_mcc_device::wangpc_mcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_MCC, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_sio(*this, Z80SIO2_TAG), diff --git a/src/devices/bus/wangpc/mcc.h b/src/devices/bus/wangpc/mcc.h index 9aa0d4adee1..02ec34cf05b 100644 --- a/src/devices/bus/wangpc/mcc.h +++ b/src/devices/bus/wangpc/mcc.h @@ -27,7 +27,7 @@ class wangpc_mcc_device : public device_t, { public: // construction/destruction - wangpc_mcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_mcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wangpc/mvc.cpp b/src/devices/bus/wangpc/mvc.cpp index 12aae997900..8d88773b9ac 100644 --- a/src/devices/bus/wangpc/mvc.cpp +++ b/src/devices/bus/wangpc/mvc.cpp @@ -182,7 +182,7 @@ inline void wangpc_mvc_device::set_irq(int state) // wangpc_mvc_device - constructor //------------------------------------------------- -wangpc_mvc_device::wangpc_mvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_mvc_device::wangpc_mvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_MVC, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_crtc(*this, MC6845_TAG), diff --git a/src/devices/bus/wangpc/mvc.h b/src/devices/bus/wangpc/mvc.h index 9911952f6ac..49c3f483367 100644 --- a/src/devices/bus/wangpc/mvc.h +++ b/src/devices/bus/wangpc/mvc.h @@ -27,7 +27,7 @@ class wangpc_mvc_device : public device_t, { public: // construction/destruction - wangpc_mvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_mvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wangpc/rtc.cpp b/src/devices/bus/wangpc/rtc.cpp index 8cd5e055ac6..1449fbd38c3 100644 --- a/src/devices/bus/wangpc/rtc.cpp +++ b/src/devices/bus/wangpc/rtc.cpp @@ -107,20 +107,20 @@ static const z80_daisy_config wangpc_rtc_daisy_chain[] = void wangpc_rtc_device::device_add_mconfig(machine_config &config) { - Z80(config, m_maincpu, 2000000); + Z80(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_daisy_config(wangpc_rtc_daisy_chain); m_maincpu->set_addrmap(AS_PROGRAM, &wangpc_rtc_device::wangpc_rtc_mem); m_maincpu->set_addrmap(AS_IO, &wangpc_rtc_device::wangpc_rtc_io); - AM9517A(config, m_dmac, 2000000); + AM9517A(config, m_dmac, XTAL::u(2000000)); - Z80CTC(config, m_ctc0, 2000000); + Z80CTC(config, m_ctc0, XTAL::u(2000000)); m_ctc0->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - Z80CTC(config, m_ctc1, 2000000); + Z80CTC(config, m_ctc1, XTAL::u(2000000)); m_ctc1->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - Z80SIO(config, m_sio, 2000000); // SIO/0? + Z80SIO(config, m_sio, XTAL::u(2000000)); // SIO/0? m_sio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); } @@ -178,7 +178,7 @@ ioport_constructor wangpc_rtc_device::device_input_ports() const // wangpc_rtc_device - constructor //------------------------------------------------- -wangpc_rtc_device::wangpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_rtc_device::wangpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_RTC, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/wangpc/rtc.h b/src/devices/bus/wangpc/rtc.h index 4366536ccdf..b0cfd3953ee 100644 --- a/src/devices/bus/wangpc/rtc.h +++ b/src/devices/bus/wangpc/rtc.h @@ -30,7 +30,7 @@ class wangpc_rtc_device : public device_t, { public: // construction/destruction - wangpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wangpc/tig.cpp b/src/devices/bus/wangpc/tig.cpp index f0c00ed3cc3..45c6f540e20 100644 --- a/src/devices/bus/wangpc/tig.cpp +++ b/src/devices/bus/wangpc/tig.cpp @@ -145,7 +145,7 @@ void wangpc_tig_device::device_add_mconfig(machine_config &config) // wangpc_tig_device - constructor //------------------------------------------------- -wangpc_tig_device::wangpc_tig_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_tig_device::wangpc_tig_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_TIG, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_hgdc0(*this, UPD7720_0_TAG), diff --git a/src/devices/bus/wangpc/tig.h b/src/devices/bus/wangpc/tig.h index 0e95eb42676..80146296d6b 100644 --- a/src/devices/bus/wangpc/tig.h +++ b/src/devices/bus/wangpc/tig.h @@ -28,7 +28,7 @@ class wangpc_tig_device : public device_t, { public: // construction/destruction - wangpc_tig_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_tig_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wangpc/wangpc.cpp b/src/devices/bus/wangpc/wangpc.cpp index 7f209465d2d..efbe327fdb0 100644 --- a/src/devices/bus/wangpc/wangpc.cpp +++ b/src/devices/bus/wangpc/wangpc.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(WANGPC_BUS_SLOT, wangpcbus_slot_device, "wangpcbus_slot", "Wa // wangpcbus_slot_device - constructor //------------------------------------------------- -wangpcbus_slot_device::wangpcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpcbus_slot_device::wangpcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_BUS_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_bus(*this, finder_base::DUMMY_TAG), @@ -51,7 +51,7 @@ void wangpcbus_slot_device::device_start() // wangpcbus_device - constructor //------------------------------------------------- -wangpcbus_device::wangpcbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpcbus_device::wangpcbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_BUS, tag, owner, clock), m_write_irq2(*this), m_write_irq3(*this), diff --git a/src/devices/bus/wangpc/wangpc.h b/src/devices/bus/wangpc/wangpc.h index 05ca1908f75..db1edd72564 100644 --- a/src/devices/bus/wangpc/wangpc.h +++ b/src/devices/bus/wangpc/wangpc.h @@ -33,7 +33,7 @@ public: // construction/destruction template wangpcbus_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&bus, U &&opts, char const *dflt, int sid) - : wangpcbus_slot_device(mconfig, tag, owner, 0) + : wangpcbus_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); @@ -42,7 +42,7 @@ public: set_bus(std::forward(bus)); set_bus_slot(sid); } - wangpcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + wangpcbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template void set_bus(T &&tag) { m_bus.set_tag(std::forward(tag)); } @@ -69,7 +69,7 @@ class wangpcbus_device : public device_t { public: // construction/destruction - wangpcbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpcbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~wangpcbus_device() { m_device_list.detach_all(); } auto irq2_wr_callback() { return m_write_irq2.bind(); } diff --git a/src/devices/bus/wangpc/wdc.cpp b/src/devices/bus/wangpc/wdc.cpp index ddb6d07163b..10dc18cbca7 100644 --- a/src/devices/bus/wangpc/wdc.cpp +++ b/src/devices/bus/wangpc/wdc.cpp @@ -94,15 +94,15 @@ void wangpc_wdc_device::wangpc_wdc_io(address_map &map) void wangpc_wdc_device::device_add_mconfig(machine_config &config) { - Z80(config, m_maincpu, 2000000); // XTAL(10'000'000) / ? + Z80(config, m_maincpu, XTAL::u(2000000)); // XTAL(10'000'000) / ? //m_maincpu->set_daisy_config(wangpc_wdc_daisy_chain); m_maincpu->set_addrmap(AS_PROGRAM, &wangpc_wdc_device::wangpc_wdc_mem); m_maincpu->set_addrmap(AS_IO, &wangpc_wdc_device::wangpc_wdc_io); - Z80CTC(config, m_ctc, 2000000); + Z80CTC(config, m_ctc, XTAL::u(2000000)); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - SCSIHD(config, "harddisk0", 0); + SCSIHD(config, "harddisk0"); } @@ -134,7 +134,7 @@ inline void wangpc_wdc_device::set_irq(int state) // wangpc_wdc_device - constructor //------------------------------------------------- -wangpc_wdc_device::wangpc_wdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_wdc_device::wangpc_wdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_WDC, tag, owner, clock), device_wangpcbus_card_interface(mconfig, *this), m_maincpu(*this, Z80_TAG), diff --git a/src/devices/bus/wangpc/wdc.h b/src/devices/bus/wangpc/wdc.h index cb09025e13e..32762fc5b85 100644 --- a/src/devices/bus/wangpc/wdc.h +++ b/src/devices/bus/wangpc/wdc.h @@ -29,7 +29,7 @@ class wangpc_wdc_device : public device_t, { public: // construction/destruction - wangpc_wdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wangpc_wdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/wswan/rom.cpp b/src/devices/bus/wswan/rom.cpp index 2d089989989..1f839c7f8e3 100644 --- a/src/devices/bus/wswan/rom.cpp +++ b/src/devices/bus/wswan/rom.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(WS_ROM_EEPROM, ws_rom_eeprom_device, "ws_eeprom", "Wonderswan DEFINE_DEVICE_TYPE(WS_ROM_WWITCH, ws_wwitch_device, "ws_wwitch", "WonderWitch") -ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_ws_cart_interface(mconfig, *this), m_base20(0), @@ -46,31 +46,31 @@ ws_rom_device::ws_rom_device(const machine_config &mconfig, device_type type, co { } -ws_rom_device::ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ws_rom_device::ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ws_rom_device(mconfig, WS_ROM_STD, tag, owner, clock) { } -ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ws_rom_device(mconfig, WS_ROM_SRAM, tag, owner, clock), m_nvram_base(0) { } -ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +ws_rom_sram_device::ws_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ws_rom_device(mconfig, type, tag, owner, clock), m_nvram_base(0) { } -ws_rom_eeprom_device::ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ws_rom_eeprom_device::ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ws_rom_device(mconfig, WS_ROM_EEPROM, tag, owner, clock), m_eeprom_mode(0), m_eeprom_address(0), m_eeprom_command(0), m_eeprom_start(0), m_eeprom_write_enabled(0) { } -ws_wwitch_device::ws_wwitch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ws_wwitch_device::ws_wwitch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ws_rom_sram_device(mconfig, WS_ROM_WWITCH, tag, owner, clock) { } diff --git a/src/devices/bus/wswan/rom.h b/src/devices/bus/wswan/rom.h index 9a47ebf8023..f0c50799b2f 100644 --- a/src/devices/bus/wswan/rom.h +++ b/src/devices/bus/wswan/rom.h @@ -13,7 +13,7 @@ class ws_rom_device : public device_t, { public: // construction/destruction - ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ws_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual u16 read_rom20(offs_t offset, u16 mem_mask) override; @@ -23,7 +23,7 @@ public: virtual void write_io(offs_t offset, u16 data, u16 mem_mask) override; protected: - ws_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + ws_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -56,7 +56,7 @@ class ws_rom_sram_device : public ws_rom_device { public: // construction/destruction - ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ws_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual u16 read_ram(offs_t offset, u16 mem_mask) override; @@ -64,7 +64,7 @@ public: virtual void write_io(offs_t offset, u16 data, u16 mem_mask) override; protected: - ws_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + ws_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -81,7 +81,7 @@ class ws_rom_eeprom_device : public ws_rom_device { public: // construction/destruction - ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ws_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual u16 read_io(offs_t offset, u16 mem_mask) override; @@ -105,7 +105,7 @@ class ws_wwitch_device : public ws_rom_sram_device { public: // construction/destruction - ws_wwitch_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ws_wwitch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // reading and writing virtual u16 read_ram(offs_t offset, u16 mem_mask) override; diff --git a/src/devices/bus/wswan/slot.cpp b/src/devices/bus/wswan/slot.cpp index 959f43f4bd0..85117073120 100644 --- a/src/devices/bus/wswan/slot.cpp +++ b/src/devices/bus/wswan/slot.cpp @@ -76,7 +76,7 @@ void device_ws_cart_interface::nvram_alloc(u32 size) //------------------------------------------------- // ws_cart_slot_device - constructor //------------------------------------------------- -ws_cart_slot_device::ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ws_cart_slot_device::ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WS_CART_SLOT, tag, owner, clock), device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface(mconfig, *this), diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h index fd9d1928b92..e4a1c4e4573 100644 --- a/src/devices/bus/wswan/slot.h +++ b/src/devices/bus/wswan/slot.h @@ -134,7 +134,7 @@ class ws_cart_slot_device : public device_t, public: // construction/destruction template - ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&opts, const char *dflt) + ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&opts, const char *dflt) : ws_cart_slot_device(mconfig, tag, owner, clock) { option_reset(); @@ -142,7 +142,7 @@ public: set_default_option(dflt); set_fixed(false); } - ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~ws_cart_slot_device(); // image-level overrides diff --git a/src/devices/bus/x68k/x68k_midi.cpp b/src/devices/bus/x68k/x68k_midi.cpp index 2f55ce3781f..b069404920e 100644 --- a/src/devices/bus/x68k/x68k_midi.cpp +++ b/src/devices/bus/x68k/x68k_midi.cpp @@ -29,7 +29,7 @@ void x68k_midi_device::device_add_mconfig(machine_config &config) } -x68k_midi_device::x68k_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +x68k_midi_device::x68k_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X68K_MIDI, tag, owner, clock) , device_x68k_expansion_card_interface(mconfig, *this) , m_slot(nullptr) diff --git a/src/devices/bus/x68k/x68k_midi.h b/src/devices/bus/x68k/x68k_midi.h index b43968d468b..4213bf42a3c 100644 --- a/src/devices/bus/x68k/x68k_midi.h +++ b/src/devices/bus/x68k/x68k_midi.h @@ -22,7 +22,7 @@ class x68k_midi_device : public device_t, { public: // construction/destruction - x68k_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + x68k_midi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/x68k/x68k_neptunex.cpp b/src/devices/bus/x68k/x68k_neptunex.cpp index b5c10545cd9..5aadfead162 100644 --- a/src/devices/bus/x68k/x68k_neptunex.cpp +++ b/src/devices/bus/x68k/x68k_neptunex.cpp @@ -19,13 +19,13 @@ DEFINE_DEVICE_TYPE(X68K_NEPTUNEX, x68k_neptune_device, "x68k_neptunex", "Neptune // device machine config void x68k_neptune_device::device_add_mconfig(machine_config &config) { - DP8390D(config, m_dp8390, 0); + DP8390D(config, m_dp8390); m_dp8390->irq_callback().set(FUNC(x68k_neptune_device::x68k_neptune_irq_w)); m_dp8390->mem_read_callback().set(FUNC(x68k_neptune_device::x68k_neptune_mem_read)); m_dp8390->mem_write_callback().set(FUNC(x68k_neptune_device::x68k_neptune_mem_write)); } -x68k_neptune_device::x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +x68k_neptune_device::x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X68K_NEPTUNEX, tag, owner, clock) , device_x68k_expansion_card_interface(mconfig, *this) , m_slot(nullptr) diff --git a/src/devices/bus/x68k/x68k_neptunex.h b/src/devices/bus/x68k/x68k_neptunex.h index b60a58d46e1..aa26ddf4bd4 100644 --- a/src/devices/bus/x68k/x68k_neptunex.h +++ b/src/devices/bus/x68k/x68k_neptunex.h @@ -25,7 +25,7 @@ class x68k_neptune_device : public device_t, { public: // construction/destruction - x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t x68k_neptune_port_r(offs_t offset, uint16_t mem_mask = ~0); void x68k_neptune_port_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/x68k/x68k_scsiext.cpp b/src/devices/bus/x68k/x68k_scsiext.cpp index bec669ef1f5..91777b3df57 100644 --- a/src/devices/bus/x68k/x68k_scsiext.cpp +++ b/src/devices/bus/x68k/x68k_scsiext.cpp @@ -54,7 +54,7 @@ void x68k_scsiext_device::device_add_mconfig(machine_config &config) m_spc->drq_cb().set(FUNC(x68k_scsiext_device::drq_w)); } -x68k_scsiext_device::x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +x68k_scsiext_device::x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X68K_SCSIEXT, tag, owner, clock) , device_x68k_expansion_card_interface(mconfig, *this) , m_slot(nullptr), diff --git a/src/devices/bus/x68k/x68k_scsiext.h b/src/devices/bus/x68k/x68k_scsiext.h index c3be3ab84b5..680eda03d2a 100644 --- a/src/devices/bus/x68k/x68k_scsiext.h +++ b/src/devices/bus/x68k/x68k_scsiext.h @@ -19,7 +19,7 @@ class x68k_scsiext_device : public device_t, { public: // construction/destruction - x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t register_r(offs_t offset); void register_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/x68k/x68kexp.cpp b/src/devices/bus/x68k/x68kexp.cpp index 398c507802c..8159b25640f 100644 --- a/src/devices/bus/x68k/x68kexp.cpp +++ b/src/devices/bus/x68k/x68kexp.cpp @@ -45,7 +45,7 @@ uint8_t device_x68k_expansion_card_interface::iack4() // LIVE DEVICE //************************************************************************** -x68k_expansion_slot_device::x68k_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +x68k_expansion_slot_device::x68k_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X68K_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_space(*this, finder_base::DUMMY_TAG, -1), diff --git a/src/devices/bus/x68k/x68kexp.h b/src/devices/bus/x68k/x68kexp.h index 8b46c8e9cf5..9633ec4ff0a 100644 --- a/src/devices/bus/x68k/x68kexp.h +++ b/src/devices/bus/x68k/x68kexp.h @@ -99,14 +99,14 @@ public: // construction/destruction template x68k_expansion_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : x68k_expansion_slot_device(mconfig, tag, owner, 0) + : x68k_expansion_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - x68k_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + x68k_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~x68k_expansion_slot_device(); template void set_space(T &&tag, int spacenum) { m_space.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/bus/z29_kbd/he191_3425.cpp b/src/devices/bus/z29_kbd/he191_3425.cpp index 5a52f363590..f1317d2be69 100644 --- a/src/devices/bus/z29_kbd/he191_3425.cpp +++ b/src/devices/bus/z29_kbd/he191_3425.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(HE191_3425, he191_3425_device, "he191_3425", "Heath HE 191-3425 Keyboard") -he191_3425_device::he191_3425_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +he191_3425_device::he191_3425_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HE191_3425, tag, owner, clock) , device_z29_keyboard_interface(mconfig, *this) , m_mcu(*this, "mcu") @@ -224,7 +224,7 @@ void he191_3425_device::device_add_mconfig(machine_config &config) mcu.t1_in_cb().set(FUNC(he191_3425_device::mcu_t1_r)); SPEAKER(config, "speaker").front_center(); - BEEP(config, m_buzzer, 1'000'000'000 / PERIOD_OF_555_ASTABLE_NSEC(RES_R(510), RES_R(510), CAP_U(1))); + BEEP(config, m_buzzer, XTAL::u(1'000'000'000) / PERIOD_OF_555_ASTABLE_NSEC(RES_R(510), RES_R(510), CAP_U(1))); m_buzzer->add_route(ALL_OUTPUTS, "speaker", 1.0); } diff --git a/src/devices/bus/z29_kbd/he191_3425.h b/src/devices/bus/z29_kbd/he191_3425.h index cf0129936fb..3bd343b9711 100644 --- a/src/devices/bus/z29_kbd/he191_3425.h +++ b/src/devices/bus/z29_kbd/he191_3425.h @@ -14,7 +14,7 @@ class he191_3425_device : public device_t, public device_z29_keyboard_interface { public: // device type constructor - he191_3425_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + he191_3425_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // miscellanous handlers DECLARE_WRITE_LINE_MEMBER(shift_reset); diff --git a/src/devices/bus/z29_kbd/keyboard.cpp b/src/devices/bus/z29_kbd/keyboard.cpp index 637bc8d4389..e88112360aa 100644 --- a/src/devices/bus/z29_kbd/keyboard.cpp +++ b/src/devices/bus/z29_kbd/keyboard.cpp @@ -68,7 +68,7 @@ DEFINE_DEVICE_TYPE(Z29_KEYBOARD, z29_keyboard_port_device, "z29_kbd", "Z-29 Keyboard Port") -z29_keyboard_port_device::z29_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +z29_keyboard_port_device::z29_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z29_KEYBOARD, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_keyin_callback(*this) diff --git a/src/devices/bus/z29_kbd/keyboard.h b/src/devices/bus/z29_kbd/keyboard.h index 501d8bbe569..3aeb275a943 100644 --- a/src/devices/bus/z29_kbd/keyboard.h +++ b/src/devices/bus/z29_kbd/keyboard.h @@ -27,10 +27,10 @@ class z29_keyboard_port_device : public device_t, public device_single_card_slot public: // construction/destruction - z29_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z29_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template z29_keyboard_port_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt) - : z29_keyboard_port_device(mconfig, tag, owner, 0U) + : z29_keyboard_port_device(mconfig, tag, owner) { option_reset(); opts(*this); diff --git a/src/devices/bus/z29_kbd/md_kbd.cpp b/src/devices/bus/z29_kbd/md_kbd.cpp index 1a313af10ce..2bb996f37d3 100644 --- a/src/devices/bus/z29_kbd/md_kbd.cpp +++ b/src/devices/bus/z29_kbd/md_kbd.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(MD_KEYBOARD, md_keyboard_device, "md_kbd", "Micro-Decision Keyboard") -md_keyboard_device::md_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +md_keyboard_device::md_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MD_KEYBOARD, tag, owner, clock) , device_z29_keyboard_interface(mconfig, *this) , m_mcu(*this, "mcu") @@ -262,7 +262,7 @@ void md_keyboard_device::device_add_mconfig(machine_config &config) m_mcu->t1_in_cb().set(FUNC(md_keyboard_device::mcu_t1_r)); SPEAKER(config, "speaker").front_center(); - BEEP(config, m_buzzer, 1'000'000'000 / PERIOD_OF_555_ASTABLE_NSEC(RES_R(510), RES_R(510), CAP_U(1))); + BEEP(config, m_buzzer, XTAL::u(1'000'000'000) / PERIOD_OF_555_ASTABLE_NSEC(RES_R(510), RES_R(510), CAP_U(1))); m_buzzer->add_route(ALL_OUTPUTS, "speaker", 1.0); } diff --git a/src/devices/bus/z29_kbd/md_kbd.h b/src/devices/bus/z29_kbd/md_kbd.h index 8a81b9a461d..85468bba15b 100644 --- a/src/devices/bus/z29_kbd/md_kbd.h +++ b/src/devices/bus/z29_kbd/md_kbd.h @@ -14,7 +14,7 @@ class md_keyboard_device : public device_t, public device_z29_keyboard_interface { public: // device type constructor - md_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + md_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/z88/flash.cpp b/src/devices/bus/z88/flash.cpp index bda80f4cff6..74363f5b27b 100644 --- a/src/devices/bus/z88/flash.cpp +++ b/src/devices/bus/z88/flash.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(Z88_1024K_FLASH, z88_1024k_flash_device, "z88_1024k_flash", " // z88_1024k_flash_device - constructor //------------------------------------------------- -z88_1024k_flash_device::z88_1024k_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_1024k_flash_device::z88_1024k_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z88_1024K_FLASH, tag, owner, clock) , device_z88cart_interface(mconfig, *this) , m_flash(*this, FLASH_TAG) diff --git a/src/devices/bus/z88/flash.h b/src/devices/bus/z88/flash.h index 12d3bf7b825..2c36b762570 100644 --- a/src/devices/bus/z88/flash.h +++ b/src/devices/bus/z88/flash.h @@ -19,7 +19,7 @@ class z88_1024k_flash_device : public device_t, { public: // construction/destruction - z88_1024k_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_1024k_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/bus/z88/ram.cpp b/src/devices/bus/z88/ram.cpp index 6ba311908f9..9223d22b1b1 100644 --- a/src/devices/bus/z88/ram.cpp +++ b/src/devices/bus/z88/ram.cpp @@ -32,12 +32,12 @@ DEFINE_DEVICE_TYPE(Z88_1024K_RAM, z88_1024k_ram_device, "z88_1024k_ram", "Z88 10 // z88_32k_ram_device - constructor //------------------------------------------------- -z88_32k_ram_device::z88_32k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_32k_ram_device::z88_32k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z88_32k_ram_device(mconfig, Z88_32K_RAM, tag, owner, clock) { } -z88_32k_ram_device::z88_32k_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +z88_32k_ram_device::z88_32k_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , device_z88cart_interface(mconfig, *this) @@ -49,7 +49,7 @@ z88_32k_ram_device::z88_32k_ram_device(const machine_config &mconfig, device_typ // z88_128k_ram_device - constructor //------------------------------------------------- -z88_128k_ram_device::z88_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_128k_ram_device::z88_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z88_32k_ram_device(mconfig, Z88_128K_RAM, tag, owner, clock) { } @@ -58,7 +58,7 @@ z88_128k_ram_device::z88_128k_ram_device(const machine_config &mconfig, const ch // z88_512k_ram_device - constructor //------------------------------------------------- -z88_512k_ram_device::z88_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_512k_ram_device::z88_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z88_32k_ram_device(mconfig, Z88_512K_RAM, tag, owner, clock) { } @@ -67,7 +67,7 @@ z88_512k_ram_device::z88_512k_ram_device(const machine_config &mconfig, const ch // z88_1024k_ram_device - constructor //------------------------------------------------- -z88_1024k_ram_device::z88_1024k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_1024k_ram_device::z88_1024k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z88_32k_ram_device(mconfig, Z88_1024K_RAM, tag, owner, clock) { } diff --git a/src/devices/bus/z88/ram.h b/src/devices/bus/z88/ram.h index 96aafd82e24..4ea81667e39 100644 --- a/src/devices/bus/z88/ram.h +++ b/src/devices/bus/z88/ram.h @@ -19,10 +19,10 @@ class z88_32k_ram_device : public device_t, { public: // construction/destruction - z88_32k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_32k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - z88_32k_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + z88_32k_ram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -49,7 +49,7 @@ class z88_128k_ram_device : public z88_32k_ram_device { public: // construction/destruction - z88_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_128k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // z88cart_interface overrides @@ -62,7 +62,7 @@ class z88_512k_ram_device : public z88_32k_ram_device { public: // construction/destruction - z88_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_512k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // z88cart_interface overrides @@ -75,7 +75,7 @@ class z88_1024k_ram_device : public z88_32k_ram_device { public: // construction/destruction - z88_1024k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_1024k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // z88cart_interface overrides diff --git a/src/devices/bus/z88/rom.cpp b/src/devices/bus/z88/rom.cpp index 3d28a0a38b8..e207ca57d8b 100644 --- a/src/devices/bus/z88/rom.cpp +++ b/src/devices/bus/z88/rom.cpp @@ -31,12 +31,12 @@ DEFINE_DEVICE_TYPE(Z88_256K_ROM, z88_256k_rom_device, "z88_256k_rom", "Z88 256KB // z88_32k_rom_device - constructor //------------------------------------------------- -z88_32k_rom_device::z88_32k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_32k_rom_device::z88_32k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z88_32k_rom_device(mconfig, Z88_32K_ROM, tag, owner, clock) { } -z88_32k_rom_device::z88_32k_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +z88_32k_rom_device::z88_32k_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , device_z88cart_interface(mconfig, *this) @@ -50,7 +50,7 @@ z88_32k_rom_device::z88_32k_rom_device(const machine_config &mconfig, device_typ // z88_128k_rom_device - constructor //------------------------------------------------- -z88_128k_rom_device::z88_128k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_128k_rom_device::z88_128k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z88_32k_rom_device(mconfig, Z88_128K_ROM, tag, owner, clock) { } @@ -59,7 +59,7 @@ z88_128k_rom_device::z88_128k_rom_device(const machine_config &mconfig, const ch // z88_256k_rom_device - constructor //------------------------------------------------- -z88_256k_rom_device::z88_256k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_256k_rom_device::z88_256k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z88_32k_rom_device(mconfig, Z88_256K_ROM, tag, owner, clock) { } diff --git a/src/devices/bus/z88/rom.h b/src/devices/bus/z88/rom.h index 8bdd1a5ef92..a4ebf05ac33 100644 --- a/src/devices/bus/z88/rom.h +++ b/src/devices/bus/z88/rom.h @@ -19,10 +19,10 @@ class z88_32k_rom_device : public device_t, { public: // construction/destruction - z88_32k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_32k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - z88_32k_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + z88_32k_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -53,7 +53,7 @@ class z88_128k_rom_device : public z88_32k_rom_device { public: // construction/destruction - z88_128k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_128k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // z88cart_interface overrides @@ -66,7 +66,7 @@ class z88_256k_rom_device : public z88_32k_rom_device { public: // construction/destruction - z88_256k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_256k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // z88cart_interface overrides diff --git a/src/devices/bus/z88/z88.cpp b/src/devices/bus/z88/z88.cpp index 8a12bb47b82..5373972edee 100644 --- a/src/devices/bus/z88/z88.cpp +++ b/src/devices/bus/z88/z88.cpp @@ -55,7 +55,7 @@ device_z88cart_interface::~device_z88cart_interface() //------------------------------------------------- // z88cart_slot_device - constructor //------------------------------------------------- -z88cart_slot_device::z88cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88cart_slot_device::z88cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z88CART_SLOT, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_single_card_slot_interface(mconfig, *this) diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h index bece08cbf72..a8bc2a59553 100644 --- a/src/devices/bus/z88/z88.h +++ b/src/devices/bus/z88/z88.h @@ -93,14 +93,14 @@ public: // construction/destruction template z88cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : z88cart_slot_device(mconfig, tag, owner, 0) + : z88cart_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - z88cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + z88cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_flp_callback() { return m_out_flp_cb.bind(); } diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp index cd6efcb1b3c..bbe6ffd615c 100644 --- a/src/devices/cpu/8x300/8x300.cpp +++ b/src/devices/cpu/8x300/8x300.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(N8X300, n8x300_cpu_device, "8x300", "Signetics 8X300") DEFINE_DEVICE_TYPE(N8X305, n8x305_cpu_device, "8x305", "Signetics 8X305") -n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 13, -1) , m_io_config("io", ENDIANNESS_BIG, 8, 9, 0) @@ -54,12 +54,12 @@ n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, device_type { } -n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : n8x300_cpu_device(mconfig, N8X300, tag, owner, clock) { } -n8x305_cpu_device::n8x305_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +n8x305_cpu_device::n8x305_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : n8x300_cpu_device(mconfig, N8X305, tag, owner, clock) { } diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h index e4f2a2a3dda..f3e17d0df0c 100644 --- a/src/devices/cpu/8x300/8x300.h +++ b/src/devices/cpu/8x300/8x300.h @@ -43,7 +43,7 @@ class n8x300_cpu_device : public cpu_device { public: // construction/destruction - n8x300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + n8x300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto sc_callback() { return m_sc_callback.bind(); } auto wc_callback() { return m_wc_callback.bind(); } @@ -52,7 +52,7 @@ public: auto rb_callback() { return m_rb_callback.bind(); } auto iv_callback() { return m_iv_callback.bind(); } protected: - n8x300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + n8x300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -152,7 +152,7 @@ class n8x305_cpu_device : public n8x300_cpu_device { public: // construction/destruction - n8x305_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + n8x305_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void set_reg(uint8_t reg, uint8_t val, bool xmit) override; diff --git a/src/devices/cpu/adsp2100/adsp2100.cpp b/src/devices/cpu/adsp2100/adsp2100.cpp index 86b0158caa7..23aa525b79a 100644 --- a/src/devices/cpu/adsp2100/adsp2100.cpp +++ b/src/devices/cpu/adsp2100/adsp2100.cpp @@ -127,7 +127,7 @@ DEFINE_DEVICE_TYPE(ADSP2181, adsp2181_device, "adsp2181", "Analog Devices ADSP-2 // adsp21xx_device - constructor //------------------------------------------------- -adsp21xx_device::adsp21xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t chiptype) +adsp21xx_device::adsp21xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t chiptype) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 32, 14, -2), m_data_config("data", ENDIANNESS_LITTLE, 16, 14, -1), @@ -258,31 +258,31 @@ adsp21xx_device::adsp21xx_device(const machine_config &mconfig, device_type type m_shift_xregs[7] = &m_core.sr.srx.sr1; } -adsp2100_device::adsp2100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adsp2100_device::adsp2100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adsp21xx_device(mconfig, ADSP2100, tag, owner, clock, CHIP_TYPE_ADSP2100) { } -adsp2101_device::adsp2101_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adsp2101_device::adsp2101_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adsp2101_device(mconfig, ADSP2101, tag, owner, clock, CHIP_TYPE_ADSP2101) { } -adsp2101_device::adsp2101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t chiptype) +adsp2101_device::adsp2101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t chiptype) : adsp21xx_device(mconfig, type, tag, owner, clock, chiptype) { } -adsp2104_device::adsp2104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adsp2104_device::adsp2104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adsp2101_device(mconfig, ADSP2104, tag, owner, clock, CHIP_TYPE_ADSP2104) { } -adsp2105_device::adsp2105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adsp2105_device::adsp2105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adsp2101_device(mconfig, ADSP2105, tag, owner, clock, CHIP_TYPE_ADSP2105) { } -adsp2115_device::adsp2115_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adsp2115_device::adsp2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adsp2101_device(mconfig, ADSP2115, tag, owner, clock, CHIP_TYPE_ADSP2115) { } -adsp2181_device::adsp2181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adsp2181_device::adsp2181_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adsp21xx_device(mconfig, ADSP2181, tag, owner, clock, CHIP_TYPE_ADSP2181) , m_io_config("io", ENDIANNESS_LITTLE, 16, 11, -1) { } diff --git a/src/devices/cpu/adsp2100/adsp2100.h b/src/devices/cpu/adsp2100/adsp2100.h index 046e10fa6ba..2638d56c04d 100644 --- a/src/devices/cpu/adsp2100/adsp2100.h +++ b/src/devices/cpu/adsp2100/adsp2100.h @@ -210,7 +210,7 @@ protected: }; // construction/destruction - adsp21xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t chiptype); + adsp21xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t chiptype); // device-level overrides virtual void device_start() override; @@ -473,7 +473,7 @@ class adsp2100_device : public adsp21xx_device { public: // construction/destruction - adsp2100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adsp2100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides @@ -494,10 +494,10 @@ class adsp2101_device : public adsp21xx_device { public: // construction/destruction - adsp2101_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adsp2101_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - adsp2101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t chiptype); + adsp2101_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t chiptype); // device_execute_interface overrides virtual uint32_t execute_input_lines() const noexcept override; @@ -517,7 +517,7 @@ class adsp2181_device : public adsp21xx_device { public: // construction/destruction - adsp2181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adsp2181_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides @@ -547,19 +547,19 @@ public: class adsp2104_device : public adsp2101_device { public: - adsp2104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adsp2104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class adsp2105_device : public adsp2101_device { public: - adsp2105_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adsp2105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class adsp2115_device : public adsp2101_device { public: - adsp2115_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adsp2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/alpha/alpha.cpp b/src/devices/cpu/alpha/alpha.cpp index 54fd995b092..f752b566eb2 100644 --- a/src/devices/cpu/alpha/alpha.cpp +++ b/src/devices/cpu/alpha/alpha.cpp @@ -38,17 +38,17 @@ DEFINE_DEVICE_TYPE(DEC_21064, dec_21064_device, "21064", "DEC Alpha 21064") -dec_21064_device::dec_21064_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dec_21064_device::dec_21064_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : alpha_ev4_device(mconfig, DEC_21064, tag, owner, clock) { } -alpha_ev4_device::alpha_ev4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +alpha_ev4_device::alpha_ev4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : alpha_device(mconfig, type, tag, owner, clock) { } -alpha_device::alpha_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +alpha_device::alpha_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_dasm_type(alpha_disassembler::dasm_type::TYPE_UNKNOWN) , m_as_config diff --git a/src/devices/cpu/alpha/alpha.h b/src/devices/cpu/alpha/alpha.h index bf374d227b0..2aa72783324 100644 --- a/src/devices/cpu/alpha/alpha.h +++ b/src/devices/cpu/alpha/alpha.h @@ -18,7 +18,7 @@ public: auto srom_data_r() { return m_srom_data_cb.bind(); } protected: - alpha_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + alpha_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device_t overrides virtual void device_start() override; @@ -76,7 +76,7 @@ protected: class alpha_ev4_device : public alpha_device { public: - alpha_ev4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + alpha_ev4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -253,7 +253,7 @@ protected: class dec_21064_device : public alpha_ev4_device { public: - dec_21064_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dec_21064_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp index 5d093a96966..07ab991d042 100644 --- a/src/devices/cpu/alto2/alto2cpu.cpp +++ b/src/devices/cpu/alto2/alto2cpu.cpp @@ -125,7 +125,7 @@ void alto2_cpu_device::iomem_map(address_map &map) // alto2_cpu_device - constructor //------------------------------------------------- -alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : cpu_device(mconfig, ALTO2, tag, owner, clock), m_kb_read_callback(*this), m_utilout_callback(*this), diff --git a/src/devices/cpu/alto2/alto2cpu.h b/src/devices/cpu/alto2/alto2cpu.h index c269737d2e6..4fa396e7b3a 100644 --- a/src/devices/cpu/alto2/alto2cpu.h +++ b/src/devices/cpu/alto2/alto2cpu.h @@ -179,7 +179,7 @@ class alto2_cpu_device : public cpu_device { public: // construction/destruction - alto2_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + alto2_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~alto2_cpu_device(); auto kb_read_callback() { return m_kb_read_callback.bind(); } diff --git a/src/devices/cpu/am29000/am29000.cpp b/src/devices/cpu/am29000/am29000.cpp index b66c5163e1e..0f8a91d4a13 100644 --- a/src/devices/cpu/am29000/am29000.cpp +++ b/src/devices/cpu/am29000/am29000.cpp @@ -78,7 +78,7 @@ DEFINE_DEVICE_TYPE(AM29000, am29000_cpu_device, "am29000", "AMC Am29000") STATE ACCESSORS ***************************************************************************/ -am29000_cpu_device::am29000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am29000_cpu_device::am29000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, AM29000, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 32, 0) , m_io_config("io", ENDIANNESS_BIG, 32, 32, 0) diff --git a/src/devices/cpu/am29000/am29000.h b/src/devices/cpu/am29000/am29000.h index c19eeb8b9f2..203c9191f77 100644 --- a/src/devices/cpu/am29000/am29000.h +++ b/src/devices/cpu/am29000/am29000.h @@ -436,7 +436,7 @@ class am29000_cpu_device : public cpu_device { public: // construction/destruction - am29000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am29000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/amis2000/amis2000.cpp b/src/devices/cpu/amis2000/amis2000.cpp index 468b29acd98..9dedbf962ac 100644 --- a/src/devices/cpu/amis2000/amis2000.cpp +++ b/src/devices/cpu/amis2000/amis2000.cpp @@ -59,15 +59,15 @@ void amis2000_base_device::data_80x4(address_map &map) // device definitions -amis2000_cpu_device::amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +amis2000_cpu_device::amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : amis2000_base_device(mconfig, AMI_S2000, tag, owner, clock, 2, 10, 3, 13, address_map_constructor(FUNC(amis2000_cpu_device::program_1k), this), 6, address_map_constructor(FUNC(amis2000_cpu_device::data_64x4), this)) { } -amis2150_cpu_device::amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +amis2150_cpu_device::amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : amis2000_base_device(mconfig, AMI_S2150, tag, owner, clock, 3, 11, 3, 13, address_map_constructor(FUNC(amis2150_cpu_device::program_1_5k), this), 7, address_map_constructor(FUNC(amis2150_cpu_device::data_80x4), this)) { } -amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : amis2000_base_device(mconfig, AMI_S2152, tag, owner, clock, 3, 11, 3, 13, address_map_constructor(FUNC(amis2152_cpu_device::program_1_5k), this), 7, address_map_constructor(FUNC(amis2152_cpu_device::data_80x4), this)) { } diff --git a/src/devices/cpu/amis2000/amis2000.h b/src/devices/cpu/amis2000/amis2000.h index f284149dd15..5cdeadfe5fb 100644 --- a/src/devices/cpu/amis2000/amis2000.h +++ b/src/devices/cpu/amis2000/amis2000.h @@ -39,7 +39,7 @@ public: protected: // construction/destruction - amis2000_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bu_bits, u8 callstack_bits, u8 callstack_depth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) + amis2000_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bu_bits, u8 callstack_bits, u8 callstack_depth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, prgwidth, 0, program) , m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data) @@ -189,21 +189,21 @@ protected: class amis2000_cpu_device : public amis2000_base_device { public: - amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class amis2150_cpu_device : public amis2000_base_device { public: - amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class amis2152_cpu_device : public amis2000_base_device { public: - amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/apexc/apexc.cpp b/src/devices/cpu/apexc/apexc.cpp index 68c1547823c..c982a442c7a 100644 --- a/src/devices/cpu/apexc/apexc.cpp +++ b/src/devices/cpu/apexc/apexc.cpp @@ -337,7 +337,7 @@ DEFINE_DEVICE_TYPE(APEXC, apexc_cpu_device, "apexc_cpu", "APE(X)C") #define DELAY(n) {m_icount -= (n); m_current_word = (m_current_word + (n)) & 0x1f;} -apexc_cpu_device::apexc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apexc_cpu_device::apexc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, APEXC, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 15, 0) , m_tape_read_cb(*this) diff --git a/src/devices/cpu/apexc/apexc.h b/src/devices/cpu/apexc/apexc.h index 84b44add940..7339f7ec7a5 100644 --- a/src/devices/cpu/apexc/apexc.h +++ b/src/devices/cpu/apexc/apexc.h @@ -20,7 +20,7 @@ class apexc_cpu_device : public cpu_device { public: // construction/destruction - apexc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apexc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto tape_read() { return m_tape_read_cb.bind(); } diff --git a/src/devices/cpu/arc/arc.cpp b/src/devices/cpu/arc/arc.cpp index 5b1b61bf6e1..0bba6735819 100644 --- a/src/devices/cpu/arc/arc.cpp +++ b/src/devices/cpu/arc/arc.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(ARC, arc_cpu_device, "arc_a4", "Argonaut ARCtangent A4") -arc_cpu_device::arc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arc_cpu_device::arc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ARC, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 24, 0) , m_pc(0), m_program(nullptr), m_icount(0), m_debugger_temp(0) diff --git a/src/devices/cpu/arc/arc.h b/src/devices/cpu/arc/arc.h index fd4fa0582e1..bf1096ad09c 100644 --- a/src/devices/cpu/arc/arc.h +++ b/src/devices/cpu/arc/arc.h @@ -21,7 +21,7 @@ class arc_cpu_device : public cpu_device { public: // construction/destruction - arc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arc_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/arcompact/arcompact.cpp b/src/devices/cpu/arcompact/arcompact.cpp index f1055895d87..d64885911ae 100644 --- a/src/devices/cpu/arcompact/arcompact.cpp +++ b/src/devices/cpu/arcompact/arcompact.cpp @@ -49,7 +49,7 @@ void arcompact_device::arcompact_auxreg_map(address_map &map) #define AUX_SPACE_ADDRESS_WIDTH 32 // IO space is 32 bits of dwords -arcompact_device::arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arcompact_device::arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ARCA5, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) // some docs describe these as 'middle endian'?! , m_io_config( "io", ENDIANNESS_LITTLE, 32, AUX_SPACE_ADDRESS_WIDTH, -2, address_map_constructor(FUNC(arcompact_device::arcompact_auxreg_map), this)) diff --git a/src/devices/cpu/arcompact/arcompact.h b/src/devices/cpu/arcompact/arcompact.h index d87499bc969..6b6ffa5d0af 100644 --- a/src/devices/cpu/arcompact/arcompact.h +++ b/src/devices/cpu/arcompact/arcompact.h @@ -70,7 +70,7 @@ class arcompact_device : public cpu_device { public: // construction/destruction - arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t arcompact_auxreg002_LPSTART_r(); void arcompact_auxreg002_LPSTART_w(uint32_t data); diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp index 6a99468da75..980f5fe261d 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -225,13 +225,13 @@ device_memory_interface::space_config_vector arm_cpu_device::memory_space_config }; } -arm_cpu_device::arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm_cpu_device::arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm_cpu_device(mconfig, ARM, tag, owner, clock) { } -arm_cpu_device::arm_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +arm_cpu_device::arm_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 26, 0) , m_copro_type(copro_type::UNKNOWN_CP15) diff --git a/src/devices/cpu/arm/arm.h b/src/devices/cpu/arm/arm.h index aeafa3c0d7b..d52de002db2 100644 --- a/src/devices/cpu/arm/arm.h +++ b/src/devices/cpu/arm/arm.h @@ -27,7 +27,7 @@ public: }; // construction/destruction - arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_copro_type(copro_type type) { m_copro_type = type; } @@ -41,7 +41,7 @@ protected: ARM32_IR13, ARM32_IR14, ARM32_SR13, ARM32_SR14 }; - arm_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + arm_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/arm7/arm7.cpp b/src/devices/cpu/arm7/arm7.cpp index d2c40209dd1..e8e5c1005f4 100644 --- a/src/devices/cpu/arm7/arm7.cpp +++ b/src/devices/cpu/arm7/arm7.cpp @@ -78,12 +78,12 @@ DEFINE_DEVICE_TYPE(PXA270, pxa270_cpu_device, "pxa270", "Intel DEFINE_DEVICE_TYPE(SA1110, sa1110_cpu_device, "sa1110", "Intel StrongARM SA-1110") DEFINE_DEVICE_TYPE(IGS036, igs036_cpu_device, "igs036", "IGS036") -arm7_cpu_device::arm7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm7_cpu_device::arm7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, ARM7, tag, owner, clock, 4, ARCHFLAG_T, ENDIANNESS_LITTLE) { } -arm7_cpu_device::arm7_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness) +arm7_cpu_device::arm7_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", endianness, 32, 32, 0) , m_prefetch_word0_shift(endianness == ENDIANNESS_LITTLE ? 0 : 16) @@ -114,13 +114,13 @@ arm7_cpu_device::arm7_cpu_device(const machine_config &mconfig, device_type type } -arm7_be_cpu_device::arm7_be_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm7_be_cpu_device::arm7_be_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, ARM7_BE, tag, owner, clock, 4, ARCHFLAG_T, ENDIANNESS_BIG) { } -arm710a_cpu_device::arm710a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm710a_cpu_device::arm710a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, ARM710A, tag, owner, clock, 4, ARCHFLAG_MODE26, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_ARM @@ -129,7 +129,7 @@ arm710a_cpu_device::arm710a_cpu_device(const machine_config &mconfig, const char } -arm710t_cpu_device::arm710t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm710t_cpu_device::arm710t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, ARM710T, tag, owner, clock, 4, ARCHFLAG_MODE26, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_ARM @@ -138,7 +138,7 @@ arm710t_cpu_device::arm710t_cpu_device(const machine_config &mconfig, const char } -arm7500_cpu_device::arm7500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm7500_cpu_device::arm7500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, ARM7500, tag, owner, clock, 4, ARCHFLAG_MODE26, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_ARM @@ -147,13 +147,13 @@ arm7500_cpu_device::arm7500_cpu_device(const machine_config &mconfig, const char } -arm9_cpu_device::arm9_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm9_cpu_device::arm9_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm9_cpu_device(mconfig, ARM9, tag, owner, clock, 5, ARCHFLAG_T | ARCHFLAG_E, ENDIANNESS_LITTLE) { } -arm9_cpu_device::arm9_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness) +arm9_cpu_device::arm9_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness) : arm7_cpu_device(mconfig, type, tag, owner, clock, archRev, archFlags, endianness) { uint32_t arch = ARM9_COPRO_ID_ARCH_V4; @@ -181,7 +181,7 @@ arm9_cpu_device::arm9_cpu_device(const machine_config &mconfig, device_type type } -arm920t_cpu_device::arm920t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm920t_cpu_device::arm920t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm9_cpu_device(mconfig, ARM920T, tag, owner, clock, 4, ARCHFLAG_T, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_ARM @@ -191,7 +191,7 @@ arm920t_cpu_device::arm920t_cpu_device(const machine_config &mconfig, const char | 0; // Stepping } -arm946es_cpu_device::arm946es_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +arm946es_cpu_device::arm946es_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : arm9_cpu_device(mconfig, type, tag, owner, clock, 5, ARCHFLAG_T | ARCHFLAG_E, ENDIANNESS_LITTLE), cp15_control(0x78) { @@ -212,18 +212,18 @@ arm946es_cpu_device::arm946es_cpu_device(const machine_config &mconfig, device_t cp15_itcm_reg = cp15_dtcm_reg = 0; } -arm946es_cpu_device::arm946es_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm946es_cpu_device::arm946es_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm946es_cpu_device(mconfig, ARM946ES, tag, owner, clock) { } -arm11_cpu_device::arm11_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm11_cpu_device::arm11_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm11_cpu_device(mconfig, ARM11, tag, owner, clock, 6, ARCHFLAG_T | ARCHFLAG_E | ARCHFLAG_K, ENDIANNESS_LITTLE) { } -arm11_cpu_device::arm11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness) +arm11_cpu_device::arm11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness) : arm9_cpu_device(mconfig, type, tag, owner, clock, archRev, archFlags, endianness) { uint32_t arch = ARM9_COPRO_ID_ARCH_V6; @@ -231,7 +231,7 @@ arm11_cpu_device::arm11_cpu_device(const machine_config &mconfig, device_type ty m_copro_id = ARM9_COPRO_ID_MFR_ARM | arch | (0xB00 << 4); } -arm1176jzf_s_cpu_device::arm1176jzf_s_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm1176jzf_s_cpu_device::arm1176jzf_s_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm11_cpu_device(mconfig, ARM1176JZF_S, tag, owner, clock, 6, ARCHFLAG_T | ARCHFLAG_E | ARCHFLAG_K, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_ARM @@ -242,12 +242,12 @@ arm1176jzf_s_cpu_device::arm1176jzf_s_cpu_device(const machine_config &mconfig, } // unknown configuration, but uses MPU not MMU, so closer to ARM946ES -igs036_cpu_device::igs036_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +igs036_cpu_device::igs036_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm946es_cpu_device(mconfig, IGS036, tag, owner, clock) { } -pxa250_cpu_device::pxa250_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pxa250_cpu_device::pxa250_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, PXA250, tag, owner, clock, 5, ARCHFLAG_T | ARCHFLAG_E | ARCHFLAG_XSCALE, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_INTEL @@ -256,7 +256,7 @@ pxa250_cpu_device::pxa250_cpu_device(const machine_config &mconfig, const char * | ARM9_COPRO_ID_STEP_PXA255_A0; } -pxa255_cpu_device::pxa255_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pxa255_cpu_device::pxa255_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, PXA255, tag, owner, clock, 5, ARCHFLAG_T | ARCHFLAG_E | ARCHFLAG_XSCALE, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_INTEL @@ -265,7 +265,7 @@ pxa255_cpu_device::pxa255_cpu_device(const machine_config &mconfig, const char * | ARM9_COPRO_ID_STEP_PXA255_A0; } -pxa270_cpu_device::pxa270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pxa270_cpu_device::pxa270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, PXA270, tag, owner, clock, 5, ARCHFLAG_T | ARCHFLAG_E | ARCHFLAG_XSCALE, ENDIANNESS_LITTLE) { m_copro_id = ARM9_COPRO_ID_MFR_INTEL @@ -274,7 +274,7 @@ pxa270_cpu_device::pxa270_cpu_device(const machine_config &mconfig, const char * | ARM9_COPRO_ID_STEP_PXA255_A0; } -sa1110_cpu_device::sa1110_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sa1110_cpu_device::sa1110_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, SA1110, tag, owner, clock, 4, ARCHFLAG_SA, ENDIANNESS_LITTLE) // has StrongARM, no Thumb, no Enhanced DSP { diff --git a/src/devices/cpu/arm7/arm7.h b/src/devices/cpu/arm7/arm7.h index c46516508db..03e0918a538 100644 --- a/src/devices/cpu/arm7/arm7.h +++ b/src/devices/cpu/arm7/arm7.h @@ -51,7 +51,7 @@ class arm7_cpu_device : public cpu_device, public arm7_disassembler::config { public: // construction/destruction - arm7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_high_vectors() { m_vectorbase = 0xffff0000; } @@ -113,7 +113,7 @@ protected: ARM9_COPRO_ID_MFR_INTEL = 0x69 << 24 }; - arm7_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness); + arm7_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness); void postload(); @@ -622,7 +622,7 @@ class arm7_be_cpu_device : public arm7_cpu_device { public: // construction/destruction - arm7_be_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm7_be_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -630,31 +630,31 @@ class arm7500_cpu_device : public arm7_cpu_device { public: // construction/destruction - arm7500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm7500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class arm710a_cpu_device : public arm7_cpu_device { public: // construction/destruction - arm710a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm710a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class arm710t_cpu_device : public arm7_cpu_device { public: // construction/destruction - arm710t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm710t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class arm9_cpu_device : public arm7_cpu_device { public: // construction/destruction - arm9_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm9_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - arm9_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness); + arm9_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness); }; @@ -662,7 +662,7 @@ class arm920t_cpu_device : public arm9_cpu_device { public: // construction/destruction - arm920t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm920t_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -670,7 +670,7 @@ class arm946es_cpu_device : public arm9_cpu_device { public: // construction/destruction - arm946es_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm946es_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // 946E-S has Protection Unit instead of ARM MMU so CP15 is quite different virtual uint32_t arm7_rt_r_callback(offs_t offset) override; @@ -684,7 +684,7 @@ public: virtual uint8_t arm7_cpu_read8(uint32_t addr) override; protected: - arm946es_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + arm946es_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -701,17 +701,17 @@ class arm11_cpu_device : public arm9_cpu_device { public: // construction/destruction - arm11_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm11_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - arm11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness); + arm11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t archRev, uint32_t archFlags, endianness_t endianness); }; class arm1176jzf_s_cpu_device : public arm11_cpu_device { public: // construction/destruction - arm1176jzf_s_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm1176jzf_s_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t arm7_rt_r_callback(offs_t offset) override; virtual void arm7_rt_w_callback(offs_t offset, uint32_t data) override; @@ -724,35 +724,35 @@ class igs036_cpu_device : public arm946es_cpu_device { public: // construction/destruction - igs036_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + igs036_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pxa250_cpu_device : public arm7_cpu_device { public: // construction/destruction - pxa250_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pxa250_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pxa255_cpu_device : public arm7_cpu_device { public: // construction/destruction - pxa255_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pxa255_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pxa270_cpu_device : public arm7_cpu_device { public: // construction/destruction - pxa270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pxa270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sa1110_cpu_device : public arm7_cpu_device { public: // construction/destruction - sa1110_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sa1110_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(ARM7, arm7_cpu_device) diff --git a/src/devices/cpu/arm7/lpc210x.cpp b/src/devices/cpu/arm7/lpc210x.cpp index 75a322f01a2..99ecfb478f4 100644 --- a/src/devices/cpu/arm7/lpc210x.cpp +++ b/src/devices/cpu/arm7/lpc210x.cpp @@ -41,7 +41,7 @@ void lpc210x_device::lpc2103_map(address_map &map) } -lpc210x_device::lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lpc210x_device::lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, LPC2103, tag, owner, clock, 4, ARCHFLAG_T, ENDIANNESS_LITTLE) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0, address_map_constructor(FUNC(lpc210x_device::lpc2103_map), this)) , m_vic(*this, "vic") @@ -256,7 +256,7 @@ void lpc210x_device::write_timer(int timer, int offset, uint32_t data, uint32_t void lpc210x_device::device_add_mconfig(machine_config &config) { - PL190_VIC(config, m_vic, 0); + PL190_VIC(config, m_vic); m_vic->out_irq_cb().set_inputline(*this, ARM7_IRQ_LINE); m_vic->out_fiq_cb().set_inputline(*this, ARM7_FIRQ_LINE); } diff --git a/src/devices/cpu/arm7/lpc210x.h b/src/devices/cpu/arm7/lpc210x.h index 47a801a6058..c36f6fbd109 100644 --- a/src/devices/cpu/arm7/lpc210x.h +++ b/src/devices/cpu/arm7/lpc210x.h @@ -22,7 +22,7 @@ class lpc210x_device : public arm7_cpu_device { public: - lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t arm_E01FC088_r(); uint32_t flash_r(offs_t offset); diff --git a/src/devices/cpu/arm7/upd800468.cpp b/src/devices/cpu/arm7/upd800468.cpp index 16b6928bf7c..1248b5ea2b3 100644 --- a/src/devices/cpu/arm7/upd800468.cpp +++ b/src/devices/cpu/arm7/upd800468.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(UPD800468_TIMER, upd800468_timer_device, "upd800468_timer", "NEC uPD800468 timer") -upd800468_timer_device::upd800468_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd800468_timer_device::upd800468_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD800468_TIMER, tag, owner, clock) , m_irq_cb(*this) { @@ -122,7 +122,7 @@ void upd800468_device::upd800468_map(address_map &map) map(0xfffff000, 0xffffffff).m(m_vic, FUNC(vic_upd800468_device::map)); } -upd800468_device::upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd800468_device::upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm7_cpu_device(mconfig, UPD800468, tag, owner, clock, 4, ARCHFLAG_T, ENDIANNESS_LITTLE) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0, address_map_constructor(FUNC(upd800468_device::upd800468_map), this)) , m_vic(*this, "vic") @@ -142,7 +142,7 @@ device_memory_interface::space_config_vector upd800468_device::memory_space_conf void upd800468_device::device_add_mconfig(machine_config &config) { - UPD800468_VIC(config, m_vic, 0); + UPD800468_VIC(config, m_vic); m_vic->out_irq_cb().set_inputline(*this, ARM7_IRQ_LINE); m_vic->out_fiq_cb().set_inputline(*this, ARM7_FIRQ_LINE); @@ -157,7 +157,7 @@ void upd800468_device::device_add_mconfig(machine_config &config) m_timer[2]->irq_cb().set(m_vic, FUNC(vic_upd800468_device::irq_w<23>)); // key/button controller is compatible with the one from earlier keyboards - GT913_KBD_HLE(config, m_kbd, 0); + GT913_KBD_HLE(config, m_kbd); m_kbd->irq_cb().set(m_vic, FUNC(vic_upd800468_device::irq_w<31>)); } diff --git a/src/devices/cpu/arm7/upd800468.h b/src/devices/cpu/arm7/upd800468.h index 7f662581c7f..a90fdcf9827 100644 --- a/src/devices/cpu/arm7/upd800468.h +++ b/src/devices/cpu/arm7/upd800468.h @@ -18,7 +18,7 @@ class upd800468_timer_device : public device_t { public: - upd800468_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd800468_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_cb() { return m_irq_cb.bind(); } @@ -45,7 +45,7 @@ private: class upd800468_device : public arm7_cpu_device { public: - upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void upd800468_map(address_map &map); diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp index 045819aa4ae..554a83dd2ee 100644 --- a/src/devices/cpu/asap/asap.cpp +++ b/src/devices/cpu/asap/asap.cpp @@ -136,7 +136,7 @@ DEFINE_DEVICE_TYPE(ASAP, asap_device, "asap", "Atari ASAP") // asap_device - constructor //------------------------------------------------- -asap_device::asap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +asap_device::asap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ASAP, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 32, 32), m_pc(0), diff --git a/src/devices/cpu/asap/asap.h b/src/devices/cpu/asap/asap.h index 3adb9ef37f4..1e62fd76202 100644 --- a/src/devices/cpu/asap/asap.h +++ b/src/devices/cpu/asap/asap.h @@ -26,7 +26,7 @@ class asap_device : public cpu_device { public: // construction/destruction - asap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + asap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interfaces diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp index f650a53bbb3..85afb1482bd 100644 --- a/src/devices/cpu/avr8/avr8.cpp +++ b/src/devices/cpu/avr8/avr8.cpp @@ -642,7 +642,7 @@ void attiny15_device::attiny15_internal_map(address_map &map) // atmega88_device - constructor //------------------------------------------------- -atmega88_device::atmega88_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmega88_device::atmega88_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avr8_device(mconfig, tag, owner, clock, ATMEGA88, 0x0fff, address_map_constructor(FUNC(atmega88_device::atmega88_internal_map), this), 3) { } @@ -651,7 +651,7 @@ atmega88_device::atmega88_device(const machine_config &mconfig, const char *tag, // atmega168_device - constructor //------------------------------------------------- -atmega168_device::atmega168_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmega168_device::atmega168_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avr8_device(mconfig, tag, owner, clock, ATMEGA168, 0x1fff, address_map_constructor(FUNC(atmega168_device::atmega168_internal_map), this), 3) { } @@ -660,7 +660,7 @@ atmega168_device::atmega168_device(const machine_config &mconfig, const char *ta // atmega328_device - constructor //------------------------------------------------- -atmega328_device::atmega328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmega328_device::atmega328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avr8_device(mconfig, tag, owner, clock, ATMEGA328, 0x7fff, address_map_constructor(FUNC(atmega328_device::atmega328_internal_map), this), 3) { } @@ -669,7 +669,7 @@ atmega328_device::atmega328_device(const machine_config &mconfig, const char *ta // atmega644_device - constructor //------------------------------------------------- -atmega644_device::atmega644_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmega644_device::atmega644_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avr8_device(mconfig, tag, owner, clock, ATMEGA644, 0xffff, address_map_constructor(FUNC(atmega644_device::atmega644_internal_map), this), 3) { } @@ -678,7 +678,7 @@ atmega644_device::atmega644_device(const machine_config &mconfig, const char *ta // atmega1280_device - constructor //------------------------------------------------- -atmega1280_device::atmega1280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmega1280_device::atmega1280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avr8_device(mconfig, tag, owner, clock, ATMEGA1280, 0x1ffff, address_map_constructor(FUNC(atmega1280_device::atmega1280_internal_map), this), 6) { } @@ -687,7 +687,7 @@ atmega1280_device::atmega1280_device(const machine_config &mconfig, const char * // atmega2560_device - constructor //------------------------------------------------- -atmega2560_device::atmega2560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmega2560_device::atmega2560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avr8_device(mconfig, tag, owner, clock, ATMEGA2560, 0x1ffff, address_map_constructor(FUNC(atmega2560_device::atmega2560_internal_map), this), 6) { } @@ -696,7 +696,7 @@ atmega2560_device::atmega2560_device(const machine_config &mconfig, const char * // attiny15_device - constructor //------------------------------------------------- -attiny15_device::attiny15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +attiny15_device::attiny15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avr8_device(mconfig, tag, owner, clock, ATTINY15, 0x03ff, address_map_constructor(FUNC(attiny15_device::attiny15_internal_map), this), 2) { } @@ -705,7 +705,7 @@ attiny15_device::attiny15_device(const machine_config &mconfig, const char *tag, // avr8_device - constructor //------------------------------------------------- -avr8_device::avr8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const device_type type, uint32_t addr_mask, address_map_constructor internal_map, int32_t num_timers) +avr8_device::avr8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, uint32_t addr_mask, address_map_constructor internal_map, int32_t num_timers) : cpu_device(mconfig, type, tag, owner, clock) , m_shifted_pc(0) , m_program_config("program", ENDIANNESS_LITTLE, 8, 22) diff --git a/src/devices/cpu/avr8/avr8.h b/src/devices/cpu/avr8/avr8.h index 85f05e8cea6..758cd1cf945 100644 --- a/src/devices/cpu/avr8/avr8.h +++ b/src/devices/cpu/avr8/avr8.h @@ -45,7 +45,7 @@ public: template auto gpio_in() { return m_gpio_in_cb[Port].bind(); } protected: - avr8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const device_type type, uint32_t address_mask, address_map_constructor internal_map, int32_t num_timers); + avr8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, uint32_t address_mask, address_map_constructor internal_map, int32_t num_timers); typedef void (avr8_device::*op_func) (uint16_t op); @@ -319,7 +319,7 @@ class atmega88_device : public avr8_device { public: // construction/destruction - atmega88_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atmega88_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void atmega88_internal_map(address_map &map); }; @@ -329,7 +329,7 @@ class atmega168_device : public avr8_device { public: // construction/destruction - atmega168_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atmega168_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void update_interrupt(int source) override; void atmega168_internal_map(address_map &map); @@ -341,7 +341,7 @@ class atmega328_device : public avr8_device { public: // construction/destruction - atmega328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atmega328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void update_interrupt(int source) override; void atmega328_internal_map(address_map &map); @@ -353,7 +353,7 @@ class atmega644_device : public avr8_device { public: // construction/destruction - atmega644_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atmega644_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void update_interrupt(int source) override; void atmega644_internal_map(address_map &map); @@ -365,7 +365,7 @@ class atmega1280_device : public avr8_device { public: // construction/destruction - atmega1280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atmega1280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void update_interrupt(int source) override; void atmega1280_internal_map(address_map &map); @@ -377,7 +377,7 @@ class atmega2560_device : public avr8_device { public: // construction/destruction - atmega2560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atmega2560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void update_interrupt(int source) override; void atmega2560_internal_map(address_map &map); @@ -389,7 +389,7 @@ class attiny15_device : public avr8_device { public: // construction/destruction - attiny15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + attiny15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void attiny15_internal_map(address_map &map); }; diff --git a/src/devices/cpu/axc51/axc51.cpp b/src/devices/cpu/axc51/axc51.cpp index 602e14b75b0..068c298672b 100644 --- a/src/devices/cpu/axc51/axc51.cpp +++ b/src/devices/cpu/axc51/axc51.cpp @@ -72,7 +72,7 @@ void axc51base_cpu_device::io_internal(address_map& map) } -axc51base_cpu_device::axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map, address_map_constructor data_map, address_map_constructor io_map, int program_width, int data_width, uint8_t features) +axc51base_cpu_device::axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map, address_map_constructor data_map, address_map_constructor io_map, int program_width, int data_width, uint8_t features) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, program_map) , m_data_config("data", ENDIANNESS_LITTLE, 8, 11, 0, data_map) @@ -104,7 +104,7 @@ axc51base_cpu_device::axc51base_cpu_device(const machine_config &mconfig, device } -axc51base_cpu_device::axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features) +axc51base_cpu_device::axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features) : axc51base_cpu_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(axc51base_cpu_device::program_internal), this), address_map_constructor(FUNC(axc51base_cpu_device::data_internal), this), address_map_constructor(FUNC(axc51base_cpu_device::io_internal), this), program_width, data_width, features) { } @@ -1546,12 +1546,12 @@ void ax208_cpu_device::device_reset() // AX208 (specific CPU) -ax208_cpu_device::ax208_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ax208_cpu_device::ax208_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : axc51base_cpu_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(ax208_cpu_device::ax208_internal_program_mem), this), address_map_constructor(FUNC(ax208_cpu_device::data_internal), this), address_map_constructor(FUNC(axc51base_cpu_device::io_internal), this), 0, 8) { } -ax208_cpu_device::ax208_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ax208_cpu_device::ax208_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ax208_cpu_device(mconfig, AX208, tag, owner, clock) { } @@ -1565,7 +1565,7 @@ std::unique_ptr ax208_cpu_device::create_disassembler() -ax208p_cpu_device::ax208p_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ax208p_cpu_device::ax208p_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ax208_cpu_device(mconfig, AX208P, tag, owner, clock) { } diff --git a/src/devices/cpu/axc51/axc51.h b/src/devices/cpu/axc51/axc51.h index 291c4231414..03a5bcc624f 100644 --- a/src/devices/cpu/axc51/axc51.h +++ b/src/devices/cpu/axc51/axc51.h @@ -36,8 +36,8 @@ public: protected: // construction/destruction - axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0); - axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map, address_map_constructor data_map, address_map_constructor io_map, int program_width, int data_width, uint8_t features = 0); + axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0); + axc51base_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map, address_map_constructor data_map, address_map_constructor io_map, int program_width, int data_width, uint8_t features = 0); // device-level overrides virtual void device_start() override; @@ -519,10 +519,10 @@ class ax208_cpu_device : public axc51base_cpu_device { public: // construction/destruction - ax208_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ax208_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - ax208_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ax208_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; @@ -536,7 +536,7 @@ class ax208p_cpu_device : public ax208_cpu_device { public: // construction/destruction - ax208p_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ax208p_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/cpu/bcp/dp8344.cpp b/src/devices/cpu/bcp/dp8344.cpp index 3e78cb0d0dd..4a28cd76040 100644 --- a/src/devices/cpu/bcp/dp8344.cpp +++ b/src/devices/cpu/bcp/dp8344.cpp @@ -62,7 +62,7 @@ ALLOW_SAVE_TYPE(dp8344_device::inst_state); // dp8344_device - constructor //------------------------------------------------- -dp8344_device::dp8344_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +dp8344_device::dp8344_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_inst_config("instruction", ENDIANNESS_LITTLE, 16, 16, -1) , m_data_config("data", ENDIANNESS_LITTLE, 8, 16, 0) @@ -118,7 +118,7 @@ dp8344_device::dp8344_device(const machine_config &mconfig, device_type type, co // dp8344a_device - constructor //------------------------------------------------- -dp8344a_device::dp8344a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dp8344a_device::dp8344a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp8344_device(mconfig, DP8344A, tag, owner, clock) { } @@ -128,7 +128,7 @@ dp8344a_device::dp8344a_device(const machine_config &mconfig, const char *tag, d // dp8344b_device - constructor //------------------------------------------------- -dp8344b_device::dp8344b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dp8344b_device::dp8344b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp8344_device(mconfig, DP8344B, tag, owner, clock) { // TODO: emulate differences between DP8344A and DP8344B diff --git a/src/devices/cpu/bcp/dp8344.h b/src/devices/cpu/bcp/dp8344.h index f4e1e674da9..f035157f6a8 100644 --- a/src/devices/cpu/bcp/dp8344.h +++ b/src/devices/cpu/bcp/dp8344.h @@ -62,7 +62,7 @@ public: protected: // construction/destruction - dp8344_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + dp8344_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-specific overrides virtual void device_resolve_objects() override; @@ -227,7 +227,7 @@ class dp8344a_device : public dp8344_device { public: // device type constructor - dp8344a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dp8344a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> dp8344b_device @@ -236,7 +236,7 @@ class dp8344b_device : public dp8344_device { public: // device type constructor - dp8344b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dp8344b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/cpu/capricorn/capricorn.cpp b/src/devices/cpu/capricorn/capricorn.cpp index ee398f5296a..a5d00f16ec3 100644 --- a/src/devices/cpu/capricorn/capricorn.cpp +++ b/src/devices/cpu/capricorn/capricorn.cpp @@ -138,7 +138,7 @@ static constexpr uint8_t E_MASK = 0xf; DEFINE_DEVICE_TYPE(HP_CAPRICORN , capricorn_cpu_device , "capricorn" , "HP-Capricorn") -capricorn_cpu_device::capricorn_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +capricorn_cpu_device::capricorn_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, HP_CAPRICORN, tag, owner, clock), m_program_config("program" , ENDIANNESS_LITTLE , 8 , 16), m_opcode_func(*this), diff --git a/src/devices/cpu/capricorn/capricorn.h b/src/devices/cpu/capricorn/capricorn.h index 40bbb2cc3ab..c9aec4f56eb 100644 --- a/src/devices/cpu/capricorn/capricorn.h +++ b/src/devices/cpu/capricorn/capricorn.h @@ -17,7 +17,7 @@ class capricorn_cpu_device : public cpu_device { public: - capricorn_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + capricorn_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t flatten_burst(); diff --git a/src/devices/cpu/ccpu/ccpu.cpp b/src/devices/cpu/ccpu/ccpu.cpp index d13c272b21a..2c1f85c4418 100644 --- a/src/devices/cpu/ccpu/ccpu.cpp +++ b/src/devices/cpu/ccpu/ccpu.cpp @@ -62,7 +62,7 @@ do { \ INITIALIZATION AND SHUTDOWN ***************************************************************************/ -ccpu_cpu_device::ccpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ccpu_cpu_device::ccpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, CCPU, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 15, 0) , m_data_config("data", ENDIANNESS_BIG, 16, 32, -1) diff --git a/src/devices/cpu/ccpu/ccpu.h b/src/devices/cpu/ccpu/ccpu.h index c4377f251e3..2c17b2e623f 100644 --- a/src/devices/cpu/ccpu/ccpu.h +++ b/src/devices/cpu/ccpu/ccpu.h @@ -42,7 +42,7 @@ public: typedef device_delegate vector_delegate; // construction/destruction - ccpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ccpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto external_func() { return m_external_input.bind(); } diff --git a/src/devices/cpu/clipper/clipper.cpp b/src/devices/cpu/clipper/clipper.cpp index e310b66ea62..d48ef9ae9b0 100644 --- a/src/devices/cpu/clipper/clipper.cpp +++ b/src/devices/cpu/clipper/clipper.cpp @@ -51,28 +51,28 @@ DEFINE_DEVICE_TYPE(CLIPPER_C100, clipper_c100_device, "clipper_c100", "C100 CLIP DEFINE_DEVICE_TYPE(CLIPPER_C300, clipper_c300_device, "clipper_c300", "C300 CLIPPER") DEFINE_DEVICE_TYPE(CLIPPER_C400, clipper_c400_device, "clipper_c400", "C400 CLIPPER") -clipper_c100_device::clipper_c100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +clipper_c100_device::clipper_c100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : clipper_device(mconfig, CLIPPER_C100, tag, owner, clock, ENDIANNESS_LITTLE, SSW_ID_C1R1) , m_icammu(*this, "^cammu_i") , m_dcammu(*this, "^cammu_d") { } -clipper_c300_device::clipper_c300_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +clipper_c300_device::clipper_c300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : clipper_device(mconfig, CLIPPER_C300, tag, owner, clock, ENDIANNESS_LITTLE, SSW_ID_C3R1) , m_icammu(*this, "^cammu_i") , m_dcammu(*this, "^cammu_d") { } -clipper_c400_device::clipper_c400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +clipper_c400_device::clipper_c400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : clipper_device(mconfig, CLIPPER_C400, tag, owner, clock, ENDIANNESS_LITTLE, SSW_ID_C4R4) , m_db_pc(0) , m_cammu(*this, "^cammu") { } -clipper_device::clipper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const endianness_t endianness, const u32 cpuid) +clipper_device::clipper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const endianness_t endianness, const u32 cpuid) : cpu_device(mconfig, type, tag, owner, clock) , m_main_config("main", endianness, 32, 32, 0) , m_io_config("io", endianness, 32, 32, 0) diff --git a/src/devices/cpu/clipper/clipper.h b/src/devices/cpu/clipper/clipper.h index 3e78a5fdfff..f6e492f5496 100644 --- a/src/devices/cpu/clipper/clipper.h +++ b/src/devices/cpu/clipper/clipper.h @@ -148,7 +148,7 @@ public: }; protected: - clipper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const endianness_t endianness, const u32 cpuid); + clipper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const endianness_t endianness, const u32 cpuid); // device-level overrides virtual void device_start() override; @@ -325,7 +325,7 @@ protected: class clipper_c100_device : public clipper_device { public: - clipper_c100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + clipper_c100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual cammu_device &get_icammu() const override { return *m_icammu; } @@ -339,7 +339,7 @@ private: class clipper_c300_device : public clipper_device { public: - clipper_c300_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + clipper_c300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual cammu_device &get_icammu() const override { return *m_icammu; } @@ -353,7 +353,7 @@ private: class clipper_c400_device : public clipper_device { public: - clipper_c400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + clipper_c400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/cop400/cop400.cpp b/src/devices/cpu/cop400/cop400.cpp index dcd9a6edc0f..e9669d9ea2a 100644 --- a/src/devices/cpu/cop400/cop400.cpp +++ b/src/devices/cpu/cop400/cop400.cpp @@ -170,7 +170,7 @@ void cop400_cpu_device::data_128b(address_map &map) } -cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t program_addr_bits, uint8_t data_addr_bits, uint8_t featuremask, uint8_t g_mask, uint8_t d_mask, uint8_t in_mask, bool has_counter, bool has_inil, address_map_constructor internal_map_program, address_map_constructor internal_map_data) +cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t program_addr_bits, uint8_t data_addr_bits, uint8_t featuremask, uint8_t g_mask, uint8_t d_mask, uint8_t in_mask, bool has_counter, bool has_inil, address_map_constructor internal_map_program, address_map_constructor internal_map_data) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, program_addr_bits, 0, internal_map_program) , m_data_config("data", ENDIANNESS_LITTLE, 8, data_addr_bits, 0, internal_map_data) // data width is really 4 @@ -247,87 +247,87 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type } } -cop401_cpu_device::cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop401_cpu_device::cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP401, tag, owner, clock, 9, 6, COP410_FEATURE, 0xf, 0xf, 0, false, false, address_map_constructor(), address_map_constructor(FUNC(cop401_cpu_device::data_32b), this)) { } -cop410_cpu_device::cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop410_cpu_device::cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP410, tag, owner, clock, 9, 6, COP410_FEATURE, 0xf, 0xf, 0, false, false, address_map_constructor(FUNC(cop410_cpu_device::program_512b), this), address_map_constructor(FUNC(cop410_cpu_device::data_32b), this)) { } -cop411_cpu_device::cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop411_cpu_device::cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP411, tag, owner, clock, 9, 6, COP410_FEATURE, 0x7, 0x3, 0, false, false, address_map_constructor(FUNC(cop411_cpu_device::program_512b), this), address_map_constructor(FUNC(cop411_cpu_device::data_32b), this)) { } -cop402_cpu_device::cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop402_cpu_device::cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP402, tag, owner, clock, 10, 6, COP420_FEATURE, 0xf, 0xf, 0xf, true, true, address_map_constructor(), address_map_constructor(FUNC(cop402_cpu_device::data_64b), this)) { } -cop420_cpu_device::cop420_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop420_cpu_device::cop420_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP420, tag, owner, clock, 10, 6, COP420_FEATURE, 0xf, 0xf, 0xf, true, true, address_map_constructor(FUNC(cop420_cpu_device::program_1kb), this), address_map_constructor(FUNC(cop420_cpu_device::data_64b), this)) { } -cop421_cpu_device::cop421_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop421_cpu_device::cop421_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP421, tag, owner, clock, 10, 6, COP420_FEATURE, 0xf, 0xf, 0, true, false, address_map_constructor(FUNC(cop421_cpu_device::program_1kb), this), address_map_constructor(FUNC(cop421_cpu_device::data_64b), this)) { } -cop422_cpu_device::cop422_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop422_cpu_device::cop422_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP422, tag, owner, clock, 10, 6, COP420_FEATURE, 0xe, 0xe, 0, true, false, address_map_constructor(FUNC(cop422_cpu_device::program_1kb), this), address_map_constructor(FUNC(cop422_cpu_device::data_64b), this)) { } -cop404l_cpu_device::cop404l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop404l_cpu_device::cop404l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP404L, tag, owner, clock, 11, 7, COP444L_FEATURE, 0xf, 0xf, 0xf, true, true, address_map_constructor(), address_map_constructor(FUNC(cop404l_cpu_device::data_128b), this)) { } -cop444l_cpu_device::cop444l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop444l_cpu_device::cop444l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP444L, tag, owner, clock, 11, 7, COP444L_FEATURE, 0xf, 0xf, 0xf, true, true, address_map_constructor(FUNC(cop444l_cpu_device::program_2kb), this), address_map_constructor(FUNC(cop444l_cpu_device::data_128b), this)) { } -cop445l_cpu_device::cop445l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop445l_cpu_device::cop445l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP445L, tag, owner, clock, 11, 7, COP444L_FEATURE, 0x7, 0x3, 0, true, false, address_map_constructor(FUNC(cop445l_cpu_device::program_2kb), this), address_map_constructor(FUNC(cop445l_cpu_device::data_128b), this)) { } -cop404c_cpu_device::cop404c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop404c_cpu_device::cop404c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP404C, tag, owner, clock, 11, 7, COP424C_FEATURE, 0xf, 0xf, 0xf, true, true, address_map_constructor(), address_map_constructor(FUNC(cop404c_cpu_device::data_128b), this)) { } -cop424c_cpu_device::cop424c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop424c_cpu_device::cop424c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP424C, tag, owner, clock, 10, 6, COP424C_FEATURE, 0xf, 0xf, 0xf, true, true, address_map_constructor(FUNC(cop424c_cpu_device::program_1kb), this), address_map_constructor(FUNC(cop424c_cpu_device::data_64b), this)) { } -cop425c_cpu_device::cop425c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop425c_cpu_device::cop425c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP425C, tag, owner, clock, 10, 6, COP424C_FEATURE, 0xf, 0xf, 0, true, false, address_map_constructor(FUNC(cop425c_cpu_device::program_1kb), this), address_map_constructor(FUNC(cop425c_cpu_device::data_64b), this)) { } -cop426c_cpu_device::cop426c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop426c_cpu_device::cop426c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP426C, tag, owner, clock, 10, 6, COP424C_FEATURE, 0xe, 0xe, 0xf, true, true, address_map_constructor(FUNC(cop426c_cpu_device::program_1kb), this), address_map_constructor(FUNC(cop426c_cpu_device::data_64b), this)) { } -cop444c_cpu_device::cop444c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop444c_cpu_device::cop444c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP444C, tag, owner, clock, 11, 7, COP424C_FEATURE, 0xf, 0xf, 0xf, true, true, address_map_constructor(FUNC(cop444c_cpu_device::program_2kb), this), address_map_constructor(FUNC(cop444c_cpu_device::data_128b), this)) { } -cop445c_cpu_device::cop445c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop445c_cpu_device::cop445c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP445C, tag, owner, clock, 11, 7, COP424C_FEATURE, 0xf, 0xf, 0, true, false, address_map_constructor(FUNC(cop445c_cpu_device::program_2kb), this), address_map_constructor(FUNC(cop445c_cpu_device::data_128b), this)) { } -cop446c_cpu_device::cop446c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cop446c_cpu_device::cop446c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cop400_cpu_device(mconfig, COP446C, tag, owner, clock, 11, 7, COP424C_FEATURE, 0xe, 0xe, 0xf, true, true, address_map_constructor(FUNC(cop446c_cpu_device::program_2kb),this), address_map_constructor(FUNC(cop446c_cpu_device::data_128b), this)) { } diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h index 45b2b4d0f25..4653dee10d3 100644 --- a/src/devices/cpu/cop400/cop400.h +++ b/src/devices/cpu/cop400/cop400.h @@ -129,7 +129,7 @@ public: protected: // construction/destruction - cop400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t program_addr_bits, uint8_t data_addr_bits, uint8_t featuremask, uint8_t g_mask, uint8_t d_mask, uint8_t in_mask, bool has_counter, bool has_inil, address_map_constructor internal_map_program, address_map_constructor internal_map_data); + cop400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t program_addr_bits, uint8_t data_addr_bits, uint8_t featuremask, uint8_t g_mask, uint8_t d_mask, uint8_t in_mask, bool has_counter, bool has_inil, address_map_constructor internal_map_program, address_map_constructor internal_map_data); // device-level overrides virtual void device_start() override; @@ -364,7 +364,7 @@ class cop401_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -372,7 +372,7 @@ class cop410_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -381,7 +381,7 @@ class cop411_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -391,7 +391,7 @@ class cop402_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -399,7 +399,7 @@ class cop420_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop420_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop420_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -408,7 +408,7 @@ class cop421_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop421_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop421_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -417,7 +417,7 @@ class cop422_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop422_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop422_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -427,7 +427,7 @@ class cop404l_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop404l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop404l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -435,7 +435,7 @@ class cop444l_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop444l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop444l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -444,7 +444,7 @@ class cop445l_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop445l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop445l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -453,7 +453,7 @@ class cop404c_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop404c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop404c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -462,7 +462,7 @@ class cop424c_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop424c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop424c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -471,7 +471,7 @@ class cop425c_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop425c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop425c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -480,7 +480,7 @@ class cop426c_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop426c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop426c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -489,7 +489,7 @@ class cop444c_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop444c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop444c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -498,7 +498,7 @@ class cop445c_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop445c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop445c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -507,7 +507,7 @@ class cop446c_cpu_device : public cop400_cpu_device { public: // construction/destruction - cop446c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cop446c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/cops1/cops1base.cpp b/src/devices/cpu/cops1/cops1base.cpp index 3bba883377b..b69700d6b91 100644 --- a/src/devices/cpu/cops1/cops1base.cpp +++ b/src/devices/cpu/cops1/cops1base.cpp @@ -34,7 +34,7 @@ TODO: #include "cops1base.h" -cops1_base_device::cops1_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +cops1_base_device::cops1_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, prgwidth, 0, program), m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data), diff --git a/src/devices/cpu/cops1/cops1base.h b/src/devices/cpu/cops1/cops1base.h index 75009fe7b49..8e8934009b6 100644 --- a/src/devices/cpu/cops1/cops1base.h +++ b/src/devices/cpu/cops1/cops1base.h @@ -67,7 +67,7 @@ public: protected: // construction/destruction - cops1_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + cops1_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/cops1/mm5799.cpp b/src/devices/cpu/cops1/mm5799.cpp index 7f6515760a4..3a6c427d146 100644 --- a/src/devices/cpu/cops1/mm5799.cpp +++ b/src/devices/cpu/cops1/mm5799.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(MM5799, mm5799_device, "mm5799", "National Semiconductor MM57 // constructor -mm5799_device::mm5799_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm5799_device::mm5799_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cops1_base_device(mconfig, MM5799, tag, owner, clock, 11, address_map_constructor(FUNC(mm5799_device::program_map), this), 7, address_map_constructor(FUNC(mm5799_device::data_map), this)) { } diff --git a/src/devices/cpu/cops1/mm5799.h b/src/devices/cpu/cops1/mm5799.h index a07aecd97fa..03e6d71e41b 100644 --- a/src/devices/cpu/cops1/mm5799.h +++ b/src/devices/cpu/cops1/mm5799.h @@ -37,7 +37,7 @@ class mm5799_device : public cops1_base_device { public: - mm5799_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5799_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp index bc38bf034c2..60f40fedbee 100644 --- a/src/devices/cpu/cosmac/cosmac.cpp +++ b/src/devices/cpu/cosmac/cosmac.cpp @@ -358,7 +358,7 @@ DEFINE_DEVICE_TYPE(CDP1806, cdp1806_device, "cdp1806", "RCA CDP1806") // cosmac_device - constructor //------------------------------------------------- -cosmac_device::cosmac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cosmac_device::cosmac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock), cosmac_disassembler::config(), m_program_config("program", ENDIANNESS_LITTLE, 8, 16), @@ -391,7 +391,7 @@ cosmac_device::cosmac_device(const machine_config &mconfig, device_type type, co // cdp1801_device - constructor //------------------------------------------------- -cdp1801_device::cdp1801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1801_device::cdp1801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cosmac_device(mconfig, CDP1801, tag, owner, clock) { } @@ -400,11 +400,11 @@ cdp1801_device::cdp1801_device(const machine_config &mconfig, const char *tag, d // cdp1802_device - constructor //------------------------------------------------- -cdp1802_device::cdp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1802_device::cdp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdp1802_device(mconfig, CDP1802, tag, owner, clock) { } -cdp1802_device::cdp1802_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +cdp1802_device::cdp1802_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cosmac_device(mconfig, type, tag, owner, clock) { } @@ -413,11 +413,11 @@ cdp1802_device::cdp1802_device(const machine_config &mconfig, device_type type, // cdp1804_device - constructor //------------------------------------------------- -cdp1804_device::cdp1804_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1804_device::cdp1804_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdp1804_device(mconfig, CDP1804, tag, owner, clock) { } -cdp1804_device::cdp1804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +cdp1804_device::cdp1804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cdp1802_device(mconfig, type, tag, owner, clock) { } @@ -426,11 +426,11 @@ cdp1804_device::cdp1804_device(const machine_config &mconfig, device_type type, // cdp1805_device - constructor //------------------------------------------------- -cdp1805_device::cdp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1805_device::cdp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdp1805_device(mconfig, CDP1805, tag, owner, clock) { } -cdp1805_device::cdp1805_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +cdp1805_device::cdp1805_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cdp1804_device(mconfig, type, tag, owner, clock) { } @@ -439,7 +439,7 @@ cdp1805_device::cdp1805_device(const machine_config &mconfig, device_type type, // cdp1806_device - constructor //------------------------------------------------- -cdp1806_device::cdp1806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1806_device::cdp1806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdp1805_device(mconfig, CDP1806, tag, owner, clock) { } diff --git a/src/devices/cpu/cosmac/cosmac.h b/src/devices/cpu/cosmac/cosmac.h index 2d29a10ce44..1d8e9c55612 100644 --- a/src/devices/cpu/cosmac/cosmac.h +++ b/src/devices/cpu/cosmac/cosmac.h @@ -183,7 +183,7 @@ public: protected: // construction/destruction - cosmac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cosmac_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -457,7 +457,7 @@ class cdp1801_device : public cosmac_device { public: // construction/destruction - cdp1801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -478,10 +478,10 @@ class cdp1802_device : public cosmac_device { public: // construction/destruction - cdp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - cdp1802_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cdp1802_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; @@ -499,10 +499,10 @@ class cdp1804_device : public cdp1802_device { public: // construction/destruction - cdp1804_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1804_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - cdp1804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cdp1804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual cosmac_device::ophandler get_ophandler(uint16_t opcode) const override; virtual bool has_extended_opcodes() override { return true; } @@ -520,10 +520,10 @@ class cdp1805_device : public cdp1804_device { public: // construction/destruction - cdp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - cdp1805_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cdp1805_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; @@ -536,7 +536,7 @@ class cdp1806_device : public cdp1805_device { public: // construction/destruction - cdp1806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/cp1610/cp1610.cpp b/src/devices/cpu/cp1610/cp1610.cpp index 71d41844be8..c73bd969ebb 100644 --- a/src/devices/cpu/cp1610/cp1610.cpp +++ b/src/devices/cpu/cp1610/cp1610.cpp @@ -3390,7 +3390,7 @@ void cp1610_cpu_device::execute_set_input(int irqline, int state) } -cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, CP1610, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 16, -1) , m_intr_state(0) diff --git a/src/devices/cpu/cr16b/cr16b.cpp b/src/devices/cpu/cr16b/cr16b.cpp index c9c6d414caf..89a8cbd15dc 100644 --- a/src/devices/cpu/cr16b/cr16b.cpp +++ b/src/devices/cpu/cr16b/cr16b.cpp @@ -15,7 +15,7 @@ // device type definitions DEFINE_DEVICE_TYPE(CR16B, cr16b_device, "cr16b", "CompactRISC CR16B") -cr16b_device::cr16b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +cr16b_device::cr16b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : cpu_device(mconfig, type, tag, owner, clock) , m_space_config("program", ENDIANNESS_LITTLE, 16, 21, 0, map) , m_regs{0} @@ -32,7 +32,7 @@ cr16b_device::cr16b_device(const machine_config &mconfig, device_type type, cons } // TODO: figure out some actual device types instead -cr16b_device::cr16b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cr16b_device::cr16b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cr16b_device(mconfig, CR16B, tag, owner, clock, address_map_constructor()) { } diff --git a/src/devices/cpu/cr16b/cr16b.h b/src/devices/cpu/cr16b/cr16b.h index a8028b03108..73d5c59787e 100644 --- a/src/devices/cpu/cr16b/cr16b.h +++ b/src/devices/cpu/cr16b/cr16b.h @@ -10,7 +10,7 @@ class cr16b_device : public cpu_device { public: - cr16b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cr16b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { CR16_PC, CR16_ISP, CR16_INTBASE, @@ -23,7 +23,7 @@ public: protected: // construction/destruction - cr16b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map); + cr16b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp index da608c33d65..72ad7fac169 100644 --- a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp +++ b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp @@ -75,7 +75,7 @@ DEFINE_DEVICE_TYPE(CQUESTROT, cquestrot_cpu_device, "cquestrot", "Cube Quest Rot DEFINE_DEVICE_TYPE(CQUESTLIN, cquestlin_cpu_device, "cquestlin", "Cube Quest Line CPU") -cquestsnd_cpu_device::cquestsnd_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cquestsnd_cpu_device::cquestsnd_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, CQUESTSND, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 64, 8, -3) , m_dac_w(*this) @@ -97,7 +97,7 @@ std::unique_ptr cquestsnd_cpu_device::create_disassemble } -cquestrot_cpu_device::cquestrot_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cquestrot_cpu_device::cquestrot_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, CQUESTROT, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 64, 9, -3) , m_linedata_w(*this) @@ -117,7 +117,7 @@ std::unique_ptr cquestrot_cpu_device::create_disassemble } -cquestlin_cpu_device::cquestlin_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cquestlin_cpu_device::cquestlin_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, CQUESTLIN, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 64, 8, -3) , m_linedata_r(*this) diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.h b/src/devices/cpu/cubeqcpu/cubeqcpu.h index 54070a1bd48..5ab672d6c79 100644 --- a/src/devices/cpu/cubeqcpu/cubeqcpu.h +++ b/src/devices/cpu/cubeqcpu/cubeqcpu.h @@ -20,7 +20,7 @@ class cquestsnd_cpu_device : public cpu_device { public: // construction/destruction - cquestsnd_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cquestsnd_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto dac_w() { return m_dac_w.bind(); } @@ -112,7 +112,7 @@ class cquestrot_cpu_device : public cpu_device { public: // construction/destruction - cquestrot_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cquestrot_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto linedata_w() { return m_linedata_w.bind(); } @@ -224,7 +224,7 @@ class cquestlin_cpu_device : public cpu_device { public: // construction/destruction - cquestlin_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cquestlin_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto linedata_r() { return m_linedata_r.bind(); } diff --git a/src/devices/cpu/diablo/diablo1300.cpp b/src/devices/cpu/diablo/diablo1300.cpp index baaf6f8bc47..361016a43a2 100644 --- a/src/devices/cpu/diablo/diablo1300.cpp +++ b/src/devices/cpu/diablo/diablo1300.cpp @@ -86,7 +86,7 @@ DEFINE_DEVICE_TYPE(DIABLO1300, diablo1300_cpu_device, "diablo1300", "DIABLO 1300 // diablo1300_cpu_device - constructor //------------------------------------------------- -diablo1300_cpu_device::diablo1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +diablo1300_cpu_device::diablo1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, DIABLO1300, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 9, -1) , m_data_config("data", ENDIANNESS_LITTLE, 8, 5) diff --git a/src/devices/cpu/diablo/diablo1300.h b/src/devices/cpu/diablo/diablo1300.h index 753d2f7b2b1..fa510664b74 100644 --- a/src/devices/cpu/diablo/diablo1300.h +++ b/src/devices/cpu/diablo/diablo1300.h @@ -20,7 +20,7 @@ class diablo1300_cpu_device : public cpu_device { public: // construction/destruction - diablo1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diablo1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp index 4078389e2bc..75bb5f39ac8 100644 --- a/src/devices/cpu/dsp16/dsp16.cpp +++ b/src/devices/cpu/dsp16/dsp16.cpp @@ -171,7 +171,7 @@ dsp16_device_base::dsp16_device_base( device_type type, char const *tag, device_t *owner, - u32 clock, + const XTAL &clock, u8 yaau_bits, address_map_constructor &&data_map) : cpu_device(mconfig, type, tag, owner, clock) @@ -2075,7 +2075,7 @@ void dsp16_device_base::pio_pdx_write(u16 sel, u16 value) DSP16 SPECIALISATION ***************************************************************************/ -dsp16_device::dsp16_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dsp16_device::dsp16_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dsp16_device_base( mconfig, DSP16, tag, owner, clock, 9, @@ -2107,7 +2107,7 @@ void dsp16_device::data_map(address_map &map) DSP16A SPECIALISATION ***************************************************************************/ -dsp16a_device::dsp16a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dsp16a_device::dsp16a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dsp16_device_base( mconfig, DSP16A, tag, owner, clock, 16, diff --git a/src/devices/cpu/dsp16/dsp16.h b/src/devices/cpu/dsp16/dsp16.h index 3f7ae66dd53..c8c2e4b631a 100644 --- a/src/devices/cpu/dsp16/dsp16.h +++ b/src/devices/cpu/dsp16/dsp16.h @@ -70,7 +70,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock, + const XTAL &clock, u8 yaau_bits, address_map_constructor &&data_map); @@ -342,7 +342,7 @@ class dsp16_device : public dsp16_device_base { public: // construction/destruction - dsp16_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dsp16_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // dsp16_device_base implementation @@ -360,7 +360,7 @@ class dsp16a_device : public dsp16_device_base { public: // construction/destruction - dsp16a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dsp16a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // dsp16_device_base implementation diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp index 9ef3aef63c9..e4a4316fdb0 100644 --- a/src/devices/cpu/dsp32/dsp32.cpp +++ b/src/devices/cpu/dsp32/dsp32.cpp @@ -142,7 +142,7 @@ DEFINE_DEVICE_TYPE(DSP32C, dsp32c_device, "dsp32c", "AT&T DSP32C") // dsp32c_device - constructor //------------------------------------------------- -dsp32c_device::dsp32c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dsp32c_device::dsp32c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, DSP32C, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 32, 24), m_pin(0), diff --git a/src/devices/cpu/dsp32/dsp32.h b/src/devices/cpu/dsp32/dsp32.h index 90ede0181fa..babec516eef 100644 --- a/src/devices/cpu/dsp32/dsp32.h +++ b/src/devices/cpu/dsp32/dsp32.h @@ -36,7 +36,7 @@ class dsp32c_device : public cpu_device { public: // construction/destruction - dsp32c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dsp32c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_cb() { return m_output_pins_changed.bind(); } diff --git a/src/devices/cpu/dsp56000/dsp56000.cpp b/src/devices/cpu/dsp56000/dsp56000.cpp index eed944bdc0a..0bb28ef0b40 100644 --- a/src/devices/cpu/dsp56000/dsp56000.cpp +++ b/src/devices/cpu/dsp56000/dsp56000.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(DSP56000, dsp56000_device, "dsp56000", "Motorola DSP56000") DEFINE_DEVICE_TYPE(DSP56001, dsp56001_device, "dsp56001", "Motorola DSP56001") -dsp56000_device_base::dsp56000_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +dsp56000_device_base::dsp56000_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_p_config("p", ENDIANNESS_BIG, 32, 16, -2) , m_x_config("x", ENDIANNESS_BIG, 32, 16, -2) @@ -33,12 +33,12 @@ dsp56000_device_base::dsp56000_device_base(machine_config const &mconfig, device { } -dsp56000_device::dsp56000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dsp56000_device::dsp56000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dsp56000_device_base(mconfig, DSP56000, tag, owner, clock) { } -dsp56001_device::dsp56001_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dsp56001_device::dsp56001_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dsp56000_device_base(mconfig, DSP56001, tag, owner, clock) { } diff --git a/src/devices/cpu/dsp56000/dsp56000.h b/src/devices/cpu/dsp56000/dsp56000.h index 0a47b2fe078..bd813e2021f 100644 --- a/src/devices/cpu/dsp56000/dsp56000.h +++ b/src/devices/cpu/dsp56000/dsp56000.h @@ -9,7 +9,7 @@ class dsp56000_device_base : public cpu_device { protected: - dsp56000_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + dsp56000_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t overrides virtual void device_start() override; @@ -44,13 +44,13 @@ protected: class dsp56000_device : public dsp56000_device_base { public: - dsp56000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dsp56000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class dsp56001_device : public dsp56000_device_base { public: - dsp56001_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dsp56001_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(DSP56000, dsp56000_device) diff --git a/src/devices/cpu/dsp56156/dsp56156.cpp b/src/devices/cpu/dsp56156/dsp56156.cpp index f8685d080ae..4a6e724ea2b 100644 --- a/src/devices/cpu/dsp56156/dsp56156.cpp +++ b/src/devices/cpu/dsp56156/dsp56156.cpp @@ -122,7 +122,7 @@ void dsp56156_device::dsp56156_x_data_map(address_map &map) } -dsp56156_device::dsp56156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dsp56156_device::dsp56156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, DSP56156, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, -1, address_map_constructor(FUNC(dsp56156_device::dsp56156_program_map), this)) , m_data_config("data", ENDIANNESS_LITTLE, 16, 16, -1, address_map_constructor(FUNC(dsp56156_device::dsp56156_x_data_map), this)) diff --git a/src/devices/cpu/dsp56156/dsp56156.h b/src/devices/cpu/dsp56156/dsp56156.h index 4317fa249f5..7326b809e97 100644 --- a/src/devices/cpu/dsp56156/dsp56156.h +++ b/src/devices/cpu/dsp56156/dsp56156.h @@ -203,7 +203,7 @@ struct dsp56156_core class dsp56156_device : public cpu_device { public: - dsp56156_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); + dsp56156_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &_clock); uint16_t peripheral_register_r(offs_t offset); void peripheral_register_w(offs_t offset, uint16_t data); diff --git a/src/devices/cpu/dspp/dspp.cpp b/src/devices/cpu/dspp/dspp.cpp index 70bc923a67e..995bdd27cf2 100644 --- a/src/devices/cpu/dspp/dspp.cpp +++ b/src/devices/cpu/dspp/dspp.cpp @@ -85,13 +85,13 @@ DEFINE_DEVICE_TYPE(DSPP, dspp_device, "dspp", "3DO DSPP") // dspp_device - constructor //------------------------------------------------- -dspp_device::dspp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dspp_device::dspp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dspp_device(mconfig, DSPP, tag, owner, clock, address_map_constructor(FUNC(dspp_device::code_map), this), address_map_constructor(FUNC(dspp_device::data_map), this)) { } -dspp_device::dspp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor code_map_ctor, address_map_constructor data_map_ctor) +dspp_device::dspp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor code_map_ctor, address_map_constructor data_map_ctor) : cpu_device(mconfig, type, tag, owner, clock), m_int_handler(*this), m_dma_read_handler(*this), diff --git a/src/devices/cpu/dspp/dspp.h b/src/devices/cpu/dspp/dspp.h index 68492fb7f40..75a502501c9 100644 --- a/src/devices/cpu/dspp/dspp.h +++ b/src/devices/cpu/dspp/dspp.h @@ -31,9 +31,9 @@ class dspp_device : public cpu_device friend class dspp_frontend; public: // Construction/destruction - dspp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor code_map_ctor, + dspp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor code_map_ctor, address_map_constructor data_map_ctor); - dspp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dspp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Static configuration helpers auto int_handler() { return m_int_handler.bind(); } @@ -389,5 +389,6 @@ public: // TODO // device type definition DECLARE_DEVICE_TYPE(DSPP, dspp_device); +#include "dsppfe.h" #endif // MAME_CPU_DSPP_DSPP_H diff --git a/src/devices/cpu/e0c6200/e0c6200.cpp b/src/devices/cpu/e0c6200/e0c6200.cpp index 303ad5d5754..fb56dd3babb 100644 --- a/src/devices/cpu/e0c6200/e0c6200.cpp +++ b/src/devices/cpu/e0c6200/e0c6200.cpp @@ -24,7 +24,7 @@ // construction/destruction -e0c6200_cpu_device::e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor program, address_map_constructor data) +e0c6200_cpu_device::e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 13, -1, program) , m_data_config("data", ENDIANNESS_BIG, 8, 12, 0, data), m_program(nullptr), m_data(nullptr), m_op(0), m_prev_op(0), m_irq_vector(0), m_irq_id(0), m_possible_irq(false), m_halt(false), diff --git a/src/devices/cpu/e0c6200/e0c6200.h b/src/devices/cpu/e0c6200/e0c6200.h index 5222983e09b..62da9ec213c 100644 --- a/src/devices/cpu/e0c6200/e0c6200.h +++ b/src/devices/cpu/e0c6200/e0c6200.h @@ -14,7 +14,7 @@ class e0c6200_cpu_device : public cpu_device { public: // construction/destruction - e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor program, address_map_constructor data); + e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program, address_map_constructor data); protected: // device-level overrides diff --git a/src/devices/cpu/e0c6200/e0c6s46.cpp b/src/devices/cpu/e0c6200/e0c6s46.cpp index 5e30570ae76..578edfa481b 100644 --- a/src/devices/cpu/e0c6200/e0c6s46.cpp +++ b/src/devices/cpu/e0c6200/e0c6s46.cpp @@ -48,7 +48,7 @@ void e0c6s46_device::e0c6s46_data(address_map &map) // device definitions -e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : e0c6200_cpu_device(mconfig, E0C6S46, tag, owner, clock, address_map_constructor(FUNC(e0c6s46_device::e0c6s46_program), this), address_map_constructor(FUNC(e0c6s46_device::e0c6s46_data), this)) , m_vram1(*this, "vram1") , m_vram2(*this, "vram2") diff --git a/src/devices/cpu/e0c6200/e0c6s46.h b/src/devices/cpu/e0c6200/e0c6s46.h index 0fb7a67e44c..658b69208f8 100644 --- a/src/devices/cpu/e0c6200/e0c6s46.h +++ b/src/devices/cpu/e0c6200/e0c6s46.h @@ -51,7 +51,7 @@ class e0c6s46_device : public e0c6200_cpu_device public: typedef device_delegate pixel_update_delegate; - e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // 5 4-bit R output ports template auto write_r() { return m_write_r[Port].bind(); } diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp index 1331bb1a890..8b3819be1cc 100644 --- a/src/devices/cpu/e132xs/e132xs.cpp +++ b/src/devices/cpu/e132xs/e132xs.cpp @@ -201,7 +201,7 @@ void hyperstone_device::e132_16k_iram_map(address_map &map) // hyperstone_device - constructor //------------------------------------------------- -hyperstone_device::hyperstone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, +hyperstone_device::hyperstone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, uint32_t prg_data_width, uint32_t io_data_width, address_map_constructor internal_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, prg_data_width, 32, 0, internal_map) @@ -237,7 +237,7 @@ hyperstone_device::~hyperstone_device() // e116t_device - constructor //------------------------------------------------- -e116t_device::e116t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e116t_device::e116t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E116T, 16, 16, address_map_constructor(FUNC(e116t_device::e116_4k_iram_map), this)) { } @@ -247,7 +247,7 @@ e116t_device::e116t_device(const machine_config &mconfig, const char *tag, devic // e116xt_device - constructor //------------------------------------------------- -e116xt_device::e116xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e116xt_device::e116xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E116XT, 16, 16, address_map_constructor(FUNC(e116t_device::e116_8k_iram_map), this)) { } @@ -257,7 +257,7 @@ e116xt_device::e116xt_device(const machine_config &mconfig, const char *tag, dev // e116xs_device - constructor //------------------------------------------------- -e116xs_device::e116xs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e116xs_device::e116xs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E116XS, 16, 16, address_map_constructor(FUNC(e116xs_device::e116_16k_iram_map), this)) { } @@ -267,7 +267,7 @@ e116xs_device::e116xs_device(const machine_config &mconfig, const char *tag, dev // e116xsr_device - constructor //------------------------------------------------- -e116xsr_device::e116xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e116xsr_device::e116xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E116XSR, 16, 16, address_map_constructor(FUNC(e116xsr_device::e116_16k_iram_map), this)) { } @@ -277,7 +277,7 @@ e116xsr_device::e116xsr_device(const machine_config &mconfig, const char *tag, d // e132n_device - constructor //------------------------------------------------- -e132n_device::e132n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e132n_device::e132n_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E132N, 32, 32, address_map_constructor(FUNC(e132n_device::e132_4k_iram_map), this)) { } @@ -287,7 +287,7 @@ e132n_device::e132n_device(const machine_config &mconfig, const char *tag, devic // e132t_device - constructor //------------------------------------------------- -e132t_device::e132t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e132t_device::e132t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E132T, 32, 32, address_map_constructor(FUNC(e132t_device::e132_4k_iram_map), this)) { } @@ -297,7 +297,7 @@ e132t_device::e132t_device(const machine_config &mconfig, const char *tag, devic // e132xn_device - constructor //------------------------------------------------- -e132xn_device::e132xn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e132xn_device::e132xn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E132XN, 32, 32, address_map_constructor(FUNC(e132xn_device::e132_8k_iram_map), this)) { } @@ -307,7 +307,7 @@ e132xn_device::e132xn_device(const machine_config &mconfig, const char *tag, dev // e132xt_device - constructor //------------------------------------------------- -e132xt_device::e132xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e132xt_device::e132xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E132XT, 32, 32, address_map_constructor(FUNC(e132xt_device::e132_8k_iram_map), this)) { } @@ -317,7 +317,7 @@ e132xt_device::e132xt_device(const machine_config &mconfig, const char *tag, dev // e132xs_device - constructor //------------------------------------------------- -e132xs_device::e132xs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e132xs_device::e132xs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E132XS, 32, 32, address_map_constructor(FUNC(e132xs_device::e132_16k_iram_map), this)) { } @@ -327,7 +327,7 @@ e132xs_device::e132xs_device(const machine_config &mconfig, const char *tag, dev // e132xsr_device - constructor //------------------------------------------------- -e132xsr_device::e132xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e132xsr_device::e132xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, E132XSR, 32, 32, address_map_constructor(FUNC(e132xsr_device::e132_16k_iram_map), this)) { } @@ -337,7 +337,7 @@ e132xsr_device::e132xsr_device(const machine_config &mconfig, const char *tag, d // gms30c2116_device - constructor //------------------------------------------------- -gms30c2116_device::gms30c2116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gms30c2116_device::gms30c2116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, GMS30C2116, 16, 16, address_map_constructor(FUNC(gms30c2116_device::e116_4k_iram_map), this)) { } @@ -347,7 +347,7 @@ gms30c2116_device::gms30c2116_device(const machine_config &mconfig, const char * // gms30c2132_device - constructor //------------------------------------------------- -gms30c2132_device::gms30c2132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gms30c2132_device::gms30c2132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, GMS30C2132, 32, 32, address_map_constructor(FUNC(gms30c2132_device::e132_4k_iram_map), this)) { } @@ -357,7 +357,7 @@ gms30c2132_device::gms30c2132_device(const machine_config &mconfig, const char * // gms30c2216_device - constructor //------------------------------------------------- -gms30c2216_device::gms30c2216_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gms30c2216_device::gms30c2216_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, GMS30C2216, 16, 16, address_map_constructor(FUNC(gms30c2216_device::e116_8k_iram_map), this)) { } @@ -367,7 +367,7 @@ gms30c2216_device::gms30c2216_device(const machine_config &mconfig, const char * // gms30c2232_device - constructor //------------------------------------------------- -gms30c2232_device::gms30c2232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gms30c2232_device::gms30c2232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hyperstone_device(mconfig, tag, owner, clock, GMS30C2232, 32, 32, address_map_constructor(FUNC(gms30c2232_device::e132_8k_iram_map), this)) { } diff --git a/src/devices/cpu/e132xs/e132xs.h b/src/devices/cpu/e132xs/e132xs.h index 51f9c5cc3c1..bb8d6b066b9 100644 --- a/src/devices/cpu/e132xs/e132xs.h +++ b/src/devices/cpu/e132xs/e132xs.h @@ -273,7 +273,7 @@ protected: }; // construction/destruction - hyperstone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + hyperstone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, uint32_t prg_data_width, uint32_t io_data_width, address_map_constructor internal_map); void init(int scale_mask); @@ -617,7 +617,7 @@ class e116t_device : public hyperstone_device { public: // construction/destruction - e116t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e116t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -630,7 +630,7 @@ class e116xt_device : public hyperstone_device { public: // construction/destruction - e116xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e116xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -643,7 +643,7 @@ class e116xs_device : public hyperstone_device { public: // construction/destruction - e116xs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e116xs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -656,7 +656,7 @@ class e116xsr_device : public hyperstone_device { public: // construction/destruction - e116xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e116xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -669,7 +669,7 @@ class e132n_device : public hyperstone_device { public: // construction/destruction - e132n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e132n_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -682,7 +682,7 @@ class e132t_device : public hyperstone_device { public: // construction/destruction - e132t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e132t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -695,7 +695,7 @@ class e132xn_device : public hyperstone_device { public: // construction/destruction - e132xn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e132xn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -708,7 +708,7 @@ class e132xt_device : public hyperstone_device { public: // construction/destruction - e132xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e132xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -721,7 +721,7 @@ class e132xs_device : public hyperstone_device { public: // construction/destruction - e132xs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e132xs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -734,7 +734,7 @@ class e132xsr_device : public hyperstone_device { public: // construction/destruction - e132xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e132xsr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -747,7 +747,7 @@ class gms30c2116_device : public hyperstone_device { public: // construction/destruction - gms30c2116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gms30c2116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -760,7 +760,7 @@ class gms30c2132_device : public hyperstone_device { public: // construction/destruction - gms30c2132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gms30c2132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -773,7 +773,7 @@ class gms30c2216_device : public hyperstone_device { public: // construction/destruction - gms30c2216_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gms30c2216_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -786,7 +786,7 @@ class gms30c2232_device : public hyperstone_device { public: // construction/destruction - gms30c2232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gms30c2232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/cpu/es5510/es5510.cpp b/src/devices/cpu/es5510/es5510.cpp index 6614c03ab52..2520fcf729d 100644 --- a/src/devices/cpu/es5510/es5510.cpp +++ b/src/devices/cpu/es5510/es5510.cpp @@ -134,7 +134,7 @@ inline static int32_t asl(int32_t value, int shift, uint8_t &flags) { } // Initialize ESP to mostly zeroed, configured for 64k samples of delay line memory, running (not halted) -es5510_device::es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +es5510_device::es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ES5510, tag, owner, clock) , icount(0) , halt_asserted(false) diff --git a/src/devices/cpu/es5510/es5510.h b/src/devices/cpu/es5510/es5510.h index 9f8d10035ca..7f046416205 100644 --- a/src/devices/cpu/es5510/es5510.h +++ b/src/devices/cpu/es5510/es5510.h @@ -19,7 +19,7 @@ public: static constexpr uint32_t DRAM_MASK = (DRAM_SIZE-1); static constexpr feature_type imperfect_features() { return feature::SOUND; } - es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t host_r(address_space &space, offs_t offset); void host_w(offs_t offset, uint8_t data); diff --git a/src/devices/cpu/esrip/esrip.cpp b/src/devices/cpu/esrip/esrip.cpp index 40457212abb..8372be41eda 100644 --- a/src/devices/cpu/esrip/esrip.cpp +++ b/src/devices/cpu/esrip/esrip.cpp @@ -1667,7 +1667,7 @@ DEFINE_DEVICE_TYPE(ESRIP, esrip_device, "esrip", "Entertainment Sciences RIP") // esrip_device - constructor //------------------------------------------------- -esrip_device::esrip_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +esrip_device::esrip_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ESRIP, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 64, 9, -3) , m_fdt_r(*this) diff --git a/src/devices/cpu/esrip/esrip.h b/src/devices/cpu/esrip/esrip.h index f58b2d41a97..64b041549bd 100644 --- a/src/devices/cpu/esrip/esrip.h +++ b/src/devices/cpu/esrip/esrip.h @@ -32,7 +32,7 @@ public: typedef device_delegate draw_delegate; // construction/destruction - esrip_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + esrip_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void set_lbrm_prom_region(const char *name) { m_lbrm_prom = name; } diff --git a/src/devices/cpu/f2mc16/f2mc16.cpp b/src/devices/cpu/f2mc16/f2mc16.cpp index de4098685c7..804c7a4482a 100644 --- a/src/devices/cpu/f2mc16/f2mc16.cpp +++ b/src/devices/cpu/f2mc16/f2mc16.cpp @@ -31,7 +31,7 @@ std::unique_ptr f2mc16_device::create_disassembler() return std::make_unique(); } -f2mc16_device::f2mc16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +f2mc16_device::f2mc16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0) , m_program(nullptr) @@ -43,7 +43,7 @@ f2mc16_device::f2mc16_device(const machine_config &mconfig, device_type type, co m_prefix_valid = false; } -f2mc16_device::f2mc16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +f2mc16_device::f2mc16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f2mc16_device(mconfig, F2MC16, tag, owner, clock) { } diff --git a/src/devices/cpu/f2mc16/f2mc16.h b/src/devices/cpu/f2mc16/f2mc16.h index fc1ffc3aa55..766af666301 100644 --- a/src/devices/cpu/f2mc16/f2mc16.h +++ b/src/devices/cpu/f2mc16/f2mc16.h @@ -38,10 +38,10 @@ public: }; // construction/destruction - f2mc16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + f2mc16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - f2mc16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + f2mc16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/f2mc16/mb9061x.cpp b/src/devices/cpu/f2mc16/mb9061x.cpp index e8940162329..11b41da4e05 100644 --- a/src/devices/cpu/f2mc16/mb9061x.cpp +++ b/src/devices/cpu/f2mc16/mb9061x.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(MB90641A, mb90641_device, "mb90641a", "Fujitsu MB90641A") //------------------------------------------------- // mb9061x_device - constructor //------------------------------------------------- -mb9061x_device::mb9061x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map) : +mb9061x_device::mb9061x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : f2mc16_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, 24, 0, internal_map) { @@ -82,12 +82,12 @@ void mb90610_device::mb90610_map(address_map &map) map(0x0100, 0x10ff).ram(); // 4K of internal RAM from 0x100 to 0x1100 } -mb90610_device::mb90610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb90610_device::mb90610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb90610_device(mconfig, MB90610A, tag, owner, clock) { } -mb90610_device::mb90610_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mb90610_device::mb90610_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mb9061x_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(mb90610_device::mb90610_map), this)) { } @@ -412,12 +412,12 @@ void mb90611_device::mb90611_map(address_map &map) map(0x0100, 0x04ff).ram(); // 1K of internal RAM from 0x100 to 0x500 } -mb90611_device::mb90611_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb90611_device::mb90611_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb90611_device(mconfig, MB90611A, tag, owner, clock) { } -mb90611_device::mb90611_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mb90611_device::mb90611_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mb9061x_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(mb90611_device::mb90611_map), this)) { } @@ -431,12 +431,12 @@ void mb90641_device::mb90641_map(address_map &map) map(0x0100, 0x08ff).ram(); // 2K of internal RAM } -mb90641_device::mb90641_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb90641_device::mb90641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb90641_device(mconfig, MB90641A, tag, owner, clock) { } -mb90641_device::mb90641_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mb90641_device::mb90641_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mb9061x_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(mb90641_device::mb90641_map), this)) { } diff --git a/src/devices/cpu/f2mc16/mb9061x.h b/src/devices/cpu/f2mc16/mb9061x.h index c09bdef1b96..29257e46a53 100644 --- a/src/devices/cpu/f2mc16/mb9061x.h +++ b/src/devices/cpu/f2mc16/mb9061x.h @@ -38,7 +38,7 @@ public: protected: // construction/destruction - mb9061x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map); + mb9061x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); // device-level overrides virtual void device_start() override; @@ -81,31 +81,31 @@ private: class mb90610_device : public mb9061x_device { public: - mb90610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb90610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mb90610_map(address_map &map); protected: - mb90610_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mb90610_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; class mb90611_device : public mb9061x_device { public: - mb90611_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb90611_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mb90611_map(address_map &map); protected: - mb90611_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mb90611_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; class mb90641_device : public mb9061x_device { public: - mb90641_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb90641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mb90641_map(address_map &map); protected: - mb90641_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mb90641_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(MB90610A, mb90610_device) diff --git a/src/devices/cpu/f8/f8.cpp b/src/devices/cpu/f8/f8.cpp index b7168380dad..d403dec600e 100644 --- a/src/devices/cpu/f8/f8.cpp +++ b/src/devices/cpu/f8/f8.cpp @@ -63,7 +63,7 @@ static constexpr int cL = 6; DEFINE_DEVICE_TYPE(F8, f8_cpu_device, "f8", "Fairchild F8") -f8_cpu_device::f8_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f8_cpu_device::f8_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, F8, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, 8, 16, 0), m_regs_config("register", ENDIANNESS_BIG, 8, 6, 0, address_map_constructor(FUNC(f8_cpu_device::regs_map), this)), diff --git a/src/devices/cpu/f8/f8.h b/src/devices/cpu/f8/f8.h index fd823acb705..3c14f0fb5bd 100644 --- a/src/devices/cpu/f8/f8.h +++ b/src/devices/cpu/f8/f8.h @@ -18,7 +18,7 @@ class f8_cpu_device : public cpu_device { public: // construction/destruction - f8_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + f8_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // used by F3850 systems that override the normal zero reset address auto romc08_callback() { return m_romc08_callback.bind(); } diff --git a/src/devices/cpu/fr/fr.cpp b/src/devices/cpu/fr/fr.cpp index 51ae7313780..964a7689bda 100644 --- a/src/devices/cpu/fr/fr.cpp +++ b/src/devices/cpu/fr/fr.cpp @@ -15,7 +15,7 @@ // device type definition DEFINE_DEVICE_TYPE(MB91F155A, mb91f155a_device, "mb91f155a", "Fujitsu MB91F155A") -fr_cpu_device::fr_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int addrbits, address_map_constructor map) +fr_cpu_device::fr_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, address_map_constructor map) : cpu_device(mconfig, type, tag, owner, clock) , m_space_config("program", ENDIANNESS_BIG, 32, addrbits, 0, map) , m_regs{0} @@ -28,7 +28,7 @@ fr_cpu_device::fr_cpu_device(const machine_config &mconfig, device_type type, co { } -mb91f155a_device::mb91f155a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb91f155a_device::mb91f155a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fr_cpu_device(mconfig, MB91F155A, tag, owner, clock, 24, address_map_constructor(FUNC(mb91f155a_device::internal_map), this)) { } diff --git a/src/devices/cpu/fr/fr.h b/src/devices/cpu/fr/fr.h index 60e6eb8469f..e148109758b 100644 --- a/src/devices/cpu/fr/fr.h +++ b/src/devices/cpu/fr/fr.h @@ -21,7 +21,7 @@ public: protected: // construction/destruction - fr_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int addrbits, address_map_constructor map); + fr_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, address_map_constructor map); // device-level overrides virtual void device_start() override; @@ -60,7 +60,7 @@ class mb91f155a_device : public fr_cpu_device { public: // device type constructor - mb91f155a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mb91f155a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp index 7476fb8cde0..747863b8a42 100644 --- a/src/devices/cpu/g65816/g65816.cpp +++ b/src/devices/cpu/g65816/g65816.cpp @@ -113,18 +113,18 @@ enum }; -g65816_device::g65816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +g65816_device::g65816_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : g65816_device(mconfig, G65816, tag, owner, clock, CPU_TYPE_W65C816, address_map_constructor()) { } -g65802_device::g65802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +g65802_device::g65802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : g65816_device(mconfig, G65802, tag, owner, clock, CPU_TYPE_W65C802, address_map_constructor()) { } -g65816_device::g65816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpu_type, address_map_constructor internal) +g65816_device::g65816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cpu_type, address_map_constructor internal) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, (cpu_type == CPU_TYPE_W65C802) ? 16 : 24, 0, internal) , m_data_config("data", ENDIANNESS_LITTLE, 8, (cpu_type == CPU_TYPE_W65C802) ? 16 : 24, 0, internal) @@ -168,7 +168,7 @@ void _5a22_device::_5a22_map(address_map &map) } -_5a22_device::_5a22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +_5a22_device::_5a22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : g65816_device(mconfig, _5A22, tag, owner, clock, CPU_TYPE_5A22, address_map_constructor(FUNC(_5a22_device::_5a22_map), this)) { } diff --git a/src/devices/cpu/g65816/g65816.h b/src/devices/cpu/g65816/g65816.h index b21845e76ec..37a750806fd 100644 --- a/src/devices/cpu/g65816/g65816.h +++ b/src/devices/cpu/g65816/g65816.h @@ -54,7 +54,7 @@ public: }; // construction/destruction - g65816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + g65816_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto wdm_handler() { return m_wdm_w.bind(); } @@ -68,7 +68,7 @@ public: }; protected: - g65816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpu_type, address_map_constructor internal); + g65816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cpu_type, address_map_constructor internal); // device-level overrides virtual void device_start() override; @@ -1543,14 +1543,14 @@ protected: class g65802_device : public g65816_device { public: - g65802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + g65802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class _5a22_device : public g65816_device { public: - _5a22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + _5a22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void wrmpya_w(uint8_t data); void wrmpyb_w(uint8_t data); diff --git a/src/devices/cpu/gigatron/gigatron.cpp b/src/devices/cpu/gigatron/gigatron.cpp index 5729a33633e..b26e7da86b8 100644 --- a/src/devices/cpu/gigatron/gigatron.cpp +++ b/src/devices/cpu/gigatron/gigatron.cpp @@ -339,7 +339,7 @@ void gigatron_cpu_device::execute_set_input(int irqline, int state) #endif } -gigatron_cpu_device::gigatron_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gigatron_cpu_device::gigatron_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, GTRON, tag, owner, clock) , m_ramMask(0xffff) , m_romMask(0xffff) diff --git a/src/devices/cpu/gigatron/gigatron.h b/src/devices/cpu/gigatron/gigatron.h index b224b4ab280..1d019106fec 100644 --- a/src/devices/cpu/gigatron/gigatron.h +++ b/src/devices/cpu/gigatron/gigatron.h @@ -28,7 +28,7 @@ class gigatron_cpu_device : public cpu_device { public: // construction/destruction - gigatron_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gigatron_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto outx_cb() { return m_outx_cb.bind(); } auto out_cb() { return m_out_cb.bind(); } auto ir_cb() { return m_ir_cb.bind(); } diff --git a/src/devices/cpu/h16/hd641016.cpp b/src/devices/cpu/h16/hd641016.cpp index 9bfaa6a5cd4..c4bbe1f540a 100644 --- a/src/devices/cpu/h16/hd641016.cpp +++ b/src/devices/cpu/h16/hd641016.cpp @@ -15,7 +15,7 @@ // device type definition DEFINE_DEVICE_TYPE(HD641016, hd641016_device, "hd641016", "Hitachi HD641016") -hd641016_device::hd641016_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd641016_device::hd641016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, HD641016, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 24, 0) , m_data_config("data", ENDIANNESS_BIG, 32, 10, 0, address_map_constructor(FUNC(hd641016_device::ram_map), this)) diff --git a/src/devices/cpu/h16/hd641016.h b/src/devices/cpu/h16/hd641016.h index 1c93f5a2ff3..24d29165730 100644 --- a/src/devices/cpu/h16/hd641016.h +++ b/src/devices/cpu/h16/hd641016.h @@ -85,7 +85,7 @@ public: }; // device type constructor - hd641016_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd641016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp index 27c042ab299..766d0ed12ce 100644 --- a/src/devices/cpu/h6280/h6280.cpp +++ b/src/devices/cpu/h6280/h6280.cpp @@ -167,7 +167,7 @@ DEFINE_DEVICE_TYPE(H6280, h6280_device, "h6280", "Hudson Soft HuC6280") // h6280_device - constructor //------------------------------------------------- -h6280_device::h6280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +h6280_device::h6280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, H6280, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , m_program_config("program", ENDIANNESS_LITTLE, 8, 21, 0, 16, 0, address_map_constructor(FUNC(h6280_device::internal_map), this)) diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h index 22d3ac06ce6..1b5f386ea12 100644 --- a/src/devices/cpu/h6280/h6280.h +++ b/src/devices/cpu/h6280/h6280.h @@ -32,7 +32,7 @@ class h6280_device : public cpu_device, public device_mixer_interface { public: // construction/destruction - h6280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h6280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interfaces void set_irq_line(int irqline, int state); diff --git a/src/devices/cpu/h8/gt913.cpp b/src/devices/cpu/h8/gt913.cpp index c56c8ed94f3..ef9edb1bb8b 100644 --- a/src/devices/cpu/h8/gt913.cpp +++ b/src/devices/cpu/h8/gt913.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(GT913, gt913_device, "gt913", "Casio GT913F") -gt913_device::gt913_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gt913_device::gt913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_device(mconfig, GT913, tag, owner, clock, address_map_constructor(FUNC(gt913_device::map), this)), device_mixer_interface(mconfig, *this, 2), m_rom(*this, DEVICE_SELF), @@ -104,7 +104,7 @@ void gt913_device::device_add_mconfig(machine_config &config) m_sound->add_route(0, *this, 1.0, AUTO_ALLOC_INPUT, 0); m_sound->add_route(1, *this, 1.0, AUTO_ALLOC_INPUT, 1); - GT913_KBD_HLE(config, m_kbd, 0); + GT913_KBD_HLE(config, m_kbd); m_kbd->irq_cb().set([this] (int val) { if (val) diff --git a/src/devices/cpu/h8/gt913.h b/src/devices/cpu/h8/gt913.h index 4ba89661abb..07ea286a5aa 100644 --- a/src/devices/cpu/h8/gt913.h +++ b/src/devices/cpu/h8/gt913.h @@ -23,7 +23,7 @@ class gt913_device : public h8_device, public device_mixer_interface { public: - gt913_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gt913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp index cd40624586c..dc5e394bcc1 100644 --- a/src/devices/cpu/h8/h8.cpp +++ b/src/devices/cpu/h8/h8.cpp @@ -15,7 +15,7 @@ #include "h8_dtc.h" #include "h8d.h" -h8_device::h8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate) : +h8_device::h8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate) : cpu_device(mconfig, type, tag, owner, clock), program_config("program", ENDIANNESS_BIG, 16, 16, 0, map_delegate), io_config("io", ENDIANNESS_BIG, 16, 16, -1), PPC(0), NPC(0), PC(0), PIR(0), EXR(0), CCR(0), MAC(0), MACF(0), diff --git a/src/devices/cpu/h8/h8.h b/src/devices/cpu/h8/h8.h index 78ee9425142..7f744ad3709 100644 --- a/src/devices/cpu/h8/h8.h +++ b/src/devices/cpu/h8/h8.h @@ -87,7 +87,7 @@ protected: EXR_I = 0x07 }; - h8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate); + h8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate); // device-level overrides virtual void device_config_complete() override; diff --git a/src/devices/cpu/h8/h83002.cpp b/src/devices/cpu/h8/h83002.cpp index 664134669c9..beeb917f05b 100644 --- a/src/devices/cpu/h8/h83002.cpp +++ b/src/devices/cpu/h8/h83002.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(H83002, h83002_device, "h83002", "Hitachi H8/3002") -h83002_device::h83002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83002_device::h83002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8h_device(mconfig, H83002, tag, owner, clock, address_map_constructor(FUNC(h83002_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), diff --git a/src/devices/cpu/h8/h83002.h b/src/devices/cpu/h8/h83002.h index 94c1d603230..dce30bd0b3d 100644 --- a/src/devices/cpu/h8/h83002.h +++ b/src/devices/cpu/h8/h83002.h @@ -27,7 +27,7 @@ class h83002_device : public h8h_device { public: - h83002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto tend0() { return tend0_cb.bind(); } auto tend1() { return tend1_cb.bind(); } diff --git a/src/devices/cpu/h8/h83003.cpp b/src/devices/cpu/h8/h83003.cpp index 39829d5de12..31e60831bce 100644 --- a/src/devices/cpu/h8/h83003.cpp +++ b/src/devices/cpu/h8/h83003.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(H83003, h83003_device, "h83003", "Hitachi H8/3003") -h83003_device::h83003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83003_device::h83003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8h_device(mconfig, H83003, tag, owner, clock, address_map_constructor(FUNC(h83003_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), diff --git a/src/devices/cpu/h8/h83003.h b/src/devices/cpu/h8/h83003.h index 6c4f7cfaced..b2fc17a7eb6 100644 --- a/src/devices/cpu/h8/h83003.h +++ b/src/devices/cpu/h8/h83003.h @@ -27,7 +27,7 @@ class h83003_device : public h8h_device { public: - h83003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto tend0() { return tend0_cb.bind(); } auto tend1() { return tend1_cb.bind(); } diff --git a/src/devices/cpu/h8/h83006.cpp b/src/devices/cpu/h8/h83006.cpp index d19937e93dc..cb562bfbb87 100644 --- a/src/devices/cpu/h8/h83006.cpp +++ b/src/devices/cpu/h8/h83006.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(H83006, h83006_device, "h83006", "Hitachi H8/3006") DEFINE_DEVICE_TYPE(H83007, h83007_device, "h83007", "Hitachi H8/3007") -h83006_device::h83006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) : +h83006_device::h83006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start) : h8h_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h83006_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -35,13 +35,13 @@ h83006_device::h83006_device(const machine_config &mconfig, device_type type, co { } -h83006_device::h83006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83006_device::h83006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83006_device(mconfig, H83006, tag, owner, clock, 0xff720) { } -h83007_device::h83007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83007_device::h83007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83006_device(mconfig, H83007, tag, owner, clock, 0xfef20) { } diff --git a/src/devices/cpu/h8/h83006.h b/src/devices/cpu/h8/h83006.h index 083b91ea664..65fdc9fe211 100644 --- a/src/devices/cpu/h8/h83006.h +++ b/src/devices/cpu/h8/h83006.h @@ -27,7 +27,7 @@ class h83006_device : public h8h_device { public: - h83006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } @@ -36,7 +36,7 @@ public: void syscr_w(uint8_t data); protected: - h83006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); + h83006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start); required_device intc; required_device adc; @@ -79,7 +79,7 @@ protected: class h83007_device : public h83006_device { public: - h83007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H83006, h83006_device) diff --git a/src/devices/cpu/h8/h83008.cpp b/src/devices/cpu/h8/h83008.cpp index 3db7c5a71aa..2f515c22192 100644 --- a/src/devices/cpu/h8/h83008.cpp +++ b/src/devices/cpu/h8/h83008.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(H83008, h83008_device, "h83008", "Hitachi H8/3008") -h83008_device::h83008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83008_device::h83008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8h_device(mconfig, H83008, tag, owner, clock, address_map_constructor(FUNC(h83008_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), diff --git a/src/devices/cpu/h8/h83008.h b/src/devices/cpu/h8/h83008.h index bb65adfcc9d..62858dfd537 100644 --- a/src/devices/cpu/h8/h83008.h +++ b/src/devices/cpu/h8/h83008.h @@ -27,7 +27,7 @@ class h83008_device : public h8h_device { public: - h83008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } diff --git a/src/devices/cpu/h8/h83032.cpp b/src/devices/cpu/h8/h83032.cpp index f1abc18b912..613606440b7 100644 --- a/src/devices/cpu/h8/h83032.cpp +++ b/src/devices/cpu/h8/h83032.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(H83032, h83032_device, "h83032", "Hitachi H8/3032") DEFINE_DEVICE_TYPE(H83031, h83031_device, "h83031", "Hitachi H8/3031") DEFINE_DEVICE_TYPE(H83030, h83030_device, "h83030", "Hitachi H8/3030") -h83032_device::h83032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) : +h83032_device::h83032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start) : h8h_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h83032_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -36,17 +36,17 @@ h83032_device::h83032_device(const machine_config &mconfig, device_type type, co mode_a20 = true; } -h83032_device::h83032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83032_device::h83032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83032_device(mconfig, H83032, tag, owner, clock, 0xf710) { } -h83031_device::h83031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83031_device::h83031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83032_device(mconfig, H83031, tag, owner, clock, 0xfb10) { } -h83030_device::h83030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83030_device::h83030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83032_device(mconfig, H83030, tag, owner, clock, 0xfd10) { } diff --git a/src/devices/cpu/h8/h83032.h b/src/devices/cpu/h8/h83032.h index fd2d99593da..58d0a2170b1 100644 --- a/src/devices/cpu/h8/h83032.h +++ b/src/devices/cpu/h8/h83032.h @@ -29,13 +29,13 @@ class h83032_device : public h8h_device { public: - h83032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t syscr_r(); void syscr_w(uint8_t data); protected: - h83032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); + h83032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start); required_device intc; required_device adc; @@ -77,12 +77,12 @@ protected: class h83031_device : public h83032_device { public: - h83031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h83030_device : public h83032_device { public: - h83030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H83032, h83032_device) diff --git a/src/devices/cpu/h8/h83042.cpp b/src/devices/cpu/h8/h83042.cpp index 2b0631d201e..a0896f68ad5 100644 --- a/src/devices/cpu/h8/h83042.cpp +++ b/src/devices/cpu/h8/h83042.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(H83040, h83040_device, "h83040", "Hitachi H8/3040") DEFINE_DEVICE_TYPE(H83041, h83041_device, "h83041", "Hitachi H8/3041") DEFINE_DEVICE_TYPE(H83042, h83042_device, "h83042", "Hitachi H8/3042") -h83042_device::h83042_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +h83042_device::h83042_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8h_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h83042_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -36,17 +36,17 @@ h83042_device::h83042_device(const machine_config &mconfig, device_type type, co mode_a20 = true; } -h83040_device::h83040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83040_device::h83040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83042_device(mconfig, H83040, tag, owner, clock) { } -h83041_device::h83041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83041_device::h83041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83042_device(mconfig, H83041, tag, owner, clock) { } -h83042_device::h83042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83042_device::h83042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83042_device(mconfig, H83042, tag, owner, clock) { } diff --git a/src/devices/cpu/h8/h83042.h b/src/devices/cpu/h8/h83042.h index 8caa5a4e690..5037d05e165 100644 --- a/src/devices/cpu/h8/h83042.h +++ b/src/devices/cpu/h8/h83042.h @@ -32,13 +32,13 @@ class h83042_device : public h8h_device { public: - h83042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t syscr_r(); void syscr_w(uint8_t data); protected: - h83042_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + h83042_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device intc; required_device adc; @@ -80,12 +80,12 @@ protected: class h83040_device : public h83042_device { public: - h83040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h83041_device : public h83042_device { public: - h83041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H83040, h83040_device) diff --git a/src/devices/cpu/h8/h83048.cpp b/src/devices/cpu/h8/h83048.cpp index 2358914e6cf..3e4372bb221 100644 --- a/src/devices/cpu/h8/h83048.cpp +++ b/src/devices/cpu/h8/h83048.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(H83045, h83045_device, "h83045", "Hitachi H8/3045") DEFINE_DEVICE_TYPE(H83047, h83047_device, "h83047", "Hitachi H8/3047") DEFINE_DEVICE_TYPE(H83048, h83048_device, "h83048", "Hitachi H8/3048") -h83048_device::h83048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) : +h83048_device::h83048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start) : h8h_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h83048_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -37,22 +37,22 @@ h83048_device::h83048_device(const machine_config &mconfig, device_type type, co { } -h83048_device::h83048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83048_device::h83048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83048_device(mconfig, H83048, tag, owner, clock, 0xef10) { } -h83044_device::h83044_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83044_device::h83044_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83048_device(mconfig, H83044, tag, owner, clock, 0xf710) { } -h83045_device::h83045_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83045_device::h83045_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83048_device(mconfig, H83045, tag, owner, clock, 0xf710) { } -h83047_device::h83047_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83047_device::h83047_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83048_device(mconfig, H83047, tag, owner, clock, 0xef10) { } diff --git a/src/devices/cpu/h8/h83048.h b/src/devices/cpu/h8/h83048.h index d5afb5e67c8..3df24384c6e 100644 --- a/src/devices/cpu/h8/h83048.h +++ b/src/devices/cpu/h8/h83048.h @@ -32,7 +32,7 @@ class h83048_device : public h8h_device { public: - h83048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } @@ -41,7 +41,7 @@ public: void syscr_w(uint8_t data); protected: - h83048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); + h83048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start); required_device intc; required_device adc; @@ -84,17 +84,17 @@ protected: class h83044_device : public h83048_device { public: - h83044_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83044_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h83045_device : public h83048_device { public: - h83045_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83045_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h83047_device : public h83048_device { public: - h83047_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83047_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H83044, h83044_device) diff --git a/src/devices/cpu/h8/h83337.cpp b/src/devices/cpu/h8/h83337.cpp index 7f9e835513c..3ed10f5ae97 100644 --- a/src/devices/cpu/h8/h83337.cpp +++ b/src/devices/cpu/h8/h83337.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(H83336, h83336_device, "h83336", "Hitachi H8/3336") DEFINE_DEVICE_TYPE(H83337, h83337_device, "h83337", "Hitachi H8/3337") -h83337_device::h83337_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) : +h83337_device::h83337_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start) : h8_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h83337_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -33,17 +33,17 @@ h83337_device::h83337_device(const machine_config &mconfig, device_type type, co { } -h83337_device::h83337_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83337_device::h83337_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83337_device(mconfig, H83337, tag, owner, clock, 0xf780) { } -h83334_device::h83334_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83334_device::h83334_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83337_device(mconfig, H83334, tag, owner, clock, 0xfb80) { } -h83336_device::h83336_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h83336_device::h83336_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h83337_device(mconfig, H83336, tag, owner, clock, 0xf780) { } diff --git a/src/devices/cpu/h8/h83337.h b/src/devices/cpu/h8/h83337.h index cc0d9735a34..9ed5958b47a 100644 --- a/src/devices/cpu/h8/h83337.h +++ b/src/devices/cpu/h8/h83337.h @@ -34,7 +34,7 @@ class h83337_device : public h8_device { public: - h83337_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83337_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t wscr_r(); void wscr_w(uint8_t data); @@ -46,7 +46,7 @@ public: void mdcr_w(uint8_t data); protected: - h83337_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); + h83337_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start); required_device intc; required_device adc; @@ -84,12 +84,12 @@ protected: class h83334_device : public h83337_device { public: - h83334_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83334_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h83336_device : public h83337_device { public: - h83336_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h83336_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H83334, h83334_device) diff --git a/src/devices/cpu/h8/h8_adc.cpp b/src/devices/cpu/h8/h8_adc.cpp index 3235ac8c6c8..73176384a31 100644 --- a/src/devices/cpu/h8/h8_adc.cpp +++ b/src/devices/cpu/h8/h8_adc.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(H8_ADC_2320, h8_adc_2320_device, "h8_adc_2320", "H8/2320 ADC" DEFINE_DEVICE_TYPE(H8_ADC_2357, h8_adc_2357_device, "h8_adc_2357", "H8/2357 ADC") DEFINE_DEVICE_TYPE(H8_ADC_2655, h8_adc_2655_device, "h8_adc_2655", "H8/2655 ADC") -h8_adc_device::h8_adc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +h8_adc_device::h8_adc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), cpu(*this, DEVICE_SELF_OWNER), intc(nullptr), io(nullptr), intc_tag(nullptr), intc_vector(0), adcsr(0), adcr(0), register_mask(0), trigger(0), start_mode(0), start_channel(0), @@ -272,7 +272,7 @@ int h8_adc_device::get_channel_index(int count) } -h8_adc_3337_device::h8_adc_3337_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_adc_3337_device::h8_adc_3337_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_adc_device(mconfig, H8_ADC_3337, tag, owner, clock) { register_mask = 3; @@ -303,7 +303,7 @@ void h8_adc_3337_device::mode_update() } -h8_adc_3006_device::h8_adc_3006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_adc_3006_device::h8_adc_3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_adc_device(mconfig, H8_ADC_3006, tag, owner, clock) { register_mask = 3; @@ -334,7 +334,7 @@ void h8_adc_3006_device::mode_update() } -h8_adc_2245_device::h8_adc_2245_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_adc_2245_device::h8_adc_2245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_adc_device(mconfig, H8_ADC_2245, tag, owner, clock) { register_mask = 3; @@ -365,7 +365,7 @@ void h8_adc_2245_device::mode_update() } -h8_adc_2320_device::h8_adc_2320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_adc_2320_device::h8_adc_2320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_adc_device(mconfig, H8_ADC_2320, tag, owner, clock) { register_mask = 3; @@ -402,7 +402,7 @@ void h8_adc_2320_device::mode_update() } -h8_adc_2357_device::h8_adc_2357_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_adc_2357_device::h8_adc_2357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_adc_device(mconfig, H8_ADC_2357, tag, owner, clock) { register_mask = 3; @@ -433,7 +433,7 @@ void h8_adc_2357_device::mode_update() } -h8_adc_2655_device::h8_adc_2655_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_adc_2655_device::h8_adc_2655_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_adc_device(mconfig, H8_ADC_2655, tag, owner, clock) { suspend_on_interrupt = true; diff --git a/src/devices/cpu/h8/h8_adc.h b/src/devices/cpu/h8/h8_adc.h index e54d3b747d9..8b4008eb4eb 100644 --- a/src/devices/cpu/h8/h8_adc.h +++ b/src/devices/cpu/h8/h8_adc.h @@ -33,7 +33,7 @@ public: uint64_t internal_update(uint64_t current_time); protected: - h8_adc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + h8_adc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device cpu; h8_intc_device *intc; @@ -93,9 +93,9 @@ protected: class h8_adc_3337_device : public h8_adc_device { public: - h8_adc_3337_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_adc_3337_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_adc_3337_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc_tag, int vect) - : h8_adc_3337_device(mconfig, tag, owner, 0) + : h8_adc_3337_device(mconfig, tag, owner) { set_info(intc_tag, vect); } @@ -107,9 +107,9 @@ protected: class h8_adc_3006_device : public h8_adc_device { public: - h8_adc_3006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_adc_3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_adc_3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc_tag, int vect) - : h8_adc_3006_device(mconfig, tag, owner, 0) + : h8_adc_3006_device(mconfig, tag, owner) { set_info(intc_tag, vect); } @@ -121,9 +121,9 @@ protected: class h8_adc_2245_device : public h8_adc_device { public: - h8_adc_2245_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_adc_2245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_adc_2245_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc_tag, int vect) - : h8_adc_2245_device(mconfig, tag, owner, 0) + : h8_adc_2245_device(mconfig, tag, owner) { set_info(intc_tag, vect); } @@ -135,9 +135,9 @@ protected: class h8_adc_2320_device : public h8_adc_device { public: - h8_adc_2320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_adc_2320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_adc_2320_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc_tag, int vect) - : h8_adc_2320_device(mconfig, tag, owner, 0) + : h8_adc_2320_device(mconfig, tag, owner) { set_info(intc_tag, vect); } @@ -149,9 +149,9 @@ protected: class h8_adc_2357_device : public h8_adc_device { public: - h8_adc_2357_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_adc_2357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_adc_2357_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc_tag, int vect) - : h8_adc_2357_device(mconfig, tag, owner, 0) + : h8_adc_2357_device(mconfig, tag, owner) { set_info(intc_tag, vect); } @@ -163,9 +163,9 @@ protected: class h8_adc_2655_device : public h8_adc_device { public: - h8_adc_2655_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_adc_2655_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_adc_2655_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc_tag, int vect) - : h8_adc_2655_device(mconfig, tag, owner, 0) + : h8_adc_2655_device(mconfig, tag, owner) { set_info(intc_tag, vect); } diff --git a/src/devices/cpu/h8/h8_dma.cpp b/src/devices/cpu/h8/h8_dma.cpp index d70cced09f3..ba014974ec3 100644 --- a/src/devices/cpu/h8/h8_dma.cpp +++ b/src/devices/cpu/h8/h8_dma.cpp @@ -4,7 +4,7 @@ DEFINE_DEVICE_TYPE(H8_DMA, h8_dma_device, "h8_dma", "H8 DMA controller") DEFINE_DEVICE_TYPE(H8_DMA_CHANNEL, h8_dma_channel_device, "h8_dma_channel", "H8 DMA channel") -h8_dma_device::h8_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_dma_device::h8_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, H8_DMA, tag, owner, clock), dmach0(*this, "0"), dmach1(*this, "1") @@ -118,7 +118,7 @@ void h8_dma_device::dmabcr_w(offs_t offset, uint16_t data, uint16_t mem_mask) -h8_dma_channel_device::h8_dma_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_dma_channel_device::h8_dma_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, H8_DMA_CHANNEL, tag, owner, clock), dmac(*this, "^"), cpu(*this, "^^") diff --git a/src/devices/cpu/h8/h8_dma.h b/src/devices/cpu/h8/h8_dma.h index 4a4eeda837b..7448300f4cd 100644 --- a/src/devices/cpu/h8/h8_dma.h +++ b/src/devices/cpu/h8/h8_dma.h @@ -43,7 +43,7 @@ enum { class h8_dma_device : public device_t { public: - h8_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + h8_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t dmawer_r(); void dmawer_w(uint8_t data); @@ -88,7 +88,7 @@ public: MODE16_MEM_DACK }; - h8_dma_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_dma_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_dma_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int irq_base, int v0, int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8, int v9 = h8_dma_channel_device::NONE, @@ -98,7 +98,7 @@ public: int vd = h8_dma_channel_device::NONE, int ve = h8_dma_channel_device::NONE, int vf = h8_dma_channel_device::NONE) - : h8_dma_channel_device(mconfig, tag, owner, 0) + : h8_dma_channel_device(mconfig, tag, owner) { set_info(intc, irq_base, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, va, vb, vc, vd, ve, vf); } diff --git a/src/devices/cpu/h8/h8_dtc.cpp b/src/devices/cpu/h8/h8_dtc.cpp index a2668456414..08aab92bfb7 100644 --- a/src/devices/cpu/h8/h8_dtc.cpp +++ b/src/devices/cpu/h8/h8_dtc.cpp @@ -24,7 +24,7 @@ const int h8_dtc_device::vector_to_enable[92] = { -1, 40, 41, -1 // ERI2, RXI2, TXI2, TEI2 }; -h8_dtc_device::h8_dtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_dtc_device::h8_dtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, H8_DTC, tag, owner, clock), cpu(*this, DEVICE_SELF_OWNER) { diff --git a/src/devices/cpu/h8/h8_dtc.h b/src/devices/cpu/h8/h8_dtc.h index 6b1a32b8a9b..22052b8a757 100644 --- a/src/devices/cpu/h8/h8_dtc.h +++ b/src/devices/cpu/h8/h8_dtc.h @@ -29,9 +29,9 @@ class h8_dtc_device : public device_t { public: enum { DTC_CHAINED = 1000 }; - h8_dtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_dtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_dtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int irq) - : h8_dtc_device(mconfig, tag, owner, 0) + : h8_dtc_device(mconfig, tag, owner) { set_info(intc, irq); } diff --git a/src/devices/cpu/h8/h8_intc.cpp b/src/devices/cpu/h8/h8_intc.cpp index f2a7b192164..465b346e604 100644 --- a/src/devices/cpu/h8/h8_intc.cpp +++ b/src/devices/cpu/h8/h8_intc.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(H8H_INTC, h8h_intc_device, "h8h_intc", "H8H interrupt c DEFINE_DEVICE_TYPE(H8S_INTC, h8s_intc_device, "h8s_intc", "H8S interrupt controller") DEFINE_DEVICE_TYPE(GT913_INTC, gt913_intc_device, "gt913_intc", "Casio GT913F interrupt controller") -h8_intc_device::h8_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_intc_device::h8_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_intc_device(mconfig, H8_INTC, tag, owner, clock) { irq_vector_base = 4; @@ -16,7 +16,7 @@ h8_intc_device::h8_intc_device(const machine_config &mconfig, const char *tag, d irq_vector_nmi = 3; } -h8_intc_device::h8_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +h8_intc_device::h8_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), irq_vector_base(0), irq_vector_count(0), irq_vector_nmi(0), cpu(*this, DEVICE_SELF_OWNER), nmi_input(false), irq_input(0), ier(0), isr(0), iscr(0), icr_filter(0), ipr_filter(0) { @@ -199,7 +199,7 @@ void h8_intc_device::get_priority(int vect, int &icr_pri, int &ipr_pri) const } -gt913_intc_device::gt913_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gt913_intc_device::gt913_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt913_intc_device(mconfig, GT913_INTC, tag, owner, clock) { irq_vector_base = 4; @@ -207,7 +207,7 @@ gt913_intc_device::gt913_intc_device(const machine_config &mconfig, const char * irq_vector_nmi = 3; } -gt913_intc_device::gt913_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +gt913_intc_device::gt913_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8_intc_device(mconfig, type, tag, owner, clock) { } @@ -226,7 +226,7 @@ void gt913_intc_device::clear_interrupt(int vector) } -h8h_intc_device::h8h_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8h_intc_device::h8h_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8h_intc_device(mconfig, H8H_INTC, tag, owner, clock) { irq_vector_base = 12; @@ -234,7 +234,7 @@ h8h_intc_device::h8h_intc_device(const machine_config &mconfig, const char *tag, irq_vector_nmi = 7; } -h8h_intc_device::h8h_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +h8h_intc_device::h8h_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8_intc_device(mconfig, type, tag, owner, clock) { } @@ -353,7 +353,7 @@ void h8h_intc_device::get_priority(int vect, int &icr_pri, int &ipr_pri) const icr_pri = (icr >> (slot ^ 7)) & 1; } -h8s_intc_device::h8s_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s_intc_device::h8s_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8h_intc_device(mconfig, H8S_INTC, tag, owner, clock) { irq_vector_base = 16; diff --git a/src/devices/cpu/h8/h8_intc.h b/src/devices/cpu/h8/h8_intc.h index 43569dc3b9b..23ec3244cfa 100644 --- a/src/devices/cpu/h8/h8_intc.h +++ b/src/devices/cpu/h8/h8_intc.h @@ -19,7 +19,7 @@ class h8_intc_device : public device_t { public: - h8_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + h8_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); int interrupt_taken(int vector); void internal_interrupt(int vector); @@ -50,7 +50,7 @@ protected: uint16_t iscr; int icr_filter, ipr_filter; - h8_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + h8_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -63,18 +63,18 @@ protected: class gt913_intc_device : public h8_intc_device { public: - gt913_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gt913_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void clear_interrupt(int vector); protected: - gt913_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gt913_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; }; class h8h_intc_device : public h8_intc_device { public: - h8h_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + h8h_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t isr_r(); void isr_w(uint8_t data); @@ -92,7 +92,7 @@ protected: uint32_t icr; - h8h_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + h8h_intc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -103,7 +103,7 @@ protected: class h8s_intc_device : public h8h_intc_device { public: - h8s_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + h8s_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t ipr_r(offs_t offset); void ipr_w(offs_t offset, uint8_t data); diff --git a/src/devices/cpu/h8/h8_port.cpp b/src/devices/cpu/h8/h8_port.cpp index e366e0d49a5..86390382274 100644 --- a/src/devices/cpu/h8/h8_port.cpp +++ b/src/devices/cpu/h8/h8_port.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(H8_PORT, h8_port_device, "h8_digital_port", "H8 digital port") -h8_port_device::h8_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_port_device::h8_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, H8_PORT, tag, owner, clock), cpu(*this, DEVICE_SELF_OWNER), io(nullptr), address(0), default_ddr(0), ddr(0), pcr(0), odr(0), mask(0), dr(0), last_output(0) { diff --git a/src/devices/cpu/h8/h8_port.h b/src/devices/cpu/h8/h8_port.h index 6c60b0c7621..45e6d387599 100644 --- a/src/devices/cpu/h8/h8_port.h +++ b/src/devices/cpu/h8/h8_port.h @@ -18,9 +18,9 @@ class h8_port_device : public device_t { public: - h8_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_port_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_port_device(const machine_config &mconfig, const char *tag, device_t *owner, int address, uint8_t default_ddr, uint8_t mask) - : h8_port_device(mconfig, tag, owner, 0) + : h8_port_device(mconfig, tag, owner) { set_info(address, default_ddr, mask); } diff --git a/src/devices/cpu/h8/h8_sci.cpp b/src/devices/cpu/h8/h8_sci.cpp index 6bc650af5c6..c7ec19d382d 100644 --- a/src/devices/cpu/h8/h8_sci.cpp +++ b/src/devices/cpu/h8/h8_sci.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(H8_SCI, h8_sci_device, "h8_sci", "H8 Serial Communications In const char *const h8_sci_device::state_names[] = { "idle", "start", "bit", "parity", "stop", "last-tick" }; -h8_sci_device::h8_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_sci_device::h8_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, H8_SCI, tag, owner, clock), cpu(*this, DEVICE_SELF_OWNER), tx_cb(*this), diff --git a/src/devices/cpu/h8/h8_sci.h b/src/devices/cpu/h8/h8_sci.h index 8c07ffe5ec2..1c9c04b38fe 100644 --- a/src/devices/cpu/h8/h8_sci.h +++ b/src/devices/cpu/h8/h8_sci.h @@ -19,9 +19,9 @@ class h8_sci_device : public device_t { public: - h8_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int eri, int rxi, int txi, int tei) - : h8_sci_device(mconfig, tag, owner, 0) + : h8_sci_device(mconfig, tag, owner) { set_info(intc, eri, rxi, txi, tei); } diff --git a/src/devices/cpu/h8/h8_timer16.cpp b/src/devices/cpu/h8/h8_timer16.cpp index f74acb4816f..40d0d015db4 100644 --- a/src/devices/cpu/h8/h8_timer16.cpp +++ b/src/devices/cpu/h8/h8_timer16.cpp @@ -13,13 +13,13 @@ DEFINE_DEVICE_TYPE(H8_TIMER16_CHANNEL, h8_timer16_channel_device, "h8_timer16_ DEFINE_DEVICE_TYPE(H8H_TIMER16_CHANNEL, h8h_timer16_channel_device, "h8h_timer16_channel", "H8H 16-bit timer channel") DEFINE_DEVICE_TYPE(H8S_TIMER16_CHANNEL, h8s_timer16_channel_device, "h8s_timer16_channel", "H8S 16-bit timer channel") -h8_timer16_channel_device::h8_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_timer16_channel_device::h8_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_timer16_channel_device(mconfig, H8_TIMER16_CHANNEL, tag, owner, clock) { chain_tag = nullptr; } -h8_timer16_channel_device::h8_timer16_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +h8_timer16_channel_device::h8_timer16_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), cpu(*this, "^^"), chained_timer(nullptr), intc(nullptr), intc_tag(nullptr), tier_mask(0), tgr_count(0), tbr_count(0), tgr_clearing(0), tcr(0), tier(0), ier(0), isr(0), clock_type(0), clock_divider(0), tcnt(0), last_clock_update(0), event_time(0), phase(0), counter_cycle(0), counter_incrementing(false), channel_active(false) @@ -313,7 +313,7 @@ void h8_timer16_channel_device::recalc_event(uint64_t cur_time) cpu->internal_update(); } -h8_timer16_device::h8_timer16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_timer16_device::h8_timer16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, H8_TIMER16, tag, owner, clock), cpu(*this, DEVICE_SELF_OWNER) { @@ -519,7 +519,7 @@ uint8_t h8_timer16_channel_device::tisr_r(int offset) const return 0x00; } -h8h_timer16_channel_device::h8h_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8h_timer16_channel_device::h8h_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_timer16_channel_device(mconfig, H8H_TIMER16_CHANNEL, tag, owner, clock) { } @@ -617,7 +617,7 @@ void h8h_timer16_channel_device::tcr_update() } } -h8s_timer16_channel_device::h8s_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s_timer16_channel_device::h8s_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_timer16_channel_device(mconfig, H8S_TIMER16_CHANNEL, tag, owner, clock) { } diff --git a/src/devices/cpu/h8/h8_timer16.h b/src/devices/cpu/h8/h8_timer16.h index 6543b9ccb7c..a22e0a3caac 100644 --- a/src/devices/cpu/h8/h8_timer16.h +++ b/src/devices/cpu/h8/h8_timer16.h @@ -56,9 +56,9 @@ public: }; - h8_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, int tgr_count, int tbr_count, const char *intc, int irq_base) - : h8_timer16_channel_device(mconfig, tag, owner, 0) + : h8_timer16_channel_device(mconfig, tag, owner) { set_info(tgr_count, tbr_count, intc, irq_base); } @@ -106,7 +106,7 @@ protected: bool counter_incrementing; bool channel_active; - h8_timer16_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + h8_timer16_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -121,9 +121,9 @@ protected: class h8h_timer16_channel_device : public h8_timer16_channel_device { public: - h8h_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8h_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8h_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, int tgr_count, int tbr_count, const char *intc, int irq_base) - : h8h_timer16_channel_device(mconfig, tag, owner, 0) + : h8h_timer16_channel_device(mconfig, tag, owner) { set_info(tgr_count, tbr_count, intc, irq_base); } @@ -140,10 +140,10 @@ protected: class h8s_timer16_channel_device : public h8_timer16_channel_device { public: - h8s_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8s_timer16_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, int tgr_count, int _tier_mask, const char *intc, int irq_base, int t0, int t1, int t2, int t3, int t4, int t5, int t6, int t7) - : h8s_timer16_channel_device(mconfig, tag, owner, 0) + : h8s_timer16_channel_device(mconfig, tag, owner) { set_info(tgr_count, _tier_mask, intc, irq_base, t0, t1, t2, t3, t4, t5, t6, t7); } @@ -164,9 +164,9 @@ protected: class h8_timer16_device : public device_t { public: - h8_timer16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_timer16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_timer16_device(const machine_config &mconfig, const char *tag, device_t *owner, int timer_count, uint8_t default_tstr) - : h8_timer16_device(mconfig, tag, owner, 0) + : h8_timer16_device(mconfig, tag, owner) { set_info(timer_count, default_tstr); } diff --git a/src/devices/cpu/h8/h8_timer8.cpp b/src/devices/cpu/h8/h8_timer8.cpp index 352b4a7f7d9..07550cd7954 100644 --- a/src/devices/cpu/h8/h8_timer8.cpp +++ b/src/devices/cpu/h8/h8_timer8.cpp @@ -12,12 +12,12 @@ const int V = 1; DEFINE_DEVICE_TYPE(H8_TIMER8_CHANNEL, h8_timer8_channel_device, "h8_timer8_channel", "H8 8-bit timer channel") DEFINE_DEVICE_TYPE(H8H_TIMER8_CHANNEL, h8h_timer8_channel_device, "h8h_timer8_channel", "H8H 8-bit timer channel") -h8_timer8_channel_device::h8_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_timer8_channel_device::h8_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_timer8_channel_device(mconfig, H8_TIMER8_CHANNEL, tag, owner, clock) { } -h8_timer8_channel_device::h8_timer8_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +h8_timer8_channel_device::h8_timer8_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), cpu(*this, "^"), chained_timer(nullptr), intc(nullptr), chain_tag(nullptr), intc_tag(nullptr), irq_ca(0), irq_cb(0), irq_v(0), chain_type(0), tcr(0), tcsr(0), tcnt(0), extra_clock_bit(false), has_adte(false), has_ice(false), clock_type(0), clock_divider(0), clear_type(0), counter_cycle(0), last_clock_update(0), event_time(0) @@ -351,7 +351,7 @@ void h8_timer8_channel_device::timer_tick() } } -h8h_timer8_channel_device::h8h_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8h_timer8_channel_device::h8h_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8_timer8_channel_device(mconfig, H8H_TIMER8_CHANNEL, tag, owner, clock) { } diff --git a/src/devices/cpu/h8/h8_timer8.h b/src/devices/cpu/h8/h8_timer8.h index 0ba06d933ba..fa4a6c1ac33 100644 --- a/src/devices/cpu/h8/h8_timer8.h +++ b/src/devices/cpu/h8/h8_timer8.h @@ -29,10 +29,10 @@ public: DIV }; - h8_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int irq_ca, int irq_cb, int irq_v, int div1, int div2, int div3, int div4, int div5, int div6) - : h8_timer8_channel_device(mconfig, tag, owner, 0) + : h8_timer8_channel_device(mconfig, tag, owner) { set_info(intc, irq_ca, irq_cb, irq_v, div1, div2, div3, div4, div5, div6); } @@ -88,7 +88,7 @@ protected: int clock_type, clock_divider, clear_type, counter_cycle; uint64_t last_clock_update, event_time; - h8_timer8_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + h8_timer8_channel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -102,10 +102,10 @@ protected: class h8h_timer8_channel_device : public h8_timer8_channel_device { public: - h8h_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8h_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8h_timer8_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int irq_ca, int irq_cb, int irq_v, const char *chain_tag, int chain_type, bool has_adte, bool has_ice) - : h8h_timer8_channel_device(mconfig, tag, owner, 0) + : h8h_timer8_channel_device(mconfig, tag, owner) { set_info(intc, irq_ca, irq_cb, irq_v, chain_tag, chain_type, has_adte, has_ice); } diff --git a/src/devices/cpu/h8/h8_watchdog.cpp b/src/devices/cpu/h8/h8_watchdog.cpp index d3386b465fe..8770eddf4e0 100644 --- a/src/devices/cpu/h8/h8_watchdog.cpp +++ b/src/devices/cpu/h8/h8_watchdog.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(H8_WATCHDOG, h8_watchdog_device, "h8_watchdog", "H8 watchdog" const int h8_watchdog_device::div_bh[8] = { 1, 6, 7, 9, 11, 13, 15, 17 }; const int h8_watchdog_device::div_s [8] = { 1, 5, 6, 7, 8, 9, 11, 12 }; -h8_watchdog_device::h8_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8_watchdog_device::h8_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, H8_WATCHDOG, tag, owner, clock), cpu(*this, DEVICE_SELF_OWNER) { diff --git a/src/devices/cpu/h8/h8_watchdog.h b/src/devices/cpu/h8/h8_watchdog.h index 1cb63025141..06d5f1b7bdf 100644 --- a/src/devices/cpu/h8/h8_watchdog.h +++ b/src/devices/cpu/h8/h8_watchdog.h @@ -49,9 +49,9 @@ class h8_watchdog_device : public device_t { public: enum { B, H, S }; - h8_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); h8_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int irq, int type) - : h8_watchdog_device(mconfig, tag, owner, 0) + : h8_watchdog_device(mconfig, tag, owner) { set_info(intc, irq, type); } diff --git a/src/devices/cpu/h8/h8h.cpp b/src/devices/cpu/h8/h8h.cpp index 21f40f77600..829c1a01244 100644 --- a/src/devices/cpu/h8/h8h.cpp +++ b/src/devices/cpu/h8/h8h.cpp @@ -4,7 +4,7 @@ #include "h8h.h" #include "h8hd.h" -h8h_device::h8h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate) : +h8h_device::h8h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate) : h8_device(mconfig, type, tag, owner, clock, map_delegate) { supports_advanced = true; diff --git a/src/devices/cpu/h8/h8h.h b/src/devices/cpu/h8/h8h.h index 1b0c9b4b3ce..ad9a94e4400 100644 --- a/src/devices/cpu/h8/h8h.h +++ b/src/devices/cpu/h8/h8h.h @@ -20,7 +20,7 @@ class h8h_device : public h8_device { protected: - h8h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate); + h8h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/h8/h8s2000.cpp b/src/devices/cpu/h8/h8s2000.cpp index 04da92cdee3..41279505e69 100644 --- a/src/devices/cpu/h8/h8s2000.cpp +++ b/src/devices/cpu/h8/h8s2000.cpp @@ -4,7 +4,7 @@ #include "h8s2000.h" #include "h8s2000d.h" -h8s2000_device::h8s2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate) : +h8s2000_device::h8s2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate) : h8h_device(mconfig, type, tag, owner, clock, map_delegate) { has_exr = true; diff --git a/src/devices/cpu/h8/h8s2000.h b/src/devices/cpu/h8/h8s2000.h index 8f7721928c3..a2f79b40fb4 100644 --- a/src/devices/cpu/h8/h8s2000.h +++ b/src/devices/cpu/h8/h8s2000.h @@ -22,7 +22,7 @@ class h8s2000_device : public h8h_device { protected: - h8s2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate); + h8s2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/h8/h8s2245.cpp b/src/devices/cpu/h8/h8s2245.cpp index b5101017f07..2ce4124e6cc 100644 --- a/src/devices/cpu/h8/h8s2245.cpp +++ b/src/devices/cpu/h8/h8s2245.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(H8S2245, h8s2245_device, "h8s2245", "Hitachi H8S/2245") DEFINE_DEVICE_TYPE(H8S2246, h8s2246_device, "h8s2246", "Hitachi H8S/2246") -h8s2245_device::h8s2245_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) : +h8s2245_device::h8s2245_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start) : h8s2000_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h8s2245_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -41,22 +41,22 @@ h8s2245_device::h8s2245_device(const machine_config &mconfig, device_type type, { } -h8s2245_device::h8s2245_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2245_device::h8s2245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2245_device(mconfig, H8S2245, tag, owner, clock, 0xffec00) { } -h8s2241_device::h8s2241_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2241_device::h8s2241_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2245_device(mconfig, H8S2241, tag, owner, clock, 0xffec00) { } -h8s2242_device::h8s2242_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2242_device::h8s2242_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2245_device(mconfig, H8S2242, tag, owner, clock, 0xffdc00) { } -h8s2246_device::h8s2246_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2246_device::h8s2246_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2245_device(mconfig, H8S2246, tag, owner, clock, 0xffdc00) { } diff --git a/src/devices/cpu/h8/h8s2245.h b/src/devices/cpu/h8/h8s2245.h index 4fca522bbc5..342d9e8e854 100644 --- a/src/devices/cpu/h8/h8s2245.h +++ b/src/devices/cpu/h8/h8s2245.h @@ -35,7 +35,7 @@ class h8s2245_device : public h8s2000_device { public: - h8s2245_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t syscr_r(); void syscr_w(uint8_t data); @@ -73,7 +73,7 @@ protected: uint16_t mstpcr; uint8_t syscr; - h8s2245_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); + h8s2245_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start); virtual bool exr_in_stack() const override; virtual void update_irq_filter() override; @@ -91,17 +91,17 @@ protected: class h8s2241_device : public h8s2245_device { public: - h8s2241_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2241_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2242_device : public h8s2245_device { public: - h8s2242_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2242_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2246_device : public h8s2245_device { public: - h8s2246_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2246_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H8S2241, h8s2241_device) diff --git a/src/devices/cpu/h8/h8s2320.cpp b/src/devices/cpu/h8/h8s2320.cpp index 14cd0e0a396..8b359fa74f0 100644 --- a/src/devices/cpu/h8/h8s2320.cpp +++ b/src/devices/cpu/h8/h8s2320.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(H8S2328, h8s2328_device, "h8s2328", "Hitachi H8S/2328") DEFINE_DEVICE_TYPE(H8S2329, h8s2329_device, "h8s2329", "Hitachi H8S/2329") -h8s2320_device::h8s2320_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) : +h8s2320_device::h8s2320_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start) : h8s2000_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h8s2320_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -53,47 +53,47 @@ h8s2320_device::h8s2320_device(const machine_config &mconfig, device_type type, { } -h8s2320_device::h8s2320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2320_device::h8s2320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2320, tag, owner, clock, 0xffec00) { } -h8s2321_device::h8s2321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2321_device::h8s2321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2321, tag, owner, clock, 0xffec00) { } -h8s2322_device::h8s2322_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2322_device::h8s2322_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2322, tag, owner, clock, 0xffdc00) { } -h8s2323_device::h8s2323_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2323_device::h8s2323_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2323, tag, owner, clock, 0xffdc00) { } -h8s2324_device::h8s2324_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2324_device::h8s2324_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2324, tag, owner, clock, 0xff7c00) { } -h8s2326_device::h8s2326_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2326_device::h8s2326_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2326, tag, owner, clock, 0xffdc00) { } -h8s2327_device::h8s2327_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2327_device::h8s2327_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2327, tag, owner, clock, 0xffdc00) { } -h8s2328_device::h8s2328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2328_device::h8s2328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2328, tag, owner, clock, 0xffdc00) { } -h8s2329_device::h8s2329_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2329_device::h8s2329_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2320_device(mconfig, H8S2329, tag, owner, clock, 0xff7c00) { } diff --git a/src/devices/cpu/h8/h8s2320.h b/src/devices/cpu/h8/h8s2320.h index 4ea272d283f..ef8da4a9303 100644 --- a/src/devices/cpu/h8/h8s2320.h +++ b/src/devices/cpu/h8/h8s2320.h @@ -41,7 +41,7 @@ class h8s2320_device : public h8s2000_device { public: - h8s2320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t syscr_r(); void syscr_w(uint8_t data); @@ -83,7 +83,7 @@ protected: uint32_t ram_start; uint8_t syscr; - h8s2320_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); + h8s2320_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start); virtual bool exr_in_stack() const override; virtual void update_irq_filter() override; @@ -102,42 +102,42 @@ protected: class h8s2321_device : public h8s2320_device { public: - h8s2321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2322_device : public h8s2320_device { public: - h8s2322_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2322_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2323_device : public h8s2320_device { public: - h8s2323_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2323_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2324_device : public h8s2320_device { public: - h8s2324_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2324_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2326_device : public h8s2320_device { public: - h8s2326_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2326_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2327_device : public h8s2320_device { public: - h8s2327_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2327_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2328_device : public h8s2320_device { public: - h8s2328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2329_device : public h8s2320_device { public: - h8s2329_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2329_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H8S2320, h8s2320_device) diff --git a/src/devices/cpu/h8/h8s2357.cpp b/src/devices/cpu/h8/h8s2357.cpp index eda704291c5..2bef42912f6 100644 --- a/src/devices/cpu/h8/h8s2357.cpp +++ b/src/devices/cpu/h8/h8s2357.cpp @@ -10,7 +10,7 @@ DEFINE_DEVICE_TYPE(H8S2394, h8s2394_device, "h8s2394", "Hitachi H8S/2394") DEFINE_DEVICE_TYPE(H8S2392, h8s2392_device, "h8s2392", "Hitachi H8S/2392") DEFINE_DEVICE_TYPE(H8S2390, h8s2390_device, "h8s2390", "Hitachi H8S/2390") -h8s2357_device::h8s2357_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start) : +h8s2357_device::h8s2357_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start) : h8s2000_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h8s2357_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -45,32 +45,32 @@ h8s2357_device::h8s2357_device(const machine_config &mconfig, device_type type, { } -h8s2357_device::h8s2357_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2357_device::h8s2357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2357_device(mconfig, H8S2357, tag, owner, clock, 0xffdc00) { } -h8s2352_device::h8s2352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2352_device::h8s2352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2357_device(mconfig, H8S2352, tag, owner, clock, 0xffdc00) { } -h8s2398_device::h8s2398_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2398_device::h8s2398_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2357_device(mconfig, H8S2398, tag, owner, clock, 0xffdc00) { } -h8s2394_device::h8s2394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2394_device::h8s2394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2357_device(mconfig, H8S2394, tag, owner, clock, 0xff7c00) { } -h8s2392_device::h8s2392_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2392_device::h8s2392_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2357_device(mconfig, H8S2392, tag, owner, clock, 0xffdc00) { } -h8s2390_device::h8s2390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2390_device::h8s2390_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2357_device(mconfig, H8S2390, tag, owner, clock, 0xffec00) { } diff --git a/src/devices/cpu/h8/h8s2357.h b/src/devices/cpu/h8/h8s2357.h index 3f20c062d01..cfd7f3bb8e7 100644 --- a/src/devices/cpu/h8/h8s2357.h +++ b/src/devices/cpu/h8/h8s2357.h @@ -36,7 +36,7 @@ class h8s2357_device : public h8s2000_device { public: - h8s2357_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t syscr_r(); void syscr_w(uint8_t data); @@ -74,7 +74,7 @@ protected: uint32_t ram_start; unsigned char syscr; - h8s2357_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); + h8s2357_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t start); virtual bool exr_in_stack() const override; virtual void update_irq_filter() override; @@ -93,27 +93,27 @@ protected: class h8s2352_device : public h8s2357_device { public: - h8s2352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2398_device : public h8s2357_device { public: - h8s2398_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2398_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2394_device : public h8s2357_device { public: - h8s2394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2392_device : public h8s2357_device { public: - h8s2392_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2392_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8s2390_device : public h8s2357_device { public: - h8s2390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2390_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H8S2357, h8s2357_device) diff --git a/src/devices/cpu/h8/h8s2600.cpp b/src/devices/cpu/h8/h8s2600.cpp index be04b3382df..1cc751757dd 100644 --- a/src/devices/cpu/h8/h8s2600.cpp +++ b/src/devices/cpu/h8/h8s2600.cpp @@ -4,7 +4,7 @@ #include "h8s2600.h" #include "h8s2600d.h" -h8s2600_device::h8s2600_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate) : +h8s2600_device::h8s2600_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate) : h8s2000_device(mconfig, type, tag, owner, clock, map_delegate) { has_mac = true; diff --git a/src/devices/cpu/h8/h8s2600.h b/src/devices/cpu/h8/h8s2600.h index 84c611dd8f7..dd323c3f85f 100644 --- a/src/devices/cpu/h8/h8s2600.h +++ b/src/devices/cpu/h8/h8s2600.h @@ -20,7 +20,7 @@ class h8s2600_device : public h8s2000_device { protected: - h8s2600_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate); + h8s2600_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/h8/h8s2655.cpp b/src/devices/cpu/h8/h8s2655.cpp index eb29b29bdc3..c6dab386354 100644 --- a/src/devices/cpu/h8/h8s2655.cpp +++ b/src/devices/cpu/h8/h8s2655.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(H8S2655, h8s2655_device, "h8s2655", "Hitachi H8S/2655") DEFINE_DEVICE_TYPE(H8S2653, h8s2653_device, "h8s2653", "Hitachi H8S/2653") -h8s2655_device::h8s2655_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +h8s2655_device::h8s2655_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8s2600_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h8s2655_device::map), this)), intc(*this, "intc"), adc(*this, "adc"), @@ -41,13 +41,13 @@ h8s2655_device::h8s2655_device(const machine_config &mconfig, device_type type, has_trace = true; } -h8s2655_device::h8s2655_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2655_device::h8s2655_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2655_device(mconfig, H8S2655, tag, owner, clock) { } -h8s2653_device::h8s2653_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +h8s2653_device::h8s2653_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8s2655_device(mconfig, H8S2653, tag, owner, clock) { } diff --git a/src/devices/cpu/h8/h8s2655.h b/src/devices/cpu/h8/h8s2655.h index aa8384bce73..b8854f9d397 100644 --- a/src/devices/cpu/h8/h8s2655.h +++ b/src/devices/cpu/h8/h8s2655.h @@ -28,7 +28,7 @@ class h8s2655_device : public h8s2600_device { public: - h8s2655_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2655_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t syscr_r(); void syscr_w(uint8_t data); @@ -65,7 +65,7 @@ protected: uint8_t syscr; - h8s2655_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + h8s2655_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual bool exr_in_stack() const override; virtual void update_irq_filter() override; @@ -84,7 +84,7 @@ protected: class h8s2653_device : public h8s2655_device { public: - h8s2653_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + h8s2653_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(H8S2655, h8s2655_device) diff --git a/src/devices/cpu/h8500/h8500.cpp b/src/devices/cpu/h8500/h8500.cpp index b022749197c..563ab9ce214 100644 --- a/src/devices/cpu/h8500/h8500.cpp +++ b/src/devices/cpu/h8500/h8500.cpp @@ -12,7 +12,7 @@ #include "h8500.h" #include "h8500dasm.h" -h8500_device::h8500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int addrbits, int buswidth, int ramsize, int defmode, address_map_constructor map) +h8500_device::h8500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, int buswidth, int ramsize, int defmode, address_map_constructor map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, buswidth, addrbits, 0, map) , m_ram_config("intram", ENDIANNESS_BIG, 16, ramsize, 0, address_map_constructor(FUNC(h8500_device::ram_map), this)) diff --git a/src/devices/cpu/h8500/h8500.h b/src/devices/cpu/h8500/h8500.h index 3755ab7a4ab..7959b872639 100644 --- a/src/devices/cpu/h8500/h8500.h +++ b/src/devices/cpu/h8500/h8500.h @@ -21,7 +21,7 @@ public: void set_mode(u8 mode) { assert(!configured()); m_mode_control = mode; } protected: - h8500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int addrbits, int buswidth, int ramsize, int defmode, address_map_constructor map); + h8500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, int buswidth, int ramsize, int defmode, address_map_constructor map); // device-level overrides virtual void device_config_complete() override; diff --git a/src/devices/cpu/h8500/h8510.cpp b/src/devices/cpu/h8500/h8510.cpp index b4ade58d8d5..40aedafe93e 100644 --- a/src/devices/cpu/h8500/h8510.cpp +++ b/src/devices/cpu/h8500/h8510.cpp @@ -11,12 +11,12 @@ DEFINE_DEVICE_TYPE(HD6415108, hd6415108_device, "hd6415108", "Hitachi HD6415108 (H8/510)") -h8510_device::h8510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +h8510_device::h8510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8500_device(mconfig, type, tag, owner, clock, 24, 16, 0, 4, address_map_constructor(FUNC(h8510_device::internal_map), this)) { } -hd6415108_device::hd6415108_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6415108_device::hd6415108_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8510_device(mconfig, HD6415108, tag, owner, clock) { } diff --git a/src/devices/cpu/h8500/h8510.h b/src/devices/cpu/h8500/h8510.h index 1cbefe87aa3..96809f0bf63 100644 --- a/src/devices/cpu/h8500/h8510.h +++ b/src/devices/cpu/h8500/h8510.h @@ -11,7 +11,7 @@ class h8510_device : public h8500_device { protected: - h8510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + h8510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); @@ -21,7 +21,7 @@ class hd6415108_device : public h8510_device { public: // device type constructor - hd6415108_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6415108_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(HD6415108, hd6415108_device) diff --git a/src/devices/cpu/h8500/h8520.cpp b/src/devices/cpu/h8500/h8520.cpp index 459a979da98..2298459cbcc 100644 --- a/src/devices/cpu/h8500/h8520.cpp +++ b/src/devices/cpu/h8500/h8520.cpp @@ -12,17 +12,17 @@ DEFINE_DEVICE_TYPE(HD6435208, hd6435208_device, "hd6435208", "Hitachi HD6435208 (H8/520)") DEFINE_DEVICE_TYPE(HD6475208, hd6475208_device, "hd6475208", "Hitachi HD6475208 (H8/520)") -h8520_device::h8520_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +h8520_device::h8520_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8500_device(mconfig, type, tag, owner, clock, 20, 8, 9, 4, address_map_constructor(FUNC(h8520_device::internal_map), this)) { } -hd6435208_device::hd6435208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6435208_device::hd6435208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8520_device(mconfig, HD6435208, tag, owner, clock) { } -hd6475208_device::hd6475208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6475208_device::hd6475208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8520_device(mconfig, HD6475208, tag, owner, clock) { } diff --git a/src/devices/cpu/h8500/h8520.h b/src/devices/cpu/h8500/h8520.h index 7f66327c796..b43d622476f 100644 --- a/src/devices/cpu/h8500/h8520.h +++ b/src/devices/cpu/h8500/h8520.h @@ -11,7 +11,7 @@ class h8520_device : public h8500_device { protected: - h8520_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + h8520_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); @@ -21,14 +21,14 @@ class hd6435208_device : public h8520_device { public: // device type constructor - hd6435208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6435208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd6475208_device : public h8520_device { public: // device type constructor - hd6475208_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6475208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(HD6435208, hd6435208_device) diff --git a/src/devices/cpu/h8500/h8532.cpp b/src/devices/cpu/h8500/h8532.cpp index 20c9869c4ee..484b09573ca 100644 --- a/src/devices/cpu/h8500/h8532.cpp +++ b/src/devices/cpu/h8500/h8532.cpp @@ -12,17 +12,17 @@ DEFINE_DEVICE_TYPE(HD6435328, hd6435328_device, "hd6435328", "Hitachi HD6435328 (H8/532)") DEFINE_DEVICE_TYPE(HD6475328, hd6475328_device, "hd6475328", "Hitachi HD6475328 (H8/532)") -h8532_device::h8532_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +h8532_device::h8532_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8500_device(mconfig, type, tag, owner, clock, 20, 8, 10, 4, address_map_constructor(FUNC(h8532_device::internal_map), this)) { } -hd6435328_device::hd6435328_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6435328_device::hd6435328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8532_device(mconfig, HD6435328, tag, owner, clock) { } -hd6475328_device::hd6475328_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6475328_device::hd6475328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8532_device(mconfig, HD6475328, tag, owner, clock) { } diff --git a/src/devices/cpu/h8500/h8532.h b/src/devices/cpu/h8500/h8532.h index 71ec652a465..6aa703bd63c 100644 --- a/src/devices/cpu/h8500/h8532.h +++ b/src/devices/cpu/h8500/h8532.h @@ -11,7 +11,7 @@ class h8532_device : public h8500_device { protected: - h8532_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + h8532_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); @@ -21,14 +21,14 @@ class hd6435328_device : public h8532_device { public: // device type constructor - hd6435328_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6435328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd6475328_device : public h8532_device { public: // device type constructor - hd6475328_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6475328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(HD6435328, hd6435328_device) diff --git a/src/devices/cpu/h8500/h8534.cpp b/src/devices/cpu/h8500/h8534.cpp index 06c9b0dc24f..78e63d11f71 100644 --- a/src/devices/cpu/h8500/h8534.cpp +++ b/src/devices/cpu/h8500/h8534.cpp @@ -14,37 +14,37 @@ DEFINE_DEVICE_TYPE(HD6475348, hd6475348_device, "hd6475348", "Hitachi HD6475348 DEFINE_DEVICE_TYPE(HD6435368, hd6435368_device, "hd6435368", "Hitachi HD6435368 (H8/536)") DEFINE_DEVICE_TYPE(HD6475368, hd6475368_device, "hd6475368", "Hitachi HD6475368 (H8/536)") -h8534_device::h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +h8534_device::h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : h8500_device(mconfig, type, tag, owner, clock, 20, 8, 11, 4, map) { } -h8534_device::h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +h8534_device::h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8534_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h8534_device::internal_map), this)) { } -hd6435348_device::hd6435348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6435348_device::hd6435348_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8534_device(mconfig, HD6435348, tag, owner, clock) { } -hd6475348_device::hd6475348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6475348_device::hd6475348_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8534_device(mconfig, HD6475348, tag, owner, clock) { } -h8536_device::h8536_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +h8536_device::h8536_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : h8534_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(h8536_device::internal_map), this)) { } -hd6435368_device::hd6435368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6435368_device::hd6435368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8536_device(mconfig, HD6435368, tag, owner, clock) { } -hd6475368_device::hd6475368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd6475368_device::hd6475368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : h8536_device(mconfig, HD6475368, tag, owner, clock) { } diff --git a/src/devices/cpu/h8500/h8534.h b/src/devices/cpu/h8500/h8534.h index 2fad7985a70..c73faaf7ad9 100644 --- a/src/devices/cpu/h8500/h8534.h +++ b/src/devices/cpu/h8500/h8534.h @@ -12,8 +12,8 @@ class h8534_device : public h8500_device { protected: // delegating constructors - h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); - h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map); + h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + h8534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map); void register_field_map(address_map &map); @@ -25,20 +25,20 @@ class hd6435348_device : public h8534_device { public: // device type constructor - hd6435348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6435348_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd6475348_device : public h8534_device { public: // device type constructor - hd6475348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6475348_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class h8536_device : public h8534_device { protected: - h8536_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + h8536_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); @@ -48,14 +48,14 @@ class hd6435368_device : public h8536_device { public: // device type constructor - hd6435368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6435368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd6475368_device : public h8536_device { public: // device type constructor - hd6475368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd6475368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(HD6435348, hd6435348_device) diff --git a/src/devices/cpu/hcd62121/hcd62121.cpp b/src/devices/cpu/hcd62121/hcd62121.cpp index e05fe883d65..20ce50af3fd 100644 --- a/src/devices/cpu/hcd62121/hcd62121.cpp +++ b/src/devices/cpu/hcd62121/hcd62121.cpp @@ -50,7 +50,7 @@ constexpr u8 FLAG_ZH = 0x01; DEFINE_DEVICE_TYPE(HCD62121, hcd62121_cpu_device, "hcd62121", "Hitachi HCD62121") -hcd62121_cpu_device::hcd62121_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hcd62121_cpu_device::hcd62121_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, HCD62121, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 24, 0) , m_prev_pc(0) diff --git a/src/devices/cpu/hcd62121/hcd62121.h b/src/devices/cpu/hcd62121/hcd62121.h index d7d35a881dd..dad5bc53b2b 100644 --- a/src/devices/cpu/hcd62121/hcd62121.h +++ b/src/devices/cpu/hcd62121/hcd62121.h @@ -9,7 +9,7 @@ class hcd62121_cpu_device : public cpu_device { public: // construction/destruction - hcd62121_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hcd62121_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto kol_cb() { return m_kol_cb.bind(); } auto koh_cb() { return m_koh_cb.bind(); } diff --git a/src/devices/cpu/hd61700/hd61700.cpp b/src/devices/cpu/hd61700/hd61700.cpp index 2241855cf1c..095cc742406 100644 --- a/src/devices/cpu/hd61700/hd61700.cpp +++ b/src/devices/cpu/hd61700/hd61700.cpp @@ -102,7 +102,7 @@ DEFINE_DEVICE_TYPE(HD61700, hd61700_cpu_device, "hd61700", "Hitachi HD61700") // hd61700_cpu_device - constructor //------------------------------------------------- -hd61700_cpu_device::hd61700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd61700_cpu_device::hd61700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, HD61700, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 18, -1) , m_ppc(0x0000) diff --git a/src/devices/cpu/hd61700/hd61700.h b/src/devices/cpu/hd61700/hd61700.h index 6f7ef9462ff..25d1a37f113 100644 --- a/src/devices/cpu/hd61700/hd61700.h +++ b/src/devices/cpu/hd61700/hd61700.h @@ -33,7 +33,7 @@ class hd61700_cpu_device : public cpu_device { public: // construction/destruction - hd61700_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); + hd61700_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &_clock); auto lcd_ctrl() { return m_lcd_ctrl_cb.bind(); } auto lcd_write() { return m_lcd_write_cb.bind(); } diff --git a/src/devices/cpu/hmcs40/hmcs40.cpp b/src/devices/cpu/hmcs40/hmcs40.cpp index 841e37e1558..1c2f1a29b01 100644 --- a/src/devices/cpu/hmcs40/hmcs40.cpp +++ b/src/devices/cpu/hmcs40/hmcs40.cpp @@ -93,7 +93,7 @@ void hmcs40_cpu_device::data_160x4(address_map &map) // device definitions -hmcs40_cpu_device::hmcs40_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int family, u16 polarity, int stack_levels, int pcwidth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) +hmcs40_cpu_device::hmcs40_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int family, u16 polarity, int stack_levels, int pcwidth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, prgwidth, -1, program) , m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data) @@ -110,56 +110,56 @@ hmcs40_cpu_device::hmcs40_cpu_device(const machine_config &mconfig, device_type { } -hmcs43_cpu_device::hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 polarity) +hmcs43_cpu_device::hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 polarity) : hmcs40_cpu_device(mconfig, type, tag, owner, clock, HMCS40_FAMILY_HMCS43, polarity, 3 /* stack levels */, 10 /* pc width */, 11 /* prg width */, address_map_constructor(FUNC(hmcs43_cpu_device::program_1k), this), 7 /* data width */, address_map_constructor(FUNC(hmcs43_cpu_device::data_80x4), this)) { } -hd38750_device::hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd38750_device::hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs43_cpu_device(mconfig, HD38750, tag, owner, clock, IS_PMOS) { } -hd38755_device::hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd38755_device::hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs43_cpu_device(mconfig, HD38755, tag, owner, clock, IS_PMOS) { } -hd44750_device::hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd44750_device::hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs43_cpu_device(mconfig, HD44750, tag, owner, clock, IS_CMOS) { } -hd44758_device::hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd44758_device::hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs43_cpu_device(mconfig, HD44758, tag, owner, clock, IS_CMOS) { } -hmcs44_cpu_device::hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 polarity) +hmcs44_cpu_device::hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 polarity) : hmcs40_cpu_device(mconfig, type, tag, owner, clock, HMCS40_FAMILY_HMCS44, polarity, 4, 11, 12, address_map_constructor(FUNC(hmcs44_cpu_device::program_2k), this), 8, address_map_constructor(FUNC(hmcs44_cpu_device::data_160x4), this)) { } -hd38800_device::hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd38800_device::hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs44_cpu_device(mconfig, HD38800, tag, owner, clock, IS_PMOS) { } -hd38805_device::hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd38805_device::hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs44_cpu_device(mconfig, HD38805, tag, owner, clock, IS_PMOS) { } -hd44801_device::hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd44801_device::hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs44_cpu_device(mconfig, HD44801, tag, owner, clock, IS_CMOS) { } -hd44808_device::hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd44808_device::hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs44_cpu_device(mconfig, HD44808, tag, owner, clock, IS_CMOS) { } -hmcs45_cpu_device::hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 polarity) +hmcs45_cpu_device::hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 polarity) : hmcs40_cpu_device(mconfig, type, tag, owner, clock, HMCS40_FAMILY_HMCS45, polarity, 4, 11, 12, address_map_constructor(FUNC(hmcs45_cpu_device::program_2k), this), 8, address_map_constructor(FUNC(hmcs45_cpu_device::data_160x4), this)) { } -hd38820_device::hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd38820_device::hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs45_cpu_device(mconfig, HD38820, tag, owner, clock, IS_PMOS) { } -hd38825_device::hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd38825_device::hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs45_cpu_device(mconfig, HD38825, tag, owner, clock, IS_PMOS) { } -hd44820_device::hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd44820_device::hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs45_cpu_device(mconfig, HD44820, tag, owner, clock, IS_CMOS) { } -hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hmcs45_cpu_device(mconfig, HD44828, tag, owner, clock, IS_CMOS) { } diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h index 0738eab209a..ac0ae2f75c0 100644 --- a/src/devices/cpu/hmcs40/hmcs40.h +++ b/src/devices/cpu/hmcs40/hmcs40.h @@ -101,7 +101,7 @@ protected: }; // construction/destruction - hmcs40_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int family, u16 polarity, int stack_levels, int pcwidth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + hmcs40_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int family, u16 polarity, int stack_levels, int pcwidth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; @@ -302,7 +302,7 @@ protected: class hmcs43_cpu_device : public hmcs40_cpu_device { protected: - hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 polarity); + hmcs43_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 polarity); // overrides virtual u8 read_r(int index) override; @@ -313,32 +313,32 @@ protected: class hd38750_device : public hmcs43_cpu_device { public: - hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd38750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd38755_device : public hmcs43_cpu_device { public: - hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd38755_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd44750_device : public hmcs43_cpu_device { public: - hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd44750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd44758_device : public hmcs43_cpu_device { public: - hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd44758_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hmcs44_cpu_device : public hmcs40_cpu_device { protected: - hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 polarity); + hmcs44_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 polarity); // overrides virtual u8 read_r(int index) override; @@ -348,32 +348,32 @@ protected: class hd38800_device : public hmcs44_cpu_device { public: - hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd38800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd38805_device : public hmcs44_cpu_device { public: - hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd38805_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd44801_device : public hmcs44_cpu_device { public: - hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd44801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd44808_device : public hmcs44_cpu_device { public: - hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd44808_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hmcs45_cpu_device : public hmcs40_cpu_device { protected: - hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 polarity); + hmcs45_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 polarity); // overrides virtual u8 read_r(int index) override; @@ -383,25 +383,25 @@ protected: class hd38820_device : public hmcs45_cpu_device { public: - hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd38820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd38825_device : public hmcs45_cpu_device { public: - hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd38825_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd44820_device : public hmcs45_cpu_device { public: - hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd44820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd44828_device : public hmcs45_cpu_device { public: - hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd44828_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/hpc/hpc.cpp b/src/devices/cpu/hpc/hpc.cpp index 399ca9164af..60de068da6b 100644 --- a/src/devices/cpu/hpc/hpc.cpp +++ b/src/devices/cpu/hpc/hpc.cpp @@ -65,7 +65,7 @@ std::unique_ptr hpc46104_device::create_disassembler() } -hpc_device::hpc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +hpc_device::hpc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0, map) , m_program(nullptr) @@ -75,12 +75,12 @@ hpc_device::hpc_device(const machine_config &mconfig, device_type type, const ch { } -hpc46003_device::hpc46003_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hpc46003_device::hpc46003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hpc_device(mconfig, HPC46003, tag, owner, clock, address_map_constructor(FUNC(hpc46003_device::internal_map), this)) { } -hpc46104_device::hpc46104_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hpc46104_device::hpc46104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hpc_device(mconfig, HPC46104, tag, owner, clock, address_map_constructor(FUNC(hpc46104_device::internal_map), this)) { } diff --git a/src/devices/cpu/hpc/hpc.h b/src/devices/cpu/hpc/hpc.h index 5f73a0ee2e6..685bae90c61 100644 --- a/src/devices/cpu/hpc/hpc.h +++ b/src/devices/cpu/hpc/hpc.h @@ -22,7 +22,7 @@ public: protected: // construction/destruction - hpc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map); + hpc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map); // device-level overrides virtual void device_start() override; @@ -56,7 +56,7 @@ class hpc46003_device : public hpc_device { public: // construction/destruction - hpc46003_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hpc46003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -70,7 +70,7 @@ class hpc46104_device : public hpc_device { public: // construction/destruction - hpc46104_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hpc46104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp index a4eb434167a..eedfcee51bb 100644 --- a/src/devices/cpu/hphybrid/hphybrid.cpp +++ b/src/devices/cpu/hphybrid/hphybrid.cpp @@ -166,7 +166,7 @@ WRITE_LINE_MEMBER(hp_hybrid_cpu_device::flag_w) BIT_CLR(m_flags, HPHYBRID_FLG_BIT); } -hp_hybrid_cpu_device::hp_hybrid_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t addrwidth) +hp_hybrid_cpu_device::hp_hybrid_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t addrwidth) : cpu_device(mconfig, type, tag, owner, clock) , m_pa_changed_func(*this) , m_opcode_func(*this) @@ -1525,12 +1525,12 @@ void hp_hybrid_cpu_device::do_mpy() // ******************************************************************************** // hp_5061_3011_cpu_device // ******************************************************************************** -hp_5061_3011_cpu_device::hp_5061_3011_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_5061_3011_cpu_device::hp_5061_3011_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hp_hybrid_cpu_device(mconfig, HP_5061_3011, tag, owner, clock, 16) { } -hp_5061_3011_cpu_device::hp_5061_3011_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t addrwidth) +hp_5061_3011_cpu_device::hp_5061_3011_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t addrwidth) : hp_hybrid_cpu_device(mconfig, type, tag, owner, clock, addrwidth) { } @@ -1728,7 +1728,7 @@ std::unique_ptr hp_5061_3011_cpu_device::create_disassem // ******************************************************************************** // hp_5061_3001_cpu_device // ******************************************************************************** -hp_5061_3001_cpu_device::hp_5061_3001_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_5061_3001_cpu_device::hp_5061_3001_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hp_5061_3011_cpu_device(mconfig, HP_5061_3001, tag, owner, clock, 22) { } @@ -1922,7 +1922,7 @@ void hp_5061_3001_cpu_device::enter_isr() // ******************************************************************************** // hp_09825_67907_cpu_device // ******************************************************************************** -hp_09825_67907_cpu_device::hp_09825_67907_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_09825_67907_cpu_device::hp_09825_67907_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hp_hybrid_cpu_device(mconfig , HP_09825_67907 , tag , owner , clock , 15) { } diff --git a/src/devices/cpu/hphybrid/hphybrid.h b/src/devices/cpu/hphybrid/hphybrid.h index 3864282245d..041e4b8e06f 100644 --- a/src/devices/cpu/hphybrid/hphybrid.h +++ b/src/devices/cpu/hphybrid/hphybrid.h @@ -95,7 +95,7 @@ public: template void set_int_cb(T &&... args) { m_int_func.set(std::forward(args)...); } protected: - hp_hybrid_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t addrwidth); + hp_hybrid_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t addrwidth); // device-level overrides virtual void device_start() override; @@ -230,10 +230,10 @@ private: class hp_5061_3011_cpu_device : public hp_hybrid_cpu_device { public: - hp_5061_3011_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_5061_3011_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - hp_5061_3011_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t addrwidth); + hp_5061_3011_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t addrwidth); // TODO: fix virtual uint32_t execute_max_cycles() const noexcept override { return 25; } virtual bool execute_no_bpc(uint16_t opcode , uint16_t& next_pc) override; @@ -248,7 +248,7 @@ protected: class hp_5061_3001_cpu_device : public hp_5061_3011_cpu_device { public: - hp_5061_3001_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_5061_3001_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Set boot mode of 5061-3001: either normal (false) or as in HP9845 system (true) void set_9845_boot_mode(bool mode) { m_boot_mode = mode; } @@ -275,7 +275,7 @@ private: class hp_09825_67907_cpu_device : public hp_hybrid_cpu_device { public: - hp_09825_67907_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_09825_67907_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/i386/athlon.cpp b/src/devices/cpu/i386/athlon.cpp index dddfa80fa35..692f0e4d1d1 100644 --- a/src/devices/cpu/i386/athlon.cpp +++ b/src/devices/cpu/i386/athlon.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(ATHLONXP, athlonxp_device, "athlonxp", "Amd Athlon XP") -athlonxp_device::athlonxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +athlonxp_device::athlonxp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pentium_device(mconfig, ATHLONXP, tag, owner, clock) , m_data_config("mmio", ENDIANNESS_LITTLE, 32, 32, 0, 32, 12) , m_opcodes_config("debugger", ENDIANNESS_LITTLE, 32, 32, 0, 32, 12) diff --git a/src/devices/cpu/i386/athlon.h b/src/devices/cpu/i386/athlon.h index 69cc6d84794..9c41b90cd2a 100644 --- a/src/devices/cpu/i386/athlon.h +++ b/src/devices/cpu/i386/athlon.h @@ -13,7 +13,7 @@ class athlonxp_device : public pentium_device { public: // construction/destruction - athlonxp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + athlonxp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void opcode_cpuid() override; diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp index 152691db3c3..81765619596 100644 --- a/src/devices/cpu/i386/i386.cpp +++ b/src/devices/cpu/i386/i386.cpp @@ -44,13 +44,13 @@ DEFINE_DEVICE_TYPE(PENTIUM3, pentium3_device, "pentium3", "Intel Pentiu DEFINE_DEVICE_TYPE(PENTIUM4, pentium4_device, "pentium4", "Intel Pentium 4") -i386_device::i386_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i386_device::i386_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i386_device(mconfig, I386, tag, owner, clock, 32, 32, 32) { } -i386_device::i386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_data_width, int program_addr_width, int io_data_width) +i386_device::i386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_data_width, int program_addr_width, int io_data_width) : cpu_device(mconfig, type, tag, owner, clock) , device_vtlb_interface(mconfig, *this, AS_PROGRAM) , m_program_config("program", ENDIANNESS_LITTLE, program_data_width, program_addr_width, 0, 32, 12) @@ -62,75 +62,75 @@ i386_device::i386_device(const machine_config &mconfig, device_type type, const set_vtlb_dynamic_entries(32); } -i386sx_device::i386sx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i386sx_device::i386sx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i386_device(mconfig, I386SX, tag, owner, clock, 16, 24, 16) { } -i486_device::i486_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i486_device::i486_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i486_device(mconfig, I486, tag, owner, clock) { } -i486_device::i486_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +i486_device::i486_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : i386_device(mconfig, type, tag, owner, clock, 32, 32, 32) { } -i486dx4_device::i486dx4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i486dx4_device::i486dx4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i486_device(mconfig, I486DX4, tag, owner, clock) { } -pentium_device::pentium_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pentium_device::pentium_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pentium_device(mconfig, PENTIUM, tag, owner, clock) { } -pentium_device::pentium_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pentium_device::pentium_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : i386_device(mconfig, type, tag, owner, clock, 32, 32, 32) { // 64 dtlb small, 8 dtlb large, 32 itlb set_vtlb_dynamic_entries(96); } -mediagx_device::mediagx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mediagx_device::mediagx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i386_device(mconfig, MEDIAGX, tag, owner, clock, 32, 32, 32) { } -pentium_pro_device::pentium_pro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pentium_pro_device::pentium_pro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pentium_pro_device(mconfig, PENTIUM_PRO, tag, owner, clock) { } -pentium_pro_device::pentium_pro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pentium_pro_device::pentium_pro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pentium_device(mconfig, type, tag, owner, clock) { } -pentium_mmx_device::pentium_mmx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pentium_mmx_device::pentium_mmx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pentium_device(mconfig, PENTIUM_MMX, tag, owner, clock) { // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large set_vtlb_dynamic_entries(96); } -pentium2_device::pentium2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pentium2_device::pentium2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pentium_pro_device(mconfig, PENTIUM2, tag, owner, clock) { // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large set_vtlb_dynamic_entries(96); } -pentium3_device::pentium3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pentium3_device::pentium3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pentium_pro_device(mconfig, PENTIUM3, tag, owner, clock) { // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large set_vtlb_dynamic_entries(96); } -pentium4_device::pentium4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pentium4_device::pentium4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pentium_device(mconfig, PENTIUM4, tag, owner, clock) { // 128 dtlb, 64 itlb diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h index 60bf5b59b8d..6bb28ee9ff1 100644 --- a/src/devices/cpu/i386/i386.h +++ b/src/devices/cpu/i386/i386.h @@ -29,7 +29,7 @@ class i386_device : public cpu_device, public device_vtlb_interface, public i386 { public: // construction/destruction - i386_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i386_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto smiact() { return m_smiact.bind(); } @@ -42,7 +42,7 @@ public: uint64_t debug_cacheflush(int params, const uint64_t *param); protected: - i386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_data_width, int program_addr_width, int io_data_width); + i386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_data_width, int program_addr_width, int io_data_width); // device-level overrides virtual void device_start() override; @@ -1528,7 +1528,7 @@ class i386sx_device : public i386_device { public: // construction/destruction - i386sx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i386sx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 mem_pr8(offs_t address) override { return macache16.read_byte(address); } @@ -1551,10 +1551,10 @@ class i486_device : public i386_device { public: // construction/destruction - i486_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i486_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - i486_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i486_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -1564,7 +1564,7 @@ class i486dx4_device : public i486_device { public: // construction/destruction - i486dx4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i486dx4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -1575,10 +1575,10 @@ class pentium_device : public i386_device { public: // construction/destruction - pentium_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pentium_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - pentium_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pentium_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual bool execute_input_edge_triggered(int inputnum) const noexcept override { return inputnum == INPUT_LINE_NMI || inputnum == INPUT_LINE_SMI; } virtual void execute_set_input(int inputnum, int state) override; @@ -1593,7 +1593,7 @@ class pentium_mmx_device : public pentium_device { public: // construction/destruction - pentium_mmx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pentium_mmx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -1605,7 +1605,7 @@ class mediagx_device : public i386_device { public: // construction/destruction - mediagx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mediagx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -1617,10 +1617,10 @@ class pentium_pro_device : public pentium_device { public: // construction/destruction - pentium_pro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pentium_pro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - pentium_pro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pentium_pro_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual uint64_t opcode_rdmsr(bool &valid_msr) override; virtual void opcode_wrmsr(uint64_t data, bool &valid_msr) override; @@ -1633,7 +1633,7 @@ class pentium2_device : public pentium_pro_device { public: // construction/destruction - pentium2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pentium2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -1645,7 +1645,7 @@ class pentium3_device : public pentium_pro_device { public: // construction/destruction - pentium3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pentium3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -1659,7 +1659,7 @@ class pentium4_device : public pentium_device { public: // construction/destruction - pentium4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pentium4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint64_t opcode_rdmsr(bool &valid_msr) override; diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp index c404508560b..9ada7fd875b 100644 --- a/src/devices/cpu/i8008/i8008.cpp +++ b/src/devices/cpu/i8008/i8008.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(I8008, i8008_device, "i8008", "Intel 8008") //------------------------------------------------- // i8008_device - constructor //------------------------------------------------- -i8008_device::i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8008_device::i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, I8008, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 14) , m_io_config("io", ENDIANNESS_LITTLE, 8, 16) diff --git a/src/devices/cpu/i8008/i8008.h b/src/devices/cpu/i8008/i8008.h index 5b7882f7958..a10d9cf882d 100644 --- a/src/devices/cpu/i8008/i8008.h +++ b/src/devices/cpu/i8008/i8008.h @@ -14,7 +14,7 @@ class i8008_device : public cpu_device { public: // construction/destruction - i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp index 9dc530c0567..646f0471032 100644 --- a/src/devices/cpu/i8085/i8085.cpp +++ b/src/devices/cpu/i8085/i8085.cpp @@ -201,12 +201,12 @@ DEFINE_DEVICE_TYPE(I8080A, i8080a_cpu_device, "i8080a", "Intel 8080A") DEFINE_DEVICE_TYPE(I8085A, i8085a_cpu_device, "i8085a", "Intel 8085A") -i8085a_cpu_device::i8085a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8085a_cpu_device::i8085a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8085a_cpu_device(mconfig, I8085A, tag, owner, clock, CPUTYPE_8085A) { } -i8085a_cpu_device::i8085a_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int cputype) +i8085a_cpu_device::i8085a_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cputype) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0) , m_io_config("io", ENDIANNESS_LITTLE, 8, 8, 0) @@ -221,12 +221,12 @@ i8085a_cpu_device::i8085a_cpu_device(const machine_config &mconfig, device_type { } -i8080_cpu_device::i8080_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8080_cpu_device::i8080_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8085a_cpu_device(mconfig, I8080, tag, owner, clock, CPUTYPE_8080) { } -i8080a_cpu_device::i8080a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8080a_cpu_device::i8080a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8085a_cpu_device(mconfig, I8080A, tag, owner, clock, CPUTYPE_8080A) { } diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h index 5378a712e5e..66186946a40 100644 --- a/src/devices/cpu/i8085/i8085.h +++ b/src/devices/cpu/i8085/i8085.h @@ -40,7 +40,7 @@ public: static constexpr u8 STATUS_MEMR = 0x80; // construction/destruction - i8085a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8085a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // CLK rate callback (8085A only) template void set_clk_out(T &&... args) { m_clk_out_func.set(std::forward(args)...); } @@ -61,7 +61,7 @@ public: auto out_sod_func() { return m_out_sod_func.bind(); } protected: - i8085a_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int cputype); + i8085a_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cputype); // device-level overrides virtual void device_config_complete() override; @@ -181,7 +181,7 @@ class i8080_cpu_device : public i8085a_cpu_device { public: // construction/destruction - i8080_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8080_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u32 execute_input_lines() const noexcept override { return 1; } @@ -194,7 +194,7 @@ class i8080a_cpu_device : public i8085a_cpu_device { public: // construction/destruction - i8080a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8080a_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u32 execute_input_lines() const noexcept override { return 1; } diff --git a/src/devices/cpu/i8089/i8089.cpp b/src/devices/cpu/i8089/i8089.cpp index 7cc3420a619..3a9d3915536 100644 --- a/src/devices/cpu/i8089/i8089.cpp +++ b/src/devices/cpu/i8089/i8089.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(I8089, i8089_device, "i8089", "Intel 8089 I/O Processor") // i8089_device - constructor //------------------------------------------------- -i8089_device::i8089_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8089_device::i8089_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, I8089, tag, owner, clock), m_icount(0), m_ch1(*this, "1"), @@ -210,8 +210,8 @@ void i8089_device::state_string_export(const device_state_entry &entry, std::str void i8089_device::device_add_mconfig(machine_config &config) { - I8089_CHANNEL(config, m_ch1, 0).sintr().set(FUNC(i8089_device::ch1_sintr_w)); - I8089_CHANNEL(config, m_ch2, 0).sintr().set(FUNC(i8089_device::ch2_sintr_w)); + I8089_CHANNEL(config, m_ch1).sintr().set(FUNC(i8089_device::ch1_sintr_w)); + I8089_CHANNEL(config, m_ch2).sintr().set(FUNC(i8089_device::ch2_sintr_w)); } diff --git a/src/devices/cpu/i8089/i8089.h b/src/devices/cpu/i8089/i8089.h index 19f81136336..36068c8c4e7 100644 --- a/src/devices/cpu/i8089/i8089.h +++ b/src/devices/cpu/i8089/i8089.h @@ -11,20 +11,12 @@ #pragma once -#ifdef _MSC_VER -// MSVC seems to want to actually instantiate templates when it gets an extern template declaration, effectively defeating the purpose of extern template declatations altogether -// In this case it causes a problem because the required_device template can't be instantiated for the incomplete i8089_channel_device type #include "i8089_channel.h" -#endif - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** -// forward declaration -class i8089_channel_device; - // ======================> i8089_device class i8089_device : public cpu_device @@ -33,7 +25,7 @@ class i8089_device : public cpu_device public: // construction/destruction - i8089_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8089_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto sintr1() { return m_write_sintr1.bind(); } diff --git a/src/devices/cpu/i8089/i8089_channel.cpp b/src/devices/cpu/i8089/i8089_channel.cpp index d13606a1ca5..fd88674fb86 100644 --- a/src/devices/cpu/i8089/i8089_channel.cpp +++ b/src/devices/cpu/i8089/i8089_channel.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(I8089_CHANNEL, i8089_channel_device, "i8089_channel", "Intel // i8089_channel_device - constructor //------------------------------------------------- -i8089_channel_device::i8089_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8089_channel_device::i8089_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8089_CHANNEL, tag, owner, clock), m_write_sintr(*this), m_iop(nullptr), diff --git a/src/devices/cpu/i8089/i8089_channel.h b/src/devices/cpu/i8089/i8089_channel.h index 89aa511193b..c7d7d8aeac4 100644 --- a/src/devices/cpu/i8089/i8089_channel.h +++ b/src/devices/cpu/i8089/i8089_channel.h @@ -25,7 +25,7 @@ class i8089_channel_device : public device_t { public: // construction/destruction - i8089_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8089_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto sintr() { return m_write_sintr.bind(); } diff --git a/src/devices/cpu/i86/i186.cpp b/src/devices/cpu/i86/i186.cpp index 2847607a278..77465ea053c 100644 --- a/src/devices/cpu/i86/i186.cpp +++ b/src/devices/cpu/i86/i186.cpp @@ -133,27 +133,27 @@ DEFINE_DEVICE_TYPE(I80188, i80188_cpu_device, "i80188", "Intel 80188") DEFINE_DEVICE_TYPE(AM186EM, am186em_device, "am186em", "AMD Am186EM") DEFINE_DEVICE_TYPE(AM188EM, am188em_device, "am188em", "AMD Am188EM") -i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80186_cpu_device(mconfig, I80186, tag, owner, clock, 16) { } -i80188_cpu_device::i80188_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80188_cpu_device::i80188_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80186_cpu_device(mconfig, I80188, tag, owner, clock, 8) { } -am186em_device::am186em_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am186em_device::am186em_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80186_cpu_device(mconfig, AM186EM, tag, owner, clock, 16) { } -am188em_device::am188em_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am188em_device::am188em_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80186_cpu_device(mconfig, AM188EM, tag, owner, clock, 8) { } -i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size) +i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_bus_size) : i8086_common_cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, data_bus_size, 20, 0) , m_opcodes_config("opcodes", ENDIANNESS_LITTLE, data_bus_size, 20, 0) diff --git a/src/devices/cpu/i86/i186.h b/src/devices/cpu/i86/i186.h index f1b8c4633ea..8dda202b4bc 100644 --- a/src/devices/cpu/i86/i186.h +++ b/src/devices/cpu/i86/i186.h @@ -16,7 +16,7 @@ class i80186_cpu_device : public i8086_common_cpu_device { public: // construction/destruction - i80186_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80186_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_slave_ack_callback() { return m_read_slave_ack_func.bind(); } auto chip_select_callback() { return m_out_chip_select_func.bind(); } @@ -60,7 +60,7 @@ protected: I80186_POLLSTS }; - i80186_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size); + i80186_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_bus_size); // device_execute_interface overrides virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return (clocks / 2); } @@ -168,14 +168,14 @@ class i80188_cpu_device : public i80186_cpu_device { public: // construction/destruction - i80188_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80188_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class am186em_device : public i80186_cpu_device { public: // construction/destruction - am186em_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am186em_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides @@ -187,7 +187,7 @@ class am188em_device : public i80186_cpu_device { public: // construction/destruction - am188em_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am188em_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides diff --git a/src/devices/cpu/i86/i286.cpp b/src/devices/cpu/i86/i286.cpp index 2d2f2d1b650..d56b4f99895 100644 --- a/src/devices/cpu/i86/i286.cpp +++ b/src/devices/cpu/i86/i286.cpp @@ -166,7 +166,7 @@ const uint8_t i80286_cpu_device::m_i80286_timing[] = DEFINE_DEVICE_TYPE(I80286, i80286_cpu_device, "i80286", "Intel 80286") -i80286_cpu_device::i80286_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80286_cpu_device::i80286_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8086_common_cpu_device(mconfig, I80286, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0) , m_opcodes_config("opcodes", ENDIANNESS_LITTLE, 16, 24, 0) diff --git a/src/devices/cpu/i86/i286.h b/src/devices/cpu/i86/i286.h index 489e7beb099..1454f14c67e 100644 --- a/src/devices/cpu/i86/i286.h +++ b/src/devices/cpu/i86/i286.h @@ -76,7 +76,7 @@ class i80286_cpu_device : public i8086_common_cpu_device { public: // construction/destruction - i80286_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80286_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_memory_interface overrides virtual space_config_vector memory_space_config() const override; diff --git a/src/devices/cpu/i86/i86.cpp b/src/devices/cpu/i86/i86.cpp index fd85830e86b..446ce7981dc 100644 --- a/src/devices/cpu/i86/i86.cpp +++ b/src/devices/cpu/i86/i86.cpp @@ -90,19 +90,19 @@ const uint8_t i8086_cpu_device::m_i8086_timing[] = DEFINE_DEVICE_TYPE(I8086, i8086_cpu_device, "i8086", "Intel 8086") DEFINE_DEVICE_TYPE(I8088, i8088_cpu_device, "i8088", "Intel 8088") -i8088_cpu_device::i8088_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8088_cpu_device::i8088_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8086_cpu_device(mconfig, I8088, tag, owner, clock, 8) { memcpy(m_timing, m_i8086_timing, sizeof(m_i8086_timing)); } -i8086_cpu_device::i8086_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8086_cpu_device::i8086_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8086_cpu_device(mconfig, I8086, tag, owner, clock, 16) { memcpy(m_timing, m_i8086_timing, sizeof(m_i8086_timing)); } -i8086_cpu_device::i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size) +i8086_cpu_device::i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_bus_size) : i8086_common_cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, data_bus_size, 20, 0) , m_opcodes_config("opcodes", ENDIANNESS_LITTLE, data_bus_size, 20, 0) @@ -362,7 +362,7 @@ void i8086_cpu_device::device_start() state_add( I8086_HALT, "HALT", m_halt ).mask(1); } -i8086_common_cpu_device::i8086_common_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +i8086_common_cpu_device::i8086_common_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_ip(0) , m_TF(0) diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h index f08a8e0c2ba..a3fb2ab4fd8 100644 --- a/src/devices/cpu/i86/i86.h +++ b/src/devices/cpu/i86/i86.h @@ -108,7 +108,7 @@ protected: enum WREGS { AX=0, CX, DX, BX, SP, BP, SI, DI }; // construction/destruction - i8086_common_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i8086_common_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -345,7 +345,7 @@ public: AS_EXTRA }; // construction/destruction - i8086_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8086_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_memory_interface overrides virtual space_config_vector memory_space_config() const override; @@ -354,7 +354,7 @@ public: auto esc_data_handler() { return m_esc_data_handler.bind(); } protected: - i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size); + i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_bus_size); virtual void execute_run() override; virtual void device_start() override; @@ -387,7 +387,7 @@ class i8088_cpu_device : public i8086_cpu_device { public: // construction/destruction - i8088_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8088_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/i860/i860.cpp b/src/devices/cpu/i860/i860.cpp index 0cef6e6bec4..9f56afa8ea4 100644 --- a/src/devices/cpu/i860/i860.cpp +++ b/src/devices/cpu/i860/i860.cpp @@ -34,7 +34,7 @@ enum { DEFINE_DEVICE_TYPE(I860, i860_cpu_device, "i860xr", "Intel i860XR") -i860_cpu_device::i860_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i860_cpu_device::i860_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, I860, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 64, 32, 0) , m_pc(0), m_merge(0), m_pin_bus_hold(0), m_pin_reset(0), m_exiting_readmem(0), m_exiting_ifetch(0), m_pc_updated(0), m_pending_trap(0), m_fir_gets_trap_addr(0), m_single_stepping(0), m_program(nullptr), m_icount(0) diff --git a/src/devices/cpu/i860/i860.h b/src/devices/cpu/i860/i860.h index 3f37dda5b87..a9207ad3491 100644 --- a/src/devices/cpu/i860/i860.h +++ b/src/devices/cpu/i860/i860.h @@ -24,7 +24,7 @@ class i860_cpu_device : public cpu_device { public: // construction/destruction - i860_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i860_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* This is the external interface for asserting an external interrupt to the i860. */ diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp index 7d87f4955b0..d89689826c4 100644 --- a/src/devices/cpu/i960/i960.cpp +++ b/src/devices/cpu/i960/i960.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(I960, i960_cpu_device, "i960kb", "Intel i960KB") -i960_cpu_device::i960_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i960_cpu_device::i960_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, I960, tag, owner, clock) , m_stalled(false), m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) , m_rcache_pos(0), m_SAT(0), m_PRCB(0), m_PC(0), m_AC(0), m_IP(0), m_PIP(0), m_ICR(0), m_immediate_irq(0) diff --git a/src/devices/cpu/i960/i960.h b/src/devices/cpu/i960/i960.h index 1efab1d328a..e8fa1dfff2f 100644 --- a/src/devices/cpu/i960/i960.h +++ b/src/devices/cpu/i960/i960.h @@ -69,7 +69,7 @@ public: static constexpr uint16_t BURST = 0x0001; // construction/destruction - i960_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i960_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void i960_stall() { diff --git a/src/devices/cpu/ie15/ie15.cpp b/src/devices/cpu/ie15/ie15.cpp index d3db6f0ef1b..0bed6be6070 100644 --- a/src/devices/cpu/ie15/ie15.cpp +++ b/src/devices/cpu/ie15/ie15.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(IE15_CPU, ie15_cpu_device, "ie15_cpu", "ie15 CPU") //------------------------------------------------- // ie15_cpu_device - constructor //------------------------------------------------- -ie15_cpu_device::ie15_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ie15_cpu_device::ie15_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, IE15_CPU, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 14) , m_io_config("io", ENDIANNESS_LITTLE, 8, 8), m_A(0), m_CF(0), m_ZF(0), m_RF(0), m_flags(0) diff --git a/src/devices/cpu/ie15/ie15.h b/src/devices/cpu/ie15/ie15.h index a0885ce55f1..b07c7741e41 100644 --- a/src/devices/cpu/ie15/ie15.h +++ b/src/devices/cpu/ie15/ie15.h @@ -13,7 +13,7 @@ class ie15_cpu_device : public cpu_device { public: // construction/destruction - ie15_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ie15_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum diff --git a/src/devices/cpu/jaguar/jaguar.cpp b/src/devices/cpu/jaguar/jaguar.cpp index 84d5a999dbb..504fab20b10 100644 --- a/src/devices/cpu/jaguar/jaguar.cpp +++ b/src/devices/cpu/jaguar/jaguar.cpp @@ -149,7 +149,7 @@ DEFINE_DEVICE_TYPE(JAGUARGPU, jaguargpu_cpu_device, "jaguargpu", "Motorola Atari DEFINE_DEVICE_TYPE(JAGUARDSP, jaguardsp_cpu_device, "jaguardsp", "Motorola Atari Jaguar DSP \"Jerry\"") -jaguar_cpu_device::jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 version, bool isdsp, address_map_constructor io_map) +jaguar_cpu_device::jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 version, bool isdsp, address_map_constructor io_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 24, 0) , m_io_config("io", ENDIANNESS_BIG, 32, 8, 0, io_map) @@ -190,13 +190,13 @@ jaguar_cpu_device::jaguar_cpu_device(const machine_config &mconfig, device_type } -jaguargpu_cpu_device::jaguargpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +jaguargpu_cpu_device::jaguargpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jaguar_cpu_device(mconfig, JAGUARGPU, tag, owner, clock, 2, false, address_map_constructor(FUNC(jaguargpu_cpu_device::io_map), this)) { } -jaguardsp_cpu_device::jaguardsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +jaguardsp_cpu_device::jaguardsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jaguar_cpu_device(mconfig, JAGUARDSP, tag, owner, clock, 2, true, address_map_constructor(FUNC(jaguardsp_cpu_device::io_map), this)) { } diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h index 90ee5aef405..b034fc05895 100644 --- a/src/devices/cpu/jaguar/jaguar.h +++ b/src/devices/cpu/jaguar/jaguar.h @@ -64,7 +64,7 @@ public: DECLARE_WRITE_LINE_MEMBER(go_w); protected: - jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 version, bool isdsp, address_map_constructor io_map); + jaguar_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 version, bool isdsp, address_map_constructor io_map); // device-level overrides virtual void device_start() override; @@ -270,7 +270,7 @@ class jaguargpu_cpu_device : public jaguar_cpu_device { public: // construction/destruction - jaguargpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + jaguargpu_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void io_map(address_map &map); @@ -287,7 +287,7 @@ class jaguardsp_cpu_device : public jaguar_cpu_device { public: // construction/destruction - jaguardsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + jaguardsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void io_map(address_map &map); diff --git a/src/devices/cpu/ks0164/ks0164.cpp b/src/devices/cpu/ks0164/ks0164.cpp index 5b8f57fb776..ca8eabe5cd4 100644 --- a/src/devices/cpu/ks0164/ks0164.cpp +++ b/src/devices/cpu/ks0164/ks0164.cpp @@ -14,7 +14,7 @@ const u16 ks0164_cpu_device::imask[16] = { 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff }; -ks0164_cpu_device::ks0164_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ks0164_cpu_device::ks0164_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, KS0164CPU, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 16) { diff --git a/src/devices/cpu/ks0164/ks0164.h b/src/devices/cpu/ks0164/ks0164.h index 1df7e6f5e4b..e4a046d8080 100644 --- a/src/devices/cpu/ks0164/ks0164.h +++ b/src/devices/cpu/ks0164/ks0164.h @@ -11,7 +11,7 @@ class ks0164_cpu_device : public cpu_device { public: - ks0164_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ks0164_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum { diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp index d0ab5bbc19d..452b3d118f8 100644 --- a/src/devices/cpu/lc8670/lc8670.cpp +++ b/src/devices/cpu/lc8670/lc8670.cpp @@ -170,7 +170,7 @@ void lc8670_cpu_device::lc8670_internal_map(address_map &map) // lc8670_cpu_device - constructor //------------------------------------------------- -lc8670_cpu_device::lc8670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lc8670_cpu_device::lc8670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, LC8670, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0) , m_data_config("data", ENDIANNESS_BIG, 8, 9, 0, address_map_constructor(FUNC(lc8670_cpu_device::lc8670_internal_map), this)) diff --git a/src/devices/cpu/lc8670/lc8670.h b/src/devices/cpu/lc8670/lc8670.h index a00658a7d4d..946850e1957 100644 --- a/src/devices/cpu/lc8670/lc8670.h +++ b/src/devices/cpu/lc8670/lc8670.h @@ -68,7 +68,7 @@ public: void xram_w(offs_t offset, uint8_t data); // configuration helpers - void set_cpu_clock(clock_source source, uint32_t clock) { m_clocks[unsigned(source)] = clock; } + void set_cpu_clock(clock_source source, const XTAL &clock) { m_clocks[unsigned(source)] = clock; } void set_cpu_clock(clock_source source, const XTAL &clock) { set_cpu_clock(source, clock.value()); } template void set_clock_sources(T &&sub_clock, U &&rc_clock, V &&cf_clock) diff --git a/src/devices/cpu/lh5801/lh5801.cpp b/src/devices/cpu/lh5801/lh5801.cpp index 3f9045ae57e..ce7e8f7610b 100644 --- a/src/devices/cpu/lh5801/lh5801.cpp +++ b/src/devices/cpu/lh5801/lh5801.cpp @@ -65,7 +65,7 @@ enum DEFINE_DEVICE_TYPE(LH5801, lh5801_cpu_device, "lh5801", "Sharp LH5801") -lh5801_cpu_device::lh5801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lh5801_cpu_device::lh5801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, LH5801, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0) , m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0) diff --git a/src/devices/cpu/lh5801/lh5801.h b/src/devices/cpu/lh5801/lh5801.h index 68c028289af..9f9a20376a4 100644 --- a/src/devices/cpu/lh5801/lh5801.h +++ b/src/devices/cpu/lh5801/lh5801.h @@ -64,7 +64,7 @@ class lh5801_cpu_device : public cpu_device { public: // construction/destruction - lh5801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lh5801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto in_func() { return m_in_func.bind(); } diff --git a/src/devices/cpu/lr35902/lr35902.cpp b/src/devices/cpu/lr35902/lr35902.cpp index 86eba6464d2..227eda6c369 100644 --- a/src/devices/cpu/lr35902/lr35902.cpp +++ b/src/devices/cpu/lr35902/lr35902.cpp @@ -63,7 +63,7 @@ enum lr35902_flag DEFINE_DEVICE_TYPE(LR35902, lr35902_cpu_device, "lr35902", "Sharp LR35902") -lr35902_cpu_device::lr35902_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lr35902_cpu_device::lr35902_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, LR35902, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0) , m_A(0) diff --git a/src/devices/cpu/lr35902/lr35902.h b/src/devices/cpu/lr35902/lr35902.h index f723213137c..75f36d09486 100644 --- a/src/devices/cpu/lr35902/lr35902.h +++ b/src/devices/cpu/lr35902/lr35902.h @@ -20,7 +20,7 @@ class lr35902_cpu_device : public cpu_device { public: // construction/destruction - lr35902_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); + lr35902_cpu_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &_clock); // configuration helpers auto timer_cb() { return m_timer_func.bind(); } diff --git a/src/devices/cpu/m37710/m37710.cpp b/src/devices/cpu/m37710/m37710.cpp index 6ca096d1e4f..9d0ed9ea66b 100644 --- a/src/devices/cpu/m37710/m37710.cpp +++ b/src/devices/cpu/m37710/m37710.cpp @@ -334,7 +334,7 @@ void m37732s4_device::map(address_map &map) // many other combinations of RAM and ROM size exist -m37710_cpu_device::m37710_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate) +m37710_cpu_device::m37710_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0, map_delegate) , m_port_in_cb(*this) @@ -344,40 +344,40 @@ m37710_cpu_device::m37710_cpu_device(const machine_config &mconfig, device_type } -m37702m2_device::m37702m2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m37702m2_device::m37702m2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37702m2_device(mconfig, M37702M2, tag, owner, clock) { } -m37702m2_device::m37702m2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +m37702m2_device::m37702m2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m37710_cpu_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(m37702m2_device::map), this)) { } -m37702s1_device::m37702s1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m37702s1_device::m37702s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37710_cpu_device(mconfig, M37702S1, tag, owner, clock, address_map_constructor(FUNC(m37702s1_device::map), this)) { } -m37710s4_device::m37710s4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m37710s4_device::m37710s4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37710_cpu_device(mconfig, M37710S4, tag, owner, clock, address_map_constructor(FUNC(m37710s4_device::map), this)) { } -m37720s1_device::m37720s1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m37720s1_device::m37720s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37710_cpu_device(mconfig, M37720S1, tag, owner, clock, address_map_constructor(FUNC(m37720s1_device::map), this)) { } -m37730s2_device::m37730s2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m37730s2_device::m37730s2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37710_cpu_device(mconfig, M37730S2, tag, owner, clock, address_map_constructor(FUNC(m37730s2_device::map), this)) { } -m37732s4_device::m37732s4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m37732s4_device::m37732s4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37710_cpu_device(mconfig, M37732S4, tag, owner, clock, address_map_constructor(FUNC(m37732s4_device::map), this)) { } diff --git a/src/devices/cpu/m37710/m37710.h b/src/devices/cpu/m37710/m37710.h index 6426c2eb54f..3ac8036c81c 100644 --- a/src/devices/cpu/m37710/m37710.h +++ b/src/devices/cpu/m37710/m37710.h @@ -197,7 +197,7 @@ protected: void set_int_control(int level, uint8_t data); // construction/destruction - m37710_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor map_delegate); + m37710_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map_delegate); // device-level overrides virtual void device_start() override; @@ -2144,7 +2144,7 @@ class m37702s1_device : public m37710_cpu_device { public: // construction/destruction - m37702s1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37702s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void map(address_map &map); }; @@ -2153,9 +2153,9 @@ class m37702m2_device : public m37710_cpu_device { public: // construction/destruction - m37702m2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37702m2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - m37702m2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m37702m2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); }; @@ -2163,7 +2163,7 @@ class m37710s4_device : public m37710_cpu_device { public: // construction/destruction - m37710s4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37710s4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void map(address_map &map); }; @@ -2172,7 +2172,7 @@ class m37720s1_device : public m37710_cpu_device { public: // construction/destruction - m37720s1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37720s1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void map(address_map &map); }; @@ -2181,7 +2181,7 @@ class m37730s2_device : public m37710_cpu_device { public: // construction/destruction - m37730s2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37730s2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void map(address_map &map); }; @@ -2190,7 +2190,7 @@ class m37732s4_device : public m37710_cpu_device { public: // construction/destruction - m37732s4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37732s4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void map(address_map &map); }; diff --git a/src/devices/cpu/m6502/deco16.cpp b/src/devices/cpu/m6502/deco16.cpp index acd9983cc12..0b16a6db8b3 100644 --- a/src/devices/cpu/m6502/deco16.cpp +++ b/src/devices/cpu/m6502/deco16.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(DECO16, deco16_device, "deco16", "Data East DECO16") -deco16_device::deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +deco16_device::deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, DECO16, tag, owner, clock), io(nullptr), io_config("io", ENDIANNESS_LITTLE, 8, 16) diff --git a/src/devices/cpu/m6502/deco16.h b/src/devices/cpu/m6502/deco16.h index 63494f6b1d4..0d170f43df0 100644 --- a/src/devices/cpu/m6502/deco16.h +++ b/src/devices/cpu/m6502/deco16.h @@ -16,7 +16,7 @@ class deco16_device : public m6502_device { public: - deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m6502/m3745x.cpp b/src/devices/cpu/m6502/m3745x.cpp index 20b881f217e..60c23046544 100644 --- a/src/devices/cpu/m6502/m3745x.cpp +++ b/src/devices/cpu/m6502/m3745x.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(M37450, m37450_device, "m37450", "Mitsubishi M37450") //------------------------------------------------- // m3745x_device - constructor //------------------------------------------------- -m3745x_device::m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map) : +m3745x_device::m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : m740_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, internal_map), m_read_p(*this), @@ -393,12 +393,12 @@ void m37450_device::m37450_map(address_map &map) map(0x0100, 0x01ff).ram(); } -m37450_device::m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m37450_device::m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37450_device(mconfig, M37450, tag, owner, clock) { } -m37450_device::m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m37450_device::m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m3745x_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(m37450_device::m37450_map), this)) { } diff --git a/src/devices/cpu/m6502/m3745x.h b/src/devices/cpu/m6502/m3745x.h index bab3558e0a2..c98c3d32f7c 100644 --- a/src/devices/cpu/m6502/m3745x.h +++ b/src/devices/cpu/m6502/m3745x.h @@ -53,7 +53,7 @@ public: protected: // construction/destruction - m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map); + m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); // device-level overrides virtual void device_start() override; @@ -88,11 +88,11 @@ private: class m37450_device : public m3745x_device { public: - m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void m37450_map(address_map &map); protected: - m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(M37450, m37450_device) diff --git a/src/devices/cpu/m6502/m4510.cpp b/src/devices/cpu/m6502/m4510.cpp index aa29a820dcd..56867b2a3ea 100644 --- a/src/devices/cpu/m6502/m4510.cpp +++ b/src/devices/cpu/m6502/m4510.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(M4510, m4510_device, "m4510", "CSG 4510") -m4510_device::m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m4510_device::m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m65ce02_device(mconfig, M4510, tag, owner, clock), map_enable(0), nomap(false) diff --git a/src/devices/cpu/m6502/m4510.h b/src/devices/cpu/m6502/m4510.h index eb6cf818489..fdbf3831a39 100644 --- a/src/devices/cpu/m6502/m4510.h +++ b/src/devices/cpu/m6502/m4510.h @@ -17,7 +17,7 @@ class m4510_device : public m65ce02_device { public: - m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m6502/m50734.cpp b/src/devices/cpu/m6502/m50734.cpp index b4e31f003c7..bd6cb72cf2f 100644 --- a/src/devices/cpu/m6502/m50734.cpp +++ b/src/devices/cpu/m6502/m50734.cpp @@ -23,7 +23,7 @@ // device type definition DEFINE_DEVICE_TYPE(M50734, m50734_device, "m50734", "Mitsubishi M50734") -m50734_device::m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m50734_device::m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m740_device(mconfig, M50734, tag, owner, clock) , m_data_config("data", ENDIANNESS_LITTLE, 8, 16, 0) , m_port_in_cb(*this) diff --git a/src/devices/cpu/m6502/m50734.h b/src/devices/cpu/m6502/m50734.h index 0c98f86aa31..2e48f4c5cd5 100644 --- a/src/devices/cpu/m6502/m50734.h +++ b/src/devices/cpu/m6502/m50734.h @@ -54,7 +54,7 @@ public: //enum { //}; - m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // port callback configuration auto p0_in_cb() { return m_port_in_cb[0].bind(); } diff --git a/src/devices/cpu/m6502/m5074x.cpp b/src/devices/cpu/m6502/m5074x.cpp index 2d961b694a5..ca272aec3b5 100644 --- a/src/devices/cpu/m6502/m5074x.cpp +++ b/src/devices/cpu/m6502/m5074x.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(M50753, m50753_device, "m50753", "Mitsubishi M50753") //------------------------------------------------- // m5074x_device - constructor //------------------------------------------------- -m5074x_device::m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits, address_map_constructor internal_map) : +m5074x_device::m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, address_map_constructor internal_map) : m740_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, addrbits, 0, internal_map), m_read_p(*this), @@ -231,13 +231,13 @@ void m5074x_device::recalc_timer(int timer) switch (timer) { case 0: - hz = clock() / 16; + hz = clock().value() / 16; hz /= (m_tmr12pre + 2); m_timers[TIMER_1]->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); break; case 1: - hz = clock() / 16; + hz = clock().value() / 16; hz /= (m_tmr12pre + 2); m_timers[TIMER_2]->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); break; @@ -254,7 +254,7 @@ void m5074x_device::recalc_timer(int timer) } else { - hz = clock() / 16; + hz = clock().value() / 16; hz /= (m_tmrxpre + 2); m_timers[TIMER_X]->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); } @@ -458,12 +458,12 @@ void m50740_device::m50740_map(address_map &map) map(0x1400, 0x1fff).rom().region(DEVICE_SELF, 0); } -m50740_device::m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m50740_device::m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m50740_device(mconfig, M50740, tag, owner, clock) { } -m50740_device::m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m50740_device::m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m5074x_device(mconfig, type, tag, owner, clock, 13, address_map_constructor(FUNC(m50740_device::m50740_map), this)) { } @@ -477,12 +477,12 @@ void m50741_device::m50741_map(address_map &map) map(0x1000, 0x1fff).rom().region(DEVICE_SELF, 0); } -m50741_device::m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m50741_device::m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m50741_device(mconfig, M50741, tag, owner, clock) { } -m50741_device::m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m50741_device::m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m5074x_device(mconfig, type, tag, owner, clock, 13, address_map_constructor(FUNC(m50741_device::m50741_map), this)) { } @@ -506,12 +506,12 @@ static constexpr u8 IRQ_50753_INT1REQ = 0x80; static constexpr u8 IRQ_50753_INTADC = 0x20; static constexpr u8 IRQ_50753_INT2REQ = 0x02; -m50753_device::m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m50753_device::m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m50753_device(mconfig, M50753, tag, owner, clock) { } -m50753_device::m50753_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m50753_device::m50753_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m5074x_device(mconfig, type, tag, owner, clock, 16, address_map_constructor(FUNC(m50753_device::m50753_map), this)), m_ad_in(*this), m_in_p(*this), diff --git a/src/devices/cpu/m6502/m5074x.h b/src/devices/cpu/m6502/m5074x.h index 2b860a56e83..21f0b21402b 100644 --- a/src/devices/cpu/m6502/m5074x.h +++ b/src/devices/cpu/m6502/m5074x.h @@ -51,7 +51,7 @@ public: protected: // construction/destruction - m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits, address_map_constructor internal_map); + m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, address_map_constructor internal_map); // device-level overrides virtual void device_start() override; @@ -90,10 +90,10 @@ private: class m50740_device : public m5074x_device { public: - m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void m50740_map(address_map &map); @@ -102,10 +102,10 @@ private: class m50741_device : public m5074x_device { public: - m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void m50741_map(address_map &map); @@ -114,7 +114,7 @@ private: class m50753_device : public m5074x_device { public: - m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { @@ -127,7 +127,7 @@ public: auto read_in_p() { return m_in_p.bind(); } protected: - m50753_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m50753_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/m6502/m6500_1.cpp b/src/devices/cpu/m6502/m6500_1.cpp index 5767899755e..c40582e13b3 100644 --- a/src/devices/cpu/m6502/m6500_1.cpp +++ b/src/devices/cpu/m6502/m6500_1.cpp @@ -91,7 +91,7 @@ constexpr u8 CR_CTRO = 0x80U; DEFINE_DEVICE_TYPE(M6500_1, m6500_1_device, "m6500_1", "MOS Technology 6500/1"); -m6500_1_device::m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m6500_1_device::m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6502_mcu_device(mconfig, M6500_1, tag, owner, clock) , m_port_in_cb{ *this } , m_port_out_cb{ *this } diff --git a/src/devices/cpu/m6502/m6500_1.h b/src/devices/cpu/m6502/m6500_1.h index 0a4a07a6ff9..45cc3acea90 100644 --- a/src/devices/cpu/m6502/m6500_1.h +++ b/src/devices/cpu/m6502/m6500_1.h @@ -44,7 +44,7 @@ class m6500_1_device : public m6502_mcu_device { public: - m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); auto pa_in_cb() { return m_port_in_cb[0].bind(); } auto pb_in_cb() { return m_port_in_cb[1].bind(); } diff --git a/src/devices/cpu/m6502/m6502.cpp b/src/devices/cpu/m6502/m6502.cpp index 55276aeba00..eece2c86708 100644 --- a/src/devices/cpu/m6502/m6502.cpp +++ b/src/devices/cpu/m6502/m6502.cpp @@ -15,17 +15,17 @@ DEFINE_DEVICE_TYPE(M6502, m6502_device, "m6502", "MOS Technology 6502") DEFINE_DEVICE_TYPE(M6512, m6512_device, "m6512", "MOS Technology 6512") -m6502_device::m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6502_device::m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6502, tag, owner, clock) { } -m6512_device::m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6512_device::m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6512, tag, owner, clock) { } -m6502_device::m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m6502_device::m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock), sync_w(*this), program_config("program", ENDIANNESS_LITTLE, 8, 16), @@ -565,7 +565,7 @@ void m6502_device::mi_default14::write(uint16_t adr, uint8_t val) program14.write_byte(adr, val); } -m6502_mcu_device::m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m6502_mcu_device::m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m6502.h b/src/devices/cpu/m6502/m6502.h index 4b05d7a0846..445050e739e 100644 --- a/src/devices/cpu/m6502/m6502.h +++ b/src/devices/cpu/m6502/m6502.h @@ -35,7 +35,7 @@ public: virtual void write_9(uint16_t adr, uint8_t val); }; - m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_address_width(int width, bool custom_interface) { program_config.m_addr_width = width; @@ -54,7 +54,7 @@ public: devcb_write_line sync_w; protected: - m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); class mi_default : public memory_interface { public: @@ -278,7 +278,7 @@ protected: class m6502_mcu_device : public m6502_device { protected: - m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void internal_update() { internal_update(total_cycles()); } virtual void internal_update(uint64_t current_time) = 0; @@ -290,7 +290,7 @@ protected: class m6512_device : public m6502_device { public: - m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m6504.cpp b/src/devices/cpu/m6502/m6504.cpp index 51859f178f5..5d34e784249 100644 --- a/src/devices/cpu/m6502/m6504.cpp +++ b/src/devices/cpu/m6502/m6504.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M6504, m6504_device, "m6504", "MOS Technology 6504") -m6504_device::m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6504_device::m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6504, tag, owner, clock) { program_config.m_addr_width = 13; diff --git a/src/devices/cpu/m6502/m6504.h b/src/devices/cpu/m6502/m6504.h index bf4dee43a76..83dfe25b22c 100644 --- a/src/devices/cpu/m6502/m6504.h +++ b/src/devices/cpu/m6502/m6504.h @@ -15,7 +15,7 @@ class m6504_device : public m6502_device { public: - m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/m6502/m6507.cpp b/src/devices/cpu/m6502/m6507.cpp index 7a102e4b110..6ec2a023881 100644 --- a/src/devices/cpu/m6502/m6507.cpp +++ b/src/devices/cpu/m6502/m6507.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M6507, m6507_device, "m6507", "MOS Technology 6507") -m6507_device::m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6507_device::m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6507, tag, owner, clock) { program_config.m_addr_width = 13; diff --git a/src/devices/cpu/m6502/m6507.h b/src/devices/cpu/m6502/m6507.h index 50466608d2a..037dc7a7c87 100644 --- a/src/devices/cpu/m6502/m6507.h +++ b/src/devices/cpu/m6502/m6507.h @@ -15,7 +15,7 @@ class m6507_device : public m6502_device { public: - m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/m6502/m6509.cpp b/src/devices/cpu/m6502/m6509.cpp index 3ffbeda05fc..212ca66171f 100644 --- a/src/devices/cpu/m6502/m6509.cpp +++ b/src/devices/cpu/m6502/m6509.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(M6509, m6509_device, "m6509", "MOS Technology 6509") -m6509_device::m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6509_device::m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6509, tag, owner, clock), bank_i(0), bank_y(0) { program_config.m_addr_width = 20; diff --git a/src/devices/cpu/m6502/m6509.h b/src/devices/cpu/m6502/m6509.h index 4359c691c0e..d86f14e2d0c 100644 --- a/src/devices/cpu/m6502/m6509.h +++ b/src/devices/cpu/m6502/m6509.h @@ -15,7 +15,7 @@ class m6509_device : public m6502_device { public: - m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; virtual void do_exec_full() override; diff --git a/src/devices/cpu/m6502/m6510.cpp b/src/devices/cpu/m6502/m6510.cpp index 706c1407fcb..2188fa17802 100644 --- a/src/devices/cpu/m6502/m6510.cpp +++ b/src/devices/cpu/m6502/m6510.cpp @@ -18,12 +18,12 @@ DEFINE_DEVICE_TYPE(M6510, m6510_device, "m6510", "MOS Technology 6510") DEFINE_DEVICE_TYPE(M6508, m6508_device, "m6508", "MOS Technology 6508") -m6510_device::m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6510_device::m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M6510, tag, owner, clock) { } -m6510_device::m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m6510_device::m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock), read_port(*this), write_port(*this), dir(0), port(0), drive(0) @@ -151,7 +151,7 @@ void m6510_device::mi_6510::write(uint16_t adr, uint8_t val) } -m6508_device::m6508_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6508_device::m6508_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M6508, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m6510.h b/src/devices/cpu/m6502/m6510.h index 284bc885180..6e96f36bd6d 100644 --- a/src/devices/cpu/m6502/m6510.h +++ b/src/devices/cpu/m6502/m6510.h @@ -16,7 +16,7 @@ class m6510_device : public m6502_device { public: - m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t get_port(); void set_pulls(uint8_t pullup, uint8_t pulldown); @@ -29,7 +29,7 @@ public: virtual void do_exec_partial() override; protected: - m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); class mi_6510 : public memory_interface { public: @@ -75,7 +75,7 @@ protected: class m6508_device : public m6510_device { public: - m6508_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6508_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/cpu/m6502/m6510t.cpp b/src/devices/cpu/m6502/m6510t.cpp index a8b543a8198..6094a20ff29 100644 --- a/src/devices/cpu/m6502/m6510t.cpp +++ b/src/devices/cpu/m6502/m6510t.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M6510T, m6510t_device, "m6510t", "MOS Technology 6510T") -m6510t_device::m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6510t_device::m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M6510T, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m6510t.h b/src/devices/cpu/m6502/m6510t.h index 20db82b97e9..47fa8063355 100644 --- a/src/devices/cpu/m6502/m6510t.h +++ b/src/devices/cpu/m6502/m6510t.h @@ -15,7 +15,7 @@ class m6510t_device : public m6510_device { public: - m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m65c02.cpp b/src/devices/cpu/m6502/m65c02.cpp index fbfd2964f20..61d8b09c3e2 100644 --- a/src/devices/cpu/m6502/m65c02.cpp +++ b/src/devices/cpu/m6502/m65c02.cpp @@ -15,12 +15,12 @@ DEFINE_DEVICE_TYPE(M65C02, m65c02_device, "m65c02", "WDC W65C02") -m65c02_device::m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m65c02_device::m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M65C02, tag, owner, clock) { } -m65c02_device::m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m65c02_device::m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m65c02.h b/src/devices/cpu/m6502/m65c02.h index 5a89f301236..3f2a39e6871 100644 --- a/src/devices/cpu/m6502/m65c02.h +++ b/src/devices/cpu/m6502/m65c02.h @@ -17,14 +17,14 @@ class m65c02_device : public m6502_device { public: - m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); #define O(o) void o ## _full(); void o ## _partial() diff --git a/src/devices/cpu/m6502/m65ce02.cpp b/src/devices/cpu/m6502/m65ce02.cpp index e6f80e4df09..88c391e7a6b 100644 --- a/src/devices/cpu/m6502/m65ce02.cpp +++ b/src/devices/cpu/m6502/m65ce02.cpp @@ -14,12 +14,12 @@ DEFINE_DEVICE_TYPE(M65CE02, m65ce02_device, "m65ce02", "CSG 65CE02") -m65ce02_device::m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m65ce02_device::m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m65ce02_device(mconfig, M65CE02, tag, owner, clock) { } -m65ce02_device::m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m65ce02_device::m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m65c02_device(mconfig, type, tag, owner, clock), TMP3(0), Z(0), B(0) { } diff --git a/src/devices/cpu/m6502/m65ce02.h b/src/devices/cpu/m6502/m65ce02.h index 6e27c66e010..159e214f75f 100644 --- a/src/devices/cpu/m6502/m65ce02.h +++ b/src/devices/cpu/m6502/m65ce02.h @@ -16,14 +16,14 @@ class m65ce02_device : public m65c02_device { public: - m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint16_t TMP3; /* temporary internal values */ uint8_t Z; /* Z index register */ diff --git a/src/devices/cpu/m6502/m65sc02.cpp b/src/devices/cpu/m6502/m65sc02.cpp index 93a9f18c7b6..9dc161f973a 100644 --- a/src/devices/cpu/m6502/m65sc02.cpp +++ b/src/devices/cpu/m6502/m65sc02.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M65SC02, m65sc02_device, "m65sc02", "GTE G65SC02") -m65sc02_device::m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m65sc02_device::m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r65c02_device(mconfig, M65SC02, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m65sc02.h b/src/devices/cpu/m6502/m65sc02.h index 686411c0b22..6ebd3602792 100644 --- a/src/devices/cpu/m6502/m65sc02.h +++ b/src/devices/cpu/m6502/m65sc02.h @@ -15,7 +15,7 @@ class m65sc02_device : public r65c02_device { public: - m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m740.cpp b/src/devices/cpu/m6502/m740.cpp index d9feb8071d5..e1494e0e7fa 100644 --- a/src/devices/cpu/m6502/m740.cpp +++ b/src/devices/cpu/m6502/m740.cpp @@ -11,7 +11,7 @@ #include "emu.h" #include "m740.h" -m740_device::m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m740_device::m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock), m_irq_multiplex(0), m_irq_vector(0) { } diff --git a/src/devices/cpu/m6502/m740.h b/src/devices/cpu/m6502/m740.h index de483675f81..a1a243bf258 100644 --- a/src/devices/cpu/m6502/m740.h +++ b/src/devices/cpu/m6502/m740.h @@ -51,7 +51,7 @@ protected: virtual void do_exec_partial() override; virtual void execute_set_input(int inputnum, int state) override; - m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); #define O(o) void o ## _full(); void o ## _partial() diff --git a/src/devices/cpu/m6502/m7501.cpp b/src/devices/cpu/m6502/m7501.cpp index 912a7a023dd..b5b86dde7d3 100644 --- a/src/devices/cpu/m6502/m7501.cpp +++ b/src/devices/cpu/m6502/m7501.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M7501, m7501_device, "m7501", "M7501") -m7501_device::m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m7501_device::m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M7501, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m7501.h b/src/devices/cpu/m6502/m7501.h index baa26668fab..88c711df2db 100644 --- a/src/devices/cpu/m6502/m7501.h +++ b/src/devices/cpu/m6502/m7501.h @@ -15,7 +15,7 @@ class m7501_device : public m6510_device { public: - m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m8502.cpp b/src/devices/cpu/m6502/m8502.cpp index 356ed95c0fe..f956a98a08f 100644 --- a/src/devices/cpu/m6502/m8502.cpp +++ b/src/devices/cpu/m6502/m8502.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M8502, m8502_device, "m8502", "MOS Technology 8502") -m8502_device::m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m8502_device::m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M8502, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m8502.h b/src/devices/cpu/m6502/m8502.h index cdd9c8c702f..734d5509e88 100644 --- a/src/devices/cpu/m6502/m8502.h +++ b/src/devices/cpu/m6502/m8502.h @@ -16,7 +16,7 @@ class m8502_device : public m6510_device { public: - m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/r65c02.cpp b/src/devices/cpu/m6502/r65c02.cpp index 190f370c933..ecda0a9f29d 100644 --- a/src/devices/cpu/m6502/r65c02.cpp +++ b/src/devices/cpu/m6502/r65c02.cpp @@ -14,12 +14,12 @@ DEFINE_DEVICE_TYPE(R65C02, r65c02_device, "r65c02", "Rockwell R65C02") -r65c02_device::r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +r65c02_device::r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r65c02_device(mconfig, R65C02, tag, owner, clock) { } -r65c02_device::r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +r65c02_device::r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m65c02_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/r65c02.h b/src/devices/cpu/m6502/r65c02.h index a28ccd9d932..2e8fa666d68 100644 --- a/src/devices/cpu/m6502/r65c02.h +++ b/src/devices/cpu/m6502/r65c02.h @@ -15,14 +15,14 @@ class r65c02_device : public m65c02_device { public: - r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/r65c19.cpp b/src/devices/cpu/m6502/r65c19.cpp index ffd6c3ee2db..d685b3e6703 100644 --- a/src/devices/cpu/m6502/r65c19.cpp +++ b/src/devices/cpu/m6502/r65c19.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(R65C19, r65c19_device, "r65c19", "Rockwell R65C19 MCU") DEFINE_DEVICE_TYPE(L2800, l2800_device, "l2800", "Rockwell L2800 MCU") -r65c19_device::r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map) +r65c19_device::r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : r65c02_device(mconfig, type, tag, owner, clock) , m_w(0) , m_i(0) @@ -26,19 +26,19 @@ r65c19_device::r65c19_device(const machine_config &mconfig, device_type type, co program_config.m_internal_map = std::move(internal_map); } -r65c19_device::r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +r65c19_device::r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r65c19_device(mconfig, R65C19, tag, owner, clock, address_map_constructor()) { } -c39_device::c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map) +c39_device::c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : r65c19_device(mconfig, type, tag, owner, clock, internal_map) , m_exp_config("expansion", ENDIANNESS_LITTLE, 8, 21, 0) , m_es4_config("es4", ENDIANNESS_LITTLE, 8, 9, 0) { } -l2800_device::l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +l2800_device::l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c39_device(mconfig, L2800, tag, owner, clock, address_map_constructor(FUNC(l2800_device::internal_map), this)) { } diff --git a/src/devices/cpu/m6502/r65c19.h b/src/devices/cpu/m6502/r65c19.h index 6f018fb661b..20cd9fe7442 100644 --- a/src/devices/cpu/m6502/r65c19.h +++ b/src/devices/cpu/m6502/r65c19.h @@ -18,10 +18,10 @@ public: R65C19_I }; - r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map); + r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); virtual void device_start() override; virtual void device_reset() override; @@ -110,7 +110,7 @@ public: }; protected: - c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map); + c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); virtual space_config_vector memory_space_config() const override; @@ -153,7 +153,7 @@ private: class l2800_device : public c39_device { public: - l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); diff --git a/src/devices/cpu/m6502/rp2a03.cpp b/src/devices/cpu/m6502/rp2a03.cpp index 25e43144db8..c14b3995445 100644 --- a/src/devices/cpu/m6502/rp2a03.cpp +++ b/src/devices/cpu/m6502/rp2a03.cpp @@ -53,19 +53,19 @@ void rp2a03_device::rp2a03_map(address_map &map) -rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock) { } -rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_core_device(mconfig, RP2A03_CORE, tag, owner, clock) { } -rp2a03_device::rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rp2a03_device::rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_core_device(mconfig, type, tag, owner, clock) , device_mixer_interface(mconfig, *this, 1) , m_apu(*this, "nesapu") @@ -73,12 +73,12 @@ rp2a03_device::rp2a03_device(const machine_config &mconfig, device_type type, co program_config.m_internal_map = address_map_constructor(FUNC(rp2a03_device::rp2a03_map), this); } -rp2a03_device::rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp2a03_device::rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_device(mconfig, RP2A03, tag, owner, clock) { } -rp2a03g_device::rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp2a03g_device::rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_device(mconfig, RP2A03G, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/rp2a03.h b/src/devices/cpu/m6502/rp2a03.h index 412837cd885..99079341623 100644 --- a/src/devices/cpu/m6502/rp2a03.h +++ b/src/devices/cpu/m6502/rp2a03.h @@ -17,7 +17,7 @@ class rp2a03_core_device : public m6502_device { public: - rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -25,7 +25,7 @@ public: virtual void do_exec_partial() override; protected: - rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); #define O(o) void o ## _full(); void o ## _partial() @@ -43,7 +43,7 @@ private: class rp2a03_device : public rp2a03_core_device, public device_mixer_interface { public: - rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t psg1_4014_r(); uint8_t psg1_4015_r(); @@ -53,7 +53,7 @@ public: void rp2a03_map(address_map &map); protected: - rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_apu; @@ -66,7 +66,7 @@ protected: class rp2a03g_device : public rp2a03_device { public: - rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/cpu/m6502/st2204.cpp b/src/devices/cpu/m6502/st2204.cpp index 0e8541be87a..dc1fb605de4 100644 --- a/src/devices/cpu/m6502/st2204.cpp +++ b/src/devices/cpu/m6502/st2204.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(ST2202, st2202_device, "st2202", "Sitronix ST2202 Integrated Microcontroller") DEFINE_DEVICE_TYPE(ST2204, st2204_device, "st2204", "Sitronix ST2204 Integrated Microcontroller") -st2204_device::st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +st2204_device::st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : st2xxx_device(mconfig, type, tag, owner, clock, map, 26, false) // logical; only 23 address lines are brought out , m_dac_callback(*this) , m_tmode{0} @@ -58,12 +58,12 @@ st2204_device::st2204_device(const machine_config &mconfig, device_type type, co { } -st2204_device::st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2204_device::st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2204_device(mconfig, ST2204, tag, owner, clock, address_map_constructor(FUNC(st2204_device::int_map), this)) { } -st2202_device::st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2202_device::st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2204_device(mconfig, ST2202, tag, owner, clock, address_map_constructor(FUNC(st2202_device::int_map), this)) { } diff --git a/src/devices/cpu/m6502/st2204.h b/src/devices/cpu/m6502/st2204.h index c1fbe707fd9..f30b3765f50 100644 --- a/src/devices/cpu/m6502/st2204.h +++ b/src/devices/cpu/m6502/st2204.h @@ -30,12 +30,12 @@ public: ST_DMD }; - st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto dac_callback() { return m_dac_callback.bind(); } protected: - st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor int_map); + st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor int_map); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -148,7 +148,7 @@ private: class st2202_device : public st2204_device { public: - st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 st2xxx_misc_mask() const override { return 0x0f; } diff --git a/src/devices/cpu/m6502/st2205u.cpp b/src/devices/cpu/m6502/st2205u.cpp index ac50492e325..673c0815770 100644 --- a/src/devices/cpu/m6502/st2205u.cpp +++ b/src/devices/cpu/m6502/st2205u.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(ST2205U, st2205u_device, "st2205u", "Sitronix ST2205U Integrated Microcontroller") DEFINE_DEVICE_TYPE(ST2302U, st2302u_device, "st2302u", "Sitronix ST2302U Integrated Microcontroller") -st2205u_base_device::st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) +st2205u_base_device::st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) : st2xxx_device(mconfig, type, tag, owner, clock, internal_map, data_bits, has_banked_ram) , device_sound_interface(mconfig, *this) , m_stream(nullptr) @@ -82,7 +82,7 @@ st2205u_base_device::st2205u_base_device(const machine_config &mconfig, device_t { } -st2205u_device::st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2205u_device::st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2205u_base_device(mconfig, ST2205U, tag, owner, clock, address_map_constructor(FUNC(st2205u_device::int_map), this), 26, // logical; only 23 address lines are brought out @@ -93,7 +93,7 @@ st2205u_device::st2205u_device(const machine_config &mconfig, const char *tag, d { } -st2302u_device::st2302u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2302u_device::st2302u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2205u_base_device(mconfig, ST2302U, tag, owner, clock, address_map_constructor(FUNC(st2302u_device::int_map), this), 26, // ??? diff --git a/src/devices/cpu/m6502/st2205u.h b/src/devices/cpu/m6502/st2205u.h index bd73e481822..bbf0e8f05cd 100644 --- a/src/devices/cpu/m6502/st2205u.h +++ b/src/devices/cpu/m6502/st2205u.h @@ -59,7 +59,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } protected: - st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); + st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); virtual void device_reset() override; @@ -180,7 +180,7 @@ public: ST_BRR }; - st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -254,7 +254,7 @@ private: class st2302u_device : public st2205u_base_device { public: - st2302u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2302u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/cpu/m6502/st2xxx.cpp b/src/devices/cpu/m6502/st2xxx.cpp index 480460bbe67..c9dd74ca018 100644 --- a/src/devices/cpu/m6502/st2xxx.cpp +++ b/src/devices/cpu/m6502/st2xxx.cpp @@ -42,7 +42,7 @@ //#define VERBOSE (LOG_IRQ | LOG_BT | LOG_LCDC) #include "logmacro.h" -st2xxx_device::st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) +st2xxx_device::st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) : w65c02s_device(mconfig, type, tag, owner, clock) , m_data_config("data", ENDIANNESS_LITTLE, 8, data_bits, 0) , m_in_port_cb(*this) diff --git a/src/devices/cpu/m6502/st2xxx.h b/src/devices/cpu/m6502/st2xxx.h index 811c2008d49..430fac1df1e 100644 --- a/src/devices/cpu/m6502/st2xxx.h +++ b/src/devices/cpu/m6502/st2xxx.h @@ -85,7 +85,7 @@ public: auto out_pl_callback() { return m_out_port_cb[6].bind(); } protected: - st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); + st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); virtual space_config_vector memory_space_config() const override; virtual void device_resolve_objects() override; diff --git a/src/devices/cpu/m6502/w65c02s.cpp b/src/devices/cpu/m6502/w65c02s.cpp index 171db777dc2..d44c05ec5a8 100644 --- a/src/devices/cpu/m6502/w65c02s.cpp +++ b/src/devices/cpu/m6502/w65c02s.cpp @@ -15,12 +15,12 @@ DEFINE_DEVICE_TYPE(W65C02S, w65c02s_device, "w65c02s", "WDC W65C02S") -w65c02s_device::w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +w65c02s_device::w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : w65c02s_device(mconfig, W65C02S, tag, owner, clock) { } -w65c02s_device::w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +w65c02s_device::w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m65c02_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/w65c02s.h b/src/devices/cpu/m6502/w65c02s.h index a5848f86e68..b07da3ab58b 100644 --- a/src/devices/cpu/m6502/w65c02s.h +++ b/src/devices/cpu/m6502/w65c02s.h @@ -16,14 +16,14 @@ class w65c02s_device : public m65c02_device { public: - w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_vector(uint16_t adr) { return mintf->read_arg(adr); } virtual void end_interrupt() { } diff --git a/src/devices/cpu/m6502/xavix.cpp b/src/devices/cpu/m6502/xavix.cpp index c8f98a0e8f7..1ae031ee81f 100644 --- a/src/devices/cpu/m6502/xavix.cpp +++ b/src/devices/cpu/m6502/xavix.cpp @@ -33,12 +33,12 @@ DEFINE_DEVICE_TYPE(XAVIX, xavix_device, "xavix", "XaviX (SSD 97 / SSD 98)") -xavix_device::xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xavix_device::xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : xavix_device(mconfig, XAVIX, tag, owner, clock) { } -xavix_device::xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +xavix_device::xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock), XPC(0), m_lowbus_config("lowbus", ENDIANNESS_LITTLE, 8, 15), diff --git a/src/devices/cpu/m6502/xavix.h b/src/devices/cpu/m6502/xavix.h index ccab73f75d4..7fe24a30587 100644 --- a/src/devices/cpu/m6502/xavix.h +++ b/src/devices/cpu/m6502/xavix.h @@ -14,7 +14,7 @@ class xavix_device : public m6502_device { public: - xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; virtual void do_exec_full() override; @@ -164,7 +164,7 @@ protected: uint8_t m_codebank; uint32_t XPC; - xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint32_t adr_with_codebank(uint16_t adr) { return adr | (get_codebank() << 16); } diff --git a/src/devices/cpu/m6502/xavix2000.cpp b/src/devices/cpu/m6502/xavix2000.cpp index 35da0f522b3..78f2cedffe5 100644 --- a/src/devices/cpu/m6502/xavix2000.cpp +++ b/src/devices/cpu/m6502/xavix2000.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(XAVIX2002, xavix2002_device, "xavix2002", "XaviX (SSD 2002) ( -xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : xavix_device(mconfig, type, tag, owner, clock) { program_config.m_addr_width = 24; @@ -45,12 +45,12 @@ xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type ty sprogram_config.m_logaddr_width = 24; } -xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : xavix2000_device(mconfig, XAVIX2000, tag, owner, clock) { } -xavix2002_device::xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xavix2002_device::xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : xavix2000_device(mconfig, XAVIX2002, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/xavix2000.h b/src/devices/cpu/m6502/xavix2000.h index c5e3113e840..80cc55f1895 100644 --- a/src/devices/cpu/m6502/xavix2000.h +++ b/src/devices/cpu/m6502/xavix2000.h @@ -14,12 +14,12 @@ class xavix2000_device : public xavix_device { public: - xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; protected: - xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void do_exec_full() override; virtual void do_exec_partial() override; @@ -164,7 +164,7 @@ enum { class xavix2002_device : public xavix2000_device { public: - xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp index 4df393c0a4c..674cb487fd9 100644 --- a/src/devices/cpu/m6800/m6800.cpp +++ b/src/devices/cpu/m6800/m6800.cpp @@ -383,12 +383,12 @@ DEFINE_DEVICE_TYPE(M6808, m6808_cpu_device, "m6808", "Motorola MC6808") DEFINE_DEVICE_TYPE(NSC8105, nsc8105_cpu_device, "nsc8105", "NSC8105") -m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6800_cpu_device(mconfig, M6800, tag, owner, clock, m6800_insn, cycles_6800, address_map_constructor()) { } -m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) +m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, internal) , m_decrypted_opcodes_config("program", ENDIANNESS_BIG, 8, 16, 0) @@ -397,12 +397,12 @@ m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, device_type ty { } -m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6802_cpu_device(mconfig, M6802, tag, owner, clock, m6800_insn, cycles_6800) { } -m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const op_func *insn, const uint8_t *cycles) +m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const op_func *insn, const uint8_t *cycles) : m6800_cpu_device(mconfig, type, tag, owner, clock, insn, cycles, address_map_constructor(FUNC(m6802_cpu_device::ram_map), this)) , m_ram_enable(true) { @@ -414,7 +414,7 @@ void m6802_cpu_device::ram_map(address_map &map) map(0x0000, 0x007f).ram(); } -m6808_cpu_device::m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6808_cpu_device::m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6802_cpu_device(mconfig, M6808, tag, owner, clock, m6800_insn, cycles_6800) { set_ram_enable(false); @@ -426,7 +426,7 @@ void m6808_cpu_device::device_validity_check(validity_checker &valid) const osd_printf_error("MC6808 should not have internal RAM enabled\n"); } -nsc8105_cpu_device::nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nsc8105_cpu_device::nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6802_cpu_device(mconfig, NSC8105, tag, owner, clock, nsc8105_insn, cycles_nsc8105) { } diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h index 10e40ab3a3f..c4229d07fa3 100644 --- a/src/devices/cpu/m6800/m6800.h +++ b/src/devices/cpu/m6800/m6800.h @@ -34,7 +34,7 @@ public: typedef void (m6800_cpu_device::*op_func)(); // construction/destruction - m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum @@ -43,7 +43,7 @@ protected: M6800_SLP = 0x10 /* HD63701 only */ }; - m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal); + m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal); // device-level overrides virtual void device_start() override; @@ -364,12 +364,12 @@ protected: class m6802_cpu_device : public m6800_cpu_device { public: - m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_ram_enable(bool re) { assert(!configured()); m_ram_enable = re; } protected: - m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles); + m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles); virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return (clocks + 4 - 1) / 4; } virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const noexcept override { return (cycles * 4); } @@ -385,7 +385,7 @@ private: class m6808_cpu_device : public m6802_cpu_device { public: - m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -396,7 +396,7 @@ protected: class nsc8105_cpu_device : public m6802_cpu_device { public: - nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m6800/m6801.cpp b/src/devices/cpu/m6800/m6801.cpp index e759a0b57cc..9bce8f303fb 100644 --- a/src/devices/cpu/m6800/m6801.cpp +++ b/src/devices/cpu/m6800/m6801.cpp @@ -309,12 +309,12 @@ DEFINE_DEVICE_TYPE(HD6303R, hd6303r_cpu_device, "hd6303r", "Hitachi HD6303R") DEFINE_DEVICE_TYPE(HD6303X, hd6303x_cpu_device, "hd6303x", "Hitachi HD6303X") DEFINE_DEVICE_TYPE(HD6303Y, hd6303y_cpu_device, "hd6303y", "Hitachi HD6303Y") -m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, M6801, tag, owner, clock, m6803_insn, cycles_6803, address_map_constructor()) { } -m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) +m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) : m6800_cpu_device(mconfig, type, tag, owner, clock, insn, cycles, internal) , m_in_port_func(*this) , m_out_port_func(*this) @@ -324,37 +324,37 @@ m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, device_type ty { } -m6803_cpu_device::m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6803_cpu_device::m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, M6803, tag, owner, clock, m6803_insn, cycles_6803, address_map_constructor(FUNC(m6803_cpu_device::m6803_mem), this)) { } -m6803e_cpu_device::m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6803e_cpu_device::m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, M6803E, tag, owner, clock, m6803_insn, cycles_6803, address_map_constructor(FUNC(m6803e_cpu_device::m6803_mem), this)) { } -hd6301_cpu_device::hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd6301_cpu_device::hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, type, tag, owner, clock, hd63701_insn, cycles_63701) { } -hd6301v1_cpu_device::hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6301v1_cpu_device::hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, HD6301V1, tag, owner, clock) { } -hd63701v0_cpu_device::hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63701v0_cpu_device::hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, HD63701V0, tag, owner, clock) { } -hd6303r_cpu_device::hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6303r_cpu_device::hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, HD6303R, tag, owner, clock) { } -hd6301x_cpu_device::hd6301x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd6301x_cpu_device::hd6301x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, type, tag, owner, clock) , m_in_portx_func(*this) , m_out_portx_func(*this) @@ -362,37 +362,37 @@ hd6301x_cpu_device::hd6301x_cpu_device(const machine_config &mconfig, device_typ m_sclk_divider = 16; } -hd6301x0_cpu_device::hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6301x0_cpu_device::hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, HD6301X0, tag, owner, clock) { } -hd63701x0_cpu_device::hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63701x0_cpu_device::hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, HD63701X0, tag, owner, clock) { } -hd6303x_cpu_device::hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6303x_cpu_device::hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, HD6303X, tag, owner, clock) { } -hd6301y_cpu_device::hd6301y_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd6301y_cpu_device::hd6301y_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, type, tag, owner, clock) { } -hd6301y0_cpu_device::hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6301y0_cpu_device::hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301y_cpu_device(mconfig, HD6301Y0, tag, owner, clock) { } -hd63701y0_cpu_device::hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63701y0_cpu_device::hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301y_cpu_device(mconfig, HD63701Y0, tag, owner, clock) { } -hd6303y_cpu_device::hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6303y_cpu_device::hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301y_cpu_device(mconfig, HD6303Y, tag, owner, clock) { } diff --git a/src/devices/cpu/m6800/m6801.h b/src/devices/cpu/m6800/m6801.h index de74fed4ff7..435c3e7836a 100644 --- a/src/devices/cpu/m6800/m6801.h +++ b/src/devices/cpu/m6800/m6801.h @@ -43,7 +43,7 @@ enum class m6801_cpu_device : public m6800_cpu_device { public: - m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_p1_cb() { return m_in_port_func[0].bind(); } auto out_p1_cb() { return m_out_port_func[0].bind(); } @@ -62,7 +62,7 @@ public: void m6801_clock_serial(); protected: - m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal = address_map_constructor()); + m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal = address_map_constructor()); // device-level overrides virtual void device_resolve_objects() override; @@ -184,7 +184,7 @@ protected: class m6803_cpu_device : public m6801_cpu_device { public: - m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -194,7 +194,7 @@ protected: class m6803e_cpu_device : public m6801_cpu_device { public: - m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return clocks; } @@ -207,7 +207,7 @@ protected: class hd6301_cpu_device : public m6801_cpu_device { protected: - hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -224,7 +224,7 @@ protected: class hd6301v1_cpu_device : public hd6301_cpu_device { public: - hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -233,7 +233,7 @@ public: class hd63701v0_cpu_device : public hd6301_cpu_device { public: - hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -244,7 +244,7 @@ public: class hd6303r_cpu_device : public hd6301_cpu_device { public: - hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -261,7 +261,7 @@ public: void hd6301x_io(address_map &map); protected: - hd6301x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd6301x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -328,7 +328,7 @@ protected: class hd6301x0_cpu_device : public hd6301x_cpu_device { public: - hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -337,7 +337,7 @@ public: class hd63701x0_cpu_device : public hd6301x_cpu_device { public: - hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -348,7 +348,7 @@ public: class hd6303x_cpu_device : public hd6301x_cpu_device { public: - hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -359,7 +359,7 @@ public: void hd6301y_io(address_map &map); protected: - hd6301y_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd6301y_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -392,7 +392,7 @@ protected: class hd6301y0_cpu_device : public hd6301y_cpu_device { public: - hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -401,7 +401,7 @@ public: class hd63701y0_cpu_device : public hd6301y_cpu_device { public: - hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -413,7 +413,7 @@ public: class hd6303y_cpu_device : public hd6301y_cpu_device { public: - hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/m68000/fscpu32.cpp b/src/devices/cpu/m68000/fscpu32.cpp index e633d7a059d..a1ce0e2814f 100644 --- a/src/devices/cpu/m68000/fscpu32.cpp +++ b/src/devices/cpu/m68000/fscpu32.cpp @@ -10,7 +10,7 @@ std::unique_ptr fscpu32_device::create_disassembler() return std::make_unique(m68k_disassembler::TYPE_CPU32); } -fscpu32_device::fscpu32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, +fscpu32_device::fscpu32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, address_map_constructor internal_map) : m68000_base_device(mconfig, tag, owner, clock, type, 16,32, internal_map) { diff --git a/src/devices/cpu/m68000/fscpu32.h b/src/devices/cpu/m68000/fscpu32.h index 66bb7e1f114..7ff86b870d9 100644 --- a/src/devices/cpu/m68000/fscpu32.h +++ b/src/devices/cpu/m68000/fscpu32.h @@ -19,7 +19,7 @@ public: virtual void device_start() override; protected: - fscpu32_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, + fscpu32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, address_map_constructor internal_map); }; diff --git a/src/devices/cpu/m68000/m68000.cpp b/src/devices/cpu/m68000/m68000.cpp index 751ded698d2..8cf4ea3d28f 100644 --- a/src/devices/cpu/m68000/m68000.cpp +++ b/src/devices/cpu/m68000/m68000.cpp @@ -12,12 +12,12 @@ std::unique_ptr m68000_device::create_disassembler() return std::make_unique(m68k_disassembler::TYPE_68000); } -m68000_device::m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68000_device::m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, M68000, tag, owner, clock) { } -m68000_device::m68000_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, u32 clock) +m68000_device::m68000_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, type, 16,24) { } @@ -28,7 +28,7 @@ void m68000_device::device_start() init_cpu_m68000(); } -m68000_device::m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, +m68000_device::m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, u32 prg_data_width, u32 prg_address_bits, address_map_constructor internal_map) : m68000_base_device(mconfig, tag, owner, clock, type, prg_data_width, prg_address_bits, internal_map) { diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h index f97fd11c1c7..a53042f3018 100644 --- a/src/devices/cpu/m68000/m68000.h +++ b/src/devices/cpu/m68000/m68000.h @@ -11,7 +11,7 @@ class m68000_device : public m68000_base_device { public: // construction/destruction - m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -23,9 +23,9 @@ public: virtual void device_start() override; protected: - m68000_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, u32 clock); + m68000_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, const XTAL &clock); - m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, + m68000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, u32 prg_data_width, u32 prg_address_bits, address_map_constructor internal_map); }; diff --git a/src/devices/cpu/m68000/m68008.cpp b/src/devices/cpu/m68000/m68008.cpp index 2b83211d9c5..f29f671fea1 100644 --- a/src/devices/cpu/m68000/m68008.cpp +++ b/src/devices/cpu/m68000/m68008.cpp @@ -18,7 +18,7 @@ std::unique_ptr m68008fn_device::create_disassembler() return std::make_unique(m68k_disassembler::TYPE_68008); } -m68008_device::m68008_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68008_device::m68008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68008, 8,20) { } @@ -30,7 +30,7 @@ void m68008_device::device_start() } -m68008fn_device::m68008fn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68008fn_device::m68008fn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68008FN, 8,22) { } diff --git a/src/devices/cpu/m68000/m68008.h b/src/devices/cpu/m68000/m68008.h index b6d4e06062e..442d8b8f22a 100644 --- a/src/devices/cpu/m68000/m68008.h +++ b/src/devices/cpu/m68000/m68008.h @@ -11,7 +11,7 @@ class m68008_device : public m68000_base_device { public: // construction/destruction - m68008_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -26,7 +26,7 @@ class m68008fn_device : public m68000_base_device { public: // construction/destruction - m68008fn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68008fn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m68000/m68010.cpp b/src/devices/cpu/m68000/m68010.cpp index 6983ec1d7fc..3d37cf0c533 100644 --- a/src/devices/cpu/m68000/m68010.cpp +++ b/src/devices/cpu/m68000/m68010.cpp @@ -13,7 +13,7 @@ std::unique_ptr m68010_device::create_disassembler() } -m68010_device::m68010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68010_device::m68010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68010, 16,24) { } diff --git a/src/devices/cpu/m68000/m68010.h b/src/devices/cpu/m68000/m68010.h index dff4a1d96e5..6d0ef8e6f31 100644 --- a/src/devices/cpu/m68000/m68010.h +++ b/src/devices/cpu/m68000/m68010.h @@ -11,7 +11,7 @@ class m68010_device : public m68000_base_device { public: // construction/destruction - m68010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m68000/m68020.cpp b/src/devices/cpu/m68000/m68020.cpp index 0e0e0ea3992..9a54c6a284e 100644 --- a/src/devices/cpu/m68000/m68020.cpp +++ b/src/devices/cpu/m68000/m68020.cpp @@ -36,7 +36,7 @@ std::unique_ptr m68020hmmu_device::create_disassembler() return std::make_unique(m68k_disassembler::TYPE_68020); } -m68020_device::m68020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68020_device::m68020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68020, 32,32) { } @@ -48,7 +48,7 @@ void m68020_device::device_start() } -m68020fpu_device::m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68020fpu_device::m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68020FPU, 32,32) { } @@ -60,7 +60,7 @@ void m68020fpu_device::device_start() } // 68020 with 68851 PMMU -m68020pmmu_device::m68020pmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68020pmmu_device::m68020pmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68020PMMU, 32,32) { } @@ -86,7 +86,7 @@ bool m68020hmmu_device::memory_translate(int space, int intention, offs_t &addre // 68020 with Apple HMMU & 68881 FPU // case CPUINFO_FCT_TRANSLATE: info->translate = CPU_TRANSLATE_NAME(m68khmmu); break; -m68020hmmu_device::m68020hmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68020hmmu_device::m68020hmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68020HMMU, 32,32) { } @@ -98,7 +98,7 @@ void m68020hmmu_device::device_start() } -m68ec020_device::m68ec020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68ec020_device::m68ec020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68EC020, 32,24) { } diff --git a/src/devices/cpu/m68000/m68020.h b/src/devices/cpu/m68000/m68020.h index 265174c5076..19b643a0f93 100644 --- a/src/devices/cpu/m68000/m68020.h +++ b/src/devices/cpu/m68000/m68020.h @@ -11,7 +11,7 @@ class m68ec020_device : public m68000_base_device { public: // construction/destruction - m68ec020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68ec020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -26,7 +26,7 @@ class m68020_device : public m68000_base_device { public: // construction/destruction - m68020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -41,7 +41,7 @@ class m68020fpu_device : public m68000_base_device { public: // construction/destruction - m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68020fpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -56,7 +56,7 @@ class m68020pmmu_device : public m68000_base_device { public: // construction/destruction - m68020pmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68020pmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -71,7 +71,7 @@ class m68020hmmu_device : public m68000_base_device { public: // construction/destruction - m68020hmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68020hmmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m68000/m68030.cpp b/src/devices/cpu/m68000/m68030.cpp index f2e7c3c759a..84b69d81631 100644 --- a/src/devices/cpu/m68000/m68030.cpp +++ b/src/devices/cpu/m68000/m68030.cpp @@ -18,7 +18,7 @@ std::unique_ptr m68030_device::create_disassembler() return std::make_unique(m68k_disassembler::TYPE_68030); } -m68030_device::m68030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68030_device::m68030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68030, 32,32) { } @@ -29,7 +29,7 @@ void m68030_device::device_start() init_cpu_m68030(); } -m68ec030_device::m68ec030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68ec030_device::m68ec030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68EC030, 32,32) { } diff --git a/src/devices/cpu/m68000/m68030.h b/src/devices/cpu/m68000/m68030.h index d2206e5f084..527edd536df 100644 --- a/src/devices/cpu/m68000/m68030.h +++ b/src/devices/cpu/m68000/m68030.h @@ -11,7 +11,7 @@ class m68ec030_device : public m68000_base_device { public: // construction/destruction - m68ec030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68ec030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -26,7 +26,7 @@ class m68030_device : public m68000_base_device { public: // construction/destruction - m68030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m68000/m68040.cpp b/src/devices/cpu/m68000/m68040.cpp index d01b7cc927c..7dcb3b12746 100644 --- a/src/devices/cpu/m68000/m68040.cpp +++ b/src/devices/cpu/m68000/m68040.cpp @@ -24,7 +24,7 @@ std::unique_ptr m68040_device::create_disassembler() return std::make_unique(m68k_disassembler::TYPE_68040); } -m68040_device::m68040_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68040_device::m68040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68040, 32,32) { } @@ -38,7 +38,7 @@ void m68040_device::device_start() -m68ec040_device::m68ec040_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68ec040_device::m68ec040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68EC040, 32,32) { } @@ -51,7 +51,7 @@ void m68ec040_device::device_start() -m68lc040_device::m68lc040_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m68lc040_device::m68lc040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, M68LC040, 32,32) { } diff --git a/src/devices/cpu/m68000/m68040.h b/src/devices/cpu/m68000/m68040.h index b09def174d8..bef31785212 100644 --- a/src/devices/cpu/m68000/m68040.h +++ b/src/devices/cpu/m68000/m68040.h @@ -11,7 +11,7 @@ class m68ec040_device : public m68000_base_device { public: // construction/destruction - m68ec040_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68ec040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -26,7 +26,7 @@ class m68lc040_device : public m68000_base_device { public: // construction/destruction - m68lc040_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68lc040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; @@ -41,7 +41,7 @@ class m68040_device : public m68000_base_device { public: // construction/destruction - m68040_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m68000/m68kcommon.h b/src/devices/cpu/m68000/m68kcommon.h index 6e2ab7de5d7..86659ec7beb 100644 --- a/src/devices/cpu/m68000/m68kcommon.h +++ b/src/devices/cpu/m68000/m68kcommon.h @@ -102,7 +102,7 @@ public: }; // construction/destruction - m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr u8 autovector(int level) { return 0x18 + level; } void autovectors_map(address_map &map); @@ -173,10 +173,10 @@ public: void set_cpu_space(int space_id) { m_cpu_space_id = space_id; } protected: - m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, + m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, u32 prg_data_width, u32 prg_address_bits); - m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, + m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, u32 prg_data_width, u32 prg_address_bits, address_map_constructor internal_map); int m_has_fpu; /* Indicates if a FPU is available (yes on 030, 040, may be on 020) */ diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index 2b00922c9e1..8ccdebe84b2 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -2257,7 +2257,7 @@ void m68000_base_device::m68ki_exception_interrupt(u32 int_level) // m68000_base_device - constructor //------------------------------------------------- -m68000_base_device::m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, +m68000_base_device::m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, u32 prg_data_width, u32 prg_address_bits, address_map_constructor internal_map) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits, 0, internal_map), @@ -2274,7 +2274,7 @@ m68000_base_device::m68000_base_device(const machine_config &mconfig, const char } -m68000_base_device::m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, +m68000_base_device::m68000_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, u32 prg_data_width, u32 prg_address_bits) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, prg_data_width, prg_address_bits), diff --git a/src/devices/cpu/m68000/mcf5206e.cpp b/src/devices/cpu/m68000/mcf5206e.cpp index 3a20ad7e473..fd5835d7fd8 100644 --- a/src/devices/cpu/m68000/mcf5206e.cpp +++ b/src/devices/cpu/m68000/mcf5206e.cpp @@ -12,7 +12,7 @@ std::unique_ptr mcf5206e_device::create_disassembler() return std::make_unique(m68k_disassembler::TYPE_COLDFIRE); } -mcf5206e_device::mcf5206e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mcf5206e_device::mcf5206e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_base_device(mconfig, tag, owner, clock, MCF5206E, 32,32) { } diff --git a/src/devices/cpu/m68000/mcf5206e.h b/src/devices/cpu/m68000/mcf5206e.h index 508f2c812a7..8a190b2f3b4 100644 --- a/src/devices/cpu/m68000/mcf5206e.h +++ b/src/devices/cpu/m68000/mcf5206e.h @@ -11,7 +11,7 @@ class mcf5206e_device : public m68000_base_device { public: // construction/destruction - mcf5206e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mcf5206e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/m68000/scc68070.cpp b/src/devices/cpu/m68000/scc68070.cpp index e0daf10b68f..bff9340edc9 100644 --- a/src/devices/cpu/m68000/scc68070.cpp +++ b/src/devices/cpu/m68000/scc68070.cpp @@ -11,7 +11,7 @@ std::unique_ptr scc68070_base_device::create_disassemble } -scc68070_base_device::scc68070_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, +scc68070_base_device::scc68070_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, address_map_constructor internal_map) : m68000_base_device(mconfig, tag, owner, clock, type, 16,32, internal_map) { diff --git a/src/devices/cpu/m68000/scc68070.h b/src/devices/cpu/m68000/scc68070.h index 20d2d8c62d6..1e6b5b46278 100644 --- a/src/devices/cpu/m68000/scc68070.h +++ b/src/devices/cpu/m68000/scc68070.h @@ -18,7 +18,7 @@ protected: // device-level overrides virtual void device_start() override; - scc68070_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, + scc68070_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, address_map_constructor internal_map); }; diff --git a/src/devices/cpu/m6805/m6805.cpp b/src/devices/cpu/m6805/m6805.cpp index 26cc630f3bb..8a01e0fef5d 100644 --- a/src/devices/cpu/m6805/m6805.cpp +++ b/src/devices/cpu/m6805/m6805.cpp @@ -314,7 +314,7 @@ m6805_base_device::m6805_base_device( machine_config const &mconfig, char const *tag, device_t *owner, - uint32_t clock, + const XTAL &clock, device_type const type, configuration_params const ¶ms) : cpu_device(mconfig, type, tag, owner, clock) @@ -327,7 +327,7 @@ m6805_base_device::m6805_base_device( machine_config const &mconfig, char const *tag, device_t *owner, - uint32_t clock, + const XTAL &clock, device_type const type, configuration_params const ¶ms, address_map_constructor internal_map) @@ -632,7 +632,7 @@ void m6805_base_device::execute_set_input(int inputnum, int state) /**************************************************************************** * M68HC05EG section ****************************************************************************/ -m68hc05eg_device::m68hc05eg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m68hc05eg_device::m68hc05eg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6805_base_device( mconfig, tag, @@ -687,7 +687,7 @@ std::unique_ptr m68hc05eg_device::create_disassembler() /**************************************************************************** * HD63705 section ****************************************************************************/ -hd63705_device::hd63705_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63705_device::hd63705_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6805_base_device(mconfig, tag, owner, diff --git a/src/devices/cpu/m6805/m6805.h b/src/devices/cpu/m6805/m6805.h index 824c664b829..f0ce42bc0f8 100644 --- a/src/devices/cpu/m6805/m6805.h +++ b/src/devices/cpu/m6805/m6805.h @@ -111,14 +111,14 @@ protected: machine_config const &mconfig, char const *tag, device_t *owner, - uint32_t clock, + const XTAL &clock, device_type const type, configuration_params const ¶ms); m6805_base_device( machine_config const &mconfig, char const *tag, device_t *owner, - uint32_t clock, + const XTAL &clock, device_type const type, configuration_params const ¶ms, address_map_constructor internal_map); @@ -313,7 +313,7 @@ class m68hc05eg_device : public m6805_base_device { public: // construction/destruction - m68hc05eg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m68hc05eg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -332,7 +332,7 @@ class hd63705_device : public m6805_base_device { public: // construction/destruction - hd63705_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63705_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/m6805/m68705.cpp b/src/devices/cpu/m6805/m68705.cpp index 96a36d2c711..7c9284fe74e 100644 --- a/src/devices/cpu/m6805/m68705.cpp +++ b/src/devices/cpu/m6805/m68705.cpp @@ -214,7 +214,7 @@ Ux Parts: */ -m6805_hmos_device::m6805_hmos_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type, u32 addr_width, unsigned ram_size) +m6805_hmos_device::m6805_hmos_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type, u32 addr_width, unsigned ram_size) : m6805_base_device(mconfig, tag, owner, clock, type, { addr_width > 13 ? s_hmos_b_ops : s_hmos_s_ops, s_hmos_cycles, addr_width, 0x007f, 0x0060, M6805_VECTOR_SWI }, address_map_constructor(FUNC(m6805_hmos_device::map), this)) , m_timer(*this) , m_port_open_drain{ false, false, false, false } @@ -228,7 +228,7 @@ m6805_hmos_device::m6805_hmos_device(machine_config const &mconfig, char const * { } -m68705_device::m68705_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type, u32 addr_width, unsigned ram_size) +m68705_device::m68705_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type, u32 addr_width, unsigned ram_size) : m6805_hmos_device(mconfig, tag, owner, clock, type, addr_width, ram_size) , device_nvram_interface(mconfig, *this) , m_user_rom(*this, DEVICE_SELF) @@ -634,7 +634,7 @@ void m68705p_device::internal_map(address_map &map) map(0x07f8, 0x07ff).rw(FUNC(m68705p_device::eprom_r<0x07f8>), FUNC(m68705p_device::eprom_w<0x07f8>)); // Interrupt vectors } -m68705p_device::m68705p_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type) +m68705p_device::m68705p_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type) : m68705_device(mconfig, tag, owner, clock, type, 11, 112) { set_port_open_drain<0>(true); // Port A is open drain with internal pull-ups @@ -669,7 +669,7 @@ void m68705u_device::internal_map(address_map &map) map(0x0ff8, 0x0fff).rw(FUNC(m68705u_device::eprom_r<0x0ff8>), FUNC(m68705u_device::eprom_w<0x0ff8>)); // Interrupt vectors } -m68705u_device::m68705u_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type) +m68705u_device::m68705u_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type) : m68705_device(mconfig, tag, owner, clock, type, 12, 112) { set_port_open_drain<0>(true); // Port A is open drain with internal pull-ups @@ -705,7 +705,7 @@ void m68705r_device::internal_map(address_map &map) map(0x0ff8, 0x0fff).rw(FUNC(m68705r_device::eprom_r<0x0ff8>), FUNC(m68705r_device::eprom_w<0x0ff8>)); // Interrupt vectors } -m68705r_device::m68705r_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type) +m68705r_device::m68705r_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type) : m68705u_device(mconfig, tag, owner, clock, type) { } @@ -726,7 +726,7 @@ std::unique_ptr m68705r_device::create_disassembler() * M68705P3 device ****************************************************************************/ -m68705p3_device::m68705p3_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m68705p3_device::m68705p3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68705p_device(mconfig, tag, owner, clock, M68705P3) { } @@ -746,7 +746,7 @@ u8 m68705p3_device::get_mask_options() const * M68705P5 device ****************************************************************************/ -m68705p5_device::m68705p5_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m68705p5_device::m68705p5_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68705p_device(mconfig, tag, owner, clock, M68705P5) { } @@ -766,7 +766,7 @@ u8 m68705p5_device::get_mask_options() const * M68705R3 device ****************************************************************************/ -m68705r3_device::m68705r3_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m68705r3_device::m68705r3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68705r_device(mconfig, tag, owner, clock, M68705R3) { } @@ -786,7 +786,7 @@ u8 m68705r3_device::get_mask_options() const * M68705U3 device ****************************************************************************/ -m68705u3_device::m68705u3_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m68705u3_device::m68705u3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68705u_device(mconfig, tag, owner, clock, M68705U3) { } @@ -801,7 +801,7 @@ u8 m68705u3_device::get_mask_options() const return get_user_rom()[0x0f38] & 0xf7; // no SNM bit } -m6805p2_device::m6805p2_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m6805p2_device::m6805p2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, M6805P2, 11, 64) { /* @@ -816,7 +816,7 @@ m6805p2_device::m6805p2_device(machine_config const &mconfig, char const *tag, d set_port_mask<3>(0xff); // Port D isn't present } -m6805p6_device::m6805p6_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m6805p6_device::m6805p6_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, M6805P6, 11, 64) { m_timer.set_options(m6805_timer::TIMER_MOR /* | m6805::TIMER_NPC */); @@ -826,33 +826,33 @@ m6805p6_device::m6805p6_device(machine_config const &mconfig, char const *tag, d set_port_mask<3>(0xff); // Port D isn't present } -m6805r2_device::m6805r2_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m6805r2_device::m6805r2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, M6805R2, 12, 64) { m_timer.set_options(m6805_timer::TIMER_MOR); m_timer.set_source(m6805_timer::CLOCK_TIMER); } -m6805r3_device::m6805r3_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m6805r3_device::m6805r3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, M6805R3, 12, 112) { m_timer.set_options(m6805_timer::TIMER_PGM); } -m6805u2_device::m6805u2_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m6805u2_device::m6805u2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, M6805U2, 12, 64) { m_timer.set_options(m6805_timer::TIMER_MOR); m_timer.set_source(m6805_timer::CLOCK_TIMER); } -m6805u3_device::m6805u3_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +m6805u3_device::m6805u3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, M6805U3, 12, 112) { m_timer.set_options(m6805_timer::TIMER_PGM); } -hd6805s1_device::hd6805s1_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +hd6805s1_device::hd6805s1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, HD6805S1, 11, 64) { m_timer.set_options(m6805_timer::TIMER_NPC); @@ -861,7 +861,7 @@ hd6805s1_device::hd6805s1_device(machine_config const &mconfig, char const *tag, set_port_mask<3>(0xff); // Port D isn't present } -hd6805u1_device::hd6805u1_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +hd6805u1_device::hd6805u1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6805_mrom_device(mconfig, tag, owner, clock, HD6805U1, 12, 96) { // Port D has optional analog comparator but no INT2 (no MISC register, either) diff --git a/src/devices/cpu/m6805/m68705.h b/src/devices/cpu/m6805/m68705.h index e8bd0659135..af90a7d7d4c 100644 --- a/src/devices/cpu/m6805/m68705.h +++ b/src/devices/cpu/m6805/m68705.h @@ -164,7 +164,7 @@ protected: static unsigned const PORT_COUNT = 4; - m6805_hmos_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type, u32 addr_width, unsigned ram_size); + m6805_hmos_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type, u32 addr_width, unsigned ram_size); void map(address_map &map) { internal_map(map); } virtual void internal_map(address_map &map); @@ -225,7 +225,7 @@ private: class m6805_mrom_device : public m6805_hmos_device { protected: - m6805_mrom_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type, u32 addr_width, unsigned ram_size) + m6805_mrom_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type, u32 addr_width, unsigned ram_size) : m6805_hmos_device(mconfig, tag, owner, clock, type, addr_width, ram_size) { } @@ -248,7 +248,7 @@ public: protected: virtual void internal_map(address_map &map) override; - m68705_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type, u32 addr_width, unsigned ram_size); + m68705_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type, u32 addr_width, unsigned ram_size); template u8 eprom_r(offs_t offset); template void eprom_w(offs_t offset, u8 data); @@ -290,7 +290,7 @@ public: protected: virtual void internal_map(address_map &map) override; - m68705p_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type); + m68705p_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type); virtual void device_start() override; @@ -308,7 +308,7 @@ public: protected: virtual void internal_map(address_map &map) override; - m68705u_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type); + m68705u_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type); virtual void device_start() override; @@ -323,7 +323,7 @@ public: protected: virtual void internal_map(address_map &map) override; - m68705r_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type); + m68705r_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, device_type type); virtual void device_start() override; @@ -334,7 +334,7 @@ protected: class m6805p2_device : public m6805_mrom_device { public: - m6805p2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6805p2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // mask options void set_timer_divisor(unsigned divisor) { m_timer.set_divisor(divisor); } @@ -344,7 +344,7 @@ public: class m6805p6_device : public m6805_mrom_device { public: - m6805p6_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6805p6_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // mask options void set_timer_divisor(unsigned divisor) { m_timer.set_divisor(divisor); } @@ -354,7 +354,7 @@ public: class m6805r2_device : public m6805_mrom_device { public: - m6805r2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6805r2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // mask options void set_timer_divisor(unsigned divisor) { m_timer.set_divisor(divisor); } @@ -367,7 +367,7 @@ protected: class m6805r3_device : public m6805_mrom_device { public: - m6805r3_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6805r3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void internal_map(address_map &map) override; @@ -376,7 +376,7 @@ protected: class m6805u2_device : public m6805_mrom_device { public: - m6805u2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6805u2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // mask options void set_timer_divisor(unsigned divisor) { m_timer.set_divisor(divisor); } @@ -386,7 +386,7 @@ public: class m6805u3_device : public m6805_mrom_device { public: - m6805u3_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6805u3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: }; @@ -394,19 +394,19 @@ protected: class hd6805s1_device : public m6805_mrom_device { public: - hd6805s1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + hd6805s1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class hd6805u1_device : public m6805_mrom_device { public: - hd6805u1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + hd6805u1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class m68705p3_device : public m68705p_device { public: - m68705p3_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68705p3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual tiny_rom_entry const *device_rom_region() const override; @@ -417,7 +417,7 @@ protected: class m68705p5_device : public m68705p_device { public: - m68705p5_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68705p5_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual tiny_rom_entry const *device_rom_region() const override; @@ -428,7 +428,7 @@ protected: class m68705r3_device : public m68705r_device { public: - m68705r3_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68705r3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual tiny_rom_entry const *device_rom_region() const override; @@ -439,7 +439,7 @@ protected: class m68705u3_device : public m68705u_device { public: - m68705u3_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68705u3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); static auto parent_rom_device_type() { return &M68705R3; } diff --git a/src/devices/cpu/m6805/m68hc05.cpp b/src/devices/cpu/m6805/m68hc05.cpp index df7c590d3a3..a18fdd7ccfb 100644 --- a/src/devices/cpu/m6805/m68hc05.cpp +++ b/src/devices/cpu/m6805/m68hc05.cpp @@ -138,7 +138,7 @@ m68hc05_device::m68hc05_device( machine_config const &mconfig, char const *tag, device_t *owner, - u32 clock, + const XTAL &clock, device_type type, u32 addr_width, u16 vector_mask, @@ -759,7 +759,7 @@ m68hc705_device::m68hc705_device( machine_config const &mconfig, char const *tag, device_t *owner, - u32 clock, + const XTAL &clock, device_type type, u32 addr_width, address_map_constructor internal_map) @@ -805,7 +805,7 @@ void m68hc05c4_device::c4_map(address_map &map) } -m68hc05c4_device::m68hc05c4_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m68hc05c4_device::m68hc05c4_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68hc05_device( mconfig, tag, @@ -872,7 +872,7 @@ void m68hc05c8_device::c8_map(address_map &map) } -m68hc05c8_device::m68hc05c8_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m68hc05c8_device::m68hc05c8_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68hc05_device( mconfig, tag, @@ -943,7 +943,7 @@ void m68hc705c4a_device::c4a_map(address_map &map) } -m68hc705c4a_device::m68hc705c4a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m68hc705c4a_device::m68hc705c4a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68hc705_device( mconfig, tag, @@ -1039,7 +1039,7 @@ void m68hc705c8a_device::c8a_map(address_map &map) } -m68hc705c8a_device::m68hc705c8a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m68hc705c8a_device::m68hc705c8a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68hc705_device( mconfig, tag, @@ -1155,7 +1155,7 @@ void m68hc705j1a_device::j1a_map(address_map &map) } -m68hc705j1a_device::m68hc705j1a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m68hc705j1a_device::m68hc705j1a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68hc705_device( mconfig, tag, @@ -1235,7 +1235,7 @@ void m68hc05l9_device::l9_map(address_map &map) } -m68hc05l9_device::m68hc05l9_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m68hc05l9_device::m68hc05l9_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68hc05_device( mconfig, tag, @@ -1318,7 +1318,7 @@ void m68hc05l11_device::l11_map(address_map &map) } -m68hc05l11_device::m68hc05l11_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m68hc05l11_device::m68hc05l11_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m68hc05_device( mconfig, tag, diff --git a/src/devices/cpu/m6805/m68hc05.h b/src/devices/cpu/m6805/m68hc05.h index 939f71de211..5843a7df2f0 100644 --- a/src/devices/cpu/m6805/m68hc05.h +++ b/src/devices/cpu/m6805/m68hc05.h @@ -87,7 +87,7 @@ protected: machine_config const &mconfig, char const *tag, device_t *owner, - u32 clock, + const XTAL &clock, device_type type, u32 addr_width, u16 vector_mask, @@ -189,7 +189,7 @@ protected: machine_config const &mconfig, char const *tag, device_t *owner, - u32 clock, + const XTAL &clock, device_type type, u32 addr_width, address_map_constructor internal_map); @@ -201,7 +201,7 @@ protected: class m68hc05c4_device : public m68hc05_device { public: - m68hc05c4_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68hc05c4_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: void c4_map(address_map &map); @@ -217,7 +217,7 @@ protected: class m68hc05c8_device : public m68hc05_device { public: - m68hc05c8_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68hc05c8_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: void c8_map(address_map &map); @@ -233,7 +233,7 @@ protected: class m68hc705c4a_device : public m68hc705_device { public: - m68hc705c4a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68hc705c4a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: void c4a_map(address_map &map); @@ -257,7 +257,7 @@ private: class m68hc705c8a_device : public m68hc705_device { public: - m68hc705c8a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68hc705c8a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: void c8a_map(address_map &map); @@ -287,7 +287,7 @@ private: class m68hc705j1a_device : public m68hc705_device { public: - m68hc705j1a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68hc705j1a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: void j1a_map(address_map &map); @@ -304,7 +304,7 @@ protected: class m68hc05l9_device : public m68hc05_device { public: - m68hc05l9_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68hc05l9_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: void l9_map(address_map &map); @@ -320,7 +320,7 @@ protected: class m68hc05l11_device : public m68hc05_device { public: - m68hc05l11_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m68hc05l11_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: void l11_map(address_map &map); diff --git a/src/devices/cpu/m6809/hd6309.cpp b/src/devices/cpu/m6809/hd6309.cpp index 03eb11336e2..6da69f8ca05 100644 --- a/src/devices/cpu/m6809/hd6309.cpp +++ b/src/devices/cpu/m6809/hd6309.cpp @@ -132,19 +132,19 @@ DEFINE_DEVICE_TYPE(HD6309E, hd6309e_device, "hd6309e", "Hitachi HD6309E") // hd6309_device - constructor //------------------------------------------------- -hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type, int divider) : +hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type, int divider) : m6809_base_device(mconfig, tag, owner, clock, type, divider), m_md(0), m_temp_im(0) { } -hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hd6309_device::hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6309_device(mconfig, tag, owner, clock, HD6309, 4) { } -hd6309e_device::hd6309e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hd6309e_device::hd6309e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6309_device(mconfig, tag, owner, clock, HD6309E, 1) { } diff --git a/src/devices/cpu/m6809/hd6309.h b/src/devices/cpu/m6809/hd6309.h index 99065882116..5764d5314de 100644 --- a/src/devices/cpu/m6809/hd6309.h +++ b/src/devices/cpu/m6809/hd6309.h @@ -30,11 +30,11 @@ class hd6309_device : public m6809_base_device { public: // construction/destruction - hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // delegating constructor - hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type, int divider); + hd6309_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type, int divider); // device-level overrides virtual void device_start() override; @@ -148,7 +148,7 @@ class hd6309e_device : public hd6309_device { public: // construction/destruction - hd6309e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6309e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #define HD6309_IRQ_LINE M6809_IRQ_LINE /* 0 - IRQ line number */ diff --git a/src/devices/cpu/m6809/konami.cpp b/src/devices/cpu/m6809/konami.cpp index 95bd6765526..b0c76e0f8fc 100644 --- a/src/devices/cpu/m6809/konami.cpp +++ b/src/devices/cpu/m6809/konami.cpp @@ -84,7 +84,7 @@ DEFINE_DEVICE_TYPE(KONAMI, konami_cpu_device, "konami_cpu", "KONAMI CPU") // konami_cpu_device - constructor //------------------------------------------------- -konami_cpu_device::konami_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +konami_cpu_device::konami_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6809_base_device(mconfig, tag, owner, clock, KONAMI, 1) , m_set_lines(*this) { diff --git a/src/devices/cpu/m6809/konami.h b/src/devices/cpu/m6809/konami.h index edb595d771e..44e08872724 100644 --- a/src/devices/cpu/m6809/konami.h +++ b/src/devices/cpu/m6809/konami.h @@ -29,7 +29,7 @@ class konami_cpu_device : public m6809_base_device { public: // construction/destruction - konami_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto line() { return m_set_lines.bind(); } diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp index 52ddfa433c6..9536081d001 100644 --- a/src/devices/cpu/m6809/m6809.cpp +++ b/src/devices/cpu/m6809/m6809.cpp @@ -136,7 +136,7 @@ DEFINE_DEVICE_TYPE(M6809, m6809_device, "m6809", "MC6809 (legacy)") // m6809_base_device - constructor //------------------------------------------------- -m6809_base_device::m6809_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const device_type type, int divider) +m6809_base_device::m6809_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, int divider) : cpu_device(mconfig, type, tag, owner, clock), m_lic_func(*this), m_program_config("program", ENDIANNESS_BIG, 8, 16), @@ -603,7 +603,7 @@ void m6809_base_device::mi_default::write(uint16_t adr, uint8_t val) // mc6809_device //------------------------------------------------- -mc6809_device::mc6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6809_device::mc6809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6809_base_device(mconfig, tag, owner, clock, MC6809, 4) { } @@ -614,7 +614,7 @@ mc6809_device::mc6809_device(const machine_config &mconfig, const char *tag, dev // mc6809e_device //------------------------------------------------- -mc6809e_device::mc6809e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6809e_device::mc6809e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6809_base_device(mconfig, tag, owner, clock, MC6809E, 1) { } @@ -625,7 +625,7 @@ mc6809e_device::mc6809e_device(const machine_config &mconfig, const char *tag, d // m6809_device //------------------------------------------------- -m6809_device::m6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6809_device::m6809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6809_base_device(mconfig, tag, owner, clock, M6809, 1) { } diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h index 3fc0b8bae1d..490a7658511 100644 --- a/src/devices/cpu/m6809/m6809.h +++ b/src/devices/cpu/m6809/m6809.h @@ -30,7 +30,7 @@ class m6809_base_device : public cpu_device { protected: // construction/destruction - m6809_base_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const device_type type, int divider); + m6809_base_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const device_type type, int divider); class memory_interface { public: @@ -302,7 +302,7 @@ class mc6809_device : public m6809_base_device { public: // construction/destruction - mc6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> mc6809e_device @@ -311,7 +311,7 @@ class mc6809e_device : public m6809_base_device { public: // construction/destruction - mc6809e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6809e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // MC6809E has LIC line to indicate opcode/data fetch auto lic() { return m_lic_func.bind(); } @@ -323,7 +323,7 @@ class m6809_device : public m6809_base_device { public: // construction/destruction - m6809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum diff --git a/src/devices/cpu/m68hc16/cpu16.cpp b/src/devices/cpu/m68hc16/cpu16.cpp index ea6bfbefe78..313f28dff79 100644 --- a/src/devices/cpu/m68hc16/cpu16.cpp +++ b/src/devices/cpu/m68hc16/cpu16.cpp @@ -181,7 +181,7 @@ enum class cpu16_device::seq : u16 ALLOW_SAVE_TYPE(cpu16_device::seq) -cpu16_device::cpu16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +cpu16_device::cpu16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 20, 0, map) , m_data_config("data", ENDIANNESS_BIG, 16, 20, 0, map) diff --git a/src/devices/cpu/m68hc16/cpu16.h b/src/devices/cpu/m68hc16/cpu16.h index bb8c47bbd1c..48c6dce7848 100644 --- a/src/devices/cpu/m68hc16/cpu16.h +++ b/src/devices/cpu/m68hc16/cpu16.h @@ -26,7 +26,7 @@ public: protected: // construction/destruction - cpu16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map); + cpu16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/m68hc16/m68hc16z.cpp b/src/devices/cpu/m68hc16/m68hc16z.cpp index 9bd136eb053..0974727634a 100644 --- a/src/devices/cpu/m68hc16/m68hc16z.cpp +++ b/src/devices/cpu/m68hc16/m68hc16z.cpp @@ -29,7 +29,7 @@ // device type definition DEFINE_DEVICE_TYPE(MC68HC16Z1, mc68hc16z1_device, "mc68hc16z1", "Motorola MC68HC16Z1") -m68hc16z_device::m68hc16z_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +m68hc16z_device::m68hc16z_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : cpu16_device(mconfig, type, tag, owner, clock, map) , m_pitr(0) , m_sccr{0, 0} @@ -38,7 +38,7 @@ m68hc16z_device::m68hc16z_device(const machine_config &mconfig, device_type type { } -mc68hc16z1_device::mc68hc16z1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc68hc16z1_device::mc68hc16z1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68hc16z_device(mconfig, MC68HC16Z1, tag, owner, clock, address_map_constructor(FUNC(mc68hc16z1_device::internal_map), this)) { } diff --git a/src/devices/cpu/m68hc16/m68hc16z.h b/src/devices/cpu/m68hc16/m68hc16z.h index e28fb879df1..ebfc7fc08a0 100644 --- a/src/devices/cpu/m68hc16/m68hc16z.h +++ b/src/devices/cpu/m68hc16/m68hc16z.h @@ -12,7 +12,7 @@ class m68hc16z_device : public cpu16_device { protected: - m68hc16z_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map); + m68hc16z_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map); // device-level overrides virtual void device_start() override; @@ -92,7 +92,7 @@ class mc68hc16z1_device : public m68hc16z_device { public: // device type constructor - mc68hc16z1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc68hc16z1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); diff --git a/src/devices/cpu/m88000/m88000.cpp b/src/devices/cpu/m88000/m88000.cpp index f3921bc8667..89d369d4020 100644 --- a/src/devices/cpu/m88000/m88000.cpp +++ b/src/devices/cpu/m88000/m88000.cpp @@ -127,7 +127,7 @@ enum fcr_mask : u32 // device type definitions DEFINE_DEVICE_TYPE(MC88100, mc88100_device, "mc88100", "Motorola MC88100") -mc88100_device::mc88100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc88100_device::mc88100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, MC88100, tag, owner, clock) , m_code_config("code", ENDIANNESS_BIG, 32, 32, 0) , m_data_config("data", ENDIANNESS_BIG, 32, 32, 0) diff --git a/src/devices/cpu/m88000/m88000.h b/src/devices/cpu/m88000/m88000.h index 896ab05df51..cb361970f1a 100644 --- a/src/devices/cpu/m88000/m88000.h +++ b/src/devices/cpu/m88000/m88000.h @@ -17,7 +17,7 @@ class mc88100_device : public cpu_device { public: // construction/destruction - mc88100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc88100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/mb86233/mb86233.cpp b/src/devices/cpu/mb86233/mb86233.cpp index 479b6fa0399..180e61d7472 100644 --- a/src/devices/cpu/mb86233/mb86233.cpp +++ b/src/devices/cpu/mb86233/mb86233.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(MB86233, mb86233_device, "mb86233", "Fujitsu MB86233 (TGP)") DEFINE_DEVICE_TYPE(MB86234, mb86234_device, "mb86234", "Fujitsu MB86234 (TGP)") -mb86233_device::mb86233_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mb86233_device::mb86233_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 16, -2) , m_data_config("data", ENDIANNESS_LITTLE, 32, 16, -2) @@ -57,12 +57,12 @@ mb86233_device::mb86233_device(const machine_config &mconfig, device_type type, { } -mb86233_device::mb86233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb86233_device::mb86233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb86233_device(mconfig, MB86233, tag, owner, clock) { } -mb86234_device::mb86234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb86234_device::mb86234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb86233_device(mconfig, MB86234, tag, owner, clock) { } diff --git a/src/devices/cpu/mb86233/mb86233.h b/src/devices/cpu/mb86233/mb86233.h index 4b1915dc836..d62f24db785 100644 --- a/src/devices/cpu/mb86233/mb86233.h +++ b/src/devices/cpu/mb86233/mb86233.h @@ -58,7 +58,7 @@ public: F_ZC1 = 0x80000000 }; - mb86233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb86233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void stall() { m_stall = true; } @@ -68,7 +68,7 @@ public: DECLARE_WRITE_LINE_MEMBER(gpio3_w); protected: - mb86233_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mb86233_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -134,7 +134,7 @@ private: class mb86234_device : public mb86233_device { public: - mb86234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb86234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/mb86235/mb86235.cpp b/src/devices/cpu/mb86235/mb86235.cpp index 23e52b6d1be..5449c900ab3 100644 --- a/src/devices/cpu/mb86235/mb86235.cpp +++ b/src/devices/cpu/mb86235/mb86235.cpp @@ -258,7 +258,7 @@ void mb86235_cpu_device::execute_set_input(int irqline, int state) } #endif -mb86235_device::mb86235_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb86235_device::mb86235_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, MB86235, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 64, 32, -3) , m_dataa_config("data_a", ENDIANNESS_LITTLE, 32, 24, -2, address_map_constructor(FUNC(mb86235_device::internal_abus), this)) diff --git a/src/devices/cpu/mb86235/mb86235.h b/src/devices/cpu/mb86235/mb86235.h index c859807bf56..652b5798684 100644 --- a/src/devices/cpu/mb86235/mb86235.h +++ b/src/devices/cpu/mb86235/mb86235.h @@ -23,7 +23,7 @@ class mb86235_device : public cpu_device public: // construction/destruction - mb86235_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t clock); + mb86235_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &clock); virtual ~mb86235_device() override; template void set_fifoin_tag(T &&fifo_tag) { m_fifoin.set_tag(std::forward(fifo_tag)); } diff --git a/src/devices/cpu/mb88xx/mb88xx.cpp b/src/devices/cpu/mb88xx/mb88xx.cpp index 1ef53c5e00b..c45520262e2 100644 --- a/src/devices/cpu/mb88xx/mb88xx.cpp +++ b/src/devices/cpu/mb88xx/mb88xx.cpp @@ -112,7 +112,7 @@ void mb88_cpu_device::data_7bit(address_map &map) } -mb88_cpu_device::mb88_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width) +mb88_cpu_device::mb88_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, program_width, 0, (program_width == 9) ? address_map_constructor(FUNC(mb88_cpu_device::program_9bit), this) : (program_width == 10) ? address_map_constructor(FUNC(mb88_cpu_device::program_10bit), this) : address_map_constructor(FUNC(mb88_cpu_device::program_11bit), this)) , m_data_config("data", ENDIANNESS_BIG, 8, data_width, 0, (data_width == 4) ? address_map_constructor(FUNC(mb88_cpu_device::data_4bit), this) : (data_width == 5) ? address_map_constructor(FUNC(mb88_cpu_device::data_5bit), this) : (data_width == 6) ? address_map_constructor(FUNC(mb88_cpu_device::data_6bit), this) : address_map_constructor(FUNC(mb88_cpu_device::data_7bit), this)) @@ -127,36 +127,36 @@ mb88_cpu_device::mb88_cpu_device(const machine_config &mconfig, device_type type { } -mb88201_cpu_device::mb88201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb88201_cpu_device::mb88201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb88_cpu_device(mconfig, MB88201, tag, owner, clock, 9, 4) { } -mb88202_cpu_device::mb88202_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb88202_cpu_device::mb88202_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb88_cpu_device(mconfig, MB88202, tag, owner, clock, 10, 5) { } -mb8841_cpu_device::mb8841_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb8841_cpu_device::mb8841_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb88_cpu_device(mconfig, MB8841, tag, owner, clock, 11, 7) { } -mb8842_cpu_device::mb8842_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb8842_cpu_device::mb8842_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb88_cpu_device(mconfig, MB8842, tag, owner, clock, 11, 7) { } -mb8843_cpu_device::mb8843_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb8843_cpu_device::mb8843_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb88_cpu_device(mconfig, MB8843, tag, owner, clock, 10, 6) { } -mb8844_cpu_device::mb8844_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb8844_cpu_device::mb8844_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb88_cpu_device(mconfig, MB8844, tag, owner, clock, 10, 6) { } diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h index 6bae70de879..fc4b23950eb 100644 --- a/src/devices/cpu/mb88xx/mb88xx.h +++ b/src/devices/cpu/mb88xx/mb88xx.h @@ -106,7 +106,7 @@ public: void program_11bit(address_map &map); void program_9bit(address_map &map); protected: - mb88_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width); + mb88_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width); // device-level overrides virtual void device_start() override; @@ -199,7 +199,7 @@ class mb88201_cpu_device : public mb88_cpu_device { public: // construction/destruction - mb88201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb88201_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -207,7 +207,7 @@ class mb88202_cpu_device : public mb88_cpu_device { public: // construction/destruction - mb88202_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb88202_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -215,7 +215,7 @@ class mb8841_cpu_device : public mb88_cpu_device { public: // construction/destruction - mb8841_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8841_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -223,7 +223,7 @@ class mb8842_cpu_device : public mb88_cpu_device { public: // construction/destruction - mb8842_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8842_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -231,7 +231,7 @@ class mb8843_cpu_device : public mb88_cpu_device { public: // construction/destruction - mb8843_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8843_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -239,7 +239,7 @@ class mb8844_cpu_device : public mb88_cpu_device { public: // construction/destruction - mb8844_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8844_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/mc68hc11/mc68hc11.cpp b/src/devices/cpu/mc68hc11/mc68hc11.cpp index 6a03dcb769b..2a9da9bb22a 100644 --- a/src/devices/cpu/mc68hc11/mc68hc11.cpp +++ b/src/devices/cpu/mc68hc11/mc68hc11.cpp @@ -53,7 +53,7 @@ DEFINE_DEVICE_TYPE(MC68HC11K1, mc68hc11k1_device, "mc68hc11k1", "Motorola MC68HC DEFINE_DEVICE_TYPE(MC68HC11M0, mc68hc11m0_device, "mc68hc11m0", "Motorola MC68HC11M0") -mc68hc11_cpu_device::mc68hc11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t ram_size, uint16_t reg_block_size, uint16_t rom_size, uint16_t eeprom_size, uint8_t init_value, uint8_t config_mask, uint8_t option_mask) +mc68hc11_cpu_device::mc68hc11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t ram_size, uint16_t reg_block_size, uint16_t rom_size, uint16_t eeprom_size, uint8_t init_value, uint8_t config_mask, uint8_t option_mask) : cpu_device(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this, (config_mask & 0xf9) != 0) , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, address_map_constructor(FUNC(mc68hc11_cpu_device::internal_map), this)) @@ -107,38 +107,38 @@ void mc68hc11_cpu_device::internal_map(address_map &map) } } -mc68hc11a1_device::mc68hc11a1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68hc11a1_device::mc68hc11a1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68hc11_cpu_device(mconfig, MC68HC11A1, tag, owner, clock, 256, 64, 0, 512, 0x01, 0x0f, 0xfb) { } -mc68hc11d0_device::mc68hc11d0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68hc11d0_device::mc68hc11d0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68hc11_cpu_device(mconfig, MC68HC11D0, tag, owner, clock, 192, 64, 0, 0, 0x00, 0x06, 0x3b) { } -mc68hc11e1_device::mc68hc11e1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68hc11e1_device::mc68hc11e1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68hc11_cpu_device(mconfig, MC68HC11E1, tag, owner, clock, 512, 64, 0, 512, 0x01, 0x0f, 0xfb) { } -mc68hc811e2_device::mc68hc811e2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68hc811e2_device::mc68hc811e2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68hc11_cpu_device(mconfig, MC68HC811E2, tag, owner, clock, 256, 64, 0, 2048, 0x01, 0xf5, 0xfb) { } -mc68hc11f1_device::mc68hc11f1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68hc11f1_device::mc68hc11f1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68hc11_cpu_device(mconfig, MC68HC11F1, tag, owner, clock, 1024, 96, 0, 512, 0x01, 0xf5, 0xff) { m_config &= 0x0f; } -mc68hc11k1_device::mc68hc11k1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68hc11k1_device::mc68hc11k1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68hc11_cpu_device(mconfig, MC68HC11K1, tag, owner, clock, 768, 128, 0, 640, 0x00, 0xbf, 0xff) { } -mc68hc11m0_device::mc68hc11m0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68hc11m0_device::mc68hc11m0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68hc11_cpu_device(mconfig, MC68HC11M0, tag, owner, clock, 1280, 256, 0, 0, 0x00, 0x06, 0xff) { } diff --git a/src/devices/cpu/mc68hc11/mc68hc11.h b/src/devices/cpu/mc68hc11/mc68hc11.h index f4b60849063..45564643f3b 100644 --- a/src/devices/cpu/mc68hc11/mc68hc11.h +++ b/src/devices/cpu/mc68hc11/mc68hc11.h @@ -54,7 +54,7 @@ public: void set_default_config(uint8_t data) { assert(!configured()); m_config = data & m_config_mask; } protected: - mc68hc11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t ram_size, uint16_t reg_block_size, uint16_t rom_size, uint16_t eeprom_size, uint8_t init_value, uint8_t config_mask, uint8_t option_mask); + mc68hc11_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t ram_size, uint16_t reg_block_size, uint16_t rom_size, uint16_t eeprom_size, uint8_t init_value, uint8_t config_mask, uint8_t option_mask); // device-level overrides virtual void device_resolve_objects() override; @@ -560,7 +560,7 @@ class mc68hc11a1_device : public mc68hc11_cpu_device { public: // construction/destruction - mc68hc11a1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68hc11a1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -575,7 +575,7 @@ class mc68hc11d0_device : public mc68hc11_cpu_device { public: // construction/destruction - mc68hc11d0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68hc11d0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -590,7 +590,7 @@ class mc68hc11e1_device : public mc68hc11_cpu_device { public: // construction/destruction - mc68hc11e1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68hc11e1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -602,7 +602,7 @@ class mc68hc811e2_device : public mc68hc11_cpu_device { public: // construction/destruction - mc68hc811e2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68hc811e2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -614,7 +614,7 @@ class mc68hc11f1_device : public mc68hc11_cpu_device { public: // construction/destruction - mc68hc11f1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68hc11f1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -626,7 +626,7 @@ class mc68hc11k1_device : public mc68hc11_cpu_device { public: // construction/destruction - mc68hc11k1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68hc11k1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void mc68hc11_reg_map(memory_view::memory_view_entry &block, offs_t base) override; @@ -636,7 +636,7 @@ class mc68hc11m0_device : public mc68hc11_cpu_device { public: // construction/destruction - mc68hc11m0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68hc11m0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void mc68hc11_reg_map(memory_view::memory_view_entry &block, offs_t base) override; diff --git a/src/devices/cpu/mcs40/mcs40.cpp b/src/devices/cpu/mcs40/mcs40.cpp index 0b9b80c719f..9e2c10031fd 100644 --- a/src/devices/cpu/mcs40/mcs40.cpp +++ b/src/devices/cpu/mcs40/mcs40.cpp @@ -85,7 +85,7 @@ mcs40_cpu_device_base::mcs40_cpu_device_base( device_type type, const char *tag, device_t *owner, - u32 clock, + const XTAL &clock, bool extended_cm, unsigned rom_width, unsigned stack_ptr_mask, @@ -822,7 +822,7 @@ inline void mcs40_cpu_device_base::update_4289_f_l(u8 val) -i4004_cpu_device::i4004_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +i4004_cpu_device::i4004_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mcs40_cpu_device_base(mconfig, I4004, tag, owner, clock, false, 12U, 0x3U, 16U, 0x7U) { } @@ -1132,7 +1132,7 @@ u8 i4004_cpu_device::do_io(u8 opr, u8 opa) -i4040_cpu_device::i4040_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +i4040_cpu_device::i4040_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : i4004_cpu_device(mconfig, I4040, tag, owner, clock, true, 13U, 0x7U, 24U, 0xfU) { } diff --git a/src/devices/cpu/mcs40/mcs40.h b/src/devices/cpu/mcs40/mcs40.h index 68a8dca161f..69e11def3c9 100644 --- a/src/devices/cpu/mcs40/mcs40.h +++ b/src/devices/cpu/mcs40/mcs40.h @@ -74,7 +74,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock, + const XTAL &clock, bool extended_cm, unsigned rom_width, unsigned stack_ptr_mask, @@ -253,7 +253,7 @@ public: auto cm_rom_cb() { return mcs40_cpu_device_base::cm_rom_cb<0>(); } template auto cm_ram_cb() { return mcs40_cpu_device_base::cm_ram_cb(); } - i4004_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + i4004_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: using mcs40_cpu_device_base::mcs40_cpu_device_base; @@ -282,7 +282,7 @@ public: auto cy_cb() { return i4004_cpu_device::cy_cb(); } using mcs40_cpu_device_base::stp_ack_cb; - i4040_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + i4040_cpu_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface implementation diff --git a/src/devices/cpu/mcs48/mcs48.cpp b/src/devices/cpu/mcs48/mcs48.cpp index b429ac28ead..df57397e7ee 100644 --- a/src/devices/cpu/mcs48/mcs48.cpp +++ b/src/devices/cpu/mcs48/mcs48.cpp @@ -199,7 +199,7 @@ void mcs48_cpu_device::data_8bit(address_map &map) } -mcs48_cpu_device::mcs48_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int rom_size, int ram_size, uint8_t feature_mask, const mcs48_cpu_device::mcs48_ophandler *opcode_table) +mcs48_cpu_device::mcs48_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int rom_size, int ram_size, uint8_t feature_mask, const mcs48_cpu_device::mcs48_ophandler *opcode_table) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, (feature_mask & MB_FEATURE) != 0 ? 12 : 11, 0 , (rom_size == 1024) ? address_map_constructor(FUNC(mcs48_cpu_device::program_10bit), this) : (rom_size == 2048) ? address_map_constructor(FUNC(mcs48_cpu_device::program_11bit), this) : (rom_size == 4096) ? address_map_constructor(FUNC(mcs48_cpu_device::program_12bit), this) : address_map_constructor()) @@ -231,117 +231,117 @@ mcs48_cpu_device::mcs48_cpu_device(const machine_config &mconfig, device_type ty } } -i8021_device::i8021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8021_device::i8021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8021, tag, owner, clock, 1024, 64, I802X_FEATURE, s_i8021_opcodes) { } -i8022_device::i8022_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8022_device::i8022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8022, tag, owner, clock, 2048, 128, I802X_FEATURE, s_i8022_opcodes) { } -i8035_device::i8035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8035_device::i8035_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8035, tag, owner, clock, 0, 64, I8048_FEATURE, s_mcs48_opcodes) { } -i8048_device::i8048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8048_device::i8048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8048, tag, owner, clock, 1024, 64, I8048_FEATURE, s_mcs48_opcodes) { } -i8648_device::i8648_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8648_device::i8648_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8648, tag, owner, clock, 1024, 64, I8048_FEATURE, s_mcs48_opcodes) { } -i8748_device::i8748_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8748_device::i8748_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8748, tag, owner, clock, 1024, 64, I8048_FEATURE, s_mcs48_opcodes) { } -i8039_device::i8039_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8039_device::i8039_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8039, tag, owner, clock, 0, 128, I8048_FEATURE, s_mcs48_opcodes) { } -i8049_device::i8049_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8049_device::i8049_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8049, tag, owner, clock, 2048, 128, I8048_FEATURE, s_mcs48_opcodes) { } -i8749_device::i8749_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8749_device::i8749_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8749, tag, owner, clock, 2048, 128, I8048_FEATURE, s_mcs48_opcodes) { } -i8040_device::i8040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8040_device::i8040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8040, tag, owner, clock, 0, 256, I8048_FEATURE, s_mcs48_opcodes) { } -i8050_device::i8050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8050_device::i8050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, I8050, tag, owner, clock, 4096, 256, I8048_FEATURE, s_mcs48_opcodes) { } -mb8884_device::mb8884_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb8884_device::mb8884_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, MB8884, tag, owner, clock, 0, 64, I8048_FEATURE, s_mcs48_opcodes) { } -n7751_device::n7751_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +n7751_device::n7751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, N7751, tag, owner, clock, 1024, 64, I8048_FEATURE, s_mcs48_opcodes) { } -m58715_device::m58715_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m58715_device::m58715_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs48_cpu_device(mconfig, M58715, tag, owner, clock, 2048, 128, I8048_FEATURE, s_mcs48_opcodes) { } -upi41_cpu_device::upi41_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int rom_size, int ram_size) +upi41_cpu_device::upi41_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int rom_size, int ram_size) : mcs48_cpu_device(mconfig, type, tag, owner, clock, rom_size, ram_size, UPI41_FEATURE, s_upi41_opcodes) { } -i8041a_device::i8041a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8041a_device::i8041a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8041A, tag, owner, clock, 1024, 64) { } -i8741a_device::i8741a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8741a_device::i8741a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8741A, tag, owner, clock, 1024, 64) { } -i8041ah_device::i8041ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8041ah_device::i8041ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8041AH, tag, owner, clock, 1024, 128) { } -i8741ah_device::i8741ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8741ah_device::i8741ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8741AH, tag, owner, clock, 1024, 128) { } -i8042_device::i8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8042_device::i8042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8042, tag, owner, clock, 2048, 128) { } -i8742_device::i8742_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8742_device::i8742_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8742, tag, owner, clock, 2048, 128) { } -i8042ah_device::i8042ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8042ah_device::i8042ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8042AH, tag, owner, clock, 2048, 256) { } -i8742ah_device::i8742ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8742ah_device::i8742ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upi41_cpu_device(mconfig, I8742AH, tag, owner, clock, 2048, 256) { } @@ -1226,7 +1226,7 @@ void mcs48_cpu_device::device_reset() m_flags_enabled = false; m_dma_enabled = false; if (!m_t0_clk_func.isnull()) - m_t0_clk_func(0); + m_t0_clk_func(XTAL()); // confirmed from interrupt logic description m_irq_in_progress = false; diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h index bb5d3da44f9..f61609b3907 100644 --- a/src/devices/cpu/mcs48/mcs48.h +++ b/src/devices/cpu/mcs48/mcs48.h @@ -141,7 +141,7 @@ protected: typedef void (mcs48_cpu_device::*mcs48_ophandler)(); // construction/destruction - mcs48_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int rom_size, int ram_size, uint8_t feature_mask, const mcs48_ophandler *opcode_table); + mcs48_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int rom_size, int ram_size, uint8_t feature_mask, const mcs48_ophandler *opcode_table); // device-level overrides virtual void device_start() override; @@ -516,7 +516,7 @@ public: auto p0_out_cb() { return bus_out_cb(); } // construction/destruction - i8021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides @@ -528,7 +528,7 @@ class i8022_device : public mcs48_cpu_device { public: // construction/destruction - i8022_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides @@ -540,84 +540,84 @@ class i8035_device : public mcs48_cpu_device { public: // construction/destruction - i8035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8035_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8048_device : public mcs48_cpu_device { public: // construction/destruction - i8048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8648_device : public mcs48_cpu_device { public: // construction/destruction - i8648_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8648_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8748_device : public mcs48_cpu_device { public: // construction/destruction - i8748_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8748_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8039_device : public mcs48_cpu_device { public: // construction/destruction - i8039_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8039_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8049_device : public mcs48_cpu_device { public: // construction/destruction - i8049_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8049_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8749_device : public mcs48_cpu_device { public: // construction/destruction - i8749_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8749_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8040_device : public mcs48_cpu_device { public: // construction/destruction - i8040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8050_device : public mcs48_cpu_device { public: // construction/destruction - i8050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mb8884_device : public mcs48_cpu_device { public: // construction/destruction - mb8884_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8884_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class n7751_device : public mcs48_cpu_device { public: // construction/destruction - n7751_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + n7751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class m58715_device : public mcs48_cpu_device { public: // construction/destruction - m58715_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m58715_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -630,7 +630,7 @@ public: protected: // construction/destruction - upi41_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int rom_size, int ram_size); + upi41_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int rom_size, int ram_size); TIMER_CALLBACK_MEMBER( master_callback ); }; @@ -639,56 +639,56 @@ class i8041a_device : public upi41_cpu_device { public: // construction/destruction - i8041a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8041a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8741a_device : public upi41_cpu_device { public: // construction/destruction - i8741a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8741a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8041ah_device : public upi41_cpu_device { public: // construction/destruction - i8041ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8041ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8741ah_device : public upi41_cpu_device { public: // construction/destruction - i8741ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8741ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8042_device : public upi41_cpu_device { public: // construction/destruction - i8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8742_device : public upi41_cpu_device { public: // construction/destruction - i8742_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8742_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8042ah_device : public upi41_cpu_device { public: // construction/destruction - i8042ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8042ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8742ah_device : public upi41_cpu_device { public: // construction/destruction - i8742ah_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8742ah_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp index 9f5bd04e4c0..a463992cebc 100644 --- a/src/devices/cpu/mcs51/mcs51.cpp +++ b/src/devices/cpu/mcs51/mcs51.cpp @@ -267,7 +267,7 @@ void mcs51_cpu_device::data_internal(address_map &map) -mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features) +mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, program_map) , m_data_config("data", ENDIANNESS_LITTLE, 8, 9, 0, data_map) @@ -295,147 +295,147 @@ mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type ty } -mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features) +mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features) : mcs51_cpu_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(mcs51_cpu_device::program_internal), this), address_map_constructor(FUNC(mcs51_cpu_device::data_internal), this), program_width, data_width, features) { } -i8031_device::i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8031_device::i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs51_cpu_device(mconfig, I8031, tag, owner, clock, 0, 7) { } -i8051_device::i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8051_device::i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs51_cpu_device(mconfig, I8051, tag, owner, clock, 12, 7) { } -i8751_device::i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8751_device::i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs51_cpu_device(mconfig, I8751, tag, owner, clock, 12, 7) { } -am8753_device::am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am8753_device::am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs51_cpu_device(mconfig, AM8753, tag, owner, clock, 13, 7) { } -i8052_device::i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features) +i8052_device::i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features) : mcs51_cpu_device(mconfig, type, tag, owner, clock, program_width, data_width, features | FEATURE_I8052) { m_num_interrupts = 6; } -i8052_device::i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8052_device::i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8052_device(mconfig, I8052, tag, owner, clock, 13, 8) { } -i8032_device::i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8032_device::i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8052_device(mconfig, I8032, tag, owner, clock, 0, 8) { } -i8752_device::i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8752_device::i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8052_device(mconfig, I8752, tag, owner, clock, 13, 8) { } -i80c31_device::i80c31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80c31_device::i80c31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8052_device(mconfig, I80C31, tag, owner, clock, 0, 7) { } -i80c51_device::i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features) +i80c51_device::i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features) : mcs51_cpu_device(mconfig, type, tag, owner, clock, program_width, data_width, features | FEATURE_CMOS) { } -i80c51_device::i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80c51_device::i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c51_device(mconfig, I80C51, tag, owner, clock, 12, 7) { } -i87c51_device::i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i87c51_device::i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c51_device(mconfig, I87C51, tag, owner, clock, 12, 7) { } -i80c52_device::i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features) +i80c52_device::i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features) : i8052_device(mconfig, type, tag, owner, clock, program_width, data_width, features | FEATURE_I80C52 | FEATURE_CMOS) { } -i80c52_device::i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80c52_device::i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c52_device(mconfig, I80C52, tag, owner, clock, 13, 8) { } -i80c32_device::i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80c32_device::i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c52_device(mconfig, I80C32, tag, owner, clock, 0, 8) { } -i87c52_device::i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i87c52_device::i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c52_device(mconfig, I87C52, tag, owner, clock, 13, 8) { } -i87c51fa_device::i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features) +i87c51fa_device::i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features) : i80c52_device(mconfig, type, tag, owner, clock, program_width, data_width, features) { } -i87c51fa_device::i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i87c51fa_device::i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i87c51fa_device(mconfig, I87C51FA, tag, owner, clock, 13, 8) { } -i80c51gb_device::i80c51gb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80c51gb_device::i80c51gb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i87c51fa_device(mconfig, I80C51GB, tag, owner, clock, 0, 8) { } -at89c52_device::at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at89c52_device::at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c52_device(mconfig, AT89C52, tag, owner, clock, 13, 8) { } -at89s52_device::at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at89s52_device::at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c52_device(mconfig, AT89S52, tag, owner, clock, 13, 8) { } -at89c4051_device::at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at89c4051_device::at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c51_device(mconfig, AT89C4051, tag, owner, clock, 12, 7) { } -ds80c320_device::ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds80c320_device::ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c52_device(mconfig, DS80C320, tag, owner, clock, 0, 8) { } -sab80c535_device::sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sab80c535_device::sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i80c51_device(mconfig, SAB80C535, tag, owner, clock, 0, 8) { } -i8344_device::i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8344_device::i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs51_cpu_device(mconfig, I8344, tag, owner, clock, 0, 8) { } -i8744_device::i8744_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8744_device::i8744_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs51_cpu_device(mconfig, I8744, tag, owner, clock, 12, 8) { } /* program width field is set to 0 because technically the SRAM isn't internal */ -ds5002fp_device::ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds5002fp_device::ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mcs51_cpu_device(mconfig, DS5002FP, tag, owner, clock, 0, 7, FEATURE_DS5002FP | FEATURE_CMOS) , device_nvram_interface(mconfig, *this) , m_region(*this, "internal") diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h index 32925c23de8..39940b2e157 100644 --- a/src/devices/cpu/mcs51/mcs51.h +++ b/src/devices/cpu/mcs51/mcs51.h @@ -71,8 +71,8 @@ public: void data_internal(address_map &map); protected: // construction/destruction - mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0); - mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features = 0); + mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0); + mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features = 0); // device-level overrides virtual void device_start() override; @@ -358,28 +358,28 @@ class i8031_device : public mcs51_cpu_device { public: // construction/destruction - i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8051_device : public mcs51_cpu_device { public: // construction/destruction - i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8751_device : public mcs51_cpu_device { public: // construction/destruction - i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class am8753_device : public mcs51_cpu_device { public: // construction/destruction - am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -387,10 +387,10 @@ class i8052_device : public mcs51_cpu_device { public: // construction/destruction - i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0); + i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0); virtual std::unique_ptr create_disassembler() override; @@ -403,21 +403,21 @@ class i8032_device : public i8052_device { public: // construction/destruction - i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i8752_device : public i8052_device { public: // construction/destruction - i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i80c31_device : public i8052_device { public: // construction/destruction - i80c31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80c31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -428,10 +428,10 @@ class i80c51_device : public mcs51_cpu_device { public: // construction/destruction - i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0); + i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0); virtual std::unique_ptr create_disassembler() override; }; @@ -440,7 +440,7 @@ class i87c51_device : public i80c51_device { public: // construction/destruction - i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -448,10 +448,10 @@ class i80c52_device : public i8052_device { public: // construction/destruction - i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0); + i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0); virtual std::unique_ptr create_disassembler() override; @@ -464,24 +464,24 @@ class i80c32_device : public i80c52_device { public: // construction/destruction - i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i87c52_device : public i80c52_device { public: // construction/destruction - i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i87c51fa_device : public i80c52_device { public: // construction/destruction - i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0); + i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0); virtual std::unique_ptr create_disassembler() override; }; @@ -490,7 +490,7 @@ class i80c51gb_device : public i87c51fa_device { public: // construction/destruction - i80c51gb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80c51gb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -500,28 +500,28 @@ class at89c52_device : public i80c52_device { public: // construction/destruction - at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class at89s52_device : public i80c52_device { public: // construction/destruction - at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class at89c4051_device : public i80c51_device { public: // construction/destruction - at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ds80c320_device : public i80c52_device { public: // construction/destruction - ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -531,7 +531,7 @@ class sab80c535_device : public i80c51_device { public: // construction/destruction - sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -541,7 +541,7 @@ class i8344_device : public mcs51_cpu_device { public: // construction/destruction - i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -551,7 +551,7 @@ class i8744_device : public mcs51_cpu_device { public: // construction/destruction - i8744_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8744_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -588,7 +588,7 @@ class ds5002fp_device : public mcs51_cpu_device, public device_nvram_interface { public: // construction/destruction - ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_mcon(uint8_t mcon) { m_ds5002fp.mcon = mcon; } void set_rpctl(uint8_t rpctl) { m_ds5002fp.rpctl = rpctl; } diff --git a/src/devices/cpu/mcs96/i8x9x.cpp b/src/devices/cpu/mcs96/i8x9x.cpp index 792cc1378bb..bc98ac9122b 100644 --- a/src/devices/cpu/mcs96/i8x9x.cpp +++ b/src/devices/cpu/mcs96/i8x9x.cpp @@ -12,7 +12,7 @@ #include "i8x9x.h" #include "i8x9xd.h" -i8x9x_device::i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int data_width) : +i8x9x_device::i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_width) : mcs96_device(mconfig, type, tag, owner, clock, data_width, address_map_constructor(FUNC(i8x9x_device::internal_regs), this)), m_ach_cb(*this), m_hso_cb(*this), @@ -571,22 +571,22 @@ void i8x9x_device::execute_set_input(int linenum, int state) } } -c8095_90_device::c8095_90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +c8095_90_device::c8095_90_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8x9x_device(mconfig, C8095_90, tag, owner, clock, 16) { } -n8097bh_device::n8097bh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +n8097bh_device::n8097bh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8x9x_device(mconfig, N8097BH, tag, owner, clock, 16) { } -p8098_device::p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +p8098_device::p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8x9x_device(mconfig, P8098, tag, owner, clock, 8) { } -p8798_device::p8798_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +p8798_device::p8798_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8x9x_device(mconfig, P8798, tag, owner, clock, 8) { } diff --git a/src/devices/cpu/mcs96/i8x9x.h b/src/devices/cpu/mcs96/i8x9x.h index 5f4ab03f8a5..e066886a653 100644 --- a/src/devices/cpu/mcs96/i8x9x.h +++ b/src/devices/cpu/mcs96/i8x9x.h @@ -68,7 +68,7 @@ public: virtual u8 i8x9x_p2_mask() const noexcept { return 0xff; } protected: - i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int data_width); + i8x9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_width); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -170,7 +170,7 @@ private: class c8095_90_device : public i8x9x_device { public: - c8095_90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c8095_90_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 i8x9x_p0_mask() const noexcept override { return 0xf0; } @@ -180,12 +180,12 @@ protected: class n8097bh_device : public i8x9x_device { public: - n8097bh_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + n8097bh_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class p8098_device : public i8x9x_device { public: - p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + p8098_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 i8x9x_p0_mask() const noexcept override { return 0xf0; } @@ -195,7 +195,7 @@ protected: class p8798_device : public i8x9x_device { public: - p8798_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + p8798_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 i8x9x_p0_mask() const noexcept override { return 0xf0; } diff --git a/src/devices/cpu/mcs96/i8xc196.cpp b/src/devices/cpu/mcs96/i8xc196.cpp index dd10d5a6b60..1a9b0f63bf5 100644 --- a/src/devices/cpu/mcs96/i8xc196.cpp +++ b/src/devices/cpu/mcs96/i8xc196.cpp @@ -12,7 +12,7 @@ #include "i8xc196.h" #include "i8xc196d.h" -i8xc196_device::i8xc196_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +i8xc196_device::i8xc196_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mcs96_device(mconfig, type, tag, owner, clock, 16, address_map_constructor(FUNC(i8xc196_device::internal_regs), this)) { } diff --git a/src/devices/cpu/mcs96/i8xc196.h b/src/devices/cpu/mcs96/i8xc196.h index 02d3e3d9840..6cff1920d2c 100644 --- a/src/devices/cpu/mcs96/i8xc196.h +++ b/src/devices/cpu/mcs96/i8xc196.h @@ -15,7 +15,7 @@ class i8xc196_device : public mcs96_device { protected: - i8xc196_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i8xc196_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/mcs96/mcs96.cpp b/src/devices/cpu/mcs96/mcs96.cpp index ddf7a7604b5..2a4d784362b 100644 --- a/src/devices/cpu/mcs96/mcs96.cpp +++ b/src/devices/cpu/mcs96/mcs96.cpp @@ -11,7 +11,7 @@ #include "emu.h" #include "mcs96.h" -mcs96_device::mcs96_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_width, address_map_constructor regs_map) : +mcs96_device::mcs96_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_width, address_map_constructor regs_map) : cpu_device(mconfig, type, tag, owner, clock), program_config("program", ENDIANNESS_LITTLE, data_width, 16), regs_config("register", ENDIANNESS_LITTLE, 16, 8, 0, regs_map), diff --git a/src/devices/cpu/mcs96/mcs96.h b/src/devices/cpu/mcs96/mcs96.h index b27d13044c7..a470aa9457f 100644 --- a/src/devices/cpu/mcs96/mcs96.h +++ b/src/devices/cpu/mcs96/mcs96.h @@ -44,7 +44,7 @@ protected: }; - mcs96_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_width, address_map_constructor regs_map); + mcs96_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int data_width, address_map_constructor regs_map); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/melps4/m58846.cpp b/src/devices/cpu/melps4/m58846.cpp index 0440375e47d..1a1e5079791 100644 --- a/src/devices/cpu/melps4/m58846.cpp +++ b/src/devices/cpu/melps4/m58846.cpp @@ -27,7 +27,7 @@ void m58846_device::data_128x4(address_map &map) // device definitions -m58846_device::m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m58846_device::m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : melps4_cpu_device(mconfig, M58846, tag, owner, clock, 11, address_map_constructor(FUNC(m58846_device::program_2kx9), this), 7, address_map_constructor(FUNC(m58846_device::data_128x4), this), 12 /* number of D pins */, 2 /* subroutine page */, 1 /* interrupt page */), m_timer(nullptr) { } diff --git a/src/devices/cpu/melps4/m58846.h b/src/devices/cpu/melps4/m58846.h index 2ba855e3dd2..2eb019e0837 100644 --- a/src/devices/cpu/melps4/m58846.h +++ b/src/devices/cpu/melps4/m58846.h @@ -19,7 +19,7 @@ class m58846_device : public melps4_cpu_device { public: - m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m58846_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/melps4/melps4.cpp b/src/devices/cpu/melps4/melps4.cpp index 973d3b42ce3..eb2f748d9be 100644 --- a/src/devices/cpu/melps4/melps4.cpp +++ b/src/devices/cpu/melps4/melps4.cpp @@ -42,7 +42,7 @@ #include "melps4d.h" -melps4_cpu_device::melps4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, int d_pins, u8 sm_page, u8 int_page) +melps4_cpu_device::melps4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, int d_pins, u8 sm_page, u8 int_page) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, prgwidth, -1, program) , m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data) diff --git a/src/devices/cpu/melps4/melps4.h b/src/devices/cpu/melps4/melps4.h index 09894a1fa8e..0e5a576901a 100644 --- a/src/devices/cpu/melps4/melps4.h +++ b/src/devices/cpu/melps4/melps4.h @@ -90,7 +90,7 @@ public: protected: // construction/destruction - melps4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, int d_pins, u8 sm_page, u8 int_page); + melps4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, int d_pins, u8 sm_page, u8 int_page); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/minx/minx.cpp b/src/devices/cpu/minx/minx.cpp index 018842ecfbd..bd6aa16afe1 100644 --- a/src/devices/cpu/minx/minx.cpp +++ b/src/devices/cpu/minx/minx.cpp @@ -76,7 +76,7 @@ TODO: DEFINE_DEVICE_TYPE(MINX, minx_cpu_device, "minx", "Nintendo Minx") -minx_cpu_device::minx_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +minx_cpu_device::minx_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, MINX, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 24, 0) { diff --git a/src/devices/cpu/minx/minx.h b/src/devices/cpu/minx/minx.h index 991916435ee..06f4b5a3bfb 100644 --- a/src/devices/cpu/minx/minx.h +++ b/src/devices/cpu/minx/minx.h @@ -18,7 +18,7 @@ class minx_cpu_device : public cpu_device { public: // construction/destruction - minx_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + minx_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/mips/mips1.cpp b/src/devices/cpu/mips/mips1.cpp index 6f45a954d50..824cd47e762 100644 --- a/src/devices/cpu/mips/mips1.cpp +++ b/src/devices/cpu/mips/mips1.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_IOP, iop_device, "sonyiop", "Sony Playstation 2 ALLOW_SAVE_TYPE(mips1core_device_base::branch_state); -mips1core_device_base::mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size) +mips1core_device_base::mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config_be("program", ENDIANNESS_BIG, 32, 32) , m_program_config_le("program", ENDIANNESS_LITTLE, 32, 32) @@ -70,64 +70,64 @@ mips1core_device_base::mips1core_device_base(machine_config const &mconfig, devi { } -mips1_device_base::mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size) +mips1_device_base::mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size) : mips1core_device_base(mconfig, type, tag, owner, clock, cpurev, icache_size, dcache_size) , m_fcr0(0) { } -r2000_device::r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size) +r2000_device::r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size) : mips1_device_base(mconfig, R2000, tag, owner, clock, 0x0100, icache_size, dcache_size) { } -r2000a_device::r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size) +r2000a_device::r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size) : mips1_device_base(mconfig, R2000A, tag, owner, clock, 0x0210, icache_size, dcache_size) { } -r3000_device::r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size) +r3000_device::r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size) : mips1_device_base(mconfig, R3000, tag, owner, clock, 0x0220, icache_size, dcache_size) { } -r3000a_device::r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size) +r3000a_device::r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size) : mips1_device_base(mconfig, R3000A, tag, owner, clock, 0x0230, icache_size, dcache_size) { } -r3041_device::r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +r3041_device::r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mips1core_device_base(mconfig, R3041, tag, owner, clock, 0x0700, 2048, 512) { } -r3051_device::r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +r3051_device::r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mips1core_device_base(mconfig, R3051, tag, owner, clock, 0x0200, 4096, 2048) { } -r3052_device::r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +r3052_device::r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mips1core_device_base(mconfig, R3052, tag, owner, clock, 0x0200, 8192, 2048) { } -r3052e_device::r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +r3052e_device::r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mips1_device_base(mconfig, R3052E, tag, owner, clock, 0x0200, 8192, 2048) { } -r3071_device::r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size) +r3071_device::r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size) : mips1_device_base(mconfig, R3071, tag, owner, clock, 0x0200, icache_size, dcache_size) { } -r3081_device::r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size) +r3081_device::r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size) : mips1_device_base(mconfig, R3081, tag, owner, clock, 0x0200, icache_size, dcache_size) { set_fpu(0x0300); } -iop_device::iop_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +iop_device::iop_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : mips1core_device_base(mconfig, SONYPS2_IOP, tag, owner, clock, 0x001f, 4096, 1024) { m_endianness = ENDIANNESS_LITTLE; diff --git a/src/devices/cpu/mips/mips1.h b/src/devices/cpu/mips/mips1.h index df6b1c8e6c9..bdf5c67f51d 100644 --- a/src/devices/cpu/mips/mips1.h +++ b/src/devices/cpu/mips/mips1.h @@ -17,7 +17,7 @@ public: void berr_w(int state) { m_bus_error = bool(state); } protected: - mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size); + mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size); enum registers : unsigned { @@ -261,7 +261,7 @@ public: void set_fpu(u32 revision, unsigned interrupt = 3) { m_fcr0 = revision; m_fpu_irq = interrupt; } protected: - mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size); + mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size); enum cp1_fcr31_mask : u32 { @@ -324,31 +324,31 @@ private: class r2000_device : public mips1_device_base { public: - r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0); + r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0); }; class r2000a_device : public mips1_device_base { public: - r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0); + r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0); }; class r3000_device : public mips1_device_base { public: - r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0); + r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0); }; class r3000a_device : public mips1_device_base { public: - r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0); + r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0); }; class r3041_device : public mips1core_device_base { public: - r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -358,37 +358,37 @@ protected: class r3051_device : public mips1core_device_base { public: - r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class r3052_device : public mips1core_device_base { public: - r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class r3052e_device : public mips1_device_base { public: - r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class r3071_device : public mips1_device_base { public: - r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 16384, size_t dcache_size = 4096); + r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 16384, size_t dcache_size = 4096); }; class r3081_device : public mips1_device_base { public: - r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 16384, size_t dcache_size = 4096); + r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 16384, size_t dcache_size = 4096); }; class iop_device : public mips1core_device_base { public: - iop_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + iop_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(R2000, r2000_device) diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp index 9b6067e5fa4..b1e0f2d57a6 100644 --- a/src/devices/cpu/mips/mips3.cpp +++ b/src/devices/cpu/mips/mips3.cpp @@ -131,7 +131,7 @@ DEFINE_DEVICE_TYPE(RM7000LE, rm7000le_device, "rm7000le", "MIPS RM7000 (littl // VR4300 and VR5432 have 4 fewer PFN bits, and only 32 TLB entries -mips3_device::mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, mips3_flavor flavor, endianness_t endianness, uint32_t data_bits) +mips3_device::mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, mips3_flavor flavor, endianness_t endianness, uint32_t data_bits) : cpu_device(mconfig, type, tag, owner, clock) , device_vtlb_interface(mconfig, *this, AS_PROGRAM) , m_core(nullptr) diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h index 0bf7e49e5cc..3801a935f18 100644 --- a/src/devices/cpu/mips/mips3.h +++ b/src/devices/cpu/mips/mips3.h @@ -297,7 +297,7 @@ protected: public: // construction/destruction - mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, mips3_flavor flavor, endianness_t endiannes, uint32_t data_bits); + mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, mips3_flavor flavor, endianness_t endiannes, uint32_t data_bits); void set_icache_size(size_t icache_size) { c_icache_size = icache_size; } void set_dcache_size(size_t dcache_size) { c_dcache_size = dcache_size; } @@ -658,7 +658,7 @@ private: class r4000be_device : public mips3_device { public: // construction/destruction - r4000be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4000be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4000BE, tag, owner, clock, MIPS3_TYPE_R4000, ENDIANNESS_BIG, 64) { } @@ -667,7 +667,7 @@ public: class r4000le_device : public mips3_device { public: // construction/destruction - r4000le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4000le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4000LE, tag, owner, clock, MIPS3_TYPE_R4000, ENDIANNESS_LITTLE, 64) { } @@ -676,7 +676,7 @@ public: class r4400be_device : public mips3_device { public: // construction/destruction - r4400be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4400be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4400BE, tag, owner, clock, MIPS3_TYPE_R4400, ENDIANNESS_BIG, 64) { } @@ -685,7 +685,7 @@ public: class r4400le_device : public mips3_device { public: // construction/destruction - r4400le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4400le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4400LE, tag, owner, clock, MIPS3_TYPE_R4400, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } @@ -694,7 +694,7 @@ public: class vr4300be_device : public mips3_device { public: // construction/destruction - vr4300be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + vr4300be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, VR4300BE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_BIG, 32) { } @@ -703,7 +703,7 @@ public: class vr4300le_device : public mips3_device { public: // construction/destruction - vr4300le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + vr4300le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, VR4300LE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_LITTLE, 32) { } @@ -712,7 +712,7 @@ public: class vr4310be_device : public mips3_device { public: // construction/destruction - vr4310be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + vr4310be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, VR4310BE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_BIG, 32) { } @@ -721,7 +721,7 @@ public: class vr4310le_device : public mips3_device { public: // construction/destruction - vr4310le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + vr4310le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, VR4310LE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_LITTLE, 32) { } @@ -730,7 +730,7 @@ public: class r4600be_device : public mips3_device { public: // construction/destruction - r4600be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4600be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4600BE, tag, owner, clock, MIPS3_TYPE_R4600, ENDIANNESS_BIG, 64) { } @@ -739,7 +739,7 @@ public: class r4600le_device : public mips3_device { public: // construction/destruction - r4600le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4600le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4600LE, tag, owner, clock, MIPS3_TYPE_R4600, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } @@ -748,7 +748,7 @@ public: class r4650be_device : public mips3_device { public: // construction/destruction - r4650be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4650be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4650BE, tag, owner, clock, MIPS3_TYPE_R4650, ENDIANNESS_BIG, 32) // Should be 64 bits { } @@ -757,7 +757,7 @@ public: class r4650le_device : public mips3_device { public: // construction/destruction - r4650le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4650le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4650LE, tag, owner, clock, MIPS3_TYPE_R4650, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } @@ -766,7 +766,7 @@ public: class r4700be_device : public mips3_device { public: // construction/destruction - r4700be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4700be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4700BE, tag, owner, clock, MIPS3_TYPE_R4700, ENDIANNESS_BIG, 32) // Should be 64 bits { } @@ -775,7 +775,7 @@ public: class r4700le_device : public mips3_device { public: // construction/destruction - r4700le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r4700le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R4700LE, tag, owner, clock, MIPS3_TYPE_R4700, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } @@ -784,7 +784,7 @@ public: class tx4925be_device : public mips3_device { public: // construction/destruction - tx4925be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + tx4925be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, TX4925BE, tag, owner, clock, MIPS3_TYPE_TX4925, ENDIANNESS_BIG, 32) // Should be 64 bits { } @@ -793,7 +793,7 @@ public: class tx4925le_device : public mips3_device { public: // construction/destruction - tx4925le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + tx4925le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, TX4925LE, tag, owner, clock, MIPS3_TYPE_TX4925, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } @@ -802,7 +802,7 @@ public: class r5000be_device : public mips3_device { public: // construction/destruction - r5000be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r5000be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R5000BE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_BIG, 64) { } @@ -814,7 +814,7 @@ protected: class r5000le_device : public mips3_device { public: // construction/destruction - r5000le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r5000le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R5000LE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_LITTLE, 32) // FIXME: Should be 64 bits, Galileo blows up though { } @@ -823,7 +823,7 @@ public: class vr5500be_device : public mips3_device { public: // construction/destruction - vr5500be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + vr5500be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, VR5500BE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_BIG, 32) // Should be 64 bits { } @@ -832,7 +832,7 @@ public: class vr5500le_device : public mips3_device { public: // construction/destruction - vr5500le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + vr5500le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, VR5500LE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } @@ -842,13 +842,13 @@ class r5900le_device : public mips3_device { public: // construction/destruction template - r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&vu0_tag) + r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&vu0_tag) : r5900le_device(mconfig, tag, owner, clock) { m_vu0.set_tag(std::forward(vu0_tag)); } - r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, R5900LE, tag, owner, clock, MIPS3_TYPE_R5900, ENDIANNESS_LITTLE, 64) , m_vu0(*this, finder_base::DUMMY_TAG) { @@ -907,7 +907,7 @@ protected: class qed5271be_device : public mips3_device { public: // construction/destruction - qed5271be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + qed5271be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, QED5271BE, tag, owner, clock, MIPS3_TYPE_QED5271, ENDIANNESS_BIG, 32) // Should be 64 bits { } @@ -916,7 +916,7 @@ public: class qed5271le_device : public mips3_device { public: // construction/destruction - qed5271le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + qed5271le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, QED5271LE, tag, owner, clock, MIPS3_TYPE_QED5271, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } @@ -925,7 +925,7 @@ public: class rm7000be_device : public mips3_device { public: // construction/destruction - rm7000be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + rm7000be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, RM7000BE, tag, owner, clock, MIPS3_TYPE_RM7000, ENDIANNESS_BIG, 32) // Should be 64 bits { } @@ -934,7 +934,7 @@ public: class rm7000le_device : public mips3_device { public: // construction/destruction - rm7000le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + rm7000le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mips3_device(mconfig, RM7000LE, tag, owner, clock, MIPS3_TYPE_RM7000, ENDIANNESS_LITTLE, 32) // Should be 64 bits { } diff --git a/src/devices/cpu/mips/ps2vif1.cpp b/src/devices/cpu/mips/ps2vif1.cpp index 43fc71a2267..091be49d774 100644 --- a/src/devices/cpu/mips/ps2vif1.cpp +++ b/src/devices/cpu/mips/ps2vif1.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_VIF1, ps2_vif1_device, "ps2vif1", "PlayStation 2 VIF1 4, 2, 1, 2 }; -ps2_vif1_device::ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_vif1_device::ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_VIF1, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_gs(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/cpu/mips/ps2vif1.h b/src/devices/cpu/mips/ps2vif1.h index 171a3839f8f..a03afe2111a 100644 --- a/src/devices/cpu/mips/ps2vif1.h +++ b/src/devices/cpu/mips/ps2vif1.h @@ -23,14 +23,14 @@ class ps2_vif1_device : public device_t, public device_execute_interface { public: template - ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gs_tag, U &&vu1_tag) + ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gs_tag, U &&vu1_tag) : ps2_vif1_device(mconfig, tag, owner, clock) { m_gs.set_tag(std::forward(gs_tag)); m_vu1.set_tag(std::forward(vu1_tag)); } - ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~ps2_vif1_device() override; uint64_t mmio_r(offs_t offset); diff --git a/src/devices/cpu/mips/ps2vu.cpp b/src/devices/cpu/mips/ps2vu.cpp index 8f0b125314d..b16fcc663f4 100644 --- a/src/devices/cpu/mips/ps2vu.cpp +++ b/src/devices/cpu/mips/ps2vu.cpp @@ -23,7 +23,7 @@ sonyvu_device::sonyvu_device( device_type type, const char *tag, device_t *owner, - uint32_t clock, + const XTAL &clock, address_map_constructor micro_cons, address_map_constructor vu_cons, chip_type chiptype, @@ -54,13 +54,13 @@ sonyvu_device::sonyvu_device( { } -sonyvu0_device::sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sonyvu0_device::sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sonyvu_device(mconfig, SONYPS2_VU0, tag, owner, clock, address_map_constructor(FUNC(sonyvu0_device::micro_map), this), address_map_constructor(FUNC(sonyvu0_device::vu_map), this), CHIP_TYPE_VU0, 0x1000) , m_vu1(*this, finder_base::DUMMY_TAG) { } -sonyvu1_device::sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sonyvu1_device::sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sonyvu_device(mconfig, SONYPS2_VU1, tag, owner, clock, address_map_constructor(FUNC(sonyvu1_device::micro_map), this), address_map_constructor(FUNC(sonyvu1_device::vu_map), this), CHIP_TYPE_VU0, 0x4000) , m_gs(*this, finder_base::DUMMY_TAG) , m_vif(*this, "vif") diff --git a/src/devices/cpu/mips/ps2vu.h b/src/devices/cpu/mips/ps2vu.h index cc898ffa58d..b0ccb2a2134 100644 --- a/src/devices/cpu/mips/ps2vu.h +++ b/src/devices/cpu/mips/ps2vu.h @@ -98,7 +98,7 @@ protected: CHIP_TYPE_VU1, }; - sonyvu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor micro_cons, address_map_constructor vu_cons, chip_type chiptype, uint32_t mem_size); + sonyvu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor micro_cons, address_map_constructor vu_cons, chip_type chiptype, uint32_t mem_size); enum : uint64_t { @@ -178,13 +178,13 @@ class sonyvu1_device : public sonyvu_device { public: template - sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gs_tag) + sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gs_tag) : sonyvu1_device(mconfig, tag, owner, clock) { m_gs.set_tag(std::forward(gs_tag)); } - sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ps2_vif1_device* interface(); @@ -213,13 +213,13 @@ class sonyvu0_device : public sonyvu_device { public: template - sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&vu1_tag) + sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&vu1_tag) : sonyvu0_device(mconfig, tag, owner, clock) { m_vu1.set_tag(std::forward(vu1_tag)); } - sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/cpu/mips/r4000.cpp b/src/devices/cpu/mips/r4000.cpp index 15f161b32c3..433f3b640fd 100644 --- a/src/devices/cpu/mips/r4000.cpp +++ b/src/devices/cpu/mips/r4000.cpp @@ -92,7 +92,7 @@ DEFINE_DEVICE_TYPE(R5000, r5000_device, "r5000", "MIPS R5000") u32 const r5000_device::s_fcc_masks[8] = { (1U << 23), (1U << 25), (1U << 26), (1U << 27), (1U << 28), (1U << 29), (1U << 30), (1U << 31) }; u32 const r5000_device::s_fcc_shifts[8] = { 23, 25, 26, 27, 28, 29, 30, 31 }; -r4000_base_device::r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled) +r4000_base_device::r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config_le("program", ENDIANNESS_LITTLE, 64, 32) , m_program_config_be("program", ENDIANNESS_BIG, 64, 32) diff --git a/src/devices/cpu/mips/r4000.h b/src/devices/cpu/mips/r4000.h index adc9ccd1f3d..71345e45b22 100644 --- a/src/devices/cpu/mips/r4000.h +++ b/src/devices/cpu/mips/r4000.h @@ -57,7 +57,7 @@ protected: CACHE_256K = 6, CACHE_512K = 7, }; - r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled); + r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled); enum cp0_reg : int { @@ -489,14 +489,14 @@ class r4000_device : public r4000_base_device { public: // NOTE: R4000 chips prior to 3.0 have an xtlb bug - r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled) + r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled) : r4000_base_device(mconfig, R4000, tag, owner, clock, 0x0430, 0x0500, CACHE_8K, CACHE_8K, 10, 20, 69, 133, timer_interrupt_disabled) { // no secondary cache m_cp0[CP0_Config] |= CONFIG_SC; } - r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r4000_device(mconfig, tag, owner, clock, false) { } @@ -505,7 +505,7 @@ public: class r4400_device : public r4000_base_device { public: - r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled, u32 scache_size, u8 scache_line_size) + r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled, u32 scache_size, u8 scache_line_size) : r4000_base_device(mconfig, R4400, tag, owner, clock, 0x0440, 0x0500, CACHE_16K, CACHE_16K, 10, 20, 69, 133, timer_interrupt_disabled) { m_scache_size = scache_size; @@ -513,7 +513,7 @@ public: configure_scache(); } - r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r4400_device(mconfig, tag, owner, clock, false, 0, 0) { } @@ -522,14 +522,14 @@ public: class r4600_device : public r4000_base_device { public: - r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled) + r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled) : r4000_base_device(mconfig, R4600, tag, owner, clock, 0x2020, 0x2020, CACHE_16K, CACHE_16K, 10, 12, 42, 74, timer_interrupt_disabled) { // no secondary cache m_cp0[CP0_Config] |= CONFIG_SC; } - r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r4600_device(mconfig, tag, owner, clock, false) { } @@ -538,14 +538,14 @@ public: class r5000_device : public r4000_base_device { public: - r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled) + r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled) : r4000_base_device(mconfig, R5000, tag, owner, clock, 0x2320, 0x2320, CACHE_32K, CACHE_32K, 5, 9, 36, 68, timer_interrupt_disabled) { // no secondary cache m_cp0[CP0_Config] |= CONFIG_SC; } - r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r5000_device(mconfig, tag, owner, clock, false) { } diff --git a/src/devices/cpu/mk1/mk1.cpp b/src/devices/cpu/mk1/mk1.cpp index cdeb3fb6fcc..c67ce39f5da 100644 --- a/src/devices/cpu/mk1/mk1.cpp +++ b/src/devices/cpu/mk1/mk1.cpp @@ -45,7 +45,7 @@ // device type definition DEFINE_DEVICE_TYPE(MK1_CPU, mk1_cpu_device, "mk1_cpu", "Mark 1 CPU") -mk1_cpu_device::mk1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mk1_cpu_device::mk1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, MK1_CPU, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0) , m_data_config("data", ENDIANNESS_LITTLE, 8, 16, 0) diff --git a/src/devices/cpu/mk1/mk1.h b/src/devices/cpu/mk1/mk1.h index dad3f3ab9f7..66162ffb9bd 100644 --- a/src/devices/cpu/mk1/mk1.h +++ b/src/devices/cpu/mk1/mk1.h @@ -22,7 +22,7 @@ public: static constexpr int IRQ_LINE = 0; // device type constructor - mk1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mk1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/mn10200/mn10200.cpp b/src/devices/cpu/mn10200/mn10200.cpp index 64da0efe23f..e0267f418f2 100644 --- a/src/devices/cpu/mn10200/mn10200.cpp +++ b/src/devices/cpu/mn10200/mn10200.cpp @@ -45,7 +45,7 @@ void mn10200_device::mn1020012a_internal_map(address_map &map) } -mn10200_device::mn10200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program) +mn10200_device::mn10200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0, program), m_program(nullptr) , m_read_port(*this) @@ -55,7 +55,7 @@ mn10200_device::mn10200_device(const machine_config &mconfig, device_type type, { } // device definitions -mn1020012a_device::mn1020012a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mn1020012a_device::mn1020012a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mn10200_device(mconfig, MN1020012A, tag, owner, clock, address_map_constructor(FUNC(mn1020012a_device::mn1020012a_internal_map), this)) { } diff --git a/src/devices/cpu/mn10200/mn10200.h b/src/devices/cpu/mn10200/mn10200.h index 8ea31fa1d4b..32994b46001 100644 --- a/src/devices/cpu/mn10200/mn10200.h +++ b/src/devices/cpu/mn10200/mn10200.h @@ -51,7 +51,7 @@ protected: // construction/destruction - mn10200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program); + mn10200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program); // device-level overrides virtual void device_start() override; @@ -189,7 +189,7 @@ private: class mn1020012a_device : public mn10200_device { public: - mn1020012a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mn1020012a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/mn1880/mn1880.cpp b/src/devices/cpu/mn1880/mn1880.cpp index 0843947a480..12e28ddb46f 100644 --- a/src/devices/cpu/mn1880/mn1880.cpp +++ b/src/devices/cpu/mn1880/mn1880.cpp @@ -88,7 +88,7 @@ DEFINE_DEVICE_TYPE(MN18801A, mn18801a_device, "mn18801a", "Panasonic MN18801A") ALLOW_SAVE_TYPE(mn1880_device::microstate) -mn1880_device::mn1880_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool has_mmu, address_map_constructor data_map) +mn1880_device::mn1880_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool has_mmu, address_map_constructor data_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, has_mmu ? 21 : 16, 0, 16, 14) , m_data_config("data", ENDIANNESS_LITTLE, 8, has_mmu ? 21 : 16, 0, 16, 14, data_map) @@ -107,12 +107,12 @@ mn1880_device::mn1880_device(const machine_config &mconfig, device_type type, co { } -mn1880_device::mn1880_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mn1880_device::mn1880_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mn1880_device(mconfig, MN1880, tag, owner, clock, false, address_map_constructor(FUNC(mn1880_device::internal_data_map), this)) { } -mn18801a_device::mn18801a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mn18801a_device::mn18801a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mn1880_device(mconfig, MN18801A, tag, owner, clock, true, address_map_constructor(FUNC(mn18801a_device::internal_data_map), this)) { } diff --git a/src/devices/cpu/mn1880/mn1880.h b/src/devices/cpu/mn1880/mn1880.h index 47f470c02a8..cb0b59bc656 100644 --- a/src/devices/cpu/mn1880/mn1880.h +++ b/src/devices/cpu/mn1880/mn1880.h @@ -9,7 +9,7 @@ class mn1880_device : public cpu_device { public: - mn1880_device(const machine_config &config, const char *tag, device_t *owner, u32 clock); + mn1880_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock); enum { MN1880_IP, MN1880_IPA, MN1880_IPB, @@ -29,7 +29,7 @@ public: }; protected: - mn1880_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool has_mmu, address_map_constructor data_map); + mn1880_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool has_mmu, address_map_constructor data_map); // device-level overrides virtual void device_start() override; @@ -235,7 +235,7 @@ private: class mn18801a_device : public mn1880_device { public: - mn18801a_device(const machine_config &config, const char *tag, device_t *owner, u32 clock); + mn18801a_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(MN1880, mn1880_device) diff --git a/src/devices/cpu/nanoprocessor/nanoprocessor.cpp b/src/devices/cpu/nanoprocessor/nanoprocessor.cpp index 197efcc0b4a..421107fc692 100644 --- a/src/devices/cpu/nanoprocessor/nanoprocessor.cpp +++ b/src/devices/cpu/nanoprocessor/nanoprocessor.cpp @@ -50,7 +50,7 @@ namespace { DEFINE_DEVICE_TYPE(HP_NANOPROCESSOR, hp_nanoprocessor_device, "nanoprocessor", "Hewlett Packard HP-Nanoprocessor") -hp_nanoprocessor_device::hp_nanoprocessor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hp_nanoprocessor_device::hp_nanoprocessor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, HP_NANOPROCESSOR, tag, owner, clock), m_dc_changed_func(*this), m_read_dc_func(*this), diff --git a/src/devices/cpu/nanoprocessor/nanoprocessor.h b/src/devices/cpu/nanoprocessor/nanoprocessor.h index 2aa8cf3a4ab..23b3d3462a9 100644 --- a/src/devices/cpu/nanoprocessor/nanoprocessor.h +++ b/src/devices/cpu/nanoprocessor/nanoprocessor.h @@ -71,7 +71,7 @@ constexpr unsigned HP_NANO_IE_DC = 7; // DC line used as interrupt enable/ma class hp_nanoprocessor_device : public cpu_device { public: - hp_nanoprocessor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_nanoprocessor_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // DC changed callback // The callback receives a 8-bit word holding the state of all DC lines. diff --git a/src/devices/cpu/nec/nec.cpp b/src/devices/cpu/nec/nec.cpp index 3a961a0a4be..743b6061a46 100644 --- a/src/devices/cpu/nec/nec.cpp +++ b/src/devices/cpu/nec/nec.cpp @@ -121,7 +121,7 @@ DEFINE_DEVICE_TYPE(V33, v33_device, "v33", "NEC V33") DEFINE_DEVICE_TYPE(V33A, v33a_device, "v33a", "NEC V33A") -nec_common_device::nec_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type, address_map_constructor internal_port_map) +nec_common_device::nec_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type, address_map_constructor internal_port_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, is_16bit ? 16 : 8, chip_type == V33_TYPE ? 24 : 20, 0, 20, chip_type == V33_TYPE ? 14 : 0) , m_io_config("io", ENDIANNESS_LITTLE, is_16bit ? 16 : 8, 16, 0, internal_port_map) @@ -133,13 +133,13 @@ nec_common_device::nec_common_device(const machine_config &mconfig, device_type } -v20_device::v20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v20_device::v20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nec_common_device(mconfig, V20, tag, owner, clock, false, 4, 4, V20_TYPE) { } -v30_device::v30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v30_device::v30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nec_common_device(mconfig, V30, tag, owner, clock, true, 6, 2, V30_TYPE) { } @@ -156,19 +156,19 @@ device_memory_interface::space_config_vector nec_common_device::memory_space_con /* FIXME: Need information about prefetch size and cycles for V33. * complete guess below, nbbatman will not work * properly without. */ -v33_base_device::v33_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_port_map) +v33_base_device::v33_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_port_map) : nec_common_device(mconfig, type, tag, owner, clock, true, 6, 1, V33_TYPE, internal_port_map) { } -v33_device::v33_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v33_device::v33_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v33_base_device(mconfig, V33, tag, owner, clock, address_map_constructor(FUNC(v33_device::v33_internal_port_map), this)) { } -v33a_device::v33a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v33a_device::v33a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v33_base_device(mconfig, V33A, tag, owner, clock, address_map_constructor(FUNC(v33a_device::v33_internal_port_map), this)) { } diff --git a/src/devices/cpu/nec/nec.h b/src/devices/cpu/nec/nec.h index 764afdd76c1..19a2ee22cf5 100644 --- a/src/devices/cpu/nec/nec.h +++ b/src/devices/cpu/nec/nec.h @@ -28,7 +28,7 @@ class nec_common_device : public cpu_device, public nec_disassembler::config protected: // construction/destruction - nec_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type, address_map_constructor internal_port_map = address_map_constructor()); + nec_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type, address_map_constructor internal_port_map = address_map_constructor()); // device-level overrides virtual void device_start() override; @@ -672,21 +672,21 @@ private: class v20_device : public nec_common_device { public: - v20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class v30_device : public nec_common_device { public: - v30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class v33_base_device : public nec_common_device { protected: - v33_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_port_map); + v33_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_port_map); // device_memory_interface overrides virtual bool memory_translate(int spacenum, int intention, offs_t &address) override; @@ -698,13 +698,13 @@ protected: class v33_device : public v33_base_device { public: - v33_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v33_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class v33a_device : public v33_base_device { public: - v33a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v33a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/nec/v25.cpp b/src/devices/cpu/nec/v25.cpp index 321db738a04..5cacb9006f9 100644 --- a/src/devices/cpu/nec/v25.cpp +++ b/src/devices/cpu/nec/v25.cpp @@ -50,7 +50,7 @@ DEFINE_DEVICE_TYPE(V25, v25_device, "v25", "NEC V25") DEFINE_DEVICE_TYPE(V35, v35_device, "v35", "NEC V35") -v25_common_device::v25_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type) +v25_common_device::v25_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, is_16bit ? 16 : 8, 20, 0) , m_data_config("data", ENDIANNESS_LITTLE, 16, 9, 0, address_map_constructor(FUNC(v25_common_device::ida_sfr_map), this)) @@ -72,13 +72,13 @@ v25_common_device::v25_common_device(const machine_config &mconfig, device_type } -v25_device::v25_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v25_device::v25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v25_common_device(mconfig, V25, tag, owner, clock, false, 4, 4, V20_TYPE) { } -v35_device::v35_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v35_device::v35_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v25_common_device(mconfig, V35, tag, owner, clock, true, 6, 2, V30_TYPE) { } diff --git a/src/devices/cpu/nec/v25.h b/src/devices/cpu/nec/v25.h index 1afeb9a7eb5..f92460fb927 100644 --- a/src/devices/cpu/nec/v25.h +++ b/src/devices/cpu/nec/v25.h @@ -43,7 +43,7 @@ public: protected: // construction/destruction - v25_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type); + v25_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_16bit, uint8_t prefetch_size, uint8_t prefetch_cycles, uint32_t chip_type); // device-level overrides virtual void device_start() override; @@ -536,14 +536,14 @@ private: class v25_device : public v25_common_device { public: - v25_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v25_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class v35_device : public v25_common_device { public: - v35_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v35_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/nec/v5x.cpp b/src/devices/cpu/nec/v5x.cpp index 9faeed6bfd9..39eef1b4cc0 100644 --- a/src/devices/cpu/nec/v5x.cpp +++ b/src/devices/cpu/nec/v5x.cpp @@ -213,14 +213,14 @@ void device_v5x_interface::v5x_add_mconfig(machine_config &config) { PIT8254(config, m_tcu); - V5X_DMAU(config, m_dmau, 4000000); + V5X_DMAU(config, m_dmau, XTAL::u(4000000)); - V5X_ICU(config, m_icu, 0); + V5X_ICU(config, m_icu); m_icu->out_int_callback().set(FUNC(device_v5x_interface::internal_irq_w)); m_icu->in_sp_callback().set_constant(1); m_icu->read_slave_ack_callback().set(FUNC(device_v5x_interface::get_pic_ack)); - V5X_SCU(config, m_scu, 0); + V5X_SCU(config, m_scu); } void device_v5x_interface::remappable_io_map(address_map &map) @@ -516,7 +516,7 @@ device_memory_interface::space_config_vector v50_base_device::memory_space_confi return spaces; } -v50_base_device::v50_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool is_16bit, u8 prefetch_size, u8 prefetch_cycles, u32 chip_type) +v50_base_device::v50_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_16bit, u8 prefetch_size, u8 prefetch_cycles, u32 chip_type) : nec_common_device(mconfig, type, tag, owner, clock, is_16bit, prefetch_size, prefetch_cycles, chip_type, address_map_constructor(FUNC(v50_base_device::internal_port_map), this)) , device_v5x_interface(mconfig, *this, is_16bit) , m_tout1_callback(*this) @@ -527,12 +527,12 @@ v50_base_device::v50_base_device(const machine_config &mconfig, device_type type { } -v40_device::v40_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +v40_device::v40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v50_base_device(mconfig, V40, tag, owner, clock, false, 4, 4, V20_TYPE) { } -v50_device::v50_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +v50_device::v50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v50_base_device(mconfig, V50, tag, owner, clock, true, 6, 2, V30_TYPE) { } @@ -785,18 +785,18 @@ device_memory_interface::space_config_vector v53_device::memory_space_config() c }; } -v53_device::v53_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +v53_device::v53_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : v33_base_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(v53_device::internal_port_map), this)) , device_v5x_interface(mconfig, *this, true) { } -v53_device::v53_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +v53_device::v53_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v53_device(mconfig, V53, tag, owner, clock) { } -v53a_device::v53a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +v53a_device::v53a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v53_device(mconfig, V53A, tag, owner, clock) { } diff --git a/src/devices/cpu/nec/v5x.h b/src/devices/cpu/nec/v5x.h index 23fcdc265a9..c07341fbe91 100644 --- a/src/devices/cpu/nec/v5x.h +++ b/src/devices/cpu/nec/v5x.h @@ -149,7 +149,7 @@ public: auto tout2_cb() { return subdevice("tcu")->out_handler<2>(); } protected: - v50_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool is_16bit, u8 prefetch_size, u8 prefetch_cycles, u32 chip_type); + v50_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_16bit, u8 prefetch_size, u8 prefetch_cycles, u32 chip_type); // device-specific overrides virtual void device_add_mconfig(machine_config &config) override; @@ -191,7 +191,7 @@ private: class v40_device : public v50_base_device { public: - v40_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + v40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void install_peripheral_io() override; @@ -200,7 +200,7 @@ protected: class v50_device : public v50_base_device { public: - v50_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + v50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void install_peripheral_io() override; @@ -209,7 +209,7 @@ protected: class v53_device : public v33_base_device, public device_v5x_interface { public: - v53_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + v53_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template DECLARE_WRITE_LINE_MEMBER(dreq_w) { @@ -228,7 +228,7 @@ public: template auto out_handler() { return subdevice("tcu")->out_handler(); } protected: - v53_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + v53_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-specific overrides virtual void device_add_mconfig(machine_config &config) override; @@ -262,7 +262,7 @@ private: class v53a_device : public v53_device { public: - v53a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + v53a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(V40, v40_device) diff --git a/src/devices/cpu/nios2/nios2.cpp b/src/devices/cpu/nios2/nios2.cpp index 39dd0fc6209..8f4893f2710 100644 --- a/src/devices/cpu/nios2/nios2.cpp +++ b/src/devices/cpu/nios2/nios2.cpp @@ -15,7 +15,7 @@ // device type definition DEFINE_DEVICE_TYPE(NIOS2, nios2_device, "nios2", "Altera Nios II Processor") -nios2_device::nios2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nios2_device::nios2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, NIOS2, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) { diff --git a/src/devices/cpu/nios2/nios2.h b/src/devices/cpu/nios2/nios2.h index de2073e0e47..34925655a3e 100644 --- a/src/devices/cpu/nios2/nios2.h +++ b/src/devices/cpu/nios2/nios2.h @@ -18,7 +18,7 @@ public: }; // construction/destruction - nios2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nios2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/ns32000/ns32000.cpp b/src/devices/cpu/ns32000/ns32000.cpp index d3f04bbd5d3..f28b7144532 100644 --- a/src/devices/cpu/ns32000/ns32000.cpp +++ b/src/devices/cpu/ns32000/ns32000.cpp @@ -96,7 +96,7 @@ static const u32 size_mask[] = { 0x000000ffU, 0x0000ffffU, 0x00000000U, 0xffffff #define SP ((m_psr & PSR_S) ? m_sp1 : m_sp0) -template ns32000_device::ns32000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int databits, int addrbits) +template ns32000_device::ns32000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int databits, int addrbits) : cpu_device(mconfig, type, tag, owner, clock) , m_address_mask(0xffffffffU >> (32 - addrbits)) , m_program_config("program", ENDIANNESS_LITTLE, databits, addrbits, 0) @@ -130,22 +130,22 @@ template ns32000_device::ns32000_device(const machine_config & { } -ns32008_device::ns32008_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns32008_device::ns32008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns32000_device(mconfig, NS32008, tag, owner, clock, 8, 24) { } -ns32016_device::ns32016_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns32016_device::ns32016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns32000_device(mconfig, NS32016, tag, owner, clock, 16, 24) { } -ns32032_device::ns32032_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns32032_device::ns32032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns32000_device(mconfig, NS32032, tag, owner, clock, 32, 24) { } -ns32332_device::ns32332_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns32332_device::ns32332_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns32000_device(mconfig, NS32332, tag, owner, clock, 32, 32) { } diff --git a/src/devices/cpu/ns32000/ns32000.h b/src/devices/cpu/ns32000/ns32000.h index 654d8661f8a..ae41f9fbb07 100644 --- a/src/devices/cpu/ns32000/ns32000.h +++ b/src/devices/cpu/ns32000/ns32000.h @@ -16,10 +16,10 @@ public: template void set_mmu(T &&tag) { m_mmu.set_tag(std::forward(tag)); } // construction/destruction - ns32000_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + ns32000_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); protected: - ns32000_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, int databits, int addrbits); + ns32000_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, int databits, int addrbits); // device_t overrides virtual void device_start() override; @@ -191,25 +191,25 @@ private: class ns32008_device : public ns32000_device<0> { public: - ns32008_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32008_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class ns32016_device : public ns32000_device<1> { public: - ns32016_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32016_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class ns32032_device : public ns32000_device<2> { public: - ns32032_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32032_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class ns32332_device : public ns32000_device<2> { public: - ns32332_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32332_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(NS32008, ns32008_device) diff --git a/src/devices/cpu/nuon/nuon.cpp b/src/devices/cpu/nuon/nuon.cpp index 00d35cddc39..e45908b450f 100644 --- a/src/devices/cpu/nuon/nuon.cpp +++ b/src/devices/cpu/nuon/nuon.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(NUON, nuon_device, "nuon", "Aries 3 \"Nuon\"") // nuon_device - constructor //------------------------------------------------- -nuon_device::nuon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nuon_device::nuon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, NUON, tag, owner, clock) , m_program_configs{{"program_mpe0", ENDIANNESS_BIG, 32, 32}, {"program_mpe1", ENDIANNESS_BIG, 32, 32}, diff --git a/src/devices/cpu/nuon/nuon.h b/src/devices/cpu/nuon/nuon.h index f3a7311e985..ecdb5cc6d76 100644 --- a/src/devices/cpu/nuon/nuon.h +++ b/src/devices/cpu/nuon/nuon.h @@ -20,7 +20,7 @@ class nuon_device : public cpu_device { public: - nuon_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nuon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/pace/pace.cpp b/src/devices/cpu/pace/pace.cpp index 2bfba2cc338..38c6d5fe4e4 100644 --- a/src/devices/cpu/pace/pace.cpp +++ b/src/devices/cpu/pace/pace.cpp @@ -62,7 +62,7 @@ ALLOW_SAVE_TYPE(pace_device::cycle); // pace_device - constructor //------------------------------------------------- -pace_device::pace_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +pace_device::pace_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_space_config("program", ENDIANNESS_LITTLE, 16, 16, -1) , m_bps_callback(*this) @@ -89,7 +89,7 @@ pace_device::pace_device(const machine_config &mconfig, device_type type, const // ins8900_device - constructor //------------------------------------------------- -ins8900_device::ins8900_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ins8900_device::ins8900_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pace_device(mconfig, INS8900, tag, owner, clock) { } diff --git a/src/devices/cpu/pace/pace.h b/src/devices/cpu/pace/pace.h index c96c38e5c02..d11c021b065 100644 --- a/src/devices/cpu/pace/pace.h +++ b/src/devices/cpu/pace/pace.h @@ -68,7 +68,7 @@ public: protected: // construction/destruction - pace_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + pace_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-specific overrides virtual void device_resolve_objects() override; @@ -216,7 +216,7 @@ class ins8900_device : public pace_device { public: // device type constructor - ins8900_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ins8900_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/cpu/patinhofeio/patinho_feio.cpp b/src/devices/cpu/patinhofeio/patinho_feio.cpp index d017ff8a318..e341ea40cbc 100644 --- a/src/devices/cpu/patinhofeio/patinho_feio.cpp +++ b/src/devices/cpu/patinhofeio/patinho_feio.cpp @@ -56,7 +56,7 @@ void patinho_feio_cpu_device::prog_8bit(address_map &map) map(0x0000, 0x0fff).ram().share("internalram"); } -patinho_feio_cpu_device::patinho_feio_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +patinho_feio_cpu_device::patinho_feio_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, PATO_FEIO_CPU, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0, address_map_constructor(FUNC(patinho_feio_cpu_device::prog_8bit), this)) , m_update_panel_cb(*this) diff --git a/src/devices/cpu/pdp1/pdp1.cpp b/src/devices/cpu/pdp1/pdp1.cpp index 77c97ebcddc..8ef280e4860 100644 --- a/src/devices/cpu/pdp1/pdp1.cpp +++ b/src/devices/cpu/pdp1/pdp1.cpp @@ -380,7 +380,7 @@ DEFINE_DEVICE_TYPE(PDP1, pdp1_device, "pdp1_cpu", "DEC PDP-1 Central Processor") -pdp1_device::pdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pdp1_device::pdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, PDP1, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 18, -2) // data is actually 18 bits wide , m_extern_iot(*this) diff --git a/src/devices/cpu/pdp1/pdp1.h b/src/devices/cpu/pdp1/pdp1.h index f1a4e934236..db80b85e311 100644 --- a/src/devices/cpu/pdp1/pdp1.h +++ b/src/devices/cpu/pdp1/pdp1.h @@ -71,7 +71,7 @@ public: }; // construction/destruction - pdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pdp1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_iot_callback(T &&... args) { m_extern_iot[I].set(std::forward(args)...); } template void set_io_sc_callback(T &&... args) { m_io_sc_callback.set(std::forward(args)...); } diff --git a/src/devices/cpu/pdp8/hd6120.cpp b/src/devices/cpu/pdp8/hd6120.cpp index fda3deea264..75a608ecde1 100644 --- a/src/devices/cpu/pdp8/hd6120.cpp +++ b/src/devices/cpu/pdp8/hd6120.cpp @@ -164,7 +164,7 @@ DEFINE_DEVICE_TYPE(HD6120, hd6120_device, "hd6120", "Harris HD-6120") ALLOW_SAVE_TYPE(hd6120_device::minor_state) -hd6120_device::hd6120_device(const machine_config &config, const char *tag, device_t *owner, u32 clock) +hd6120_device::hd6120_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(config, HD6120, tag, owner, clock) , m_inst_config("instruction", ENDIANNESS_BIG, 16, 16, -1) // 12 data bits , m_data_config("data", ENDIANNESS_BIG, 16, 16, -1) // 12 data bits diff --git a/src/devices/cpu/pdp8/hd6120.h b/src/devices/cpu/pdp8/hd6120.h index 126ce115040..699157b75c8 100644 --- a/src/devices/cpu/pdp8/hd6120.h +++ b/src/devices/cpu/pdp8/hd6120.h @@ -68,7 +68,7 @@ public: }; // device type constructor - hd6120_device(const machine_config &config, const char *tag, device_t *owner, u32 clock); + hd6120_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto lxmar_callback() { return m_lxmar_callback.bind(); } diff --git a/src/devices/cpu/pdp8/pdp8.cpp b/src/devices/cpu/pdp8/pdp8.cpp index 31086b3fb48..1aab04e1702 100644 --- a/src/devices/cpu/pdp8/pdp8.cpp +++ b/src/devices/cpu/pdp8/pdp8.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(PDP8, pdp8_device, "pdp8_cpu", "DEC PDP8") // pdp8_device - constructor //------------------------------------------------- -pdp8_device::pdp8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pdp8_device::pdp8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, PDP8, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, 16, 12, -1), m_pc(0), diff --git a/src/devices/cpu/pdp8/pdp8.h b/src/devices/cpu/pdp8/pdp8.h index ef6c4af95ae..fb2b2295e1b 100644 --- a/src/devices/cpu/pdp8/pdp8.h +++ b/src/devices/cpu/pdp8/pdp8.h @@ -22,7 +22,7 @@ class pdp8_device : public cpu_device { public: // construction/destruction - pdp8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pdp8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/pic16c5x/pic16c5x.cpp b/src/devices/cpu/pic16c5x/pic16c5x.cpp index 5d6f14a1071..e5bc68a1790 100644 --- a/src/devices/cpu/pic16c5x/pic16c5x.cpp +++ b/src/devices/cpu/pic16c5x/pic16c5x.cpp @@ -123,7 +123,7 @@ void pic16c5x_device::ram_7(address_map &map) } -pic16c5x_device::pic16c5x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, int picmodel) +pic16c5x_device::pic16c5x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, int picmodel) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, program_width, -1 , ( ( program_width == 9 ) ? address_map_constructor(FUNC(pic16c5x_device::rom_9), this): ( ( program_width == 10 ) ? address_map_constructor(FUNC(pic16c5x_device::rom_10), this) : address_map_constructor(FUNC(pic16c5x_device::rom_11), this) ))) @@ -147,42 +147,42 @@ pic16c5x_device::pic16c5x_device(const machine_config &mconfig, device_type type } -pic16c54_device::pic16c54_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c54_device::pic16c54_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC16C54, tag, owner, clock, 9, 5, 0x16C54) { } -pic16c55_device::pic16c55_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c55_device::pic16c55_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC16C55, tag, owner, clock, 9, 5, 0x16C55) { } -pic16c56_device::pic16c56_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c56_device::pic16c56_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC16C56, tag, owner, clock, 10, 5, 0x16C56) { } -pic16c57_device::pic16c57_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c57_device::pic16c57_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC16C57, tag, owner, clock, 11, 7, 0x16C57) { } -pic16c58_device::pic16c58_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c58_device::pic16c58_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC16C58, tag, owner, clock, 11, 7, 0x16C58) { } -pic1650_device::pic1650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic1650_device::pic1650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC1650, tag, owner, clock, 9, 5, 0x1650) { } -pic1654s_device::pic1654s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic1654s_device::pic1654s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC1654S, tag, owner, clock, 9, 5, 0x1654) { } -pic1655_device::pic1655_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic1655_device::pic1655_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c5x_device(mconfig, PIC1655, tag, owner, clock, 9, 5, 0x1655) { } diff --git a/src/devices/cpu/pic16c5x/pic16c5x.h b/src/devices/cpu/pic16c5x/pic16c5x.h index 177b9cae7a2..0ae1176a66c 100644 --- a/src/devices/cpu/pic16c5x/pic16c5x.h +++ b/src/devices/cpu/pic16c5x/pic16c5x.h @@ -79,7 +79,7 @@ public: void rom_9(address_map &map); protected: // construction/destruction - pic16c5x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, int picmodel); + pic16c5x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, int picmodel); // device-level overrides virtual void device_start() override; @@ -226,7 +226,7 @@ class pic16c54_device : public pic16c5x_device { public: // construction/destruction - pic16c54_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c54_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -234,7 +234,7 @@ class pic16c55_device : public pic16c5x_device { public: // construction/destruction - pic16c55_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c55_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -242,7 +242,7 @@ class pic16c56_device : public pic16c5x_device { public: // construction/destruction - pic16c56_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c56_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -250,7 +250,7 @@ class pic16c57_device : public pic16c5x_device { public: // construction/destruction - pic16c57_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c57_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -258,7 +258,7 @@ class pic16c58_device : public pic16c5x_device { public: // construction/destruction - pic16c58_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c58_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -266,14 +266,14 @@ class pic1650_device : public pic16c5x_device { public: // construction/destruction - pic1650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic1650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pic1654s_device : public pic16c5x_device { public: // construction/destruction - pic1654s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic1654s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // 1654S has a /8 clock divider instead of the typical /4 @@ -285,7 +285,7 @@ class pic1655_device : public pic16c5x_device { public: // construction/destruction - pic1655_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic1655_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_CPU_PIC16C5X_PIC16C5X_H diff --git a/src/devices/cpu/pic16c62x/pic16c62x.cpp b/src/devices/cpu/pic16c62x/pic16c62x.cpp index ddb6d3c9bb8..59bc368faff 100644 --- a/src/devices/cpu/pic16c62x/pic16c62x.cpp +++ b/src/devices/cpu/pic16c62x/pic16c62x.cpp @@ -119,7 +119,7 @@ void pic16c62x_device::pic16c62xa_ram(address_map &map) } -pic16c62x_device::pic16c62x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int picmodel) +pic16c62x_device::pic16c62x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int picmodel) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, program_width, -1 , ( ( program_width == 9 ) ? address_map_constructor(FUNC(pic16c62x_device::pic16c62x_rom_9), this) : @@ -138,32 +138,32 @@ pic16c62x_device::pic16c62x_device(const machine_config &mconfig, device_type ty } -pic16c620_device::pic16c620_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c620_device::pic16c620_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c62x_device(mconfig, PIC16C620, tag, owner, clock, 9, 0x16C620) { } -pic16c620a_device::pic16c620a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c620a_device::pic16c620a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c62x_device(mconfig, PIC16C620A, tag, owner, clock, 9, 0x16C620A) { } -pic16c621_device::pic16c621_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c621_device::pic16c621_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c62x_device(mconfig, PIC16C621, tag, owner, clock, 10, 0x16C621) { } -pic16c621a_device::pic16c621a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c621a_device::pic16c621a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c62x_device(mconfig, PIC16C621A, tag, owner, clock, 10, 0x16C621A) { } -pic16c622_device::pic16c622_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c622_device::pic16c622_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c62x_device(mconfig, PIC16C622, tag, owner, clock, 11, 0x16C622) { } -pic16c622a_device::pic16c622a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic16c622a_device::pic16c622a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic16c62x_device(mconfig, PIC16C622A, tag, owner, clock, 11, 0x16C622A) { } diff --git a/src/devices/cpu/pic16c62x/pic16c62x.h b/src/devices/cpu/pic16c62x/pic16c62x.h index d0b9390078f..427bcc0dad4 100644 --- a/src/devices/cpu/pic16c62x/pic16c62x.h +++ b/src/devices/cpu/pic16c62x/pic16c62x.h @@ -58,7 +58,7 @@ public: protected: // construction/destruction - pic16c62x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int picmodel); + pic16c62x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int picmodel); // device-level overrides virtual void device_start() override; @@ -208,14 +208,14 @@ class pic16c620_device : public pic16c62x_device { public: // construction/destruction - pic16c620_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c620_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pic16c620a_device : public pic16c62x_device { public: // construction/destruction - pic16c620a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c620a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; /* @@ -223,35 +223,35 @@ class pic16cr620a_device : public pic16c62x_device { public: // construction/destruction - pic16cr620a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16cr620a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }*/ class pic16c621_device : public pic16c62x_device { public: // construction/destruction - pic16c621_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c621_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pic16c621a_device : public pic16c62x_device { public: // construction/destruction - pic16c621a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c621a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pic16c622_device : public pic16c62x_device { public: // construction/destruction - pic16c622_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c622_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pic16c622a_device : public pic16c62x_device { public: // construction/destruction - pic16c622a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pic16c622a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/pic17/pic17.cpp b/src/devices/cpu/pic17/pic17.cpp index 99dff413d54..347b9c0e943 100644 --- a/src/devices/cpu/pic17/pic17.cpp +++ b/src/devices/cpu/pic17/pic17.cpp @@ -64,7 +64,7 @@ ALLOW_SAVE_TYPE(pic17_cpu_device::exec_phase); -pic17_cpu_device::pic17_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 rom_size, address_map_constructor data_map) +pic17_cpu_device::pic17_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 rom_size, address_map_constructor data_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, -1, address_map_constructor(FUNC(pic17_cpu_device::program_map), this)) , m_data_config("data", ENDIANNESS_LITTLE, 8, 12, 0, data_map) diff --git a/src/devices/cpu/pic17/pic17.h b/src/devices/cpu/pic17/pic17.h index fed49748a67..f139a04568f 100644 --- a/src/devices/cpu/pic17/pic17.h +++ b/src/devices/cpu/pic17/pic17.h @@ -40,7 +40,7 @@ public: void set_mode(mode m) { m_mode = m; } protected: - pic17_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 rom_size, address_map_constructor data_map); + pic17_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 rom_size, address_map_constructor data_map); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/pic17/pic17c4x.cpp b/src/devices/cpu/pic17/pic17c4x.cpp index 07976c32b79..4ed8654bca4 100644 --- a/src/devices/cpu/pic17/pic17c4x.cpp +++ b/src/devices/cpu/pic17/pic17c4x.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(PIC17C43, pic17c43_device, "pic17c43", "Microchip PIC17C43") DEFINE_DEVICE_TYPE(PIC17C44, pic17c44_device, "pic17c44", "Microchip PIC17C44") -pic17c4x_device::pic17c4x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 rom_size, address_map_constructor data_map) +pic17c4x_device::pic17c4x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 rom_size, address_map_constructor data_map) : pic17_cpu_device(mconfig, type, tag, owner, clock, rom_size, data_map) , m_port_out_cb(*this) , m_rain(0x3f) @@ -56,17 +56,17 @@ pic17c4x_device::pic17c4x_device(const machine_config &mconfig, device_type type { } -pic17c43_device::pic17c43_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 rom_size) +pic17c43_device::pic17c43_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 rom_size) : pic17c4x_device(mconfig, type, tag, owner, clock, rom_size, address_map_constructor(FUNC(pic17c43_device::data_map), this)) { } -pic17c43_device::pic17c43_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pic17c43_device::pic17c43_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic17c43_device(mconfig, PIC17C43, tag, owner, clock, 0x1000) { } -pic17c44_device::pic17c44_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pic17c44_device::pic17c44_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic17c43_device(mconfig, PIC17C44, tag, owner, clock, 0x2000) { } diff --git a/src/devices/cpu/pic17/pic17c4x.h b/src/devices/cpu/pic17/pic17c4x.h index e1ae9290230..101b9cada5b 100644 --- a/src/devices/cpu/pic17/pic17c4x.h +++ b/src/devices/cpu/pic17/pic17c4x.h @@ -75,7 +75,7 @@ public: auto re_out_cb() { return m_port_out_cb[4].bind(); } protected: - pic17c4x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 rom_size, address_map_constructor data_map); + pic17c4x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 rom_size, address_map_constructor data_map); // device-level overrides virtual void device_resolve_objects() override; @@ -158,10 +158,10 @@ class pic17c43_device : public pic17c4x_device { public: // device type constructor - pic17c43_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pic17c43_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - pic17c43_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 rom_size); + pic17c43_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 rom_size); private: void data_map(address_map &map); @@ -171,7 +171,7 @@ class pic17c44_device : public pic17c43_device { public: // device type constructor - pic17c44_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pic17c44_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h index b27f80efc7e..799371ca363 100644 --- a/src/devices/cpu/powerpc/ppc.h +++ b/src/devices/cpu/powerpc/ppc.h @@ -205,7 +205,7 @@ protected: }; // construction/destruction - ppc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int address_bits, int data_bits, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor, address_map_constructor internal_map); + ppc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int address_bits, int data_bits, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor, address_map_constructor internal_map); public: virtual ~ppc_device() override; @@ -686,7 +686,7 @@ private: //class ppc403_device : public ppc_device //{ //public: -// ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +// ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // //protected: // virtual uint32_t execute_input_lines() const noexcept { return 8; } @@ -696,7 +696,7 @@ private: //class ppc405_device : public ppc_device //{ //public: -// ppc405_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +// ppc405_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // //protected: // virtual uint32_t execute_input_lines() const noexcept { return 8; } @@ -706,49 +706,49 @@ private: class ppc603_device : public ppc_device { public: - ppc603_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc603_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ppc603e_device : public ppc_device { public: - ppc603e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc603e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ppc603r_device : public ppc_device { public: - ppc603r_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc603r_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ppc602_device : public ppc_device { public: - ppc602_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc602_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mpc8240_device : public ppc_device { public: - mpc8240_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpc8240_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ppc601_device : public ppc_device { public: - ppc601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ppc604_device : public ppc_device { public: - ppc604_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc604_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -768,7 +768,7 @@ public: void internal_ppc4xx(address_map &map); protected: - ppc4xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor); + ppc4xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor); virtual uint32_t execute_input_lines() const noexcept override { return 5; } virtual void execute_set_input(int inputnum, int state) override; @@ -778,21 +778,21 @@ protected: class ppc403ga_device : public ppc4xx_device { public: - ppc403ga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc403ga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ppc403gcx_device : public ppc4xx_device { public: - ppc403gcx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc403gcx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ppc405gp_device : public ppc4xx_device { public: - ppc405gp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppc405gp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp index aecc85d1709..86499979c61 100644 --- a/src/devices/cpu/powerpc/ppccom.cpp +++ b/src/devices/cpu/powerpc/ppccom.cpp @@ -207,7 +207,7 @@ DEFINE_DEVICE_TYPE(PPC403GCX, ppc403gcx_device, "ppc403gcx", "IBM PowerPC 403GC DEFINE_DEVICE_TYPE(PPC405GP, ppc405gp_device, "ppc405gp", "IBM PowerPC 405GP") -ppc_device::ppc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int address_bits, int data_bits, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor, address_map_constructor internal_map) +ppc_device::ppc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int address_bits, int data_bits, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor, address_map_constructor internal_map) : cpu_device(mconfig, type, tag, owner, clock) , device_vtlb_interface(mconfig, *this, AS_PROGRAM) , m_program_config("program", ENDIANNESS_BIG, data_bits, address_bits, 0, internal_map) @@ -242,47 +242,47 @@ ppc_device::~ppc_device() { } -//ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +//ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) // : ppc_device(mconfig, PPC403, "PPC403", tag, owner, clock, "ppc403", 32?, 64?) //{ //} // -//ppc405_device::ppc405_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +//ppc405_device::ppc405_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) // : ppc_device(mconfig, PPC405, "PPC405", tag, owner, clock, "ppc405", 32?, 64?) //{ //} -ppc603_device::ppc603_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc603_device::ppc603_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc_device(mconfig, PPC603, tag, owner, clock, 32, 64, PPC_MODEL_603, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, address_map_constructor()) { } -ppc603e_device::ppc603e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc603e_device::ppc603e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc_device(mconfig, PPC603E, tag, owner, clock, 32, 64, PPC_MODEL_603E, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, address_map_constructor()) { } -ppc603r_device::ppc603r_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc603r_device::ppc603r_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc_device(mconfig, PPC603R, tag, owner, clock, 32, 64, PPC_MODEL_603R, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, address_map_constructor()) { } -ppc602_device::ppc602_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc602_device::ppc602_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc_device(mconfig, PPC602, tag, owner, clock, 32, 64, PPC_MODEL_602, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, address_map_constructor()) { } -mpc8240_device::mpc8240_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpc8240_device::mpc8240_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc_device(mconfig, MPC8240, tag, owner, clock, 32, 64, PPC_MODEL_MPC8240, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4/* unknown */, address_map_constructor()) { } -ppc601_device::ppc601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc601_device::ppc601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc_device(mconfig, PPC601, tag, owner, clock, 32, 64, PPC_MODEL_601, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_MFIOC | PPCCAP_601BAT, 0/* no TB */, address_map_constructor()) { } -ppc604_device::ppc604_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc604_device::ppc604_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc_device(mconfig, PPC604, tag, owner, clock, 32, 64, PPC_MODEL_604, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_604_MMU, 4, address_map_constructor()) { } @@ -292,22 +292,22 @@ void ppc4xx_device::internal_ppc4xx(address_map &map) map(0x40000000, 0x4000000f).rw(FUNC(ppc4xx_device::ppc4xx_spu_r), FUNC(ppc4xx_device::ppc4xx_spu_w)); } -ppc4xx_device::ppc4xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor) +ppc4xx_device::ppc4xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, powerpc_flavor flavor, uint32_t cap, uint32_t tb_divisor) : ppc_device(mconfig, type, tag, owner, clock, 31, 32, flavor, cap, tb_divisor, address_map_constructor(FUNC(ppc4xx_device::internal_ppc4xx), this)) { } -ppc403ga_device::ppc403ga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc403ga_device::ppc403ga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc4xx_device(mconfig, PPC403GA, tag, owner, clock, PPC_MODEL_403GA, PPCCAP_4XX, 1) { } -ppc403gcx_device::ppc403gcx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc403gcx_device::ppc403gcx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc4xx_device(mconfig, PPC403GCX, tag, owner, clock, PPC_MODEL_403GCX, PPCCAP_4XX, 1) { } -ppc405gp_device::ppc405gp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ppc405gp_device::ppc405gp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ppc4xx_device(mconfig, PPC405GP, tag, owner, clock, PPC_MODEL_405GP, PPCCAP_4XX | PPCCAP_VEA, 1) { } diff --git a/src/devices/cpu/pps4/pps4.cpp b/src/devices/cpu/pps4/pps4.cpp index 1a44fa2a39b..e5025928bc2 100644 --- a/src/devices/cpu/pps4/pps4.cpp +++ b/src/devices/cpu/pps4/pps4.cpp @@ -86,7 +86,7 @@ DEFINE_DEVICE_TYPE(PPS4, pps4_device, "pps4", "Rockwell PPS4-4") DEFINE_DEVICE_TYPE(PPS4_2, pps4_2_device, "pps4_2", "Rockwell PPS-4/2") -pps4_device::pps4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +pps4_device::pps4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 12) , m_data_config("data", ENDIANNESS_LITTLE, 8, 12) // 4bit RAM @@ -99,12 +99,12 @@ pps4_device::pps4_device(const machine_config &mconfig, device_type type, const { } -pps4_device::pps4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pps4_device::pps4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pps4_device(mconfig, PPS4, tag, owner, clock) { } -pps4_2_device::pps4_2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pps4_2_device::pps4_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pps4_device(mconfig, PPS4_2, tag, owner, clock) { } diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h index 4b9b82f37c0..35901965c95 100644 --- a/src/devices/cpu/pps4/pps4.h +++ b/src/devices/cpu/pps4/pps4.h @@ -40,7 +40,7 @@ class pps4_device : public cpu_device { public: // construction/destruction - pps4_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pps4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto dia_cb() { return m_dia_cb.bind(); } @@ -50,7 +50,7 @@ public: u16 address_bus_r(address_space &space); protected: - pps4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + pps4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -171,7 +171,7 @@ class pps4_2_device : public pps4_device { public: // construction/destruction - pps4_2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pps4_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/pps41/mm75.cpp b/src/devices/cpu/pps41/mm75.cpp index 83c5ae06368..d89fa319701 100644 --- a/src/devices/cpu/pps41/mm75.cpp +++ b/src/devices/cpu/pps41/mm75.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(MM75, mm75_device, "mm75", "Rockwell MM75 A7500") // stripped // constructor -mm75_device::mm75_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm75_device::mm75_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm76_device(mconfig, MM75, tag, owner, clock, 10, address_map_constructor(FUNC(mm75_device::program_0_6k), this), 6, address_map_constructor(FUNC(mm75_device::data_48x4), this)) { } diff --git a/src/devices/cpu/pps41/mm75.h b/src/devices/cpu/pps41/mm75.h index 39a14245cae..5eaba622bbd 100644 --- a/src/devices/cpu/pps41/mm75.h +++ b/src/devices/cpu/pps41/mm75.h @@ -37,7 +37,7 @@ class mm75_device : public mm76_device { public: - mm75_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm75_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/cpu/pps41/mm76.cpp b/src/devices/cpu/pps41/mm76.cpp index bb7d9cd7a53..c0dacb2d371 100644 --- a/src/devices/cpu/pps41/mm76.cpp +++ b/src/devices/cpu/pps41/mm76.cpp @@ -19,27 +19,27 @@ DEFINE_DEVICE_TYPE(MM76EL, mm76el_device, "mm76el", "Rockwell MM76EL B8600") // // constructor -mm76_device::mm76_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm76_device::mm76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm76_device(mconfig, MM76, tag, owner, clock, 10, address_map_constructor(FUNC(mm76_device::program_0_6k), this), 6, address_map_constructor(FUNC(mm76_device::data_48x4), this)) { } -mm76_device::mm76_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +mm76_device::mm76_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : pps41_base_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -mm76l_device::mm76l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm76l_device::mm76l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm76_device(mconfig, MM76L, tag, owner, clock, 10, address_map_constructor(FUNC(mm76l_device::program_0_6k), this), 6, address_map_constructor(FUNC(mm76l_device::data_48x4), this)) { } -mm76e_device::mm76e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm76e_device::mm76e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm76e_device(mconfig, MM76E, tag, owner, clock, 10, address_map_constructor(FUNC(mm76e_device::program_1k), this), 6, address_map_constructor(FUNC(mm76e_device::data_48x4), this)) { } -mm76e_device::mm76e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +mm76e_device::mm76e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : mm76_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -mm76el_device::mm76el_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm76el_device::mm76el_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm76e_device(mconfig, MM76EL, tag, owner, clock, 10, address_map_constructor(FUNC(mm76el_device::program_1k), this), 6, address_map_constructor(FUNC(mm76el_device::data_48x4), this)) { } diff --git a/src/devices/cpu/pps41/mm76.h b/src/devices/cpu/pps41/mm76.h index 54db25fc93b..5ec1193ecb9 100644 --- a/src/devices/cpu/pps41/mm76.h +++ b/src/devices/cpu/pps41/mm76.h @@ -44,10 +44,10 @@ class mm76_device : public pps41_base_device { public: - mm76_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mm76_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + mm76_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; @@ -136,16 +136,16 @@ protected: class mm76l_device : public mm76_device { public: - mm76l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm76l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mm76e_device : public mm76_device { public: - mm76e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm76e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mm76e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + mm76e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); void program_1k(address_map &map); }; @@ -153,7 +153,7 @@ protected: class mm76el_device : public mm76e_device { public: - mm76el_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm76el_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/pps41/mm78.cpp b/src/devices/cpu/pps41/mm78.cpp index 8512c8f3f07..ae23593ee3f 100644 --- a/src/devices/cpu/pps41/mm78.cpp +++ b/src/devices/cpu/pps41/mm78.cpp @@ -19,27 +19,27 @@ DEFINE_DEVICE_TYPE(MM77L, mm77l_device, "mm77l", "Rockwell MM77L B7700") // 1.5K // constructor -mm78_device::mm78_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm78_device::mm78_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm78_device(mconfig, MM78, tag, owner, clock, 11, address_map_constructor(FUNC(mm78_device::program_2k), this), 7, address_map_constructor(FUNC(mm78_device::data_128x4), this)) { } -mm78_device::mm78_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +mm78_device::mm78_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : mm76_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -mm78l_device::mm78l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm78l_device::mm78l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm78_device(mconfig, MM78L, tag, owner, clock, 11, address_map_constructor(FUNC(mm78l_device::program_2k), this), 7, address_map_constructor(FUNC(mm78l_device::data_128x4), this)) { } -mm77_device::mm77_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm77_device::mm77_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm77_device(mconfig, MM77, tag, owner, clock, 11, address_map_constructor(FUNC(mm77_device::program_1_3k), this), 7, address_map_constructor(FUNC(mm77_device::data_96x4), this)) { } -mm77_device::mm77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +mm77_device::mm77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : mm78_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -mm77l_device::mm77l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm77l_device::mm77l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm77_device(mconfig, MM77L, tag, owner, clock, 11, address_map_constructor(FUNC(mm77l_device::program_1_5k), this), 7, address_map_constructor(FUNC(mm77l_device::data_96x4), this)) { } diff --git a/src/devices/cpu/pps41/mm78.h b/src/devices/cpu/pps41/mm78.h index d901d87988c..14ef3f2fe3d 100644 --- a/src/devices/cpu/pps41/mm78.h +++ b/src/devices/cpu/pps41/mm78.h @@ -45,10 +45,10 @@ class mm78_device : public mm76_device { public: - mm78_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm78_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mm78_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + mm78_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; @@ -101,22 +101,22 @@ protected: class mm78l_device : public mm78_device { public: - mm78l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm78l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mm77_device : public mm78_device { public: - mm77_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm77_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mm77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + mm77_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); }; class mm77l_device : public mm77_device { public: - mm77l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm77l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/pps41/mm78la.cpp b/src/devices/cpu/pps41/mm78la.cpp index 0e03e77935d..2509df48334 100644 --- a/src/devices/cpu/pps41/mm78la.cpp +++ b/src/devices/cpu/pps41/mm78la.cpp @@ -15,15 +15,15 @@ DEFINE_DEVICE_TYPE(MM77LA, mm77la_device, "mm77la", "Rockwell MM77LA B8000") // // constructor -mm78la_device::mm78la_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm78la_device::mm78la_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm78la_device(mconfig, MM78LA, tag, owner, clock, 11, address_map_constructor(FUNC(mm78la_device::program_2k), this), 7, address_map_constructor(FUNC(mm78la_device::data_128x4), this)) { } -mm78la_device::mm78la_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +mm78la_device::mm78la_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : mm78_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -mm77la_device::mm77la_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm77la_device::mm77la_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm78la_device(mconfig, MM77LA, tag, owner, clock, 11, address_map_constructor(FUNC(mm77la_device::program_1_5k), this), 7, address_map_constructor(FUNC(mm77la_device::data_96x4), this)) { } diff --git a/src/devices/cpu/pps41/mm78la.h b/src/devices/cpu/pps41/mm78la.h index a9c58ab4572..a4f67d321ab 100644 --- a/src/devices/cpu/pps41/mm78la.h +++ b/src/devices/cpu/pps41/mm78la.h @@ -46,10 +46,10 @@ class mm78la_device : public mm78_device { public: - mm78la_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm78la_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mm78la_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + mm78la_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; @@ -79,7 +79,7 @@ protected: class mm77la_device : public mm78la_device { public: - mm77la_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm77la_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/pps41/pps41base.cpp b/src/devices/cpu/pps41/pps41base.cpp index 9fa004640b3..ff5c02426c7 100644 --- a/src/devices/cpu/pps41/pps41base.cpp +++ b/src/devices/cpu/pps41/pps41base.cpp @@ -56,7 +56,7 @@ TODO: #include "pps41base.h" -pps41_base_device::pps41_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +pps41_base_device::pps41_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, prgwidth, 0, program), m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data), diff --git a/src/devices/cpu/pps41/pps41base.h b/src/devices/cpu/pps41/pps41base.h index 2d962b5a5d3..dd19e4c633c 100644 --- a/src/devices/cpu/pps41/pps41base.h +++ b/src/devices/cpu/pps41/pps41base.h @@ -56,7 +56,7 @@ public: protected: // construction/destruction - pps41_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + pps41_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/psx/dma.cpp b/src/devices/cpu/psx/dma.cpp index 0a901228944..5b4e12d760b 100644 --- a/src/devices/cpu/psx/dma.cpp +++ b/src/devices/cpu/psx/dma.cpp @@ -29,7 +29,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, c DEFINE_DEVICE_TYPE(PSX_DMA, psxdma_device, "psxdma", "Sony PSX DMA") -psxdma_device::psxdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psxdma_device::psxdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_DMA, tag, owner, clock), m_ram(), m_ramsize(0), m_dpcp(0), m_dicr(0), m_irq_handler(*this) { diff --git a/src/devices/cpu/psx/dma.h b/src/devices/cpu/psx/dma.h index 0d81d67da7d..35f1480006c 100644 --- a/src/devices/cpu/psx/dma.h +++ b/src/devices/cpu/psx/dma.h @@ -21,7 +21,7 @@ public: typedef delegate read_delegate; typedef delegate write_delegate; - psxdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); //configuration helpers auto irq() { return m_irq_handler.bind(); } diff --git a/src/devices/cpu/psx/irq.cpp b/src/devices/cpu/psx/irq.cpp index d14e8f7cdc0..7207daa83c7 100644 --- a/src/devices/cpu/psx/irq.cpp +++ b/src/devices/cpu/psx/irq.cpp @@ -32,7 +32,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, c DEFINE_DEVICE_TYPE(PSX_IRQ, psxirq_device, "psxirq", "Sony PSX IRQ") -psxirq_device::psxirq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psxirq_device::psxirq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_IRQ, tag, owner, clock), n_irqdata(0), n_irqmask(0), m_irq_handler(*this) { diff --git a/src/devices/cpu/psx/irq.h b/src/devices/cpu/psx/irq.h index b4ee28e712a..2708a0584a2 100644 --- a/src/devices/cpu/psx/irq.h +++ b/src/devices/cpu/psx/irq.h @@ -18,7 +18,7 @@ DECLARE_DEVICE_TYPE(PSX_IRQ, psxirq_device) class psxirq_device : public device_t { public: - psxirq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxirq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq() { return m_irq_handler.bind(); } diff --git a/src/devices/cpu/psx/mdec.cpp b/src/devices/cpu/psx/mdec.cpp index 8b4421e4062..a2aa588175b 100644 --- a/src/devices/cpu/psx/mdec.cpp +++ b/src/devices/cpu/psx/mdec.cpp @@ -32,7 +32,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, c DEFINE_DEVICE_TYPE(PSX_MDEC, psxmdec_device, "psxmdec", "Sony PSX MDEC") -psxmdec_device::psxmdec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +psxmdec_device::psxmdec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_MDEC, tag, owner, clock), n_decoded(0), n_offset(0), n_0_command(0), n_0_address(0), n_0_size(0), n_1_command(0), n_1_status(0) { } diff --git a/src/devices/cpu/psx/mdec.h b/src/devices/cpu/psx/mdec.h index 8d9da890069..a597c3e69c1 100644 --- a/src/devices/cpu/psx/mdec.h +++ b/src/devices/cpu/psx/mdec.h @@ -18,7 +18,7 @@ DECLARE_DEVICE_TYPE(PSX_MDEC, psxmdec_device) class psxmdec_device : public device_t { public: - psxmdec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxmdec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint32_t data); uint32_t read(offs_t offset); diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp index 1e7ed448c2e..cb51a087212 100644 --- a/src/devices/cpu/psx/psx.cpp +++ b/src/devices/cpu/psx/psx.cpp @@ -1784,7 +1784,7 @@ void psxcpu_device::psxcpu_internal_map(address_map &map) // psxcpu_device - constructor //------------------------------------------------- -psxcpu_device::psxcpu_device( const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock ) : +psxcpu_device::psxcpu_device( const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock ) : cpu_device( mconfig, type, tag, owner, clock ), m_program_config( "program", ENDIANNESS_LITTLE, 32, 32, 0, address_map_constructor(FUNC(psxcpu_device::psxcpu_internal_map), this)), m_gpu_read_handler( *this ), @@ -1799,32 +1799,32 @@ psxcpu_device::psxcpu_device( const machine_config &mconfig, device_type type, c m_disable_rom_berr = false; } -cxd8530aq_device::cxd8530aq_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +cxd8530aq_device::cxd8530aq_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : psxcpu_device( mconfig, CXD8530AQ, tag, owner, clock) { } -cxd8530bq_device::cxd8530bq_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +cxd8530bq_device::cxd8530bq_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : psxcpu_device( mconfig, CXD8530BQ, tag, owner, clock) { } -cxd8530cq_device::cxd8530cq_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +cxd8530cq_device::cxd8530cq_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : psxcpu_device( mconfig, CXD8530CQ, tag, owner, clock) { } -cxd8661r_device::cxd8661r_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +cxd8661r_device::cxd8661r_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : psxcpu_device( mconfig, CXD8661R, tag, owner, clock) { } -cxd8606bq_device::cxd8606bq_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +cxd8606bq_device::cxd8606bq_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : psxcpu_device( mconfig, CXD8606BQ, tag, owner, clock) { } -cxd8606cq_device::cxd8606cq_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +cxd8606cq_device::cxd8606cq_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : psxcpu_device( mconfig, CXD8606CQ, tag, owner, clock) { } @@ -3450,17 +3450,17 @@ device_memory_interface::space_config_vector psxcpu_device::memory_space_config( void psxcpu_device::device_add_mconfig(machine_config &config) { - auto &irq(PSX_IRQ(config, "irq", 0)); + auto &irq(PSX_IRQ(config, "irq")); irq.irq().set_inputline(DEVICE_SELF, PSXCPU_IRQ0); - auto &dma(PSX_DMA(config, "dma", 0)); + auto &dma(PSX_DMA(config, "dma")); dma.irq().set("irq", FUNC(psxirq_device::intin3)); - auto &mdec(PSX_MDEC(config, "mdec", 0)); + auto &mdec(PSX_MDEC(config, "mdec")); dma.install_write_handler(0, psxdma_device::write_delegate(&psxmdec_device::dma_write, &mdec)); dma.install_read_handler(1, psxdma_device::write_delegate(&psxmdec_device::dma_read, &mdec)); - auto &rcnt(PSX_RCNT(config, "rcnt", 0)); + auto &rcnt(PSX_RCNT(config, "rcnt")); rcnt.irq0().set("irq", FUNC(psxirq_device::intin4)); rcnt.irq1().set("irq", FUNC(psxirq_device::intin5)); rcnt.irq2().set("irq", FUNC(psxirq_device::intin6)); diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h index 4ab779d9139..73e756ae332 100644 --- a/src/devices/cpu/psx/psx.h +++ b/src/devices/cpu/psx/psx.h @@ -168,7 +168,7 @@ protected: static constexpr unsigned ICACHE_ENTRIES = 0x400; static constexpr unsigned DCACHE_ENTRIES = 0x100; - psxcpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + psxcpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -325,42 +325,42 @@ class cxd8530aq_device : public psxcpu_device { public: // construction/destruction - cxd8530aq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8530aq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8530bq_device : public psxcpu_device { public: // construction/destruction - cxd8530bq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8530bq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8530cq_device : public psxcpu_device { public: // construction/destruction - cxd8530cq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8530cq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8661r_device : public psxcpu_device { public: // construction/destruction - cxd8661r_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8661r_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8606bq_device : public psxcpu_device { public: // construction/destruction - cxd8606bq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8606bq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8606cq_device : public psxcpu_device { public: // construction/destruction - cxd8606cq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8606cq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/cpu/psx/rcnt.cpp b/src/devices/cpu/psx/rcnt.cpp index 02e55dd5333..cdd71510846 100644 --- a/src/devices/cpu/psx/rcnt.cpp +++ b/src/devices/cpu/psx/rcnt.cpp @@ -29,7 +29,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, c DEFINE_DEVICE_TYPE(PSX_RCNT, psxrcnt_device, "psxrcnt", "Sony PSX RCNT") -psxrcnt_device::psxrcnt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psxrcnt_device::psxrcnt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSX_RCNT, tag, owner, clock), m_irq0_handler(*this), m_irq1_handler(*this), diff --git a/src/devices/cpu/psx/rcnt.h b/src/devices/cpu/psx/rcnt.h index 8e0a471f4e1..61e1e852195 100644 --- a/src/devices/cpu/psx/rcnt.h +++ b/src/devices/cpu/psx/rcnt.h @@ -27,7 +27,7 @@ DECLARE_DEVICE_TYPE(PSX_RCNT, psxrcnt_device) class psxrcnt_device : public device_t { public: - psxrcnt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxrcnt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq0() { return m_irq0_handler.bind(); } diff --git a/src/devices/cpu/psx/sio.cpp b/src/devices/cpu/psx/sio.cpp index 46b73d6b3a9..fc71b4d8055 100644 --- a/src/devices/cpu/psx/sio.cpp +++ b/src/devices/cpu/psx/sio.cpp @@ -30,17 +30,17 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, c DEFINE_DEVICE_TYPE(PSX_SIO0, psxsio0_device, "psxsio0", "Sony PSX SIO-0") DEFINE_DEVICE_TYPE(PSX_SIO1, psxsio1_device, "psxsio1", "Sony PSX SIO-1") -psxsio0_device::psxsio0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psxsio0_device::psxsio0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxsio_device(mconfig, PSX_SIO0, tag, owner, clock) { } -psxsio1_device::psxsio1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psxsio1_device::psxsio1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxsio_device(mconfig, PSX_SIO1, tag, owner, clock) { } -psxsio_device::psxsio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +psxsio_device::psxsio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_status(SIO_STATUS_TX_EMPTY | SIO_STATUS_TX_RDY), m_mode(0), m_control(0), m_baud(0), m_rxd(1), m_tx_data(0), m_rx_data(0), m_tx_shift(0), m_rx_shift(0), m_tx_bits(0), m_rx_bits(0), m_timer(nullptr), diff --git a/src/devices/cpu/psx/sio.h b/src/devices/cpu/psx/sio.h index 482a8081d6a..afe6a3dceec 100644 --- a/src/devices/cpu/psx/sio.h +++ b/src/devices/cpu/psx/sio.h @@ -50,7 +50,7 @@ public: DECLARE_WRITE_LINE_MEMBER(write_dsr); protected: - psxsio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + psxsio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -86,13 +86,13 @@ private: class psxsio0_device : public psxsio_device { public: - psxsio0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxsio0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class psxsio1_device : public psxsio_device { public: - psxsio1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxsio1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_CPU_PSX_SIO_H diff --git a/src/devices/cpu/rii/riscii.cpp b/src/devices/cpu/rii/riscii.cpp index f7c642a2f0a..7a28cde5437 100644 --- a/src/devices/cpu/rii/riscii.cpp +++ b/src/devices/cpu/rii/riscii.cpp @@ -61,7 +61,7 @@ std::unique_ptr epg3231_device::create_disassembler() return std::make_unique(); } -riscii_series_device::riscii_series_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, unsigned addrbits, unsigned pcbits, unsigned bankbits, u8 maxbank, u8 post_id_mask, address_map_constructor regs) +riscii_series_device::riscii_series_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, unsigned addrbits, unsigned pcbits, unsigned bankbits, u8 maxbank, u8 post_id_mask, address_map_constructor regs) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, addrbits, -1) , m_regs_config("register", ENDIANNESS_LITTLE, 8, 8 + bankbits, 0, regs) @@ -175,7 +175,7 @@ void epg3231_device::regs_map(address_map &map) map(0x0050, 0x007f).ram(); } -epg3231_device::epg3231_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +epg3231_device::epg3231_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : riscii_series_device(mconfig, EPG3231, tag, owner, clock, 22, 18, 5, 0x1f, 0xbb, address_map_constructor(FUNC(epg3231_device::regs_map), this)) { diff --git a/src/devices/cpu/rii/riscii.h b/src/devices/cpu/rii/riscii.h index 41b54d93a9e..2fe311bc6c9 100644 --- a/src/devices/cpu/rii/riscii.h +++ b/src/devices/cpu/rii/riscii.h @@ -92,7 +92,7 @@ public: auto out_portk_cb() { return m_port_out_cb[9].bind(); } protected: - riscii_series_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, unsigned addrbits, unsigned pcbits, unsigned bankbits, u8 maxbank, u8 post_id_mask, address_map_constructor regs); + riscii_series_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, unsigned addrbits, unsigned pcbits, unsigned bankbits, u8 maxbank, u8 post_id_mask, address_map_constructor regs); // device-level overrides virtual void device_resolve_objects() override; @@ -387,7 +387,7 @@ class epg3231_device : public riscii_series_device { public: // construction/destruction - epg3231_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + epg3231_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides diff --git a/src/devices/cpu/romp/romp.cpp b/src/devices/cpu/romp/romp.cpp index bd652f7adc2..f4918f9da4b 100644 --- a/src/devices/cpu/romp/romp.cpp +++ b/src/devices/cpu/romp/romp.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(ROMP, romp_device, "romp", "IBM ROMP") ALLOW_SAVE_TYPE(romp_device::branch_state); -romp_device::romp_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +romp_device::romp_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ROMP, tag, owner, clock) , m_mem_config("memory", ENDIANNESS_BIG, 32, 32) , m_mmu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/cpu/romp/romp.h b/src/devices/cpu/romp/romp.h index 27a710f1d84..3846ff3534f 100644 --- a/src/devices/cpu/romp/romp.h +++ b/src/devices/cpu/romp/romp.h @@ -11,7 +11,7 @@ class romp_device : public cpu_device { public: - romp_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + romp_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); template void set_mmu(T &&tag) { m_mmu.set_tag(std::forward(tag)); } template void set_iou(T &&tag) { m_iou.set_tag(std::forward(tag)); } diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp index 6e280b7003c..d222053f74b 100644 --- a/src/devices/cpu/rsp/rsp.cpp +++ b/src/devices/cpu/rsp/rsp.cpp @@ -109,7 +109,7 @@ static const int vector_elements_2[16][8] = #define CACHE_SIZE (32 * 1024 * 1024) -rsp_device::rsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rsp_device::rsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, RSP, tag, owner, clock) , m_imem_config("imem", ENDIANNESS_BIG, 32, 12) , m_dmem_config("dmem", ENDIANNESS_BIG, 32, 12) diff --git a/src/devices/cpu/rsp/rsp.h b/src/devices/cpu/rsp/rsp.h index b33012bddda..000e6247445 100644 --- a/src/devices/cpu/rsp/rsp.h +++ b/src/devices/cpu/rsp/rsp.h @@ -84,7 +84,7 @@ class rsp_device : public cpu_device public: // construction/destruction - rsp_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); + rsp_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &_clock); virtual ~rsp_device() override; void resolve_cb(); diff --git a/src/devices/cpu/rw5000/a5000.cpp b/src/devices/cpu/rw5000/a5000.cpp index bb39455cc18..369c7a3d1eb 100644 --- a/src/devices/cpu/rw5000/a5000.cpp +++ b/src/devices/cpu/rw5000/a5000.cpp @@ -16,11 +16,11 @@ DEFINE_DEVICE_TYPE(A5000, a5000_cpu_device, "a5000", "Rockwell A5000") // constructor -a5000_cpu_device::a5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +a5000_cpu_device::a5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : b5000_cpu_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -a5000_cpu_device::a5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +a5000_cpu_device::a5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a5000_cpu_device(mconfig, A5000, tag, owner, clock, 9, address_map_constructor(FUNC(a5000_cpu_device::program_448x8), this), 6, address_map_constructor(FUNC(a5000_cpu_device::data_45x4), this)) { } diff --git a/src/devices/cpu/rw5000/a5000.h b/src/devices/cpu/rw5000/a5000.h index 704c1e7e8e0..6926fe24224 100644 --- a/src/devices/cpu/rw5000/a5000.h +++ b/src/devices/cpu/rw5000/a5000.h @@ -17,10 +17,10 @@ class a5000_cpu_device : public b5000_cpu_device { public: - a5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + a5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + a5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/rw5000/a5500.cpp b/src/devices/cpu/rw5000/a5500.cpp index 2d8cee136f1..beef8e4433b 100644 --- a/src/devices/cpu/rw5000/a5500.cpp +++ b/src/devices/cpu/rw5000/a5500.cpp @@ -16,11 +16,11 @@ DEFINE_DEVICE_TYPE(A5500, a5500_cpu_device, "a5500", "Rockwell A5500") // constructor -a5500_cpu_device::a5500_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +a5500_cpu_device::a5500_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : a5000_cpu_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -a5500_cpu_device::a5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +a5500_cpu_device::a5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a5500_cpu_device(mconfig, A5500, tag, owner, clock, 10, address_map_constructor(FUNC(a5500_cpu_device::program_768x8), this), 6, address_map_constructor(FUNC(a5500_cpu_device::data_48x4), this)) { } diff --git a/src/devices/cpu/rw5000/a5500.h b/src/devices/cpu/rw5000/a5500.h index 138c38df630..d2dddabef19 100644 --- a/src/devices/cpu/rw5000/a5500.h +++ b/src/devices/cpu/rw5000/a5500.h @@ -17,10 +17,10 @@ class a5500_cpu_device : public a5000_cpu_device { public: - a5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + a5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - a5500_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + a5500_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/rw5000/a5900.cpp b/src/devices/cpu/rw5000/a5900.cpp index e294469f35b..12c9794fc69 100644 --- a/src/devices/cpu/rw5000/a5900.cpp +++ b/src/devices/cpu/rw5000/a5900.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(A5900, a5900_cpu_device, "a5900", "Rockwell A5900") // constructor -a5900_cpu_device::a5900_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +a5900_cpu_device::a5900_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a5000_cpu_device(mconfig, A5900, tag, owner, clock, 9, address_map_constructor(FUNC(a5900_cpu_device::program_512x8), this), 6, address_map_constructor(FUNC(a5900_cpu_device::data_45x4), this)) { } diff --git a/src/devices/cpu/rw5000/a5900.h b/src/devices/cpu/rw5000/a5900.h index b6b59508578..1976b01d0cf 100644 --- a/src/devices/cpu/rw5000/a5900.h +++ b/src/devices/cpu/rw5000/a5900.h @@ -17,7 +17,7 @@ class a5900_cpu_device : public a5000_cpu_device { public: - a5900_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + a5900_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void program_512x8(address_map &map); diff --git a/src/devices/cpu/rw5000/b5000.cpp b/src/devices/cpu/rw5000/b5000.cpp index 685fb1b5190..afc49a9f4be 100644 --- a/src/devices/cpu/rw5000/b5000.cpp +++ b/src/devices/cpu/rw5000/b5000.cpp @@ -23,11 +23,11 @@ DEFINE_DEVICE_TYPE(B5000, b5000_cpu_device, "b5000", "Rockwell B5000") // constructor -b5000_cpu_device::b5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +b5000_cpu_device::b5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : rw5000_base_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -b5000_cpu_device::b5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +b5000_cpu_device::b5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : b5000_cpu_device(mconfig, B5000, tag, owner, clock, 9, address_map_constructor(FUNC(b5000_cpu_device::program_448x8), this), 6, address_map_constructor(FUNC(b5000_cpu_device::data_45x4), this)) { } diff --git a/src/devices/cpu/rw5000/b5000.h b/src/devices/cpu/rw5000/b5000.h index 828ef1d9bd7..ee0e120f272 100644 --- a/src/devices/cpu/rw5000/b5000.h +++ b/src/devices/cpu/rw5000/b5000.h @@ -44,10 +44,10 @@ class b5000_cpu_device : public rw5000_base_device { public: - b5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + b5000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - b5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + b5000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/rw5000/b5500.cpp b/src/devices/cpu/rw5000/b5500.cpp index df3fac30507..6b0fd83b470 100644 --- a/src/devices/cpu/rw5000/b5500.cpp +++ b/src/devices/cpu/rw5000/b5500.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(B5500, b5500_cpu_device, "b5500", "Rockwell B5500") // constructor -b5500_cpu_device::b5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +b5500_cpu_device::b5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : a5500_cpu_device(mconfig, B5500, tag, owner, clock, 10, address_map_constructor(FUNC(b5500_cpu_device::program_768x8), this), 6, address_map_constructor(FUNC(b5500_cpu_device::data_48x4), this)) { } diff --git a/src/devices/cpu/rw5000/b5500.h b/src/devices/cpu/rw5000/b5500.h index 596cc178485..6d69164ccef 100644 --- a/src/devices/cpu/rw5000/b5500.h +++ b/src/devices/cpu/rw5000/b5500.h @@ -17,7 +17,7 @@ class b5500_cpu_device : public a5500_cpu_device { public: - b5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + b5500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides diff --git a/src/devices/cpu/rw5000/b6000.cpp b/src/devices/cpu/rw5000/b6000.cpp index 3b18d4793b0..253640bb83b 100644 --- a/src/devices/cpu/rw5000/b6000.cpp +++ b/src/devices/cpu/rw5000/b6000.cpp @@ -23,11 +23,11 @@ DEFINE_DEVICE_TYPE(B6000, b6000_cpu_device, "b6000", "Rockwell B6000") // constructor -b6000_cpu_device::b6000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +b6000_cpu_device::b6000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : b5000_cpu_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data) { } -b6000_cpu_device::b6000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +b6000_cpu_device::b6000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : b6000_cpu_device(mconfig, B6000, tag, owner, clock, 9, address_map_constructor(FUNC(b6000_cpu_device::program_512x8), this), 6, address_map_constructor(FUNC(b6000_cpu_device::data_45x4), this)) { } diff --git a/src/devices/cpu/rw5000/b6000.h b/src/devices/cpu/rw5000/b6000.h index e415c353ee5..143cc08d7de 100644 --- a/src/devices/cpu/rw5000/b6000.h +++ b/src/devices/cpu/rw5000/b6000.h @@ -44,10 +44,10 @@ class b6000_cpu_device : public b5000_cpu_device { public: - b6000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + b6000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - b6000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + b6000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/rw5000/b6100.cpp b/src/devices/cpu/rw5000/b6100.cpp index cb5b9bdf23a..c0f187015ef 100644 --- a/src/devices/cpu/rw5000/b6100.cpp +++ b/src/devices/cpu/rw5000/b6100.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(B6100, b6100_cpu_device, "b6100", "Rockwell B6100") // constructor -b6100_cpu_device::b6100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +b6100_cpu_device::b6100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : b6000_cpu_device(mconfig, B6100, tag, owner, clock, 10, address_map_constructor(FUNC(b6100_cpu_device::program_896x8), this), 6, address_map_constructor(FUNC(b6100_cpu_device::data_48x4), this)) { } diff --git a/src/devices/cpu/rw5000/b6100.h b/src/devices/cpu/rw5000/b6100.h index bd6a3db9e1b..aa203d27079 100644 --- a/src/devices/cpu/rw5000/b6100.h +++ b/src/devices/cpu/rw5000/b6100.h @@ -44,7 +44,7 @@ class b6100_cpu_device : public b6000_cpu_device { public: - b6100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + b6100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides diff --git a/src/devices/cpu/rw5000/rw5000base.cpp b/src/devices/cpu/rw5000/rw5000base.cpp index 1d0fc237dc8..90f54f7a5d3 100644 --- a/src/devices/cpu/rw5000/rw5000base.cpp +++ b/src/devices/cpu/rw5000/rw5000base.cpp @@ -24,7 +24,7 @@ It is similar, but too many differences to emulate in this device, probably. #include "rw5000base.h" -rw5000_base_device::rw5000_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +rw5000_base_device::rw5000_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, prgwidth, 0, program), m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data), diff --git a/src/devices/cpu/rw5000/rw5000base.h b/src/devices/cpu/rw5000/rw5000base.h index f6dc6146af8..850ba219963 100644 --- a/src/devices/cpu/rw5000/rw5000base.h +++ b/src/devices/cpu/rw5000/rw5000base.h @@ -38,7 +38,7 @@ public: protected: // construction/destruction - rw5000_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + rw5000_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/rx01/rx01.cpp b/src/devices/cpu/rx01/rx01.cpp index 07ac688e1d7..6d02b2c4140 100644 --- a/src/devices/cpu/rx01/rx01.cpp +++ b/src/devices/cpu/rx01/rx01.cpp @@ -35,7 +35,7 @@ // device type definition DEFINE_DEVICE_TYPE(RX01_CPU, rx01_cpu_device, "rx01_cpu", "DEC RX01 CPU") -rx01_cpu_device::rx01_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rx01_cpu_device::rx01_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, RX01_CPU, tag, owner, clock) , m_inst_config("program", ENDIANNESS_LITTLE, 8, 12, 0) , m_data_config("sectordata", ENDIANNESS_LITTLE, 8, 10, 0) // actually 1 bit wide diff --git a/src/devices/cpu/rx01/rx01.h b/src/devices/cpu/rx01/rx01.h index b8806c354f3..f543279859b 100644 --- a/src/devices/cpu/rx01/rx01.h +++ b/src/devices/cpu/rx01/rx01.h @@ -38,7 +38,7 @@ public: }; // device type constructor - rx01_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rx01_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto error_callback() { return m_interface_callback[0].bind(); } diff --git a/src/devices/cpu/s2650/s2650.cpp b/src/devices/cpu/s2650/s2650.cpp index 4b668f569a7..f503e443f29 100644 --- a/src/devices/cpu/s2650/s2650.cpp +++ b/src/devices/cpu/s2650/s2650.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(S2650, s2650_device, "s2650", "Signetics 2650") -s2650_device::s2650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s2650_device::s2650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, S2650, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 15) , m_io_config("io", ENDIANNESS_BIG, 8, 8) diff --git a/src/devices/cpu/s2650/s2650.h b/src/devices/cpu/s2650/s2650.h index 008ea0bb31f..efd2515eb6d 100644 --- a/src/devices/cpu/s2650/s2650.h +++ b/src/devices/cpu/s2650/s2650.h @@ -29,7 +29,7 @@ class s2650_device : public cpu_device, public s2650_disassembler::config { public: // construction/destruction - s2650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s2650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto sense_handler() { return m_sense_handler.bind(); } diff --git a/src/devices/cpu/saturn/saturn.cpp b/src/devices/cpu/saturn/saturn.cpp index fcbafdb5a7f..27891b1490b 100644 --- a/src/devices/cpu/saturn/saturn.cpp +++ b/src/devices/cpu/saturn/saturn.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(SATURN, saturn_device, "saturn_cpu", "Hewlett-Packard Saturn") -saturn_device::saturn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_device::saturn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SATURN, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0) , m_out_func(*this) diff --git a/src/devices/cpu/saturn/saturn.h b/src/devices/cpu/saturn/saturn.h index 5111de6d7ed..58eaa628c74 100644 --- a/src/devices/cpu/saturn/saturn.h +++ b/src/devices/cpu/saturn/saturn.h @@ -66,7 +66,7 @@ class saturn_device : public cpu_device, public saturn_disassembler::config { public: // construction/destruction - saturn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto out_func() { return m_out_func.bind(); } diff --git a/src/devices/cpu/sc61860/sc61860.cpp b/src/devices/cpu/sc61860/sc61860.cpp index 9719ebc7069..24bc81b1ba3 100644 --- a/src/devices/cpu/sc61860/sc61860.cpp +++ b/src/devices/cpu/sc61860/sc61860.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(SC61860, sc61860_device, "sc61860", "Sharp SC61860") -sc61860_device::sc61860_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sc61860_device::sc61860_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SC61860, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0) , m_reset(*this) diff --git a/src/devices/cpu/sc61860/sc61860.h b/src/devices/cpu/sc61860/sc61860.h index df019b6b845..f4893f0212a 100644 --- a/src/devices/cpu/sc61860/sc61860.h +++ b/src/devices/cpu/sc61860/sc61860.h @@ -49,7 +49,7 @@ class sc61860_device : public cpu_device { public: // construction/destruction - sc61860_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sc61860_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto reset_cb() { return m_reset.bind(); } diff --git a/src/devices/cpu/scmp/scmp.cpp b/src/devices/cpu/scmp/scmp.cpp index 5eb4bba0be9..8eee52cc73f 100644 --- a/src/devices/cpu/scmp/scmp.cpp +++ b/src/devices/cpu/scmp/scmp.cpp @@ -20,13 +20,13 @@ DEFINE_DEVICE_TYPE(SCMP, scmp_device, "ins8050", "National Semiconductor I DEFINE_DEVICE_TYPE(INS8060, ins8060_device, "ins8060", "National Semiconductor INS 8060 SC/MP II") -scmp_device::scmp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scmp_device::scmp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scmp_device(mconfig, SCMP, tag, owner, clock) { } -scmp_device::scmp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +scmp_device::scmp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0) , m_AC(0), m_ER(0), m_SR(0), m_icount(0) @@ -47,7 +47,7 @@ device_memory_interface::space_config_vector scmp_device::memory_space_config() } -ins8060_device::ins8060_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ins8060_device::ins8060_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scmp_device(mconfig, INS8060, tag, owner, clock) { } diff --git a/src/devices/cpu/scmp/scmp.h b/src/devices/cpu/scmp/scmp.h index 7145973bdb1..0dace0a9623 100644 --- a/src/devices/cpu/scmp/scmp.h +++ b/src/devices/cpu/scmp/scmp.h @@ -10,7 +10,7 @@ class scmp_device : public cpu_device { public: // construction/destruction - scmp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scmp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto flag_out() { return m_flag_out_func.bind(); } @@ -26,7 +26,7 @@ protected: SCMP_PC, SCMP_P1, SCMP_P2, SCMP_P3, SCMP_AC, SCMP_ER, SCMP_SR }; - scmp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + scmp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -88,7 +88,7 @@ class ins8060_device : public scmp_device { public: // construction/destruction - ins8060_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ins8060_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return (clocks + 2 - 1) / 2; } diff --git a/src/devices/cpu/score/score.cpp b/src/devices/cpu/score/score.cpp index ffa95aee8c7..df5346cd287 100644 --- a/src/devices/cpu/score/score.cpp +++ b/src/devices/cpu/score/score.cpp @@ -58,7 +58,7 @@ const score7_cpu_device::op_handler score7_cpu_device::s_opcode16_table[8] = // score7_cpu_device - constructor //------------------------------------------------- -score7_cpu_device::score7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +score7_cpu_device::score7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SCORE7, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) , m_pc(0) diff --git a/src/devices/cpu/score/score.h b/src/devices/cpu/score/score.h index b55be226043..4baa6830131 100644 --- a/src/devices/cpu/score/score.h +++ b/src/devices/cpu/score/score.h @@ -33,7 +33,7 @@ class score7_cpu_device : public cpu_device { public: // construction/destruction - score7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + score7_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/scudsp/scudsp.cpp b/src/devices/cpu/scudsp/scudsp.cpp index 4f4d697a900..858a1c736d9 100644 --- a/src/devices/cpu/scudsp/scudsp.cpp +++ b/src/devices/cpu/scudsp/scudsp.cpp @@ -1020,7 +1020,7 @@ void scudsp_cpu_device::data_map(address_map &map) map(0x00, 0xff).ram(); } -scudsp_cpu_device::scudsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scudsp_cpu_device::scudsp_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SCUDSP, tag, owner, clock) , m_out_irq_cb(*this) , m_in_dma_cb(*this) diff --git a/src/devices/cpu/se3208/se3208.cpp b/src/devices/cpu/se3208/se3208.cpp index f67ed4e0948..ee345e3dabc 100644 --- a/src/devices/cpu/se3208/se3208.cpp +++ b/src/devices/cpu/se3208/se3208.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(SE3208, se3208_device, "se3208", "ADChips SE3208") -se3208_device::se3208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +se3208_device::se3208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SE3208, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) , m_machinex_cb(*this) diff --git a/src/devices/cpu/se3208/se3208.h b/src/devices/cpu/se3208/se3208.h index d006a071bb4..4dbb2a7581a 100644 --- a/src/devices/cpu/se3208/se3208.h +++ b/src/devices/cpu/se3208/se3208.h @@ -18,7 +18,7 @@ class se3208_device : public cpu_device { public: // construction/destruction - se3208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + se3208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto machinex_cb() { return m_machinex_cb.bind(); } diff --git a/src/devices/cpu/sh/sh.h b/src/devices/cpu/sh/sh.h index d87c1e9742d..1533bca32e5 100644 --- a/src/devices/cpu/sh/sh.h +++ b/src/devices/cpu/sh/sh.h @@ -101,7 +101,7 @@ class sh_common_execution : public cpu_device { public: - sh_common_execution(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness, address_map_constructor internal) + sh_common_execution(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness, address_map_constructor internal) : cpu_device(mconfig, type, tag, owner, clock) , m_sh2_state(nullptr) , m_cache(CACHE_SIZE + sizeof(internal_sh2_state)) diff --git a/src/devices/cpu/sh/sh2.cpp b/src/devices/cpu/sh/sh2.cpp index c117afadbe0..fce9a07bd8d 100644 --- a/src/devices/cpu/sh/sh2.cpp +++ b/src/devices/cpu/sh/sh2.cpp @@ -232,7 +232,7 @@ void sh1_device::sh7032_map(address_map &map) map(0x05fffe00, 0x05ffffff).rw(FUNC(sh1_device::sh7032_r), FUNC(sh1_device::sh7032_w)); // SH-7032H internal i/o } -sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sh2_device(mconfig, SH2, tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh2_device::sh7604_map), this), 32) { } @@ -249,7 +249,7 @@ void sh2_device::device_stop() -sh2_device::sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpu_type, address_map_constructor internal_map, int addrlines) +sh2_device::sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cpu_type, address_map_constructor internal_map, int addrlines) : sh_common_execution(mconfig, type, tag, owner, clock, ENDIANNESS_BIG, internal_map) , m_program_config("program", ENDIANNESS_BIG, 32, addrlines, 0, internal_map) , m_decrypted_program_config("decrypted_opcodes", ENDIANNESS_BIG, 32, addrlines, 0) @@ -265,13 +265,13 @@ sh2_device::sh2_device(const machine_config &mconfig, device_type type, const ch m_isdrc = allow_drc(); } -sh2a_device::sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh2a_device::sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sh2_device(mconfig, SH2A, tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh2a_device::sh7021_map), this), 28) { std::fill(std::begin(m_sh7021_regs), std::end(m_sh7021_regs), 0); } -sh1_device::sh1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh1_device::sh1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sh2_device(mconfig, SH1, tag, owner, clock, CPU_TYPE_SH1, address_map_constructor(FUNC(sh1_device::sh7032_map), this), 28) { std::fill(std::begin(m_sh7032_regs), std::end(m_sh7032_regs), 0); diff --git a/src/devices/cpu/sh/sh2.h b/src/devices/cpu/sh/sh2.h index c0ba7340d8b..0ce8c65bcbf 100644 --- a/src/devices/cpu/sh/sh2.h +++ b/src/devices/cpu/sh/sh2.h @@ -55,7 +55,7 @@ public: typedef device_delegate ftcsr_read_delegate; // construction/destruction - sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~sh2_device() override; void set_is_slave(int slave) { m_is_slave = slave; } @@ -207,7 +207,7 @@ public: void sh7604_map(address_map &map); protected: - sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpu_type,address_map_constructor internal_map, int addrlines); + sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cpu_type,address_map_constructor internal_map, int addrlines); // device-level overrides virtual void device_start() override; @@ -366,7 +366,7 @@ class sh2a_device : public sh2_device { public: // construction/destruction - sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t dma_sar0_r(); void dma_sar0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); @@ -400,7 +400,7 @@ class sh1_device : public sh2_device { public: // construction/destruction - sh1_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); + sh1_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &_clock); uint16_t sh7032_r(offs_t offset); void sh7032_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/cpu/sh/sh4.cpp b/src/devices/cpu/sh/sh4.cpp index 7d64546d741..662f055d223 100644 --- a/src/devices/cpu/sh/sh4.cpp +++ b/src/devices/cpu/sh/sh4.cpp @@ -71,7 +71,7 @@ void sh3_base_device::sh3_internal_map(address_map &map) } -sh34_base_device::sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness, address_map_constructor internal) +sh34_base_device::sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness, address_map_constructor internal) : sh_common_execution(mconfig, type, tag, owner, clock, endianness, internal) , m_program_config("program", endianness, 64, 32, 0, internal) , m_io_config("io", endianness, 64, 8) @@ -90,7 +90,7 @@ device_memory_interface::space_config_vector sh34_base_device::memory_space_conf } -sh3_base_device::sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness) +sh3_base_device::sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness) : sh34_base_device(mconfig, type, tag, owner, clock, endianness, address_map_constructor(FUNC(sh3_base_device::sh3_internal_map), this)) { m_cpu_type = CPU_TYPE_SH3; @@ -98,7 +98,7 @@ sh3_base_device::sh3_base_device(const machine_config &mconfig, device_type type } -sh4_base_device::sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness) +sh4_base_device::sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness) : sh34_base_device(mconfig, type, tag, owner, clock, endianness, address_map_constructor(FUNC(sh4_base_device::sh4_internal_map), this)) { m_cpu_type = CPU_TYPE_SH4; @@ -106,25 +106,25 @@ sh4_base_device::sh4_base_device(const machine_config &mconfig, device_type type } -sh3_device::sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh3_device::sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sh3_base_device(mconfig, SH3LE, tag, owner, clock, ENDIANNESS_LITTLE) { } -sh3be_device::sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh3be_device::sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sh3_base_device(mconfig, SH3BE, tag, owner, clock, ENDIANNESS_BIG) { } -sh4_device::sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh4_device::sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sh4_base_device(mconfig, SH4LE, tag, owner, clock, ENDIANNESS_LITTLE) { } -sh4be_device::sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh4be_device::sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sh4_base_device(mconfig, SH4BE, tag, owner, clock, ENDIANNESS_BIG) { } diff --git a/src/devices/cpu/sh/sh4.h b/src/devices/cpu/sh/sh4.h index b2c97c9dc16..40b4bdd0dac 100644 --- a/src/devices/cpu/sh/sh4.h +++ b/src/devices/cpu/sh/sh4.h @@ -254,7 +254,7 @@ public: protected: // construction/destruction - sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness, address_map_constructor internal); + sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness, address_map_constructor internal); // device-level overrides virtual void device_start() override; @@ -690,7 +690,7 @@ public: void sh3_internal_map(address_map &map); protected: // construction/destruction - sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness); + sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness); virtual void device_reset() override; }; @@ -718,7 +718,7 @@ public: void sh4_internal_map(address_map &map); protected: // construction/destruction - sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness); + sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness); virtual void device_start() override; virtual void device_reset() override; @@ -729,7 +729,7 @@ class sh3_device : public sh3_base_device { friend class sh4_frontend; public: - sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); std::unique_ptr m_drcfe; /* pointer to the DRC front-end state */ virtual const opcode_desc* get_desclist(offs_t pc) override; virtual void init_drc_frontend() override; @@ -741,7 +741,7 @@ class sh3be_device : public sh3_base_device friend class sh4be_frontend; public: - sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); std::unique_ptr m_drcfe; /* pointer to the DRC front-end state */ virtual const opcode_desc* get_desclist(offs_t pc) override; virtual void init_drc_frontend() override; @@ -756,7 +756,7 @@ class sh4_device : public sh4_base_device friend class sh4_frontend; public: - sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); std::unique_ptr m_drcfe; /* pointer to the DRC front-end state */ virtual const opcode_desc* get_desclist(offs_t pc) override; virtual void init_drc_frontend() override; @@ -769,7 +769,7 @@ class sh4be_device : public sh4_base_device friend class sh4be_frontend; public: - sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); std::unique_ptr m_drcfe; /* pointer to the DRC front-end state */ virtual const opcode_desc* get_desclist(offs_t pc) override; virtual void init_drc_frontend() override; diff --git a/src/devices/cpu/sh/sh7604_bus.cpp b/src/devices/cpu/sh/sh7604_bus.cpp index a4b61bddae6..1ad437546b9 100644 --- a/src/devices/cpu/sh/sh7604_bus.cpp +++ b/src/devices/cpu/sh/sh7604_bus.cpp @@ -109,7 +109,7 @@ void sh7604_bus_device::bus_regs(address_map &map) // sh7604_bus_device - constructor //------------------------------------------------- -sh7604_bus_device::sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh7604_bus_device::sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SH7604_BUS, tag, owner, clock) { } diff --git a/src/devices/cpu/sh/sh7604_bus.h b/src/devices/cpu/sh/sh7604_bus.h index 9d2915b6b6b..30298211fb8 100644 --- a/src/devices/cpu/sh/sh7604_bus.h +++ b/src/devices/cpu/sh/sh7604_bus.h @@ -23,7 +23,7 @@ class sh7604_bus_device : public device_t { public: // construction/destruction - sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void bus_regs(address_map &map); diff --git a/src/devices/cpu/sh/sh7604_sci.cpp b/src/devices/cpu/sh/sh7604_sci.cpp index 5d49eab5c31..c79b46e73ff 100644 --- a/src/devices/cpu/sh/sh7604_sci.cpp +++ b/src/devices/cpu/sh/sh7604_sci.cpp @@ -113,7 +113,7 @@ void sh7604_sci_device::sci_regs(address_map &map) // sh7604_sci_device - constructor //------------------------------------------------- -sh7604_sci_device::sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh7604_sci_device::sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SH7604_SCI, tag, owner, clock) { diff --git a/src/devices/cpu/sh/sh7604_sci.h b/src/devices/cpu/sh/sh7604_sci.h index b77630db074..b94f9652d1f 100644 --- a/src/devices/cpu/sh/sh7604_sci.h +++ b/src/devices/cpu/sh/sh7604_sci.h @@ -23,7 +23,7 @@ class sh7604_sci_device : public device_t { public: // construction/destruction - sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void sci_regs(address_map &map); diff --git a/src/devices/cpu/sh/sh7604_wdt.cpp b/src/devices/cpu/sh/sh7604_wdt.cpp index 2b5ea9eb499..56d61c7b83b 100644 --- a/src/devices/cpu/sh/sh7604_wdt.cpp +++ b/src/devices/cpu/sh/sh7604_wdt.cpp @@ -39,7 +39,7 @@ void sh7604_wdt_device::wdt_regs(address_map &map) // sh7604_wdt_device - constructor //------------------------------------------------- -sh7604_wdt_device::sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sh7604_wdt_device::sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SH7604_WDT, tag, owner, clock) { } diff --git a/src/devices/cpu/sh/sh7604_wdt.h b/src/devices/cpu/sh/sh7604_wdt.h index dd39f4be514..12b7896fe44 100644 --- a/src/devices/cpu/sh/sh7604_wdt.h +++ b/src/devices/cpu/sh/sh7604_wdt.h @@ -23,7 +23,7 @@ class sh7604_wdt_device : public device_t { public: // construction/destruction - sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void wdt_regs(address_map &map); diff --git a/src/devices/cpu/sharc/sharc.cpp b/src/devices/cpu/sharc/sharc.cpp index 7ce22652570..5c04fd3d5e2 100644 --- a/src/devices/cpu/sharc/sharc.cpp +++ b/src/devices/cpu/sharc/sharc.cpp @@ -75,7 +75,7 @@ void adsp21062_device::internal_data(address_map &map) map(0x70000, 0x7ffff).rw(FUNC(adsp21062_device::dmw1_r), FUNC(adsp21062_device::dmw1_w)); } -adsp21062_device::adsp21062_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adsp21062_device::adsp21062_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ADSP21062, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 64, 24, -3, address_map_constructor(FUNC(adsp21062_device::internal_pgm), this)) , m_data_config("data", ENDIANNESS_LITTLE, 32, 32, -2, address_map_constructor(FUNC(adsp21062_device::internal_data), this)) diff --git a/src/devices/cpu/sharc/sharc.h b/src/devices/cpu/sharc/sharc.h index f7d2d8701cd..55a718d0fc5 100644 --- a/src/devices/cpu/sharc/sharc.h +++ b/src/devices/cpu/sharc/sharc.h @@ -90,7 +90,7 @@ public: // construction/destruction - adsp21062_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); + adsp21062_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &_clock); virtual ~adsp21062_device() override; // configuration helpers diff --git a/src/devices/cpu/sm510/sm500.cpp b/src/devices/cpu/sm510/sm500.cpp index bb440388974..13e1c248c5c 100644 --- a/src/devices/cpu/sm510/sm500.cpp +++ b/src/devices/cpu/sm510/sm500.cpp @@ -35,12 +35,12 @@ void sm500_device::data_4x10x4(address_map &map) // device definitions -sm500_device::sm500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +sm500_device::sm500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data), m_o_pins(o_pins) { } -sm500_device::sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm500_device::sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm500_device(mconfig, SM500, tag, owner, clock, 1 /* stack levels */, 7 /* o group pins */, 11 /* prg width */, address_map_constructor(FUNC(sm500_device::program_1_2k), this), 6 /* data width */, address_map_constructor(FUNC(sm500_device::data_4x10x4), this)) { } diff --git a/src/devices/cpu/sm510/sm500.h b/src/devices/cpu/sm510/sm500.h index 90be21ca184..44cbc423b2d 100644 --- a/src/devices/cpu/sm510/sm500.h +++ b/src/devices/cpu/sm510/sm500.h @@ -54,10 +54,10 @@ O36 48 | * | 13 K2 class sm500_device : public sm510_base_device { public: - sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + sm500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); protected: - sm500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + sm500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); void program_1_2k(address_map &map); void data_4x10x4(address_map &map); diff --git a/src/devices/cpu/sm510/sm510.cpp b/src/devices/cpu/sm510/sm510.cpp index 624057181cb..75ddf45c5e5 100644 --- a/src/devices/cpu/sm510/sm510.cpp +++ b/src/devices/cpu/sm510/sm510.cpp @@ -33,7 +33,7 @@ void sm510_device::data_96_32x4(address_map &map) // device definitions -sm510_device::sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm510_device::sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm510_base_device(mconfig, SM510, tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, address_map_constructor(FUNC(sm510_device::program_2_7k), this), 7 /* data width */, address_map_constructor(FUNC(sm510_device::data_96_32x4), this)) { } diff --git a/src/devices/cpu/sm510/sm510.h b/src/devices/cpu/sm510/sm510.h index af1e18d2861..4e234b0ac06 100644 --- a/src/devices/cpu/sm510/sm510.h +++ b/src/devices/cpu/sm510/sm510.h @@ -61,7 +61,7 @@ S8 60 | * | 16 b16 class sm510_device : public sm510_base_device { public: - sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + sm510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); protected: void program_2_7k(address_map &map); diff --git a/src/devices/cpu/sm510/sm510base.h b/src/devices/cpu/sm510/sm510base.h index bf061967fc4..b6a164ccddc 100644 --- a/src/devices/cpu/sm510/sm510base.h +++ b/src/devices/cpu/sm510/sm510base.h @@ -37,7 +37,7 @@ class sm510_base_device : public cpu_device { public: // construction/destruction - sm510_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : + sm510_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, prgwidth, 0, program), m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data), diff --git a/src/devices/cpu/sm510/sm511.cpp b/src/devices/cpu/sm510/sm511.cpp index dc3a3763d6c..dbd9688d200 100644 --- a/src/devices/cpu/sm510/sm511.cpp +++ b/src/devices/cpu/sm510/sm511.cpp @@ -53,15 +53,15 @@ std::unique_ptr sm511_device::create_disassembler() // device definitions -sm511_device::sm511_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +sm511_device::sm511_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data) { } -sm511_device::sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm511_device::sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm511_device(mconfig, SM511, tag, owner, clock, 2 /* stack levels */, 12 /* prg width */, address_map_constructor(FUNC(sm511_device::program_4k), this), 7 /* data width */, address_map_constructor(FUNC(sm511_device::data_96_32x4), this)) { } -sm512_device::sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm512_device::sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm511_device(mconfig, SM512, tag, owner, clock, 2, 12, address_map_constructor(FUNC(sm512_device::program_4k), this), 7, address_map_constructor(FUNC(sm512_device::data_80_48x4), this)) { } diff --git a/src/devices/cpu/sm510/sm511.h b/src/devices/cpu/sm510/sm511.h index 463ede6be04..362c1db9f86 100644 --- a/src/devices/cpu/sm510/sm511.h +++ b/src/devices/cpu/sm510/sm511.h @@ -27,10 +27,10 @@ SM512: can't be bothered to draw one here, it's 80 pins QFP, a lot of LCD segmen class sm511_device : public sm510_base_device { public: - sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + sm511_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); protected: - sm511_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + sm511_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); void program_4k(address_map &map); void data_96_32x4(address_map &map); @@ -50,7 +50,7 @@ protected: class sm512_device : public sm511_device { public: - sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + sm512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); protected: void data_80_48x4(address_map &map); diff --git a/src/devices/cpu/sm510/sm530.cpp b/src/devices/cpu/sm510/sm530.cpp index a17213fa1cb..bb68b73d72b 100644 --- a/src/devices/cpu/sm510/sm530.cpp +++ b/src/devices/cpu/sm510/sm530.cpp @@ -45,12 +45,12 @@ std::unique_ptr sm530_device::create_disassembler() // device definitions -sm530_device::sm530_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +sm530_device::sm530_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : sm511_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data), m_write_f(*this) { } -sm530_device::sm530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm530_device::sm530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm530_device(mconfig, SM530, tag, owner, clock, 1 /* stack levels */, 11 /* prg width */, address_map_constructor(FUNC(sm530_device::program_2k), this), 7 /* data width */, address_map_constructor(FUNC(sm530_device::data_64_24x4), this)) { } diff --git a/src/devices/cpu/sm510/sm530.h b/src/devices/cpu/sm510/sm530.h index 654bcf2963e..7580cfdc8b9 100644 --- a/src/devices/cpu/sm510/sm530.h +++ b/src/devices/cpu/sm510/sm530.h @@ -69,13 +69,13 @@ O26 80 | * class sm530_device : public sm511_device { public: - sm530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + sm530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); // 4-bit F output port auto write_f() { return m_write_f.bind(); } protected: - sm530_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + sm530_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); void program_2k(address_map &map); void data_64_24x4(address_map &map); diff --git a/src/devices/cpu/sm510/sm590.cpp b/src/devices/cpu/sm510/sm590.cpp index 7237dbbfa5d..58b24ac880e 100644 --- a/src/devices/cpu/sm510/sm590.cpp +++ b/src/devices/cpu/sm510/sm590.cpp @@ -50,21 +50,21 @@ void sm590_device::data_56x4(address_map &map) // device definitions -sm590_device::sm590_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +sm590_device::sm590_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : sm510_base_device(mconfig, type, tag, owner, clock, stack_levels, prgwidth, program, datawidth, data), m_write_rx(*this), m_read_rx(*this) { } -sm590_device::sm590_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm590_device::sm590_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm590_device(mconfig, SM590, tag, owner, clock, 4 /* stack levels */, 9 /* prg width */, address_map_constructor(FUNC(sm590_device::program_512x8), this), 5 /* data width */, address_map_constructor(FUNC(sm590_device::data_32x4), this)) { } -sm591_device::sm591_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm591_device::sm591_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm590_device(mconfig, SM591, tag, owner, clock, 4, 10, address_map_constructor(FUNC(sm591_device::program_1kx8), this), 6, address_map_constructor(FUNC(sm591_device::data_56x4), this)) { } -sm595_device::sm595_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm595_device::sm595_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm590_device(mconfig, SM595, tag, owner, clock, 4, 10, address_map_constructor(FUNC(sm595_device::program_768x8), this), 5, address_map_constructor(FUNC(sm595_device::data_32x4), this)) { } diff --git a/src/devices/cpu/sm510/sm590.h b/src/devices/cpu/sm510/sm590.h index 8e866b954f8..2fe61fc35e0 100644 --- a/src/devices/cpu/sm510/sm590.h +++ b/src/devices/cpu/sm510/sm590.h @@ -89,7 +89,7 @@ R3.3/CL2 => |_|6 15|_| <> R1.3 class sm590_device : public sm510_base_device { public: - sm590_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sm590_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // four 4-bit R I/O ports using sm510_base_device::write_r; @@ -97,7 +97,7 @@ public: template auto read_r() { return m_read_rx[N].bind(); } protected: - sm590_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + sm590_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); void program_512x8(address_map &map); void program_768x8(address_map &map); @@ -158,13 +158,13 @@ protected: class sm591_device : public sm590_device { public: - sm591_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sm591_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sm595_device : public sm590_device { public: - sm595_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sm595_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/sm510/sm5a.cpp b/src/devices/cpu/sm510/sm5a.cpp index c2512aeaf71..1076f70014e 100644 --- a/src/devices/cpu/sm510/sm5a.cpp +++ b/src/devices/cpu/sm510/sm5a.cpp @@ -39,19 +39,19 @@ void sm5a_device::data_5x13x4(address_map &map) // device definitions -sm5a_device::sm5a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : +sm5a_device::sm5a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : sm500_device(mconfig, type, tag, owner, clock, stack_levels, o_pins, prgwidth, program, datawidth, data) { } -sm5a_device::sm5a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm5a_device::sm5a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm5a_device(mconfig, SM5A, tag, owner, clock, 1 /* stack levels */, 9 /* o group pins */, 11 /* prg width */, address_map_constructor(FUNC(sm5a_device::program_1_8k), this), 7 /* data width */, address_map_constructor(FUNC(sm5a_device::data_5x13x4), this)) { } -sm5l_device::sm5l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sm5l_device::sm5l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm5a_device(mconfig, SM5L, tag, owner, clock, 1, 9, 11, address_map_constructor(FUNC(sm5l_device::program_1_8k), this), 7, address_map_constructor(FUNC(sm5l_device::data_5x13x4), this)) { } -kb1013vk12_device::kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +kb1013vk12_device::kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sm5a_device(mconfig, KB1013VK12, tag, owner, clock, 1, 9, 11, address_map_constructor(FUNC(kb1013vk12_device::program_1_8k), this), 7, address_map_constructor(FUNC(kb1013vk12_device::data_5x13x4), this)) { } diff --git a/src/devices/cpu/sm510/sm5a.h b/src/devices/cpu/sm510/sm5a.h index a44c687dfd9..86e223a5877 100644 --- a/src/devices/cpu/sm510/sm5a.h +++ b/src/devices/cpu/sm510/sm5a.h @@ -60,10 +60,10 @@ O34 60 | * | 16 O48 class sm5a_device : public sm500_device { public: - sm5a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + sm5a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); protected: - sm5a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + sm5a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int stack_levels, int o_pins, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); void program_1_8k(address_map &map); void data_5x13x4(address_map &map); @@ -80,13 +80,13 @@ protected: class sm5l_device : public sm5a_device { public: - sm5l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + sm5l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); }; class kb1013vk12_device : public sm5a_device { public: - kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32768); + kb1013vk12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); }; diff --git a/src/devices/cpu/sm8500/sm8500.cpp b/src/devices/cpu/sm8500/sm8500.cpp index d85b845d3dc..80648040143 100644 --- a/src/devices/cpu/sm8500/sm8500.cpp +++ b/src/devices/cpu/sm8500/sm8500.cpp @@ -32,7 +32,7 @@ static constexpr uint8_t sm8500_b2w[8] = { }; -sm8500_cpu_device::sm8500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sm8500_cpu_device::sm8500_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SM8500, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0) , m_dma_func(*this) diff --git a/src/devices/cpu/sparc/sparc.cpp b/src/devices/cpu/sparc/sparc.cpp index 2c4ef019be1..f72b736d3ef 100644 --- a/src/devices/cpu/sparc/sparc.cpp +++ b/src/devices/cpu/sparc/sparc.cpp @@ -79,7 +79,7 @@ const sparc_disassembler::asi_desc_map::value_type mb86930_asi_desc[] = { // sparc_base_device - constructor //------------------------------------------------- -sparc_base_device::sparc_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sparc_base_device::sparc_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_mmu(*this, finder_base::DUMMY_TAG) { @@ -100,12 +100,12 @@ sparc_base_device::sparc_base_device(const machine_config &mconfig, device_type // sparcv7_device - constructors //------------------------------------------------- -sparcv7_device::sparcv7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sparcv7_device::sparcv7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sparcv7_device(mconfig, SPARCV7, tag, owner, clock) { } -sparcv7_device::sparcv7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sparcv7_device::sparcv7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sparc_base_device(mconfig, type, tag, owner, clock) { } @@ -115,13 +115,13 @@ sparcv7_device::sparcv7_device(const machine_config &mconfig, device_type type, // sparcv8_device - constructor //------------------------------------------------- -sparcv8_device::sparcv8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sparcv8_device::sparcv8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sparcv8_device(mconfig, SPARCV8, tag, owner, clock) { } -sparcv8_device::sparcv8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sparcv8_device::sparcv8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : sparc_base_device(mconfig, type, tag, owner, clock) { } @@ -131,7 +131,7 @@ sparcv8_device::sparcv8_device(const machine_config &mconfig, device_type type, // mb86930_device - constructor //------------------------------------------------- -mb86930_device::mb86930_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb86930_device::mb86930_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sparcv8_device(mconfig, MB86930, tag, owner, clock) , m_cs_r(*this) , m_cs_w(*this) diff --git a/src/devices/cpu/sparc/sparc.h b/src/devices/cpu/sparc/sparc.h index df1e531f3ea..84acfa05583 100644 --- a/src/devices/cpu/sparc/sparc.h +++ b/src/devices/cpu/sparc/sparc.h @@ -21,7 +21,7 @@ class sparc_base_device : public cpu_device, public sparc_mmu_host_interface, protected sparc_disassembler::config { public: - sparc_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sparc_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template void set_mmu(T &&tag) { m_mmu.set_tag(std::forward(tag)); } @@ -273,10 +273,10 @@ protected: class sparcv7_device : public sparc_base_device { public: - sparcv7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sparcv7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sparcv7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sparcv7_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: virtual bool execute_extra_group2(uint32_t op) override; @@ -288,13 +288,13 @@ protected: class sparcv8_device : public sparc_base_device { public: - sparcv8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sparcv8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; protected: - sparcv8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sparcv8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -320,7 +320,7 @@ private: class mb86930_device : public sparcv8_device { public: - mb86930_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb86930_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/spc700/spc700.cpp b/src/devices/cpu/spc700/spc700.cpp index b477ee008a1..7502d7935de 100644 --- a/src/devices/cpu/spc700/spc700.cpp +++ b/src/devices/cpu/spc700/spc700.cpp @@ -202,12 +202,12 @@ Address Function Register R/W When Reset Remarks DEFINE_DEVICE_TYPE(SPC700, spc700_device, "spc700", "Sony SPC700") -spc700_device::spc700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spc700_device::spc700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spc700_device(mconfig, SPC700, tag, owner, clock) { } -spc700_device::spc700_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map) +spc700_device::spc700_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, internal_map) , m_a(0) diff --git a/src/devices/cpu/spc700/spc700.h b/src/devices/cpu/spc700/spc700.h index 33e3190ac10..26e3d61aaf9 100644 --- a/src/devices/cpu/spc700/spc700.h +++ b/src/devices/cpu/spc700/spc700.h @@ -10,11 +10,11 @@ class spc700_device : public cpu_device { public: // construction/destruction - spc700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spc700_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - spc700_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map = address_map_constructor()); + spc700_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map = address_map_constructor()); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/ssem/ssem.cpp b/src/devices/cpu/ssem/ssem.cpp index 77bc62edb14..71c743192ca 100644 --- a/src/devices/cpu/ssem/ssem.cpp +++ b/src/devices/cpu/ssem/ssem.cpp @@ -80,7 +80,7 @@ DEFINE_DEVICE_TYPE(SSEMCPU, ssem_device, "ssem_cpu", "Manchester SSEM") // ssem_device - constructor //------------------------------------------------- -ssem_device::ssem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ssem_device::ssem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SSEMCPU, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16) , m_pc(1) diff --git a/src/devices/cpu/ssem/ssem.h b/src/devices/cpu/ssem/ssem.h index 7cfe5d17435..9bc56283ca5 100644 --- a/src/devices/cpu/ssem/ssem.h +++ b/src/devices/cpu/ssem/ssem.h @@ -22,7 +22,7 @@ class ssem_device : public cpu_device { public: // construction/destruction - ssem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ssem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/ssp1601/ssp1601.cpp b/src/devices/cpu/ssp1601/ssp1601.cpp index 245cfca4541..4e4555daf69 100644 --- a/src/devices/cpu/ssp1601/ssp1601.cpp +++ b/src/devices/cpu/ssp1601/ssp1601.cpp @@ -192,7 +192,7 @@ DEFINE_DEVICE_TYPE(SSP1601, ssp1601_device, "ssp1601", "Samsung SSP1601") -ssp1601_device::ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ssp1601_device::ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SSP1601, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 16, -1) , m_io_config("io", ENDIANNESS_BIG, 16, 4, 0) diff --git a/src/devices/cpu/ssp1601/ssp1601.h b/src/devices/cpu/ssp1601/ssp1601.h index e912ff9891b..8edee4077ea 100644 --- a/src/devices/cpu/ssp1601/ssp1601.h +++ b/src/devices/cpu/ssp1601/ssp1601.h @@ -22,7 +22,7 @@ class ssp1601_device : public cpu_device { public: // construction/destruction - ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ssp1601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/st62xx/st62xx.cpp b/src/devices/cpu/st62xx/st62xx.cpp index 81e25d72d01..5be3b3c1741 100644 --- a/src/devices/cpu/st62xx/st62xx.cpp +++ b/src/devices/cpu/st62xx/st62xx.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(ST6228, st6228_device, "st6228", "STmicro ST6228") -st6228_device::st6228_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +st6228_device::st6228_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, ST6228, tag, owner, clock) , m_pc(0) , m_mode(MODE_NMI) diff --git a/src/devices/cpu/st62xx/st62xx.h b/src/devices/cpu/st62xx/st62xx.h index 8442e1e798b..83fc0f4a8b9 100644 --- a/src/devices/cpu/st62xx/st62xx.h +++ b/src/devices/cpu/st62xx/st62xx.h @@ -38,7 +38,7 @@ class st6228_device : public cpu_device { public: - st6228_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + st6228_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto port_a() { diff --git a/src/devices/cpu/superfx/superfx.cpp b/src/devices/cpu/superfx/superfx.cpp index e14ac788c5e..6628c03378b 100644 --- a/src/devices/cpu/superfx/superfx.cpp +++ b/src/devices/cpu/superfx/superfx.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(SUPERFX1, superfx1_device, "superfx1", "Nintendo SuperFX 1") DEFINE_DEVICE_TYPE(SUPERFX2, superfx2_device, "superfx2", "Nintendo SuperFX 2") -superfx_device::superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +superfx_device::superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 32, 0) , m_out_irq_func(*this), m_pipeline(0), m_ramaddr(0), m_sfr(0), m_pbr(0), m_rombr(0), m_rambr(0), m_cbr(0), m_scbr(0), m_scmr(0), m_colr(0), m_por(0) @@ -16,12 +16,12 @@ superfx_device::superfx_device(const machine_config &mconfig, device_type type, { } -superfx1_device::superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +superfx1_device::superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : superfx_device(mconfig, SUPERFX1, tag, owner, clock) { } -superfx2_device::superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +superfx2_device::superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : superfx_device(mconfig, SUPERFX2, tag, owner, clock) { } @@ -546,7 +546,7 @@ void superfx_device::mmio_write(uint32_t addr, uint8_t data) } } -void superfx_device::superfx_add_clocks_internal(uint32_t clocks) +void superfx_device::superfx_add_clocks_internal(const XTAL &clocks) { if(m_romcl) { diff --git a/src/devices/cpu/superfx/superfx.h b/src/devices/cpu/superfx/superfx.h index 54f07ec184f..17e3a93c197 100644 --- a/src/devices/cpu/superfx/superfx.h +++ b/src/devices/cpu/superfx/superfx.h @@ -105,7 +105,7 @@ public: protected: // construction/destruction - superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + superfx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -203,7 +203,7 @@ private: inline uint8_t superfx_op_read(uint16_t addr); inline uint8_t superfx_peekpipe(); inline uint8_t superfx_pipe(); - inline void superfx_add_clocks_internal(uint32_t clocks); + inline void superfx_add_clocks_internal(const XTAL &clocks); void superfx_timing_reset(); inline void superfx_dreg_sfr_sz_update(); }; @@ -212,7 +212,7 @@ class superfx1_device : public superfx_device { public: // construction/destruction - superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + superfx1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides @@ -224,7 +224,7 @@ class superfx2_device : public superfx_device { public: // construction/destruction - superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + superfx2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SUPERFX1, superfx1_device) diff --git a/src/devices/cpu/t11/t11.cpp b/src/devices/cpu/t11/t11.cpp index 422ea6e0510..5db68492043 100644 --- a/src/devices/cpu/t11/t11.cpp +++ b/src/devices/cpu/t11/t11.cpp @@ -39,12 +39,12 @@ DEFINE_DEVICE_TYPE(T11, t11_device, "t11", "DEC T11") DEFINE_DEVICE_TYPE(K1801VM2, k1801vm2_device, "k1801vm2", "K1801VM2") -k1801vm2_device::k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k1801vm2_device::k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : t11_device(mconfig, K1801VM2, tag, owner, clock) { } -t11_device::t11_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +t11_device::t11_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0) , c_initial_mode(0) @@ -63,7 +63,7 @@ t11_device::t11_device(const machine_config &mconfig, device_type type, const ch m_ppc.d = 0; } -t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : t11_device(mconfig, T11, tag, owner, clock) { } diff --git a/src/devices/cpu/t11/t11.h b/src/devices/cpu/t11/t11.h index cf83f65638e..d1dd1922693 100644 --- a/src/devices/cpu/t11/t11.h +++ b/src/devices/cpu/t11/t11.h @@ -39,7 +39,7 @@ public: static constexpr uint8_t BUS_ERROR = 8; // construction/destruction - t11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + t11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers void set_initial_mode(const uint16_t mode) { c_initial_mode = mode; } @@ -59,7 +59,7 @@ protected: T11_TRAP = 034 // TRAP instruction vector }; - t11_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + t11_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -1166,7 +1166,7 @@ class k1801vm2_device : public t11_device { public: // construction/destruction - k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/tlcs870/tlcs870.cpp b/src/devices/cpu/tlcs870/tlcs870.cpp index c010de7e03b..cf300ba0686 100644 --- a/src/devices/cpu/tlcs870/tlcs870.cpp +++ b/src/devices/cpu/tlcs870/tlcs870.cpp @@ -104,7 +104,7 @@ void tlcs870_device::tmp87ph40an_mem(address_map &map) } -tlcs870_device::tlcs870_device(const machine_config &mconfig, device_type optype, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map) +tlcs870_device::tlcs870_device(const machine_config &mconfig, device_type optype, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map) : cpu_device(mconfig, optype, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, program_map) , m_io_config("io", ENDIANNESS_LITTLE, 8, 16, 0) @@ -118,7 +118,7 @@ tlcs870_device::tlcs870_device(const machine_config &mconfig, device_type optype } -tmp87ph40an_device::tmp87ph40an_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp87ph40an_device::tmp87ph40an_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs870_device(mconfig, TMP87PH40AN, tag, owner, clock, address_map_constructor(FUNC(tmp87ph40an_device::tmp87ph40an_mem), this)) { } diff --git a/src/devices/cpu/tlcs870/tlcs870.h b/src/devices/cpu/tlcs870/tlcs870.h index b6c3d73478d..c04b09ffcd8 100644 --- a/src/devices/cpu/tlcs870/tlcs870.h +++ b/src/devices/cpu/tlcs870/tlcs870.h @@ -42,7 +42,7 @@ public: protected: // construction/destruction - tlcs870_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map); + tlcs870_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map); // device-level overrides virtual void device_start() override; @@ -550,7 +550,7 @@ class tmp87ph40an_device : public tlcs870_device { public: // construction/destruction - tmp87ph40an_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp87ph40an_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp index 148f2dbd4a8..2f993b7ab90 100644 --- a/src/devices/cpu/tlcs90/tlcs90.cpp +++ b/src/devices/cpu/tlcs90/tlcs90.cpp @@ -154,7 +154,7 @@ void tlcs90_device::tmp90ph44_mem(address_map &map) } -tlcs90_device::tlcs90_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map) +tlcs90_device::tlcs90_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, program_map) , m_port_read_cb(*this) @@ -163,36 +163,36 @@ tlcs90_device::tlcs90_device(const machine_config &mconfig, device_type type, co } -tmp90840_device::tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp90840_device::tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs90_device(mconfig, TMP90840, tag, owner, clock, address_map_constructor(FUNC(tmp90840_device::tmp90840_mem), this)) { } -tmp90841_device::tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp90841_device::tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs90_device(mconfig, TMP90841, tag, owner, clock, address_map_constructor(FUNC(tmp90841_device::tmp90841_mem), this)) { } -tmp90845_device::tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp90845_device::tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs90_device(mconfig, TMP90845, tag, owner, clock, address_map_constructor(FUNC(tmp90845_device::tmp90841_mem), this)) { } -tmp91640_device::tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp91640_device::tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs90_device(mconfig, TMP91640, tag, owner, clock, address_map_constructor(FUNC(tmp91640_device::tmp91640_mem), this)) { } -tmp91641_device::tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp91641_device::tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs90_device(mconfig, TMP91641, tag, owner, clock, address_map_constructor(FUNC(tmp91641_device::tmp91641_mem), this)) { } -tmp90ph44_device::tmp90ph44_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp90ph44_device::tmp90ph44_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs90_device(mconfig, TMP90PH44, tag, owner, clock, address_map_constructor(FUNC(tmp90ph44_device::tmp90ph44_mem), this)) { } diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h index c1ef052dfe8..be685dc7c0e 100644 --- a/src/devices/cpu/tlcs90/tlcs90.h +++ b/src/devices/cpu/tlcs90/tlcs90.h @@ -35,7 +35,7 @@ public: protected: // construction/destruction - tlcs90_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map); + tlcs90_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map); // device-level overrides virtual void device_start() override; @@ -198,7 +198,7 @@ class tmp90840_device : public tlcs90_device { public: // construction/destruction - tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp90840_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -210,7 +210,7 @@ class tmp90841_device : public tlcs90_device { public: // construction/destruction - tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp90841_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -222,7 +222,7 @@ class tmp90845_device : public tlcs90_device { public: // construction/destruction - tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp90845_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -234,7 +234,7 @@ class tmp91640_device : public tlcs90_device { public: // construction/destruction - tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp91640_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -246,7 +246,7 @@ class tmp91641_device : public tlcs90_device { public: // construction/destruction - tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp91641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -258,7 +258,7 @@ class tmp90ph44_device : public tlcs90_device { public: // construction/destruction - tmp90ph44_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp90ph44_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides diff --git a/src/devices/cpu/tlcs900/tlcs900.cpp b/src/devices/cpu/tlcs900/tlcs900.cpp index 3fc240cdb4a..7bc112c24bd 100644 --- a/src/devices/cpu/tlcs900/tlcs900.cpp +++ b/src/devices/cpu/tlcs900/tlcs900.cpp @@ -15,7 +15,7 @@ TODO: #include "dasm900.h" -tlcs900_device::tlcs900_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +tlcs900_device::tlcs900_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock), m_am8_16(0), m_mnemonic_80(s_mnemonic_80), @@ -36,7 +36,7 @@ tlcs900_device::tlcs900_device(const machine_config &mconfig, device_type type, { } -tlcs900h_device::tlcs900h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +tlcs900h_device::tlcs900h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : tlcs900_device(mconfig, type, tag, owner, clock) { m_mnemonic_80 = s_mnemonic_80; diff --git a/src/devices/cpu/tlcs900/tlcs900.h b/src/devices/cpu/tlcs900/tlcs900.h index f3b77d44622..7f1e2d28068 100644 --- a/src/devices/cpu/tlcs900/tlcs900.h +++ b/src/devices/cpu/tlcs900/tlcs900.h @@ -48,7 +48,7 @@ public: protected: // construction/destruction - tlcs900_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tlcs900_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -641,7 +641,7 @@ class tlcs900h_device : public tlcs900_device { protected: // construction/destruction - tlcs900h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tlcs900h_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_reset() override; diff --git a/src/devices/cpu/tlcs900/tmp95c061.cpp b/src/devices/cpu/tlcs900/tmp95c061.cpp index d297ba73fcf..c38cebfd89a 100644 --- a/src/devices/cpu/tlcs900/tmp95c061.cpp +++ b/src/devices/cpu/tlcs900/tmp95c061.cpp @@ -12,7 +12,7 @@ Toshiba TMP95C061 emulation DEFINE_DEVICE_TYPE(TMP95C061, tmp95c061_device, "tmp95c061", "Toshiba TMP95C061") -tmp95c061_device::tmp95c061_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tmp95c061_device::tmp95c061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs900h_device(mconfig, TMP95C061, tag, owner, clock), m_port1_read(*this), m_port1_write(*this), diff --git a/src/devices/cpu/tlcs900/tmp95c061.h b/src/devices/cpu/tlcs900/tmp95c061.h index 10d8193f6e6..cda71c52b74 100644 --- a/src/devices/cpu/tlcs900/tmp95c061.h +++ b/src/devices/cpu/tlcs900/tmp95c061.h @@ -15,7 +15,7 @@ class tmp95c061_device : public tlcs900h_device { public: // construction/destruction - tmp95c061_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp95c061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto port1_read() { return m_port1_read.bind(); } diff --git a/src/devices/cpu/tlcs900/tmp95c063.cpp b/src/devices/cpu/tlcs900/tmp95c063.cpp index 90663eeaff3..17501a89c53 100644 --- a/src/devices/cpu/tlcs900/tmp95c063.cpp +++ b/src/devices/cpu/tlcs900/tmp95c063.cpp @@ -12,7 +12,7 @@ Toshiba TMP95C063 emulation DEFINE_DEVICE_TYPE(TMP95C063, tmp95c063_device, "tmp95c063", "Toshiba TMP95C063") -tmp95c063_device::tmp95c063_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tmp95c063_device::tmp95c063_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs900h_device(mconfig, TMP95C063, tag, owner, clock), m_port1_read(*this), m_port1_write(*this), diff --git a/src/devices/cpu/tlcs900/tmp95c063.h b/src/devices/cpu/tlcs900/tmp95c063.h index 4c9c05bb433..d2446f383cd 100644 --- a/src/devices/cpu/tlcs900/tmp95c063.h +++ b/src/devices/cpu/tlcs900/tmp95c063.h @@ -15,7 +15,7 @@ class tmp95c063_device : public tlcs900h_device { public: // construction/destruction - tmp95c063_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp95c063_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto port1_read() { return m_port1_read.bind(); } diff --git a/src/devices/cpu/tlcs900/tmp96c141.cpp b/src/devices/cpu/tlcs900/tmp96c141.cpp index b5e64be8da3..8e2f7958459 100644 --- a/src/devices/cpu/tlcs900/tmp96c141.cpp +++ b/src/devices/cpu/tlcs900/tmp96c141.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(TMP96C141, tmp96c141_device, "tmp96c141", "Toshiba TMP96C141" // tmp96c141_device - constructor //------------------------------------------------- -tmp96c141_device::tmp96c141_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tmp96c141_device::tmp96c141_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tlcs900_device(mconfig, TMP96C141, tag, owner, clock) { } diff --git a/src/devices/cpu/tlcs900/tmp96c141.h b/src/devices/cpu/tlcs900/tmp96c141.h index 973693a201b..32b8f47f9b7 100644 --- a/src/devices/cpu/tlcs900/tmp96c141.h +++ b/src/devices/cpu/tlcs900/tmp96c141.h @@ -69,7 +69,7 @@ class tmp96c141_device : public tlcs900_device { public: // device type constructor - tmp96c141_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tmp96c141_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // TODO: configuration helpers diff --git a/src/devices/cpu/tms1000/tms0270.cpp b/src/devices/cpu/tms1000/tms0270.cpp index 1a90eba3da1..cbfe810e2f9 100644 --- a/src/devices/cpu/tms1000/tms0270.cpp +++ b/src/devices/cpu/tms1000/tms0270.cpp @@ -24,7 +24,7 @@ TMS0260 is same or similar? DEFINE_DEVICE_TYPE(TMS0270, tms0270_cpu_device, "tms0270", "Texas Instruments TMS0270") // 40-pin DIP, 16 O pins, 8+ R pins (some R pins are internally hooked up to support more I/O) -tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms0270_cpu_device::tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms0980_cpu_device(mconfig, TMS0270, tag, owner, clock, 16 /* o pins */, 16 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 1 /* stack levels */, 11 /* rom width */, address_map_constructor(FUNC(tms0270_cpu_device::rom_11bit), this), 8 /* ram width */, address_map_constructor(FUNC(tms0270_cpu_device::ram_144x4), this)) { } diff --git a/src/devices/cpu/tms1000/tms0270.h b/src/devices/cpu/tms1000/tms0270.h index e6f3f89197e..39a8ffbe696 100644 --- a/src/devices/cpu/tms1000/tms0270.h +++ b/src/devices/cpu/tms1000/tms0270.h @@ -17,7 +17,7 @@ class tms0270_cpu_device : public tms0980_cpu_device { public: - tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms0270_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // overrides diff --git a/src/devices/cpu/tms1000/tms0970.cpp b/src/devices/cpu/tms1000/tms0970.cpp index 869f3700b82..a922529895f 100644 --- a/src/devices/cpu/tms1000/tms0970.cpp +++ b/src/devices/cpu/tms1000/tms0970.cpp @@ -29,19 +29,19 @@ DEFINE_DEVICE_TYPE(TMS0970, tms0970_cpu_device, "tms0970", "Texas Instruments TM DEFINE_DEVICE_TYPE(TMS1990, tms1990_cpu_device, "tms1990", "Texas Instruments TMS1990") // 28-pin DIP, ? R pins.. -tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms0970_cpu_device(mconfig, TMS0970, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 1 /* stack levels */, 10 /* rom width */, address_map_constructor(FUNC(tms0970_cpu_device::rom_10bit), this), 6 /* ram width */, address_map_constructor(FUNC(tms0970_cpu_device::ram_6bit), this)) { } -tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms1000_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms0950_cpu_device::tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms0970_cpu_device(mconfig, TMS0950, tag, owner, clock, 8, 11, 6, 8, 2, 1, 10, address_map_constructor(FUNC(tms0950_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(tms0950_cpu_device::ram_6bit), this)) { } -tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1990_cpu_device::tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms0970_cpu_device(mconfig, TMS1990, tag, owner, clock, 8, 11, 6, 8, 2, 1, 10, address_map_constructor(FUNC(tms1990_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(tms1990_cpu_device::ram_6bit), this)) { } diff --git a/src/devices/cpu/tms1000/tms0970.h b/src/devices/cpu/tms1000/tms0970.h index 583a9480e91..2d7d1b1d100 100644 --- a/src/devices/cpu/tms1000/tms0970.h +++ b/src/devices/cpu/tms1000/tms0970.h @@ -17,10 +17,10 @@ class tms0970_cpu_device : public tms1000_cpu_device { public: - tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms0970_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); // overrides virtual void device_reset() override; @@ -35,7 +35,7 @@ protected: class tms0950_cpu_device : public tms0970_cpu_device { public: - tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms0950_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // overrides @@ -49,7 +49,7 @@ protected: class tms1990_cpu_device : public tms0970_cpu_device { public: - tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1990_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms1000/tms0980.cpp b/src/devices/cpu/tms1000/tms0980.cpp index 664adb877ed..c6daf559d77 100644 --- a/src/devices/cpu/tms1000/tms0980.cpp +++ b/src/devices/cpu/tms1000/tms0980.cpp @@ -32,15 +32,15 @@ DEFINE_DEVICE_TYPE(TMS0980, tms0980_cpu_device, "tms0980", "Texas Instruments TM DEFINE_DEVICE_TYPE(TMS1980, tms1980_cpu_device, "tms1980", "Texas Instruments TMS1980") // 28-pin DIP, 7 O pins, 10 R pins, high voltage -tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms0980_cpu_device(mconfig, TMS0980, tag, owner, clock, 8 /* o pins */, 9 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 1 /* stack levels */, 11 /* rom width */, address_map_constructor(FUNC(tms0980_cpu_device::rom_11bit), this), 8 /* ram width */, address_map_constructor(FUNC(tms0980_cpu_device::ram_144x4), this)) { } -tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms0980_cpu_device::tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms0970_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1980_cpu_device::tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms0980_cpu_device(mconfig, TMS1980, tag, owner, clock, 7, 10, 7, 9, 4, 1, 11, address_map_constructor(FUNC(tms1980_cpu_device::rom_11bit), this), 8, address_map_constructor(FUNC(tms1980_cpu_device::ram_144x4), this)) { } diff --git a/src/devices/cpu/tms1000/tms0980.h b/src/devices/cpu/tms1000/tms0980.h index 038f54cf2e2..3c0367fa80d 100644 --- a/src/devices/cpu/tms1000/tms0980.h +++ b/src/devices/cpu/tms1000/tms0980.h @@ -41,10 +41,10 @@ class tms0980_cpu_device : public tms0970_cpu_device { public: - tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms0980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms0980_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); void ram_144x4(address_map &map); @@ -74,7 +74,7 @@ protected: class tms1980_cpu_device : public tms0980_cpu_device { public: - tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1980_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // overrides diff --git a/src/devices/cpu/tms1000/tms1000.cpp b/src/devices/cpu/tms1000/tms1000.cpp index 6937fc2ab35..31209f10ea8 100644 --- a/src/devices/cpu/tms1000/tms1000.cpp +++ b/src/devices/cpu/tms1000/tms1000.cpp @@ -37,39 +37,39 @@ DEFINE_DEVICE_TYPE(MC141000, mc141000_cpu_device, "mc141000", "Motorola MC141000 DEFINE_DEVICE_TYPE(MC141200, mc141200_cpu_device, "mc141200", "Motorola MC141200") // CMOS, 40-pin DIP, 16 R pins -tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, TMS1000, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 1 /* stack levels */, 10 /* rom width */, address_map_constructor(FUNC(tms1000_cpu_device::rom_10bit), this), 6 /* ram width */, address_map_constructor(FUNC(tms1000_cpu_device::ram_6bit), this)) { } -tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms1000_cpu_device::tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms1k_base_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1070_cpu_device::tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, TMS1070, tag, owner, clock, 8, 11, 6, 8, 2, 1, 10, address_map_constructor(FUNC(tms1070_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(tms1070_cpu_device::ram_6bit), this)) { } -tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1040_cpu_device::tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, TMS1040, tag, owner, clock, 8, 11, 6, 8, 2, 1, 10, address_map_constructor(FUNC(tms1040_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(tms1040_cpu_device::ram_6bit), this)) { } -tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1200_cpu_device::tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, TMS1200, tag, owner, clock, 8, 13, 6, 8, 2, 1, 10, address_map_constructor(FUNC(tms1200_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(tms1200_cpu_device::ram_6bit), this)) { } -tms1700_cpu_device::tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1700_cpu_device::tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, TMS1700, tag, owner, clock, 8, 9, 6, 8, 2, 1, 10, address_map_constructor(FUNC(tms1700_cpu_device::rom_9bitm), this), 6, address_map_constructor(FUNC(tms1700_cpu_device::ram_32x4), this)) { } -tms1730_cpu_device::tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1730_cpu_device::tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, TMS1730, tag, owner, clock, 8, 9, 6, 8, 2, 1, 10, address_map_constructor(FUNC(tms1730_cpu_device::rom_9bitm), this), 6, address_map_constructor(FUNC(tms1730_cpu_device::ram_32x4), this)) { } -mc141000_cpu_device::mc141000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mc141000_cpu_device::mc141000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, MC141000, tag, owner, clock, 8, 11, 6, 8, 2, 1, 10, address_map_constructor(FUNC(mc141000_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(mc141000_cpu_device::ram_6bit), this)) { } -mc141200_cpu_device::mc141200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mc141200_cpu_device::mc141200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, MC141200, tag, owner, clock, 8, 16, 6, 8, 2, 1, 10, address_map_constructor(FUNC(mc141200_cpu_device::rom_10bit), this), 6, address_map_constructor(FUNC(mc141200_cpu_device::ram_6bit), this)) { } diff --git a/src/devices/cpu/tms1000/tms1000.h b/src/devices/cpu/tms1000/tms1000.h index 8e45216718b..bd9dd43fce8 100644 --- a/src/devices/cpu/tms1000/tms1000.h +++ b/src/devices/cpu/tms1000/tms1000.h @@ -61,10 +61,10 @@ class tms1000_cpu_device : public tms1k_base_device { public: - tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms1000_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); void rom_9bitm(address_map &map); void ram_32x4(address_map &map); @@ -80,46 +80,46 @@ protected: class tms1070_cpu_device : public tms1000_cpu_device { public: - tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1070_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms1040_cpu_device : public tms1000_cpu_device { public: - tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1040_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms1200_cpu_device : public tms1000_cpu_device { public: - tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms1700_cpu_device : public tms1000_cpu_device { public: - tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1700_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms1730_cpu_device : public tms1000_cpu_device { public: - tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1730_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc141000_cpu_device : public tms1000_cpu_device { public: - mc141000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc141000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc141200_cpu_device : public tms1000_cpu_device { public: - mc141200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc141200_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms1000/tms1000c.cpp b/src/devices/cpu/tms1000/tms1000c.cpp index 977c8c90d37..ed6b7a9fd06 100644 --- a/src/devices/cpu/tms1000/tms1000c.cpp +++ b/src/devices/cpu/tms1000/tms1000c.cpp @@ -26,7 +26,7 @@ TODO: DEFINE_DEVICE_TYPE(TMS1000C, tms1000c_cpu_device, "tms1000c", "Texas Instruments TMS1000C") // 28-pin SDIP, 10 R pins -tms1000c_cpu_device::tms1000c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1000c_cpu_device::tms1000c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1000_cpu_device(mconfig, TMS1000C, tag, owner, clock, 8 /* o pins */, 10 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 2 /* x width */, 3 /* stack levels */, 10 /* rom width */, address_map_constructor(FUNC(tms1000c_cpu_device::rom_10bit), this), 6 /* ram width */, address_map_constructor(FUNC(tms1000c_cpu_device::ram_6bit), this)) { } diff --git a/src/devices/cpu/tms1000/tms1000c.h b/src/devices/cpu/tms1000/tms1000c.h index bf165550045..600b57bb79e 100644 --- a/src/devices/cpu/tms1000/tms1000c.h +++ b/src/devices/cpu/tms1000/tms1000c.h @@ -17,7 +17,7 @@ class tms1000c_cpu_device : public tms1000_cpu_device { public: - tms1000c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1000c_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // overrides diff --git a/src/devices/cpu/tms1000/tms1100.cpp b/src/devices/cpu/tms1000/tms1100.cpp index 7af1237a5ad..9a799749a33 100644 --- a/src/devices/cpu/tms1000/tms1100.cpp +++ b/src/devices/cpu/tms1000/tms1100.cpp @@ -23,23 +23,23 @@ DEFINE_DEVICE_TYPE(TMS1300, tms1300_cpu_device, "tms1300", "Texas Instruments TM DEFINE_DEVICE_TYPE(TMS1370, tms1370_cpu_device, "tms1370", "Texas Instruments TMS1370") // high voltage version, also seen in 28-pin package(some O/R pins unavailable) -tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1100_cpu_device(mconfig, TMS1100, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 1 /* stack levels */, 11 /* rom width */, address_map_constructor(FUNC(tms1100_cpu_device::rom_11bit), this), 7 /* ram width */, address_map_constructor(FUNC(tms1100_cpu_device::ram_7bit), this)) { } -tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms1100_cpu_device::tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms1000_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1170_cpu_device::tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1100_cpu_device(mconfig, TMS1170, tag, owner, clock, 8, 11, 6, 8, 3, 1, 11, address_map_constructor(FUNC(tms1170_cpu_device::rom_11bit), this), 7, address_map_constructor(FUNC(tms1170_cpu_device::ram_7bit), this)) { } -tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1300_cpu_device::tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1100_cpu_device(mconfig, TMS1300, tag, owner, clock, 8, 16, 6, 8, 3, 1, 11, address_map_constructor(FUNC(tms1300_cpu_device::rom_11bit), this), 7, address_map_constructor(FUNC(tms1300_cpu_device::ram_7bit), this)) { } -tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1370_cpu_device::tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1100_cpu_device(mconfig, TMS1370, tag, owner, clock, 8, 16, 6, 8, 3, 1, 11, address_map_constructor(FUNC(tms1370_cpu_device::rom_11bit), this), 7, address_map_constructor(FUNC(tms1370_cpu_device::ram_7bit), this)) { } diff --git a/src/devices/cpu/tms1000/tms1100.h b/src/devices/cpu/tms1000/tms1100.h index 4121a25f64e..812e670ad54 100644 --- a/src/devices/cpu/tms1000/tms1100.h +++ b/src/devices/cpu/tms1000/tms1100.h @@ -63,10 +63,10 @@ class tms1100_cpu_device : public tms1000_cpu_device { public: - tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms1100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); // overrides virtual void device_start() override; @@ -81,19 +81,19 @@ protected: class tms1170_cpu_device : public tms1100_cpu_device { public: - tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms1300_cpu_device : public tms1100_cpu_device { public: - tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms1370_cpu_device : public tms1100_cpu_device { public: - tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms1000/tms1400.cpp b/src/devices/cpu/tms1000/tms1400.cpp index 64eb906a2d1..f11f4567371 100644 --- a/src/devices/cpu/tms1000/tms1400.cpp +++ b/src/devices/cpu/tms1000/tms1400.cpp @@ -33,37 +33,37 @@ DEFINE_DEVICE_TYPE(TMS1600, tms1600_cpu_device, "tms1600", "Texas Instruments TM DEFINE_DEVICE_TYPE(TMS1670, tms1670_cpu_device, "tms1670", "Texas Instruments TMS1670") // high voltage version -tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1400_cpu_device(mconfig, TMS1400, tag, owner, clock, 8 /* o pins */, 11 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 3 /* stack levels */, 12 /* rom width */, address_map_constructor(FUNC(tms1400_cpu_device::rom_12bit), this), 7 /* ram width */, address_map_constructor(FUNC(tms1400_cpu_device::ram_7bit), this)) { } -tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms1400_cpu_device::tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms1100_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1470_cpu_device(mconfig, TMS1470, tag, owner, clock, 8, 10, 6, 8, 3, 3, 12, address_map_constructor(FUNC(tms1470_cpu_device::rom_12bit), this), 7, address_map_constructor(FUNC(tms1470_cpu_device::ram_7bit), this)) { } -tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms1400_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms1475_cpu_device::tms1475_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1475_cpu_device::tms1475_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1470_cpu_device(mconfig, TMS1475, tag, owner, clock, 8, 22, 6, 8, 3, 3, 12, address_map_constructor(FUNC(tms1475_cpu_device::rom_12bit), this), 7, address_map_constructor(FUNC(tms1475_cpu_device::ram_7bit), this)) { } -tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1600_cpu_device(mconfig, TMS1600, tag, owner, clock, 8, 16, 6, 8, 3, 3, 12, address_map_constructor(FUNC(tms1600_cpu_device::rom_12bit), this), 7, address_map_constructor(FUNC(tms1600_cpu_device::ram_7bit), this)) { } -tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms1400_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1600_cpu_device(mconfig, TMS1670, tag, owner, clock, 8, 16, 6, 8, 3, 3, 12, address_map_constructor(FUNC(tms1670_cpu_device::rom_12bit), this), 7, address_map_constructor(FUNC(tms1670_cpu_device::ram_7bit), this)) { } diff --git a/src/devices/cpu/tms1000/tms1400.h b/src/devices/cpu/tms1000/tms1400.h index acac9ea4ca1..b69b48ca5a5 100644 --- a/src/devices/cpu/tms1000/tms1400.h +++ b/src/devices/cpu/tms1000/tms1400.h @@ -41,10 +41,10 @@ class tms1400_cpu_device : public tms1100_cpu_device { public: - tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms1400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); // overrides virtual void device_reset() override; @@ -59,16 +59,16 @@ protected: class tms1470_cpu_device : public tms1400_cpu_device { public: - tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms1470_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms1470_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); }; class tms1475_cpu_device : public tms1470_cpu_device { public: - tms1475_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1475_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void op_setr() override { tms1100_cpu_device::op_setr(); } @@ -78,16 +78,16 @@ protected: class tms1600_cpu_device : public tms1400_cpu_device { public: - tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); }; class tms1670_cpu_device : public tms1600_cpu_device { public: - tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms1000/tms1k_base.cpp b/src/devices/cpu/tms1000/tms1k_base.cpp index 8034c2c7b4c..729e8274476 100644 --- a/src/devices/cpu/tms1000/tms1k_base.cpp +++ b/src/devices/cpu/tms1000/tms1k_base.cpp @@ -71,7 +71,7 @@ unknown cycle: CME, SSE, SSS #include "emu.h" #include "tms1k_base.h" -tms1k_base_device::tms1k_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms1k_base_device::tms1k_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, byte_bits > 8 ? 16 : 8, rom_width, byte_bits > 8 ? -1 : 0, rom_map), m_data_config("data", ENDIANNESS_BIG, 8, ram_width, 0, ram_map), diff --git a/src/devices/cpu/tms1000/tms1k_base.h b/src/devices/cpu/tms1000/tms1k_base.h index 136a54e61c7..a65caa0b3ca 100644 --- a/src/devices/cpu/tms1000/tms1k_base.h +++ b/src/devices/cpu/tms1000/tms1k_base.h @@ -52,7 +52,7 @@ public: protected: // construction/destruction - tms1k_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms1k_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/tms1000/tms2100.cpp b/src/devices/cpu/tms1000/tms2100.cpp index b469e7c7b08..06ec33fd97d 100644 --- a/src/devices/cpu/tms1000/tms2100.cpp +++ b/src/devices/cpu/tms1000/tms2100.cpp @@ -40,27 +40,27 @@ DEFINE_DEVICE_TYPE(TMS2300, tms2300_cpu_device, "tms2300", "Texas Instruments TM DEFINE_DEVICE_TYPE(TMS2370, tms2370_cpu_device, "tms2370", "Texas Instruments TMS2370") // high voltage version, 1 R pin removed for Vpp -tms2100_cpu_device::tms2100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2100_cpu_device::tms2100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2100_cpu_device(mconfig, TMS2100, tag, owner, clock, 8 /* o pins */, 7 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 3 /* x width */, 4 /* stack levels */, 11 /* rom width */, address_map_constructor(FUNC(tms2100_cpu_device::rom_11bit), this), 7 /* ram width */, address_map_constructor(FUNC(tms2100_cpu_device::ram_7bit), this)) { } -tms2100_cpu_device::tms2100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms2100_cpu_device::tms2100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms1100_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms2170_cpu_device::tms2170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2170_cpu_device::tms2170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2100_cpu_device(mconfig, TMS2170, tag, owner, clock, 8, 6, 6, 8, 3, 4, 11, address_map_constructor(FUNC(tms2170_cpu_device::rom_11bit), this), 7, address_map_constructor(FUNC(tms2170_cpu_device::ram_7bit), this)) { } -tms2300_cpu_device::tms2300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2300_cpu_device::tms2300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2300_cpu_device(mconfig, TMS2300, tag, owner, clock, 8, 15, 6, 8, 3, 4, 11, address_map_constructor(FUNC(tms2300_cpu_device::rom_11bit), this), 7, address_map_constructor(FUNC(tms2300_cpu_device::ram_7bit), this)) { } -tms2300_cpu_device::tms2300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms2300_cpu_device::tms2300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms2100_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms2370_cpu_device::tms2370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2370_cpu_device::tms2370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2300_cpu_device(mconfig, TMS2370, tag, owner, clock, 8, 14, 6, 8, 3, 4, 11, address_map_constructor(FUNC(tms2370_cpu_device::rom_11bit), this), 7, address_map_constructor(FUNC(tms2370_cpu_device::ram_7bit), this)) { } diff --git a/src/devices/cpu/tms1000/tms2100.h b/src/devices/cpu/tms1000/tms2100.h index 7f6c6ab340b..a6dbf3eb0b0 100644 --- a/src/devices/cpu/tms1000/tms2100.h +++ b/src/devices/cpu/tms1000/tms2100.h @@ -69,10 +69,10 @@ enum class tms2100_cpu_device : public tms1100_cpu_device { public: - tms2100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2100_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms2100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms2100_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); // overrides virtual void device_start() override; @@ -131,22 +131,22 @@ protected: class tms2170_cpu_device : public tms2100_cpu_device { public: - tms2170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2170_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms2300_cpu_device : public tms2100_cpu_device { public: - tms2300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2300_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms2300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms2300_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); }; class tms2370_cpu_device : public tms2300_cpu_device { public: - tms2370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2370_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms1000/tms2400.cpp b/src/devices/cpu/tms1000/tms2400.cpp index 289e4f94692..f5454923f94 100644 --- a/src/devices/cpu/tms1000/tms2400.cpp +++ b/src/devices/cpu/tms1000/tms2400.cpp @@ -20,27 +20,27 @@ DEFINE_DEVICE_TYPE(TMS2600, tms2600_cpu_device, "tms2600", "Texas Instruments TM DEFINE_DEVICE_TYPE(TMS2670, tms2670_cpu_device, "tms2670", "Texas Instruments TMS2670") // high voltage version, 1 R pin removed for Vpp -tms2400_cpu_device::tms2400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2400_cpu_device::tms2400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2400_cpu_device(mconfig, TMS2400, tag, owner, clock, 8 /* o pins */, 7 /* r pins */, 6 /* pc bits */, 8 /* byte width */, 4 /* x width */, 4 /* stack levels */, 12 /* rom width */, address_map_constructor(FUNC(tms2400_cpu_device::rom_12bit), this), 8 /* ram width */, address_map_constructor(FUNC(tms2400_cpu_device::ram_8bit), this)) { } -tms2400_cpu_device::tms2400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms2400_cpu_device::tms2400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms2100_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms2470_cpu_device::tms2470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2470_cpu_device::tms2470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2400_cpu_device(mconfig, TMS2470, tag, owner, clock, 8, 6, 6, 8, 4, 4, 12, address_map_constructor(FUNC(tms2470_cpu_device::rom_12bit), this), 8, address_map_constructor(FUNC(tms2470_cpu_device::ram_8bit), this)) { } -tms2600_cpu_device::tms2600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2600_cpu_device::tms2600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2600_cpu_device(mconfig, TMS2600, tag, owner, clock, 8, 15, 6, 8, 4, 4, 12, address_map_constructor(FUNC(tms2600_cpu_device::rom_12bit), this), 8, address_map_constructor(FUNC(tms2600_cpu_device::ram_8bit), this)) { } -tms2600_cpu_device::tms2600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : +tms2600_cpu_device::tms2600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map) : tms2400_cpu_device(mconfig, type, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, stack_levels, rom_width, rom_map, ram_width, ram_map) { } -tms2670_cpu_device::tms2670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tms2670_cpu_device::tms2670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms2600_cpu_device(mconfig, TMS2670, tag, owner, clock, 8, 14, 6, 8, 4, 4, 12, address_map_constructor(FUNC(tms2670_cpu_device::rom_12bit), this), 8, address_map_constructor(FUNC(tms2670_cpu_device::ram_8bit), this)) { } diff --git a/src/devices/cpu/tms1000/tms2400.h b/src/devices/cpu/tms1000/tms2400.h index 25692d3207e..b002bd9cefb 100644 --- a/src/devices/cpu/tms1000/tms2400.h +++ b/src/devices/cpu/tms1000/tms2400.h @@ -17,10 +17,10 @@ class tms2400_cpu_device : public tms2100_cpu_device { public: - tms2400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2400_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms2400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms2400_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); // overrides virtual void device_reset() override; @@ -34,22 +34,22 @@ protected: class tms2470_cpu_device : public tms2400_cpu_device { public: - tms2470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2470_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms2600_cpu_device : public tms2400_cpu_device { public: - tms2600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms2600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); + tms2600_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 o_pins, u8 r_pins, u8 pc_bits, u8 byte_bits, u8 x_bits, u8 stack_levels, int rom_width, address_map_constructor rom_map, int ram_width, address_map_constructor ram_map); }; class tms2670_cpu_device : public tms2600_cpu_device { public: - tms2670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms2670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms1000/tp0320.cpp b/src/devices/cpu/tms1000/tp0320.cpp index 54eb8c368b5..72fd062ca17 100644 --- a/src/devices/cpu/tms1000/tp0320.cpp +++ b/src/devices/cpu/tms1000/tp0320.cpp @@ -28,7 +28,7 @@ TODO: DEFINE_DEVICE_TYPE(TP0320, tp0320_cpu_device, "tp0320", "Texas Instruments TP0320") // 28-pin SDIP, .. -tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tp0320_cpu_device::tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms0980_cpu_device(mconfig, TP0320, tag, owner, clock, 7 /* o pins */, 10 /* r pins */, 7 /* pc bits */, 9 /* byte width */, 4 /* x width */, 1 /* stack levels */, 11 /* rom width */, address_map_constructor(FUNC(tp0320_cpu_device::rom_11bit), this), 8 /* ram width */, address_map_constructor(FUNC(tp0320_cpu_device::ram_192x4), this)) { } diff --git a/src/devices/cpu/tms1000/tp0320.h b/src/devices/cpu/tms1000/tp0320.h index 710dfb5b787..922245853f5 100644 --- a/src/devices/cpu/tms1000/tp0320.h +++ b/src/devices/cpu/tms1000/tp0320.h @@ -17,7 +17,7 @@ class tp0320_cpu_device : public tms0980_cpu_device { public: - tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tp0320_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void ram_192x4(address_map &map); diff --git a/src/devices/cpu/tms32010/tms32010.cpp b/src/devices/cpu/tms32010/tms32010.cpp index 7a9fb58b54c..086c2cca029 100644 --- a/src/devices/cpu/tms32010/tms32010.cpp +++ b/src/devices/cpu/tms32010/tms32010.cpp @@ -99,13 +99,13 @@ void tms32010_device::tms32015_ram(address_map &map) } -tms32010_device::tms32010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32010_device::tms32010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32010_device(mconfig, TMS32010, tag, owner, clock, address_map_constructor(FUNC(tms32010_device::tms32010_ram), this), 0x0fff) { } -tms32010_device::tms32010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor data_map, int addr_mask) +tms32010_device::tms32010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor data_map, int addr_mask) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 12, -1) , m_data_config("data", ENDIANNESS_BIG, 16, 8, -1, data_map) @@ -116,13 +116,13 @@ tms32010_device::tms32010_device(const machine_config &mconfig, device_type type } -tms32015_device::tms32015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32015_device::tms32015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32010_device(mconfig, TMS32015, tag, owner, clock, address_map_constructor(FUNC(tms32015_device::tms32015_ram), this), 0x0fff) { } -tms32016_device::tms32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32016_device::tms32016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32010_device(mconfig, TMS32016, tag, owner, clock, address_map_constructor(FUNC(tms32016_device::tms32015_ram), this), 0xffff) { } diff --git a/src/devices/cpu/tms32010/tms32010.h b/src/devices/cpu/tms32010/tms32010.h index beebee1b0b0..70ea8534d15 100644 --- a/src/devices/cpu/tms32010/tms32010.h +++ b/src/devices/cpu/tms32010/tms32010.h @@ -35,7 +35,7 @@ class tms32010_device : public cpu_device { public: // construction/destruction - tms32010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto bio() { return m_bio_in.bind(); } @@ -43,7 +43,7 @@ public: void tms32010_ram(address_map &map); void tms32015_ram(address_map &map); protected: - tms32010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor data_map, int addr_mask); + tms32010_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor data_map, int addr_mask); // device-level overrides virtual void device_start() override; @@ -191,7 +191,7 @@ class tms32015_device : public tms32010_device { public: // construction/destruction - tms32015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -199,7 +199,7 @@ class tms32016_device : public tms32010_device { public: // construction/destruction - tms32016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp index 304280555a1..a0c08118878 100644 --- a/src/devices/cpu/tms32025/tms32025.cpp +++ b/src/devices/cpu/tms32025/tms32025.cpp @@ -240,7 +240,7 @@ const tiny_rom_entry *tms32025_device::device_rom_region() const } -tms32025_device::tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor prgmap, address_map_constructor datamap) +tms32025_device::tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor prgmap, address_map_constructor datamap) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, 16, -1, prgmap) , m_data_config("data", ENDIANNESS_BIG, 16, 16, -1, datamap) @@ -259,19 +259,19 @@ tms32025_device::tms32025_device(const machine_config &mconfig, device_type type { } -tms32025_device::tms32025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32025_device::tms32025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32025_device(mconfig, TMS32025, tag, owner, clock, address_map_constructor(), address_map_constructor(FUNC(tms32025_device::tms32025_data), this)) { m_fixed_STR1 = 0x0180; } -tms32025_device::tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tms32025_device::tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : tms32025_device(mconfig, type, tag, owner, clock, address_map_constructor(), address_map_constructor(FUNC(tms32025_device::tms32025_data), this)) { m_fixed_STR1 = 0x0180; } -tms32026_device::tms32026_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32026_device::tms32026_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32025_device(mconfig, TMS32026, tag, owner, clock, address_map_constructor(), address_map_constructor(FUNC(tms32026_device::tms32026_data), this)) { m_fixed_STR1 = 0x0100; diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h index de8b4442c08..0f5fb689706 100644 --- a/src/devices/cpu/tms32025/tms32025.h +++ b/src/devices/cpu/tms32025/tms32025.h @@ -62,8 +62,8 @@ class tms32025_device : public cpu_device { public: // construction/destruction - tms32025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tms32025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto bio_in_cb() { return m_bio_in.bind(); } @@ -79,7 +79,7 @@ public: void tms32025_data(address_map &map); void tms32026_data(address_map &map); protected: - tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor prgmap, address_map_constructor datamap); + tms32025_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor prgmap, address_map_constructor datamap); // device-level overrides virtual void device_start() override; @@ -368,7 +368,7 @@ class tms32026_device : public tms32025_device { public: // construction/destruction - tms32026_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32026_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp index f4516f27788..41c3792602e 100644 --- a/src/devices/cpu/tms32031/tms32031.cpp +++ b/src/devices/cpu/tms32031/tms32031.cpp @@ -406,7 +406,7 @@ void tms3203x_device::tmsreg::from_double(double val) // tms3203x_device - constructor //------------------------------------------------- -tms3203x_device::tms3203x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t chiptype, int clock_per_inst, address_map_constructor internal_map) +tms3203x_device::tms3203x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t chiptype, int clock_per_inst, address_map_constructor internal_map) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 32, 24, -2, internal_map), m_chip_type(chiptype), @@ -438,22 +438,22 @@ tms3203x_device::tms3203x_device(const machine_config &mconfig, device_type type #endif } -tms32030_device::tms32030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32030_device::tms32030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms3203x_device(mconfig, TMS32030, tag, owner, clock, CHIP_TYPE_TMS32030, 2, address_map_constructor(FUNC(tms32030_device::internal_32030), this)) { } -tms32031_device::tms32031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32031_device::tms32031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms3203x_device(mconfig, TMS32031, tag, owner, clock, CHIP_TYPE_TMS32031, 2, address_map_constructor(FUNC(tms32031_device::internal_32031), this)) { } -tms32032_device::tms32032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32032_device::tms32032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms3203x_device(mconfig, TMS32032, tag, owner, clock, CHIP_TYPE_TMS32032, 2, address_map_constructor(FUNC(tms32032_device::internal_32032), this)) { } -tms32033_device::tms32033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32033_device::tms32033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms3203x_device(mconfig, TMS32033, tag, owner, clock, CHIP_TYPE_TMS32031, 1, address_map_constructor(FUNC(tms32033_device::internal_32033), this)) { } diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h index 975a8d1cb32..f4193e2cf93 100644 --- a/src/devices/cpu/tms32031/tms32031.h +++ b/src/devices/cpu/tms32031/tms32031.h @@ -143,7 +143,7 @@ protected: }; // construction/destruction - tms3203x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t chiptype, int clock_per_inst, address_map_constructor internal_map); + tms3203x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t chiptype, int clock_per_inst, address_map_constructor internal_map); void common_3203x(address_map &map); // device-level overrides @@ -803,7 +803,7 @@ class tms32030_device : public tms3203x_device { public: // construction/destruction - tms32030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void internal_32030(address_map &map); }; @@ -814,7 +814,7 @@ class tms32031_device : public tms3203x_device { public: // construction/destruction - tms32031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void internal_32031(address_map &map); }; @@ -825,7 +825,7 @@ class tms32032_device : public tms3203x_device { public: // construction/destruction - tms32032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void internal_32032(address_map &map); }; @@ -836,7 +836,7 @@ class tms32033_device : public tms3203x_device { public: // construction/destruction - tms32033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void internal_32033(address_map &map); }; diff --git a/src/devices/cpu/tms32051/tms32051.cpp b/src/devices/cpu/tms32051/tms32051.cpp index d03493df60f..590a952c842 100644 --- a/src/devices/cpu/tms32051/tms32051.cpp +++ b/src/devices/cpu/tms32051/tms32051.cpp @@ -71,7 +71,7 @@ void tms32051_device::tms32051_internal_data(address_map &map) } -tms32051_device::tms32051_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_pgm, address_map_constructor internal_data) +tms32051_device::tms32051_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_pgm, address_map_constructor internal_data) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, -1, internal_pgm) , m_data_config("data", ENDIANNESS_LITTLE, 16, 16, -1, internal_data) @@ -79,7 +79,7 @@ tms32051_device::tms32051_device(const machine_config &mconfig, device_type type { } -tms32051_device::tms32051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32051_device::tms32051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32051_device(mconfig, TMS32051, tag, owner, clock, address_map_constructor(FUNC(tms32051_device::tms32051_internal_pgm), this), address_map_constructor(FUNC(tms32051_device::tms32051_internal_data), this)) { } @@ -115,7 +115,7 @@ void tms32053_device::tms32053_internal_data(address_map &map) } -tms32053_device::tms32053_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32053_device::tms32053_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32051_device(mconfig, TMS32053, tag, owner, clock, address_map_constructor(FUNC(tms32053_device::tms32053_internal_pgm), this), address_map_constructor(FUNC(tms32053_device::tms32053_internal_data), this)) { } diff --git a/src/devices/cpu/tms32051/tms32051.h b/src/devices/cpu/tms32051/tms32051.h index 63552d7e605..abcb8f64626 100644 --- a/src/devices/cpu/tms32051/tms32051.h +++ b/src/devices/cpu/tms32051/tms32051.h @@ -57,7 +57,7 @@ class tms32051_device : public cpu_device { public: // construction/destruction - tms32051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t cpuregs_r(offs_t offset); void cpuregs_w(offs_t offset, uint16_t data); @@ -65,7 +65,7 @@ public: void tms32051_internal_data(address_map &map); void tms32051_internal_pgm(address_map &map); protected: - tms32051_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_pgm, address_map_constructor internal_data); + tms32051_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_pgm, address_map_constructor internal_data); // device-level overrides virtual void device_start() override; @@ -373,7 +373,7 @@ class tms32053_device : public tms32051_device { public: // construction/destruction - tms32053_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32053_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void tms32053_internal_data(address_map &map); void tms32053_internal_pgm(address_map &map); diff --git a/src/devices/cpu/tms32082/tms32082.cpp b/src/devices/cpu/tms32082/tms32082.cpp index 7b1486470c0..16655f93472 100644 --- a/src/devices/cpu/tms32082/tms32082.cpp +++ b/src/devices/cpu/tms32082/tms32082.cpp @@ -43,7 +43,7 @@ const uint32_t tms32082_mp_device::SHIFT_MASK[] = -tms32082_mp_device::tms32082_mp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32082_mp_device::tms32082_mp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, TMS32082_MP, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor(FUNC(tms32082_mp_device::mp_internal_map), this)) , m_cmd_callback(*this) @@ -528,7 +528,7 @@ void tms32082_pp_device::pp_internal_map(address_map &map) map(0x01001000, 0x01001fff).ram().share("pp1_param"); } -tms32082_pp_device::tms32082_pp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms32082_pp_device::tms32082_pp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, TMS32082_PP, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, 32, 0, address_map_constructor(FUNC(tms32082_pp_device::pp_internal_map), this)) { diff --git a/src/devices/cpu/tms32082/tms32082.h b/src/devices/cpu/tms32082/tms32082.h index 415ce95d564..7bc54639cbf 100644 --- a/src/devices/cpu/tms32082/tms32082.h +++ b/src/devices/cpu/tms32082/tms32082.h @@ -10,7 +10,7 @@ class tms32082_mp_device : public cpu_device { public: // construction/destruction - tms32082_mp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32082_mp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { @@ -157,7 +157,7 @@ class tms32082_pp_device : public cpu_device { public: // construction/destruction - tms32082_pp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms32082_pp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp index 729b6ed0bf6..8b3883db3e8 100644 --- a/src/devices/cpu/tms34010/tms34010.cpp +++ b/src/devices/cpu/tms34010/tms34010.cpp @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(TMS34020, tms34020_device, "tms34020", "Texas Instruments TMS GLOBAL VARIABLES ***************************************************************************/ -tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_regs_map, bool is_34020) +tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_regs_map, bool is_34020) : cpu_device(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , m_program_config("program", ENDIANNESS_LITTLE, is_34020 ? 32 : 16, 32, 3, internal_regs_map) @@ -95,13 +95,13 @@ tms340x0_device::tms340x0_device(const machine_config &mconfig, device_type type } -tms34010_device::tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms34010_device::tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms340x0_device(mconfig, TMS34010, tag, owner, clock, address_map_constructor(FUNC(tms34010_device::internal_regs_map), this), false) { } -tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms340x0_device(mconfig, TMS34020, tag, owner, clock, address_map_constructor(FUNC(tms34020_device::internal_regs_map), this), true) { } diff --git a/src/devices/cpu/tms34010/tms34010.h b/src/devices/cpu/tms34010/tms34010.h index b9165b17f77..f88f852a6d3 100644 --- a/src/devices/cpu/tms34010/tms34010.h +++ b/src/devices/cpu/tms34010/tms34010.h @@ -252,7 +252,7 @@ protected: }; // construction/destruction - tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_regs_map, bool is_34020); + tms340x0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_regs_map, bool is_34020); // device-level overrides virtual void device_start() override; @@ -958,7 +958,7 @@ protected: class tms34010_device : public tms340x0_device { public: - tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms34010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* Reads & writes to the 34010 I/O registers; place at 0xc0000000 */ virtual void io_register_w(offs_t offset, u16 data, u16 mem_mask = ~u16(0)) override; @@ -998,7 +998,7 @@ DECLARE_DEVICE_TYPE(TMS34010, tms34010_device) class tms34020_device : public tms340x0_device { public: - tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms34020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* Reads & writes to the 34020 I/O registers; place at 0xc0000000 */ virtual void io_register_w(offs_t offset, u16 data, u16 mem_mask = ~u16(0)) override; diff --git a/src/devices/cpu/tms57002/tms57002.cpp b/src/devices/cpu/tms57002/tms57002.cpp index e137a6b2efd..d3d091753b6 100644 --- a/src/devices/cpu/tms57002/tms57002.cpp +++ b/src/devices/cpu/tms57002/tms57002.cpp @@ -20,7 +20,7 @@ void tms57002_device::internal_pgm(address_map &map) map(0x00, 0xff).ram(); } -tms57002_device::tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms57002_device::tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, TMS57002, tag, owner, clock) , device_sound_interface(mconfig, *this) , macc(0), macc_read(0), macc_write(0), st0(0), st1(0), sti(0), txrd(0) diff --git a/src/devices/cpu/tms57002/tms57002.h b/src/devices/cpu/tms57002/tms57002.h index 12bcd732120..03b2fecd0bc 100644 --- a/src/devices/cpu/tms57002/tms57002.h +++ b/src/devices/cpu/tms57002/tms57002.h @@ -15,7 +15,7 @@ class tms57002_device : public cpu_device, public device_sound_interface { public: - tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms57002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto dready_callback() { return m_dready_callback.bind(); } auto pc0_callback() { return m_pc0_callback.bind(); } diff --git a/src/devices/cpu/tms7000/tms7000.cpp b/src/devices/cpu/tms7000/tms7000.cpp index 3ce6f001ca2..57e88914f61 100644 --- a/src/devices/cpu/tms7000/tms7000.cpp +++ b/src/devices/cpu/tms7000/tms7000.cpp @@ -111,12 +111,12 @@ void tms70c46_device::tms70c46_mem(address_map &map) // device definitions -tms7000_device::tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7000_device::tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7000, tag, owner, clock, address_map_constructor(FUNC(tms7000_device::tms7000_mem), this), 0) { } -tms7000_device::tms7000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal, uint32_t info_flags) : +tms7000_device::tms7000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal, uint32_t info_flags) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, internal), m_port_in_cb(*this), @@ -126,57 +126,57 @@ tms7000_device::tms7000_device(const machine_config &mconfig, device_type type, { } -tms7020_device::tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7020_device::tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7020, tag, owner, clock, address_map_constructor(FUNC(tms7020_device::tms7020_mem), this), 0) { } -tms7020_exl_device::tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7020_exl_device::tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7020_EXL, tag, owner, clock, address_map_constructor(FUNC(tms7020_exl_device::tms7020_mem), this), 0) { } -tms7040_device::tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7040_device::tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7040, tag, owner, clock, address_map_constructor(FUNC(tms7040_device::tms7040_mem), this), 0) { } -tms70c00_device::tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms70c00_device::tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS70C00, tag, owner, clock, address_map_constructor(FUNC(tms70c00_device::tms7000_mem), this), CHIP_IS_CMOS) { } -tms70c20_device::tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms70c20_device::tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS70C20, tag, owner, clock, address_map_constructor(FUNC(tms70c20_device::tms7020_mem), this), CHIP_IS_CMOS) { } -tms70c40_device::tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms70c40_device::tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS70C40, tag, owner, clock, address_map_constructor(FUNC(tms70c40_device::tms7040_mem), this), CHIP_IS_CMOS) { } -tms7001_device::tms7001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7001_device::tms7001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7001, tag, owner, clock, address_map_constructor(FUNC(tms7001_device::tms7001_mem), this), CHIP_FAMILY_70X2) { } -tms7041_device::tms7041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7041_device::tms7041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7041, tag, owner, clock, address_map_constructor(FUNC(tms7041_device::tms7041_mem), this), CHIP_FAMILY_70X2) { } -tms7002_device::tms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7002_device::tms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7002, tag, owner, clock, address_map_constructor(FUNC(tms7002_device::tms7002_mem), this), CHIP_FAMILY_70X2) { } -tms7042_device::tms7042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms7042_device::tms7042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS7042, tag, owner, clock, address_map_constructor(FUNC(tms7042_device::tms7042_mem), this), CHIP_FAMILY_70X2) { } -tms70c46_device::tms70c46_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms70c46_device::tms70c46_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms7000_device(mconfig, TMS70C46, tag, owner, clock, address_map_constructor(FUNC(tms70c46_device::tms70c46_mem), this), CHIP_IS_CMOS) { } diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h index 8d623f5c725..29d93839363 100644 --- a/src/devices/cpu/tms7000/tms7000.h +++ b/src/devices/cpu/tms7000/tms7000.h @@ -25,7 +25,7 @@ class tms7000_device : public cpu_device { public: // construction/destruction - tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read-only on 70x0 auto in_porta() { return m_port_in_cb[0].bind(); } @@ -75,7 +75,7 @@ protected: static constexpr uint32_t CHIP_FAMILY_70CX2 = 0x04; static constexpr uint32_t CHIP_FAMILY_MASK = 0x06; - tms7000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal, uint32_t info_flags); + tms7000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal, uint32_t info_flags); // device-level overrides virtual void device_start() override; @@ -275,14 +275,14 @@ protected: class tms7020_device : public tms7000_device { public: - tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms7020_exl_device : public tms7000_device { public: - tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void execute_one(uint8_t op) override; @@ -295,35 +295,35 @@ private: class tms7040_device : public tms7000_device { public: - tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms70c00_device : public tms7000_device { public: - tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms70c20_device : public tms7000_device { public: - tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms70c40_device : public tms7000_device { public: - tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms70c46_device : public tms7000_device { public: - tms70c46_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms70c46_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t control_r(); void control_w(uint8_t data); @@ -351,28 +351,28 @@ private: class tms7001_device : public tms7000_device { public: - tms7001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms7041_device : public tms7000_device { public: - tms7041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms7002_device : public tms7000_device { public: - tms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms7042_device : public tms7000_device { public: - tms7042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms7042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms9900/ti990_10.cpp b/src/devices/cpu/tms9900/ti990_10.cpp index 99cf65dfb0b..18ac7da0b32 100644 --- a/src/devices/cpu/tms9900/ti990_10.cpp +++ b/src/devices/cpu/tms9900/ti990_10.cpp @@ -43,7 +43,7 @@ twice their number. Accordingly, the TMS9900 has a CRU bitmask 0x0fff. ****************************************************************************/ -ti990_10_device::ti990_10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ti990_10_device::ti990_10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, TI990_10, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, 16, 21), m_io_config("cru", ENDIANNESS_BIG, 8, 12), diff --git a/src/devices/cpu/tms9900/ti990_10.h b/src/devices/cpu/tms9900/ti990_10.h index 93d3ecec4a0..3f0587af544 100644 --- a/src/devices/cpu/tms9900/ti990_10.h +++ b/src/devices/cpu/tms9900/ti990_10.h @@ -16,7 +16,7 @@ class ti990_10_device : public cpu_device { public: - ti990_10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ti990_10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~ti990_10_device(); protected: diff --git a/src/devices/cpu/tms9900/tms9900.cpp b/src/devices/cpu/tms9900/tms9900.cpp index 6f9ef5f7926..eeeb15150a4 100644 --- a/src/devices/cpu/tms9900/tms9900.cpp +++ b/src/devices/cpu/tms9900/tms9900.cpp @@ -156,7 +156,7 @@ enum twice their number. Accordingly, the TMS9900 has a CRU bitmask 0x0fff. ****************************************************************************/ -tms99xx_device::tms99xx_device(const machine_config &mconfig, device_type type, const char *tag, int data_width, int prg_addr_bits, int cru_addr_bits, device_t *owner, uint32_t clock) +tms99xx_device::tms99xx_device(const machine_config &mconfig, device_type type, const char *tag, int data_width, int prg_addr_bits, int cru_addr_bits, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, data_width, prg_addr_bits), m_setaddress_config("setaddress", ENDIANNESS_BIG, data_width, prg_addr_bits), // choose the same width as the program space @@ -185,7 +185,7 @@ tms99xx_device::~tms99xx_device() Constructor for TMS9900 ****************************************************************************/ -tms9900_device::tms9900_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9900_device::tms9900_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms99xx_device(mconfig, TMS9900, tag, 16, 16, 12, owner, clock) { } diff --git a/src/devices/cpu/tms9900/tms9900.h b/src/devices/cpu/tms9900/tms9900.h index 1be5e10f679..5d7e094d48d 100644 --- a/src/devices/cpu/tms9900/tms9900.h +++ b/src/devices/cpu/tms9900/tms9900.h @@ -64,7 +64,7 @@ public: protected: tms99xx_device(const machine_config &mconfig, device_type type, const char *tag, int data_width, int prg_addr_bits, int cru_addr_bits, - device_t *owner, uint32_t clock); + device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -386,7 +386,7 @@ private: class tms9900_device : public tms99xx_device { public: - tms9900_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9900_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/tms9900/tms9980a.cpp b/src/devices/cpu/tms9900/tms9980a.cpp index d30dda66ae2..91cb8750481 100644 --- a/src/devices/cpu/tms9900/tms9980a.cpp +++ b/src/devices/cpu/tms9900/tms9980a.cpp @@ -80,17 +80,17 @@ /**************************************************************************** Constructor ****************************************************************************/ -tms9980a_device::tms9980a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tms9980a_device::tms9980a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : tms99xx_device(mconfig, type, tag, 8, 14, 11, owner, clock) { } -tms9980a_device::tms9980a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9980a_device::tms9980a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9980a_device(mconfig, TMS9980A, tag, owner, clock) { } -tms9981_device::tms9981_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9981_device::tms9981_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9980a_device(mconfig, TMS9981, tag, owner, clock) { } diff --git a/src/devices/cpu/tms9900/tms9980a.h b/src/devices/cpu/tms9900/tms9980a.h index 9210007a5ec..88e35eb0693 100644 --- a/src/devices/cpu/tms9900/tms9980a.h +++ b/src/devices/cpu/tms9900/tms9980a.h @@ -26,10 +26,10 @@ enum class tms9980a_device : public tms99xx_device { public: - tms9980a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9980a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - tms9980a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tms9980a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void mem_read(void) override; void mem_write(void) override; @@ -58,7 +58,7 @@ protected: class tms9981_device : public tms9980a_device { public: - tms9981_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9981_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/cpu/tms9900/tms9995.cpp b/src/devices/cpu/tms9900/tms9995.cpp index c1b07bcbc70..103d78186a5 100644 --- a/src/devices/cpu/tms9900/tms9995.cpp +++ b/src/devices/cpu/tms9900/tms9995.cpp @@ -157,13 +157,13 @@ constexpr int tms9995_device::AS_SETADDRESS; Constructor ****************************************************************************/ -tms9995_device::tms9995_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9995_device::tms9995_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9995_device(mconfig, TMS9995, tag, owner, clock) { m_mp9537 = false; } -tms9995_device::tms9995_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tms9995_device::tms9995_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock), m_state_any(0), PC(0), diff --git a/src/devices/cpu/tms9900/tms9995.h b/src/devices/cpu/tms9900/tms9995.h index 8022ca74459..7eb767d4b4e 100644 --- a/src/devices/cpu/tms9900/tms9995.h +++ b/src/devices/cpu/tms9900/tms9995.h @@ -31,7 +31,7 @@ class tms9995_device : public cpu_device public: static constexpr int AS_SETADDRESS = 4; - tms9995_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9995_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // READY input line. When asserted (high), the memory is ready for data exchange. // We chose to use a direct method instead of a delegate to keep performance @@ -60,7 +60,7 @@ public: void set_overflow_interrupt( int enable ) { m_check_overflow = (enable!=0); } protected: - tms9995_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tms9995_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -410,7 +410,7 @@ private: class tms9995_mp9537_device : public tms9995_device { public: - tms9995_mp9537_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + tms9995_mp9537_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9995_device(mconfig, TMS9995_MP9537, tag, owner, clock) { m_mp9537 = true; diff --git a/src/devices/cpu/tx0/tx0.cpp b/src/devices/cpu/tx0/tx0.cpp index 2a7b0c3775b..7add2254e58 100644 --- a/src/devices/cpu/tx0/tx0.cpp +++ b/src/devices/cpu/tx0/tx0.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(TX0_8KW_OLD, tx0_8kwo_device, "tx0_8kwo_cpu", "MIT Lincoln La DEFINE_DEVICE_TYPE(TX0_64KW, tx0_64kw_device, "tx0_64kw_cpu", "MIT Lincoln Laboratory TX-0 64KW") -tx0_device::tx0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addr_bits, int address_mask, int ir_mask) +tx0_device::tx0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addr_bits, int address_mask, int ir_mask) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 32, addr_bits , -2), m_mbr(0), m_ac(0), m_mar(0), m_pc(0), m_ir(0), m_lr(0), m_xr(0), m_pf(0), m_tbr(0), m_tac(0), m_cm_sel(0) , m_lr_sel(0), m_gbl_cm_sel(0), m_stop_cyc0(0), m_stop_cyc1(0), m_run(0), m_rim(0), m_cycle(0), m_ioh(0), m_ios(0), m_rim_step(0) @@ -66,23 +66,23 @@ tx0_device::tx0_device(const machine_config &mconfig, device_type type, const ch m_program_config.m_is_octal = true; } -tx0_8kw_device::tx0_8kw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tx0_8kw_device::tx0_8kw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : tx0_device(mconfig, type, tag, owner, clock, 13, ADDRESS_MASK_8KW, 037) { } -tx0_8kw_device::tx0_8kw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx0_8kw_device::tx0_8kw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tx0_8kw_device(mconfig, TX0_8KW, tag, owner, clock) { } -tx0_8kwo_device::tx0_8kwo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx0_8kwo_device::tx0_8kwo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tx0_8kw_device(mconfig, TX0_8KW_OLD, tag, owner, clock) { } -tx0_64kw_device::tx0_64kw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx0_64kw_device::tx0_64kw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tx0_device(mconfig, TX0_64KW, tag, owner, clock, 16, ADDRESS_MASK_64KW, 03) { } diff --git a/src/devices/cpu/tx0/tx0.h b/src/devices/cpu/tx0/tx0.h index 8c57c08e8f7..0ff15127e44 100644 --- a/src/devices/cpu/tx0/tx0.h +++ b/src/devices/cpu/tx0/tx0.h @@ -41,7 +41,7 @@ public: protected: // construction/destruction - tx0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addr_bits, int address_mask, int ir_mask); + tx0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addr_bits, int address_mask, int ir_mask); // device-level overrides virtual void device_start() override; @@ -133,7 +133,7 @@ public: tx0_8kw_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); protected: - tx0_8kw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tx0_8kw_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void execute_run() override; virtual std::unique_ptr create_disassembler() override; diff --git a/src/devices/cpu/ucom4/ucom4.cpp b/src/devices/cpu/ucom4/ucom4.cpp index ade42ba1e12..45c9575cce1 100644 --- a/src/devices/cpu/ucom4/ucom4.cpp +++ b/src/devices/cpu/ucom4/ucom4.cpp @@ -64,7 +64,7 @@ void ucom4_cpu_device::data_96x4(address_map &map) // device definitions -ucom4_cpu_device::ucom4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int family, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) +ucom4_cpu_device::ucom4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int family, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, prgwidth, 0, program) , m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data) @@ -86,27 +86,27 @@ ucom4_cpu_device::ucom4_cpu_device(const machine_config &mconfig, device_type ty { } -upd546_cpu_device::upd546_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd546_cpu_device::upd546_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ucom4_cpu_device(mconfig, NEC_D546, tag, owner, clock, NEC_UCOM43, 3 /* stack levels */, 11 /* prg width */, address_map_constructor(FUNC(upd546_cpu_device::program_2k), this), 7 /* data width */, address_map_constructor(FUNC(upd546_cpu_device::data_96x4), this)) { } -upd553_cpu_device::upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd553_cpu_device::upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ucom4_cpu_device(mconfig, NEC_D553, tag, owner, clock, NEC_UCOM43, 3, 11, address_map_constructor(FUNC(upd553_cpu_device::program_2k), this), 7, address_map_constructor(FUNC(upd553_cpu_device::data_96x4), this)) { } -upd557l_cpu_device::upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd557l_cpu_device::upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ucom4_cpu_device(mconfig, NEC_D557L, tag, owner, clock, NEC_UCOM43, 3, 11, address_map_constructor(FUNC(upd557l_cpu_device::program_2k), this), 7, address_map_constructor(FUNC(upd557l_cpu_device::data_96x4), this)) { } -upd650_cpu_device::upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd650_cpu_device::upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ucom4_cpu_device(mconfig, NEC_D650, tag, owner, clock, NEC_UCOM43, 3, 11, address_map_constructor(FUNC(upd650_cpu_device::program_2k), this), 7, address_map_constructor(FUNC(upd650_cpu_device::data_96x4), this)) { } -upd552_cpu_device::upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd552_cpu_device::upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ucom4_cpu_device(mconfig, NEC_D552, tag, owner, clock, NEC_UCOM44, 1, 10, address_map_constructor(FUNC(upd552_cpu_device::program_1k), this), 6, address_map_constructor(FUNC(upd552_cpu_device::data_64x4), this)) { } diff --git a/src/devices/cpu/ucom4/ucom4.h b/src/devices/cpu/ucom4/ucom4.h index 29b766b5cd4..5111c8a0880 100644 --- a/src/devices/cpu/ucom4/ucom4.h +++ b/src/devices/cpu/ucom4/ucom4.h @@ -81,7 +81,7 @@ protected: }; // construction/destruction - ucom4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int family, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); + ucom4_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int family, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data); // device-level overrides virtual void device_start() override; @@ -269,21 +269,21 @@ protected: class upd546_cpu_device : public ucom4_cpu_device { public: - upd546_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd546_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class upd553_cpu_device : public ucom4_cpu_device { public: - upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class upd557l_cpu_device : public ucom4_cpu_device { public: - upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 input_r(int index) override; @@ -294,14 +294,14 @@ protected: class upd650_cpu_device : public ucom4_cpu_device { public: - upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class upd552_cpu_device : public ucom4_cpu_device { public: - upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd552_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp index f0c0b929454..76b871bfd40 100644 --- a/src/devices/cpu/unsp/unsp.cpp +++ b/src/devices/cpu/unsp/unsp.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(UNSP_20, unsp_20_device, "unsp_20", "SunPlus u'nSP (ISA 2.0)" /* size of the execution code cache */ #define CACHE_SIZE (64 * 1024 * 1024) -unsp_device::unsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal) +unsp_device::unsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal) : cpu_device(mconfig, type, tag, owner, clock) , m_core(nullptr) , m_program_config("program", ENDIANNESS_BIG, 16, 23, -1, internal) @@ -63,21 +63,21 @@ unsp_device::unsp_device(const machine_config &mconfig, device_type type, const m_numregs = 8; } -unsp_device::unsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +unsp_device::unsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : unsp_device(mconfig, UNSP, tag, owner, clock, address_map_constructor()) { m_iso = 10; m_numregs = 8; } -unsp_11_device::unsp_11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +unsp_11_device::unsp_11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : unsp_device(mconfig, UNSP_11, tag, owner, clock, address_map_constructor()) { m_iso = 11; m_numregs = 8; } -unsp_11_device::unsp_11_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal) +unsp_11_device::unsp_11_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal) : unsp_device(mconfig, type, tag, owner, clock, internal) { m_iso = 11; @@ -85,28 +85,28 @@ unsp_11_device::unsp_11_device(const machine_config &mconfig, device_type type, } -unsp_12_device::unsp_12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +unsp_12_device::unsp_12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : unsp_11_device(mconfig, UNSP_12, tag, owner, clock, address_map_constructor()) { m_iso = 12; m_numregs = 8; } -unsp_12_device::unsp_12_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal) +unsp_12_device::unsp_12_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal) : unsp_11_device(mconfig, type, tag, owner, clock, internal) { m_iso = 12; m_numregs = 8; } -unsp_20_device::unsp_20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +unsp_20_device::unsp_20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : unsp_12_device(mconfig, UNSP_20, tag, owner, clock, address_map_constructor()) { m_iso = 20; m_numregs = 16; } -unsp_20_device::unsp_20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal) +unsp_20_device::unsp_20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal) : unsp_12_device(mconfig, type, tag, owner, clock, internal) { m_iso = 20; diff --git a/src/devices/cpu/unsp/unsp.h b/src/devices/cpu/unsp/unsp.h index 010720adeec..6e6c6542be5 100644 --- a/src/devices/cpu/unsp/unsp.h +++ b/src/devices/cpu/unsp/unsp.h @@ -96,7 +96,7 @@ class unsp_device : public cpu_device public: // construction/destruction - unsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + unsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~unsp_device(); void set_vectorbase(uint16_t vector) { m_vectorbase = vector; } @@ -121,7 +121,7 @@ public: void cfunc_muls(); protected: - unsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal); + unsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal); // device-level overrides virtual void device_start() override; @@ -358,10 +358,10 @@ class unsp_11_device : public unsp_device { public: // construction/destruction - unsp_11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + unsp_11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - unsp_11_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal); + unsp_11_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal); private: }; @@ -370,10 +370,10 @@ class unsp_12_device : public unsp_11_device { public: // construction/destruction - unsp_12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + unsp_12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - unsp_12_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal); + unsp_12_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal); virtual void execute_fxxx_101_group(uint16_t op) override; virtual void execute_exxx_group(uint16_t op) override; @@ -387,10 +387,10 @@ class unsp_20_device : public unsp_12_device { public: // construction/destruction - unsp_20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + unsp_20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - unsp_20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal); + unsp_20_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal); virtual std::unique_ptr create_disassembler() override; virtual void execute_extended_group(uint16_t op) override; diff --git a/src/devices/cpu/upd7725/upd7725.cpp b/src/devices/cpu/upd7725/upd7725.cpp index 51c2faf3b6a..09bf25cc21b 100644 --- a/src/devices/cpu/upd7725/upd7725.cpp +++ b/src/devices/cpu/upd7725/upd7725.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(UPD7725, upd7725_device, "upd7725", "NEC uPD7725") DEFINE_DEVICE_TYPE(UPD96050, upd96050_device, "upd96050", "NEC uPD96050") -necdsp_device::necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t abits, uint32_t dbits) +necdsp_device::necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t abits, uint32_t dbits) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, 32, abits, -2), // data bus width, address bus width, -2 means DWORD-addressable m_data_config("data", ENDIANNESS_BIG, 16, dbits, -1), m_icount(0), // -1 for WORD-addressable @@ -45,12 +45,12 @@ necdsp_device::necdsp_device(const machine_config &mconfig, device_type type, co } -upd7725_device::upd7725_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7725_device::upd7725_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : necdsp_device(mconfig, UPD7725, tag, owner, clock, 11, 11) { } -upd96050_device::upd96050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd96050_device::upd96050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : necdsp_device(mconfig, UPD96050, tag, owner, clock, 14, 12) { } diff --git a/src/devices/cpu/upd7725/upd7725.h b/src/devices/cpu/upd7725/upd7725.h index ed17af002eb..fcd5fe8d473 100644 --- a/src/devices/cpu/upd7725/upd7725.h +++ b/src/devices/cpu/upd7725/upd7725.h @@ -41,7 +41,7 @@ public: protected: // construction/destruction - necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t abits, uint32_t dbits); + necdsp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t abits, uint32_t dbits); // device-level overrides virtual void device_start() override; @@ -166,14 +166,14 @@ class upd7725_device : public necdsp_device { public: // construction/destruction - upd7725_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7725_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class upd96050_device : public necdsp_device { public: // construction/destruction - upd96050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd96050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t dataram_r(uint16_t addr) { return dataRAM[addr]; } void dataram_w(uint16_t addr, uint16_t data) { dataRAM[addr] = data; } diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp index 929070e61fc..8569fa4ab04 100644 --- a/src/devices/cpu/upd7810/upd7810.cpp +++ b/src/devices/cpu/upd7810/upd7810.cpp @@ -404,7 +404,7 @@ void upd7810_device::upd_internal_4096_rom_256_ram_map(address_map &map) map(0xff00, 0xffff).ram(); } -upd7810_device::upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map) +upd7810_device::upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : cpu_device(mconfig, type, tag, owner, clock) , m_to_func(*this) , m_co0_func(*this) @@ -444,17 +444,17 @@ void upd7810_device::configure_ops() m_op74 = s_op74; } -upd7810_device::upd7810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7810_device::upd7810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd7810_device(mconfig, UPD7810, tag, owner, clock, address_map_constructor(FUNC(upd7810_device::upd_internal_256_ram_map), this)) { } -upd78c10_device::upd78c10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map) +upd78c10_device::upd78c10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : upd7810_device(mconfig, type, tag, owner, clock, internal_map) { } -upd78c10_device::upd78c10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd78c10_device::upd78c10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78c10_device(mconfig, UPD78C10, tag, owner, clock, address_map_constructor(FUNC(upd78c10_device::upd_internal_256_ram_map), this)) { } @@ -472,7 +472,7 @@ void upd7807_device::configure_ops() } -upd7807_device::upd7807_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7807_device::upd7807_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd7810_device(mconfig, UPD7807, tag, owner, clock, address_map_constructor(FUNC(upd7807_device::upd_internal_256_ram_map), this)) { } @@ -489,7 +489,7 @@ void upd7801_device::configure_ops() m_opXX = s_opXX_7801; } -upd7801_device::upd7801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7801_device::upd7801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd7810_device(mconfig, UPD7801, tag, owner, clock, address_map_constructor(FUNC(upd7801_device::upd_internal_128_ram_map), this)) { } @@ -506,12 +506,12 @@ void upd78c05_device::configure_ops() m_opXX = s_opXX_78c05; } -upd78c05_device::upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map) +upd78c05_device::upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : upd7810_device(mconfig, type, tag, owner, clock, internal_map) { } -upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78c05_device(mconfig, UPD78C05, tag, owner, clock, address_map_constructor(FUNC(upd78c05_device::upd_internal_128_ram_map), this)) { } @@ -528,7 +528,7 @@ void upd78c06_device::configure_ops() m_opXX = s_opXX_78c06; } -upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78c05_device(mconfig, UPD78C06, tag, owner, clock, address_map_constructor(FUNC(upd78c06_device::upd_internal_4096_rom_128_ram_map), this)) { } diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h index 40e4b89ff87..0f21e429311 100644 --- a/src/devices/cpu/upd7810/upd7810.h +++ b/src/devices/cpu/upd7810/upd7810.h @@ -41,7 +41,7 @@ class upd7810_device : public cpu_device { public: // construction/destruction - upd7810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto to_func() { return m_to_func.bind(); } @@ -131,7 +131,7 @@ protected: INTSB = 0x0010 }; - upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map); + upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); // device-level overrides virtual void device_start() override; @@ -1356,10 +1356,10 @@ class upd78c10_device : public upd7810_device { public: // construction/destruction - upd78c10_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd78c10_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - upd78c10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map); + upd78c10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); }; @@ -1367,7 +1367,7 @@ class upd7807_device : public upd7810_device { public: // construction/destruction - upd7807_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7807_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr create_disassembler() override; @@ -1379,7 +1379,7 @@ class upd7801_device : public upd7810_device { public: // construction/destruction - upd7801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -1397,10 +1397,10 @@ class upd78c05_device : public upd7810_device { public: // construction/destruction - upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map); + upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); virtual void device_start() override; virtual void device_reset() override; @@ -1416,7 +1416,7 @@ class upd78c06_device : public upd78c05_device { public: // construction/destruction - upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void configure_ops() override; }; diff --git a/src/devices/cpu/upd7810/upd7811.cpp b/src/devices/cpu/upd7810/upd7811.cpp index e5105e4f9b7..9da7d65f72c 100644 --- a/src/devices/cpu/upd7810/upd7811.cpp +++ b/src/devices/cpu/upd7810/upd7811.cpp @@ -26,12 +26,12 @@ DEFINE_DEVICE_TYPE(UPD7811, upd7811_device, "upd7811", "NEC uPD7811") DEFINE_DEVICE_TYPE(UPD78C11, upd78c11_device, "upd78c11", "NEC uPD78C11") -upd7811_device::upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7811_device::upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd7810_device(mconfig, UPD7811, tag, owner, clock, address_map_constructor(FUNC(upd7811_device::upd_internal_4096_rom_256_ram_map), this)) { } -upd78c11_device::upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd78c11_device::upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78c10_device(mconfig, UPD78C11, tag, owner, clock, address_map_constructor(FUNC(upd78c11_device::upd_internal_4096_rom_256_ram_map), this)) { } diff --git a/src/devices/cpu/upd7810/upd7811.h b/src/devices/cpu/upd7810/upd7811.h index 2d98f64da5f..bac8854a871 100644 --- a/src/devices/cpu/upd7810/upd7811.h +++ b/src/devices/cpu/upd7810/upd7811.h @@ -15,14 +15,14 @@ class upd7811_device : public upd7810_device { public: // construction/destruction - upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class upd78c11_device : public upd78c10_device { public: // construction/destruction - upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_CPU_UPD7810_UPD7811_H diff --git a/src/devices/cpu/upd78k/upd78k0.cpp b/src/devices/cpu/upd78k/upd78k0.cpp index f1f48402226..b909b681a35 100644 --- a/src/devices/cpu/upd78k/upd78k0.cpp +++ b/src/devices/cpu/upd78k/upd78k0.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(UPD78053, upd78053_device, "upd78053", "NEC uPD78053") // upd78k0_device - constructor //------------------------------------------------- -upd78k0_device::upd78k0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 iram_size, address_map_constructor mem_map, address_map_constructor sfr_map) +upd78k0_device::upd78k0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 iram_size, address_map_constructor mem_map, address_map_constructor sfr_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, mem_map) , m_iram_config("iram", ENDIANNESS_LITTLE, 16, iram_size > 0x200 ? 10 : iram_size > 0x100 ? 9 : 8, 0, @@ -192,7 +192,7 @@ void upd78k0_device::state_string_export(const device_state_entry &entry, std::s // upd78053_device - constructor //------------------------------------------------- -upd78053_device::upd78053_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd78053_device::upd78053_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78k0_device(mconfig, UPD78053, tag, owner, clock, 0x400, address_map_constructor(FUNC(upd78053_device::mem_map), this), address_map_constructor(FUNC(upd78053_device::sfr_map), this)) diff --git a/src/devices/cpu/upd78k/upd78k0.h b/src/devices/cpu/upd78k/upd78k0.h index 566dfab340f..7fb6feb8597 100644 --- a/src/devices/cpu/upd78k/upd78k0.h +++ b/src/devices/cpu/upd78k/upd78k0.h @@ -29,11 +29,11 @@ public: }; // configuration (TODO: callbacks) - void set_subclock(u32 clock) { m_subclock = clock; } + void set_subclock(const XTAL &clock) { m_subclock = clock; } void set_subclock(const XTAL &xtal) { m_subclock = xtal.value(); } protected: - upd78k0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u16 iram_size, address_map_constructor mem_map, address_map_constructor sfr_map); + upd78k0_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u16 iram_size, address_map_constructor mem_map, address_map_constructor sfr_map); // device-level overrides virtual void device_start() override; @@ -83,9 +83,9 @@ class upd78053_device : public upd78k0_device { public: // device type constructors - upd78053_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd78053_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - upd78053_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, X &&subclock) + upd78053_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, X &&subclock) : upd78053_device(mconfig, tag, owner, clock) { set_subclock(std::forward(subclock)); diff --git a/src/devices/cpu/upd78k/upd78k2.cpp b/src/devices/cpu/upd78k/upd78k2.cpp index b8c784e20e8..5915b057698 100644 --- a/src/devices/cpu/upd78k/upd78k2.cpp +++ b/src/devices/cpu/upd78k/upd78k2.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(UPD78213, upd78213_device, "upd78213", "NEC uPD78213") // upd78k2_device - constructor //------------------------------------------------- -upd78k2_device::upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int iram_bits, address_map_constructor mem_map, address_map_constructor sfr_map) +upd78k2_device::upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int iram_bits, address_map_constructor mem_map, address_map_constructor sfr_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, mem_map) , m_iram_config("iram", ENDIANNESS_LITTLE, 16, iram_bits, 0, address_map_constructor(FUNC(upd78k2_device::iram_map), this)) @@ -175,7 +175,7 @@ void upd78k2_device::state_string_export(const device_state_entry &entry, std::s // upd78210_device - constructor //------------------------------------------------- -upd78210_device::upd78210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd78210_device::upd78210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78k2_device(mconfig, UPD78210, tag, owner, clock, 7, address_map_constructor(), address_map_constructor(FUNC(upd78210_device::sfr_map), this)) @@ -207,7 +207,7 @@ void upd78210_device::sfr_map(address_map &map) // upd78213_device - constructor //------------------------------------------------- -upd78213_device::upd78213_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd78213_device::upd78213_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78k2_device(mconfig, UPD78213, tag, owner, clock, 8, address_map_constructor(FUNC(upd78213_device::mem_map), this), address_map_constructor(FUNC(upd78213_device::sfr_map), this)) diff --git a/src/devices/cpu/upd78k/upd78k2.h b/src/devices/cpu/upd78k/upd78k2.h index c0a8e07b825..f2391873410 100644 --- a/src/devices/cpu/upd78k/upd78k2.h +++ b/src/devices/cpu/upd78k/upd78k2.h @@ -32,7 +32,7 @@ public: // TODO: callbacks and configuration thereof protected: - upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int iram_bits, address_map_constructor mem_map, address_map_constructor sfr_map); + upd78k2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int iram_bits, address_map_constructor mem_map, address_map_constructor sfr_map); // device-level overrides virtual void device_start() override; @@ -80,7 +80,7 @@ class upd78210_device : public upd78k2_device { public: // device type constructor - upd78210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd78210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -97,7 +97,7 @@ class upd78213_device : public upd78k2_device { public: // device type constructor - upd78213_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd78213_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides diff --git a/src/devices/cpu/upd78k/upd78k3.cpp b/src/devices/cpu/upd78k/upd78k3.cpp index e4a4a6daae5..e548bbbc010 100644 --- a/src/devices/cpu/upd78k/upd78k3.cpp +++ b/src/devices/cpu/upd78k/upd78k3.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(UPD78312, upd78312_device, "upd78312", "NEC uPD78312") // upd78k3_device - constructor //------------------------------------------------- -upd78k3_device::upd78k3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor sfr_map) +upd78k3_device::upd78k3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor mem_map, address_map_constructor sfr_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, mem_map) , m_iram_config("iram", ENDIANNESS_LITTLE, 16, 8, 0, address_map_constructor(FUNC(upd78k3_device::iram_map), this)) @@ -264,12 +264,12 @@ void upd78k3_device::state_string_export(const device_state_entry &entry, std::s // upd78312_device - constructor //------------------------------------------------- -upd78312_device::upd78312_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd78312_device::upd78312_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78312_device(mconfig, UPD78312, tag, owner, clock, address_map_constructor(FUNC(upd78312_device::mem_map), this)) { } -upd78312_device::upd78312_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +upd78312_device::upd78312_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : upd78k3_device(mconfig, type, tag, owner, clock, map, address_map_constructor(FUNC(upd78312_device::sfr_map), this)) { @@ -280,7 +280,7 @@ upd78312_device::upd78312_device(const machine_config &mconfig, device_type type // upd78310_device - constructor //------------------------------------------------- -upd78310_device::upd78310_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd78310_device::upd78310_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78312_device(mconfig, UPD78310, tag, owner, clock, address_map_constructor()) { } diff --git a/src/devices/cpu/upd78k/upd78k3.h b/src/devices/cpu/upd78k/upd78k3.h index 22867376847..e8c2f8002fb 100644 --- a/src/devices/cpu/upd78k/upd78k3.h +++ b/src/devices/cpu/upd78k/upd78k3.h @@ -39,7 +39,7 @@ public: // TODO: callbacks and configuration thereof protected: - upd78k3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor sfr_map); + upd78k3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor mem_map, address_map_constructor sfr_map); // device-level overrides virtual void device_start() override; @@ -96,10 +96,10 @@ class upd78312_device : public upd78k3_device { public: // device type constructor - upd78312_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd78312_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - upd78312_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map); + upd78312_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map); // device_disasm_interface overrides virtual std::unique_ptr create_disassembler() override; @@ -122,7 +122,7 @@ class upd78310_device : public upd78312_device { public: // device type constructor - upd78310_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd78310_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/cpu/upd78k/upd78k4.cpp b/src/devices/cpu/upd78k/upd78k4.cpp index 0aad7b0660a..1ef4438a76d 100644 --- a/src/devices/cpu/upd78k/upd78k4.cpp +++ b/src/devices/cpu/upd78k/upd78k4.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(UPD784031, upd784031_device, "upd784031", "NEC uPD784031") // upd78k4_device - constructor //------------------------------------------------- -upd78k4_device::upd78k4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor sfr_map) +upd78k4_device::upd78k4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor mem_map, address_map_constructor sfr_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, mem_map) , m_iram_config("iram", ENDIANNESS_LITTLE, 16, 9, 0, address_map_constructor(FUNC(upd78k4_device::iram_map), this)) @@ -234,7 +234,7 @@ void upd78k4_device::state_string_export(const device_state_entry &entry, std::s // upd784031_device - constructor //------------------------------------------------- -upd784031_device::upd784031_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd784031_device::upd784031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd78k4_device(mconfig, UPD784031, tag, owner, clock, address_map_constructor(FUNC(upd784031_device::sfr_map), this), address_map_constructor(FUNC(upd784031_device::sfr_map), this)) diff --git a/src/devices/cpu/upd78k/upd78k4.h b/src/devices/cpu/upd78k/upd78k4.h index 435600b563c..1c2e12830f8 100644 --- a/src/devices/cpu/upd78k/upd78k4.h +++ b/src/devices/cpu/upd78k/upd78k4.h @@ -41,7 +41,7 @@ public: // TODO: callbacks and configuration thereof protected: - upd78k4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor sfr_map); + upd78k4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor mem_map, address_map_constructor sfr_map); // device-level overrides virtual void device_start() override; @@ -92,7 +92,7 @@ class upd784031_device : public upd78k4_device { public: // device type constructor - upd784031_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd784031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides diff --git a/src/devices/cpu/v30mz/v30mz.cpp b/src/devices/cpu/v30mz/v30mz.cpp index 93c7ad1440e..358450e9583 100644 --- a/src/devices/cpu/v30mz/v30mz.cpp +++ b/src/devices/cpu/v30mz/v30mz.cpp @@ -75,7 +75,7 @@ enum nec_irqs { DEFINE_DEVICE_TYPE(V30MZ, v30mz_cpu_device, "v30mz", "NEC V30MZ") -v30mz_cpu_device::v30mz_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v30mz_cpu_device::v30mz_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, V30MZ, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 16, 20, 0) , m_io_config("io", ENDIANNESS_LITTLE, 16, 16, 0) diff --git a/src/devices/cpu/v30mz/v30mz.h b/src/devices/cpu/v30mz/v30mz.h index f194fba269c..e352feb7833 100644 --- a/src/devices/cpu/v30mz/v30mz.h +++ b/src/devices/cpu/v30mz/v30mz.h @@ -22,7 +22,7 @@ class v30mz_cpu_device : public cpu_device, public nec_disassembler::config { public: // construction/destruction - v30mz_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v30mz_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto vector_cb() { return m_vector_func.bind(); } uint32_t pc(); diff --git a/src/devices/cpu/v60/v60.cpp b/src/devices/cpu/v60/v60.cpp index fdce71f6808..e87fc10d999 100644 --- a/src/devices/cpu/v60/v60.cpp +++ b/src/devices/cpu/v60/v60.cpp @@ -83,13 +83,13 @@ DEFINE_DEVICE_TYPE(V70, v70_device, "v70", "NEC V70") // Set m_PIR (Processor ID) for NEC m_ LSB is reserved to NEC, // so I don't know what it contains. -v60_device::v60_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v60_device::v60_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v60_device(mconfig, V60, tag, owner, clock, 16, 24, 0x00006000) { } -v60_device::v60_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int databits, int addrbits, uint32_t pir) +v60_device::v60_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int databits, int addrbits, uint32_t pir) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, databits, addrbits, 0) , m_io_config("io", ENDIANNESS_LITTLE, 16, 24, 0) @@ -100,7 +100,7 @@ v60_device::v60_device(const machine_config &mconfig, device_type type, const ch // Set m_PIR (Processor ID) for NEC v70. LSB is reserved to NEC, // so I don't know what it contains. -v70_device::v70_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v70_device::v70_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v60_device(mconfig, V70, tag, owner, clock, 32, 32, 0x00007000) { } diff --git a/src/devices/cpu/v60/v60.h b/src/devices/cpu/v60/v60.h index d617ec1bd56..4a6bc4dae9c 100644 --- a/src/devices/cpu/v60/v60.h +++ b/src/devices/cpu/v60/v60.h @@ -84,12 +84,12 @@ class v60_device : public cpu_device { public: // construction/destruction - v60_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v60_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void stall(); protected: - v60_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int databits, int addrbits, uint32_t pir); + v60_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int databits, int addrbits, uint32_t pir); // device-level overrides virtual void device_start() override; @@ -785,7 +785,7 @@ class v70_device : public v60_device { public: // construction/destruction - v70_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v70_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/v810/v810.cpp b/src/devices/cpu/v810/v810.cpp index 47a672baf69..c95ffac8262 100644 --- a/src/devices/cpu/v810/v810.cpp +++ b/src/devices/cpu/v810/v810.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(V810, v810_device, "v810", "NEC V810") -v810_device::v810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v810_device::v810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, V810, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) , m_io_config("io", ENDIANNESS_LITTLE, 32, 32, 0) diff --git a/src/devices/cpu/v810/v810.h b/src/devices/cpu/v810/v810.h index a24abe48751..7ffe02ef727 100644 --- a/src/devices/cpu/v810/v810.h +++ b/src/devices/cpu/v810/v810.h @@ -83,7 +83,7 @@ class v810_device : public cpu_device { public: // construction/destruction - v810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/vt50/vt50.cpp b/src/devices/cpu/vt50/vt50.cpp index 7a964c4be5b..ecb4c0ae936 100644 --- a/src/devices/cpu/vt50/vt50.cpp +++ b/src/devices/cpu/vt50/vt50.cpp @@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(VT50_CPU, vt50_cpu_device, "vt50_cpu", "DEC VT50 CPU") DEFINE_DEVICE_TYPE(VT52_CPU, vt52_cpu_device, "vt52_cpu", "DEC VT52 CPU") -vt5x_cpu_device::vt5x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int bbits, int ybits) +vt5x_cpu_device::vt5x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int bbits, int ybits) : cpu_device(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , m_rom_config("program", ENDIANNESS_LITTLE, 8, 10, 0) @@ -122,12 +122,12 @@ vt5x_cpu_device::vt5x_cpu_device(const machine_config &mconfig, device_type type m_ram_config.m_is_octal = true; } -vt50_cpu_device::vt50_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vt50_cpu_device::vt50_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vt5x_cpu_device(mconfig, VT50_CPU, tag, owner, clock, 4, 4) { } -vt52_cpu_device::vt52_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vt52_cpu_device::vt52_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vt5x_cpu_device(mconfig, VT52_CPU, tag, owner, clock, 7, 5) , m_graphic_callback(*this) { diff --git a/src/devices/cpu/vt50/vt50.h b/src/devices/cpu/vt50/vt50.h index e9d0b39b1bc..ac664b1f318 100644 --- a/src/devices/cpu/vt50/vt50.h +++ b/src/devices/cpu/vt50/vt50.h @@ -38,7 +38,7 @@ public: protected: // construction/destruction - vt5x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int bbits, int ybits); + vt5x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int bbits, int ybits); // device-level overrides virtual void device_config_complete() override; @@ -136,7 +136,7 @@ class vt50_cpu_device : public vt5x_cpu_device { public: // device type constructor - vt50_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vt50_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_disasm_interface overrides @@ -149,7 +149,7 @@ class vt52_cpu_device : public vt5x_cpu_device { public: // device type constructor - vt52_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vt52_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto graphic_callback() { return m_graphic_callback.bind(); } diff --git a/src/devices/cpu/vt61/vt61.cpp b/src/devices/cpu/vt61/vt61.cpp index 40a98cae7a8..e406c18596b 100644 --- a/src/devices/cpu/vt61/vt61.cpp +++ b/src/devices/cpu/vt61/vt61.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(VT61_CPU, vt61_cpu_device, "vt61_cpu", "DEC VT61 CPU") ALLOW_SAVE_TYPE(vt61_cpu_device::state); ALLOW_SAVE_TYPE(vt61_cpu_device::pc_mode); -vt61_cpu_device::vt61_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vt61_cpu_device::vt61_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, VT61_CPU, tag, owner, clock) , m_program_config("microprogram", ENDIANNESS_LITTLE, 16, 10, -1) , m_memory_config("memory", ENDIANNESS_LITTLE, 8, 16, 0) diff --git a/src/devices/cpu/vt61/vt61.h b/src/devices/cpu/vt61/vt61.h index 971343fe095..42372275ad3 100644 --- a/src/devices/cpu/vt61/vt61.h +++ b/src/devices/cpu/vt61/vt61.h @@ -27,7 +27,7 @@ public: }; // construction/destruction - vt61_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vt61_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/we32000/we32100.cpp b/src/devices/cpu/we32000/we32100.cpp index b7f166e5287..bc843eed413 100644 --- a/src/devices/cpu/we32000/we32100.cpp +++ b/src/devices/cpu/we32000/we32100.cpp @@ -15,7 +15,7 @@ // device type definitions DEFINE_DEVICE_TYPE(WE32100, we32100_device, "we32100", "AT&T WE32100") -we32100_device::we32100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +we32100_device::we32100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, WE32100, tag, owner, clock) , m_space_config("program", ENDIANNESS_BIG, 32, 32, 0) , m_r{0} diff --git a/src/devices/cpu/we32000/we32100.h b/src/devices/cpu/we32000/we32100.h index c34afc4279e..87a0de81c15 100644 --- a/src/devices/cpu/we32000/we32100.h +++ b/src/devices/cpu/we32000/we32100.h @@ -22,7 +22,7 @@ public: }; // construction/destruction - we32100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + we32100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/xavix2/xavix2.cpp b/src/devices/cpu/xavix2/xavix2.cpp index 2f1753b1523..0dc74794862 100644 --- a/src/devices/cpu/xavix2/xavix2.cpp +++ b/src/devices/cpu/xavix2/xavix2.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(XAVIX2, xavix2_device, "xavix2", "Xavix 2 CPU") const u8 xavix2_device::bpo[8] = { 4, 3, 3, 2, 2, 2, 2, 1 }; -xavix2_device::xavix2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix2_device::xavix2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, XAVIX2, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32) { diff --git a/src/devices/cpu/xavix2/xavix2.h b/src/devices/cpu/xavix2/xavix2.h index 30e9ec5faea..de152204507 100644 --- a/src/devices/cpu/xavix2/xavix2.h +++ b/src/devices/cpu/xavix2/xavix2.h @@ -13,7 +13,7 @@ class xavix2_device : public cpu_device { public: - xavix2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum { diff --git a/src/devices/cpu/z180/hd647180x.cpp b/src/devices/cpu/z180/hd647180x.cpp index cc70b0781a8..e568245f637 100644 --- a/src/devices/cpu/z180/hd647180x.cpp +++ b/src/devices/cpu/z180/hd647180x.cpp @@ -31,7 +31,7 @@ // device type definition DEFINE_DEVICE_TYPE(HD647180X, hd647180x_device, "hd647180x", "Hitachi HD647180X MCU") -hd647180x_device::hd647180x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd647180x_device::hd647180x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180_device(mconfig, HD647180X, tag, owner, clock, true, address_map_constructor(FUNC(hd647180x_device::internal_map), this)) , m_port_input_cb(*this) , m_port_output_cb(*this) diff --git a/src/devices/cpu/z180/hd647180x.h b/src/devices/cpu/z180/hd647180x.h index 22d4212b4af..e5d816b2b1e 100644 --- a/src/devices/cpu/z180/hd647180x.h +++ b/src/devices/cpu/z180/hd647180x.h @@ -25,7 +25,7 @@ public: }; // construction/destruction - hd647180x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd647180x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_port_input_cb[0].bind(); } auto in_pb_callback() { return m_port_input_cb[1].bind(); } diff --git a/src/devices/cpu/z180/z180.cpp b/src/devices/cpu/z180/z180.cpp index db7b4a3026b..c70c23c3ce6 100644 --- a/src/devices/cpu/z180/z180.cpp +++ b/src/devices/cpu/z180/z180.cpp @@ -87,7 +87,7 @@ DEFINE_DEVICE_TYPE(Z8S180, z8s180_device, "z8s180", "Zilog Z8S180") // enhanced DEFINE_DEVICE_TYPE(Z80182, z80182_device, "z80182", "Zilog Z80182") // further enhanced Z8S180 -z180_device::z180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool extended_io, address_map_constructor internal_map) +z180_device::z180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool extended_io, address_map_constructor internal_map) : cpu_device(mconfig, type, tag, owner, clock) , z80_daisy_chain_interface(mconfig, *this) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, 16, 12, internal_map) @@ -114,29 +114,29 @@ std::unique_ptr z180_device::create_disassembler() return std::make_unique(); } -z80180_device::z80180_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80180_device::z80180_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180_device(mconfig, Z80180, tag, owner, clock, false, address_map_constructor()) { } -hd64180rp_device::hd64180rp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd64180rp_device::hd64180rp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180_device(mconfig, HD64180RP, tag, owner, clock, false, address_map_constructor()) { // 64-pin DIP versions omit A19 set_address_width(19); } -z8s180_device::z8s180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +z8s180_device::z8s180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z180_device(mconfig, type, tag, owner, clock, false, address_map_constructor()) { } -z8s180_device::z8s180_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8s180_device::z8s180_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8s180_device(mconfig, Z8S180, tag, owner, clock) { } -z80182_device::z80182_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80182_device::z80182_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8s180_device(mconfig, Z80182, tag, owner, clock) { } diff --git a/src/devices/cpu/z180/z180.h b/src/devices/cpu/z180/z180.h index 62213845b05..8ec6d2af297 100644 --- a/src/devices/cpu/z180/z180.h +++ b/src/devices/cpu/z180/z180.h @@ -126,7 +126,7 @@ public: protected: // construction/destruction - z180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool extended_io, address_map_constructor internal_map); + z180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool extended_io, address_map_constructor internal_map); // device-level overrides virtual void device_start() override; @@ -1810,24 +1810,24 @@ class z80180_device : public z180_device { public: // construction/destruction - z80180_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80180_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hd64180rp_device : public z180_device { public: // construction/destruction - hd64180rp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd64180rp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class z8s180_device : public z180_device { public: // construction/destruction - z8s180_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8s180_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - z8s180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + z8s180_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -1851,7 +1851,7 @@ class z80182_device : public z8s180_device { public: // construction/destruction - z80182_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80182_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(Z80180, z80180_device) diff --git a/src/devices/cpu/z180/z180asci.cpp b/src/devices/cpu/z180/z180asci.cpp index 3abf9683bc8..e4f919f01c5 100644 --- a/src/devices/cpu/z180/z180asci.cpp +++ b/src/devices/cpu/z180/z180asci.cpp @@ -65,7 +65,7 @@ static constexpr u8 Z180_ASEXT1_MASK = 0x1f; // z180asci_channel_base //************************************************************************** -z180asci_channel_base::z180asci_channel_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const int id, const bool ext) +z180asci_channel_base::z180asci_channel_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const int id, const bool ext) : device_t(mconfig, type, tag, owner, clock) , m_rcv_clock(nullptr) , m_tra_clock(nullptr) @@ -580,12 +580,12 @@ void z180asci_channel_base::output_rts(int rts) // z180asci_channel_0 //************************************************************************** -z180asci_channel_0::z180asci_channel_0(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool ext) +z180asci_channel_0::z180asci_channel_0(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool ext) : z180asci_channel_base(mconfig, type, tag, owner, clock, 0, ext) { } -z180asci_channel_0::z180asci_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z180asci_channel_0::z180asci_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180asci_channel_0(mconfig, Z180ASCI_CHANNEL_0, tag, owner, clock, false) { } @@ -629,12 +629,12 @@ void z180asci_channel_0::asext_w(uint8_t data) // z180asci_channel_1 //************************************************************************** -z180asci_channel_1::z180asci_channel_1(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool ext) +z180asci_channel_1::z180asci_channel_1(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool ext) : z180asci_channel_base(mconfig, type, tag, owner, clock, 1, ext) { } -z180asci_channel_1::z180asci_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z180asci_channel_1::z180asci_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180asci_channel_1(mconfig, Z180ASCI_CHANNEL_1, tag, owner, clock, false) { } @@ -677,7 +677,7 @@ void z180asci_channel_1::asext_w(uint8_t data) // z180asci_ext_channel_0 //************************************************************************** -z180asci_ext_channel_0::z180asci_ext_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z180asci_ext_channel_0::z180asci_ext_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180asci_channel_0(mconfig, Z180ASCI_EXT_CHANNEL_0, tag, owner, clock, true) { } @@ -686,7 +686,7 @@ z180asci_ext_channel_0::z180asci_ext_channel_0(const machine_config &mconfig, co // z180asci_channel_1 //************************************************************************** -z180asci_ext_channel_1::z180asci_ext_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z180asci_ext_channel_1::z180asci_ext_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z180asci_channel_1(mconfig, Z180ASCI_EXT_CHANNEL_1, tag, owner, clock, true) { } diff --git a/src/devices/cpu/z180/z180asci.h b/src/devices/cpu/z180/z180asci.h index 3794fe635a8..975297cce8f 100644 --- a/src/devices/cpu/z180/z180asci.h +++ b/src/devices/cpu/z180/z180asci.h @@ -50,7 +50,7 @@ public: int check_interrupt() { return m_irq; } void clear_interrupt() { m_irq = 0; } protected: - z180asci_channel_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const int id, const bool ext); + z180asci_channel_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const int id, const bool ext); // device-level overrides virtual void device_start() override; @@ -136,13 +136,13 @@ class z180asci_channel_0 : public z180asci_channel_base { public: // construction/destruction - z180asci_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z180asci_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void stat_w(uint8_t data) override; void asext_w(uint8_t data) override; void state_add(device_state_interface &parent) override; protected: - z180asci_channel_0(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool ext); + z180asci_channel_0(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool ext); // device-level overrides virtual void device_reset() override; }; @@ -155,13 +155,13 @@ class z180asci_channel_1 : public z180asci_channel_base { public: // construction/destruction - z180asci_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z180asci_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void stat_w(uint8_t data) override; void asext_w(uint8_t data) override; void state_add(device_state_interface &parent) override; protected: - z180asci_channel_1(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const bool ext); + z180asci_channel_1(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const bool ext); // device-level overrides virtual void device_reset() override; }; @@ -174,7 +174,7 @@ class z180asci_ext_channel_0 : public z180asci_channel_0 { public: // construction/destruction - z180asci_ext_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z180asci_ext_channel_0(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; //************************************************************************** @@ -185,7 +185,7 @@ class z180asci_ext_channel_1 : public z180asci_channel_1 { public: // construction/destruction - z180asci_ext_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z180asci_ext_channel_1(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; //************************************************************************** diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp index d59651b683b..ecadd71514a 100644 --- a/src/devices/cpu/z8/z8.cpp +++ b/src/devices/cpu/z8/z8.cpp @@ -175,7 +175,7 @@ void z8_device::register_map(address_map &map) } -z8_device::z8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t rom_size, bool preprogrammed) +z8_device::z8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t rom_size, bool preprogrammed) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, preprogrammed ? address_map_constructor(FUNC(z8_device::preprogrammed_map), this) : address_map_constructor(FUNC(z8_device::program_map), this)) , m_data_config("data", ENDIANNESS_BIG, 8, 16, 0) @@ -189,25 +189,25 @@ z8_device::z8_device(const machine_config &mconfig, device_type type, const char } -z8601_device::z8601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8601_device::z8601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8_device(mconfig, Z8601, tag, owner, clock, 0x800, false) { } -ub8830d_device::ub8830d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ub8830d_device::ub8830d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8_device(mconfig, UB8830D, tag, owner, clock, 0x800, false) { } -z8611_device::z8611_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8611_device::z8611_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8_device(mconfig, Z8611, tag, owner, clock, 0x1000, false) { } -z8671_device::z8671_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8671_device::z8671_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8_device(mconfig, Z8671, tag, owner, clock, 0x800, true) { } @@ -223,13 +223,13 @@ const tiny_rom_entry *z8671_device::device_rom_region() const } -z8681_device::z8681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8681_device::z8681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8_device(mconfig, Z8681, tag, owner, clock, 0, false) { } -z8682_device::z8682_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8682_device::z8682_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8_device(mconfig, Z8682, tag, owner, clock, 0x800, true) { } @@ -246,7 +246,7 @@ const tiny_rom_entry *z8682_device::device_rom_region() const } -z86e02_device::z86e02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z86e02_device::z86e02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8_device(mconfig, Z86E02, tag, owner, clock, 0x200, false) { } diff --git a/src/devices/cpu/z8/z8.h b/src/devices/cpu/z8/z8.h index c092cfd4066..ad4c2dd6e7f 100644 --- a/src/devices/cpu/z8/z8.h +++ b/src/devices/cpu/z8/z8.h @@ -39,7 +39,7 @@ protected: }; // construction/destruction - z8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t rom_size, bool preprogrammed); + z8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t rom_size, bool preprogrammed); // device-level overrides virtual void device_start() override; @@ -383,28 +383,28 @@ private: class z8601_device : public z8_device { public: - z8601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ub8830d_device : public z8_device { public: - ub8830d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ub8830d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class z8611_device : public z8_device { public: - z8611_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8611_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class z8671_device : public z8_device { public: - z8671_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8671_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: const tiny_rom_entry *device_rom_region() const override; @@ -414,14 +414,14 @@ protected: class z8681_device : public z8_device { public: - z8681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class z8682_device : public z8_device { public: - z8682_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8682_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: const tiny_rom_entry *device_rom_region() const override; @@ -431,7 +431,7 @@ protected: class z86e02_device : public z8_device { public: - z86e02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z86e02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/z80/ez80.cpp b/src/devices/cpu/z80/ez80.cpp index 525dc1c3b11..042a8535e4f 100644 --- a/src/devices/cpu/z80/ez80.cpp +++ b/src/devices/cpu/z80/ez80.cpp @@ -28,12 +28,12 @@ DEFINE_DEVICE_TYPE(EZ80, ez80_device, "ez80", "Zilog eZ80") // ez80_device - constructor //------------------------------------------------- -ez80_device::ez80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +ez80_device::ez80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, type, tag, owner, clock) { } -ez80_device::ez80_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ez80_device::ez80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ez80_device(mconfig, EZ80, tag, owner, clock) { } diff --git a/src/devices/cpu/z80/ez80.h b/src/devices/cpu/z80/ez80.h index 2ae563d5b80..3cc5cbec604 100644 --- a/src/devices/cpu/z80/ez80.h +++ b/src/devices/cpu/z80/ez80.h @@ -22,11 +22,11 @@ class ez80_device : public z80_device { public: // device type constructor - ez80_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ez80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // construction/destruction - ez80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + ez80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; // device type declaration diff --git a/src/devices/cpu/z80/kc82.cpp b/src/devices/cpu/z80/kc82.cpp index bf0a26290c4..0dcac14e9e2 100644 --- a/src/devices/cpu/z80/kc82.cpp +++ b/src/devices/cpu/z80/kc82.cpp @@ -17,7 +17,7 @@ // kc82_device - constructor //------------------------------------------------- -kc82_device::kc82_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor io_map) +kc82_device::kc82_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor mem_map, address_map_constructor io_map) : z80_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, 16, 10, mem_map) , m_opcodes_config("opcodes", ENDIANNESS_LITTLE, 8, 20, 0, 16, 10, mem_map) diff --git a/src/devices/cpu/z80/kc82.h b/src/devices/cpu/z80/kc82.h index c78269c77fe..b9ef94c5ab2 100644 --- a/src/devices/cpu/z80/kc82.h +++ b/src/devices/cpu/z80/kc82.h @@ -29,7 +29,7 @@ public: protected: // construction/destruction - kc82_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor io_map); + kc82_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor mem_map, address_map_constructor io_map); // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/z80/kl5c80a12.cpp b/src/devices/cpu/z80/kl5c80a12.cpp index 495a0ab4afd..4a8c4e30bd5 100644 --- a/src/devices/cpu/z80/kl5c80a12.cpp +++ b/src/devices/cpu/z80/kl5c80a12.cpp @@ -35,7 +35,7 @@ static const z80_daisy_config pseudo_daisy_config[] = { { "kp69" }, { nullptr } // kl5c80a12_device - constructor //------------------------------------------------- -kl5c80a12_device::kl5c80a12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kl5c80a12_device::kl5c80a12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc82_device(mconfig, KL5C80A12, tag, owner, clock, address_map_constructor(FUNC(kl5c80a12_device::internal_ram), this), address_map_constructor(FUNC(kl5c80a12_device::internal_io), this)) diff --git a/src/devices/cpu/z80/kl5c80a12.h b/src/devices/cpu/z80/kl5c80a12.h index 28434f8c8f6..c50fdca6297 100644 --- a/src/devices/cpu/z80/kl5c80a12.h +++ b/src/devices/cpu/z80/kl5c80a12.h @@ -28,7 +28,7 @@ public: }; // device type constructor - kl5c80a12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kl5c80a12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto in_p0_callback() { return m_porta_in_callback[0].bind(); } diff --git a/src/devices/cpu/z80/kl5c80a16.cpp b/src/devices/cpu/z80/kl5c80a16.cpp index d92cc9142de..92cf6b56c77 100644 --- a/src/devices/cpu/z80/kl5c80a16.cpp +++ b/src/devices/cpu/z80/kl5c80a16.cpp @@ -30,7 +30,7 @@ static const z80_daisy_config pseudo_daisy_config[] = { { "kp69" }, { nullptr } // kl5c80a16_device - constructor //------------------------------------------------- -kl5c80a16_device::kl5c80a16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kl5c80a16_device::kl5c80a16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc82_device(mconfig, KL5C80A16, tag, owner, clock, address_map_constructor(), address_map_constructor(FUNC(kl5c80a16_device::internal_io), this)) diff --git a/src/devices/cpu/z80/kl5c80a16.h b/src/devices/cpu/z80/kl5c80a16.h index d3ac8eda636..34d71bb90d9 100644 --- a/src/devices/cpu/z80/kl5c80a16.h +++ b/src/devices/cpu/z80/kl5c80a16.h @@ -28,7 +28,7 @@ public: }; // device type constructor - kl5c80a16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kl5c80a16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto in_p0_callback() { return m_port_in_callback[0].bind(); } diff --git a/src/devices/cpu/z80/kp63.cpp b/src/devices/cpu/z80/kp63.cpp index db42ef30ecb..356fcbc17ed 100644 --- a/src/devices/cpu/z80/kp63.cpp +++ b/src/devices/cpu/z80/kp63.cpp @@ -58,7 +58,7 @@ const char *const kp63_device::s_count_modes[4] = // kp63_device - constructor //------------------------------------------------- -kp63_device::kp63_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 num_counters, u8 mode_mask) +kp63_device::kp63_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 num_counters, u8 mode_mask) : device_t(mconfig, type, tag, owner, clock) , m_out_pulse_callback(*this) , m_out_strobe_callback(*this) @@ -82,7 +82,7 @@ kp63_device::kp63_device(const machine_config &mconfig, device_type type, const // kp63_3channel_device - constructor //------------------------------------------------- -kp63_3channel_device::kp63_3channel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kp63_3channel_device::kp63_3channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kp63_device(mconfig, KP63_3CHANNEL, tag, owner, clock, 3, 0x1f) { } @@ -92,7 +92,7 @@ kp63_3channel_device::kp63_3channel_device(const machine_config &mconfig, const // kp63a_device - constructor //------------------------------------------------- -kp63a_device::kp63a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kp63a_device::kp63a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kp63_device(mconfig, KP63A, tag, owner, clock, 4, 0x3f) { } diff --git a/src/devices/cpu/z80/kp63.h b/src/devices/cpu/z80/kp63.h index 73e269fb72b..ec00fbea789 100644 --- a/src/devices/cpu/z80/kp63.h +++ b/src/devices/cpu/z80/kp63.h @@ -32,7 +32,7 @@ public: protected: // construction/destruction - kp63_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 num_counters, u8 mode_mask); + kp63_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 num_counters, u8 mode_mask); // device-level overrides virtual void device_resolve_objects() override; @@ -81,14 +81,14 @@ class kp63_3channel_device : public kp63_device { public: // device type constructor - kp63_3channel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kp63_3channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class kp63a_device : public kp63_device { public: // device type constructor - kp63a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kp63a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/cpu/z80/kp64.cpp b/src/devices/cpu/z80/kp64.cpp index 697ed65268a..52e418f35dc 100644 --- a/src/devices/cpu/z80/kp64.cpp +++ b/src/devices/cpu/z80/kp64.cpp @@ -68,7 +68,7 @@ DEFINE_DEVICE_TYPE(KP64, kp64_device, "kp64", "Kawasaki Steel KP64 Timer/Counter // kp64_device - constructor //------------------------------------------------- -kp64_device::kp64_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kp64_device::kp64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KP64, tag, owner, clock) , m_out_callback(*this) , m_count_timer(nullptr) diff --git a/src/devices/cpu/z80/kp64.h b/src/devices/cpu/z80/kp64.h index 954076430d0..b5d62212dfa 100644 --- a/src/devices/cpu/z80/kp64.h +++ b/src/devices/cpu/z80/kp64.h @@ -20,7 +20,7 @@ class kp64_device : public device_t { public: // device type constructor - kp64_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kp64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto out_callback() { return m_out_callback.bind(); } diff --git a/src/devices/cpu/z80/kp69.cpp b/src/devices/cpu/z80/kp69.cpp index 0e194138b2c..a03931c3292 100644 --- a/src/devices/cpu/z80/kp69.cpp +++ b/src/devices/cpu/z80/kp69.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(KP69, kp69_device, "kp69", "Kawasaki Steel KP69 Interrupt Con // kp69_base_device - constructor //------------------------------------------------- -kp69_base_device::kp69_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +kp69_base_device::kp69_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_z80daisy_interface(mconfig, *this) , m_int_callback(*this) @@ -56,7 +56,7 @@ kp69_base_device::kp69_base_device(const machine_config &mconfig, device_type ty // kp69_device - constructor //------------------------------------------------- -kp69_device::kp69_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kp69_device::kp69_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kp69_base_device(mconfig, KP69, tag, owner, clock) , m_ivr_written(false) { diff --git a/src/devices/cpu/z80/kp69.h b/src/devices/cpu/z80/kp69.h index f7747f795d6..dec9255f8fc 100644 --- a/src/devices/cpu/z80/kp69.h +++ b/src/devices/cpu/z80/kp69.h @@ -41,7 +41,7 @@ public: protected: // construction/destruction - kp69_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + kp69_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -82,7 +82,7 @@ class kp69_device : public kp69_base_device { public: // device type constructor - kp69_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + kp69_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // write handlers void lerl_pgrl_w(u8 data); diff --git a/src/devices/cpu/z80/ky80.cpp b/src/devices/cpu/z80/ky80.cpp index b55237efa95..067c412022d 100644 --- a/src/devices/cpu/z80/ky80.cpp +++ b/src/devices/cpu/z80/ky80.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(KY80, ky80_device, "ky80", "Taxan KY-80") // ky80_device - constructor //------------------------------------------------- -ky80_device::ky80_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ky80_device::ky80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kc82_device(mconfig, KY80, tag, owner, clock, address_map_constructor(FUNC(ky80_device::internal_ram), this), address_map_constructor(FUNC(ky80_device::internal_io), this)) diff --git a/src/devices/cpu/z80/ky80.h b/src/devices/cpu/z80/ky80.h index fce065a9c8f..0e977689db9 100644 --- a/src/devices/cpu/z80/ky80.h +++ b/src/devices/cpu/z80/ky80.h @@ -22,7 +22,7 @@ class ky80_device : public kc82_device { public: // device type constructor - ky80_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ky80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides diff --git a/src/devices/cpu/z80/lz8420m.cpp b/src/devices/cpu/z80/lz8420m.cpp index 26e41a6b248..8b6093d4d97 100644 --- a/src/devices/cpu/z80/lz8420m.cpp +++ b/src/devices/cpu/z80/lz8420m.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(LZ8420M, lz8420m_device, "lz8420m", "Sharp LZ8420M") -lz8420m_device::lz8420m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lz8420m_device::lz8420m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, LZ8420M, tag, owner, clock) { } diff --git a/src/devices/cpu/z80/lz8420m.h b/src/devices/cpu/z80/lz8420m.h index afa653c340d..ce1e06389aa 100644 --- a/src/devices/cpu/z80/lz8420m.h +++ b/src/devices/cpu/z80/lz8420m.h @@ -29,7 +29,7 @@ class lz8420m_device : public z80_device { public: - lz8420m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + lz8420m_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/z80/mc8123.cpp b/src/devices/cpu/z80/mc8123.cpp index 33acc77b096..7581ea4afe8 100644 --- a/src/devices/cpu/z80/mc8123.cpp +++ b/src/devices/cpu/z80/mc8123.cpp @@ -90,7 +90,7 @@ DEFINE_DEVICE_TYPE(MC8123, mc8123_device, "mc8123", "MC-8123") // mc8123_device - constructor //------------------------------------------------- -mc8123_device::mc8123_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc8123_device::mc8123_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, MC8123, tag, owner, clock) , m_key(*this, "key") { diff --git a/src/devices/cpu/z80/mc8123.h b/src/devices/cpu/z80/mc8123.h index 8fad72dbee7..90cbeec6ca1 100644 --- a/src/devices/cpu/z80/mc8123.h +++ b/src/devices/cpu/z80/mc8123.h @@ -17,7 +17,7 @@ class mc8123_device : public z80_device { public: // construction/destruction - mc8123_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc8123_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // this function assumes a fixed portion of ROM at 0000-7FFF, and // an arbitrary amount of banks at 8000-BFFF. diff --git a/src/devices/cpu/z80/r800.cpp b/src/devices/cpu/z80/r800.cpp index 1748f8eca39..bef404155bf 100644 --- a/src/devices/cpu/z80/r800.cpp +++ b/src/devices/cpu/z80/r800.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(R800, r800_device, "r800", "ASCII R800") // r800_device - constructor //------------------------------------------------- -r800_device::r800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +r800_device::r800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, R800, tag, owner, clock) { } diff --git a/src/devices/cpu/z80/r800.h b/src/devices/cpu/z80/r800.h index bad16f8cfdd..2ed0aa1672e 100644 --- a/src/devices/cpu/z80/r800.h +++ b/src/devices/cpu/z80/r800.h @@ -22,7 +22,7 @@ class r800_device : public z80_device { public: // device type constructor - r800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + r800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides diff --git a/src/devices/cpu/z80/tmpz84c011.cpp b/src/devices/cpu/z80/tmpz84c011.cpp index c28aa2b243a..df79ffe59cc 100644 --- a/src/devices/cpu/z80/tmpz84c011.cpp +++ b/src/devices/cpu/z80/tmpz84c011.cpp @@ -32,7 +32,7 @@ void tmpz84c011_device::tmpz84c011_internal_io_map(address_map &map) } -tmpz84c011_device::tmpz84c011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmpz84c011_device::tmpz84c011_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, TMPZ84C011, tag, owner, clock), m_io_space_config( "io", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(tmpz84c011_device::tmpz84c011_internal_io_map), this)), m_ctc(*this, "tmpz84c011_ctc"), diff --git a/src/devices/cpu/z80/tmpz84c011.h b/src/devices/cpu/z80/tmpz84c011.h index 89b40a9f6aa..ab63642518e 100644 --- a/src/devices/cpu/z80/tmpz84c011.h +++ b/src/devices/cpu/z80/tmpz84c011.h @@ -30,7 +30,7 @@ class tmpz84c011_device : public z80_device { public: - tmpz84c011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + tmpz84c011_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto zc0_callback() { return m_zc0_cb.bind(); } diff --git a/src/devices/cpu/z80/tmpz84c015.cpp b/src/devices/cpu/z80/tmpz84c015.cpp index 3df10f19c6c..ebba77d423c 100644 --- a/src/devices/cpu/z80/tmpz84c015.cpp +++ b/src/devices/cpu/z80/tmpz84c015.cpp @@ -28,7 +28,7 @@ void tmpz84c015_device::internal_io_map(address_map &map) } -tmpz84c015_device::tmpz84c015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tmpz84c015_device::tmpz84c015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, TMPZ84C015, tag, owner, clock), m_io_space_config( "io", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(tmpz84c015_device::internal_io_map), this)), m_ctc(*this, "tmpz84c015_ctc"), diff --git a/src/devices/cpu/z80/tmpz84c015.h b/src/devices/cpu/z80/tmpz84c015.h index 99b6f095714..0d982496879 100644 --- a/src/devices/cpu/z80/tmpz84c015.h +++ b/src/devices/cpu/z80/tmpz84c015.h @@ -25,7 +25,7 @@ class tmpz84c015_device : public z80_device { public: - tmpz84c015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + tmpz84c015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index 86d9d29469b..b4b9ed4fdb5 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -3814,12 +3814,12 @@ void z80_device::z80_set_cycle_tables(const uint8_t *op, const uint8_t *cb, cons } -z80_device::z80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80_device::z80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, Z80, tag, owner, clock) { } -z80_device::z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +z80_device::z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock), z80_daisy_chain_interface(mconfig, *this), m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0), @@ -3849,7 +3849,7 @@ device_memory_interface::space_config_vector z80_device::memory_space_config() c DEFINE_DEVICE_TYPE(Z80, z80_device, "z80", "Zilog Z80") -nsc800_device::nsc800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nsc800_device::nsc800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, NSC800, tag, owner, clock) { } diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h index 8d3ac158325..52c0ebab583 100644 --- a/src/devices/cpu/z80/z80.h +++ b/src/devices/cpu/z80/z80.h @@ -30,7 +30,7 @@ enum class z80_device : public cpu_device, public z80_daisy_chain_interface { public: - z80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void z80_set_cycle_tables(const uint8_t *op, const uint8_t *cb, const uint8_t *ed, const uint8_t *xy, const uint8_t *xycb, const uint8_t *ex); template void set_memory_map(T &&... args) { set_addrmap(AS_PROGRAM, std::forward(args)...); } @@ -42,7 +42,7 @@ public: auto halt_cb() { return m_halt_cb.bind(); } protected: - z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -298,7 +298,7 @@ DECLARE_DEVICE_TYPE(Z80, z80_device) class nsc800_device : public z80_device { public: - nsc800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nsc800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/cpu/z8000/z8000.cpp b/src/devices/cpu/z8000/z8000.cpp index 8d462c7eddc..50773f5b587 100644 --- a/src/devices/cpu/z8000/z8000.cpp +++ b/src/devices/cpu/z8000/z8000.cpp @@ -23,13 +23,13 @@ DEFINE_DEVICE_TYPE(Z8001, z8001_device, "z8001", "Zilog Z8001") DEFINE_DEVICE_TYPE(Z8002, z8002_device, "z8002", "Zilog Z8002") -z8002_device::z8002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8002_device::z8002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8002_device(mconfig, Z8002, tag, owner, clock, 16, 1) { } -z8002_device::z8002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits, int vecmult) +z8002_device::z8002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, int vecmult) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 16, addrbits, 0) , m_data_config("data", ENDIANNESS_BIG, 16, addrbits, 0) @@ -45,7 +45,7 @@ z8002_device::z8002_device(const machine_config &mconfig, device_type type, cons } -z8001_device::z8001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8001_device::z8001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z8002_device(mconfig, Z8001, tag, owner, clock, 23, 2) { } diff --git a/src/devices/cpu/z8000/z8000.h b/src/devices/cpu/z8000/z8000.h index 921f8f4eb0f..ce96cac2f6f 100644 --- a/src/devices/cpu/z8000/z8000.h +++ b/src/devices/cpu/z8000/z8000.h @@ -76,7 +76,7 @@ public: }; // construction/destruction - z8002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~z8002_device(); auto segtack() { return m_iack_in[0].bind(); } @@ -87,7 +87,7 @@ public: DECLARE_WRITE_LINE_MEMBER(mi_w) { m_mi = state; } // XXX: this has to apply in the middle of an insn for now protected: - z8002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits, int vecmult); + z8002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, int vecmult); // device-level overrides virtual void device_start() override; @@ -706,7 +706,7 @@ class z8001_device : public z8002_device { public: // construction/destruction - z8001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // z8002_device overrides diff --git a/src/devices/imagedev/avivideo.cpp b/src/devices/imagedev/avivideo.cpp index f1a2b7e1cdc..e12a046b23e 100644 --- a/src/devices/imagedev/avivideo.cpp +++ b/src/devices/imagedev/avivideo.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(IMAGE_AVIVIDEO, avivideo_image_device, "avivideo_image", "AVI // avivideo_image_device - constructor //------------------------------------------------- -avivideo_image_device::avivideo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +avivideo_image_device::avivideo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IMAGE_AVIVIDEO, tag, owner, clock), device_image_interface(mconfig, *this), m_frame(nullptr), diff --git a/src/devices/imagedev/avivideo.h b/src/devices/imagedev/avivideo.h index 5af11df4187..782205250c7 100644 --- a/src/devices/imagedev/avivideo.h +++ b/src/devices/imagedev/avivideo.h @@ -26,7 +26,7 @@ class avivideo_image_device : public device_t, public device_image_interface { public: // construction/destruction - avivideo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + avivideo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~avivideo_image_device(); // image-level overrides diff --git a/src/devices/imagedev/bitbngr.cpp b/src/devices/imagedev/bitbngr.cpp index dc31c4ccb83..643afdc3cd7 100644 --- a/src/devices/imagedev/bitbngr.cpp +++ b/src/devices/imagedev/bitbngr.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(BITBANGER, bitbanger_device, "bitbanger", "Bitbanger") ctor -------------------------------------------------*/ -bitbanger_device::bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bitbanger_device::bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BITBANGER, tag, owner, clock), device_image_interface(mconfig, *this), m_interface(nullptr), diff --git a/src/devices/imagedev/bitbngr.h b/src/devices/imagedev/bitbngr.h index 5b02417cfc3..6f7eb9ce444 100644 --- a/src/devices/imagedev/bitbngr.h +++ b/src/devices/imagedev/bitbngr.h @@ -17,7 +17,7 @@ public: void set_readonly(bool is_readonly) { m_is_readonly = is_readonly; } // construction/destruction - bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual image_init_result call_load() override; diff --git a/src/devices/imagedev/cassette.cpp b/src/devices/imagedev/cassette.cpp index 2bf7c2a4808..15e59e31f8b 100644 --- a/src/devices/imagedev/cassette.cpp +++ b/src/devices/imagedev/cassette.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(CASSETTE, cassette_image_device, "cassette_image", "Cassette" // cassette_image_device - constructor //------------------------------------------------- -cassette_image_device::cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cassette_image_device::cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CASSETTE, tag, owner, clock), device_image_interface(mconfig, *this), device_sound_interface(mconfig, *this), diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h index ad71e062e70..4047272f43e 100644 --- a/src/devices/imagedev/cassette.h +++ b/src/devices/imagedev/cassette.h @@ -49,7 +49,7 @@ class cassette_image_device : public device_t, { public: // construction/destruction - cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~cassette_image_device(); void set_formats(const cassette_image::Format* const *formats) { m_formats = formats; } diff --git a/src/devices/imagedev/chd_cd.cpp b/src/devices/imagedev/chd_cd.cpp index cf87d17b5ef..c9b7191384e 100644 --- a/src/devices/imagedev/chd_cd.cpp +++ b/src/devices/imagedev/chd_cd.cpp @@ -21,12 +21,12 @@ DEFINE_DEVICE_TYPE(CDROM, cdrom_image_device, "cdrom_image", "CD-ROM Image") // cdrom_image_device - constructor //------------------------------------------------- -cdrom_image_device::cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdrom_image_device::cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdrom_image_device(mconfig, CDROM, tag, owner, clock) { } -cdrom_image_device::cdrom_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cdrom_image_device::cdrom_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_image_interface(mconfig, *this), m_cdrom_handle(nullptr), diff --git a/src/devices/imagedev/chd_cd.h b/src/devices/imagedev/chd_cd.h index e93b7969c62..d4b1eac0882 100644 --- a/src/devices/imagedev/chd_cd.h +++ b/src/devices/imagedev/chd_cd.h @@ -27,7 +27,7 @@ class cdrom_image_device : public device_t, { public: // construction/destruction - cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~cdrom_image_device(); void set_interface(const char *interface) { m_interface = interface; } @@ -49,7 +49,7 @@ public: cdrom_file *get_cdrom_file() { return m_cdrom_handle; } protected: - cdrom_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cdrom_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_config_complete() override; diff --git a/src/devices/imagedev/diablo.cpp b/src/devices/imagedev/diablo.cpp index 5f8b45e4064..b34d0b92604 100644 --- a/src/devices/imagedev/diablo.cpp +++ b/src/devices/imagedev/diablo.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(DIABLO, diablo_image_device, "diablo_image", "Diablo") // diablo_image_device - constructor //------------------------------------------------- -diablo_image_device::diablo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +diablo_image_device::diablo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddisk_image_base_device(mconfig, DIABLO, tag, owner, clock), m_chd(nullptr), m_hard_disk_handle(nullptr), diff --git a/src/devices/imagedev/diablo.h b/src/devices/imagedev/diablo.h index 2b483bf8388..974defebc00 100644 --- a/src/devices/imagedev/diablo.h +++ b/src/devices/imagedev/diablo.h @@ -24,7 +24,7 @@ class diablo_image_device : public harddisk_image_base_device { public: // construction/destruction - diablo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diablo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~diablo_image_device(); template void set_device_load(Object &&cb) { m_device_image_load = std::forward(cb); } diff --git a/src/devices/imagedev/flopdrv.cpp b/src/devices/imagedev/flopdrv.cpp index eba391f966e..c13820a8b7a 100644 --- a/src/devices/imagedev/flopdrv.cpp +++ b/src/devices/imagedev/flopdrv.cpp @@ -614,12 +614,12 @@ DEFINE_DEVICE_TYPE(LEGACY_FLOPPY, legacy_floppy_image_device, "legacy_floppy_ima // legacy_floppy_image_device - constructor //------------------------------------------------- -legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_floppy_image_device(mconfig, LEGACY_FLOPPY, tag, owner, clock) { } -legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_image_interface(mconfig, *this), m_out_idx_func(*this), diff --git a/src/devices/imagedev/flopdrv.h b/src/devices/imagedev/flopdrv.h index a3241cc4b89..da98ea1097c 100644 --- a/src/devices/imagedev/flopdrv.h +++ b/src/devices/imagedev/flopdrv.h @@ -90,13 +90,13 @@ class legacy_floppy_image_device : public device_t, { public: // construction/destruction - legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const floppy_interface *config) - : legacy_floppy_image_device(mconfig, tag, owner, clock) + legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const floppy_interface *config) + : legacy_floppy_image_device(mconfig, tag, owner) { set_floppy_config(config); } - legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ~legacy_floppy_image_device(); void set_floppy_config(const floppy_interface *config) { m_config = config; } @@ -163,7 +163,7 @@ private: TIMER_CALLBACK_MEMBER( set_wpt ); protected: - legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + legacy_floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device overrides virtual void device_config_complete() override; diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 3c00336dcd8..4d26d44171f 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -208,7 +208,7 @@ void floppy_image_device::default_pc_floppy_formats(format_registration &fr) fr.add_pc_formats(); } -floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FLOPPY_CONNECTOR, tag, owner, clock), device_slot_interface(mconfig, *this), formats(nullptr), @@ -248,7 +248,7 @@ floppy_image_device *floppy_connector::get_device() // floppy_image_device - constructor //------------------------------------------------- -floppy_image_device::floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +floppy_image_device::floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_image_interface(mconfig, *this), input_format(nullptr), @@ -1500,7 +1500,7 @@ static const char *const floppy525_sample_names[] = nullptr }; -floppy_sound_device::floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +floppy_sound_device::floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : samples_device(mconfig, FLOPPYSOUND, tag, owner, clock), m_sound(nullptr), m_step_base(0), @@ -1801,13 +1801,13 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, std::vector< void floppy_image_device::device_add_mconfig(machine_config &config) { SPEAKER(config, FLOPSPK).front_center(); - FLOPPYSOUND(config, FLOPSND_TAG, 44100).add_route(ALL_OUTPUTS, FLOPSPK, 0.5); + FLOPPYSOUND(config, FLOPSND_TAG, XTAL::u(44100)).add_route(ALL_OUTPUTS, FLOPSPK, 0.5); if (FLUX_SCREEN) { SCREEN(config, m_flux_screen, SCREEN_TYPE_RASTER); m_flux_screen->set_screen_update(FUNC(floppy_image_device::flux_screen_update)); - m_flux_screen->set_raw(30*(flux_screen_sx+1)*(flux_screen_sy+1), flux_screen_sx+1, 0, flux_screen_sx, flux_screen_sy+1, 0, flux_screen_sy); + m_flux_screen->set_raw(XTAL::u(30*(flux_screen_sx+1)*(flux_screen_sy+1)), flux_screen_sx+1, 0, flux_screen_sx, flux_screen_sy+1, 0, flux_screen_sy); m_flux_screen->set_physical_aspect(1, 2); } } @@ -1824,7 +1824,7 @@ DEFINE_DEVICE_TYPE(FLOPPYSOUND, floppy_sound_device, "flopsnd", "Floppy sound") // 3" single-sided double density //------------------------------------------------- -floppy_3_ssdd::floppy_3_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_3_ssdd::floppy_3_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_3_SSDD, tag, owner, clock) { } @@ -1847,7 +1847,7 @@ void floppy_3_ssdd::setup_characteristics() // 3" double-sided double density //------------------------------------------------- -floppy_3_dsdd::floppy_3_dsdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_3_dsdd::floppy_3_dsdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_3_DSDD, tag, owner, clock) { } @@ -1871,7 +1871,7 @@ void floppy_3_dsdd::setup_characteristics() // 3.5" single-sided double density //------------------------------------------------- -floppy_35_ssdd::floppy_35_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_35_ssdd::floppy_35_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_35_SSDD, tag, owner, clock) { } @@ -1895,7 +1895,7 @@ void floppy_35_ssdd::setup_characteristics() // 3.5" double-sided double density //------------------------------------------------- -floppy_35_dd::floppy_35_dd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_35_dd::floppy_35_dd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_35_DD, tag, owner, clock) { } @@ -1920,7 +1920,7 @@ void floppy_35_dd::setup_characteristics() // 3.5" high density //------------------------------------------------- -floppy_35_hd::floppy_35_hd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_35_hd::floppy_35_hd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_35_HD, tag, owner, clock) { } @@ -1946,7 +1946,7 @@ void floppy_35_hd::setup_characteristics() // 3.5" extended density //------------------------------------------------- -floppy_35_ed::floppy_35_ed(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_35_ed::floppy_35_ed(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_35_ED, tag, owner, clock) { } @@ -1973,7 +1973,7 @@ void floppy_35_ed::setup_characteristics() // 5.25" single-sided single density 35 tracks //------------------------------------------------- -floppy_525_sssd_35t::floppy_525_sssd_35t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_sssd_35t::floppy_525_sssd_35t(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_SSSD_35T, tag, owner, clock) { } @@ -1996,7 +1996,7 @@ void floppy_525_sssd_35t::setup_characteristics() // 5.25" double-sided single density 35 tracks //------------------------------------------------- -floppy_525_sd_35t::floppy_525_sd_35t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_sd_35t::floppy_525_sd_35t(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_SD_35T, tag, owner, clock) { } @@ -2020,7 +2020,7 @@ void floppy_525_sd_35t::setup_characteristics() // 5.25" single-sided single density, VTECH edition //------------------------------------------------- -floppy_525_vtech::floppy_525_vtech(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_vtech::floppy_525_vtech(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_VTECH, tag, owner, clock) { amplifier_freakout_time = attotime::from_usec(64); @@ -2044,7 +2044,7 @@ void floppy_525_vtech::setup_characteristics() // 5.25" single-sided single density //------------------------------------------------- -floppy_525_sssd::floppy_525_sssd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_sssd::floppy_525_sssd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_SSSD, tag, owner, clock) { } @@ -2067,7 +2067,7 @@ void floppy_525_sssd::setup_characteristics() // 5.25" double-sided single density //------------------------------------------------- -floppy_525_sd::floppy_525_sd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_sd::floppy_525_sd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_SD, tag, owner, clock) { } @@ -2090,7 +2090,7 @@ void floppy_525_sd::setup_characteristics() // 5.25" single-sided double density //------------------------------------------------- -floppy_525_ssdd::floppy_525_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_ssdd::floppy_525_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_SSDD, tag, owner, clock) { } @@ -2114,7 +2114,7 @@ void floppy_525_ssdd::setup_characteristics() // 5.25" double-sided double density //------------------------------------------------- -floppy_525_dd::floppy_525_dd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_dd::floppy_525_dd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_DD, tag, owner, clock) { } @@ -2139,7 +2139,7 @@ void floppy_525_dd::setup_characteristics() // 5.25" single-sided quad density //------------------------------------------------- -floppy_525_ssqd::floppy_525_ssqd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_ssqd::floppy_525_ssqd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_SSQD, tag, owner, clock) { } @@ -2164,7 +2164,7 @@ void floppy_525_ssqd::setup_characteristics() // 5.25" double-sided quad density //------------------------------------------------- -floppy_525_qd::floppy_525_qd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_qd::floppy_525_qd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_QD, tag, owner, clock) { } @@ -2192,7 +2192,7 @@ void floppy_525_qd::setup_characteristics() // 5.25" high density //------------------------------------------------- -floppy_525_hd::floppy_525_hd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_525_hd::floppy_525_hd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_525_HD, tag, owner, clock) { } @@ -2220,7 +2220,7 @@ void floppy_525_hd::setup_characteristics() // 8" single-sided single density //------------------------------------------------- -floppy_8_sssd::floppy_8_sssd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_8_sssd::floppy_8_sssd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_8_SSSD, tag, owner, clock) { } @@ -2244,7 +2244,7 @@ void floppy_8_sssd::setup_characteristics() // 8" double-sided single density //------------------------------------------------- -floppy_8_dssd::floppy_8_dssd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_8_dssd::floppy_8_dssd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_8_DSSD, tag, owner, clock) { } @@ -2269,7 +2269,7 @@ void floppy_8_dssd::setup_characteristics() // 8" single-sided double density //------------------------------------------------- -floppy_8_ssdd::floppy_8_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_8_ssdd::floppy_8_ssdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_8_SSDD, tag, owner, clock) { } @@ -2294,7 +2294,7 @@ void floppy_8_ssdd::setup_characteristics() // 8" double-sided double density //------------------------------------------------- -floppy_8_dsdd::floppy_8_dsdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +floppy_8_dsdd::floppy_8_dsdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, FLOPPY_8_DSDD, tag, owner, clock) { } @@ -2331,7 +2331,7 @@ void floppy_8_dsdd::setup_characteristics() // //------------------------------------------------- -epson_smd_165::epson_smd_165(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_smd_165::epson_smd_165(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, EPSON_SMD_165, tag, owner, clock) { } @@ -2378,7 +2378,7 @@ void epson_smd_165::setup_characteristics() // //------------------------------------------------- -epson_sd_320::epson_sd_320(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_sd_320::epson_sd_320(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, EPSON_SD_320, tag, owner, clock) { } @@ -2406,7 +2406,7 @@ void epson_sd_320::setup_characteristics() // //------------------------------------------------- -epson_sd_321::epson_sd_321(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +epson_sd_321::epson_sd_321(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, EPSON_SD_321, tag, owner, clock) { } @@ -2438,7 +2438,7 @@ void epson_sd_321::setup_characteristics() // //------------------------------------------------- -pana_ju_363::pana_ju_363(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pana_ju_363::pana_ju_363(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, PANA_JU_363, tag, owner, clock) { } @@ -2470,7 +2470,7 @@ void pana_ju_363::setup_characteristics() // //------------------------------------------------- -sony_oa_d31v::sony_oa_d31v(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sony_oa_d31v::sony_oa_d31v(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, SONY_OA_D31V, tag, owner, clock) { } @@ -2502,7 +2502,7 @@ void sony_oa_d31v::setup_characteristics() // //------------------------------------------------- -sony_oa_d32w::sony_oa_d32w(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sony_oa_d32w::sony_oa_d32w(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, SONY_OA_D32W, tag, owner, clock) { } @@ -2535,7 +2535,7 @@ void sony_oa_d32w::setup_characteristics() // //------------------------------------------------- -sony_oa_d32v::sony_oa_d32v(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sony_oa_d32v::sony_oa_d32v(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, SONY_OA_D32V, tag, owner, clock) { } @@ -2566,7 +2566,7 @@ void sony_oa_d32v::setup_characteristics() // //------------------------------------------------- -teac_fd_30a::teac_fd_30a(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +teac_fd_30a::teac_fd_30a(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, TEAC_FD_30A, tag, owner, clock) { } @@ -2595,7 +2595,7 @@ void teac_fd_30a::setup_characteristics() // //------------------------------------------------- -teac_fd_55e::teac_fd_55e(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +teac_fd_55e::teac_fd_55e(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, TEAC_FD_55E, tag, owner, clock) { } @@ -2626,7 +2626,7 @@ void teac_fd_55e::setup_characteristics() // //------------------------------------------------- -teac_fd_55f::teac_fd_55f(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +teac_fd_55f::teac_fd_55f(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, TEAC_FD_55F, tag, owner, clock) { } @@ -2660,7 +2660,7 @@ void teac_fd_55f::setup_characteristics() // //------------------------------------------------- -teac_fd_55g::teac_fd_55g(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +teac_fd_55g::teac_fd_55g(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, TEAC_FD_55G, tag, owner, clock) { } @@ -2690,7 +2690,7 @@ void teac_fd_55g::setup_characteristics() // used in the Commodoere 1541 disk drive //------------------------------------------------- -alps_3255190x::alps_3255190x(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +alps_3255190x::alps_3255190x(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, ALPS_3255190X, tag, owner, clock) { } @@ -2714,7 +2714,7 @@ void alps_3255190x::setup_characteristics() // IBM 6360 -- 8" single-sided single density //------------------------------------------------- -ibm_6360::ibm_6360(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ibm_6360::ibm_6360(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, IBM_6360, tag, owner, clock) { } @@ -2740,7 +2740,7 @@ void ibm_6360::setup_characteristics() // Variable-speed Macintosh drives //------------------------------------------------- -mac_floppy_device::mac_floppy_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : floppy_image_device(mconfig, type, tag, owner, clock) +mac_floppy_device::mac_floppy_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : floppy_image_device(mconfig, type, tag, owner, clock) { m_has_mfm = false; dskchg_writable = true; @@ -2963,7 +2963,7 @@ void mac_floppy_device::tfsel_w(int state) } } -oa_d34v_device::oa_d34v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mac_floppy_device(mconfig, OAD34V, tag, owner, clock) +oa_d34v_device::oa_d34v_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mac_floppy_device(mconfig, OAD34V, tag, owner, clock) { } @@ -2990,7 +2990,7 @@ void oa_d34v_device::track_changed() floppy_image_device::track_changed(); } -mfd51w_device::mfd51w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mac_floppy_device(mconfig, MFD51W, tag, owner, clock) +mfd51w_device::mfd51w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mac_floppy_device(mconfig, MFD51W, tag, owner, clock) { } void mfd51w_device::setup_characteristics() @@ -3009,7 +3009,7 @@ bool mfd51w_device::is_2m() const return true; } -mfd75w_device::mfd75w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mac_floppy_device(mconfig, MFD75W, tag, owner, clock) +mfd75w_device::mfd75w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mac_floppy_device(mconfig, MFD75W, tag, owner, clock) { m_has_mfm = true; } diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h index 3d551ee72ab..8f04c73ac31 100644 --- a/src/devices/imagedev/floppy.h +++ b/src/devices/imagedev/floppy.h @@ -164,7 +164,7 @@ protected: virtual void add_format(const floppy_image_format_t &type, u32 image_size, const char *name, const char *description) override; }; - floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + floppy_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -309,7 +309,7 @@ protected: #define DECLARE_FLOPPY_IMAGE_DEVICE(Type, Name, Interface) \ class Name : public floppy_image_device { \ public: \ - Name(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); \ + Name(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); \ virtual ~Name(); \ virtual const char *image_interface() const noexcept override { return Interface; } \ protected: \ @@ -369,7 +369,7 @@ protected: bool m_strb; bool m_mfm, m_has_mfm; - mac_floppy_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mac_floppy_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -381,7 +381,7 @@ protected: // 400K GCR class oa_d34v_device : public mac_floppy_device { public: - oa_d34v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + oa_d34v_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~oa_d34v_device() = default; protected: virtual void setup_characteristics() override; @@ -393,7 +393,7 @@ protected: // 400/800K GCR (e.g. dual-sided) class mfd51w_device : public mac_floppy_device { public: - mfd51w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mfd51w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~mfd51w_device() = default; protected: virtual void setup_characteristics() override; @@ -404,7 +404,7 @@ protected: // 400/800K GCR + 1.44 MFM (Superdrive) class mfd75w_device : public mac_floppy_device { public: - mfd75w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mfd75w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~mfd75w_device() = default; protected: @@ -425,7 +425,7 @@ DECLARE_DEVICE_TYPE(MFD75W, mfd75w_device) class floppy_sound_device : public samples_device { public: - floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void motor(bool on, bool withdisk); void step(int track); bool samples_loaded() { return m_loaded; } @@ -463,7 +463,7 @@ class floppy_connector: public device_t, public: template floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, std::function formats, bool fixed = false) - : floppy_connector(mconfig, tag, owner, 0) + : floppy_connector(mconfig, tag, owner) { option_reset(); opts(*this); @@ -472,7 +472,7 @@ public: set_formats(formats); } floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, const char *option, const device_type &devtype, bool is_default, std::function formats) - : floppy_connector(mconfig, tag, owner, 0) + : floppy_connector(mconfig, tag, owner) { option_reset(); option_add(option, devtype); @@ -481,7 +481,7 @@ public: set_fixed(false); set_formats(formats); } - floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~floppy_connector(); void set_formats(std::function formats); diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp index decb4e09909..fdd96bf2e81 100644 --- a/src/devices/imagedev/harddriv.cpp +++ b/src/devices/imagedev/harddriv.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(HARDDISK, harddisk_image_device, "harddisk_image", "Harddisk" // harddisk_image_base_device - constructor //------------------------------------------------- -harddisk_image_base_device::harddisk_image_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +harddisk_image_base_device::harddisk_image_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_image_interface(mconfig, *this) { @@ -53,7 +53,7 @@ harddisk_image_base_device::harddisk_image_base_device(const machine_config &mco // harddisk_image_device - constructor //------------------------------------------------- -harddisk_image_device::harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +harddisk_image_device::harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddisk_image_device(mconfig, HARDDISK, tag, owner, clock) { } @@ -62,7 +62,7 @@ harddisk_image_device::harddisk_image_device(const machine_config &mconfig, cons // harddisk_image_device - constructor for subclasses //------------------------------------------------- -harddisk_image_device::harddisk_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +harddisk_image_device::harddisk_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : harddisk_image_base_device(mconfig, type, tag, owner, clock), m_chd(nullptr), m_hard_disk_handle(nullptr), diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h index 5b3b8d7dde3..0101354c67b 100644 --- a/src/devices/imagedev/harddriv.h +++ b/src/devices/imagedev/harddriv.h @@ -24,7 +24,7 @@ class harddisk_image_base_device : public device_t, public device_image_interfac { protected: // construction/destruction - harddisk_image_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + harddisk_image_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual bool is_readable() const noexcept override { return true; } @@ -42,11 +42,11 @@ class harddisk_image_device : public harddisk_image_base_device public: // construction/destruction harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intf) - : harddisk_image_device(mconfig, tag, owner, (uint32_t)0) + : harddisk_image_device(mconfig, tag, owner) { set_interface(intf); } - harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~harddisk_image_device(); template void set_device_load(T &&... args) { m_device_image_load.set(std::forward(args)...); } @@ -67,7 +67,7 @@ public: hard_disk_file *get_hard_disk_file() { return m_hard_disk_handle; } protected: - harddisk_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + harddisk_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_config_complete() override; diff --git a/src/devices/imagedev/magtape.cpp b/src/devices/imagedev/magtape.cpp index dd1754ff4e3..02660b5db9c 100644 --- a/src/devices/imagedev/magtape.cpp +++ b/src/devices/imagedev/magtape.cpp @@ -18,13 +18,13 @@ #include "softlist_dev.h" -magtape_image_device::magtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +magtape_image_device::magtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_image_interface(mconfig, *this) { } -microtape_image_device::microtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +microtape_image_device::microtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : magtape_image_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/imagedev/magtape.h b/src/devices/imagedev/magtape.h index 5834573240c..3feb855a25a 100644 --- a/src/devices/imagedev/magtape.h +++ b/src/devices/imagedev/magtape.h @@ -33,7 +33,7 @@ public: protected: // construction/destruction - magtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + magtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device_image_interface implementation virtual const software_list_loader &get_software_list_loader() const override; @@ -45,7 +45,7 @@ class microtape_image_device : public magtape_image_device { protected: // construction/destruction - microtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + microtape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual const char *image_type_name() const noexcept override { return "microtape"; } diff --git a/src/devices/imagedev/mfmhd.cpp b/src/devices/imagedev/mfmhd.cpp index 7bbab1e97da..34a3a667836 100644 --- a/src/devices/imagedev/mfmhd.cpp +++ b/src/devices/imagedev/mfmhd.cpp @@ -304,7 +304,7 @@ enum STEP_SETTLE }; -mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_image_interface(mconfig, *this), m_index_timer(nullptr), @@ -938,7 +938,7 @@ int mfm_harddisk_device::get_actual_heads() /* The generic HD takes any kind of CHD HD image and magically creates enough heads and cylinders. */ -mfm_hd_generic_device::mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mfm_hd_generic_device::mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mfm_harddisk_device(mconfig, MFMHD_GENERIC, tag, owner, clock) { } @@ -948,7 +948,7 @@ DEFINE_DEVICE_TYPE(MFMHD_GENERIC, mfm_hd_generic_device, "mfm_harddisk", "Generi /* Various models. */ -mfm_hd_st213_device::mfm_hd_st213_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mfm_hd_st213_device::mfm_hd_st213_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mfm_harddisk_device(mconfig, MFMHD_ST213, tag, owner, clock) { m_phys_cylinders = 670; @@ -961,7 +961,7 @@ mfm_hd_st213_device::mfm_hd_st213_device(const machine_config &mconfig, const ch DEFINE_DEVICE_TYPE(MFMHD_ST213, mfm_hd_st213_device, "mfm_hd_st213", "Seagate ST-213 MFM hard disk") -mfm_hd_st225_device::mfm_hd_st225_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mfm_hd_st225_device::mfm_hd_st225_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mfm_harddisk_device(mconfig, MFMHD_ST225, tag, owner, clock) { m_phys_cylinders = 670; @@ -974,7 +974,7 @@ mfm_hd_st225_device::mfm_hd_st225_device(const machine_config &mconfig, const ch DEFINE_DEVICE_TYPE(MFMHD_ST225, mfm_hd_st225_device, "mfm_hd_st225", "Seagate ST-225 MFM hard disk") -mfm_hd_st251_device::mfm_hd_st251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mfm_hd_st251_device::mfm_hd_st251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mfm_harddisk_device(mconfig, MFMHD_ST251, tag, owner, clock) { m_phys_cylinders = 821; @@ -1182,7 +1182,7 @@ uint16_t* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head) // ================================================================ -mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, MFM_HD_CONNECTOR, tag, owner, clock), device_slot_interface(mconfig, *this), m_encoding(), diff --git a/src/devices/imagedev/mfmhd.h b/src/devices/imagedev/mfmhd.h index ce66a43fa3b..4ae5f23a27a 100644 --- a/src/devices/imagedev/mfmhd.h +++ b/src/devices/imagedev/mfmhd.h @@ -113,7 +113,7 @@ public: int get_actual_heads(); protected: - mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_stop() override; @@ -188,7 +188,7 @@ private: class mfm_hd_generic_device : public mfm_harddisk_device { public: - mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(MFMHD_GENERIC, mfm_hd_generic_device) @@ -196,7 +196,7 @@ DECLARE_DEVICE_TYPE(MFMHD_GENERIC, mfm_hd_generic_device) class mfm_hd_st213_device : public mfm_harddisk_device { public: - mfm_hd_st213_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mfm_hd_st213_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(MFMHD_ST213, mfm_hd_st213_device) @@ -204,7 +204,7 @@ DECLARE_DEVICE_TYPE(MFMHD_ST213, mfm_hd_st213_device) class mfm_hd_st225_device : public mfm_harddisk_device { public: - mfm_hd_st225_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mfm_hd_st225_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(MFMHD_ST225, mfm_hd_st225_device) @@ -212,7 +212,7 @@ DECLARE_DEVICE_TYPE(MFMHD_ST225, mfm_hd_st225_device) class mfm_hd_st251_device : public mfm_harddisk_device { public: - mfm_hd_st251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mfm_hd_st251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(MFMHD_ST251, mfm_hd_st251_device) @@ -228,7 +228,7 @@ public: template mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, mfmhd_enc_t enc, int spinup, int cache, const mfmhd_format_type format, bool fixed = false) - : mfm_harddisk_connector(mconfig, tag, owner, 0) + : mfm_harddisk_connector(mconfig, tag, owner) { option_reset(); opts(*this); @@ -237,7 +237,7 @@ public: configure(enc, spinup, cache, format); } - mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ~mfm_harddisk_connector(); mfm_harddisk_device *get_device(); diff --git a/src/devices/imagedev/microdrv.cpp b/src/devices/imagedev/microdrv.cpp index 02168270523..a2c44d7de3a 100644 --- a/src/devices/imagedev/microdrv.cpp +++ b/src/devices/imagedev/microdrv.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(MICRODRIVE, microdrive_image_device, "microdrive_image", "Sin // microdrive_image_device - constructor //------------------------------------------------- -microdrive_image_device::microdrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +microdrive_image_device::microdrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : microtape_image_device(mconfig, MICRODRIVE, tag, owner, clock), m_write_comms_out(*this) { diff --git a/src/devices/imagedev/microdrv.h b/src/devices/imagedev/microdrv.h index 5bd7d6a37da..51cfcd6676a 100644 --- a/src/devices/imagedev/microdrv.h +++ b/src/devices/imagedev/microdrv.h @@ -34,7 +34,7 @@ class microdrive_image_device : public microtape_image_device { public: // construction/destruction - microdrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + microdrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~microdrive_image_device(); auto comms_out_wr_callback() { return m_write_comms_out.bind(); } diff --git a/src/devices/imagedev/midiin.cpp b/src/devices/imagedev/midiin.cpp index 59211d06f88..cefeb6cfb05 100644 --- a/src/devices/imagedev/midiin.cpp +++ b/src/devices/imagedev/midiin.cpp @@ -48,7 +48,7 @@ INPUT_PORTS_END ctor -------------------------------------------------*/ -midiin_device::midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midiin_device::midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDIIN, tag, owner, clock), device_image_interface(mconfig, *this), device_serial_interface(mconfig, *this), @@ -90,8 +90,8 @@ void midiin_device::device_reset() // we don't Rx, we Tx at 31250 8-N-1 set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(0); - set_tra_rate(31250); + set_rcv_rate(XTAL::u(0)); + set_tra_rate(XTAL::u(31250)); } /*------------------------------------------------- diff --git a/src/devices/imagedev/midiin.h b/src/devices/imagedev/midiin.h index aed7d3b15a9..02bd4e16ee7 100644 --- a/src/devices/imagedev/midiin.h +++ b/src/devices/imagedev/midiin.h @@ -26,7 +26,7 @@ class midiin_device : public device_t, { public: // construction/destruction - midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~midiin_device(); auto input_callback() { return m_input_cb.bind(); } diff --git a/src/devices/imagedev/midiout.cpp b/src/devices/imagedev/midiout.cpp index 026b6520143..08130f5746f 100644 --- a/src/devices/imagedev/midiout.cpp +++ b/src/devices/imagedev/midiout.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(MIDIOUT, midiout_device, "midiout", "MIDI Out image device") ctor -------------------------------------------------*/ -midiout_device::midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midiout_device::midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDIOUT, tag, owner, clock), device_image_interface(mconfig, *this), device_serial_interface(mconfig, *this), @@ -47,8 +47,8 @@ void midiout_device::device_reset() { // we don't Tx, we Rx at 31250 8-N-1 set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(31250); - set_tra_rate(0); + set_rcv_rate(XTAL::u(31250)); + set_tra_rate(XTAL::u(0)); } /*------------------------------------------------- diff --git a/src/devices/imagedev/midiout.h b/src/devices/imagedev/midiout.h index 7b39e4fff5e..5714d239985 100644 --- a/src/devices/imagedev/midiout.h +++ b/src/devices/imagedev/midiout.h @@ -26,7 +26,7 @@ class midiout_device : public device_t, { public: // construction/destruction - midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~midiout_device(); // image-level overrides diff --git a/src/devices/imagedev/papertape.cpp b/src/devices/imagedev/papertape.cpp index f8cea6b2996..3522f6e4821 100644 --- a/src/devices/imagedev/papertape.cpp +++ b/src/devices/imagedev/papertape.cpp @@ -16,18 +16,18 @@ #include "softlist_dev.h" -paper_tape_image_device::paper_tape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +paper_tape_image_device::paper_tape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_image_interface(mconfig, *this) { } -paper_tape_reader_device::paper_tape_reader_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +paper_tape_reader_device::paper_tape_reader_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_image_device(mconfig, type, tag, owner, clock) { } -paper_tape_punch_device::paper_tape_punch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +paper_tape_punch_device::paper_tape_punch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_image_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/imagedev/papertape.h b/src/devices/imagedev/papertape.h index a0fa6b9cada..a90dabc45f4 100644 --- a/src/devices/imagedev/papertape.h +++ b/src/devices/imagedev/papertape.h @@ -29,7 +29,7 @@ public: protected: // construction/destruction - paper_tape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + paper_tape_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> paper_tape_reader_device @@ -45,7 +45,7 @@ public: protected: // construction/destruction - paper_tape_reader_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + paper_tape_reader_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device_image_interface implementation virtual const software_list_loader &get_software_list_loader() const override; @@ -65,7 +65,7 @@ public: protected: // construction/destruction - paper_tape_punch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + paper_tape_punch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_DEVICES_IMAGEDEV_PAPERTAPE_H diff --git a/src/devices/imagedev/picture.cpp b/src/devices/imagedev/picture.cpp index b617cd2eeba..ffb8c3e1899 100644 --- a/src/devices/imagedev/picture.cpp +++ b/src/devices/imagedev/picture.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(IMAGE_PICTURE, picture_image_device, "picture_image", "Still // picture_image_device - constructor //------------------------------------------------- -picture_image_device::picture_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +picture_image_device::picture_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IMAGE_PICTURE, tag, owner, clock), device_image_interface(mconfig, *this) { diff --git a/src/devices/imagedev/picture.h b/src/devices/imagedev/picture.h index b53dab22062..6f0df15986a 100644 --- a/src/devices/imagedev/picture.h +++ b/src/devices/imagedev/picture.h @@ -26,7 +26,7 @@ class picture_image_device : public device_t, { public: // construction/destruction - picture_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + picture_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~picture_image_device(); // image-level overrides diff --git a/src/devices/imagedev/printer.cpp b/src/devices/imagedev/printer.cpp index 2eb187d843a..0bcef6b9f7e 100644 --- a/src/devices/imagedev/printer.cpp +++ b/src/devices/imagedev/printer.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(PRINTER, printer_image_device, "printer_image", "Printer") // printer_image_device - constructor //------------------------------------------------- -printer_image_device::printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +printer_image_device::printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PRINTER, tag, owner, clock), device_image_interface(mconfig, *this), m_online_cb(*this) diff --git a/src/devices/imagedev/printer.h b/src/devices/imagedev/printer.h index 509ecc43ef2..0b8c16de166 100644 --- a/src/devices/imagedev/printer.h +++ b/src/devices/imagedev/printer.h @@ -25,7 +25,7 @@ class printer_image_device : public device_t, { public: // construction/destruction - printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto online_callback() { return m_online_cb.bind(); } diff --git a/src/devices/imagedev/snapquik.cpp b/src/devices/imagedev/snapquik.cpp index 53c682827ea..0726a0c334a 100644 --- a/src/devices/imagedev/snapquik.cpp +++ b/src/devices/imagedev/snapquik.cpp @@ -20,12 +20,12 @@ DEFINE_DEVICE_TYPE(SNAPSHOT, snapshot_image_device, "snapsot_image", "Snapshot") // snapshot_image_device - constructor //------------------------------------------------- -snapshot_image_device::snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +snapshot_image_device::snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : snapshot_image_device(mconfig, SNAPSHOT, tag, owner, clock) { } -snapshot_image_device::snapshot_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +snapshot_image_device::snapshot_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_image_interface(mconfig, *this) , m_load(*this) @@ -90,7 +90,7 @@ DEFINE_DEVICE_TYPE(QUICKLOAD, quickload_image_device, "quickload", "Quickload") // quickload_image_device - constructor //------------------------------------------------- -quickload_image_device::quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +quickload_image_device::quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : snapshot_image_device(mconfig, QUICKLOAD, tag, owner, clock) { } diff --git a/src/devices/imagedev/snapquik.h b/src/devices/imagedev/snapquik.h index f312e4d4f39..489db53cb35 100644 --- a/src/devices/imagedev/snapquik.h +++ b/src/devices/imagedev/snapquik.h @@ -22,12 +22,12 @@ public: // construction/destruction snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const char* extensions, attotime delay = attotime::zero) - : snapshot_image_device(mconfig, tag, owner, 0U) + : snapshot_image_device(mconfig, tag, owner) { set_extensions(extensions); set_delay(delay); } - snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~snapshot_image_device(); void set_interface(const char *interface) { m_interface = interface; } @@ -49,7 +49,7 @@ public: template void set_load_callback(T &&... args) { m_load.set(std::forward(args)...); } protected: - snapshot_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + snapshot_image_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -76,12 +76,12 @@ class quickload_image_device : public snapshot_image_device public: // construction/destruction quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const char* extensions, attotime delay = attotime::zero) - : quickload_image_device(mconfig, tag, owner, 0U) + : quickload_image_device(mconfig, tag, owner) { set_extensions(extensions); set_delay(delay); } - quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual const char *image_type_name() const noexcept override { return "quickload"; } virtual const char *image_brief_type_name() const noexcept override { return "quik"; } diff --git a/src/devices/imagedev/wafadrive.cpp b/src/devices/imagedev/wafadrive.cpp index 237e809075b..1958aaee0b4 100644 --- a/src/devices/imagedev/wafadrive.cpp +++ b/src/devices/imagedev/wafadrive.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(WAFADRIVE_IMAGE, wafadrive_image_device, "wafadrive_image", " // microdrive_image_device - constructor //------------------------------------------------- -wafadrive_image_device::wafadrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wafadrive_image_device::wafadrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : microtape_image_device(mconfig, WAFADRIVE_IMAGE, tag, owner, clock) { } diff --git a/src/devices/imagedev/wafadrive.h b/src/devices/imagedev/wafadrive.h index 532288dcba9..435e27f1247 100644 --- a/src/devices/imagedev/wafadrive.h +++ b/src/devices/imagedev/wafadrive.h @@ -26,7 +26,7 @@ class wafadrive_image_device : public microtape_image_device { public: // construction/destruction - wafadrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + wafadrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~wafadrive_image_device(); // image-level overrides diff --git a/src/devices/machine/1ma6.cpp b/src/devices/machine/1ma6.cpp index 621e6aa6960..4e2b3936784 100644 --- a/src/devices/machine/1ma6.cpp +++ b/src/devices/machine/1ma6.cpp @@ -110,7 +110,7 @@ enum { HOLE_TMR_ID }; -hp_1ma6_device::hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_1ma6_device::hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP_1MA6 , tag , owner , clock) , m_tape(*this , "drive") { diff --git a/src/devices/machine/1ma6.h b/src/devices/machine/1ma6.h index cb083e05c88..27f8a95ddf1 100644 --- a/src/devices/machine/1ma6.h +++ b/src/devices/machine/1ma6.h @@ -20,7 +20,7 @@ class hp_1ma6_device : public device_t { public: // construction/destruction - hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Register read/write void reg_w(offs_t offset, uint8_t data); diff --git a/src/devices/machine/1mb5.cpp b/src/devices/machine/1mb5.cpp index 054202b06e1..79b7e007aad 100644 --- a/src/devices/machine/1mb5.cpp +++ b/src/devices/machine/1mb5.cpp @@ -48,7 +48,7 @@ namespace { } } -hp_1mb5_device::hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_1mb5_device::hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP_1MB5 , tag , owner , clock), m_irl_handler(*this), m_halt_handler(*this), diff --git a/src/devices/machine/1mb5.h b/src/devices/machine/1mb5.h index 13b1296e6cc..bd2821cf3c0 100644 --- a/src/devices/machine/1mb5.h +++ b/src/devices/machine/1mb5.h @@ -17,7 +17,7 @@ class hp_1mb5_device : public device_t { public: // construction/destruction - hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration helpers auto irl_handler() { return m_irl_handler.bind(); } diff --git a/src/devices/machine/2812fifo.cpp b/src/devices/machine/2812fifo.cpp index 3cc10965ecb..ffa019b8c3e 100644 --- a/src/devices/machine/2812fifo.cpp +++ b/src/devices/machine/2812fifo.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(FIFO2812, fifo2812_device, "fifo2812", "2812 32x8 FIFO Memory"); -fifo2812_device::fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +fifo2812_device::fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FIFO2812, tag, owner, clock), m_q_cb(*this), m_ir_cb(*this), diff --git a/src/devices/machine/2812fifo.h b/src/devices/machine/2812fifo.h index 01c42624c09..5ed387ff80a 100644 --- a/src/devices/machine/2812fifo.h +++ b/src/devices/machine/2812fifo.h @@ -32,7 +32,7 @@ class fifo2812_device : public device_t { public: // standard constructor - fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto q_cb() { return m_q_cb.bind(); } diff --git a/src/devices/machine/28fxxx.cpp b/src/devices/machine/28fxxx.cpp index 60351ee7565..f104114e433 100644 --- a/src/devices/machine/28fxxx.cpp +++ b/src/devices/machine/28fxxx.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(AMD_28F020, amd_28f020_device, "amd_28f020", "Am28F020 2 Mega ALLOW_SAVE_TYPE(base_28fxxx_device::state); -base_28fxxx_device::base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size, u8 manufacturer_code, u8 device_code) +base_28fxxx_device::base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size, u8 manufacturer_code, u8 device_code) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_region(*this, DEVICE_SELF) @@ -62,17 +62,17 @@ base_28fxxx_device::base_28fxxx_device(const machine_config &mconfig, device_typ throw emu_fatalerror("%s(%s): memory size must be an exact power of two", type.shortname(), tag); } -intel_28f010_device::intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +intel_28f010_device::intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_28fxxx_device(mconfig, INTEL_28F010, tag, owner, clock, 0x20000, MFG_INTEL, 0xb4) { } -amd_28f010_device::amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +amd_28f010_device::amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_28fxxx_device(mconfig, AMD_28F010, tag, owner, clock, 0x20000, MFG_AMD, 0xa7) { } -amd_28f020_device::amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +amd_28f020_device::amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_28fxxx_device(mconfig, AMD_28F020, tag, owner, clock, 0x40000, MFG_AMD, 0x2a) { } diff --git a/src/devices/machine/28fxxx.h b/src/devices/machine/28fxxx.h index 9ec25a6a7d9..55bb6c5172a 100644 --- a/src/devices/machine/28fxxx.h +++ b/src/devices/machine/28fxxx.h @@ -26,7 +26,7 @@ public: void write(offs_t offset, u8 data); protected: - base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size, u8 manufacturer_code, u8 device_code); + base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size, u8 manufacturer_code, u8 device_code); virtual void device_start() override; @@ -69,19 +69,19 @@ private: class intel_28f010_device : public base_28fxxx_device { public: - intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_28f010_device : public base_28fxxx_device { public: - amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_28f020_device : public base_28fxxx_device { public: - amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(INTEL_28F010, intel_28f010_device) diff --git a/src/devices/machine/40105.cpp b/src/devices/machine/40105.cpp index ffcfab73da9..51279c61e39 100644 --- a/src/devices/machine/40105.cpp +++ b/src/devices/machine/40105.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(CD40105, cmos_40105_device, "cd40105", "CD40105B FIFO Registe // cmos_40105_device - constructor //------------------------------------------------- -cmos_40105_device::cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cmos_40105_device::cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CD40105, tag, owner, clock), m_write_dir(*this), m_write_dor(*this), diff --git a/src/devices/machine/40105.h b/src/devices/machine/40105.h index 5b35de12a58..82d61cbc053 100644 --- a/src/devices/machine/40105.h +++ b/src/devices/machine/40105.h @@ -35,7 +35,7 @@ class cmos_40105_device : public device_t { public: // construction/destruction - cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_ready_cb() { return m_write_dir.bind(); } auto out_ready_cb() { return m_write_dor.bind(); } diff --git a/src/devices/machine/53c7xx.cpp b/src/devices/machine/53c7xx.cpp index 754d2714909..1dacd5196bc 100644 --- a/src/devices/machine/53c7xx.cpp +++ b/src/devices/machine/53c7xx.cpp @@ -87,7 +87,7 @@ DEFINE_DEVICE_TYPE(NCR53C7XX, ncr53c7xx_device, "ncr537xx", "NCR 53C7xx SCSI") // ncr53c7xx_device - constructor/destructor //------------------------------------------------- -ncr53c7xx_device::ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53c7xx_device::ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, NCR53C7XX, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), device_execute_interface(mconfig, *this), diff --git a/src/devices/machine/53c7xx.h b/src/devices/machine/53c7xx.h index 2d6c695acd2..f7b351b0bff 100644 --- a/src/devices/machine/53c7xx.h +++ b/src/devices/machine/53c7xx.h @@ -20,7 +20,7 @@ class ncr53c7xx_device : public nscsi_device, public nscsi_slot_card_interface, { public: // construction/destruction - ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/53c810.cpp b/src/devices/machine/53c810.cpp index 261d640b340..f9f622a98d2 100644 --- a/src/devices/machine/53c810.cpp +++ b/src/devices/machine/53c810.cpp @@ -621,7 +621,7 @@ void lsi53c810_device::add_opcode(uint8_t op, uint8_t mask, opcode_handler_deleg } } -lsi53c810_device::lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lsi53c810_device::lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, LSI53C810, tag, owner, clock) , m_irq_cb(*this) , m_dma_cb(*this) diff --git a/src/devices/machine/53c810.h b/src/devices/machine/53c810.h index b6ecd035072..3a98c670144 100644 --- a/src/devices/machine/53c810.h +++ b/src/devices/machine/53c810.h @@ -15,7 +15,7 @@ public: typedef device_delegate fetch_delegate; // construction/destruction - lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_irq_callback(T &&... args) { diff --git a/src/devices/machine/64h156.cpp b/src/devices/machine/64h156.cpp index bf859402e55..ba190ff0341 100644 --- a/src/devices/machine/64h156.cpp +++ b/src/devices/machine/64h156.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(C64H156, c64h156_device, "c64h156", "Commodore 64H156") // c64h156_device - constructor //------------------------------------------------- -c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64H156, tag, owner, clock), m_write_atn(*this), m_write_sync(*this), diff --git a/src/devices/machine/64h156.h b/src/devices/machine/64h156.h index 0f6508caab6..ee9a1079405 100644 --- a/src/devices/machine/64h156.h +++ b/src/devices/machine/64h156.h @@ -76,7 +76,7 @@ class c64h156_device : public device_t { public: // construction/destruction - c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto atn_callback() { return m_write_atn.bind(); } auto sync_callback() { return m_write_sync.bind(); } diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp index 5224fc4fbd5..56ef0a3e0dc 100644 --- a/src/devices/machine/6522via.cpp +++ b/src/devices/machine/6522via.cpp @@ -180,7 +180,7 @@ void via6522_device::map(address_map &map) // via6522_device - constructor //------------------------------------------------- -via6522_device::via6522_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +via6522_device::via6522_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_in_a_handler(*this), m_in_b_handler(*this), @@ -209,7 +209,7 @@ via6522_device::via6522_device(const machine_config &mconfig, device_type type, // mos6522_device - constructor //------------------------------------------------- -mos6522_device::mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6522_device::mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, MOS6522, tag, owner, clock) { } @@ -219,7 +219,7 @@ mos6522_device::mos6522_device(const machine_config &mconfig, const char *tag, d // r65c22_device - constructor //------------------------------------------------- -r65c22_device::r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r65c22_device::r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, R65C22, tag, owner, clock) { } @@ -229,7 +229,7 @@ r65c22_device::r65c22_device(const machine_config &mconfig, const char *tag, dev // r65c22_device - constructor //------------------------------------------------- -r65nc22_device::r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r65nc22_device::r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, R65NC22, tag, owner, clock) { } @@ -239,7 +239,7 @@ r65nc22_device::r65nc22_device(const machine_config &mconfig, const char *tag, d // w65c22s_device - constructor //------------------------------------------------- -w65c22s_device::w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +w65c22s_device::w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, W65C22S, tag, owner, clock) { } diff --git a/src/devices/machine/6522via.h b/src/devices/machine/6522via.h index 813a74a63d5..87ae018b31f 100644 --- a/src/devices/machine/6522via.h +++ b/src/devices/machine/6522via.h @@ -118,7 +118,7 @@ public: protected: // construction/destruction - via6522_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + via6522_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -213,7 +213,7 @@ class mos6522_device : public via6522_device { public: // construction/destruction - mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> r65c22_device @@ -222,7 +222,7 @@ class r65c22_device : public via6522_device { public: // construction/destruction - r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> r65nc22_device @@ -231,7 +231,7 @@ class r65nc22_device : public via6522_device { public: // construction/destruction - r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> w65c22s_device @@ -240,7 +240,7 @@ class w65c22s_device : public via6522_device { public: // construction/destruction - w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/6525tpi.cpp b/src/devices/machine/6525tpi.cpp index 83d28fc0355..2c1ee826c58 100644 --- a/src/devices/machine/6525tpi.cpp +++ b/src/devices/machine/6525tpi.cpp @@ -106,7 +106,7 @@ DEFINE_DEVICE_TYPE(TPI6525, tpi6525_device, "tpi6525", "6525 TPI") -tpi6525_device::tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tpi6525_device::tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TPI6525, tag, owner, clock), m_out_irq_cb(*this), m_in_pa_cb(*this), diff --git a/src/devices/machine/6525tpi.h b/src/devices/machine/6525tpi.h index 4052662d50a..f558c7ddd72 100644 --- a/src/devices/machine/6525tpi.h +++ b/src/devices/machine/6525tpi.h @@ -41,7 +41,7 @@ class tpi6525_device : public device_t { public: - tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq_cb() { return m_out_irq_cb.bind(); } auto in_pa_cb() { return m_in_pa_cb.bind(); } diff --git a/src/devices/machine/6532riot.cpp b/src/devices/machine/6532riot.cpp index cdeb8e673af..a4fd8ed0647 100644 --- a/src/devices/machine/6532riot.cpp +++ b/src/devices/machine/6532riot.cpp @@ -413,7 +413,7 @@ WRITE_LINE_MEMBER(riot6532_device::pb7_w) { portb_in_set(state ? 0x80 : 0x00, 0x // riot6532_device - constructor //------------------------------------------------- -riot6532_device::riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +riot6532_device::riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RIOT6532, tag, owner, clock), m_in_pa_cb(*this), m_out_pa_cb(*this), diff --git a/src/devices/machine/6532riot.h b/src/devices/machine/6532riot.h index 56156f929c3..7a04e709f9d 100644 --- a/src/devices/machine/6532riot.h +++ b/src/devices/machine/6532riot.h @@ -24,7 +24,7 @@ class riot6532_device : public device_t { public: // construction/destruction - riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto out_pa_callback() { return m_out_pa_cb.bind(); } diff --git a/src/devices/machine/68153bim.cpp b/src/devices/machine/68153bim.cpp index 20d63ef959e..06f8f74f13b 100644 --- a/src/devices/machine/68153bim.cpp +++ b/src/devices/machine/68153bim.cpp @@ -69,10 +69,10 @@ DEFINE_DEVICE_TYPE(EI68C153, ei68c153_device, "ei68c153", "EPIC void bim68153_device::device_add_mconfig(machine_config &config) { - MC68153_CHANNEL(config, m_chn[0], 0); - MC68153_CHANNEL(config, m_chn[1], 0); - MC68153_CHANNEL(config, m_chn[2], 0); - MC68153_CHANNEL(config, m_chn[3], 0); + MC68153_CHANNEL(config, m_chn[0]); + MC68153_CHANNEL(config, m_chn[1]); + MC68153_CHANNEL(config, m_chn[2]); + MC68153_CHANNEL(config, m_chn[3]); } //************************************************************************** @@ -82,7 +82,7 @@ void bim68153_device::device_add_mconfig(machine_config &config) //------------------------------------------------- // bim68153_device - constructor //------------------------------------------------- -bim68153_device::bim68153_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +bim68153_device::bim68153_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock) , m_chn{{*this, CHN0_TAG}, {*this, CHN1_TAG}, {*this, CHN2_TAG}, {*this, CHN3_TAG}} , m_out_int_cb(*this) @@ -96,14 +96,14 @@ bim68153_device::bim68153_device(const machine_config &mconfig, device_type type LOG("%s\n", FUNCNAME); } -bim68153_device::bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bim68153_device::bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bim68153_device(mconfig, MC68153, tag, owner, clock, TYPE_MC68153) { LOG("%s\n", FUNCNAME); } /* The EPIC EI68C153 is a CMOS implementation that is fully compatible with the bipolar MC68153 from Motorola */ -ei68c153_device::ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ei68c153_device::ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bim68153_device(mconfig, EI68C153, tag, owner, clock, TYPE_EI68C153) { LOG("%s\n", FUNCNAME); @@ -318,7 +318,7 @@ void bim68153_device::write(offs_t offset, uint8_t data) // BIM CHANNEL //************************************************************************** -bim68153_channel::bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bim68153_channel::bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC68153_CHANNEL, tag, owner, clock) , m_out_iack_cb(*this) , m_int_state(NONE) diff --git a/src/devices/machine/68153bim.h b/src/devices/machine/68153bim.h index 124870b8194..4bf511af7f3 100644 --- a/src/devices/machine/68153bim.h +++ b/src/devices/machine/68153bim.h @@ -45,7 +45,7 @@ class bim68153_channel : public device_t friend class bim68153_device; public: - bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -102,7 +102,7 @@ class bim68153_device : public device_t public: // construction/destruction - bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 iack(int irqline); int acknowledge(); @@ -133,7 +133,7 @@ public: DECLARE_WRITE_LINE_MEMBER( int3_w ) { m_chn[CHN_3]->int_w(state); } protected: - bim68153_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + bim68153_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -187,7 +187,7 @@ protected: class ei68c153_device : public bim68153_device { public : - ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/6821pia.cpp b/src/devices/machine/6821pia.cpp index 2b32eb164ff..cc28a11eb52 100644 --- a/src/devices/machine/6821pia.cpp +++ b/src/devices/machine/6821pia.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(PIA6821, pia6821_device, "pia6821", "6821 PIA") // pia6821_device - constructor //------------------------------------------------- -pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PIA6821, tag, owner, clock), m_in_a_handler(*this), m_in_b_handler(*this), diff --git a/src/devices/machine/6821pia.h b/src/devices/machine/6821pia.h index 397b584fa3b..d152b6bcf94 100644 --- a/src/devices/machine/6821pia.h +++ b/src/devices/machine/6821pia.h @@ -34,7 +34,7 @@ class pia6821_device : public device_t { public: // construction/destruction - pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // TODO: REMOVE THESE auto readpa_handler() { return m_in_a_handler.bind(); } diff --git a/src/devices/machine/68230pit.cpp b/src/devices/machine/68230pit.cpp index d5aeafd4c76..91824db487f 100644 --- a/src/devices/machine/68230pit.cpp +++ b/src/devices/machine/68230pit.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(PIT68230, pit68230_device, "pit68230", "MC68230 PI/T") //------------------------------------------------- // pit68230_device - constructors //------------------------------------------------- -pit68230_device::pit68230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +pit68230_device::pit68230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock) , m_pa_out_cb(*this) , m_pa_in_cb(*this) @@ -87,7 +87,7 @@ pit68230_device::pit68230_device(const machine_config &mconfig, device_type type } -pit68230_device::pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pit68230_device::pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit68230_device (mconfig, PIT68230, tag, owner, clock, 0) { } diff --git a/src/devices/machine/68230pit.h b/src/devices/machine/68230pit.h index f99c3e541ee..950614f5498 100644 --- a/src/devices/machine/68230pit.h +++ b/src/devices/machine/68230pit.h @@ -72,7 +72,7 @@ class pit68230_device : public device_t { public: // construction/destruction - pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto pa_in_callback() { return m_pa_in_cb.bind(); } auto pa_out_callback() { return m_pa_out_cb.bind(); } @@ -272,7 +272,7 @@ protected: REG_TCR_TOUT_PC7_INT = 0xe0, // 1 1 1 }; - pit68230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + pit68230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/68307.cpp b/src/devices/machine/68307.cpp index 2a16def71d9..656d673d817 100644 --- a/src/devices/machine/68307.cpp +++ b/src/devices/machine/68307.cpp @@ -56,7 +56,7 @@ void m68307_cpu_device::device_add_mconfig(machine_config &config) } -m68307_cpu_device::m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m68307_cpu_device::m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, tag, owner, clock, M68307, 16, 24, address_map_constructor(FUNC(m68307_cpu_device::internal_map), this)), m_write_irq(*this), m_write_a_tx(*this), diff --git a/src/devices/machine/68307.h b/src/devices/machine/68307.h index cc5638b5efb..83857f5b3ae 100644 --- a/src/devices/machine/68307.h +++ b/src/devices/machine/68307.h @@ -18,7 +18,7 @@ public: typedef device_delegate portb_read_delegate; typedef device_delegate portb_write_delegate; - m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* trampolines so we can specify the 68681 serial configuration when adding the CPU */ auto serial_a_tx_callback() { return m_write_a_tx.bind(); } diff --git a/src/devices/machine/68340.cpp b/src/devices/machine/68340.cpp index 81719f87a1b..0a37acf927d 100644 --- a/src/devices/machine/68340.cpp +++ b/src/devices/machine/68340.cpp @@ -221,7 +221,7 @@ void m68340_cpu_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -m68340_cpu_device::m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m68340_cpu_device::m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fscpu32_device(mconfig, tag, owner, clock, M68340, address_map_constructor(FUNC(m68340_cpu_device::m68340_internal_map), this)) , m_serial(*this, "serial") , m_timer(*this, "timer%u", 1U) diff --git a/src/devices/machine/68340.h b/src/devices/machine/68340.h index ef89972a72c..052006b4ba0 100644 --- a/src/devices/machine/68340.h +++ b/src/devices/machine/68340.h @@ -20,7 +20,7 @@ class m68340_cpu_device : public fscpu32_device friend class mc68340_timer_module_device; public: - m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto pa_in_callback() { return m_pa_in_cb.bind(); } auto pa_out_callback() { return m_pa_out_cb.bind(); } diff --git a/src/devices/machine/68340ser.cpp b/src/devices/machine/68340ser.cpp index e0fc3b29fde..7f1c2d5a035 100644 --- a/src/devices/machine/68340ser.cpp +++ b/src/devices/machine/68340ser.cpp @@ -152,7 +152,7 @@ WRITE_LINE_MEMBER( mc68340_serial_module_device::irq_w ) m_cpu->update_ipl(); } -mc68340_serial_module_device::mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68340_serial_module_device::mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68340_duart_device(mconfig, MC68340_SERIAL_MODULE, tag, owner, clock) { } diff --git a/src/devices/machine/68340ser.h b/src/devices/machine/68340ser.h index b9775f2ad86..056bc69c30f 100644 --- a/src/devices/machine/68340ser.h +++ b/src/devices/machine/68340ser.h @@ -14,7 +14,7 @@ class mc68340_serial_module_device : public mc68340_duart_device friend class m68340_cpu_device; public: - mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/68340tmu.cpp b/src/devices/machine/68340tmu.cpp index 1b358e14f6c..d0e88416fff 100644 --- a/src/devices/machine/68340tmu.cpp +++ b/src/devices/machine/68340tmu.cpp @@ -516,7 +516,7 @@ void mc68340_timer_module_device::tout_clear() } } -mc68340_timer_module_device::mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68340_timer_module_device::mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC68340_TIMER_MODULE, tag, owner, clock) , m_tout_out_cb(*this) , m_tin_in_cb(*this) diff --git a/src/devices/machine/68340tmu.h b/src/devices/machine/68340tmu.h index 653226f8887..e4ea6dd202c 100644 --- a/src/devices/machine/68340tmu.h +++ b/src/devices/machine/68340tmu.h @@ -12,7 +12,7 @@ class mc68340_timer_module_device : public device_t friend class m68340_cpu_device; public: - mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint16_t read(offs_t offset, uint16_t mem_mask = ~0); void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/machine/6840ptm.cpp b/src/devices/machine/6840ptm.cpp index 4d2a146f0e9..5f42ababdec 100644 --- a/src/devices/machine/6840ptm.cpp +++ b/src/devices/machine/6840ptm.cpp @@ -76,7 +76,7 @@ DEFINE_DEVICE_TYPE(PTM6840, ptm6840_device, "ptm6840", "MC6840 PTM") // ptm6840_device - constructor //------------------------------------------------- -ptm6840_device::ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ptm6840_device::ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PTM6840, tag, owner, clock) , m_external_clock{ 0.0, 0.0, 0.0 } , m_out_cb(*this) diff --git a/src/devices/machine/6840ptm.h b/src/devices/machine/6840ptm.h index 614901625a4..788526df72a 100644 --- a/src/devices/machine/6840ptm.h +++ b/src/devices/machine/6840ptm.h @@ -24,9 +24,8 @@ class ptm6840_device : public device_t { public: // construction/destruction - ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); - void set_external_clocks(double clock0, double clock1, double clock2) { m_external_clock[0] = clock0; m_external_clock[1] = clock1; m_external_clock[2] = clock2; } void set_external_clocks(const XTAL &clock0, const XTAL &clock1, const XTAL &clock2) { set_external_clocks(clock0.dvalue(), clock1.dvalue(), clock2.dvalue()); } auto o1_callback() { return m_out_cb[0].bind(); } auto o2_callback() { return m_out_cb[1].bind(); } @@ -61,6 +60,7 @@ protected: virtual void device_resolve_objects() override; private: + void set_external_clocks(double clock0, double clock1, double clock2) { m_external_clock[0] = clock0; m_external_clock[1] = clock1; m_external_clock[2] = clock2; } void deduct_from_counter(int idx); void tick(int counter); TIMER_CALLBACK_MEMBER(state_changed); diff --git a/src/devices/machine/6850acia.cpp b/src/devices/machine/6850acia.cpp index 364fcfdfc92..20fde1c7870 100644 --- a/src/devices/machine/6850acia.cpp +++ b/src/devices/machine/6850acia.cpp @@ -71,12 +71,12 @@ DEFINE_DEVICE_TYPE(ACIA6850, acia6850_device, "acia6850", "MC6850 ACIA") // acia6850_device - constructor //------------------------------------------------- -acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acia6850_device(mconfig, ACIA6850, tag, owner, clock) { } -acia6850_device::acia6850_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +acia6850_device::acia6850_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_txd_handler(*this) , m_rts_handler(*this) diff --git a/src/devices/machine/6850acia.h b/src/devices/machine/6850acia.h index 4d99209d519..89a76e0978c 100644 --- a/src/devices/machine/6850acia.h +++ b/src/devices/machine/6850acia.h @@ -18,7 +18,7 @@ class acia6850_device : public device_t { public: // construction/destruction - acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto txd_handler() { return m_txd_handler.bind(); } auto rts_handler() { return m_rts_handler.bind(); } @@ -38,7 +38,7 @@ public: DECLARE_WRITE_LINE_MEMBER( write_txc ); protected: - acia6850_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + acia6850_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/68561mpcc.cpp b/src/devices/machine/68561mpcc.cpp index 1a3280d7975..d748205368e 100644 --- a/src/devices/machine/68561mpcc.cpp +++ b/src/devices/machine/68561mpcc.cpp @@ -95,7 +95,7 @@ DEFINE_DEVICE_TYPE(MPCC68561A, mpcc68561a_device, "mpcc68561a", "MPCC 68561A") // LIVE DEVICE //************************************************************************** -mpcc_device::mpcc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mpcc_device::mpcc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock), device_serial_interface(mconfig, *this), m_irq(CLEAR_LINE), @@ -139,27 +139,27 @@ mpcc_device::mpcc_device(const machine_config &mconfig, device_type type, const elem = 0; } -mpcc_device::mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc_device::mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC, tag, owner, clock, TYPE_MPCC) { } -mpcc68560_device::mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68560_device::mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68560, tag, owner, clock, TYPE_MPCC68560) { } -mpcc68560a_device::mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68560a_device::mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68560A, tag, owner, clock, TYPE_MPCC68560A) { } -mpcc68561_device::mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68561_device::mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68561, tag, owner, clock, TYPE_MPCC68561) { } -mpcc68561a_device::mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68561a_device::mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68561A, tag, owner, clock, TYPE_MPCC68561A) { } @@ -474,7 +474,7 @@ void mpcc_device::update_serial() if (m_rcr & REG_RCR_RRES) { LOGSETUP("- Rx in reset\n"); - set_rcv_rate(0); + set_rcv_rate(XTAL::u(0)); } // Rx is running else @@ -491,7 +491,7 @@ void mpcc_device::update_serial() if (m_tcr & REG_TCR_TRES) { LOGSETUP("- Tx in reset\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); } // Tx is running else @@ -508,7 +508,7 @@ void mpcc_device::update_serial() else { LOGSETUP("- Tx disabled\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); } } } diff --git a/src/devices/machine/68561mpcc.h b/src/devices/machine/68561mpcc.h index 9758f387976..a55fd94890e 100644 --- a/src/devices/machine/68561mpcc.h +++ b/src/devices/machine/68561mpcc.h @@ -47,7 +47,7 @@ class mpcc_device : public device_t, public device_serial_interface { public: // construction/destruction - mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void configure_clocks(int rxc, int txc) { @@ -77,7 +77,7 @@ public: DECLARE_WRITE_LINE_MEMBER( txc_w ) {} // { m_chanA->txc_w(state); } protected: - mpcc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mpcc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -407,49 +407,49 @@ protected: class mpcc68560_device : public mpcc_device { public: - mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68560_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mpcc68560a_device : public mpcc_device { public: - mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68560a_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mpcc68561_device : public mpcc_device { public: - mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68561_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mpcc68561a_device : public mpcc_device { public: - mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68561a_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/7200fifo.cpp b/src/devices/machine/7200fifo.cpp index e9cb45f66a7..57ec29f4954 100644 --- a/src/devices/machine/7200fifo.cpp +++ b/src/devices/machine/7200fifo.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(IDT7202, idt7202_device, "idt7202", "IDT7202 FIFO (1024x9)") //------------------------------------------------- fifo7200_device::fifo7200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, int size) - : device_t(mconfig, type, tag, owner, (uint32_t)0), + : device_t(mconfig, type, tag, owner), m_ram_size(size), m_read_ptr(0), m_write_ptr(0), m_ef(0), m_ff(0), m_hf(0), m_ef_handler(*this), @@ -37,8 +37,8 @@ fifo7200_device::fifo7200_device(const machine_config &mconfig, device_type type // idt7200_device - constructor //------------------------------------------------- -idt7200_device::idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : fifo7200_device(mconfig, IDT7200, tag, owner, 0x100) +idt7200_device::idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : fifo7200_device(mconfig, IDT7200, tag, ownerx100) { } @@ -47,8 +47,8 @@ idt7200_device::idt7200_device(const machine_config &mconfig, const char *tag, d // idt7201_device - constructor //------------------------------------------------- -idt7201_device::idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : fifo7200_device(mconfig, IDT7201, tag, owner, 0x200) +idt7201_device::idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : fifo7200_device(mconfig, IDT7201, tag, ownerx200) { } @@ -57,8 +57,8 @@ idt7201_device::idt7201_device(const machine_config &mconfig, const char *tag, d // idt7202_device - constructor //------------------------------------------------- -idt7202_device::idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : fifo7200_device(mconfig, IDT7202, tag, owner, 0x400) +idt7202_device::idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : fifo7200_device(mconfig, IDT7202, tag, ownerx400) { } diff --git a/src/devices/machine/7200fifo.h b/src/devices/machine/7200fifo.h index 6609d4efad6..0706b625f3f 100644 --- a/src/devices/machine/7200fifo.h +++ b/src/devices/machine/7200fifo.h @@ -110,7 +110,7 @@ private: class idt7200_device : public fifo7200_device { public: - idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> idt7201_device @@ -118,7 +118,7 @@ public: class idt7201_device : public fifo7200_device { public: - idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> idt7202_device @@ -126,7 +126,7 @@ public: class idt7202_device : public fifo7200_device { public: - idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definitions diff --git a/src/devices/machine/7400.cpp b/src/devices/machine/7400.cpp index f8ab747715d..71e63d580a4 100644 --- a/src/devices/machine/7400.cpp +++ b/src/devices/machine/7400.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(TTL7400, ttl7400_device, "7400", "7400 Quad 2-Input NAND Gate") -ttl7400_device::ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl7400_device::ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL7400, tag, owner, clock) , m_y_func(*this) , m_a(0) diff --git a/src/devices/machine/7400.h b/src/devices/machine/7400.h index 13939cda7a7..49ddd318f83 100644 --- a/src/devices/machine/7400.h +++ b/src/devices/machine/7400.h @@ -37,7 +37,7 @@ class ttl7400_device : public device_t { public: // construction/destruction - ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template auto y_cb() { return m_y_func[Bit].bind(); } diff --git a/src/devices/machine/7404.cpp b/src/devices/machine/7404.cpp index ad3ca9e234e..103d6a288b4 100644 --- a/src/devices/machine/7404.cpp +++ b/src/devices/machine/7404.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(TTL7404, ttl7404_device, "7404", "5/7404 Hex Inverters") -ttl7404_device::ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl7404_device::ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL7404, tag, owner, clock) , m_y_func(*this) , m_a(0) diff --git a/src/devices/machine/7404.h b/src/devices/machine/7404.h index 9bc680997e5..4b15203748a 100644 --- a/src/devices/machine/7404.h +++ b/src/devices/machine/7404.h @@ -64,7 +64,7 @@ class ttl7404_device : public device_t { public: // construction/destruction - ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template auto y_cb() { return m_y_func[Bit].bind(); } diff --git a/src/devices/machine/74123.cpp b/src/devices/machine/74123.cpp index d895a72c4e4..fb5fcc11293 100644 --- a/src/devices/machine/74123.cpp +++ b/src/devices/machine/74123.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(TTL74123, ttl74123_device, "ttl74123", "74123 TTL") // ttl74123_device - constructor //------------------------------------------------- -ttl74123_device::ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74123_device::ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74123, tag, owner, clock), m_clear_timer(nullptr), m_output_timer(nullptr), diff --git a/src/devices/machine/74123.h b/src/devices/machine/74123.h index 1aeed9d3ef7..d733fbf5313 100644 --- a/src/devices/machine/74123.h +++ b/src/devices/machine/74123.h @@ -67,9 +67,9 @@ class ttl74123_device : public device_t { public: // construction/destruction - ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, double res, double cap) - : ttl74123_device(mconfig, tag, owner, 0U) + : ttl74123_device(mconfig, tag, owner) { set_resistor_value(res); set_capacitor_value(cap); diff --git a/src/devices/machine/74145.cpp b/src/devices/machine/74145.cpp index 1ac1a41ffa6..5b556434f4e 100644 --- a/src/devices/machine/74145.cpp +++ b/src/devices/machine/74145.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(TTL74145, ttl74145_device, "ttl74145", "TTL74145") // ttl74145_device - constructor //------------------------------------------------- -ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74145, tag, owner, clock) , m_output_line_cb(*this) , m_number(0) diff --git a/src/devices/machine/74145.h b/src/devices/machine/74145.h index f5965cea4b1..d2c735af4f6 100644 --- a/src/devices/machine/74145.h +++ b/src/devices/machine/74145.h @@ -24,7 +24,7 @@ class ttl74145_device : public device_t { public: // construction/destruction - ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template auto output_line_callback() { return m_output_line_cb[Bit].bind(); } diff --git a/src/devices/machine/74148.cpp b/src/devices/machine/74148.cpp index 45ce281ed51..b81670dd63a 100644 --- a/src/devices/machine/74148.cpp +++ b/src/devices/machine/74148.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(TTL74148, ttl74148_device, "74148", "74148 TTL") -ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74148, tag, owner, clock) , m_output_cb(*this) , m_enable_input(0) diff --git a/src/devices/machine/74148.h b/src/devices/machine/74148.h index b9c9ddfdb56..cb32feb5f49 100644 --- a/src/devices/machine/74148.h +++ b/src/devices/machine/74148.h @@ -48,7 +48,7 @@ class ttl74148_device : public device_t { public: - ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~ttl74148_device() {} auto out_cb() { return m_output_cb.bind(); } diff --git a/src/devices/machine/74153.cpp b/src/devices/machine/74153.cpp index 18352ff7e06..7f2c8838a73 100644 --- a/src/devices/machine/74153.cpp +++ b/src/devices/machine/74153.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(TTL153, ttl153_device, "ttl153", "SN54/74153") // ttl153_device - constructor //------------------------------------------------- -ttl153_device::ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl153_device::ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL153, tag, owner, clock), m_za_cb(*this), m_zb_cb(*this), diff --git a/src/devices/machine/74153.h b/src/devices/machine/74153.h index ae2f3a37353..20f09c47f4c 100644 --- a/src/devices/machine/74153.h +++ b/src/devices/machine/74153.h @@ -31,7 +31,7 @@ class ttl153_device : public device_t { public: // construction/destruction - ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto za_cb() { return m_za_cb.bind(); } diff --git a/src/devices/machine/74157.cpp b/src/devices/machine/74157.cpp index 1dc7eb1289b..984e6e75743 100644 --- a/src/devices/machine/74157.cpp +++ b/src/devices/machine/74157.cpp @@ -35,12 +35,12 @@ DEFINE_DEVICE_TYPE(LS157_X2, ls157_x2_device, "ls157_x2", "74LS157 Quad 2-to-1 M // ls157_device - constructor //------------------------------------------------- -ls157_device::ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ls157_device::ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, LS157, tag, owner, clock, 0x0f) { } -ls157_device::ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mask) +ls157_device::ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mask) : device_t(mconfig, type, tag, owner, clock) , m_a_in_cb(*this) , m_b_in_cb(*this) @@ -58,7 +58,7 @@ ls157_device::ls157_device(const machine_config &mconfig, device_type type, cons // ls157_x2_device - constructor //------------------------------------------------- -ls157_x2_device::ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ls157_x2_device::ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, LS157_X2, tag, owner, clock, 0xff) { } @@ -277,7 +277,7 @@ u8 ls157_device::output_r() DEFINE_DEVICE_TYPE(HC157, hc157_device, "hc157", "74HC157 Quad 2-to-1 Multiplexer") -hc157_device::hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hc157_device::hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, HC157, tag, owner, clock, 0x0f) { } @@ -289,7 +289,7 @@ hc157_device::hc157_device(const machine_config &mconfig, const char *tag, devic DEFINE_DEVICE_TYPE(HCT157, hct157_device, "hct157", "74HCT157 Quad 2-to-1 Multiplexer") -hct157_device::hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hct157_device::hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, HCT157, tag, owner, clock, 0x0f) { } diff --git a/src/devices/machine/74157.h b/src/devices/machine/74157.h index da34d879221..d34b54704a2 100644 --- a/src/devices/machine/74157.h +++ b/src/devices/machine/74157.h @@ -35,7 +35,7 @@ class ls157_device : public device_t { public: // construction/destruction - ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto a_in_callback() { return m_a_in_cb.bind(); } auto b_in_callback() { return m_b_in_cb.bind(); } @@ -66,7 +66,7 @@ public: u8 output_r(); protected: - ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mask); + ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mask); // device-level overrides virtual void device_start() override; @@ -96,7 +96,7 @@ class ls157_x2_device : public ls157_device { public: // construction/destruction - ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hc157_device @@ -105,7 +105,7 @@ class hc157_device : public ls157_device { public: // construction/destruction - hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hct157_device @@ -114,7 +114,7 @@ class hct157_device : public ls157_device { public: // construction/destruction - hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/74161.cpp b/src/devices/machine/74161.cpp index 64e935152f5..479500943bd 100644 --- a/src/devices/machine/74161.cpp +++ b/src/devices/machine/74161.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(TTL74161, ttl74161_device, "ttl74161", "54/74161 Binary Count DEFINE_DEVICE_TYPE(TTL74162, ttl74162_device, "ttl74162", "54/74162 Decade Counter") DEFINE_DEVICE_TYPE(TTL74163, ttl74163_device, "ttl74163", "54/74163 Binary Counter") -ttl7416x_device::ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool synchronous_reset, uint8_t limit) +ttl7416x_device::ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool synchronous_reset, uint8_t limit) : device_t(mconfig, type, tag, owner, clock) , m_qa_func(*this) , m_qb_func(*this) @@ -36,22 +36,22 @@ ttl7416x_device::ttl7416x_device(const machine_config &mconfig, device_type type { } -ttl74160_device::ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74160_device::ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74160, tag, owner, clock, false, 10) { } -ttl74161_device::ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74161_device::ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74161, tag, owner, clock, false, 16) { } -ttl74162_device::ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74162_device::ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74162, tag, owner, clock, true, 10) { } -ttl74163_device::ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74163_device::ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74163, tag, owner, clock, true, 16) { } diff --git a/src/devices/machine/74161.h b/src/devices/machine/74161.h index 0145e08a9fb..7a1cc129391 100644 --- a/src/devices/machine/74161.h +++ b/src/devices/machine/74161.h @@ -87,7 +87,7 @@ public: protected: // construction/destruction - ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool synchronous_reset, uint8_t limit); + ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool synchronous_reset, uint8_t limit); // device-level overrides virtual void device_start() override; @@ -128,25 +128,25 @@ private: class ttl74160_device : public ttl7416x_device { public: - ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ttl74161_device : public ttl7416x_device { public: - ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ttl74162_device : public ttl7416x_device { public: - ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ttl74163_device : public ttl7416x_device { public: - ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/74165.cpp b/src/devices/machine/74165.cpp index 9ba4415d56c..b7970029709 100644 --- a/src/devices/machine/74165.cpp +++ b/src/devices/machine/74165.cpp @@ -36,7 +36,7 @@ void ttl165_device::device_add_mconfig(machine_config &config) // ttl153_device - constructor //------------------------------------------------- -ttl165_device::ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl165_device::ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL165, tag, owner, clock), m_timer(*this, "timer"), m_data_cb(*this), m_qh_cb(*this), diff --git a/src/devices/machine/74165.h b/src/devices/machine/74165.h index 145f3195172..814871dc7a9 100644 --- a/src/devices/machine/74165.h +++ b/src/devices/machine/74165.h @@ -34,7 +34,7 @@ class ttl165_device : public device_t { public: // construction/destruction - ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto data_callback() { return m_data_cb.bind(); } auto qh_callback() { return m_qh_cb.bind(); } diff --git a/src/devices/machine/74166.cpp b/src/devices/machine/74166.cpp index 1611b526762..1946c591505 100644 --- a/src/devices/machine/74166.cpp +++ b/src/devices/machine/74166.cpp @@ -36,7 +36,7 @@ void ttl166_device::device_add_mconfig(machine_config &config) // ttl153_device - constructor //------------------------------------------------- -ttl166_device::ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl166_device::ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL166, tag, owner, clock), m_timer(*this, "timer"), m_data_cb(*this), m_qh_cb(*this), diff --git a/src/devices/machine/74166.h b/src/devices/machine/74166.h index e15149a50cd..4287b97ab1c 100644 --- a/src/devices/machine/74166.h +++ b/src/devices/machine/74166.h @@ -34,7 +34,7 @@ class ttl166_device : public device_t { public: // construction/destruction - ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto data_callback() { return m_data_cb.bind(); } auto qh_callback() { return m_qh_cb.bind(); } diff --git a/src/devices/machine/74175.cpp b/src/devices/machine/74175.cpp index 28d3152dbeb..967c3316fc3 100644 --- a/src/devices/machine/74175.cpp +++ b/src/devices/machine/74175.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(TTL74174, ttl74174_device, "ttl74174", "54/74174 Hex D Flip-Flops with Clear") DEFINE_DEVICE_TYPE(TTL74175, ttl74175_device, "ttl74175", "54/74175 Quad D Flip-Flops with Clear") -ttl741745_device::ttl741745_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ttl741745_device::ttl741745_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_q1_func(*this) , m_q2_func(*this) @@ -31,7 +31,7 @@ ttl741745_device::ttl741745_device(const machine_config &mconfig, device_type ty { } -ttl74174_device::ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74174_device::ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl741745_device(mconfig, TTL74174, tag, owner, clock) , m_q5_func(*this) , m_q6_func(*this) @@ -42,7 +42,7 @@ ttl74174_device::ttl74174_device(const machine_config &mconfig, const char *tag, { } -ttl74175_device::ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74175_device::ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl741745_device(mconfig, TTL74175, tag, owner, clock) , m_not_q1_func(*this) , m_not_q2_func(*this) diff --git a/src/devices/machine/74175.h b/src/devices/machine/74175.h index 2eb716d481c..cdd6ffba379 100644 --- a/src/devices/machine/74175.h +++ b/src/devices/machine/74175.h @@ -66,7 +66,7 @@ public: uint8_t q_w(); protected: - ttl741745_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ttl741745_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -96,7 +96,7 @@ protected: class ttl74174_device : public ttl741745_device { public: - ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto q5_cb() { return m_q5_func.bind(); } auto q6_cb() { return m_q6_func.bind(); } @@ -124,7 +124,7 @@ private: class ttl74175_device : public ttl741745_device { public: - ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto not_q1_cb() { return m_not_q1_func.bind(); } auto not_q2_cb() { return m_not_q2_func.bind(); } diff --git a/src/devices/machine/74181.cpp b/src/devices/machine/74181.cpp index 66901510b32..3e665f80883 100644 --- a/src/devices/machine/74181.cpp +++ b/src/devices/machine/74181.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(TTL74181, ttl74181_device, "ttl74181", "74181 TTL") // ttl74181_device - constructor //------------------------------------------------- -ttl74181_device::ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl74181_device::ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74181, tag, owner, clock), m_a(0), m_b(0), diff --git a/src/devices/machine/74181.h b/src/devices/machine/74181.h index 40a55abc042..9b72940afe0 100644 --- a/src/devices/machine/74181.h +++ b/src/devices/machine/74181.h @@ -24,7 +24,7 @@ class ttl74181_device : public device_t { public: // construction/destruction - ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inputs void input_a_w(uint8_t data); diff --git a/src/devices/machine/74259.cpp b/src/devices/machine/74259.cpp index 806ea280eb1..ae12a7f6383 100644 --- a/src/devices/machine/74259.cpp +++ b/src/devices/machine/74259.cpp @@ -102,7 +102,7 @@ DEFINE_DEVICE_TYPE(CD4099, cd4099_device, "cd4099", "CD4099B Addressable Latch") // ADDRESSABLE LATCH DEVICE //************************************************************************** -addressable_latch_device::addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool clear_active) +addressable_latch_device::addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool clear_active) : device_t(mconfig, type, tag, owner, clock) , m_q_out_cb(*this) , m_parallel_out_cb(*this) @@ -379,7 +379,7 @@ void addressable_latch_device::clear_outputs(u8 new_q) // LS259 DEVICE //************************************************************************** -ls259_device::ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ls259_device::ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, LS259, tag, owner, clock, false) { } @@ -388,7 +388,7 @@ ls259_device::ls259_device(const machine_config &mconfig, const char *tag, devic // HC259 DEVICE //************************************************************************** -hc259_device::hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hc259_device::hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, HC259, tag, owner, clock, false) { } @@ -397,7 +397,7 @@ hc259_device::hc259_device(const machine_config &mconfig, const char *tag, devic // HCT259 DEVICE //************************************************************************** -hct259_device::hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hct259_device::hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, HCT259, tag, owner, clock, false) { } @@ -406,7 +406,7 @@ hct259_device::hct259_device(const machine_config &mconfig, const char *tag, dev // F9334 DEVICE //************************************************************************** -f9334_device::f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +f9334_device::f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, F9334, tag, owner, clock, false) { } @@ -415,7 +415,7 @@ f9334_device::f9334_device(const machine_config &mconfig, const char *tag, devic // CD4099 DEVICE //************************************************************************** -cd4099_device::cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cd4099_device::cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, CD4099, tag, owner, clock, true) { } diff --git a/src/devices/machine/74259.h b/src/devices/machine/74259.h index a2192701cba..87c811e0860 100644 --- a/src/devices/machine/74259.h +++ b/src/devices/machine/74259.h @@ -74,7 +74,7 @@ public: protected: // construction/destruction - addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool clear_active); + addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool clear_active); // device-level overrides virtual void device_start() override; @@ -105,7 +105,7 @@ private: class ls259_device : public addressable_latch_device { public: - ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hc259_device @@ -113,7 +113,7 @@ public: class hc259_device : public addressable_latch_device { public: - hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hct259_device @@ -121,7 +121,7 @@ public: class hct259_device : public addressable_latch_device { public: - hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> f9334_device @@ -129,7 +129,7 @@ public: class f9334_device : public addressable_latch_device { public: - f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> cd4099_device @@ -137,7 +137,7 @@ public: class cd4099_device : public addressable_latch_device { public: - cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/74381.cpp b/src/devices/machine/74381.cpp index 65514a414e3..68cae17a94b 100644 --- a/src/devices/machine/74381.cpp +++ b/src/devices/machine/74381.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SN74S381, sn74s381_device, "sn74s381", "TI SN74S381 ALU / Fun // sn74s381_device - constructor //------------------------------------------------- -sn74s381_device::sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn74s381_device::sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SN74S381, tag, owner, clock) , m_a(0) , m_b(0) diff --git a/src/devices/machine/74381.h b/src/devices/machine/74381.h index 2aef6456540..0f3ff6c42f6 100644 --- a/src/devices/machine/74381.h +++ b/src/devices/machine/74381.h @@ -22,7 +22,7 @@ class sn74s381_device : public device_t { public: // construction/destruction - sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void a_w(uint8_t data); void b_w(uint8_t data); diff --git a/src/devices/machine/74543.cpp b/src/devices/machine/74543.cpp index 2abba597941..1e9fa04b49f 100644 --- a/src/devices/machine/74543.cpp +++ b/src/devices/machine/74543.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(TTL74543, ttl74543_device, "ttl74543", "Octal Registered Transceiver") -ttl74543_device::ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74543_device::ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74543, tag, owner, clock), m_output_a(*this), m_output_b(*this), diff --git a/src/devices/machine/74543.h b/src/devices/machine/74543.h index ab2c7a561d2..a8fa43346c9 100644 --- a/src/devices/machine/74543.h +++ b/src/devices/machine/74543.h @@ -66,7 +66,7 @@ class ttl74543_device : public device_t { public: - ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto outputa_cb() { return m_output_a.bind(); } auto outputb_cb() { return m_output_b.bind(); } diff --git a/src/devices/machine/7474.cpp b/src/devices/machine/7474.cpp index 33e4e5af696..debb8a31e4e 100644 --- a/src/devices/machine/7474.cpp +++ b/src/devices/machine/7474.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(TTL7474, ttl7474_device, "7474", "7474 TTL") // ttl7474_device - constructor //------------------------------------------------- -ttl7474_device::ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl7474_device::ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL7474, tag, owner, clock), m_output_func(*this), m_comp_output_func(*this) diff --git a/src/devices/machine/7474.h b/src/devices/machine/7474.h index 4e2069d0afa..f94374bd194 100644 --- a/src/devices/machine/7474.h +++ b/src/devices/machine/7474.h @@ -55,7 +55,7 @@ class ttl7474_device : public device_t { public: // construction/destruction - ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration helpers auto output_cb() { return m_output_func.bind(); } diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index e054990a651..25185011afc 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(KBDC8042, kbdc8042_device, "kbdc8042", "8042 Keyboard/Mouse C // kbdc8042_device - constructor //------------------------------------------------- -kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KBDC8042, tag, owner, clock) , m_keyboard_dev(*this, "at_keyboard") , m_mousex_port(*this, "MOUSEX") diff --git a/src/devices/machine/8042kbdc.h b/src/devices/machine/8042kbdc.h index 64a45c8993a..b630c0d2adc 100644 --- a/src/devices/machine/8042kbdc.h +++ b/src/devices/machine/8042kbdc.h @@ -37,7 +37,7 @@ public: }; // construction/destruction - kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_keyboard_type(kbdc8042_type_t keybtype) { m_keybtype = keybtype; } void set_interrupt_type(kbdc8042_interrupt_type_t interrupttype) { m_interrupttype = interrupttype; } diff --git a/src/devices/machine/82s129.cpp b/src/devices/machine/82s129.cpp index ca147f17c2f..745dbb50074 100644 --- a/src/devices/machine/82s129.cpp +++ b/src/devices/machine/82s129.cpp @@ -14,7 +14,7 @@ const uint32_t prom82s129_base_device::PROM_SIZE = 256; DEFINE_DEVICE_TYPE(PROM82S126, prom82s126_device, "82s126", "82S126 1K-bit bipolar PROM") DEFINE_DEVICE_TYPE(PROM82S129, prom82s129_device, "82s129", "82S129 1K-bit bipolar PROM") -prom82s129_base_device::prom82s129_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +prom82s129_base_device::prom82s129_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_region(*this, DEVICE_SELF) , m_out_func(*this) @@ -29,12 +29,12 @@ prom82s129_base_device::prom82s129_base_device(const machine_config &mconfig, de { } -prom82s126_device::prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +prom82s126_device::prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : prom82s129_base_device(mconfig, PROM82S126, tag, owner, clock) { } -prom82s129_device::prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +prom82s129_device::prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : prom82s129_base_device(mconfig, PROM82S129, tag, owner, clock) { } diff --git a/src/devices/machine/82s129.h b/src/devices/machine/82s129.h index 96f278c85e9..3493705ede8 100644 --- a/src/devices/machine/82s129.h +++ b/src/devices/machine/82s129.h @@ -78,7 +78,7 @@ public: protected: // construction/destruction - prom82s129_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + prom82s129_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -115,13 +115,13 @@ private: class prom82s126_device : public prom82s129_base_device { public: - prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class prom82s129_device : public prom82s129_base_device { public: - prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/8364_paula.cpp b/src/devices/machine/8364_paula.cpp index befdb45d7b6..875a4ab4981 100644 --- a/src/devices/machine/8364_paula.cpp +++ b/src/devices/machine/8364_paula.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(PAULA_8364, paula_8364_device, "paula_8364", "MOS 8364 \"Paul // paula_8364_device - constructor //------------------------------------------------- -paula_8364_device::paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +paula_8364_device::paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PAULA_8364, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_chipmem_r(*this) diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h index 873525f8e0e..b2af3e28093 100644 --- a/src/devices/machine/8364_paula.h +++ b/src/devices/machine/8364_paula.h @@ -52,7 +52,7 @@ class paula_8364_device : public device_t, public device_sound_interface { public: - paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto mem_read_cb() { return m_chipmem_r.bind(); } diff --git a/src/devices/machine/8530scc.cpp b/src/devices/machine/8530scc.cpp index 7438ccce738..1ace890c22e 100644 --- a/src/devices/machine/8530scc.cpp +++ b/src/devices/machine/8530scc.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(SCC8530, scc8530_legacy_device, "scc8530l", "Zilog 8530 SCC ( IMPLEMENTATION ***************************************************************************/ -scc8530_legacy_device::scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scc8530_legacy_device::scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCC8530, tag, owner, clock), mode(0), reg(0), status(0), IRQV(0), MasterIRQEnable(0), lastIRQStat(0), IRQType(), intrq_cb(*this) diff --git a/src/devices/machine/8530scc.h b/src/devices/machine/8530scc.h index e4af88b3e97..cb82b923587 100644 --- a/src/devices/machine/8530scc.h +++ b/src/devices/machine/8530scc.h @@ -26,7 +26,7 @@ public: IRQ_B_EXT }; - scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intrq_callback() { return intrq_cb.bind(); } diff --git a/src/devices/machine/acorn_bmu.cpp b/src/devices/machine/acorn_bmu.cpp index ce3aacf8d2f..e58b5a65008 100644 --- a/src/devices/machine/acorn_bmu.cpp +++ b/src/devices/machine/acorn_bmu.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(ACORN_BMU, acorn_bmu_device, "acorn_bmu", "Acorn Battery Mana // acorn_bmu_device - constructor //------------------------------------------------- -acorn_bmu_device::acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_bmu_device::acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_BMU, tag, owner, clock) , m_slave_address(BMU_SLAVE_ADDRESS) , m_scl(0) diff --git a/src/devices/machine/acorn_bmu.h b/src/devices/machine/acorn_bmu.h index 52ff13db040..d8ad07a4d97 100644 --- a/src/devices/machine/acorn_bmu.h +++ b/src/devices/machine/acorn_bmu.h @@ -21,7 +21,7 @@ class acorn_bmu_device : public device_t { public: - acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(scl_w); DECLARE_WRITE_LINE_MEMBER(sda_w); diff --git a/src/devices/machine/acorn_ioc.cpp b/src/devices/machine/acorn_ioc.cpp index 3f59b4a66d1..8799a34057a 100644 --- a/src/devices/machine/acorn_ioc.cpp +++ b/src/devices/machine/acorn_ioc.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(ACORN_IOC, acorn_ioc_device, "ioc", "Acorn IOC") // LIVE DEVICE //************************************************************************** -acorn_ioc_device::acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_ioc_device::acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_IOC, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_peripherals_r(*this) @@ -74,7 +74,7 @@ void acorn_ioc_device::device_reset() // KART interface set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); - set_rate(31250); + set_rate(XTAL::u(31250)); for (int i = 0; i < 6; i++) m_giop_w[i](1); diff --git a/src/devices/machine/acorn_ioc.h b/src/devices/machine/acorn_ioc.h index 50477cf8b24..41af51e013c 100644 --- a/src/devices/machine/acorn_ioc.h +++ b/src/devices/machine/acorn_ioc.h @@ -22,7 +22,7 @@ class acorn_ioc_device : public device_t, public device_serial_interface { public: - acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto peripheral_r() { static_assert(N >= 1 && N <= 7); return m_peripherals_r[N - 1].bind(); } template auto peripheral_w() { static_assert(N >= 1 && N <= 7); return m_peripherals_w[N - 1].bind(); } diff --git a/src/devices/machine/acorn_lc.cpp b/src/devices/machine/acorn_lc.cpp index 71a545521cb..2e8e90b9908 100644 --- a/src/devices/machine/acorn_lc.cpp +++ b/src/devices/machine/acorn_lc.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(ACORN_LC, acorn_lc_device, "acorn_lc", "Acorn LC ASIC") // acorn_lc_device - constructor //------------------------------------------------- -acorn_lc_device::acorn_lc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +acorn_lc_device::acorn_lc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_LC, tag, owner, clock) //, device_memory_interface(mconfig, *this) //, device_palette_interface(mconfig, *this) diff --git a/src/devices/machine/acorn_lc.h b/src/devices/machine/acorn_lc.h index 8367c90fdf1..5b438a959af 100644 --- a/src/devices/machine/acorn_lc.h +++ b/src/devices/machine/acorn_lc.h @@ -24,7 +24,7 @@ class acorn_lc_device : public device_t //public device_video_interface { public: - acorn_lc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + acorn_lc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(offs_t offset); void write(offs_t offset, u8 data); diff --git a/src/devices/machine/acorn_memc.cpp b/src/devices/machine/acorn_memc.cpp index c8b12050478..430c7be4646 100644 --- a/src/devices/machine/acorn_memc.cpp +++ b/src/devices/machine/acorn_memc.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ACORN_MEMC, acorn_memc_device, "memc", "Acorn MEMC") // LIVE DEVICE //************************************************************************** -acorn_memc_device::acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_memc_device::acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_MEMC, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_vidc(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/acorn_memc.h b/src/devices/machine/acorn_memc.h index 9664e07d7f0..a2e2ec54200 100644 --- a/src/devices/machine/acorn_memc.h +++ b/src/devices/machine/acorn_memc.h @@ -22,10 +22,10 @@ class acorn_memc_device : public device_t, public device_memory_interface { public: - acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&vidc_tag) + acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&vidc_tag) : acorn_memc_device(mconfig, tag, owner, clock) { m_vidc.set_tag(std::forward(vidc_tag)); diff --git a/src/devices/machine/acorn_vidc.cpp b/src/devices/machine/acorn_vidc.cpp index 9440c339711..ddf6013e3fc 100644 --- a/src/devices/machine/acorn_vidc.cpp +++ b/src/devices/machine/acorn_vidc.cpp @@ -54,7 +54,7 @@ void acorn_vidc10_device::regs_map(address_map &map) } -acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int dac_type) +acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int dac_type) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_palette_interface(mconfig, *this) @@ -77,7 +77,7 @@ acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, device_t std::fill(std::begin(m_stereo_image), std::end(m_stereo_image), 0); } -acorn_vidc1_device::acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +acorn_vidc1_device::acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acorn_vidc10_device(mconfig, ACORN_VIDC1, tag, owner, clock, 1) { m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc1_device::regs_map), this)); @@ -86,7 +86,7 @@ acorn_vidc1_device::acorn_vidc1_device(const machine_config &mconfig, const char m_pal_border_base = 0x110; } -acorn_vidc1a_device::acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +acorn_vidc1a_device::acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acorn_vidc10_device(mconfig, ACORN_VIDC1A, tag, owner, clock, 2) { m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc1a_device::regs_map), this)); @@ -115,7 +115,7 @@ void acorn_vidc10_device::device_add_mconfig(machine_config &config) for (int i = 0; i < m_sound_max_channels; i++) { // custom DAC - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac[i], 0).add_route(0, m_lspeaker, m_sound_input_gain).add_route(0, m_rspeaker, m_sound_input_gain); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac[i]).add_route(0, m_lspeaker, m_sound_input_gain).add_route(0, m_rspeaker, m_sound_input_gain); } } @@ -563,7 +563,7 @@ void arm_vidc20_device::regs_map(address_map &map) map(0xe0, 0xef).w(FUNC(arm_vidc20_device::vidc20_control_w)); } -arm_vidc20_device::arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arm_vidc20_device::arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acorn_vidc10_device(mconfig, ARM_VIDC20, tag, owner, clock, 2) , m_dac32(*this, "serial_dac_%u", 0) { @@ -589,8 +589,8 @@ void arm_vidc20_device::device_add_mconfig(machine_config &config) // For simplicity we separate DACs for 32-bit mode // TODO: how stereo image copes with this if at all? - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[0], 0).add_route(ALL_OUTPUTS, m_lspeaker, 0.25); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[1], 0).add_route(ALL_OUTPUTS, m_rspeaker, 0.25); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[0]).add_route(ALL_OUTPUTS, m_lspeaker, 0.25); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[1]).add_route(ALL_OUTPUTS, m_rspeaker, 0.25); } void arm_vidc20_device::device_config_complete() diff --git a/src/devices/machine/acorn_vidc.h b/src/devices/machine/acorn_vidc.h index f2009b255b2..2affc7173cf 100644 --- a/src/devices/machine/acorn_vidc.h +++ b/src/devices/machine/acorn_vidc.h @@ -49,7 +49,7 @@ public: virtual bool get_dac_mode() { return false; } protected: - acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int dac_type); + acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int dac_type); // device-level overrides //virtual void device_validity_check(validity_checker &valid) const override; @@ -134,14 +134,14 @@ class acorn_vidc1_device : public acorn_vidc10_device { public: // construction/destruction - acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class acorn_vidc1a_device : public acorn_vidc10_device { public: // construction/destruction - acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition @@ -152,7 +152,7 @@ class arm_vidc20_device : public acorn_vidc10_device { public: // construction/destruction - arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write_dac32(u8 channel, u16 data); virtual bool get_dac_mode() override; diff --git a/src/devices/machine/adc0804.cpp b/src/devices/machine/adc0804.cpp index 12eb9e7754d..8f75a5effe6 100644 --- a/src/devices/machine/adc0804.cpp +++ b/src/devices/machine/adc0804.cpp @@ -57,7 +57,7 @@ ALLOW_SAVE_TYPE(adc0804_device::read_mode); // adc0804_device - constructor //------------------------------------------------- -adc0804_device::adc0804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +adc0804_device::adc0804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_vin_callback(*this) , m_intr_callback(*this) @@ -73,7 +73,7 @@ adc0804_device::adc0804_device(const machine_config &mconfig, device_type type, { } -adc0804_device::adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +adc0804_device::adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0804_device(mconfig, ADC0804, tag, owner, clock) { } @@ -83,7 +83,7 @@ adc0804_device::adc0804_device(const machine_config &mconfig, const char *tag, d // adc0803_device - constructor //------------------------------------------------- -adc0803_device::adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +adc0803_device::adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0804_device(mconfig, ADC0803, tag, owner, clock) { } diff --git a/src/devices/machine/adc0804.h b/src/devices/machine/adc0804.h index d8fe6ad950e..8c7ffc56b12 100644 --- a/src/devices/machine/adc0804.h +++ b/src/devices/machine/adc0804.h @@ -42,9 +42,9 @@ public: }; // device type constructors - adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, double r, double c) - : adc0804_device(mconfig, tag, owner, 0U) + : adc0804_device(mconfig, tag, owner) { set_rc(r, c); } @@ -70,7 +70,7 @@ public: DECLARE_READ_LINE_MEMBER(intr_r) { return m_intr_active ? 0 : 1; } protected: - adc0804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + adc0804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -110,9 +110,9 @@ class adc0803_device : public adc0804_device { public: // device type constructors - adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, double r, double c) - : adc0803_device(mconfig, tag, owner, 0U) + : adc0803_device(mconfig, tag, owner) { set_rc(r, c); } diff --git a/src/devices/machine/adc0808.cpp b/src/devices/machine/adc0808.cpp index a55c11077c7..22b59299b11 100644 --- a/src/devices/machine/adc0808.cpp +++ b/src/devices/machine/adc0808.cpp @@ -39,7 +39,7 @@ ALLOW_SAVE_TYPE(adc0808_device::state); // adc0808_device - constructor //------------------------------------------------- -adc0808_device::adc0808_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +adc0808_device::adc0808_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_eoc_cb(*this), m_eoc_ff_cb(*this), m_in_cb(*this), @@ -49,7 +49,7 @@ adc0808_device::adc0808_device(const machine_config &mconfig, device_type type, { } -adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0808_device(mconfig, ADC0808, tag, owner, clock) { } @@ -58,7 +58,7 @@ adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, d // adc0809_device - constructor //------------------------------------------------- -adc0809_device::adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0809_device::adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0808_device(mconfig, ADC0809, tag, owner, clock) { } @@ -67,7 +67,7 @@ adc0809_device::adc0809_device(const machine_config &mconfig, const char *tag, d // m58990_device - constructor //------------------------------------------------- -m58990_device::m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m58990_device::m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0808_device(mconfig, M58990, tag, owner, clock) { } diff --git a/src/devices/machine/adc0808.h b/src/devices/machine/adc0808.h index 9d69c67daef..29a7d787671 100644 --- a/src/devices/machine/adc0808.h +++ b/src/devices/machine/adc0808.h @@ -45,7 +45,7 @@ class adc0808_device : public device_t { public: // construction/destruction - adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto eoc_callback() { return m_eoc_cb.bind(); } auto eoc_ff_callback() { return m_eoc_ff_cb.bind(); } @@ -61,7 +61,7 @@ public: void address_data_start_w(u8 data); // start and ale connected, address to the data bus protected: - adc0808_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + adc0808_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -95,13 +95,13 @@ private: class adc0809_device : public adc0808_device { public: - adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class m58990_device : public adc0808_device { public: - m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/adc083x.cpp b/src/devices/machine/adc083x.cpp index c5c75655625..163ed9eb457 100644 --- a/src/devices/machine/adc083x.cpp +++ b/src/devices/machine/adc083x.cpp @@ -53,7 +53,7 @@ DEFINE_DEVICE_TYPE(ADC0832, adc0832_device, "adc0832", "ADC0832 A/D Converter") DEFINE_DEVICE_TYPE(ADC0834, adc0834_device, "adc0834", "ADC0834 A/D Converter") DEFINE_DEVICE_TYPE(ADC0838, adc0838_device, "adc0838", "ADC0838 A/D Converter") -adc083x_device::adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t mux_bits) : +adc083x_device::adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t mux_bits) : device_t(mconfig, type, tag, owner, clock), m_mux_bits(mux_bits), m_cs(0), @@ -72,22 +72,22 @@ adc083x_device::adc083x_device(const machine_config &mconfig, device_type type, { } -adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0831, tag, owner, clock, 0) { } -adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0832, tag, owner, clock, 2) { } -adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0834, tag, owner, clock, 3) { } -adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0838, tag, owner, clock, 4) { } diff --git a/src/devices/machine/adc083x.h b/src/devices/machine/adc083x.h index babde2515b1..0724ac16fdc 100644 --- a/src/devices/machine/adc083x.h +++ b/src/devices/machine/adc083x.h @@ -50,7 +50,7 @@ public: DECLARE_READ_LINE_MEMBER( do_read ); protected: - adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t mux_bits); + adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t mux_bits); // device-level overrides virtual void device_start() override; @@ -84,28 +84,28 @@ private: class adc0831_device : public adc083x_device { public: - adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class adc0832_device : public adc083x_device { public: - adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class adc0834_device : public adc083x_device { public: - adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class adc0838_device : public adc083x_device { public: - adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/adc0844.cpp b/src/devices/machine/adc0844.cpp index bbdafc68aec..20cc531ac35 100644 --- a/src/devices/machine/adc0844.cpp +++ b/src/devices/machine/adc0844.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(ADC0848, adc0848_device, "adc0848", "ADC0848 A/D Converter") // adc0844_device - constructor //------------------------------------------------- -adc0844_device::adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +adc0844_device::adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_intr_cb(*this), m_ch1_cb(*this), m_ch2_cb(*this), m_ch3_cb(*this), m_ch4_cb(*this), @@ -38,7 +38,7 @@ adc0844_device::adc0844_device(const machine_config &mconfig, device_type type, { } -adc0844_device::adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0844_device::adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0844_device(mconfig, ADC0844, tag, owner, clock) { } @@ -47,7 +47,7 @@ adc0844_device::adc0844_device(const machine_config &mconfig, const char *tag, d // adc0848_device - constructor //------------------------------------------------- -adc0848_device::adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0848_device::adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0844_device(mconfig, ADC0848, tag, owner, clock), m_ch5_cb(*this), m_ch6_cb(*this), m_ch7_cb(*this), m_ch8_cb(*this) { diff --git a/src/devices/machine/adc0844.h b/src/devices/machine/adc0844.h index 98ac8b211d4..dcbdd487ad5 100644 --- a/src/devices/machine/adc0844.h +++ b/src/devices/machine/adc0844.h @@ -34,7 +34,7 @@ class adc0844_device : public device_t { public: // construction/destruction - adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto intr_callback() { return m_intr_cb.bind(); } @@ -47,7 +47,7 @@ public: virtual void write(u8 data); protected: - adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -71,7 +71,7 @@ class adc0848_device : public adc0844_device { public: // construction/destruction - adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto ch5_callback() { return m_ch5_cb.bind(); } diff --git a/src/devices/machine/adc1038.cpp b/src/devices/machine/adc1038.cpp index 3baac1fd1be..4c26be90202 100644 --- a/src/devices/machine/adc1038.cpp +++ b/src/devices/machine/adc1038.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(ADC1038, adc1038_device, "adc1038", "ADC1038") -adc1038_device::adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc1038_device::adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADC1038, tag, owner, clock) , m_cycle(0) , m_clk(0) diff --git a/src/devices/machine/adc1038.h b/src/devices/machine/adc1038.h index d4ee5362fd0..d11210bf3fb 100644 --- a/src/devices/machine/adc1038.h +++ b/src/devices/machine/adc1038.h @@ -29,7 +29,7 @@ class adc1038_device : public device_t public: typedef device_delegate input_delegate; - adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_input_callback(T &&... args) { m_input_cb.set(std::forward(args)...); } diff --git a/src/devices/machine/adc1213x.cpp b/src/devices/machine/adc1213x.cpp index 2f73575909c..2ef5c99ef93 100644 --- a/src/devices/machine/adc1213x.cpp +++ b/src/devices/machine/adc1213x.cpp @@ -39,23 +39,23 @@ DEFINE_DEVICE_TYPE(ADC12132, adc12132_device, "adc12132", "ADC12132") DEFINE_DEVICE_TYPE(ADC12138, adc12138_device, "adc12138", "ADC12138") -adc12130_device::adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc12130_device::adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc12138_device(mconfig, ADC12130, tag, owner, clock) { } -adc12132_device::adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc12132_device::adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc12138_device(mconfig, ADC12132, tag, owner, clock) { } -adc12138_device::adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc12138_device::adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc12138_device(mconfig, ADC12138, tag, owner, clock) { } -adc12138_device::adc12138_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +adc12138_device::adc12138_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_ipt_read_cb(*this) { diff --git a/src/devices/machine/adc1213x.h b/src/devices/machine/adc1213x.h index 7d3f69caccd..d03d704a94e 100644 --- a/src/devices/machine/adc1213x.h +++ b/src/devices/machine/adc1213x.h @@ -24,7 +24,7 @@ class adc12138_device : public device_t public: typedef device_delegate ipt_convert_delegate; - adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_ipt_convert_callback(T &&... args) { m_ipt_read_cb.set(std::forward(args)...); } @@ -36,7 +36,7 @@ public: u8 eoc_r(); protected: - adc12138_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + adc12138_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -65,14 +65,14 @@ private: class adc12130_device : public adc12138_device { public: - adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class adc12132_device : public adc12138_device { public: - adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/aic565.cpp b/src/devices/machine/aic565.cpp index 34da7f4fd14..64e910cc943 100644 --- a/src/devices/machine/aic565.cpp +++ b/src/devices/machine/aic565.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(AIC565, aic565_device, "aic565", "AIC-565 Bus Auxiliary Inter // aic565_device - constructor //------------------------------------------------- -aic565_device::aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aic565_device::aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AIC565, tag, owner, clock) , m_hrst_callback(*this) , m_srst_callback(*this) diff --git a/src/devices/machine/aic565.h b/src/devices/machine/aic565.h index 581a595d77c..d22161cab2c 100644 --- a/src/devices/machine/aic565.h +++ b/src/devices/machine/aic565.h @@ -21,7 +21,7 @@ class aic565_device : public device_t { public: // construction/destruction - aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto hrst_callback() { return m_hrst_callback.bind(); } diff --git a/src/devices/machine/aic580.cpp b/src/devices/machine/aic580.cpp index c5bf3a51e96..f477fb19552 100644 --- a/src/devices/machine/aic580.cpp +++ b/src/devices/machine/aic580.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(AIC580, aic580_device, "aic580", "AIC-580 DMA Bus Master") // aic580_device - constructor //------------------------------------------------- -aic580_device::aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aic580_device::aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AIC580, tag, owner, clock) , m_bdin_callback(*this) , m_bdout_callback(*this) diff --git a/src/devices/machine/aic580.h b/src/devices/machine/aic580.h index b764daa1710..5733f6af2e8 100644 --- a/src/devices/machine/aic580.h +++ b/src/devices/machine/aic580.h @@ -21,7 +21,7 @@ class aic580_device : public device_t { public: // construction/destruction - aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto bdin_callback() { return m_bdin_callback.bind(); } diff --git a/src/devices/machine/aic6250.cpp b/src/devices/machine/aic6250.cpp index fb885c3b5e3..aaa7b3cc342 100644 --- a/src/devices/machine/aic6250.cpp +++ b/src/devices/machine/aic6250.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(AIC6251A, aic6251a_device, "aic6251a", "Adaptec AIC-6251A Fas static char const *const nscsi_phase[] = { "DATA OUT", "DATA IN", "COMMAND", "STATUS", "*", "*", "MESSAGE OUT", "MESSAGE IN" }; static char const *const aic6250_phase[] = { "DATA OUT", "*", "DATA IN", "*", "COMMAND", "MESSAGE OUT", "STATUS", "MESSAGE IN" }; -aic6250_device::aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +aic6250_device::aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_int_cb(*this) @@ -59,12 +59,12 @@ aic6250_device::aic6250_device(const machine_config &mconfig, device_type type, { } -aic6250_device::aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aic6250_device::aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aic6250_device(mconfig, AIC6250, tag, owner, clock) { } -aic6251a_device::aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aic6251a_device::aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aic6250_device(mconfig, AIC6251A, tag, owner, clock) { } diff --git a/src/devices/machine/aic6250.h b/src/devices/machine/aic6250.h index 048aa6de0c8..39d26f46bd8 100644 --- a/src/devices/machine/aic6250.h +++ b/src/devices/machine/aic6250.h @@ -11,7 +11,7 @@ class aic6250_device : public nscsi_device, public nscsi_slot_card_interface { public: - aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); @@ -34,7 +34,7 @@ public: void dma16_w(u16 data); protected: - aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // standard device_interface overrides virtual void device_start() override; @@ -282,7 +282,7 @@ private: class aic6251a_device : public aic6250_device { public: - aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(AIC6250, aic6250_device) diff --git a/src/devices/machine/aicartc.cpp b/src/devices/machine/aicartc.cpp index 8e58ec0bb33..9a6d1378843 100644 --- a/src/devices/machine/aicartc.cpp +++ b/src/devices/machine/aicartc.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(AICARTC, aicartc_device, "aicartc", "AICA RTC") // aicartc_device - constructor //------------------------------------------------- -aicartc_device::aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aicartc_device::aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AICARTC, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_rtc_reg_lo(0), m_rtc_reg_hi(0), m_rtc_tick(0), m_we(0) diff --git a/src/devices/machine/aicartc.h b/src/devices/machine/aicartc.h index fb1955ec685..9a4ebc31f99 100644 --- a/src/devices/machine/aicartc.h +++ b/src/devices/machine/aicartc.h @@ -18,7 +18,7 @@ class aicartc_device : public device_t, public device_rtc_interface { public: // construction/destruction - aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/machine/akiko.cpp b/src/devices/machine/akiko.cpp index 13ae686a972..1bad05d718d 100644 --- a/src/devices/machine/akiko.cpp +++ b/src/devices/machine/akiko.cpp @@ -63,7 +63,7 @@ void akiko_device::device_add_mconfig(machine_config &config) // akiko_device - constructor //------------------------------------------------- -akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AKIKO, tag, owner, clock) , m_c2p_input_index(0) , m_c2p_output_index(0) diff --git a/src/devices/machine/akiko.h b/src/devices/machine/akiko.h index 8a0ffec8e76..3b02ec21e51 100644 --- a/src/devices/machine/akiko.h +++ b/src/devices/machine/akiko.h @@ -31,7 +31,7 @@ class akiko_device : public device_t { public: - akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto mem_r_callback() { return m_mem_r.bind(); } diff --git a/src/devices/machine/alpha_8921.cpp b/src/devices/machine/alpha_8921.cpp index bf57902b31e..9c70be1a8dd 100644 --- a/src/devices/machine/alpha_8921.cpp +++ b/src/devices/machine/alpha_8921.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(ALPHA_8921, alpha_8921_device, "alpha_8921", "Alpha denshi AL // alpha_8921_device - constructor //------------------------------------------------- -alpha_8921_device::alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +alpha_8921_device::alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ALPHA_8921, tag, owner, clock) { } diff --git a/src/devices/machine/alpha_8921.h b/src/devices/machine/alpha_8921.h index a6e8ccdb0ad..d41ff9ccaa5 100644 --- a/src/devices/machine/alpha_8921.h +++ b/src/devices/machine/alpha_8921.h @@ -18,7 +18,7 @@ class alpha_8921_device : public device_t { public: // construction/destruction - alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inputs DECLARE_WRITE_LINE_MEMBER(clk_w); diff --git a/src/devices/machine/am25s55x.cpp b/src/devices/machine/am25s55x.cpp index b1624179463..54ff02e9ba9 100644 --- a/src/devices/machine/am25s55x.cpp +++ b/src/devices/machine/am25s55x.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(AM25S558, am25s558_device, "am25s558", "AMD Am25S558 Combinat // am25s55x_device - constructor //------------------------------------------------- -am25s55x_device::am25s55x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +am25s55x_device::am25s55x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_x_in(0) , m_y_in(0) @@ -32,13 +32,13 @@ am25s55x_device::am25s55x_device(const machine_config &mconfig, device_type type { } -am25s557_device::am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am25s557_device::am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am25s55x_device(mconfig, AM25S557, tag, owner, clock) , m_r(false) { } -am25s558_device::am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am25s558_device::am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am25s55x_device(mconfig, AM25S558, tag, owner, clock) { } diff --git a/src/devices/machine/am25s55x.h b/src/devices/machine/am25s55x.h index 1fa3cab8102..8d5e4c1e01e 100644 --- a/src/devices/machine/am25s55x.h +++ b/src/devices/machine/am25s55x.h @@ -22,7 +22,7 @@ class am25s55x_device : public device_t { public: // construction/destruction - am25s55x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + am25s55x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void x_w(uint8_t data); void y_w(uint8_t data); @@ -74,7 +74,7 @@ class am25s557_device : public am25s55x_device { public: // construction/destruction - am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void xm_w(int state) override; virtual void ym_w(int state) override; @@ -97,7 +97,7 @@ class am25s558_device : public am25s55x_device { public: // construction/destruction - am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void rs_w(int state); void ru_w(int state); diff --git a/src/devices/machine/am2847.cpp b/src/devices/machine/am2847.cpp index 7e7992a2e85..9d8181bdf2e 100644 --- a/src/devices/machine/am2847.cpp +++ b/src/devices/machine/am2847.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(AM2847, am2847_device, "am2847", "AMD Am2847 80-bit Static DEFINE_DEVICE_TYPE(AM2849, am2849_device, "am2849", "AMD Am2849 96-bit Static Shift Register") DEFINE_DEVICE_TYPE(TMS3409, tms3409_device, "tms3409", "TI TMS3409 80-bit Static Shift Register") -am2847_base_device::am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size) +am2847_base_device::am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size) : device_t(mconfig, type, tag, owner, clock) , m_in(0) , m_out(0) @@ -23,17 +23,17 @@ am2847_base_device::am2847_base_device(const machine_config &mconfig, device_typ { } -am2847_device::am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2847_device::am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am2847_base_device(mconfig, AM2847, tag, owner, clock, 5) { } -am2849_device::am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2849_device::am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am2847_base_device(mconfig, AM2849, tag, owner, clock, 6) { } -tms3409_device::tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms3409_device::tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am2847_base_device(mconfig, TMS3409, tag, owner, clock, 5) { } diff --git a/src/devices/machine/am2847.h b/src/devices/machine/am2847.h index b5d90642e32..9a21ebd54b8 100644 --- a/src/devices/machine/am2847.h +++ b/src/devices/machine/am2847.h @@ -65,7 +65,7 @@ public: uint8_t out_r() const { return m_out; } protected: - am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size); + am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size); virtual void device_start() override; virtual void device_reset() override; @@ -98,21 +98,21 @@ class am2847_device : public am2847_base_device { public: // construction/destruction - am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class am2849_device : public am2847_base_device { public: // construction/destruction - am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms3409_device : public am2847_base_device { public: // construction/destruction - tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/am2901b.cpp b/src/devices/machine/am2901b.cpp index 87b370a24b4..4ac5016b36a 100644 --- a/src/devices/machine/am2901b.cpp +++ b/src/devices/machine/am2901b.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(AM2901B, am2901b_device, "am2901b", "AMD Am2901B Bitslice Pro // am2901b_device - constructor //------------------------------------------------- -am2901b_device::am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2901b_device::am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM2901B, tag, owner, clock) , m_d(0) , m_q(0) diff --git a/src/devices/machine/am2901b.h b/src/devices/machine/am2901b.h index 4e7a25e3915..ac192c152a5 100644 --- a/src/devices/machine/am2901b.h +++ b/src/devices/machine/am2901b.h @@ -23,7 +23,7 @@ class am2901b_device : public device_t { public: // construction/destruction - am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto y() { return m_y.bind(); } auto g() { return m_g.bind(); } diff --git a/src/devices/machine/am2910.cpp b/src/devices/machine/am2910.cpp index 158b4b83bb7..db670d76e4a 100644 --- a/src/devices/machine/am2910.cpp +++ b/src/devices/machine/am2910.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(AM2910, am2910_device, "am2910", "AMD Am2910 Microprogram Con // am2910_device - constructor //------------------------------------------------- -am2910_device::am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2910_device::am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM2910, tag, owner, clock) , m_pc(0) , m_r(0) diff --git a/src/devices/machine/am2910.h b/src/devices/machine/am2910.h index 52c075ea52a..1ae6c75a020 100644 --- a/src/devices/machine/am2910.h +++ b/src/devices/machine/am2910.h @@ -22,7 +22,7 @@ class am2910_device : public device_t { public: // construction/destruction - am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(cc_w); // !CC DECLARE_WRITE_LINE_MEMBER(ccen_w); // !CCEN diff --git a/src/devices/machine/am53cf96.cpp b/src/devices/machine/am53cf96.cpp index 41b62e145f0..539234f8d73 100644 --- a/src/devices/machine/am53cf96.cpp +++ b/src/devices/machine/am53cf96.cpp @@ -145,7 +145,7 @@ void am53cf96_device::write(offs_t offset, uint8_t data) } } -am53cf96_device::am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +am53cf96_device::am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, AM53CF96, tag, owner, clock), m_irq_handler(*this) { diff --git a/src/devices/machine/am53cf96.h b/src/devices/machine/am53cf96.h index 6fdd801f6df..27355472916 100644 --- a/src/devices/machine/am53cf96.h +++ b/src/devices/machine/am53cf96.h @@ -16,7 +16,7 @@ class am53cf96_device : public legacy_scsi_host_adapter { public: // construction/destruction - am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/am79c30.cpp b/src/devices/machine/am79c30.cpp index ed31a517398..43ae87797d3 100644 --- a/src/devices/machine/am79c30.cpp +++ b/src/devices/machine/am79c30.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(AM79C30A, am79c30a_device, "am79c30a", "Am79C30A DSC") // am79c30a_device - constructor //------------------------------------------------- -am79c30a_device::am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am79c30a_device::am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM79C30A, tag, owner, clock) , m_int_callback(*this) , m_init(0) diff --git a/src/devices/machine/am79c30.h b/src/devices/machine/am79c30.h index 0188b2c9623..d7ea33d9642 100644 --- a/src/devices/machine/am79c30.h +++ b/src/devices/machine/am79c30.h @@ -55,7 +55,7 @@ class am79c30a_device : public device_t { public: // device type constructor - am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto int_callback() { return m_int_callback.bind(); } diff --git a/src/devices/machine/am79c90.cpp b/src/devices/machine/am79c90.cpp index f47457680ec..f7185c203ad 100644 --- a/src/devices/machine/am79c90.cpp +++ b/src/devices/machine/am79c90.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(AM7990, am7990_device, "am7990", "Am7990 LANCE Ethernet Controller") DEFINE_DEVICE_TYPE(AM79C90, am79c90_device, "am79c90", "Am79C90 C-LANCE Ethernet Controller") -am7990_device_base::am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +am7990_device_base::am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_intr_out_cb(*this) @@ -68,12 +68,12 @@ am7990_device_base::am7990_device_base(const machine_config &mconfig, device_typ { } -am7990_device::am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am7990_device::am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am7990_device_base(mconfig, AM7990, tag, owner, clock) { } -am79c90_device::am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am79c90_device::am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am7990_device_base(mconfig, AM79C90, tag, owner, clock) { } diff --git a/src/devices/machine/am79c90.h b/src/devices/machine/am79c90.h index 80c66ff58ce..e884a949d6e 100644 --- a/src/devices/machine/am79c90.h +++ b/src/devices/machine/am79c90.h @@ -21,7 +21,7 @@ public: void reset_w(int state) { if (!state) device_reset(); } protected: - am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock = 0); + am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device_t overrides virtual void device_start() override; @@ -175,7 +175,7 @@ private: class am7990_device : public am7990_device_base { public: - am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual int get_buf_length(u16 data) const override { return (data == 0xf000) ? 4096 : -s16(0xf000 | data); } @@ -184,7 +184,7 @@ protected: class am79c90_device : public am7990_device_base { public: - am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual int get_buf_length(u16 data) const override { return data ? ((data == 0xf000) ? 4096 : -s16(0xf000 | data)) : 0; } diff --git a/src/devices/machine/am9513.cpp b/src/devices/machine/am9513.cpp index 1c8c3692369..9ad6e2cf441 100644 --- a/src/devices/machine/am9513.cpp +++ b/src/devices/machine/am9513.cpp @@ -54,7 +54,7 @@ DEFINE_DEVICE_TYPE(AM9513A, am9513a_device, "am9513a", "Am9513A STC") // am9513_device - constructor //------------------------------------------------- -am9513_device::am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool is_am9513a) +am9513_device::am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_am9513a) : device_t(mconfig, type, tag, owner, clock) , m_out_cb(*this) , m_fout_cb(*this) @@ -62,12 +62,12 @@ am9513_device::am9513_device(const machine_config &mconfig, device_type type, co { } -am9513_device::am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am9513_device::am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9513_device(mconfig, AM9513, tag, owner, clock, false) { } -am9513a_device::am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am9513a_device::am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9513_device(mconfig, AM9513A, tag, owner, clock, true) { } diff --git a/src/devices/machine/am9513.h b/src/devices/machine/am9513.h index 34c3cc3598c..ee24c50c978 100644 --- a/src/devices/machine/am9513.h +++ b/src/devices/machine/am9513.h @@ -44,7 +44,7 @@ class am9513_device : public device_t { public: // device type constructor - am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration auto out1_cb() { return m_out_cb[0].bind(); } @@ -88,7 +88,7 @@ public: protected: // base constructor - am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool is_am9513a); + am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_am9513a); // device-level overrides virtual void device_start() override; @@ -175,7 +175,7 @@ class am9513a_device : public am9513_device { public: // device type constructor - am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/machine/am9517a.cpp b/src/devices/machine/am9517a.cpp index 533c617f1b5..32969680ffd 100644 --- a/src/devices/machine/am9517a.cpp +++ b/src/devices/machine/am9517a.cpp @@ -441,7 +441,7 @@ void am9517a_device::end_of_process() //------------------------------------------------- -am9517a_device::am9517a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +am9517a_device::am9517a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_execute_interface(mconfig, *this), m_icount(0), @@ -460,12 +460,12 @@ am9517a_device::am9517a_device(const machine_config &mconfig, device_type type, } -am9517a_device::am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am9517a_device::am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, AM9517A, tag, owner, clock) { } -v5x_dmau_device::v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v5x_dmau_device::v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, V5X_DMAU, tag, owner, clock) , m_in_mem16r_cb(*this) , m_out_mem16w_cb(*this) @@ -475,7 +475,7 @@ v5x_dmau_device::v5x_dmau_device(const machine_config &mconfig, const char *tag, { } -pcxport_dmac_device::pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcxport_dmac_device::pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, PCXPORT_DMAC, tag, owner, clock) { } @@ -1327,7 +1327,7 @@ void pcxport_dmac_device::end_of_process() m_state = STATE_SI; } -eisa_dma_device::eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +eisa_dma_device::eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, EISA_DMA, tag, owner, clock) { } diff --git a/src/devices/machine/am9517a.h b/src/devices/machine/am9517a.h index e1dcec9576e..60d84c021f7 100644 --- a/src/devices/machine/am9517a.h +++ b/src/devices/machine/am9517a.h @@ -49,7 +49,7 @@ class am9517a_device : public device_t, public: // construction/destruction - am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_hreq_callback() { return m_out_hreq_cb.bind(); } auto out_eop_callback() { return m_out_eop_cb.bind(); } @@ -79,7 +79,7 @@ public: DECLARE_WRITE_LINE_MEMBER( dreq3_w ); protected: - am9517a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + am9517a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -147,7 +147,7 @@ class v5x_dmau_device : public am9517a_device { public: // construction/destruction - v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_mem16r_callback() { return m_in_mem16r_cb.bind(); } auto out_mem16w_callback() { return m_out_mem16w_cb.bind(); } @@ -184,7 +184,7 @@ class pcxport_dmac_device : public am9517a_device { public: // construction/destruction - pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -195,7 +195,7 @@ protected: class eisa_dma_device : public am9517a_device { public: - eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template u8 get_address_page() { return m_channel[Channel].m_address >> 16; } template void set_address_page(u8 data) diff --git a/src/devices/machine/am9519.cpp b/src/devices/machine/am9519.cpp index f09dd4e71cc..55789afc601 100644 --- a/src/devices/machine/am9519.cpp +++ b/src/devices/machine/am9519.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(AM9519, am9519_device, "am9519", "AMD AM9519 Universal Interrupt Controller") -am9519_device::am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am9519_device::am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM9519, tag, owner, clock) , m_out_int_func(*this) , m_irr(0) diff --git a/src/devices/machine/am9519.h b/src/devices/machine/am9519.h index bccd4534faf..fe3d55c1060 100644 --- a/src/devices/machine/am9519.h +++ b/src/devices/machine/am9519.h @@ -32,7 +32,7 @@ class am9519_device : public device_t { public: - am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_int_callback() { return m_out_int_func.bind(); } diff --git a/src/devices/machine/amiga_copper.cpp b/src/devices/machine/amiga_copper.cpp index f3e0c249a75..4412570a5ef 100644 --- a/src/devices/machine/amiga_copper.cpp +++ b/src/devices/machine/amiga_copper.cpp @@ -64,7 +64,7 @@ DEFINE_DEVICE_TYPE(AMIGA_COPPER, amiga_copper_device, "amiga_copper", "Amiga Cop //------------------------------------------------- -amiga_copper_device::amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amiga_copper_device::amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMIGA_COPPER, tag, owner, clock) , m_host_cpu(*this, finder_base::DUMMY_TAG) , m_chipmem_r(*this) diff --git a/src/devices/machine/amiga_copper.h b/src/devices/machine/amiga_copper.h index 15fe5c3cd00..35fb800e0b1 100644 --- a/src/devices/machine/amiga_copper.h +++ b/src/devices/machine/amiga_copper.h @@ -19,7 +19,7 @@ class amiga_copper_device : public device_t { public: // construction/destruction - amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // config template void set_host_cpu_tag(T &&tag) { m_host_cpu.set_tag(std::forward(tag)); } diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp index 15694a95f49..cfe4c3cb718 100644 --- a/src/devices/machine/amigafdc.cpp +++ b/src/devices/machine/amigafdc.cpp @@ -52,7 +52,7 @@ void amiga_fdc_device::floppy_formats(format_registration &fr) fr.add(FLOPPY_IPF_FORMAT); } -amiga_fdc_device::amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amiga_fdc_device::amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMIGA_FDC, tag, owner, clock) , m_write_index(*this) , m_read_dma(*this) diff --git a/src/devices/machine/amigafdc.h b/src/devices/machine/amigafdc.h index 02e8c823539..9689f89c4ad 100644 --- a/src/devices/machine/amigafdc.h +++ b/src/devices/machine/amigafdc.h @@ -9,7 +9,7 @@ class amiga_fdc_device : public device_t { public: - amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto index_callback() { return m_write_index.bind(); } auto read_dma_callback() { return m_read_dma.bind(); } diff --git a/src/devices/machine/applefdintf.cpp b/src/devices/machine/applefdintf.cpp index 68a849ba59b..0ff7cf58d28 100644 --- a/src/devices/machine/applefdintf.cpp +++ b/src/devices/machine/applefdintf.cpp @@ -50,7 +50,7 @@ void applefdintf_device::floppies_35(device_slot_interface &device) device.option_add("35hd", MFD75W); } -applefdintf_device::applefdintf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +applefdintf_device::applefdintf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_phases_cb(*this), m_devsel_cb(*this), diff --git a/src/devices/machine/applefdintf.h b/src/devices/machine/applefdintf.h index 97f5bc19b22..70f6aa20af5 100644 --- a/src/devices/machine/applefdintf.h +++ b/src/devices/machine/applefdintf.h @@ -105,7 +105,7 @@ protected: // Current value of the driven external phases input u8 m_phases_input; - applefdintf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + applefdintf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/machine/applepic.cpp b/src/devices/machine/applepic.cpp index 0383bb6817c..7f5b33f7ccc 100644 --- a/src/devices/machine/applepic.cpp +++ b/src/devices/machine/applepic.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(APPLEPIC, applepic_device, "applepic", "Apple 343S1021 PIC") const std::string_view applepic_device::s_interrupt_names[8] = { "0", "DMA 1", "DMA 2", "peripheral", "host", "timer", "6", "7" }; -applepic_device::applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +applepic_device::applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLEPIC, tag, owner, clock) , m_iopcpu(*this, "iopcpu") , m_prd_callback(*this) diff --git a/src/devices/machine/applepic.h b/src/devices/machine/applepic.h index 67d6186a963..9e03e61d3cb 100644 --- a/src/devices/machine/applepic.h +++ b/src/devices/machine/applepic.h @@ -18,7 +18,7 @@ class applepic_device : public device_t { public: // construction/destruction - applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto prd_callback() { return m_prd_callback.bind(); } diff --git a/src/devices/machine/archimedes_keyb.cpp b/src/devices/machine/archimedes_keyb.cpp index a6aa8278969..6fc27036e79 100644 --- a/src/devices/machine/archimedes_keyb.cpp +++ b/src/devices/machine/archimedes_keyb.cpp @@ -230,7 +230,7 @@ ioport_constructor archimedes_keyboard_device::device_input_ports() const // archimedes_keyboard_device - constructor //------------------------------------------------- -archimedes_keyboard_device::archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +archimedes_keyboard_device::archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARCHIMEDES_KEYBOARD, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_mcu(*this, "mcu") @@ -252,7 +252,7 @@ void archimedes_keyboard_device::device_start() { // KART interface set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); - set_rate(31250); + set_rate(XTAL::u(31250)); m_mouse_timer = timer_alloc(FUNC(archimedes_keyboard_device::update_mouse), this); diff --git a/src/devices/machine/archimedes_keyb.h b/src/devices/machine/archimedes_keyb.h index 7acf6ae8d59..5c2dfc300c5 100644 --- a/src/devices/machine/archimedes_keyb.h +++ b/src/devices/machine/archimedes_keyb.h @@ -25,7 +25,7 @@ class archimedes_keyboard_device : public device_t, public device_serial_interfa { public: // construction/destruction - archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto kout() { return m_kout.bind(); } diff --git a/src/devices/machine/arm_iomd.cpp b/src/devices/machine/arm_iomd.cpp index e1c32d8d3f3..c29f51d231d 100644 --- a/src/devices/machine/arm_iomd.cpp +++ b/src/devices/machine/arm_iomd.cpp @@ -136,7 +136,7 @@ void arm_iomd_device::map(address_map &map) } -arm_iomd_device::arm_iomd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +arm_iomd_device::arm_iomd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_host_cpu(*this, finder_base::DUMMY_TAG) , m_vidc(*this, finder_base::DUMMY_TAG) @@ -157,7 +157,7 @@ arm_iomd_device::arm_iomd_device(const machine_config &mconfig, device_type type { } -arm_iomd_device::arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm_iomd_device::arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm_iomd_device(mconfig, ARM_IOMD, tag, owner, clock) { m_id = 0xd4e7; @@ -204,7 +204,7 @@ void arm7500fe_iomd_device::map(address_map &map) } -arm7500fe_iomd_device::arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arm7500fe_iomd_device::arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm_iomd_device(mconfig, ARM7500FE_IOMD, tag, owner, clock) , m_iolines_read_cb(*this) , m_iolines_write_cb(*this) diff --git a/src/devices/machine/arm_iomd.h b/src/devices/machine/arm_iomd.h index e072a7c8a31..6ac3854486f 100644 --- a/src/devices/machine/arm_iomd.h +++ b/src/devices/machine/arm_iomd.h @@ -34,8 +34,8 @@ class arm_iomd_device : public device_t { public: // construction/destruction - arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - arm_iomd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + arm_iomd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template auto iocr_read_od() { return m_iocr_read_od_cb[N].bind(); } template auto iocr_write_od() { return m_iocr_write_od_cb[N].bind(); } @@ -167,7 +167,7 @@ class arm7500fe_iomd_device : public arm_iomd_device { public: // construction/destruction - arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; auto iolines_read() { return m_iolines_read_cb.bind(); } diff --git a/src/devices/machine/at.cpp b/src/devices/machine/at.cpp index 75b57c8777d..cd04e6b219f 100644 --- a/src/devices/machine/at.cpp +++ b/src/devices/machine/at.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(AT_MB, at_mb_device, "at_mb", "PC/AT Motherboard") -at_mb_device::at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +at_mb_device::at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AT_MB, tag, owner, clock), m_maincpu(*this, ":maincpu"), m_isabus(*this, "isabus"), @@ -107,7 +107,7 @@ void at_mb_device::device_add_mconfig(machine_config &config) m_pic8259_slave->out_int_callback().set("pic8259_master", FUNC(pic8259_device::ir2_w)); m_pic8259_slave->in_sp_callback().set_constant(0); - ISA16(config, m_isabus, 0); + ISA16(config, m_isabus); m_isabus->set_memspace(":maincpu", AS_PROGRAM); m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq2_callback().set(m_pic8259_slave, FUNC(pic8259_device::ir1_w)); // in place of irq 2 on at irq 9 is used diff --git a/src/devices/machine/at.h b/src/devices/machine/at.h index 346721ffbbd..f2f20045b01 100644 --- a/src/devices/machine/at.h +++ b/src/devices/machine/at.h @@ -15,7 +15,7 @@ class at_mb_device : public device_t { public: - at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp index 38dbdc25117..73dbbb57760 100644 --- a/src/devices/machine/at28c16.cpp +++ b/src/devices/machine/at28c16.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(AT28C16, at28c16_device, "at28c16", "AT28C16 2Kx8 EEPROM") // at28c16_device - constructor //------------------------------------------------- -at28c16_device::at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at28c16_device::at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AT28C16, tag, owner, clock), device_memory_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/at28c16.h b/src/devices/machine/at28c16.h index ca412d7c0af..bab4db821e8 100644 --- a/src/devices/machine/at28c16.h +++ b/src/devices/machine/at28c16.h @@ -27,7 +27,7 @@ class at28c16_device : { public: // construction/destruction - at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); uint8_t read(offs_t offset); diff --git a/src/devices/machine/at28c64b.cpp b/src/devices/machine/at28c64b.cpp index 7187a3cd093..88ae9613b6f 100644 --- a/src/devices/machine/at28c64b.cpp +++ b/src/devices/machine/at28c64b.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(AT28C64B, at28c64b_device, "at28c64b", "AT28C64B 8Kx8 EEPROM" // at28c64b_device - constructor //------------------------------------------------- -at28c64b_device::at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at28c64b_device::at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AT28C64B, tag, owner, clock), device_memory_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/at28c64b.h b/src/devices/machine/at28c64b.h index c94ac1eec62..d07b45e3ecf 100644 --- a/src/devices/machine/at28c64b.h +++ b/src/devices/machine/at28c64b.h @@ -27,7 +27,7 @@ class at28c64b_device : { public: // construction/destruction - at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, u8 data); u8 read(offs_t offset); diff --git a/src/devices/machine/at29x.cpp b/src/devices/machine/at29x.cpp index bf0544ede0f..6ad988b190a 100644 --- a/src/devices/machine/at29x.cpp +++ b/src/devices/machine/at29x.cpp @@ -56,7 +56,7 @@ Constructor for all variants */ -at29x_device::at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int memory_size, int device_id, int sector_size) +at29x_device::at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int memory_size, int device_id, int sector_size) : device_t(mconfig, type, tag, owner, clock), device_nvram_interface(mconfig, *this), m_memory_size(memory_size), // bytes @@ -72,7 +72,7 @@ at29x_device::at29x_device(const machine_config &mconfig, device_type type, cons /* Constructor for AT29C020 */ -at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at29x_device(mconfig, AT29C020, tag, owner, clock, 256*1024, 0xda, 256) { } @@ -80,7 +80,7 @@ at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, /* Constructor for AT29C040 */ -at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at29x_device(mconfig, AT29C040, tag, owner, clock, 512*1024, 0x5b, 512) { } @@ -88,7 +88,7 @@ at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, /* Constructor for AT29C040A */ -at29c040a_device::at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at29c040a_device::at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at29x_device(mconfig, AT29C040A, tag, owner, clock, 512*1024, 0xa4, 256) { } diff --git a/src/devices/machine/at29x.h b/src/devices/machine/at29x.h index 5df3672877f..110f1ad3c01 100644 --- a/src/devices/machine/at29x.h +++ b/src/devices/machine/at29x.h @@ -24,7 +24,7 @@ public: void write(offs_t offset, uint8_t data); protected: - at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int memory_size, int device_id, int sector_size); + at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int memory_size, int device_id, int sector_size); virtual void device_start(void) override; virtual void device_reset(void) override; @@ -92,19 +92,19 @@ private: class at29c020_device : public at29x_device { public: - at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class at29c040_device : public at29x_device { public: - at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class at29c040a_device : public at29x_device { public: - at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; #endif // MAME_MACHINE_AT29X_H diff --git a/src/devices/machine/at45dbxx.cpp b/src/devices/machine/at45dbxx.cpp index 890cd78ac59..a70bee5c462 100644 --- a/src/devices/machine/at45dbxx.cpp +++ b/src/devices/machine/at45dbxx.cpp @@ -46,13 +46,13 @@ DEFINE_DEVICE_TYPE(AT45DB161, at45db161_device, "at45db161", "AT45DB161") // at45db041_device - constructor //------------------------------------------------- -at45db041_device::at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at45db041_device::at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at45db041_device(mconfig, AT45DB041, tag, owner, clock) { } -at45db041_device::at45db041_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +at45db041_device::at45db041_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , write_so(*this) @@ -60,13 +60,13 @@ at45db041_device::at45db041_device(const machine_config &mconfig, device_type ty } -at45db081_device::at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at45db081_device::at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at45db041_device(mconfig, AT45DB081, tag, owner, clock) { } -at45db161_device::at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at45db161_device::at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at45db041_device(mconfig, AT45DB161, tag, owner, clock) { } diff --git a/src/devices/machine/at45dbxx.h b/src/devices/machine/at45dbxx.h index 2521ac10acc..84da1d96c1d 100644 --- a/src/devices/machine/at45dbxx.h +++ b/src/devices/machine/at45dbxx.h @@ -24,7 +24,7 @@ class at45db041_device : public device_t, public device_nvram_interface { public: - at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(cs_w); DECLARE_WRITE_LINE_MEMBER(sck_w); @@ -36,7 +36,7 @@ public: auto so_callback() { return write_so.bind(); } protected: - at45db041_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + at45db041_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -101,7 +101,7 @@ protected: class at45db081_device : public at45db041_device { public: - at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int num_pages() const override { return 4096; } @@ -116,7 +116,7 @@ protected: class at45db161_device : public at45db041_device { public: - at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int num_pages() const override { return 4096; } diff --git a/src/devices/machine/at_keybc.cpp b/src/devices/machine/at_keybc.cpp index a166ff234cb..03cda01a664 100644 --- a/src/devices/machine/at_keybc.cpp +++ b/src/devices/machine/at_keybc.cpp @@ -282,7 +282,7 @@ WRITE_LINE_MEMBER(at_kbc_device_base::kbd_data_w) machine().scheduler().synchronize(timer_expired_delegate(FUNC(at_kbc_device_base::set_kbd_data_in), this), state); } -at_kbc_device_base::at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +at_kbc_device_base::at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_mcu(*this, "mcu") , m_hot_res_cb(*this), m_gate_a20_cb(*this), m_kbd_irq_cb(*this) @@ -381,7 +381,7 @@ TIMER_CALLBACK_MEMBER(at_kbc_device_base::set_kbd_data_in) // PC/AT KEYBOARD CONTROLLER DEVICE //************************************************************************** -at_keyboard_controller_device::at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +at_keyboard_controller_device::at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : at_kbc_device_base(mconfig, AT_KEYBOARD_CONTROLLER, tag, owner, clock) { } @@ -452,7 +452,7 @@ WRITE_LINE_MEMBER(ps2_keyboard_controller_device::aux_data_w) machine().scheduler().synchronize(timer_expired_delegate(FUNC(ps2_keyboard_controller_device::set_aux_data_in), this), state); } -ps2_keyboard_controller_device::ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ps2_keyboard_controller_device::ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : at_kbc_device_base(mconfig, PS2_KEYBOARD_CONTROLLER, tag, owner, clock) , m_aux_irq_cb(*this) , m_aux_clk_cb(*this), m_aux_data_cb(*this) diff --git a/src/devices/machine/at_keybc.h b/src/devices/machine/at_keybc.h index 9e769416cb2..afaa85b3d4e 100644 --- a/src/devices/machine/at_keybc.h +++ b/src/devices/machine/at_keybc.h @@ -41,7 +41,7 @@ public: protected: // trampoline constructor - at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t implementation virtual void device_resolve_objects() override; @@ -83,7 +83,7 @@ class at_keyboard_controller_device : public at_kbc_device_base { public: // standard constructor - at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t implementation @@ -120,7 +120,7 @@ public: DECLARE_WRITE_LINE_MEMBER(aux_data_w); // standard constructor - ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t implementation diff --git a/src/devices/machine/ataflash.cpp b/src/devices/machine/ataflash.cpp index 892031e2052..c2c30d5e401 100644 --- a/src/devices/machine/ataflash.cpp +++ b/src/devices/machine/ataflash.cpp @@ -5,12 +5,12 @@ DEFINE_DEVICE_TYPE(ATA_FLASH_PCCARD, ata_flash_pccard_device, "ataflash", "ATA Flash PC Card") -ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, ATA_FLASH_PCCARD, tag, owner, clock) { } -ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ide_hdd_device(mconfig, type, tag, owner, clock) , device_pccard_interface(mconfig, *this) { @@ -118,7 +118,7 @@ attotime ata_flash_pccard_device::seek_time() DEFINE_DEVICE_TYPE(TAITO_PCCARD1, taito_pccard1_device, "taito_pccard1", "Taito PC Card (Type 1)") -taito_pccard1_device::taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +taito_pccard1_device::taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, TAITO_PCCARD1, tag, owner, clock), m_locked(0) { @@ -207,7 +207,7 @@ bool taito_pccard1_device::is_ready() DEFINE_DEVICE_TYPE(TAITO_PCCARD2, taito_pccard2_device, "taito_pccard2", "Taito PC Card (Type 2)") -taito_pccard2_device::taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +taito_pccard2_device::taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, TAITO_PCCARD2, tag, owner, clock), m_locked(false) { @@ -304,7 +304,7 @@ bool taito_pccard2_device::is_ready() DEFINE_DEVICE_TYPE(TAITO_COMPACT_FLASH, taito_compact_flash_device, "taito_cf", "Taito Compact Flash") -taito_compact_flash_device::taito_compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +taito_compact_flash_device::taito_compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, TAITO_COMPACT_FLASH, tag, owner, clock), m_locked(false) { diff --git a/src/devices/machine/ataflash.h b/src/devices/machine/ataflash.h index c9e3cbbf991..ad30f883b03 100644 --- a/src/devices/machine/ataflash.h +++ b/src/devices/machine/ataflash.h @@ -13,7 +13,7 @@ DECLARE_DEVICE_TYPE(ATA_FLASH_PCCARD, ata_flash_pccard_device) class ata_flash_pccard_device : public ide_hdd_device, public device_pccard_interface { public: - ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read_memory(offs_t offset, uint16_t mem_mask = ~0) override; virtual void write_memory(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; @@ -21,7 +21,7 @@ public: virtual void write_reg(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; protected: - ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_reset() override; @@ -41,7 +41,7 @@ DECLARE_DEVICE_TYPE(TAITO_PCCARD1, taito_pccard1_device) class taito_pccard1_device : public ata_flash_pccard_device { public: - taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read_reg(offs_t offset, uint16_t mem_mask = ~0) override; virtual void write_reg(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; @@ -62,7 +62,7 @@ DECLARE_DEVICE_TYPE(TAITO_PCCARD2, taito_pccard2_device) class taito_pccard2_device : public ata_flash_pccard_device { public: - taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -84,7 +84,7 @@ DECLARE_DEVICE_TYPE(TAITO_COMPACT_FLASH, taito_compact_flash_device) class taito_compact_flash_device : public ata_flash_pccard_device { public: - taito_compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito_compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/atmel_arm_aic.h b/src/devices/machine/atmel_arm_aic.h index 72659841f3a..88308ddf87c 100644 --- a/src/devices/machine/atmel_arm_aic.h +++ b/src/devices/machine/atmel_arm_aic.h @@ -12,7 +12,7 @@ class arm_aic_device : public device_t { public: // construction/destruction - arm_aic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + arm_aic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARM_AIC, tag, owner, clock), m_irq_out(*this) { diff --git a/src/devices/machine/ay31015.cpp b/src/devices/machine/ay31015.cpp index a3cbbe456aa..2a5cce6e131 100644 --- a/src/devices/machine/ay31015.cpp +++ b/src/devices/machine/ay31015.cpp @@ -104,7 +104,7 @@ Start bit (low), Bit 0, Bit 1... highest bit, Parity bit (if enabled), 1-2 stop DEFINE_DEVICE_TYPE(AY31015, ay31015_device, "ay31015", "AY-3-1015 UART") DEFINE_DEVICE_TYPE(AY51013, ay51013_device, "ay51013", "AY-5-1013 UART") -ay31015_device::ay31015_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ay31015_device::ay31015_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_control_reg(0), m_status_reg(0), @@ -134,12 +134,12 @@ ay31015_device::ay31015_device(const machine_config &mconfig, device_type type, elem = 0; } -ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay31015_device(mconfig, AY31015, tag, owner, clock) { } -ay51013_device::ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ay51013_device::ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay31015_device(mconfig, AY51013, tag, owner, clock) { } diff --git a/src/devices/machine/ay31015.h b/src/devices/machine/ay31015.h index 4e27bc8e11f..a351522c4d8 100644 --- a/src/devices/machine/ay31015.h +++ b/src/devices/machine/ay31015.h @@ -18,7 +18,7 @@ class ay31015_device : public device_t { public: - ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_auto_rdav(bool auto_rdav) { m_auto_rdav = auto_rdav; } @@ -101,7 +101,7 @@ protected: PREP_TIME }; - ay31015_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ay31015_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -157,7 +157,7 @@ protected: class ay51013_device : public ay31015_device { public: - ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void internal_reset() override; diff --git a/src/devices/machine/bacta_datalogger.cpp b/src/devices/machine/bacta_datalogger.cpp index 43f9855bfd9..18ed6fcd39f 100644 --- a/src/devices/machine/bacta_datalogger.cpp +++ b/src/devices/machine/bacta_datalogger.cpp @@ -29,12 +29,12 @@ DEFINE_DEVICE_TYPE(BACTA_DATALOGGER, bacta_datalogger_device, "bacta_datalogger" // bacta_datalogger_device - constructor //------------------------------------------------- -bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bacta_datalogger_device(mconfig, BACTA_DATALOGGER, tag, owner, clock) { } -bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BACTA_DATALOGGER, tag, owner, clock), device_serial_interface(mconfig, *this), m_rxd_handler(*this), @@ -57,9 +57,9 @@ void bacta_datalogger_device::device_reset() set_data_frame(startbits, databits, parity, stopbits); - set_tra_rate(1200); + set_tra_rate(XTAL::u(1200)); - set_rcv_rate(1200); + set_rcv_rate(XTAL::u(1200)); output_rxd(1); } @@ -70,7 +70,7 @@ void bacta_datalogger_device::tx_queue() { if (m_output_char != 255) { - set_tra_rate(1200); + set_tra_rate(XTAL::u(1200)); transmit_register_setup(m_output_char); m_output_char = 255; } diff --git a/src/devices/machine/bacta_datalogger.h b/src/devices/machine/bacta_datalogger.h index 61555d85acd..44245c8a884 100644 --- a/src/devices/machine/bacta_datalogger.h +++ b/src/devices/machine/bacta_datalogger.h @@ -9,7 +9,7 @@ class bacta_datalogger_device : public device_t, public device_serial_interface { public: - bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual WRITE_LINE_MEMBER( write_txd ) {device_serial_interface::rx_w(state); } auto rxd_handler() { return m_rxd_handler.bind(); } @@ -17,7 +17,7 @@ public: DECLARE_WRITE_LINE_MEMBER( output_rxd ) { m_rxd_handler(state); } protected: - bacta_datalogger_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bacta_datalogger_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/machine/bankdev.cpp b/src/devices/machine/bankdev.cpp index e8e141ff7e6..308a116a9e9 100644 --- a/src/devices/machine/bankdev.cpp +++ b/src/devices/machine/bankdev.cpp @@ -6,7 +6,7 @@ // device type definition DEFINE_DEVICE_TYPE(ADDRESS_MAP_BANK, address_map_bank_device, "address_map_bank", "Address Map Bank") -address_map_bank_device::address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +address_map_bank_device::address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADDRESS_MAP_BANK, tag, owner, clock), device_memory_interface(mconfig, *this), m_endianness(ENDIANNESS_NATIVE), diff --git a/src/devices/machine/bankdev.h b/src/devices/machine/bankdev.h index 05a3c2eb411..3f0cd1d3f3d 100644 --- a/src/devices/machine/bankdev.h +++ b/src/devices/machine/bankdev.h @@ -12,7 +12,7 @@ class address_map_bank_device : { public: // construction/destruction - address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template address_map_bank_device& set_map(T &&... args) { set_addrmap(0, std::forward(args)...); return *this; } diff --git a/src/devices/machine/bcreader.cpp b/src/devices/machine/bcreader.cpp index a94c488583c..8d80e084337 100644 --- a/src/devices/machine/bcreader.cpp +++ b/src/devices/machine/bcreader.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(BARCODE_READER, barcode_reader_device, "bcreader", "Barcode R // barcode_reader_device - constructor //------------------------------------------------- -barcode_reader_device::barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +barcode_reader_device::barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BARCODE_READER, tag, owner, clock) , m_byte_length(0) , m_pixel_length(0) diff --git a/src/devices/machine/bcreader.h b/src/devices/machine/bcreader.h index 6fd3966bef0..3b5fe3eb86d 100644 --- a/src/devices/machine/bcreader.h +++ b/src/devices/machine/bcreader.h @@ -17,7 +17,7 @@ class barcode_reader_device : public device_t { public: // construction/destruction - barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write_code(const char *barcode, int len); int get_pending_code() { return m_new_code; } diff --git a/src/devices/machine/bitmap_printer.cpp b/src/devices/machine/bitmap_printer.cpp index ca552a14694..83296b5474b 100644 --- a/src/devices/machine/bitmap_printer.cpp +++ b/src/devices/machine/bitmap_printer.cpp @@ -76,7 +76,7 @@ void bitmap_printer_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_cr_direction(1), m_xpos(0), @@ -108,13 +108,13 @@ bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, devi { } -bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bitmap_printer_device(mconfig, BITMAP_PRINTER, tag, owner, clock) { } bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, int paper_width, int paper_height, int hdpi, int vdpi) : - bitmap_printer_device(mconfig, tag, owner, u32(0)) + bitmap_printer_device(mconfig, tag, owner) { m_paper_width = paper_width; m_paper_height = paper_height; diff --git a/src/devices/machine/bitmap_printer.h b/src/devices/machine/bitmap_printer.h index 7b05f0e8c15..6541a2ade47 100644 --- a/src/devices/machine/bitmap_printer.h +++ b/src/devices/machine/bitmap_printer.h @@ -24,7 +24,7 @@ class bitmap_printer_device : public device_t { public: - bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, int paper_width, int paper_height, int hdpi, int vdpi); enum @@ -65,7 +65,7 @@ public: int m_ypos; protected: - bitmap_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bitmap_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/bl_handhelds_menucontrol.cpp b/src/devices/machine/bl_handhelds_menucontrol.cpp index 18982731069..af101981a1f 100644 --- a/src/devices/machine/bl_handhelds_menucontrol.cpp +++ b/src/devices/machine/bl_handhelds_menucontrol.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(BL_HANDHELDS_MENUCONTROL, bl_handhelds_menucontrol_device, "blhandheldmenu", "BaoBaoLong Handhelds Menu Controller") -bl_handhelds_menucontrol_device::bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bl_handhelds_menucontrol_device::bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BL_HANDHELDS_MENUCONTROL, tag, owner, clock), m_is_unsp_type_hack(false) { diff --git a/src/devices/machine/bl_handhelds_menucontrol.h b/src/devices/machine/bl_handhelds_menucontrol.h index 747a60db76b..7ad8e6b772e 100644 --- a/src/devices/machine/bl_handhelds_menucontrol.h +++ b/src/devices/machine/bl_handhelds_menucontrol.h @@ -12,7 +12,7 @@ class bl_handhelds_menucontrol_device : public device_t { public: // construction/destruction - bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // the chip is the same between systems, but there's some logic not fully understood that is causing off-by-1 errors on some calcs void set_is_unsp_type_hack() { m_is_unsp_type_hack = true; } diff --git a/src/devices/machine/bq4847.cpp b/src/devices/machine/bq4847.cpp index 91fca4b8edd..db85cd16a92 100644 --- a/src/devices/machine/bq4847.cpp +++ b/src/devices/machine/bq4847.cpp @@ -74,7 +74,7 @@ enum // Constructors for basetype //------------------------------------------------- -bq4847_device::bq4847_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) +bq4847_device::bq4847_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nvram_interface(mconfig, *this), device_rtc_interface(mconfig, *this), @@ -92,12 +92,12 @@ bq4847_device::bq4847_device(const machine_config& mconfig, device_type type, co { } -bq4847_device::bq4847_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bq4847_device::bq4847_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : bq4847_device(mconfig, BQ4847, tag, owner, clock) { } -bq4845_device::bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bq4845_device::bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : bq4847_device(mconfig, BQ4845, tag, owner, clock) { } diff --git a/src/devices/machine/bq4847.h b/src/devices/machine/bq4847.h index 2658e207962..590c2b43aa6 100644 --- a/src/devices/machine/bq4847.h +++ b/src/devices/machine/bq4847.h @@ -20,7 +20,7 @@ class bq4847_device : public device_t, public device_rtc_interface { public: - bq4847_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bq4847_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto wdo_handler() { return m_wdo_handler.bind(); } auto int_handler() { return m_int_handler.bind(); } @@ -32,7 +32,7 @@ public: DECLARE_WRITE_LINE_MEMBER(write_wdi); // watchdog disabled if wdi pin is left floating protected: - bq4847_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 32768); + bq4847_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); // device_t virtual void device_start() override; @@ -89,7 +89,7 @@ private: class bq4845_device : public bq4847_device { public: - bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(BQ4845, bq4845_device) diff --git a/src/devices/machine/bq48x2.cpp b/src/devices/machine/bq48x2.cpp index 849f019ce6c..a8b8b8f2c45 100644 --- a/src/devices/machine/bq48x2.cpp +++ b/src/devices/machine/bq48x2.cpp @@ -60,7 +60,7 @@ enum //------------------------------------------------- bq48x2_device::bq48x2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, int memsize) - : device_t(mconfig, type, tag, owner, 0), + : device_t(mconfig, type, tag, owner), device_nvram_interface(mconfig, *this), device_rtc_interface(mconfig, *this), m_interrupt_cb(*this), @@ -74,13 +74,13 @@ bq48x2_device::bq48x2_device(const machine_config &mconfig, device_type type, co //------------------------------------------------- // 128 KiB memory (including clock registers) -bq4842_device::bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bq4842_device::bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bq48x2_device(mconfig, BQ4842, tag, owner, 128*1024) { } // 512 KiB memory (including clock registers) -bq4852_device::bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bq4852_device::bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bq48x2_device(mconfig, BQ4852, tag, owner, 512*1024) { } diff --git a/src/devices/machine/bq48x2.h b/src/devices/machine/bq48x2.h index f19b9778c7c..0a36a8d11f8 100644 --- a/src/devices/machine/bq48x2.h +++ b/src/devices/machine/bq48x2.h @@ -121,13 +121,13 @@ private: class bq4842_device : public bq48x2_device { public: - bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class bq4852_device : public bq48x2_device { public: - bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(BQ4842, bq4842_device) diff --git a/src/devices/machine/buffer.cpp b/src/devices/machine/buffer.cpp index b1a93df8fb7..4eb95a7a79c 100644 --- a/src/devices/machine/buffer.cpp +++ b/src/devices/machine/buffer.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(INPUT_BUFFER, input_buffer_device, "input_buffer", "Input Buffer") -input_buffer_device::input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +input_buffer_device::input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INPUT_BUFFER, tag, owner, clock) , m_input_data(0xff) { diff --git a/src/devices/machine/buffer.h b/src/devices/machine/buffer.h index 5df28af6c6b..b14e7a1ff1e 100644 --- a/src/devices/machine/buffer.h +++ b/src/devices/machine/buffer.h @@ -6,7 +6,7 @@ class input_buffer_device : public device_t { public: - input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read() { return m_input_data; } diff --git a/src/devices/machine/busmouse.cpp b/src/devices/machine/busmouse.cpp index 2def623649b..bcdf237b9f3 100644 --- a/src/devices/machine/busmouse.cpp +++ b/src/devices/machine/busmouse.cpp @@ -118,7 +118,7 @@ ioport_constructor bus_mouse_device::device_input_ports() const // bus_mouse_device - constructor //------------------------------------------------- -bus_mouse_device::bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bus_mouse_device::bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BUS_MOUSE, tag, owner, clock) , m_write_extint(*this) , m_buttons(*this, "mouse_buttons") diff --git a/src/devices/machine/busmouse.h b/src/devices/machine/busmouse.h index 29c20d236ee..93718527d62 100644 --- a/src/devices/machine/busmouse.h +++ b/src/devices/machine/busmouse.h @@ -15,7 +15,7 @@ class bus_mouse_device : public device_t { public: // construction/destruction - bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto extint_callback() { return m_write_extint.bind(); } diff --git a/src/devices/machine/cammu.cpp b/src/devices/machine/cammu.cpp index dabc637f085..e889f00fbba 100644 --- a/src/devices/machine/cammu.cpp +++ b/src/devices/machine/cammu.cpp @@ -96,7 +96,7 @@ DEFINE_DEVICE_TYPE(CAMMU_C4T, cammu_c4t_device, "c4t", "C4E/C4T CAMMU") DEFINE_DEVICE_TYPE(CAMMU_C4I, cammu_c4i_device, "c4i", "C4I CAMMU") DEFINE_DEVICE_TYPE(CAMMU_C3, cammu_c3_device, "c3", "C1/C3 CAMMU") -cammu_c4t_device::cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cammu_c4t_device::cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cammu_c4_device(mconfig, CAMMU_C4T, tag, owner, clock) , m_ram_line(0) , m_htlb_offset(0) @@ -113,7 +113,7 @@ cammu_c4t_device::cammu_c4t_device(const machine_config &mconfig, const char *ta { } -cammu_c4i_device::cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cammu_c4i_device::cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cammu_c4_device(mconfig, CAMMU_C4I, tag, owner, clock) , m_reset(0) , m_clr_s_data_tlb(0) @@ -125,7 +125,7 @@ cammu_c4i_device::cammu_c4i_device(const machine_config &mconfig, const char *ta { } -cammu_c4_device::cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cammu_c4_device::cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cammu_device(mconfig, type, tag, owner, clock) , m_s_pdo(0) , m_u_pdo(0) @@ -140,7 +140,7 @@ cammu_c4_device::cammu_c4_device(const machine_config &mconfig, device_type type { } -cammu_c3_device::cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cammu_c3_device::cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cammu_device(mconfig, CAMMU_C3, tag, owner, clock) , m_linked{ this } , m_s_pdo(0) @@ -150,7 +150,7 @@ cammu_c3_device::cammu_c3_device(const machine_config &mconfig, const char *tag, { } -cammu_device::cammu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cammu_device::cammu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_exception_func(*this) { diff --git a/src/devices/machine/cammu.h b/src/devices/machine/cammu.h index 83b44d4b120..64515a19a05 100644 --- a/src/devices/machine/cammu.h +++ b/src/devices/machine/cammu.h @@ -196,7 +196,7 @@ public: bool memory_translate(const u32 ssw, const int spacenum, const int intention, offs_t &address); protected: - cammu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cammu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -293,7 +293,7 @@ public: void fault_data_2_hi_w(u32 data) { m_fault_data_2_hi = data; } protected: - cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -318,7 +318,7 @@ protected: class cammu_c4t_device : public cammu_c4_device { public: - cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -408,7 +408,7 @@ private: class cammu_c4i_device : public cammu_c4_device { public: - cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -505,7 +505,7 @@ private: class cammu_c3_device : public cammu_device { public: - cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void add_linked(cammu_c3_device *child) { m_linked.push_back(child); } diff --git a/src/devices/machine/cdp1852.cpp b/src/devices/machine/cdp1852.cpp index b4850ac669e..7dcf4bfe536 100644 --- a/src/devices/machine/cdp1852.cpp +++ b/src/devices/machine/cdp1852.cpp @@ -39,7 +39,7 @@ enum // cdp1852_device - constructor //------------------------------------------------- -cdp1852_device::cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +cdp1852_device::cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1852, tag, owner, clock), m_read_mode(*this), m_write_sr(*this), diff --git a/src/devices/machine/cdp1852.h b/src/devices/machine/cdp1852.h index 4f4bec622f9..58317abe671 100644 --- a/src/devices/machine/cdp1852.h +++ b/src/devices/machine/cdp1852.h @@ -30,7 +30,7 @@ class cdp1852_device : public device_t { public: // construction/destruction - cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto mode_cb() { return m_read_mode.bind(); } auto sr_cb() { return m_write_sr.bind(); } diff --git a/src/devices/machine/cdp1871.cpp b/src/devices/machine/cdp1871.cpp index 3e32512c30f..18989e6cd78 100644 --- a/src/devices/machine/cdp1871.cpp +++ b/src/devices/machine/cdp1871.cpp @@ -96,7 +96,7 @@ const uint8_t cdp1871_device::key_codes[4][11][8] = // cdp1871_device - constructor //------------------------------------------------- -cdp1871_device::cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1871_device::cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1871, tag, owner, clock), m_read_d1(*this), m_read_d2(*this), diff --git a/src/devices/machine/cdp1871.h b/src/devices/machine/cdp1871.h index a359980f7fb..368cfa5b5d2 100644 --- a/src/devices/machine/cdp1871.h +++ b/src/devices/machine/cdp1871.h @@ -38,7 +38,7 @@ class cdp1871_device : public device_t { public: // construction/destruction - cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto d1_callback() { return m_read_d1.bind(); } auto d2_callback() { return m_read_d2.bind(); } diff --git a/src/devices/machine/cdp1879.cpp b/src/devices/machine/cdp1879.cpp index f6687f73226..f680146e169 100644 --- a/src/devices/machine/cdp1879.cpp +++ b/src/devices/machine/cdp1879.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(CDP1879, cdp1879_device, "cdp1879", "RCA CDP1879 RTC") // cdp1879_device - constructor //------------------------------------------------- -cdp1879_device::cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdp1879_device::cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1879, tag, owner, clock), device_rtc_interface(mconfig, *this), m_irq_w(*this) diff --git a/src/devices/machine/cdp1879.h b/src/devices/machine/cdp1879.h index 4dc761b5fd7..3ac6a05d1b4 100644 --- a/src/devices/machine/cdp1879.h +++ b/src/devices/machine/cdp1879.h @@ -18,7 +18,7 @@ class cdp1879_device : public device_t, { public: // construction/destruction - cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/ch376.cpp b/src/devices/machine/ch376.cpp index eeca140ec0a..8c674e297a4 100644 --- a/src/devices/machine/ch376.cpp +++ b/src/devices/machine/ch376.cpp @@ -74,7 +74,7 @@ static constexpr u8 CMD_BYTE_WR_GO = 0x3d; // ch376_device - constructor //------------------------------------------------- -ch376_device::ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ch376_device::ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CH376, tag, owner, clock), m_state(0), m_status(0), diff --git a/src/devices/machine/ch376.h b/src/devices/machine/ch376.h index d00586b1503..7a1e58e5bc9 100644 --- a/src/devices/machine/ch376.h +++ b/src/devices/machine/ch376.h @@ -28,7 +28,7 @@ class ch376_device : public device_t { public: // construction/destruction - ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u8 read(offs_t offset); void write(offs_t offset, u8 data); diff --git a/src/devices/machine/chessmachine.cpp b/src/devices/machine/chessmachine.cpp index 1016cec2ec4..3b7a7a65768 100644 --- a/src/devices/machine/chessmachine.cpp +++ b/src/devices/machine/chessmachine.cpp @@ -42,7 +42,7 @@ DEFINE_DEVICE_TYPE(CHESSMACHINE, chessmachine_device, "chessmachine", "Tasc Ches // constructor //------------------------------------------------- -chessmachine_device::chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +chessmachine_device::chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CHESSMACHINE, tag, owner, clock), m_maincpu(*this, "maincpu"), m_bootrom(*this, "bootrom"), diff --git a/src/devices/machine/chessmachine.h b/src/devices/machine/chessmachine.h index 561e95459a7..dfbc5747a1a 100644 --- a/src/devices/machine/chessmachine.h +++ b/src/devices/machine/chessmachine.h @@ -18,7 +18,7 @@ class chessmachine_device : public device_t { public: - chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto data_out() { return m_data_out.bind(); } // data_r diff --git a/src/devices/machine/clock.cpp b/src/devices/machine/clock.cpp index 4c2ad3afd7a..19760c789b2 100644 --- a/src/devices/machine/clock.cpp +++ b/src/devices/machine/clock.cpp @@ -19,7 +19,7 @@ Output signal at machine start is right after falling edge. DEFINE_DEVICE_TYPE(CLOCK, clock_device, "clock", "Clock") -clock_device::clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +clock_device::clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CLOCK, tag, owner, clock), m_signal(0), m_output(-1), diff --git a/src/devices/machine/clock.h b/src/devices/machine/clock.h index 1dc4739ce6c..1e822985106 100644 --- a/src/devices/machine/clock.h +++ b/src/devices/machine/clock.h @@ -14,7 +14,7 @@ class clock_device : public device_t { public: - clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto signal_handler() { return m_signal_handler.bind(); } auto &set_period(attotime period) { m_period = period; reinit(); return *this; } diff --git a/src/devices/machine/com52c50.cpp b/src/devices/machine/com52c50.cpp index 89b4e176f85..0488a12f088 100644 --- a/src/devices/machine/com52c50.cpp +++ b/src/devices/machine/com52c50.cpp @@ -15,7 +15,7 @@ // device type definition DEFINE_DEVICE_TYPE(COM52C50, com52c50_device, "com52c50", "SMC COM52C50 TIC") -com52c50_device::com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +com52c50_device::com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COM52C50, tag, owner, clock) , m_int1_callback(*this) , m_int2_callback(*this) diff --git a/src/devices/machine/com52c50.h b/src/devices/machine/com52c50.h index 085a3e0808a..b5c47a0e484 100644 --- a/src/devices/machine/com52c50.h +++ b/src/devices/machine/com52c50.h @@ -35,7 +35,7 @@ class com52c50_device : public device_t { public: // device type constructor - com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto int1_callback() { return m_int1_callback.bind(); } diff --git a/src/devices/machine/com8116.cpp b/src/devices/machine/com8116.cpp index 38364b4b101..6645d01200d 100644 --- a/src/devices/machine/com8116.cpp +++ b/src/devices/machine/com8116.cpp @@ -88,7 +88,7 @@ const int com8116_device::divisors_16X_4_6080MHz[16] = // com8116_device - constructor //------------------------------------------------- -com8116_device::com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const int *divisors) : +com8116_device::com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const int *divisors) : device_t(mconfig, type, tag, owner, clock), m_fx4_handler(*this), m_fr_handler(*this), @@ -97,32 +97,32 @@ com8116_device::com8116_device(const machine_config &mconfig, device_type type, { } -com8116_device::com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com8116_device::com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM8116, tag, owner, clock, divisors_16X_5_0688MHz) { } -com8116_003_device::com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com8116_003_device::com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM8116_003, tag, owner, clock, divisors_16X_6_01835MHz) { } -com5016_5_device::com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com5016_5_device::com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM5016_5, tag, owner, clock, divisors_16X_4_9152MHz) { } -com5016_013_device::com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com5016_013_device::com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM5016_013, tag, owner, clock, divisors_16X_2_7648MHz) { } -com8116_020_device::com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com8116_020_device::com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM8116_020, tag, owner, clock, divisors_16X_1_8432MHz) { } -k1135ab_device::k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k1135ab_device::k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, K1135AB, tag, owner, clock, divisors_16X_5_0688MHz) { } diff --git a/src/devices/machine/com8116.h b/src/devices/machine/com8116.h index 908d7c782d2..351fb940f32 100644 --- a/src/devices/machine/com8116.h +++ b/src/devices/machine/com8116.h @@ -37,7 +37,7 @@ class com8116_device : public device_t { public: // construction/destruction - com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto fx4_handler() { return m_fx4_handler.bind(); } auto fr_handler() { return m_fr_handler.bind(); } @@ -49,7 +49,7 @@ public: void stt_str_w(uint8_t data); protected: - com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const int *divisors); + com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const int *divisors); static const int divisors_16X_5_0688MHz[16]; static const int divisors_16X_6_01835MHz[16]; @@ -92,7 +92,7 @@ class com8116_003_device : public com8116_device { public: // construction/destruction - com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -102,7 +102,7 @@ class com5016_5_device : public com8116_device { public: // construction/destruction - com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -112,7 +112,7 @@ class com5016_013_device : public com8116_device { public: // construction/destruction - com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -122,7 +122,7 @@ class com8116_020_device : public com8116_device { public: // construction/destruction - com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -132,7 +132,7 @@ class k1135ab_device : public com8116_device { public: // construction/destruction - k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/cop452.cpp b/src/devices/machine/cop452.cpp index 87e2d0954d5..a547ee9c66b 100644 --- a/src/devices/machine/cop452.cpp +++ b/src/devices/machine/cop452.cpp @@ -19,7 +19,7 @@ // Device type definition DEFINE_DEVICE_TYPE(COP452, cop452_device, "cop452", "National Semiconductor COP452 frequency generator") -cop452_device::cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cop452_device::cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COP452, tag, owner, clock) , m_out_handlers(*this) { diff --git a/src/devices/machine/cop452.h b/src/devices/machine/cop452.h index 238e5c8b5ca..7b0c36e30bc 100644 --- a/src/devices/machine/cop452.h +++ b/src/devices/machine/cop452.h @@ -26,7 +26,7 @@ class cop452_device : public device_t { public: - cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // SPI I/O DECLARE_WRITE_LINE_MEMBER(cs_w); diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp index b0c819b33f8..ce47d1a25de 100644 --- a/src/devices/machine/corvushd.cpp +++ b/src/devices/machine/corvushd.cpp @@ -227,7 +227,7 @@ DEFINE_DEVICE_TYPE(CORVUS_HDC, corvus_hdc_device, "corvus_hdc", "Corvus Flat Cable HDC") -corvus_hdc_device::corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +corvus_hdc_device::corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CORVUS_HDC, tag, owner, clock), m_status(0), m_prep_mode(false), diff --git a/src/devices/machine/corvushd.h b/src/devices/machine/corvushd.h index 074b761eb60..9c9f23a7b53 100644 --- a/src/devices/machine/corvushd.h +++ b/src/devices/machine/corvushd.h @@ -28,7 +28,7 @@ public: static constexpr uint8_t CONTROLLER_DIRECTION = 0x40; // Set = Controller->Host, Clear = Host->Controller // construction/destruction - corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(); void write(uint8_t data); diff --git a/src/devices/machine/cr511b.cpp b/src/devices/machine/cr511b.cpp index 9eb07578de0..3b6151d671e 100644 --- a/src/devices/machine/cr511b.cpp +++ b/src/devices/machine/cr511b.cpp @@ -40,7 +40,7 @@ void cr511b_device::device_add_mconfig(machine_config &config) // cr511b_device - constructor //------------------------------------------------- -cr511b_device::cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cr511b_device::cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CR511B, tag, owner, clock), m_cdrom(*this, "cdrom"), m_cdda(*this, "cdda"), diff --git a/src/devices/machine/cr511b.h b/src/devices/machine/cr511b.h index aae738145fd..1b797df9c7a 100644 --- a/src/devices/machine/cr511b.h +++ b/src/devices/machine/cr511b.h @@ -42,7 +42,7 @@ class cr511b_device : public device_t { public: // construction/destruction - cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto stch_handler() { return m_stch_handler.bind(); } diff --git a/src/devices/machine/cs4031.cpp b/src/devices/machine/cs4031.cpp index 55cb0377cad..eec830ad9b7 100644 --- a/src/devices/machine/cs4031.cpp +++ b/src/devices/machine/cs4031.cpp @@ -96,7 +96,7 @@ const float cs4031_device::m_dma_clock_divider[] = void cs4031_device::device_add_mconfig(machine_config &config) { - AM9517A(config, m_dma1, 0); + AM9517A(config, m_dma1); m_dma1->out_hreq_callback().set(m_dma2, FUNC(am9517a_device::dreq0_w)); m_dma1->out_eop_callback().set(FUNC(cs4031_device::dma1_eop_w)); m_dma1->in_memr_callback().set(FUNC(cs4031_device::dma_read_byte)); @@ -114,7 +114,7 @@ void cs4031_device::device_add_mconfig(machine_config &config) m_dma1->out_dack_callback<2>().set(FUNC(cs4031_device::dma1_dack2_w)); m_dma1->out_dack_callback<3>().set(FUNC(cs4031_device::dma1_dack3_w)); - AM9517A(config, m_dma2, 0); + AM9517A(config, m_dma2); m_dma2->out_hreq_callback().set(FUNC(cs4031_device::dma2_hreq_w)); m_dma2->in_memr_callback().set(FUNC(cs4031_device::dma_read_word)); m_dma2->out_memw_callback().set(FUNC(cs4031_device::dma_write_word)); @@ -129,16 +129,16 @@ void cs4031_device::device_add_mconfig(machine_config &config) m_dma2->out_dack_callback<2>().set(FUNC(cs4031_device::dma2_dack2_w)); m_dma2->out_dack_callback<3>().set(FUNC(cs4031_device::dma2_dack3_w)); - PIC8259(config, m_intc1, 0); + PIC8259(config, m_intc1); m_intc1->out_int_callback().set(FUNC(cs4031_device::intc1_int_w)); m_intc1->in_sp_callback().set_constant(1); m_intc1->read_slave_ack_callback().set(FUNC(cs4031_device::intc1_slave_ack_r)); - PIC8259(config, m_intc2, 0); + PIC8259(config, m_intc2); m_intc2->out_int_callback().set(m_intc1, FUNC(pic8259_device::ir2_w)); m_intc2->in_sp_callback().set_constant(0); - PIT8254(config, m_ctc, 0); + PIT8254(config, m_ctc); m_ctc->set_clk<0>(XTAL(14'318'181) / 12.0); m_ctc->out_handler<0>().set(m_intc1, FUNC(pic8259_device::ir0_w)); m_ctc->set_clk<1>(XTAL(14'318'181) / 12.0); @@ -160,7 +160,7 @@ void cs4031_device::device_add_mconfig(machine_config &config) // cs4031_device - constructor //------------------------------------------------- -cs4031_device::cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cs4031_device::cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CS4031, tag, owner, clock), m_read_ior(*this), m_write_iow(*this), diff --git a/src/devices/machine/cs4031.h b/src/devices/machine/cs4031.h index 5e7ea81b4e0..1e7de332904 100644 --- a/src/devices/machine/cs4031.h +++ b/src/devices/machine/cs4031.h @@ -37,7 +37,7 @@ class cs4031_device : public device_t public: // construction/destruction template - cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cputag, U &&isatag, V &&biostag, W &&keybctag, X &&ramtag) + cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cputag, U &&isatag, V &&biostag, W &&keybctag, X &&ramtag) : cs4031_device(mconfig, tag, owner, clock) { set_cputag(std::forward(cputag)); @@ -47,7 +47,7 @@ public: set_ramtag(std::forward(ramtag)); } - cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto ior() { return m_read_ior.bind(); } diff --git a/src/devices/machine/cs8221.cpp b/src/devices/machine/cs8221.cpp index e57f181e383..c4970e80975 100644 --- a/src/devices/machine/cs8221.cpp +++ b/src/devices/machine/cs8221.cpp @@ -61,7 +61,7 @@ static const char *const register_names[] = // cs8221_device - constructor //------------------------------------------------- -cs8221_device::cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cs8221_device::cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CS8221, tag, owner, clock), m_address(0), m_address_valid(false) diff --git a/src/devices/machine/cs8221.h b/src/devices/machine/cs8221.h index 63b3102d5e9..c6952a94a9c 100644 --- a/src/devices/machine/cs8221.h +++ b/src/devices/machine/cs8221.h @@ -24,15 +24,15 @@ class cs8221_device : public device_t { public: // construction/destruction - cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const char *cputag, const char *isatag, const char *biostag) - : cs8221_device(mconfig, tag, owner, clock) + cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *cputag, const char *isatag, const char *biostag) + : cs8221_device(mconfig, tag, owner) { set_cputag(cputag); set_isatag(isatag); set_biostag(biostag); } - cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration void set_cputag(const char *tag) { m_cputag = tag; } diff --git a/src/devices/machine/cs8900a.cpp b/src/devices/machine/cs8900a.cpp index 52e0808bb01..84ee06c27d0 100644 --- a/src/devices/machine/cs8900a.cpp +++ b/src/devices/machine/cs8900a.cpp @@ -375,7 +375,7 @@ void cs8900a_device::device_start() save_item(NAME(rxevent_read_mask)); } -cs8900a_device::cs8900a_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cs8900a_device::cs8900a_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , cs8900_ia_mac{0, 0, 0, 0, 0, 0} @@ -400,7 +400,7 @@ cs8900a_device::cs8900a_device(const machine_config& mconfig, device_type type, , rxevent_read_mask(3) /* set if L and/or H u8 was read in RXEVENT? */ {} -cs8900a_device::cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, u32 clock) +cs8900a_device::cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, const XTAL &clock) : cs8900a_device(mconfig, CS8900A, tag, owner, clock) {} diff --git a/src/devices/machine/cs8900a.h b/src/devices/machine/cs8900a.h index a0a6f88dbb4..408701f7ac5 100644 --- a/src/devices/machine/cs8900a.h +++ b/src/devices/machine/cs8900a.h @@ -27,13 +27,13 @@ class cs8900a_device : public device_t, public device_network_interface { public: - cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, u32 clock); + cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, const XTAL &clock); u8 read(u16 address); void write(u16 address, u8 data); protected: - cs8900a_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cs8900a_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/cxd1095.cpp b/src/devices/machine/cxd1095.cpp index 1f78ca628a1..214325c7b31 100644 --- a/src/devices/machine/cxd1095.cpp +++ b/src/devices/machine/cxd1095.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(CXD1095, cxd1095_device, "cxd1095", "CXD1095 I/O Expander") // cxd1095_device - constructor //------------------------------------------------- -cxd1095_device::cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cxd1095_device::cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CXD1095, tag, owner, clock) , m_input_cb(*this) , m_output_cb(*this) diff --git a/src/devices/machine/cxd1095.h b/src/devices/machine/cxd1095.h index f5decf3def7..c1c0a857f44 100644 --- a/src/devices/machine/cxd1095.h +++ b/src/devices/machine/cxd1095.h @@ -48,7 +48,7 @@ class cxd1095_device : public device_t { public: // construction/destruction - cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration template auto in_port_cb() { static_assert(Port >= 0 && Port < 5, "invalid port"); return m_input_cb[Port].bind(); } diff --git a/src/devices/machine/cxd1185.cpp b/src/devices/machine/cxd1185.cpp index b854884d29a..da153e3918e 100644 --- a/src/devices/machine/cxd1185.cpp +++ b/src/devices/machine/cxd1185.cpp @@ -43,7 +43,7 @@ static unsigned const SCSI_RST_HOLD = 25'000; ALLOW_SAVE_TYPE(cxd1185_device::state); -cxd1185_device::cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +cxd1185_device::cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, CXD1185, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_irq_out_cb(*this) diff --git a/src/devices/machine/cxd1185.h b/src/devices/machine/cxd1185.h index f1d6732b26d..6a8b5a3236b 100644 --- a/src/devices/machine/cxd1185.h +++ b/src/devices/machine/cxd1185.h @@ -13,7 +13,7 @@ class cxd1185_device , public nscsi_slot_card_interface { public: - cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device configuration auto irq_out_cb() { return m_irq_out_cb.bind(); } diff --git a/src/devices/machine/dc7085.cpp b/src/devices/machine/dc7085.cpp index 264cef004c6..b6082392a49 100644 --- a/src/devices/machine/dc7085.cpp +++ b/src/devices/machine/dc7085.cpp @@ -89,7 +89,7 @@ enum tdr_mask : u16 TDR_TBUF = 0x00ff, // transmitter buffer }; -dc7085_device::dc7085_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dc7085_device::dc7085_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DC7085, tag, owner, clock) , m_chan(*this, "ch%u", 0U) , m_int_cb(*this) @@ -109,7 +109,7 @@ void dc7085_device::device_add_mconfig(machine_config &config) */ for (unsigned i = 0; i < std::size(m_chan); i++) { - DC7085_CHANNEL(config, m_chan[i], 0); + DC7085_CHANNEL(config, m_chan[i]); m_chan[i]->rx_done().set([this, i](u16 data) { rx_done((i << 8) | data); }); m_chan[i]->tx_cb().set([this, i](int state) { m_tx_cb[i](state); if (m_csr & CSR_MAINT) m_chan[i]->rx_w(state); }); @@ -297,7 +297,7 @@ void dc7085_device::tx_done(int state) recalc_irqs(); } -dc7085_channel::dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dc7085_channel::dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DC7085_CHANNEL, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_tx_cb(*this) @@ -321,8 +321,8 @@ void dc7085_channel::device_reset() transmit_register_reset(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_tra_rate(0); - set_rcv_rate(0); + set_tra_rate(XTAL::u(0)); + set_rcv_rate(XTAL::u(0)); m_rx_enabled = false; } diff --git a/src/devices/machine/dc7085.h b/src/devices/machine/dc7085.h index dccb2bbefce..6f33b26a4d4 100644 --- a/src/devices/machine/dc7085.h +++ b/src/devices/machine/dc7085.h @@ -17,7 +17,7 @@ class dc7085_channel public: auto tx_cb() { return m_tx_cb.bind(); } - dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides @@ -49,7 +49,7 @@ private: class dc7085_device : public device_t { public: - dc7085_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dc7085_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); void map(address_map &map); diff --git a/src/devices/machine/diablo_hd.cpp b/src/devices/machine/diablo_hd.cpp index 2ce1707058c..78bcac694ea 100644 --- a/src/devices/machine/diablo_hd.cpp +++ b/src/devices/machine/diablo_hd.cpp @@ -65,7 +65,7 @@ #define LOG_DRIVE(...) do { if (DIABLO_DEBUG) logprintf(__VA_ARGS__); } while (0) -diablo_hd_device::diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +diablo_hd_device::diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DIABLO_HD, tag, owner, clock), m_log_level(8), m_diablo31(true), @@ -1432,7 +1432,7 @@ TIMER_CALLBACK_MEMBER(diablo_hd_device::sector_mark_tick) void diablo_hd_device::device_add_mconfig(machine_config &config) { - DIABLO(config, "drive", 0); + DIABLO(config, "drive"); } diff --git a/src/devices/machine/diablo_hd.h b/src/devices/machine/diablo_hd.h index 43524706967..7d92e793fe0 100644 --- a/src/devices/machine/diablo_hd.h +++ b/src/devices/machine/diablo_hd.h @@ -19,7 +19,7 @@ DECLARE_DEVICE_TYPE(DIABLO_HD, diablo_hd_device) class diablo_hd_device : public device_t { public: - diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~diablo_hd_device(); static const int DIABLO_UNIT_MAX = 2; //!< max number of drive units diff --git a/src/devices/machine/dl11.cpp b/src/devices/machine/dl11.cpp index cde90816cc3..f059eab37c0 100644 --- a/src/devices/machine/dl11.cpp +++ b/src/devices/machine/dl11.cpp @@ -42,7 +42,7 @@ enum // dl11_device - constructor //------------------------------------------------- -dl11_device::dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dl11_device::dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DL11, tag, owner, clock) , device_serial_interface(mconfig, *this) , device_z80daisy_interface(mconfig, *this) diff --git a/src/devices/machine/dl11.h b/src/devices/machine/dl11.h index 37dd3d9c614..e0b0f07a2c7 100644 --- a/src/devices/machine/dl11.h +++ b/src/devices/machine/dl11.h @@ -29,7 +29,7 @@ class dl11_device : public device_t, { public: // construction/destruction - dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_rxc(int clock) { m_rxc = clock; } void set_txc(int clock) { m_txc = clock; } diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp index 0705f28c060..6564417bd99 100644 --- a/src/devices/machine/dmac.cpp +++ b/src/devices/machine/dmac.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(AMIGA_DMAC, amiga_dmac_device, "amiga_dmac", "Amiga DMAC DMA // amiga_dmac_device - constructor //------------------------------------------------- -amiga_dmac_device::amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +amiga_dmac_device::amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMIGA_DMAC, tag, owner, clock), amiga_autoconfig(), m_cfgout_handler(*this), diff --git a/src/devices/machine/dmac.h b/src/devices/machine/dmac.h index 47c5f9f93d3..fd2644a7f01 100644 --- a/src/devices/machine/dmac.h +++ b/src/devices/machine/dmac.h @@ -24,7 +24,7 @@ class amiga_dmac_device : public device_t, public amiga_autoconfig { public: // construction/destruction - amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto cfgout_handler() { return m_cfgout_handler.bind(); } diff --git a/src/devices/machine/dp8390.cpp b/src/devices/machine/dp8390.cpp index 49b98e94846..fc4e8257bf8 100644 --- a/src/devices/machine/dp8390.cpp +++ b/src/devices/machine/dp8390.cpp @@ -9,17 +9,17 @@ DEFINE_DEVICE_TYPE(DP8390D, dp8390d_device, "dp8390d", "DP8390D NIC") DEFINE_DEVICE_TYPE(RTL8019A, rtl8019a_device, "rtl8019a", "RTL8019A Ethernet Controller") -dp8390d_device::dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dp8390d_device::dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp8390_device(mconfig, DP8390D, tag, owner, clock, TYPE::DP8390D, 10.0f) { } -rtl8019a_device::rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtl8019a_device::rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp8390_device(mconfig, RTL8019A, tag, owner, clock, TYPE::RTL8019A, 10.0f) { } -dp8390_device::dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, TYPE variant, u32 bandwidth) +dp8390_device::dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, TYPE variant, u32 bandwidth) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, bandwidth) , m_variant(variant) diff --git a/src/devices/machine/dp8390.h b/src/devices/machine/dp8390.h index 7e87ffe44db..4b14ce9f817 100644 --- a/src/devices/machine/dp8390.h +++ b/src/devices/machine/dp8390.h @@ -32,7 +32,7 @@ protected: }; // construction/destruction - dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, TYPE varian, u32 bandwidth); + dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, TYPE varian, u32 bandwidth); // device-level overrides virtual void device_start() override; @@ -106,13 +106,13 @@ private: class rtl8019a_device : public dp8390_device { public: - rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class dp8390d_device : public dp8390_device { public: - dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/dp83932c.cpp b/src/devices/machine/dp83932c.cpp index f956d8da8ea..0a818dbd619 100644 --- a/src/devices/machine/dp83932c.cpp +++ b/src/devices/machine/dp83932c.cpp @@ -64,7 +64,7 @@ static u16 const regmask[] = 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xf017, }; -dp83932c_device::dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dp83932c_device::dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DP83932C, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_bus(*this, finder_base::DUMMY_TAG, 0) diff --git a/src/devices/machine/dp83932c.h b/src/devices/machine/dp83932c.h index 2a7d271eb11..c1464df3f35 100644 --- a/src/devices/machine/dp83932c.h +++ b/src/devices/machine/dp83932c.h @@ -13,7 +13,7 @@ class dp83932c_device , public device_network_interface { public: - dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // configuration template void set_bus(T &&tag, int spacenum) { m_bus.set_tag(std::forward(tag), spacenum); } diff --git a/src/devices/machine/dp8573.cpp b/src/devices/machine/dp8573.cpp index f862bec4deb..dc38bc75b70 100644 --- a/src/devices/machine/dp8573.cpp +++ b/src/devices/machine/dp8573.cpp @@ -20,7 +20,7 @@ // device type definition DEFINE_DEVICE_TYPE(DP8573, dp8573_device, "dp8573", "DP8573 Real-Time Clock") -dp8573_device::dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dp8573_device::dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DP8573, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_intr_cb(*this) diff --git a/src/devices/machine/dp8573.h b/src/devices/machine/dp8573.h index 1730884e1b4..5a04d24c9e9 100644 --- a/src/devices/machine/dp8573.h +++ b/src/devices/machine/dp8573.h @@ -19,7 +19,7 @@ public: { } - dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, u8 data); u8 read(offs_t offset); diff --git a/src/devices/machine/ds1204.cpp b/src/devices/machine/ds1204.cpp index 6d4fd46fc54..fff9476a244 100644 --- a/src/devices/machine/ds1204.cpp +++ b/src/devices/machine/ds1204.cpp @@ -32,7 +32,7 @@ inline void ATTR_PRINTF( 3, 4 ) ds1204_device::verboselog( int n_level, const ch // device type definition DEFINE_DEVICE_TYPE(DS1204, ds1204_device, "ds1204", "DS1204 Electronic Key") -ds1204_device::ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +ds1204_device::ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, DS1204, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/ds1204.h b/src/devices/machine/ds1204.h index 7a51463ac67..bb509e5262a 100644 --- a/src/devices/machine/ds1204.h +++ b/src/devices/machine/ds1204.h @@ -17,7 +17,7 @@ class ds1204_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0 ); + ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL() ); DECLARE_WRITE_LINE_MEMBER( write_rst ); DECLARE_WRITE_LINE_MEMBER( write_clk ); diff --git a/src/devices/machine/ds1205.cpp b/src/devices/machine/ds1205.cpp index 7bafe3b6a88..605f102dc10 100644 --- a/src/devices/machine/ds1205.cpp +++ b/src/devices/machine/ds1205.cpp @@ -32,7 +32,7 @@ inline void ATTR_PRINTF( 3, 4 ) ds1205_device::verboselog( int n_level, const ch // device type definition DEFINE_DEVICE_TYPE(DS1205, ds1205_device, "ds1205", "DS1205") -ds1205_device::ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, u32 clock ) +ds1205_device::ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, DS1205, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/ds1205.h b/src/devices/machine/ds1205.h index 0098142e65f..8c8a05852c3 100644 --- a/src/devices/machine/ds1205.h +++ b/src/devices/machine/ds1205.h @@ -17,7 +17,7 @@ class ds1205_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write_rst ); DECLARE_WRITE_LINE_MEMBER( write_clk ); diff --git a/src/devices/machine/ds128x.cpp b/src/devices/machine/ds128x.cpp index 8292e5237f2..42b32ada204 100644 --- a/src/devices/machine/ds128x.cpp +++ b/src/devices/machine/ds128x.cpp @@ -9,12 +9,12 @@ DEFINE_DEVICE_TYPE(DS12885, ds12885_device, "ds12885", "DS12885 RTC/NVRAM") // ds12885_device - constructor //------------------------------------------------- -ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds12885_device(mconfig, DS12885, tag, owner, clock) { } -ds12885_device::ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ds12885_device::ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mc146818_device(mconfig, type, tag, owner, clock) { } @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(DS12885EXT, ds12885ext_device, "ds12885ext", "DS12885 RTC/NVR // ds12885ext_device - constructor //------------------------------------------------- -ds12885ext_device::ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds12885ext_device::ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds12885_device(mconfig, DS12885EXT, tag, owner, clock) { } diff --git a/src/devices/machine/ds128x.h b/src/devices/machine/ds128x.h index 07209361041..9483449d869 100644 --- a/src/devices/machine/ds128x.h +++ b/src/devices/machine/ds128x.h @@ -12,10 +12,10 @@ class ds12885_device : public mc146818_device { public: // construction/destruction - ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); protected: - ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual int data_size() const override { return 128; } virtual int get_timer_bypass() const override; @@ -30,7 +30,7 @@ class ds12885ext_device : public ds12885_device { public: // construction/destruction - ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); // read/write access to extended ram uint8_t read_extended(offs_t offset); diff --git a/src/devices/machine/ds1302.cpp b/src/devices/machine/ds1302.cpp index 8d32c3fd3ff..0fa94625b46 100644 --- a/src/devices/machine/ds1302.cpp +++ b/src/devices/machine/ds1302.cpp @@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(DS1302, ds1302_device, "ds1302", "Dallas DS1302 Trickle-Charg // ds1302_device - constructor //------------------------------------------------- -ds1302_device::ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t ram_size) +ds1302_device::ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t ram_size) : device_t(mconfig, type, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -78,7 +78,7 @@ ds1302_device::ds1302_device(const machine_config &mconfig, device_type type, co { } -ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1302_device(mconfig, DS1302, tag, owner, clock, 0x1f) { } @@ -88,7 +88,7 @@ ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, dev // ds1202_device - constructor //------------------------------------------------- -ds1202_device::ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1202_device::ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1302_device(mconfig, DS1202, tag, owner, clock, 0x18) { } diff --git a/src/devices/machine/ds1302.h b/src/devices/machine/ds1302.h index 9b1d09e9840..8040f37075e 100644 --- a/src/devices/machine/ds1302.h +++ b/src/devices/machine/ds1302.h @@ -34,7 +34,7 @@ class ds1302_device : public device_t, { public: // construction/destruction - ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( sclk_w ); @@ -42,7 +42,7 @@ public: DECLARE_READ_LINE_MEMBER( io_r ); protected: - ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t ram_size); + ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t ram_size); // device-level overrides virtual void device_start() override; @@ -88,7 +88,7 @@ class ds1202_device : public ds1302_device { public: // construction/destruction - ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/ds1315.cpp b/src/devices/machine/ds1315.cpp index 2a574dca399..5a96c16fed8 100644 --- a/src/devices/machine/ds1315.cpp +++ b/src/devices/machine/ds1315.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(DS1315, ds1315_device, "ds1315", "Dallas DS1315 Phantom Time Chip") -ds1315_device::ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1315_device::ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS1315, tag, owner, clock), m_backing_read(*this), m_mode(), diff --git a/src/devices/machine/ds1315.h b/src/devices/machine/ds1315.h index 720c4a08202..fb8e5e0a0ab 100644 --- a/src/devices/machine/ds1315.h +++ b/src/devices/machine/ds1315.h @@ -18,7 +18,7 @@ class ds1315_device : public device_t { public: - ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~ds1315_device() {} auto read_backing() { return m_backing_read.bind(); } diff --git a/src/devices/machine/ds1386.cpp b/src/devices/machine/ds1386.cpp index 6f91625bde4..78da8b618c0 100644 --- a/src/devices/machine/ds1386.cpp +++ b/src/devices/machine/ds1386.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(DS1286, ds1286_device, "ds1286", "DS1286 Watchdog DEFINE_DEVICE_TYPE(DS1386_8K, ds1386_8k_device, "ds1386_8k", "DS1386-8K RAMified Watchdog Timekeeper") DEFINE_DEVICE_TYPE(DS1386_32K, ds1386_32k_device, "ds1386_32k", "DS1386-32K RAMified Watchdog Timekeeper") -ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size) +ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , device_rtc_interface(mconfig, *this) @@ -48,17 +48,17 @@ ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, co { } -ds1286_device::ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1286_device::ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1386_device(mconfig, DS1286, tag, owner, clock, 64) { } -ds1386_8k_device::ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1386_8k_device::ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1386_device(mconfig, DS1386_8K, tag, owner, clock, 8*1024) { } -ds1386_32k_device::ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1386_32k_device::ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1386_device(mconfig, DS1386_32K, tag, owner, clock, 32*1024) { } diff --git a/src/devices/machine/ds1386.h b/src/devices/machine/ds1386.h index dd07c49c79f..cca0be92a63 100644 --- a/src/devices/machine/ds1386.h +++ b/src/devices/machine/ds1386.h @@ -121,7 +121,7 @@ protected: ALARM_PER_MINUTE = 0x7 }; - ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size); + ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size); // device-level overrides virtual void device_start() override; @@ -212,19 +212,19 @@ protected: class ds1286_device : public ds1386_device { public: - ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ds1386_8k_device : public ds1386_device { public: - ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ds1386_32k_device : public ds1386_device { public: - ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(DS1286, ds1286_device) diff --git a/src/devices/machine/ds17x85.cpp b/src/devices/machine/ds17x85.cpp index af6837cf621..fba14196193 100644 --- a/src/devices/machine/ds17x85.cpp +++ b/src/devices/machine/ds17x85.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(DS17887, ds17887_device, "ds17887", "DS17887 RTC") // ds17x85_device - constructor //------------------------------------------------- -ds17x85_device::ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 model, u32 extram_size) +ds17x85_device::ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 model, u32 extram_size) : mc146818_device(mconfig, type, tag, owner, clock) , m_model(model) , m_extram_size(extram_size) @@ -57,7 +57,7 @@ ds17x85_device::ds17x85_device(const machine_config &mconfig, device_type type, // ds1685_device - constructor //------------------------------------------------- -ds1685_device::ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds1685_device::ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS1685, tag, owner, clock, 0x71, 128) { } @@ -66,7 +66,7 @@ ds1685_device::ds1685_device(const machine_config &mconfig, const char *tag, dev // ds1687_device - constructor //------------------------------------------------- -ds1687_device::ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds1687_device::ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS1687, tag, owner, clock, 0x71, 128) { } @@ -75,7 +75,7 @@ ds1687_device::ds1687_device(const machine_config &mconfig, const char *tag, dev // ds17285_device - constructor //------------------------------------------------- -ds17285_device::ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17285_device::ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17285, tag, owner, clock, 0x72, 2048) { } @@ -84,7 +84,7 @@ ds17285_device::ds17285_device(const machine_config &mconfig, const char *tag, d // ds17287_device - constructor //------------------------------------------------- -ds17287_device::ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17287_device::ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17287, tag, owner, clock, 0x72, 2048) { } @@ -93,7 +93,7 @@ ds17287_device::ds17287_device(const machine_config &mconfig, const char *tag, d // ds17485_device - constructor //------------------------------------------------- -ds17485_device::ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17485_device::ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17485, tag, owner, clock, 0x74, 4096) { } @@ -102,7 +102,7 @@ ds17485_device::ds17485_device(const machine_config &mconfig, const char *tag, d // ds17487_device - constructor //------------------------------------------------- -ds17487_device::ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17487_device::ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17487, tag, owner, clock, 0x74, 4096) { } @@ -111,7 +111,7 @@ ds17487_device::ds17487_device(const machine_config &mconfig, const char *tag, d // ds17885_device - constructor //------------------------------------------------- -ds17885_device::ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17885_device::ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17885, tag, owner, clock, 0x78, 8192) { } @@ -120,7 +120,7 @@ ds17885_device::ds17885_device(const machine_config &mconfig, const char *tag, d // ds17887_device - constructor //------------------------------------------------- -ds17887_device::ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17887_device::ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17887, tag, owner, clock, 0x78, 8192) { } diff --git a/src/devices/machine/ds17x85.h b/src/devices/machine/ds17x85.h index 413ed5f4b8b..4c36844aa21 100644 --- a/src/devices/machine/ds17x85.h +++ b/src/devices/machine/ds17x85.h @@ -83,7 +83,7 @@ protected: REG_EXT_4B_KSE = 0x01 }; - ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 model, u32 extram_size); + ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 model, u32 extram_size); // device-specific overrides virtual void device_start() override; @@ -113,7 +113,7 @@ class ds1685_device : public ds17x85_device { public: // device type constructor - ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds1687_device @@ -122,7 +122,7 @@ class ds1687_device : public ds17x85_device { public: // device type constructor - ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17285_device @@ -131,7 +131,7 @@ class ds17285_device : public ds17x85_device { public: // device type constructor - ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17287_device @@ -140,7 +140,7 @@ class ds17287_device : public ds17x85_device { public: // device type constructor - ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17485_device @@ -149,7 +149,7 @@ class ds17485_device : public ds17x85_device { public: // device type constructor - ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17487_device @@ -158,7 +158,7 @@ class ds17487_device : public ds17x85_device { public: // device type constructor - ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17885_device @@ -167,7 +167,7 @@ class ds17885_device : public ds17x85_device { public: // device type constructor - ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17887_device @@ -176,7 +176,7 @@ class ds17887_device : public ds17x85_device { public: // device type constructor - ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/machine/ds1994.cpp b/src/devices/machine/ds1994.cpp index cff5a921c05..a4d3513c897 100644 --- a/src/devices/machine/ds1994.cpp +++ b/src/devices/machine/ds1994.cpp @@ -31,7 +31,7 @@ // device type definition DEFINE_DEVICE_TYPE(DS1994, ds1994_device, "ds1994", "DS1994 iButton 4Kb Memory Plus Time") -ds1994_device::ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1994_device::ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS1994, tag, owner, clock), device_nvram_interface(mconfig, *this) , m_timer_main(nullptr) , m_timer_reset(nullptr) diff --git a/src/devices/machine/ds1994.h b/src/devices/machine/ds1994.h index c6629b6fbb9..6452297650c 100644 --- a/src/devices/machine/ds1994.h +++ b/src/devices/machine/ds1994.h @@ -18,12 +18,7 @@ class ds1994_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ds1994_device(mconfig, tag, owner, uint32_t(0)) - { - } - - ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void ref_year(uint32_t year) { m_ref_year = year; } diff --git a/src/devices/machine/ds2401.cpp b/src/devices/machine/ds2401.cpp index e2236eef5d2..cd98f000f18 100644 --- a/src/devices/machine/ds2401.cpp +++ b/src/devices/machine/ds2401.cpp @@ -31,7 +31,7 @@ inline void ds2401_device::verboselog(int n_level, const char *s_fmt, ...) // device type definition DEFINE_DEVICE_TYPE(DS2401, ds2401_device, "ds2401", "DS2401 Silicon Serial Number") -ds2401_device::ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds2401_device::ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS2401, tag, owner, clock) , m_state(0) , m_bit(0) diff --git a/src/devices/machine/ds2401.h b/src/devices/machine/ds2401.h index f29132d381e..f035e0bddce 100644 --- a/src/devices/machine/ds2401.h +++ b/src/devices/machine/ds2401.h @@ -17,12 +17,7 @@ class ds2401_device : public device_t { public: // construction/destruction - ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ds2401_device(mconfig, tag, owner, uint32_t(0)) - { - } - - ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write ); DECLARE_READ_LINE_MEMBER( read ); diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp index 68845d86dc3..c4e892305d4 100644 --- a/src/devices/machine/ds2404.cpp +++ b/src/devices/machine/ds2404.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(DS2404, ds2404_device, "ds2404", "DS2404 EconoRAM Time Chip") // ds2404_device - constructor //------------------------------------------------- -ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS2404, tag, owner, clock), device_nvram_interface(mconfig, *this), m_tick_timer(nullptr), m_ref_year(0), m_ref_month(0), m_ref_day(0), m_address(0), diff --git a/src/devices/machine/ds2404.h b/src/devices/machine/ds2404.h index 1ed22887b87..3e33b2a237b 100644 --- a/src/devices/machine/ds2404.h +++ b/src/devices/machine/ds2404.h @@ -17,7 +17,7 @@ class ds2404_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void ref_year(uint32_t year) { m_ref_year = year; } diff --git a/src/devices/machine/ds6417.cpp b/src/devices/machine/ds6417.cpp index 51ae6e7a201..af0c4cf0569 100644 --- a/src/devices/machine/ds6417.cpp +++ b/src/devices/machine/ds6417.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(DS6417, ds6417_device, "ds6417", "Dallas DS6417 CyberCard") -ds6417_device::ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds6417_device::ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS6417, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/devices/machine/ds6417.h b/src/devices/machine/ds6417.h index 94d5e109426..c1dcb7f2257 100644 --- a/src/devices/machine/ds6417.h +++ b/src/devices/machine/ds6417.h @@ -16,7 +16,7 @@ class ds6417_device : public device_t, { public: // construction/destruction - ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual bool is_reset_on_load() const noexcept override { return false; } virtual const char *file_extensions() const noexcept override { return "bin"; } diff --git a/src/devices/machine/ds75160a.cpp b/src/devices/machine/ds75160a.cpp index d5ad8007a61..48a7118f9c9 100644 --- a/src/devices/machine/ds75160a.cpp +++ b/src/devices/machine/ds75160a.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(DS75160A, ds75160a_device, "ds75160a", "DS75160A GPIB Transce // ds75160a_device - constructor //------------------------------------------------- -ds75160a_device::ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds75160a_device::ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS75160A, tag, owner, clock), m_read(*this), m_write(*this), diff --git a/src/devices/machine/ds75160a.h b/src/devices/machine/ds75160a.h index 5e2498d28ad..373b00195d9 100644 --- a/src/devices/machine/ds75160a.h +++ b/src/devices/machine/ds75160a.h @@ -35,7 +35,7 @@ class ds75160a_device : public device_t { public: // construction/destruction - ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_callback() { return m_read.bind(); } auto write_callback() { return m_write.bind(); } diff --git a/src/devices/machine/ds75161a.cpp b/src/devices/machine/ds75161a.cpp index 9d75d6b65a0..a2c64247d69 100644 --- a/src/devices/machine/ds75161a.cpp +++ b/src/devices/machine/ds75161a.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(DS75161A, ds75161a_device, "ds75161a", "DS75161A GPIB Transce // ds75161a_device - constructor //------------------------------------------------- -ds75161a_device::ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds75161a_device::ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS75161A, tag, owner, clock), m_in_ren_cb(*this), m_in_ifc_cb(*this), diff --git a/src/devices/machine/ds75161a.h b/src/devices/machine/ds75161a.h index 8ea0a0b9632..8ba13029614 100644 --- a/src/devices/machine/ds75161a.h +++ b/src/devices/machine/ds75161a.h @@ -28,7 +28,7 @@ class ds75161a_device : public device_t { public: // construction/destruction - ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_ren() { return m_in_ren_cb.bind(); } auto in_ifc() { return m_in_ifc_cb.bind(); } diff --git a/src/devices/machine/ds8874.cpp b/src/devices/machine/ds8874.cpp index 8b6003dcad3..bc65f40ca7e 100644 --- a/src/devices/machine/ds8874.cpp +++ b/src/devices/machine/ds8874.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(DS8874, ds8874_device, "ds8874", "DS8874 LED Driver") // constructor //------------------------------------------------- -ds8874_device::ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ds8874_device::ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS8874, tag, owner, clock), m_write_output(*this) { } diff --git a/src/devices/machine/ds8874.h b/src/devices/machine/ds8874.h index 444f15a020c..fcbfa736702 100644 --- a/src/devices/machine/ds8874.h +++ b/src/devices/machine/ds8874.h @@ -31,7 +31,7 @@ class ds8874_device : public device_t { public: - ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto write_output() { return m_write_output.bind(); } // OUT pins diff --git a/src/devices/machine/e0516.cpp b/src/devices/machine/e0516.cpp index 29fe42e3f17..954f990df43 100644 --- a/src/devices/machine/e0516.cpp +++ b/src/devices/machine/e0516.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(E0516, e0516_device, "e0516", "E05-16 RTC") // e0516_device - constructor //------------------------------------------------- -e0516_device::e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e0516_device::e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, E0516, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_cs(0), m_clk(0), m_data_latch(0), m_reg_latch(0), m_read_write(0), m_state(0), m_bits(0), m_dio(0) diff --git a/src/devices/machine/e0516.h b/src/devices/machine/e0516.h index d3807ff5968..ca068567f7e 100644 --- a/src/devices/machine/e0516.h +++ b/src/devices/machine/e0516.h @@ -28,7 +28,7 @@ class e0516_device : public device_t, public device_rtc_interface { public: // construction/destruction - e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( cs_w ); DECLARE_WRITE_LINE_MEMBER( clk_w ); diff --git a/src/devices/machine/e05a03.cpp b/src/devices/machine/e05a03.cpp index 66a2a6785cc..28e196dab1f 100644 --- a/src/devices/machine/e05a03.cpp +++ b/src/devices/machine/e05a03.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(E05A03, e05a03_device, "e05a03", "Epson E05A03 Gate Array") -e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, E05A03, tag, owner, clock), m_write_nlq_lp(*this), m_write_pe_lp(*this), diff --git a/src/devices/machine/e05a03.h b/src/devices/machine/e05a03.h index 4748bb3a84b..29681b7be7c 100644 --- a/src/devices/machine/e05a03.h +++ b/src/devices/machine/e05a03.h @@ -18,7 +18,7 @@ class e05a03_device : public device_t { public: - e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto nlq_lp_wr_callback() { return m_write_nlq_lp.bind(); } auto pe_lp_wr_callback() { return m_write_pe_lp.bind(); } diff --git a/src/devices/machine/e05a30.cpp b/src/devices/machine/e05a30.cpp index 44d90904644..8f6eb4241a3 100644 --- a/src/devices/machine/e05a30.cpp +++ b/src/devices/machine/e05a30.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(E05A30, e05a30_device, "e05a30", "Epson E05A30 Gate Array") -e05a30_device::e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e05a30_device::e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, E05A30, tag, owner, clock), m_write_printhead(*this), m_write_pf_stepper(*this), diff --git a/src/devices/machine/e05a30.h b/src/devices/machine/e05a30.h index 41bd94d999d..ebd18432ef3 100644 --- a/src/devices/machine/e05a30.h +++ b/src/devices/machine/e05a30.h @@ -13,7 +13,7 @@ class e05a30_device : public device_t { public: - e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto printhead() { return m_write_printhead.bind(); } auto pf_stepper() { return m_write_pf_stepper.bind(); } diff --git a/src/devices/machine/edlc.cpp b/src/devices/machine/edlc.cpp index 956528aa8b7..5c544e2b443 100644 --- a/src/devices/machine/edlc.cpp +++ b/src/devices/machine/edlc.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(SEEQ80C03, seeq80c03_device, "seeq80c03", "SEEQ 80C03 EDLC") static const u8 ETH_BROADCAST[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -seeq8003_device::seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +seeq8003_device::seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_out_int(*this) @@ -46,7 +46,7 @@ seeq8003_device::seeq8003_device(machine_config const &mconfig, device_type type { } -seeq8003_device::seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +seeq8003_device::seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : seeq8003_device(mconfig, SEEQ8003, tag, owner, clock) { } @@ -387,7 +387,7 @@ bool seeq8003_device::address_filter(u8 *address) return false; } -seeq80c03_device::seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +seeq80c03_device::seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : seeq8003_device(mconfig, SEEQ80C03, tag, owner, clock) , m_regbank(*this, "regbank") { diff --git a/src/devices/machine/edlc.h b/src/devices/machine/edlc.h index bbcd91d2589..26c9321e83e 100644 --- a/src/devices/machine/edlc.h +++ b/src/devices/machine/edlc.h @@ -19,7 +19,7 @@ public: auto out_rxrdy_cb() { return m_out_rxrdy.bind(); } auto out_txrdy_cb() { return m_out_txrdy.bind(); } - seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // register interface virtual void map(address_map &map); @@ -36,7 +36,7 @@ public: void fifo_w(u8 data); protected: - seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock = 0); + seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // device_t overrides virtual void device_start() override; @@ -143,7 +143,7 @@ protected: class seeq80c03_device : public seeq8003_device { public: - seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // register interface virtual void map(address_map &map) override; diff --git a/src/devices/machine/eeprom.cpp b/src/devices/machine/eeprom.cpp index 2ee3b1697c1..20f75613874 100644 --- a/src/devices/machine/eeprom.cpp +++ b/src/devices/machine/eeprom.cpp @@ -24,7 +24,7 @@ //------------------------------------------------- eeprom_base_device::eeprom_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner) - : device_t(mconfig, devtype, tag, owner, 0), + : device_t(mconfig, devtype, tag, owner), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), m_cells(0), diff --git a/src/devices/machine/eeprompar.cpp b/src/devices/machine/eeprompar.cpp index 3393ae91a2c..1140e9fed17 100644 --- a/src/devices/machine/eeprompar.cpp +++ b/src/devices/machine/eeprompar.cpp @@ -203,7 +203,7 @@ void eeprom_parallel_28xx_device::unlock_write32(uint32_t data) { oe_w(1); } // macro for defining a new device class #define DEFINE_PARALLEL_EEPROM_DEVICE(_baseclass, _lowercase, _uppercase, _bits, _cells) \ -eeprom_parallel_##_lowercase##_device::eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) \ +eeprom_parallel_##_lowercase##_device::eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) \ : eeprom_parallel_##_baseclass##_device(mconfig, EEPROM_##_uppercase, tag, owner) \ { \ size(_cells, _bits); \ diff --git a/src/devices/machine/eeprompar.h b/src/devices/machine/eeprompar.h index 9399e32a349..ecce599a9dd 100644 --- a/src/devices/machine/eeprompar.h +++ b/src/devices/machine/eeprompar.h @@ -69,7 +69,7 @@ private: class eeprom_parallel_##_lowercase##_device : public eeprom_parallel_##_baseclass##_device \ { \ public: \ - eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); \ + eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); \ }; \ DECLARE_DEVICE_TYPE(EEPROM_##_uppercase, eeprom_parallel_##_lowercase##_device) diff --git a/src/devices/machine/eepromser.cpp b/src/devices/machine/eepromser.cpp index a8502e72fe3..8b2df6f7d68 100644 --- a/src/devices/machine/eepromser.cpp +++ b/src/devices/machine/eepromser.cpp @@ -1093,7 +1093,7 @@ eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_# size(_cells, _bits); \ set_address_bits(_addrbits); \ } \ -eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) \ +eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) \ : eeprom_serial_##_baseclass##_device(mconfig, EEPROM_##_uppercase##_##_bits##BIT, tag, owner, eeprom_serial_streaming::DISABLE) \ { \ size(_cells, _bits); \ diff --git a/src/devices/machine/eepromser.h b/src/devices/machine/eepromser.h index d3d33db19d6..cc111b3526e 100644 --- a/src/devices/machine/eepromser.h +++ b/src/devices/machine/eepromser.h @@ -216,7 +216,7 @@ class eeprom_serial_##_lowercase##_##_bits##bit_device : public eeprom_serial_## { \ public: \ eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, eeprom_serial_streaming enable_streaming = eeprom_serial_streaming::DISABLE); \ - eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); \ + eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); \ }; \ DECLARE_DEVICE_TYPE(EEPROM_##_uppercase##_##_bits##BIT, eeprom_serial_##_lowercase##_##_bits##bit_device) diff --git a/src/devices/machine/er1400.cpp b/src/devices/machine/er1400.cpp index c2375294ba5..73ff53379b7 100644 --- a/src/devices/machine/er1400.cpp +++ b/src/devices/machine/er1400.cpp @@ -39,7 +39,7 @@ DEFINE_DEVICE_TYPE(ER1400, er1400_device, "er1400", "ER1400 Serial EAROM (100x14 // er1400_device - constructor //------------------------------------------------- -er1400_device::er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +er1400_device::er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ER1400, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_default_data(*this, DEVICE_SELF) diff --git a/src/devices/machine/er1400.h b/src/devices/machine/er1400.h index 9988edd6744..2829edce749 100644 --- a/src/devices/machine/er1400.h +++ b/src/devices/machine/er1400.h @@ -32,7 +32,7 @@ class er1400_device : public device_t, public device_nvram_interface { public: // construction/destruction - er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // line handlers DECLARE_WRITE_LINE_MEMBER(data_w); diff --git a/src/devices/machine/er2055.cpp b/src/devices/machine/er2055.cpp index 678c044122a..43303dfb2cc 100644 --- a/src/devices/machine/er2055.cpp +++ b/src/devices/machine/er2055.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(ER2055, er2055_device, "er2055", "ER2055 EAROM (64x8)") // er2055_device - constructor //------------------------------------------------- -er2055_device::er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +er2055_device::er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ER2055, tag, owner, clock), device_nvram_interface(mconfig, *this), m_default_data(*this, DEVICE_SELF), diff --git a/src/devices/machine/er2055.h b/src/devices/machine/er2055.h index 95517abc542..cbd6ea546ce 100644 --- a/src/devices/machine/er2055.h +++ b/src/devices/machine/er2055.h @@ -41,7 +41,7 @@ class er2055_device : public device_t, { public: // construction/destruction - er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // I/O operations uint8_t data() const { return m_data; } diff --git a/src/devices/machine/exorterm.cpp b/src/devices/machine/exorterm.cpp index 17e0f98a662..1ba792476dc 100644 --- a/src/devices/machine/exorterm.cpp +++ b/src/devices/machine/exorterm.cpp @@ -27,7 +27,7 @@ TODO // TYPE DEFINITIONS //************************************************************************** -exorterm155_device::exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +exorterm155_device::exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_maincpu(*this, "maincpu") , m_irqs(*this, "irqs") @@ -65,7 +65,7 @@ exorterm155_device::exorterm155_device(const machine_config &mconfig, device_typ { } -exorterm155_device::exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +exorterm155_device::exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : exorterm155_device(mconfig, EXORTERM155, tag, owner, clock) { } @@ -836,7 +836,7 @@ void exorterm155_device::device_add_mconfig(machine_config &config) config.set_default_layout(layout_exorterm155); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set(FUNC(exorterm155_device::acia_txd_w)); m_acia->rts_handler().set(FUNC(exorterm155_device::acia_rts_w)); m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); @@ -875,11 +875,11 @@ void exorterm155_device::device_add_mconfig(machine_config &config) m_pia_disp->irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<6>)); // Derived from the horizontal blanking, 3.4ms. - CLOCK(config, m_sys_timer_clock, 4706 / 16); + CLOCK(config, m_sys_timer_clock, XTAL::u(4706) / 16); m_sys_timer_clock->signal_handler().set(FUNC(exorterm155_device::sys_timer_w)); SPEAKER(config, "bell").front_center(); - BEEP(config, m_beeper, 2000); + BEEP(config, m_beeper, XTAL::u(2000)); m_beeper->add_route(ALL_OUTPUTS, "bell", 0.25); } diff --git a/src/devices/machine/exorterm.h b/src/devices/machine/exorterm.h index 07944bff805..c5f9552d3ed 100644 --- a/src/devices/machine/exorterm.h +++ b/src/devices/machine/exorterm.h @@ -30,7 +30,7 @@ INPUT_PORTS_EXTERN(exorterm155); class exorterm155_device : public device_t { public: - exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Interface to a RS232 connection. auto rs232_conn_txd_handler() { return m_rs232_conn_txd_handler.bind(); } @@ -43,7 +43,7 @@ public: DECLARE_WRITE_LINE_MEMBER(rs232_conn_rxd_w); protected: - exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; diff --git a/src/devices/machine/f3853.cpp b/src/devices/machine/f3853.cpp index dbea3f30533..24b81bbea56 100644 --- a/src/devices/machine/f3853.cpp +++ b/src/devices/machine/f3853.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(F38T56, f38t56_device, "f38t56_psu", "Fairchild F38T56 PSU") // constructor //------------------------------------------------- -f3853_device::f3853_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +f3853_device::f3853_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_int_req_callback(*this), m_pri_out_callback(*this), @@ -54,29 +54,29 @@ f3853_device::f3853_device(const machine_config &mconfig, device_type type, cons m_external_interrupt_line(false) { } -f3853_device::f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f3853_device::f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3853_device(mconfig, F3853, tag, owner, clock) { } -f3851_device::f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +f3851_device::f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : f3853_device(mconfig, type, tag, owner, clock), m_read_port(*this), m_write_port(*this) { } -f3851_device::f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f3851_device::f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3851_device(mconfig, F3851, tag, owner, clock) { } -f3856_device::f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +f3856_device::f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : f3851_device(mconfig, type, tag, owner, clock) { } -f3856_device::f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f3856_device::f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3856_device(mconfig, F3856, tag, owner, clock) { } -f38t56_device::f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f38t56_device::f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3856_device(mconfig, F38T56, tag, owner, clock) { } diff --git a/src/devices/machine/f3853.h b/src/devices/machine/f3853.h index f7d6adb3b5c..22eaae40fb2 100644 --- a/src/devices/machine/f3853.h +++ b/src/devices/machine/f3853.h @@ -67,7 +67,7 @@ class f3853_device : public device_t { public: // construction/destruction - f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_req_callback() { return m_int_req_callback.bind(); } auto pri_out_callback() { return m_pri_out_callback.bind(); } @@ -84,7 +84,7 @@ public: IRQ_CALLBACK_MEMBER(int_acknowledge); protected: - f3853_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + f3853_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -119,7 +119,7 @@ protected: class f3851_device : public f3853_device { public: - f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // interrupt vector is a mask option on 3851 and 3856 void set_int_vector(u16 vector) { m_int_vector = vector; } @@ -134,7 +134,7 @@ public: virtual void write(offs_t offset, uint8_t data) override; protected: - f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; @@ -145,7 +145,7 @@ protected: class f3856_device : public f3851_device { public: - f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -153,7 +153,7 @@ public: virtual TIMER_CALLBACK_MEMBER(timer_callback) override; protected: - f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -167,7 +167,7 @@ protected: class f38t56_device : public f3856_device { public: - f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/machine/f4702.cpp b/src/devices/machine/f4702.cpp index 2a6bf7218c8..c3636003ffb 100644 --- a/src/devices/machine/f4702.cpp +++ b/src/devices/machine/f4702.cpp @@ -75,7 +75,7 @@ DEFINE_DEVICE_TYPE(F4702, f4702_device, "f4702", "Fairchild 4702B Bit Rate Gener // f4702_device - constructor //------------------------------------------------- -f4702_device::f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +f4702_device::f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, F4702, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_s_callback(*this) diff --git a/src/devices/machine/f4702.h b/src/devices/machine/f4702.h index c48601b1e3c..deedce857e5 100644 --- a/src/devices/machine/f4702.h +++ b/src/devices/machine/f4702.h @@ -28,7 +28,7 @@ class f4702_device : public device_t, public device_execute_interface { public: - f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto s_callback() { return m_s_callback.bind(); } diff --git a/src/devices/machine/fdc37c665gt.cpp b/src/devices/machine/fdc37c665gt.cpp index c14e6437d3e..3f58fdb849d 100644 --- a/src/devices/machine/fdc37c665gt.cpp +++ b/src/devices/machine/fdc37c665gt.cpp @@ -22,7 +22,7 @@ SMSC FDC37C665GT High Performance Multi-Mode Parallel Port Super I/O Floppy Disk DEFINE_DEVICE_TYPE(FDC37C665GT, fdc37c665gt_device, "fdc37c665gt", "FDC37C665GT") -fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, upd765_family_device::mode_t floppy_mode) +fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, upd765_family_device::mode_t floppy_mode) : device_t(mconfig, FDC37C665GT, tag, owner, clock) , mode(OperatingMode::Run) , config_key_step(0) diff --git a/src/devices/machine/fdc37c665gt.h b/src/devices/machine/fdc37c665gt.h index 6b90fc8341e..bbbf62ae0af 100644 --- a/src/devices/machine/fdc37c665gt.h +++ b/src/devices/machine/fdc37c665gt.h @@ -25,11 +25,11 @@ SMSC FDC37C665GT High Performance Multi-Mode Parallel Port Super I/O Floppy Disk class fdc37c665gt_device : public device_t { public: - fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fdc37c665gt_device(mconfig, tag, owner, clock, upd765_family_device::mode_t::AT) { } - fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, upd765_family_device::mode_t floppy_mode); + fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, upd765_family_device::mode_t floppy_mode); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/fdc37c93x.cpp b/src/devices/machine/fdc37c93x.cpp index 9e76e058a00..0641b1b7d35 100644 --- a/src/devices/machine/fdc37c93x.cpp +++ b/src/devices/machine/fdc37c93x.cpp @@ -15,7 +15,7 @@ SMSC FDC37C93x Plug and Play Compatible Ultra I/O Controller DEFINE_DEVICE_TYPE(FDC37C93X, fdc37c93x_device, "fdc37c93x", "SMSC FDC37C93X") -fdc37c93x_device::fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fdc37c93x_device::fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FDC37C93X, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , mode(OperatingMode::Run) @@ -244,7 +244,7 @@ void fdc37c93x_device::floppy_formats(format_registration &fr) void fdc37c93x_device::device_add_mconfig(machine_config &config) { // floppy disc controller - smc37c78_device &fdcdev(SMC37C78(config, floppy_controller_fdcdev, 24'000'000)); + smc37c78_device &fdcdev(SMC37C78(config, floppy_controller_fdcdev, XTAL::u(24'000'000))); fdcdev.intrq_wr_callback().set(FUNC(fdc37c93x_device::irq_floppy_w)); fdcdev.drq_wr_callback().set(FUNC(fdc37c93x_device::drq_floppy_w)); FLOPPY_CONNECTOR(config, "fdc:0", pc_hd_floppies, "35hd", fdc37c93x_device::floppy_formats); diff --git a/src/devices/machine/fdc37c93x.h b/src/devices/machine/fdc37c93x.h index c4305e93b80..6a78f6b1710 100644 --- a/src/devices/machine/fdc37c93x.h +++ b/src/devices/machine/fdc37c93x.h @@ -29,7 +29,7 @@ SMSC FDC37C93x Plug and Play Compatible Ultra I/O Controller class fdc37c93x_device : public device_t, public device_isa16_card_interface { public: - fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~fdc37c93x_device() {} // optional information overrides diff --git a/src/devices/machine/fga002.cpp b/src/devices/machine/fga002.cpp index 14ed175fb9e..cf4610a2dd4 100644 --- a/src/devices/machine/fga002.cpp +++ b/src/devices/machine/fga002.cpp @@ -74,7 +74,7 @@ DEFINE_DEVICE_TYPE(FGA002, fga002_device, "fga002", "Force FGA-002") // fga002_device - constructor //------------------------------------------------- -fga002_device::fga002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +fga002_device::fga002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_out_int_cb(*this) , m_liack4_cb(*this) @@ -87,7 +87,7 @@ fga002_device::fga002_device(const machine_config &mconfig, device_type type, co elem = 0; } -fga002_device::fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fga002_device::fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fga002_device(mconfig, FGA002, tag, owner, clock) { } diff --git a/src/devices/machine/fga002.h b/src/devices/machine/fga002.h index 35785189421..0457969ea16 100644 --- a/src/devices/machine/fga002.h +++ b/src/devices/machine/fga002.h @@ -10,7 +10,7 @@ class fga002_device : public device_t { public: // construction/destruction - fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); uint8_t read(offs_t offset); @@ -46,7 +46,7 @@ class fga002_device : public device_t // interrupt sources in prio order if on same interrupt level. TODO: Add all sources const static fga_irq_t s_irq_sources[]; - fga002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + fga002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/fm_scsi.cpp b/src/devices/machine/fm_scsi.cpp index d2b8fcd266f..5b87c8f3bee 100644 --- a/src/devices/machine/fm_scsi.cpp +++ b/src/devices/machine/fm_scsi.cpp @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(FMSCSI, fmscsi_device, "fmscsi", "FM-SCSI") * Device */ -fmscsi_device::fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fmscsi_device::fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, FMSCSI, tag, owner, clock), m_irq_handler(*this), m_drq_handler(*this) diff --git a/src/devices/machine/fm_scsi.h b/src/devices/machine/fm_scsi.h index 9a3df8c0ba6..3aa89d69d3f 100644 --- a/src/devices/machine/fm_scsi.h +++ b/src/devices/machine/fm_scsi.h @@ -17,7 +17,7 @@ class fmscsi_device : public legacy_scsi_host_adapter { public: // construction/destruction - fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/gayle.cpp b/src/devices/machine/gayle.cpp index 0e55fcd2bb6..22cc7e3fb30 100644 --- a/src/devices/machine/gayle.cpp +++ b/src/devices/machine/gayle.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(GAYLE, gayle_device, "gayle", "Amiga GAYLE") // gayle_device - constructor //------------------------------------------------- -gayle_device::gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gayle_device::gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAYLE, tag, owner, clock), m_int2_w(*this), m_cs0_read(*this), diff --git a/src/devices/machine/gayle.h b/src/devices/machine/gayle.h index c756e6117b7..ec28f3fac25 100644 --- a/src/devices/machine/gayle.h +++ b/src/devices/machine/gayle.h @@ -24,7 +24,7 @@ class gayle_device : public device_t { public: // construction/destruction - gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto int2_handler() { return m_int2_w.bind(); } diff --git a/src/devices/machine/gen_fifo.cpp b/src/devices/machine/gen_fifo.cpp index 6dd2c3137d4..81a60a1d051 100644 --- a/src/devices/machine/gen_fifo.cpp +++ b/src/devices/machine/gen_fifo.cpp @@ -4,7 +4,7 @@ #include "emu.h" #include "gen_fifo.h" -template generic_fifo_device_base::generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +template generic_fifo_device_base::generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_empty_cb(*this), m_full_cb(*this), @@ -192,7 +192,7 @@ template void generic_fifo_device_base::push(T t) template class generic_fifo_device_base; -generic_fifo_u32_device::generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generic_fifo_u32_device::generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_fifo_device_base(mconfig, GENERIC_FIFO_U32, tag, owner, clock) { } diff --git a/src/devices/machine/gen_fifo.h b/src/devices/machine/gen_fifo.h index 8e27ef73b6a..fef4b5980fe 100644 --- a/src/devices/machine/gen_fifo.h +++ b/src/devices/machine/gen_fifo.h @@ -133,7 +133,7 @@ public: } protected: - generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual ~generic_fifo_device_base() = default; /* These used to build memory accessors that can be put in a @@ -205,7 +205,7 @@ private: class generic_fifo_u32_device : public generic_fifo_device_base { public: - generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~generic_fifo_u32_device() = default; u32 read() { return read_gen(); } diff --git a/src/devices/machine/gen_latch.cpp b/src/devices/machine/gen_latch.cpp index 10caccd4c7c..1e82ecc677b 100644 --- a/src/devices/machine/gen_latch.cpp +++ b/src/devices/machine/gen_latch.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(GENERIC_LATCH_16, generic_latch_16_device, "generic_latch_16" // generic_latch_base_device - constructor //------------------------------------------------- -generic_latch_base_device::generic_latch_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +generic_latch_base_device::generic_latch_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_separate_acknowledge(false), m_latch_written(false), @@ -110,7 +110,7 @@ void generic_latch_base_device::acknowledge_w(u8 data) // generic_latch_8_device - constructor //------------------------------------------------- -generic_latch_8_device::generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +generic_latch_8_device::generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_latch_base_device(mconfig, GENERIC_LATCH_8, tag, owner, clock), m_latched_value(0) { @@ -181,7 +181,7 @@ void generic_latch_8_device::device_start() // generic_latch_16_device - constructor //------------------------------------------------- -generic_latch_16_device::generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +generic_latch_16_device::generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_latch_base_device(mconfig, GENERIC_LATCH_16, tag, owner, clock), m_latched_value(0) { diff --git a/src/devices/machine/gen_latch.h b/src/devices/machine/gen_latch.h index fc217410d06..9aa66bd45f0 100644 --- a/src/devices/machine/gen_latch.h +++ b/src/devices/machine/gen_latch.h @@ -41,7 +41,7 @@ public: protected: // construction/destruction - generic_latch_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + generic_latch_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -65,7 +65,7 @@ class generic_latch_8_device : public generic_latch_base_device { public: // construction/destruction - generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u8 read(); void write(u8 data); @@ -91,7 +91,7 @@ class generic_latch_16_device : public generic_latch_base_device { public: // construction/destruction - generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u16 read(); void write(u16 data); diff --git a/src/devices/machine/generalplus_gpl16250soc.cpp b/src/devices/machine/generalplus_gpl16250soc.cpp index 7718c586d43..cc2fb07ee65 100644 --- a/src/devices/machine/generalplus_gpl16250soc.cpp +++ b/src/devices/machine/generalplus_gpl16250soc.cpp @@ -25,14 +25,14 @@ DEFINE_DEVICE_TYPE(GCM394, sunplus_gcm394_device, "gcm394", "GeneralPlus GPL16250 System-on-a-Chip") -sunplus_gcm394_device::sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sunplus_gcm394_device::sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GCM394, tag, owner, clock) { } DEFINE_DEVICE_TYPE(GPAC800, generalplus_gpac800_device, "gpac800", "GeneralPlus GPL16250 System-on-a-Chip (with NAND handling)") -generalplus_gpac800_device::generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generalplus_gpac800_device::generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GPAC800, tag, owner, clock, address_map_constructor(FUNC(generalplus_gpac800_device::gpac800_internal_map), this)) { } @@ -40,7 +40,7 @@ generalplus_gpac800_device::generalplus_gpac800_device(const machine_config &mco DEFINE_DEVICE_TYPE(GP_SPISPI, generalplus_gpspispi_device, "gpac800spi", "GeneralPlus GPL16250 (with SPI handling)") -generalplus_gpspispi_device::generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generalplus_gpspispi_device::generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GP_SPISPI, tag, owner, clock, address_map_constructor(FUNC(generalplus_gpspispi_device::gpspispi_internal_map), this)) { } @@ -154,7 +154,7 @@ void generalplus_gpspi_direct_device::gpspi_direct_internal_map(address_map& map DEFINE_DEVICE_TYPE(GP_SPI_DIRECT, generalplus_gpspi_direct_device, "gpac800spi_direct", "GeneralPlus GPL16250 (with direct SPI handling)") -generalplus_gpspi_direct_device::generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generalplus_gpspi_direct_device::generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GP_SPI_DIRECT, tag, owner, clock, address_map_constructor(FUNC(generalplus_gpspi_direct_device::gpspi_direct_internal_map), this)) { } diff --git a/src/devices/machine/generalplus_gpl16250soc.h b/src/devices/machine/generalplus_gpl16250soc.h index 214cc7e8ace..cc31af03405 100644 --- a/src/devices/machine/generalplus_gpl16250soc.h +++ b/src/devices/machine/generalplus_gpl16250soc.h @@ -22,12 +22,12 @@ typedef device_delegate class sunplus_gcm394_base_device : public unsp_20_device, public device_mixer_interface { public: - sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : + sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(sunplus_gcm394_base_device::gcm394_internal_map), this)) { } - sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock, address_map_constructor internal) : + sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock, address_map_constructor internal) : unsp_20_device(mconfig, type, tag, owner, clock, internal), device_mixer_interface(mconfig, *this, 2), m_screen(*this, finder_base::DUMMY_TAG), @@ -377,13 +377,13 @@ class sunplus_gcm394_device : public sunplus_gcm394_base_device { public: template - sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : sunplus_gcm394_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); } - sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -391,14 +391,14 @@ class generalplus_gpac800_device : public sunplus_gcm394_base_device { public: template - generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : generalplus_gpac800_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); m_csbase = 0x30000; } - generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void gpac800_internal_map(address_map &map); @@ -446,14 +446,14 @@ class generalplus_gpspispi_device : public sunplus_gcm394_base_device { public: template - generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : generalplus_gpspispi_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); m_csbase = 0x30000; } - generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void gpspispi_internal_map(address_map &map); @@ -469,7 +469,7 @@ class generalplus_gpspi_direct_device : public sunplus_gcm394_base_device { public: template - generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : generalplus_gpspi_direct_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); @@ -478,7 +478,7 @@ public: m_csbase = 0xffffffff; } - generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void gpspi_direct_internal_map(address_map &map); diff --git a/src/devices/machine/generalplus_gpl16250soc_video.cpp b/src/devices/machine/generalplus_gpl16250soc_video.cpp index 7d2b7f68385..cb23ebab314 100644 --- a/src/devices/machine/generalplus_gpl16250soc_video.cpp +++ b/src/devices/machine/generalplus_gpl16250soc_video.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(GCM394_VIDEO, gcm394_video_device, "gcm394_video", "GeneralPl #include "logmacro.h" -gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), m_cpu(*this, finder_base::DUMMY_TAG), @@ -43,7 +43,7 @@ gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig { } -gcm394_video_device::gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gcm394_video_device::gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gcm394_base_video_device(mconfig, GCM394_VIDEO, tag, owner, clock) { } @@ -1157,7 +1157,7 @@ void gcm394_base_video_device::device_add_mconfig(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 256*0x10); GFXDECODE(config, m_gfxdecode, m_palette, gfx); - SPG_RENDERER(config, m_renderer, 0); + SPG_RENDERER(config, m_renderer); } diff --git a/src/devices/machine/generalplus_gpl16250soc_video.h b/src/devices/machine/generalplus_gpl16250soc_video.h index 22b4275a990..8a3d9046fe0 100644 --- a/src/devices/machine/generalplus_gpl16250soc_video.h +++ b/src/devices/machine/generalplus_gpl16250soc_video.h @@ -19,7 +19,7 @@ class gcm394_base_video_device : public device_t, public device_video_interface { public: - gcm394_base_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gcm394_base_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank); @@ -245,14 +245,14 @@ class gcm394_video_device : public gcm394_base_video_device { public: template - gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : gcm394_video_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); m_screen.set_tag(std::forward(screen_tag)); } - gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(GCM394_VIDEO, gcm394_video_device) diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp index 5c5d19cdbb3..6f98487bd9f 100644 --- a/src/devices/machine/genpc.cpp +++ b/src/devices/machine/genpc.cpp @@ -455,7 +455,7 @@ void ibm5160_mb_device::device_add_mconfig(machine_config &config) m_ppi8255->out_pb_callback().set(FUNC(ibm5160_mb_device::pc_ppi_portb_w)); m_ppi8255->in_pc_callback().set(FUNC(ibm5160_mb_device::pc_ppi_portc_r)); - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace(":maincpu", AS_PROGRAM); m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w)); @@ -517,7 +517,7 @@ ioport_constructor ibm5160_mb_device::device_input_ports() const // ibm5160_mb_device - constructor //------------------------------------------------- -ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, IBM5160_MOTHERBOARD, tag, owner, clock) { } @@ -697,12 +697,12 @@ ioport_constructor ibm5150_mb_device::device_input_ports() const // ibm5150_mb_device - constructor //------------------------------------------------- -ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm5150_mb_device(mconfig, IBM5150_MOTHERBOARD, tag, owner, clock) { } -ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, type, tag, owner, clock) , m_cassette(*this, "cassette") { @@ -858,7 +858,7 @@ ioport_constructor ec1840_mb_device::device_input_ports() const // ec1840_mb_device - constructor //------------------------------------------------- -ec1840_mb_device::ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ec1840_mb_device::ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ec1841_mb_device(mconfig, EC1840_MOTHERBOARD, tag, owner, clock) { } @@ -970,12 +970,12 @@ ioport_constructor ec1841_mb_device::device_input_ports() const // ec1841_mb_device - constructor //------------------------------------------------- -ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, EC1841_MOTHERBOARD, tag, owner, clock) { } -ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, type, tag, owner, clock) { } @@ -1025,12 +1025,12 @@ uint8_t ec1841_mb_device::pc_ppi_portc_r() return data; } -pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_noppi_mb_device(mconfig, PCNOPPI_MOTHERBOARD, tag, owner, clock) { } -pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/machine/genpc.h b/src/devices/machine/genpc.h index 8e836aae807..35d64eff0cb 100644 --- a/src/devices/machine/genpc.h +++ b/src/devices/machine/genpc.h @@ -27,7 +27,7 @@ class ibm5160_mb_device : public device_t { public: // construction/destruction - ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template void set_cputag(T &&tag) @@ -61,7 +61,7 @@ public: DECLARE_WRITE_LINE_MEMBER( keyboard_data_w ); protected: - ibm5160_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm5160_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -143,14 +143,14 @@ class ibm5150_mb_device : public ibm5160_mb_device { public: // construction/destruction - ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); virtual DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed ) override; protected: - ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -173,12 +173,12 @@ class ec1841_mb_device : public ibm5160_mb_device { public: // construction/destruction - ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); protected: - ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -197,7 +197,7 @@ class ec1840_mb_device : public ec1841_mb_device { public: // construction/destruction - ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // optional information overrides @@ -217,7 +217,7 @@ class pc_noppi_mb_device : public ibm5160_mb_device { public: // construction/destruction - pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t pit_out2() { return m_pit_out2; } // helper for near-clones with multifunction ics instead of 8255s @@ -226,7 +226,7 @@ public: uint8_t pc_ppi_portb_r(); protected: - pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp index ea16a9b0573..d6cb8171726 100644 --- a/src/devices/machine/gt64xxx.cpp +++ b/src/devices/machine/gt64xxx.cpp @@ -164,7 +164,7 @@ void gt64xxx_device::cpu_map(address_map &map) map(0x00000000, 0x00000cff).rw(FUNC(gt64xxx_device::cpu_if_r), FUNC(gt64xxx_device::cpu_if_w)); } -gt64xxx_device::gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gt64xxx_device::gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, type, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG), m_be(0), m_autoconfig(0), m_irq_num(-1) , m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32) diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h index 644d101c72e..7c85f082623 100644 --- a/src/devices/machine/gt64xxx.h +++ b/src/devices/machine/gt64xxx.h @@ -69,7 +69,7 @@ public: virtual void device_post_load() override; protected: - gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); address_space *m_cpu_space; virtual space_config_vector memory_space_config() const override; @@ -155,14 +155,14 @@ private: class gt64010_device : public gt64xxx_device { public: template - gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) + gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int irq_num) : gt64010_device(mconfig, tag, owner, clock) { set_ids_host(0x11ab0146, 0x03, 0x00000000); set_cpu_tag(std::forward(cpu_tag)); set_irq_num(irq_num); } - gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt64xxx_device(mconfig, GT64010, tag, owner, clock) {} }; @@ -173,14 +173,14 @@ public: class gt64111_device : public gt64xxx_device { public: template - gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) + gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int irq_num) : gt64111_device(mconfig, tag, owner, clock) { set_ids(0x414611ab, 0x10, 0x058000, 0x00000000); set_cpu_tag(std::forward(cpu_tag)); set_irq_num(irq_num); } - gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt64xxx_device(mconfig, GT64111, tag, owner, clock) {} }; diff --git a/src/devices/machine/gt913_io.cpp b/src/devices/machine/gt913_io.cpp index d1b091fa308..feaab0c4032 100644 --- a/src/devices/machine/gt913_io.cpp +++ b/src/devices/machine/gt913_io.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(GT913_IO_HLE, gt913_io_hle_device, "gt913_io_hle", "Casio GT913F I/O (HLE)") -gt913_io_hle_device::gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gt913_io_hle_device::gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GT913_IO_HLE, tag, owner, clock), m_cpu(*this, DEVICE_SELF_OWNER), m_cpu_io(nullptr), m_intc(nullptr), m_intc_tag(nullptr) diff --git a/src/devices/machine/gt913_io.h b/src/devices/machine/gt913_io.h index 335c7b2719f..16f118afe48 100644 --- a/src/devices/machine/gt913_io.h +++ b/src/devices/machine/gt913_io.h @@ -21,9 +21,9 @@ class gt913_io_hle_device : public device_t { public: // construction/destruction - gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int t0irq, int t1irq) - : gt913_io_hle_device(mconfig, tag, owner, 0) + : gt913_io_hle_device(mconfig, tag, owner) { m_intc_tag = intc; m_timer_irq[0] = t0irq; diff --git a/src/devices/machine/gt913_kbd.cpp b/src/devices/machine/gt913_kbd.cpp index ba7a2ff521c..35c73ce18a3 100644 --- a/src/devices/machine/gt913_kbd.cpp +++ b/src/devices/machine/gt913_kbd.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(GT913_KBD_HLE, gt913_kbd_hle_device, "gt913_kbd_hle", "Casio GT913F keyboard controller (HLE)") -gt913_kbd_hle_device::gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gt913_kbd_hle_device::gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GT913_KBD_HLE, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "FI0", "FI1", "FI2", "FI3", "FI4", "FI5", "FI6", "FI7", "FI8", "FI9", "FI10", "KI0", "KI1", "KI2"), m_velocity(*this, "VELOCITY"), diff --git a/src/devices/machine/gt913_kbd.h b/src/devices/machine/gt913_kbd.h index 3bf2ced327e..0a1e64907d0 100644 --- a/src/devices/machine/gt913_kbd.h +++ b/src/devices/machine/gt913_kbd.h @@ -21,7 +21,7 @@ class gt913_kbd_hle_device : public device_t, protected device_matrix_keyboard_i { public: // construction/destruction - gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return m_irq_cb.bind(); } diff --git a/src/devices/machine/gt913_snd.cpp b/src/devices/machine/gt913_snd.cpp index 803e6443278..9d5ecbd84e0 100644 --- a/src/devices/machine/gt913_snd.cpp +++ b/src/devices/machine/gt913_snd.cpp @@ -52,7 +52,7 @@ const u16 gt913_sound_device::volume_ramp[17] = 0x8000 }; -gt913_sound_device::gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +gt913_sound_device::gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GT913_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/machine/gt913_snd.h b/src/devices/machine/gt913_snd.h index 4c5bfd4a153..0f32647f413 100644 --- a/src/devices/machine/gt913_snd.h +++ b/src/devices/machine/gt913_snd.h @@ -25,7 +25,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // construction/destruction - gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void data_w(offs_t offset, u16 data); u16 data_r(offs_t offset); diff --git a/src/devices/machine/hd63450.cpp b/src/devices/machine/hd63450.cpp index 5006729badf..b72cbd193fa 100644 --- a/src/devices/machine/hd63450.cpp +++ b/src/devices/machine/hd63450.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(HD63450, hd63450_device, "hd63450", "Hitachi HD63450 DMAC") -hd63450_device::hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63450_device::hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD63450, tag, owner, clock) , m_irq_callback(*this) , m_dma_end(*this) diff --git a/src/devices/machine/hd63450.h b/src/devices/machine/hd63450.h index 33ffd8b1097..37056056e61 100644 --- a/src/devices/machine/hd63450.h +++ b/src/devices/machine/hd63450.h @@ -12,13 +12,13 @@ class hd63450_device : public device_t { public: template - hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cputag) + hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cputag) : hd63450_device(mconfig, tag, owner, clock) { set_cpu_tag(std::forward(cputag)); } - hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_irq_callback.bind(); } auto dma_end() { return m_dma_end.bind(); } diff --git a/src/devices/machine/hd64610.cpp b/src/devices/machine/hd64610.cpp index 2a2c3064705..876cc9ec4ea 100644 --- a/src/devices/machine/hd64610.cpp +++ b/src/devices/machine/hd64610.cpp @@ -153,7 +153,7 @@ inline void hd64610_device::check_alarm() // hd64610_device - constructor //------------------------------------------------- -hd64610_device::hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd64610_device::hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD64610, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/hd64610.h b/src/devices/machine/hd64610.h index 9dda6ed03e5..877fbb0a6d6 100644 --- a/src/devices/machine/hd64610.h +++ b/src/devices/machine/hd64610.h @@ -34,7 +34,7 @@ class hd64610_device : public device_t, { public: // construction/destruction - hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_out_irq_cb.bind(); } auto clkout() { return m_out_1hz_cb.bind(); } diff --git a/src/devices/machine/hdc92x4.cpp b/src/devices/machine/hdc92x4.cpp index 1abdcf02abc..5394285e72b 100644 --- a/src/devices/machine/hdc92x4.cpp +++ b/src/devices/machine/hdc92x4.cpp @@ -466,7 +466,7 @@ const hdc92x4_device::cmddef hdc92x4_device::s_command[] = /* Standard constructor for the base class and the two variants */ -hdc92x4_device::hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_hdc9234) +hdc92x4_device::hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_hdc9234) : device_t(mconfig, type, tag, owner, clock), m_is_hdc9234(is_hdc9234), m_out_intrq(*this), @@ -479,12 +479,12 @@ hdc92x4_device::hdc92x4_device(const machine_config &mconfig, device_type type, { } -hdc9224_device::hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hdc9224_device::hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hdc92x4_device(mconfig, HDC9224, tag, owner, clock, false) { } -hdc9234_device::hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hdc9234_device::hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hdc92x4_device(mconfig, HDC9234, tag, owner, clock, true) { } diff --git a/src/devices/machine/hdc92x4.h b/src/devices/machine/hdc92x4.h index 4527efc6c91..790c6bf62c1 100644 --- a/src/devices/machine/hdc92x4.h +++ b/src/devices/machine/hdc92x4.h @@ -78,7 +78,7 @@ public: void connect_hard_drive(mfm_harddisk_device *harddisk); protected: - hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_hdc9234); + hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_hdc9234); virtual void device_start() override; virtual void device_reset() override; @@ -462,7 +462,7 @@ private: class hdc9224_device : public hdc92x4_device { public: - hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int step_time() override; @@ -472,7 +472,7 @@ protected: class hdc9234_device : public hdc92x4_device { public: - hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int step_time() override; diff --git a/src/devices/machine/hp_dc100_tape.cpp b/src/devices/machine/hp_dc100_tape.cpp index 2afd9d78beb..57118c24d8c 100644 --- a/src/devices/machine/hp_dc100_tape.cpp +++ b/src/devices/machine/hp_dc100_tape.cpp @@ -71,7 +71,7 @@ DEFINE_DEVICE_TYPE(HP_DC100_TAPE, hp_dc100_tape_device, "hp_dc100_tape", "HP DC1 constexpr double MOTION_MARGIN = 1e-5; // Margin to ensure motion events have passed when timer expires (10 µs) constexpr hti_format_t::tape_pos_t TAPE_INIT_POS = 80 * hti_format_t::ONE_INCH_POS; // Initial tape position: 80" from beginning (just past the punched part) -hp_dc100_tape_device::hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_dc100_tape_device::hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : microtape_image_device(mconfig, HP_DC100_TAPE, tag, owner, clock) , m_cart_out_handler(*this) , m_hole_handler(*this) diff --git a/src/devices/machine/hp_dc100_tape.h b/src/devices/machine/hp_dc100_tape.h index fd8ff3b5425..5cf1c0868a8 100644 --- a/src/devices/machine/hp_dc100_tape.h +++ b/src/devices/machine/hp_dc100_tape.h @@ -21,7 +21,7 @@ class hp_dc100_tape_device : public microtape_image_device { public: // Construction - hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_image_interface overrides virtual image_init_result call_load() override; diff --git a/src/devices/machine/hp_taco.cpp b/src/devices/machine/hp_taco.cpp index 8896edf0fc2..b84a7116ad9 100644 --- a/src/devices/machine/hp_taco.cpp +++ b/src/devices/machine/hp_taco.cpp @@ -274,7 +274,7 @@ enum cmd_t : uint8_t { DEFINE_DEVICE_TYPE(HP_TACO, hp_taco_device, "hp_taco", "HP TACO") // Constructors -hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_tape(*this, "drive") , m_irq_handler(*this) @@ -283,7 +283,7 @@ hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, { } -hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hp_taco_device(mconfig, HP_TACO, tag, owner, clock) { } @@ -543,7 +543,7 @@ READ_LINE_MEMBER(hp_taco_device::wr_bit_r) void hp_taco_device::device_add_mconfig(machine_config &config) { - HP_DC100_TAPE(config, m_tape, 0); + HP_DC100_TAPE(config, m_tape); m_tape->set_acceleration(ACCELERATION); m_tape->set_set_points(SLOW_SPEED, FAST_SPEED); m_tape->set_tick_size(TACH_TICK_LEN); diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h index f409946a988..4ff6eaeec6c 100644 --- a/src/devices/machine/hp_taco.h +++ b/src/devices/machine/hp_taco.h @@ -20,7 +20,7 @@ class hp_taco_device : public device_t { public: // construction/destruction - hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq() { return m_irq_handler.bind(); } @@ -46,7 +46,7 @@ public: DECLARE_READ_LINE_MEMBER(wr_bit_r); protected: - hp_taco_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hp_taco_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp index 2db16de0899..102ef7f2373 100644 --- a/src/devices/machine/i2cmem.cpp +++ b/src/devices/machine/i2cmem.cpp @@ -122,68 +122,68 @@ i2cmem_device::i2cmem_device( assert(!clock); } -i2c_x24c01_device::i2c_x24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_x24c01_device::i2c_x24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_X24C01, tag, owner, clock, 0, 8, 0x80) { set_devsel_address_low(true); } -i2c_24c01_device::i2c_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c01_device::i2c_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C01, tag, owner, clock, 0, 8, 0x80) { } -i2c_pcf8570_device::i2c_pcf8570_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_pcf8570_device::i2c_pcf8570_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_PCF8570, tag, owner, clock, 0, 0, 0x100) { } -i2c_pcd8572_device::i2c_pcd8572_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_pcd8572_device::i2c_pcd8572_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_PCD8572, tag, owner, clock, 0, 0, 0x80) { } -i2c_pcf8582_device::i2c_pcf8582_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_pcf8582_device::i2c_pcf8582_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_PCF8582, tag, owner, clock, 0, 0, 0x100) { } -i2c_24c02_device::i2c_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c02_device::i2c_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C02, tag, owner, clock, 0, 8, 0x100) { } -i2c_m24c02_device::i2c_m24c02_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_m24c02_device::i2c_m24c02_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_M24C02, tag, owner, clock, 0, 16, 0x100) { } -i2c_24c04_device::i2c_24c04_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_24c04_device::i2c_24c04_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C04, tag, owner, clock, 0, 16, 0x200) { } -i2c_x2404p_device::i2c_x2404p_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_x2404p_device::i2c_x2404p_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_X2404P, tag, owner, clock, 0x100, 8, 0x200) { } -i2c_24c08_device::i2c_24c08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c08_device::i2c_24c08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C08, tag, owner, clock, 0, 16, 0x400) { } -i2c_24c16_device::i2c_24c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c16_device::i2c_24c16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C16, tag, owner, clock, 0, 16, 0x800) { } -i2c_24c64_device::i2c_24c64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c64_device::i2c_24c64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C64, tag, owner, clock, 0, 32, 0x2000) { } -i2c_24c512_device::i2c_24c512_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_24c512_device::i2c_24c512_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C512, tag, owner, clock, 0, 128, 0x10000) { } diff --git a/src/devices/machine/i2cmem.h b/src/devices/machine/i2cmem.h index 9ea431faab2..f8f2faa2630 100644 --- a/src/devices/machine/i2cmem.h +++ b/src/devices/machine/i2cmem.h @@ -50,7 +50,7 @@ public: protected: // construction/destruction - i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int read_page_size, int write_page_size, int data_size); + i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int read_page_size, int write_page_size, int data_size); // device-level overrides virtual void device_start() override; @@ -100,7 +100,7 @@ protected: class i2c_##name##_device : public i2cmem_device \ { \ public: \ - i2c_##name##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); \ + i2c_##name##_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); \ }; DECLARE_I2C_DEVICE(x24c01); diff --git a/src/devices/machine/i6300esb.cpp b/src/devices/machine/i6300esb.cpp index 3e9d8089b40..d2938e74e82 100644 --- a/src/devices/machine/i6300esb.cpp +++ b/src/devices/machine/i6300esb.cpp @@ -10,7 +10,7 @@ void i6300esb_watchdog_device::map(address_map &map) { } -i6300esb_watchdog_device::i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i6300esb_watchdog_device::i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I6300ESB_WATCHDOG, tag, owner, clock) { } @@ -89,7 +89,7 @@ void i6300esb_lpc_device::internal_io_map(address_map &map) } -i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I6300ESB_LPC, tag, owner, clock) , acpi(*this, "acpi") , rtc (*this, "rtc") diff --git a/src/devices/machine/i6300esb.h b/src/devices/machine/i6300esb.h index a126a5c1735..de9c313a30c 100644 --- a/src/devices/machine/i6300esb.h +++ b/src/devices/machine/i6300esb.h @@ -12,7 +12,7 @@ class i6300esb_lpc_device : public pci_device { public: - i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void reset_all_mappings() override; virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, @@ -138,12 +138,12 @@ private: class i6300esb_watchdog_device : public pci_device { public: - i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : i6300esb_watchdog_device(mconfig, tag, owner, clock) { set_ids(0x808625ab, 0x02, 0x088000, subdevice_id); } - i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/i7220.cpp b/src/devices/machine/i7220.cpp index 9d9c788759f..02df85b266f 100644 --- a/src/devices/machine/i7220.cpp +++ b/src/devices/machine/i7220.cpp @@ -60,7 +60,7 @@ DEFINE_DEVICE_TYPE(I7220, i7220_device, "i7220", "Intel 7220 BMC") // i7220_device - constructor //------------------------------------------------- -i7220_device::i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i7220_device::i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I7220, tag, owner, clock) , device_image_interface(mconfig, *this) , intrq_cb(*this) diff --git a/src/devices/machine/i7220.h b/src/devices/machine/i7220.h index f961d64559e..6e4f47195dc 100644 --- a/src/devices/machine/i7220.h +++ b/src/devices/machine/i7220.h @@ -42,7 +42,7 @@ class i7220_device : public device_t, { public: // construction/destruction - i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return intrq_cb.bind(); } auto drq_callback() { return drq_cb.bind(); } diff --git a/src/devices/machine/i80130.cpp b/src/devices/machine/i80130.cpp index b9b632b93e1..ce13a815010 100644 --- a/src/devices/machine/i80130.cpp +++ b/src/devices/machine/i80130.cpp @@ -102,10 +102,10 @@ void i80130_device::io_w(offs_t offset, uint16_t data, uint16_t mem_mask) void i80130_device::device_add_mconfig(machine_config &config) { - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set(FUNC(i80130_device::irq_w)); - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); m_pit->set_clk<0>(0); m_pit->out_handler<0>().set(FUNC(i80130_device::systick_w)); m_pit->set_clk<1>(0); @@ -124,7 +124,7 @@ void i80130_device::device_add_mconfig(machine_config &config) // i80130_device - constructor //------------------------------------------------- -i80130_device::i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80130_device::i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I80130, tag, owner, clock), m_pic(*this, "pic"), m_pit(*this, "pit"), diff --git a/src/devices/machine/i80130.h b/src/devices/machine/i80130.h index 0b5958ad875..d067913ad65 100644 --- a/src/devices/machine/i80130.h +++ b/src/devices/machine/i80130.h @@ -18,7 +18,7 @@ class i80130_device : public device_t { public: // construction/destruction - i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_write_irq.bind(); } auto ack() { return m_write_ack.bind(); } diff --git a/src/devices/machine/i8087.cpp b/src/devices/machine/i8087.cpp index 4235d734d7e..2d4bd048ac5 100644 --- a/src/devices/machine/i8087.cpp +++ b/src/devices/machine/i8087.cpp @@ -167,7 +167,7 @@ static inline floatx80 double_to_fx80(double in) DEFINE_DEVICE_TYPE(I8087, i8087_device, "i8087", "Intel 8087") -i8087_device::i8087_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +i8087_device::i8087_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_space(*this, finder_base::DUMMY_TAG, -1), m_int_handler(*this), @@ -175,7 +175,7 @@ i8087_device::i8087_device(const machine_config &mconfig, device_type type, cons { } -i8087_device::i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +i8087_device::i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8087_device(mconfig, I8087, tag, owner, clock) { } diff --git a/src/devices/machine/i8087.h b/src/devices/machine/i8087.h index af3dea07f08..925288e188e 100644 --- a/src/devices/machine/i8087.h +++ b/src/devices/machine/i8087.h @@ -13,7 +13,7 @@ DECLARE_DEVICE_TYPE(I8087, i8087_device) class i8087_device : public device_t { public: - i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_space_88(Object &&tag, int spacenum) { m_space.set_tag(std::forward(tag), spacenum); m_space.set_data_width(8); } template void set_space_86(Object &&tag, int spacenum) { m_space.set_tag(std::forward(tag), spacenum); m_space.set_data_width(16); } auto irq() { return m_int_handler.bind(); } @@ -23,7 +23,7 @@ public: void addr_w(uint32_t data); protected: - i8087_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + i8087_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp index 810bb001e67..bf3a035c0fb 100644 --- a/src/devices/machine/i8155.cpp +++ b/src/devices/machine/i8155.cpp @@ -268,12 +268,12 @@ inline void i8155_device::write_port(int port, uint8_t data) // i8155_device - constructor //------------------------------------------------- -i8155_device::i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8155_device::i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8155_device(mconfig, I8155, tag, owner, clock) { } -i8155_device::i8155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +i8155_device::i8155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_in_pa_cb(*this), m_in_pb_cb(*this), @@ -296,7 +296,7 @@ i8155_device::i8155_device(const machine_config &mconfig, device_type type, cons // i8156_device - constructor //------------------------------------------------- -i8156_device::i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8156_device::i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8155_device(mconfig, I8156, tag, owner, clock) { } diff --git a/src/devices/machine/i8155.h b/src/devices/machine/i8155.h index ace27e002c9..c95d23f8159 100644 --- a/src/devices/machine/i8155.h +++ b/src/devices/machine/i8155.h @@ -45,7 +45,7 @@ class i8155_device : public device_t { public: // construction/destruction - i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto in_pb_callback() { return m_in_pb_cb.bind(); } @@ -66,7 +66,7 @@ public: void data_w(uint8_t data); protected: - i8155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i8155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -129,7 +129,7 @@ class i8156_device : public i8155_device { public: // construction/destruction - i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/i8212.cpp b/src/devices/machine/i8212.cpp index c6cf46eafe5..e45ad13442d 100644 --- a/src/devices/machine/i8212.cpp +++ b/src/devices/machine/i8212.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(I8212, i8212_device, "i8212", "Intel 8212 I/O Port") // i8212_device - constructor //------------------------------------------------- -i8212_device::i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8212_device::i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8212, tag, owner, clock), m_write_int(*this), m_read_di(*this), diff --git a/src/devices/machine/i8212.h b/src/devices/machine/i8212.h index efd84d11813..1acd9a51f40 100644 --- a/src/devices/machine/i8212.h +++ b/src/devices/machine/i8212.h @@ -36,7 +36,7 @@ class i8212_device : public device_t public: // construction/destruction - i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto int_wr_callback() { return m_write_int.bind(); } auto di_rd_callback() { return m_read_di.bind(); } diff --git a/src/devices/machine/i8214.cpp b/src/devices/machine/i8214.cpp index b5a8c4140be..6752f7bee1b 100644 --- a/src/devices/machine/i8214.cpp +++ b/src/devices/machine/i8214.cpp @@ -113,7 +113,7 @@ void i8214_device::check_interrupt() // i8214_device - constructor //------------------------------------------------- -i8214_device::i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8214_device::i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8214, tag, owner, clock) , m_write_int(*this) , m_write_enlg(*this) diff --git a/src/devices/machine/i8214.h b/src/devices/machine/i8214.h index d8514e400ef..de17fa209bc 100644 --- a/src/devices/machine/i8214.h +++ b/src/devices/machine/i8214.h @@ -30,7 +30,7 @@ class i8214_device : public device_t { public: // construction/destruction - i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_int_dis_hack(bool hack) { m_int_dis_hack = hack; } diff --git a/src/devices/machine/i82355.cpp b/src/devices/machine/i82355.cpp index 88726f7f04e..4419ee20cb4 100644 --- a/src/devices/machine/i82355.cpp +++ b/src/devices/machine/i82355.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(I82355, i82355_device, "i82355", "Intel 82355 BMIC") // i82355_device - constructor //------------------------------------------------- -i82355_device::i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i82355_device::i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I82355, tag, owner, clock) , m_eint_callback(*this) , m_lint_callback(*this) diff --git a/src/devices/machine/i82355.h b/src/devices/machine/i82355.h index 25cb776d9f7..c11c459ed1b 100644 --- a/src/devices/machine/i82355.h +++ b/src/devices/machine/i82355.h @@ -21,7 +21,7 @@ class i82355_device : public device_t { public: // construction/destruction - i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto eint_callback() { return m_eint_callback.bind(); } diff --git a/src/devices/machine/i82357.cpp b/src/devices/machine/i82357.cpp index 91de890a03d..d3bf1c1757f 100644 --- a/src/devices/machine/i82357.cpp +++ b/src/devices/machine/i82357.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(I82357, i82357_device, "i82357", "Intel 82357 Integrated System Peripheral") -i82357_device::i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i82357_device::i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I82357, tag, owner, clock) , m_pic(*this, "pic%u", 0) , m_pit(*this, "pit%u", 0) @@ -43,7 +43,7 @@ i82357_device::i82357_device(const machine_config &mconfig, const char *tag, dev void i82357_device::device_add_mconfig(machine_config &config) { - PIC8259(config, m_pic[0], 0); + PIC8259(config, m_pic[0]); m_pic[0]->in_sp_callback().set_constant(1); m_pic[0]->read_slave_ack_callback().set( [this](offs_t offset) -> u8 @@ -54,12 +54,12 @@ void i82357_device::device_add_mconfig(machine_config &config) return 0; }); - PIC8259(config, m_pic[1], 0); + PIC8259(config, m_pic[1]); m_pic[1]->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir2_w)); m_pic[1]->in_sp_callback().set_constant(0); - PIT8254(config, m_pit[0], 0); - PIT8254(config, m_pit[1], 0); + PIT8254(config, m_pit[0]); + PIT8254(config, m_pit[1]); // timer 1 counter 0: system timer m_pit[0]->set_clk<0>(clock() / 12); diff --git a/src/devices/machine/i82357.h b/src/devices/machine/i82357.h index 3c5a7756061..8af682c0251 100644 --- a/src/devices/machine/i82357.h +++ b/src/devices/machine/i82357.h @@ -13,7 +13,7 @@ class i82357_device : public device_t { public: - i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_rtc_cb() { return m_out_rtc.bind(); } auto out_int_cb() { return subdevice("pic0")->out_int_callback(); } diff --git a/src/devices/machine/i82371sb.cpp b/src/devices/machine/i82371sb.cpp index 480561bb69e..c62a9e829e8 100644 --- a/src/devices/machine/i82371sb.cpp +++ b/src/devices/machine/i82371sb.cpp @@ -108,7 +108,7 @@ void i82371sb_isa_device::device_add_mconfig(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - ISA16(config, m_isabus, 0); + ISA16(config, m_isabus); m_isabus->set_memspace(":maincpu", AS_PROGRAM); m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq3_callback().set(FUNC(i82371sb_isa_device::pc_irq3_w)); @@ -132,7 +132,7 @@ void i82371sb_isa_device::device_add_mconfig(machine_config &config) m_isabus->iochck_callback().set(FUNC(i82371sb_isa_device::iochck_w)); } -i82371sb_isa_device::i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i82371sb_isa_device::i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82371SB_ISA, tag, owner, clock), m_smi_callback(*this), m_nmi_callback(*this), @@ -973,7 +973,7 @@ void i82371sb_ide_device::device_add_mconfig(machine_config &config) m_ide2->set_bus_master_space(":maincpu", AS_PROGRAM); } -i82371sb_ide_device::i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82371sb_ide_device::i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82371SB_IDE, tag, owner, clock) , latency_timer(0) , bmiba(1) diff --git a/src/devices/machine/i82371sb.h b/src/devices/machine/i82371sb.h index f667132883c..fd3a28ab335 100644 --- a/src/devices/machine/i82371sb.h +++ b/src/devices/machine/i82371sb.h @@ -26,7 +26,7 @@ class i82371sb_isa_device : public pci_device { public: - i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto smi() { return m_smi_callback.bind(); } auto nmi() { return m_nmi_callback.bind(); } @@ -210,7 +210,7 @@ DECLARE_DEVICE_TYPE(I82371SB_ISA, i82371sb_isa_device) class i82371sb_ide_device : public pci_device { public: - i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_pri() { return m_irq_pri_callback.bind(); } auto irq_sec() { return m_irq_sec_callback.bind(); } diff --git a/src/devices/machine/i8243.cpp b/src/devices/machine/i8243.cpp index 5c6c0bfe385..116b7ca21f4 100644 --- a/src/devices/machine/i8243.cpp +++ b/src/devices/machine/i8243.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(I8243, i8243_device, "i8243", "Intel 8243 I/O Expander") // i8243_device - constructor //------------------------------------------------- -i8243_device::i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8243_device::i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8243, tag, owner, clock) , m_p{0, 0, 0, 0} , m_p2out(0x0f), m_p2(0x0f), m_opcode(0), m_prog(1), m_cs(0) diff --git a/src/devices/machine/i8243.h b/src/devices/machine/i8243.h index 53c46358567..d74b53348cb 100644 --- a/src/devices/machine/i8243.h +++ b/src/devices/machine/i8243.h @@ -32,7 +32,7 @@ class i8243_device : public device_t { public: // construction/destruction - i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto p4_in_cb() { return m_readhandler[0].bind(); } diff --git a/src/devices/machine/i82439hx.cpp b/src/devices/machine/i82439hx.cpp index 866963184b5..2abb004925b 100644 --- a/src/devices/machine/i82439hx.cpp +++ b/src/devices/machine/i82439hx.cpp @@ -28,7 +28,7 @@ void i82439hx_host_device::config_map(address_map &map) map(0x92, 0x92).r(FUNC(i82439hx_host_device::errsyn_r)); } -i82439hx_host_device::i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82439hx_host_device::i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, I82439HX, tag, owner, clock) , cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/i82439hx.h b/src/devices/machine/i82439hx.h index e6a833c6cfb..92d497b70eb 100644 --- a/src/devices/machine/i82439hx.h +++ b/src/devices/machine/i82439hx.h @@ -12,14 +12,14 @@ class i82439hx_host_device : public pci_host_device { public: template - i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int ram_size) + i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int ram_size) : i82439hx_host_device(mconfig, tag, owner, clock) { set_ids_host(0x80861250, 0x03, 0x00000000); set_cpu_tag(std::forward(cpu_tag)); set_ram_size(ram_size); } - i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&tag) { cpu.set_tag(std::forward(tag)); } void set_ram_size(int ram_size); diff --git a/src/devices/machine/i82439tx.cpp b/src/devices/machine/i82439tx.cpp index f8c1c9a8bb3..0ac3d0ee90a 100644 --- a/src/devices/machine/i82439tx.cpp +++ b/src/devices/machine/i82439tx.cpp @@ -23,7 +23,7 @@ void i82439tx_host_device::config_map(address_map &map) map(0x92, 0x92).r(FUNC(i82439tx_host_device::errsyn_r)); } -i82439tx_host_device::i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82439tx_host_device::i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, I82439TX, tag, owner, clock) , cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/i82439tx.h b/src/devices/machine/i82439tx.h index a2a9528b1dd..b925a7a4662 100644 --- a/src/devices/machine/i82439tx.h +++ b/src/devices/machine/i82439tx.h @@ -12,14 +12,14 @@ class i82439tx_host_device : public pci_host_device { public: template - i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int ram_size) + i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int ram_size) : i82439tx_host_device(mconfig, tag, owner, clock) { set_ids_host(0x80867100, 0x03, 0x00000000); set_cpu_tag(std::forward(cpu_tag)); set_ram_size(ram_size); } - i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&tag) { cpu.set_tag(std::forward(tag)); } void set_ram_size(int ram_size); diff --git a/src/devices/machine/i8251.cpp b/src/devices/machine/i8251.cpp index b1a04cba1f6..05a7249c02b 100644 --- a/src/devices/machine/i8251.cpp +++ b/src/devices/machine/i8251.cpp @@ -73,12 +73,12 @@ i8251_device::i8251_device( { } -i8251_device::i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8251_device::i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8251_device(mconfig, I8251, tag, owner, clock) { } -v5x_scu_device::v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v5x_scu_device::v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8251_device(mconfig, V5X_SCU, tag, owner, clock) { } diff --git a/src/devices/machine/i8251.h b/src/devices/machine/i8251.h index 0cf1a7c911d..6d821f250ca 100644 --- a/src/devices/machine/i8251.h +++ b/src/devices/machine/i8251.h @@ -20,7 +20,7 @@ class i8251_device : public device_t, { public: // construction/destruction - i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto txd_handler() { return m_txd_handler.bind(); } @@ -153,7 +153,7 @@ class v5x_scu_device : public i8251_device { public: // construction/destruction - v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/machine/i82541.cpp b/src/devices/machine/i82541.cpp index b727ac6e295..8e9045cdde8 100644 --- a/src/devices/machine/i82541.cpp +++ b/src/devices/machine/i82541.cpp @@ -17,7 +17,7 @@ void i82541_device::registers_io_map(address_map &map) { } -i82541_device::i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82541_device::i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82541, tag, owner, clock) { } diff --git a/src/devices/machine/i82541.h b/src/devices/machine/i82541.h index 1614bf0b01c..80ae5cc4af6 100644 --- a/src/devices/machine/i82541.h +++ b/src/devices/machine/i82541.h @@ -9,12 +9,12 @@ class i82541_device : public pci_device { public: - i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : i82541_device(mconfig, tag, owner, clock) { set_ids(0x8086107c, 0x05, 0x020000, subdevice_id); } - i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/i8255.cpp b/src/devices/machine/i8255.cpp index b1bae643ee9..3ae921b86f4 100644 --- a/src/devices/machine/i8255.cpp +++ b/src/devices/machine/i8255.cpp @@ -215,7 +215,7 @@ inline int i8255_device::port_c_upper_mode() // i8255_device - constructor //------------------------------------------------- -i8255_device::i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_ams40489) +i8255_device::i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_ams40489) : device_t(mconfig, type, tag, owner, clock) , m_force_portb_in(is_ams40489) , m_force_portc_out(is_ams40489) @@ -234,7 +234,7 @@ i8255_device::i8255_device(const machine_config &mconfig, device_type type, cons { } -i8255_device::i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8255_device::i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8255_device(mconfig, I8255, tag, owner, clock, false) { } @@ -946,7 +946,7 @@ WRITE_LINE_MEMBER( i8255_device::pc6_w ) // AMS40489 (Amstrad Plus/GX4000 ASIC PPI implementation) -ams40489_ppi_device::ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ams40489_ppi_device::ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8255_device(mconfig, AMS40489_PPI, tag, owner, clock, true) { } diff --git a/src/devices/machine/i8255.h b/src/devices/machine/i8255.h index bd74fe2eb6e..b9e16ccf729 100644 --- a/src/devices/machine/i8255.h +++ b/src/devices/machine/i8255.h @@ -45,7 +45,7 @@ class i8255_device : public device_t { public: // construction/destruction - i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto in_pb_callback() { return m_in_pb_cb.bind(); } @@ -73,7 +73,7 @@ public: DECLARE_WRITE_LINE_MEMBER( pc6_w ); protected: - i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_ams40489); + i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_ams40489); // device-level overrides virtual void device_resolve_objects() override; @@ -137,7 +137,7 @@ class ams40489_ppi_device : public i8255_device { public: // construction/destruction - ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/i8257.cpp b/src/devices/machine/i8257.cpp index c2fb87d203b..bfe537f0c79 100644 --- a/src/devices/machine/i8257.cpp +++ b/src/devices/machine/i8257.cpp @@ -251,7 +251,7 @@ inline void i8257_device::advance() // i8257_device - constructor //------------------------------------------------- -i8257_device::i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8257_device::i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8257, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_icount(0) diff --git a/src/devices/machine/i8257.h b/src/devices/machine/i8257.h index df1f74a4858..aff3b3f1829 100644 --- a/src/devices/machine/i8257.h +++ b/src/devices/machine/i8257.h @@ -38,7 +38,7 @@ class i8257_device : public device_t, public device_execute_interface { public: // construction/destruction - i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/i82586.cpp b/src/devices/machine/i82586.cpp index 0a97a5cf66f..bba9ab2b029 100644 --- a/src/devices/machine/i82586.cpp +++ b/src/devices/machine/i82586.cpp @@ -108,7 +108,7 @@ CFG_PARAMS[] = { "transmit on no crs", "disabled", 0, 8, 0x08, 3, false }, }; -i82586_base_device::i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth, u8 addrwidth) +i82586_base_device::i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth, u8 addrwidth) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_network_interface(mconfig, *this, 10) @@ -128,32 +128,32 @@ i82586_base_device::i82586_base_device(const machine_config &mconfig, device_typ { } -i82586_device::i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82586_device::i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82586_base_device(mconfig, I82586, tag, owner, clock, ENDIANNESS_LITTLE, 16, 24) { } -i82596_device::i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth) +i82596_device::i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth) : i82586_base_device(mconfig, type, tag, owner, clock, endian, datawidth, 32) { } -i82596_le16_device::i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_le16_device::i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_LE16, tag, owner, clock, ENDIANNESS_LITTLE, 16) { } -i82596_be16_device::i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_be16_device::i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_BE16, tag, owner, clock, ENDIANNESS_BIG, 16) { } -i82596_le32_device::i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_le32_device::i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_LE32, tag, owner, clock, ENDIANNESS_LITTLE, 32) { } -i82596_be32_device::i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_be32_device::i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_BE32, tag, owner, clock, ENDIANNESS_BIG, 32) { } diff --git a/src/devices/machine/i82586.h b/src/devices/machine/i82586.h index 82f48163620..14916e32b22 100644 --- a/src/devices/machine/i82586.h +++ b/src/devices/machine/i82586.h @@ -163,7 +163,7 @@ public: DECLARE_WRITE_LINE_MEMBER(reset_w); protected: - i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth, u8 addrwidth); + i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth, u8 addrwidth); // standard device_* overrides virtual void device_start() override; @@ -261,7 +261,7 @@ protected: class i82586_device : public i82586_base_device { public: - i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const int CFG_SIZE = 12; static const int DUMP_SIZE = 170; @@ -324,7 +324,7 @@ public: void port(u32 data); // cpu access interface protected: - i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth); + i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth); // standard device_* overrides virtual void device_start() override; @@ -372,25 +372,25 @@ private: class i82596_le16_device : public i82596_device { public: - i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i82596_be16_device : public i82596_device { public: - i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i82596_le32_device : public i82596_device { public: - i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i82596_be32_device : public i82596_device { public: - i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(I82586, i82586_device) diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index 48d734288f4..0ac06a8db9d 100644 --- a/src/devices/machine/i8271.cpp +++ b/src/devices/machine/i8271.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(I8271, i8271_device, "i8271", "Intel 8271 FDC") -i8271_device::i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8271_device::i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8271, tag, owner, clock), ready_connected(false), mode(0), main_phase(0), intrq_cb(*this), drq_cb(*this), @@ -171,9 +171,9 @@ uint8_t i8271_device::rr_r() return rr; } -void i8271_device::set_rate(int rate) +void i8271_device::set_rate(const XTAL &rate) { - cur_rate = rate; + cur_rate = rate.value(); } uint8_t i8271_device::read(offs_t offset) diff --git a/src/devices/machine/i8271.h b/src/devices/machine/i8271.h index 92880af57d4..7a828296967 100644 --- a/src/devices/machine/i8271.h +++ b/src/devices/machine/i8271.h @@ -18,7 +18,7 @@ class floppy_image_device; class i8271_device : public device_t { public: - i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intrq_wr_callback() { return intrq_cb.bind(); } auto drq_wr_callback() { return drq_cb.bind(); } @@ -32,7 +32,7 @@ public: void ready_w(bool val); - void set_rate(int rate); // rate in bps, to be used when the fdc is externally frequency-controlled + void set_rate(const XTAL &rate); // rate in bps, to be used when the fdc is externally frequency-controlled void set_ready_line_connected(bool ready); void set_select_lines_connected(bool select); diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp index 9de96d806e0..7be9360d04d 100644 --- a/src/devices/machine/i8279.cpp +++ b/src/devices/machine/i8279.cpp @@ -93,7 +93,7 @@ DEFINE_DEVICE_TYPE(I8279, i8279_device, "i8279", "Intel 8279 KDC") // i8279_device - constructor //------------------------------------------------- -i8279_device::i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8279_device::i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8279, tag, owner, clock), m_out_irq_cb(*this), m_out_sl_cb(*this), diff --git a/src/devices/machine/i8279.h b/src/devices/machine/i8279.h index 56c111a2797..2264ee7dd89 100644 --- a/src/devices/machine/i8279.h +++ b/src/devices/machine/i8279.h @@ -39,7 +39,7 @@ class i8279_device : public device_t { public: // construction/destruction - i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq_callback() { return m_out_irq_cb.bind(); } auto out_sl_callback() { return m_out_sl_cb.bind(); } diff --git a/src/devices/machine/i82875p.cpp b/src/devices/machine/i82875p.cpp index 37d95112359..513df703059 100644 --- a/src/devices/machine/i82875p.cpp +++ b/src/devices/machine/i82875p.cpp @@ -43,7 +43,7 @@ void i82875p_host_device::config_map(address_map &map) map(0xe8, 0xe8).r(FUNC(i82875p_host_device::capreg2_r)); } -i82875p_host_device::i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82875p_host_device::i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, I82875P_HOST, tag, owner, clock) , cpu(*this, finder_base::DUMMY_TAG) { @@ -423,7 +423,7 @@ void i82875p_host_device::map_extra(uint64_t memory_window_start, uint64_t memor } -i82875p_agp_device::i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82875p_agp_device::i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : agp_bridge_device(mconfig, I82875P_AGP, tag, owner, clock) { set_ids_bridge(0x80862579, 0x02); @@ -448,7 +448,7 @@ void i82875p_overflow_device::overflow_map(address_map &map) } -i82875p_overflow_device::i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82875p_overflow_device::i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82875P_OVERFLOW, tag, owner, clock) { } diff --git a/src/devices/machine/i82875p.h b/src/devices/machine/i82875p.h index ecd252b35ef..d7f8d4c9143 100644 --- a/src/devices/machine/i82875p.h +++ b/src/devices/machine/i82875p.h @@ -12,7 +12,7 @@ class i82875p_host_device : public pci_host_device { public: template - i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id, T &&cpu_tag, int ram_size) + i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id, T &&cpu_tag, int ram_size) : i82875p_host_device(mconfig, tag, owner, clock) { set_ids_host(0x80862578, 0x02, subdevice_id); @@ -20,7 +20,7 @@ public: set_ram_size(ram_size); } - i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&tag) { cpu.set_tag(std::forward(tag)); } void set_ram_size(int ram_size); @@ -97,7 +97,7 @@ private: class i82875p_agp_device : public agp_bridge_device { public: - i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -106,12 +106,12 @@ protected: class i82875p_overflow_device : public pci_device { public: - i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : i82875p_overflow_device(mconfig, tag, owner, clock) { set_ids(0x8086257e, 0x02, 0x088000, subdevice_id); } - i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: uint8_t dram_row_boundary_r(offs_t offset); diff --git a/src/devices/machine/i8291a.cpp b/src/devices/machine/i8291a.cpp index 3692ba95a28..cd3750205b0 100644 --- a/src/devices/machine/i8291a.cpp +++ b/src/devices/machine/i8291a.cpp @@ -37,7 +37,7 @@ ALLOW_SAVE_TYPE(i8291a_device::source_handshake_state); ALLOW_SAVE_TYPE(i8291a_device::acceptor_handshake_state); i8291a_device::i8291a_device(const machine_config &mconfig, const char *tag, - device_t *owner, uint32_t clock) : + device_t *owner, const XTAL &clock) : device_t{mconfig, I8291A, tag, owner, clock}, m_int_write_func{*this}, m_dreq_write_func{*this}, diff --git a/src/devices/machine/i8291a.h b/src/devices/machine/i8291a.h index 2d048d806aa..b0a3458223f 100644 --- a/src/devices/machine/i8291a.h +++ b/src/devices/machine/i8291a.h @@ -17,7 +17,7 @@ class i8291a_device : public device_t { public: // construction/destruction - i8291a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8291a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_write() { return m_int_write_func.bind(); } auto dreq_write() { return m_dreq_write_func.bind(); } diff --git a/src/devices/machine/i8355.cpp b/src/devices/machine/i8355.cpp index caa31eb7e1a..14e5e81f8ac 100644 --- a/src/devices/machine/i8355.cpp +++ b/src/devices/machine/i8355.cpp @@ -87,7 +87,7 @@ inline void i8355_device::write_port(int port, u8 data) // i8355_device - constructor //------------------------------------------------- -i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8355, tag, owner, clock), m_in_pa_cb(*this), m_out_pa_cb(*this), diff --git a/src/devices/machine/i8355.h b/src/devices/machine/i8355.h index e9205a86a9d..76680c9af44 100644 --- a/src/devices/machine/i8355.h +++ b/src/devices/machine/i8355.h @@ -38,7 +38,7 @@ class i8355_device : public device_t { public: // construction/destruction - i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa() { return m_in_pa_cb.bind(); } auto out_pa() { return m_out_pa_cb.bind(); } diff --git a/src/devices/machine/ibm21s850.cpp b/src/devices/machine/ibm21s850.cpp index c58622cace6..6d5445b92ed 100644 --- a/src/devices/machine/ibm21s850.cpp +++ b/src/devices/machine/ibm21s850.cpp @@ -23,18 +23,18 @@ DEFINE_DEVICE_TYPE(IBM21S850, ibm21s850_device, "ibm21s850", "IBM 21S850 IEEE-1394 1-Port PHY") DEFINE_DEVICE_TYPE(IBM21S851, ibm21s851_device, "ibm21s851", "IBM 21S850 IEEE-1394 3-Port PHY") -ibm21s85x_base_device::ibm21s85x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ibm21s85x_base_device::ibm21s85x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_reset_cb(*this) { } -ibm21s850_device::ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm21s850_device::ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm21s85x_base_device(mconfig, IBM21S850, tag, owner, clock) { } -ibm21s851_device::ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm21s851_device::ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm21s85x_base_device(mconfig, IBM21S851, tag, owner, clock) { } diff --git a/src/devices/machine/ibm21s850.h b/src/devices/machine/ibm21s850.h index dde6cf59a4d..c4c1f4dc39f 100644 --- a/src/devices/machine/ibm21s850.h +++ b/src/devices/machine/ibm21s850.h @@ -25,7 +25,7 @@ public: static constexpr feature_type unemulated_features() { return feature::COMMS; } protected: - ibm21s85x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm21s85x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -143,7 +143,7 @@ protected: class ibm21s850_device : public ibm21s85x_base_device { public: - ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: virtual void device_reset() override; @@ -161,7 +161,7 @@ private: class ibm21s851_device : public ibm21s85x_base_device { public: - ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: virtual void device_reset() override; diff --git a/src/devices/machine/icm7170.cpp b/src/devices/machine/icm7170.cpp index 3abcf04ea38..d0ed12fb392 100644 --- a/src/devices/machine/icm7170.cpp +++ b/src/devices/machine/icm7170.cpp @@ -68,7 +68,7 @@ enum // icm7170_device - constructor //------------------------------------------------- -icm7170_device::icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +icm7170_device::icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ICM7170, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/icm7170.h b/src/devices/machine/icm7170.h index 2fef930fa04..a2306fae33e 100644 --- a/src/devices/machine/icm7170.h +++ b/src/devices/machine/icm7170.h @@ -50,7 +50,7 @@ class icm7170_device : public device_t, { public: // construction/destruction - icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_out_irq_cb.bind(); } diff --git a/src/devices/machine/idectrl.cpp b/src/devices/machine/idectrl.cpp index c8f79c3fd91..9c0d4e08183 100644 --- a/src/devices/machine/idectrl.cpp +++ b/src/devices/machine/idectrl.cpp @@ -26,12 +26,12 @@ DEFINE_DEVICE_TYPE(IDE_CONTROLLER, ide_controller_device, "idectrl", "IDE Controller (16-bit)") -ide_controller_device::ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_device::ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_device(mconfig, IDE_CONTROLLER, tag, owner, clock) { } -ide_controller_device::ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_device::ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : abstract_ata_interface_device(mconfig, type, tag, owner, clock) { } @@ -88,12 +88,12 @@ void ide_controller_device::write_cs1(offs_t offset, uint16_t data, uint16_t mem DEFINE_DEVICE_TYPE(IDE_CONTROLLER_32, ide_controller_32_device, "idectrl32", "IDE Controller (32-bit)") -ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_32_device(mconfig, IDE_CONTROLLER_32, tag, owner, clock) { } -ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : abstract_ata_interface_device(mconfig, type, tag, owner, clock) { } @@ -220,7 +220,7 @@ void ide_controller_32_device::write_cs1(offs_t offset, uint32_t data, uint32_t DEFINE_DEVICE_TYPE(BUS_MASTER_IDE_CONTROLLER, bus_master_ide_controller_device, "idectrl32bm", "Bus Master IDE Controller") -bus_master_ide_controller_device::bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bus_master_ide_controller_device::bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_32_device(mconfig, BUS_MASTER_IDE_CONTROLLER, tag, owner, clock), m_dma_space(*this, finder_base::DUMMY_TAG, -1, 32), m_dma_address(0), diff --git a/src/devices/machine/idectrl.h b/src/devices/machine/idectrl.h index e0b10b05d08..28b0adfb974 100644 --- a/src/devices/machine/idectrl.h +++ b/src/devices/machine/idectrl.h @@ -18,7 +18,7 @@ class ide_controller_device : public abstract_ata_interface_device { public: - ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template ide_controller_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false) { @@ -52,7 +52,7 @@ public: void cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { write_cs1(offset, data, mem_mask); } protected: - ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(IDE_CONTROLLER, ide_controller_device) @@ -61,7 +61,7 @@ DECLARE_DEVICE_TYPE(IDE_CONTROLLER, ide_controller_device) class ide_controller_32_device : public abstract_ata_interface_device { public: - ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template ide_controller_32_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false) { @@ -95,7 +95,7 @@ public: void cs1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { write_cs1(offset, data, mem_mask); } protected: - ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(IDE_CONTROLLER_32, ide_controller_32_device) @@ -104,7 +104,7 @@ DECLARE_DEVICE_TYPE(IDE_CONTROLLER_32, ide_controller_32_device) class bus_master_ide_controller_device : public ide_controller_32_device { public: - bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_bus_master_space(T &&bmtag, int bmspace) { m_dma_space.set_tag(std::forward(bmtag), bmspace); } template void set_bus_master_space(const address_space_finder &finder) { m_dma_space.set_tag(finder); } diff --git a/src/devices/machine/ie15.cpp b/src/devices/machine/ie15.cpp index 603c6034ca9..daacce72812 100644 --- a/src/devices/machine/ie15.cpp +++ b/src/devices/machine/ie15.cpp @@ -39,7 +39,7 @@ #define _PRINT(ch) (std::isprint(ch & 127)?(ch & 127):' ') -ie15_device::ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ie15_device::ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -69,7 +69,7 @@ ie15_device::ie15_device(const machine_config &mconfig, device_type type, const { } -ie15_device::ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ie15_device::ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ie15_device(mconfig, IE15, tag, owner, clock) { } @@ -517,7 +517,7 @@ void ie15_device::device_reset() m_serial_tx_ready = m_serial_rx_ready = IE_TRUE; set_data_frame(1 /* start bits */, 8 /* data bits */, PARITY_NONE, STOP_BITS_1); // device supports rates from 150 to 9600 baud but null_modem has hardcoded 9600 - set_rate(9600); + set_rate(XTAL::u(9600)); } /* @@ -680,12 +680,12 @@ void ie15_device::ie15core(machine_config &config) config.set_default_layout(layout_ie15); /* Devices */ - IE15_KEYBOARD(config, m_keyboard, 0); + IE15_KEYBOARD(config, m_keyboard); m_keyboard->keyboard_cb().set(FUNC(ie15_device::kbd_put)); m_keyboard->sdv_cb().set(FUNC(ie15_device::kbd_sdv)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2400); + BEEP(config, m_beeper, XTAL::u(2400)); m_beeper->add_route(ALL_OUTPUTS, "mono", 0.15); } diff --git a/src/devices/machine/ie15.h b/src/devices/machine/ie15.h index 89eaf0cfd8b..3687300fbda 100644 --- a/src/devices/machine/ie15.h +++ b/src/devices/machine/ie15.h @@ -36,7 +36,7 @@ INPUT_PORTS_EXTERN(ie15); class ie15_device : public device_t, public device_serial_interface { public: - ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Interface to a RS232 connection. auto rs232_conn_txd_handler() { return m_rs232_conn_txd_handler.bind(); } @@ -51,7 +51,7 @@ public: DECLARE_WRITE_LINE_MEMBER(update_serial); protected: - ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; diff --git a/src/devices/machine/ie15_kbd.cpp b/src/devices/machine/ie15_kbd.cpp index 169f4be18aa..015633d7dcc 100644 --- a/src/devices/machine/ie15_kbd.cpp +++ b/src/devices/machine/ie15_kbd.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(IE15_KEYBOARD, ie15_keyboard_device, "ie15kbd", "15WWW-97-006 Keyboard") -ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "TERM_LINE0", "TERM_LINE1", "TERM_LINE2", "TERM_LINE3") , m_io_kbdc(*this, "TERM_LINEC") @@ -27,7 +27,7 @@ ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, device { } -ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ie15_keyboard_device(mconfig, IE15_KEYBOARD, tag, owner, clock) { } diff --git a/src/devices/machine/ie15_kbd.h b/src/devices/machine/ie15_kbd.h index 3302bbda8a2..89baf4eccc6 100644 --- a/src/devices/machine/ie15_kbd.h +++ b/src/devices/machine/ie15_kbd.h @@ -31,7 +31,7 @@ public: IE_KB_NR_BIT = 7, }; - ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto keyboard_cb() { return m_keyboard_cb.bind(); } auto sdv_cb() { return m_sdv_cb.bind(); } @@ -41,7 +41,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(dip_changed); protected: - ie15_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ie15_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/machine/im6402.cpp b/src/devices/machine/im6402.cpp index 6a52867bdbd..119d5ff111e 100644 --- a/src/devices/machine/im6402.cpp +++ b/src/devices/machine/im6402.cpp @@ -70,7 +70,7 @@ inline void im6402_device::set_tre(int state) // im6402_device - constructor //------------------------------------------------- -im6402_device::im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +im6402_device::im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IM6402, tag, owner, clock), device_serial_interface(mconfig, *this), m_write_tro(*this), diff --git a/src/devices/machine/im6402.h b/src/devices/machine/im6402.h index d36853353c2..4455e17d993 100644 --- a/src/devices/machine/im6402.h +++ b/src/devices/machine/im6402.h @@ -48,13 +48,13 @@ class im6402_device : public device_t, public device_serial_interface public: // construction/destruction im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t rrc, uint32_t trc) - : im6402_device(mconfig, tag, owner, 0) + : im6402_device(mconfig, tag, owner) { set_rrc(rrc); set_trc(trc); } - im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_rrc(int rrc) { m_rrc = rrc; } void set_trc(int trc) { m_trc = trc; } diff --git a/src/devices/machine/input_merger.cpp b/src/devices/machine/input_merger.cpp index 7424bd6e8fa..a8b9f96e456 100644 --- a/src/devices/machine/input_merger.cpp +++ b/src/devices/machine/input_merger.cpp @@ -110,22 +110,22 @@ TIMER_CALLBACK_MEMBER(input_merger_device::update_state) // SPECIALISATIONS //************************************************************************** -input_merger_any_high_device::input_merger_any_high_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_any_high_device::input_merger_any_high_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ANY_HIGH, tag, owner, clock, u32(0), u32(0), 1) { } -input_merger_all_high_device::input_merger_all_high_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_all_high_device::input_merger_all_high_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ALL_HIGH, tag, owner, clock, ~u32(0), ~u32(0), 0) { } -input_merger_any_low_device::input_merger_any_low_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_any_low_device::input_merger_any_low_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ANY_LOW, tag, owner, clock, ~u32(0), ~u32(0), 1) { } -input_merger_all_low_device::input_merger_all_low_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_all_low_device::input_merger_all_low_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ALL_LOW, tag, owner, clock, u32(0), u32(0), 0) { } diff --git a/src/devices/machine/input_merger.h b/src/devices/machine/input_merger.h index aacffeab4ee..b8098d8d901 100644 --- a/src/devices/machine/input_merger.h +++ b/src/devices/machine/input_merger.h @@ -57,28 +57,28 @@ protected: class input_merger_any_high_device : public input_merger_device { public: - input_merger_any_high_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_any_high_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class input_merger_all_high_device : public input_merger_device { public: - input_merger_all_high_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_all_high_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class input_merger_any_low_device : public input_merger_device { public: - input_merger_any_low_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_any_low_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class input_merger_all_low_device : public input_merger_device { public: - input_merger_all_low_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_all_low_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/ins8154.cpp b/src/devices/machine/ins8154.cpp index 0ce0dbd11d8..e4d67b1bfbf 100644 --- a/src/devices/machine/ins8154.cpp +++ b/src/devices/machine/ins8154.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(INS8154, ins8154_device, "ins8154", "INS8154 RAM I/O") // ins8154_device - constructor //------------------------------------------------- -ins8154_device::ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ins8154_device::ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INS8154, tag, owner, clock) , m_in_a_cb(*this) , m_out_a_cb(*this) diff --git a/src/devices/machine/ins8154.h b/src/devices/machine/ins8154.h index b4013c0876d..4e996177a5a 100644 --- a/src/devices/machine/ins8154.h +++ b/src/devices/machine/ins8154.h @@ -39,7 +39,7 @@ class ins8154_device : public device_t { public: // construction/destruction - ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto in_a() { return m_in_a_cb.bind(); } auto out_a() { return m_out_a_cb.bind(); } diff --git a/src/devices/machine/ins8250.cpp b/src/devices/machine/ins8250.cpp index 63a68550e2d..b17574e710b 100644 --- a/src/devices/machine/ins8250.cpp +++ b/src/devices/machine/ins8250.cpp @@ -107,7 +107,7 @@ DEFINE_DEVICE_TYPE(NS16450, ns16450_device, "ns16450", "National Semiconductor DEFINE_DEVICE_TYPE(NS16550, ns16550_device, "ns16550", "National Semiconductor NS16550 UART") DEFINE_DEVICE_TYPE(PC16552D, pc16552_device, "pc16552d", "National Semiconductor PC16552D UART") -ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, dev_type device_type) +ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type) : device_t(mconfig, type, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_device_type(device_type) @@ -127,22 +127,22 @@ ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_t m_regs.ier = 0; } -ins8250_device::ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ins8250_device::ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ins8250_uart_device(mconfig, INS8250, tag, owner, clock, dev_type::INS8250) { } -ns16450_device::ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns16450_device::ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ins8250_uart_device(mconfig, NS16450, tag, owner, clock, dev_type::NS16450) { } -ns16550_device::ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns16550_device::ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ins8250_uart_device(mconfig, NS16550, tag, owner, clock, dev_type::NS16550) { } -pc16552_device::pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pc16552_device::pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC16552D, tag, owner, clock) { } @@ -643,8 +643,8 @@ void ins8250_uart_device::device_start() m_out_int_cb.resolve_safe(); m_out_out1_cb.resolve_safe(); m_out_out2_cb.resolve_safe(); - set_tra_rate(0); - set_rcv_rate(0); + set_tra_rate(XTAL::u(0)); + set_rcv_rate(XTAL::u(0)); save_item(NAME(m_regs.thr)); save_item(NAME(m_regs.rbr)); diff --git a/src/devices/machine/ins8250.h b/src/devices/machine/ins8250.h index f79715decc3..a6f0f06ce1c 100644 --- a/src/devices/machine/ins8250.h +++ b/src/devices/machine/ins8250.h @@ -46,7 +46,7 @@ protected: NS16550A }; - ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, dev_type device_type); + ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type); virtual void device_start() override; virtual void device_reset() override; @@ -101,19 +101,19 @@ private: class ins8250_device : public ins8250_uart_device { public: - ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ns16450_device : public ins8250_uart_device { public: - ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ns16550_device : public ins8250_uart_device { public: - ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; virtual void device_reset() override; @@ -139,7 +139,7 @@ private: class pc16552_device : public device_t { public: - pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(offs_t offset) { return ((offset & 8) ? m_chan1 : m_chan0)->ins8250_r(offset & 7); } void write(offs_t offset, u8 data) { ((offset & 8) ? m_chan1 : m_chan0)->ins8250_w(offset & 7, data); } diff --git a/src/devices/machine/intelfsh.cpp b/src/devices/machine/intelfsh.cpp index b4e9c5acde0..068e513ae30 100644 --- a/src/devices/machine/intelfsh.cpp +++ b/src/devices/machine/intelfsh.cpp @@ -133,7 +133,7 @@ DEFINE_DEVICE_TYPE(CAT28F020, cat28f020_device, "cat28f0 // intelfsh_device - constructor //------------------------------------------------- -intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), @@ -409,130 +409,130 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type break; } -intelfsh8_device::intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +intelfsh8_device::intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : intelfsh_device(mconfig, type, tag, owner, clock, variant) { } -intelfsh16_device::intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +intelfsh16_device::intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : intelfsh_device(mconfig, type, tag, owner, clock, variant) { } -intel_28f016s5_device::intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_28f016s5_device::intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, INTEL_28F016S5, tag, owner, clock, FLASH_INTEL_28F016S5) { } -fujitsu_29f160te_device::fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29f160te_device::fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29F160TE, tag, owner, clock, FLASH_FUJITSU_29F160TE) { } -fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29F016A, tag, owner, clock, FLASH_FUJITSU_29F016A) { } -fujitsu_29dl164bd_device::fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29dl164bd_device::fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29DL164BD, tag, owner, clock, FLASH_FUJITSU_29DL164BD) { } -fujitsu_29lv002tc_device::fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29lv002tc_device::fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29LV002TC, tag, owner, clock, FLASH_FUJITSU_29LV002TC) { } -fujitsu_29lv800b_device::fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29lv800b_device::fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, FUJITSU_29LV800B, tag, owner, clock, FLASH_FUJITSU_29LV800B) { } -sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SHARP_LH28F016S, tag, owner, clock, FLASH_SHARP_LH28F016S) { } -sharp_lh28f016s_16bit_device::sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f016s_16bit_device::sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F016S_16BIT, tag, owner, clock, FLASH_SHARP_LH28F016S_16BIT) { } -atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, ATMEL_29C010, tag, owner, clock, FLASH_ATMEL_29C010) { } -atmel_49f4096_device::atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmel_49f4096_device::atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, ATMEL_49F4096, tag, owner, clock, FLASH_ATMEL_49F4096) { } -amd_29f010_device::amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f010_device::amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F010, tag, owner, clock, FLASH_AMD_29F010) { } -amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F040, tag, owner, clock, FLASH_AMD_29F040) { } -amd_29f080_device::amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f080_device::amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F080, tag, owner, clock, FLASH_AMD_29F080) { } -amd_29f400t_device::amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f400t_device::amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F400T, tag, owner, clock, FLASH_AMD_29F400T) { } -amd_29f800t_device::amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f800t_device::amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F800T, tag, owner, clock, FLASH_AMD_29F800T) { } -amd_29f800b_16bit_device::amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f800b_16bit_device::amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, AMD_29F800B_16BIT, tag, owner, clock, FLASH_AMD_29F800B_16BIT) { } -amd_29lv200t_device::amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29lv200t_device::amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29LV200T, tag, owner, clock, FLASH_AMD_29LV200T) { } -cat28f020_device::cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cat28f020_device::cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, CAT28F020, tag, owner, clock, FLASH_CAT28F020) { } -intel_e28f008sa_device::intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_e28f008sa_device::intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, INTEL_E28F008SA, tag, owner, clock, FLASH_INTEL_E28F008SA) { } -macronix_29f008tc_device::macronix_29f008tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +macronix_29f008tc_device::macronix_29f008tc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, MACRONIX_29F008TC, tag, owner, clock, FLASH_MACRONIX_29F008TC) { } -macronix_29l001mc_device::macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +macronix_29l001mc_device::macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, MACRONIX_29L001MC, tag, owner, clock, FLASH_MACRONIX_29L001MC) { } -macronix_29lv160tmc_device::macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +macronix_29lv160tmc_device::macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, MACRONIX_29LV160TMC, tag, owner, clock, FLASH_MACRONIX_29LV160TMC) { } -panasonic_mn63f805mnp_device::panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +panasonic_mn63f805mnp_device::panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, PANASONIC_MN63F805MNP, tag, owner, clock, FLASH_PANASONIC_MN63F805MNP) { } -sanyo_le26fv10n1ts_device::sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sanyo_le26fv10n1ts_device::sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SANYO_LE26FV10N1TS, tag, owner, clock, FLASH_SANYO_LE26FV10N1TS) { } -sst_28sf040_device::sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_28sf040_device::sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_28SF040, tag, owner, clock, FLASH_SST_28SF040) { } -sst_39sf040_device::sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_39sf040_device::sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_39SF040, tag, owner, clock, FLASH_SST_39SF040) { } -sst_39vf020_device::sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_39vf020_device::sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_39VF020, tag, owner, clock, FLASH_SST_39VF020) { } -sst_49lf020_device::sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_49lf020_device::sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_49LF020, tag, owner, clock, FLASH_SST_49LF020) { } -sharp_lh28f400_device::sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f400_device::sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F400, tag, owner, clock, FLASH_SHARP_LH28F400) { } -intel_te28f160_device::intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_te28f160_device::intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_TE28F160, tag, owner, clock, FLASH_INTEL_TE28F160) { } -sharp_lh28f160s3_device::sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f160s3_device::sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F160S3, tag, owner, clock, FLASH_SHARP_LH28F160S3) { } -intel_te28f320_device::intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_te28f320_device::intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_TE28F320, tag, owner, clock, FLASH_INTEL_TE28F320) { } -spansion_s29gl064s_device::spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spansion_s29gl064s_device::spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SPANSION_S29GL064S, tag, owner, clock, FLASH_SPANSION_S29GL064S) { } -intel_e28f400b_device::intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_e28f400b_device::intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_E28F400B, tag, owner, clock, FLASH_INTEL_E28F400B) { } -sharp_lh28f320bf_device::sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f320bf_device::sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F320BF, tag, owner, clock, FLASH_SHARP_LH28F320BF) { } -intel_28f320j3d_device::intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_28f320j3d_device::intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_28F320J3D, tag, owner, clock, FLASH_INTEL_28F320J3D) { } -intel_28f320j5_device::intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_28f320j5_device::intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_28F320J5, tag, owner, clock, FLASH_INTEL_28F320J5) { } -sst_39vf400a_device::sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_39vf400a_device::sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SST_39VF400A, tag, owner, clock, FLASH_SST_39VF400A) { } -tms_29f040_device::tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms_29f040_device::tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, TMS_29F040, tag, owner, clock, FLASH_TMS_29F040) { } //------------------------------------------------- diff --git a/src/devices/machine/intelfsh.h b/src/devices/machine/intelfsh.h index 189d9349d42..1612c0d88e8 100644 --- a/src/devices/machine/intelfsh.h +++ b/src/devices/machine/intelfsh.h @@ -63,7 +63,7 @@ public: protected: // construction/destruction - intelfsh_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + intelfsh_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -120,7 +120,7 @@ public: protected: // construction/destruction - intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); }; @@ -138,7 +138,7 @@ public: protected: // construction/destruction - intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); }; @@ -148,103 +148,103 @@ protected: class intel_28f016s5_device : public intelfsh8_device { public: - intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29f160te_device : public intelfsh8_device { public: - fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29f016a_device : public intelfsh8_device { public: - fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29dl164bd_device : public intelfsh8_device { public: - fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29lv002tc_device : public intelfsh8_device { public: - fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29lv800b_device : public intelfsh16_device { public: - fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class atmel_29c010_device : public intelfsh8_device { public: - atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f010_device : public intelfsh8_device { public: - amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f040_device : public intelfsh8_device { public: - amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f080_device : public intelfsh8_device { public: - amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f400t_device : public intelfsh8_device { public: - amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f800t_device : public intelfsh8_device { public: - amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f800b_16bit_device : public intelfsh16_device { public: - amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29lv200t_device : public intelfsh8_device { public: - amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f016s_device : public intelfsh8_device { public: - sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f016s_16bit_device : public intelfsh16_device { public: - sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_e28f008sa_device : public intelfsh8_device { public: - intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class macronix_29f008tc_device : public intelfsh8_device @@ -256,128 +256,128 @@ public: class macronix_29l001mc_device : public intelfsh8_device { public: - macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class macronix_29lv160tmc_device : public intelfsh8_device { public: - macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class panasonic_mn63f805mnp_device : public intelfsh8_device { public: - panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sanyo_le26fv10n1ts_device : public intelfsh8_device { public: - sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_28sf040_device : public intelfsh8_device { public: - sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_39sf040_device : public intelfsh8_device { public: - sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_39vf020_device : public intelfsh8_device { public: - sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_49lf020_device : public intelfsh8_device { public: - sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class tms_29f040_device : public intelfsh8_device { public: - tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // 16-bit variants class sharp_lh28f400_device : public intelfsh16_device { public: - sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_te28f160_device : public intelfsh16_device { public: - intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f160s3_device : public intelfsh16_device { public: - sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_te28f320_device : public intelfsh16_device { public: - intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class spansion_s29gl064s_device : public intelfsh16_device { public: - spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_e28f400b_device : public intelfsh16_device { public: - intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f320bf_device : public intelfsh16_device { public: - sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_28f320j3d_device : public intelfsh16_device { public: - intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_28f320j5_device : public intelfsh16_device { public: - intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_39vf400a_device : public intelfsh16_device { public: - sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class atmel_49f4096_device : public intelfsh16_device { public: - atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class cat28f020_device : public intelfsh8_device { public: - cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/iopcdvd.cpp b/src/devices/machine/iopcdvd.cpp index a2938c4be35..3ab5d8dee52 100644 --- a/src/devices/machine/iopcdvd.cpp +++ b/src/devices/machine/iopcdvd.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_CDVD, iop_cdvd_device, "iopcdvd", "PlayStation 2 disc /*static*/ const size_t iop_cdvd_device::BUFFER_SIZE = 16; // Total guess -iop_cdvd_device::iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_cdvd_device::iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_CDVD, tag, owner, clock) , m_intc(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/iopcdvd.h b/src/devices/machine/iopcdvd.h index 194933eb3d9..15717da7612 100644 --- a/src/devices/machine/iopcdvd.h +++ b/src/devices/machine/iopcdvd.h @@ -21,12 +21,12 @@ class iop_cdvd_device : public device_t public: template iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&intc_tag) - : iop_cdvd_device(mconfig, tag, owner, (uint32_t)0) + : iop_cdvd_device(mconfig, tag, owner) { m_intc.set_tag(std::forward(intc_tag)); } - iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~iop_cdvd_device() override; uint8_t read(offs_t offset); diff --git a/src/devices/machine/iopdma.cpp b/src/devices/machine/iopdma.cpp index 784bc16b515..cc9d0ad9603 100644 --- a/src/devices/machine/iopdma.cpp +++ b/src/devices/machine/iopdma.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_DMA, iop_dma_device, "iopdma", "PlayStation 2 IOP DMAC") -iop_dma_device::iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_dma_device::iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_DMA, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_intc(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/iopdma.h b/src/devices/machine/iopdma.h index 2e84ec44aaa..7bc7252c1de 100644 --- a/src/devices/machine/iopdma.h +++ b/src/devices/machine/iopdma.h @@ -23,7 +23,7 @@ class iop_dma_device : public device_t, public device_execute_interface { public: template - iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&intc_tag, U &&ram_tag, V &&sif_tag, W &&spu_tag, X &&sio2_tag) + iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&intc_tag, U &&ram_tag, V &&sif_tag, W &&spu_tag, X &&sio2_tag) : iop_dma_device(mconfig, tag, owner, clock) { m_intc.set_tag(std::forward(intc_tag)); @@ -33,7 +33,7 @@ public: m_sio2.set_tag(std::forward(sio2_tag)); } - iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~iop_dma_device() override; uint32_t bank0_r(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/iopintc.cpp b/src/devices/machine/iopintc.cpp index 15e57e00608..373b6a3e774 100644 --- a/src/devices/machine/iopintc.cpp +++ b/src/devices/machine/iopintc.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_INTC, iop_intc_device, "iopintc", "PlayStation 2 IOP INTC") -iop_intc_device::iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_intc_device::iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_INTC, tag, owner, clock) , m_iop(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/iopintc.h b/src/devices/machine/iopintc.h index 5ead2c505fe..c41c61ff6fd 100644 --- a/src/devices/machine/iopintc.h +++ b/src/devices/machine/iopintc.h @@ -21,12 +21,12 @@ class iop_intc_device : public device_t public: template iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&iop_tag) - : iop_intc_device(mconfig, tag, owner, (uint32_t)0) + : iop_intc_device(mconfig, tag, owner) { m_iop.set_tag(std::forward(iop_tag)); } - iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~iop_intc_device() override; uint32_t read(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/iopsio2.cpp b/src/devices/machine/iopsio2.cpp index c5b6de09546..84a60623e57 100644 --- a/src/devices/machine/iopsio2.cpp +++ b/src/devices/machine/iopsio2.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_SIO2, iop_sio2_device, "iopsio2", "PlayStation 2 IOP /*static*/ const size_t iop_sio2_device::BUFFER_SIZE = 512; // total guess based on memcard block size -iop_sio2_device::iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_sio2_device::iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_SIO2, tag, owner, clock) , m_intc(*this, finder_base::DUMMY_TAG) , m_pad0(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/iopsio2.h b/src/devices/machine/iopsio2.h index 67fc395b6f3..7192b7efe2a 100644 --- a/src/devices/machine/iopsio2.h +++ b/src/devices/machine/iopsio2.h @@ -23,7 +23,7 @@ class iop_sio2_device : public device_t public: template iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&intc_tag, U &&pad0_tag, V &&pad1_tag, W &&mc0_tag) - : iop_sio2_device(mconfig, tag, owner, (uint32_t)0) + : iop_sio2_device(mconfig, tag, owner) { m_intc.set_tag(std::forward(intc_tag)); m_pad0.set_tag(std::forward(pad0_tag)); @@ -31,7 +31,7 @@ public: m_mc0.set_tag(std::forward(mc0_tag)); } - iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~iop_sio2_device() override; uint32_t read(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/ioptimer.cpp b/src/devices/machine/ioptimer.cpp index 54864a00901..292922132f1 100644 --- a/src/devices/machine/ioptimer.cpp +++ b/src/devices/machine/ioptimer.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_TIMER, iop_timer_device, "ioptimer", "PlayStation 2 IOP timer") -iop_timer_device::iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_timer_device::iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_TIMER, tag, owner, clock) , m_compare_timer(nullptr) , m_overflow_timer(nullptr) diff --git a/src/devices/machine/ioptimer.h b/src/devices/machine/ioptimer.h index a7c4891b9dc..2cf4ca928e5 100644 --- a/src/devices/machine/ioptimer.h +++ b/src/devices/machine/ioptimer.h @@ -17,7 +17,7 @@ class iop_timer_device : public device_t { public: - iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_int_cb.bind(); } diff --git a/src/devices/machine/iwm.cpp b/src/devices/machine/iwm.cpp index b52c01eec83..1db70c91ecb 100644 --- a/src/devices/machine/iwm.cpp +++ b/src/devices/machine/iwm.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(IWM, iwm_device, "iwm", "Apple IWM floppy controller") -iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock) : +iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t q3_clock) : applefdintf_device(mconfig, IWM, tag, owner, clock), m_floppy(nullptr), m_q3_clock(q3_clock) diff --git a/src/devices/machine/iwm.h b/src/devices/machine/iwm.h index 73045890d0d..c24d2677c06 100644 --- a/src/devices/machine/iwm.h +++ b/src/devices/machine/iwm.h @@ -22,8 +22,8 @@ class iwm_device: public applefdintf_device { public: // construction/destruction - iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock = 0); - iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, XTAL q3_clock) : + iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t q3_clock = 0); + iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, XTAL q3_clock) : iwm_device(mconfig, tag, owner, clock, q3_clock.value()) {} virtual u8 read(offs_t offset) override; diff --git a/src/devices/machine/jvsdev.cpp b/src/devices/machine/jvsdev.cpp index f55a836cd01..650c98e279e 100644 --- a/src/devices/machine/jvsdev.cpp +++ b/src/devices/machine/jvsdev.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "jvsdev.h" -jvs_device::jvs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +jvs_device::jvs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), jvs_outputs(0), host(*this, finder_base::DUMMY_TAG), jvs_address(0), jvs_reset_counter(0) { next_device = nullptr; diff --git a/src/devices/machine/jvsdev.h b/src/devices/machine/jvsdev.h index f7dba299c97..768cd30ef40 100644 --- a/src/devices/machine/jvsdev.h +++ b/src/devices/machine/jvsdev.h @@ -19,7 +19,7 @@ protected: void handle_output(ioport_port *port, uint8_t id, uint8_t val); - jvs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + jvs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/jvshost.cpp b/src/devices/machine/jvshost.cpp index 1f720b4fa00..75e4f49a8d1 100644 --- a/src/devices/machine/jvshost.cpp +++ b/src/devices/machine/jvshost.cpp @@ -29,7 +29,7 @@ void jvs_host::device_reset() memset(recv_buffer, 0, sizeof(recv_buffer)); } -jvs_host::jvs_host(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +jvs_host::jvs_host(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), send_size(0), recv_size(0), recv_is_encoded(false) { first_device = nullptr; diff --git a/src/devices/machine/jvshost.h b/src/devices/machine/jvshost.h index c0f8429a1a3..674bdb0afbc 100644 --- a/src/devices/machine/jvshost.h +++ b/src/devices/machine/jvshost.h @@ -13,7 +13,7 @@ public: void add_device(jvs_device *dev); protected: - jvs_host(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + jvs_host(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/k033906.cpp b/src/devices/machine/k033906.cpp index 5ffad3b74eb..d0afff12b2d 100644 --- a/src/devices/machine/k033906.cpp +++ b/src/devices/machine/k033906.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(K033906, k033906_device, "k033906", "K033906 PCI bridge") // k033906_device - constructor //------------------------------------------------- -k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K033906, tag, owner, clock) , m_reg_set(0) , m_voodoo(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/k033906.h b/src/devices/machine/k033906.h index 21187ad0541..8cae9f3c46e 100644 --- a/src/devices/machine/k033906.h +++ b/src/devices/machine/k033906.h @@ -18,13 +18,13 @@ class k033906_device : public device_t public: // construction/destruction template - k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&voodoo_tag) - : k033906_device(mconfig, tag, owner, clock) + k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&voodoo_tag) + : k033906_device(mconfig, tag, owner) { m_voodoo.set_tag(std::forward(voodoo_tag)); } - k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u32 read(offs_t offset); void write(offs_t offset, u32 data); diff --git a/src/devices/machine/k053252.cpp b/src/devices/machine/k053252.cpp index 6972d0f5c96..f08dc1f71d8 100644 --- a/src/devices/machine/k053252.cpp +++ b/src/devices/machine/k053252.cpp @@ -65,7 +65,7 @@ TODO: DEFINE_DEVICE_TYPE(K053252, k053252_device, "k053252", "K053252 Timing/Interrupt Controller") -k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053252, tag, owner, clock) , device_video_interface(mconfig, *this) , m_int1_en_cb(*this) diff --git a/src/devices/machine/k053252.h b/src/devices/machine/k053252.h index fec683df1da..f40442682d4 100644 --- a/src/devices/machine/k053252.h +++ b/src/devices/machine/k053252.h @@ -12,7 +12,7 @@ class k053252_device : public device_t, public device_video_interface { public: - k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int1_en() { return m_int1_en_cb.bind(); } auto int2_en() { return m_int2_en_cb.bind(); } diff --git a/src/devices/machine/k054321.cpp b/src/devices/machine/k054321.cpp index 6a362f655b2..b9404d056b2 100644 --- a/src/devices/machine/k054321.cpp +++ b/src/devices/machine/k054321.cpp @@ -57,7 +57,7 @@ void k054321_device::sound_map(address_map &map) map(0x3, 0x3).r(m_soundlatch[1], FUNC(generic_latch_8_device::read)); } -k054321_device::k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k054321_device::k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K054321, tag, owner, clock), m_left(*this, finder_base::DUMMY_TAG), m_right(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/machine/k054321.h b/src/devices/machine/k054321.h index 6c66659372d..450001659bc 100644 --- a/src/devices/machine/k054321.h +++ b/src/devices/machine/k054321.h @@ -13,13 +13,13 @@ class k054321_device : public device_t public: template k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&left, U &&right) : - k054321_device(mconfig, tag, owner, 0) + k054321_device(mconfig, tag, owner) { m_left.set_tag(std::forward(left)); m_right.set_tag(std::forward(right)); } - k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void main_map(address_map &map); void sound_map(address_map &map); diff --git a/src/devices/machine/k056230.cpp b/src/devices/machine/k056230.cpp index 7a401c83def..176667e7680 100644 --- a/src/devices/machine/k056230.cpp +++ b/src/devices/machine/k056230.cpp @@ -33,7 +33,7 @@ TODO: nearly everything DEFINE_DEVICE_TYPE(K056230, k056230_device, "k056230", "K056230 LANC") -k056230_device::k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k056230_device::k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K056230, tag, owner, clock) , m_ram(*this, "lanc_ram", 0x800U * 4, ENDIANNESS_BIG) , m_irq_cb(*this) diff --git a/src/devices/machine/k056230.h b/src/devices/machine/k056230.h index 7df76c26e53..18cc46ec3fc 100644 --- a/src/devices/machine/k056230.h +++ b/src/devices/machine/k056230.h @@ -15,7 +15,7 @@ class k056230_device : public device_t { public: // construction/destruction - k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return m_irq_cb.bind(); } diff --git a/src/devices/machine/kb3600.cpp b/src/devices/machine/kb3600.cpp index 9be5846e0c8..290b98e758b 100644 --- a/src/devices/machine/kb3600.cpp +++ b/src/devices/machine/kb3600.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(AY3600, ay3600_device, "ay3600", "AY-5-3600 Keyboard Encoder" // ay3600_device - constructor //------------------------------------------------- -ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AY3600, tag, owner, clock), m_read_x0(*this), m_read_x1(*this), diff --git a/src/devices/machine/kb3600.h b/src/devices/machine/kb3600.h index c65bbea3a6f..c1a663c2f5c 100644 --- a/src/devices/machine/kb3600.h +++ b/src/devices/machine/kb3600.h @@ -60,7 +60,7 @@ class ay3600_device : public device_t { public: // construction/destruction - ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interface uint16_t b_r(); diff --git a/src/devices/machine/keyboard.cpp b/src/devices/machine/keyboard.cpp index eac7263c82c..b11e6c6f6cd 100644 --- a/src/devices/machine/keyboard.cpp +++ b/src/devices/machine/keyboard.cpp @@ -11,7 +11,7 @@ Example of usage in a driver. In the machine config function: - generic_keyboard_device &kbd(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &kbd(GENERIC_KEYBOARD(config, KEYBOARD_TAG)); kbd.set_keyboard_callback(FUNC(xxx_state::kbd_put)); In the code: @@ -251,7 +251,7 @@ generic_keyboard_device::generic_keyboard_device( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "GENKBD_ROW0", "GENKBD_ROW1", "GENKBD_ROW2", "GENKBD_ROW3") , m_config(*this, "GENKBD_CFG") @@ -262,7 +262,7 @@ generic_keyboard_device::generic_keyboard_device( } -generic_keyboard_device::generic_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +generic_keyboard_device::generic_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : generic_keyboard_device(mconfig, GENERIC_KEYBOARD, tag, owner, clock) { } diff --git a/src/devices/machine/keyboard.h b/src/devices/machine/keyboard.h index 2b4f32e856f..e2364eef3a6 100644 --- a/src/devices/machine/keyboard.h +++ b/src/devices/machine/keyboard.h @@ -77,7 +77,7 @@ public: const machine_config &mconfig, const char *tag, device_t *owner, - u32 clock); + const XTAL &clock); template void set_keyboard_callback(T &&... args) @@ -93,7 +93,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; virtual void key_make(u8 row, u8 column) override; diff --git a/src/devices/machine/kr1601rr1.cpp b/src/devices/machine/kr1601rr1.cpp index 561d3f212db..a88a73eab91 100644 --- a/src/devices/machine/kr1601rr1.cpp +++ b/src/devices/machine/kr1601rr1.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(KR1601RR1, kr1601rr1_device, "kr1601rr1", "KR1601RR1 EAROM") // ctor //------------------------------------------------- -kr1601rr1_device::kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kr1601rr1_device::kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KR1601RR1, tag, owner, clock) , device_nvram_interface(mconfig, *this) { diff --git a/src/devices/machine/kr1601rr1.h b/src/devices/machine/kr1601rr1.h index 49837e42c32..41b71e2201c 100644 --- a/src/devices/machine/kr1601rr1.h +++ b/src/devices/machine/kr1601rr1.h @@ -43,7 +43,7 @@ class kr1601rr1_device : public device_t, public device_nvram_interface { public: // construction/destruction - kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/kr2376.cpp b/src/devices/machine/kr2376.cpp index af0abb4169d..f3bf0b860b5 100644 --- a/src/devices/machine/kr2376.cpp +++ b/src/devices/machine/kr2376.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(KR2376_ST, kr2376_st_device, "kr2376_st", "SMC KR2376-ST Keyboard Encoder") DEFINE_DEVICE_TYPE(KR2376_12, kr2376_12_device, "kr2376_12", "SMC KR2376-12 Keyboard Encoder") -kr2376_device::kr2376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +kr2376_device::kr2376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_read_x(*this), m_read_shift(*this), @@ -22,7 +22,7 @@ kr2376_device::kr2376_device(const machine_config &mconfig, device_type type, co { } -kr2376_st_device::kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kr2376_st_device::kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kr2376_device(mconfig, KR2376_ST, tag, owner, clock) { } @@ -85,7 +85,7 @@ uint8_t kr2376_st_device::key_codes(int mode, int x, int y) return KEY_CODES[mode][x][y]; } -kr2376_12_device::kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kr2376_12_device::kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kr2376_device(mconfig, KR2376_12, tag, owner, clock) { } diff --git a/src/devices/machine/kr2376.h b/src/devices/machine/kr2376.h index 2345ade8c5e..4f7fc9cc739 100644 --- a/src/devices/machine/kr2376.h +++ b/src/devices/machine/kr2376.h @@ -52,7 +52,7 @@ public: KR2376_PO=7 /* PO - Pin 7 - Parity Output */ }; - kr2376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + kr2376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template auto x() { return m_read_x[N].bind(); } auto shift() { return m_read_shift.bind(); } @@ -101,7 +101,7 @@ private: class kr2376_st_device : public kr2376_device { public: - kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t key_codes(int mode, int x, int y) override; }; @@ -109,7 +109,7 @@ protected: class kr2376_12_device : public kr2376_device { public: - kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t key_codes(int mode, int x, int y) override; }; diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp index 4184e3e7677..2d572b162ce 100644 --- a/src/devices/machine/laserdsc.cpp +++ b/src/devices/machine/laserdsc.cpp @@ -62,7 +62,7 @@ ALLOW_SAVE_TYPE(laserdisc_device::slider_position); // laserdisc_device - constructor //------------------------------------------------- -laserdisc_device::laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +laserdisc_device::laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), device_video_interface(mconfig, *this), @@ -332,7 +332,7 @@ void laserdisc_device::device_stop() void laserdisc_device::device_reset() { // attempt to wire up the audio - m_stream->set_sample_rate(m_samplerate); + m_stream->set_sample_rate(XTAL::u(m_samplerate)); // set up the general ld m_audiosquelch = 3; @@ -856,7 +856,7 @@ void laserdisc_device::init_audio() m_audio_callback.resolve(); // allocate a stream - m_stream = stream_alloc(0, 2, 48000); + m_stream = stream_alloc(0, 2, XTAL::u(48000)); // allocate audio buffers m_audiomaxsamples = ((uint64_t)m_samplerate * 1000000 + m_fps_times_1million - 1) / m_fps_times_1million; diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h index abc536a3be0..eaaeb8f1de1 100644 --- a/src/devices/machine/laserdsc.h +++ b/src/devices/machine/laserdsc.h @@ -101,7 +101,7 @@ public: typedef device_delegate get_disc_delegate; typedef device_delegate audio_delegate; - laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // use these to add laserdisc screens with proper video update parameters // TODO: actually move these SCREEN_RAW_PARAMS to a common screen info header diff --git a/src/devices/machine/latch8.cpp b/src/devices/machine/latch8.cpp index bfccdc48a30..4c91c81ec64 100644 --- a/src/devices/machine/latch8.cpp +++ b/src/devices/machine/latch8.cpp @@ -99,7 +99,7 @@ void latch8_device::bit7_w(offs_t offset, uint8_t data) { bitx_w<7>(offset, data DEFINE_DEVICE_TYPE(LATCH8, latch8_device, "latch8", "8-bit latch") -latch8_device::latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +latch8_device::latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LATCH8, tag, owner, clock) , m_write_cb(*this) , m_read_cb(*this) diff --git a/src/devices/machine/latch8.h b/src/devices/machine/latch8.h index 0609d3949ff..0fb58c14d5e 100644 --- a/src/devices/machine/latch8.h +++ b/src/devices/machine/latch8.h @@ -22,7 +22,7 @@ class latch8_device : public device_t { public: - latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // Write bit to discrete node template auto write_cb() { return m_write_cb[N].bind(); } diff --git a/src/devices/machine/lc89510.cpp b/src/devices/machine/lc89510.cpp index 649dc01ea8d..7b24e58dc1e 100644 --- a/src/devices/machine/lc89510.cpp +++ b/src/devices/machine/lc89510.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(LC89510, lc89510_device, "lc89510", "LC89510 CD Controller") -lc89510_device::lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lc89510_device::lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LC89510, tag, owner, clock) { } diff --git a/src/devices/machine/lc89510.h b/src/devices/machine/lc89510.h index 4282654136c..956d55c65a9 100644 --- a/src/devices/machine/lc89510.h +++ b/src/devices/machine/lc89510.h @@ -8,7 +8,7 @@ class lc89510_device : public device_t { public: - lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/ldp1000.cpp b/src/devices/machine/ldp1000.cpp index 42f8cb796fe..04aa4e23bcf 100644 --- a/src/devices/machine/ldp1000.cpp +++ b/src/devices/machine/ldp1000.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(SONY_LDP1000, sony_ldp1000_device, "ldp1000", "Sony LDP-1000" // sony_ldp1000_device - constructor //------------------------------------------------- -sony_ldp1000_device::sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sony_ldp1000_device::sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, SONY_LDP1000, tag, owner, clock) { } diff --git a/src/devices/machine/ldp1000.h b/src/devices/machine/ldp1000.h index 2fd79a6a6fc..c112d6cd9c2 100644 --- a/src/devices/machine/ldp1000.h +++ b/src/devices/machine/ldp1000.h @@ -27,7 +27,7 @@ class sony_ldp1000_device : public laserdisc_device { public: // construction/destruction - sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations TODO: both actually protected void command_w(uint8_t data); diff --git a/src/devices/machine/ldp1450.cpp b/src/devices/machine/ldp1450.cpp index 2b4d037cab4..2069ec78b92 100644 --- a/src/devices/machine/ldp1450.cpp +++ b/src/devices/machine/ldp1450.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(SONY_LDP1450, sony_ldp1450_device, "ldp1450", "Sony LDP-1450" // sony_ldp1450_device - constructor //------------------------------------------------- -sony_ldp1450_device::sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sony_ldp1450_device::sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, SONY_LDP1450, tag, owner, clock) { } diff --git a/src/devices/machine/ldp1450.h b/src/devices/machine/ldp1450.h index 67a429845e1..e57f34096a3 100644 --- a/src/devices/machine/ldp1450.h +++ b/src/devices/machine/ldp1450.h @@ -27,7 +27,7 @@ class sony_ldp1450_device : public laserdisc_device { public: // construction/destruction - sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations TODO: both actually protected void command_w(uint8_t data); diff --git a/src/devices/machine/ldpr8210.cpp b/src/devices/machine/ldpr8210.cpp index a51d84b19ea..df6c3bb4661 100644 --- a/src/devices/machine/ldpr8210.cpp +++ b/src/devices/machine/ldpr8210.cpp @@ -168,12 +168,12 @@ ROM_END // pioneer_pr8210_device - constructor //------------------------------------------------- -pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pioneer_pr8210_device(mconfig, PIONEER_PR8210, tag, owner, clock) { } -pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, type, tag, owner, clock), m_audio1(*this, "pr8210_audio1"), m_audio2(*this, "pr8210_audio2"), @@ -884,7 +884,7 @@ ROM_END // simutrek_special_device - constructor //------------------------------------------------- -simutrek_special_device::simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +simutrek_special_device::simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pioneer_pr8210_device(mconfig, SIMUTREK_SPECIAL, tag, owner, clock), m_i8748_cpu(*this, "simutrek"), m_audio_squelch(0), diff --git a/src/devices/machine/ldpr8210.h b/src/devices/machine/ldpr8210.h index 4bc4615c03c..822ca332830 100644 --- a/src/devices/machine/ldpr8210.h +++ b/src/devices/machine/ldpr8210.h @@ -38,13 +38,13 @@ class pioneer_pr8210_device : public laserdisc_device { public: // construction/destruction - pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // input and output void control_w(uint8_t data); protected: - pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -139,7 +139,7 @@ class simutrek_special_device : public pioneer_pr8210_device { public: // construction/destruction - simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input and output void data_w(uint8_t data); diff --git a/src/devices/machine/ldstub.cpp b/src/devices/machine/ldstub.cpp index c0c9a7ac05a..38d5560d67a 100644 --- a/src/devices/machine/ldstub.cpp +++ b/src/devices/machine/ldstub.cpp @@ -21,13 +21,13 @@ DEFINE_DEVICE_TYPE(PIONEER_PR7820, pioneer_pr7820_device, "pr7820", "Pioneer DEFINE_DEVICE_TYPE(PHILIPS_22VP932, philips_22vp932_device, "22vp932", "Philips 22VP932") -pioneer_pr7820_device::pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_pr7820_device::pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PIONEER_PR7820, tag, owner, clock) { } -philips_22vp932_device::philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +philips_22vp932_device::philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PHILIPS_22VP932, tag, owner, clock) { } diff --git a/src/devices/machine/ldstub.h b/src/devices/machine/ldstub.h index 9fbc756b240..931ee29d600 100644 --- a/src/devices/machine/ldstub.h +++ b/src/devices/machine/ldstub.h @@ -35,7 +35,7 @@ class pioneer_pr7820_device : public laserdisc_device { public: // construction/destruction - pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input/output uint8_t data_available_r() { return CLEAR_LINE; } @@ -58,7 +58,7 @@ class philips_22vp932_device : public laserdisc_device { public: // construction/destruction - philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input/output uint8_t data_r() { return 0; } diff --git a/src/devices/machine/ldv1000.cpp b/src/devices/machine/ldv1000.cpp index 2f382271aaf..82fd1663439 100644 --- a/src/devices/machine/ldv1000.cpp +++ b/src/devices/machine/ldv1000.cpp @@ -101,7 +101,7 @@ ROM_END // pioneer_ldv1000_device - constructor //------------------------------------------------- -pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PIONEER_LDV1000, tag, owner, clock), m_z80_cpu(*this, "ldv1000"), m_z80_ctc(*this, "ldvctc"), diff --git a/src/devices/machine/ldv1000.h b/src/devices/machine/ldv1000.h index a4ffa12f5b2..7402a68f7b9 100644 --- a/src/devices/machine/ldv1000.h +++ b/src/devices/machine/ldv1000.h @@ -39,7 +39,7 @@ class pioneer_ldv1000_device : public laserdisc_device { public: // construction/destruction - pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto command_strobe_callback() { return m_command_strobe_cb.bind(); } diff --git a/src/devices/machine/ldv4200hle.cpp b/src/devices/machine/ldv4200hle.cpp index 577e236fa63..5df5f6965b5 100644 --- a/src/devices/machine/ldv4200hle.cpp +++ b/src/devices/machine/ldv4200hle.cpp @@ -65,7 +65,7 @@ DEFINE_DEVICE_TYPE(PIONEER_LDV4200HLE, pioneer_ldv4200hle_device, "ldv4200hle", // pioneer_ldv4200hle_device - constructor //------------------------------------------------- -pioneer_ldv4200hle_device::pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_ldv4200hle_device::pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PIONEER_LDV4200HLE, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_serial_tx(*this) diff --git a/src/devices/machine/ldv4200hle.h b/src/devices/machine/ldv4200hle.h index c7ee5738e2a..cf0f77989b8 100644 --- a/src/devices/machine/ldv4200hle.h +++ b/src/devices/machine/ldv4200hle.h @@ -46,7 +46,7 @@ class pioneer_ldv4200hle_device : public laserdisc_device, public device_serial_ { public: // construction/destruction - pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto serial_tx() { return m_serial_tx.bind(); } diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp index 012d23591fb..3a6ee4f2709 100644 --- a/src/devices/machine/ldvp931.cpp +++ b/src/devices/machine/ldvp931.cpp @@ -77,7 +77,7 @@ ROM_END // philips_22vp931_device - constructor //------------------------------------------------- -philips_22vp931_device::philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +philips_22vp931_device::philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PHILIPS_22VP931, tag, owner, clock), m_i8049_cpu(*this, "vp931"), m_process_vbi_timer(nullptr), diff --git a/src/devices/machine/ldvp931.h b/src/devices/machine/ldvp931.h index cffc81cc9dc..7a7aea09875 100644 --- a/src/devices/machine/ldvp931.h +++ b/src/devices/machine/ldvp931.h @@ -40,7 +40,7 @@ public: typedef delegate data_ready_delegate; // construction/destruction - philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input and output void data_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(philips_22vp931_device::process_deferred_data), this), data); } diff --git a/src/devices/machine/legscsi.cpp b/src/devices/machine/legscsi.cpp index c379c797f73..1807fc684c0 100644 --- a/src/devices/machine/legscsi.cpp +++ b/src/devices/machine/legscsi.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "legscsi.h" -legacy_scsi_host_adapter::legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +legacy_scsi_host_adapter::legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_selected(0) , m_scsi_port(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/legscsi.h b/src/devices/machine/legscsi.h index 229580bc0bf..ad9459fb6a2 100644 --- a/src/devices/machine/legscsi.h +++ b/src/devices/machine/legscsi.h @@ -14,7 +14,7 @@ public: template void set_scsi_port(T && tag) { m_scsi_port.set_tag(std::forward(tag)); } protected: - legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; diff --git a/src/devices/machine/lh5810.cpp b/src/devices/machine/lh5810.cpp index 054a532dff0..a37bc10cbda 100644 --- a/src/devices/machine/lh5810.cpp +++ b/src/devices/machine/lh5810.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(LH5810, lh5810_device, "lh5810", "LH5810 I/O Port") // lh5810_device - constructor //------------------------------------------------- -lh5810_device::lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lh5810_device::lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LH5810, tag, owner, clock) , m_porta_r_cb(*this) , m_porta_w_cb(*this) diff --git a/src/devices/machine/lh5810.h b/src/devices/machine/lh5810.h index a383d0047eb..16e3a573506 100644 --- a/src/devices/machine/lh5810.h +++ b/src/devices/machine/lh5810.h @@ -15,7 +15,7 @@ class lh5810_device : public device_t { public: // construction/destruction - lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto porta_r() { return m_porta_r_cb.bind(); } auto porta_w() { return m_porta_w_cb.bind(); } diff --git a/src/devices/machine/linflash.cpp b/src/devices/machine/linflash.cpp index 25b5257dd0b..149ad07e3a0 100644 --- a/src/devices/machine/linflash.cpp +++ b/src/devices/machine/linflash.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(LINEAR_FLASH_PCCARD_32MB, linear_flash_pccard_32mb_device, "l DEFINE_DEVICE_TYPE(LINEAR_FLASH_PCCARD_64MB, linear_flash_pccard_64mb_device, "linearflash64mb", "Linear Flash PC Card (64MB)") -linear_flash_pccard_device::linear_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_device::linear_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_pccard_interface(mconfig, *this), device_memory_interface(mconfig, *this), @@ -53,7 +53,7 @@ void linear_flash_pccard_16mb_device::linear_flash_pccard_16mb(address_map &map) map(0x00c00000, 0x00ffffff).rw("4u", FUNC(intelfsh8_device::read), FUNC(intelfsh8_device::write)).umask16(0xff00); } -linear_flash_pccard_16mb_device::linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_16mb_device::linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_16MB, tag, owner, clock) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, address_map_constructor(FUNC(linear_flash_pccard_16mb_device::linear_flash_pccard_16mb), this)); @@ -93,7 +93,7 @@ void linear_flash_pccard_32mb_device::linear_flash_pccard_32mb(address_map &map) map(0x01c00000, 0x01ffffff).rw("8u", FUNC(intelfsh8_device::read), FUNC(intelfsh8_device::write)).umask16(0xff00); } -linear_flash_pccard_32mb_device::linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_32mb_device::linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_32MB, tag, owner, clock) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, address_map_constructor(FUNC(linear_flash_pccard_32mb_device::linear_flash_pccard_32mb), this)); @@ -157,7 +157,7 @@ void linear_flash_pccard_64mb_device::linear_flash_pccard_64mb(address_map &map) map(0x03c00000, 0x03ffffff).rw("16u", FUNC(intelfsh8_device::read), FUNC(intelfsh8_device::write)).umask16(0xff00); } -linear_flash_pccard_64mb_device::linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_64mb_device::linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_64MB, tag, owner, clock) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, address_map_constructor(FUNC(linear_flash_pccard_64mb_device::linear_flash_pccard_64mb), this)); diff --git a/src/devices/machine/linflash.h b/src/devices/machine/linflash.h index 20f4559e98d..bbb1d6fc821 100644 --- a/src/devices/machine/linflash.h +++ b/src/devices/machine/linflash.h @@ -17,7 +17,7 @@ public: virtual void write_memory(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; protected: - linear_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -33,7 +33,7 @@ protected: class linear_flash_pccard_16mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -47,7 +47,7 @@ private: class linear_flash_pccard_32mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -61,7 +61,7 @@ private: class linear_flash_pccard_64mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/machine/locomo.cpp b/src/devices/machine/locomo.cpp index 01cae8787ce..f888e1c1c70 100644 --- a/src/devices/machine/locomo.cpp +++ b/src/devices/machine/locomo.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(LOCOMO, locomo_device, "locomo", "Sharp LoCoMo Peripheral") -locomo_device::locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +locomo_device::locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LOCOMO, tag, owner, clock) { } diff --git a/src/devices/machine/locomo.h b/src/devices/machine/locomo.h index ac240959d9f..d143a2e06ea 100644 --- a/src/devices/machine/locomo.h +++ b/src/devices/machine/locomo.h @@ -14,7 +14,7 @@ class locomo_device : public device_t { public: - locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t read(offs_t offset, uint32_t mem_mask = ~0U); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0U); diff --git a/src/devices/machine/lpc-acpi.cpp b/src/devices/machine/lpc-acpi.cpp index b252ffd2c3b..0ee555ce1ae 100644 --- a/src/devices/machine/lpc-acpi.cpp +++ b/src/devices/machine/lpc-acpi.cpp @@ -38,7 +38,7 @@ void lpc_acpi_device::map(address_map &map) map(0x70, 0x70).rw(FUNC(lpc_acpi_device::sw_irq_gen_r), FUNC(lpc_acpi_device::sw_irq_gen_w)); } -lpc_acpi_device::lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lpc_acpi_device::lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lpc_device(mconfig, LPC_ACPI, tag, owner, clock) { } diff --git a/src/devices/machine/lpc-acpi.h b/src/devices/machine/lpc-acpi.h index 1cd64636a10..2e21c7d1ad0 100644 --- a/src/devices/machine/lpc-acpi.h +++ b/src/devices/machine/lpc-acpi.h @@ -9,7 +9,7 @@ class lpc_acpi_device : public lpc_device { public: - lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_device(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; diff --git a/src/devices/machine/lpc-pit.cpp b/src/devices/machine/lpc-pit.cpp index e15f1893045..3c18f762be7 100644 --- a/src/devices/machine/lpc-pit.cpp +++ b/src/devices/machine/lpc-pit.cpp @@ -13,7 +13,7 @@ void lpc_pit_device::map(address_map &map) map(0x53, 0x53).w(FUNC(lpc_pit_device::control_w)); } -lpc_pit_device::lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lpc_pit_device::lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lpc_device(mconfig, LPC_PIT, tag, owner, clock) { } diff --git a/src/devices/machine/lpc-pit.h b/src/devices/machine/lpc-pit.h index aa83b6af5ce..cbba7788a1e 100644 --- a/src/devices/machine/lpc-pit.h +++ b/src/devices/machine/lpc-pit.h @@ -9,7 +9,7 @@ class lpc_pit_device : public lpc_device { public: - lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_device(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; diff --git a/src/devices/machine/lpc-rtc.cpp b/src/devices/machine/lpc-rtc.cpp index e584d96cd6c..3c65efb66c2 100644 --- a/src/devices/machine/lpc-rtc.cpp +++ b/src/devices/machine/lpc-rtc.cpp @@ -17,7 +17,7 @@ void lpc_rtc_device::extmap(address_map &map) map(0x70, 0x77).rw(FUNC(lpc_rtc_device::exttarget_r), FUNC(lpc_rtc_device::exttarget_w)).umask32(0xff000000); } -lpc_rtc_device::lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lpc_rtc_device::lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lpc_device(mconfig, LPC_RTC, tag, owner, clock), cur_index(0), cur_extindex(0) { } diff --git a/src/devices/machine/lpc-rtc.h b/src/devices/machine/lpc-rtc.h index 5243bcf7f8a..c59ac5827a5 100644 --- a/src/devices/machine/lpc-rtc.h +++ b/src/devices/machine/lpc-rtc.h @@ -9,7 +9,7 @@ class lpc_rtc_device : public lpc_device { public: - lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_device(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; diff --git a/src/devices/machine/lpci.cpp b/src/devices/machine/lpci.cpp index 44b8b84bf3d..836915a776f 100644 --- a/src/devices/machine/lpci.cpp +++ b/src/devices/machine/lpci.cpp @@ -91,7 +91,7 @@ DEFINE_DEVICE_TYPE(PCI_BUS_LEGACY, pci_bus_legacy_device, "pci_bus_legacy", "PCI //------------------------------------------------- // pci_bus_legacy_device - constructor //------------------------------------------------- -pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCI_BUS_LEGACY, tag, owner, clock), m_read_callback(*this), m_write_callback(*this), diff --git a/src/devices/machine/lpci.h b/src/devices/machine/lpci.h index fb289d5538f..e0d1e99ac08 100644 --- a/src/devices/machine/lpci.h +++ b/src/devices/machine/lpci.h @@ -26,12 +26,12 @@ public: typedef device_delegate pci_bus_legacy_write_delegate; // construction/destruction - pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint8_t busnum) - : pci_bus_legacy_device(mconfig, tag, owner, clock) + pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint8_t busnum) + : pci_bus_legacy_device(mconfig, tag, owner) { set_busnum(busnum); } - pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t read(offs_t offset, uint32_t mem_mask = ~0); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/m3002.cpp b/src/devices/machine/m3002.cpp index 1e021571896..ccc3c2e8922 100644 --- a/src/devices/machine/m3002.cpp +++ b/src/devices/machine/m3002.cpp @@ -34,7 +34,7 @@ ALLOW_SAVE_TYPE(m3002_device::mux_state); // m3002_device - constructor //------------------------------------------------- -m3002_device::m3002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +m3002_device::m3002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , device_rtc_interface(mconfig, *this) @@ -48,7 +48,7 @@ m3002_device::m3002_device(const machine_config &mconfig, device_type type, cons std::fill_n(&m_ram[0], 0x10, 0); } -m3002_device::m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m3002_device::m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m3002_device(mconfig, M3002, tag, owner, clock) { } @@ -58,7 +58,7 @@ m3002_device::m3002_device(const machine_config &mconfig, const char *tag, devic // m3000_device - constructor //------------------------------------------------- -m3000_device::m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m3000_device::m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m3002_device(mconfig, M3000, tag, owner, clock) { } diff --git a/src/devices/machine/m3002.h b/src/devices/machine/m3002.h index b02d13429eb..04ed31b8c74 100644 --- a/src/devices/machine/m3002.h +++ b/src/devices/machine/m3002.h @@ -35,7 +35,7 @@ class m3002_device : public device_t, public device_nvram_interface, public devi { public: // device type constructor - m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_out() { return m_irq_callback.bind(); } @@ -48,7 +48,7 @@ public: DECLARE_READ_LINE_MEMBER(irq_r) { return m_irq_active ? 0 : 1; } protected: - m3002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + m3002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -105,7 +105,7 @@ class m3000_device : public m3002_device { public: // device type constructor - m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/machine/m68sfdc.cpp b/src/devices/machine/m68sfdc.cpp index 99a0b3b4580..922e0fe100a 100644 --- a/src/devices/machine/m68sfdc.cpp +++ b/src/devices/machine/m68sfdc.cpp @@ -14,7 +14,7 @@ #include "emu.h" #include "m68sfdc.h" -m68sfdc_device::m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m68sfdc_device::m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M68SFDC, tag, owner, clock), m_pia(*this, "pia"), m_ssda(*this, "ssda"), @@ -835,7 +835,7 @@ bool m68sfdc_device::pll_write_next_bit(bool bit, attotime &tm, floppy_image_dev void m68sfdc_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(m68sfdc_device::pia_pa_r)); m_pia->writepa_handler().set(FUNC(m68sfdc_device::pia_pa_w)); m_pia->ca1_w(0); @@ -847,7 +847,7 @@ void m68sfdc_device::device_add_mconfig(machine_config &config) m_pia->irqa_handler().set(FUNC(m68sfdc_device::handle_nmi)); m_pia->irqb_handler().set(FUNC(m68sfdc_device::handle_irq)); - MC6852(config, m_ssda, 0); + MC6852(config, m_ssda); } DEFINE_DEVICE_TYPE(M68SFDC, m68sfdc_device, "m68sfdc", "M68SFDC") diff --git a/src/devices/machine/m68sfdc.h b/src/devices/machine/m68sfdc.h index 605ac628583..d4d5d10608b 100644 --- a/src/devices/machine/m68sfdc.h +++ b/src/devices/machine/m68sfdc.h @@ -19,7 +19,7 @@ INPUT_PORTS_EXTERN(m68sfdc); class m68sfdc_device : public device_t { public: - m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t reg, uint8_t val); uint8_t read(offs_t reg); diff --git a/src/devices/machine/m6m80011ap.cpp b/src/devices/machine/m6m80011ap.cpp index 937f9e815e1..f4f06d398df 100644 --- a/src/devices/machine/m6m80011ap.cpp +++ b/src/devices/machine/m6m80011ap.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(M6M80011AP, m6m80011ap_device, "m6m80011ap", "M6M80011AP EEPR // m6m80011ap_device - constructor //------------------------------------------------- -m6m80011ap_device::m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6m80011ap_device::m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M6M80011AP, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_latch(0), m_reset_line(0), m_cmd_stream_pos(0), m_current_cmd(0), m_read_latch(0), m_current_addr(0), m_eeprom_we(0), m_eeprom_state() diff --git a/src/devices/machine/m6m80011ap.h b/src/devices/machine/m6m80011ap.h index c288b9da633..b8eddb4cc61 100644 --- a/src/devices/machine/m6m80011ap.h +++ b/src/devices/machine/m6m80011ap.h @@ -10,7 +10,7 @@ class m6m80011ap_device : public device_t, { public: // construction/destruction - m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); /* TODO: frequency */ + m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 32'768); /* TODO: frequency */ // I/O operations DECLARE_READ_LINE_MEMBER( read_bit ); diff --git a/src/devices/machine/m950x0.cpp b/src/devices/machine/m950x0.cpp index 9d42166804c..2f8bd3e2aad 100644 --- a/src/devices/machine/m950x0.cpp +++ b/src/devices/machine/m950x0.cpp @@ -43,18 +43,18 @@ m950x0_device::m950x0_device(const machine_config &mconfig, device_type type, co size(capacity, 8); } -m95010_device::m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : m950x0_device(mconfig, M95010, tag, owner, 0x80) +m95010_device::m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : m950x0_device(mconfig, M95010, tag, ownerx80) { } -m95020_device::m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : m950x0_device(mconfig, M95020, tag, owner, 0x100) +m95020_device::m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : m950x0_device(mconfig, M95020, tag, ownerx100) { } -m95040_device::m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : m950x0_device(mconfig, M95040, tag, owner, 0x200) +m95040_device::m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : m950x0_device(mconfig, M95040, tag, ownerx200) { } diff --git a/src/devices/machine/m950x0.h b/src/devices/machine/m950x0.h index 0eceb6fab21..e045ad8f7c1 100644 --- a/src/devices/machine/m950x0.h +++ b/src/devices/machine/m950x0.h @@ -75,19 +75,19 @@ protected: class m95010_device : public m950x0_device { public: - m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m95020_device : public m950x0_device { public: - m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m95040_device : public m950x0_device { public: - m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(M95010, m95010_device) diff --git a/src/devices/machine/mb14241.cpp b/src/devices/machine/mb14241.cpp index c9d08eb503e..0cdd87a7b57 100644 --- a/src/devices/machine/mb14241.cpp +++ b/src/devices/machine/mb14241.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(MB14241, mb14241_device, "mb14241", "MB14241 Data Shifter") -mb14241_device::mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb14241_device::mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB14241, tag, owner, clock), m_shift_data(0), m_shift_count(0) { } diff --git a/src/devices/machine/mb14241.h b/src/devices/machine/mb14241.h index 00bc2a55949..673c787bafa 100644 --- a/src/devices/machine/mb14241.h +++ b/src/devices/machine/mb14241.h @@ -14,7 +14,7 @@ class mb14241_device : public device_t { public: - mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void shift_count_w(u8 data); void shift_data_w(u8 data); diff --git a/src/devices/machine/mb3773.cpp b/src/devices/machine/mb3773.cpp index e5ce23e13e6..39c51959fe8 100644 --- a/src/devices/machine/mb3773.cpp +++ b/src/devices/machine/mb3773.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(MB3773, mb3773_device, "mb3773", "MB3773 Power Supply Monitor // mb3773_device - constructor //------------------------------------------------- -mb3773_device::mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +mb3773_device::mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, MB3773, tag, owner, clock), m_watchdog_timer(nullptr), m_ck(0) { } diff --git a/src/devices/machine/mb3773.h b/src/devices/machine/mb3773.h index 5955c1fa372..8f641bfc2c6 100644 --- a/src/devices/machine/mb3773.h +++ b/src/devices/machine/mb3773.h @@ -17,7 +17,7 @@ class mb3773_device : public device_t { public: // construction/destruction - mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // I/O operations WRITE_LINE_MEMBER( write_line_ck ); diff --git a/src/devices/machine/mb8421.h b/src/devices/machine/mb8421.h index f112f1e1484..c7bd387c7d0 100644 --- a/src/devices/machine/mb8421.h +++ b/src/devices/machine/mb8421.h @@ -150,7 +150,7 @@ public: DECLARE_READ_LINE_MEMBER(busy_r) { return 0; } // _BUSY pin - not emulated protected: - dual_port_mailbox_ram_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + dual_port_mailbox_ram_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_intl_callback(*this) , m_intr_callback(*this) @@ -229,7 +229,7 @@ private: class cy7c131_device : public dual_port_mailbox_ram_base { public: - cy7c131_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + cy7c131_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base(mconfig, CY7C131, tag, owner, clock) // 1kx8 { } @@ -240,7 +240,7 @@ public: class idt7130_device : public dual_port_mailbox_ram_base { public: - idt7130_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + idt7130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base(mconfig, IDT7130, tag, owner, clock) // 1kx8 { } @@ -251,7 +251,7 @@ public: class idt71321_device : public dual_port_mailbox_ram_base { public: - idt71321_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + idt71321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base(mconfig, IDT71321, tag, owner, clock) // 2kx8 { } @@ -262,7 +262,7 @@ public: class mb8421_device : public dual_port_mailbox_ram_base { public: - mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base(mconfig, MB8421, tag, owner, clock) // 2kx8 { } @@ -273,7 +273,7 @@ public: class mb8421_mb8431_16_device : public dual_port_mailbox_ram_base { public: - mb8421_mb8431_16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + mb8421_mb8431_16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base(mconfig, MB8421_MB8431_16BIT, tag, owner, clock) // 2kx16 { } diff --git a/src/devices/machine/mb87030.cpp b/src/devices/machine/mb87030.cpp index 1898f69ec67..13ce1eeff68 100644 --- a/src/devices/machine/mb87030.cpp +++ b/src/devices/machine/mb87030.cpp @@ -10,13 +10,13 @@ DEFINE_DEVICE_TYPE(MB87030, mb87030_device, "mb87030", "Fujitsu MB87030 SCSI controller") -mb87030_device::mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb87030_device::mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb87030_device(mconfig, MB87030, tag, owner, clock) { } -mb87030_device::mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mb87030_device::mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), m_irq_handler(*this), diff --git a/src/devices/machine/mb87030.h b/src/devices/machine/mb87030.h index d2e90a506f4..e7a1684a405 100644 --- a/src/devices/machine/mb87030.h +++ b/src/devices/machine/mb87030.h @@ -11,7 +11,7 @@ class mb87030_device : public nscsi_device, public nscsi_slot_card_interface { public: - mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map); @@ -58,7 +58,7 @@ public: void ctrl_write(uint32_t value, uint32_t mask) { scsi_bus->ctrl_w(scsi_refid, value, mask); scsi_ctrl_changed(); } uint32_t data_read() { return scsi_bus->data_r(); } protected: - mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/machine/mb87078.cpp b/src/devices/machine/mb87078.cpp index eed6f53297a..9be63b8a552 100644 --- a/src/devices/machine/mb87078.cpp +++ b/src/devices/machine/mb87078.cpp @@ -79,7 +79,7 @@ DEFINE_DEVICE_TYPE(MB87078, mb87078_device, "mb87078", "MB87078 Volume Controller") -mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB87078, tag, owner, clock), m_gain_changed_cb(*this) { diff --git a/src/devices/machine/mb87078.h b/src/devices/machine/mb87078.h index 500a53b02a6..975a1139878 100644 --- a/src/devices/machine/mb87078.h +++ b/src/devices/machine/mb87078.h @@ -14,7 +14,7 @@ class mb87078_device : public device_t { public: - mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto gain_changed() { return m_gain_changed_cb.bind(); } diff --git a/src/devices/machine/mb8795.cpp b/src/devices/machine/mb8795.cpp index 957b53a2655..04288290256 100644 --- a/src/devices/machine/mb8795.cpp +++ b/src/devices/machine/mb8795.cpp @@ -19,7 +19,7 @@ void mb8795_device::map(address_map &map) map(0x8, 0xf).rw(FUNC(mb8795_device::mac_r), FUNC(mb8795_device::mac_w)); // Mapping limitation, real is up to 0xd } -mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB8795, tag, owner, clock), device_network_interface(mconfig, *this, 10), txstat(0), txmask(0), rxstat(0), rxmask(0), txmode(0), rxmode(0), txlen(0), rxlen(0), txcount(0), diff --git a/src/devices/machine/mb8795.h b/src/devices/machine/mb8795.h index 57daf378f66..638363a3450 100644 --- a/src/devices/machine/mb8795.h +++ b/src/devices/machine/mb8795.h @@ -9,7 +9,7 @@ class mb8795_device : public device_t, public device_network_interface { public: - mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto tx_irq() { return irq_tx_cb.bind(); } auto rx_irq() { return irq_rx_cb.bind(); } diff --git a/src/devices/machine/mb89352.cpp b/src/devices/machine/mb89352.cpp index 24777cd0289..921c451f398 100644 --- a/src/devices/machine/mb89352.cpp +++ b/src/devices/machine/mb89352.cpp @@ -155,7 +155,7 @@ DEFINE_DEVICE_TYPE(MB89352A, mb89352_device, "mb89352", "Fujitsu MB89352A") * Device */ -mb89352_device::mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb89352_device::mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, MB89352A, tag, owner, clock), m_irq_cb(*this), m_drq_cb(*this) diff --git a/src/devices/machine/mb89352.h b/src/devices/machine/mb89352.h index 1032dd547d7..43cb6d4a023 100644 --- a/src/devices/machine/mb89352.h +++ b/src/devices/machine/mb89352.h @@ -15,7 +15,7 @@ class mb89352_device : public legacy_scsi_host_adapter { public: // construction/destruction - mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return m_irq_cb.bind(); } auto drq_cb() { return m_drq_cb.bind(); } diff --git a/src/devices/machine/mb89363b.cpp b/src/devices/machine/mb89363b.cpp index dae0d4a3372..3cf04bbe40d 100644 --- a/src/devices/machine/mb89363b.cpp +++ b/src/devices/machine/mb89363b.cpp @@ -83,7 +83,7 @@ DEFINE_DEVICE_TYPE(MB89363B, mb89363b_device, "mb89363b", "Fujitsu MB89363B I/O") -mb89363b_device::mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb89363b_device::mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB89363B, tag, owner, clock), m_i8255_a(*this, "i8255_a"), m_i8255_b(*this, "i8255_b"), diff --git a/src/devices/machine/mb89363b.h b/src/devices/machine/mb89363b.h index 273642f96f5..71efc26d4cf 100644 --- a/src/devices/machine/mb89363b.h +++ b/src/devices/machine/mb89363b.h @@ -21,7 +21,7 @@ class mb89363b_device : public device_t { public: // construction/destruction - mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mb89371.cpp b/src/devices/machine/mb89371.cpp index 7393bd7d529..deffdfa8108 100644 --- a/src/devices/machine/mb89371.cpp +++ b/src/devices/machine/mb89371.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(MB89371, mb89371_device, "mb89371", "MB89371 Dual Serial UART") -mb89371_device::mb89371_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +mb89371_device::mb89371_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, MB89371, tag, owner, clock) { } diff --git a/src/devices/machine/mb89371.h b/src/devices/machine/mb89371.h index 4fe1c8158d2..79d05d787fa 100644 --- a/src/devices/machine/mb89371.h +++ b/src/devices/machine/mb89371.h @@ -18,7 +18,7 @@ class mb89371_device : public device_t { public: // construction/destruction - mb89371_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb89371_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); uint8_t read(offs_t offset, uint8_t mem_mask = ~0); diff --git a/src/devices/machine/mb89374.cpp b/src/devices/machine/mb89374.cpp index 7cad4c899d6..74ac6c08910 100644 --- a/src/devices/machine/mb89374.cpp +++ b/src/devices/machine/mb89374.cpp @@ -99,7 +99,7 @@ enum // mb89374_device - constructor //------------------------------------------------- -mb89374_device::mb89374_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : +mb89374_device::mb89374_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, MB89374, tag, owner, clock), device_execute_interface(mconfig, *this), m_icount(0), diff --git a/src/devices/machine/mb89374.h b/src/devices/machine/mb89374.h index 4ea6878641f..1229e0bb181 100644 --- a/src/devices/machine/mb89374.h +++ b/src/devices/machine/mb89374.h @@ -43,7 +43,7 @@ class mb89374_device : public device_t, { public: // construction/destruction - mb89374_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb89374_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq_callback() { return m_out_irq_cb.bind(); } template auto out_po_callback() { return m_out_po_cb[N].bind(); } diff --git a/src/devices/machine/mc14411.cpp b/src/devices/machine/mc14411.cpp index 722de11b35e..f7fab924077 100644 --- a/src/devices/machine/mc14411.cpp +++ b/src/devices/machine/mc14411.cpp @@ -89,12 +89,12 @@ DEFINE_DEVICE_TYPE(MC14411, mc14411_device, "mc14411", "MC14411 Bit Rate Generat // LIVE DEVICE //************************************************************************** -mc14411_device::mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc14411_device::mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc14411_device(mconfig, MC14411, tag, owner, clock) { } -mc14411_device::mc14411_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc14411_device::mc14411_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_out_fx_cbs(*this) , m_divider(0) diff --git a/src/devices/machine/mc14411.h b/src/devices/machine/mc14411.h index 422e381bcb2..e9b25e89585 100644 --- a/src/devices/machine/mc14411.h +++ b/src/devices/machine/mc14411.h @@ -58,7 +58,7 @@ public: }; // construction/destruction - mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto out_f() { return m_out_fx_cbs[Line-1].bind(); } @@ -71,7 +71,7 @@ public: void timer_disable_all(); protected: - mc14411_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc14411_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/mc146818.cpp b/src/devices/machine/mc146818.cpp index c5cabdfd528..f89261875e5 100644 --- a/src/devices/machine/mc146818.cpp +++ b/src/devices/machine/mc146818.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(DS1287, ds1287_device, "ds1287", "DS1287 RTC") // mc146818_device - constructor //------------------------------------------------- -mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc146818_device(mconfig, MC146818, tag, owner, clock) { switch (clock) @@ -44,12 +44,12 @@ mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, } } -ds1287_device::ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1287_device::ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc146818_device(mconfig, DS1287, tag, owner, clock) { } -mc146818_device::mc146818_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc146818_device::mc146818_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/mc146818.h b/src/devices/machine/mc146818.h index 44eb0a54337..bb566919077 100644 --- a/src/devices/machine/mc146818.h +++ b/src/devices/machine/mc146818.h @@ -22,7 +22,7 @@ class mc146818_device : public device_t, { public: // construction/destruction - mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto irq() { return m_write_irq.bind(); } @@ -48,7 +48,7 @@ public: void write_direct(offs_t offset, uint8_t data); protected: - mc146818_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc146818_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -175,7 +175,7 @@ protected: class ds1287_device : public mc146818_device { public: - ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/mc68328.cpp b/src/devices/machine/mc68328.cpp index e1753110d56..e58e8055ac6 100644 --- a/src/devices/machine/mc68328.cpp +++ b/src/devices/machine/mc68328.cpp @@ -210,7 +210,7 @@ void mc68328_device::cpu_space_map(address_map &map) } -mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, tag, owner, clock, MC68328, 16, 24, address_map_constructor(FUNC(mc68328_device::internal_map), this)) , m_rtc(nullptr), m_pwm(nullptr) , m_out_port_a_cb(*this) diff --git a/src/devices/machine/mc68328.h b/src/devices/machine/mc68328.h index da28189db18..4ece2accddb 100644 --- a/src/devices/machine/mc68328.h +++ b/src/devices/machine/mc68328.h @@ -93,7 +93,7 @@ class mc68328_device : public m68000_device { public: - mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_port_a() { return m_out_port_a_cb.bind(); } auto out_port_b() { return m_out_port_b_cb.bind(); } diff --git a/src/devices/machine/mc6843.cpp b/src/devices/machine/mc6843.cpp index 0987b494a27..7c9a0df5839 100644 --- a/src/devices/machine/mc6843.cpp +++ b/src/devices/machine/mc6843.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(MC6843, mc6843_device, "mc6843", "Motorola MC6843 FDC") -mc6843_device::mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6843_device::mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6843, tag, owner, clock), m_irq(*this), m_force_ready(false) diff --git a/src/devices/machine/mc6843.h b/src/devices/machine/mc6843.h index 86a92757279..a2522d9bc0e 100644 --- a/src/devices/machine/mc6843.h +++ b/src/devices/machine/mc6843.h @@ -16,7 +16,7 @@ class mc6843_device : public device_t { public: - mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void force_ready() { m_force_ready = true; } diff --git a/src/devices/machine/mc6844.cpp b/src/devices/machine/mc6844.cpp index a88b497a271..96a8a5b9ed6 100644 --- a/src/devices/machine/mc6844.cpp +++ b/src/devices/machine/mc6844.cpp @@ -77,7 +77,7 @@ DEFINE_DEVICE_TYPE(MC6844, mc6844_device, "mc6844", "MC6844 DMA") //------------------------------------------------- // mc6844_device - constructor //------------------------------------------------- -mc6844_device::mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6844_device::mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6844, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_out_int_cb(*this) diff --git a/src/devices/machine/mc6844.h b/src/devices/machine/mc6844.h index 242528454a6..16561b73bbc 100644 --- a/src/devices/machine/mc6844.h +++ b/src/devices/machine/mc6844.h @@ -48,7 +48,7 @@ class mc6844_device : public device_t, public device_execute_interface { public: // construction/destruction - mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_callback() { return m_out_int_cb.bind(); } auto out_txak_callback() { return m_out_txak_cb.bind(); } diff --git a/src/devices/machine/mc6846.cpp b/src/devices/machine/mc6846.cpp index 7cacedc9656..5fcd5f7c9e7 100644 --- a/src/devices/machine/mc6846.cpp +++ b/src/devices/machine/mc6846.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(MC6846, mc6846_device, "mc6846", "MC6846 Programmable Timer") -mc6846_device::mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6846_device::mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6846, tag, owner, clock), m_out_port_cb(*this), m_out_cp2_cb(*this), diff --git a/src/devices/machine/mc6846.h b/src/devices/machine/mc6846.h index 3569e78bb98..c4601dec045 100644 --- a/src/devices/machine/mc6846.h +++ b/src/devices/machine/mc6846.h @@ -17,7 +17,7 @@ class mc6846_device : public device_t { public: - mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_port() { return m_out_port_cb.bind(); } auto in_port() { return m_in_port_cb.bind(); } diff --git a/src/devices/machine/mc6852.cpp b/src/devices/machine/mc6852.cpp index 714e093aed3..996b31eca2b 100644 --- a/src/devices/machine/mc6852.cpp +++ b/src/devices/machine/mc6852.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(MC6852, mc6852_device, "mc6852", "Motorola MC6852 SSDA") // mc6852_device - constructor //------------------------------------------------- -mc6852_device::mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mc6852_device::mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6852, tag, owner, clock), device_serial_interface(mconfig, *this), m_write_tx_data(*this), diff --git a/src/devices/machine/mc6852.h b/src/devices/machine/mc6852.h index 27e7ec9f962..8d954d2e507 100644 --- a/src/devices/machine/mc6852.h +++ b/src/devices/machine/mc6852.h @@ -42,7 +42,7 @@ class mc6852_device : public device_t, { public: // construction/destruction - mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_rx_clock(int clock) { m_rx_clock = clock; } void set_tx_clock(int clock) { m_tx_clock = clock; } diff --git a/src/devices/machine/mc6854.cpp b/src/devices/machine/mc6854.cpp index 55418ee0d23..569d3dfd813 100644 --- a/src/devices/machine/mc6854.cpp +++ b/src/devices/machine/mc6854.cpp @@ -139,7 +139,7 @@ static const int word_length[4] = { 5, 6, 7, 8 }; /* transmit / receive word len DEFINE_DEVICE_TYPE(MC6854, mc6854_device, "mc6854", "Motorola MC6854 ADLC") -mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6854, tag, owner, clock), m_out_irq_cb(*this), m_out_rdsr_cb(*this), diff --git a/src/devices/machine/mc6854.h b/src/devices/machine/mc6854.h index 2e2fe6fa663..bc68e4137ae 100644 --- a/src/devices/machine/mc6854.h +++ b/src/devices/machine/mc6854.h @@ -21,7 +21,7 @@ public: typedef device_delegate out_frame_delegate; - mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_irq_cb() { return m_out_irq_cb.bind(); } auto out_rdsr_cb() { return m_out_rdsr_cb.bind(); } diff --git a/src/devices/machine/mc68681.cpp b/src/devices/machine/mc68681.cpp index 8e647f4c2ab..ce33d8fbc79 100644 --- a/src/devices/machine/mc68681.cpp +++ b/src/devices/machine/mc68681.cpp @@ -112,7 +112,7 @@ DEFINE_DEVICE_TYPE(DUART_CHANNEL, duart_channel, "duart_channel", "DUART channel // LIVE DEVICE //************************************************************************** -duart_base_device::duart_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +duart_base_device::duart_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_chanA(*this, CHANA_TAG), m_chanB(*this, CHANB_TAG), @@ -134,23 +134,23 @@ duart_base_device::duart_base_device(const machine_config &mconfig, device_type { } -scn2681_device::scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scn2681_device::scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, SCN2681, tag, owner, clock) { } -mc68681_device::mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc68681_device::mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, type, tag, owner, clock), m_read_vector(false) { } -mc68681_device::mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68681_device::mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68681_device(mconfig, MC68681, tag, owner, clock) { } -sc28c94_device::sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sc28c94_device::sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, SC28C94, tag, owner, clock) { } @@ -162,17 +162,17 @@ sc28c94_device::sc28c94_device(const machine_config &mconfig, const char *tag, d // that the code knows all of this and will not warn if those registers are accessed as it could be ported code. // TODO: A lot of subtle differences and also detect misuse of unavailable registers as they should be ignored //-------------------------------------------------------------------------------------------------------------------- -mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, type, tag, owner, clock) { } -mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68340_duart_device(mconfig, MC68340_DUART, tag, owner, clock) { } -xr68c681_device::xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xr68c681_device::xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68681_device(mconfig, XR68C681, tag, owner, clock), m_XTXA(false), m_XRXA(false), @@ -277,22 +277,22 @@ void xr68c681_device::device_reset() void duart_base_device::device_add_mconfig(machine_config &config) { - DUART_CHANNEL(config, CHANA_TAG, 0); - DUART_CHANNEL(config, CHANB_TAG, 0); + DUART_CHANNEL(config, CHANA_TAG); + DUART_CHANNEL(config, CHANB_TAG); } void sc28c94_device::device_add_mconfig(machine_config &config) { - DUART_CHANNEL(config, CHANA_TAG, 0); - DUART_CHANNEL(config, CHANB_TAG, 0); - DUART_CHANNEL(config, CHANC_TAG, 0); - DUART_CHANNEL(config, CHAND_TAG, 0); + DUART_CHANNEL(config, CHANA_TAG); + DUART_CHANNEL(config, CHANB_TAG); + DUART_CHANNEL(config, CHANC_TAG); + DUART_CHANNEL(config, CHAND_TAG); } void mc68340_duart_device::device_add_mconfig(machine_config &config) { - DUART_CHANNEL(config, CHANA_TAG, 0); - DUART_CHANNEL(config, CHANB_TAG, 0); + DUART_CHANNEL(config, CHANA_TAG); + DUART_CHANNEL(config, CHANB_TAG); } void duart_base_device::update_interrupts() @@ -1160,7 +1160,7 @@ void duart_base_device::set_ISR_bits(int mask) // DUART channel class stuff -duart_channel::duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duart_channel::duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DUART_CHANNEL, tag, owner, clock) , device_serial_interface(mconfig, *this) , MR1(0) diff --git a/src/devices/machine/mc68681.h b/src/devices/machine/mc68681.h index b47e7276cd8..30d7f1c9b6d 100644 --- a/src/devices/machine/mc68681.h +++ b/src/devices/machine/mc68681.h @@ -16,7 +16,7 @@ class duart_base_device; class duart_channel : public device_t, public device_serial_interface { public: - duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -98,7 +98,6 @@ public: optional_device m_chanD; // inline configuration helpers - void set_clocks(int clk3, int clk4, int clk5, int clk6); void set_clocks(const XTAL &clk3, const XTAL &clk4, const XTAL &clk5, const XTAL &clk6) { set_clocks(clk3.value(), clk4.value(), clk5.value(), clk6.value()); } @@ -128,7 +127,7 @@ public: bool irq_pending() const { return (ISR & IMR) != 0; } protected: - duart_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + duart_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -167,6 +166,7 @@ private: bool m_irq_state; + void set_clocks(int clk3, int clk4, int clk5, int clk6); uint32_t get_ct_rate(); uint16_t get_ct_count(); void start_ct(int count); @@ -198,13 +198,13 @@ private: class scn2681_device : public duart_base_device { public: - scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc68681_device : public duart_base_device { public: - mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -214,7 +214,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void update_interrupts() override; - mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: bool m_read_vector; // if this is read and IRQ is active, it counts as pulling IACK @@ -225,7 +225,7 @@ private: class sc28c94_device : public duart_base_device { public: - sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto c_tx_cb() { return write_c_tx.bind(); } auto d_tx_cb() { return write_d_tx.bind(); } @@ -245,14 +245,14 @@ private: class mc68340_duart_device : public duart_base_device { public: - mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; protected: virtual void device_add_mconfig(machine_config &config) override; - mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: virtual int calc_baud(int ch, bool rx, uint8_t data) override; @@ -261,7 +261,7 @@ private: class xr68c681_device : public mc68681_device { public: - xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/machine/mc68901.cpp b/src/devices/machine/mc68901.cpp index ed0282770e9..cf235cb43a7 100644 --- a/src/devices/machine/mc68901.cpp +++ b/src/devices/machine/mc68901.cpp @@ -345,7 +345,7 @@ void mc68901_device::gpio_output() // mc68901_device - constructor //------------------------------------------------- -mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC68901, tag, owner, clock), m_timer_clock(0), m_out_irq_cb(*this), diff --git a/src/devices/machine/mc68901.h b/src/devices/machine/mc68901.h index 0e992c78941..2291f046559 100644 --- a/src/devices/machine/mc68901.h +++ b/src/devices/machine/mc68901.h @@ -50,7 +50,7 @@ class mc68901_device : public device_t { public: // construction/destruction - mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_timer_clock(int timer_clock) { m_timer_clock = timer_clock; } void set_timer_clock(const XTAL &xtal) { set_timer_clock(xtal.value()); } diff --git a/src/devices/machine/mccs1850.cpp b/src/devices/machine/mccs1850.cpp index 367b58af135..7072b09729f 100644 --- a/src/devices/machine/mccs1850.cpp +++ b/src/devices/machine/mccs1850.cpp @@ -280,7 +280,7 @@ TIMER_CALLBACK_MEMBER(mccs1850_device::advance_seconds) // mccs1850_device - constructor //------------------------------------------------- -mccs1850_device::mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mccs1850_device::mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MCCS1850, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/mccs1850.h b/src/devices/machine/mccs1850.h index cdd3b2853bc..48c9941d7c0 100644 --- a/src/devices/machine/mccs1850.h +++ b/src/devices/machine/mccs1850.h @@ -37,7 +37,7 @@ class mccs1850_device : public device_t, { public: // construction/destruction - mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_wr_callback() { return int_cb.bind(); } auto pse_wr_callback() { return pse_cb.bind(); } diff --git a/src/devices/machine/mcf5206e.cpp b/src/devices/machine/mcf5206e.cpp index eb4695be03a..6ef44232748 100644 --- a/src/devices/machine/mcf5206e.cpp +++ b/src/devices/machine/mcf5206e.cpp @@ -823,7 +823,7 @@ DEFINE_DEVICE_TYPE(MCF5206E_PERIPHERAL, mcf5206e_peripheral_device, "mcf5206e_pe // mcf5206e_peripheral_device - constructor //------------------------------------------------- -mcf5206e_peripheral_device::mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcf5206e_peripheral_device::mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MCF5206E_PERIPHERAL, tag, owner, clock), device_memory_interface(mconfig, *this), m_maincpu(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/machine/mcf5206e.h b/src/devices/machine/mcf5206e.h index d4ec0dd7980..f2799e16a5c 100644 --- a/src/devices/machine/mcf5206e.h +++ b/src/devices/machine/mcf5206e.h @@ -24,13 +24,13 @@ class mcf5206e_peripheral_device : public device_t, public: // construction/destruction template - mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) - : mcf5206e_peripheral_device(mconfig, tag, owner, clock) + mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) + : mcf5206e_peripheral_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); } - mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t dev_r(offs_t offset, uint32_t mem_mask = ~0); void dev_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/meters.cpp b/src/devices/machine/meters.cpp index 93ab6fd7fdc..28bc542cdf3 100644 --- a/src/devices/machine/meters.cpp +++ b/src/devices/machine/meters.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(METERS, meters_device, "meters", "Electromechanical meters") -meters_device::meters_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +meters_device::meters_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, METERS, tag, owner, clock) , m_number_mtr(0) { diff --git a/src/devices/machine/meters.h b/src/devices/machine/meters.h index c8dc68a5800..681e32de009 100644 --- a/src/devices/machine/meters.h +++ b/src/devices/machine/meters.h @@ -15,7 +15,7 @@ class meters_device : public device_t { public: - meters_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + meters_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_number(int number) { m_number_mtr = number; } diff --git a/src/devices/machine/microtch.cpp b/src/devices/machine/microtch.cpp index 7f4562f02f1..2d25a36fa4e 100644 --- a/src/devices/machine/microtch.cpp +++ b/src/devices/machine/microtch.cpp @@ -63,7 +63,7 @@ COM8 3F0-3F7 ON : ON : : ON DEFINE_DEVICE_TYPE(MICROTOUCH, microtouch_device, "microtouch", "Microtouch Touchscreen") -microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MICROTOUCH, tag, owner, clock), device_serial_interface(mconfig, *this), m_rx_buffer_ptr(0), m_tx_buffer_num(0), m_tx_buffer_ptr(0), m_reset_done(0), m_format(0), m_mode(0), m_last_touch_state(0), diff --git a/src/devices/machine/microtch.h b/src/devices/machine/microtch.h index b7242f4cca3..929ee3c585c 100644 --- a/src/devices/machine/microtch.h +++ b/src/devices/machine/microtch.h @@ -14,7 +14,7 @@ class microtouch_device : public: typedef device_delegate touch_cb; - microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto stx() { return m_out_stx_func.bind(); } DECLARE_WRITE_LINE_MEMBER(rx) { device_serial_interface::rx_w(state); } diff --git a/src/devices/machine/mm5307.cpp b/src/devices/machine/mm5307.cpp index 30032913ad0..c7614089a80 100644 --- a/src/devices/machine/mm5307.cpp +++ b/src/devices/machine/mm5307.cpp @@ -88,7 +88,7 @@ const std::array mm5307ab_device::s_divisors_x2 = { // mm5307_device - constructor //------------------------------------------------- -mm5307_device::mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const std::array &divisors_x2) +mm5307_device::mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const std::array &divisors_x2) : device_t(mconfig, type, tag, owner, clock) , m_divisors_x2(divisors_x2) , m_output_cb(*this) @@ -104,7 +104,7 @@ mm5307_device::mm5307_device(const machine_config &mconfig, device_type type, co // mm5307aa_device - constructor //------------------------------------------------- -mm5307aa_device::mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mm5307aa_device::mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5307_device(mconfig, MM5307AA, tag, owner, clock, s_divisors_x2) { } @@ -114,7 +114,7 @@ mm5307aa_device::mm5307aa_device(const machine_config &mconfig, const char *tag, // mm5307ab_device - constructor //------------------------------------------------- -mm5307ab_device::mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mm5307ab_device::mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5307_device(mconfig, MM5307AB, tag, owner, clock, s_divisors_x2) { } diff --git a/src/devices/machine/mm5307.h b/src/devices/machine/mm5307.h index c1e6dad8f89..75dfb171080 100644 --- a/src/devices/machine/mm5307.h +++ b/src/devices/machine/mm5307.h @@ -40,7 +40,7 @@ public: protected: // base class constructor - mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const std::array &divisors_x2); + mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const std::array &divisors_x2); // device-specific overrides virtual void device_resolve_objects() override; @@ -74,7 +74,7 @@ class mm5307aa_device : public mm5307_device { public: // construction/destruction - mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static const std::array s_divisors_x2; @@ -86,7 +86,7 @@ class mm5307ab_device : public mm5307_device { public: // construction/destruction - mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static const std::array s_divisors_x2; diff --git a/src/devices/machine/mm5740.cpp b/src/devices/machine/mm5740.cpp index feabf787fe0..5d6cb821f27 100644 --- a/src/devices/machine/mm5740.cpp +++ b/src/devices/machine/mm5740.cpp @@ -43,7 +43,7 @@ const tiny_rom_entry *mm5740_device::device_rom_region() const // mm5740_device - constructor //------------------------------------------------- -mm5740_device::mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm5740_device::mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM5740, tag, owner, clock), m_read_x(*this), m_read_shift(*this), diff --git a/src/devices/machine/mm5740.h b/src/devices/machine/mm5740.h index c1e4eb81f70..4c352f7371b 100644 --- a/src/devices/machine/mm5740.h +++ b/src/devices/machine/mm5740.h @@ -89,7 +89,7 @@ class mm5740_device : public device_t { public: // construction/destruction - mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interface uint16_t b_r(); diff --git a/src/devices/machine/mm58167.cpp b/src/devices/machine/mm58167.cpp index 9363a80c6f4..ae30c51ff09 100644 --- a/src/devices/machine/mm58167.cpp +++ b/src/devices/machine/mm58167.cpp @@ -52,7 +52,7 @@ typedef enum // mm58167_device - constructor //------------------------------------------------- -mm58167_device::mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mm58167_device::mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM58167, tag, owner, clock), device_rtc_interface(mconfig, *this), m_irq_w(*this) diff --git a/src/devices/machine/mm58167.h b/src/devices/machine/mm58167.h index 82cf173ca95..8fcd6776945 100644 --- a/src/devices/machine/mm58167.h +++ b/src/devices/machine/mm58167.h @@ -25,7 +25,7 @@ class mm58167_device : public device_t, { public: // construction/destruction - mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mm58174.cpp b/src/devices/machine/mm58174.cpp index 3d15060666a..4b0e0bb1f88 100644 --- a/src/devices/machine/mm58174.cpp +++ b/src/devices/machine/mm58174.cpp @@ -34,7 +34,7 @@ enum DEFINE_DEVICE_TYPE(MM58174, mm58174_device, "mm58174", "National Semiconductor MM58174 RTC") -mm58174_device::mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mm58174_device::mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM58174, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_control(0) diff --git a/src/devices/machine/mm58174.h b/src/devices/machine/mm58174.h index 72fbfc85502..a084ca4bbb8 100644 --- a/src/devices/machine/mm58174.h +++ b/src/devices/machine/mm58174.h @@ -15,7 +15,7 @@ class mm58174_device : public device_t, public device_rtc_interface { public: - mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mm58274c.cpp b/src/devices/machine/mm58274c.cpp index cfc50472653..66b7b4c49c6 100644 --- a/src/devices/machine/mm58274c.cpp +++ b/src/devices/machine/mm58274c.cpp @@ -47,7 +47,7 @@ enum DEFINE_DEVICE_TYPE(MM58274C, mm58274c_device, "mm58274c", "National Semiconductor MM58274C RTC") -mm58274c_device::mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mm58274c_device::mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM58274C, tag, owner, clock) , m_mode24(0) , m_day1(0) diff --git a/src/devices/machine/mm58274c.h b/src/devices/machine/mm58274c.h index c6fcbee3c46..2d838b221c3 100644 --- a/src/devices/machine/mm58274c.h +++ b/src/devices/machine/mm58274c.h @@ -10,7 +10,7 @@ class mm58274c_device : public device_t { public: - mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_mode24(int mode) { m_mode24 = mode; } void set_day1(int day) { m_day1 = day; } diff --git a/src/devices/machine/mm74c922.cpp b/src/devices/machine/mm74c922.cpp index add765a1b1e..42cb30146ae 100644 --- a/src/devices/machine/mm74c922.cpp +++ b/src/devices/machine/mm74c922.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(MM74C923, mm74c923_device, "mm74c923", "MM74C923 20-Key Encod // mm74c922_device - constructor //------------------------------------------------- -mm74c922_device::mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int max_y) : +mm74c922_device::mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int max_y) : device_t(mconfig, type, tag, owner, clock), m_write_da(*this), m_read_x(*this), m_tristate_data(*this), m_cap_osc(0), m_cap_debounce(0), @@ -46,12 +46,12 @@ mm74c922_device::mm74c922_device(const machine_config &mconfig, device_type type { } -mm74c922_device::mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm74c922_device::mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm74c922_device(mconfig, MM74C922, tag, owner, clock, 4) { } -mm74c923_device::mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm74c923_device::mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm74c922_device(mconfig, MM74C923, tag, owner, clock, 5) { } diff --git a/src/devices/machine/mm74c922.h b/src/devices/machine/mm74c922.h index 43c958bb4b7..74ecc1c68e5 100644 --- a/src/devices/machine/mm74c922.h +++ b/src/devices/machine/mm74c922.h @@ -46,7 +46,7 @@ class mm74c922_device : public device_t { public: // construction/destruction - mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_cap_osc(double value) { m_cap_osc = value; } void set_cap_debounce(double value) { m_cap_debounce = value; } @@ -63,7 +63,7 @@ public: DECLARE_READ_LINE_MEMBER(da_r) { return m_da; } protected: - mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int max_y); + mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int max_y); // device-level overrides virtual void device_start() override; @@ -104,7 +104,7 @@ class mm74c923_device : public mm74c922_device { public: // construction/destruction - mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/mos6526.cpp b/src/devices/machine/mos6526.cpp index a35d9a9c573..c743ec440d1 100644 --- a/src/devices/machine/mos6526.cpp +++ b/src/devices/machine/mos6526.cpp @@ -587,7 +587,7 @@ void mos6526_device::synchronize() // mos6526_device - constructor //------------------------------------------------- -mos6526_device::mos6526_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mos6526_device::mos6526_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock), device_execute_interface(mconfig, *this), m_icount(0), @@ -604,17 +604,17 @@ mos6526_device::mos6526_device(const machine_config &mconfig, device_type type, { } -mos6526_device::mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6526_device::mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS6526, tag, owner, clock, TYPE_6526) { } -mos6526a_device::mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6526a_device::mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS6526A, tag, owner, clock, TYPE_6526A) { } -mos8520_device::mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8520_device::mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS8520, tag, owner, clock, TYPE_8520) { } -mos5710_device::mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos5710_device::mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS5710, tag, owner, clock, TYPE_5710) { } diff --git a/src/devices/machine/mos6526.h b/src/devices/machine/mos6526.h index 1f515271537..17fb72a4a49 100644 --- a/src/devices/machine/mos6526.h +++ b/src/devices/machine/mos6526.h @@ -72,7 +72,7 @@ class mos6526_device : public device_t, { public: // construction/destruction - mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_tod_clock(int clock) { m_tod_clock = clock; } @@ -108,7 +108,7 @@ protected: TYPE_5710 }; - mos6526_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mos6526_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -218,7 +218,7 @@ protected: class mos6526a_device : public mos6526_device { public: - mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -227,7 +227,7 @@ public: class mos8520_device : public mos6526_device { public: - mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); @@ -242,7 +242,7 @@ protected: class mos5710_device : public mos6526_device { public: - mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); //uint8_t read(offs_t offset); //void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mos6529.cpp b/src/devices/machine/mos6529.cpp index 46bbf3bc0b8..3fbdd2dce5e 100644 --- a/src/devices/machine/mos6529.cpp +++ b/src/devices/machine/mos6529.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(MOS6529, mos6529_device, "mos6529", "MOS 6529") // mos6529_device - constructor //------------------------------------------------- -mos6529_device::mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mos6529_device::mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6529, tag, owner, clock), m_input(0), m_p_handler(*this) diff --git a/src/devices/machine/mos6529.h b/src/devices/machine/mos6529.h index 67806441d57..780e69db95c 100644 --- a/src/devices/machine/mos6529.h +++ b/src/devices/machine/mos6529.h @@ -37,7 +37,7 @@ class mos6529_device : public device_t { public: // construction/destruction - mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto p_handler() { return m_p_handler[Bit].bind(); } diff --git a/src/devices/machine/mos6530.cpp b/src/devices/machine/mos6530.cpp index 3862b0699e8..4efa3b915c7 100644 --- a/src/devices/machine/mos6530.cpp +++ b/src/devices/machine/mos6530.cpp @@ -41,7 +41,7 @@ enum DEFINE_DEVICE_TYPE(MOS6530, mos6530_device, "mos6530", "MOS 6530 MIOT") -mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6530, tag, owner, clock), m_in_pa_cb(*this), m_out_pa_cb(*this), diff --git a/src/devices/machine/mos6530.h b/src/devices/machine/mos6530.h index 25e11a38f97..88015ee878d 100644 --- a/src/devices/machine/mos6530.h +++ b/src/devices/machine/mos6530.h @@ -46,7 +46,7 @@ class mos6530_device : public device_t { public: - mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto out_pa_callback() { return m_out_pa_cb.bind(); } diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp index fab3833e387..e91868babd8 100644 --- a/src/devices/machine/mos6530n.cpp +++ b/src/devices/machine/mos6530n.cpp @@ -84,7 +84,7 @@ void mos6532_new_device::io_map(address_map &map) // mos6530_device_base - constructor //------------------------------------------------- -mos6530_device_base::mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 rsize) : +mos6530_device_base::mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 rsize) : device_t(mconfig, type, tag, owner, clock), m_ram(*this, finder_base::DUMMY_TAG, rsize, ENDIANNESS_LITTLE), m_rom(*this, DEVICE_SELF), @@ -120,7 +120,7 @@ mos6530_device_base::mos6530_device_base(const machine_config &mconfig, device_t // mos6530_new_device - constructor //------------------------------------------------- -mos6530_new_device::mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6530_new_device::mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6530_device_base(mconfig, MOS6530_NEW, tag, owner, clock, 0x40) { } @@ -128,7 +128,7 @@ mos6530_new_device::mos6530_new_device(const machine_config &mconfig, const char // mos6532_new_device - constructor //------------------------------------------------- -mos6532_new_device::mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6532_new_device::mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6530_device_base(mconfig, MOS6532_NEW, tag, owner, clock, 0x80) { } diff --git a/src/devices/machine/mos6530n.h b/src/devices/machine/mos6530n.h index 164a07031b0..d1c6476b5d6 100644 --- a/src/devices/machine/mos6530n.h +++ b/src/devices/machine/mos6530n.h @@ -96,7 +96,7 @@ public: protected: // construction/destruction - mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 rsize); + mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 rsize); // device-level overrides virtual void device_start() override; @@ -200,7 +200,7 @@ class mos6530_new_device : public mos6530_device_base { public: // construction/destruction - mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void rom_map(address_map &map); virtual void ram_map(address_map &map); @@ -218,7 +218,7 @@ class mos6532_new_device : public mos6530_device_base { public: // construction/destruction - mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ram_map(address_map &map); virtual void io_map(address_map &map); diff --git a/src/devices/machine/mos6551.cpp b/src/devices/machine/mos6551.cpp index 56302c75050..528646f1a5a 100644 --- a/src/devices/machine/mos6551.cpp +++ b/src/devices/machine/mos6551.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(MOS6551, mos6551_device, "mos6551", "MOS 6551 ACIA") -mos6551_device::mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mos6551_device::mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6551, tag, owner, clock), m_internal_clock(*this, "clock"), m_irq_handler(*this), @@ -65,7 +65,7 @@ const int mos6551_device::transmitter_controls[4][3] = void mos6551_device::device_add_mconfig(machine_config &config) { - CLOCK(config, m_internal_clock, 0); + CLOCK(config, m_internal_clock); m_internal_clock->signal_handler().set(FUNC(mos6551_device::internal_clock)); } diff --git a/src/devices/machine/mos6551.h b/src/devices/machine/mos6551.h index b7afabfa603..8a893346eed 100644 --- a/src/devices/machine/mos6551.h +++ b/src/devices/machine/mos6551.h @@ -33,7 +33,7 @@ class mos6551_device : public device_t { public: - mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_handler() { return m_irq_handler.bind(); } auto txd_handler() { return m_txd_handler.bind(); } diff --git a/src/devices/machine/mos6702.cpp b/src/devices/machine/mos6702.cpp index 1b552054cb4..5960bf7359f 100644 --- a/src/devices/machine/mos6702.cpp +++ b/src/devices/machine/mos6702.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(MOS6702, mos6702_device, "mos6702", "MOS 6702") // mos6702_device - constructor //------------------------------------------------- -mos6702_device::mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6702_device::mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6702, tag, owner, clock) { } diff --git a/src/devices/machine/mos6702.h b/src/devices/machine/mos6702.h index ab1ea945e6e..fa5fa39c29f 100644 --- a/src/devices/machine/mos6702.h +++ b/src/devices/machine/mos6702.h @@ -35,7 +35,7 @@ class mos6702_device : public device_t { public: // construction/destruction - mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mos8706.cpp b/src/devices/machine/mos8706.cpp index 3ac0a976310..e8db0974bd9 100644 --- a/src/devices/machine/mos8706.cpp +++ b/src/devices/machine/mos8706.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(MOS8706, mos8706_device, "mos8706", "MOS 8706") // mos8706_device - constructor //------------------------------------------------- -mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS8706, tag, owner, clock) { } diff --git a/src/devices/machine/mos8706.h b/src/devices/machine/mos8706.h index a1d1a225e0e..ce9320b37cc 100644 --- a/src/devices/machine/mos8706.h +++ b/src/devices/machine/mos8706.h @@ -38,7 +38,7 @@ class mos8706_device : public device_t { public: - mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mos8722.cpp b/src/devices/machine/mos8722.cpp index 0364460b63e..d766e385492 100644 --- a/src/devices/machine/mos8722.cpp +++ b/src/devices/machine/mos8722.cpp @@ -69,7 +69,7 @@ static const offs_t RCR_TOP_ADDRESS[4] = { 0xf000, 0xf000, 0xe000, 0xc000 }; // mos8722_device - constructor //------------------------------------------------- -mos8722_device::mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mos8722_device::mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS8722, tag, owner, clock), m_write_z80en(*this), m_write_fsdir(*this), diff --git a/src/devices/machine/mos8722.h b/src/devices/machine/mos8722.h index 2b80aa846c2..18c44e047c6 100644 --- a/src/devices/machine/mos8722.h +++ b/src/devices/machine/mos8722.h @@ -48,7 +48,7 @@ class mos8722_device : public device_t { public: // construction/destruction - mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto z80en() { return m_write_z80en.bind(); } auto fsdir() { return m_write_fsdir.bind(); } diff --git a/src/devices/machine/mos8726.cpp b/src/devices/machine/mos8726.cpp index e1f167d70d3..70f83b32a1a 100644 --- a/src/devices/machine/mos8726.cpp +++ b/src/devices/machine/mos8726.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(MOS8726, mos8726_device, "mos8726", "MOS 8726 DMA Controller" // mos8726_device - constructor //------------------------------------------------- -mos8726_device::mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8726_device::mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS8726, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_icount(0) diff --git a/src/devices/machine/mos8726.h b/src/devices/machine/mos8726.h index 90b78ec8412..1773a051c45 100644 --- a/src/devices/machine/mos8726.h +++ b/src/devices/machine/mos8726.h @@ -58,7 +58,7 @@ class mos8726_device : public device_t, { public: // construction/destruction - mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mpu401.cpp b/src/devices/machine/mpu401.cpp index e2959a432a9..11c735dbfba 100644 --- a/src/devices/machine/mpu401.cpp +++ b/src/devices/machine/mpu401.cpp @@ -83,7 +83,7 @@ DEFINE_DEVICE_TYPE(MPU401, mpu401_device, "mpu401", "Roland MPU-401 I/O box") void mpu401_device::device_add_mconfig(machine_config &config) { - M6801(config, m_ourcpu, 4000000); /* 4 MHz as per schematics */ + M6801(config, m_ourcpu, XTAL::u(4000000)); /* 4 MHz as per schematics */ m_ourcpu->set_addrmap(AS_PROGRAM, &mpu401_device::mpu401_map); m_ourcpu->in_p1_cb().set(FUNC(mpu401_device::port1_r)); m_ourcpu->out_p1_cb().set(FUNC(mpu401_device::port1_w)); @@ -113,7 +113,7 @@ const tiny_rom_entry *mpu401_device::device_rom_region() const // mpu401_device - constructor //------------------------------------------------- -mpu401_device::mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mpu401_device::mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MPU401, tag, owner, clock), m_ourcpu(*this, M6801_TAG), write_irq(*this) diff --git a/src/devices/machine/mpu401.h b/src/devices/machine/mpu401.h index a76cc53dcdd..c84dc3469fc 100644 --- a/src/devices/machine/mpu401.h +++ b/src/devices/machine/mpu401.h @@ -15,7 +15,7 @@ class mpu401_device : public device_t { public: // construction/destruction - mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return write_irq.bind(); } diff --git a/src/devices/machine/msm5832.cpp b/src/devices/machine/msm5832.cpp index 65db2dda469..477a0beb730 100644 --- a/src/devices/machine/msm5832.cpp +++ b/src/devices/machine/msm5832.cpp @@ -88,7 +88,7 @@ inline void msm5832_device::write_counter(int counter, int value) // msm5832_device - constructor //------------------------------------------------- -msm5832_device::msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msm5832_device::msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM5832, tag, owner, clock), device_rtc_interface(mconfig, *this), m_hold(0), diff --git a/src/devices/machine/msm5832.h b/src/devices/machine/msm5832.h index 2e55dc21b97..6f33e904049 100644 --- a/src/devices/machine/msm5832.h +++ b/src/devices/machine/msm5832.h @@ -38,7 +38,7 @@ class msm5832_device : public device_t, { public: // construction/destruction - msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t data_r(); void data_w(uint8_t data); diff --git a/src/devices/machine/msm58321.cpp b/src/devices/machine/msm58321.cpp index 72aa2b09d33..bc8b8e13c8c 100644 --- a/src/devices/machine/msm58321.cpp +++ b/src/devices/machine/msm58321.cpp @@ -161,7 +161,7 @@ inline void msm58321_device::write_counter(int address, int data) // msm58321_device - constructor //------------------------------------------------- -msm58321_device::msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +msm58321_device::msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM58321, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/msm58321.h b/src/devices/machine/msm58321.h index 6f28b05eecf..cb0cec53db1 100644 --- a/src/devices/machine/msm58321.h +++ b/src/devices/machine/msm58321.h @@ -47,7 +47,7 @@ class msm58321_device : public device_t, { public: // construction/destruction - msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto d0_handler() { return m_d0_handler.bind(); } diff --git a/src/devices/machine/msm6242.cpp b/src/devices/machine/msm6242.cpp index a4f566c3cd2..31e758e4ce8 100644 --- a/src/devices/machine/msm6242.cpp +++ b/src/devices/machine/msm6242.cpp @@ -76,12 +76,12 @@ DEFINE_DEVICE_TYPE(RTC72423, rtc72423_device, "rtc72423", "Epson RTC-72423 RTC") // msm6242_device - constructor //------------------------------------------------- -msm6242_device::msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msm6242_device::msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, MSM6242, tag, owner, clock) { } -msm6242_device::msm6242_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +msm6242_device::msm6242_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_out_int_handler(*this) @@ -592,7 +592,7 @@ void msm6242_device::write(offs_t offset, u8 data) // rtc62421_device - constructor //------------------------------------------------- -rtc62421_device::rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc62421_device::rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC62421, tag, owner, clock) { } @@ -602,7 +602,7 @@ rtc62421_device::rtc62421_device(const machine_config &mconfig, const char *tag, // rtc62423_device - constructor //------------------------------------------------- -rtc62423_device::rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc62423_device::rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC62423, tag, owner, clock) { } @@ -612,7 +612,7 @@ rtc62423_device::rtc62423_device(const machine_config &mconfig, const char *tag, // rtc72421_device - constructor //------------------------------------------------- -rtc72421_device::rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc72421_device::rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC72421, tag, owner, clock) { } @@ -622,7 +622,7 @@ rtc72421_device::rtc72421_device(const machine_config &mconfig, const char *tag, // rtc72423_device - constructor //------------------------------------------------- -rtc72423_device::rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc72423_device::rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC72423, tag, owner, clock) { } diff --git a/src/devices/machine/msm6242.h b/src/devices/machine/msm6242.h index 216c66fc5b5..e67300bfa85 100644 --- a/src/devices/machine/msm6242.h +++ b/src/devices/machine/msm6242.h @@ -46,7 +46,7 @@ class msm6242_device : public device_t, public device_rtc_interface { public: // construction/destruction - msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_handler() { return m_out_int_handler.bind(); } @@ -55,7 +55,7 @@ public: u8 read(offs_t offset); protected: - msm6242_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + msm6242_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -105,7 +105,7 @@ class rtc62421_device : public msm6242_device { public: // construction/destruction - rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> rtc62423_device @@ -114,7 +114,7 @@ class rtc62423_device : public msm6242_device { public: // construction/destruction - rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> rtc72421_device @@ -123,7 +123,7 @@ class rtc72421_device : public msm6242_device { public: // construction/destruction - rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> rtc72423_device @@ -132,7 +132,7 @@ class rtc72423_device : public msm6242_device { public: // construction/destruction - rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/msm6253.cpp b/src/devices/machine/msm6253.cpp index 53a47b2152e..9a2fbe523f2 100644 --- a/src/devices/machine/msm6253.cpp +++ b/src/devices/machine/msm6253.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(MSM6253, msm6253_device, "msm6253", "OKI MSM6253 A/D Converte // msm6253_device - constructor //------------------------------------------------- -msm6253_device::msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msm6253_device::msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM6253, tag, owner, clock) , m_analog_ports(*this, {finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG}) , m_analog_input_cb(*this) diff --git a/src/devices/machine/msm6253.h b/src/devices/machine/msm6253.h index b784bb9aec3..e9c7c262bd6 100644 --- a/src/devices/machine/msm6253.h +++ b/src/devices/machine/msm6253.h @@ -35,7 +35,7 @@ public: typedef device_delegate port_read_delegate; // construction/destruction - msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_input_tag(const char *tag) { m_analog_ports[P].set_tag(tag); } diff --git a/src/devices/machine/mv_sonora.cpp b/src/devices/machine/mv_sonora.cpp index bab95cccb0f..87399ff98b3 100644 --- a/src/devices/machine/mv_sonora.cpp +++ b/src/devices/machine/mv_sonora.cpp @@ -20,7 +20,7 @@ const mac_video_sonora_device::modeline mac_video_sonora_device::modelines[5] = { 0x0b, "640x480 VGA", 25175000, 800, 16, 96, 48, 525, 10, 2, 33, false }, }; -mac_video_sonora_device::mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mac_video_sonora_device::mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MAC_VIDEO_SONORA, tag, owner, clock), m_screen(*this, "screen"), m_palette(*this, "palette"), @@ -57,7 +57,7 @@ void mac_video_sonora_device::device_add_mconfig(machine_config &config) { SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // dot clock, htotal, hstart, hend, vtotal, vstart, vend - m_screen->set_raw(31334400, 896, 0, 640, 525, 0, 480); + m_screen->set_raw(XTAL::u(31334400), 896, 0, 640, 525, 0, 480); m_screen->set_screen_update(FUNC(mac_video_sonora_device::screen_update)); m_screen->screen_vblank().set([this](int state) { m_screen_vblank(state && (m_modeline_id != -1)); }); diff --git a/src/devices/machine/mv_sonora.h b/src/devices/machine/mv_sonora.h index 5d3e2c87cb9..9bc8d92ad0f 100644 --- a/src/devices/machine/mv_sonora.h +++ b/src/devices/machine/mv_sonora.h @@ -17,7 +17,7 @@ class mac_video_sonora_device : public device_t { public: - mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~mac_video_sonora_device() = default; uint8_t vctrl_r(offs_t offset); diff --git a/src/devices/machine/myb3k_kbd.cpp b/src/devices/machine/myb3k_kbd.cpp index 768ae3bda91..a2fc2919fc8 100644 --- a/src/devices/machine/myb3k_kbd.cpp +++ b/src/devices/machine/myb3k_kbd.cpp @@ -342,7 +342,7 @@ myb3k_keyboard_device::myb3k_keyboard_device( { } -myb3k_keyboard_device::myb3k_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +myb3k_keyboard_device::myb3k_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : myb3k_keyboard_device(mconfig, MYB3K_KEYBOARD, tag, owner, clock) { } diff --git a/src/devices/machine/ncr5380.cpp b/src/devices/machine/ncr5380.cpp index 56fefc4f97f..54ad053e0eb 100644 --- a/src/devices/machine/ncr5380.cpp +++ b/src/devices/machine/ncr5380.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(CXD1180, cxd1180_device, "cxd1180", "Sony CXD1180") ALLOW_SAVE_TYPE(ncr5380_device::state); -ncr5380_device::ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, bool has_lbs) +ncr5380_device::ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, bool has_lbs) : nscsi_device(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_irq_handler(*this) @@ -40,17 +40,17 @@ ncr5380_device::ncr5380_device(machine_config const &mconfig, device_type type, { } -ncr5380_device::ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ncr5380_device::ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : ncr5380_device(mconfig, NCR5380, tag, owner, clock) { } -ncr53c80_device::ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ncr53c80_device::ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : ncr5380_device(mconfig, NCR53C80, tag, owner, clock, true) { } -cxd1180_device::cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +cxd1180_device::cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : ncr5380_device(mconfig, CXD1180, tag, owner, clock, true) { } diff --git a/src/devices/machine/ncr5380.h b/src/devices/machine/ncr5380.h index e7107ae285e..406b820e3da 100644 --- a/src/devices/machine/ncr5380.h +++ b/src/devices/machine/ncr5380.h @@ -13,7 +13,7 @@ class ncr5380_device , public nscsi_slot_card_interface { public: - ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // device configuration auto irq_handler() { return m_irq_handler.bind(); } @@ -30,7 +30,7 @@ public: void dma_w(u8 val); protected: - ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, bool has_lbs = false); + ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, bool has_lbs = false); // device_t overrides virtual void device_start() override; @@ -170,13 +170,13 @@ private: class ncr53c80_device : public ncr5380_device { public: - ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); }; class cxd1180_device : public ncr5380_device { public: - cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(NCR5380, ncr5380_device) diff --git a/src/devices/machine/ncr5385.cpp b/src/devices/machine/ncr5385.cpp index 6c1f4a3bb4e..c759d7f434b 100644 --- a/src/devices/machine/ncr5385.cpp +++ b/src/devices/machine/ncr5385.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(NCR5385, ncr5385_device, "ncr5385", "NCR 5385E SCSI Controller") -ncr5385_device::ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr5385_device::ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NCR5385, tag, owner, clock) , m_int(*this) { diff --git a/src/devices/machine/ncr5385.h b/src/devices/machine/ncr5385.h index a1dec052045..ec4ab1c44e2 100644 --- a/src/devices/machine/ncr5385.h +++ b/src/devices/machine/ncr5385.h @@ -54,7 +54,7 @@ class ncr5385_device : public device_t { public: // construction/destruction - ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_int.bind(); } diff --git a/src/devices/machine/ncr5390.cpp b/src/devices/machine/ncr5390.cpp index 7a52d237982..4eb82715677 100644 --- a/src/devices/machine/ncr5390.cpp +++ b/src/devices/machine/ncr5390.cpp @@ -122,7 +122,7 @@ void ncr53c94_device::write(offs_t offset, uint8_t data) ncr53c90a_device::write(offset, data); } -ncr5390_device::ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ncr5390_device::ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , tm(nullptr), config(0), status(0), istatus(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0) @@ -132,35 +132,35 @@ ncr5390_device::ncr5390_device(const machine_config &mconfig, device_type type, { } -ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ncr5390_device(mconfig, type, tag, owner, clock) , config2(0) { } -ncr5390_device::ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr5390_device::ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr5390_device(mconfig, NCR5390, tag, owner, clock) { } -ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr53c90a_device(mconfig, NCR53C90A, tag, owner, clock) { } -ncr53c94_device::ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53c94_device::ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr53c94_device(mconfig, NCR53C94, tag, owner, clock) { } -ncr53c94_device::ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ncr53c94_device::ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ncr53c90a_device(mconfig, type, tag, owner, clock) , config3(0) , m_busmd(BUSMD_0) { } -ncr53cf94_device::ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53cf94_device::ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr53c94_device(mconfig, NCR53CF94, tag, owner, clock) { } diff --git a/src/devices/machine/ncr5390.h b/src/devices/machine/ncr5390.h index ba38e1b52cf..a50cd560756 100644 --- a/src/devices/machine/ncr5390.h +++ b/src/devices/machine/ncr5390.h @@ -10,7 +10,7 @@ class ncr5390_device : public nscsi_device, public nscsi_slot_card_interface { public: - ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler_cb() { return m_irq_handler.bind(); } @@ -48,7 +48,7 @@ public: void dma_w(uint8_t val); protected: - ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -240,7 +240,7 @@ protected: class ncr53c90a_device : public ncr5390_device { public: - ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -253,7 +253,7 @@ public: virtual void write(offs_t offset, uint8_t data) override; protected: - ncr53c90a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ncr53c90a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -284,7 +284,7 @@ private: class ncr53c94_device : public ncr53c90a_device { public: - ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum busmd_t : u8 { @@ -308,7 +308,7 @@ public: void dma16_w(u16 data); protected: - ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); enum conf3_mask : u8 { @@ -330,7 +330,7 @@ private: class ncr53cf94_device : public ncr53c94_device { public: - ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(NCR5390, ncr5390_device) diff --git a/src/devices/machine/ncr539x.cpp b/src/devices/machine/ncr539x.cpp index 67cfdadae76..2a962059927 100644 --- a/src/devices/machine/ncr539x.cpp +++ b/src/devices/machine/ncr539x.cpp @@ -118,7 +118,7 @@ DEFINE_DEVICE_TYPE(NCR539X, ncr539x_device, "ncr539x", "NCR/AMD 5394/5396 SCSI") // ncr539x_device - constructor/destructor //------------------------------------------------- -ncr539x_device::ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ncr539x_device::ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, NCR539X, tag, owner, clock), m_out_irq_cb(*this), m_out_drq_cb(*this) diff --git a/src/devices/machine/ncr539x.h b/src/devices/machine/ncr539x.h index 9ba24b3ba47..040e9ff9013 100644 --- a/src/devices/machine/ncr539x.h +++ b/src/devices/machine/ncr539x.h @@ -19,7 +19,7 @@ class ncr539x_device : public legacy_scsi_host_adapter { public: // construction/destruction - ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_out_irq_cb.bind(); } auto drq_callback() { return m_out_drq_cb.bind(); } diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index 48d81cacbdb..99e2537017c 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -424,7 +424,7 @@ void netlist_mame_sub_interface::set_mult_offset(const double mult, const double netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name) - : device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner, 0) + : device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner) , netlist_mame_sub_interface(*owner) , m_param(nullptr) , m_auto_port(true) @@ -433,7 +433,7 @@ netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine { } -netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -475,7 +475,7 @@ void netlist_mame_analog_input_device::validity_helper(validity_checker &valid, // netlist_mame_analog_output_device // ---------------------------------------------------------------------------------------- -netlist_mame_analog_output_device::netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_analog_output_device::netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_ANALOG_OUTPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_in("") @@ -527,7 +527,7 @@ void netlist_mame_analog_output_device::device_start() // netlist_mame_logic_output_device // ---------------------------------------------------------------------------------------- -netlist_mame_logic_output_device::netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_logic_output_device::netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_LOGIC_OUTPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_in("") @@ -578,7 +578,7 @@ void netlist_mame_logic_output_device::device_start() // netlist_mame_int_input_device // ---------------------------------------------------------------------------------------- -netlist_mame_int_input_device::netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_int_input_device::netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_INT_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -622,7 +622,7 @@ void netlist_mame_int_input_device::validity_helper(validity_checker &valid, // netlist_mame_logic_input_device // ---------------------------------------------------------------------------------------- -netlist_mame_logic_input_device::netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_logic_input_device::netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_LOGIC_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -665,7 +665,7 @@ void netlist_mame_logic_input_device::validity_helper(validity_checker &valid, // netlist_mame_ram_pointer_device // ---------------------------------------------------------------------------------------- -netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_RAM_POINTER, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -675,7 +675,7 @@ netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_c } netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *pname) - : device_t(mconfig, NETLIST_RAM_POINTER, tag, owner, 0) + : device_t(mconfig, NETLIST_RAM_POINTER, tag, owner) , netlist_mame_sub_interface(*owner) , m_param(nullptr) , m_param_name(pname) @@ -717,7 +717,7 @@ void netlist_mame_ram_pointer_device::validity_helper(validity_checker &valid, // netlist_mame_stream_input_device // ---------------------------------------------------------------------------------------- -netlist_mame_stream_input_device::netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_stream_input_device::netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_STREAM_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_channel(0) @@ -752,7 +752,7 @@ void netlist_mame_stream_input_device::custom_netlist_additions(netlist::nlparse // netlist_mame_stream_output_device // ---------------------------------------------------------------------------------------- -netlist_mame_stream_output_device::netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_stream_output_device::netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_STREAM_OUTPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_channel(0) @@ -872,12 +872,12 @@ void netlist_mame_stream_output_device::process(netlist::netlist_time_ext tim, n // netlist_mame_device // ---------------------------------------------------------------------------------------- -netlist_mame_device::netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_device::netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : netlist_mame_device(mconfig, NETLIST_CORE, tag, owner, clock) { } -netlist_mame_device::netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_device::netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_setup_func(nullptr) , m_device_reset_called(false) @@ -1167,7 +1167,7 @@ void netlist_mame_device::save_state() // netlist_mame_cpu_device // ---------------------------------------------------------------------------------------- -netlist_mame_cpu_device::netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_cpu_device::netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : netlist_mame_device(mconfig, NETLIST_CPU, tag, owner, clock) , device_execute_interface(mconfig, *this) , device_state_interface(mconfig, *this) @@ -1313,8 +1313,8 @@ offs_t netlist_disassembler::disassemble(std::ostream &stream, offs_t pc, const // netlist_mame_sound_device // ---------------------------------------------------------------------------------------- -netlist_mame_sound_device::netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : netlist_mame_device(mconfig, NETLIST_SOUND, tag, owner, 0) +netlist_mame_sound_device::netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : netlist_mame_device(mconfig, NETLIST_SOUND, tag, owner) , device_sound_interface(mconfig, *this) , m_stream(nullptr) , m_cur_time(attotime::zero) diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h index ff9adf7d332..ce2ce4c4c08 100644 --- a/src/devices/machine/netlist.h +++ b/src/devices/machine/netlist.h @@ -112,7 +112,7 @@ public: using func_type = std::function; // construction/destruction - netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~netlist_mame_device(); @@ -126,7 +126,7 @@ public: auto &log_csv() { return m_log_csv; } protected: - netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // Custom to netlist ... virtual void nl_register_devices(netlist::nlparse_t &parser) const { } @@ -168,7 +168,7 @@ public: static constexpr const unsigned MDIV_SHIFT = 16; // construction/destruction - netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(1'000'000'000)); ~netlist_mame_cpu_device() { @@ -273,7 +273,7 @@ class netlist_mame_sound_device : public netlist_mame_device, { public: // construction/destruction - netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); netlist_mame_sound_device & set_source(void (*setup_func)(netlist::nlparse_t &)) { @@ -378,7 +378,7 @@ public: // construction/destruction netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name); - netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_name(const char *param_name) { m_param_name = param_name; } @@ -422,7 +422,7 @@ public: typedef device_delegate output_delegate; // construction/destruction - netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_params(const char *in_name, T &&... args) @@ -452,7 +452,7 @@ public: typedef device_delegate output_delegate; // construction/destruction - netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_params(const char *in_name, T &&... args) { @@ -481,11 +481,11 @@ public: // construction/destruction netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name, const uint32_t shift, const uint32_t mask) - : netlist_mame_int_input_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_int_input_device(mconfig, tag, owner) { set_params(param_name, mask, shift); } - netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(const char *param_name, const uint32_t mask, const uint32_t shift); @@ -523,11 +523,11 @@ class netlist_mame_logic_input_device : public device_t, public netlist_mame_sub public: // construction/destruction netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name, const uint32_t shift) - : netlist_mame_logic_input_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_logic_input_device(mconfig, tag, owner) { set_params(param_name, shift); } - netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(const char *param_name, const uint32_t shift); @@ -562,7 +562,7 @@ class netlist_mame_ram_pointer_device : public device_t, public netlist_mame_sub { public: // construction/destruction - netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *pname); uint8_t* ptr() const { return m_data; } @@ -592,11 +592,11 @@ class netlist_mame_stream_input_device : public device_t, public netlist_mame_su public: // construction/destruction netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, int channel, const char *param_name) - : netlist_mame_stream_input_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_stream_input_device(mconfig, tag, owner) { set_params(channel, param_name); } - netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(int channel, const char *param_name); @@ -618,11 +618,11 @@ class netlist_mame_stream_output_device : public device_t, public netlist_mame_s public: // construction/destruction netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, int channel, const char *out_name) - : netlist_mame_stream_output_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_stream_output_device(mconfig, tag, owner) { set_params(channel, out_name); } - netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(int channel, const char *out_name); diff --git a/src/devices/machine/nmc9306.cpp b/src/devices/machine/nmc9306.cpp index b2fd50626f9..b85e13a860b 100644 --- a/src/devices/machine/nmc9306.cpp +++ b/src/devices/machine/nmc9306.cpp @@ -104,7 +104,7 @@ inline void nmc9306_device::erase(offs_t offset) // nmc9306_device - constructor //------------------------------------------------- -nmc9306_device::nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nmc9306_device::nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NMC9306, tag, owner, clock), device_nvram_interface(mconfig, *this), m_state(STATE_IDLE), diff --git a/src/devices/machine/nmc9306.h b/src/devices/machine/nmc9306.h index 98566a9ab82..06c9ca9b82a 100644 --- a/src/devices/machine/nmc9306.h +++ b/src/devices/machine/nmc9306.h @@ -31,7 +31,7 @@ class nmc9306_device : public device_t, { public: // construction/destruction - nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( cs_w ); DECLARE_WRITE_LINE_MEMBER( sk_w ); diff --git a/src/devices/machine/nmk112.cpp b/src/devices/machine/nmk112.cpp index 4de5062ac14..31d03399b26 100644 --- a/src/devices/machine/nmk112.cpp +++ b/src/devices/machine/nmk112.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(NMK112, nmk112_device, "nmk112", "NMK112") -nmk112_device::nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nmk112_device::nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NMK112, tag, owner, clock) , m_page_mask(0xff) , m_rom0(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/nmk112.h b/src/devices/machine/nmk112.h index 5535d94899b..72cea1c841b 100644 --- a/src/devices/machine/nmk112.h +++ b/src/devices/machine/nmk112.h @@ -18,7 +18,7 @@ class nmk112_device : public device_t { public: - nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template nmk112_device &set_rom0_tag(T &&tag) { m_rom0.set_tag(std::forward(tag)); return *this; } diff --git a/src/devices/machine/ns32081.cpp b/src/devices/machine/ns32081.cpp index a436a823582..2face6ef7c4 100644 --- a/src/devices/machine/ns32081.cpp +++ b/src/devices/machine/ns32081.cpp @@ -81,7 +81,7 @@ enum size_code : unsigned SIZE_D = 3, }; -ns32081_device::ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32081_device::ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32081, tag, owner, clock) , ns32000_slow_slave_interface(mconfig, *this) { diff --git a/src/devices/machine/ns32081.h b/src/devices/machine/ns32081.h index e73fa8013f6..6dfa03fca24 100644 --- a/src/devices/machine/ns32081.h +++ b/src/devices/machine/ns32081.h @@ -13,7 +13,7 @@ class ns32081_device , public ns32000_slow_slave_interface { public: - ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void state_add(device_state_interface &parent, int &index) override; diff --git a/src/devices/machine/ns32082.cpp b/src/devices/machine/ns32082.cpp index fa70331b584..b0f7f41181e 100644 --- a/src/devices/machine/ns32082.cpp +++ b/src/devices/machine/ns32082.cpp @@ -145,7 +145,7 @@ enum st_mask : unsigned ST_SID = 0xf, // slave ID }; -ns32082_device::ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32082_device::ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32082, tag, owner, clock) , ns32000_slow_slave_interface(mconfig, *this) , ns32000_mmu_interface(mconfig, *this) diff --git a/src/devices/machine/ns32082.h b/src/devices/machine/ns32082.h index 83238529e6b..b6ebe06dad3 100644 --- a/src/devices/machine/ns32082.h +++ b/src/devices/machine/ns32082.h @@ -14,7 +14,7 @@ class ns32082_device , public ns32000_mmu_interface { public: - ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void state_add(device_state_interface &parent, int &index) override; diff --git a/src/devices/machine/ns32202.cpp b/src/devices/machine/ns32202.cpp index ba97c22ab06..27603886eac 100644 --- a/src/devices/machine/ns32202.cpp +++ b/src/devices/machine/ns32202.cpp @@ -61,7 +61,7 @@ enum cictl_mask : u8 CICTL_CERH = 0x80, // h-counter error flag }; -ns32202_device::ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32202_device::ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32202, tag, owner, clock) , m_out_int(*this) , m_out_cout(*this) diff --git a/src/devices/machine/ns32202.h b/src/devices/machine/ns32202.h index 7795b205e91..b0e0abe3ffe 100644 --- a/src/devices/machine/ns32202.h +++ b/src/devices/machine/ns32202.h @@ -16,7 +16,7 @@ public: template void ir_w(int state); template void map(address_map &map); - ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/machine/ns32382.cpp b/src/devices/machine/ns32382.cpp index 132c37c7b3f..218dce0634f 100644 --- a/src/devices/machine/ns32382.cpp +++ b/src/devices/machine/ns32382.cpp @@ -143,7 +143,7 @@ enum st_mask : unsigned ST_SID = 0xf, // slave ID }; -ns32382_device::ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32382_device::ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32382, tag, owner, clock) , ns32000_fast_slave_interface(mconfig, *this) , ns32000_mmu_interface(mconfig, *this) diff --git a/src/devices/machine/ns32382.h b/src/devices/machine/ns32382.h index d7730a70d68..e0083295b92 100644 --- a/src/devices/machine/ns32382.h +++ b/src/devices/machine/ns32382.h @@ -14,7 +14,7 @@ class ns32382_device , public ns32000_mmu_interface { public: - ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // ns32000_slave_interface overrides virtual void state_add(device_state_interface &parent, int &index) override; diff --git a/src/devices/machine/nsc810.cpp b/src/devices/machine/nsc810.cpp index a416e6ccca4..dcbf5cc2ff6 100644 --- a/src/devices/machine/nsc810.cpp +++ b/src/devices/machine/nsc810.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(NSC810, nsc810_device, "nsc810", "National Semiconductor NSC810 RAM-I/O-Timer") -nsc810_device::nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nsc810_device::nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NSC810, tag, owner, clock), m_portA_latch(0), m_portB_latch(0), m_portC_latch(0), m_ddrA(0), m_ddrB(0), m_ddrC(0), diff --git a/src/devices/machine/nsc810.h b/src/devices/machine/nsc810.h index 08a35465cc4..f039d5ccffc 100644 --- a/src/devices/machine/nsc810.h +++ b/src/devices/machine/nsc810.h @@ -16,21 +16,14 @@ class nsc810_device : public device_t { public: // construction/destruction - nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t clk0, uint32_t clk1) - : nsc810_device(mconfig, tag, owner, clock) - { - set_timer0_clock(clk0); - set_timer1_clock(clk1); - } - - nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const XTAL &clk0, const XTAL &clk1) - : nsc810_device(mconfig, tag, owner, clock) + nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clk0, const XTAL &clk1) + : nsc810_device(mconfig, tag, owner) { set_timer0_clock(clk0.value()); set_timer1_clock(clk1.value()); } - nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto portA_read_callback() { return m_portA_r.bind(); } auto portB_read_callback() { return m_portB_r.bind(); } diff --git a/src/devices/machine/nscsi_bus.cpp b/src/devices/machine/nscsi_bus.cpp index eeaf2c2722a..a9596d6b52a 100644 --- a/src/devices/machine/nscsi_bus.cpp +++ b/src/devices/machine/nscsi_bus.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(NSCSI_BUS, nscsi_bus_device, "nscsi_bus", "SCSI B DEFINE_DEVICE_TYPE(NSCSI_CONNECTOR, nscsi_connector, "nscsi_connector", "SCSI Connector Abstraction (new)") -nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NSCSI_BUS, tag, owner, clock), data(0), ctrl(0) { devcnt = 0; @@ -139,7 +139,7 @@ void nscsi_bus_device::device_resolve_objects() } -nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NSCSI_CONNECTOR, tag, owner, clock), device_single_card_slot_interface(mconfig, *this) { @@ -168,7 +168,7 @@ nscsi_slot_card_interface::nscsi_slot_card_interface(const machine_config &mconf { } -nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { scsi_id = scsi_refid = -1; @@ -192,7 +192,7 @@ void nscsi_device::device_start() } -nscsi_full_device::nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nscsi_full_device::nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) { diff --git a/src/devices/machine/nscsi_bus.h b/src/devices/machine/nscsi_bus.h index 6cd99732bf9..62a6394b6e7 100644 --- a/src/devices/machine/nscsi_bus.h +++ b/src/devices/machine/nscsi_bus.h @@ -12,7 +12,7 @@ class nscsi_slot_card_interface; class nscsi_bus_device : public device_t { public: - nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void ctrl_w(int refid, uint32_t lines, uint32_t mask); void data_w(int refid, uint32_t lines); @@ -48,14 +48,14 @@ class nscsi_connector: public device_t, public: template nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false) - : nscsi_connector(mconfig, tag, owner, 0) + : nscsi_connector(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(fixed); } - nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~nscsi_connector(); nscsi_device *get_device(); @@ -131,7 +131,7 @@ public: virtual void scsi_ctrl_changed(); protected: - nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -311,7 +311,7 @@ protected: SBUF_SENSE }; - nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/machine/nscsi_cb.cpp b/src/devices/machine/nscsi_cb.cpp index 5d42caf8265..afd54b4465d 100644 --- a/src/devices/machine/nscsi_cb.cpp +++ b/src/devices/machine/nscsi_cb.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(NSCSI_CB, nscsi_callback_device, "nscsi_cb", "SCSI callback (new)") -nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, NSCSI_CB, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), m_write_rst(*this), diff --git a/src/devices/machine/nscsi_cb.h b/src/devices/machine/nscsi_cb.h index 5cc96b83862..551174e8a8f 100644 --- a/src/devices/machine/nscsi_cb.h +++ b/src/devices/machine/nscsi_cb.h @@ -11,7 +11,7 @@ class nscsi_callback_device : public nscsi_device, public nscsi_slot_card_interface { public: - nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto rst_callback() { return m_write_rst.bind(); } auto atn_callback() { return m_write_atn.bind(); } diff --git a/src/devices/machine/nvram.cpp b/src/devices/machine/nvram.cpp index 84c07477e9a..49f4875e375 100644 --- a/src/devices/machine/nvram.cpp +++ b/src/devices/machine/nvram.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(NVRAM, nvram_device, "nvram", "NVRAM") // nvram_device - constructor //------------------------------------------------- -nvram_device::nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nvram_device::nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NVRAM, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/nvram.h b/src/devices/machine/nvram.h index 58bde56bece..d6ba521c699 100644 --- a/src/devices/machine/nvram.h +++ b/src/devices/machine/nvram.h @@ -32,11 +32,11 @@ public: // construction/destruction nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, default_value value) - : nvram_device(mconfig, tag, owner, 0) + : nvram_device(mconfig, tag, owner) { set_default_value(value); } - nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void set_default_value(default_value value) { m_default_value = value; } diff --git a/src/devices/machine/output_latch.cpp b/src/devices/machine/output_latch.cpp index 7ed407d68f8..58b90b19018 100644 --- a/src/devices/machine/output_latch.cpp +++ b/src/devices/machine/output_latch.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(OUTPUT_LATCH, output_latch_device, "output_latch", "Output Latch") -output_latch_device::output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +output_latch_device::output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OUTPUT_LATCH, tag, owner, clock) , m_bit_handlers(*this) , m_bits{ -1, -1, -1, -1, -1, -1, -1, -1 } diff --git a/src/devices/machine/output_latch.h b/src/devices/machine/output_latch.h index 0e6a87ff6dc..5339af1df2f 100644 --- a/src/devices/machine/output_latch.h +++ b/src/devices/machine/output_latch.h @@ -9,7 +9,7 @@ class output_latch_device : public device_t { public: - output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template auto bit_handler() { return m_bit_handlers[Bit].bind(); } diff --git a/src/devices/machine/pc_fdc.cpp b/src/devices/machine/pc_fdc.cpp index d1668f2381d..8ed951aebdb 100644 --- a/src/devices/machine/pc_fdc.cpp +++ b/src/devices/machine/pc_fdc.cpp @@ -38,7 +38,7 @@ void pc_fdc_xt_device::map(address_map &map) } -pc_fdc_family_device::pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +pc_fdc_family_device::pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), fdc(*this, "upd765"), intrq_cb(*this), drq_cb(*this) @@ -62,7 +62,7 @@ void pc_fdc_family_device::dma_w(uint8_t data) void pc_fdc_family_device::device_add_mconfig(machine_config &config) { - UPD765A(config, fdc, 8'000'000, false, false); + UPD765A(config, fdc, XTAL::u(8'000'000), false, false); fdc->intrq_wr_callback().set(FUNC(pc_fdc_family_device::irq_w)); fdc->drq_wr_callback().set(FUNC(pc_fdc_family_device::drq_w)); } @@ -166,6 +166,6 @@ void pc_fdc_family_device::check_drq() drq_cb(drq); } -pc_fdc_xt_device::pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pc_fdc_family_device(mconfig, PC_FDC_XT, tag, owner, clock) +pc_fdc_xt_device::pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_fdc_family_device(mconfig, PC_FDC_XT, tag, owner, clock) { } diff --git a/src/devices/machine/pc_fdc.h b/src/devices/machine/pc_fdc.h index bbb2f0a9068..da2898e7dba 100644 --- a/src/devices/machine/pc_fdc.h +++ b/src/devices/machine/pc_fdc.h @@ -32,7 +32,7 @@ public: required_device fdc; protected: - pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -54,7 +54,7 @@ private: class pc_fdc_xt_device : public pc_fdc_family_device { public: - pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; void dor_fifo_w(uint8_t data); diff --git a/src/devices/machine/pc_lpt.cpp b/src/devices/machine/pc_lpt.cpp index 26d2357a72b..f8a20439670 100644 --- a/src/devices/machine/pc_lpt.cpp +++ b/src/devices/machine/pc_lpt.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(PC_LPT, pc_lpt_device, "pc_lpt", "PC LPT") -pc_lpt_device::pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_lpt_device::pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_LPT, tag, owner, clock), m_irq(1), m_data(0xff), m_control(0), diff --git a/src/devices/machine/pc_lpt.h b/src/devices/machine/pc_lpt.h index 911c657baa4..d72545a13df 100644 --- a/src/devices/machine/pc_lpt.h +++ b/src/devices/machine/pc_lpt.h @@ -21,7 +21,7 @@ class pc_lpt_device : public device_t { public: - pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/pccard.cpp b/src/devices/machine/pccard.cpp index 83a05b99421..d095712b3b9 100644 --- a/src/devices/machine/pccard.cpp +++ b/src/devices/machine/pccard.cpp @@ -40,7 +40,7 @@ void device_pccard_interface::write_reg(offs_t offset, uint16_t data, uint16_t m DEFINE_DEVICE_TYPE(PCCARD_SLOT, pccard_slot_device, "pccard", "PC Card Slot") -pccard_slot_device::pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pccard_slot_device::pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCCARD_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_pccard(nullptr) diff --git a/src/devices/machine/pccard.h b/src/devices/machine/pccard.h index 9e06018f005..294d9c27403 100644 --- a/src/devices/machine/pccard.h +++ b/src/devices/machine/pccard.h @@ -27,14 +27,14 @@ class pccard_slot_device : public device_t, public device_single_card_slot_inter public: template pccard_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pccard_slot_device(mconfig, tag, owner, (uint32_t)0) + : pccard_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_READ_LINE_MEMBER(read_line_inserted); uint16_t read_memory(offs_t offset, uint16_t mem_mask = ~0); diff --git a/src/devices/machine/pcf8573.cpp b/src/devices/machine/pcf8573.cpp index 791336b4bf5..2b4e630c790 100644 --- a/src/devices/machine/pcf8573.cpp +++ b/src/devices/machine/pcf8573.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(PCF8573, pcf8573_device, "pcf8573", "PCF8573 RTC with Power F // pcf8573_device - constructor //------------------------------------------------- -pcf8573_device::pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcf8573_device::pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8573, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_comp_cb(*this) diff --git a/src/devices/machine/pcf8573.h b/src/devices/machine/pcf8573.h index a6b31e83ed7..00e7211c809 100644 --- a/src/devices/machine/pcf8573.h +++ b/src/devices/machine/pcf8573.h @@ -46,7 +46,7 @@ class pcf8573_device : public device_rtc_interface { public: - pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto comp_cb() { return m_comp_cb.bind(); } auto min_cb() { return m_min_cb.bind(); } diff --git a/src/devices/machine/pcf8583.cpp b/src/devices/machine/pcf8583.cpp index c09a6fce138..a543714eb7c 100644 --- a/src/devices/machine/pcf8583.cpp +++ b/src/devices/machine/pcf8583.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(PCF8583, pcf8583_device, "pcf8583", "PCF8583 RTC with 240x8 R // pcf8583_device - constructor //------------------------------------------------- -pcf8583_device::pcf8583_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcf8583_device::pcf8583_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8583, tag, owner, clock) , device_rtc_interface(mconfig, *this) , device_nvram_interface(mconfig, *this) diff --git a/src/devices/machine/pcf8583.h b/src/devices/machine/pcf8583.h index d5018160788..6f128a0d1e6 100644 --- a/src/devices/machine/pcf8583.h +++ b/src/devices/machine/pcf8583.h @@ -74,7 +74,7 @@ class pcf8583_device : public device_nvram_interface { public: - pcf8583_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcf8583_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_irq_cb.bind(); } diff --git a/src/devices/machine/pcf8584.cpp b/src/devices/machine/pcf8584.cpp index 31d78e73008..f4b4de45f1a 100644 --- a/src/devices/machine/pcf8584.cpp +++ b/src/devices/machine/pcf8584.cpp @@ -52,7 +52,7 @@ const char *const pcf8584_device::s_bus_function[4] = { "NOP", "stop", "start", // pcf8584_device - constructor //------------------------------------------------- -pcf8584_device::pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pcf8584_device::pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8584, tag, owner, clock) , m_sda_callback(*this) , m_sda_out_callback(*this) diff --git a/src/devices/machine/pcf8584.h b/src/devices/machine/pcf8584.h index 68886a7affc..3f59e856b59 100644 --- a/src/devices/machine/pcf8584.h +++ b/src/devices/machine/pcf8584.h @@ -39,7 +39,7 @@ class pcf8584_device : public device_t public: // device type constructor - pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto sda_cb() { return m_sda_callback.bind(); } diff --git a/src/devices/machine/pcf8593.cpp b/src/devices/machine/pcf8593.cpp index 3ba4f1af89b..0e052492d2f 100644 --- a/src/devices/machine/pcf8593.cpp +++ b/src/devices/machine/pcf8593.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(PCF8593, pcf8593_device, "pcf8593", "PCF8593 RTC") // pcf8593_device - constructor //------------------------------------------------- -pcf8593_device::pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcf8593_device::pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8593, tag, owner, clock) , device_rtc_interface(mconfig, *this) , device_nvram_interface(mconfig, *this) diff --git a/src/devices/machine/pcf8593.h b/src/devices/machine/pcf8593.h index 3720ac1bb53..ca9302594fb 100644 --- a/src/devices/machine/pcf8593.h +++ b/src/devices/machine/pcf8593.h @@ -22,7 +22,7 @@ class pcf8593_device : public device_t, public device_nvram_interface { public: - pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER(scl_w); DECLARE_WRITE_LINE_MEMBER(sda_w); diff --git a/src/devices/machine/pci-apic.cpp b/src/devices/machine/pci-apic.cpp index 2a7c1a26261..b4818b12607 100644 --- a/src/devices/machine/pci-apic.cpp +++ b/src/devices/machine/pci-apic.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(APIC, apic_device, "apic", "I/O Advanced Programmable Interrupt Controller") -apic_device::apic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apic_device::apic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, APIC, tag, owner, clock) { } diff --git a/src/devices/machine/pci-apic.h b/src/devices/machine/pci-apic.h index ede3d80baf3..8d0056bb53d 100644 --- a/src/devices/machine/pci-apic.h +++ b/src/devices/machine/pci-apic.h @@ -9,12 +9,12 @@ class apic_device : public pci_device { public: - apic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) + apic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) : apic_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x080010, subdevice_id); } - apic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/pci-ide.cpp b/src/devices/machine/pci-ide.cpp index b24a944eb3b..6e37acfc321 100644 --- a/src/devices/machine/pci-ide.cpp +++ b/src/devices/machine/pci-ide.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(IDE_PCI, ide_pci_device, "ide_pci", "PCI IDE interface") -ide_pci_device::ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ide_pci_device::ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, IDE_PCI, tag, owner, clock), m_ide(*this, "ide"), m_ide2(*this, "ide2"), diff --git a/src/devices/machine/pci-ide.h b/src/devices/machine/pci-ide.h index af3d7ae0a4d..1cad2df5bff 100644 --- a/src/devices/machine/pci-ide.h +++ b/src/devices/machine/pci-ide.h @@ -21,14 +21,14 @@ TODO: class ide_pci_device : public pci_device { public: - ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id + ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t main_id, uint32_t revision, uint32_t subdevice_id , const char *bmtag = ":pci:00.0", uint32_t bmspace = AS_DATA) - : ide_pci_device(mconfig, tag, owner, clock) + : ide_pci_device(mconfig, tag, owner) { set_ids(main_id, revision, 0x01018a, subdevice_id); m_bus_master_space.set_tag(bmtag, bmspace); } - ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/pci-sata.cpp b/src/devices/machine/pci-sata.cpp index 1332fea71d5..78ef30f631a 100644 --- a/src/devices/machine/pci-sata.cpp +++ b/src/devices/machine/pci-sata.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(SATA, sata_device, "sata", "SATA AHCI interface") -sata_device::sata_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sata_device::sata_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SATA, tag, owner, clock) { } diff --git a/src/devices/machine/pci-sata.h b/src/devices/machine/pci-sata.h index edf3545c1d7..803e034cdc4 100644 --- a/src/devices/machine/pci-sata.h +++ b/src/devices/machine/pci-sata.h @@ -9,12 +9,12 @@ class sata_device : public pci_device { public: - sata_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) + sata_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) : sata_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x01018a, subdevice_id); } - sata_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sata_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/pci-smbus.cpp b/src/devices/machine/pci-smbus.cpp index 62a4f99cbb7..15f218ae8cb 100644 --- a/src/devices/machine/pci-smbus.cpp +++ b/src/devices/machine/pci-smbus.cpp @@ -28,7 +28,7 @@ void smbus_device::map(address_map &map) map(0x17, 0x17).r(FUNC(smbus_device::notify_dhigh_r)); } -smbus_device::smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smbus_device::smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SMBUS, tag, owner, clock) { } diff --git a/src/devices/machine/pci-smbus.h b/src/devices/machine/pci-smbus.h index 9c7cd79aa74..fa834666b46 100644 --- a/src/devices/machine/pci-smbus.h +++ b/src/devices/machine/pci-smbus.h @@ -7,12 +7,12 @@ class smbus_device : public pci_device { public: - smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) + smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) : smbus_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0500, subdevice_id); } - smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/pci-usb.cpp b/src/devices/machine/pci-usb.cpp index 0b45c1bd9ee..28523013576 100644 --- a/src/devices/machine/pci-usb.cpp +++ b/src/devices/machine/pci-usb.cpp @@ -11,7 +11,7 @@ void usb_ohci_device::map(address_map &map) { } -usb_ohci_device::usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +usb_ohci_device::usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, USB_OHCI, tag, owner, clock) { } @@ -31,7 +31,7 @@ void usb_uhci_device::map(address_map &map) { } -usb_uhci_device::usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +usb_uhci_device::usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, USB_UHCI, tag, owner, clock) { } @@ -51,7 +51,7 @@ void usb_ehci_device::map(address_map &map) { } -usb_ehci_device::usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +usb_ehci_device::usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, USB_EHCI, tag, owner, clock) { } diff --git a/src/devices/machine/pci-usb.h b/src/devices/machine/pci-usb.h index 388fa28b24d..d5dca213873 100644 --- a/src/devices/machine/pci-usb.h +++ b/src/devices/machine/pci-usb.h @@ -9,12 +9,12 @@ class usb_ohci_device : public pci_device { public: - usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) + usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) : usb_ohci_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0310, subdevice_id); } - usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -26,12 +26,12 @@ private: class usb_uhci_device : public pci_device { public: - usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) + usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) : usb_uhci_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0300, subdevice_id); } - usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -43,12 +43,12 @@ private: class usb_ehci_device : public pci_device { public: - usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) + usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) : usb_ehci_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0320, subdevice_id); } - usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp index c0f2676ca56..3016307ee19 100644 --- a/src/devices/machine/pci.cpp +++ b/src/devices/machine/pci.cpp @@ -69,7 +69,7 @@ void pci_bridge_device::config_map(address_map &map) map(0x3e, 0x3f).rw(FUNC(pci_bridge_device::bridge_control_r), FUNC(pci_bridge_device::bridge_control_w)); } -pci_device::pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pci_device::pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_region(*this, DEVICE_SELF) { @@ -446,7 +446,7 @@ void pci_device::set_map_flags(int id, int flags) remap_cb(); } -agp_device::agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +agp_device::agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, type, tag, owner, clock) { } @@ -463,12 +463,12 @@ void agp_device::device_reset() -pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, PCI_BRIDGE, tag, owner, clock) { } -pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20) @@ -844,7 +844,7 @@ void pci_bridge_device::bridge_control_w(offs_t offset, uint16_t data, uint16_t } -agp_bridge_device::agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +agp_bridge_device::agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, type, tag, owner, clock) { } @@ -868,7 +868,7 @@ void pci_host_device::io_configuration_access_map(address_map &map) } -pci_host_device::pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pci_host_device::pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, type, tag, owner, clock) { } @@ -956,7 +956,7 @@ void pci_host_device::root_config_write(uint8_t bus, uint8_t device, uint16_t re } -pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCI_ROOT, tag, owner, clock) { } diff --git a/src/devices/machine/pci.h b/src/devices/machine/pci.h index 53e1a6be3d1..7f14ef1df84 100644 --- a/src/devices/machine/pci.h +++ b/src/devices/machine/pci.h @@ -72,7 +72,7 @@ public: void interrupt_pin_w(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); protected: - pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); optional_memory_region m_region; @@ -136,7 +136,7 @@ protected: class agp_device : public pci_device { protected: - agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -144,12 +144,12 @@ protected: class pci_bridge_device : public pci_device, public device_memory_interface { public: - pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision) + pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision) : pci_bridge_device(mconfig, tag, owner, clock) { set_ids_bridge(main_id, revision); } - pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void set_remap_cb(mapper_cb _remap_cb) override; virtual void map_device(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, @@ -201,7 +201,7 @@ protected: AS_PCI_CONFIG = 0 }; - pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -232,7 +232,7 @@ private: class agp_bridge_device : public pci_bridge_device { protected: - agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -243,7 +243,7 @@ public: void io_configuration_access_map(address_map &map); protected: - pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint32_t config_address_r(); void config_address_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); @@ -271,7 +271,7 @@ protected: class pci_root_device : public device_t { public: - pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/pci9050.cpp b/src/devices/machine/pci9050.cpp index 9f5c63c621e..280a7559a52 100644 --- a/src/devices/machine/pci9050.cpp +++ b/src/devices/machine/pci9050.cpp @@ -39,7 +39,7 @@ void pci9050_device::map(address_map &map) map(0x50, 0x53).rw(FUNC(pci9050_device::cntrl_r), FUNC(pci9050_device::cntrl_w)); } -pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, PCI9050, tag, owner, clock) , m_user_input_handler(*this), m_user_output_handler(*this) { diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index c2b46fbe4b7..76a77753799 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -278,20 +278,20 @@ const at_keyboard_device::extended_keyboard_code at_keyboard_device::m_extended_ DEFINE_DEVICE_TYPE(PC_KEYB, pc_keyboard_device, "pc_keyb", "PC Keyboard") DEFINE_DEVICE_TYPE(AT_KEYB, at_keyboard_device, "at_keyb", "AT Keyboard") -pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_keyboard_device(mconfig, PC_KEYB, tag, owner, clock) { m_type = KEYBOARD_TYPE::PC; } -pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_ioport(*this, "pc_keyboard_%u", 0), m_out_keypress_func(*this) { } -at_keyboard_device::at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +at_keyboard_device::at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_keyboard_device(mconfig, AT_KEYB, tag, owner, clock), m_leds(*this, "led%u", 0U), m_scan_code_set(1) diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h index e52981b10c4..a3a2ee77d70 100644 --- a/src/devices/machine/pckeybrd.h +++ b/src/devices/machine/pckeybrd.h @@ -20,7 +20,7 @@ class pc_keyboard_device : public device_t { public: - pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read(); void enable(int state); @@ -35,7 +35,7 @@ public: }; protected: - pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; @@ -80,12 +80,12 @@ class at_keyboard_device : public pc_keyboard_device { public: at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, KEYBOARD_TYPE type, int default_set) - : at_keyboard_device(mconfig, tag, owner, 0) + : at_keyboard_device(mconfig, tag, owner) { set_type(type, default_set); } - at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void write(uint8_t data); diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp index 2a482d8a236..6e2fd04a001 100644 --- a/src/devices/machine/pdc.cpp +++ b/src/devices/machine/pdc.cpp @@ -256,7 +256,7 @@ void pdc_device::device_add_mconfig(machine_config &config) //config.m_perfect_cpu_quantum = subtag(M6502_TAG); /* Floppy Disk Controller - uPD765a - NEC D765AC-2 */ - UPD765A(config, m_fdc, 4'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(4'000'000), true, true); m_fdc->intrq_wr_callback().set(FUNC(pdc_device::fdc_irq)); m_fdc->drq_wr_callback().set(m_dma8237, FUNC(am9517a_device::dreq0_w)); //.invert(); @@ -279,7 +279,7 @@ void pdc_device::device_add_mconfig(machine_config &config) /* Hard Disk Controller - HDC9224 */ // TODO: connect the HDC lines - HDC9224(config, HDC_TAG, 0); + HDC9224(config, HDC_TAG); MFM_HD_CONNECTOR(config, "h1", pdc_harddisks, nullptr, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT); } @@ -297,7 +297,7 @@ ioport_constructor pdc_device::device_input_ports() const // pdc_device - constructor //------------------------------------------------- -pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PDC, tag, owner, clock), m_pdccpu(*this, Z80_TAG), m_dma8237(*this, FDCDMA_TAG), @@ -347,7 +347,7 @@ void pdc_device::device_reset() /* Reset CPU */ m_pdccpu->reset(); - m_fdc->set_rate(500000) ; + m_fdc->set_rate(XTAL::u(500000)) ; } //------------------------------------------------- diff --git a/src/devices/machine/pdc.h b/src/devices/machine/pdc.h index 416354b9c48..b301ad1aa13 100644 --- a/src/devices/machine/pdc.h +++ b/src/devices/machine/pdc.h @@ -34,7 +34,7 @@ class pdc_device : public device_t { public: /* Constructor and Destructor */ - pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* Callbacks */ auto m68k_r_callback() { return m_m68k_r_cb.bind(); } diff --git a/src/devices/machine/phi.cpp b/src/devices/machine/phi.cpp index 7659a0359a1..38aafef40f9 100644 --- a/src/devices/machine/phi.cpp +++ b/src/devices/machine/phi.cpp @@ -187,7 +187,7 @@ constexpr uint8_t CONTROLLER_ADDR = 0x1e; // PHI always has this address when DEFINE_DEVICE_TYPE(PHI, phi_device, "hp_phi", "HP Processor-to-HPIB Interface") // Constructors -phi_device::phi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +phi_device::phi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_dio_read_func(*this), m_dio_write_func(*this), @@ -198,7 +198,7 @@ phi_device::phi_device(const machine_config &mconfig, device_type type, const ch { } -phi_device::phi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +phi_device::phi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : phi_device(mconfig, PHI, tag, owner, clock) { } diff --git a/src/devices/machine/phi.h b/src/devices/machine/phi.h index 4eb74b6bbca..bdb73bc5ed6 100644 --- a/src/devices/machine/phi.h +++ b/src/devices/machine/phi.h @@ -16,7 +16,7 @@ class phi_device : public device_t { public: // construction/destruction - phi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + phi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // See ieee488.h enum phi_488_signal_t @@ -90,7 +90,7 @@ public: uint8_t reg8_r(offs_t offset); protected: - phi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + phi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/pic8259.cpp b/src/devices/machine/pic8259.cpp index 385f38cfbdb..8abb6271055 100644 --- a/src/devices/machine/pic8259.cpp +++ b/src/devices/machine/pic8259.cpp @@ -468,7 +468,7 @@ DEFINE_DEVICE_TYPE(PIC8259, pic8259_device, "pic8259", "Intel 8259 PIC") DEFINE_DEVICE_TYPE(V5X_ICU, v5x_icu_device, "v5x_icu", "NEC V5X ICU") DEFINE_DEVICE_TYPE(MK98PIC, mk98pic_device, "mk98pic", "Elektronika MK-98 PIC") -pic8259_device::pic8259_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pic8259_device::pic8259_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_out_int_func(*this) , m_in_sp_func(*this) @@ -479,17 +479,17 @@ pic8259_device::pic8259_device(const machine_config &mconfig, device_type type, { } -pic8259_device::pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic8259_device::pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic8259_device(mconfig, PIC8259, tag, owner, clock) { } -v5x_icu_device::v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v5x_icu_device::v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic8259_device(mconfig, V5X_ICU, tag, owner, clock) { } -mk98pic_device::mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mk98pic_device::mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic8259_device(mconfig, MK98PIC, tag, owner, clock) { } diff --git a/src/devices/machine/pic8259.h b/src/devices/machine/pic8259.h index 333cadced09..02bfd57935f 100644 --- a/src/devices/machine/pic8259.h +++ b/src/devices/machine/pic8259.h @@ -31,7 +31,7 @@ class pic8259_device : public device_t { public: - pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_int_callback() { return m_out_int_func.bind(); } // Interrupt request output to CPU or master 8259 (active high) auto in_sp_callback() { return m_in_sp_func.bind(); } // Slave program select (VCC = master; GND = slave; pin becomes EN output in buffered mode) @@ -53,7 +53,7 @@ public: IRQ_CALLBACK_MEMBER(inta_cb); protected: - pic8259_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pic8259_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -119,7 +119,7 @@ private: class v5x_icu_device : public pic8259_device { public: - v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual bool is_x86() const override { return true; } @@ -128,7 +128,7 @@ protected: class mk98pic_device : public pic8259_device { public: - mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual bool is_x86() const override { return true; } diff --git a/src/devices/machine/pit8253.cpp b/src/devices/machine/pit8253.cpp index fc7c79cc289..8778a6b9f1a 100644 --- a/src/devices/machine/pit8253.cpp +++ b/src/devices/machine/pit8253.cpp @@ -46,17 +46,17 @@ DEFINE_DEVICE_TYPE(PIT8253, pit8253_device, "pit8253", "Intel 8253 PIT") DEFINE_DEVICE_TYPE(PIT8254, pit8254_device, "pit8254", "Intel 8254 PIT") DEFINE_DEVICE_TYPE(FE2010_PIT, fe2010_pit_device, "fe2010_pit", "Faraday FE2010 PIT") -pit_counter_device::pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pit_counter_device::pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PIT_COUNTER, tag, owner, clock) { } -pit8253_device::pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pit8253_device::pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit8253_device(mconfig, PIT8253, tag, owner, clock, pit_type::I8253) { } -pit8253_device::pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, pit_type chip_type) : +pit8253_device::pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, pit_type chip_type) : device_t(mconfig, type, tag, owner, clock), m_clk{0, 0, 0}, m_out_handler(*this), @@ -66,12 +66,12 @@ pit8253_device::pit8253_device(const machine_config &mconfig, device_type type, } -pit8254_device::pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pit8254_device::pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit8253_device(mconfig, PIT8254, tag, owner, clock, pit_type::I8254) { } -fe2010_pit_device::fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +fe2010_pit_device::fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit8253_device(mconfig, FE2010_PIT, tag, owner, clock, pit_type::FE2010) { } @@ -82,9 +82,9 @@ fe2010_pit_device::fe2010_pit_device(const machine_config &mconfig, const char * void pit8253_device::device_add_mconfig(machine_config &config) { - PIT_COUNTER(config, "counter0", 0); - PIT_COUNTER(config, "counter1", 0); - PIT_COUNTER(config, "counter2", 0); + PIT_COUNTER(config, "counter0"); + PIT_COUNTER(config, "counter1"); + PIT_COUNTER(config, "counter2"); } diff --git a/src/devices/machine/pit8253.h b/src/devices/machine/pit8253.h index 0c069a217d8..64b164ff851 100644 --- a/src/devices/machine/pit8253.h +++ b/src/devices/machine/pit8253.h @@ -44,7 +44,7 @@ class pit_counter_device : public device_t public: // construction/destruction - pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -109,7 +109,7 @@ class pit8253_device : public device_t public: // construction/destruction - pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template void set_clk(double clk) { m_clk[N] = clk; } @@ -140,7 +140,7 @@ public: void set_clockin(int timer, double new_clockin) { m_counter[timer]->set_clockin(new_clockin); } protected: - pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, pit_type chip_type); + pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, pit_type chip_type); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -162,7 +162,7 @@ DECLARE_DEVICE_TYPE(PIT8253, pit8253_device) class pit8254_device : public pit8253_device { public: - pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void readback_command(uint8_t data) override; @@ -173,7 +173,7 @@ DECLARE_DEVICE_TYPE(PIT8254, pit8254_device) class fe2010_pit_device : public pit8253_device { public: - fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(FE2010_PIT, fe2010_pit_device) diff --git a/src/devices/machine/pla.cpp b/src/devices/machine/pla.cpp index fe72d5b12c8..a0f395c2d7c 100644 --- a/src/devices/machine/pla.cpp +++ b/src/devices/machine/pla.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(MOS8721, mos8721_device, "mos8721", "MOS 8721 PLA") // pla_device - constructor //------------------------------------------------- -pla_device::pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pla_device::pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_region(*this, DEVICE_SELF) , m_format(FMT::JEDBIN) @@ -37,12 +37,12 @@ pla_device::pla_device(const machine_config &mconfig, device_type type, const ch { } -pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pla_device(mconfig, PLA, tag, owner, clock) { } -pls100_device::pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pls100_device::pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pla_device(mconfig, PLS100, tag, owner, clock) { set_num_inputs(16); @@ -50,7 +50,7 @@ pls100_device::pls100_device(const machine_config &mconfig, const char *tag, dev set_num_terms(48); } -mos8721_device::mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8721_device::mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pla_device(mconfig, MOS8721, tag, owner, clock) { // TODO: actual number of terms is unknown diff --git a/src/devices/machine/pla.h b/src/devices/machine/pla.h index 548ab4bf16b..0c201b28e73 100644 --- a/src/devices/machine/pla.h +++ b/src/devices/machine/pla.h @@ -48,10 +48,10 @@ public: }; // construction/destruction - pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pla_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); + pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t inputs, uint32_t outputs, uint32_t terms) - : pla_device(mconfig, tag, owner, (uint32_t)0) + : pla_device(mconfig, tag, owner) { set_num_inputs(inputs); set_num_outputs(outputs); @@ -107,13 +107,13 @@ private: class pls100_device : public pla_device { public: - pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class mos8721_device : public pla_device { public: - mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(PLA, pla_device) diff --git a/src/devices/machine/ps2dma.cpp b/src/devices/machine/ps2dma.cpp index 6e143123fb0..0c7db188a48 100644 --- a/src/devices/machine/ps2dma.cpp +++ b/src/devices/machine/ps2dma.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_DMAC, ps2_dmac_device, "ps2dmac", "PlayStation 2 EE DMAC") -ps2_dmac_device::ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_dmac_device::ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_DMAC, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_ee(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/ps2dma.h b/src/devices/machine/ps2dma.h index b602999de28..8b40bad7975 100644 --- a/src/devices/machine/ps2dma.h +++ b/src/devices/machine/ps2dma.h @@ -22,7 +22,7 @@ class ps2_dmac_device : public device_t, public device_execute_interface { public: template - ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&ee_tag, U &&ram_tag, V &&sif_tag, W &&gs_tag, X &&vu1_tag) + ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&ee_tag, U &&ram_tag, V &&sif_tag, W &&gs_tag, X &&vu1_tag) : ps2_dmac_device(mconfig, tag, owner, clock) { m_ee.set_tag(std::forward(ee_tag)); @@ -32,7 +32,7 @@ public: m_vu1.set_tag(std::forward(vu1_tag)); } - ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~ps2_dmac_device() override; enum channel_type : uint32_t diff --git a/src/devices/machine/ps2intc.cpp b/src/devices/machine/ps2intc.cpp index 10b6602606e..0ea4d1b414c 100644 --- a/src/devices/machine/ps2intc.cpp +++ b/src/devices/machine/ps2intc.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_INTC, ps2_intc_device, "ps2intc", "PlayStation 2 EE INTC") -ps2_intc_device::ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_intc_device::ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_INTC, tag, owner, clock) , m_ee(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/ps2intc.h b/src/devices/machine/ps2intc.h index 111c343372f..fa97d6a5693 100644 --- a/src/devices/machine/ps2intc.h +++ b/src/devices/machine/ps2intc.h @@ -23,12 +23,12 @@ class ps2_intc_device : public device_t public: template ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&ee_tag) - : ps2_intc_device(mconfig, tag, owner, (uint32_t)0) + : ps2_intc_device(mconfig, tag, owner) { m_ee.set_tag(std::forward(ee_tag)); } - ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_intc_device() override; uint32_t read(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/ps2mc.cpp b/src/devices/machine/ps2mc.cpp index b253f6153b7..5c80c1da8a4 100644 --- a/src/devices/machine/ps2mc.cpp +++ b/src/devices/machine/ps2mc.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_MC, ps2_mc_device, "ps2mc", "PlayStation 2 Memory Car /*static*/ const size_t ps2_mc_device::BUFFER_SIZE = 512; // Total guess /*static*/ const uint8_t ps2_mc_device::DEFAULT_TERMINATOR = 0x55; -ps2_mc_device::ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_mc_device::ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_MC, tag, owner, clock) { } diff --git a/src/devices/machine/ps2mc.h b/src/devices/machine/ps2mc.h index ef38dea72c2..fe79fb0baaa 100644 --- a/src/devices/machine/ps2mc.h +++ b/src/devices/machine/ps2mc.h @@ -17,12 +17,7 @@ class ps2_mc_device : public device_t { public: - ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ps2_mc_device(mconfig, tag, owner, (uint32_t)0) - { - } - - ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_mc_device() override; void recv_fifo_push(uint8_t data); // TODO: Turn me into a bus interface! diff --git a/src/devices/machine/ps2pad.cpp b/src/devices/machine/ps2pad.cpp index 64e1009a331..17afcca7e4d 100644 --- a/src/devices/machine/ps2pad.cpp +++ b/src/devices/machine/ps2pad.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_PAD, ps2_pad_device, "ps2pad", "Sony DualShock 2") /*static*/ const size_t ps2_pad_device::BUFFER_SIZE = 64; // Total guess -ps2_pad_device::ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_pad_device::ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_PAD, tag, owner, clock) { } diff --git a/src/devices/machine/ps2pad.h b/src/devices/machine/ps2pad.h index 2b384fd0818..7e3962727dc 100644 --- a/src/devices/machine/ps2pad.h +++ b/src/devices/machine/ps2pad.h @@ -17,12 +17,7 @@ class ps2_pad_device : public device_t { public: - ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ps2_pad_device(mconfig, tag, owner, (uint32_t)0) - { - } - - ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_pad_device() override; void recv_fifo_push(uint8_t data); // TODO: Turn me into a bus interface! diff --git a/src/devices/machine/ps2sif.cpp b/src/devices/machine/ps2sif.cpp index b6fd6d5cfe7..a5ab0b46949 100644 --- a/src/devices/machine/ps2sif.cpp +++ b/src/devices/machine/ps2sif.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_SIF, ps2_sif_device, "ps2sif", "PlayStation 2 SIF") /*static*/ const size_t ps2_sif_device::MAX_FIFO_DEPTH = 0x20; -ps2_sif_device::ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_sif_device::ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_SIF, tag, owner, clock) , m_intc(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/ps2sif.h b/src/devices/machine/ps2sif.h index 83fe5f4a076..63686bd9714 100644 --- a/src/devices/machine/ps2sif.h +++ b/src/devices/machine/ps2sif.h @@ -21,12 +21,12 @@ class ps2_sif_device : public device_t public: template ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&intc_tag) - : ps2_sif_device(mconfig, tag, owner, (uint32_t)0) + : ps2_sif_device(mconfig, tag, owner) { m_intc.set_tag(std::forward(intc_tag)); } - ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_sif_device() override; uint32_t ee_r(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/ps2timer.cpp b/src/devices/machine/ps2timer.cpp index 667fed7622c..f2c44c274a0 100644 --- a/src/devices/machine/ps2timer.cpp +++ b/src/devices/machine/ps2timer.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_TIMER, ps2_timer_device, "ps2timer", "PlayStation 2 EE Core Timer") -ps2_timer_device::ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_timer_device::ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_TIMER, tag, owner, clock) , m_compare_timer(nullptr) , m_overflow_timer(nullptr) diff --git a/src/devices/machine/ps2timer.h b/src/devices/machine/ps2timer.h index f7cd398f938..5761467ca62 100644 --- a/src/devices/machine/ps2timer.h +++ b/src/devices/machine/ps2timer.h @@ -17,13 +17,13 @@ class ps2_timer_device : public device_t { public: - ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool can_hold) + ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool can_hold) : ps2_timer_device(mconfig, tag, owner, clock) { m_can_hold = can_hold; } - ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset, uint32_t mem_mask = ~0); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/pxa255.cpp b/src/devices/machine/pxa255.cpp index d387347dd98..e86ea8d607c 100644 --- a/src/devices/machine/pxa255.cpp +++ b/src/devices/machine/pxa255.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(PXA255_PERIPHERALS, pxa255_periphs_device, "pxa255_periphs", "Intel XScale PXA255 Peripherals") -pxa255_periphs_device::pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pxa255_periphs_device::pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PXA255_PERIPHERALS, tag, owner, clock) , m_gpio0_w(*this) , m_gpio1_w(*this) diff --git a/src/devices/machine/pxa255.h b/src/devices/machine/pxa255.h index 75eadbac2c5..4c4d5c8b742 100644 --- a/src/devices/machine/pxa255.h +++ b/src/devices/machine/pxa255.h @@ -26,13 +26,13 @@ class pxa255_periphs_device : public device_t { public: template - pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : pxa255_periphs_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); } - pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto gpio0_write() { return m_gpio0_w.bind(); } auto gpio0_read() { return m_gpio0_r.bind(); } diff --git a/src/devices/machine/r10696.cpp b/src/devices/machine/r10696.cpp index ce9140ef7d5..8f9c6a20ce6 100644 --- a/src/devices/machine/r10696.cpp +++ b/src/devices/machine/r10696.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(R10696, r10696_device, "r10696", "Rockwell 10696 GPIO") -r10696_device::r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r10696_device::r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, R10696, tag, owner, clock) , m_io_a(0), m_io_b(0), m_io_c(0) , m_iord(*this), m_iowr(*this) diff --git a/src/devices/machine/r10696.h b/src/devices/machine/r10696.h index dc33c4519f3..394fab6d36b 100644 --- a/src/devices/machine/r10696.h +++ b/src/devices/machine/r10696.h @@ -22,7 +22,7 @@ class r10696_device : public device_t { public: - r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t io_r(offs_t offset); void io_w(offs_t offset, uint8_t data); diff --git a/src/devices/machine/r10788.cpp b/src/devices/machine/r10788.cpp index 4a8a8161ad5..2244098c4cc 100644 --- a/src/devices/machine/r10788.cpp +++ b/src/devices/machine/r10788.cpp @@ -54,7 +54,7 @@ DEFINE_DEVICE_TYPE(R10788, r10788_device, "r10788", "Rockwell 10788 KDC") -r10788_device::r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r10788_device::r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, R10788, tag, owner, clock) , m_ktr(0), m_kts(0), m_kla(0), m_klb(0), m_mask_a(15), m_mask_b(15), m_ker(0) , m_io_counter(0), m_scan_counter(0) diff --git a/src/devices/machine/r10788.h b/src/devices/machine/r10788.h index 9a94ad65b5c..7dea3287001 100644 --- a/src/devices/machine/r10788.h +++ b/src/devices/machine/r10788.h @@ -21,7 +21,7 @@ class r10788_device : public device_t { public: - r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { KTR = 0xc, //!< Transfer Keyboard Return diff --git a/src/devices/machine/ra17xx.cpp b/src/devices/machine/ra17xx.cpp index eebdc134727..24d50fdcd21 100644 --- a/src/devices/machine/ra17xx.cpp +++ b/src/devices/machine/ra17xx.cpp @@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(RA17XX, ra17xx_device, "ra17xx", "Rockwell A17xx") -ra17xx_device::ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ra17xx_device::ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RA17XX, tag, owner, clock) , m_enable(false) , m_iord(*this) diff --git a/src/devices/machine/ra17xx.h b/src/devices/machine/ra17xx.h index 54e4fc9028f..28a6b04c71d 100644 --- a/src/devices/machine/ra17xx.h +++ b/src/devices/machine/ra17xx.h @@ -22,7 +22,7 @@ class ra17xx_device : public device_t { public: - ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t io_r(offs_t offset); void io_w(address_space &space, offs_t offset, uint8_t data); diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp index 40b361bdc6a..826db0c6cec 100644 --- a/src/devices/machine/ram.cpp +++ b/src/devices/machine/ram.cpp @@ -120,7 +120,7 @@ DEFINE_DEVICE_TYPE(RAM, ram_device, "ram", "RAM") // ram_device - constructor //------------------------------------------------- -ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RAM, tag, owner, clock) , m_size(0) , m_default_size(0) diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h index 8b17b3eadc5..3375f39938b 100644 --- a/src/devices/machine/ram.h +++ b/src/devices/machine/ram.h @@ -36,7 +36,7 @@ public: using extra_option_vector = std::vector; // construction/destruction - ram_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + ram_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // accessors u32 size() const { return m_size; } diff --git a/src/devices/machine/rf5c296.cpp b/src/devices/machine/rf5c296.cpp index 37a0adf3a3b..f040c9f16f9 100644 --- a/src/devices/machine/rf5c296.cpp +++ b/src/devices/machine/rf5c296.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(RF5C296, rf5c296_device, "rf5c296", "RF5C296 PC Card controller") -rf5c296_device::rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rf5c296_device::rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RF5C296, tag, owner, clock) , m_rf5c296_reg(0) , m_pccard(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/rf5c296.h b/src/devices/machine/rf5c296.h index b5f3beea7fc..312defb262c 100644 --- a/src/devices/machine/rf5c296.h +++ b/src/devices/machine/rf5c296.h @@ -11,7 +11,7 @@ class rf5c296_device : public device_t { public: - rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers template void set_pccard(T &&tag) { m_pccard.set_tag(std::forward(tag)); } diff --git a/src/devices/machine/ripple_counter.cpp b/src/devices/machine/ripple_counter.cpp index 25639eb6bb3..47dcc36b789 100644 --- a/src/devices/machine/ripple_counter.cpp +++ b/src/devices/machine/ripple_counter.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(RIPPLE_COUNTER, ripple_counter_device, "ripple_counter", "Gen // ripple_counter_device - constructor //------------------------------------------------- -ripple_counter_device::ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ripple_counter_device::ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RIPPLE_COUNTER, tag, owner, clock), device_rom_interface(mconfig, *this), m_count_out_cb(*this), diff --git a/src/devices/machine/ripple_counter.h b/src/devices/machine/ripple_counter.h index fb7648334e3..dc1e80f7375 100644 --- a/src/devices/machine/ripple_counter.h +++ b/src/devices/machine/ripple_counter.h @@ -23,7 +23,7 @@ class ripple_counter_device : public device_t, public device_rom_interface<14> { public: // construction/destruction - ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void set_stages(u8 stages) { m_count_mask = (1U << stages) - 1; override_address_width(stages); } diff --git a/src/devices/machine/roc10937.cpp b/src/devices/machine/roc10937.cpp index e9c44ab822b..becac7e1a0c 100644 --- a/src/devices/machine/roc10937.cpp +++ b/src/devices/machine/roc10937.cpp @@ -129,7 +129,7 @@ static const int roc10937poslut[]= 0//15 }; -rocvfd_device::rocvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +rocvfd_device::rocvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_outputs(), m_cursor_pos(0), @@ -252,22 +252,22 @@ DEFINE_DEVICE_TYPE(MIC10937, mic10937_device, "mic10937", "Micrel MIC10937 VFD c DEFINE_DEVICE_TYPE(ROC10957, roc10957_device, "roc10957", "Rockwell 10957 VFD controller") // and compatible DEFINE_DEVICE_TYPE(S16LF01, s16lf01_device, "s16lf01", "Samsung 16LF01 Series VFD") // and compatible, basically the MSC1937 on a 16 seg display -roc10937_device::roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +roc10937_device::roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, ROC10937, tag, owner, clock) { } -msc1937_device::msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msc1937_device::msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, MSC1937, tag, owner, clock) { } -mic10937_device::mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mic10937_device::mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, MIC10937, tag, owner, clock) { } -s16lf01_device::s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s16lf01_device::s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, S16LF01, tag, owner, clock) { } @@ -324,7 +324,7 @@ void rocvfd_device::write_char(int data) } } -roc10957_device::roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +roc10957_device::roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, ROC10957, tag, owner, clock) { } diff --git a/src/devices/machine/roc10937.h b/src/devices/machine/roc10937.h index da0f21eb808..ac775e3c831 100644 --- a/src/devices/machine/roc10937.h +++ b/src/devices/machine/roc10937.h @@ -27,7 +27,7 @@ public: protected: - rocvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rocvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); std::unique_ptr > m_outputs; std::unique_ptr > m_brightness; @@ -59,29 +59,29 @@ private: class roc10937_device : public rocvfd_device { public: - roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; class msc1937_device : public rocvfd_device { public: - msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; class mic10937_device : public rocvfd_device { public: - mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; class roc10957_device : public rocvfd_device { public: - roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); void write_char(int data); }; class s16lf01_device : public rocvfd_device { public: - s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; diff --git a/src/devices/machine/rp5c01.cpp b/src/devices/machine/rp5c01.cpp index 8a59f07e9f8..a628a8975aa 100644 --- a/src/devices/machine/rp5c01.cpp +++ b/src/devices/machine/rp5c01.cpp @@ -169,12 +169,12 @@ inline void rp5c01_device::check_alarm() // rp5c01_device - constructor //------------------------------------------------- -rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp5c01_device(mconfig, RP5C01, tag, owner, clock) { } -rp5c01_device::rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rp5c01_device::rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -428,7 +428,7 @@ void rp5c01_device::write(offs_t offset, uint8_t data) // tc8521_device - constructor //------------------------------------------------- -tc8521_device::tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc8521_device::tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp5c01_device(mconfig, TC8521, tag, owner, clock) { } diff --git a/src/devices/machine/rp5c01.h b/src/devices/machine/rp5c01.h index 7e48269b72c..2c8aa2c9851 100644 --- a/src/devices/machine/rp5c01.h +++ b/src/devices/machine/rp5c01.h @@ -38,7 +38,7 @@ class rp5c01_device : public device_t, { public: // construction/destruction - rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_alarm_callback() { return m_out_alarm_cb.bind(); } void remove_battery() { m_battery_backed = false; nvram_enable_backup(false); } @@ -50,7 +50,7 @@ public: protected: // construction/destruction - rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -98,7 +98,7 @@ class tc8521_device : public rp5c01_device { public: // construction/destruction - tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/rp5c15.cpp b/src/devices/machine/rp5c15.cpp index a37b779c6fd..9708a996e0d 100644 --- a/src/devices/machine/rp5c15.cpp +++ b/src/devices/machine/rp5c15.cpp @@ -183,7 +183,7 @@ inline void rp5c15_device::check_alarm() // rp5c15_device - constructor //------------------------------------------------- -rp5c15_device::rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp5c15_device::rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RP5C15, tag, owner, clock), device_rtc_interface(mconfig, *this), m_out_alarm_cb(*this), diff --git a/src/devices/machine/rp5c15.h b/src/devices/machine/rp5c15.h index 15936a02445..3359e766ff0 100644 --- a/src/devices/machine/rp5c15.h +++ b/src/devices/machine/rp5c15.h @@ -30,7 +30,7 @@ class rp5c15_device : public device_t, { public: // construction/destruction - rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto alarm() { return m_out_alarm_cb.bind(); } auto clkout() { return m_out_clkout_cb.bind(); } diff --git a/src/devices/machine/rp5h01.cpp b/src/devices/machine/rp5h01.cpp index 655ffd5f841..f8e2658bcb9 100644 --- a/src/devices/machine/rp5h01.cpp +++ b/src/devices/machine/rp5h01.cpp @@ -32,7 +32,7 @@ uint8_t const rp5h01_device::s_initial_data[0x10] = DEFINE_DEVICE_TYPE(RP5H01, rp5h01_device, "rp5h01", "RP5H01 6/7-bit Counter") -rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RP5H01, tag, owner, clock) , m_data(nullptr) , m_rom(*this, DEVICE_SELF) diff --git a/src/devices/machine/rp5h01.h b/src/devices/machine/rp5h01.h index 686367c694e..46fa4c5d6b0 100644 --- a/src/devices/machine/rp5h01.h +++ b/src/devices/machine/rp5h01.h @@ -31,7 +31,7 @@ class rp5h01_device : public device_t { public: - rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( enable_w ); /* /CE */ DECLARE_WRITE_LINE_MEMBER( reset_w ); /* RESET */ diff --git a/src/devices/machine/rstbuf.cpp b/src/devices/machine/rstbuf.cpp index 9e13d72743a..b321bc0c9ef 100644 --- a/src/devices/machine/rstbuf.cpp +++ b/src/devices/machine/rstbuf.cpp @@ -71,7 +71,7 @@ DEFINE_DEVICE_TYPE(RST_NEG_BUFFER, rst_neg_buffer_device, "rst_neg_buffer", "RST // rst_buffer_device - constructor //------------------------------------------------- -rst_buffer_device::rst_buffer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +rst_buffer_device::rst_buffer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_int_cb(*this) , m_input_buffer(0) @@ -83,7 +83,7 @@ rst_buffer_device::rst_buffer_device(const machine_config &mconfig, device_type // rst_pos_buffer_device - constructor //------------------------------------------------- -rst_pos_buffer_device::rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rst_pos_buffer_device::rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rst_buffer_device(mconfig, RST_POS_BUFFER, tag, owner, clock) { } @@ -93,7 +93,7 @@ rst_pos_buffer_device::rst_pos_buffer_device(const machine_config &mconfig, cons // rst_neg_buffer_device - constructor //------------------------------------------------- -rst_neg_buffer_device::rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rst_neg_buffer_device::rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rst_buffer_device(mconfig, RST_NEG_BUFFER, tag, owner, clock) { } diff --git a/src/devices/machine/rstbuf.h b/src/devices/machine/rstbuf.h index 718a96f4861..f4cb6006acb 100644 --- a/src/devices/machine/rstbuf.h +++ b/src/devices/machine/rstbuf.h @@ -30,7 +30,7 @@ public: protected: // device base class constructor - rst_buffer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + rst_buffer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -54,7 +54,7 @@ class rst_pos_buffer_device : public rst_buffer_device { public: // device constructor - rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // set RST 1/RST 08H request line (modifies bit 3 of vector) DECLARE_WRITE_LINE_MEMBER(rst1_w) { sync_input(state, 0x08); } @@ -76,7 +76,7 @@ class rst_neg_buffer_device : public rst_buffer_device { public: // device constructor - rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // set RST 30H request line (modifies bit 3 of vector) DECLARE_WRITE_LINE_MEMBER(rst30_w) { sync_input(state, 0x08); } diff --git a/src/devices/machine/rtc4543.cpp b/src/devices/machine/rtc4543.cpp index 773724a4170..c57affcce15 100644 --- a/src/devices/machine/rtc4543.cpp +++ b/src/devices/machine/rtc4543.cpp @@ -49,12 +49,12 @@ DEFINE_DEVICE_TYPE(RTC4543, rtc4543_device, "rtc4543", "Epson R4543 RTC") // rtc4543_device - constructor //------------------------------------------------- -rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rtc4543_device(mconfig, RTC4543, tag, owner, clock) { } -rtc4543_device::rtc4543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rtc4543_device::rtc4543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_data_cb(*this) @@ -350,7 +350,7 @@ DEFINE_DEVICE_TYPE(JRC6355E, jrc6355e_device, "jrc6355e", "JRC 6355E RTC") // jrc6355e_device - constructor //------------------------------------------------- -jrc6355e_device::jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jrc6355e_device::jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rtc4543_device(mconfig, JRC6355E, tag, owner, clock) { } diff --git a/src/devices/machine/rtc4543.h b/src/devices/machine/rtc4543.h index a29cbb9ec30..8a8d7e397f4 100644 --- a/src/devices/machine/rtc4543.h +++ b/src/devices/machine/rtc4543.h @@ -28,7 +28,7 @@ class rtc4543_device : public device_t, public: // construction/destruction - rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( wr_w ); @@ -39,7 +39,7 @@ public: auto data_cb() { return m_data_cb.bind(); } protected: - rtc4543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rtc4543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -82,7 +82,7 @@ class jrc6355e_device : public rtc4543_device { public: // construction/destruction - jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // rtc4543 overrides diff --git a/src/devices/machine/rtc65271.cpp b/src/devices/machine/rtc65271.cpp index dc7aad8d210..3f56da9773a 100644 --- a/src/devices/machine/rtc65271.cpp +++ b/src/devices/machine/rtc65271.cpp @@ -669,7 +669,7 @@ DEFINE_DEVICE_TYPE(RTC65271, rtc65271_device, "rtc65271", "Epson RTC-65271 RTC") // rtc65271_device - constructor //------------------------------------------------- -rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTC65271, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_interrupt_cb(*this) diff --git a/src/devices/machine/rtc65271.h b/src/devices/machine/rtc65271.h index a3d77bf3fa9..aa1443cc6b6 100644 --- a/src/devices/machine/rtc65271.h +++ b/src/devices/machine/rtc65271.h @@ -17,7 +17,7 @@ class rtc65271_device : public device_t, { public: // construction/destruction - rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto interrupt_cb() { return m_interrupt_cb.bind(); } diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp index 3dab4bd1835..89c145ef4ac 100644 --- a/src/devices/machine/rtc9701.cpp +++ b/src/devices/machine/rtc9701.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(RTC9701, rtc9701_device, "rtc9701", "Epson RTC-9701-JE RTC/EE // rtc9701_device - constructor //------------------------------------------------- -rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTC9701, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_latch(0) diff --git a/src/devices/machine/rtc9701.h b/src/devices/machine/rtc9701.h index 49d8e56582d..3f51c02ce0e 100644 --- a/src/devices/machine/rtc9701.h +++ b/src/devices/machine/rtc9701.h @@ -26,7 +26,7 @@ class rtc9701_device : public device_t, { public: // construction/destruction - rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 32'768); // I/O operations diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp index 8ad26690bcf..c76e167dafb 100644 --- a/src/devices/machine/s2636.cpp +++ b/src/devices/machine/s2636.cpp @@ -157,7 +157,7 @@ uint16_t const s2636_device::SCORE_FONT[16][5] = DEFINE_DEVICE_TYPE(S2636, s2636_device, "s2636", "Signetics 2636 PVI") -s2636_device::s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s2636_device::s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S2636, tag, owner, clock) , device_video_interface(mconfig, *this) , device_sound_interface(mconfig, *this) diff --git a/src/devices/machine/s2636.h b/src/devices/machine/s2636.h index 8803c629015..7116fb57102 100644 --- a/src/devices/machine/s2636.h +++ b/src/devices/machine/s2636.h @@ -27,7 +27,7 @@ class s2636_device : public device_t, public device_sound_interface { public: - s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_offsets(int y_offset, int x_offset) { m_x_offset = x_offset; m_y_offset = y_offset; } diff --git a/src/devices/machine/s3520cf.cpp b/src/devices/machine/s3520cf.cpp index 86676ca3d2b..6a147852d81 100644 --- a/src/devices/machine/s3520cf.cpp +++ b/src/devices/machine/s3520cf.cpp @@ -36,12 +36,12 @@ DEFINE_DEVICE_TYPE(RTC4553, rtc4553_device, "rtc4553", "Epson RTC-4553 RTC/SRAM" // s3520cf_device - constructor //------------------------------------------------- -s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3520cf_device(mconfig, S3520CF, tag, owner, clock) { } -s3520cf_device::s3520cf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +s3520cf_device::s3520cf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_region(*this, DEVICE_SELF) @@ -334,7 +334,7 @@ WRITE_LINE_MEMBER( s3520cf_device::set_clock_line ) } } -rtc4553_device::rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc4553_device::rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3520cf_device(mconfig, RTC4553, tag, owner, clock) { } diff --git a/src/devices/machine/s3520cf.h b/src/devices/machine/s3520cf.h index 5c8f0c8614b..c3efa1bc940 100644 --- a/src/devices/machine/s3520cf.h +++ b/src/devices/machine/s3520cf.h @@ -23,7 +23,7 @@ class s3520cf_device : public device_t, { public: // construction/destruction - s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32'768); + s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); // I/O operations DECLARE_READ_LINE_MEMBER( read_bit ); @@ -34,7 +34,7 @@ public: TIMER_CALLBACK_MEMBER(timer_callback); protected: - s3520cf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + s3520cf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); struct rtc_regs_t { @@ -79,7 +79,7 @@ Epson RTC-4553 class rtc4553_device : public s3520cf_device { public: - rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32'768); + rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); }; // device type definition diff --git a/src/devices/machine/s3c2400.cpp b/src/devices/machine/s3c2400.cpp index 69649d04db0..cbffe4eda79 100644 --- a/src/devices/machine/s3c2400.cpp +++ b/src/devices/machine/s3c2400.cpp @@ -161,7 +161,7 @@ uint32_t s3c2400_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm DEFINE_DEVICE_TYPE(S3C2400, s3c2400_device, "s3c2400", "Samsung S3C2400 SoC") -s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C2400, tag, owner, clock) , m_cpu(*this, ":maincpu") , m_palette(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c2400.h b/src/devices/machine/s3c2400.h index b5390419a93..0f509404ce3 100644 --- a/src/devices/machine/s3c2400.h +++ b/src/devices/machine/s3c2400.h @@ -116,7 +116,7 @@ enum class s3c2400_device : public device_t, protected s3c24xx_peripheral_types { public: - s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~s3c2400_device(); // configuration diff --git a/src/devices/machine/s3c2410.cpp b/src/devices/machine/s3c2410.cpp index e630174b326..8d1aa87124e 100644 --- a/src/devices/machine/s3c2410.cpp +++ b/src/devices/machine/s3c2410.cpp @@ -217,7 +217,7 @@ uint32_t s3c2410_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm DEFINE_DEVICE_TYPE(S3C2410, s3c2410_device, "s3c2410", "Samsung S3C2410 SoC") -s3c2410_device::s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c2410_device::s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C2410, tag, owner, clock) , m_cpu(*this, ":maincpu") , m_palette(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c2410.h b/src/devices/machine/s3c2410.h index 9146baa7e7f..0ac17a9246a 100644 --- a/src/devices/machine/s3c2410.h +++ b/src/devices/machine/s3c2410.h @@ -134,7 +134,7 @@ enum class s3c2410_device : public device_t, protected s3c24xx_peripheral_types { public: - s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~s3c2410_device(); // configuration diff --git a/src/devices/machine/s3c2440.cpp b/src/devices/machine/s3c2440.cpp index 801c21dd01d..55e81fd38b9 100644 --- a/src/devices/machine/s3c2440.cpp +++ b/src/devices/machine/s3c2440.cpp @@ -232,7 +232,7 @@ uint32_t s3c2440_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm DEFINE_DEVICE_TYPE(S3C2440, s3c2440_device, "s3c2440", "Samsung S3C2440 SoC") -s3c2440_device::s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c2440_device::s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C2440, tag, owner, clock) , m_cpu(*this, ":maincpu") , m_palette(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c2440.h b/src/devices/machine/s3c2440.h index c4db773a475..97c34b6d8b5 100644 --- a/src/devices/machine/s3c2440.h +++ b/src/devices/machine/s3c2440.h @@ -154,7 +154,7 @@ enum class s3c2440_device : public device_t, protected s3c24xx_peripheral_types { public: - s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~s3c2440_device(); // configuration diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp index dc5e52c31f0..df567201f99 100644 --- a/src/devices/machine/s3c44b0.cpp +++ b/src/devices/machine/s3c44b0.cpp @@ -223,7 +223,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c DEFINE_DEVICE_TYPE(S3C44B0, s3c44b0_device, "s3c44b0", "Samsung S3C44B0 SoC") -s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C44B0, tag, owner, clock) , device_video_interface(mconfig, *this) , m_cpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c44b0.h b/src/devices/machine/s3c44b0.h index e082937ea83..8bdacecbcbe 100644 --- a/src/devices/machine/s3c44b0.h +++ b/src/devices/machine/s3c44b0.h @@ -114,7 +114,7 @@ enum class s3c44b0_device : public device_t, public device_video_interface { public: - s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(std::forward(tag)); } auto gpio_port_r_cb() { return m_port_r_cb.bind(); } diff --git a/src/devices/machine/s_smp.cpp b/src/devices/machine/s_smp.cpp index 9be87af48d5..b3547d2b28a 100644 --- a/src/devices/machine/s_smp.cpp +++ b/src/devices/machine/s_smp.cpp @@ -57,7 +57,7 @@ void s_smp_device::internal_map(address_map &map) DEFINE_DEVICE_TYPE(S_SMP, s_smp_device, "s_smp", "Nintendo/Sony S-SMP") -s_smp_device::s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +s_smp_device::s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spc700_device(mconfig, S_SMP, tag, owner, clock, address_map_constructor(FUNC(s_smp_device::internal_map), this)) , m_data_config("data", ENDIANNESS_LITTLE, 8, 16) , m_ipl_region(*this, "sound_ipl") diff --git a/src/devices/machine/s_smp.h b/src/devices/machine/s_smp.h index 45f83755507..17c4238eac5 100644 --- a/src/devices/machine/s_smp.h +++ b/src/devices/machine/s_smp.h @@ -18,7 +18,7 @@ class s_smp_device : public spc700_device { public: - s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto dsp_io_read_callback() { return m_dsp_io_r_cb.bind(); } auto dsp_io_write_callback() { return m_dsp_io_w_cb.bind(); } diff --git a/src/devices/machine/sa1110.cpp b/src/devices/machine/sa1110.cpp index 5bcc62ba456..505108eb0bd 100644 --- a/src/devices/machine/sa1110.cpp +++ b/src/devices/machine/sa1110.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(SA1110_PERIPHERALS, sa1110_periphs_device, "sa1110_periphs", "Intel XScale SA1110 Peripherals") -sa1110_periphs_device::sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sa1110_periphs_device::sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SA1110_PERIPHERALS, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_maincpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/sa1110.h b/src/devices/machine/sa1110.h index 3ef8e79042b..4a704562716 100644 --- a/src/devices/machine/sa1110.h +++ b/src/devices/machine/sa1110.h @@ -23,13 +23,13 @@ class sa1110_periphs_device : public device_t, public device_serial_interface { public: template - sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : sa1110_periphs_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); } - sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_codec_tag(T &&tag) { m_codec.set_tag(std::forward(tag)); } diff --git a/src/devices/machine/sa1111.cpp b/src/devices/machine/sa1111.cpp index 3a2dd300f78..848b4b59892 100644 --- a/src/devices/machine/sa1111.cpp +++ b/src/devices/machine/sa1111.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(SA1111, sa1111_device, "sa1111", "Intel SA1111 Microprocessor Companion Chip") -sa1111_device::sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sa1111_device::sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SA1111, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_audio_codec(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/sa1111.h b/src/devices/machine/sa1111.h index 3804c06a30c..f18f7486d0a 100644 --- a/src/devices/machine/sa1111.h +++ b/src/devices/machine/sa1111.h @@ -18,13 +18,13 @@ class sa1111_device : public device_t { public: template - sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : sa1111_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); } - sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_audio_codec_tag(T &&tag) { m_audio_codec.set_tag(std::forward(tag)); } diff --git a/src/devices/machine/saa1043.cpp b/src/devices/machine/saa1043.cpp index 053945c9a7e..1c0c89ccf8c 100644 --- a/src/devices/machine/saa1043.cpp +++ b/src/devices/machine/saa1043.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SAA1043, saa1043_device, "saa1043", "Philips SAA1043") /*static*/ const uint32_t saa1043_device::s_line_counts[4] = { 624, 624, 524, 524 }; -saa1043_device::saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa1043_device::saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAA1043, tag, owner, clock) , m_outputs(*this) , m_type(PAL) diff --git a/src/devices/machine/saa1043.h b/src/devices/machine/saa1043.h index 3a5851d0f42..cd5d6e9d899 100644 --- a/src/devices/machine/saa1043.h +++ b/src/devices/machine/saa1043.h @@ -42,7 +42,7 @@ class saa1043_device : public device_t { public: // construction/destruction - saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum outputs : uint32_t { diff --git a/src/devices/machine/saa7191.cpp b/src/devices/machine/saa7191.cpp index a879506e84b..4f798dcad0e 100644 --- a/src/devices/machine/saa7191.cpp +++ b/src/devices/machine/saa7191.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(SAA7191, saa7191_device, "saa7191", "Philips SAA7191 DMSD") -saa7191_device::saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa7191_device::saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAA7191, tag, owner, clock) , m_chr_in(*this) , m_cvbs_in(*this) diff --git a/src/devices/machine/saa7191.h b/src/devices/machine/saa7191.h index 907edfdc3b0..cf1f6a6d6a3 100644 --- a/src/devices/machine/saa7191.h +++ b/src/devices/machine/saa7191.h @@ -19,7 +19,7 @@ class saa7191_device : public device_t { public: - saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void i2c_data_w(uint8_t data); uint8_t i2c_data_r(); diff --git a/src/devices/machine/scc2698b.cpp b/src/devices/machine/scc2698b.cpp index 892c37c24bf..19285500ecc 100644 --- a/src/devices/machine/scc2698b.cpp +++ b/src/devices/machine/scc2698b.cpp @@ -67,7 +67,7 @@ void scc2698b_device::map(address_map &map) #define CHANH_TAG "chh" -scc2698b_channel::scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scc2698b_channel::scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCC2698B_CHANNEL, tag, owner, clock), device_serial_interface(mconfig, *this) { @@ -352,7 +352,7 @@ void scc2698b_channel::mpi1_w(int state) } -scc2698b_device::scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scc2698b_device::scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCC2698B, tag, owner, clock), m_channel(*this, "channel_%u",1), write_intr_A(*this), @@ -746,5 +746,5 @@ attotime scc2698b_device::generate_baudrate(int block, int tx, int table_index) void scc2698b_device::device_add_mconfig(machine_config &config) { for (required_device &channel : m_channel) - SCC2698B_CHANNEL(config, channel, 0); + SCC2698B_CHANNEL(config, channel); } diff --git a/src/devices/machine/scc2698b.h b/src/devices/machine/scc2698b.h index d883b45d0b9..e18b1473a3b 100644 --- a/src/devices/machine/scc2698b.h +++ b/src/devices/machine/scc2698b.h @@ -15,7 +15,7 @@ class scc2698b_channel : public device_t, public device_serial_interface { friend class scc2698b_device; public: - scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mpi0_w(int state); void mpi1_w(int state); @@ -76,7 +76,7 @@ protected: class scc2698b_device : public device_t { public: - scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map); diff --git a/src/devices/machine/scc68070.cpp b/src/devices/machine/scc68070.cpp index a732b024ee6..ceca998c4e3 100644 --- a/src/devices/machine/scc68070.cpp +++ b/src/devices/machine/scc68070.cpp @@ -238,7 +238,7 @@ void scc68070_device::cpu_space_map(address_map &map) // scc68070_device - constructor //------------------------------------------------- -scc68070_device::scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc68070_device::scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scc68070_base_device(mconfig, tag, owner, clock, SCC68070, address_map_constructor(FUNC(scc68070_device::internal_map), this)) , m_iack2_callback(*this) , m_iack4_callback(*this) diff --git a/src/devices/machine/scc68070.h b/src/devices/machine/scc68070.h index 430ed781c27..5c7bb00102a 100644 --- a/src/devices/machine/scc68070.h +++ b/src/devices/machine/scc68070.h @@ -46,7 +46,7 @@ enum scc68070_ocr_bits class scc68070_device : public scc68070_base_device { public: - scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto iack2_callback() { return m_iack2_callback.bind(); } auto iack4_callback() { return m_iack4_callback.bind(); } diff --git a/src/devices/machine/scn_pci.cpp b/src/devices/machine/scn_pci.cpp index 43d450c4738..dbb80027839 100644 --- a/src/devices/machine/scn_pci.cpp +++ b/src/devices/machine/scn_pci.cpp @@ -157,7 +157,7 @@ ALLOW_SAVE_TYPE(scn_pci_device::xmtr_state); // scn_pci_device - constructor //------------------------------------------------- -scn_pci_device::scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const u16 *br_div, bool is_enhanced, bool is_aci) +scn_pci_device::scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u16 *br_div, bool is_enhanced, bool is_aci) : device_t(mconfig, type, tag, owner, clock) , m_dtr_callback(*this) , m_rts_callback(*this) @@ -210,7 +210,7 @@ scn_pci_device::scn_pci_device(const machine_config &mconfig, device_type type, // scn2651_device - constructor //------------------------------------------------- -scn2651_device::scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2651_device::scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2651, tag, owner, clock, s_br_divisors_3, false, false) { } @@ -219,7 +219,7 @@ scn2651_device::scn2651_device(const machine_config &mconfig, const char *tag, d // scn2661a_device - constructor //------------------------------------------------- -scn2661a_device::scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2661a_device::scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2661A, tag, owner, clock, s_br_divisors_1, true, false) { } @@ -228,7 +228,7 @@ scn2661a_device::scn2661a_device(const machine_config &mconfig, const char *tag, // scn2661b_device - constructor //------------------------------------------------- -scn2661b_device::scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2661b_device::scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2661B, tag, owner, clock, s_br_divisors_2, true, false) { } @@ -237,7 +237,7 @@ scn2661b_device::scn2661b_device(const machine_config &mconfig, const char *tag, // scn2661c_device - constructor //------------------------------------------------- -scn2661c_device::scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2661c_device::scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2661C, tag, owner, clock, s_br_divisors_3, true, false) { } @@ -246,7 +246,7 @@ scn2661c_device::scn2661c_device(const machine_config &mconfig, const char *tag, // scn2641_device - constructor //------------------------------------------------- -scn2641_device::scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2641_device::scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2641, tag, owner, clock, s_br_divisors, true, true) , m_intr_callback(*this) { diff --git a/src/devices/machine/scn_pci.h b/src/devices/machine/scn_pci.h index acb16e90f72..86898859799 100644 --- a/src/devices/machine/scn_pci.h +++ b/src/devices/machine/scn_pci.h @@ -100,7 +100,7 @@ protected: }; // construction/destruction - scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const u16 *br_div, bool is_enhanced, bool is_aci); + scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u16 *br_div, bool is_enhanced, bool is_aci); // device-level overrides virtual void device_resolve_objects() override; @@ -215,7 +215,7 @@ class scn2651_device : public scn_pci_device { public: // device type constructor - scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2661a_device @@ -224,7 +224,7 @@ class scn2661a_device : public scn_pci_device { public: // device type constructor - scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2661b_device @@ -233,7 +233,7 @@ class scn2661b_device : public scn_pci_device { public: // device type constructor - scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2661c_device @@ -242,7 +242,7 @@ class scn2661c_device : public scn_pci_device { public: // device type constructor - scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2641_device @@ -251,7 +251,7 @@ class scn2641_device : public scn_pci_device { public: // device type constructor - scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto intr_handler() { return m_intr_callback.bind(); } diff --git a/src/devices/machine/scnxx562.cpp b/src/devices/machine/scnxx562.cpp index 4f2da74c258..de337101675 100644 --- a/src/devices/machine/scnxx562.cpp +++ b/src/devices/machine/scnxx562.cpp @@ -129,8 +129,8 @@ DEFINE_DEVICE_TYPE(DUSCC68C562, duscc68c562_device, "duscc68c562", "Philips //------------------------------------------------- void duscc_device::device_add_mconfig(machine_config &config) { - DUSCC_CHANNEL(config, CHANA_TAG, 0); - DUSCC_CHANNEL(config, CHANB_TAG, 0); + DUSCC_CHANNEL(config, CHANA_TAG); + DUSCC_CHANNEL(config, CHANB_TAG); } //************************************************************************** @@ -140,7 +140,7 @@ void duscc_device::device_add_mconfig(machine_config &config) //------------------------------------------------- // duscc_device - constructor //------------------------------------------------- -duscc_device::duscc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +duscc_device::duscc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock) , device_z80daisy_interface(mconfig, *this) , m_chanA(*this, CHANA_TAG) @@ -174,27 +174,27 @@ duscc_device::duscc_device(const machine_config &mconfig, device_type type, cons elem = 0; } -duscc_device::duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc_device::duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC, tag, owner, clock, TYPE_DUSCC) { } -duscc26562_device::duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc26562_device::duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC26562, tag, owner, clock, TYPE_DUSCC26562) { } -duscc26c562_device::duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc26c562_device::duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC26C562, tag, owner, clock, TYPE_DUSCC26C562) { } -duscc68562_device::duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc68562_device::duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC68562, tag, owner, clock, TYPE_DUSCC68562) { } -duscc68c562_device::duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc68c562_device::duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC68C562, tag, owner, clock, TYPE_DUSCC68C562) { } @@ -556,7 +556,7 @@ void duscc_device::write(offs_t offset, uint8_t data) //************************************************************************** // DUSCC CHANNEL //************************************************************************** -duscc_channel::duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc_channel::duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DUSCC_CHANNEL, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_brg_rx_rate(0) @@ -1968,7 +1968,7 @@ void duscc_channel::do_dusccreg_ccr_w(uint8_t data) status bit (GSR[I] or GSR[5] for Channels A and B, respectively). The counter/timer and other registers are not affected*/ case REG_CCR_RESET_TX: LOGINT("- Reset Tx\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); m_tx_fifo_wp = m_tx_fifo_rp = 0; m_trsr &= 0x0f; m_uart->m_gsr &= ~(m_index == duscc_device::CHANNEL_A ? REG_GSR_CHAN_A_TXREADY : REG_GSR_CHAN_B_TXREADY); @@ -1990,7 +1990,7 @@ void duscc_channel::do_dusccreg_ccr_w(uint8_t data) will be transmitted. TODO: let all the chararcters be transmitted before shutting down shifter */ case REG_CCR_DISABLE_TX: LOGINT("- Disable Tx\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); m_tra = 0; m_uart->m_gsr &= ~(m_index == duscc_device::CHANNEL_A ? REG_GSR_CHAN_A_TXREADY : REG_GSR_CHAN_B_TXREADY); m_uart->clear_interrupt(m_index, INT_TXREADY); @@ -2003,7 +2003,7 @@ void duscc_channel::do_dusccreg_ccr_w(uint8_t data) GSR[O] or GSR[4] for Channels A and B, respectively). The counter/timer and other registers are not affected.*/ case REG_CCR_RESET_RX: LOGINT("- Reset Rx\n"); - set_rcv_rate(0); + set_rcv_rate(XTAL::u(0)); m_rx_fifo_wp = m_rx_fifo_rp = 0; m_trsr &= 0xf0; m_rsr = 0; diff --git a/src/devices/machine/scnxx562.h b/src/devices/machine/scnxx562.h index c9ac458b44c..c6155e90b7e 100644 --- a/src/devices/machine/scnxx562.h +++ b/src/devices/machine/scnxx562.h @@ -58,7 +58,7 @@ class duscc_channel : public device_t, public device_serial_interface friend class duscc_device; public: - duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read register handlers uint8_t do_dusccreg_cmr1_r(); @@ -530,7 +530,7 @@ class duscc_device : public device_t, public device_z80daisy_interface public: // construction/destruction - duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_txda_callback() { return m_out_txda_cb.bind(); } auto out_dtra_callback() { return m_out_dtra_cb.bind(); } @@ -547,13 +547,13 @@ public: auto out_trxcb_callback() { return m_out_trxcb_cb.bind(); } auto out_int_callback() { return m_out_int_cb.bind(); } - void configure_channels(int rxa, int txa, int rxb, int txb) + void configure_channels(const XTAL &rxa, const XTAL &txa, const XTAL &rxb, const XTAL &txb) { #if 0 // TODO: Fix this, need a way to set external rx/tx clocks for the channels - m_chanA->m_rxc = rxa; - m_chanA->m_txc = txa; - m_chanB->m_rxc = rxb; - m_chanB->m_txc = txb; + m_chanA->m_rxc = rxa.value(); + m_chanA->m_txc = txa.value(); + m_chanB->m_rxc = rxb.value(); + m_chanB->m_txc = txb.value(); #endif } @@ -587,7 +587,7 @@ public: void syncb_w(int state) { m_chanB->sync_w(state); } protected: - duscc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + duscc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -684,25 +684,25 @@ DECLARE_DEVICE_TYPE(DUSCC68C562, duscc68c562_device) class duscc26562_device : public duscc_device { public : - duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class duscc26c562_device : public duscc_device { public : - duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class duscc68562_device : public duscc_device { public : - duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class duscc68c562_device : public duscc_device { public : - duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_MACHINE_SCNXX562_H diff --git a/src/devices/machine/scoop.cpp b/src/devices/machine/scoop.cpp index 1a254169f93..2d73f7f936b 100644 --- a/src/devices/machine/scoop.cpp +++ b/src/devices/machine/scoop.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SCOOP, scoop_device, "scoop", "Sharp SCOOP peripheral interface") -scoop_device::scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scoop_device::scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCOOP, tag, owner, clock) , m_gpio_out(*this) { diff --git a/src/devices/machine/scoop.h b/src/devices/machine/scoop.h index 1fb0edaae66..24d93cced81 100644 --- a/src/devices/machine/scoop.h +++ b/src/devices/machine/scoop.h @@ -14,7 +14,7 @@ class scoop_device : public device_t { public: - scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template auto gpio_out() { return m_gpio_out[Line].bind(); } template void gpio_in(int state) { gpio_in((uint16_t)Line, state); } diff --git a/src/devices/machine/sda2006.cpp b/src/devices/machine/sda2006.cpp index 815cb829d85..b78a136a8af 100644 --- a/src/devices/machine/sda2006.cpp +++ b/src/devices/machine/sda2006.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(SDA2006, sda2006_device, "sda2006", "SDA2006 EEPROM") // sda2006_device - constructor //------------------------------------------------- -sda2006_device::sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sda2006_device::sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SDA2006, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_latch(0) diff --git a/src/devices/machine/sda2006.h b/src/devices/machine/sda2006.h index 1ae1748f5c2..7e77c60dc03 100644 --- a/src/devices/machine/sda2006.h +++ b/src/devices/machine/sda2006.h @@ -14,7 +14,7 @@ class sda2006_device : public device_t, { public: // construction/destruction - sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // I/O operations DECLARE_READ_LINE_MEMBER(read_data); diff --git a/src/devices/machine/sdlc.cpp b/src/devices/machine/sdlc.cpp index 7a7303b9e73..b5b96c1b60e 100644 --- a/src/devices/machine/sdlc.cpp +++ b/src/devices/machine/sdlc.cpp @@ -126,7 +126,7 @@ void device_sdlc_consumer_interface::rx_reset() } -sdlc_logger_device::sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, std::uint32_t clock) : +sdlc_logger_device::sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SDLC_LOGGER, tag, owner, clock), device_sdlc_consumer_interface(mconfig, *this), m_data_nrzi(0U), diff --git a/src/devices/machine/sdlc.h b/src/devices/machine/sdlc.h index 5dd7b177c3e..9bd589ea7ce 100644 --- a/src/devices/machine/sdlc.h +++ b/src/devices/machine/sdlc.h @@ -54,7 +54,7 @@ private: class sdlc_logger_device : public device_t, public device_sdlc_consumer_interface { public: - sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, std::uint32_t clock); + sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // input signals DECLARE_WRITE_LINE_MEMBER(data_w) { m_current_data = state ? 1U : 0U; } diff --git a/src/devices/machine/sega_scu.cpp b/src/devices/machine/sega_scu.cpp index c2e7191d7cb..990e0cda791 100644 --- a/src/devices/machine/sega_scu.cpp +++ b/src/devices/machine/sega_scu.cpp @@ -145,7 +145,7 @@ void sega_scu_device::regs_map(address_map &map) // sega_scu_device - constructor //------------------------------------------------- -sega_scu_device::sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_scu_device::sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_SCU, tag, owner, clock), m_scudsp(*this, "scudsp"), m_hostcpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/sega_scu.h b/src/devices/machine/sega_scu.h index 4ee8dd1f08d..0d4da8b9b7c 100644 --- a/src/devices/machine/sega_scu.h +++ b/src/devices/machine/sega_scu.h @@ -41,7 +41,7 @@ class sega_scu_device : public device_t { public: // construction/destruction - sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void regs_map(address_map &map); diff --git a/src/devices/machine/segacrp2_device.cpp b/src/devices/machine/segacrp2_device.cpp index 1a2676bd631..52254072344 100644 --- a/src/devices/machine/segacrp2_device.cpp +++ b/src/devices/machine/segacrp2_device.cpp @@ -92,7 +92,7 @@ DEFINE_DEVICE_TYPE(SEGA_317_0006, sega_317_0006_device, "sega_317_0006", "Sega 3 DEFINE_DEVICE_TYPE(SEGA_317_0007, sega_317_0007_device, "sega_317_0007", "Sega 317-0007") -segacrp2_z80_device::segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +segacrp2_z80_device::segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, type, tag, owner, clock), m_decrypted(*this, finder_base::DUMMY_TAG) { @@ -104,7 +104,7 @@ void segacrp2_z80_device::device_start() decrypt(); } -nec_315_5136_device::nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nec_315_5136_device::nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, NEC_315_5136, tag, owner, clock) { } @@ -145,7 +145,7 @@ void nec_315_5136_device::decrypt() } -sega_315_5177_device::sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5177_device::sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5177, tag, owner, clock) { } @@ -202,7 +202,7 @@ void sega_315_5177_device::decrypt() } -sega_315_5176_device::sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5176_device::sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5176, tag, owner, clock) { } @@ -247,7 +247,7 @@ void sega_315_5176_device::decrypt() } -sega_315_5162_device::sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5162_device::sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5162, tag, owner, clock) { } @@ -282,7 +282,7 @@ void sega_315_5162_device::decrypt() -sega_315_5178_device::sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5178_device::sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5178, tag, owner, clock) { } @@ -329,7 +329,7 @@ void sega_315_5178_device::decrypt() } -sega_315_5179_device::sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5179_device::sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5179, tag, owner, clock) { } @@ -407,7 +407,7 @@ static void sega_decode_317(uint8_t *rom, uint8_t *decrypted, int shift) } -sega_317_0004_device::sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0004_device::sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0004, tag, owner, clock) { } @@ -418,7 +418,7 @@ void sega_317_0004_device::decrypt() } -sega_317_0005_device::sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0005_device::sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0005, tag, owner, clock) { } @@ -429,7 +429,7 @@ void sega_317_0005_device::decrypt() } -sega_317_0006_device::sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0006_device::sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0006, tag, owner, clock) { } @@ -440,7 +440,7 @@ void sega_317_0006_device::decrypt() } -sega_317_0007_device::sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0007_device::sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0007, tag, owner, clock) { } diff --git a/src/devices/machine/segacrp2_device.h b/src/devices/machine/segacrp2_device.h index a64f3fa5fe0..14e78acf367 100644 --- a/src/devices/machine/segacrp2_device.h +++ b/src/devices/machine/segacrp2_device.h @@ -15,7 +15,7 @@ public: template void set_decrypted_tag(T &&decrypted_tag) { m_decrypted.set_tag(std::forward(decrypted_tag)); } protected: - segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void decrypt() = 0; @@ -29,7 +29,7 @@ protected: class nec_315_5136_device : public segacrp2_z80_device { public: - nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -37,7 +37,7 @@ protected: class sega_315_5179_device : public segacrp2_z80_device { public: - sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -46,7 +46,7 @@ protected: class sega_315_5178_device : public segacrp2_z80_device { public: - sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -54,7 +54,7 @@ protected: class sega_315_5177_device : public segacrp2_z80_device { public: - sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -62,7 +62,7 @@ protected: class sega_315_5176_device : public segacrp2_z80_device { public: - sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -70,7 +70,7 @@ protected: class sega_315_5162_device : public segacrp2_z80_device { public: - sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -78,7 +78,7 @@ protected: class sega_317_0004_device : public segacrp2_z80_device { public: - sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -87,7 +87,7 @@ protected: class sega_317_0005_device : public segacrp2_z80_device { public: - sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -96,7 +96,7 @@ protected: class sega_317_0006_device : public segacrp2_z80_device { public: - sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -104,7 +104,7 @@ protected: class sega_317_0007_device : public segacrp2_z80_device { public: - sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; diff --git a/src/devices/machine/segacrpt_device.cpp b/src/devices/machine/segacrpt_device.cpp index 330193aa2b9..2374819c018 100644 --- a/src/devices/machine/segacrpt_device.cpp +++ b/src/devices/machine/segacrpt_device.cpp @@ -284,7 +284,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5128, sega_315_5128_device, "sega_315_5128", "Sega 3 -segacrpt_z80_device::segacrpt_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +segacrpt_z80_device::segacrpt_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, type, tag, owner, clock), m_decrypted_ptr(nullptr), m_region_ptr(nullptr), @@ -335,7 +335,7 @@ void segacrpt_z80_device::set_decrypted_p(uint8_t* ptr) -sega_315_5132_device::sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5132, tag, owner, clock) {} +sega_315_5132_device::sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5132, tag, owner, clock) {} void sega_315_5132_device::decrypt() { static const uint8_t convtable[32][4] = @@ -366,7 +366,7 @@ void sega_315_5132_device::decrypt() -sega_315_5155_device::sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5155, tag, owner, clock) {} +sega_315_5155_device::sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5155, tag, owner, clock) {} void sega_315_5155_device::decrypt() { static const uint8_t convtable[32][4] = @@ -397,7 +397,7 @@ void sega_315_5155_device::decrypt() -sega_315_5110_device::sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5110, tag, owner, clock) {} +sega_315_5110_device::sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5110, tag, owner, clock) {} void sega_315_5110_device::decrypt() { static const uint8_t convtable[32][4] = @@ -427,7 +427,7 @@ void sega_315_5110_device::decrypt() -sega_315_5135_device::sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5135, tag, owner, clock) {} +sega_315_5135_device::sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5135, tag, owner, clock) {} void sega_315_5135_device::decrypt() { static const uint8_t convtable[32][4] = @@ -458,7 +458,7 @@ void sega_315_5135_device::decrypt() -sega_315_5051_device::sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5051, tag, owner, clock) {} +sega_315_5051_device::sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5051, tag, owner, clock) {} void sega_315_5051_device::decrypt() { static const uint8_t convtable[32][4] = @@ -488,7 +488,7 @@ void sega_315_5051_device::decrypt() -sega_315_5098_device::sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5098, tag, owner, clock) {} +sega_315_5098_device::sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5098, tag, owner, clock) {} void sega_315_5098_device::decrypt() { // also 315-5030 ? @@ -520,7 +520,7 @@ void sega_315_5098_device::decrypt() -sega_315_5102_device::sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5102, tag, owner, clock) {} +sega_315_5102_device::sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5102, tag, owner, clock) {} void sega_315_5102_device::decrypt() { static const uint8_t convtable[32][4] = @@ -549,7 +549,7 @@ void sega_315_5102_device::decrypt() } -sega_315_5065_device::sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5065, tag, owner, clock) {} +sega_315_5065_device::sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5065, tag, owner, clock) {} void sega_315_5065_device::decrypt() { static const uint8_t convtable[32][4] = @@ -578,7 +578,7 @@ void sega_315_5065_device::decrypt() } -sega_315_5064_device::sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5064, tag, owner, clock) {} +sega_315_5064_device::sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5064, tag, owner, clock) {} void sega_315_5064_device::decrypt() { static const uint8_t convtable[32][4] = @@ -608,7 +608,7 @@ void sega_315_5064_device::decrypt() -sega_315_5033_device::sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5033, tag, owner, clock) {} +sega_315_5033_device::sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5033, tag, owner, clock) {} void sega_315_5033_device::decrypt() { static const uint8_t convtable[32][4] = @@ -637,7 +637,7 @@ void sega_315_5033_device::decrypt() } -sega_315_5041_device::sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5041, tag, owner, clock) {} +sega_315_5041_device::sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5041, tag, owner, clock) {} void sega_315_5041_device::decrypt() { static const uint8_t convtable[32][4] = @@ -667,8 +667,8 @@ void sega_315_5041_device::decrypt() -sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5048, tag, owner, clock) {} -sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, type, tag, owner, clock) {} +sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5048, tag, owner, clock) {} +sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, type, tag, owner, clock) {} void sega_315_5048_device::decrypt() { static const uint8_t convtable[32][4] = @@ -697,7 +697,7 @@ void sega_315_5048_device::decrypt() } -sega_315_5093_device::sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5093, tag, owner, clock) {} +sega_315_5093_device::sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5093, tag, owner, clock) {} void sega_315_5093_device::decrypt() { static const uint8_t convtable[32][4] = @@ -727,7 +727,7 @@ void sega_315_5093_device::decrypt() -sega_315_5099_device::sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5099, tag, owner, clock) {} +sega_315_5099_device::sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5099, tag, owner, clock) {} void sega_315_5099_device::decrypt() { static const uint8_t convtable[32][4] = @@ -758,7 +758,7 @@ void sega_315_5099_device::decrypt() -sega_315_spat_device::sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_SPAT, tag, owner, clock) {} +sega_315_spat_device::sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_SPAT, tag, owner, clock) {} void sega_315_spat_device::decrypt() { static const uint8_t convtable[32][4] = @@ -786,7 +786,7 @@ void sega_315_spat_device::decrypt() decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize); } -sega_315_5015_device::sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5015, tag, owner, clock) {} +sega_315_5015_device::sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5015, tag, owner, clock) {} void sega_315_5015_device::decrypt() { static const uint8_t convtable[32][4] = @@ -816,11 +816,11 @@ void sega_315_5015_device::decrypt() } -sega_315_5133_device::sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : sega_315_5048_device(mconfig, SEGA_315_5133, tag, owner, clock) {} +sega_315_5133_device::sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_315_5048_device(mconfig, SEGA_315_5133, tag, owner, clock) {} // == sega_315_5048_device -sega_315_5014_device::sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5014, tag, owner, clock) {} +sega_315_5014_device::sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5014, tag, owner, clock) {} void sega_315_5014_device::decrypt() { static const uint8_t convtable[32][4] = @@ -849,7 +849,7 @@ void sega_315_5014_device::decrypt() -sega_315_5013_device::sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5013, tag, owner, clock) {} +sega_315_5013_device::sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5013, tag, owner, clock) {} void sega_315_5013_device::decrypt() { static const uint8_t convtable[32][4] = @@ -878,7 +878,7 @@ void sega_315_5013_device::decrypt() } -sega_315_5061_device::sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5061, tag, owner, clock) {} +sega_315_5061_device::sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5061, tag, owner, clock) {} void sega_315_5061_device::decrypt() { static const uint8_t convtable[32][4] = @@ -908,7 +908,7 @@ void sega_315_5061_device::decrypt() -sega_315_5018_device::sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5018, tag, owner, clock) {} +sega_315_5018_device::sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5018, tag, owner, clock) {} void sega_315_5018_device::decrypt() { static const uint8_t convtable[32][4] = @@ -938,7 +938,7 @@ void sega_315_5018_device::decrypt() } -sega_315_5010_device::sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5010, tag, owner, clock) {} +sega_315_5010_device::sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5010, tag, owner, clock) {} void sega_315_5010_device::decrypt() { static const uint8_t convtable[32][4] = @@ -969,7 +969,7 @@ void sega_315_5010_device::decrypt() -sega_315_5128_device::sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5128, tag, owner, clock) {} +sega_315_5128_device::sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5128, tag, owner, clock) {} void sega_315_5128_device::decrypt() { static const uint8_t convtable[32][4] = @@ -998,7 +998,7 @@ void sega_315_5128_device::decrypt() } -sega_315_5028_device::sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5028, tag, owner, clock) {} +sega_315_5028_device::sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5028, tag, owner, clock) {} void sega_315_5028_device::decrypt() { static const uint8_t convtable[32][4] = @@ -1027,7 +1027,7 @@ void sega_315_5028_device::decrypt() } -sega_315_5084_device::sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5084, tag, owner, clock) {} +sega_315_5084_device::sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5084, tag, owner, clock) {} void sega_315_5084_device::decrypt() { static const uint8_t convtable[32][4] = diff --git a/src/devices/machine/segacrpt_device.h b/src/devices/machine/segacrpt_device.h index 63b50bde2d0..3bc9a6a7946 100644 --- a/src/devices/machine/segacrpt_device.h +++ b/src/devices/machine/segacrpt_device.h @@ -22,7 +22,7 @@ public: void set_region_p(uint8_t* ptr); protected: - segacrpt_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + segacrpt_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -44,7 +44,7 @@ private: class sega_315_5132_device : public segacrpt_z80_device { public: - sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -52,7 +52,7 @@ protected: class sega_315_5155_device : public segacrpt_z80_device { public: - sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -60,7 +60,7 @@ protected: class sega_315_5110_device : public segacrpt_z80_device { public: - sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -68,7 +68,7 @@ protected: class sega_315_5135_device : public segacrpt_z80_device { public: - sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -76,7 +76,7 @@ protected: class sega_315_5051_device : public segacrpt_z80_device { public: - sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -84,7 +84,7 @@ protected: class sega_315_5098_device : public segacrpt_z80_device { public: - sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -92,7 +92,7 @@ protected: class sega_315_5102_device : public segacrpt_z80_device { public: - sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -100,7 +100,7 @@ protected: class sega_315_5065_device : public segacrpt_z80_device { public: - sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -109,7 +109,7 @@ protected: class sega_315_5064_device : public segacrpt_z80_device { public: - sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -118,7 +118,7 @@ protected: class sega_315_5033_device : public segacrpt_z80_device { public: - sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -126,7 +126,7 @@ protected: class sega_315_5041_device : public segacrpt_z80_device { public: - sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -134,8 +134,8 @@ protected: class sega_315_5048_device : public segacrpt_z80_device { public: - sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); - sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; @@ -144,7 +144,7 @@ protected: class sega_315_5093_device : public segacrpt_z80_device { public: - sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -152,7 +152,7 @@ protected: class sega_315_5099_device : public segacrpt_z80_device { public: - sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -160,7 +160,7 @@ protected: class sega_315_spat_device : public segacrpt_z80_device { public: - sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -168,7 +168,7 @@ protected: class sega_315_5015_device : public segacrpt_z80_device { public: - sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -177,13 +177,13 @@ protected: class sega_315_5133_device : public sega_315_5048_device { public: - sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sega_315_5014_device : public segacrpt_z80_device { public: - sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -191,7 +191,7 @@ protected: class sega_315_5013_device : public segacrpt_z80_device { public: - sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -199,7 +199,7 @@ protected: class sega_315_5061_device : public segacrpt_z80_device { public: - sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -209,7 +209,7 @@ protected: class sega_315_5018_device : public segacrpt_z80_device { public: - sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -217,7 +217,7 @@ protected: class sega_315_5010_device : public segacrpt_z80_device { public: - sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -227,7 +227,7 @@ protected: class sega_315_5128_device : public segacrpt_z80_device { public: - sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -235,7 +235,7 @@ protected: class sega_315_5028_device : public segacrpt_z80_device { public: - sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -243,7 +243,7 @@ protected: class sega_315_5084_device : public segacrpt_z80_device { public: - sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; diff --git a/src/devices/machine/sensorboard.cpp b/src/devices/machine/sensorboard.cpp index c7786a0c4d5..163e5497180 100644 --- a/src/devices/machine/sensorboard.cpp +++ b/src/devices/machine/sensorboard.cpp @@ -66,7 +66,7 @@ DEFINE_DEVICE_TYPE(SENSORBOARD, sensorboard_device, "sensorboard", "Sensorboard" // constructor //------------------------------------------------- -sensorboard_device::sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sensorboard_device::sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SENSORBOARD, tag, owner, clock), device_nvram_interface(mconfig, *this), m_out_piece(*this, "piece_%c%u", 0U + 'a', 1U), diff --git a/src/devices/machine/sensorboard.h b/src/devices/machine/sensorboard.h index b2d12e8a3d1..af51a51542e 100644 --- a/src/devices/machine/sensorboard.h +++ b/src/devices/machine/sensorboard.h @@ -14,7 +14,7 @@ class sensorboard_device : public device_t, public device_nvram_interface { public: - sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); enum sb_type { diff --git a/src/devices/machine/serflash.cpp b/src/devices/machine/serflash.cpp index c7589e6f58e..f28e4a0d478 100644 --- a/src/devices/machine/serflash.cpp +++ b/src/devices/machine/serflash.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(SERFLASH, serflash_device, "serflash", "Serial Flash") // serflash_device - constructor //------------------------------------------------- -serflash_device::serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +serflash_device::serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERFLASH, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_length(0) diff --git a/src/devices/machine/serflash.h b/src/devices/machine/serflash.h index 1c9e5ab7afc..b536f7a7648 100644 --- a/src/devices/machine/serflash.h +++ b/src/devices/machine/serflash.h @@ -21,7 +21,7 @@ public: typedef device_delegate init_delegate; // construction/destruction - serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_flash_page_size(uint16_t size) { m_flash_page_size = size; } diff --git a/src/devices/machine/sis5513_ide.cpp b/src/devices/machine/sis5513_ide.cpp index 99a9541f80e..e5111689235 100644 --- a/src/devices/machine/sis5513_ide.cpp +++ b/src/devices/machine/sis5513_ide.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(SIS5513_IDE, sis5513_ide_device, "sis5513_ide", "SiS 5513 IDE Controller") -sis5513_ide_device::sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis5513_ide_device::sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS5513_IDE, tag, owner, clock) , m_ide1(*this, "ide1") , m_ide2(*this, "ide2") diff --git a/src/devices/machine/sis5513_ide.h b/src/devices/machine/sis5513_ide.h index 89d4916c47b..21b5a7f6cb0 100644 --- a/src/devices/machine/sis5513_ide.h +++ b/src/devices/machine/sis5513_ide.h @@ -13,7 +13,7 @@ class sis5513_ide_device : public pci_device { public: template sis5513_ide_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&host_tag, uint32_t bmspace = AS_PROGRAM ) : sis5513_ide_device(mconfig, tag, owner, clock) { @@ -23,7 +23,7 @@ public: set_ids(0x10395513, 0xd0, 0x010180, 0x00); m_bus_master_space.set_tag(host_tag, bmspace); } - sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_pri() { return m_irq_pri_callback.bind(); } auto irq_sec() { return m_irq_sec_callback.bind(); } diff --git a/src/devices/machine/sis630_gui.cpp b/src/devices/machine/sis630_gui.cpp index 24270f95e02..9b19f0a90eb 100644 --- a/src/devices/machine/sis630_gui.cpp +++ b/src/devices/machine/sis630_gui.cpp @@ -66,7 +66,7 @@ // (definitely doesn't have dual segment mode for instance) DEFINE_DEVICE_TYPE(SIS630_SVGA, sis630_svga_device, "sis630_svga", "SiS 630 SVGA") -sis630_svga_device::sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_svga_device::sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, SIS630_SVGA, tag, owner, clock) { @@ -361,7 +361,7 @@ void sis630_svga_device::mem_w(offs_t offset, uint8_t data) DEFINE_DEVICE_TYPE(SIS630_GUI, sis630_gui_device, "sis630_gui", "SiS 630 GUI") -sis630_gui_device::sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_gui_device::sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS630_GUI, tag, owner, clock) , m_svga(*this, "svga") , m_gui_rom(*this, "gui_rom") @@ -395,7 +395,7 @@ void sis630_gui_device::device_add_mconfig(machine_config &config) screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480); screen.set_screen_update(m_svga, FUNC(sis630_svga_device::screen_update)); - SIS630_SVGA(config, m_svga, 0); + SIS630_SVGA(config, m_svga); m_svga->set_screen("screen"); // 64MB according to POST // documentation claims 128MB, assume being wrong @@ -663,7 +663,7 @@ void sis630_gui_device::vga_3d0_w(offs_t offset, uint32_t data, uint32_t mem_mas DEFINE_DEVICE_TYPE(SIS630_BRIDGE, sis630_bridge_device, "sis630_bridge", "SiS 630 Virtual PCI-to-PCI bridge") -sis630_bridge_device::sis630_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_bridge_device::sis630_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, SIS630_BRIDGE, tag, owner, clock) , m_vga(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/sis630_gui.h b/src/devices/machine/sis630_gui.h index 79690f81575..b84326bdc69 100644 --- a/src/devices/machine/sis630_gui.h +++ b/src/devices/machine/sis630_gui.h @@ -12,7 +12,7 @@ class sis630_svga_device : public svga_device { public: - sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t mem_r(offs_t offset) override; virtual void mem_w(offs_t offset, uint8_t data) override; @@ -50,7 +50,7 @@ DECLARE_DEVICE_TYPE(SIS630_SVGA, sis630_svga_device) class sis630_gui_device : public pci_device { public: - sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void legacy_memory_map(address_map &map); void legacy_io_map(address_map &map); @@ -111,7 +111,7 @@ class sis630_bridge_device : public pci_bridge_device { public: template sis630_bridge_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gui_tag ) : sis630_bridge_device(mconfig, tag, owner, clock) { @@ -121,7 +121,7 @@ public: m_vga.set_tag(std::forward(gui_tag)); } - sis630_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/sis630_host.cpp b/src/devices/machine/sis630_host.cpp index 5088585aa5f..a6171a38ad6 100644 --- a/src/devices/machine/sis630_host.cpp +++ b/src/devices/machine/sis630_host.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(SIS630_HOST, sis630_host_device, "sis630_host", "SiS 630 Host-to-PCI Bridge") -sis630_host_device::sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_host_device::sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, SIS630_HOST, tag, owner, clock) , m_host_cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/sis630_host.h b/src/devices/machine/sis630_host.h index 46efc0ed803..4bce6026d13 100644 --- a/src/devices/machine/sis630_host.h +++ b/src/devices/machine/sis630_host.h @@ -13,7 +13,7 @@ class sis630_host_device : public pci_host_device { public: template sis630_host_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int ram_size ) : sis630_host_device(mconfig, tag, owner, clock) { @@ -24,7 +24,7 @@ public: set_ram_size(ram_size); } - sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_ram_size(int ram_size) { m_ram_size = ram_size; } diff --git a/src/devices/machine/sis7001_usb.cpp b/src/devices/machine/sis7001_usb.cpp index c54f62d9713..b59874e335a 100644 --- a/src/devices/machine/sis7001_usb.cpp +++ b/src/devices/machine/sis7001_usb.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(SIS7001_USB, sis7001_usb_device, "sis7001_usb", "SiS 7001 USB Host Controller") -sis7001_usb_device::sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis7001_usb_device::sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS7001_USB, tag, owner, clock) { diff --git a/src/devices/machine/sis7001_usb.h b/src/devices/machine/sis7001_usb.h index 1087b06ce30..82a02e0dc69 100644 --- a/src/devices/machine/sis7001_usb.h +++ b/src/devices/machine/sis7001_usb.h @@ -12,7 +12,7 @@ class sis7001_usb_device : public pci_device { public: sis7001_usb_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int num_ports ) : sis7001_usb_device(mconfig, tag, owner, clock) { @@ -22,7 +22,7 @@ public: // TODO: should really read from a std::list interface m_downstream_ports = num_ports; } - sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::MEDIA; } diff --git a/src/devices/machine/sis7018_audio.cpp b/src/devices/machine/sis7018_audio.cpp index ac87ab46ac2..0e30ce12f3d 100644 --- a/src/devices/machine/sis7018_audio.cpp +++ b/src/devices/machine/sis7018_audio.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(SIS7018_AUDIO, sis7018_audio_device, "sis7018_audio", "SiS 7018 Audio AC97") -sis7018_audio_device::sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis7018_audio_device::sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS7018_AUDIO, tag, owner, clock) { diff --git a/src/devices/machine/sis7018_audio.h b/src/devices/machine/sis7018_audio.h index d72794e05c6..8c2ff7131aa 100644 --- a/src/devices/machine/sis7018_audio.h +++ b/src/devices/machine/sis7018_audio.h @@ -11,7 +11,7 @@ class sis7018_audio_device : public pci_device { public: - sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::SOUND; } diff --git a/src/devices/machine/sis85c496.cpp b/src/devices/machine/sis85c496.cpp index 66bab2adbda..73de49b49dd 100644 --- a/src/devices/machine/sis85c496.cpp +++ b/src/devices/machine/sis85c496.cpp @@ -47,7 +47,7 @@ void sis85c496_host_device::internal_io_map(address_map &map) void sis85c496_host_device::device_add_mconfig(machine_config &config) { - PIT8254(config, m_pit8254, 0); + PIT8254(config, m_pit8254); m_pit8254->set_clk<0>(4772720/4); // heartbeat IRQ m_pit8254->out_handler<0>().set(FUNC(sis85c496_host_device::at_pit8254_out0_changed)); m_pit8254->set_clk<1>(4772720/4); // DRAM refresh @@ -88,12 +88,12 @@ void sis85c496_host_device::device_add_mconfig(machine_config &config) m_dma8237_2->out_dack_callback<2>().set(FUNC(sis85c496_host_device::pc_dack6_w)); m_dma8237_2->out_dack_callback<3>().set(FUNC(sis85c496_host_device::pc_dack7_w)); - PIC8259(config, m_pic8259_master, 0); + PIC8259(config, m_pic8259_master); m_pic8259_master->out_int_callback().set(FUNC(sis85c496_host_device::cpu_int_w)); m_pic8259_master->in_sp_callback().set_constant(1); m_pic8259_master->read_slave_ack_callback().set(FUNC(sis85c496_host_device::get_slave_ack)); - PIC8259(config, m_pic8259_slave, 0); + PIC8259(config, m_pic8259_slave); m_pic8259_slave->out_int_callback().set(m_pic8259_master, FUNC(pic8259_device::ir2_w)); m_pic8259_slave->in_sp_callback().set_constant(0); @@ -118,7 +118,7 @@ void sis85c496_host_device::device_add_mconfig(machine_config &config) } -sis85c496_host_device::sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis85c496_host_device::sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, SIS85C496, tag, owner, clock), m_maincpu(*this, finder_base::DUMMY_TAG), m_pic8259_master(*this, "pic8259_master"), diff --git a/src/devices/machine/sis85c496.h b/src/devices/machine/sis85c496.h index 05bd11d5d56..d8dd06873ac 100644 --- a/src/devices/machine/sis85c496.h +++ b/src/devices/machine/sis85c496.h @@ -32,7 +32,7 @@ class sis85c496_host_device : public pci_host_device { public: - sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_cpu_tag(const char *tag); void set_ram_size(int ram_size); diff --git a/src/devices/machine/sis900_eth.cpp b/src/devices/machine/sis900_eth.cpp index d960c4b0293..560e0006c2f 100644 --- a/src/devices/machine/sis900_eth.cpp +++ b/src/devices/machine/sis900_eth.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(SIS900_ETH, sis900_eth_device, "sis900_eth", "SiS 900 Fast Ethernet Adapter") -sis900_eth_device::sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis900_eth_device::sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS900_ETH, tag, owner, clock) , m_eeprom(*this, "eeprom") , m_eth_rom(*this, "eth_rom") diff --git a/src/devices/machine/sis900_eth.h b/src/devices/machine/sis900_eth.h index 4d5fb46f2bd..db801407758 100644 --- a/src/devices/machine/sis900_eth.h +++ b/src/devices/machine/sis900_eth.h @@ -12,7 +12,7 @@ class sis900_eth_device : public pci_device { public: - sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::LAN; } diff --git a/src/devices/machine/sis950_lpc.cpp b/src/devices/machine/sis950_lpc.cpp index fa62813840b..a161f458ac0 100644 --- a/src/devices/machine/sis950_lpc.cpp +++ b/src/devices/machine/sis950_lpc.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(SIS950_LPC, sis950_lpc_device, "sis950_lpc", "SiS 950 LPC Super-South Bridge") -sis950_lpc_device::sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis950_lpc_device::sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS950_LPC, tag, owner, clock) , m_host_cpu(*this, finder_base::DUMMY_TAG) , m_flash_rom(*this, finder_base::DUMMY_TAG) @@ -121,7 +121,7 @@ void sis950_lpc_device::device_add_mconfig(machine_config &config) constexpr XTAL lpc_pit_clock = XTAL(14'318'181); // confirmed 82C54 - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); // heartbeat IRQ m_pit->set_clk<0>(lpc_pit_clock / 12); m_pit->out_handler<0>().set(FUNC(sis950_lpc_device::pit_out0)); @@ -147,7 +147,7 @@ void sis950_lpc_device::device_add_mconfig(machine_config &config) // TODO: ior/iow/dack callbacks // Confirmed 82C59s - PIC8259(config, m_pic_master, 0); + PIC8259(config, m_pic_master); m_pic_master->out_int_callback().set_inputline(m_host_cpu, 0); m_pic_master->in_sp_callback().set_constant(1); m_pic_master->read_slave_ack_callback().set( @@ -159,7 +159,7 @@ void sis950_lpc_device::device_add_mconfig(machine_config &config) return 0; }); - PIC8259(config, m_pic_slave, 0); + PIC8259(config, m_pic_slave); m_pic_slave->out_int_callback().set(m_pic_master, FUNC(pic8259_device::ir2_w)); m_pic_slave->in_sp_callback().set_constant(0); diff --git a/src/devices/machine/sis950_lpc.h b/src/devices/machine/sis950_lpc.h index a91f442a653..c8fafc47b44 100644 --- a/src/devices/machine/sis950_lpc.h +++ b/src/devices/machine/sis950_lpc.h @@ -36,7 +36,7 @@ class sis950_lpc_device : public pci_device { public: template sis950_lpc_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&flash_tag ) : sis950_lpc_device(mconfig, tag, owner, clock) { @@ -47,7 +47,7 @@ public: m_flash_rom.set_tag(std::forward(flash_tag)); } - sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::MOUSE; } diff --git a/src/devices/machine/sis950_smbus.cpp b/src/devices/machine/sis950_smbus.cpp index b96898cbbe0..aa57416063f 100644 --- a/src/devices/machine/sis950_smbus.cpp +++ b/src/devices/machine/sis950_smbus.cpp @@ -50,7 +50,7 @@ void sis950_smbus_device::map(address_map &map) #endif } -sis950_smbus_device::sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis950_smbus_device::sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SIS950_SMBUS, tag, owner, clock) { } diff --git a/src/devices/machine/sis950_smbus.h b/src/devices/machine/sis950_smbus.h index a474fe10914..cf9609c1043 100644 --- a/src/devices/machine/sis950_smbus.h +++ b/src/devices/machine/sis950_smbus.h @@ -9,7 +9,7 @@ class sis950_smbus_device : public device_t { public: - sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); diff --git a/src/devices/machine/smartboard.cpp b/src/devices/machine/smartboard.cpp index ac18fd34534..55b7a92cd39 100644 --- a/src/devices/machine/smartboard.cpp +++ b/src/devices/machine/smartboard.cpp @@ -67,7 +67,7 @@ DEFINE_DEVICE_TYPE(TASC_SB30, tasc_sb30_device, "tasc_sb30", "Tasc SmartBoard SB // tasc_sb30_device - constructor //------------------------------------------------- -tasc_sb30_device::tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tasc_sb30_device::tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TASC_SB30, tag, owner, clock) , m_board(*this, "board") , m_out_leds(*this, "sb30_led_%u.%u", 0U, 0U) diff --git a/src/devices/machine/smartboard.h b/src/devices/machine/smartboard.h index cb87bc36966..6d6a71b5409 100644 --- a/src/devices/machine/smartboard.h +++ b/src/devices/machine/smartboard.h @@ -16,7 +16,7 @@ class tasc_sb30_device : public device_t { public: - tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto data_out() { return m_data_out.bind(); } // data_r diff --git a/src/devices/machine/smartmed.cpp b/src/devices/machine/smartmed.cpp index 1c54d36d174..fd0fb440233 100644 --- a/src/devices/machine/smartmed.cpp +++ b/src/devices/machine/smartmed.cpp @@ -74,12 +74,12 @@ enum DEFINE_DEVICE_TYPE(NAND, nand_device, "nand", "NAND Flash Memory") -nand_device::nand_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nand_device::nand_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nand_device(mconfig, NAND, tag, owner, clock) { } -nand_device::nand_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nand_device::nand_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_page_data_size(0) , m_page_total_size(0) @@ -777,7 +777,7 @@ void nand_device::device_reset() DEFINE_DEVICE_TYPE(SMARTMEDIA, smartmedia_image_device, "smartmedia", "SmartMedia Flash card") -smartmedia_image_device::smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smartmedia_image_device::smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nand_device(mconfig, SMARTMEDIA, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/devices/machine/smartmed.h b/src/devices/machine/smartmed.h index 77c7d53b209..63e2874113c 100644 --- a/src/devices/machine/smartmed.h +++ b/src/devices/machine/smartmed.h @@ -34,7 +34,7 @@ public: }; // construction/destruction - nand_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nand_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto rnb_wr_callback() { return m_write_rnb.bind(); } @@ -143,7 +143,7 @@ protected: SM_PM_C // accessing spare field }; - nand_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nand_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -199,7 +199,7 @@ class smartmedia_image_device : public nand_device, public device_memcard_image_ { public: // construction/destruction - smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual bool is_creatable() const noexcept override { return false; } diff --git a/src/devices/machine/smc91c9x.cpp b/src/devices/machine/smc91c9x.cpp index 3ca3fbeed13..59e36521beb 100644 --- a/src/devices/machine/smc91c9x.cpp +++ b/src/devices/machine/smc91c9x.cpp @@ -46,7 +46,7 @@ static const char *const ethernet_regname[64] = DEFINE_DEVICE_TYPE(SMC91C94, smc91c94_device, "smc91c94", "SMC91C94 Ethernet Controller") -smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : smc91c9x_device(mconfig, SMC91C94, tag, owner, clock, dev_type::SMC91C94) { m_num_ebuf = 18; @@ -54,13 +54,13 @@ smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, DEFINE_DEVICE_TYPE(SMC91C96, smc91c96_device, "smc91c96", "SMC91C96 Ethernet Controller") -smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : smc91c9x_device(mconfig, SMC91C96, tag, owner, clock, dev_type::SMC91C96) { m_num_ebuf = 24; } -smc91c9x_device::smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dev_type device_type) +smc91c9x_device::smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_device_type(device_type) diff --git a/src/devices/machine/smc91c9x.h b/src/devices/machine/smc91c9x.h index e1c91a3e566..8dae538ce54 100644 --- a/src/devices/machine/smc91c9x.h +++ b/src/devices/machine/smc91c9x.h @@ -35,7 +35,7 @@ protected: SMC91C96 }; - smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dev_type device_type); + smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type); // device-level overrides virtual void device_start() override; @@ -305,13 +305,13 @@ private: class smc91c94_device : public smc91c9x_device { public: - smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class smc91c96_device : public smc91c9x_device { public: - smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/smioc.cpp b/src/devices/machine/smioc.cpp index 06c3e03adb1..f9b13ae9f86 100644 --- a/src/devices/machine/smioc.cpp +++ b/src/devices/machine/smioc.cpp @@ -192,7 +192,7 @@ void smioc_device::device_add_mconfig(machine_config &config) // smioc_device - constructor //------------------------------------------------- -smioc_device::smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +smioc_device::smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMIOC, tag, owner, clock), m_smioccpu(*this, I188_TAG), m_dma8237(*this, "dma8237_%u", 1), diff --git a/src/devices/machine/smioc.h b/src/devices/machine/smioc.h index 73dd874d149..ae3e7f24596 100644 --- a/src/devices/machine/smioc.h +++ b/src/devices/machine/smioc.h @@ -38,7 +38,7 @@ class smioc_device : public device_t { public: /* Constructor and Destructor */ - smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto m68k_r_callback() { return m_m68k_r_cb.bind(); } auto m68k_w_callback() { return m_m68k_w_cb.bind(); } diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp index 7161d97b7f9..271d4440544 100644 --- a/src/devices/machine/smpc.cpp +++ b/src/devices/machine/smpc.cpp @@ -202,7 +202,7 @@ void smpc_hle_device::smpc_regs(address_map &map) // smpc_hle_device - constructor //------------------------------------------------- -smpc_hle_device::smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smpc_hle_device::smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMPC_HLE, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("regs", ENDIANNESS_LITTLE, 8, 7, 0, address_map_constructor(FUNC(smpc_hle_device::smpc_regs), this)) diff --git a/src/devices/machine/smpc.h b/src/devices/machine/smpc.h index 60b461b6ad3..491bba38618 100644 --- a/src/devices/machine/smpc.h +++ b/src/devices/machine/smpc.h @@ -27,7 +27,7 @@ class smpc_hle_device : public device_t, { public: // construction/destruction - smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations // void io_map(address_map &map); diff --git a/src/devices/machine/spchrom.cpp b/src/devices/machine/spchrom.cpp index 3cd95b87c2e..14d9a5fbd4e 100644 --- a/src/devices/machine/spchrom.cpp +++ b/src/devices/machine/spchrom.cpp @@ -25,7 +25,7 @@ // device type definition DEFINE_DEVICE_TYPE(SPEECHROM, speechrom_device, "speechrom", "TI Speech ROM") -speechrom_device::speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +speechrom_device::speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPEECHROM, tag, owner, clock), m_speechrom_data(nullptr), m_speechROMlen(0), m_speechROMaddr(0), m_load_pointer(0), diff --git a/src/devices/machine/spchrom.h b/src/devices/machine/spchrom.h index f84350da358..ad086e659e6 100644 --- a/src/devices/machine/spchrom.h +++ b/src/devices/machine/spchrom.h @@ -15,7 +15,7 @@ class speechrom_device : public device_t { public: // construction/destruction - speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /// TODO: implement bus behaviour int read(int count); diff --git a/src/devices/machine/spg110.cpp b/src/devices/machine/spg110.cpp index b4dbb4e8de8..72003dd2938 100644 --- a/src/devices/machine/spg110.cpp +++ b/src/devices/machine/spg110.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SPG110, spg110_device, "spg110", "SPG110 System-on-a-Chip") -spg110_device::spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal) : +spg110_device::spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal) : unsp_device(mconfig, type, tag, owner, clock, internal), device_mixer_interface(mconfig, *this, 2), m_screen(*this, finder_base::DUMMY_TAG), @@ -36,7 +36,7 @@ spg110_device::spg110_device(const machine_config &mconfig, device_type type, co } -spg110_device::spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg110_device::spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg110_device(mconfig, SPG110, tag, owner, clock, address_map_constructor(FUNC(spg110_device::internal_map), this)) { } diff --git a/src/devices/machine/spg110.h b/src/devices/machine/spg110.h index 8ecee9dea75..e38f4d7dc5e 100644 --- a/src/devices/machine/spg110.h +++ b/src/devices/machine/spg110.h @@ -17,10 +17,10 @@ class spg110_device : public unsp_device, public device_mixer_interface { public: - spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg110_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); @@ -43,7 +43,7 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank) { m_spg_video->vblank(state); } protected: - spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal); + spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal); void internal_map(address_map &map); diff --git a/src/devices/machine/spg110_video.cpp b/src/devices/machine/spg110_video.cpp index e89bd5488ec..246ce34c472 100644 --- a/src/devices/machine/spg110_video.cpp +++ b/src/devices/machine/spg110_video.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(SPG110_VIDEO, spg110_video_device, "spg110_video", "SPG110 System-on-a-Chip (Video)") -spg110_video_device::spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg110_video_device::spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("spg110_video", ENDIANNESS_BIG, 16, 32, 0, address_map_constructor(FUNC(spg110_video_device::map_video), this)), @@ -26,7 +26,7 @@ spg110_video_device::spg110_video_device(const machine_config &mconfig, device_t { } -spg110_video_device::spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg110_video_device::spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg110_video_device(mconfig, SPG110_VIDEO, tag, owner, clock) { } diff --git a/src/devices/machine/spg110_video.h b/src/devices/machine/spg110_video.h index 6f8e0db0b5c..a39f02cba01 100644 --- a/src/devices/machine/spg110_video.h +++ b/src/devices/machine/spg110_video.h @@ -16,11 +16,11 @@ class spg110_video_device : public device_t, public device_memory_interface { public: - spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg110_video_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); diff --git a/src/devices/machine/spg290_cdservo.cpp b/src/devices/machine/spg290_cdservo.cpp index 7d03836a486..26d4f885e2d 100644 --- a/src/devices/machine/spg290_cdservo.cpp +++ b/src/devices/machine/spg290_cdservo.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SPG290_CDSERVO, spg290_cdservo_device, "spg290_cdservo", "SPG290 CDServo HLE") -spg290_cdservo_device::spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_cdservo_device::spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_CDSERVO, tag, owner, clock) , m_cdrom(*this, finder_base::DUMMY_TAG) , m_irq_cb(*this) diff --git a/src/devices/machine/spg290_cdservo.h b/src/devices/machine/spg290_cdservo.h index aa1d8077407..70b67522f33 100644 --- a/src/devices/machine/spg290_cdservo.h +++ b/src/devices/machine/spg290_cdservo.h @@ -13,10 +13,10 @@ class spg290_cdservo_device : public device_t { public: - spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cdrom_tag) + spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cdrom_tag) : spg290_cdservo_device(mconfig, tag, owner, clock) { m_cdrom.set_tag(std::forward(cdrom_tag)); diff --git a/src/devices/machine/spg290_i2c.cpp b/src/devices/machine/spg290_i2c.cpp index e360a451736..bfc81b26942 100644 --- a/src/devices/machine/spg290_i2c.cpp +++ b/src/devices/machine/spg290_i2c.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(SPG290_I2C, spg290_i2c_device, "spg290_i2c", "SPG290 I2C") -spg290_i2c_device::spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_i2c_device::spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_I2C, tag, owner, clock) , m_irq_cb(*this) , m_i2c_read_cb(*this) diff --git a/src/devices/machine/spg290_i2c.h b/src/devices/machine/spg290_i2c.h index 2dca1d145f4..7bdff611303 100644 --- a/src/devices/machine/spg290_i2c.h +++ b/src/devices/machine/spg290_i2c.h @@ -10,7 +10,7 @@ class spg290_i2c_device : public device_t { public: - spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint32_t data, uint32_t mem_mask); uint32_t read(offs_t offset, uint32_t mem_mask); diff --git a/src/devices/machine/spg290_ppu.cpp b/src/devices/machine/spg290_ppu.cpp index 37f0def0f84..00da588f306 100644 --- a/src/devices/machine/spg290_ppu.cpp +++ b/src/devices/machine/spg290_ppu.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SPG290_PPU, spg290_ppu_device, "spg290_ppu", "SPG290 PPU") -spg290_ppu_device::spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_ppu_device::spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_PPU, tag, owner, clock) , m_screen(*this, finder_base::DUMMY_TAG) , m_sprite_palette_ram(*this, "sprite_palette_ram") diff --git a/src/devices/machine/spg290_ppu.h b/src/devices/machine/spg290_ppu.h index 83960abe6d6..3e1cdc65b2e 100644 --- a/src/devices/machine/spg290_ppu.h +++ b/src/devices/machine/spg290_ppu.h @@ -13,10 +13,10 @@ class spg290_ppu_device : public device_t { public: - spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg290_ppu_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); diff --git a/src/devices/machine/spg290_timer.cpp b/src/devices/machine/spg290_timer.cpp index ce3754079d3..0ee5161071d 100644 --- a/src/devices/machine/spg290_timer.cpp +++ b/src/devices/machine/spg290_timer.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(SPG290_TIMER, spg290_timer_device, "spg290_timer", "SPG290 Timer") -spg290_timer_device::spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_timer_device::spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_TIMER, tag, owner, clock) , m_irq_cb(*this) , m_enabled(false) diff --git a/src/devices/machine/spg290_timer.h b/src/devices/machine/spg290_timer.h index 486011cb90b..6a85bcdf5b4 100644 --- a/src/devices/machine/spg290_timer.h +++ b/src/devices/machine/spg290_timer.h @@ -10,7 +10,7 @@ class spg290_timer_device : public device_t { public: - spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint32_t data, uint32_t mem_mask); uint32_t read(offs_t offset, uint32_t mem_mask); diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp index 412b2d20a14..83609676db9 100644 --- a/src/devices/machine/spg2xx.cpp +++ b/src/devices/machine/spg2xx.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SPG2XX_128, spg2xx_128_device, "spg2xx_128", "SPG2xx-series S DEFINE_DEVICE_TYPE(SPG28X, spg28x_device, "spg28x", "SPG280-series System-on-a-Chip") // 64 sprites -spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) : +spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal) : unsp_device(mconfig, type, tag, owner, clock, internal), device_mixer_interface(mconfig, *this, 2), m_spg_audio(*this, "spgaudio"), @@ -45,23 +45,23 @@ spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, co { } -spg24x_device::spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg24x_device::spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_device(mconfig, SPG24X, tag, owner, clock, 256, address_map_constructor(FUNC(spg24x_device::internal_map), this)) { } -spg24x_device::spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) : +spg24x_device::spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal) : spg2xx_device(mconfig, type, tag, owner, clock, sprite_limit, internal) { } -spg2xx_128_device::spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg2xx_128_device::spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg24x_device(mconfig, SPG2XX_128, tag, owner, clock, 128, address_map_constructor(FUNC(spg2xx_128_device::internal_map), this)) { } -spg28x_device::spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg28x_device::spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg24x_device(mconfig, SPG28X, tag, owner, clock, 64, address_map_constructor(FUNC(spg28x_device::internal_map), this)) { } diff --git a/src/devices/machine/spg2xx.h b/src/devices/machine/spg2xx.h index 6b6bfd0d560..541ded1dcfd 100644 --- a/src/devices/machine/spg2xx.h +++ b/src/devices/machine/spg2xx.h @@ -78,7 +78,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return m_spg_video->screen_update(screen, bitmap, cliprect); } protected: - spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal); + spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal); void internal_map(address_map &map); @@ -151,15 +151,15 @@ class spg24x_device : public spg2xx_device { public: template - spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg24x_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); } - spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal); + spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal); - spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; @@ -169,26 +169,26 @@ class spg2xx_128_device : public spg24x_device { public: template - spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg2xx_128_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); } - spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class spg28x_device : public spg24x_device { public: template - spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg28x_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); } - spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/spg2xx_audio.cpp b/src/devices/machine/spg2xx_audio.cpp index e8518bdaa59..7bdb2d3a3af 100644 --- a/src/devices/machine/spg2xx_audio.cpp +++ b/src/devices/machine/spg2xx_audio.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(SUNPLUS_GCM394_AUDIO, sunplus_gcm394_audio_device, "gcm394_au static FILE *adpcm_file[16] = {}; #endif -spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_space_read_cb(*this) @@ -56,17 +56,17 @@ spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, device_t { } -spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_audio_device(mconfig, SPG2XX_AUDIO, tag, owner, clock) { } -spg110_audio_device::spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg110_audio_device::spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_audio_device(mconfig, SPG110_AUDIO, tag, owner, clock) { } -sunplus_gcm394_audio_device::sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sunplus_gcm394_audio_device::sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_audio_device(mconfig, SUNPLUS_GCM394_AUDIO, tag, owner, clock) { } diff --git a/src/devices/machine/spg2xx_audio.h b/src/devices/machine/spg2xx_audio.h index d0712139134..dd785f44cfe 100644 --- a/src/devices/machine/spg2xx_audio.h +++ b/src/devices/machine/spg2xx_audio.h @@ -17,8 +17,8 @@ class spg2xx_audio_device : public device_t, public device_sound_interface { public: - spg2xx_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg2xx_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto space_read_callback() { return m_space_read_cb.bind(); } auto write_irq_callback() { return m_irq_cb.bind(); } @@ -381,7 +381,7 @@ private: class spg110_audio_device : public spg2xx_audio_device { public: - spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void audio_w(offs_t offset, uint16_t data) override; @@ -395,7 +395,7 @@ public: class sunplus_gcm394_audio_device : public spg2xx_audio_device { public: - sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t control_r(offs_t offset); void control_w(offs_t offset, uint16_t data); diff --git a/src/devices/machine/spg2xx_io.cpp b/src/devices/machine/spg2xx_io.cpp index 13fa8a04c4f..8999375ffad 100644 --- a/src/devices/machine/spg2xx_io.cpp +++ b/src/devices/machine/spg2xx_io.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(SPG28X_IO, spg28x_io_device, "spg28x_io", "SPG280-series Syst #define IO_IRQ_ENABLE m_io_regs[REG_INT_CTRL] #define IO_IRQ_STATUS m_io_regs[REG_INT_CLEAR] -spg2xx_io_device::spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg2xx_io_device::spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_porta_out(*this), m_portb_out(*this), @@ -64,12 +64,12 @@ spg2xx_io_device::spg2xx_io_device(const machine_config &mconfig, device_type ty { } -spg24x_io_device::spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg24x_io_device::spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_io_device(mconfig, SPG24X_IO, tag, owner, clock, 256) { } -spg28x_io_device::spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg28x_io_device::spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_io_device(mconfig, SPG28X_IO, tag, owner, clock, 64) { } diff --git a/src/devices/machine/spg2xx_io.h b/src/devices/machine/spg2xx_io.h index c674ae72e6b..dc97813640a 100644 --- a/src/devices/machine/spg2xx_io.h +++ b/src/devices/machine/spg2xx_io.h @@ -12,7 +12,7 @@ class spg2xx_io_device : public device_t { public: - spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); auto porta_out() { return m_porta_out.bind(); } auto portb_out() { return m_portb_out.bind(); } @@ -54,7 +54,7 @@ public: template uint16_t adc_r() { return m_adc_in[Line](); } protected: - spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint32_t sprite_limit) + spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint32_t sprite_limit) : spg2xx_io_device(mconfig, type, tag, owner, clock) { } @@ -275,28 +275,28 @@ class spg24x_io_device : public spg2xx_io_device { public: template - spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg24x_io_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); m_screen.set_tag(std::forward(screen_tag)); } - spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class spg28x_io_device : public spg2xx_io_device { public: template - spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg28x_io_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); m_screen.set_tag(std::forward(screen_tag)); } - spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void io_extended_w(offs_t offset, uint16_t data) override; }; diff --git a/src/devices/machine/spg2xx_sysdma.cpp b/src/devices/machine/spg2xx_sysdma.cpp index d48eee75fdf..14c65dd0be9 100644 --- a/src/devices/machine/spg2xx_sysdma.cpp +++ b/src/devices/machine/spg2xx_sysdma.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SPG2XX_SYSDMA, spg2xx_sysdma_device, "spg2xx_sysdma", "SPG240 -spg2xx_sysdma_device::spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg2xx_sysdma_device::spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG2XX_SYSDMA, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/spg2xx_sysdma.h b/src/devices/machine/spg2xx_sysdma.h index 3264d97ce66..4ba4e85410d 100644 --- a/src/devices/machine/spg2xx_sysdma.h +++ b/src/devices/machine/spg2xx_sysdma.h @@ -20,13 +20,13 @@ class spg2xx_sysdma_device : public device_t { public: template - spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : spg2xx_sysdma_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); } - spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t dma_r(offs_t offset); void dma_w(offs_t offset, uint16_t data); diff --git a/src/devices/machine/spg2xx_video.cpp b/src/devices/machine/spg2xx_video.cpp index b8d9fa2d22d..b894d3f7300 100644 --- a/src/devices/machine/spg2xx_video.cpp +++ b/src/devices/machine/spg2xx_video.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(SPG24X_VIDEO, spg24x_video_device, "spg24x_video", "SPG240-se #define VIDEO_IRQ_ENABLE m_video_regs[0x62] #define VIDEO_IRQ_STATUS m_video_regs[0x63] -spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_guny_in(*this), m_gunx_in(*this), @@ -42,7 +42,7 @@ spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_t { } -spg24x_video_device::spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg24x_video_device::spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_video_device(mconfig, SPG24X_VIDEO, tag, owner, clock) { } @@ -479,5 +479,5 @@ TIMER_CALLBACK_MEMBER(spg2xx_video_device::screenpos_hit) void spg2xx_video_device::device_add_mconfig(machine_config &config) { - SPG_RENDERER(config, m_renderer, 0); + SPG_RENDERER(config, m_renderer); } diff --git a/src/devices/machine/spg2xx_video.h b/src/devices/machine/spg2xx_video.h index b484c42d1af..eca0e9ae960 100644 --- a/src/devices/machine/spg2xx_video.h +++ b/src/devices/machine/spg2xx_video.h @@ -18,7 +18,7 @@ class spg2xx_video_device : public device_t { public: - spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); auto guny_in() { return m_guny_in.bind(); } auto gunx_in() { return m_gunx_in.bind(); } @@ -65,14 +65,14 @@ class spg24x_video_device : public spg2xx_video_device { public: template - spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg24x_video_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); m_screen.set_tag(std::forward(screen_tag)); } - spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SPG24X_VIDEO, spg24x_video_device) diff --git a/src/devices/machine/spg_renderer.cpp b/src/devices/machine/spg_renderer.cpp index 6dd526a902a..a0a127ecf5d 100644 --- a/src/devices/machine/spg_renderer.cpp +++ b/src/devices/machine/spg_renderer.cpp @@ -6,13 +6,13 @@ DEFINE_DEVICE_TYPE(SPG_RENDERER, spg_renderer_device, "spg_renderer", "SunPlus / GeneralPlus video rendering") -spg_renderer_device::spg_renderer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg_renderer_device::spg_renderer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_space_read_cb(*this) { } -spg_renderer_device::spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg_renderer_device::spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg_renderer_device(mconfig, SPG_RENDERER, tag, owner, clock) { } diff --git a/src/devices/machine/spg_renderer.h b/src/devices/machine/spg_renderer.h index 23a6a515106..0b04252981a 100644 --- a/src/devices/machine/spg_renderer.h +++ b/src/devices/machine/spg_renderer.h @@ -11,8 +11,8 @@ class spg_renderer_device : public device_t { public: - spg_renderer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg_renderer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void draw_sprites(bool read_from_csspace, int extended_sprites_mode, bool alt_extrasprite_hack, uint32_t palbank, bool highres, const rectangle& cliprect, uint32_t scanline, int priority, uint32_t spritegfxdata_addr, address_space& spc, uint16_t* paletteram, uint16_t* spriteram, int sprlimit); void draw_page(bool read_from_csspace, bool has_extended_tilemaps, bool use_alt_tile_addressing, uint32_t palbank, const rectangle& cliprect, uint32_t scanline, int priority, uint32_t tilegfxdata_addr, uint16_t* scrollregs, uint16_t* tilemapregs, address_space& spc, uint16_t* paletteram, uint16_t* scrollram, uint32_t which); diff --git a/src/devices/machine/spi_sdcard.cpp b/src/devices/machine/spi_sdcard.cpp index 9166cf8be64..1a36a13c9dc 100644 --- a/src/devices/machine/spi_sdcard.cpp +++ b/src/devices/machine/spi_sdcard.cpp @@ -44,7 +44,7 @@ static constexpr u8 DATA_RESPONSE_IO_ERROR = 0x0d; DEFINE_DEVICE_TYPE(SPI_SDCARD, spi_sdcard_sdhc_device, "spi_sdhccard", "SDHC Card (SPI Interface)") DEFINE_DEVICE_TYPE(SPI_SDCARDV2, spi_sdcard_sdv2_device, "spi_sdv2card", "SDV2 Card (SPI Interface)") -spi_sdcard_device::spi_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spi_sdcard_device::spi_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), write_miso(*this), m_image(*this, "image"), @@ -57,13 +57,13 @@ spi_sdcard_device::spi_sdcard_device(const machine_config &mconfig, device_type { } -spi_sdcard_sdv2_device::spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spi_sdcard_sdv2_device::spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spi_sdcard_device(mconfig, SPI_SDCARDV2, tag, owner, clock) { m_type = SD_TYPE_V2; } -spi_sdcard_sdhc_device::spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spi_sdcard_sdhc_device::spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spi_sdcard_device(mconfig, SPI_SDCARD, tag, owner, clock) { m_type = SD_TYPE_HC; diff --git a/src/devices/machine/spi_sdcard.h b/src/devices/machine/spi_sdcard.h index 4aa81078685..3ca1be1d68e 100644 --- a/src/devices/machine/spi_sdcard.h +++ b/src/devices/machine/spi_sdcard.h @@ -27,7 +27,7 @@ protected: SD_TYPE_HC }; - spi_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spi_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -82,13 +82,13 @@ private: class spi_sdcard_sdhc_device : public spi_sdcard_device { public: - spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class spi_sdcard_sdv2_device : public spi_sdcard_device { public: - spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SPI_SDCARD, spi_sdcard_sdhc_device) diff --git a/src/devices/machine/steppers.cpp b/src/devices/machine/steppers.cpp index 98e67916f01..d6ab72da3a2 100644 --- a/src/devices/machine/steppers.cpp +++ b/src/devices/machine/steppers.cpp @@ -44,12 +44,12 @@ DEFINE_DEVICE_TYPE(STEPPER, stepper_device, "stepper", "Stepper Motor") DEFINE_DEVICE_TYPE(REEL, reel_device, "reel", "Fruit Machine Reel") -stepper_device::stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +stepper_device::stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : stepper_device(mconfig, STEPPER, tag, owner, clock) { } -stepper_device::stepper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +stepper_device::stepper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_max_steps(48*2) , m_optic_cb(*this) @@ -509,7 +509,7 @@ reel_device::reel_device(const machine_config &mconfig, const char *tag, device_ } /////////////////////////////////////////////////////////////////////////// -reel_device::reel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +reel_device::reel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : stepper_device(mconfig, REEL, tag, owner, clock) { } diff --git a/src/devices/machine/steppers.h b/src/devices/machine/steppers.h index 3a07de01d62..dedfe94c838 100644 --- a/src/devices/machine/steppers.h +++ b/src/devices/machine/steppers.h @@ -40,12 +40,12 @@ class stepper_device : public device_t { public: stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint8_t init_phase) - : stepper_device(mconfig, tag, owner, (uint32_t)0) + : stepper_device(mconfig, tag, owner) { set_init_phase(init_phase); } - stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto optic_handler() { return m_optic_cb.bind(); } @@ -77,7 +77,7 @@ public: int get_max() { return m_max_steps; } protected: - stepper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + stepper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; @@ -107,7 +107,7 @@ public: reel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint8_t type, int16_t start_index, int16_t end_index , int16_t index_pattern, uint8_t init_phase, int16_t max_steps = 48*2); - reel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + reel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/machine/strata.cpp b/src/devices/machine/strata.cpp index 15841fe4597..437bd7558ee 100644 --- a/src/devices/machine/strata.cpp +++ b/src/devices/machine/strata.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(STRATAFLASH, strataflash_device, "strataflash", "Intel 28F640J5") -strataflash_device::strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +strataflash_device::strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, STRATAFLASH, tag, owner, clock) , device_nvram_interface(mconfig, *this) { diff --git a/src/devices/machine/strata.h b/src/devices/machine/strata.h index 0c6f487c50e..8fed63319bf 100644 --- a/src/devices/machine/strata.h +++ b/src/devices/machine/strata.h @@ -9,7 +9,7 @@ class strataflash_device : public device_t, public device_nvram_interface { public: - strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // 8-bit access uint8_t read8(offs_t offset); diff --git a/src/devices/machine/stvcd.cpp b/src/devices/machine/stvcd.cpp index 23720aa1277..4e29146e141 100644 --- a/src/devices/machine/stvcd.cpp +++ b/src/devices/machine/stvcd.cpp @@ -85,7 +85,7 @@ DASM notes: DEFINE_DEVICE_TYPE(STVCD, stvcd_device, "stvcd", "Sega Saturn/ST-V CD Block HLE") -stvcd_device::stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +stvcd_device::stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, STVCD, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , device_memory_interface(mconfig, *this) diff --git a/src/devices/machine/stvcd.h b/src/devices/machine/stvcd.h index 78ad1392c24..509b00c4439 100644 --- a/src/devices/machine/stvcd.h +++ b/src/devices/machine/stvcd.h @@ -20,7 +20,7 @@ class stvcd_device : public device_t, static constexpr uint32_t MAX_DIR_SIZE = 256*1024; public: - stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t stvcd_r(offs_t offset, uint32_t mem_mask = ~0); void stvcd_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/sun4c_mmu.cpp b/src/devices/machine/sun4c_mmu.cpp index 91686a42fdf..6b78d0b495f 100644 --- a/src/devices/machine/sun4c_mmu.cpp +++ b/src/devices/machine/sun4c_mmu.cpp @@ -49,7 +49,7 @@ static FILE* s_mem_log = nullptr; #define VERBOSE (0) #include "logmacro.h" -sun4_mmu_base_device::sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sun4_mmu_base_device::sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG) , m_ram(*this, finder_base::DUMMY_TAG) @@ -71,12 +71,12 @@ sun4_mmu_base_device::sun4_mmu_base_device(const machine_config &mconfig, device { } -sun4_mmu_device::sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sun4_mmu_device::sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sun4_mmu_base_device(mconfig, SUN4_MMU, tag, owner, clock, 7, 0x7f, 0x7ff, 11, 0x1f, 0x7ffff, 0xfff) { } -sun4c_mmu_device::sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sun4c_mmu_device::sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sun4_mmu_base_device(mconfig, SUN4C_MMU, tag, owner, clock, 7, 0x7f, 0x3ff, 10, 0x3f, 0xffff, 0x3fff) { } diff --git a/src/devices/machine/sun4c_mmu.h b/src/devices/machine/sun4c_mmu.h index bd9b1201fbf..3ba13fbff97 100644 --- a/src/devices/machine/sun4c_mmu.h +++ b/src/devices/machine/sun4c_mmu.h @@ -20,7 +20,7 @@ class sun4_mmu_base_device : public device_t, public sparc_mmu_interface { public: - sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock + sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock , uint8_t ctx_mask, uint8_t pmeg_mask, uint32_t page_mask, uint32_t seg_entry_shift, uint32_t seg_entry_mask , uint32_t page_entry_mask, uint32_t cache_mask) : sun4_mmu_base_device(mconfig, type, tag, owner, clock) @@ -105,7 +105,7 @@ public: void hw_flush_all_w(uint32_t offset, uint32_t data, uint32_t mem_mask); protected: - sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); struct page_entry { @@ -225,13 +225,13 @@ protected: class sun4_mmu_device : public sun4_mmu_base_device { public: - sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sun4c_mmu_device : public sun4_mmu_base_device { public: - sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SUN4_MMU, sun4_mmu_device) diff --git a/src/devices/machine/swim1.cpp b/src/devices/machine/swim1.cpp index 2d0adc04c60..9a66f991641 100644 --- a/src/devices/machine/swim1.cpp +++ b/src/devices/machine/swim1.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(SWIM1, swim1_device, "swim1", "Apple SWIM1 (Sander/Wozniak Integrated Machine) version 1 floppy controller") -swim1_device::swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +swim1_device::swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : applefdintf_device(mconfig, SWIM1, tag, owner, clock), m_floppy(nullptr), m_timer(nullptr) diff --git a/src/devices/machine/swim1.h b/src/devices/machine/swim1.h index dd0b372d54f..0c515ff5fe6 100644 --- a/src/devices/machine/swim1.h +++ b/src/devices/machine/swim1.h @@ -22,7 +22,7 @@ class swim1_device : public applefdintf_device { public: // construction/destruction - swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read(offs_t offset) override; virtual void write(offs_t offset, u8 data) override; diff --git a/src/devices/machine/swim2.cpp b/src/devices/machine/swim2.cpp index d1834aad676..9181a2311ae 100644 --- a/src/devices/machine/swim2.cpp +++ b/src/devices/machine/swim2.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SWIM2, swim2_device, "swim2", "Apple SWIM2 (Sander/Wozniak Integrated Machine) version 2 floppy controller") -swim2_device::swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +swim2_device::swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : applefdintf_device(mconfig, SWIM2, tag, owner, clock), m_floppy(nullptr) { diff --git a/src/devices/machine/swim2.h b/src/devices/machine/swim2.h index bab440e4ec9..edcea871909 100644 --- a/src/devices/machine/swim2.h +++ b/src/devices/machine/swim2.h @@ -23,7 +23,7 @@ class swim2_device : public applefdintf_device { public: // construction/destruction - swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read(offs_t offset) override; virtual void write(offs_t offset, u8 data) override; diff --git a/src/devices/machine/swim3.cpp b/src/devices/machine/swim3.cpp index 6c93ee6b0c4..5e4db4bc62d 100644 --- a/src/devices/machine/swim3.cpp +++ b/src/devices/machine/swim3.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(SWIM3, swim3_device, "swim3", "Apple SWIM3 (Sander/Wozniak Integrated Machine) version 3 floppy controller") -swim3_device::swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +swim3_device::swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : applefdintf_device(mconfig, SWIM3, tag, owner, clock), m_irq_cb(*this), m_drq_cb(*this) diff --git a/src/devices/machine/swim3.h b/src/devices/machine/swim3.h index 61e280850e0..3bbfcda44ee 100644 --- a/src/devices/machine/swim3.h +++ b/src/devices/machine/swim3.h @@ -22,7 +22,7 @@ class swim3_device : public applefdintf_device { public: // construction/destruction - swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_cb() { return m_irq_cb.bind(); } auto drq_cb() { return m_drq_cb.bind(); } diff --git a/src/devices/machine/swtpc8212.cpp b/src/devices/machine/swtpc8212.cpp index 4d214e43175..1870d4424e7 100644 --- a/src/devices/machine/swtpc8212.cpp +++ b/src/devices/machine/swtpc8212.cpp @@ -141,7 +141,7 @@ swtp|ct8212|southwest technical products ct8212, #include "screen.h" #include "speaker.h" -swtpc8212_device::swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +swtpc8212_device::swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_maincpu(*this, "maincpu") , m_pia0(*this, "pia0") @@ -163,7 +163,7 @@ swtpc8212_device::swtpc8212_device(const machine_config &mconfig, device_type ty { } -swtpc8212_device::swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +swtpc8212_device::swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : swtpc8212_device(mconfig, SWTPC8212, tag, owner, clock) { } @@ -547,14 +547,14 @@ void swtpc8212_device::device_add_mconfig(machine_config &config) m_crtc->set_show_border_area(false); m_crtc->set_update_row_callback(FUNC(swtpc8212_device::update_row)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(swtpc8212_device::keyboard_put)); SPEAKER(config, "bell").front_center(); - BEEP(config, m_beeper, 2000); + BEEP(config, m_beeper, XTAL::u(2000)); m_beeper->add_route(ALL_OUTPUTS, "bell", 0.25); - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); } ioport_constructor swtpc8212_device::device_input_ports() const diff --git a/src/devices/machine/swtpc8212.h b/src/devices/machine/swtpc8212.h index 0d363860c14..4107ce359ba 100644 --- a/src/devices/machine/swtpc8212.h +++ b/src/devices/machine/swtpc8212.h @@ -19,7 +19,7 @@ INPUT_PORTS_EXTERN(swtpc8212); class swtpc8212_device : public device_t { public: - swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(keypad_changed); @@ -34,7 +34,7 @@ public: void rs232_conn_rxd_w(int state); protected: - swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp index 8d4b762f53a..363cc9cb7cf 100644 --- a/src/devices/machine/tc009xlvc.cpp +++ b/src/devices/machine/tc009xlvc.cpp @@ -109,12 +109,12 @@ void tc0090lvc_device::vram_map(address_map &map) map(0x080000, 0x0801ff).ram().mirror(0x00e00).w("palette", FUNC(palette_device::write8)).share("palette"); } -tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0090lvc_device(mconfig, TC0090LVC, tag, owner, clock) { } -tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, u32 clock) +tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, type, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo, "palette") , m_program_space_config("program", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(tc0090lvc_device::cpu_map), this)) @@ -132,7 +132,7 @@ tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, device_type &t { } -tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0090lvc_device(mconfig, TC0091LVC, tag, owner, clock) { } diff --git a/src/devices/machine/tc009xlvc.h b/src/devices/machine/tc009xlvc.h index c4be5989a78..2123ed2bb1b 100644 --- a/src/devices/machine/tc009xlvc.h +++ b/src/devices/machine/tc009xlvc.h @@ -19,7 +19,7 @@ class tc0090lvc_device : public z80_device, public device_gfx_interface public: typedef device_delegate tc009xlvc_cb_delegate; - tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_tile_callback(T &&... args) { m_tile_cb.set(std::forward(args)...); } @@ -54,7 +54,7 @@ public: void cpu_map(address_map &map); protected: - tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, u32 clock); + tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -123,7 +123,7 @@ protected: class tc0091lvc_device : public tc0090lvc_device { public: - tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) override; virtual void screen_eof() override; diff --git a/src/devices/machine/tdc1008.cpp b/src/devices/machine/tdc1008.cpp index 33966e08063..58d7b0a4f36 100644 --- a/src/devices/machine/tdc1008.cpp +++ b/src/devices/machine/tdc1008.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(TDC1008, tdc1008_device, "tdc1008", "TRW TDC1008 Multiplier-A // tdc1008_device - constructor //------------------------------------------------- -tdc1008_device::tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tdc1008_device::tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TDC1008, tag, owner, clock) , m_x_in(0) , m_y_in(0) diff --git a/src/devices/machine/tdc1008.h b/src/devices/machine/tdc1008.h index dcb8d21c9d5..8760d212824 100644 --- a/src/devices/machine/tdc1008.h +++ b/src/devices/machine/tdc1008.h @@ -22,7 +22,7 @@ class tdc1008_device : public device_t { public: // construction/destruction - tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void x_w(uint8_t data); void y_w(uint8_t data); diff --git a/src/devices/machine/te7750.cpp b/src/devices/machine/te7750.cpp index 540b3b27cf5..4b96ddd9cad 100644 --- a/src/devices/machine/te7750.cpp +++ b/src/devices/machine/te7750.cpp @@ -188,7 +188,7 @@ DEFINE_DEVICE_TYPE(TE7752, te7752_device, "te7752", "TE7752 Super I/O Expander") // te7750_device - constructor //------------------------------------------------- -te7750_device::te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +te7750_device::te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_input_cb(*this) , m_output_cb(*this) @@ -197,7 +197,7 @@ te7750_device::te7750_device(const machine_config &mconfig, device_type type, co std::fill(std::begin(m_data_dir), std::end(m_data_dir), 0xff); } -te7750_device::te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +te7750_device::te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : te7750_device(mconfig, TE7750, tag, owner, clock) { } @@ -206,7 +206,7 @@ te7750_device::te7750_device(const machine_config &mconfig, const char *tag, dev // te7751_device - constructor //------------------------------------------------- -te7751_device::te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +te7751_device::te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : te7750_device(mconfig, TE7751, tag, owner, clock) { } @@ -215,7 +215,7 @@ te7751_device::te7751_device(const machine_config &mconfig, const char *tag, dev // te7752_device - constructor //------------------------------------------------- -te7752_device::te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +te7752_device::te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : te7750_device(mconfig, TE7752, tag, owner, clock) { } diff --git a/src/devices/machine/te7750.h b/src/devices/machine/te7750.h index 8417fbce51a..cd79352cefe 100644 --- a/src/devices/machine/te7750.h +++ b/src/devices/machine/te7750.h @@ -22,7 +22,7 @@ class te7750_device : public device_t { public: // construction/destruction - te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto in_port1_cb() { return m_input_cb[0].bind(); } @@ -50,7 +50,7 @@ public: void write(offs_t offset, u8 data); protected: - te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -78,7 +78,7 @@ private: class te7751_device : public te7750_device { public: - te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> te7752_device @@ -86,7 +86,7 @@ public: class te7752_device : public te7750_device { public: - te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definitions diff --git a/src/devices/machine/terminal.cpp b/src/devices/machine/terminal.cpp index fc1b5cf3092..0d173723a8b 100644 --- a/src/devices/machine/terminal.cpp +++ b/src/devices/machine/terminal.cpp @@ -143,7 +143,7 @@ static const uint8_t terminal_font[256*16] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, unsigned w, unsigned h) +generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, unsigned w, unsigned h) : device_t(mconfig, type, tag, owner, clock) , m_io_term_conf(*this, "TERM_CONF") , m_width(w) @@ -158,7 +158,7 @@ generic_terminal_device::generic_terminal_device(const machine_config &mconfig, { } -generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_terminal_device(mconfig, GENERIC_TERMINAL, tag, owner, clock, TERMINAL_WIDTH, TERMINAL_HEIGHT) { } @@ -335,11 +335,11 @@ void generic_terminal_device::device_add_mconfig(machine_config &config) screen.set_visarea(0, generic_terminal_device::TERMINAL_WIDTH*8-1, 0, generic_terminal_device::TERMINAL_HEIGHT*10-1); screen.set_screen_update(FUNC(generic_terminal_device::update)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG)); keyboard.set_keyboard_callback(FUNC(generic_terminal_device::kbd_put)); SPEAKER(config, "bell").front_center(); - BEEP(config, m_beeper, 2'000); + BEEP(config, m_beeper, XTAL::u(2'000)); m_beeper->add_route(ALL_OUTPUTS, "bell", 0.25); } diff --git a/src/devices/machine/terminal.h b/src/devices/machine/terminal.h index 5ebf1468b22..257c66f9f86 100644 --- a/src/devices/machine/terminal.h +++ b/src/devices/machine/terminal.h @@ -21,7 +21,7 @@ INPUT_PORTS_EXTERN( generic_terminal ); class generic_terminal_device : public device_t { public: - generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_keyboard_callback(T &&... args) @@ -34,7 +34,7 @@ public: void kbd_put(u8 data); protected: - generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, unsigned w, unsigned h); + generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, unsigned w, unsigned h); virtual void term_write(uint8_t data); virtual void device_start() override; diff --git a/src/devices/machine/ticket.cpp b/src/devices/machine/ticket.cpp index cdc0385827d..2dcfbdac6e0 100644 --- a/src/devices/machine/ticket.cpp +++ b/src/devices/machine/ticket.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(HOPPER, hopper_device, "coin_hopper", "Coin Hopper") // ticket_dispenser_device - constructor //------------------------------------------------- -ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_motor_sense(TICKET_MOTOR_ACTIVE_LOW) , m_status_sense(TICKET_STATUS_ACTIVE_LOW) @@ -58,12 +58,12 @@ ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, { } -ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ticket_dispenser_device(mconfig, TICKET_DISPENSER, tag, owner, clock) { } -hopper_device::hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hopper_device::hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ticket_dispenser_device(mconfig, HOPPER, tag, owner, clock) { } diff --git a/src/devices/machine/ticket.h b/src/devices/machine/ticket.h index ac1cd01c029..fc4d45f4674 100644 --- a/src/devices/machine/ticket.h +++ b/src/devices/machine/ticket.h @@ -49,7 +49,7 @@ public: set_period(period); set_senses(motor_sense, status_sense, false); } - ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ticket_dispenser_device(); // inline configuration helpers @@ -68,7 +68,7 @@ public: DECLARE_WRITE_LINE_MEMBER( motor_w ); protected: - ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; @@ -104,10 +104,7 @@ public: set_period(period); set_senses(motor_sense, status_sense, true); } - hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - -private: - + hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; #endif // MAME_MACHINE_TICKET_H diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp index 5825aa72100..7f21a6b76c0 100644 --- a/src/devices/machine/timekpr.cpp +++ b/src/devices/machine/timekpr.cpp @@ -88,7 +88,7 @@ inline int counter_from_ram(u8 const *data, s32 offset, u8 unmap = 0) // timekeeper_device_config - constructor //------------------------------------------------- -timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size) +timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_reset_cb(*this) @@ -98,7 +98,7 @@ timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type { } -m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T02, tag, owner, clock, 0x800) { m_offset_watchdog = -1; @@ -114,7 +114,7 @@ m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T35, tag, owner, clock, 0x8000) { m_offset_watchdog = -1; @@ -130,7 +130,7 @@ m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T37, tag, owner, clock, 0x8000) { m_offset_watchdog = 0x7ff7; @@ -146,7 +146,7 @@ m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = 0x7ff0; } -m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T58, tag, owner, clock, 0x2000) { m_offset_watchdog = -1; @@ -162,7 +162,7 @@ m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, MK48T08, tag, owner, clock, 0x2000) { m_offset_watchdog = -1; @@ -178,7 +178,7 @@ mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, d m_offset_flags = 0x1ff0; } -mk48t12_device::mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mk48t12_device::mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, MK48T12, tag, owner, clock, 0x800) { m_offset_watchdog = -1; diff --git a/src/devices/machine/timekpr.h b/src/devices/machine/timekpr.h index 9d6d04fafb4..e61adf8e578 100644 --- a/src/devices/machine/timekpr.h +++ b/src/devices/machine/timekpr.h @@ -41,7 +41,7 @@ public: protected: // construction/destruction - timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size); + timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size); // device-level overrides virtual void device_start() override; @@ -95,37 +95,37 @@ protected: class m48t02_device : public timekeeper_device { public: - m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m48t35_device : public timekeeper_device { public: - m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m48t37_device : public timekeeper_device { public: - m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m48t58_device : public timekeeper_device { public: - m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class mk48t08_device : public timekeeper_device { public: - mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class mk48t12_device : public timekeeper_device { public: - mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/timer.cpp b/src/devices/machine/timer.cpp index 67621f1085f..871cb3ff87c 100644 --- a/src/devices/machine/timer.cpp +++ b/src/devices/machine/timer.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(TIMER, timer_device, "timer", "Timer") // timer_device - constructor //------------------------------------------------- -timer_device::timer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +timer_device::timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIMER, tag, owner, clock), m_type(TIMER_TYPE_GENERIC), m_callback(*this), diff --git a/src/devices/machine/timer.h b/src/devices/machine/timer.h index 2c138a1565c..aca06860c77 100644 --- a/src/devices/machine/timer.h +++ b/src/devices/machine/timer.h @@ -35,7 +35,7 @@ public: typedef device_delegate expired_delegate; // construction/destruction - timer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers template void configure_generic(T &&... args) diff --git a/src/devices/machine/tmc0430.cpp b/src/devices/machine/tmc0430.cpp index 76e53c88ded..89505b39ac1 100644 --- a/src/devices/machine/tmc0430.cpp +++ b/src/devices/machine/tmc0430.cpp @@ -107,7 +107,7 @@ /* Constructor. */ -tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMC0430, tag, owner, clock), m_gromready(*this), m_current_clock_level(CLEAR_LINE), diff --git a/src/devices/machine/tmc0430.h b/src/devices/machine/tmc0430.h index 09800f2f514..b934cbc6823 100644 --- a/src/devices/machine/tmc0430.h +++ b/src/devices/machine/tmc0430.h @@ -28,12 +28,12 @@ class tmc0430_device : public device_t { public: tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *regionname, int offset, int ident) : - tmc0430_device(mconfig, tag, owner, 0) + tmc0430_device(mconfig, tag, owner) { set_region_and_ident(regionname, offset, ident); } - tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ready_cb() { return m_gromready.bind(); } diff --git a/src/devices/machine/tmc0999.cpp b/src/devices/machine/tmc0999.cpp index e270e871524..456d212b672 100644 --- a/src/devices/machine/tmc0999.cpp +++ b/src/devices/machine/tmc0999.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(TMC0999, tmc0999_device, "tmc0999", "TI TMC0999 RAM") // constructor //------------------------------------------------- -tmc0999_device::tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tmc0999_device::tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMC0999, tag, owner, clock) { } diff --git a/src/devices/machine/tmc0999.h b/src/devices/machine/tmc0999.h index 24305b8d8ee..df5766cb27b 100644 --- a/src/devices/machine/tmc0999.h +++ b/src/devices/machine/tmc0999.h @@ -27,7 +27,7 @@ quick pinout reference (18-pin DIP) class tmc0999_device : public device_t { public: - tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void di_w(u8 data); u8 do_r(); diff --git a/src/devices/machine/tmc208k.cpp b/src/devices/machine/tmc208k.cpp index fe275fd693c..52e1c31d241 100644 --- a/src/devices/machine/tmc208k.cpp +++ b/src/devices/machine/tmc208k.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(TMC28KU, tmc28ku_device, "tmc28ku", "TRW TMC28KU 8x8-bit Mult //------------------------------------------------- template -tmc208_base_device::tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tmc208_base_device::tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_a_in(0) , m_a(0) @@ -44,12 +44,12 @@ tmc208_base_device::tmc208_base_device(const machine_config &m { } -tmc208k_device::tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmc208k_device::tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tmc208_base_device(mconfig, TMC208K, tag, owner, clock) { } -tmc28ku_device::tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmc28ku_device::tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tmc208_base_device(mconfig, TMC28KU, tag, owner, clock) { } diff --git a/src/devices/machine/tmc208k.h b/src/devices/machine/tmc208k.h index eb077934eb2..29ececfe8b0 100644 --- a/src/devices/machine/tmc208k.h +++ b/src/devices/machine/tmc208k.h @@ -26,7 +26,7 @@ class tmc208_base_device : public device_t { public: // construction/destruction - tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void a_w(uint8_t data); void b_w(uint8_t data); @@ -79,7 +79,7 @@ class tmc208k_device : public tmc208_base_device { public: // construction/destruction - tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; @@ -89,7 +89,7 @@ class tmc28ku_device : public tmc208_base_device { public: // construction/destruction - tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void clock_b() override; diff --git a/src/devices/machine/tmp68301.cpp b/src/devices/machine/tmp68301.cpp index bd3d2dc06f1..9967ecde7d4 100644 --- a/src/devices/machine/tmp68301.cpp +++ b/src/devices/machine/tmp68301.cpp @@ -134,7 +134,7 @@ void tmp68301_device::icr_w(offs_t offset, uint8_t data) m_icr[offset] = data; } -tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, TMP68301, tag, owner, clock), m_in_parallel_cb(*this), m_out_parallel_cb(*this), diff --git a/src/devices/machine/tmp68301.h b/src/devices/machine/tmp68301.h index 060519ebd1b..17113306f3c 100644 --- a/src/devices/machine/tmp68301.h +++ b/src/devices/machine/tmp68301.h @@ -19,7 +19,7 @@ class tmp68301_device : public m68000_device { public: - tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_parallel_callback() { return m_in_parallel_cb.bind(); } auto out_parallel_callback() { return m_out_parallel_cb.bind(); } diff --git a/src/devices/machine/tms1024.cpp b/src/devices/machine/tms1024.cpp index a17fe1811e9..bd067f6aec6 100644 --- a/src/devices/machine/tms1024.cpp +++ b/src/devices/machine/tms1024.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(TMS1025, tms1025_device, "tms1025", "TMS1025 I/O Expander") // constructor //------------------------------------------------- -tms1024_device::tms1024_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +tms1024_device::tms1024_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_h(0), m_s(0), m_std(0), m_ms(0) , m_read_port(*this) @@ -29,12 +29,12 @@ tms1024_device::tms1024_device(const machine_config &mconfig, device_type type, { } -tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1024_device(mconfig, TMS1024, tag, owner, clock) { } -tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1024_device(mconfig, TMS1025, tag, owner, clock) { } diff --git a/src/devices/machine/tms1024.h b/src/devices/machine/tms1024.h index 49193191bfa..ee61cb7563d 100644 --- a/src/devices/machine/tms1024.h +++ b/src/devices/machine/tms1024.h @@ -57,7 +57,7 @@ public: PORT7 }; - tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto read_port4_callback() { return m_read_port[3].bind(); } @@ -77,7 +77,7 @@ public: void write_ms(int state); protected: - tms1024_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + tms1024_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -96,7 +96,7 @@ protected: class tms1025_device : public tms1024_device { public: - tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto read_port1_callback() { return m_read_port[0].bind(); } auto read_port2_callback() { return m_read_port[1].bind(); } diff --git a/src/devices/machine/tms5501.cpp b/src/devices/machine/tms5501.cpp index f5844d1c8bf..752466049e3 100644 --- a/src/devices/machine/tms5501.cpp +++ b/src/devices/machine/tms5501.cpp @@ -55,7 +55,7 @@ void tms5501_device::io_map(address_map &map) // tms5501_device - constructor //------------------------------------------------- -tms5501_device::tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms5501_device::tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS5501, tag, owner, clock), device_serial_interface(mconfig, *this), m_write_int(*this), diff --git a/src/devices/machine/tms5501.h b/src/devices/machine/tms5501.h index e916141d12c..d2a0f23dc2d 100644 --- a/src/devices/machine/tms5501.h +++ b/src/devices/machine/tms5501.h @@ -49,7 +49,7 @@ class tms5501_device : public device_t, { public: // construction/destruction - tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_callback() { return m_write_int.bind(); } auto xmt_callback() { return m_write_xmt.bind(); } diff --git a/src/devices/machine/tms6100.cpp b/src/devices/machine/tms6100.cpp index 62bfc994b1f..06babec0ef6 100644 --- a/src/devices/machine/tms6100.cpp +++ b/src/devices/machine/tms6100.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(TMS6100, tms6100_device, "tms6100", "TMS6100 VSM") DEFINE_DEVICE_TYPE(M58819, m58819_device, "m58819s", "M68819S") -tms6100_device::tms6100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +tms6100_device::tms6100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_rom(*this, DEVICE_SELF) , m_reverse_bits(false) @@ -38,13 +38,13 @@ tms6100_device::tms6100_device(const machine_config &mconfig, device_type type, { } -tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms6100_device(mconfig, TMS6100, tag, owner, clock) { } -m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms6100_device(mconfig, M58819, tag, owner, clock) { } diff --git a/src/devices/machine/tms6100.h b/src/devices/machine/tms6100.h index b7bfd7b3b45..d2e4da6b162 100644 --- a/src/devices/machine/tms6100.h +++ b/src/devices/machine/tms6100.h @@ -82,7 +82,7 @@ class tms6100_device : public device_t { public: - tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // 4-bit mode (mask option) // note: in 4-bit mode, use data_r, otherwise use data_line_r @@ -99,7 +99,7 @@ public: int data_line_r(); protected: - tms6100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + tms6100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -131,7 +131,7 @@ protected: class m58819_device : public tms6100_device { public: - m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/machine/tms9901.cpp b/src/devices/machine/tms9901.cpp index 6714945fa2a..966562f144b 100644 --- a/src/devices/machine/tms9901.cpp +++ b/src/devices/machine/tms9901.cpp @@ -167,7 +167,7 @@ Clock mode: /* Constructor */ -tms9901_device::tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9901_device::tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS9901, tag, owner, clock), m_int_level(0), m_last_level(0), diff --git a/src/devices/machine/tms9901.h b/src/devices/machine/tms9901.h index 3d4808654a3..064dd01e86f 100644 --- a/src/devices/machine/tms9901.h +++ b/src/devices/machine/tms9901.h @@ -56,7 +56,7 @@ public: P6 } pins; - tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_int_line(int pin_number, int state); diff --git a/src/devices/machine/tms9902.cpp b/src/devices/machine/tms9902.cpp index 68c0f671155..cddbe599922 100644 --- a/src/devices/machine/tms9902.cpp +++ b/src/devices/machine/tms9902.cpp @@ -72,7 +72,7 @@ /* Constructor */ -tms9902_device::tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9902_device::tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS9902, tag, owner, clock) , m_int_cb(*this) , m_rcv_cb(*this) diff --git a/src/devices/machine/tms9902.h b/src/devices/machine/tms9902.h index c784687bbe8..2679f7d1067 100644 --- a/src/devices/machine/tms9902.h +++ b/src/devices/machine/tms9902.h @@ -48,7 +48,7 @@ public: static constexpr unsigned DTR = 0x02; static constexpr unsigned RI = 0x01; - tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Callbacks auto int_cb() { return m_int_cb.bind(); } diff --git a/src/devices/machine/tms9914.cpp b/src/devices/machine/tms9914.cpp index 14cfcb7b039..dec9870d9f9 100644 --- a/src/devices/machine/tms9914.cpp +++ b/src/devices/machine/tms9914.cpp @@ -174,7 +174,7 @@ constexpr uint8_t IFCMD_UNT = 0x5f; // Untalk DEFINE_DEVICE_TYPE(TMS9914, tms9914_device, "tms9914", "TMS9914 GPIB Controller") // Constructors -tms9914_device::tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9914_device::tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , TMS9914 , tag , owner , clock), m_dio_read_func(*this), m_dio_write_func(*this), diff --git a/src/devices/machine/tms9914.h b/src/devices/machine/tms9914.h index d67b85de025..4dddcab3dda 100644 --- a/src/devices/machine/tms9914.h +++ b/src/devices/machine/tms9914.h @@ -39,7 +39,7 @@ class tms9914_device : public device_t { public: // construction/destruction - tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // See ieee488.h enum ieee_488_signal_t { diff --git a/src/devices/machine/tsb12lv01a.cpp b/src/devices/machine/tsb12lv01a.cpp index b893eafeefe..3fd4484d55d 100644 --- a/src/devices/machine/tsb12lv01a.cpp +++ b/src/devices/machine/tsb12lv01a.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(TSB12LV01A, tsb12lv01a_device, "tsb12lv01a", "TSB12LV01A IEEE 1394 Link Controller") -tsb12lv01a_device::tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tsb12lv01a_device::tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TSB12LV01A, tag, owner, clock) , m_int_cb(*this) , m_phy_read_cb(*this) diff --git a/src/devices/machine/tsb12lv01a.h b/src/devices/machine/tsb12lv01a.h index 4f47fd31815..57de0b41da9 100644 --- a/src/devices/machine/tsb12lv01a.h +++ b/src/devices/machine/tsb12lv01a.h @@ -17,7 +17,7 @@ class tsb12lv01a_device : public device_t { public: - tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset); void write(offs_t offset, uint32_t data, uint32_t mem_mask); diff --git a/src/devices/machine/tube.cpp b/src/devices/machine/tube.cpp index f16fed18da5..28177c9b1dc 100644 --- a/src/devices/machine/tube.cpp +++ b/src/devices/machine/tube.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(TUBE, tube_device, "tube", "Acorn Tube ULA") // bbc_tube_slot_device - constructor //------------------------------------------------- -tube_device::tube_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tube_device::tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TUBE, tag, owner, clock) , m_hirq_handler(*this) , m_pnmi_handler(*this) diff --git a/src/devices/machine/tube.h b/src/devices/machine/tube.h index 079c89cf86d..eb6171c50e5 100644 --- a/src/devices/machine/tube.h +++ b/src/devices/machine/tube.h @@ -24,7 +24,7 @@ class tube_device : public device_t { public: // construction/destruction - tube_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto hirq_handler() { return m_hirq_handler.bind(); } diff --git a/src/devices/machine/ucb1200.cpp b/src/devices/machine/ucb1200.cpp index 54e68321523..555959d507f 100644 --- a/src/devices/machine/ucb1200.cpp +++ b/src/devices/machine/ucb1200.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(UCB1200, ucb1200_device, "ucb1200", "Philips UCB1200 modem/audio codec") -ucb1200_device::ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ucb1200_device::ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UCB1200, tag, owner, clock) , m_gpio_out(*this) , m_audio_out(*this) diff --git a/src/devices/machine/ucb1200.h b/src/devices/machine/ucb1200.h index 19cf474917b..84f133d25c1 100644 --- a/src/devices/machine/ucb1200.h +++ b/src/devices/machine/ucb1200.h @@ -14,7 +14,7 @@ class ucb1200_device : public device_t { public: - ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template auto gpio_out() { return m_gpio_out[Line].bind(); } template void gpio_in(int state) { gpio_in((uint16_t)Line, state); } diff --git a/src/devices/machine/upc82c710.cpp b/src/devices/machine/upc82c710.cpp index bf6352a69c7..c3685d3d7a1 100644 --- a/src/devices/machine/upc82c710.cpp +++ b/src/devices/machine/upc82c710.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(UPC82C710, upc82c710_device, "upc82c710", "Universal Peripheral Controller 82C710") -upc82c710_device::upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upc82c710_device::upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPC82C710, tag, owner, clock) , m_ide(*this, "ide") , m_fdc(*this, "fdc") diff --git a/src/devices/machine/upc82c710.h b/src/devices/machine/upc82c710.h index 7868fec6b2f..966ec12b482 100644 --- a/src/devices/machine/upc82c710.h +++ b/src/devices/machine/upc82c710.h @@ -22,7 +22,7 @@ class upc82c710_device : public device_t { public: // construction/destruction - upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 io_r(offs_t offset, u16 mem_mask = ~0); void io_w(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/devices/machine/upc82c711.cpp b/src/devices/machine/upc82c711.cpp index b162029daa0..33c0bd5391e 100644 --- a/src/devices/machine/upc82c711.cpp +++ b/src/devices/machine/upc82c711.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(UPC82C711, upc82c711_device, "upc82c711", "Universal Peripheral Controller 82C711") -upc82c711_device::upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upc82c711_device::upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPC82C711, tag, owner, clock) , m_ide(*this, "ide") , m_fdc(*this, "fdc") diff --git a/src/devices/machine/upc82c711.h b/src/devices/machine/upc82c711.h index 543bb594337..17565f1186d 100644 --- a/src/devices/machine/upc82c711.h +++ b/src/devices/machine/upc82c711.h @@ -24,7 +24,7 @@ class upc82c711_device : public device_t { public: // construction/destruction - upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 io_r(offs_t offset, u16 mem_mask = ~0); void io_w(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/devices/machine/upd1990a.cpp b/src/devices/machine/upd1990a.cpp index 191d2b634cb..e56d4737de0 100644 --- a/src/devices/machine/upd1990a.cpp +++ b/src/devices/machine/upd1990a.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(UPD4990A, upd4990a_device, "upd4990a", "uPD4990A RTC") // upd1990a_device - constructor //------------------------------------------------- -upd1990a_device::upd1990a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +upd1990a_device::upd1990a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_write_data(*this) @@ -49,12 +49,12 @@ upd1990a_device::upd1990a_device(const machine_config &mconfig, device_type type { } -upd1990a_device::upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd1990a_device::upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd1990a_device(mconfig, UPD1990A, tag, owner, clock, TYPE_1990A) { } -upd4990a_device::upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd4990a_device::upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd1990a_device(mconfig, UPD4990A, tag, owner, clock, TYPE_4990A) { } diff --git a/src/devices/machine/upd1990a.h b/src/devices/machine/upd1990a.h index 8a170a15021..d68703c446d 100644 --- a/src/devices/machine/upd1990a.h +++ b/src/devices/machine/upd1990a.h @@ -34,7 +34,7 @@ class upd1990a_device : public device_t, public device_rtc_interface { public: // construction/destruction - upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); auto data_callback() { return m_write_data.bind(); } auto tp_callback() { return m_write_tp.bind(); } @@ -52,7 +52,7 @@ public: protected: // device-level overrides - upd1990a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + upd1990a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); virtual void device_start() override; @@ -127,7 +127,7 @@ private: class upd4990a_device : public upd1990a_device { public: - upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); }; diff --git a/src/devices/machine/upd4701.cpp b/src/devices/machine/upd4701.cpp index d840492073b..824ed0a39cc 100644 --- a/src/devices/machine/upd4701.cpp +++ b/src/devices/machine/upd4701.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(UPD4701A, upd4701_device, "upd4701a", "uPD4701A Incremental Encoder") -upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD4701A, tag, owner, clock) , m_cs(true) , m_xy(false) diff --git a/src/devices/machine/upd4701.h b/src/devices/machine/upd4701.h index 245ef7bf82c..41b7b9e7a42 100644 --- a/src/devices/machine/upd4701.h +++ b/src/devices/machine/upd4701.h @@ -30,7 +30,7 @@ class upd4701_device : public device_t { public: - upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration template void set_portx_tag(T &&tag) { m_portx.set_tag(std::forward(tag)); } diff --git a/src/devices/machine/upd4991a.cpp b/src/devices/machine/upd4991a.cpp index 0f1419d7270..31e9b13b874 100644 --- a/src/devices/machine/upd4991a.cpp +++ b/src/devices/machine/upd4991a.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(UPD4991A, upd4991a_device, "upd4991a", "NEC uPD4991a parallel // upd4991a_device - constructor //------------------------------------------------- -upd4991a_device::upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd4991a_device::upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD4991A, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_timer_clock(nullptr) diff --git a/src/devices/machine/upd4991a.h b/src/devices/machine/upd4991a.h index 9a9da912279..a06abfde92b 100644 --- a/src/devices/machine/upd4991a.h +++ b/src/devices/machine/upd4991a.h @@ -24,7 +24,7 @@ class upd4991a_device : public device_t, public device_rtc_interface { public: // construction/destruction - upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void address_w(offs_t offset, u8 data); diff --git a/src/devices/machine/upd4992.cpp b/src/devices/machine/upd4992.cpp index 52e3f8d9f10..eef85e61b7b 100644 --- a/src/devices/machine/upd4992.cpp +++ b/src/devices/machine/upd4992.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(UPD4992, upd4992_device, "upd4992", "uPD4992 RTC") // upd4992_device - constructor //------------------------------------------------- -upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD4992, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_timer_clock(nullptr) diff --git a/src/devices/machine/upd4992.h b/src/devices/machine/upd4992.h index 3151aa12eaa..841220bc072 100644 --- a/src/devices/machine/upd4992.h +++ b/src/devices/machine/upd4992.h @@ -24,7 +24,7 @@ class upd4992_device : public device_t, public device_rtc_interface { public: // construction/destruction - upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void write(offs_t offset, u8 data); diff --git a/src/devices/machine/upd7001.cpp b/src/devices/machine/upd7001.cpp index a6ae938b64c..7b4ab21337c 100644 --- a/src/devices/machine/upd7001.cpp +++ b/src/devices/machine/upd7001.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(UPD7001, upd7001_device, "upd7001", "NEC uPD7001 A/D Converte // upd7001_device - constructor //------------------------------------------------- -upd7001_device::upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd7001_device::upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7001, tag, owner, clock) , m_an_callback(*this) , m_eoc_callback(*this) diff --git a/src/devices/machine/upd7001.h b/src/devices/machine/upd7001.h index afc4b632293..db483851c42 100644 --- a/src/devices/machine/upd7001.h +++ b/src/devices/machine/upd7001.h @@ -33,9 +33,9 @@ class upd7001_device : public device_t { public: // device type constructors - upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, double r, double c) - : upd7001_device(mconfig, tag, owner, 0U) + : upd7001_device(mconfig, tag, owner) { set_rc(r, c); } diff --git a/src/devices/machine/upd7002.cpp b/src/devices/machine/upd7002.cpp index da1036d109d..f67a474248a 100644 --- a/src/devices/machine/upd7002.cpp +++ b/src/devices/machine/upd7002.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(UPD7002, upd7002_device, "upd7002", "uPD7002 ADC") -upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7002, tag, owner, clock) , m_status(0) , m_data1(0) diff --git a/src/devices/machine/upd7002.h b/src/devices/machine/upd7002.h index 7069a68361d..f4cdccd33d7 100644 --- a/src/devices/machine/upd7002.h +++ b/src/devices/machine/upd7002.h @@ -25,7 +25,7 @@ public: typedef device_delegate get_analogue_delegate; typedef device_delegate eoc_delegate; - upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_get_analogue_callback(T &&... args) { m_get_analogue_cb.set(std::forward(args)...); } template void set_eoc_callback(T &&... args) { m_eoc_cb.set(std::forward(args)...); } diff --git a/src/devices/machine/upd7004.cpp b/src/devices/machine/upd7004.cpp index a5fb2cba78f..40c80586728 100644 --- a/src/devices/machine/upd7004.cpp +++ b/src/devices/machine/upd7004.cpp @@ -37,7 +37,7 @@ ALLOW_SAVE_TYPE(upd7004_device::state); // upd7004_device - constructor //------------------------------------------------- -upd7004_device::upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +upd7004_device::upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7004, tag, owner, clock), m_eoc_cb(*this), m_eoc_ff_cb(*this), m_in_cb(*this), diff --git a/src/devices/machine/upd7004.h b/src/devices/machine/upd7004.h index 78d7eae559c..da0979b5699 100644 --- a/src/devices/machine/upd7004.h +++ b/src/devices/machine/upd7004.h @@ -38,7 +38,7 @@ class upd7004_device : public device_t { public: // construction/destruction - upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto eoc_callback() { return m_eoc_cb.bind(); } auto eoc_ff_callback() { return m_eoc_ff_cb.bind(); } diff --git a/src/devices/machine/upd71071.cpp b/src/devices/machine/upd71071.cpp index 0a928be5361..cf381c3cbc5 100644 --- a/src/devices/machine/upd71071.cpp +++ b/src/devices/machine/upd71071.cpp @@ -93,7 +93,7 @@ DEFINE_DEVICE_TYPE(UPD71071, upd71071_device, "upd71071", "NEC uPD71071 DMA Controller") -upd71071_device::upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd71071_device::upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD71071, tag, owner, clock) , m_upd_clock(0) , m_out_hreq_cb(*this) diff --git a/src/devices/machine/upd71071.h b/src/devices/machine/upd71071.h index 0ccf146f931..b1b60129562 100644 --- a/src/devices/machine/upd71071.h +++ b/src/devices/machine/upd71071.h @@ -9,10 +9,10 @@ class upd71071_device : public device_t { public: - upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); } - void set_clock(int clock) { m_upd_clock = clock; } + void set_clock(const XTAL &clock) { m_upd_clock = clock; } auto out_hreq_callback() { return m_out_hreq_cb.bind(); } auto out_eop_callback() { return m_out_eop_cb.bind(); } @@ -62,7 +62,7 @@ private: //int m_in_progress[4]; //int m_transfer_size[4]; int m_base; - int m_upd_clock; + XTAL m_upd_clock; devcb_write_line m_out_hreq_cb; devcb_write_line m_out_eop_cb; devcb_read16::array<4> m_dma_read_cb; diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp index acf4182fecc..603c2ffa119 100644 --- a/src/devices/machine/upd765.cpp +++ b/src/devices/machine/upd765.cpp @@ -182,7 +182,7 @@ void tc8566af_device::map(address_map &map) constexpr int upd765_family_device::rates[4]; -upd765_family_device::upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +upd765_family_device::upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), ready_connected(true), ready_polled(true), @@ -538,9 +538,9 @@ void upd765_family_device::dsr_w(uint8_t data) cur_rate = rates[dsr & 3]; } -void upd765_family_device::set_rate(int rate) +void upd765_family_device::set_rate(const XTAL &rate) { - cur_rate = rate; + cur_rate = rate.value(); } uint8_t upd765_family_device::fifo_r() @@ -2769,32 +2769,32 @@ bool upd765_family_device::sector_matches() const cur_live.idbuf[3] == command[5]; } -upd765a_device::upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, UPD765A, tag, owner, clock) +upd765a_device::upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, UPD765A, tag, owner, clock) { has_dor = false; } -upd765b_device::upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, UPD765B, tag, owner, clock) +upd765b_device::upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, UPD765B, tag, owner, clock) { has_dor = false; } -i8272a_device::i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, I8272A, tag, owner, clock) +i8272a_device::i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, I8272A, tag, owner, clock) { has_dor = false; } -upd72065_device::upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72065, tag, owner, clock) +upd72065_device::upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd72065_device(mconfig, UPD72065, tag, owner, clock) { } -upd72065_device::upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, type, tag, owner, clock) +upd72065_device::upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, type, tag, owner, clock) { has_dor = false; recalibrate_steps = 255; } -upd72067_device::upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72067, tag, owner, clock) +upd72067_device::upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd72065_device(mconfig, UPD72067, tag, owner, clock) { ready_polled = true; ready_connected = true; @@ -2802,7 +2802,7 @@ upd72067_device::upd72067_device(const machine_config &mconfig, const char *tag, select_multiplexed = false; } -upd72069_device::upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72069, tag, owner, clock) +upd72069_device::upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd72065_device(mconfig, UPD72069, tag, owner, clock) { ready_polled = true; ready_connected = true; @@ -2810,7 +2810,7 @@ upd72069_device::upd72069_device(const machine_config &mconfig, const char *tag, select_multiplexed = false; } -i82072_device::i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, I82072, tag, owner, clock) +i82072_device::i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, I82072, tag, owner, clock) { has_dor = false; recalibrate_steps = 255; @@ -3095,7 +3095,7 @@ void i82072_device::index_callback(floppy_image_device *floppy, int state) upd765_family_device::index_callback(floppy, state); } -ps2_fdc_device::ps2_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, type, tag, owner, clock) +ps2_fdc_device::ps2_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, type, tag, owner, clock) { } @@ -3120,7 +3120,7 @@ void ps2_fdc_device::soft_reset() perpmode &= 0x3c; } -smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, SMC37C78, tag, owner, clock) +smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, SMC37C78, tag, owner, clock) { ready_connected = false; select_connected = true; @@ -3128,14 +3128,14 @@ smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, recalibrate_steps = 80; } -n82077aa_device::n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, N82077AA, tag, owner, clock) +n82077aa_device::n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, N82077AA, tag, owner, clock) { ready_connected = false; select_connected = true; select_multiplexed = false; } -pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, tag, owner, clock) +pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, tag, owner, clock) { ready_polled = false; ready_connected = false; @@ -3143,7 +3143,7 @@ pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, cons select_multiplexed = false; } -dp8473_device::dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, DP8473, tag, owner, clock) +dp8473_device::dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, DP8473, tag, owner, clock) { ready_polled = false; ready_connected = false; @@ -3160,7 +3160,7 @@ void dp8473_device::soft_reset() other_irq = true; } -pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, PC8477A, tag, owner, clock) +pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, PC8477A, tag, owner, clock) { ready_polled = true; ready_connected = false; @@ -3169,7 +3169,7 @@ pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, d recalibrate_steps = 85; // TODO: may also be programmed as 255, 3925 or 4095 by (unemulated) mode command } -pc8477b_device::pc8477b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, PC8477B, tag, owner, clock) +pc8477b_device::pc8477b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, PC8477B, tag, owner, clock) { ready_polled = true; ready_connected = false; @@ -3178,7 +3178,7 @@ pc8477b_device::pc8477b_device(const machine_config &mconfig, const char *tag, d recalibrate_steps = 85; // TODO: may also be programmed as 255, 3925 or 4095 by (unemulated) mode command } -wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, WD37C65C, tag, owner, clock), m_clock2(0) { @@ -3201,7 +3201,7 @@ uint8_t wd37c65c_device::get_st3(floppy_info &fi) return st3; } -mcs3201_device::mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mcs3201_device::mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, MCS3201, tag, owner, clock), m_input_handler(*this) { @@ -3223,7 +3223,7 @@ uint8_t mcs3201_device::input_r() return m_input_handler(); } -tc8566af_device::tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc8566af_device::tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, TC8566AF, tag, owner, clock) , m_cr1(0) { diff --git a/src/devices/machine/upd765.h b/src/devices/machine/upd765.h index 0eba7da4b29..d0ff26ff544 100644 --- a/src/devices/machine/upd765.h +++ b/src/devices/machine/upd765.h @@ -51,7 +51,7 @@ public: DECLARE_WRITE_LINE_MEMBER(tc_line_w) { tc_w(state == ASSERT_LINE); } DECLARE_WRITE_LINE_MEMBER(reset_w); - void set_rate(int rate); // rate in bps, to be used when the fdc is externally frequency-controlled + void set_rate(const XTAL &rate); // rate in bps, to be used when the fdc is externally frequency-controlled void set_ready_line_connected(bool ready); void set_select_lines_connected(bool select); @@ -59,7 +59,7 @@ public: virtual void soft_reset(); protected: - upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -353,50 +353,50 @@ protected: class upd765a_device : public upd765_family_device { public: - upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready, bool select) + upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready, bool select) : upd765a_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); set_select_lines_connected(select); } - upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class upd765b_device : public upd765_family_device { public: - upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready, bool select) + upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready, bool select) : upd765b_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); set_select_lines_connected(select); } - upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class i8272a_device : public upd765_family_device { public: - i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready) + i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready) : i8272a_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); } - i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class i82072_device : public upd765_family_device { public: - i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready) + i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready) : i82072_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); } - i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -437,7 +437,7 @@ public: uint8_t srb_r(); protected: - ps2_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ps2_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -450,63 +450,63 @@ protected: class smc37c78_device : public ps2_fdc_device { public: - smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class upd72065_device : public upd765_family_device { public: - upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready, bool select) + upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready, bool select) : upd72065_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); set_select_lines_connected(select); } - upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; virtual void auxcmd_w(uint8_t data); protected: - upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; class upd72067_device : public upd72065_device { public: - upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void auxcmd_w(uint8_t data) override; }; class upd72069_device : public upd72065_device { public: - upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class n82077aa_device : public ps2_fdc_device { public: - n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, mode_t mode) + n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, mode_t mode) : n82077aa_device(mconfig, tag, owner, clock) { set_mode(mode); } - n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class pc_fdc_superio_device : public upd765_family_device { public: - pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class dp8473_device : public upd765_family_device { public: - dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -516,12 +516,12 @@ protected: class pc8477a_device : public ps2_fdc_device { public: - pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, mode_t mode) + pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, mode_t mode) : pc8477a_device(mconfig, tag, owner, clock) { set_mode(mode); } - pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; @@ -540,10 +540,10 @@ public: class wd37c65c_device : public upd765_family_device { public: - wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template - wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, X &&clock2) + wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, X &&clock2) : wd37c65c_device(mconfig, tag, owner, clock) { set_clock2(std::forward(clock2)); @@ -561,7 +561,7 @@ private: class mcs3201_device : public upd765_family_device { public: - mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto input_handler() { return m_input_handler.bind(); } @@ -578,7 +578,7 @@ private: class tc8566af_device : public upd765_family_device { public: - tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp index 6d84109e2ec..ae82249ef6a 100644 --- a/src/devices/machine/v3021.cpp +++ b/src/devices/machine/v3021.cpp @@ -114,7 +114,7 @@ DEFINE_DEVICE_TYPE(V3021, v3021_device, "v3021", "EM Microelectronic-Marin SA V3 // v3021_device - constructor //------------------------------------------------- -v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, V3021, tag, owner, clock) , device_rtc_interface(mconfig, *this) { diff --git a/src/devices/machine/v3021.h b/src/devices/machine/v3021.h index cac5c6884d4..58fc96e74f1 100644 --- a/src/devices/machine/v3021.h +++ b/src/devices/machine/v3021.h @@ -27,7 +27,7 @@ class v3021_device : public device_t, public device_rtc_interface { public: // construction/destruction - v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); // parallel interface void write(u8 data); diff --git a/src/devices/machine/vic_pl192.cpp b/src/devices/machine/vic_pl192.cpp index 2e7a2f4ad85..3fcbc005fda 100644 --- a/src/devices/machine/vic_pl192.cpp +++ b/src/devices/machine/vic_pl192.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(PL190_VIC, vic_pl190_device, "vic_pl190", "ARM PL190 VIC") DEFINE_DEVICE_TYPE(UPD800468_VIC, vic_upd800468_device, "vic_upd800468", "NEC uPD800468 VIC") DEFINE_DEVICE_TYPE(PL192_VIC, vic_pl192_device, "vic_pl192", "ARM PL192 VIC") -vic_pl190_device::vic_pl190_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vic_pl190_device::vic_pl190_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , num_vectors(16) @@ -26,18 +26,18 @@ vic_pl190_device::vic_pl190_device(const machine_config &mconfig, device_type ty { } -vic_pl190_device::vic_pl190_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic_pl190_device::vic_pl190_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vic_pl190_device(mconfig, PL190_VIC, tag, owner, clock) { } -vic_upd800468_device::vic_upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic_upd800468_device::vic_upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vic_pl190_device(mconfig, UPD800468_VIC, tag, owner, clock) { num_vectors = 32; } -vic_pl192_device::vic_pl192_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic_pl192_device::vic_pl192_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vic_pl190_device(mconfig, PL192_VIC, tag, owner, clock) { num_vectors = 32; diff --git a/src/devices/machine/vic_pl192.h b/src/devices/machine/vic_pl192.h index 6ef01a3a935..0ede696b9f1 100644 --- a/src/devices/machine/vic_pl192.h +++ b/src/devices/machine/vic_pl192.h @@ -9,7 +9,7 @@ class vic_pl190_device : public device_t, public device_memory_interface { public: - vic_pl190_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + vic_pl190_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); auto out_irq_cb() { return m_out_irq_func.bind(); } auto out_fiq_cb() { return m_out_fiq_func.bind(); } @@ -50,7 +50,7 @@ public: void vect_ctl_w(offs_t offset, u32 data); protected: - vic_pl190_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vic_pl190_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -87,7 +87,7 @@ private: class vic_upd800468_device : public vic_pl190_device { public: - vic_upd800468_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + vic_upd800468_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); @@ -97,7 +97,7 @@ public: class vic_pl192_device : public vic_pl190_device { public: - vic_pl192_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + vic_pl192_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); diff --git a/src/devices/machine/vr0uart.cpp b/src/devices/machine/vr0uart.cpp index 1bfbf0ebf3d..dded790b186 100644 --- a/src/devices/machine/vr0uart.cpp +++ b/src/devices/machine/vr0uart.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(VRENDER0_UART, vr0uart_device, "vr0uart", "MagicEyes VRender0 // vr0uart_device - constructor //------------------------------------------------- -vr0uart_device::vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vr0uart_device::vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VRENDER0_UART, tag, owner, clock), device_serial_interface(mconfig, *this) { @@ -102,8 +102,8 @@ void vr0uart_device::update_serial_config() } else { - set_rcv_rate(0); - set_tra_rate(0); + set_rcv_rate(XTAL::u(0)); + set_tra_rate(XTAL::u(0)); } } diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp index 1100df8b375..815813183db 100644 --- a/src/devices/machine/vrc4373.cpp +++ b/src/devices/machine/vrc4373.cpp @@ -94,7 +94,7 @@ void vrc4373_device::target2_map(address_map &map) map(0x00000000, 0xFFFFFFFF).rw(FUNC(vrc4373_device::target2_r), FUNC(vrc4373_device::target2_w)); } -vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, VRC4373, tag, owner, clock) , m_cpu_space(nullptr), m_irq_cb(*this), m_cpu(*this, finder_base::DUMMY_TAG), m_ram_size(0x0), m_simm0_size(0x0) , m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32) diff --git a/src/devices/machine/vrc4373.h b/src/devices/machine/vrc4373.h index 7717a979e23..600825f0618 100644 --- a/src/devices/machine/vrc4373.h +++ b/src/devices/machine/vrc4373.h @@ -13,13 +13,13 @@ class vrc4373_device : public pci_host_device { public: template - vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) - : vrc4373_device(mconfig, tag, owner, clock) + vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) + : vrc4373_device(mconfig, tag, owner) { set_cpu_tag(std::forward(cpu_tag)); } - vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void reset_all_mappings() override; virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, diff --git a/src/devices/machine/vrc5074.cpp b/src/devices/machine/vrc5074.cpp index e812cf20d25..3c21b5e3351 100644 --- a/src/devices/machine/vrc5074.cpp +++ b/src/devices/machine/vrc5074.cpp @@ -157,7 +157,7 @@ void vrc5074_device::device_add_mconfig(machine_config &config) ttys00.cts_handler().set(m_uart, FUNC(ns16550_device::cts_w)); } -vrc5074_device::vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrc5074_device::vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, VRC5074, tag, owner, clock), m_uart(*this, "uart"), m_cpu_space(nullptr), m_cpu(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/machine/vrc5074.h b/src/devices/machine/vrc5074.h index 749068b1ff8..f54676724d4 100644 --- a/src/devices/machine/vrc5074.h +++ b/src/devices/machine/vrc5074.h @@ -15,13 +15,13 @@ class vrc5074_device : public pci_host_device { public: template - vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : vrc5074_device(mconfig, tag, owner, clock) { set_cpu_tag(std::forward(cpu_tag)); } - vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); required_device m_uart; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/vrender0.cpp b/src/devices/machine/vrender0.cpp index f59edbe4a2e..d492e44d8fc 100644 --- a/src/devices/machine/vrender0.cpp +++ b/src/devices/machine/vrender0.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(VRENDER0_SOC, vrender0soc_device, "vrender0", "MagicEyes VRen // vrender0soc_device - constructor //------------------------------------------------- -vrender0soc_device::vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrender0soc_device::vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VRENDER0_SOC, tag, owner, clock), m_host_cpu(*this, finder_base::DUMMY_TAG), m_screen(*this, "screen"), @@ -121,7 +121,7 @@ void vrender0soc_device::frame_map(address_map &map) void vrender0soc_device::device_add_mconfig(machine_config &config) { for (required_device &uart : m_uart) - VRENDER0_UART(config, uart, 3579500); + VRENDER0_UART(config, uart, XTAL::u(3579500)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // evolution soccer defaults @@ -130,7 +130,7 @@ void vrender0soc_device::device_add_mconfig(machine_config &config) m_screen->screen_vblank().set(FUNC(vrender0soc_device::screen_vblank)); m_screen->set_palette(m_palette); - VIDEO_VRENDER0(config, m_vr0vid, 14318180); + VIDEO_VRENDER0(config, m_vr0vid, XTAL::u(14318180)); #ifdef IDLE_LOOP_SPEEDUP m_vr0vid->idleskip_cb().set(FUNC(vrender0soc_device::idle_skip_speedup_w)); #endif diff --git a/src/devices/machine/vrender0.h b/src/devices/machine/vrender0.h index 8a3b19d59fb..7cb19ee39c8 100644 --- a/src/devices/machine/vrender0.h +++ b/src/devices/machine/vrender0.h @@ -40,7 +40,7 @@ class vr0uart_device : public device_t, { public: // construction/destruction - vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void regs_map(address_map &map); void set_channel_num(int ch) { m_channel_num = ch; } @@ -87,7 +87,7 @@ class vrender0soc_device : public device_t { public: // construction/destruction - vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void regs_map(address_map &map); void audiovideo_map(address_map &map); diff --git a/src/devices/machine/vt82c496.cpp b/src/devices/machine/vt82c496.cpp index cf1632edd49..5bcbcd8dafa 100644 --- a/src/devices/machine/vt82c496.cpp +++ b/src/devices/machine/vt82c496.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(VT82C496, vt82c496_device, "vt82c496", "VIA VT82C496 system chipset") -vt82c496_device::vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vt82c496_device::vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VT82C496, tag, owner, clock), m_cpu(*this, finder_base::DUMMY_TAG), m_space(nullptr), m_ram(*this, finder_base::DUMMY_TAG), m_rom(*this, finder_base::DUMMY_TAG), m_bios_c0_r(*this, "bios_c0_r"), m_bios_c4_r(*this, "bios_c4_r"), diff --git a/src/devices/machine/vt82c496.h b/src/devices/machine/vt82c496.h index c73a0ace79a..9249689fe18 100644 --- a/src/devices/machine/vt82c496.h +++ b/src/devices/machine/vt82c496.h @@ -18,7 +18,7 @@ class vt82c496_device : public device_t { public: // construction/destruction - vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_cputag(T &&tag) { m_cpu.set_tag(std::forward(tag)); } template void set_ramtag(T &&tag) { m_ram.set_tag(std::forward(tag)); } diff --git a/src/devices/machine/vt83c461.cpp b/src/devices/machine/vt83c461.cpp index 005e41d2848..e15611eb733 100644 --- a/src/devices/machine/vt83c461.cpp +++ b/src/devices/machine/vt83c461.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(VT83C461, vt83c461_device, "vt83c461", "VIA VT83C461 IDE Controller") -vt83c461_device::vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vt83c461_device::vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_32_device(mconfig, VT83C461, tag, owner, clock), m_config_unknown(0), m_config_register_num(0) diff --git a/src/devices/machine/vt83c461.h b/src/devices/machine/vt83c461.h index 97e4941dd56..54cea16041d 100644 --- a/src/devices/machine/vt83c461.h +++ b/src/devices/machine/vt83c461.h @@ -18,7 +18,7 @@ class vt83c461_device : public ide_controller_32_device { public: - vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template vt83c461_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false) { diff --git a/src/devices/machine/watchdog.cpp b/src/devices/machine/watchdog.cpp index 3d7e17178d4..62cfcf79b1d 100644 --- a/src/devices/machine/watchdog.cpp +++ b/src/devices/machine/watchdog.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(WATCHDOG_TIMER, watchdog_timer_device, "watchdog", "Watchdog // watchdog_timer_device - constructor //------------------------------------------------- -watchdog_timer_device::watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +watchdog_timer_device::watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WATCHDOG_TIMER, tag, owner, clock) , m_vblank_count(0) , m_time(attotime::zero) diff --git a/src/devices/machine/watchdog.h b/src/devices/machine/watchdog.h index aaeed0fa494..f9511bc0d36 100644 --- a/src/devices/machine/watchdog.h +++ b/src/devices/machine/watchdog.h @@ -18,7 +18,7 @@ class watchdog_timer_device : public device_t { public: // construction/destruction - watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers template void set_vblank_count(T &&screen_tag, int32_t count) { m_screen.set_tag(std::forward(screen_tag)); m_vblank_count = count; } diff --git a/src/devices/machine/wd1000.cpp b/src/devices/machine/wd1000.cpp index ba4c6a5c1a9..64a6b2996db 100644 --- a/src/devices/machine/wd1000.cpp +++ b/src/devices/machine/wd1000.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(WD1000, wd1000_device, "wd1000", "Western Digital WD1000 Winc // wd1000_device - constructor //------------------------------------------------- -wd1000_device::wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd1000_device::wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD1000, tag, owner, clock) , m_intrq_cb(*this) , m_drq_cb(*this) diff --git a/src/devices/machine/wd1000.h b/src/devices/machine/wd1000.h index 4e2882ee81c..0b69a5ce19d 100644 --- a/src/devices/machine/wd1000.h +++ b/src/devices/machine/wd1000.h @@ -24,7 +24,7 @@ class wd1000_device : public device_t { public: // construction/destruction - wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intrq_wr_callback() { return m_intrq_cb.bind(); } auto drq_wr_callback() { return m_drq_cb.bind(); } diff --git a/src/devices/machine/wd1010.cpp b/src/devices/machine/wd1010.cpp index cef0b5d9dd2..f6f948840cc 100644 --- a/src/devices/machine/wd1010.cpp +++ b/src/devices/machine/wd1010.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(WD1010, wd1010_device, "wd1010", "Western Digital WD1010-05") // wd1010_device - constructor //------------------------------------------------- -wd1010_device::wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wd1010_device::wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD1010, tag, owner, clock), m_out_intrq_cb(*this), m_out_bdrq_cb(*this), diff --git a/src/devices/machine/wd1010.h b/src/devices/machine/wd1010.h index 70d8a687163..59d73a9c7d0 100644 --- a/src/devices/machine/wd1010.h +++ b/src/devices/machine/wd1010.h @@ -24,7 +24,7 @@ class wd1010_device : public device_t { public: // construction/destruction - wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_intrq_callback() { return m_out_intrq_cb.bind(); } auto out_bdrq_callback() { return m_out_bdrq_cb.bind(); } diff --git a/src/devices/machine/wd11c00_17.cpp b/src/devices/machine/wd11c00_17.cpp index 981672a70d9..43d034844a3 100644 --- a/src/devices/machine/wd11c00_17.cpp +++ b/src/devices/machine/wd11c00_17.cpp @@ -175,7 +175,7 @@ inline void wd11c00_17_device::select() // wd11c00_17_device - constructor //------------------------------------------------- -wd11c00_17_device::wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd11c00_17_device::wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD11C00_17, tag, owner, clock) , m_out_irq5_cb(*this) , m_out_drq3_cb(*this) diff --git a/src/devices/machine/wd11c00_17.h b/src/devices/machine/wd11c00_17.h index 91175d2472d..64e081f5736 100644 --- a/src/devices/machine/wd11c00_17.h +++ b/src/devices/machine/wd11c00_17.h @@ -22,7 +22,7 @@ class wd11c00_17_device : public device_t { public: // construction/destruction - wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq5_callback() { return m_out_irq5_cb.bind(); } auto out_drq3_callback() { return m_out_drq3_cb.bind(); } diff --git a/src/devices/machine/wd2010.cpp b/src/devices/machine/wd2010.cpp index 840d0f6f4d8..ab3f7c7f4f8 100644 --- a/src/devices/machine/wd2010.cpp +++ b/src/devices/machine/wd2010.cpp @@ -153,7 +153,7 @@ DEFINE_DEVICE_TYPE(WD2010, wd2010_device, "wd2010", "Western Digital WD2010 Winc // wd2010_device - constructor //------------------------------------------------- -wd2010_device::wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd2010_device::wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD2010, tag, owner, clock) , m_out_intrq_cb(*this) , m_out_bdrq_cb(*this) diff --git a/src/devices/machine/wd2010.h b/src/devices/machine/wd2010.h index a39935326ba..034a6466616 100644 --- a/src/devices/machine/wd2010.h +++ b/src/devices/machine/wd2010.h @@ -22,7 +22,7 @@ class wd2010_device : public device_t { public: // construction/destruction - wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_intrq_callback() { return m_out_intrq_cb.bind(); } auto out_bdrq_callback() { return m_out_bdrq_cb.bind(); } diff --git a/src/devices/machine/wd33c9x.cpp b/src/devices/machine/wd33c9x.cpp index cb59256cea1..a2b8ab668d7 100644 --- a/src/devices/machine/wd33c9x.cpp +++ b/src/devices/machine/wd33c9x.cpp @@ -357,7 +357,7 @@ DEFINE_DEVICE_TYPE(WD33C93B, wd33c93b_device, "wd33c93b", "Western Digital WD33C // wd33c9x_base_device - constructor/destructor //------------------------------------------------- -wd33c9x_base_device::wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +wd33c9x_base_device::wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device{ mconfig, type, tag, owner, clock } , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_addr{ 0 } @@ -1723,22 +1723,22 @@ uint8_t wd33c9x_base_device::get_msg_out() const -wd33c92_device::wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c92_device::wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C92, tag, owner, clock) { } -wd33c93_device::wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c93_device::wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C93, tag, owner, clock) { } -wd33c93a_device::wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c93a_device::wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C93A, tag, owner, clock) { } -wd33c93b_device::wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c93b_device::wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C93B, tag, owner, clock) { } diff --git a/src/devices/machine/wd33c9x.h b/src/devices/machine/wd33c9x.h index 8fb9e8ea78a..6c539934ff5 100644 --- a/src/devices/machine/wd33c9x.h +++ b/src/devices/machine/wd33c9x.h @@ -39,7 +39,7 @@ public: void dma_w(const uint8_t data); protected: - wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -112,45 +112,25 @@ private: class wd33c92_device : public wd33c9x_base_device { public: - wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c92_device(mconfig, tag, owner, 0) - { - } - - wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class wd33c93_device : public wd33c9x_base_device { public: - wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c93_device(mconfig, tag, owner, 0) - { - } - - wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class wd33c93a_device : public wd33c9x_base_device { public: - wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c93a_device(mconfig, tag, owner, 0) - { - } - - wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class wd33c93b_device : public wd33c9x_base_device { public: - wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c93b_device(mconfig, tag, owner, 0) - { - } - - wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/wd7600.cpp b/src/devices/machine/wd7600.cpp index e1f81e0282b..d65943fae02 100644 --- a/src/devices/machine/wd7600.cpp +++ b/src/devices/machine/wd7600.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(WD7600, wd7600_device, "wd7600", "Western Digital WD7600 chip void wd7600_device::device_add_mconfig(machine_config & config) { - AM9517A(config, m_dma1, 0); + AM9517A(config, m_dma1); m_dma1->out_hreq_callback().set(m_dma2, FUNC(am9517a_device::dreq0_w)); m_dma1->out_eop_callback().set(FUNC(wd7600_device::dma1_eop_w)); m_dma1->in_memr_callback().set(FUNC(wd7600_device::dma_read_byte)); @@ -41,7 +41,7 @@ void wd7600_device::device_add_mconfig(machine_config & config) m_dma1->out_dack_callback<2>().set(FUNC(wd7600_device::dma1_dack2_w)); m_dma1->out_dack_callback<3>().set(FUNC(wd7600_device::dma1_dack3_w)); - AM9517A(config, m_dma2, 0); + AM9517A(config, m_dma2); m_dma2->out_hreq_callback().set(FUNC(wd7600_device::dma2_hreq_w)); m_dma2->in_memr_callback().set(FUNC(wd7600_device::dma_read_word)); m_dma2->out_memw_callback().set(FUNC(wd7600_device::dma_write_word)); @@ -56,16 +56,16 @@ void wd7600_device::device_add_mconfig(machine_config & config) m_dma2->out_dack_callback<2>().set(FUNC(wd7600_device::dma2_dack2_w)); m_dma2->out_dack_callback<3>().set(FUNC(wd7600_device::dma2_dack3_w)); - PIC8259(config, m_pic1, 0); + PIC8259(config, m_pic1); m_pic1->out_int_callback().set(FUNC(wd7600_device::pic1_int_w)); m_pic1->in_sp_callback().set_constant(1); m_pic1->read_slave_ack_callback().set(FUNC(wd7600_device::pic1_slave_ack_r)); - PIC8259(config, m_pic2, 0); + PIC8259(config, m_pic2); m_pic2->out_int_callback().set(m_pic1, FUNC(pic8259_device::ir2_w)); m_pic2->in_sp_callback().set_constant(0); - PIT8254(config, m_ctc, 0); + PIT8254(config, m_ctc); m_ctc->set_clk<0>(XTAL(14'318'181) / 12.0); m_ctc->out_handler<0>().set(m_pic1, FUNC(pic8259_device::ir0_w)); m_ctc->set_clk<1>(XTAL(14'318'181) / 12.0); @@ -79,7 +79,7 @@ void wd7600_device::device_add_mconfig(machine_config & config) } -wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD7600, tag, owner, clock), m_read_ior(*this), m_write_iow(*this), diff --git a/src/devices/machine/wd7600.h b/src/devices/machine/wd7600.h index 43ddb00b038..e9e137190c7 100644 --- a/src/devices/machine/wd7600.h +++ b/src/devices/machine/wd7600.h @@ -29,7 +29,7 @@ class wd7600_device : public device_t { public: // construction/destruction - wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto ior_callback() { return m_read_ior.bind(); } diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index 253f9e5a19d..afab2249f2b 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -134,7 +134,7 @@ static const char *const states[] = "WRITE_SECTOR_PRE_BYTE" }; -wd_fdc_device_base::wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wd_fdc_device_base::wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), intrq_cb(*this), drq_cb(*this), @@ -2443,7 +2443,7 @@ int wd_fdc_device_base::settle_time() const return 60000; } -wd_fdc_analog_device_base::wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wd_fdc_analog_device_base::wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_device_base(mconfig, type, tag, owner, clock) { clock_ratio = 1; @@ -2495,7 +2495,7 @@ bool wd_fdc_analog_device_base::pll_write_next_bit(bool bit, attotime &tm, flopp return cur_pll.write_next_bit(bit, tm, floppy, limit); } -wd_fdc_digital_device_base::wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wd_fdc_digital_device_base::wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_device_base(mconfig, type, tag, owner, clock) { clock_ratio = 4; @@ -2704,7 +2704,7 @@ void wd_fdc_digital_device_base::digital_pll_t::commit(floppy_image_device *flop write_position = 0; } -fd1771_device::fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1771, tag, owner, clock) +fd1771_device::fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1771, tag, owner, clock) { constexpr static int fd1771_step_times[4] = { 12000, 12000, 20000, 40000 }; @@ -2731,7 +2731,7 @@ int fd1771_device::calc_sector_size(uint8_t size, uint8_t command) const return size ? size << 4 : 4096; } -fd1781_device::fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1781, tag, owner, clock) +fd1781_device::fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1781, tag, owner, clock) { constexpr static int fd1781_step_times[4] = { 6000, 12000, 20000, 40000 }; @@ -2759,7 +2759,7 @@ int fd1781_device::calc_sector_size(uint8_t size, uint8_t command) const constexpr int wd_fdc_device_base::fd179x_step_times[4]; constexpr int wd_fdc_device_base::fd176x_step_times[4]; -fd1791_device::fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1791, tag, owner, clock) +fd1791_device::fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1791, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2775,7 +2775,7 @@ fd1791_device::fd1791_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1792_device::fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1792, tag, owner, clock) +fd1792_device::fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1792, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2791,7 +2791,7 @@ fd1792_device::fd1792_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1793_device::fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1793, tag, owner, clock) +fd1793_device::fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1793, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2807,7 +2807,7 @@ fd1793_device::fd1793_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -kr1818vg93_device::kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, KR1818VG93, tag, owner, clock) +kr1818vg93_device::kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, KR1818VG93, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2823,7 +2823,7 @@ kr1818vg93_device::kr1818vg93_device(const machine_config &mconfig, const char * ready_hooked = true; } -fd1794_device::fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1794, tag, owner, clock) +fd1794_device::fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1794, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2839,7 +2839,7 @@ fd1794_device::fd1794_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1795_device::fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1795, tag, owner, clock) +fd1795_device::fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1795, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2863,7 +2863,7 @@ int fd1795_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -fd1797_device::fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1797, tag, owner, clock) +fd1797_device::fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1797, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2887,7 +2887,7 @@ int fd1797_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -mb8866_device::mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, MB8866, tag, owner, clock) +mb8866_device::mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, MB8866, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2903,7 +2903,7 @@ mb8866_device::mb8866_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -mb8876_device::mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, MB8876, tag, owner, clock) +mb8876_device::mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, MB8876, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2919,7 +2919,7 @@ mb8876_device::mb8876_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -mb8877_device::mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, MB8877, tag, owner, clock) +mb8877_device::mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, MB8877, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2935,7 +2935,7 @@ mb8877_device::mb8877_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1761_device::fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1761, tag, owner, clock) +fd1761_device::fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1761, tag, owner, clock) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2951,7 +2951,7 @@ fd1761_device::fd1761_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1763_device::fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1763, tag, owner, clock) +fd1763_device::fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1763, tag, owner, clock) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2967,7 +2967,7 @@ fd1763_device::fd1763_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1765_device::fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1765, tag, owner, clock) +fd1765_device::fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1765, tag, owner, clock) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2991,7 +2991,7 @@ int fd1765_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -fd1767_device::fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1767, tag, owner, clock) +fd1767_device::fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1767, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3015,7 +3015,7 @@ int fd1767_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -wd2791_device::wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2791, tag, owner, clock) +wd2791_device::wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2791, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3031,7 +3031,7 @@ wd2791_device::wd2791_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -wd2793_device::wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2793, tag, owner, clock) +wd2793_device::wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2793, tag, owner, clock) { step_times = fd179x_step_times; @@ -3048,7 +3048,7 @@ wd2793_device::wd2793_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -wd2795_device::wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2795, tag, owner, clock) +wd2795_device::wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2795, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3072,7 +3072,7 @@ int wd2795_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -wd2797_device::wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2797, tag, owner, clock) +wd2797_device::wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2797, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3096,7 +3096,7 @@ int wd2797_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -wd1770_device::wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_device_base(mconfig, WD1770, tag, owner, clock) +wd1770_device::wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_digital_device_base(mconfig, WD1770, tag, owner, clock) { step_times = wd_digital_step_times; delay_register_commit = 16; @@ -3112,7 +3112,7 @@ wd1770_device::wd1770_device(const machine_config &mconfig, const char *tag, dev ready_hooked = false; } -wd1772_device::wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_device_base(mconfig, WD1772, tag, owner, clock) +wd1772_device::wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_digital_device_base(mconfig, WD1772, tag, owner, clock) { const static int wd1772_step_times[4] = { 12000, 24000, 4000, 6000 }; @@ -3140,7 +3140,7 @@ int wd1772_device::settle_time() const return 30000; } -wd1773_device::wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_device_base(mconfig, WD1773, tag, owner, clock) +wd1773_device::wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_digital_device_base(mconfig, WD1773, tag, owner, clock) { step_times = wd_digital_step_times; delay_register_commit = 16; diff --git a/src/devices/machine/wd_fdc.h b/src/devices/machine/wd_fdc.h index e870542fcbc..1ba959ec796 100644 --- a/src/devices/machine/wd_fdc.h +++ b/src/devices/machine/wd_fdc.h @@ -93,7 +93,7 @@ public: void index_callback(floppy_image_device *floppy, int state); protected: - wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // Chip-specific configuration flags bool disable_mfm; @@ -373,7 +373,7 @@ private: class wd_fdc_analog_device_base : public wd_fdc_device_base { protected: - wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void pll_reset(bool fm, bool enmf, const attotime &when) override; virtual void pll_start_writing(const attotime &tm) override; @@ -390,7 +390,7 @@ private: class wd_fdc_digital_device_base : public wd_fdc_device_base { protected: - wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); static constexpr int wd_digital_step_times[4] = { 12000, 24000, 40000, 60000 }; @@ -433,7 +433,7 @@ private: class fd1771_device : public wd_fdc_analog_device_base { public: - fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -441,7 +441,7 @@ protected: class fd1781_device : public wd_fdc_analog_device_base { public: - fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -449,32 +449,32 @@ protected: class fd1791_device : public wd_fdc_analog_device_base { public: - fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1792_device : public wd_fdc_analog_device_base { public: - fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1793_device : public wd_fdc_analog_device_base { public: - fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class kr1818vg93_device : public wd_fdc_analog_device_base { public: - kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1794_device : public wd_fdc_analog_device_base { public: - fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1795_device : public wd_fdc_analog_device_base { public: - fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -482,7 +482,7 @@ protected: class fd1797_device : public wd_fdc_analog_device_base { public: - fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -490,32 +490,32 @@ protected: class mb8866_device : public wd_fdc_analog_device_base { public: - mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mb8876_device : public wd_fdc_analog_device_base { public: - mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mb8877_device : public wd_fdc_analog_device_base { public: - mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1761_device : public wd_fdc_analog_device_base { public: - fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1763_device : public wd_fdc_analog_device_base { public: - fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1765_device : public wd_fdc_analog_device_base { public: - fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -523,7 +523,7 @@ protected: class fd1767_device : public wd_fdc_analog_device_base { public: - fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -531,19 +531,19 @@ protected: class wd2791_device : public wd_fdc_analog_device_base { public: - wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(enmf_w) { enmf = state ? false : true; } }; class wd2793_device : public wd_fdc_analog_device_base { public: - wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(enmf_w) { enmf = state ? false : true; } }; class wd2795_device : public wd_fdc_analog_device_base { public: - wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -551,7 +551,7 @@ protected: class wd2797_device : public wd_fdc_analog_device_base { public: - wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -559,12 +559,12 @@ protected: class wd1770_device : public wd_fdc_digital_device_base { public: - wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class wd1772_device : public wd_fdc_digital_device_base { public: - wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int settle_time() const override; @@ -572,7 +572,7 @@ protected: class wd1773_device : public wd_fdc_digital_device_base { public: - wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(FD1771, fd1771_device) diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp index bee2f043e7e..fda72801509 100644 --- a/src/devices/machine/wozfdc.cpp +++ b/src/devices/machine/wozfdc.cpp @@ -56,18 +56,18 @@ void wozfdc_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -wozfdc_device::wozfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wozfdc_device::wozfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_phaselatch(*this, "phaselatch") { } -diskii_fdc_device::diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +diskii_fdc_device::diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wozfdc_device(mconfig, DISKII_FDC, tag, owner, clock) { } -appleiii_fdc_device::appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +appleiii_fdc_device::appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wozfdc_device(mconfig, APPLEIII_FDC, tag, owner, clock) { } diff --git a/src/devices/machine/wozfdc.h b/src/devices/machine/wozfdc.h index f92ccaec39f..ccc32cbde41 100644 --- a/src/devices/machine/wozfdc.h +++ b/src/devices/machine/wozfdc.h @@ -35,7 +35,7 @@ public: protected: // construction/destruction - wozfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wozfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -83,7 +83,7 @@ protected: class diskii_fdc_device : public wozfdc_device { public: - diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_floppies(floppy_connector *f0, floppy_connector *f1); @@ -94,7 +94,7 @@ protected: class appleiii_fdc_device : public wozfdc_device { public: - appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_floppies_4(floppy_connector *f0, floppy_connector *f1, floppy_connector *f2, floppy_connector *f3); diff --git a/src/devices/machine/wtl3132.cpp b/src/devices/machine/wtl3132.cpp index 2e86798b878..28479af0b56 100644 --- a/src/devices/machine/wtl3132.cpp +++ b/src/devices/machine/wtl3132.cpp @@ -31,7 +31,7 @@ ALLOW_SAVE_TYPE(float32_t); DEFINE_DEVICE_TYPE(WTL3132, wtl3132_device, "wtl3132", "Weitek 3132") -wtl3132_device::wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +wtl3132_device::wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WTL3132, tag, owner, clock) , m_fpcn_cb(*this) , m_fpex_cb(*this) diff --git a/src/devices/machine/wtl3132.h b/src/devices/machine/wtl3132.h index deca6dd7f26..cf676e62273 100644 --- a/src/devices/machine/wtl3132.h +++ b/src/devices/machine/wtl3132.h @@ -11,7 +11,7 @@ class wtl3132_device : public device_t { public: - wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // output lines auto out_fpcn() { return m_fpcn_cb.bind(); } diff --git a/src/devices/machine/x2201.cpp b/src/devices/machine/x2201.cpp index 30ee78a8cfd..57106c42ebe 100644 --- a/src/devices/machine/x2201.cpp +++ b/src/devices/machine/x2201.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(X2201, x2201_device, "x2201", "Xicor X2201 1024x1 NOVRAM") // x2201_device - constructor //------------------------------------------------- -x2201_device::x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x2201_device::x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X2201, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_default_data(*this, DEVICE_SELF) diff --git a/src/devices/machine/x2201.h b/src/devices/machine/x2201.h index 1e23493fdb7..d8b755d0ea2 100644 --- a/src/devices/machine/x2201.h +++ b/src/devices/machine/x2201.h @@ -34,7 +34,7 @@ class x2201_device : public device_t, public device_nvram_interface { public: // construction/destruction - x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write handlers u8 read(offs_t offset); diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp index f8c7fb906e3..f52a60c1474 100644 --- a/src/devices/machine/x2212.cpp +++ b/src/devices/machine/x2212.cpp @@ -26,12 +26,12 @@ DEFINE_DEVICE_TYPE(X2210, x2210_device, "x2210", "Xicor X2210 64x4 NOVRAM") // x2212_device - constructor //------------------------------------------------- -x2212_device::x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x2212_device::x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : x2212_device(mconfig, X2212, tag, owner, clock, 0x100) { } -x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int size_data) +x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int size_data) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_auto_save(false) @@ -183,7 +183,7 @@ void x2212_device::recall(int state) } -x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : x2212_device(mconfig, X2210, tag, owner, clock, 0x40) { } diff --git a/src/devices/machine/x2212.h b/src/devices/machine/x2212.h index feeb91a0d23..a324bf1d7b3 100644 --- a/src/devices/machine/x2212.h +++ b/src/devices/machine/x2212.h @@ -38,7 +38,7 @@ class x2212_device : public device_t, public device_nvram_interface { public: // construction/destruction - x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // some systems (like many early Atari games) wire up the /STORE signal // to fire on power-down, effectively creating an "auto-save" functionality @@ -52,7 +52,7 @@ public: void recall(int state); protected: - x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int size_data); + x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int size_data); // device-level overrides virtual void device_start() override; @@ -84,7 +84,7 @@ private: class x2210_device : public x2212_device { public: - x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/x76f041.cpp b/src/devices/machine/x76f041.cpp index 340cf224800..73e67032347 100644 --- a/src/devices/machine/x76f041.cpp +++ b/src/devices/machine/x76f041.cpp @@ -36,7 +36,7 @@ inline void ATTR_PRINTF( 3, 4 ) x76f041_device::verboselog( int n_level, const c // device type definition DEFINE_DEVICE_TYPE(X76F041, x76f041_device, "x76f041", "X76F041 Secure SerialFlash") -x76f041_device::x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +x76f041_device::x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t( mconfig, X76F041, tag, owner, clock ), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/x76f041.h b/src/devices/machine/x76f041.h index bd0a792cf9c..722d2e23081 100644 --- a/src/devices/machine/x76f041.h +++ b/src/devices/machine/x76f041.h @@ -18,7 +18,7 @@ class x76f041_device : public device_t, { public: // construction/destruction - x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write_cs ); DECLARE_WRITE_LINE_MEMBER( write_rst ); diff --git a/src/devices/machine/x76f100.cpp b/src/devices/machine/x76f100.cpp index 032020059d9..fefb2f4c878 100644 --- a/src/devices/machine/x76f100.cpp +++ b/src/devices/machine/x76f100.cpp @@ -34,7 +34,7 @@ inline void ATTR_PRINTF( 3, 4 ) x76f100_device::verboselog( int n_level, const c // device type definition DEFINE_DEVICE_TYPE(X76F100, x76f100_device, "x76f100", "X76F100 Secure SerialFlash") -x76f100_device::x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +x76f100_device::x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t( mconfig, X76F100, tag, owner, clock ), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/x76f100.h b/src/devices/machine/x76f100.h index 38302f7caeb..eff43a514d5 100644 --- a/src/devices/machine/x76f100.h +++ b/src/devices/machine/x76f100.h @@ -17,7 +17,7 @@ class x76f100_device : public device_t, public device_nvram_interface { public: // construction/destruction - x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write_cs ); DECLARE_WRITE_LINE_MEMBER( write_rst ); diff --git a/src/devices/machine/xc1700e.cpp b/src/devices/machine/xc1700e.cpp index fe056664b07..e622ee90415 100644 --- a/src/devices/machine/xc1700e.cpp +++ b/src/devices/machine/xc1700e.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(XC1701, xc1701_device, "xc1701", "Xilinx 1,048,576 bit DEFINE_DEVICE_TYPE(XC1702L, xc1702l_device, "xc1702l", "Xilinx 2,097,152 bit Serial PROM") DEFINE_DEVICE_TYPE(XC1704L, xc1704l_device, "xc1704l", "Xilinx 4,194,304 bit Serial PROM") -base_xc1700e_device::base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 capacity) +base_xc1700e_device::base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 capacity) : device_t(mconfig, type, tag, owner, clock) , m_capacity(capacity) , m_region(*this, DEVICE_SELF) diff --git a/src/devices/machine/xc1700e.h b/src/devices/machine/xc1700e.h index 42a191c73ce..0ae51f4950f 100644 --- a/src/devices/machine/xc1700e.h +++ b/src/devices/machine/xc1700e.h @@ -17,7 +17,7 @@ public: int data_r(); protected: - base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 capacity); + base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 capacity); // device_t overrides virtual void device_start() override; @@ -46,7 +46,7 @@ DECLARE_DEVICE_TYPE(XC1704L, xc1704l_device) class xc1736e_device : public base_xc1700e_device { public: - xc1736e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1736e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1736E, tag, owner, clock, 36'288UL) { } @@ -55,7 +55,7 @@ public: class xc1765e_device : public base_xc1700e_device { public: - xc1765e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1765e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1765E, tag, owner, clock, 65'536UL) { } @@ -64,7 +64,7 @@ public: class xc17128e_device : public base_xc1700e_device { public: - xc17128e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc17128e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC17128E, tag, owner, clock, 131'072UL) { } @@ -73,7 +73,7 @@ public: class xc17256e_device : public base_xc1700e_device { public: - xc17256e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc17256e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC17256E, tag, owner, clock, 262'144UL) { } @@ -82,7 +82,7 @@ public: class xc17512l_device : public base_xc1700e_device { public: - xc17512l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc17512l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC17512L, tag, owner, clock, 524'288UL) { } @@ -91,7 +91,7 @@ public: class xc1701_device : public base_xc1700e_device { public: - xc1701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1701, tag, owner, clock, 1'048'576UL) { } @@ -100,7 +100,7 @@ public: class xc1702l_device : public base_xc1700e_device { public: - xc1702l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1702l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1702L, tag, owner, clock, 2'097'152UL) { } @@ -109,7 +109,7 @@ public: class xc1704l_device : public base_xc1700e_device { public: - xc1704l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1704l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1704L, tag, owner, clock, 4'194'304UL) { } diff --git a/src/devices/machine/ym2148.cpp b/src/devices/machine/ym2148.cpp index 88f7db02b1e..0c32b782924 100644 --- a/src/devices/machine/ym2148.cpp +++ b/src/devices/machine/ym2148.cpp @@ -16,7 +16,7 @@ TODO: DEFINE_DEVICE_TYPE(YM2148, ym2148_device, "ym2148", "Yamaha YM2148 MIDI/Keyboard Interface") -ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, YM2148, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_txd_handler(*this) diff --git a/src/devices/machine/ym2148.h b/src/devices/machine/ym2148.h index 07cacfbc589..525f5269c87 100644 --- a/src/devices/machine/ym2148.h +++ b/src/devices/machine/ym2148.h @@ -23,7 +23,7 @@ class ym2148_device : public device_t, public device_serial_interface { public: // construction/destruction - ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto txd_handler() { return m_txd_handler.bind(); } diff --git a/src/devices/machine/ym3802.cpp b/src/devices/machine/ym3802.cpp index 4a8f6a7ffae..ab073b6057b 100644 --- a/src/devices/machine/ym3802.cpp +++ b/src/devices/machine/ym3802.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(YM3802, ym3802_device, "ym3802", "Yamaha YM3802 MCS MIDI Communication and Service Controller") -ym3802_device::ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ym3802_device::ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, YM3802, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_irq_handler(*this) diff --git a/src/devices/machine/ym3802.h b/src/devices/machine/ym3802.h index 00e6683ed25..f5fd91ea35d 100644 --- a/src/devices/machine/ym3802.h +++ b/src/devices/machine/ym3802.h @@ -30,7 +30,7 @@ class ym3802_device : public device_t, public device_serial_interface { public: // construction/destruction - ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/z8038.cpp b/src/devices/machine/z8038.cpp index 699c43898ca..4640bb2267a 100644 --- a/src/devices/machine/z8038.cpp +++ b/src/devices/machine/z8038.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(Z8038, z8038_device, "z8038", "FIFO Input/Output Interface Unit") -z8038_device::z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8038_device::z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z8038, tag, owner, clock) , m_out_int_cb(*this) , m_out_E_cb(*this) diff --git a/src/devices/machine/z8038.h b/src/devices/machine/z8038.h index 2e2201f10d6..2f6a199e7c7 100644 --- a/src/devices/machine/z8038.h +++ b/src/devices/machine/z8038.h @@ -9,7 +9,7 @@ class z8038_device : public device_t { public: - z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // port 1 and 2 I̅N̅T̅ output lines template auto out_int_cb() { return m_out_int_cb[Port - 1].bind(); } diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp index 6a6e728d548..0623725940f 100644 --- a/src/devices/machine/z80ctc.cpp +++ b/src/devices/machine/z80ctc.cpp @@ -76,7 +76,7 @@ DEFINE_DEVICE_TYPE(Z80CTC_CHANNEL, z80ctc_channel_device, "z80ctc_channel", "Z80 // z80ctc_device - constructor //------------------------------------------------- -z80ctc_device::z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +z80ctc_device::z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80CTC, tag, owner, clock) , device_z80daisy_interface(mconfig, *this) , m_intr_cb(*this) @@ -286,7 +286,7 @@ void z80ctc_device::interrupt_check() // z80ctc_channel_device - constructor //------------------------------------------------- -z80ctc_channel_device::z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +z80ctc_channel_device::z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80CTC_CHANNEL, tag, owner, clock), m_device(*this, DEVICE_SELF_OWNER), m_index(0), diff --git a/src/devices/machine/z80ctc.h b/src/devices/machine/z80ctc.h index 2e61a80df1b..8bfb441def9 100644 --- a/src/devices/machine/z80ctc.h +++ b/src/devices/machine/z80ctc.h @@ -47,7 +47,7 @@ class z80ctc_channel_device : public device_t public: // construction/destruction - z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -82,11 +82,10 @@ class z80ctc_device : public device_t, public: // construction/destruction - z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intr_callback() { return m_intr_cb.bind(); } template auto zc_callback() { return m_zc_cb[Channel].bind(); } // m_zc_cb[3] not supported on a standard ctc, only used for the tmpz84c015 - template void set_clk(u32 clock) { channel_config(Channel).set_clock(clock); } template void set_clk(const XTAL &xtal) { channel_config(Channel).set_clock(xtal); } // read/write handlers diff --git a/src/devices/machine/z80daisy_generic.cpp b/src/devices/machine/z80daisy_generic.cpp index 3a5b6562f30..92bf68c3612 100644 --- a/src/devices/machine/z80daisy_generic.cpp +++ b/src/devices/machine/z80daisy_generic.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(Z80DAISY_GENERIC, z80daisy_generic_device, "z80daisy_generic" // z80daisy_generic_device - constructor //------------------------------------------------- -z80daisy_generic_device::z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80daisy_generic_device::z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80DAISY_GENERIC, tag, owner, clock), device_z80daisy_interface(mconfig, *this), m_int_handler(*this), diff --git a/src/devices/machine/z80daisy_generic.h b/src/devices/machine/z80daisy_generic.h index d26b50e6ee7..34b01f1d7bd 100644 --- a/src/devices/machine/z80daisy_generic.h +++ b/src/devices/machine/z80daisy_generic.h @@ -22,7 +22,7 @@ class z80daisy_generic_device : public device_t, public device_z80daisy_interfac { public: // construction/destruction - z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/devices/machine/z80dma.cpp b/src/devices/machine/z80dma.cpp index 7ed0e61160f..9b00cade7b0 100644 --- a/src/devices/machine/z80dma.cpp +++ b/src/devices/machine/z80dma.cpp @@ -149,7 +149,7 @@ DEFINE_DEVICE_TYPE(Z80DMA, z80dma_device, "z80dma", "Z80 DMA Controller") // z80dma_device - constructor //------------------------------------------------- -z80dma_device::z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80dma_device::z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80DMA, tag, owner, clock) , device_z80daisy_interface(mconfig, *this) , m_out_busreq_cb(*this) diff --git a/src/devices/machine/z80dma.h b/src/devices/machine/z80dma.h index 26613e74b80..11fd05f22b4 100644 --- a/src/devices/machine/z80dma.h +++ b/src/devices/machine/z80dma.h @@ -49,7 +49,7 @@ class z80dma_device : public device_t, { public: // construction/destruction - z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_busreq_callback() { return m_out_busreq_cb.bind(); } auto out_int_callback() { return m_out_int_cb.bind(); } diff --git a/src/devices/machine/z80pio.cpp b/src/devices/machine/z80pio.cpp index e1664055f21..37c9ddd9a5f 100644 --- a/src/devices/machine/z80pio.cpp +++ b/src/devices/machine/z80pio.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(Z80PIO, z80pio_device, "z80pio", "Z80 PIO") // z80pio_device - constructor //------------------------------------------------- -z80pio_device::z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80pio_device::z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80PIO, tag, owner, clock), device_z80daisy_interface(mconfig, *this), m_out_int_cb(*this), diff --git a/src/devices/machine/z80pio.h b/src/devices/machine/z80pio.h index a448fd9d502..e7c7a867183 100644 --- a/src/devices/machine/z80pio.h +++ b/src/devices/machine/z80pio.h @@ -56,7 +56,7 @@ public: }; // construction/destruction - z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_callback() { return m_out_int_cb.bind(); } auto in_pa_callback() { return m_in_pa_cb.bind(); } diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp index 020b2678bfd..c6a8a63401c 100644 --- a/src/devices/machine/z80scc.cpp +++ b/src/devices/machine/z80scc.cpp @@ -386,8 +386,8 @@ DEFINE_DEVICE_TYPE(SCC8523L, scc8523l_device, "scc8523l", "Zilog Z85 //------------------------------------------------- void z80scc_device::device_add_mconfig(machine_config &config) { - Z80SCC_CHANNEL(config, CHANA_TAG, 0); - Z80SCC_CHANNEL(config, CHANB_TAG, 0); + Z80SCC_CHANNEL(config, CHANA_TAG); + Z80SCC_CHANNEL(config, CHANB_TAG); } @@ -413,7 +413,7 @@ inline void z80scc_channel::out_dtr_cb(int state) //------------------------------------------------- // z80scc_device - constructor //------------------------------------------------- -z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock), device_z80daisy_interface(mconfig, *this), m_wr9(0), @@ -440,42 +440,42 @@ z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, co elem = 0; } -scc8030_device::scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc8030_device::scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC8030, tag, owner, clock, TYPE_SCC8030) { } -scc80c30_device::scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc80c30_device::scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC80C30, tag, owner, clock, TYPE_SCC80C30) { } -scc80230_device::scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc80230_device::scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC80230, tag, owner, clock, TYPE_SCC80230) { } -scc8530_device::scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc8530_device::scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC8530N, tag, owner, clock, TYPE_SCC8530) { } -scc85c30_device::scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc85c30_device::scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC85C30, tag, owner, clock, TYPE_SCC85C30) { } -scc85230_device::scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc85230_device::scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC85230, tag, owner, clock, TYPE_SCC85230) { } -scc85233_device::scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc85233_device::scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC85233, tag, owner, clock, TYPE_SCC85233) { } -scc8523l_device::scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc8523l_device::scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC8523L, tag, owner, clock, TYPE_SCC8523L) { } @@ -1011,7 +1011,7 @@ void z80scc_device::ab_dc_w(offs_t offset, uint8_t data) //------------------------------------------------- // SCC_channel - constructor //------------------------------------------------- -z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80SCC_CHANNEL, tag, owner, clock), device_serial_interface(mconfig, *this), m_baudtimer(0), @@ -2915,8 +2915,8 @@ void z80scc_channel::update_serial() else { LOG("- BRG disabled\n"); - set_rcv_rate(0); - set_tra_rate(0); + set_rcv_rate(XTAL::u(0)); + set_tra_rate(XTAL::u(0)); } // TODO: Check registers for use of RTxC and TRxC, if used as direct Tx and/or Rx clocks set them to value as programmed // in m_uart->txca/txcb and rxca/rxcb respectivelly diff --git a/src/devices/machine/z80scc.h b/src/devices/machine/z80scc.h index 4ef274aba92..5bae5fe767b 100644 --- a/src/devices/machine/z80scc.h +++ b/src/devices/machine/z80scc.h @@ -53,7 +53,7 @@ class z80scc_channel : public device_t, friend class z80scc_device; public: - z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -330,12 +330,12 @@ public: void set_cputag(const char *tag) { m_cputag = tag; } - void configure_channels(int rxa, int txa, int rxb, int txb) + void configure_channels(const XTAL &rxa, const XTAL &txa, const XTAL &rxb, const XTAL &txb) { - m_rxca = rxa; - m_txca = txa; - m_rxcb = rxb; - m_txcb = txb; + m_rxca = rxa.value(); + m_txca = txa.value(); + m_rxcb = rxb.value(); + m_txcb = txb.value(); } uint8_t dc_ab_r(offs_t offset); @@ -380,7 +380,7 @@ public: int get_extint_priority(int type); protected: - z80scc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + z80scc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_resolve_objects() override; @@ -460,49 +460,49 @@ protected: class scc8030_device : public z80scc_device { public: - scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc80c30_device : public z80scc_device { public: - scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc80230_device : public z80scc_device { public: - scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc8530_device : public z80scc_device { public: - scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc85c30_device : public z80scc_device { public: - scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc85230_device : public z80scc_device { public: - scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc85233_device : public z80scc_device { public: - scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc8523l_device : public z80scc_device { public: - scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp index 8306c48bab4..5ba14295c4f 100644 --- a/src/devices/machine/z80sio.cpp +++ b/src/devices/machine/z80sio.cpp @@ -269,26 +269,26 @@ DEFINE_DEVICE_TYPE(MK68564, mk68564_device, "mk68564", "Most //------------------------------------------------- void z80sio_device::device_add_mconfig(machine_config &config) { - Z80SIO_CHANNEL(config, CHANA_TAG, 0); - Z80SIO_CHANNEL(config, CHANB_TAG, 0); + Z80SIO_CHANNEL(config, CHANA_TAG); + Z80SIO_CHANNEL(config, CHANB_TAG); } void z80dart_device::device_add_mconfig(machine_config &config) { - Z80DART_CHANNEL(config, CHANA_TAG, 0); - Z80DART_CHANNEL(config, CHANB_TAG, 0); + Z80DART_CHANNEL(config, CHANA_TAG); + Z80DART_CHANNEL(config, CHANB_TAG); } void i8274_device::device_add_mconfig(machine_config &config) { - I8274_CHANNEL(config, CHANA_TAG, 0); - I8274_CHANNEL(config, CHANB_TAG, 0); + I8274_CHANNEL(config, CHANA_TAG); + I8274_CHANNEL(config, CHANB_TAG); } void mk68564_device::device_add_mconfig(machine_config &config) { - MK68564_CHANNEL(config, CHANA_TAG, 0); - MK68564_CHANNEL(config, CHANB_TAG, 0); + MK68564_CHANNEL(config, CHANA_TAG); + MK68564_CHANNEL(config, CHANB_TAG); } @@ -397,7 +397,7 @@ void z80dart_channel::tx_setup_idle() //------------------------------------------------- // z80sio_device - constructor //------------------------------------------------- -z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -416,32 +416,32 @@ z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, co elem = 0; } -z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_device(mconfig, Z80SIO, tag, owner, clock) { } -z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_device(mconfig, Z80DART, tag, owner, clock) { } -i8274_device::i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +i8274_device::i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z80sio_device(mconfig, type, tag, owner, clock) { } -i8274_device::i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8274_device::i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8274_device(mconfig, I8274, tag, owner, clock) { } -upd7201_device::upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +upd7201_device::upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8274_device(mconfig, UPD7201, tag, owner, clock) { } -mk68564_device::mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mk68564_device::mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8274_device(mconfig, MK68564, tag, owner, clock) { } @@ -978,22 +978,22 @@ z80sio_channel::z80sio_channel( m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = 0; } -z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, Z80SIO_CHANNEL, tag, owner, clock, RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) { } -z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, Z80DART_CHANNEL, tag, owner, clock, RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) { } -i8274_channel::i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8274_channel::i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, I8274_CHANNEL, tag, owner, clock, RR1_RX_OVERRUN_ERROR) { } -mk68564_channel::mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mk68564_channel::mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, MK68564_CHANNEL, tag, owner, clock, RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) , m_tx_auto_enable(false) , m_brg_tc(0) diff --git a/src/devices/machine/z80sio.h b/src/devices/machine/z80sio.h index f8fbc1522c9..de27b405072 100644 --- a/src/devices/machine/z80sio.h +++ b/src/devices/machine/z80sio.h @@ -178,7 +178,7 @@ class z80sio_channel : public device_t friend class mk68564_device; public: - z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read register handlers uint8_t do_sioreg_rr0(); @@ -397,7 +397,7 @@ protected: class z80dart_channel : public z80sio_channel { public: - z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void enter_hunt_mode() override; @@ -414,7 +414,7 @@ protected: class i8274_channel : public z80sio_channel { public: - i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -425,7 +425,7 @@ class mk68564_channel : public z80sio_channel friend class mk68564_device; public: - mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -473,7 +473,7 @@ class z80sio_device : public device_t, public: // construction/destruction - z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_txda_callback() { return m_out_txd_cb[0].bind(); } auto out_txdb_callback() { return m_out_txd_cb[1].bind(); } @@ -526,7 +526,7 @@ public: DECLARE_WRITE_LINE_MEMBER( syncb_w ) { m_chanB->sync_w(state); } protected: - z80sio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + z80sio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; @@ -579,7 +579,7 @@ protected: class z80dart_device : public z80sio_device { public: - z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ria_w ) { m_chanA->sync_w(state); } DECLARE_WRITE_LINE_MEMBER( rib_w ) { m_chanB->sync_w(state); } @@ -592,12 +592,12 @@ protected: class i8274_device : public z80sio_device { public: - i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t inta_r() { return m1_r(); } protected: - i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device_t overrides virtual void device_add_mconfig(machine_config &config) override; @@ -613,13 +613,13 @@ protected: class upd7201_device : public i8274_device { public: - upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mk68564_device : public i8274_device { public: - mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_xtal(uint32_t clock); void set_xtal(const XTAL &clock) { set_xtal(clock.value()); } diff --git a/src/devices/machine/z80sti.cpp b/src/devices/machine/z80sti.cpp index a72a370ec79..4ed129c2faa 100644 --- a/src/devices/machine/z80sti.cpp +++ b/src/devices/machine/z80sti.cpp @@ -76,7 +76,7 @@ const int z80sti_device::PRESCALER[] = { 0, 4, 10, 16, 50, 64, 100, 200 }; // z80sti_device - constructor //------------------------------------------------- -z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80STI, tag, owner, clock) , device_serial_interface(mconfig, *this) , device_z80daisy_interface(mconfig, *this) diff --git a/src/devices/machine/z80sti.h b/src/devices/machine/z80sti.h index 9cd0ff40d59..9bee4619055 100644 --- a/src/devices/machine/z80sti.h +++ b/src/devices/machine/z80sti.h @@ -50,7 +50,7 @@ class z80sti_device : public device_t, { public: // construction/destruction - z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_cb() { return m_out_int_cb.bind(); } auto in_gpio_cb() { return m_in_gpio_cb.bind(); } diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp index c30868d0dbb..4f21fa59125 100644 --- a/src/devices/machine/z8536.cpp +++ b/src/devices/machine/z8536.cpp @@ -776,7 +776,7 @@ void cio_base_device::external_port_w(int port, int bit, int state) // cio_base_device - constructor //------------------------------------------------- -cio_base_device::cio_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +cio_base_device::cio_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_write_irq(*this), m_read_pa(*this), @@ -794,7 +794,7 @@ cio_base_device::cio_base_device(const machine_config &mconfig, device_type type // z8036_device - constructor //------------------------------------------------- -z8036_device::z8036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +z8036_device::z8036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cio_base_device(mconfig, Z8036, tag, owner, clock) { } @@ -804,7 +804,7 @@ z8036_device::z8036_device(const machine_config &mconfig, const char *tag, devic // z8536_device - constructor //------------------------------------------------- -z8536_device::z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +z8536_device::z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cio_base_device(mconfig, Z8536, tag, owner, clock), device_z80daisy_interface(mconfig, *this) { diff --git a/src/devices/machine/z8536.h b/src/devices/machine/z8536.h index 382649a15f9..ea1b624d940 100644 --- a/src/devices/machine/z8536.h +++ b/src/devices/machine/z8536.h @@ -104,7 +104,7 @@ public: protected: // construction/destruction - cio_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + cio_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -416,7 +416,7 @@ class z8036_device : public cio_base_device { public: // construction/destruction - z8036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z8036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(offs_t offset); void write(offs_t offset, u8 data); @@ -428,7 +428,7 @@ class z8536_device : public cio_base_device, public device_z80daisy_interface { public: // construction/destruction - z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(offs_t offset); void write(offs_t offset, u8 data); diff --git a/src/devices/sound/315-5641.cpp b/src/devices/sound/315-5641.cpp index 7b5f06b0d8b..3836794f5f7 100644 --- a/src/devices/sound/315-5641.cpp +++ b/src/devices/sound/315-5641.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5641_PCM, sega_315_5641_pcm_device, "315_5641_pcm", "Sega 315-5641 PCM") -sega_315_5641_pcm_device::sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_315_5641_pcm_device::sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd7759_device(mconfig, SEGA_315_5641_PCM, tag, owner, clock) , m_fifocallback(*this) , m_fifo_read(0) diff --git a/src/devices/sound/315-5641.h b/src/devices/sound/315-5641.h index 2f986a912f0..7631a376298 100644 --- a/src/devices/sound/315-5641.h +++ b/src/devices/sound/315-5641.h @@ -16,7 +16,7 @@ class sega_315_5641_pcm_device : public upd7759_device { public: - sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto fifo_cb() { return m_fifocallback.bind(); } virtual void port_w(u8 data) override; diff --git a/src/devices/sound/ad1848.cpp b/src/devices/sound/ad1848.cpp index 7c62b4912ef..983eede0d5f 100644 --- a/src/devices/sound/ad1848.cpp +++ b/src/devices/sound/ad1848.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(AD1848, ad1848_device, "ad1848", "AD1848 16-bit SoundPort Stereo Codec") -ad1848_device::ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ad1848_device::ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AD1848, tag, owner, clock), m_irq_cb(*this), m_drq_cb(*this), @@ -25,8 +25,8 @@ void ad1848_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_16BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_16BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC } diff --git a/src/devices/sound/ad1848.h b/src/devices/sound/ad1848.h index 1fd354c3427..1524119fde1 100644 --- a/src/devices/sound/ad1848.h +++ b/src/devices/sound/ad1848.h @@ -11,7 +11,7 @@ class ad1848_device : public device_t { public: - ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_irq_cb.bind(); } auto drq() { return m_drq_cb.bind(); } diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp index a746f80eae0..8fdb58f169f 100644 --- a/src/devices/sound/aica.cpp +++ b/src/devices/sound/aica.cpp @@ -1538,7 +1538,7 @@ u8 aica_device::midi_out_r() DEFINE_DEVICE_TYPE(AICA, aica_device, "aica", "Yamaha AICA") -aica_device::aica_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aica_device::aica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AICA, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/sound/aica.h b/src/devices/sound/aica.h index 09a042b1aad..01c208e134f 100644 --- a/src/devices/sound/aica.h +++ b/src/devices/sound/aica.h @@ -19,7 +19,7 @@ class aica_device : public device_t, public device_sound_interface, public devic public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - aica_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_irq_cb.bind(); } auto main_irq() { return m_main_irq_cb.bind(); } diff --git a/src/devices/sound/asc.cpp b/src/devices/sound/asc.cpp index 2216b38f328..2bb61779166 100644 --- a/src/devices/sound/asc.cpp +++ b/src/devices/sound/asc.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(ASC, asc_device, "asc", "ASC") // asc_device - constructor //------------------------------------------------- -asc_device::asc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +asc_device::asc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASC, tag, owner, clock) , device_sound_interface(mconfig, *this) , write_irq(*this) diff --git a/src/devices/sound/asc.h b/src/devices/sound/asc.h index 591c95d71af..b5bea7e4ca2 100644 --- a/src/devices/sound/asc.h +++ b/src/devices/sound/asc.h @@ -36,13 +36,13 @@ public: ARDBEG = 7 // Subset of ASC included in the Ardbeg ASIC (LC520) }; - asc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, asc_type type) + asc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, asc_type type) : asc_device(mconfig, tag, owner, clock) { set_type(type); } - asc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + asc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type imperfect_features() { return feature::SOUND; } diff --git a/src/devices/sound/astrocde.cpp b/src/devices/sound/astrocde.cpp index 91d0fdc46b9..27c8303c682 100644 --- a/src/devices/sound/astrocde.cpp +++ b/src/devices/sound/astrocde.cpp @@ -69,7 +69,7 @@ DEFINE_DEVICE_TYPE(ASTROCADE_IO, astrocade_io_device, "astrocade_io", "Astrocade // astrocade_io_device - constructor //------------------------------------------------- -astrocade_io_device::astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +astrocade_io_device::astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASTROCADE_IO, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/astrocde.h b/src/devices/sound/astrocde.h index 387ef7f9ca3..a57f0ddbf86 100644 --- a/src/devices/sound/astrocde.h +++ b/src/devices/sound/astrocde.h @@ -44,7 +44,7 @@ class astrocade_io_device : public device_t, public device_sound_interface { public: - astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration access auto si_cb() { return m_si_callback.bind(); } diff --git a/src/devices/sound/awacs.cpp b/src/devices/sound/awacs.cpp index 07ec04e4f14..0ca84b66323 100644 --- a/src/devices/sound/awacs.cpp +++ b/src/devices/sound/awacs.cpp @@ -27,7 +27,7 @@ const u8 awacs_device::divider[4] = { 16, 12, 8, 16 }; // awacs_device - constructor //------------------------------------------------- -awacs_device::awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +awacs_device::awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AWACS, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_irq_out_cb(*this) diff --git a/src/devices/sound/awacs.h b/src/devices/sound/awacs.h index a1c17f1aa10..656cc7a814e 100644 --- a/src/devices/sound/awacs.h +++ b/src/devices/sound/awacs.h @@ -23,7 +23,7 @@ class awacs_device : public device_t, public device_sound_interface { public: // construction/destruction - awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_out_cb() { return m_irq_out_cb.bind(); } auto irq_in_cb() { return m_irq_in_cb.bind(); } diff --git a/src/devices/sound/ay8910.cpp b/src/devices/sound/ay8910.cpp index 1f0acab67d7..98e2309adc4 100644 --- a/src/devices/sound/ay8910.cpp +++ b/src/devices/sound/ay8910.cpp @@ -1302,7 +1302,7 @@ void ay8910_device::ay8910_statesave() void ay8910_device::device_start() { - const int master_clock = clock(); + const XTAL master_clock = clock(); if (m_ioports < 1 && !(m_port_a_read_cb.isnull() && m_port_a_write_cb.isnull())) fatalerror("Device '%s' is a %s and has no port A!", tag(), name()); @@ -1378,7 +1378,7 @@ void ay8910_device::set_volume(int channel,int volume) set_output_gain(ch, volume / 100.0); } -void ay8910_device::ay_set_clock(int clock) +void ay8910_device::ay_set_clock(const XTAL &clock) { // FIXME: this doesn't belong here, it should be an input pin exposed via devcb if (((m_feature & PSG_PIN26_IS_CLKSEL) && (m_flags & YM2149_PIN26_LOW)) || (m_feature & PSG_HAS_INTERNAL_DIVIDER)) @@ -1588,12 +1588,12 @@ void ay8914_device::write(offs_t offset, u8 data) DEFINE_DEVICE_TYPE(AY8910, ay8910_device, "ay8910", "AY-3-8910A PSG") -ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, AY8910, tag, owner, clock, PSG_TYPE_AY, 3, 2) { } -ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, +ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, psg_type_t psg_type, int streams, int ioports, int feature) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), @@ -1658,7 +1658,7 @@ void ay8910_device::set_type(psg_type_t psg_type) DEFINE_DEVICE_TYPE(AY8912, ay8912_device, "ay8912", "AY-3-8912A PSG") -ay8912_device::ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ay8912_device::ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, AY8912, tag, owner, clock, PSG_TYPE_AY, 3, 1) { } @@ -1666,7 +1666,7 @@ ay8912_device::ay8912_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(AY8913, ay8913_device, "ay8913", "AY-3-8913 PSG") -ay8913_device::ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ay8913_device::ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, AY8913, tag, owner, clock, PSG_TYPE_AY, 3, 0) { } @@ -1674,7 +1674,7 @@ ay8913_device::ay8913_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(AY8914, ay8914_device, "ay8914", "AY-3-8914A PSG") -ay8914_device::ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ay8914_device::ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, AY8914, tag, owner, clock, PSG_TYPE_AY, 3, 2, PSG_EXTENDED_ENVELOPE) { } @@ -1682,7 +1682,7 @@ ay8914_device::ay8914_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(AY8930, ay8930_device, "ay8930", "AY8930 EPSG") -ay8930_device::ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ay8930_device::ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, AY8930, tag, owner, clock, PSG_TYPE_YM, 3, 2, PSG_PIN26_IS_CLKSEL | PSG_HAS_EXPANDED_MODE) { } @@ -1690,7 +1690,7 @@ ay8930_device::ay8930_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(YM2149, ym2149_device, "ym2149", "YM2149 SSG") -ym2149_device::ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ym2149_device::ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, YM2149, tag, owner, clock, PSG_TYPE_YM, 3, 2, PSG_PIN26_IS_CLKSEL) { } @@ -1698,7 +1698,7 @@ ym2149_device::ym2149_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(YM3439, ym3439_device, "ym3439", "YM3439 SSGC") -ym3439_device::ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ym3439_device::ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, YM3439, tag, owner, clock, PSG_TYPE_YM, 3, 2, PSG_PIN26_IS_CLKSEL) { } @@ -1706,7 +1706,7 @@ ym3439_device::ym3439_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(YMZ284, ymz284_device, "ymz284", "YMZ284 SSGL") -ymz284_device::ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ymz284_device::ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, YMZ284, tag, owner, clock, PSG_TYPE_YM, 1, 0) { } @@ -1714,7 +1714,7 @@ ymz284_device::ymz284_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(YMZ294, ymz294_device, "ymz294", "YMZ294 SSGLP") -ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, YMZ294, tag, owner, clock, PSG_TYPE_YM, 1, 0) { } @@ -1722,7 +1722,7 @@ ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(SUNSOFT_5B_SOUND, sunsoft_5b_sound_device, "sunsoft_5b_sound", "Sunsoft/Yamaha 5B 6630B (Sound)") -sunsoft_5b_sound_device::sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sunsoft_5b_sound_device::sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay8910_device(mconfig, SUNSOFT_5B_SOUND, tag, owner, clock, PSG_TYPE_YM, 1, 0, PSG_HAS_INTERNAL_DIVIDER) { } diff --git a/src/devices/sound/ay8910.h b/src/devices/sound/ay8910.h index e17c5e1f367..8e236896c42 100644 --- a/src/devices/sound/ay8910.h +++ b/src/devices/sound/ay8910.h @@ -72,7 +72,7 @@ public: }; // construction/destruction - ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers void set_flags(int flags) { m_flags = flags; } @@ -109,7 +109,7 @@ public: void write_bc1_bc2(offs_t offset, u8 data); void set_volume(int channel,int volume); - void ay_set_clock(int clock); + void ay_set_clock(const XTAL &clock); struct ay_ym_param { @@ -132,7 +132,7 @@ public: protected: ay8910_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, - u32 clock, psg_type_t psg_type, int streams, int ioports, int feature = PSG_DEFAULT); + const XTAL &clock, psg_type_t psg_type, int streams, int ioports, int feature = PSG_DEFAULT); // device-level overrides virtual void device_start() override; @@ -341,7 +341,7 @@ DECLARE_DEVICE_TYPE(AY8910, ay8910_device) class ay8912_device : public ay8910_device { public: - ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(AY8912, ay8912_device) @@ -349,7 +349,7 @@ DECLARE_DEVICE_TYPE(AY8912, ay8912_device) class ay8913_device : public ay8910_device { public: - ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(AY8913, ay8913_device) @@ -357,7 +357,7 @@ DECLARE_DEVICE_TYPE(AY8913, ay8913_device) class ay8914_device : public ay8910_device { public: - ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // AY8914 handlers needed due to different register map u8 read(offs_t offset); @@ -369,7 +369,7 @@ DECLARE_DEVICE_TYPE(AY8914, ay8914_device) class ay8930_device : public ay8910_device { public: - ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(AY8930, ay8930_device) @@ -377,7 +377,7 @@ DECLARE_DEVICE_TYPE(AY8930, ay8930_device) class ym2149_device : public ay8910_device { public: - ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(YM2149, ym2149_device) @@ -385,7 +385,7 @@ DECLARE_DEVICE_TYPE(YM2149, ym2149_device) class ym3439_device : public ay8910_device { public: - ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(YM3439, ym3439_device) @@ -393,7 +393,7 @@ DECLARE_DEVICE_TYPE(YM3439, ym3439_device) class ymz284_device : public ay8910_device { public: - ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(YMZ284, ymz284_device) @@ -401,7 +401,7 @@ DECLARE_DEVICE_TYPE(YMZ284, ymz284_device) class ymz294_device : public ay8910_device { public: - ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(YMZ294, ymz294_device) @@ -409,7 +409,7 @@ DECLARE_DEVICE_TYPE(YMZ294, ymz294_device) class sunsoft_5b_sound_device : public ay8910_device { public: - sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SUNSOFT_5B_SOUND, sunsoft_5b_sound_device) diff --git a/src/devices/sound/bbd.cpp b/src/devices/sound/bbd.cpp index e270108b04e..ef5433c49ef 100644 --- a/src/devices/sound/bbd.cpp +++ b/src/devices/sound/bbd.cpp @@ -13,7 +13,7 @@ //------------------------------------------------- template -bbd_device_base::bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : +bbd_device_base::bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), @@ -37,7 +37,7 @@ void bbd_device_base::device_start() if (m_cv_handler.isnull()) m_stream = stream_alloc(1, Outputs, sample_rate()); else - m_stream = stream_alloc(1, Outputs, SAMPLE_RATE_OUTPUT_ADAPTIVE, STREAM_DISABLE_INPUT_RESAMPLING); + m_stream = stream_alloc(1, Outputs, XTAL(), STREAM_DISABLE_INPUT_RESAMPLING, SAMPLE_RATE_OUTPUT_ADAPTIVE); save_item(NAME(m_buffer)); save_item(NAME(m_curpos)); @@ -120,7 +120,7 @@ void bbd_device_base::sound_stream_update(sound_stream &stream // device type definition DEFINE_DEVICE_TYPE(MN3004, mn3004_device, "mn3004", "MN3004 BBD") -mn3004_device::mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mn3004_device::mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbd_device_base(mconfig, tag, owner, clock, MN3004) { } @@ -133,7 +133,7 @@ mn3004_device::mn3004_device(const machine_config &mconfig, const char *tag, dev // device type definition DEFINE_DEVICE_TYPE(MN3005, mn3005_device, "mn3005", "MN3005 BBD") -mn3005_device::mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mn3005_device::mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbd_device_base(mconfig, tag, owner, clock, MN3005) { } @@ -146,7 +146,7 @@ mn3005_device::mn3005_device(const machine_config &mconfig, const char *tag, dev // device type definition DEFINE_DEVICE_TYPE(MN3006, mn3006_device, "mn3006", "MN3006 BBD") -mn3006_device::mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mn3006_device::mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbd_device_base(mconfig, tag, owner, clock, MN3006) { } @@ -159,7 +159,7 @@ mn3006_device::mn3006_device(const machine_config &mconfig, const char *tag, dev // device type definition DEFINE_DEVICE_TYPE(MN3204P, mn3204p_device, "mn3204p", "MN3204P BBD") -mn3204p_device::mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mn3204p_device::mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bbd_device_base(mconfig, tag, owner, clock, MN3204P) { } diff --git a/src/devices/sound/bbd.h b/src/devices/sound/bbd.h index f9c84b8d6a6..f2d35f397f4 100644 --- a/src/devices/sound/bbd.h +++ b/src/devices/sound/bbd.h @@ -25,7 +25,7 @@ protected: using cv_delegate = device_delegate; // internal constructor - bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type); + bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type); // device-level overrides virtual void device_start() override; @@ -37,7 +37,7 @@ protected: protected: // override to convert clock to sample rate stream_buffer::sample_t outputval(s32 index) const { return m_buffer[(m_curpos - index) % std::size(m_buffer)]; } - virtual u32 sample_rate() const { return clock(); } + virtual XTAL sample_rate() const { return clock(); } sound_stream * m_stream; u32 m_curpos; @@ -52,7 +52,7 @@ protected: class mn3004_device : public bbd_device_base<512, 2> { public: - mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(MN3004, mn3004_device) @@ -63,7 +63,7 @@ DECLARE_DEVICE_TYPE(MN3004, mn3004_device) class mn3005_device : public bbd_device_base<4096, 2> { public: - mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(MN3005, mn3005_device) @@ -74,7 +74,7 @@ DECLARE_DEVICE_TYPE(MN3005, mn3005_device) class mn3006_device : public bbd_device_base<128, 2> { public: - mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(MN3006, mn3006_device) @@ -85,7 +85,7 @@ DECLARE_DEVICE_TYPE(MN3006, mn3006_device) class mn3204p_device : public bbd_device_base<512, 2> { public: - mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(MN3204P, mn3204p_device) diff --git a/src/devices/sound/beep.cpp b/src/devices/sound/beep.cpp index 47f4701a662..1aac8ade153 100644 --- a/src/devices/sound/beep.cpp +++ b/src/devices/sound/beep.cpp @@ -20,7 +20,7 @@ // device type definition DEFINE_DEVICE_TYPE(BEEP, beep_device, "beep", "Beep") -beep_device::beep_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +beep_device::beep_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BEEP, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/beep.h b/src/devices/sound/beep.h index 52943d83465..45642b434cd 100644 --- a/src/devices/sound/beep.h +++ b/src/devices/sound/beep.h @@ -21,7 +21,7 @@ class beep_device : public device_t, public device_sound_interface { public: - beep_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + beep_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/sound/bsmt2000.cpp b/src/devices/sound/bsmt2000.cpp index 30b078b6da6..64f9e73d5ba 100644 --- a/src/devices/sound/bsmt2000.cpp +++ b/src/devices/sound/bsmt2000.cpp @@ -61,7 +61,7 @@ ROM_END // bsmt2000_device - constructor //------------------------------------------------- -bsmt2000_device::bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bsmt2000_device::bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BSMT2000, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/bsmt2000.h b/src/devices/sound/bsmt2000.h index 771ad8f3c64..e81b6f87ca7 100644 --- a/src/devices/sound/bsmt2000.h +++ b/src/devices/sound/bsmt2000.h @@ -32,7 +32,7 @@ public: typedef device_delegate ready_callback; // construction/destruction - bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers template void set_ready_callback(T &&... args) { m_ready_callback.set(std::forward(args)...); } diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp index d723e124e35..e785a2f2a17 100644 --- a/src/devices/sound/c140.cpp +++ b/src/devices/sound/c140.cpp @@ -81,12 +81,12 @@ DEFINE_DEVICE_TYPE(C219, c219_device, "c219", "Namco C219") // c140_device - constructor //------------------------------------------------- -c140_device::c140_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c140_device::c140_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c140_device(mconfig, C140, tag, owner, clock) { } -c140_device::c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +c140_device::c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) @@ -101,7 +101,7 @@ c140_device::c140_device(const machine_config &mconfig, device_type type, const std::fill(std::begin(m_pcmtbl), std::end(m_pcmtbl), 0); } -c219_device::c219_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c219_device::c219_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c140_device(mconfig, C219, tag, owner, clock) { // TODO: unknown address bus bits diff --git a/src/devices/sound/c140.h b/src/devices/sound/c140.h index 918f5dae31a..7f8a0a00040 100644 --- a/src/devices/sound/c140.h +++ b/src/devices/sound/c140.h @@ -22,7 +22,7 @@ class c140_device : public device_t, public device_rom_interface<25, 1, 0, ENDIANNESS_BIG> { public: - c140_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c140_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto int1_callback() { return m_int1_callback.bind(); } @@ -35,7 +35,7 @@ public: void c140_le_w(offs_t offset, u8 data) { c140_w(offset ^ 1, data);} protected: - c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -104,7 +104,7 @@ protected: class c219_device : public c140_device { public: - c219_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c219_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 c219_r(offs_t offset); void c219_w(offs_t offset, u8 data); diff --git a/src/devices/sound/c352.cpp b/src/devices/sound/c352.cpp index dcbd58f3eb3..52925f0fe05 100644 --- a/src/devices/sound/c352.cpp +++ b/src/devices/sound/c352.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(C352, c352_device, "c352", "Namco C352") // c352_device - constructor //------------------------------------------------- -c352_device::c352_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c352_device::c352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C352, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/c352.h b/src/devices/sound/c352.h index cf333ba356e..f0e9b896a97 100644 --- a/src/devices/sound/c352.h +++ b/src/devices/sound/c352.h @@ -19,13 +19,13 @@ class c352_device : public device_t, { public: // construction/destruction - c352_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, int divider) + c352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int divider) : c352_device(mconfig, tag, owner, clock) { set_divider(divider); } - c352_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_divider(int divider) { m_divider = divider; } diff --git a/src/devices/sound/c6280.cpp b/src/devices/sound/c6280.cpp index 644269e01f7..cfeb4292583 100644 --- a/src/devices/sound/c6280.cpp +++ b/src/devices/sound/c6280.cpp @@ -292,7 +292,7 @@ void c6280_device::c6280_w(offs_t offset, uint8_t data) DEFINE_DEVICE_TYPE(C6280, c6280_device, "c6280", "Hudson Soft HuC6280 PSG") -c6280_device::c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +c6280_device::c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C6280, tag, owner, clock) , device_sound_interface(mconfig, *this) { diff --git a/src/devices/sound/c6280.h b/src/devices/sound/c6280.h index 60ea993f71b..08df35de323 100644 --- a/src/devices/sound/c6280.h +++ b/src/devices/sound/c6280.h @@ -10,7 +10,7 @@ class c6280_device : public device_t, public device_sound_interface public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // Incorrect / Not verified noise / LFO output - c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // write only void c6280_w(offs_t offset, uint8_t data); diff --git a/src/devices/sound/cdda.cpp b/src/devices/sound/cdda.cpp index 38a4c4736cc..e2f58b00fd5 100644 --- a/src/devices/sound/cdda.cpp +++ b/src/devices/sound/cdda.cpp @@ -233,7 +233,7 @@ int16_t cdda_device::get_channel_volume(int channel) DEFINE_DEVICE_TYPE(CDDA, cdda_device, "cdda", "CD/DA") -cdda_device::cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdda_device::cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDDA, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_disc(nullptr) diff --git a/src/devices/sound/cdda.h b/src/devices/sound/cdda.h index b0c7b7f81e8..b6f36c9b3c1 100644 --- a/src/devices/sound/cdda.h +++ b/src/devices/sound/cdda.h @@ -11,7 +11,7 @@ class cdda_device : public device_t, public device_sound_interface { public: - cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 44'100); + cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(44'100)); void set_cdrom(void *file); diff --git a/src/devices/sound/cdp1863.cpp b/src/devices/sound/cdp1863.cpp index da9194b9a7e..b63d3397fe6 100644 --- a/src/devices/sound/cdp1863.cpp +++ b/src/devices/sound/cdp1863.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(CDP1863, cdp1863_device, "cdp1863", "RCA CDP1863") // cdp1863_device - constructor //------------------------------------------------- -cdp1863_device::cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdp1863_device::cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1863, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/cdp1863.h b/src/devices/sound/cdp1863.h index ec0706e9a7c..8090705a5e4 100644 --- a/src/devices/sound/cdp1863.h +++ b/src/devices/sound/cdp1863.h @@ -36,7 +36,7 @@ class cdp1863_device : public device_t, { public: // construction/destruction - cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void set_clock2(int clock2) { m_clock2 = clock2; } diff --git a/src/devices/sound/cdp1864.cpp b/src/devices/sound/cdp1864.cpp index a3e8f5c037f..642925b4311 100644 --- a/src/devices/sound/cdp1864.cpp +++ b/src/devices/sound/cdp1864.cpp @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(CDP1864, cdp1864_device, "cdp1864", "RCA CDP1864") // cdp1864_device - constructor //------------------------------------------------- -cdp1864_device::cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdp1864_device::cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1864, tag, owner, clock), device_sound_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/sound/cdp1864.h b/src/devices/sound/cdp1864.h index 8dc1eb04e8e..9da7d1a1604 100644 --- a/src/devices/sound/cdp1864.h +++ b/src/devices/sound/cdp1864.h @@ -80,7 +80,7 @@ public: static constexpr unsigned SCANLINE_EFX_BOTTOM_END = SCANLINE_DISPLAY_END; // construction/destruction - cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto inlace_cb() { return m_read_inlace.bind(); } auto int_cb() { return m_write_int.bind(); } diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp index 70e4718f212..179e7d99a03 100644 --- a/src/devices/sound/cdp1869.cpp +++ b/src/devices/sound/cdp1869.cpp @@ -350,7 +350,7 @@ int cdp1869_device::get_pen(int ccb0, int ccb1, int pcb) // cdp1869_device - constructor //------------------------------------------------- -cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1869, tag, owner, clock), device_sound_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/sound/cdp1869.h b/src/devices/sound/cdp1869.h index 6ce373a6931..94a8856a5e8 100644 --- a/src/devices/sound/cdp1869.h +++ b/src/devices/sound/cdp1869.h @@ -147,12 +147,12 @@ public: // construction/destruction template - cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&addrmap) + cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&addrmap) : cdp1869_device(mconfig, tag, owner, clock) { set_addrmap(0, std::forward(addrmap)); } - cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto pal_ntsc_callback() { return m_read_pal_ntsc.bind(); } auto prd_callback() { return m_write_prd.bind(); } diff --git a/src/devices/sound/cem3394.cpp b/src/devices/sound/cem3394.cpp index 0a4ba228827..fc27e3b902a 100644 --- a/src/devices/sound/cem3394.cpp +++ b/src/devices/sound/cem3394.cpp @@ -129,7 +129,7 @@ DEFINE_DEVICE_TYPE(CEM3394, cem3394_device, "cem3394", "CEM3394 Synthesizer Voic // cem3394_device - constructor //------------------------------------------------- -cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CEM3394, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/cem3394.h b/src/devices/sound/cem3394.h index a3e5e3a85ea..2a2262f6de4 100644 --- a/src/devices/sound/cem3394.h +++ b/src/devices/sound/cem3394.h @@ -22,7 +22,7 @@ public: FINAL_GAIN }; - cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_vco_zero_freq(double freq) { m_vco_zero_freq = freq; } void set_filter_zero_freq(double freq) { m_filter_zero_freq = freq; } diff --git a/src/devices/sound/dac.cpp b/src/devices/sound/dac.cpp index 7305f2c12a7..ee35c6d60a9 100644 --- a/src/devices/sound/dac.cpp +++ b/src/devices/sound/dac.cpp @@ -65,7 +65,7 @@ stream_buffer::sample_t dac_mapper_ones_complement(u32 input, u8 bits) // dac_device_base - constructor //------------------------------------------------- -dac_device_base::dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : +dac_device_base::dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/dac.h b/src/devices/sound/dac.h index e0b4fb01cf9..246c78044b4 100644 --- a/src/devices/sound/dac.h +++ b/src/devices/sound/dac.h @@ -82,7 +82,7 @@ class dac_device_base : public device_t, public device_sound_interface { protected: // constructor - dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain); + dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain); // device startup virtual void device_start() override; @@ -128,7 +128,7 @@ private: class dac_bit_device_base : public dac_device_base, public dac_bit_interface { protected: - dac_bit_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : + dac_bit_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : dac_device_base(mconfig, type, tag, owner, clock, bits, mapper, gain) { } @@ -144,7 +144,7 @@ public: class dac_byte_device_base : public dac_device_base, public dac_byte_interface { protected: - dac_byte_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : + dac_byte_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : dac_device_base(mconfig, type, tag, owner, clock, bits, mapper, gain) { } @@ -160,7 +160,7 @@ public: class dac_word_device_base : public dac_device_base, public dac_word_interface { protected: - dac_word_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : + dac_word_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) : dac_device_base(mconfig, type, tag, owner, clock, bits, mapper, gain) { } @@ -186,7 +186,7 @@ DECLARE_DEVICE_TYPE(_dac_type, _dac_class) \ class _dac_class : public _dac_base_class \ {\ public: \ - _dac_class(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) : \ + _dac_class(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : \ _dac_base_class(mconfig, _dac_type, tag, owner, clock, _dac_bits, _dac_mapper, _dac_gain) {} \ }; \ DAC_GENERATOR_EPILOG(_dac_type, _dac_class, _dac_description, _dac_shortname) diff --git a/src/devices/sound/dac76.cpp b/src/devices/sound/dac76.cpp index 1c73d7b02c1..16baaff2e46 100644 --- a/src/devices/sound/dac76.cpp +++ b/src/devices/sound/dac76.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(DAC76, dac76_device, "dac76", "PMI DAC-76 COMDAC") // dac76_device - constructor //------------------------------------------------- -dac76_device::dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dac76_device::dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DAC76, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/dac76.h b/src/devices/sound/dac76.h index 7f3cd1a52fd..5c2e7adc5a3 100644 --- a/src/devices/sound/dac76.h +++ b/src/devices/sound/dac76.h @@ -34,7 +34,7 @@ class dac76_device : public device_t, public device_sound_interface { public: // construction/destruction - dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // chord DECLARE_WRITE_LINE_MEMBER(b1_w) { m_chord &= ~(1 << 2); m_chord |= (state << 2); } diff --git a/src/devices/sound/dave.cpp b/src/devices/sound/dave.cpp index 44719ab4584..fa8916ef8aa 100644 --- a/src/devices/sound/dave.cpp +++ b/src/devices/sound/dave.cpp @@ -57,7 +57,7 @@ void dave_device::io_map(address_map &map) // dave_device - constructor //------------------------------------------------- -dave_device::dave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dave_device::dave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DAVE, tag, owner, clock), device_memory_interface(mconfig, *this), device_sound_interface(mconfig, *this), diff --git a/src/devices/sound/dave.h b/src/devices/sound/dave.h index 82c024f748e..8a9340ec7e1 100644 --- a/src/devices/sound/dave.h +++ b/src/devices/sound/dave.h @@ -23,7 +23,7 @@ class dave_device : public device_t, public device_sound_interface { public: - dave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_wr() { return m_write_irq.bind(); } auto lh_wr() { return m_write_lh.bind(); } diff --git a/src/devices/sound/digitalk.cpp b/src/devices/sound/digitalk.cpp index 2bff98478e5..94e8eefc455 100644 --- a/src/devices/sound/digitalk.cpp +++ b/src/devices/sound/digitalk.cpp @@ -263,7 +263,7 @@ static constexpr int pitch_vals[32] = { DEFINE_DEVICE_TYPE(DIGITALKER, digitalker_device, "digitalker", "MM54104 Digitalker") -digitalker_device::digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +digitalker_device::digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DIGITALKER, tag, owner, clock), device_sound_interface(mconfig, *this), m_rom(*this, DEVICE_SELF), diff --git a/src/devices/sound/digitalk.h b/src/devices/sound/digitalk.h index 18cc32fd3bd..ece8a38a201 100644 --- a/src/devices/sound/digitalk.h +++ b/src/devices/sound/digitalk.h @@ -15,7 +15,7 @@ class digitalker_device : public device_t, public device_sound_interface { public: - digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void digitalker_0_cs_w(int line); void digitalker_0_cms_w(int line); diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp index 8568c647657..1b5fa493e3d 100644 --- a/src/devices/sound/discrete.cpp +++ b/src/devices/sound/discrete.cpp @@ -810,7 +810,7 @@ int discrete_device::same_module_index(const discrete_base_node &node) // discrete_device - constructor //------------------------------------------------- -discrete_device::discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +discrete_device::discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_intf(nullptr), m_sample_rate(0), @@ -825,7 +825,7 @@ discrete_device::discrete_device(const machine_config &mconfig, device_type type { } -discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : discrete_device(mconfig, DISCRETE, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr) diff --git a/src/devices/sound/discrete.h b/src/devices/sound/discrete.h index eebc4936df7..6b55107fe74 100644 --- a/src/devices/sound/discrete.h +++ b/src/devices/sound/discrete.h @@ -4180,7 +4180,7 @@ class discrete_device : public device_t { protected: // construction/destruction - discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); public: typedef std::vector > task_list_t; @@ -4280,17 +4280,17 @@ class discrete_sound_device : public discrete_device, { public: // construction/destruction - discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const discrete_block *intf) + discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const discrete_block *intf) : discrete_sound_device(mconfig, tag, owner, clock) { set_intf(intf); } discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const discrete_block *intf) - : discrete_sound_device(mconfig, tag, owner, uint32_t(0)) + : discrete_sound_device(mconfig, tag, owner) { set_intf(intf); } - discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~discrete_sound_device() { } /* --------------------------------- */ diff --git a/src/devices/sound/dmadac.cpp b/src/devices/sound/dmadac.cpp index ae2ebce61ad..40ed75cd132 100644 --- a/src/devices/sound/dmadac.cpp +++ b/src/devices/sound/dmadac.cpp @@ -163,7 +163,7 @@ void dmadac_sound_device::set_volume(uint16_t volume) DEFINE_DEVICE_TYPE(DMADAC, dmadac_sound_device, "dmadac", "DMA-driven DAC") -dmadac_sound_device::dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmadac_sound_device::dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMADAC, tag, owner, clock), device_sound_interface(mconfig, *this), m_buffer(BUFFER_SIZE), diff --git a/src/devices/sound/dmadac.h b/src/devices/sound/dmadac.h index 6cbe8312231..a7904e5f50b 100644 --- a/src/devices/sound/dmadac.h +++ b/src/devices/sound/dmadac.h @@ -16,7 +16,7 @@ class dmadac_sound_device : public device_t, public device_sound_interface { public: - dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void initialize_state(); void flush(); diff --git a/src/devices/sound/dspv.cpp b/src/devices/sound/dspv.cpp index cf14ead15d3..86f88bb56f3 100644 --- a/src/devices/sound/dspv.cpp +++ b/src/devices/sound/dspv.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(DSPV, dspv_device, "dspv", "Yamaha DSPV audio simulation DSP (YSS217-F/") -dspv_device::dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dspv_device::dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, DSPV, tag, owner, clock), device_sound_interface(mconfig, *this), m_program_config("program", ENDIANNESS_BIG, 16, 16, -1, address_map_constructor(FUNC(dspv_device::prg_map), this)), diff --git a/src/devices/sound/dspv.h b/src/devices/sound/dspv.h index fb68acda569..a1d16c9222f 100644 --- a/src/devices/sound/dspv.h +++ b/src/devices/sound/dspv.h @@ -13,7 +13,7 @@ class dspv_device : public cpu_device, public device_sound_interface { public: - dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 22579200); + dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 22579200); void map(address_map &map); diff --git a/src/devices/sound/es1373.cpp b/src/devices/sound/es1373.cpp index d254527b0bc..ccdf4903fc9 100644 --- a/src/devices/sound/es1373.cpp +++ b/src/devices/sound/es1373.cpp @@ -84,7 +84,7 @@ void es1373_device::map(address_map &map) map(0x00, 0x3f).rw(FUNC(es1373_device::reg_r), FUNC(es1373_device::reg_w)); } -es1373_device::es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +es1373_device::es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, ES1373, tag, owner, clock) , device_sound_interface(mconfig, *this), m_stream(nullptr) , m_eslog(nullptr), m_tempCount(0), m_timer(nullptr), m_memory_space(nullptr), m_irq_handler(*this) diff --git a/src/devices/sound/es1373.h b/src/devices/sound/es1373.h index 6d493391ae4..13b8159247f 100644 --- a/src/devices/sound/es1373.h +++ b/src/devices/sound/es1373.h @@ -11,7 +11,7 @@ class es1373_device : public pci_device, public device_sound_interface { public: - es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; diff --git a/src/devices/sound/es5503.cpp b/src/devices/sound/es5503.cpp index f460050df66..3d3fa530a0e 100644 --- a/src/devices/sound/es5503.cpp +++ b/src/devices/sound/es5503.cpp @@ -57,7 +57,7 @@ static constexpr int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 }; // es5503_device - constructor //------------------------------------------------- -es5503_device::es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +es5503_device::es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ES5503, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/es5503.h b/src/devices/sound/es5503.h index 4499d58d1f3..fc8063ddd3d 100644 --- a/src/devices/sound/es5503.h +++ b/src/devices/sound/es5503.h @@ -15,7 +15,7 @@ class es5503_device : public device_t, { public: // construction/destruction - es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // channels must be a power of two void set_channels(int channels) { output_channels = channels; } diff --git a/src/devices/sound/es5506.cpp b/src/devices/sound/es5506.cpp index 3ea90a97261..c4197f1c9ff 100644 --- a/src/devices/sound/es5506.cpp +++ b/src/devices/sound/es5506.cpp @@ -146,7 +146,7 @@ enum : u16 { } -es550x_device::es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +es550x_device::es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) @@ -178,7 +178,7 @@ es550x_device::es550x_device(const machine_config &mconfig, device_type type, co DEFINE_DEVICE_TYPE(ES5506, es5506_device, "es5506", "Ensoniq ES5506") -es5506_device::es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +es5506_device::es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : es550x_device(mconfig, ES5506, tag, owner, clock) , m_bank0_config("bank0", ENDIANNESS_BIG, 16, 21, -1) // 21 bit address bus, word addressing only , m_bank1_config("bank1", ENDIANNESS_BIG, 16, 21, -1) @@ -348,7 +348,7 @@ device_memory_interface::space_config_vector es5506_device::memory_space_config( DEFINE_DEVICE_TYPE(ES5505, es5505_device, "es5505", "Ensoniq ES5505") -es5505_device::es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +es5505_device::es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : es550x_device(mconfig, ES5505, tag, owner, clock) , m_bank0_config("bank0", ENDIANNESS_BIG, 16, 20, -1) // 20 bit address bus, word addressing only , m_bank1_config("bank1", ENDIANNESS_BIG, 16, 20, -1) diff --git a/src/devices/sound/es5506.h b/src/devices/sound/es5506.h index 73f5c0a3c8f..3305afc5abe 100644 --- a/src/devices/sound/es5506.h +++ b/src/devices/sound/es5506.h @@ -75,7 +75,7 @@ protected: u8 filtcount = 0; // filter count }; - es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -159,7 +159,7 @@ protected: class es5506_device : public es550x_device { public: - es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~es5506_device() {} u8 read(offs_t offset); @@ -217,7 +217,7 @@ DECLARE_DEVICE_TYPE(ES5506, es5506_device) class es5505_device : public es550x_device { public: - es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 read(offs_t offset); void write(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/devices/sound/es8712.cpp b/src/devices/sound/es8712.cpp index 5cddf18cc7e..a9ef9e922b1 100644 --- a/src/devices/sound/es8712.cpp +++ b/src/devices/sound/es8712.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(ES8712, es8712_device, "es8712", "Excellent Systems ES8712 So // es8712_device - constructor //------------------------------------------------- -es8712_device::es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +es8712_device::es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ES8712, tag, owner, clock) , device_rom_interface(mconfig, *this) , m_adpcm_select(*this, "adpcm_select") @@ -59,7 +59,7 @@ es8712_device::es8712_device(const machine_config &mconfig, const char *tag, dev void es8712_device::device_add_mconfig(machine_config &config) { - HCT157(config, m_adpcm_select, 0); // TODO : gcpinbal case, differs per games? + HCT157(config, m_adpcm_select); // TODO : gcpinbal case, differs per games? m_adpcm_select->out_callback().set(FUNC(es8712_device::msm_w)); } diff --git a/src/devices/sound/es8712.h b/src/devices/sound/es8712.h index 27fc5bab853..b5fb2193431 100644 --- a/src/devices/sound/es8712.h +++ b/src/devices/sound/es8712.h @@ -21,7 +21,7 @@ class es8712_device : public device_t, public device_rom_interface<20> // TODO : 20 address bits? { public: - es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_msm_tag(T &&tag) { m_msm.set_tag(std::forward(tag)); } diff --git a/src/devices/sound/esqpump.cpp b/src/devices/sound/esqpump.cpp index 38b95a15bed..21486d82b7f 100644 --- a/src/devices/sound/esqpump.cpp +++ b/src/devices/sound/esqpump.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(ESQ_5505_5510_PUMP, esq_5505_5510_pump_device, "esq_5505_5510_pump", "Ensoniq 5505/5506 to 5510 interface") -esq_5505_5510_pump_device::esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +esq_5505_5510_pump_device::esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ESQ_5505_5510_PUMP, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/esqpump.h b/src/devices/sound/esqpump.h index 897475cd8b4..51f7e378c9e 100644 --- a/src/devices/sound/esqpump.h +++ b/src/devices/sound/esqpump.h @@ -18,7 +18,7 @@ class esq_5505_5510_pump_device : public device_t, public device_sound_interface public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_esp(T &&tag) { m_esp.set_tag(std::forward(tag)); } void set_esp_halted(bool esp_halted) { diff --git a/src/devices/sound/flt_biquad.cpp b/src/devices/sound/flt_biquad.cpp index 6ae1bde0109..cc7ff2e002d 100644 --- a/src/devices/sound/flt_biquad.cpp +++ b/src/devices/sound/flt_biquad.cpp @@ -46,7 +46,7 @@ ALLOW_SAVE_TYPE(filter_biquad_device::biquad_type); //------------------------------------------------- // initialize with some sane defaults for a highpass filter with a cutoff at 16hz, same as flt_rc's 'ac' mode. -filter_biquad_device::filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +filter_biquad_device::filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FILTER_BIQUAD, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/flt_biquad.h b/src/devices/sound/flt_biquad.h index e565aa6da8a..20e5ffd8364 100644 --- a/src/devices/sound/flt_biquad.h +++ b/src/devices/sound/flt_biquad.h @@ -36,7 +36,7 @@ public: double gain; }; - filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // set up the filter with the specified filter parameters and return a pointer to the new device filter_biquad_device& setup(biquad_type type, double fc, double q, double gain); diff --git a/src/devices/sound/flt_rc.cpp b/src/devices/sound/flt_rc.cpp index 489cb01fb07..8dfd97ba43f 100644 --- a/src/devices/sound/flt_rc.cpp +++ b/src/devices/sound/flt_rc.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(FILTER_RC, filter_rc_device, "filter_rc", "RC Filter") // filter_rc_device - constructor //------------------------------------------------- -filter_rc_device::filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +filter_rc_device::filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FILTER_RC, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/flt_rc.h b/src/devices/sound/flt_rc.h index def09f1eb11..30df14ee8aa 100644 --- a/src/devices/sound/flt_rc.h +++ b/src/devices/sound/flt_rc.h @@ -44,7 +44,7 @@ * (10KOhm R, 1uF C) * This filter may be setup just with * - * FILTER_RC(config, "tag", 0).set_ac(); + * FILTER_RC(config, "tag").set_ac(); * * Default behaviour: * @@ -69,7 +69,7 @@ public: AC = 4 }; - filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration filter_rc_device &set_rc(int type, double R1, double R2, double R3, double C) diff --git a/src/devices/sound/flt_vol.cpp b/src/devices/sound/flt_vol.cpp index 6e63fa1ae1b..fc57255a417 100644 --- a/src/devices/sound/flt_vol.cpp +++ b/src/devices/sound/flt_vol.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(FILTER_VOLUME, filter_volume_device, "filter_volume", "Volume // filter_volume_device - constructor //------------------------------------------------- -filter_volume_device::filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +filter_volume_device::filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FILTER_VOLUME, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/flt_vol.h b/src/devices/sound/flt_vol.h index 022a980a6a5..021271809bd 100644 --- a/src/devices/sound/flt_vol.h +++ b/src/devices/sound/flt_vol.h @@ -15,7 +15,7 @@ class filter_volume_device : public device_t, public device_sound_interface { public: - filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void flt_volume_set_volume(float volume); diff --git a/src/devices/sound/gaelco.cpp b/src/devices/sound/gaelco.cpp index 39a14d6487f..19439718587 100644 --- a/src/devices/sound/gaelco.cpp +++ b/src/devices/sound/gaelco.cpp @@ -57,12 +57,12 @@ static util::wav_file_ptr wavraw; // Raw waveform DEFINE_DEVICE_TYPE(GAELCO_GAE1, gaelco_gae1_device, "gaelco_gae1", "Gaelco GAE1") -gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gaelco_gae1_device(mconfig, GAELCO_GAE1, tag, owner, clock) { } -gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) @@ -339,7 +339,7 @@ void gaelco_gae1_device::rom_bank_pre_change() DEFINE_DEVICE_TYPE(GAELCO_CG1V, gaelco_cg1v_device, "gaelco_cg1v", "Gaelco CG1V") -gaelco_cg1v_device::gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gaelco_cg1v_device::gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gaelco_gae1_device(mconfig, GAELCO_CG1V, tag, owner, clock) { } diff --git a/src/devices/sound/gaelco.h b/src/devices/sound/gaelco.h index 3bfac39f988..6c663cc92f0 100644 --- a/src/devices/sound/gaelco.h +++ b/src/devices/sound/gaelco.h @@ -19,7 +19,7 @@ class gaelco_gae1_device : public device_t, public device_rom_interface<27> // Unknown address bits { public: - gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_bank_offsets(int offs1, int offs2, int offs3, int offs4) { @@ -33,7 +33,7 @@ public: uint16_t gaelcosnd_r(offs_t offset); protected: - gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -81,7 +81,7 @@ DECLARE_DEVICE_TYPE(GAELCO_GAE1, gaelco_gae1_device) class gaelco_cg1v_device : public gaelco_gae1_device { public: - gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(GAELCO_CG1V, gaelco_cg1v_device) diff --git a/src/devices/sound/gb.cpp b/src/devices/sound/gb.cpp index 643ecf9ec68..de319513f7f 100644 --- a/src/devices/sound/gb.cpp +++ b/src/devices/sound/gb.cpp @@ -84,20 +84,20 @@ DEFINE_DEVICE_TYPE(CGB04_APU, cgb04_apu_device, "cgb04_apu", "CGB04 APU") // gameboy_sound_device - constructor //------------------------------------------------- -gameboy_sound_device::gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gameboy_sound_device::gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) { } -dmg_apu_device::dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmg_apu_device::dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gameboy_sound_device(mconfig, DMG_APU, tag, owner, clock) { } -cgb04_apu_device::cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cgb04_apu_device::cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gameboy_sound_device(mconfig, CGB04_APU, tag, owner, clock) { } diff --git a/src/devices/sound/gb.h b/src/devices/sound/gb.h index 162672f0287..bdcac58a1eb 100644 --- a/src/devices/sound/gb.h +++ b/src/devices/sound/gb.h @@ -9,7 +9,7 @@ class gameboy_sound_device : public device_t, public device_sound_interface { public: - gameboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gameboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 sound_r(offs_t offset); virtual u8 wave_r(offs_t offset) = 0; @@ -17,7 +17,7 @@ public: virtual void wave_w(offs_t offset, u8 data) = 0; protected: - gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -164,7 +164,7 @@ protected: class dmg_apu_device : public gameboy_sound_device { public: - dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 wave_r(offs_t offset) override; virtual void wave_w(offs_t offset, u8 data) override; @@ -180,7 +180,7 @@ protected: class cgb04_apu_device : public gameboy_sound_device { public: - cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 wave_r(offs_t offset) override; virtual void wave_w(offs_t offset, u8 data) override; diff --git a/src/devices/sound/hc55516.cpp b/src/devices/sound/hc55516.cpp index ab4497a4a93..a1dc4568cc0 100644 --- a/src/devices/sound/hc55516.cpp +++ b/src/devices/sound/hc55516.cpp @@ -36,7 +36,7 @@ //##################################### // COMMON //##################################### -cvsd_device_base::cvsd_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool active_clock_edge, uint8_t shiftreg_mask) +cvsd_device_base::cvsd_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool active_clock_edge, uint8_t shiftreg_mask) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_clock_state_push_cb(*this) @@ -215,13 +215,13 @@ void cvsd_device_base::sound_stream_update(sound_stream &stream, std::vector auto adpcm_update_cb() { return m_adpcm_update_cb[N].bind(); } auto vca_callback() { return m_vca_cb.bind(); } diff --git a/src/devices/sound/i5000.cpp b/src/devices/sound/i5000.cpp index 3f194ef74c5..e4a006771eb 100644 --- a/src/devices/sound/i5000.cpp +++ b/src/devices/sound/i5000.cpp @@ -23,7 +23,7 @@ // device type definition DEFINE_DEVICE_TYPE(I5000_SND, i5000snd_device, "i5000snd", "Imagetek I5000 Sound") -i5000snd_device::i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i5000snd_device::i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I5000_SND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr), m_rom_base(nullptr), m_rom_mask(0) diff --git a/src/devices/sound/i5000.h b/src/devices/sound/i5000.h index abd84f5ac43..7b07decd966 100644 --- a/src/devices/sound/i5000.h +++ b/src/devices/sound/i5000.h @@ -23,7 +23,7 @@ class i5000snd_device : public device_t, { public: // construction/destruction - i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/sound/ics2115.cpp b/src/devices/sound/ics2115.cpp index 56c0cf607c4..87f2ccebdb9 100644 --- a/src/devices/sound/ics2115.cpp +++ b/src/devices/sound/ics2115.cpp @@ -30,7 +30,7 @@ // device type definition DEFINE_DEVICE_TYPE(ICS2115, ics2115_device, "ics2115", "ICS2115 WaveFront Synthesizer") -ics2115_device::ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ics2115_device::ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ICS2115, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/sound/ics2115.h b/src/devices/sound/ics2115.h index 269069ff387..7f0151b19ef 100644 --- a/src/devices/sound/ics2115.h +++ b/src/devices/sound/ics2115.h @@ -19,7 +19,7 @@ public: // current ramping behavior is seems like incorrect? // construction/destruction - ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_irq_cb.bind(); } diff --git a/src/devices/sound/iopspu.cpp b/src/devices/sound/iopspu.cpp index 55e6cd3b789..2ba17bfae83 100644 --- a/src/devices/sound/iopspu.cpp +++ b/src/devices/sound/iopspu.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_SPU, iop_spu_device, "iopspu", "PlayStation 2 IOP SPU") -iop_spu_device::iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_spu_device::iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_SPU, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_iop(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/sound/iopspu.h b/src/devices/sound/iopspu.h index bea55615c04..672cbc2e534 100644 --- a/src/devices/sound/iopspu.h +++ b/src/devices/sound/iopspu.h @@ -21,14 +21,14 @@ class iop_spu_device : public device_t, public device_sound_interface { public: template - iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&iop_tag, U &&intc_tag) + iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&iop_tag, U &&intc_tag) : iop_spu_device(mconfig, tag, owner, clock) { m_iop.set_tag(std::forward(iop_tag)); m_intc.set_tag(std::forward(intc_tag)); } - iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~iop_spu_device() override; uint16_t read(offs_t offset, uint16_t mem_mask = ~0); diff --git a/src/devices/sound/iremga20.cpp b/src/devices/sound/iremga20.cpp index b87c9f26da0..f902ca16be9 100644 --- a/src/devices/sound/iremga20.cpp +++ b/src/devices/sound/iremga20.cpp @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(IREMGA20, iremga20_device, "iremga20", "Irem GA20") // iremga20_device - constructor //------------------------------------------------- -iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IREMGA20, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/iremga20.h b/src/devices/sound/iremga20.h index 99440bc5782..25650667038 100644 --- a/src/devices/sound/iremga20.h +++ b/src/devices/sound/iremga20.h @@ -24,7 +24,7 @@ class iremga20_device : public device_t, public device_rom_interface<20> { public: - iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); uint8_t read(offs_t offset); diff --git a/src/devices/sound/k005289.cpp b/src/devices/sound/k005289.cpp index ffdfb4f0588..d3a32141c6a 100644 --- a/src/devices/sound/k005289.cpp +++ b/src/devices/sound/k005289.cpp @@ -53,7 +53,7 @@ DEFINE_DEVICE_TYPE(K005289, k005289_device, "k005289", "K005289 SCC") // k005289_device - constructor //------------------------------------------------- -k005289_device::k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k005289_device::k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K005289, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_sound_prom(*this, DEVICE_SELF) diff --git a/src/devices/sound/k005289.h b/src/devices/sound/k005289.h index cacf1d98f52..76d6f186610 100644 --- a/src/devices/sound/k005289.h +++ b/src/devices/sound/k005289.h @@ -12,7 +12,7 @@ class k005289_device : public device_t, public device_sound_interface { public: - k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void control_A_w(u8 data); void control_B_w(u8 data); diff --git a/src/devices/sound/k007232.cpp b/src/devices/sound/k007232.cpp index 9b4bc9e4b16..0754d55f062 100644 --- a/src/devices/sound/k007232.cpp +++ b/src/devices/sound/k007232.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(K007232, k007232_device, "k007232", "K007232 PCM Controller") -k007232_device::k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k007232_device::k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K007232, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/sound/k007232.h b/src/devices/sound/k007232.h index f467670fc9b..a1319ef78e2 100644 --- a/src/devices/sound/k007232.h +++ b/src/devices/sound/k007232.h @@ -12,7 +12,7 @@ class k007232_device : public device_t, public device_sound_interface, public device_memory_interface { public: - k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto port_write() { return m_port_write_handler.bind(); } diff --git a/src/devices/sound/k051649.cpp b/src/devices/sound/k051649.cpp index 5ddffc5f36f..b27f123a0de 100644 --- a/src/devices/sound/k051649.cpp +++ b/src/devices/sound/k051649.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(K051649, k051649_device, "k051649", "K051649 SCC1") // k051649_device - constructor //------------------------------------------------- -k051649_device::k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k051649_device::k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K051649, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/k051649.h b/src/devices/sound/k051649.h index d9174e00dc9..4b90ceb7f2f 100644 --- a/src/devices/sound/k051649.h +++ b/src/devices/sound/k051649.h @@ -16,7 +16,7 @@ class k051649_device : public device_t, public device_sound_interface { public: - k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void k051649_waveform_w(offs_t offset, u8 data); u8 k051649_waveform_r(offs_t offset); diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp index 7cd0e6b3baa..12f751146e5 100644 --- a/src/devices/sound/k053260.cpp +++ b/src/devices/sound/k053260.cpp @@ -90,7 +90,7 @@ const int k053260_device::pan_mul[8][2] = { // k053260_device - constructor //------------------------------------------------- -k053260_device::k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k053260_device::k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053260, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/k053260.h b/src/devices/sound/k053260.h index 9b652bba4fe..494b906477f 100644 --- a/src/devices/sound/k053260.h +++ b/src/devices/sound/k053260.h @@ -24,7 +24,7 @@ class k053260_device : public device_t, public device_rom_interface<21> { public: - k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 main_read(offs_t offset); void main_write(offs_t offset, u8 data); diff --git a/src/devices/sound/k054539.cpp b/src/devices/sound/k054539.cpp index 762bdce92c8..f704a55e9cf 100644 --- a/src/devices/sound/k054539.cpp +++ b/src/devices/sound/k054539.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(K054539, k054539_device, "k054539", "K054539 ADPCM") -k054539_device::k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k054539_device::k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K054539, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/k054539.h b/src/devices/sound/k054539.h index 15ec7ecfe16..7d398e8cd3f 100644 --- a/src/devices/sound/k054539.h +++ b/src/devices/sound/k054539.h @@ -33,7 +33,7 @@ public: using apan_delegate = device_delegate; // construction/destruction - k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto timer_handler() { return m_timer_handler.bind(); } diff --git a/src/devices/sound/k056800.cpp b/src/devices/sound/k056800.cpp index aae1aa10bf2..6810fb87c4d 100644 --- a/src/devices/sound/k056800.cpp +++ b/src/devices/sound/k056800.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(K056800, k056800_device, "k056800", "K056800 MIRAC") // k056800_device - constructor //------------------------------------------------- -k056800_device::k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k056800_device::k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K056800, tag, owner, clock) , m_int_pending(false) , m_int_enabled(false) diff --git a/src/devices/sound/k056800.h b/src/devices/sound/k056800.h index a6d0aa6e567..c165b130734 100644 --- a/src/devices/sound/k056800.h +++ b/src/devices/sound/k056800.h @@ -18,7 +18,7 @@ class k056800_device : public device_t { public: // construction/destruction - k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto int_callback() { return m_int_handler.bind(); } diff --git a/src/devices/sound/ks0164.cpp b/src/devices/sound/ks0164.cpp index f5c3c4d02e9..d04259b5f6c 100644 --- a/src/devices/sound/ks0164.cpp +++ b/src/devices/sound/ks0164.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(KS0164, ks0164_device, "ks0164", "Samsung KS0164 Wavetable Synthesizer") -ks0164_device::ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ks0164_device::ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KS0164, tag, owner, clock), device_sound_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/devices/sound/ks0164.h b/src/devices/sound/ks0164.h index 208176c6e2e..d3ed92557b8 100644 --- a/src/devices/sound/ks0164.h +++ b/src/devices/sound/ks0164.h @@ -14,7 +14,7 @@ class ks0164_device : public device_t, public device_sound_interface, public device_memory_interface, public device_serial_interface { public: - ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16934400); + ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(16934400)); void mpu401_data_w(u8 data); void mpu401_ctrl_w(u8 data); diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.cpp b/src/devices/sound/l7a1045_l6028_dsp_a.cpp index a9db61b5deb..08b6716aa48 100644 --- a/src/devices/sound/l7a1045_l6028_dsp_a.cpp +++ b/src/devices/sound/l7a1045_l6028_dsp_a.cpp @@ -100,7 +100,7 @@ DEFINE_DEVICE_TYPE(L7A1045, l7a1045_sound_device, "l7a1045", "L7A1045 L6028 DSP- // l7a1045_sound_device - constructor //------------------------------------------------- -l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, L7A1045, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.h b/src/devices/sound/l7a1045_l6028_dsp_a.h index 4fff2caa465..3d132db7b18 100644 --- a/src/devices/sound/l7a1045_l6028_dsp_a.h +++ b/src/devices/sound/l7a1045_l6028_dsp_a.h @@ -15,7 +15,7 @@ class l7a1045_sound_device : public device_t, public device_sound_interface { public: - l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // void set_base(int8_t* base) { m_base = base; } diff --git a/src/devices/sound/lc7535.cpp b/src/devices/sound/lc7535.cpp index 0f05bb14456..14a5faa8f87 100644 --- a/src/devices/sound/lc7535.cpp +++ b/src/devices/sound/lc7535.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(LC7535, lc7535_device, "lc7535", "Sanyo LC7535") // lc7535_device - constructor //------------------------------------------------- -lc7535_device::lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +lc7535_device::lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LC7535, tag, owner, clock), m_select_cb(*this), m_volume_cb(*this), diff --git a/src/devices/sound/lc7535.h b/src/devices/sound/lc7535.h index 4fcf649abd9..bcd7487d9eb 100644 --- a/src/devices/sound/lc7535.h +++ b/src/devices/sound/lc7535.h @@ -37,7 +37,7 @@ class lc7535_device : public device_t { public: // construction/destruction - lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); typedef device_delegate volume_delegate; diff --git a/src/devices/sound/lmc1992.cpp b/src/devices/sound/lmc1992.cpp index c3f2d6d3bf4..cd8dc1444c2 100644 --- a/src/devices/sound/lmc1992.cpp +++ b/src/devices/sound/lmc1992.cpp @@ -139,7 +139,7 @@ inline void lmc1992_device::execute_command(int addr, int data) // lmc1992_device - constructor //------------------------------------------------- -lmc1992_device::lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lmc1992_device::lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LMC1992, tag, owner, clock) , device_sound_interface(mconfig, *this) { diff --git a/src/devices/sound/lmc1992.h b/src/devices/sound/lmc1992.h index beb893d9983..79c892f51d3 100644 --- a/src/devices/sound/lmc1992.h +++ b/src/devices/sound/lmc1992.h @@ -60,7 +60,7 @@ class lmc1992_device : public device_t, { public: // construction/destruction - lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( clock_w ); DECLARE_WRITE_LINE_MEMBER( data_w ); diff --git a/src/devices/sound/lynx.cpp b/src/devices/sound/lynx.cpp index d546e4ce00c..1cfb797be88 100644 --- a/src/devices/sound/lynx.cpp +++ b/src/devices/sound/lynx.cpp @@ -100,12 +100,12 @@ DEFINE_DEVICE_TYPE(LYNX2_SND, lynx2_sound_device, "lynx2_sound", "Atari Hayato ( // lynx_sound_device - constructor //------------------------------------------------- -lynx_sound_device::lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lynx_sound_device::lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lynx_sound_device(mconfig, LYNX_SND, tag, owner, clock) { } -lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_timer_delegate(*this) @@ -113,7 +113,7 @@ lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type } -lynx2_sound_device::lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lynx2_sound_device::lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lynx_sound_device(mconfig, LYNX2_SND, tag, owner, clock) { } diff --git a/src/devices/sound/lynx.h b/src/devices/sound/lynx.h index 6f9eb575013..046583f89d3 100644 --- a/src/devices/sound/lynx.h +++ b/src/devices/sound/lynx.h @@ -11,7 +11,7 @@ class lynx_sound_device : public device_t, public device_sound_interface public: typedef device_delegate timer_delegate; - lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(offs_t offset); void write(offs_t offset, u8 data); @@ -48,7 +48,7 @@ protected: s16 count = 0; }; - lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -78,7 +78,7 @@ protected: class lynx2_sound_device : public lynx_sound_device { public: - lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/sound/mas3507d.cpp b/src/devices/sound/mas3507d.cpp index eb156ec63b7..b7d6c52c718 100644 --- a/src/devices/sound/mas3507d.cpp +++ b/src/devices/sound/mas3507d.cpp @@ -46,7 +46,7 @@ ALLOW_SAVE_TYPE(mas3507d_device::i2c_command_t) // device type definition DEFINE_DEVICE_TYPE(MAS3507D, mas3507d_device, "mas3507d", "Micronas MAS 3507D MPEG decoder") -mas3507d_device::mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mas3507d_device::mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MAS3507D, tag, owner, clock) , device_sound_interface(mconfig, *this) , cb_mpeg_frame_sync(*this), cb_demand(*this) diff --git a/src/devices/sound/mas3507d.h b/src/devices/sound/mas3507d.h index 52c2e924109..e4cbbb25ff3 100644 --- a/src/devices/sound/mas3507d.h +++ b/src/devices/sound/mas3507d.h @@ -13,7 +13,7 @@ class mas3507d_device : public device_t, public device_sound_interface { public: // construction/destruction - mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto mpeg_frame_sync_cb() { return cb_mpeg_frame_sync.bind(); } auto demand_cb() { return cb_demand.bind(); } diff --git a/src/devices/sound/mea8000.cpp b/src/devices/sound/mea8000.cpp index e557d046db4..fba5500686a 100644 --- a/src/devices/sound/mea8000.cpp +++ b/src/devices/sound/mea8000.cpp @@ -114,7 +114,7 @@ static const int pi_table[32] = DEFINE_DEVICE_TYPE(MEA8000, mea8000_device, "mea8000", "Philips/Signetics MEA 8000 speech synthesizer") -mea8000_device::mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mea8000_device::mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MEA8000, tag, owner, clock), device_sound_interface(mconfig, *this), m_write_req(*this), diff --git a/src/devices/sound/mea8000.h b/src/devices/sound/mea8000.h index 7538bffa62c..01cbc006129 100644 --- a/src/devices/sound/mea8000.h +++ b/src/devices/sound/mea8000.h @@ -19,7 +19,7 @@ class mea8000_device : public device_t, public device_sound_interface { public: - mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto req() { return m_write_req.bind(); } diff --git a/src/devices/sound/meg.cpp b/src/devices/sound/meg.cpp index f6a90812d6a..34bc8639081 100644 --- a/src/devices/sound/meg.cpp +++ b/src/devices/sound/meg.cpp @@ -27,7 +27,7 @@ void meg_base_device::offsets_map(address_map &map) map(0, 0x7f).ram(); } -meg_base_device::meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 prg_size) : +meg_base_device::meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 prg_size) : cpu_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_BIG, 64, prg_size > 256 ? 9 : 8, -3, address_map_constructor(FUNC(meg_base_device::prg_map), this)), m_fp_config("fp", ENDIANNESS_BIG, 16, prg_size > 256 ? 9 : 8, -1, address_map_constructor(FUNC(meg_base_device::fp_map), this)), @@ -168,12 +168,12 @@ std::unique_ptr meg_base_device::create_disassembler() return std::make_unique(this); } -meg_embedded_device::meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +meg_embedded_device::meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : meg_base_device(mconfig, MEGEMB, tag, owner, clock, 384) { } -meg_device::meg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +meg_device::meg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : meg_base_device(mconfig, MEG, tag, owner, clock, 256) { } diff --git a/src/devices/sound/meg.h b/src/devices/sound/meg.h index 40129158fc8..9deb7ff6af4 100644 --- a/src/devices/sound/meg.h +++ b/src/devices/sound/meg.h @@ -21,7 +21,7 @@ public: AS_OFFSETS = 2 }; - meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 prg_size); + meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 prg_size); void prg_w(u16 address, u64 opcode); void fp_w(u16 address, u16 value); @@ -64,13 +64,13 @@ private: class meg_embedded_device : public meg_base_device { public: - meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 44100*384); + meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(44100*384)); }; class meg_device : public meg_base_device { public: - meg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 44100*256); + meg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(44100*256)); void map(address_map &map); private: diff --git a/src/devices/sound/mixer.cpp b/src/devices/sound/mixer.cpp index ba57be9b10c..64e94cc6e2c 100644 --- a/src/devices/sound/mixer.cpp +++ b/src/devices/sound/mixer.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(MIXER, mixer_device, "mixer", "Generic Audio Mixer") // mixer_device - constructor //------------------------------------------------- -mixer_device::mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mixer_device::mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIXER, tag, owner, clock), device_mixer_interface(mconfig, *this) { diff --git a/src/devices/sound/mixer.h b/src/devices/sound/mixer.h index 5be1d45d5d3..8c98ddd26c5 100644 --- a/src/devices/sound/mixer.h +++ b/src/devices/sound/mixer.h @@ -17,7 +17,7 @@ class mixer_device : public device_t, public device_mixer_interface { public: // internal constructor - mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/devices/sound/mm5837.cpp b/src/devices/sound/mm5837.cpp index ae6687655f3..34582123cad 100644 --- a/src/devices/sound/mm5837.cpp +++ b/src/devices/sound/mm5837.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(MM5837_STREAM, mm5837_stream_device, "mm5837_stream", "MM5837 // mm5837_device - constructor //------------------------------------------------- -mm5837_device::mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm5837_device::mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM5837, tag, owner, clock), m_output_cb(*this), m_timer(nullptr), @@ -88,7 +88,7 @@ TIMER_CALLBACK_MEMBER(mm5837_device::update_clock_output) // mm5837_stream_device - constructor //------------------------------------------------- -mm5837_stream_device::mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm5837_stream_device::mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM5837_STREAM, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/mm5837.h b/src/devices/sound/mm5837.h index df76f6171fd..5f946472340 100644 --- a/src/devices/sound/mm5837.h +++ b/src/devices/sound/mm5837.h @@ -158,7 +158,7 @@ class mm5837_device : public device_t { public: // construction/destruction - mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void set_vdd(double voltage) { m_vdd = voltage; } @@ -186,7 +186,7 @@ class mm5837_stream_device : public device_t, public device_sound_interface { public: // construction/destruction - mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_vdd(double voltage) { m_vdd = voltage; } diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp index bd35429c31c..959d123430e 100644 --- a/src/devices/sound/mos6560.cpp +++ b/src/devices/sound/mos6560.cpp @@ -680,7 +680,7 @@ void mos6560_device::mos6560_colorram_map(address_map &map) map(0x000, 0x3ff).ram(); } -mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), device_sound_interface(mconfig, *this), @@ -693,17 +693,17 @@ mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, { } -mos6560_device::mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6560_device::mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6560_device(mconfig, MOS6560, tag, owner, clock, TYPE_6560) { } -mos6561_device::mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6561_device::mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6560_device(mconfig, MOS6561, tag, owner, clock, TYPE_6561) { } -mos656x_attack_ufo_device::mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos656x_attack_ufo_device::mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6560_device(mconfig, MOS656X_ATTACK_UFO, tag, owner, clock, TYPE_ATTACK_UFO) { } diff --git a/src/devices/sound/mos6560.h b/src/devices/sound/mos6560.h index bf1b8604695..36063198fd3 100644 --- a/src/devices/sound/mos6560.h +++ b/src/devices/sound/mos6560.h @@ -68,8 +68,8 @@ /* the following values depend on the VIC clock, * but to achieve TV-frequency the clock must have a fix frequency */ -#define MOS6560_CLOCK (14318181/14) -#define MOS6561_CLOCK (4433618/4) +#define MOS6560_CLOCK (XTAL::u(14318181)/14) +#define MOS6561_CLOCK (XTAL::u(4433618)/4) @@ -85,7 +85,7 @@ class mos6560_device : public device_t, public device_video_interface { public: - mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto potx_rd_callback() { return m_read_potx.bind(); } auto poty_rd_callback() { return m_read_poty.bind(); } @@ -111,7 +111,7 @@ protected: TYPE_ATTACK_UFO // NTSC-M, less features }; - mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -183,7 +183,7 @@ class mos6561_device : public mos6560_device { public: // construction/destruction - mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -193,7 +193,7 @@ class mos656x_attack_ufo_device : public mos6560_device { public: // construction/destruction - mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/sound/mos6581.cpp b/src/devices/sound/mos6581.cpp index 6682ddca4fe..3f3fb7c54bf 100644 --- a/src/devices/sound/mos6581.cpp +++ b/src/devices/sound/mos6581.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(MOS8580, mos8580_device, "mos8580", "MOS 8580 SID") // mos6581_device - constructor //------------------------------------------------- -mos6581_device::mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mos6581_device::mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_read_potx(*this) @@ -49,7 +49,7 @@ mos6581_device::mos6581_device(const machine_config &mconfig, device_type type, { } -mos6581_device::mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6581_device::mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6581_device(mconfig, MOS6581, tag, owner, clock, TYPE_6581) { } @@ -62,7 +62,7 @@ mos6581_device::~mos6581_device() // mos8580_device - constructor //------------------------------------------------- -mos8580_device::mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8580_device::mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6581_device(mconfig, MOS8580, tag, owner, clock, TYPE_8580) { } diff --git a/src/devices/sound/mos6581.h b/src/devices/sound/mos6581.h index de05db489d3..9ab6811f6fd 100644 --- a/src/devices/sound/mos6581.h +++ b/src/devices/sound/mos6581.h @@ -47,7 +47,7 @@ public: TYPE_8580 }; - mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~mos6581_device(); auto potx() { return m_read_potx.bind(); } @@ -57,7 +57,7 @@ public: void write(offs_t offset, uint8_t data); protected: - mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -85,7 +85,7 @@ private: class mos8580_device : public mos6581_device { public: - mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/sound/mos7360.cpp b/src/devices/sound/mos7360.cpp index c76e1d8adb7..7671206679f 100644 --- a/src/devices/sound/mos7360.cpp +++ b/src/devices/sound/mos7360.cpp @@ -261,7 +261,7 @@ inline uint8_t mos7360_device::read_rom(offs_t offset) // mos7360_device - constructor //------------------------------------------------- -mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS7360, tag, owner, clock), device_memory_interface(mconfig, *this), device_sound_interface(mconfig, *this), diff --git a/src/devices/sound/mos7360.h b/src/devices/sound/mos7360.h index fd0a51f597b..1c05fd6e825 100644 --- a/src/devices/sound/mos7360.h +++ b/src/devices/sound/mos7360.h @@ -75,7 +75,7 @@ public: static constexpr unsigned PAL_LINES = 312; // construction/destruction - mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto write_irq_callback() { return m_write_irq.bind(); } diff --git a/src/devices/sound/msm5205.cpp b/src/devices/sound/msm5205.cpp index ba196a419a3..f06d5d467fd 100644 --- a/src/devices/sound/msm5205.cpp +++ b/src/devices/sound/msm5205.cpp @@ -62,12 +62,12 @@ DEFINE_DEVICE_TYPE(MSM5205, msm5205_device, "msm5205", "OKI MSM5205 ADPCM") DEFINE_DEVICE_TYPE(MSM6585, msm6585_device, "msm6585", "OKI MSM6585 ADPCM") -msm5205_device::msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msm5205_device::msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm5205_device(mconfig, MSM5205, tag, owner, clock, 10) { } -msm5205_device::msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 dac_bits) +msm5205_device::msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 dac_bits) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_s1(false) @@ -80,7 +80,7 @@ msm5205_device::msm5205_device(const machine_config &mconfig, device_type type, } -msm6585_device::msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msm6585_device::msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm5205_device(mconfig, MSM6585, tag, owner, clock, 12) { } diff --git a/src/devices/sound/msm5205.h b/src/devices/sound/msm5205.h index 46052aaffcb..b7eb947ea05 100644 --- a/src/devices/sound/msm5205.h +++ b/src/devices/sound/msm5205.h @@ -20,7 +20,7 @@ public: static constexpr int S64_4B = 6; // prescaler 1/64(6KHz) , data 4bit static constexpr int SEX_4B = 7; // VCK slave mode , data 4bit - msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_prescaler_selector(int select) { @@ -48,7 +48,7 @@ public: void s2_w(int state); protected: - msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 dac_bits); + msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 dac_bits); // device-level overrides virtual void device_start() override; @@ -94,7 +94,7 @@ public: static constexpr int S80 = 6 + 8; /* prescaler 1/80 (8KHz), data 4bit */ static constexpr int S20 = 7 + 8; /* prescaler 1/20(32KHz), data 4bit */ - msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int get_prescaler() const override; diff --git a/src/devices/sound/msm5232.cpp b/src/devices/sound/msm5232.cpp index 3d08f3582a8..7506d2dd2ae 100644 --- a/src/devices/sound/msm5232.cpp +++ b/src/devices/sound/msm5232.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(MSM5232, msm5232_device, "msm5232", "MSM5232") -msm5232_device::msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msm5232_device::msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM5232, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/msm5232.h b/src/devices/sound/msm5232.h index 552cd7669e3..0ee73ae1d32 100644 --- a/src/devices/sound/msm5232.h +++ b/src/devices/sound/msm5232.h @@ -10,13 +10,13 @@ class msm5232_device : public device_t, public device_sound_interface { public: - msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_capacitors(double cap1, double cap2, double cap3, double cap4, double cap5, double cap6, double cap7, double cap8); auto gate() { return m_gate_handler_cb.bind(); } void write(offs_t offset, uint8_t data); - void set_clock(int clock); + void set_clock(const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/sound/multipcm.cpp b/src/devices/sound/multipcm.cpp index e8564f22698..175b5c2a8d4 100644 --- a/src/devices/sound/multipcm.cpp +++ b/src/devices/sound/multipcm.cpp @@ -464,7 +464,7 @@ void multipcm_device::write(offs_t offset, uint8_t data) DEFINE_DEVICE_TYPE(MULTIPCM, multipcm_device, "ymw258f", "Yamaha YMW-258-F") -multipcm_device::multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +multipcm_device::multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MULTIPCM, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/multipcm.h b/src/devices/sound/multipcm.h index 786b5a3f02c..bc62df41538 100644 --- a/src/devices/sound/multipcm.h +++ b/src/devices/sound/multipcm.h @@ -18,7 +18,7 @@ class multipcm_device : public device_t, public device_rom_interface<22, 0, 0, ENDIANNESS_BIG> { public: - multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); uint8_t read(); diff --git a/src/devices/sound/n63701x.cpp b/src/devices/sound/n63701x.cpp index 6f16c988d8e..04bf7d62925 100644 --- a/src/devices/sound/n63701x.cpp +++ b/src/devices/sound/n63701x.cpp @@ -31,7 +31,7 @@ static const int vol_table[4] = { 26, 84, 200, 258 }; // device type definition DEFINE_DEVICE_TYPE(NAMCO_63701X, namco_63701x_device, "namco_63701x", "Namco 63701X") -namco_63701x_device::namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_63701x_device::namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_63701X, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_rom(*this, DEVICE_SELF) diff --git a/src/devices/sound/n63701x.h b/src/devices/sound/n63701x.h index 3ca5411df6d..c45b4d4447d 100644 --- a/src/devices/sound/n63701x.h +++ b/src/devices/sound/n63701x.h @@ -16,7 +16,7 @@ class namco_63701x_device : public device_t, public device_sound_interface { public: - namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); diff --git a/src/devices/sound/namco.cpp b/src/devices/sound/namco.cpp index a83f0ccbb65..4e3d600fdb6 100644 --- a/src/devices/sound/namco.cpp +++ b/src/devices/sound/namco.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(NAMCO, namco_device, "namco", "Namco") DEFINE_DEVICE_TYPE(NAMCO_15XX, namco_15xx_device, "namco_15xx", "Namco 15xx") DEFINE_DEVICE_TYPE(NAMCO_CUS30, namco_cus30_device, "namco_cus30", "Namco CUS30") -namco_audio_device::namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +namco_audio_device::namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_wave_ptr(*this, DEVICE_SELF) @@ -66,19 +66,19 @@ namco_audio_device::namco_audio_device(const machine_config &mconfig, device_typ { } -namco_device::namco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_device::namco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namco_audio_device(mconfig, NAMCO, tag, owner, clock) , m_soundregs(nullptr) { } -namco_15xx_device::namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_15xx_device::namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :namco_audio_device(mconfig, NAMCO_15XX, tag, owner, clock) , m_soundregs(nullptr) { } -namco_cus30_device::namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_cus30_device::namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namco_audio_device(mconfig, NAMCO_CUS30, tag, owner, clock) { } diff --git a/src/devices/sound/namco.h b/src/devices/sound/namco.h index f032a71a536..45bda912528 100644 --- a/src/devices/sound/namco.h +++ b/src/devices/sound/namco.h @@ -34,7 +34,7 @@ protected: int32_t waveform_select; }; - namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -76,7 +76,7 @@ protected: class namco_device : public namco_audio_device { public: - namco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void pacman_sound_w(offs_t offset, uint8_t data); @@ -97,7 +97,7 @@ private: class namco_15xx_device : public namco_audio_device { public: - namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void namco_15xx_w(offs_t offset, uint8_t data); uint8_t sharedram_r(offs_t offset); @@ -117,7 +117,7 @@ private: class namco_cus30_device : public namco_audio_device { public: - namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void namcos1_cus30_w(offs_t offset, uint8_t data); /* wavedata + sound registers + RAM */ uint8_t namcos1_cus30_r(offs_t offset); diff --git a/src/devices/sound/namco_163.cpp b/src/devices/sound/namco_163.cpp index c26a1f1c638..87a3611fc37 100644 --- a/src/devices/sound/namco_163.cpp +++ b/src/devices/sound/namco_163.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(NAMCO_163, namco_163_sound_device, "namco_163_sound", "Namco 163 (Sound)") -namco_163_sound_device::namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +namco_163_sound_device::namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_163, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_reg_addr(0x78) diff --git a/src/devices/sound/namco_163.h b/src/devices/sound/namco_163.h index f3a7428300d..fd928bc31e4 100644 --- a/src/devices/sound/namco_163.h +++ b/src/devices/sound/namco_163.h @@ -10,7 +10,7 @@ class namco_163_sound_device : public device_t, public device_sound_interface { public: - namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(disable_w); diff --git a/src/devices/sound/nes_apu.cpp b/src/devices/sound/nes_apu.cpp index ee059c1cd22..9af003bfff7 100644 --- a/src/devices/sound/nes_apu.cpp +++ b/src/devices/sound/nes_apu.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(NES_APU, nesapu_device, "nesapu", "RP2A0X APU") DEFINE_DEVICE_TYPE(APU_2A03, apu2a03_device, "apu2a03", "RP2A03 APU") -nesapu_device::nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +nesapu_device::nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_is_pal(0) @@ -59,7 +59,7 @@ nesapu_device::nesapu_device(const machine_config &mconfig, device_type type, co { } -nesapu_device::nesapu_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) +nesapu_device::nesapu_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nesapu_device(mconfig, NES_APU, tag, owner, clock) { } diff --git a/src/devices/sound/nes_apu.h b/src/devices/sound/nes_apu.h index 8837e683034..d7e17a530ef 100644 --- a/src/devices/sound/nes_apu.h +++ b/src/devices/sound/nes_apu.h @@ -43,7 +43,7 @@ class nesapu_device : public device_t, public device_sound_interface { public: - nesapu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nesapu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq() { return m_irq_handler.bind(); } @@ -56,7 +56,7 @@ public: void write(offs_t offset, u8 data); protected: - nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -97,7 +97,7 @@ private: class apu2a03_device : public nesapu_device { public: - apu2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + apu2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void update_lfsr(apu_t::noise_t &chan) override; diff --git a/src/devices/sound/nes_apu_vt.cpp b/src/devices/sound/nes_apu_vt.cpp index f93c3203bac..a3093b1e9e3 100644 --- a/src/devices/sound/nes_apu_vt.cpp +++ b/src/devices/sound/nes_apu_vt.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(NES_APU_VT, nes_apu_vt_device, "nes_apu_vt", "XOP APU") -nes_apu_vt_device::nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_apu_vt_device::nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nesapu_device(mconfig, NES_APU_VT, tag, owner, clock) { } diff --git a/src/devices/sound/nes_apu_vt.h b/src/devices/sound/nes_apu_vt.h index f93616673fa..c38f3c3bd9e 100644 --- a/src/devices/sound/nes_apu_vt.h +++ b/src/devices/sound/nes_apu_vt.h @@ -14,7 +14,7 @@ class nes_apu_vt_device : public nesapu_device { public: // construction/destruction - nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/sound/okim6258.cpp b/src/devices/sound/okim6258.cpp index 349fe9ca13c..88ff1ddfb55 100644 --- a/src/devices/sound/okim6258.cpp +++ b/src/devices/sound/okim6258.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(OKIM6258, okim6258_device, "okim6258", "OKI MSM6258 ADPCM") // okim6258_device - constructor //------------------------------------------------- -okim6258_device::okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +okim6258_device::okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OKIM6258, tag, owner, clock), device_sound_interface(mconfig, *this), m_status(0), diff --git a/src/devices/sound/okim6258.h b/src/devices/sound/okim6258.h index 95189f0ef3c..e5c37327645 100644 --- a/src/devices/sound/okim6258.h +++ b/src/devices/sound/okim6258.h @@ -26,7 +26,7 @@ public: static constexpr int OUTPUT_10BITS = 10; static constexpr int OUTPUT_12BITS = 12; - okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_start_div(int div) { m_start_divider = div; } diff --git a/src/devices/sound/okim6295.cpp b/src/devices/sound/okim6295.cpp index fbded659cf1..b14ffccf046 100644 --- a/src/devices/sound/okim6295.cpp +++ b/src/devices/sound/okim6295.cpp @@ -85,7 +85,7 @@ const stream_buffer::sample_t okim6295_device::s_volume_table[16] = // okim6295_device - constructor //------------------------------------------------- -okim6295_device::okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +okim6295_device::okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OKIM6295, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/okim6295.h b/src/devices/sound/okim6295.h index 4d372a8a47c..cbad0f281a3 100644 --- a/src/devices/sound/okim6295.h +++ b/src/devices/sound/okim6295.h @@ -35,12 +35,12 @@ public: }; // construction/destruction - okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, pin7_state pin7) + okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, pin7_state pin7) : okim6295_device(mconfig, tag, owner, clock) { config_pin7(pin7); } - okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void config_pin7(pin7_state pin7) { assert(!started()); m_pin7_state = pin7; } diff --git a/src/devices/sound/okim6376.cpp b/src/devices/sound/okim6376.cpp index 58a52858ecf..b95fe5284a6 100644 --- a/src/devices/sound/okim6376.cpp +++ b/src/devices/sound/okim6376.cpp @@ -113,7 +113,7 @@ void okim6376_device::ADPCMVoice::reset() DEFINE_DEVICE_TYPE(OKIM6376, okim6376_device, "okim6376", "OKI MSM6376 ADPCM") DEFINE_DEVICE_TYPE(OKIM6650, okim6650_device, "okim6650", "OKI MSM6650 ADPCM") -okim6376_device::okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits) +okim6376_device::okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), @@ -135,12 +135,12 @@ okim6376_device::okim6376_device(const machine_config &mconfig, device_type type override_address_width(addrbits); } -okim6376_device::okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +okim6376_device::okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : okim6376_device(mconfig, OKIM6376, tag, owner, clock, 21) { } -okim6650_device::okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +okim6650_device::okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : okim6376_device(mconfig, OKIM6650, tag, owner, clock, 23) { } diff --git a/src/devices/sound/okim6376.h b/src/devices/sound/okim6376.h index aca7eb4de31..2ea932be760 100644 --- a/src/devices/sound/okim6376.h +++ b/src/devices/sound/okim6376.h @@ -12,7 +12,7 @@ class okim6376_device : public device_t, public device_sound_interface, public device_rom_interface<23, 0, 0, ENDIANNESS_BIG> { public: - okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(uint8_t data); @@ -23,7 +23,7 @@ public: DECLARE_READ_LINE_MEMBER( nar_r ); protected: - okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits); + okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits); // device-level overrides virtual void device_start() override; @@ -84,7 +84,7 @@ protected: class okim6650_device : public okim6376_device { public: - okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( cmd_w ); diff --git a/src/devices/sound/okim9810.cpp b/src/devices/sound/okim9810.cpp index db658eacf00..8eca6dfaf08 100644 --- a/src/devices/sound/okim9810.cpp +++ b/src/devices/sound/okim9810.cpp @@ -80,7 +80,7 @@ const uint32_t okim9810_device::s_sampling_freq_div_table[16] = // okim9810_device - constructor //------------------------------------------------- -okim9810_device::okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +okim9810_device::okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OKIM9810, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/okim9810.h b/src/devices/sound/okim9810.h index 18db148aa40..3b0e145b0a1 100644 --- a/src/devices/sound/okim9810.h +++ b/src/devices/sound/okim9810.h @@ -34,7 +34,7 @@ class okim9810_device : public device_t, { public: // construction/destruction - okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read_status(); void write_tmp_register(uint8_t command); diff --git a/src/devices/sound/pcd3311.cpp b/src/devices/sound/pcd3311.cpp index 4b5a4fb87f5..1102e923ff8 100644 --- a/src/devices/sound/pcd3311.cpp +++ b/src/devices/sound/pcd3311.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(PCD3311, pcd3311_device, "pcd3311", "PCD3311") // pcd3311_device - constructor //------------------------------------------------- -pcd3311_device::pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pcd3311_device::pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCD3311, tag, owner, clock), device_sound_interface(mconfig, *this) { diff --git a/src/devices/sound/pcd3311.h b/src/devices/sound/pcd3311.h index 5d5b8870008..26a74d7a58d 100644 --- a/src/devices/sound/pcd3311.h +++ b/src/devices/sound/pcd3311.h @@ -36,7 +36,7 @@ class pcd3311_device : public device_t, { public: // construction/destruction - pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(uint8_t data) { m_data = data; } void strobe_w(int state) { m_strobe = state; } diff --git a/src/devices/sound/pci-ac97.cpp b/src/devices/sound/pci-ac97.cpp index 939ef832ab7..6b944c933fc 100644 --- a/src/devices/sound/pci-ac97.cpp +++ b/src/devices/sound/pci-ac97.cpp @@ -21,7 +21,7 @@ void ac97_device::bus_mastering_map(address_map &map) { } -ac97_device::ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ac97_device::ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, AC97, tag, owner, clock) { } diff --git a/src/devices/sound/pci-ac97.h b/src/devices/sound/pci-ac97.h index 4633337e6dc..ba7c82903f1 100644 --- a/src/devices/sound/pci-ac97.h +++ b/src/devices/sound/pci-ac97.h @@ -9,12 +9,12 @@ class ac97_device : public pci_device { public: - ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) + ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id) : ac97_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x040300, subdevice_id); } - ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/sound/pokey.cpp b/src/devices/sound/pokey.cpp index b490126c0d5..f003f048199 100644 --- a/src/devices/sound/pokey.cpp +++ b/src/devices/sound/pokey.cpp @@ -192,7 +192,7 @@ DEFINE_DEVICE_TYPE(POKEY, pokey_device, "pokey", "Atari C012294 POKEY") // pokey_device - constructor //------------------------------------------------- -pokey_device::pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pokey_device::pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, POKEY, tag, owner, clock), device_sound_interface(mconfig, *this), device_execute_interface(mconfig, *this), diff --git a/src/devices/sound/pokey.h b/src/devices/sound/pokey.h index 018394d3003..2c167fed057 100644 --- a/src/devices/sound/pokey.h +++ b/src/devices/sound/pokey.h @@ -66,7 +66,7 @@ public: /* CONSTANT DEFINITIONS */ /* exact 1.79 MHz clock freq (of the Atari 800 that is) */ - static constexpr unsigned FREQ_17_EXACT = 1789790; + static constexpr auto FREQ_17_EXACT = XTAL::u(1789790); enum { @@ -124,7 +124,7 @@ public: }; // construction/destruction - pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto pot_r() { return m_pot_r_cb[N].bind(); } auto allpot_r() { return m_allpot_r_cb.bind(); } diff --git a/src/devices/sound/qs1000.cpp b/src/devices/sound/qs1000.cpp index fb42e4936db..8f6c1997ecc 100644 --- a/src/devices/sound/qs1000.cpp +++ b/src/devices/sound/qs1000.cpp @@ -164,7 +164,7 @@ ROM_END //------------------------------------------------- // qs1000_device - constructor //------------------------------------------------- -qs1000_device::qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +qs1000_device::qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QS1000, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/qs1000.h b/src/devices/sound/qs1000.h index 22683ff7d35..77765d13e2e 100644 --- a/src/devices/sound/qs1000.h +++ b/src/devices/sound/qs1000.h @@ -31,7 +31,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // construction/destruction - qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_external_rom(bool external_rom) { m_external_rom = external_rom; } auto p1_in() { return m_in_p1_cb.bind(); } diff --git a/src/devices/sound/qsound.cpp b/src/devices/sound/qsound.cpp index bae635a6f7b..58a0ec3eeec 100644 --- a/src/devices/sound/qsound.cpp +++ b/src/devices/sound/qsound.cpp @@ -130,7 +130,7 @@ ROM_END // qsound_device - constructor //------------------------------------------------- -qsound_device::qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +qsound_device::qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QSOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/qsound.h b/src/devices/sound/qsound.h index 48ccf3acf87..d571c14f9fb 100644 --- a/src/devices/sound/qsound.h +++ b/src/devices/sound/qsound.h @@ -18,7 +18,7 @@ class qsound_device : public device_t, public device_sound_interface, public dev { public: // default 60MHz clock (divided by 2 for DSP core clock, and then by 1248 for sample rate) - qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 60'000'000); + qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL::u(60'000'000)); void qsound_w(offs_t offset, u8 data); u8 qsound_r(); diff --git a/src/devices/sound/qsoundhle.cpp b/src/devices/sound/qsoundhle.cpp index ed69b569cb5..42658abd73a 100644 --- a/src/devices/sound/qsoundhle.cpp +++ b/src/devices/sound/qsoundhle.cpp @@ -39,7 +39,7 @@ ROM_END // qsound_hle_device - constructor //------------------------------------------------- -qsound_hle_device::qsound_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +qsound_hle_device::qsound_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QSOUND_HLE, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/qsoundhle.h b/src/devices/sound/qsoundhle.h index d5256854842..0cc1f5a7bd6 100644 --- a/src/devices/sound/qsoundhle.h +++ b/src/devices/sound/qsoundhle.h @@ -18,7 +18,7 @@ class qsound_hle_device : public device_t, public device_sound_interface, public { public: // default 60MHz clock (divided by 2 for DSP core clock, and then by 1248 for sample rate) - qsound_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 60'000'000); + qsound_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL::u(60'000'000)); void qsound_w(offs_t offset, uint8_t data); uint8_t qsound_r(); diff --git a/src/devices/sound/rf5c400.cpp b/src/devices/sound/rf5c400.cpp index fc466fb0a0f..ab3af9117c9 100644 --- a/src/devices/sound/rf5c400.cpp +++ b/src/devices/sound/rf5c400.cpp @@ -115,7 +115,7 @@ void rf5c400_device::envelope_tables::init(uint32_t clock) // rf5c400_device - constructor //------------------------------------------------- -rf5c400_device::rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rf5c400_device::rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RF5C400, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/rf5c400.h b/src/devices/sound/rf5c400.h index a91ba9ee097..a95c92f6d10 100644 --- a/src/devices/sound/rf5c400.h +++ b/src/devices/sound/rf5c400.h @@ -23,7 +23,7 @@ class rf5c400_device : public device_t, public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // unemulated and/or unverified effects and envelopes - rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t rf5c400_r(offs_t offset, uint16_t mem_mask = ~0); void rf5c400_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp index 09fd397d4fb..8530fec3e2b 100644 --- a/src/devices/sound/rf5c68.cpp +++ b/src/devices/sound/rf5c68.cpp @@ -40,7 +40,7 @@ void rf5c164_device::rf5c164_map(address_map &map) // rf5c68_device - constructor //------------------------------------------------- -rf5c68_device::rf5c68_device(const machine_config & mconfig, device_type type, const char * tag, device_t * owner, u32 clock, int output_bits) +rf5c68_device::rf5c68_device(const machine_config & mconfig, device_type type, const char * tag, device_t * owner, const XTAL &clock, int output_bits) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) @@ -54,7 +54,7 @@ rf5c68_device::rf5c68_device(const machine_config & mconfig, device_type type, c { } -rf5c68_device::rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rf5c68_device::rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rf5c68_device(mconfig, RF5C68, tag, owner, clock, 10) { } @@ -64,7 +64,7 @@ rf5c68_device::rf5c68_device(const machine_config &mconfig, const char *tag, dev // rf5c164_device - constructor //------------------------------------------------- -rf5c164_device::rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rf5c164_device::rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rf5c68_device(mconfig, RF5C164, tag, owner, clock, 16) { } diff --git a/src/devices/sound/rf5c68.h b/src/devices/sound/rf5c68.h index d78f378faaf..219d11477da 100644 --- a/src/devices/sound/rf5c68.h +++ b/src/devices/sound/rf5c68.h @@ -26,7 +26,7 @@ class rf5c68_device : public device_t, public: typedef device_delegate sample_end_cb_delegate; - rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_end_callback(T &&... args) { m_sample_end_cb.set(std::forward(args)...); } @@ -38,7 +38,7 @@ public: void map(address_map &map); protected: - rf5c68_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int output_bits); + rf5c68_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int output_bits); // device-level overrides virtual void device_start() override; @@ -84,7 +84,7 @@ private: class rf5c164_device : public rf5c68_device { public: - rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void rf5c164_map(address_map &map); }; diff --git a/src/devices/sound/rolandpcm.cpp b/src/devices/sound/rolandpcm.cpp index e31132b934e..16191b60282 100644 --- a/src/devices/sound/rolandpcm.cpp +++ b/src/devices/sound/rolandpcm.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(MB87419_MB87420, mb87419_mb87420_device, "mb87419_mb87420", "Roland MB87419/MB87420 PCM") -mb87419_mb87420_device::mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb87419_mb87420_device::mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB87419_MB87420, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/rolandpcm.h b/src/devices/sound/rolandpcm.h index 702da28dcf1..0a6c6a64397 100644 --- a/src/devices/sound/rolandpcm.h +++ b/src/devices/sound/rolandpcm.h @@ -10,7 +10,7 @@ class mb87419_mb87420_device : public device_t, public device_sound_interface, public device_rom_interface<22> { public: - mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_callback() { return m_int_callback.bind(); } diff --git a/src/devices/sound/rp2c33_snd.cpp b/src/devices/sound/rp2c33_snd.cpp index d0701041a6b..b1efe47636e 100644 --- a/src/devices/sound/rp2c33_snd.cpp +++ b/src/devices/sound/rp2c33_snd.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(RP2C33_SOUND, rp2c33_sound_device, "rp2c33_snd", "Ricoh RP2C3 // rp2c33_sound_device - constructor //------------------------------------------------- -rp2c33_sound_device::rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rp2c33_sound_device::rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RP2C33_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) { diff --git a/src/devices/sound/rp2c33_snd.h b/src/devices/sound/rp2c33_snd.h index bdb32e58f60..1f480519e3b 100644 --- a/src/devices/sound/rp2c33_snd.h +++ b/src/devices/sound/rp2c33_snd.h @@ -26,7 +26,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // one or more features are not verified, and possibly incorrect // construction/destruction - rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // host interface void write(offs_t offset, u8 data); diff --git a/src/devices/sound/s14001a.cpp b/src/devices/sound/s14001a.cpp index 50f2ca07eaa..b3bf75c777b 100644 --- a/src/devices/sound/s14001a.cpp +++ b/src/devices/sound/s14001a.cpp @@ -196,7 +196,7 @@ uint8_t CalculateOutput(bool bVoiced, bool bXSilence, uint8_t uPPQtr, bool bPPQS // device definition DEFINE_DEVICE_TYPE(S14001A, s14001a_device, "s14001a", "SSi TSI S14001A") -s14001a_device::s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s14001a_device::s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S14001A, tag, owner, clock), device_sound_interface(mconfig, *this), m_SpeechRom(*this, DEVICE_SELF), diff --git a/src/devices/sound/s14001a.h b/src/devices/sound/s14001a.h index 511503d9daa..d43884b310b 100644 --- a/src/devices/sound/s14001a.h +++ b/src/devices/sound/s14001a.h @@ -11,7 +11,7 @@ class s14001a_device : public device_t, public device_sound_interface { public: - s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto bsy() { return m_bsy_handler.bind(); } diff --git a/src/devices/sound/s_dsp.cpp b/src/devices/sound/s_dsp.cpp index 98cd204b503..1492738534e 100644 --- a/src/devices/sound/s_dsp.cpp +++ b/src/devices/sound/s_dsp.cpp @@ -141,7 +141,7 @@ ALLOW_SAVE_TYPE(s_dsp_device::env_state_t32); DEFINE_DEVICE_TYPE(S_DSP, s_dsp_device, "s_dsp", "Nintendo/Sony S-DSP") -s_dsp_device::s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +s_dsp_device::s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S_DSP, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/sound/s_dsp.h b/src/devices/sound/s_dsp.h index 00097b17303..f52d638eda4 100644 --- a/src/devices/sound/s_dsp.h +++ b/src/devices/sound/s_dsp.h @@ -16,7 +16,7 @@ class s_dsp_device : public device_t, public device_sound_interface, public device_memory_interface { public: - s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_volume(int volume); diff --git a/src/devices/sound/saa1099.cpp b/src/devices/sound/saa1099.cpp index 682cbb5873f..eeaa4dd44e6 100644 --- a/src/devices/sound/saa1099.cpp +++ b/src/devices/sound/saa1099.cpp @@ -136,7 +136,7 @@ DEFINE_DEVICE_TYPE(SAA1099, saa1099_device, "saa1099", "Philips SAA1099") // saa1099_device - constructor //------------------------------------------------- -saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAA1099, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/saa1099.h b/src/devices/sound/saa1099.h index 87f5b58f48a..7b0b3a783b2 100644 --- a/src/devices/sound/saa1099.h +++ b/src/devices/sound/saa1099.h @@ -19,7 +19,7 @@ class saa1099_device : public device_t, public device_sound_interface { public: - saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void control_w(u8 data); void data_w(u8 data); diff --git a/src/devices/sound/samples.cpp b/src/devices/sound/samples.cpp index 999f4da7e0b..8120b917ff9 100644 --- a/src/devices/sound/samples.cpp +++ b/src/devices/sound/samples.cpp @@ -46,12 +46,12 @@ DEFINE_DEVICE_TYPE(SAMPLES, samples_device, "samples", "Samples") // samples_device - constructors //------------------------------------------------- -samples_device::samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +samples_device::samples_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : samples_device(mconfig, SAMPLES, tag, owner, clock) { } -samples_device::samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +samples_device::samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_channels(0) diff --git a/src/devices/sound/samples.h b/src/devices/sound/samples.h index 073fc3ae180..dcc10c34694 100644 --- a/src/devices/sound/samples.h +++ b/src/devices/sound/samples.h @@ -34,7 +34,7 @@ public: typedef device_delegate start_cb_delegate; // construction/destruction - samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + samples_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers void set_channels(uint8_t channels) { m_channels = channels; } @@ -75,7 +75,7 @@ public: protected: // subclasses can do it this way - samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/sound/sb0400.cpp b/src/devices/sound/sb0400.cpp index b124a99b8f9..99073db5d8b 100644 --- a/src/devices/sound/sb0400.cpp +++ b/src/devices/sound/sb0400.cpp @@ -9,7 +9,7 @@ void sb0400_device::map(address_map &map) { } -sb0400_device::sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sb0400_device::sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SB0400, tag, owner, clock) { } diff --git a/src/devices/sound/sb0400.h b/src/devices/sound/sb0400.h index 440e82a0544..bd4f4d887d0 100644 --- a/src/devices/sound/sb0400.h +++ b/src/devices/sound/sb0400.h @@ -9,12 +9,12 @@ class sb0400_device : public pci_device { public: - sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : sb0400_device(mconfig, tag, owner, clock) { set_ids(0x11020008, 0x00, 0x040100, subdevice_id); } - sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/sound/scsp.cpp b/src/devices/sound/scsp.cpp index 96436fefd90..e6d17af76b3 100644 --- a/src/devices/sound/scsp.cpp +++ b/src/devices/sound/scsp.cpp @@ -142,7 +142,7 @@ static const float SDLT[8] = {-1000000.0f,-36.0f,-30.0f,-24.0f,-18.0f,-12.0f,-6. DEFINE_DEVICE_TYPE(SCSP, scsp_device, "scsp", "Yamaha YMF292-F SCSP") -scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCSP, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/scsp.h b/src/devices/sound/scsp.h index dfd62c24dd0..e6bd22acfa8 100644 --- a/src/devices/sound/scsp.h +++ b/src/devices/sound/scsp.h @@ -25,7 +25,7 @@ class scsp_device : public device_t, public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // DSP / EG incorrections, etc - scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 22'579'200); + scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(22'579'200)); auto irq_cb() { return m_irq_cb.bind(); } auto main_irq_cb() { return m_main_irq_cb.bind(); } diff --git a/src/devices/sound/segapcm.cpp b/src/devices/sound/segapcm.cpp index 9f7a9b6fc63..e9415754590 100644 --- a/src/devices/sound/segapcm.cpp +++ b/src/devices/sound/segapcm.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(SEGAPCM, segapcm_device, "segapcm", "Sega PCM") // segapcm_device - constructor //------------------------------------------------- -segapcm_device::segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segapcm_device::segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGAPCM, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/segapcm.h b/src/devices/sound/segapcm.h index ff098088037..bb9c6d44941 100644 --- a/src/devices/sound/segapcm.h +++ b/src/devices/sound/segapcm.h @@ -27,7 +27,7 @@ public: static constexpr int BANK_MASKF = 0xf0 << 16; static constexpr int BANK_MASKF8 = 0xf8 << 16; - segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_bank(int bank) { m_bankshift = (bank & 0xf); m_bankmask = (0x70|((bank >> 16) & 0xfc)); } diff --git a/src/devices/sound/setapcm.cpp b/src/devices/sound/setapcm.cpp index ab002f68f10..fdde501f704 100644 --- a/src/devices/sound/setapcm.cpp +++ b/src/devices/sound/setapcm.cpp @@ -75,7 +75,7 @@ DEFINE_DEVICE_TYPE(ST0032_SOUND, st0032_sound_device, "st0032_sound", "Seta ST-0 //------------------------------------------------- template -setapcm_device::setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +setapcm_device::setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) @@ -84,12 +84,12 @@ setapcm_device::setapcm_device(const machine_config &mconfig { } -nile_sound_device::nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +nile_sound_device::nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : setapcm_device<8, 160>(mconfig, NILE_SOUND, tag, owner, clock) { } -st0032_sound_device::st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st0032_sound_device::st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : setapcm_device<16, 384>(mconfig, ST0032_SOUND, tag, owner, clock) { } diff --git a/src/devices/sound/setapcm.h b/src/devices/sound/setapcm.h index 2da5c147563..ed96f17fe79 100644 --- a/src/devices/sound/setapcm.h +++ b/src/devices/sound/setapcm.h @@ -31,7 +31,7 @@ public: u16 key_r(); protected: - setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -82,7 +82,7 @@ private: class nile_sound_device : public setapcm_device<8, 160> { public: - nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> st0032_sound_device @@ -90,7 +90,7 @@ public: class st0032_sound_device : public setapcm_device<16, 384> { public: - st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; //************************************************************************** diff --git a/src/devices/sound/sn76477.cpp b/src/devices/sound/sn76477.cpp index 1ccbd2fc4b5..90c73099065 100644 --- a/src/devices/sound/sn76477.cpp +++ b/src/devices/sound/sn76477.cpp @@ -143,7 +143,7 @@ static constexpr double out_neg_gain[] = DEFINE_DEVICE_TYPE(SN76477, sn76477_device, "sn76477", "TI SN76477 CSG") -sn76477_device::sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn76477_device::sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SN76477, tag, owner, clock), device_sound_interface(mconfig, *this), m_enable(0), diff --git a/src/devices/sound/sn76477.h b/src/devices/sound/sn76477.h index 6aa4c10c9f0..261c60118db 100644 --- a/src/devices/sound/sn76477.h +++ b/src/devices/sound/sn76477.h @@ -55,7 +55,7 @@ class sn76477_device : public device_t, public device_sound_interface { public: - sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_noise_params(double clock_res, double filter_res, double filter_cap) { diff --git a/src/devices/sound/sn76496.cpp b/src/devices/sound/sn76496.cpp index 96c6a3ba789..37a8cdd6cd3 100644 --- a/src/devices/sound/sn76496.cpp +++ b/src/devices/sound/sn76496.cpp @@ -173,52 +173,52 @@ sn76496_base_device::sn76496_base_device( { } -sn76496_device::sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn76496_device::sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, SN76496, tag, 0x10000, 0x04, 0x08, false, false, 8, false, true, owner, clock) { } -y2404_device::y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +y2404_device::y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, Y2404, tag, 0x10000, 0x04, 0x08, false, false, 8, false, true, owner, clock) { } -sn76489_device::sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn76489_device::sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, SN76489, tag, 0x4000, 0x01, 0x02, true, false, 8, false, true, owner, clock) { } -sn76489a_device::sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn76489a_device::sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, SN76489A, tag, 0x10000, 0x04, 0x08, false, false, 8, false, true, owner, clock) { } -sn76494_device::sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn76494_device::sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, SN76494, tag, 0x10000, 0x04, 0x08, false, false, 1, false, true, owner, clock) { } -sn94624_device::sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn94624_device::sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, SN94624, tag, 0x4000, 0x01, 0x02, true, false, 1, false, true, owner, clock) { } -ncr8496_device::ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr8496_device::ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, NCR8496, tag, 0x8000, 0x02, 0x20, true, false, 8, true, true, owner, clock) { } -pssj3_device::pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pssj3_device::pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, PSSJ3, tag, 0x8000, 0x02, 0x20, false, false, 8, true, true, owner, clock) { } -gamegear_device::gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gamegear_device::gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, GAMEGEAR, tag, 0x8000, 0x01, 0x08, true, true, 8, false, false, owner, clock) { } -segapsg_device::segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segapsg_device::segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sn76496_base_device(mconfig, SEGAPSG, tag, 0x8000, 0x01, 0x08, true, false, 8, false, false, owner, clock) { } diff --git a/src/devices/sound/sn76496.h b/src/devices/sound/sn76496.h index f5484248715..f5b33167bdc 100644 --- a/src/devices/sound/sn76496.h +++ b/src/devices/sound/sn76496.h @@ -29,7 +29,7 @@ public: protected: sn76496_base_device(const machine_config &mconfig, device_type type, const char *tag, int feedbackmask, int noisetap1, int noisetap2, bool negate, bool stereo, int clockdivider, - bool ncr, bool sega, device_t *owner, uint32_t clock); + bool ncr, bool sega, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_clock_changed() override; @@ -73,70 +73,70 @@ private: class sn76496_device : public sn76496_base_device { public: - sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // Y2404 not verified yet. todo: verify; (don't be fooled by the Y, it's a TI chip, not Yamaha) class y2404_device : public sn76496_base_device { public: - y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // SN76489 not verified yet. todo: verify; class sn76489_device : public sn76496_base_device { public: - sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // SN76489A: whitenoise verified, phase verified, periodic verified (by plgdavid) class sn76489a_device : public sn76496_base_device { public: - sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // SN76494 not verified, (according to datasheet: same as sn76489a but without the /8 divider) class sn76494_device : public sn76496_base_device { public: - sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // SN94624 whitenoise verified, phase verified, period verified; verified by PlgDavid class sn94624_device : public sn76496_base_device { public: - sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // NCR8496 whitenoise verified, phase verified; verified by ValleyBell & NewRisingSun class ncr8496_device : public sn76496_base_device { public: - ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // PSSJ-3 whitenoise verified, phase verified; verified by ValleyBell & NewRisingSun class pssj3_device : public sn76496_base_device { public: - pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // Verified by Justin Kerk class gamegear_device : public sn76496_base_device { public: - gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // todo: verify; from smspower wiki, assumed to have same invert as gamegear class segapsg_device : public sn76496_base_device { public: - segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_SOUND_SN76496_H diff --git a/src/devices/sound/snkwave.cpp b/src/devices/sound/snkwave.cpp index 44e6ba51466..1dda2bcb31c 100644 --- a/src/devices/sound/snkwave.cpp +++ b/src/devices/sound/snkwave.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SNKWAVE, snkwave_device, "snkwave", "SNK Wave") // snkwave_device - constructor //------------------------------------------------- -snkwave_device::snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +snkwave_device::snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNKWAVE, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/snkwave.h b/src/devices/sound/snkwave.h index bf40a33e500..4cc085b6831 100644 --- a/src/devices/sound/snkwave.h +++ b/src/devices/sound/snkwave.h @@ -17,7 +17,7 @@ class snkwave_device : public device_t, public device_sound_interface { public: - snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void snkwave_w(offs_t offset, uint8_t data); diff --git a/src/devices/sound/sp0250.cpp b/src/devices/sound/sp0250.cpp index 9544adb3c38..75e6c646333 100644 --- a/src/devices/sound/sp0250.cpp +++ b/src/devices/sound/sp0250.cpp @@ -22,7 +22,7 @@ static constexpr int PWM_CLOCKS = 39; DEFINE_DEVICE_TYPE(SP0250, sp0250_device, "sp0250", "GI SP0250 LPC") -sp0250_device::sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sp0250_device::sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SP0250, tag, owner, clock), device_sound_interface(mconfig, *this), m_timer(nullptr), diff --git a/src/devices/sound/sp0250.h b/src/devices/sound/sp0250.h index 31c32ef4d5d..4b473d4d05d 100644 --- a/src/devices/sound/sp0250.h +++ b/src/devices/sound/sp0250.h @@ -8,7 +8,7 @@ class sp0250_device : public device_t, public device_sound_interface { public: - sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto drq() { return m_drq.bind(); } void set_pwm_mode() { m_pwm_mode = true; } diff --git a/src/devices/sound/sp0256.cpp b/src/devices/sound/sp0256.cpp index 7f709ec90c0..b8e69cee24d 100644 --- a/src/devices/sound/sp0256.cpp +++ b/src/devices/sound/sp0256.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(SP0256, sp0256_device, "sp0256", "GI SP0256 Narrator Speech P // LIVE DEVICE //************************************************************************** -sp0256_device::sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sp0256_device::sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SP0256, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_rom(*this, DEVICE_SELF) diff --git a/src/devices/sound/sp0256.h b/src/devices/sound/sp0256.h index 0047b5bb0a3..6b91a399f1f 100644 --- a/src/devices/sound/sp0256.h +++ b/src/devices/sound/sp0256.h @@ -40,7 +40,7 @@ class sp0256_device : public device_t, public device_sound_interface { public: - sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto data_request_callback() { return m_drq_cb.bind(); } auto standby_callback() { return m_sby_cb.bind(); } diff --git a/src/devices/sound/spkrdev.cpp b/src/devices/sound/spkrdev.cpp index 7d9333d02cb..77d01f880f1 100644 --- a/src/devices/sound/spkrdev.cpp +++ b/src/devices/sound/spkrdev.cpp @@ -84,7 +84,7 @@ static constexpr int RATE_MULTIPLIER = 4; DEFINE_DEVICE_TYPE(SPEAKER_SOUND, speaker_sound_device, "speaker_sound_device", "Filtered DAC") -speaker_sound_device::speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +speaker_sound_device::speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPEAKER_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_num_levels(2) diff --git a/src/devices/sound/spkrdev.h b/src/devices/sound/spkrdev.h index 98289857f07..2d8fc409e87 100644 --- a/src/devices/sound/spkrdev.h +++ b/src/devices/sound/spkrdev.h @@ -17,7 +17,7 @@ class speaker_sound_device : public device_t, public device_sound_interface { public: - speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ~speaker_sound_device() {} // configuration diff --git a/src/devices/sound/spu.cpp b/src/devices/sound/spu.cpp index 7cc987a8067..0e9a5111379 100644 --- a/src/devices/sound/spu.cpp +++ b/src/devices/sound/spu.cpp @@ -937,7 +937,7 @@ static int shift_register15(int &shift) // spu_device - constructor //------------------------------------------------- -spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, psxcpu_device *cpu) +spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, psxcpu_device *cpu) : spu_device(mconfig, tag, owner, clock) { cpu->spu_read().set(tag, FUNC(spu_device::read)); @@ -947,7 +947,7 @@ spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t irq_handler().set(*cpu->subdevice("irq"), FUNC(psxirq_device::intin9)); } -spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPU, tag, owner, clock), device_sound_interface(mconfig, *this), m_irq_handler(*this), diff --git a/src/devices/sound/spu.h b/src/devices/sound/spu.h index 7aee602e38c..9cb7a4bc74d 100644 --- a/src/devices/sound/spu.h +++ b/src/devices/sound/spu.h @@ -200,8 +200,8 @@ protected: static reverb_preset *find_reverb_preset(const unsigned short *param); public: - spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, psxcpu_device *cpu); - spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, psxcpu_device *cpu); + spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/sound/st0016.cpp b/src/devices/sound/st0016.cpp index 39d85aed58b..bb90e3483c1 100644 --- a/src/devices/sound/st0016.cpp +++ b/src/devices/sound/st0016.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ST0016, st0016_device, "st0016", "Seta ST0016 (Audio)") // st0016_device - constructor //------------------------------------------------- -st0016_device::st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +st0016_device::st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ST0016, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/sound/st0016.h b/src/devices/sound/st0016.h index c965687732e..655833e1cfa 100644 --- a/src/devices/sound/st0016.h +++ b/src/devices/sound/st0016.h @@ -15,7 +15,7 @@ class st0016_device : public device_t, public device_sound_interface, public device_memory_interface { public: - st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 snd_r(offs_t offset); void snd_w(offs_t offset, u8 data); diff --git a/src/devices/sound/swp00.cpp b/src/devices/sound/swp00.cpp index c985da89b8c..a793d2352e8 100644 --- a/src/devices/sound/swp00.cpp +++ b/src/devices/sound/swp00.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(SWP00, swp00_device, "swp00", "Yamaha SWP00 (TC170C120SF / XQ036A00) sound chip") -swp00_device::swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +swp00_device::swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SWP00, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/swp00.h b/src/devices/sound/swp00.h index 166ebe0951e..b36daaa2055 100644 --- a/src/devices/sound/swp00.h +++ b/src/devices/sound/swp00.h @@ -14,7 +14,7 @@ class swp00_device : public device_t, public device_sound_interface, public device_rom_interface<25+2, 2, 0, ENDIANNESS_LITTLE> { public: - swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 33868800); + swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 33868800); void map(address_map &map); diff --git a/src/devices/sound/swp20.cpp b/src/devices/sound/swp20.cpp index da4ef34dc4d..c48bb3d69f1 100644 --- a/src/devices/sound/swp20.cpp +++ b/src/devices/sound/swp20.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(SWP20, swp20_device, "swp20", "Yamaha SWP20 sound chip") -swp20_device::swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +swp20_device::swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SWP20, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/swp20.h b/src/devices/sound/swp20.h index 83f665fdc5b..5989a42a216 100644 --- a/src/devices/sound/swp20.h +++ b/src/devices/sound/swp20.h @@ -13,7 +13,7 @@ class swp20_device : public device_t, public device_sound_interface, public device_rom_interface<23+2, 1, 0, ENDIANNESS_LITTLE> { public: - swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 11289600); + swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 11289600); void map(address_map &map); diff --git a/src/devices/sound/swp30.cpp b/src/devices/sound/swp30.cpp index 5dd853f8151..28d01317c14 100644 --- a/src/devices/sound/swp30.cpp +++ b/src/devices/sound/swp30.cpp @@ -171,7 +171,7 @@ static int scount = 0; DEFINE_DEVICE_TYPE(SWP30, swp30_device, "swp30", "Yamaha SWP30 sound chip") -swp30_device::swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +swp30_device::swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SWP30, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/swp30.h b/src/devices/sound/swp30.h index 0ef1223eb4f..a2f7c989917 100644 --- a/src/devices/sound/swp30.h +++ b/src/devices/sound/swp30.h @@ -14,7 +14,7 @@ class swp30_device : public device_t, public device_sound_interface, public device_rom_interface<25+2, 2, 0, ENDIANNESS_LITTLE> { public: - swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 33868800); + swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(33868800)); void map(address_map &map); diff --git a/src/devices/sound/t6721a.cpp b/src/devices/sound/t6721a.cpp index 2c29e31dc62..4053bae39e9 100644 --- a/src/devices/sound/t6721a.cpp +++ b/src/devices/sound/t6721a.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(T6721A, t6721a_device, "t6721a", "Toshiba T6721A") // t6721a_device - constructor //------------------------------------------------- -t6721a_device::t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +t6721a_device::t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, T6721A, tag, owner, clock), device_sound_interface(mconfig, *this), m_write_eos(*this), diff --git a/src/devices/sound/t6721a.h b/src/devices/sound/t6721a.h index 52a76393894..ca6b57875a6 100644 --- a/src/devices/sound/t6721a.h +++ b/src/devices/sound/t6721a.h @@ -45,7 +45,7 @@ class t6721a_device : public device_t, public device_sound_interface { public: - t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration helpers auto eos_handler() { return m_write_eos.bind(); } diff --git a/src/devices/sound/t6w28.cpp b/src/devices/sound/t6w28.cpp index 9525794e489..0f8604cd366 100644 --- a/src/devices/sound/t6w28.cpp +++ b/src/devices/sound/t6w28.cpp @@ -347,7 +347,7 @@ void t6w28_device::set_enable(bool enable) DEFINE_DEVICE_TYPE(T6W28, t6w28_device, "t6w28", "T6W28") -t6w28_device::t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +t6w28_device::t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, T6W28, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_channel(nullptr) diff --git a/src/devices/sound/t6w28.h b/src/devices/sound/t6w28.h index 6b953449f87..8090bf5c57a 100644 --- a/src/devices/sound/t6w28.h +++ b/src/devices/sound/t6w28.h @@ -8,7 +8,7 @@ class t6w28_device : public device_t, public device_sound_interface { public: - t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); void set_enable(bool enable); diff --git a/src/devices/sound/ta7630.cpp b/src/devices/sound/ta7630.cpp index 6dcb84455b9..3888cda6e1b 100644 --- a/src/devices/sound/ta7630.cpp +++ b/src/devices/sound/ta7630.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(TA7630, ta7630_device, "ta7630", "Toshiba TA7630P") // ta7630_device - constructor //------------------------------------------------- -ta7630_device::ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ta7630_device::ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TA7630, tag, owner, clock) // ,device_sound_interface(mconfig, *this) { diff --git a/src/devices/sound/ta7630.h b/src/devices/sound/ta7630.h index e32b4bab407..8a7fed74a74 100644 --- a/src/devices/sound/ta7630.h +++ b/src/devices/sound/ta7630.h @@ -22,7 +22,7 @@ class ta7630_device : public device_t { public: // construction/destruction - ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // filter setters void set_device_volume(device_sound_interface *device,uint8_t value); diff --git a/src/devices/sound/tc8830f.cpp b/src/devices/sound/tc8830f.cpp index f9f65975347..56e4c89be92 100644 --- a/src/devices/sound/tc8830f.cpp +++ b/src/devices/sound/tc8830f.cpp @@ -24,7 +24,7 @@ // device type definition DEFINE_DEVICE_TYPE(TC8830F, tc8830f_device, "tc8830f", "Toshiba TC8830F") -tc8830f_device::tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc8830f_device::tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC8830F, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), m_playing(false), diff --git a/src/devices/sound/tc8830f.h b/src/devices/sound/tc8830f.h index 0a447b02dba..abed8b26787 100644 --- a/src/devices/sound/tc8830f.h +++ b/src/devices/sound/tc8830f.h @@ -21,7 +21,7 @@ class tc8830f_device : public device_t, { public: // construction/destruction - tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void reset(); void write_p(uint8_t data); diff --git a/src/devices/sound/tiaintf.cpp b/src/devices/sound/tiaintf.cpp index 5a64db7bb4c..ea7f1ba3996 100644 --- a/src/devices/sound/tiaintf.cpp +++ b/src/devices/sound/tiaintf.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(TIA, tia_device, "tia_sound", "Atari TIA (Sound)") // tia_device - constructor //------------------------------------------------- -tia_device::tia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tia_device::tia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIA, tag, owner, clock), device_sound_interface(mconfig, *this), m_channel(nullptr), diff --git a/src/devices/sound/tiaintf.h b/src/devices/sound/tiaintf.h index 8ef5d0341f7..1ea6c6a0f96 100644 --- a/src/devices/sound/tiaintf.h +++ b/src/devices/sound/tiaintf.h @@ -14,7 +14,7 @@ class tia_device : public device_t, public device_sound_interface { public: - tia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void tia_sound_w(offs_t offset, uint8_t data); diff --git a/src/devices/sound/tms3615.cpp b/src/devices/sound/tms3615.cpp index 3f595c8a97b..1d4da0533c2 100644 --- a/src/devices/sound/tms3615.cpp +++ b/src/devices/sound/tms3615.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(TMS3615, tms3615_device, "tms3615", "TMS3615") // tms3615_device - constructor //------------------------------------------------- -tms3615_device::tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms3615_device::tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS3615, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_channel(nullptr) diff --git a/src/devices/sound/tms3615.h b/src/devices/sound/tms3615.h index a1eeaab5318..9b93cdefe77 100644 --- a/src/devices/sound/tms3615.h +++ b/src/devices/sound/tms3615.h @@ -19,7 +19,7 @@ public: static constexpr unsigned FOOTAGE_8 = 0; static constexpr unsigned FOOTAGE_16 = 1; - tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void enable_w(int enable); diff --git a/src/devices/sound/tms36xx.cpp b/src/devices/sound/tms36xx.cpp index 08df1d03f51..477fca324f4 100644 --- a/src/devices/sound/tms36xx.cpp +++ b/src/devices/sound/tms36xx.cpp @@ -320,7 +320,7 @@ DEFINE_DEVICE_TYPE(TMS36XX, tms36xx_device, "tms36xx", "TMS36XX") // tms36xx_device - constructor //------------------------------------------------- -tms36xx_device::tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms36xx_device::tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS36XX, tag, owner, clock), device_sound_interface(mconfig, *this), m_subtype(nullptr), diff --git a/src/devices/sound/tms36xx.h b/src/devices/sound/tms36xx.h index 5693e3b8e7c..854d04c47fd 100644 --- a/src/devices/sound/tms36xx.h +++ b/src/devices/sound/tms36xx.h @@ -24,7 +24,7 @@ public: TMS3617 = 17 // Monster Bash (13 notes, six outputs) }; - tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_subtype(subtype type) { diff --git a/src/devices/sound/tms5110.cpp b/src/devices/sound/tms5110.cpp index a9d3395a4d2..e91a65f4471 100644 --- a/src/devices/sound/tms5110.cpp +++ b/src/devices/sound/tms5110.cpp @@ -1433,12 +1433,12 @@ DEFINE_DEVICE_TYPE(TMS5110A, tms5110a_device, "tms5110a", "TMS5110A") DEFINE_DEVICE_TYPE(M58817, m58817_device, "m58817", "M58817") -tms5110_device::tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms5110_device::tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, TMS5110, tag, owner, clock, TMS5110_IS_TMS5110A) { } -tms5110_device::tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant) +tms5110_device::tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_table(*this, DEVICE_SELF) @@ -1452,49 +1452,49 @@ tms5110_device::tms5110_device(const machine_config &mconfig, device_type type, } -tms5100_device::tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms5100_device::tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, TMS5100, tag, owner, clock, TMS5110_IS_TMC0281) { } -tmc0281_device::tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmc0281_device::tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, TMC0281, tag, owner, clock, TMS5110_IS_TMC0281) { } -tms5100a_device::tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms5100a_device::tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, TMS5100A, tag, owner, clock, TMS5110_IS_TMC0281D) { } -tmc0281d_device::tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmc0281d_device::tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, TMC0281D, tag, owner, clock, TMS5110_IS_TMC0281D) { } -cd2801_device::cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cd2801_device::cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, CD2801, tag, owner, clock, TMS5110_IS_CD2801) { } -cd2802_device::cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cd2802_device::cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, CD2802, tag, owner, clock, TMS5110_IS_CD2802) { } -tms5110a_device::tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms5110a_device::tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, TMS5110A, tag, owner, clock, TMS5110_IS_TMS5110A) { } -m58817_device::m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m58817_device::m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5110_device(mconfig, M58817, tag, owner, clock, TMS5110_IS_M58817) { } @@ -1502,7 +1502,7 @@ m58817_device::m58817_device(const machine_config &mconfig, const char *tag, dev DEFINE_DEVICE_TYPE(TMSPROM, tmsprom_device, "tmsprom", "TMSPROM") -tmsprom_device::tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmsprom_device::tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMSPROM, tag, owner, clock), m_rom(*this, DEVICE_SELF), m_prom(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/sound/tms5110.h b/src/devices/sound/tms5110.h index 9d907668a70..8d2f05199ce 100644 --- a/src/devices/sound/tms5110.h +++ b/src/devices/sound/tms5110.h @@ -33,7 +33,7 @@ public: static constexpr uint8_t CMD_READ_BRANCH = 12; /* 1 1 0 x | 1 */ static constexpr uint8_t CMD_TEST_TALK = 14; /* 1 1 1 x | 3 */ - tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto m0() { return m_m0_cb.bind(); } auto m1() { return m_m1_cb.bind(); } @@ -50,7 +50,7 @@ public: int romclk_hack_r(); protected: - tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant); + tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant); // device-level overrides virtual void device_start() override; @@ -187,56 +187,56 @@ private: class tms5100_device : public tms5110_device { public: - tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tmc0281_device : public tms5110_device { public: - tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms5100a_device : public tms5110_device { public: - tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tmc0281d_device : public tms5110_device { public: - tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cd2801_device : public tms5110_device { public: - cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cd2802_device : public tms5110_device { public: - cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms5110a_device : public tms5110_device { public: - tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class m58817_device : public tms5110_device { public: - m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t status_r(); }; @@ -259,7 +259,7 @@ DECLARE_DEVICE_TYPE(M58817, m58817_device) class tmsprom_device : public device_t { public: - tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_region(const char *region) { m_prom.set_tag(region); } void set_rom_size(uint32_t rom_size) { m_rom_size = rom_size; } diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp index 77622b12fef..be059840e05 100644 --- a/src/devices/sound/tms5220.cpp +++ b/src/devices/sound/tms5220.cpp @@ -2085,18 +2085,18 @@ DEFINE_DEVICE_TYPE(TMS5200, tms5200_device, "tms5200", "TMS5200") DEFINE_DEVICE_TYPE(CD2501ECD, cd2501ecd_device, "cd2501ecd", "CD2501ECD") -tms5220c_device::tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms5220c_device::tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5220_device(mconfig, TMS5220C, tag, owner, clock, TMS5220_IS_5220C) { } -tms5220_device::tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms5220_device::tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5220_device(mconfig, TMS5220, tag, owner, clock, TMS5220_IS_5220) { } -tms5220_device::tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant) +tms5220_device::tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_variant(variant) @@ -2112,19 +2112,19 @@ tms5220_device::tms5220_device(const machine_config &mconfig, device_type type, } -cd2501e_device::cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cd2501e_device::cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5220_device(mconfig, CD2501E, tag, owner, clock, TMS5220_IS_CD2501E) { } -tms5200_device::tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms5200_device::tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5220_device(mconfig, TMS5200, tag, owner, clock, TMS5220_IS_5200) { } -cd2501ecd_device::cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cd2501ecd_device::cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms5220_device(mconfig, CD2501ECD, tag, owner, clock, TMS5220_IS_CD2501ECD) { } diff --git a/src/devices/sound/tms5220.h b/src/devices/sound/tms5220.h index 82a589c486d..9a4fab8e24f 100644 --- a/src/devices/sound/tms5220.h +++ b/src/devices/sound/tms5220.h @@ -23,7 +23,7 @@ public: WS=1 }; - tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // IRQ callback function, active low, i.e. state=0 auto irq_cb() { return m_irq_handler.bind(); } @@ -65,7 +65,7 @@ public: READ_LINE_MEMBER( intq_r ); protected: - tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant); + tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant); // device-level overrides virtual void device_start() override; @@ -249,28 +249,28 @@ private: class tms5220c_device : public tms5220_device { public: - tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cd2501e_device : public tms5220_device { public: - cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms5200_device : public tms5220_device { public: - tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cd2501ecd_device : public tms5220_device { public: - cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/sound/tt5665.cpp b/src/devices/sound/tt5665.cpp index 363481669ff..46228a3d02c 100644 --- a/src/devices/sound/tt5665.cpp +++ b/src/devices/sound/tt5665.cpp @@ -117,7 +117,7 @@ const stream_buffer::sample_t tt5665_device::s_volume_table[16] = // tt5665_device - constructor //------------------------------------------------- -tt5665_device::tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tt5665_device::tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TT5665, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/tt5665.h b/src/devices/sound/tt5665.h index 5d3f0a155bc..83498aff951 100644 --- a/src/devices/sound/tt5665.h +++ b/src/devices/sound/tt5665.h @@ -35,13 +35,13 @@ public: }; // construction/destruction - tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, ss_state ss, u8 s0_s1) + tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, ss_state ss, u8 s0_s1) : tt5665_device(mconfig, tag, owner, clock) { config_ss(ss); config_s0_s1(s0_s1); } - tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void config_ss(ss_state ss) { assert(!started()); m_ss_state = ss; } diff --git a/src/devices/sound/uda1344.cpp b/src/devices/sound/uda1344.cpp index 183ba51fd36..51e783c198a 100644 --- a/src/devices/sound/uda1344.cpp +++ b/src/devices/sound/uda1344.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(UDA1344, uda1344_device, "ud1344", "Philips UDA1344 Codec") -uda1344_device::uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +uda1344_device::uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UDA1344, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/devices/sound/uda1344.h b/src/devices/sound/uda1344.h index 7bb07856df7..eeac89d53cc 100644 --- a/src/devices/sound/uda1344.h +++ b/src/devices/sound/uda1344.h @@ -14,7 +14,7 @@ class uda1344_device : public device_t, public device_sound_interface { public: - uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void l3_addr_w(offs_t offset, uint8_t data); void l3_data_w(offs_t offset, uint8_t data); diff --git a/src/devices/sound/upd1771.cpp b/src/devices/sound/upd1771.cpp index 4e865ea2c42..554bfa68890 100644 --- a/src/devices/sound/upd1771.cpp +++ b/src/devices/sound/upd1771.cpp @@ -237,7 +237,7 @@ const unsigned char noise_tbl[]= DEFINE_DEVICE_TYPE(UPD1771C, upd1771c_device, "upd1771c", "NEC uPD1771C 017") -upd1771c_device::upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd1771c_device::upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD1771C, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_ack_handler(*this) diff --git a/src/devices/sound/upd1771.h b/src/devices/sound/upd1771.h index 7c5cc5f7f95..432da4003bb 100644 --- a/src/devices/sound/upd1771.h +++ b/src/devices/sound/upd1771.h @@ -18,7 +18,7 @@ class upd1771c_device : public device_t, public device_sound_interface { public: - upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ack_handler() { return m_ack_handler.bind(); } diff --git a/src/devices/sound/upd7752.cpp b/src/devices/sound/upd7752.cpp index 7c063fbee95..31949384492 100644 --- a/src/devices/sound/upd7752.cpp +++ b/src/devices/sound/upd7752.cpp @@ -43,7 +43,7 @@ void upd7752_device::upd7752_ram(address_map &map) // upd7752_device - constructor //------------------------------------------------- -upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7752, tag, owner, clock), device_sound_interface(mconfig, *this), device_memory_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/upd7752.h b/src/devices/sound/upd7752.h index 9693ee99f4d..d143f7e73f2 100644 --- a/src/devices/sound/upd7752.h +++ b/src/devices/sound/upd7752.h @@ -16,7 +16,7 @@ class upd7752_device : public device_t, public device_sound_interface, public de { public: // construction/destruction - upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void write(offs_t offset, uint8_t data); diff --git a/src/devices/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp index ea1790a40b5..58f12396431 100644 --- a/src/devices/sound/upd7759.cpp +++ b/src/devices/sound/upd7759.cpp @@ -147,7 +147,7 @@ #define FRAC_MASK (FRAC_ONE - 1) -upd775x_device::upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +upd775x_device::upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) @@ -183,13 +183,13 @@ upd775x_device::upd775x_device(const machine_config &mconfig, device_type type, DEFINE_DEVICE_TYPE(UPD7759, upd7759_device, "upd7759", "NEC uPD7759") -upd7759_device::upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7759_device::upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd7759_device(mconfig, UPD7759, tag, owner, clock) { } -upd7759_device::upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +upd7759_device::upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : upd775x_device(mconfig, type, tag, owner, clock) , m_drqcallback(*this) , m_timer(nullptr) @@ -199,12 +199,12 @@ upd7759_device::upd7759_device(const machine_config &mconfig, device_type type, DEFINE_DEVICE_TYPE(UPD7756, upd7756_device, "upd7756", "NEC uPD7756") -upd7756_device::upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7756_device::upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd7756_device(mconfig, UPD7756, tag, owner, clock) { } -upd7756_device::upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +upd7756_device::upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : upd775x_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/sound/upd7759.h b/src/devices/sound/upd7759.h index f23bdb51ac3..7a9dcbd127c 100644 --- a/src/devices/sound/upd7759.h +++ b/src/devices/sound/upd7759.h @@ -18,7 +18,7 @@ class upd775x_device : public device_t, public device_rom_interface<17> { public: - enum : u32 { STANDARD_CLOCK = 640'000 }; + static constexpr XTAL STANDARD_CLOCK = XTAL::u(640'000); DECLARE_WRITE_LINE_MEMBER( reset_w ); DECLARE_WRITE_LINE_MEMBER( start_w ); @@ -63,7 +63,7 @@ protected: MODE_SLAVE }; - upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -128,12 +128,12 @@ class upd7759_device : public upd775x_device public: auto drq() { return m_drqcallback.bind(); } - upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = STANDARD_CLOCK); + upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = STANDARD_CLOCK); DECLARE_WRITE_LINE_MEMBER( md_w ); protected: - upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -152,10 +152,10 @@ protected: class upd7756_device : public upd775x_device { public: - upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = STANDARD_CLOCK); + upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = STANDARD_CLOCK); protected: - upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_reset() override; diff --git a/src/devices/sound/upd934g.cpp b/src/devices/sound/upd934g.cpp index b57886685e1..5bb84d6745d 100644 --- a/src/devices/sound/upd934g.cpp +++ b/src/devices/sound/upd934g.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(UPD934G, upd934g_device, "upd934g", "NEC uPD934G") // upd934g_device - constructor //------------------------------------------------- -upd934g_device::upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +upd934g_device::upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD934G, tag, owner, clock), device_sound_interface(mconfig, *this), m_data_cb(*this), diff --git a/src/devices/sound/upd934g.h b/src/devices/sound/upd934g.h index 1340dd7bf60..77bf9fa3083 100644 --- a/src/devices/sound/upd934g.h +++ b/src/devices/sound/upd934g.h @@ -24,7 +24,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // construction/destruction - upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto data_callback() { return m_data_cb.bind(); } diff --git a/src/devices/sound/vgm_visualizer.cpp b/src/devices/sound/vgm_visualizer.cpp index bab3c909ddf..ac5287330bf 100644 --- a/src/devices/sound/vgm_visualizer.cpp +++ b/src/devices/sound/vgm_visualizer.cpp @@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(VGMVIZ, vgmviz_device, "vgmviz", "VGM Visualizer") // vgmviz_device - constructor //------------------------------------------------- -vgmviz_device::vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vgmviz_device::vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VGMVIZ, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , m_screen(*this, "screen") diff --git a/src/devices/sound/vgm_visualizer.h b/src/devices/sound/vgm_visualizer.h index 516e4e4bfad..e4001dd53a2 100644 --- a/src/devices/sound/vgm_visualizer.h +++ b/src/devices/sound/vgm_visualizer.h @@ -39,11 +39,7 @@ class vgmviz_device : public device_t, public device_mixer_interface { public: // construction/destruction - vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner) - : vgmviz_device(mconfig, tag, owner, 0) - { - } - vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~vgmviz_device(); void cycle_viz_mode(); diff --git a/src/devices/sound/vlm5030.cpp b/src/devices/sound/vlm5030.cpp index 15f302f307e..e2502ffbb7d 100644 --- a/src/devices/sound/vlm5030.cpp +++ b/src/devices/sound/vlm5030.cpp @@ -159,7 +159,7 @@ static const int vlm5030_speed_table[8] = DEFINE_DEVICE_TYPE(VLM5030, vlm5030_device, "vlm5030", "Sanyo VLM5030") -vlm5030_device::vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vlm5030_device::vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VLM5030, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/devices/sound/vlm5030.h b/src/devices/sound/vlm5030.h index 1eddcdc45bf..aaa8aebb9cd 100644 --- a/src/devices/sound/vlm5030.h +++ b/src/devices/sound/vlm5030.h @@ -10,7 +10,7 @@ class vlm5030_device : public device_t, public device_sound_interface, public device_rom_interface<16> { public: - vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* get BSY pin level */ DECLARE_READ_LINE_MEMBER( bsy ); diff --git a/src/devices/sound/votrax.cpp b/src/devices/sound/votrax.cpp index 1ec2343f72f..237db849a9b 100644 --- a/src/devices/sound/votrax.cpp +++ b/src/devices/sound/votrax.cpp @@ -75,7 +75,7 @@ const double votrax_sc01_device::s_glottal_wave[9] = }; -votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VOTRAX_SC01, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), diff --git a/src/devices/sound/votrax.h b/src/devices/sound/votrax.h index 2dcc7d087da..58ab20af024 100644 --- a/src/devices/sound/votrax.h +++ b/src/devices/sound/votrax.h @@ -20,7 +20,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // construction/destruction - votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ar_callback() { return m_ar_cb.bind(); } diff --git a/src/devices/sound/vrc6.cpp b/src/devices/sound/vrc6.cpp index d9b36f5b8a6..e43d3a43c04 100644 --- a/src/devices/sound/vrc6.cpp +++ b/src/devices/sound/vrc6.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VRC6, vrc6snd_device, "vrc6snd", "Konami 053329 VRC VI (Sound // vrc6snd_device - constructor //------------------------------------------------- -vrc6snd_device::vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vrc6snd_device::vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VRC6, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_freqctrl(0), m_pulsectrl{ 0, 0 }, m_sawrate(0), m_master_freq(0) diff --git a/src/devices/sound/vrc6.h b/src/devices/sound/vrc6.h index eb17dabff82..5464d869fa9 100644 --- a/src/devices/sound/vrc6.h +++ b/src/devices/sound/vrc6.h @@ -22,7 +22,7 @@ class vrc6snd_device : public device_t, public device_sound_interface { public: // construction/destruction - vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, u8 data); diff --git a/src/devices/sound/vrender0.cpp b/src/devices/sound/vrender0.cpp index fd86b56adea..4e630cbf1ea 100644 --- a/src/devices/sound/vrender0.cpp +++ b/src/devices/sound/vrender0.cpp @@ -121,7 +121,7 @@ DEFINE_DEVICE_TYPE(SOUND_VRENDER0, vr0sound_device, "vr0sound", "MagicEyes VRend // vr0sound_device - constructor //------------------------------------------------- -vr0sound_device::vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vr0sound_device::vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SOUND_VRENDER0, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/sound/vrender0.h b/src/devices/sound/vrender0.h index 1e234232c69..9667a8d9ece 100644 --- a/src/devices/sound/vrender0.h +++ b/src/devices/sound/vrender0.h @@ -27,7 +27,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_irq_cb.bind(); } diff --git a/src/devices/sound/wave.cpp b/src/devices/sound/wave.cpp index 1a53aaa95f7..3adea26793d 100644 --- a/src/devices/sound/wave.cpp +++ b/src/devices/sound/wave.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(WAVE, wave_device, "wave", "Cassette Sound") -wave_device::wave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wave_device::wave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WAVE, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_cass(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/sound/wave.h b/src/devices/sound/wave.h index 73c9b94873a..e374717bad9 100644 --- a/src/devices/sound/wave.h +++ b/src/devices/sound/wave.h @@ -23,11 +23,11 @@ class wave_device : public device_t, public device_sound_interface public: template wave_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cassette_tag) - : wave_device(mconfig, tag, owner, uint32_t(0)) + : wave_device(mconfig, tag, owner) { m_cass.set_tag(std::forward(cassette_tag)); } - wave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + wave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_cassette_tag(T &&cassette_tag) { m_cass.set_tag(std::forward(cassette_tag)); } diff --git a/src/devices/sound/x1_010.cpp b/src/devices/sound/x1_010.cpp index d18f40c5f84..c56a6be63b5 100644 --- a/src/devices/sound/x1_010.cpp +++ b/src/devices/sound/x1_010.cpp @@ -86,7 +86,7 @@ struct X1_010_CHANNEL DEFINE_DEVICE_TYPE(X1_010, x1_010_device, "x1_010", "Seta X1-010") -x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X1_010, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/x1_010.h b/src/devices/sound/x1_010.h index a107534d4ae..4cdab69865c 100644 --- a/src/devices/sound/x1_010.h +++ b/src/devices/sound/x1_010.h @@ -10,7 +10,7 @@ class x1_010_device : public device_t, public device_sound_interface, public device_rom_interface<20> { public: - x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(offs_t offset); void write(offs_t offset, u8 data); diff --git a/src/devices/sound/xt446.cpp b/src/devices/sound/xt446.cpp index 9dc3053f1ff..b4cd6cbacd2 100644 --- a/src/devices/sound/xt446.cpp +++ b/src/devices/sound/xt446.cpp @@ -35,7 +35,7 @@ ROM_START( xt446 ) ROM_LOAD32_WORD( "xt463a0.ic38", 0x1000002, 0x400000, CRC(cce5f8d3) SHA1(bdca8c5158f452f2b5535c7d658c9b22c6d66048) ) ROM_END -xt446_device::xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xt446_device::xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XT446, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , m_maincpu(*this, "maincpu") diff --git a/src/devices/sound/xt446.h b/src/devices/sound/xt446.h index 5404dfd3466..c845f4ad776 100644 --- a/src/devices/sound/xt446.h +++ b/src/devices/sound/xt446.h @@ -18,7 +18,7 @@ class xt446_device : public device_t, public device_mixer_interface { public: - xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void midi_w(int state) { m_midi_serial->rx_w(state); } diff --git a/src/devices/sound/ym2154.cpp b/src/devices/sound/ym2154.cpp index 287529aeeec..9dec45d504f 100644 --- a/src/devices/sound/ym2154.cpp +++ b/src/devices/sound/ym2154.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(YM2154, ym2154_device, "ym2154", "YM2154 (RYP4)") // ym2154_device - constructor //------------------------------------------------- -ym2154_device::ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2154_device::ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, YM2154, tag, owner, clock), device_sound_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/devices/sound/ym2154.h b/src/devices/sound/ym2154.h index e7f287409fa..613a27abd47 100644 --- a/src/devices/sound/ym2154.h +++ b/src/devices/sound/ym2154.h @@ -19,7 +19,7 @@ class ym2154_device : public device_t, public device_sound_interface, public dev public: // internal constructor - ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_update_irq.bind(); } diff --git a/src/devices/sound/ymf271.cpp b/src/devices/sound/ymf271.cpp index 886d6d516d5..bbb36481fa5 100644 --- a/src/devices/sound/ymf271.cpp +++ b/src/devices/sound/ymf271.cpp @@ -1788,7 +1788,7 @@ void ymf271_device::rom_bank_pre_change() DEFINE_DEVICE_TYPE(YMF271, ymf271_device, "ymf271", "Yamaha YMF271 OPX") -ymf271_device::ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ymf271_device::ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, YMF271, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/ymf271.h b/src/devices/sound/ymf271.h index 04d49c57f09..c3113e8c707 100644 --- a/src/devices/sound/ymf271.h +++ b/src/devices/sound/ymf271.h @@ -12,7 +12,7 @@ class ymf271_device : public device_t, public device_sound_interface, public dev public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/sound/ymfm_mame.h b/src/devices/sound/ymfm_mame.h index d0161426619..27a7d002b18 100644 --- a/src/devices/sound/ymfm_mame.h +++ b/src/devices/sound/ymfm_mame.h @@ -30,7 +30,7 @@ class ym_generic_device : public device_t, public device_sound_interface, public { public: // constructor - ym_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : + ym_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), m_timer{ nullptr, nullptr }, @@ -177,7 +177,7 @@ protected: public: // constructor - ymfm_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : + ymfm_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) : ym_generic_device(mconfig, tag, owner, clock, type), m_stream(nullptr), m_chip(*this) @@ -201,7 +201,7 @@ protected: ym_generic_device::device_start(); // allocate our stream - m_stream = device_sound_interface::stream_alloc(0, OUTPUTS, m_chip.sample_rate(device_t::clock())); + m_stream = device_sound_interface::stream_alloc(0, OUTPUTS, XTAL::u(m_chip.sample_rate(device_t::clock().value()))); // compute the size of the save buffer by doing an initial save ymfm::ymfm_saved_state state(m_save_blob, true); @@ -221,7 +221,7 @@ protected: virtual void device_clock_changed() override { if (m_stream != nullptr) - m_stream->set_sample_rate(m_chip.sample_rate(device_t::clock())); + m_stream->set_sample_rate(XTAL::u(m_chip.sample_rate(device_t::clock().value()))); } // handle pre-saving by filling the blob @@ -303,7 +303,7 @@ class ymfm_ssg_device_base : public ymfm_device_base public: // constructor - ymfm_ssg_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : + ymfm_ssg_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) : ymfm_device_base(mconfig, tag, owner, clock, type) { } diff --git a/src/devices/sound/ymopl.cpp b/src/devices/sound/ymopl.cpp index 92e9eb99928..e647e6fd4bf 100644 --- a/src/devices/sound/ymopl.cpp +++ b/src/devices/sound/ymopl.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(YM3526, ym3526_device, "ym3526", "YM3526 OPL") // ym3526_device - constructor //------------------------------------------------- -ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM3526) { } @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(Y8950, y8950_device, "y8950", "Y8950 OPL MSX-Audio") // y8950_device - constructor //------------------------------------------------- -y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, Y8950), device_rom_interface(mconfig, *this) { @@ -89,7 +89,7 @@ DEFINE_DEVICE_TYPE(YM3812, ym3812_device, "ym3812", "YM3812 OPL2") // ym3812_device - constructor //------------------------------------------------- -ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM3812) { } @@ -106,7 +106,7 @@ DEFINE_DEVICE_TYPE(YMF262, ymf262_device, "ymf262", "YMF262 OPL3") // ymf262_device - constructor //------------------------------------------------- -ymf262_device::ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ymf262_device::ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YMF262) { } @@ -123,7 +123,7 @@ DEFINE_DEVICE_TYPE(YMF278B, ymf278b_device, "ymf278b", "YMF278B OPL4") // ymf278b_device - constructor //------------------------------------------------- -ymf278b_device::ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ymf278b_device::ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YMF278B), device_rom_interface(mconfig, *this) { @@ -192,7 +192,7 @@ DEFINE_DEVICE_TYPE(YM2413, ym2413_device, "ym2413", "YM2413 OPLL") // ym2413_device - constructor //------------------------------------------------- -ym2413_device::ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2413_device::ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM2413), m_internal(*this, "internal") { @@ -240,7 +240,7 @@ DEFINE_DEVICE_TYPE(YM2423, ym2423_device, "ym2423", "YM2423 OPLL-X") // ym2423_device - constructor //------------------------------------------------- -ym2423_device::ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2423_device::ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM2423), m_internal(*this, "internal") { @@ -288,7 +288,7 @@ DEFINE_DEVICE_TYPE(YMF281, ymf281_device, "ymf281", "YMF281 OPLLP") // ymf281_device - constructor //------------------------------------------------- -ymf281_device::ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ymf281_device::ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YMF281), m_internal(*this, "internal") { @@ -336,7 +336,7 @@ DEFINE_DEVICE_TYPE(DS1001, ds1001_device, "ds1001", "Yamaha DS1001 / Konami 0539 // ds1001_device - constructor //------------------------------------------------- -ds1001_device::ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ds1001_device::ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, DS1001), m_internal(*this, "internal") { diff --git a/src/devices/sound/ymopl.h b/src/devices/sound/ymopl.h index 6d5f279be03..e44627db955 100644 --- a/src/devices/sound/ymopl.h +++ b/src/devices/sound/ymopl.h @@ -19,7 +19,7 @@ class ym3526_device : public ymfm_device_base { public: // constructor - ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -33,7 +33,7 @@ class y8950_device : public ymfm_device_base, public device_rom_int public: // constructor - y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto io_read() { return io_read_handler(0); } @@ -63,7 +63,7 @@ class ym3812_device : public ymfm_device_base { public: // constructor - ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -75,7 +75,7 @@ class ymf262_device : public ymfm_device_base { public: // constructor - ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional register writes void address_hi_w(u8 data) { update_streams().write_address_hi(data); } @@ -93,7 +93,7 @@ class ymf278b_device : public ymfm_device_base, public device_rom public: // constructor - ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional register reads uint8_t data_pcm_r() { return update_streams().read_data_pcm(); } @@ -128,7 +128,7 @@ class ym2413_device : public ymfm_device_base public: // constructor - ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -150,7 +150,7 @@ class ym2423_device : public ymfm_device_base public: // constructor - ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -172,7 +172,7 @@ class ymf281_device : public ymfm_device_base public: // constructor - ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -194,7 +194,7 @@ class ds1001_device : public ymfm_device_base public: // constructor - ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/sound/ymopm.cpp b/src/devices/sound/ymopm.cpp index a75da72b449..1f73821a48e 100644 --- a/src/devices/sound/ymopm.cpp +++ b/src/devices/sound/ymopm.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(YM2151, ym2151_device, "ym2151", "YM2151 OPM") // ym2151_device - constructor //------------------------------------------------- -ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM2151), m_reset_state(1) { @@ -75,7 +75,7 @@ DEFINE_DEVICE_TYPE(YM2164, ym2164_device, "ym2164", "YM2164 OPP") // ym2164_device - constructor //------------------------------------------------- -ym2164_device::ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2164_device::ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM2164) { } diff --git a/src/devices/sound/ymopm.h b/src/devices/sound/ymopm.h index ce4a7c87f51..f156f40397c 100644 --- a/src/devices/sound/ymopm.h +++ b/src/devices/sound/ymopm.h @@ -20,7 +20,7 @@ class ym2151_device : public ymfm_device_base public: // constructor - ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers, handled by the interface auto port_write_handler() { return io_write_handler(); } @@ -47,7 +47,7 @@ class ym2164_device : public ymfm_device_base { public: // constructor - ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers, handled by the interface auto port_write_handler() { return io_write_handler(); } diff --git a/src/devices/sound/ymopn.cpp b/src/devices/sound/ymopn.cpp index de18330fa89..9f373941145 100644 --- a/src/devices/sound/ymopn.cpp +++ b/src/devices/sound/ymopn.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(YM2203, ym2203_device, "ym2203", "YM2203 OPN") // ym2203_device - constructor //------------------------------------------------- -ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_ssg_device_base(mconfig, tag, owner, clock, YM2203) { } @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(YM2608, ym2608_device, "ym2608", "YM2608 OPNA") // ym2608_device - constructor //------------------------------------------------- -ym2608_device::ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2608_device::ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_ssg_device_base(mconfig, tag, owner, clock, YM2608), device_rom_interface(mconfig, *this), m_internal(*this, "internal") @@ -147,7 +147,7 @@ void ym2608_device::ymfm_external_write(ymfm::access_class type, uint32_t offset //------------------------------------------------- template -ym2610_device_base::ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : +ym2610_device_base::ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) : ymfm_ssg_device_base(mconfig, tag, owner, clock, type), device_memory_interface(mconfig, *this), m_adpcm_a_config("adpcm_a", ENDIANNESS_LITTLE, 8, 24, 0), @@ -227,7 +227,7 @@ DEFINE_DEVICE_TYPE(YM2610, ym2610_device, "ym2610", "YM2610 OPNB") // ym2610_device - constructor //------------------------------------------------- -ym2610_device::ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2610_device::ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ym2610_device_base(mconfig, tag, owner, clock, YM2610) { } @@ -243,7 +243,7 @@ DEFINE_DEVICE_TYPE(YM2610B, ym2610b_device, "ym2610b", "YM2610B OPNB2") // ym2610b_device - constructor //------------------------------------------------- -ym2610b_device::ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2610b_device::ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ym2610_device_base(mconfig, tag, owner, clock, YM2610B) { } @@ -260,7 +260,7 @@ DEFINE_DEVICE_TYPE(YM2612, ym2612_device, "ym2612", "YM2612 OPN2") // ym2612_device - constructor //------------------------------------------------- -ym2612_device::ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2612_device::ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM2612) { } @@ -277,7 +277,7 @@ DEFINE_DEVICE_TYPE(YM3438, ym3438_device, "ym3438", "YM3438 OPN2C") // ym3438_device - constructor //------------------------------------------------- -ym3438_device::ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym3438_device::ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM3438) { } @@ -294,7 +294,7 @@ DEFINE_DEVICE_TYPE(YMF276, ymf276_device, "ymf276", "YMF276 OPN2L") // ymf276_device - constructor //------------------------------------------------- -ymf276_device::ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ymf276_device::ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YMF276) { } diff --git a/src/devices/sound/ymopn.h b/src/devices/sound/ymopn.h index 93b0999be8c..65cbde934e0 100644 --- a/src/devices/sound/ymopn.h +++ b/src/devices/sound/ymopn.h @@ -21,7 +21,7 @@ class ym2203_device : public ymfm_ssg_device_base public: // constructor - ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers, handled by the interface auto port_a_read_callback() { return io_read_handler(0); } @@ -48,7 +48,7 @@ class ym2608_device : public ymfm_ssg_device_base, public device_r public: // constructor - ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers, handled by the interface auto port_a_read_callback() { return io_read_handler(0); } @@ -92,7 +92,7 @@ class ym2610_device_base : public ymfm_ssg_device_base, public device public: // constructor - ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type); + ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type); // additional register reads u8 data_r() { return update_streams().read_data(); } @@ -131,7 +131,7 @@ DECLARE_DEVICE_TYPE(YM2610, ym2610_device); class ym2610_device : public ym2610_device_base { public: - ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -142,7 +142,7 @@ DECLARE_DEVICE_TYPE(YM2610B, ym2610b_device); class ym2610b_device : public ym2610_device_base { public: - ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -154,7 +154,7 @@ class ym2612_device : public ymfm_device_base { public: // constructor - ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional register writes void address_hi_w(u8 data) { update_streams().write_address_hi(data); } @@ -170,7 +170,7 @@ class ym3438_device : public ymfm_device_base { public: // constructor - ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional register writes void address_hi_w(u8 data) { update_streams().write_address_hi(data); } @@ -186,7 +186,7 @@ class ymf276_device : public ymfm_device_base { public: // constructor - ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // additional register writes void address_hi_w(u8 data) { update_streams().write_address_hi(data); } diff --git a/src/devices/sound/ymopq.cpp b/src/devices/sound/ymopq.cpp index 3286dd7cf3b..4bc5fb21252 100644 --- a/src/devices/sound/ymopq.cpp +++ b/src/devices/sound/ymopq.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(YM3806, ym3806_device, "ym3806", "YM3806 OPQ") // ym3806_device - constructor //------------------------------------------------- -ym3806_device::ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym3806_device::ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM3806) { } @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(YM3533, ym3533_device, "ym3533", "YM3533 OPQ") // ym3533_device - constructor //------------------------------------------------- -ym3533_device::ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym3533_device::ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM3533) { } diff --git a/src/devices/sound/ymopq.h b/src/devices/sound/ymopq.h index 39a76e7307d..f2d7f31608e 100644 --- a/src/devices/sound/ymopq.h +++ b/src/devices/sound/ymopq.h @@ -18,7 +18,7 @@ class ym3806_device : public ymfm_device_base { public: // constructor - ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -30,7 +30,7 @@ class ym3533_device : public ymfm_device_base { public: // constructor - ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_SOUND_YMOPQ_H diff --git a/src/devices/sound/ymopz.cpp b/src/devices/sound/ymopz.cpp index cf629cb7779..c503592dfd1 100644 --- a/src/devices/sound/ymopz.cpp +++ b/src/devices/sound/ymopz.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(YM2414, ym2414_device, "ym2414", "YM2414 OPZ") // ym2414_device - constructor //------------------------------------------------- -ym2414_device::ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ym2414_device::ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymfm_device_base(mconfig, tag, owner, clock, YM2414) { } diff --git a/src/devices/sound/ymopz.h b/src/devices/sound/ymopz.h index 133da4160f4..33d3cf3292a 100644 --- a/src/devices/sound/ymopz.h +++ b/src/devices/sound/ymopz.h @@ -20,7 +20,7 @@ class ym2414_device : public ymfm_device_base public: // constructor - ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers, handled by the interface auto port_write_handler() { return io_write_handler(); } diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp index ef4e9bf1190..d0a2750aa7a 100644 --- a/src/devices/sound/ymz280b.cpp +++ b/src/devices/sound/ymz280b.cpp @@ -551,7 +551,7 @@ void ymz280b_device::device_start() compute_tables(); /* initialize the rest of the structure */ - m_master_clock = (double)clock() / 384.0; + m_master_clock = clock() / 384; m_irq_handler.resolve(); for (int i = 0; i < 8; i++) @@ -641,7 +641,7 @@ void ymz280b_device::device_reset() void ymz280b_device::device_clock_changed() { - m_master_clock = (double)clock() / 384.0; + m_master_clock = clock() / 384; m_stream->set_sample_rate(INTERNAL_SAMPLE_RATE); } @@ -908,7 +908,7 @@ void ymz280b_device::write(offs_t offset, u8 data) DEFINE_DEVICE_TYPE(YMZ280B, ymz280b_device, "ymz280b", "Yamaha YMZ280B PCMD8") -ymz280b_device::ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ymz280b_device::ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, YMZ280B, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/sound/ymz280b.h b/src/devices/sound/ymz280b.h index 319f85b83f4..29f648c38e6 100644 --- a/src/devices/sound/ymz280b.h +++ b/src/devices/sound/ymz280b.h @@ -19,7 +19,7 @@ class ymz280b_device : public device_t, public device_sound_interface, public device_rom_interface<24> { public: - ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } @@ -104,7 +104,7 @@ private: devcb_write_line m_irq_handler; /* IRQ callback */ - double m_master_clock; /* master clock frequency */ + XTAL m_master_clock; /* master clock frequency */ sound_stream *m_stream; /* which stream are we using */ std::unique_ptr m_scratch; #if YMZ280B_MAKE_WAVS diff --git a/src/devices/sound/ymz770.cpp b/src/devices/sound/ymz770.cpp index b19c21514e5..87e2807832d 100644 --- a/src/devices/sound/ymz770.cpp +++ b/src/devices/sound/ymz770.cpp @@ -48,12 +48,12 @@ DEFINE_DEVICE_TYPE(YMZ774, ymz774_device, "ymz774", "Yamaha YMZ774 AMMS2C") // ymz770_device - constructor //------------------------------------------------- -ymz770_device::ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ymz770_device::ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymz770_device(mconfig, YMZ770, tag, owner, clock, 16000) { } -ymz770_device::ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t sclock) +ymz770_device::ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t sclock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) @@ -456,7 +456,7 @@ void ymz770_device::internal_reg_write(uint8_t reg, uint8_t data) // ymz774_device //------------------------------------------------- -ymz774_device::ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ymz774_device::ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ymz770_device(mconfig, YMZ774, tag, owner, clock, 44100) { // calculate volume increments, fixed point values, fractions of 0x20000 diff --git a/src/devices/sound/ymz770.h b/src/devices/sound/ymz770.h index c8850b2e2bc..219e08e6da1 100644 --- a/src/devices/sound/ymz770.h +++ b/src/devices/sound/ymz770.h @@ -24,7 +24,7 @@ class ymz770_device : public device_t, public device_sound_interface { public: // construction/destruction - ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); @@ -41,7 +41,7 @@ protected: virtual void sequencer(); uint8_t get_rom_byte(uint32_t offset) { return m_rom[offset % m_rom.bytes()]; } // need optimise or its good as is ? - ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t sclock); + ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t sclock); sound_stream *m_stream; uint32_t m_sclock; @@ -111,7 +111,7 @@ class ymz774_device : public ymz770_device { public: // construction/destruction - ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); diff --git a/src/devices/sound/zsg2.cpp b/src/devices/sound/zsg2.cpp index 518d765ccc3..dca71a28f97 100644 --- a/src/devices/sound/zsg2.cpp +++ b/src/devices/sound/zsg2.cpp @@ -115,7 +115,7 @@ DEFINE_DEVICE_TYPE(ZSG2, zsg2_device, "zsg2", "ZOOM ZSG-2") // zsg2_device - constructor //------------------------------------------------- -zsg2_device::zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +zsg2_device::zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZSG2, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_mem_base(*this, DEVICE_SELF) diff --git a/src/devices/sound/zsg2.h b/src/devices/sound/zsg2.h index 0239f6ff03d..49982ec2d4a 100644 --- a/src/devices/sound/zsg2.h +++ b/src/devices/sound/zsg2.h @@ -15,7 +15,7 @@ class zsg2_device : public device_t, public device_sound_interface { public: - zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto ext_read() { return m_ext_read_handler.bind(); } diff --git a/src/devices/video/315_5124.cpp b/src/devices/video/315_5124.cpp index 7bb4fd18407..2604b18c352 100644 --- a/src/devices/video/315_5124.cpp +++ b/src/devices/video/315_5124.cpp @@ -248,13 +248,13 @@ void sega315_5124_device::sega315_5124(address_map &map) } -sega315_5124_device::sega315_5124_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega315_5124_device::sega315_5124_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega315_5124_device(mconfig, SEGA315_5124, tag, owner, clock, SEGA315_5124_CRAM_SIZE, 0x00, 0x0f, 4, 8, line_315_5124) { } -sega315_5124_device::sega315_5124_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing) +sega315_5124_device::sega315_5124_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_video_interface(mconfig, *this) @@ -278,26 +278,26 @@ sega315_5124_device::sega315_5124_device(const machine_config &mconfig, device_t } -sega315_5246_device::sega315_5246_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega315_5246_device::sega315_5246_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega315_5124_device(mconfig, SEGA315_5246, tag, owner, clock, SEGA315_5124_CRAM_SIZE, 0x00, 0x0f, 8, 8, line_315_5124) { } -sega315_5246_device::sega315_5246_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing) +sega315_5246_device::sega315_5246_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing) : sega315_5124_device(mconfig, type, tag, owner, clock, cram_size, palette_offset, reg_num_mask, max_sprite_zoom_hcount, max_sprite_zoom_vcount, line_timing) { } // Embedded mode 4 support of the 315-5313 VDP (see 315_5313.cpp), used by Sega Genesis/Mega Drive -sega315_5313_mode4_device::sega315_5313_mode4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing) +sega315_5313_mode4_device::sega315_5313_mode4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing) : sega315_5246_device(mconfig, type, tag, owner, clock, cram_size, palette_offset, reg_num_mask, max_sprite_zoom_hcount, max_sprite_zoom_vcount, line_timing) { } -sega315_5377_device::sega315_5377_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega315_5377_device::sega315_5377_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega315_5246_device(mconfig, SEGA315_5377, tag, owner, clock, SEGA315_5377_CRAM_SIZE, 0x10, 0x0f, 8, 8, line_315_5377) { } diff --git a/src/devices/video/315_5124.h b/src/devices/video/315_5124.h index 913fdb71e18..8ffd614da7c 100644 --- a/src/devices/video/315_5124.h +++ b/src/devices/video/315_5124.h @@ -53,7 +53,7 @@ public: // construction/destruction - sega315_5124_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega315_5124_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_hcounter_divide(unsigned divide) { m_hcounter_divide = divide; } void set_is_pal(bool is_pal) { m_is_pal = is_pal; } @@ -88,7 +88,7 @@ protected: static constexpr unsigned SEGA315_5377_CRAM_SIZE = 0x40; /* 32 colors x 2 bytes per color = 64 bytes */ static constexpr unsigned SEGA315_5124_CRAM_SIZE = 0x20; /* 32 colors x 1 bytes per color = 32 bytes */ - sega315_5124_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); + sega315_5124_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); // device-level overrides virtual void device_post_load() override; @@ -211,10 +211,10 @@ protected: class sega315_5246_device : public sega315_5124_device { public: - sega315_5246_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega315_5246_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sega315_5246_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); + sega315_5246_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); virtual void device_add_mconfig(machine_config &config) override; @@ -233,12 +233,12 @@ private: class sega315_5377_device : public sega315_5246_device { public: - sega315_5377_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega315_5377_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void set_sega315_5124_compatibility_mode(bool sega315_5124_compatibility_mode) override; protected: - sega315_5377_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); + sega315_5377_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override; @@ -260,7 +260,7 @@ public: void stop_timers(); protected: - sega315_5313_mode4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); + sega315_5313_mode4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cram_size, u8 palette_offset, u8 reg_num_mask, int max_sprite_zoom_hcount, int max_sprite_zoom_vcount, const u8 *line_timing); virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/video/315_5313.cpp b/src/devices/video/315_5313.cpp index 9d79b2dc396..38428915220 100644 --- a/src/devices/video/315_5313.cpp +++ b/src/devices/video/315_5313.cpp @@ -174,7 +174,7 @@ int sega315_5313_device::screen_hpos() { return screen().hpos() / (m_lcm_scaling DEFINE_DEVICE_TYPE(SEGA315_5313, sega315_5313_device, "sega315_5313", "Sega 315-5313 Megadrive VDP") -sega315_5313_device::sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega315_5313_device::sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) // mode 4 support, for SMS compatibility, is implemented in 315_5124.cpp : sega315_5313_mode4_device(mconfig, SEGA315_5313, tag, owner, clock, SEGA315_5124_CRAM_SIZE, 0x00, 0x1f, 0, 0, line_315_5313_mode4) , device_gfx_interface(mconfig, *this, nullptr, "gfx_palette") diff --git a/src/devices/video/315_5313.h b/src/devices/video/315_5313.h index 23bd51f3f33..acb8a51caf2 100644 --- a/src/devices/video/315_5313.h +++ b/src/devices/video/315_5313.h @@ -16,13 +16,13 @@ public: static constexpr unsigned PALETTE_PER_FRAME = 64 * 313 * 2; // 313 total scanlines for PAL systems, *2 for interlaced template - sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpu_tag) + sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : sega315_5313_device(mconfig, tag, owner, clock) { m_cpu68k.set_tag(std::forward(cpu_tag)); } - sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega315_5313_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); typedef device_delegate md_32x_scanline_delegate; typedef device_delegate md_32x_interrupt_delegate; diff --git a/src/devices/video/am8052.cpp b/src/devices/video/am8052.cpp index e97e2488b9f..3bdd8adbee5 100644 --- a/src/devices/video/am8052.cpp +++ b/src/devices/video/am8052.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(AM8052, am8052_device, "am8052", "Am8052 CRTC") // am8052_device - constructor //------------------------------------------------- -am8052_device::am8052_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am8052_device::am8052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM8052, tag, owner, clock) , m_pointer(0x1f) { diff --git a/src/devices/video/am8052.h b/src/devices/video/am8052.h index 74fee1ea69f..3ec372a2cf0 100644 --- a/src/devices/video/am8052.h +++ b/src/devices/video/am8052.h @@ -21,7 +21,7 @@ class am8052_device : public device_t { public: // device constructor - am8052_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + am8052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read/write handlers void pointer_w(u16 data); diff --git a/src/devices/video/avgdvg.cpp b/src/devices/video/avgdvg.cpp index ba3ddff0d11..db47ea23dfc 100644 --- a/src/devices/video/avgdvg.cpp +++ b/src/devices/video/avgdvg.cpp @@ -26,7 +26,7 @@ * *************************************/ -#define MASTER_CLOCK (12096000) +#define MASTER_CLOCK XTAL::u(12096000) #define VGSLICE (10000) #define VGVECTOR 0 #define VGCLIP 1 @@ -1417,7 +1417,7 @@ void avg_bzone_device::device_start() } -avgdvg_device_base::avgdvg_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +avgdvg_device_base::avgdvg_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_vector(*this, finder_base::DUMMY_TAG), m_memspace(*this, finder_base::DUMMY_TAG, -1), @@ -1443,46 +1443,46 @@ avgdvg_device_base::avgdvg_device_base(const machine_config &mconfig, device_typ { } -dvg_device::dvg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +dvg_device::dvg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avgdvg_device_base(mconfig, DVG, tag, owner, clock) { } -avg_device::avg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +avg_device::avg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avg_device(mconfig, AVG, tag, owner, clock) { } -avg_device::avg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +avg_device::avg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : avgdvg_device_base(mconfig, type, tag, owner, clock) { } -avg_tempest_device::avg_tempest_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +avg_tempest_device::avg_tempest_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avg_device(mconfig, AVG_TEMPEST, tag, owner, clock), m_colorram(*this, "colorram") { } -avg_mhavoc_device::avg_mhavoc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +avg_mhavoc_device::avg_mhavoc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avg_device(mconfig, AVG_MHAVOC, tag, owner, clock), m_colorram(*this, "colorram"), m_bank_region(*this, DEVICE_SELF) { } -avg_starwars_device::avg_starwars_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +avg_starwars_device::avg_starwars_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avg_device(mconfig, AVG_STARWARS, tag, owner, clock) { } -avg_quantum_device::avg_quantum_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +avg_quantum_device::avg_quantum_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avg_device(mconfig, AVG_QUANTUM, tag, owner, clock), m_colorram(*this, "colorram") { } -avg_bzone_device::avg_bzone_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +avg_bzone_device::avg_bzone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : avg_device(mconfig, AVG_BZONE, tag, owner, clock) { } diff --git a/src/devices/video/avgdvg.h b/src/devices/video/avgdvg.h index e77dff1e9a2..43dc92dc391 100644 --- a/src/devices/video/avgdvg.h +++ b/src/devices/video/avgdvg.h @@ -45,7 +45,7 @@ protected: int status; }; - avgdvg_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + avgdvg_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -118,7 +118,7 @@ private: class dvg_device : public avgdvg_device_base { public: - dvg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dvg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -144,10 +144,10 @@ private: class avg_device : public avgdvg_device_base { public: - avg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + avg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - avg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + avg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -185,7 +185,7 @@ protected: class avg_tempest_device : public avg_device { public: - avg_tempest_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + avg_tempest_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int handler_6() override; @@ -200,7 +200,7 @@ private: class avg_mhavoc_device : public avg_device { public: - avg_mhavoc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + avg_mhavoc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -226,7 +226,7 @@ private: class avg_starwars_device : public avg_device { public: - avg_starwars_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + avg_starwars_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int handler_6() override; @@ -238,7 +238,7 @@ protected: class avg_quantum_device : public avg_device { public: - avg_quantum_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + avg_quantum_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int handler_0() override; @@ -260,7 +260,7 @@ private: class avg_bzone_device : public avg_device { public: - avg_bzone_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + avg_bzone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/video/bt431.cpp b/src/devices/video/bt431.cpp index a4a32e98716..570c4f6239e 100644 --- a/src/devices/video/bt431.cpp +++ b/src/devices/video/bt431.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(BT431, bt431_device, "bt431", "Bt431 64x64 Pixel Cursor Generator") -bt431_device::bt431_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +bt431_device::bt431_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BT431, tag, owner, clock) { } diff --git a/src/devices/video/bt431.h b/src/devices/video/bt431.h index 1ea71b56794..782457c78e3 100644 --- a/src/devices/video/bt431.h +++ b/src/devices/video/bt431.h @@ -9,7 +9,7 @@ class bt431_device : public device_t { public: - bt431_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + bt431_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); enum register_number : unsigned { diff --git a/src/devices/video/bt459.cpp b/src/devices/video/bt459.cpp index 1f2a48d968b..d394e02baca 100644 --- a/src/devices/video/bt459.cpp +++ b/src/devices/video/bt459.cpp @@ -32,7 +32,7 @@ void bt459_device::map(address_map &map) map(0x03, 0x03).rw(FUNC(bt459_device::palette_r), FUNC(bt459_device::palette_w)); } -bt459_device::bt459_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt459_device::bt459_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BT459, tag, owner, clock) , device_palette_interface(mconfig, *this) { diff --git a/src/devices/video/bt459.h b/src/devices/video/bt459.h index 2d525383378..0479cf768d5 100644 --- a/src/devices/video/bt459.h +++ b/src/devices/video/bt459.h @@ -8,7 +8,7 @@ class bt459_device : public device_t, public device_palette_interface { public: - bt459_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt459_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const u8 BT459_ID = 0x4a; // magic number found in the id register static const u8 BT459_REV = 0xb0; // device revision B found in revision register diff --git a/src/devices/video/bt45x.cpp b/src/devices/video/bt45x.cpp index 26594307513..1f71e606b38 100644 --- a/src/devices/video/bt45x.cpp +++ b/src/devices/video/bt45x.cpp @@ -85,59 +85,59 @@ void bt455_device::map(address_map &map) map(0x03, 0x03).rw(FUNC(bt455_device::overlay_r), FUNC(bt455_device::overlay_w)); } -bt45x_device_base::bt45x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const u32 palette_colors, const u32 overlay_colors) +bt45x_device_base::bt45x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u32 palette_colors, const u32 overlay_colors) : device_t(mconfig, type, tag, owner, clock) , m_palette_colors(palette_colors) , m_overlay_colors(overlay_colors) { } -bt45x_rgb_device_base::bt45x_rgb_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const u32 palette_colors, const u32 overlay_colors) +bt45x_rgb_device_base::bt45x_rgb_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u32 palette_colors, const u32 overlay_colors) : bt45x_device_base(mconfig, type, tag, owner, clock, palette_colors, overlay_colors) , device_palette_interface(mconfig, *this) { } -bt45x_mono_device_base::bt45x_mono_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const u32 palette_colors, const u32 overlay_colors) +bt45x_mono_device_base::bt45x_mono_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u32 palette_colors, const u32 overlay_colors) : bt45x_device_base(mconfig, type, tag, owner, clock, palette_colors, overlay_colors) { } -bt451_device::bt451_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt451_device::bt451_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt45x_rgb_device_base(mconfig, BT451, tag, owner, clock, 256, 4) { } -bt453_device::bt453_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt453_device::bt453_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt45x_rgb_device_base(mconfig, BT453, tag, owner, clock, 256, 4) { } -bt454_device::bt454_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt454_device::bt454_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt45x_rgb_device_base(mconfig, BT454, tag, owner, clock, 16, 1) { } -bt455_device::bt455_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt455_device::bt455_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt45x_mono_device_base(mconfig, BT455, tag, owner, clock, 16, 1) { } -bt457_device::bt457_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt457_device::bt457_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt45x_mono_device_base(mconfig, BT457, tag, owner, clock, 256, 4) { } -bt458_device::bt458_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +bt458_device::bt458_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : bt45x_rgb_device_base(mconfig, type, tag, owner, clock, 256, 4) { } -bt458_device::bt458_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt458_device::bt458_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt458_device(mconfig, BT458, tag, owner, clock) { } -bt467_device::bt467_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bt467_device::bt467_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bt458_device(mconfig, BT467, tag, owner, clock) { } diff --git a/src/devices/video/bt45x.h b/src/devices/video/bt45x.h index 33cd63abd56..cb689a79bc5 100644 --- a/src/devices/video/bt45x.h +++ b/src/devices/video/bt45x.h @@ -45,7 +45,7 @@ public: virtual void map(address_map &map); protected: - bt45x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const u32 palette_colors, const u32 overlay_colors); + bt45x_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u32 palette_colors, const u32 overlay_colors); virtual void device_start() override; virtual void device_reset() override; @@ -80,7 +80,7 @@ protected: class bt45x_rgb_device_base : public bt45x_device_base, public device_palette_interface { protected: - bt45x_rgb_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const u32 palette_colors, const u32 overlay_colors); + bt45x_rgb_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u32 palette_colors, const u32 overlay_colors); virtual void device_start() override; @@ -107,7 +107,7 @@ public: } protected: - bt45x_mono_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const u32 palette_colors, const u32 overlay_colors); + bt45x_mono_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u32 palette_colors, const u32 overlay_colors); virtual void device_start() override; @@ -122,7 +122,7 @@ protected: class bt451_device : public bt45x_rgb_device_base { public: - bt451_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt451_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: /* @@ -135,7 +135,7 @@ protected: class bt453_device : public bt45x_rgb_device_base { public: - bt453_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt453_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; @@ -143,7 +143,7 @@ public: class bt454_device : public bt45x_rgb_device_base { public: - bt454_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt454_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; @@ -151,7 +151,7 @@ public: class bt455_device : public bt45x_mono_device_base { public: - bt455_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt455_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; @@ -159,7 +159,7 @@ public: class bt457_device : public bt45x_mono_device_base { public: - bt457_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt457_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 palette_r(address_space &space) override; @@ -173,16 +173,16 @@ protected: class bt458_device : public bt45x_rgb_device_base { public: - bt458_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt458_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - bt458_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bt458_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; class bt467_device : public bt458_device { public: - bt467_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bt467_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(BT451, bt451_device) diff --git a/src/devices/video/bt47x.cpp b/src/devices/video/bt47x.cpp index d5aea56a400..49bdc31fbce 100644 --- a/src/devices/video/bt47x.cpp +++ b/src/devices/video/bt47x.cpp @@ -65,7 +65,7 @@ void bt475_device_base::map(address_map &map) map(0x06, 0x06).rw(FUNC(bt475_device_base::command_r), FUNC(bt475_device_base::command_w)); } -bt47x_device_base::bt47x_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits) +bt47x_device_base::bt47x_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits) : device_t(mconfig, type, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_palette_colors(palette_colors) @@ -74,32 +74,32 @@ bt47x_device_base::bt47x_device_base(machine_config const &mconfig, device_type { } -bt475_device_base::bt475_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits) +bt475_device_base::bt475_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits) : bt47x_device_base(mconfig, type, tag, owner, clock, palette_colors, overlay_colors, color_bits) { } -bt471_device::bt471_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +bt471_device::bt471_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : bt47x_device_base(mconfig, BT471, tag, owner, clock, 256, 16, 6) { } -bt475_device::bt475_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +bt475_device::bt475_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : bt475_device_base(mconfig, BT475, tag, owner, clock, 256, 16, 6) { } -bt476_device::bt476_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +bt476_device::bt476_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : bt47x_device_base(mconfig, BT476, tag, owner, clock, 256, 0, 6) { } -bt477_device::bt477_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +bt477_device::bt477_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : bt475_device_base(mconfig, BT477, tag, owner, clock, 256, 16, 8) { } -bt478_device::bt478_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +bt478_device::bt478_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : bt47x_device_base(mconfig, BT478, tag, owner, clock, 256, 16, 8) { } diff --git a/src/devices/video/bt47x.h b/src/devices/video/bt47x.h index a51fe2c3df8..97163cca35b 100644 --- a/src/devices/video/bt47x.h +++ b/src/devices/video/bt47x.h @@ -17,7 +17,7 @@ public: virtual void map(address_map &map); protected: - bt47x_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits); + bt47x_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits); // device_t overrides virtual void device_start() override; @@ -60,7 +60,7 @@ public: virtual void map(address_map &map) override; protected: - bt475_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits); + bt475_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, unsigned const palette_colors, unsigned const overlay_colors, unsigned const color_bits); // device_t overrides virtual void device_start() override; @@ -85,25 +85,25 @@ protected: class bt471_device : public bt47x_device_base { public: - bt471_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + bt471_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class bt475_device : public bt475_device_base { public: - bt475_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + bt475_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class bt476_device : public bt47x_device_base { public: - bt476_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + bt476_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; class bt477_device : public bt475_device_base { public: - bt477_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + bt477_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual unsigned color_bits() const override { return (m_command & D1) ? 8 : 6; } @@ -112,7 +112,7 @@ protected: class bt478_device : public bt47x_device_base { public: - bt478_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + bt478_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(BT471, bt471_device) diff --git a/src/devices/video/bufsprite.cpp b/src/devices/video/bufsprite.cpp index 1c7180ec8cd..408a63b5c4f 100644 --- a/src/devices/video/bufsprite.cpp +++ b/src/devices/video/bufsprite.cpp @@ -29,7 +29,7 @@ buffered_spriteram_device::buffered_spriteram_device( device_type type, const char *tag, device_t *owner, - uint32_t clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_spriteram(*this, DEVICE_SELF) { @@ -48,28 +48,28 @@ void buffered_spriteram_device::device_start() -buffered_spriteram8_device::buffered_spriteram8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +buffered_spriteram8_device::buffered_spriteram8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : buffered_spriteram_device(mconfig, BUFFERED_SPRITERAM8, tag, owner, clock) { } -buffered_spriteram16_device::buffered_spriteram16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +buffered_spriteram16_device::buffered_spriteram16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : buffered_spriteram_device(mconfig, BUFFERED_SPRITERAM16, tag, owner, clock) { } -buffered_spriteram32_device::buffered_spriteram32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +buffered_spriteram32_device::buffered_spriteram32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : buffered_spriteram_device(mconfig, BUFFERED_SPRITERAM32, tag, owner, clock) { } -buffered_spriteram64_device::buffered_spriteram64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +buffered_spriteram64_device::buffered_spriteram64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : buffered_spriteram_device(mconfig, BUFFERED_SPRITERAM64, tag, owner, clock) { } diff --git a/src/devices/video/bufsprite.h b/src/devices/video/bufsprite.h index 6716592d0c5..2baf5cd8dd5 100644 --- a/src/devices/video/bufsprite.h +++ b/src/devices/video/bufsprite.h @@ -66,7 +66,7 @@ protected: device_type type, const char *tag, device_t *owner, - uint32_t clock); + const XTAL &clock); // first-time setup virtual void device_start() override; @@ -84,7 +84,7 @@ class buffered_spriteram8_device : public buffered_spriteram_device { public: // construction - buffered_spriteram8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + buffered_spriteram8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; @@ -94,7 +94,7 @@ class buffered_spriteram16_device : public buffered_spriteram_device { public: // construction - buffered_spriteram16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + buffered_spriteram16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; @@ -104,7 +104,7 @@ class buffered_spriteram32_device : public buffered_spriteram_device { public: // construction - buffered_spriteram32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + buffered_spriteram32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; @@ -114,7 +114,7 @@ class buffered_spriteram64_device : public buffered_spriteram_device { public: // construction - buffered_spriteram64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + buffered_spriteram64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/video/catseye.cpp b/src/devices/video/catseye.cpp index 46eeb917f37..f3a49dfa994 100644 --- a/src/devices/video/catseye.cpp +++ b/src/devices/video/catseye.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(CATSEYE, catseye_device, "catseye", "HP Catseye ASIC") -catseye_device::catseye_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +catseye_device::catseye_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t{mconfig, type, tag, owner, clock}, m_vram{*this, { "^vram_video", "^vram_overlay"}}, m_int_write_func{*this}, @@ -60,7 +60,7 @@ catseye_device::catseye_device(const machine_config &mconfig, device_type type, { } -catseye_device::catseye_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +catseye_device::catseye_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : catseye_device(mconfig, CATSEYE, tag, owner, clock) { } diff --git a/src/devices/video/catseye.h b/src/devices/video/catseye.h index 8c66eb257c7..77f80ecb7d2 100644 --- a/src/devices/video/catseye.h +++ b/src/devices/video/catseye.h @@ -10,7 +10,7 @@ class catseye_device: public device_t public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } - catseye_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + catseye_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t vram_r(offs_t offset, uint16_t mem_mask = ~0); void vram_w(offs_t offset, u16 data, u16 mem_mask = ~0); @@ -43,7 +43,7 @@ public: protected: required_shared_ptr_array m_vram; - catseye_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + catseye_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); devcb_write8 m_int_write_func; TIMER_CALLBACK_MEMBER(blink_callback); diff --git a/src/devices/video/cdp1861.cpp b/src/devices/video/cdp1861.cpp index e19074045aa..69139782146 100644 --- a/src/devices/video/cdp1861.cpp +++ b/src/devices/video/cdp1861.cpp @@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(CDP1861, cdp1861_device, "cdp1861", "RCA CDP1861") // cdp1861_device - constructor //------------------------------------------------- -cdp1861_device::cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdp1861_device::cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1861, tag, owner, clock) , device_video_interface(mconfig, *this) , m_write_int(*this) diff --git a/src/devices/video/cdp1861.h b/src/devices/video/cdp1861.h index c038223a50e..2fcaa7792f1 100644 --- a/src/devices/video/cdp1861.h +++ b/src/devices/video/cdp1861.h @@ -62,7 +62,7 @@ public: static constexpr unsigned SCANLINE_EFX_BOTTOM_END = SCANLINE_DISPLAY_END; // construction/destruction - cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1861_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_cb() { return m_write_int.bind(); } auto dma_out_cb() { return m_write_dma_out.bind(); } diff --git a/src/devices/video/cdp1862.cpp b/src/devices/video/cdp1862.cpp index 66fa8d9e684..9ebc9c790a8 100644 --- a/src/devices/video/cdp1862.cpp +++ b/src/devices/video/cdp1862.cpp @@ -78,7 +78,7 @@ inline void cdp1862_device::initialize_palette() // cdp1862_device - constructor //------------------------------------------------- -cdp1862_device::cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdp1862_device::cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1862, tag, owner, clock), device_video_interface(mconfig, *this), m_read_rd(*this), diff --git a/src/devices/video/cdp1862.h b/src/devices/video/cdp1862.h index 57aab81b21a..6d1046ff859 100644 --- a/src/devices/video/cdp1862.h +++ b/src/devices/video/cdp1862.h @@ -40,7 +40,7 @@ class cdp1862_device : public device_t, { public: // construction/destruction - cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1862_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto rdata_cb() { return m_read_rd.bind(); } auto bdata_cb() { return m_read_bd.bind(); } diff --git a/src/devices/video/cesblit.cpp b/src/devices/video/cesblit.cpp index 7e0e6a2085b..5253d06edae 100644 --- a/src/devices/video/cesblit.cpp +++ b/src/devices/video/cesblit.cpp @@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(CESBLIT, cesblit_device, "cesblit", "CES Blitter FPGA") // cesblit_device - constructor //------------------------------------------------- -cesblit_device::cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cesblit_device::cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CESBLIT, tag, owner, clock), device_video_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/devices/video/cesblit.h b/src/devices/video/cesblit.h index 2a00d601067..529eacca5ab 100644 --- a/src/devices/video/cesblit.h +++ b/src/devices/video/cesblit.h @@ -27,13 +27,13 @@ public: // construction/destruction template - cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : cesblit_device(mconfig, tag, owner, clock) { set_screen(std::forward(screen_tag)); } - cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cesblit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_compute_addr(compute_addr_t compute_addr) { m_compute_addr = compute_addr; } diff --git a/src/devices/video/clgd542x.cpp b/src/devices/video/clgd542x.cpp index 978e38e792e..13de6633704 100644 --- a/src/devices/video/clgd542x.cpp +++ b/src/devices/video/clgd542x.cpp @@ -46,22 +46,22 @@ DEFINE_DEVICE_TYPE(CIRRUS_GD5430, cirrus_gd5430_device, "clgd5430", "Cirrus Logi DEFINE_DEVICE_TYPE(CIRRUS_GD5446, cirrus_gd5446_device, "clgd5446", "Cirrus Logic GD5446") -cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cirrus_gd5428_device(mconfig, CIRRUS_GD5428, tag, owner, clock) { } -cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, type, tag, owner, clock) { } -cirrus_gd5430_device::cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cirrus_gd5430_device::cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cirrus_gd5428_device(mconfig, CIRRUS_GD5430, tag, owner, clock) { } -cirrus_gd5446_device::cirrus_gd5446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cirrus_gd5446_device::cirrus_gd5446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cirrus_gd5428_device(mconfig, CIRRUS_GD5446, tag, owner, clock) { } diff --git a/src/devices/video/clgd542x.h b/src/devices/video/clgd542x.h index 6177b95c845..ee7bef78eb2 100644 --- a/src/devices/video/clgd542x.h +++ b/src/devices/video/clgd542x.h @@ -16,7 +16,7 @@ class cirrus_gd5428_device : public svga_device { public: // construction/destruction - cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t port_03c0_r(offs_t offset) override; virtual void port_03c0_w(offs_t offset, uint8_t data) override; @@ -30,7 +30,7 @@ public: virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; protected: - cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -111,7 +111,7 @@ private: class cirrus_gd5430_device : public cirrus_gd5428_device { public: - cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -120,7 +120,7 @@ protected: class cirrus_gd5446_device : public cirrus_gd5428_device { public: - cirrus_gd5446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cirrus_gd5446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/video/crt9007.cpp b/src/devices/video/crt9007.cpp index 347a06382a1..67e961f353f 100644 --- a/src/devices/video/crt9007.cpp +++ b/src/devices/video/crt9007.cpp @@ -453,7 +453,7 @@ inline void crt9007_device::recompute_parameters() // crt9007_device - constructor //------------------------------------------------- -crt9007_device::crt9007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +crt9007_device::crt9007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CRT9007, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/crt9007.h b/src/devices/video/crt9007.h index 433ca521f01..36a88e08dbe 100644 --- a/src/devices/video/crt9007.h +++ b/src/devices/video/crt9007.h @@ -49,7 +49,7 @@ class crt9007_device : public device_t, { public: // construction/destruction - crt9007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crt9007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_callback() { return m_write_int.bind(); } auto dmar_callback() { return m_write_dmar.bind(); } diff --git a/src/devices/video/crt9021.cpp b/src/devices/video/crt9021.cpp index 6f1bc8102e2..f65bbd15b31 100644 --- a/src/devices/video/crt9021.cpp +++ b/src/devices/video/crt9021.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(CRT9021, crt9021_device, "crt9021", "SMC CRT9021 VAC") // crt9021_device - constructor //------------------------------------------------- -crt9021_device::crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +crt9021_device::crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CRT9021, tag, owner, clock), device_video_interface(mconfig, *this), m_display_cb(*this), diff --git a/src/devices/video/crt9021.h b/src/devices/video/crt9021.h index 1d071da00df..ea35f860671 100644 --- a/src/devices/video/crt9021.h +++ b/src/devices/video/crt9021.h @@ -51,7 +51,7 @@ public: typedef device_delegate draw_character_delegate; // construction/destruction - crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crt9021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_display_callback(T &&... args) { m_display_cb.set(std::forward(args)...); } diff --git a/src/devices/video/crt9028.cpp b/src/devices/video/crt9028.cpp index 94cc2429e13..60ac9263ffe 100644 --- a/src/devices/video/crt9028.cpp +++ b/src/devices/video/crt9028.cpp @@ -42,7 +42,7 @@ DEFINE_DEVICE_TYPE(CRT9028_000, crt9028_000_device, "crt9028_000", "CRT9028-000 // crt9028_device - constructor //------------------------------------------------- -crt9028_device::crt9028_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, +crt9028_device::crt9028_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int dots_per_char, int chars_per_row, int horiz_blanking, int hsync_delay, int hsync_width, bool hsync_active, int char_rows, int scans_per_char, bool vsync_active, int vert_blanking, int vsync_delay, int vsync_width, @@ -100,7 +100,7 @@ crt9028_device::crt9028_device(const machine_config &mconfig, device_type type, // crt9028_000_device - constructor //------------------------------------------------- -crt9028_000_device::crt9028_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +crt9028_000_device::crt9028_000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : crt9028_device(mconfig, CRT9028_000, tag, owner, clock, 7, 80, 20, 4, 8, false, 24, 10, false, diff --git a/src/devices/video/crt9028.h b/src/devices/video/crt9028.h index d8aa637c06a..3086465e55b 100644 --- a/src/devices/video/crt9028.h +++ b/src/devices/video/crt9028.h @@ -56,7 +56,7 @@ public: protected: // base type constructor - crt9028_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, + crt9028_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int dots_per_char, int chars_per_row, int horiz_blanking, int hsync_delay, int hsync_width, bool hsync_active, int char_rows, int scans_per_char, bool vsync_active, int vert_blanking, int vsync_delay, int vsync_width, @@ -129,7 +129,7 @@ class crt9028_000_device : public crt9028_device { public: // device constructor - crt9028_000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + crt9028_000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-specific overrides diff --git a/src/devices/video/crt9212.cpp b/src/devices/video/crt9212.cpp index 5bbcd8aaac7..5043d81f41c 100644 --- a/src/devices/video/crt9212.cpp +++ b/src/devices/video/crt9212.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(CRT9212, crt9212_device, "crt9212", "SMC CRT9212 DRB") // crt9212_device - constructor //------------------------------------------------- -crt9212_device::crt9212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +crt9212_device::crt9212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CRT9212, tag, owner, clock), m_write_dout(*this), m_write_rof(*this), diff --git a/src/devices/video/crt9212.h b/src/devices/video/crt9212.h index bf32b311c2d..a4ea8324bb6 100644 --- a/src/devices/video/crt9212.h +++ b/src/devices/video/crt9212.h @@ -38,7 +38,7 @@ class crt9212_device : public device_t { public: // construction/destruction - crt9212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crt9212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_wen2(int state) { m_wen2 = state; } auto dout() { return m_write_dout.bind(); } diff --git a/src/devices/video/crtc_ega.cpp b/src/devices/video/crtc_ega.cpp index 4c9a738c110..4df2077565e 100644 --- a/src/devices/video/crtc_ega.cpp +++ b/src/devices/video/crtc_ega.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(CRTC_EGA, crtc_ega_device, "crtc_ega", "IBM EGA CRT Controller") -crtc_ega_device::crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crtc_ega_device::crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CRTC_EGA, tag, owner, clock), device_video_interface(mconfig, *this, false) , m_res_out_de_cb(*this), m_res_out_hsync_cb(*this), m_res_out_vsync_cb(*this), m_res_out_vblank_cb(*this) , m_res_out_irq_cb(*this), m_begin_update_cb(*this), m_row_update_cb(*this), m_end_update_cb(*this) diff --git a/src/devices/video/crtc_ega.h b/src/devices/video/crtc_ega.h index 62bcac8c5c3..266735e45cd 100644 --- a/src/devices/video/crtc_ega.h +++ b/src/devices/video/crtc_ega.h @@ -27,7 +27,7 @@ public: typedef device_delegate end_update_delegate; - crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crtc_ega_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto res_out_de_callback() { return m_res_out_de_cb.bind(); } auto res_out_hsync_callback() { return m_res_out_hsync_cb.bind(); } diff --git a/src/devices/video/decsfb.cpp b/src/devices/video/decsfb.cpp index 528c9897cdc..8c1dde741a7 100644 --- a/src/devices/video/decsfb.cpp +++ b/src/devices/video/decsfb.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(DECSFB, decsfb_device, "decsfb", "Digital Equipment Corporation Smart Frame Buffer") -decsfb_device::decsfb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decsfb_device::decsfb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECSFB, tag, owner, clock), m_int_cb(*this) { diff --git a/src/devices/video/decsfb.h b/src/devices/video/decsfb.h index 9181ae84dbf..45d36cb17f9 100644 --- a/src/devices/video/decsfb.h +++ b/src/devices/video/decsfb.h @@ -9,7 +9,7 @@ class decsfb_device : public device_t { public: - decsfb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decsfb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_cb() { return m_int_cb.bind(); } diff --git a/src/devices/video/dl1416.cpp b/src/devices/video/dl1416.cpp index 4321192e981..e128c692b6b 100644 --- a/src/devices/video/dl1416.cpp +++ b/src/devices/video/dl1416.cpp @@ -95,7 +95,7 @@ u16 const dl1416t_segments[128] = { class dl1414t_device : public dl1414_device { public: - dl1414t_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + dl1414t_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dl1414_device(mconfig, DL1414T, tag, owner, clock) { } @@ -111,7 +111,7 @@ protected: class dl1416b_device : public dl1416_device { public: - dl1416b_device(machine_config const &mconfig, const char *tag, device_t *owner, u32 clock) + dl1416b_device(machine_config const &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dl1416_device(mconfig, DL1416B, tag, owner, clock) { } @@ -135,7 +135,7 @@ protected: class dl1416t_device : public dl1416_device { public: - dl1416t_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + dl1416t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dl1416_device(mconfig, DL1416T, tag, owner, clock) { } @@ -183,7 +183,7 @@ dl1414_device::dl1414_device( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_wr_in(true) , m_addr_in(0x00) @@ -199,7 +199,7 @@ dl1416_device::dl1416_device( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : dl1414_device(mconfig, type, tag, owner, clock) , m_ce_in(true) , m_ce_latch(true) diff --git a/src/devices/video/dl1416.h b/src/devices/video/dl1416.h index ce1d61071f4..1e8882e8e82 100644 --- a/src/devices/video/dl1416.h +++ b/src/devices/video/dl1416.h @@ -49,7 +49,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -84,7 +84,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/video/dm9368.cpp b/src/devices/video/dm9368.cpp index 4702430403b..be6de598687 100644 --- a/src/devices/video/dm9368.cpp +++ b/src/devices/video/dm9368.cpp @@ -36,7 +36,7 @@ const u8 dm9368_device::s_segment_data[16] = // LIVE DEVICE //************************************************************************** -dm9368_device::dm9368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +dm9368_device::dm9368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DM9368, tag, owner, clock), m_update_cb(*this), m_rbo_cb(*this), diff --git a/src/devices/video/dm9368.h b/src/devices/video/dm9368.h index fb376541a07..e09625d4a90 100644 --- a/src/devices/video/dm9368.h +++ b/src/devices/video/dm9368.h @@ -36,7 +36,7 @@ public: auto rbo_cb() { return m_rbo_cb.bind(); } // construction/destruction - dm9368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dm9368_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void a_w(u8 data); diff --git a/src/devices/video/dp8350.cpp b/src/devices/video/dp8350.cpp index e93960b5662..2ba87d22580 100644 --- a/src/devices/video/dp8350.cpp +++ b/src/devices/video/dp8350.cpp @@ -69,7 +69,7 @@ DEFINE_DEVICE_TYPE(DP835X_A, dp835x_a_device, "dp835x_a", "DP835X CRTC (option A // dp835x_device - constructor //------------------------------------------------- -dp835x_device::dp835x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, +dp835x_device::dp835x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int char_width, int char_height, int chars_per_row, int rows_per_frame, int vsync_delay_f1, int vsync_width_f1, int vblank_interval_f1, int vsync_delay_f0, int vsync_width_f0, int vblank_interval_f0, @@ -127,7 +127,7 @@ dp835x_device::dp835x_device(const machine_config &mconfig, device_type type, co // dp8350_device - constructor //------------------------------------------------- -dp8350_device::dp8350_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dp8350_device::dp8350_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp835x_device(mconfig, DP8350, tag, owner, clock, 7, 10, 80, 24, 4, 10, 20, @@ -143,7 +143,7 @@ dp8350_device::dp8350_device(const machine_config &mconfig, const char *tag, dev // dp8367_device - constructor //------------------------------------------------- -dp8367_device::dp8367_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dp8367_device::dp8367_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp835x_device(mconfig, DP8367, tag, owner, clock, 9, 15, 80, 26, 0, 19, 25, @@ -159,7 +159,7 @@ dp8367_device::dp8367_device(const machine_config &mconfig, const char *tag, dev // dp835x_a_device - constructor //------------------------------------------------- -dp835x_a_device::dp835x_a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dp835x_a_device::dp835x_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp835x_device(mconfig, DP835X_A, tag, owner, clock, 9, 14, 80, 25, 0, 14, 20, // sync parameters guessed @@ -277,9 +277,9 @@ void dp835x_device::reconfigure_screen() logerror("Frame rate refresh: %.2f Hz (f%d); horizontal rate scan: %.4f kHz; character rate: %.4f MHz; dot rate: %.5f MHz\n", refresh.as_hz(), m_60hz_refresh ? 1 : 0, - clock() / (m_dots_per_line * 1000.0), - clock() / (m_char_width * 1000000.0), - clock() / 1000000.0); + clock().value() / (m_dots_per_line * 1000.0), + clock().value() / (m_char_width * 1000000.0), + clock().value() / 1000000.0); // get current screen position (note that this method is more accurate than calling hpos and vpos separately) u32 dpos = attotime_to_clocks(refresh - screen().time_until_pos(lines_per_frame - 1, m_dots_per_row * (m_half_shift ? 2 : 1))); diff --git a/src/devices/video/dp8350.h b/src/devices/video/dp8350.h index 3a5c16bbf6a..242ad1ae547 100644 --- a/src/devices/video/dp8350.h +++ b/src/devices/video/dp8350.h @@ -73,7 +73,7 @@ public: protected: // base type constructor - dp835x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, + dp835x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int char_width, int char_height, int chars_per_row, int rows_per_frame, int vsync_delay_f1, int vsync_width_f1, int vblank_interval_f1, int vsync_delay_f0, int vsync_width_f0, int vblank_interval_f0, @@ -158,7 +158,7 @@ class dp8350_device : public dp835x_device { public: // device constructor - dp8350_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dp8350_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> dp8367_device @@ -167,7 +167,7 @@ class dp8367_device : public dp835x_device { public: // device constructor - dp8367_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dp8367_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> dp835x_a_device @@ -176,7 +176,7 @@ class dp835x_a_device : public dp835x_device { public: // device constructor - dp835x_a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dp835x_a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/video/dp8510.cpp b/src/devices/video/dp8510.cpp index a98ea433322..9626a5f559b 100644 --- a/src/devices/video/dp8510.cpp +++ b/src/devices/video/dp8510.cpp @@ -36,7 +36,7 @@ const char *const dp8510_device::BITBLT_OP[] = { "s & d", "~s ^ ~d", "d", "~s | d", "s", "s | ~d", "s | d", "1" }; -dp8510_device::dp8510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dp8510_device::dp8510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DP8510, tag, owner, clock) , m_line_drawing(CLEAR_LINE) , m_barrel_input_select(CLEAR_LINE) diff --git a/src/devices/video/dp8510.h b/src/devices/video/dp8510.h index 04a0c2b1676..5605af70cb4 100644 --- a/src/devices/video/dp8510.h +++ b/src/devices/video/dp8510.h @@ -9,7 +9,7 @@ class dp8510_device : public device_t { public: - dp8510_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dp8510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const char *const BITBLT_OP[]; static const int FIFO_SIZE = 16; diff --git a/src/devices/video/ef9340_1.cpp b/src/devices/video/ef9340_1.cpp index deb26990e16..8cf4725877a 100644 --- a/src/devices/video/ef9340_1.cpp +++ b/src/devices/video/ef9340_1.cpp @@ -35,7 +35,7 @@ TODO: DEFINE_DEVICE_TYPE(EF9340_1, ef9340_1_device, "ef9340_1", "Thomson EF9340+EF9341") -ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ef9340_1_device::ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EF9340_1, tag, owner, clock) , device_video_interface(mconfig, *this) , m_charset(*this, "ef9340_1") diff --git a/src/devices/video/ef9340_1.h b/src/devices/video/ef9340_1.h index ec7e41d16de..aec8122ee7b 100644 --- a/src/devices/video/ef9340_1.h +++ b/src/devices/video/ef9340_1.h @@ -46,7 +46,7 @@ class ef9340_1_device : public device_t, public: // construction/destruction template - ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&screen_tag) + ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : ef9340_1_device(mconfig, tag, owner, clock) { set_screen(std::forward(screen_tag)); @@ -57,7 +57,7 @@ public: auto write_exram() { return m_write_exram.bind(); } // ADR0-ADR3 in a0-a3, B in a4-a11, A in a12-a19 auto read_exram() { return m_read_exram.bind(); } // " - ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); inline bitmap_ind16 *get_bitmap() { return &m_tmp_bitmap; } u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp index df596e7f7a4..5f86f2c9a74 100644 --- a/src/devices/video/ef9345.cpp +++ b/src/devices/video/ef9345.cpp @@ -105,12 +105,12 @@ inline void ef9345_device::inc_y(uint8_t r) // ef9345_device - constructor //------------------------------------------------- -ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ef9345_device(mconfig, EF9345, tag, owner, clock, EF9345_MODE::TYPE_EF9345) { } -ef9345_device::ef9345_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, EF9345_MODE variant) : +ef9345_device::ef9345_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, EF9345_MODE variant) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), @@ -121,7 +121,7 @@ ef9345_device::ef9345_device(const machine_config &mconfig, device_type type, co { } -ts9347_device::ts9347_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ts9347_device::ts9347_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ef9345_device(mconfig, TS9347, tag, owner, clock, EF9345_MODE::TYPE_TS9347) { } diff --git a/src/devices/video/ef9345.h b/src/devices/video/ef9345.h index 05db63cc150..80f5210c0b7 100644 --- a/src/devices/video/ef9345.h +++ b/src/devices/video/ef9345.h @@ -28,7 +28,7 @@ class ef9345_device : public device_t, { public: // construction/destruction - ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ef9345_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } @@ -47,7 +47,7 @@ protected: }; // pass-through constructor - ef9345_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, EF9345_MODE variant); + ef9345_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, EF9345_MODE variant); // device-level overrides virtual void device_start() override; @@ -124,7 +124,7 @@ private: class ts9347_device : public ef9345_device { public: - ts9347_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ts9347_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/video/ef9364.cpp b/src/devices/video/ef9364.cpp index 1b6ad09bab2..532f19b9066 100644 --- a/src/devices/video/ef9364.cpp +++ b/src/devices/video/ef9364.cpp @@ -63,7 +63,7 @@ device_memory_interface::space_config_vector ef9364_device::memory_space_config( // ef9364_device - constructor //------------------------------------------------- -ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EF9364, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/ef9364.h b/src/devices/video/ef9364.h index 3fce51cf29c..a4a574f9c27 100644 --- a/src/devices/video/ef9364.h +++ b/src/devices/video/ef9364.h @@ -34,7 +34,7 @@ public: static constexpr unsigned MAX_TXTPLANES = 2; // construction/destruction - ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp index bb1495836c9..e8703abccbd 100644 --- a/src/devices/video/ef9365.cpp +++ b/src/devices/video/ef9365.cpp @@ -193,7 +193,7 @@ device_memory_interface::space_config_vector ef9365_device::memory_space_config( // ef9365_device - constructor //------------------------------------------------- -ef9365_device::ef9365_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ef9365_device::ef9365_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EF9365, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/ef9365.h b/src/devices/video/ef9365.h index fd3e7497e11..d8bae49bbf7 100644 --- a/src/devices/video/ef9365.h +++ b/src/devices/video/ef9365.h @@ -37,7 +37,7 @@ public: static constexpr int DISPLAY_MODE_64x64 = 0x04; // construction/destruction - ef9365_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ef9365_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } diff --git a/src/devices/video/ef9369.cpp b/src/devices/video/ef9369.cpp index 5f61544cc55..78b3fdcfb1a 100644 --- a/src/devices/video/ef9369.cpp +++ b/src/devices/video/ef9369.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(EF9369, ef9369_device, "ef9369", "Thomson EF9369 Single Chip // ef9369_device - constructor //------------------------------------------------- -ef9369_device::ef9369_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ef9369_device::ef9369_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EF9369, tag, owner, clock) , m_color_update_cb(*this) , m_address(0) diff --git a/src/devices/video/ef9369.h b/src/devices/video/ef9369.h index 457e47f3264..9d2646cca19 100644 --- a/src/devices/video/ef9369.h +++ b/src/devices/video/ef9369.h @@ -43,7 +43,7 @@ public: typedef device_delegate color_update_delegate; // construction/destruction - ef9369_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ef9369_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration template void set_color_update_callback(T &&... args) { m_color_update_cb.set(std::forward(args)...); } diff --git a/src/devices/video/epic12.cpp b/src/devices/video/epic12.cpp index d0dfbf1fcae..b66215e4c3e 100644 --- a/src/devices/video/epic12.cpp +++ b/src/devices/video/epic12.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(EPIC12, epic12_device, "epic12", "EPIC12 Blitter") -epic12_device::epic12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +epic12_device::epic12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EPIC12, tag, owner, clock) , device_video_interface(mconfig, *this) , m_ram16(nullptr), m_gfx_size(0), m_bitmaps(nullptr), m_use_ram(nullptr) diff --git a/src/devices/video/epic12.h b/src/devices/video/epic12.h index 82e58d07e9b..1d3100a2902 100644 --- a/src/devices/video/epic12.h +++ b/src/devices/video/epic12.h @@ -11,7 +11,7 @@ class epic12_device : public device_t, public device_video_interface { public: - epic12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + epic12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&maintag) { m_maincpu.set_tag(std::forward(maintag)); } auto port_r_callback() { return m_port_r_cb.bind(); } diff --git a/src/devices/video/fixfreq.cpp b/src/devices/video/fixfreq.cpp index cf4c4bb5517..46e0cd2c508 100644 --- a/src/devices/video/fixfreq.cpp +++ b/src/devices/video/fixfreq.cpp @@ -232,7 +232,7 @@ fixedfreq_device::fixedfreq_device( device_type type, const char *tag, device_t *owner, - uint32_t clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this, false) , m_enable(*this, "ENABLE") @@ -248,7 +248,7 @@ fixedfreq_device::fixedfreq_device( const machine_config &mconfig, const char *tag, device_t *owner, - uint32_t clock) + const XTAL &clock) : fixedfreq_device(mconfig, FIXFREQ, tag, owner, clock) { } @@ -273,7 +273,7 @@ void fixedfreq_device::device_config_complete() if (!screen().refresh_attoseconds()) { screen().set_raw( - m_monitor.m_monitor_clock, m_monitor.htotal(), 0, + XTAL::u(m_monitor.m_monitor_clock), m_monitor.htotal(), 0, m_monitor.htotal(), m_monitor.vtotal(), 0, m_monitor.vtotal()); } diff --git a/src/devices/video/fixfreq.h b/src/devices/video/fixfreq.h index 482016ba97e..5d940019e5d 100644 --- a/src/devices/video/fixfreq.h +++ b/src/devices/video/fixfreq.h @@ -255,12 +255,12 @@ public: using time_type = fixedfreq_monitor_state::time_type; // construction/destruction - fixedfreq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fixedfreq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers - fixedfreq_device &set_monitor_clock(uint32_t clock) + fixedfreq_device &set_monitor_clock(const XTAL &clock) { - m_monitor.m_monitor_clock = clock; + m_monitor.m_monitor_clock = clock.value(); return *this; } fixedfreq_device &set_fieldcount(int count) @@ -304,7 +304,7 @@ public: // 799 858 480 486 492 525 interlace // -hsync -vsync { - set_monitor_clock(13500000); + set_monitor_clock(XTAL::u(13500000)); set_horz_params(720, 736, 799, 858); set_vert_params(480, 486, 492, 525); set_fieldcount(2); @@ -314,7 +314,7 @@ public: fixedfreq_device &set_mode_ntsc704() // ModeLine "704x480@30i" 13.5 704 728 // 791 858 480 486 492 525 { - set_monitor_clock(13500000); + set_monitor_clock(XTAL::u(13500000)); set_horz_params(704, 728, 791, 858); set_vert_params(480, 486, 492, 525); set_fieldcount(2); @@ -340,7 +340,7 @@ protected: device_type type, const char *tag, device_t *owner, - uint32_t clock); + const XTAL &clock); // device-level overrides virtual void device_config_complete() override; diff --git a/src/devices/video/gb_lcd.cpp b/src/devices/video/gb_lcd.cpp index ac81c1398f3..ba10b39d158 100644 --- a/src/devices/video/gb_lcd.cpp +++ b/src/devices/video/gb_lcd.cpp @@ -318,7 +318,7 @@ DEFINE_DEVICE_TYPE(CGB_PPU, cgb_ppu_device, "cgb_ppu", "CGB PPU") -dmg_ppu_device::dmg_ppu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size) +dmg_ppu_device::dmg_ppu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , m_lr35902(*this, finder_base::DUMMY_TAG) @@ -328,25 +328,25 @@ dmg_ppu_device::dmg_ppu_device(const machine_config &mconfig, device_type type, { } -dmg_ppu_device::dmg_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmg_ppu_device::dmg_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmg_ppu_device(mconfig, DMG_PPU, tag, owner, clock, 0x2000) { m_enable_experimental_engine = true; } -mgb_ppu_device::mgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mgb_ppu_device::mgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmg_ppu_device(mconfig, MGB_PPU, tag, owner, clock, 0x2000) { m_enable_experimental_engine = true; } -sgb_ppu_device::sgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sgb_ppu_device::sgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmg_ppu_device(mconfig, SGB_PPU, tag, owner, clock, 0x2000) { m_enable_experimental_engine = false; } -cgb_ppu_device::cgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cgb_ppu_device::cgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dmg_ppu_device(mconfig, CGB_PPU, tag, owner, clock, 0x4000) { m_enable_experimental_engine = false; diff --git a/src/devices/video/gb_lcd.h b/src/devices/video/gb_lcd.h index 418868e5ce0..03ad47d1780 100644 --- a/src/devices/video/gb_lcd.h +++ b/src/devices/video/gb_lcd.h @@ -20,11 +20,11 @@ class dmg_ppu_device : public device_t, public device_video_interface public: template dmg_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : dmg_ppu_device(mconfig, tag, owner, u32(0)) + : dmg_ppu_device(mconfig, tag, owner) { set_lr35902_tag(std::forward(cpu_tag)); } - dmg_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmg_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_lr35902_tag(T &&tag) { m_lr35902.set_tag(std::forward(tag)); } @@ -75,7 +75,7 @@ protected: virtual void update_sprites(); virtual void update_scanline(uint32_t cycles_to_go); - dmg_ppu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size); + dmg_ppu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size); // device-level overrides virtual void device_start() override; @@ -239,11 +239,11 @@ class mgb_ppu_device : public dmg_ppu_device public: template mgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : mgb_ppu_device(mconfig, tag, owner, u32(0)) + : mgb_ppu_device(mconfig, tag, owner) { set_lr35902_tag(std::forward(cpu_tag)); } - mgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: @@ -257,11 +257,11 @@ class sgb_ppu_device : public dmg_ppu_device public: template sgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : sgb_ppu_device(mconfig, tag, owner, u32(0)) + : sgb_ppu_device(mconfig, tag, owner) { set_lr35902_tag(std::forward(cpu_tag)); } - sgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void sgb_io_write_pal(int offs, uint8_t *data); @@ -284,11 +284,11 @@ class cgb_ppu_device : public dmg_ppu_device public: template cgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : cgb_ppu_device(mconfig, tag, owner, u32(0)) + : cgb_ppu_device(mconfig, tag, owner) { set_lr35902_tag(std::forward(cpu_tag)); } - cgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual uint8_t video_r(offs_t offset) override; virtual void video_w(offs_t offset, uint8_t data) override; diff --git a/src/devices/video/gba_lcd.cpp b/src/devices/video/gba_lcd.cpp index 1bc8a87e7fe..5057822195c 100644 --- a/src/devices/video/gba_lcd.cpp +++ b/src/devices/video/gba_lcd.cpp @@ -147,7 +147,7 @@ private: DEFINE_DEVICE_TYPE(GBA_LCD, gba_lcd_device, "gba_lcd", "GBA LCD") -gba_lcd_device::gba_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gba_lcd_device::gba_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GBA_LCD, tag, owner, clock) , device_video_interface(mconfig, *this) , m_int_hblank_cb(*this) diff --git a/src/devices/video/gba_lcd.h b/src/devices/video/gba_lcd.h index 421ed02f2c3..9f2fd04a32d 100644 --- a/src/devices/video/gba_lcd.h +++ b/src/devices/video/gba_lcd.h @@ -63,7 +63,7 @@ class gba_lcd_device , protected gba_registers<0x060 / 4, 0x000> { public: - gba_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gba_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t video_r(offs_t offset, uint32_t mem_mask = ~0); void video_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/video/gf4500.cpp b/src/devices/video/gf4500.cpp index e695404d938..104a82a76c5 100644 --- a/src/devices/video/gf4500.cpp +++ b/src/devices/video/gf4500.cpp @@ -36,7 +36,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c DEFINE_DEVICE_TYPE(GF4500, gf4500_device, "gf4500", "NVIDIA GoForce 4500") -gf4500_device::gf4500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gf4500_device::gf4500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GF4500, tag, owner, clock), m_data(nullptr), m_screen_x(0), m_screen_y(0), m_screen_x_max(0), m_screen_y_max(0), m_screen_x_min(0), m_screen_y_min(0) { } diff --git a/src/devices/video/gf4500.h b/src/devices/video/gf4500.h index a402881c49b..12e0a758948 100644 --- a/src/devices/video/gf4500.h +++ b/src/devices/video/gf4500.h @@ -17,7 +17,7 @@ class gf4500_device : public device_t { public: - gf4500_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gf4500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset); diff --git a/src/devices/video/gf7600gs.cpp b/src/devices/video/gf7600gs.cpp index 075c95c5628..01d1a62683e 100644 --- a/src/devices/video/gf7600gs.cpp +++ b/src/devices/video/gf7600gs.cpp @@ -17,7 +17,7 @@ void geforce_7600gs_device::map3(address_map &map) { } -geforce_7600gs_device::geforce_7600gs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +geforce_7600gs_device::geforce_7600gs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, GEFORCE_7600GS, tag, owner, clock) { } diff --git a/src/devices/video/gf7600gs.h b/src/devices/video/gf7600gs.h index db13718c6da..e1498716a50 100644 --- a/src/devices/video/gf7600gs.h +++ b/src/devices/video/gf7600gs.h @@ -9,12 +9,12 @@ class geforce_7600gs_device : public pci_device { public: - geforce_7600gs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + geforce_7600gs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : geforce_7600gs_device(mconfig, tag, owner, clock) { set_ids_agp(0x10de02e1, 0xa1, subdevice_id); } - geforce_7600gs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + geforce_7600gs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/video/hd44102.cpp b/src/devices/video/hd44102.cpp index 49d05f3a797..a802768ea38 100644 --- a/src/devices/video/hd44102.cpp +++ b/src/devices/video/hd44102.cpp @@ -54,7 +54,7 @@ DEFINE_DEVICE_TYPE(HD44102, hd44102_device, "hd44102", "Hitachi HD44102 LCD Cont // hd44102_device - constructor //------------------------------------------------- -hd44102_device::hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hd44102_device::hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD44102, tag, owner, clock), m_sx(0), m_sy(0) diff --git a/src/devices/video/hd44102.h b/src/devices/video/hd44102.h index dfcd8ca0349..ce718f47357 100644 --- a/src/devices/video/hd44102.h +++ b/src/devices/video/hd44102.h @@ -22,7 +22,7 @@ class hd44102_device : public device_t { public: // construction/destruction - hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hd44102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void set_screen_offsets(int sx, int sy) { m_sx = sx; m_sy = sy; } // when using screen_update diff --git a/src/devices/video/hd44352.cpp b/src/devices/video/hd44352.cpp index 12d431b21ef..33d232058dc 100644 --- a/src/devices/video/hd44352.cpp +++ b/src/devices/video/hd44352.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(HD44352, hd44352_device, "hd44352", "Hitachi HD44352 LCD Cont // hd44352_device - constructor //------------------------------------------------- -hd44352_device::hd44352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock): +hd44352_device::hd44352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock): device_t(mconfig, HD44352, tag, owner, clock), m_on_cb(*this), m_char_rom(*this, DEVICE_SELF) diff --git a/src/devices/video/hd44352.h b/src/devices/video/hd44352.h index a5b311c0e9f..d0e1bcf07dc 100644 --- a/src/devices/video/hd44352.h +++ b/src/devices/video/hd44352.h @@ -21,7 +21,7 @@ class hd44352_device : public device_t { public: // construction/destruction - hd44352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd44352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto on_cb() { return m_on_cb.bind(); } diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp index 171d9cb5780..8d6f3bf8a76 100644 --- a/src/devices/video/hd44780.cpp +++ b/src/devices/video/hd44780.cpp @@ -54,13 +54,13 @@ ROM_END // hd44780_device - constructor //------------------------------------------------- -hd44780_device::hd44780_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd44780_device::hd44780_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd44780_device(mconfig, HD44780, tag, owner, clock) { set_charset_type(CHARSET_HD44780_A00); } -hd44780_device::hd44780_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd44780_device::hd44780_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_pixel_update_cb(*this) , m_busy_factor(1.0) @@ -74,13 +74,13 @@ hd44780_device::hd44780_device(const machine_config &mconfig, device_type type, { } -sed1278_0b_device::sed1278_0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sed1278_0b_device::sed1278_0b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd44780_device(mconfig, SED1278_0B, tag, owner, clock) { set_charset_type(CHARSET_SED1278_0B); } -ks0066_f05_device::ks0066_f05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ks0066_f05_device::ks0066_f05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd44780_device(mconfig, KS0066_F05, tag, owner, clock) { set_charset_type(CHARSET_KS0066_F05); diff --git a/src/devices/video/hd44780.h b/src/devices/video/hd44780.h index df1db86fbe8..06df9cfe136 100644 --- a/src/devices/video/hd44780.h +++ b/src/devices/video/hd44780.h @@ -27,7 +27,7 @@ public: typedef device_delegate pixel_update_delegate; // construction/destruction - hd44780_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + hd44780_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // static configuration helpers void set_lcd_size(int lines, int chars) { m_lines = lines; m_chars = chars; } @@ -53,7 +53,7 @@ public: virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: - hd44780_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd44780_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -146,7 +146,7 @@ class sed1278_0b_device : public hd44780_device { public: // construction/destruction - sed1278_0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sed1278_0b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ks0066_f05_device @@ -155,7 +155,7 @@ class ks0066_f05_device : public hd44780_device { public: // construction/destruction - ks0066_f05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ks0066_f05_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/video/hd61202.cpp b/src/devices/video/hd61202.cpp index 50bbc91d0b3..abc4d0b2960 100644 --- a/src/devices/video/hd61202.cpp +++ b/src/devices/video/hd61202.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(HD61202, hd61202_device, "hd61202", "Hitachi HD61202 LCD Driv // hd61202_device - constructor //------------------------------------------------- -hd61202_device::hd61202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hd61202_device::hd61202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD61202, tag, owner, clock) , m_screen_update_cb(*this) { diff --git a/src/devices/video/hd61202.h b/src/devices/video/hd61202.h index 1ae9e741242..8577aae982b 100644 --- a/src/devices/video/hd61202.h +++ b/src/devices/video/hd61202.h @@ -26,7 +26,7 @@ public: typedef device_delegate screen_update_delegate; // construction/destruction - hd61202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hd61202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template void set_screen_update_cb(T &&... args) { m_screen_update_cb.set(std::forward(args)...); } diff --git a/src/devices/video/hd61603.cpp b/src/devices/video/hd61603.cpp index 49a21cc779b..d58c7bf164c 100644 --- a/src/devices/video/hd61603.cpp +++ b/src/devices/video/hd61603.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(HD61603, hd61603_device, "hd61603", "Hitachi HD61603 LCD Driv // constructor //------------------------------------------------- -hd61603_device::hd61603_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hd61603_device::hd61603_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD61603, tag, owner, clock), m_write_segs(*this) { } diff --git a/src/devices/video/hd61603.h b/src/devices/video/hd61603.h index 8de7c879761..24d0e777260 100644 --- a/src/devices/video/hd61603.h +++ b/src/devices/video/hd61603.h @@ -37,7 +37,7 @@ pin desc class hd61603_device : public device_t { public: - hd61603_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hd61603_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto write_segs() { return m_write_segs.bind(); } diff --git a/src/devices/video/hd61830.cpp b/src/devices/video/hd61830.cpp index 9d2a8a5eb67..adb594f0804 100644 --- a/src/devices/video/hd61830.cpp +++ b/src/devices/video/hd61830.cpp @@ -75,7 +75,7 @@ static constexpr int MODE_DISPLAY_ON = 0x20; // hd61830_device - constructor //------------------------------------------------- -hd61830_device::hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hd61830_device::hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD61830, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/hd61830.h b/src/devices/video/hd61830.h index 83f5639ca14..4c411654841 100644 --- a/src/devices/video/hd61830.h +++ b/src/devices/video/hd61830.h @@ -24,7 +24,7 @@ class hd61830_device : public device_t, { public: // construction/destruction - hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd61830_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto rd_rd_callback() { return m_read_rd.bind(); } diff --git a/src/devices/video/hd63484.cpp b/src/devices/video/hd63484.cpp index cc0f577d11f..05f6c1f0fd9 100644 --- a/src/devices/video/hd63484.cpp +++ b/src/devices/video/hd63484.cpp @@ -24,7 +24,7 @@ // hd63484_device - constructor //------------------------------------------------- -hd63484_device::hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hd63484_device::hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD63484, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/hd63484.h b/src/devices/video/hd63484.h index 67383810bf6..a296ac3052c 100644 --- a/src/devices/video/hd63484.h +++ b/src/devices/video/hd63484.h @@ -25,7 +25,7 @@ public: typedef device_delegate display_delegate; // construction/destruction - hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_display_callback(T &&... args) { m_display_cb.set(std::forward(args)...); } void set_auto_configure_screen(bool auto_configure_screen) { m_auto_configure_screen = auto_configure_screen; } diff --git a/src/devices/video/hd66421.cpp b/src/devices/video/hd66421.cpp index 6be96c81e1f..2e7f0a97611 100644 --- a/src/devices/video/hd66421.cpp +++ b/src/devices/video/hd66421.cpp @@ -123,7 +123,7 @@ inline void hd66421_device::writebyte(offs_t address, uint8_t data) // hd66421_device - constructor //------------------------------------------------- -hd66421_device::hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd66421_device::hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD66421, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(FUNC(hd66421_device::hd66421), this)) diff --git a/src/devices/video/hd66421.h b/src/devices/video/hd66421.h index 8a38311d8e5..86f820631a2 100644 --- a/src/devices/video/hd66421.h +++ b/src/devices/video/hd66421.h @@ -30,7 +30,7 @@ public: static constexpr unsigned HEIGHT = 100; // construction/destruction - hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t reg_idx_r(); void reg_idx_w(uint8_t data); diff --git a/src/devices/video/hlcd0438.cpp b/src/devices/video/hlcd0438.cpp index 64f95711c8b..36b957368f5 100644 --- a/src/devices/video/hlcd0438.cpp +++ b/src/devices/video/hlcd0438.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(HLCD0438, hlcd0438_device, "hlcd0438", "Hughes HLCD 0438 LCD // constructor //------------------------------------------------- -hlcd0438_device::hlcd0438_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0438_device::hlcd0438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HLCD0438, tag, owner, clock), m_write_segs(*this), m_write_data(*this) { diff --git a/src/devices/video/hlcd0438.h b/src/devices/video/hlcd0438.h index 19973dd8451..e2c1960c5ce 100644 --- a/src/devices/video/hlcd0438.h +++ b/src/devices/video/hlcd0438.h @@ -42,7 +42,7 @@ class hlcd0438_device : public device_t { public: - hlcd0438_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hlcd0438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto write_segs() { return m_write_segs.bind(); } // BP pin in offset, SEG pins in data diff --git a/src/devices/video/hlcd0488.cpp b/src/devices/video/hlcd0488.cpp index 7c5d7eb4c99..6eb153005c3 100644 --- a/src/devices/video/hlcd0488.cpp +++ b/src/devices/video/hlcd0488.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(HLCD0488, hlcd0488_device, "hlcd0488", "Hughes HLCD 0488 LCD // constructor //------------------------------------------------- -hlcd0488_device::hlcd0488_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0488_device::hlcd0488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HLCD0488, tag, owner, clock), m_write_cols(*this) { } diff --git a/src/devices/video/hlcd0488.h b/src/devices/video/hlcd0488.h index c2302fbc88b..0f121bb6278 100644 --- a/src/devices/video/hlcd0488.h +++ b/src/devices/video/hlcd0488.h @@ -42,7 +42,7 @@ class hlcd0488_device : public device_t { public: - hlcd0488_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hlcd0488_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto write_cols() { return m_write_cols.bind(); } // COL pins in data, ROW pins in offset diff --git a/src/devices/video/hlcd0515.cpp b/src/devices/video/hlcd0515.cpp index 7af99f99657..8452ee3abfa 100644 --- a/src/devices/video/hlcd0515.cpp +++ b/src/devices/video/hlcd0515.cpp @@ -28,25 +28,25 @@ DEFINE_DEVICE_TYPE(HLCD0601, hlcd0601_device, "hlcd0601", "Hughes HLCD 0601 LCD // constructor //------------------------------------------------- -hlcd0515_device::hlcd0515_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 colmax) : +hlcd0515_device::hlcd0515_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 colmax) : device_t(mconfig, type, tag, owner, clock), m_colmax(colmax), m_write_cols(*this), m_write_data(*this) { } -hlcd0515_device::hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0515_device::hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hlcd0515_device(mconfig, HLCD0515, tag, owner, clock, 25) { } -hlcd0569_device::hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0569_device::hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hlcd0515_device(mconfig, HLCD0569, tag, owner, clock, 24) { } -hlcd0530_device::hlcd0530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0530_device::hlcd0530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hlcd0515_device(mconfig, HLCD0530, tag, owner, clock, 24) { } -hlcd0601_device::hlcd0601_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0601_device::hlcd0601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hlcd0515_device(mconfig, HLCD0601, tag, owner, clock, 24) { } diff --git a/src/devices/video/hlcd0515.h b/src/devices/video/hlcd0515.h index c6ef5e118bf..403105ca54e 100644 --- a/src/devices/video/hlcd0515.h +++ b/src/devices/video/hlcd0515.h @@ -44,7 +44,7 @@ class hlcd0515_device : public device_t { public: - hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hlcd0515_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto write_cols() { return m_write_cols.bind(); } // COL/ROW pins (offset for ROW) @@ -56,7 +56,7 @@ public: DECLARE_READ_LINE_MEMBER(data_r) { return m_dataout; } protected: - hlcd0515_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 colmax); + hlcd0515_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 colmax); // device-level overrides virtual void device_start() override; @@ -92,7 +92,7 @@ protected: class hlcd0569_device : public hlcd0515_device { public: - hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hlcd0569_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void set_control() override; @@ -101,13 +101,13 @@ protected: class hlcd0530_device : public hlcd0515_device { public: - hlcd0530_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hlcd0530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class hlcd0601_device : public hlcd0515_device { public: - hlcd0601_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + hlcd0601_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/hlcd0538.cpp b/src/devices/video/hlcd0538.cpp index 314644bcfd4..ba99eaadf86 100644 --- a/src/devices/video/hlcd0538.cpp +++ b/src/devices/video/hlcd0538.cpp @@ -26,16 +26,16 @@ DEFINE_DEVICE_TYPE(HLCD0539, hlcd0539_device, "hlcd0539", "Hughes HLCD 0539 LCD // constructor //------------------------------------------------- -hlcd0538_device::hlcd0538_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +hlcd0538_device::hlcd0538_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_write_cols(*this), m_write_interrupt(*this) { } -hlcd0538_device::hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0538_device::hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hlcd0538_device(mconfig, HLCD0538, tag, owner, clock) { } -hlcd0539_device::hlcd0539_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +hlcd0539_device::hlcd0539_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hlcd0538_device(mconfig, HLCD0539, tag, owner, clock) { } @@ -52,7 +52,7 @@ void hlcd0538_device::device_start() // timer (when LCD pin is oscillator) m_lcd_timer = timer_alloc(FUNC(hlcd0538_device::toggle_lcd), this); - attotime period = (clock() != 0) ? attotime::from_hz(2 * clock()) : attotime::never; + attotime period = !clock().disabled() ? attotime::from_hz(2 * clock().value()) : attotime::never; m_lcd_timer->adjust(period, 0, period); // zerofill diff --git a/src/devices/video/hlcd0538.h b/src/devices/video/hlcd0538.h index add8e0e3028..43a0101109a 100644 --- a/src/devices/video/hlcd0538.h +++ b/src/devices/video/hlcd0538.h @@ -43,7 +43,7 @@ class hlcd0538_device : public device_t { public: - hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hlcd0538_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto write_cols() { return m_write_cols.bind(); } // C/R pins (0538: d0-d7 for rows) @@ -54,7 +54,7 @@ public: DECLARE_WRITE_LINE_MEMBER(data_w) { m_data = (state) ? 1 : 0; } protected: - hlcd0538_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + hlcd0538_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -77,7 +77,7 @@ protected: class hlcd0539_device : public hlcd0538_device { public: - hlcd0539_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hlcd0539_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/video/hp1ll3.cpp b/src/devices/video/hp1ll3.cpp index 006b8823122..8de471ddd90 100644 --- a/src/devices/video/hp1ll3.cpp +++ b/src/devices/video/hp1ll3.cpp @@ -280,7 +280,7 @@ DEFINE_DEVICE_TYPE(HP1LL3, hp1ll3_device, "hp1ll3", "Hewlett-Packard 1LL3-0005 G // hp1ll3_device - constructor //------------------------------------------------- -hp1ll3_device::hp1ll3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp1ll3_device::hp1ll3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP1LL3, tag, owner, clock) , device_video_interface(mconfig, *this) , m_vram_size(16) diff --git a/src/devices/video/hp1ll3.h b/src/devices/video/hp1ll3.h index 1dd238fba8f..643e280358d 100644 --- a/src/devices/video/hp1ll3.h +++ b/src/devices/video/hp1ll3.h @@ -23,7 +23,7 @@ class hp1ll3_device : public device_t, public device_video_interface { public: // construction/destruction - hp1ll3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp1ll3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Configuration // Set VRAM size (in kw). Parameter must be <= 128 and it must be a power of 2. diff --git a/src/devices/video/huc6202.cpp b/src/devices/video/huc6202.cpp index 42ffaafef14..151d3fa016c 100644 --- a/src/devices/video/huc6202.cpp +++ b/src/devices/video/huc6202.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(HUC6202, huc6202_device, "huc6202", "Hudson HuC6202 VPC") -huc6202_device::huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +huc6202_device::huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HUC6202, tag, owner, clock) , m_next_pixel_0_cb(*this) , m_time_til_next_event_0_cb(*this) diff --git a/src/devices/video/huc6202.h b/src/devices/video/huc6202.h index 5ef636626b0..0ca6aff6843 100644 --- a/src/devices/video/huc6202.h +++ b/src/devices/video/huc6202.h @@ -16,7 +16,7 @@ class huc6202_device : public device_t { public: // construction/destruction - huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto next_pixel_0_callback() { return m_next_pixel_0_cb.bind(); } auto time_til_next_event_0_callback() { return m_time_til_next_event_0_cb.bind(); } diff --git a/src/devices/video/huc6260.cpp b/src/devices/video/huc6260.cpp index cc41b86ac1d..1c371132591 100644 --- a/src/devices/video/huc6260.cpp +++ b/src/devices/video/huc6260.cpp @@ -51,7 +51,7 @@ void huc6260_device::palette_init() DEFINE_DEVICE_TYPE(HUC6260, huc6260_device, "huc6260", "Hudson HuC6260 VCE") -huc6260_device::huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +huc6260_device::huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HUC6260, tag, owner, clock), device_palette_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/huc6260.h b/src/devices/video/huc6260.h index 01b1a299f45..8d55ab10904 100644 --- a/src/devices/video/huc6260.h +++ b/src/devices/video/huc6260.h @@ -25,7 +25,7 @@ public: // construction/destruction - huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + huc6260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto next_pixel_data() { return m_next_pixel_data_cb.bind(); } auto time_til_next_event() { return m_time_til_next_event_cb.bind(); } diff --git a/src/devices/video/huc6261.cpp b/src/devices/video/huc6261.cpp index 27bd06c7e33..7748ed5769f 100644 --- a/src/devices/video/huc6261.cpp +++ b/src/devices/video/huc6261.cpp @@ -31,7 +31,7 @@ constexpr unsigned huc6261_device::LPF; DEFINE_DEVICE_TYPE(HUC6261, huc6261_device, "huc6261", "Hudson HuC6261 VCE") -huc6261_device::huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +huc6261_device::huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HUC6261, tag, owner, clock), device_video_interface(mconfig, *this), m_huc6270_a(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/video/huc6261.h b/src/devices/video/huc6261.h index 9995a20673b..1bfcb2ed589 100644 --- a/src/devices/video/huc6261.h +++ b/src/devices/video/huc6261.h @@ -24,7 +24,7 @@ public: static constexpr unsigned LPF = 263; // max number of lines in a single frame // construction/destruction - huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_vdc1_tag(T &&tag) { m_huc6270_a.set_tag(std::forward(tag)); } template void set_vdc2_tag(T &&tag) { m_huc6270_b.set_tag(std::forward(tag)); } diff --git a/src/devices/video/huc6270.cpp b/src/devices/video/huc6270.cpp index 09f49963ba9..53bbf2d42df 100644 --- a/src/devices/video/huc6270.cpp +++ b/src/devices/video/huc6270.cpp @@ -99,7 +99,7 @@ DEFINE_DEVICE_TYPE(HUC6270, huc6270_device, "huc6270", "Hudson HuC6270 VDC") constexpr uint8_t huc6270_device::vram_increments[4]; -huc6270_device::huc6270_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +huc6270_device::huc6270_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HUC6270, tag, owner, clock) , m_vram_size(0) , m_irq_changed_cb(*this) diff --git a/src/devices/video/huc6270.h b/src/devices/video/huc6270.h index c333e720bc7..4245d82fcc8 100644 --- a/src/devices/video/huc6270.h +++ b/src/devices/video/huc6270.h @@ -16,7 +16,7 @@ class huc6270_device : public device_t { public: // construction/destruction - huc6270_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + huc6270_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_vram_size(uint32_t vram_size) { m_vram_size = vram_size; } auto irq() { return m_irq_changed_cb.bind(); } diff --git a/src/devices/video/huc6271.cpp b/src/devices/video/huc6271.cpp index 9f90ba8c3b3..c3144eb8d11 100644 --- a/src/devices/video/huc6271.cpp +++ b/src/devices/video/huc6271.cpp @@ -33,7 +33,7 @@ void huc6271_device::data_map(address_map &map) map(0x000000, 0x0fffff).ram(); } -huc6271_device::huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +huc6271_device::huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HUC6271, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_data_space_config("data", ENDIANNESS_LITTLE, 32, 32, 0, address_map_constructor(FUNC(huc6271_device::data_map), this)) diff --git a/src/devices/video/huc6271.h b/src/devices/video/huc6271.h index a8b3eb00287..d50bd39b4a4 100644 --- a/src/devices/video/huc6271.h +++ b/src/devices/video/huc6271.h @@ -24,7 +24,7 @@ class huc6271_device : public device_t, { public: // construction/destruction - huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations //void data_transfer(uint32_t offset, uint32_t data); diff --git a/src/devices/video/huc6272.cpp b/src/devices/video/huc6272.cpp index 5f4ec6b8c7a..af6870dd77e 100644 --- a/src/devices/video/huc6272.cpp +++ b/src/devices/video/huc6272.cpp @@ -63,7 +63,7 @@ void huc6272_device::kram_map(address_map &map) // huc6272_device - constructor //------------------------------------------------- -huc6272_device::huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +huc6272_device::huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HUC6272, tag, owner, clock), device_memory_interface(mconfig, *this), m_huc6271(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/video/huc6272.h b/src/devices/video/huc6272.h index db5087f7f0c..8e78ee35b5f 100644 --- a/src/devices/video/huc6272.h +++ b/src/devices/video/huc6272.h @@ -30,7 +30,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND | feature::GRAPHICS; } // Incorrect ADPCM and Graphics // construction/destruction - huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_changed_callback() { return m_irq_changed_cb.bind(); } template void set_rainbow_tag(T &&tag) { m_huc6271.set_tag(std::forward(tag)); } diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp index 622d5c056df..52720ba1687 100644 --- a/src/devices/video/i8244.cpp +++ b/src/devices/video/i8244.cpp @@ -32,11 +32,11 @@ DEFINE_DEVICE_TYPE(I8245, i8245_device, "i8245", "Intel 8245") // i8244_device - constructor //------------------------------------------------- -i8244_device::i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8244_device::i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8244_device(mconfig, I8244, tag, owner, clock) { } -i8244_device::i8244_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +i8244_device::i8244_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_video_interface(mconfig, *this) @@ -44,7 +44,7 @@ i8244_device::i8244_device(const machine_config &mconfig, device_type type, cons , m_charset(*this, "cgrom") { } -i8245_device::i8245_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8245_device::i8245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8244_device(mconfig, I8245, tag, owner, clock) { } diff --git a/src/devices/video/i8244.h b/src/devices/video/i8244.h index 9514f36deb5..672d2db2414 100644 --- a/src/devices/video/i8244.h +++ b/src/devices/video/i8244.h @@ -45,7 +45,7 @@ class i8244_device : public device_t { public: // construction/destruction - i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_cb() { return m_irq_func.bind(); } @@ -106,7 +106,7 @@ protected: } s; }; - i8244_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + i8244_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_config_complete() override; @@ -177,7 +177,7 @@ class i8245_device : public i8244_device { public: // construction/destruction - i8245_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8245_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static auto parent_rom_device_type() { return &I8244; } diff --git a/src/devices/video/i82730.cpp b/src/devices/video/i82730.cpp index ba853c41680..5341fe84b8d 100644 --- a/src/devices/video/i82730.cpp +++ b/src/devices/video/i82730.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(I82730, i82730_device, "i82730", "Intel 82730") // i82730_device - constructor //------------------------------------------------- -i82730_device::i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i82730_device::i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I82730, tag, owner, clock), device_video_interface(mconfig, *this), m_sint_handler(*this), diff --git a/src/devices/video/i82730.h b/src/devices/video/i82730.h index 27f82eb8d5c..68e444bfe24 100644 --- a/src/devices/video/i82730.h +++ b/src/devices/video/i82730.h @@ -29,12 +29,12 @@ public: // construction/destruction template - i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : i82730_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); } - i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82730_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto sint() { return m_sint_handler.bind(); } diff --git a/src/devices/video/i8275.cpp b/src/devices/video/i8275.cpp index 1e080986e22..5e98108840f 100644 --- a/src/devices/video/i8275.cpp +++ b/src/devices/video/i8275.cpp @@ -98,7 +98,7 @@ DEFINE_DEVICE_TYPE(I8276, i8276_device, "i8276", "Intel 8276 CRTC") // i8275_device - constructor //------------------------------------------------- -i8275_device::i8275_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +i8275_device::i8275_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), m_write_irq(*this), @@ -129,12 +129,12 @@ i8275_device::i8275_device(const machine_config &mconfig, device_type type, cons memset(m_param, 0x00, sizeof(m_param)); } -i8275_device::i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8275_device::i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8275_device(mconfig, I8275, tag, owner, clock) { } -i8276_device::i8276_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8276_device::i8276_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8275_device(mconfig, I8276, tag, owner, clock) { } diff --git a/src/devices/video/i8275.h b/src/devices/video/i8275.h index 2b49dee6362..ec0e1add6de 100644 --- a/src/devices/video/i8275.h +++ b/src/devices/video/i8275.h @@ -58,7 +58,7 @@ public: typedef device_delegate draw_character_delegate; // construction/destruction - i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8275_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_character_width(int value) { m_hpixels_per_column = value; } void set_refresh_hack(bool hack) { m_refresh_hack = hack; } @@ -80,7 +80,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - i8275_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i8275_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -212,7 +212,7 @@ class i8276_device : public i8275_device { public: // construction/destruction - i8276_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8276_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/imagetek_i4100.cpp b/src/devices/video/imagetek_i4100.cpp index 5b9cc568e03..6805e169c65 100644 --- a/src/devices/video/imagetek_i4100.cpp +++ b/src/devices/video/imagetek_i4100.cpp @@ -268,7 +268,7 @@ void imagetek_i4300_device::v3_map(address_map &map) //------------------------------------------------- -imagetek_i4100_device::imagetek_i4100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool has_ext_tiles) +imagetek_i4100_device::imagetek_i4100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool has_ext_tiles) : device_t(mconfig, type, tag, owner, clock) , device_gfx_interface(mconfig, *this, has_ext_tiles ? gfxinfo_ext : gfxinfo, "palette") , device_video_interface(mconfig, *this) @@ -297,18 +297,18 @@ imagetek_i4100_device::imagetek_i4100_device(const machine_config &mconfig, devi { } -imagetek_i4100_device::imagetek_i4100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +imagetek_i4100_device::imagetek_i4100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : imagetek_i4100_device(mconfig, I4100, tag, owner, clock, false) { } -imagetek_i4220_device::imagetek_i4220_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +imagetek_i4220_device::imagetek_i4220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : imagetek_i4100_device(mconfig, I4220, tag, owner, clock, true) { } -imagetek_i4300_device::imagetek_i4300_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +imagetek_i4300_device::imagetek_i4300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : imagetek_i4100_device(mconfig, I4300, tag, owner, clock, true) { std::fill(std::begin(m_irq_levels), std::end(m_irq_levels), 0); diff --git a/src/devices/video/imagetek_i4100.h b/src/devices/video/imagetek_i4100.h index 8f11b055f12..04b7c35356b 100644 --- a/src/devices/video/imagetek_i4100.h +++ b/src/devices/video/imagetek_i4100.h @@ -28,7 +28,7 @@ class imagetek_i4100_device : public device_t, { public: // construction/destruction - imagetek_i4100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + imagetek_i4100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); @@ -71,7 +71,7 @@ public: u8 irq_cause_r(); protected: - imagetek_i4100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool has_ext_tiles); + imagetek_i4100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool has_ext_tiles); // device-level overrides //virtual void device_validity_check(validity_checker &valid) const override; @@ -230,7 +230,7 @@ class imagetek_i4220_device : public imagetek_i4100_device { public: // construction/destruction - imagetek_i4220_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + imagetek_i4220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // needed by Blazing Tornado / Grand Striker 2 for mixing with PSAC // (it's unknown how the chip enables external sync) @@ -243,7 +243,7 @@ class imagetek_i4300_device : public imagetek_i4100_device { public: // construction/destruction - imagetek_i4300_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + imagetek_i4300_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void v3_map(address_map &map); u8 irq_vector_r(offs_t offset); diff --git a/src/devices/video/ims_cvc.cpp b/src/devices/video/ims_cvc.cpp index 0c5b62dfff4..cdae36cd5d2 100644 --- a/src/devices/video/ims_cvc.cpp +++ b/src/devices/video/ims_cvc.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(G300, g300_device, "g300", "INMOS G300 Colour Video Controlle DEFINE_DEVICE_TYPE(G332, g332_device, "g332", "INMOS G332 Colour Video Controller") DEFINE_DEVICE_TYPE(G364, g364_device, "g364", "INMOS G364 Colour Video Controller") -ims_cvc_device::ims_cvc_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +ims_cvc_device::ims_cvc_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_screen(*this, finder_base::DUMMY_TAG) @@ -34,23 +34,23 @@ ims_cvc_device::ims_cvc_device(machine_config const &mconfig, device_type type, { } -g300_device::g300_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +g300_device::g300_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : ims_cvc_device(mconfig, G300, tag, owner, clock) { } -g332_device::g332_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +g332_device::g332_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : ims_cvc_device(mconfig, type, tag, owner, clock) , m_microport(*this, "microport") { } -g332_device::g332_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +g332_device::g332_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : g332_device(mconfig, G332, tag, owner, clock) { } -g364_device::g364_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +g364_device::g364_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : g332_device(mconfig, G364, tag, owner, clock) { } @@ -362,7 +362,7 @@ void g332_device::control_a_w(u32 data) rectangle const visarea(hbend, hbend + (m_display << 2) - 1, vbend, height - 1); - u32 const dotclock = (m_boot & PLL_SELECT) ? clock() * (m_boot & PLL_MULTIPLIER) : clock(); + u32 const dotclock = (m_boot & PLL_SELECT) ? clock().value() * (m_boot & PLL_MULTIPLIER) : clock().value(); attotime const refresh = attotime::from_hz(dotclock / (width * height)); m_screen->configure(width, height, visarea, refresh.as_attoseconds()); diff --git a/src/devices/video/ims_cvc.h b/src/devices/video/ims_cvc.h index 094391e23cf..6d303b872cd 100644 --- a/src/devices/video/ims_cvc.h +++ b/src/devices/video/ims_cvc.h @@ -24,7 +24,7 @@ public: virtual void set_swapped(bool swapped) { m_swap = swapped ? 3 : 0; } protected: - ims_cvc_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + ims_cvc_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t overrides virtual void device_start() override; @@ -96,7 +96,7 @@ protected: class g300_device : public ims_cvc_device { public: - g300_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + g300_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -115,7 +115,7 @@ private: class g332_device : public ims_cvc_device { public: - g332_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + g332_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -168,7 +168,7 @@ public: }; protected: - g332_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + g332_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t overrides virtual void device_add_mconfig(machine_config &config) override; @@ -220,7 +220,7 @@ private: class g364_device : public g332_device { public: - g364_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + g364_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void set_swapped(bool swapped) override { m_swap = swapped ? 7 : 0; } }; diff --git a/src/devices/video/jangou_blitter.cpp b/src/devices/video/jangou_blitter.cpp index b8718b2ba20..26e89791108 100644 --- a/src/devices/video/jangou_blitter.cpp +++ b/src/devices/video/jangou_blitter.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(JANGOU_BLITTER, jangou_blitter_device, "jangou_blitter", "Jan // jangou_blitter_device - constructor //------------------------------------------------- -jangou_blitter_device::jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jangou_blitter_device::jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JANGOU_BLITTER, tag, owner, clock) { } diff --git a/src/devices/video/jangou_blitter.h b/src/devices/video/jangou_blitter.h index e8d43c3a9f6..ed77b19bc17 100644 --- a/src/devices/video/jangou_blitter.h +++ b/src/devices/video/jangou_blitter.h @@ -17,7 +17,7 @@ class jangou_blitter_device : public device_t { public: // construction/destruction - jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void blit_v1_regs(address_map &map); diff --git a/src/devices/video/k051316.cpp b/src/devices/video/k051316.cpp index e38897dfaa8..eeab6a459d5 100644 --- a/src/devices/video/k051316.cpp +++ b/src/devices/video/k051316.cpp @@ -106,7 +106,7 @@ GFXDECODE_MEMBER( k051316_device::gfxinfo4_ram ) GFXDECODE_END -k051316_device::k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k051316_device::k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K051316, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo) , m_zoom_rom(*this, DEVICE_SELF) diff --git a/src/devices/video/k051316.h b/src/devices/video/k051316.h index 7f8b4b9e068..dc8eb36de6f 100644 --- a/src/devices/video/k051316.h +++ b/src/devices/video/k051316.h @@ -16,7 +16,7 @@ class k051316_device : public device_t, public device_gfx_interface public: using zoom_delegate = device_delegate; - k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const gfx_layout charlayout4; static const gfx_layout charlayout7; diff --git a/src/devices/video/k053936.cpp b/src/devices/video/k053936.cpp index c9900430b53..1a922fa4324 100644 --- a/src/devices/video/k053936.cpp +++ b/src/devices/video/k053936.cpp @@ -229,7 +229,7 @@ void K053936_set_offset(int chip, int xoffs, int yoffs) DEFINE_DEVICE_TYPE(K053936, k053936_device, "k053936", "K053936 Video Controller") -k053936_device::k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k053936_device::k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053936, tag, owner, clock), m_ctrl(nullptr), m_linectrl(nullptr), diff --git a/src/devices/video/k053936.h b/src/devices/video/k053936.h index 75894c2bf95..691276ef913 100644 --- a/src/devices/video/k053936.h +++ b/src/devices/video/k053936.h @@ -23,7 +23,7 @@ void K053936GP_0_zoom_draw(running_machine &machine, bitmap_rgb32 &bitmap, const class k053936_device : public device_t { public: - k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~k053936_device() {} // configuration diff --git a/src/devices/video/lc7582.cpp b/src/devices/video/lc7582.cpp index f576d97ea20..6682377b096 100644 --- a/src/devices/video/lc7582.cpp +++ b/src/devices/video/lc7582.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(LC7582, lc7582_device, "lc7582", "Sanyo LC7582 LCD Driver") // constructor //------------------------------------------------- -lc7582_device::lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +lc7582_device::lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LC7582, tag, owner, clock), m_write_segs(*this) { } diff --git a/src/devices/video/lc7582.h b/src/devices/video/lc7582.h index 3f8dcc22bc6..3a744395829 100644 --- a/src/devices/video/lc7582.h +++ b/src/devices/video/lc7582.h @@ -34,7 +34,7 @@ pin desc class lc7582_device : public device_t { public: - lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + lc7582_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto write_segs() { return m_write_segs.bind(); } // S pins, COM1/COM2 in offset diff --git a/src/devices/video/lc7985.cpp b/src/devices/video/lc7985.cpp index ef01cbb6a2c..1d9cd154f21 100644 --- a/src/devices/video/lc7985.cpp +++ b/src/devices/video/lc7985.cpp @@ -17,7 +17,7 @@ ROM_START( lc7985 ) ROM_LOAD( "lc7985.bin", 0x0000, 0x1000, BAD_DUMP CRC(fdc64160) SHA1(8e6b54f8fb7c4c15aab2e65dd1a44729b97423b1)) // from page 12 of the LC7985D datasheet ROM_END -lc7985_device::lc7985_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lc7985_device::lc7985_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LC7985, tag, owner, clock), m_cgrom_region(*this, DEVICE_SELF) { diff --git a/src/devices/video/lc7985.h b/src/devices/video/lc7985.h index 353822e7462..25d898508d3 100644 --- a/src/devices/video/lc7985.h +++ b/src/devices/video/lc7985.h @@ -14,7 +14,7 @@ class lc7985_device : public device_t { public: - lc7985_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lc7985_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void ir_w(u8 data); u8 status_r(); diff --git a/src/devices/video/m50458.cpp b/src/devices/video/m50458.cpp index e2404684700..0502a469f51 100644 --- a/src/devices/video/m50458.cpp +++ b/src/devices/video/m50458.cpp @@ -179,7 +179,7 @@ inline void m50458_device::write_word(offs_t address, uint16_t data) // m50458_device - constructor //------------------------------------------------- -m50458_device::m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m50458_device::m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M50458, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_video_interface(mconfig, *this) diff --git a/src/devices/video/m50458.h b/src/devices/video/m50458.h index fd0eed36e22..2261a1fcbdf 100644 --- a/src/devices/video/m50458.h +++ b/src/devices/video/m50458.h @@ -25,13 +25,13 @@ class m50458_device : public device_t, public: // construction/destruction template - m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : m50458_device(mconfig, tag, owner, clock) { set_screen(std::forward(screen_tag)); } - m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m50458_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations DECLARE_WRITE_LINE_MEMBER( write_bit ); diff --git a/src/devices/video/mb88303.cpp b/src/devices/video/mb88303.cpp index 16a24122306..c9f901e0afc 100644 --- a/src/devices/video/mb88303.cpp +++ b/src/devices/video/mb88303.cpp @@ -101,7 +101,7 @@ DEFINE_DEVICE_TYPE(MB88303, mb88303_device, "mb88303", "Fujitsu MB88303") // mb88303_device - constructor //------------------------------------------------- -mb88303_device::mb88303_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb88303_device::mb88303_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB88303, tag, owner, clock) , m_write_vow(*this) , m_write_vobn(*this) diff --git a/src/devices/video/mb88303.h b/src/devices/video/mb88303.h index 742c6b62beb..8483fef0f4d 100644 --- a/src/devices/video/mb88303.h +++ b/src/devices/video/mb88303.h @@ -39,7 +39,7 @@ public: static constexpr unsigned VISIBLE_LINES = 9; // construction/destruction - mb88303_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb88303_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto vow_callback() { return m_write_vow.bind(); } auto vobn_callback() { return m_write_vobn.bind(); } diff --git a/src/devices/video/mb90082.cpp b/src/devices/video/mb90082.cpp index 27ef9238ec6..3f8f1658f10 100644 --- a/src/devices/video/mb90082.cpp +++ b/src/devices/video/mb90082.cpp @@ -91,7 +91,7 @@ inline void mb90082_device::write_word(offs_t address, uint16_t data) // mb90082_device - constructor //------------------------------------------------- -mb90082_device::mb90082_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb90082_device::mb90082_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB90082, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor(FUNC(mb90082_device::mb90082_vram), this)) diff --git a/src/devices/video/mb90082.h b/src/devices/video/mb90082.h index 782138ea466..50c21b4a530 100644 --- a/src/devices/video/mb90082.h +++ b/src/devices/video/mb90082.h @@ -24,7 +24,7 @@ class mb90082_device : public device_t, { public: // construction/destruction - mb90082_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb90082_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void write(uint8_t data); diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp index 09ac807f13a..deaa60bce4f 100644 --- a/src/devices/video/mb_vcu.cpp +++ b/src/devices/video/mb_vcu.cpp @@ -147,7 +147,7 @@ inline void mb_vcu_device::write_io(offs_t address, uint8_t data) // mb_vcu_device - constructor //------------------------------------------------- -mb_vcu_device::mb_vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb_vcu_device::mb_vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB_VCU, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_video_interface(mconfig, *this) diff --git a/src/devices/video/mb_vcu.h b/src/devices/video/mb_vcu.h index 8e9973f7433..c2902064aa8 100644 --- a/src/devices/video/mb_vcu.h +++ b/src/devices/video/mb_vcu.h @@ -20,7 +20,7 @@ class mb_vcu_device : public device_t, { public: // construction/destruction - mb_vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb_vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp index 8c8c6e81f88..e57274e30c2 100644 --- a/src/devices/video/mc6845.cpp +++ b/src/devices/video/mc6845.cpp @@ -104,7 +104,7 @@ DEFINE_DEVICE_TYPE(MOS8568, mos8568_device, "mos8568", "MOS 8568 VDC") #define ATTR_ALTERNATE_CHARSET BIT(attr, 7) -mc6845_device::mc6845_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc6845_device::mc6845_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this, false) , m_show_border_area(true) @@ -128,7 +128,7 @@ mc6845_device::mc6845_device(const machine_config &mconfig, device_type type, co { } -mc6845_device::mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6845_device::mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, MC6845, tag, owner, clock) { } @@ -1624,61 +1624,61 @@ void mos8563_device::mos8563_videoram_map(address_map &map) } -r6545_1_device::r6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r6545_1_device::r6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, R6545_1, tag, owner, clock) { } -mc6845_1_device::mc6845_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6845_1_device::mc6845_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, MC6845_1, tag, owner, clock) { } -hd6845s_device::hd6845s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd6845s_device::hd6845s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, type, tag, owner, clock) { } -hd6845s_device::hd6845s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6845s_device::hd6845s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, HD6845S, tag, owner, clock) { } -c6545_1_device::c6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +c6545_1_device::c6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, C6545_1, tag, owner, clock) { } -sy6545_1_device::sy6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sy6545_1_device::sy6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, SY6545_1, tag, owner, clock) { } -sy6845e_device::sy6845e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sy6845e_device::sy6845e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, SY6845E, tag, owner, clock) { } -hd6345_device::hd6345_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6345_device::hd6345_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6845s_device(mconfig, HD6345, tag, owner, clock) { } -ams40489_device::ams40489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ams40489_device::ams40489_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, AMS40489, tag, owner, clock) { } -mos8563_device::mos8563_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mos8563_device::mos8563_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_palette_interface(mconfig, *this) @@ -1688,13 +1688,13 @@ mos8563_device::mos8563_device(const machine_config &mconfig, device_type type, } -mos8563_device::mos8563_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8563_device::mos8563_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos8563_device(mconfig, MOS8563, tag, owner, clock) { } -mos8568_device::mos8568_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8568_device::mos8568_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos8563_device(mconfig, MOS8568, tag, owner, clock) { } diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h index 1208c057bb6..4ba6cee34b6 100644 --- a/src/devices/video/mc6845.h +++ b/src/devices/video/mc6845.h @@ -60,7 +60,7 @@ public: typedef device_delegate on_update_addr_changed_delegate; // construction/destruction - mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6845_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_show_border_area(bool show) { m_show_border_area = show; } void set_visarea_adjust(int min_x, int max_x, int min_y, int max_y) @@ -126,7 +126,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - mc6845_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc6845_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -295,7 +295,7 @@ protected: class mc6845_1_device : public mc6845_device { public: - mc6845_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6845_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -305,7 +305,7 @@ protected: class r6545_1_device : public mc6845_device { public: - r6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -315,7 +315,7 @@ protected: class c6545_1_device : public mc6845_device { public: - c6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -325,10 +325,10 @@ protected: class hd6845s_device : public mc6845_device { public: - hd6845s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6845s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - hd6845s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd6845s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -338,7 +338,7 @@ protected: class sy6545_1_device : public mc6845_device { public: - sy6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sy6545_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -348,7 +348,7 @@ protected: class sy6845e_device : public mc6845_device { public: - sy6845e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sy6845e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -358,7 +358,7 @@ protected: class hd6345_device : public hd6845s_device { public: - hd6345_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6345_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void address_w(uint8_t data); uint8_t register_r(); @@ -393,7 +393,7 @@ protected: class ams40489_device : public mc6845_device { public: - ams40489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ams40489_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -405,7 +405,7 @@ class mos8563_device : public mc6845_device, public device_palette_interface { public: - mos8563_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8563_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void address_w(uint8_t data); uint8_t status_r(); @@ -418,7 +418,7 @@ public: MC6845_UPDATE_ROW( vdc_update_row ); protected: - mos8563_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mos8563_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -470,7 +470,7 @@ protected: class mos8568_device : public mos8563_device { public: - mos8568_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8568_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/video/mc6847.cpp b/src/devices/video/mc6847.cpp index da0b80a5d61..df3b56248b6 100644 --- a/src/devices/video/mc6847.cpp +++ b/src/devices/video/mc6847.cpp @@ -129,7 +129,7 @@ const uint32_t mc6847_base_device::s_palette[mc6847_base_device::PALETTE_LENGTH] // ctor //------------------------------------------------- -mc6847_friend_device::mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, +mc6847_friend_device::mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *fontdata, bool is_mc6847t1, double tpfs, int field_sync_falling_edge_scanline, int divider, bool supports_partial_body_scanlines) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) @@ -518,7 +518,7 @@ std::string mc6847_friend_device::describe_context() const // ctor //------------------------------------------------- -mc6847_base_device::mc6847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint8_t *fontdata, double tpfs) : +mc6847_base_device::mc6847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *fontdata, double tpfs) : mc6847_friend_device(mconfig, type, tag, owner, clock, fontdata, (type == MC6847T1_NTSC) || (type == MC6847T1_PAL), tpfs, 25+191, 1, true), m_input_cb(*this), m_black_and_white(false), @@ -1615,7 +1615,7 @@ DEFINE_DEVICE_TYPE(M5C6847P1, m5c6847p1_device, "m5c6847p1", "Mitsub // mc6847_ntsc_device //------------------------------------------------- -mc6847_ntsc_device::mc6847_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6847_ntsc_device::mc6847_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, MC6847_NTSC, tag, owner, clock, vdg_fontdata8x12, 262.0) { } @@ -1626,7 +1626,7 @@ mc6847_ntsc_device::mc6847_ntsc_device(const machine_config &mconfig, const char // mc6847_pal_device //------------------------------------------------- -mc6847_pal_device::mc6847_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6847_pal_device::mc6847_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, MC6847_PAL, tag, owner, clock, vdg_fontdata8x12, 313.0) { m_artifacter.set_pal_artifacting(true); @@ -1638,7 +1638,7 @@ mc6847_pal_device::mc6847_pal_device(const machine_config &mconfig, const char * // mc6847y_ntsc_device //------------------------------------------------- -mc6847y_ntsc_device::mc6847y_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6847y_ntsc_device::mc6847y_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, MC6847Y_NTSC, tag, owner, clock, vdg_fontdata8x12, 262.5) { } @@ -1649,7 +1649,7 @@ mc6847y_ntsc_device::mc6847y_ntsc_device(const machine_config &mconfig, const ch // mc6847y_pal_device //------------------------------------------------- -mc6847y_pal_device::mc6847y_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6847y_pal_device::mc6847y_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, MC6847Y_PAL, tag, owner, clock, vdg_fontdata8x12, 313.0) { m_artifacter.set_pal_artifacting(true); @@ -1661,7 +1661,7 @@ mc6847y_pal_device::mc6847y_pal_device(const machine_config &mconfig, const char // mc6847t1_ntsc_device //------------------------------------------------- -mc6847t1_ntsc_device::mc6847t1_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6847t1_ntsc_device::mc6847t1_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, MC6847T1_NTSC, tag, owner, clock, vdg_t1_fontdata8x12, 262.0) { } @@ -1672,7 +1672,7 @@ mc6847t1_ntsc_device::mc6847t1_ntsc_device(const machine_config &mconfig, const // mc6847t1_pal_device //------------------------------------------------- -mc6847t1_pal_device::mc6847t1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6847t1_pal_device::mc6847t1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, MC6847T1_PAL, tag, owner, clock, vdg_t1_fontdata8x12, 313.0) { m_artifacter.set_pal_artifacting(true); @@ -1684,7 +1684,7 @@ mc6847t1_pal_device::mc6847t1_pal_device(const machine_config &mconfig, const ch // s68047_device //------------------------------------------------- -s68047_device::s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s68047_device::s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, S68047, tag, owner, clock, s68047_fontdata8x12, 262.0) { } @@ -1733,7 +1733,7 @@ const uint32_t s68047_device::s_s68047_hack_palette[16] = // m5c6847p1_device //------------------------------------------------- -m5c6847p1_device::m5c6847p1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m5c6847p1_device::m5c6847p1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6847_base_device(mconfig, M5C6847P1, tag, owner, clock, vdg_fontdata8x12, 262.5) { } diff --git a/src/devices/video/mc6847.h b/src/devices/video/mc6847.h index d58f19fcd23..bab59e9271e 100644 --- a/src/devices/video/mc6847.h +++ b/src/devices/video/mc6847.h @@ -57,7 +57,7 @@ public: template void set_get_char_rom(T &&... args) { m_charrom_cb.set(std::forward(args)...); } protected: - mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, + mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *fontdata, bool is_mc6847t1, double tpfs, int field_sync_falling_edge_scanline, int divider, bool supports_partial_body_scanlines); // fonts @@ -522,7 +522,7 @@ public: DECLARE_WRITE_LINE_MEMBER( inv_w ) { change_mode(MODE_INV, state); } protected: - mc6847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint8_t *fontdata, double tpfs); + mc6847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *fontdata, double tpfs); // device-level overrides virtual void device_config_complete() override; @@ -626,43 +626,43 @@ private: class mc6847_ntsc_device : public mc6847_base_device { public: - mc6847_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6847_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc6847_pal_device : public mc6847_base_device { public: - mc6847_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6847_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc6847y_ntsc_device : public mc6847_base_device { public: - mc6847y_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6847y_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc6847y_pal_device : public mc6847_base_device { public: - mc6847y_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6847y_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc6847t1_ntsc_device : public mc6847_base_device { public: - mc6847t1_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6847t1_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc6847t1_pal_device : public mc6847_base_device { public: - mc6847t1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6847t1_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class s68047_device : public mc6847_base_device { public: - s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s68047_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void hack_black_becomes_blue(bool flag); @@ -673,7 +673,7 @@ private: class m5c6847p1_device : public mc6847_base_device { public: - m5c6847p1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m5c6847p1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/md4330b.cpp b/src/devices/video/md4330b.cpp index f8f9ca2323a..a8f11a26174 100644 --- a/src/devices/video/md4330b.cpp +++ b/src/devices/video/md4330b.cpp @@ -23,16 +23,16 @@ DEFINE_DEVICE_TYPE(MD4332B, md4332b_device, "md4332b", "Mitel MD4332B LCD Driver // constructor //------------------------------------------------- -md4330b_device::md4330b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 qmax) : +md4330b_device::md4330b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 qmax) : device_t(mconfig, type, tag, owner, clock), m_qmax(qmax), m_write_q(*this), m_write_do(*this) { } -md4330b_device::md4330b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +md4330b_device::md4330b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md4330b_device(mconfig, MD4330B, tag, owner, clock, 30) { } -md4332b_device::md4332b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +md4332b_device::md4332b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : md4330b_device(mconfig, MD4332B, tag, owner, clock, 32) { } diff --git a/src/devices/video/md4330b.h b/src/devices/video/md4330b.h index 906c032424a..d87f417b7f0 100644 --- a/src/devices/video/md4330b.h +++ b/src/devices/video/md4330b.h @@ -42,7 +42,7 @@ class md4330b_device : public device_t { public: - md4330b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + md4330b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto write_q() { return m_write_q.bind(); } @@ -55,7 +55,7 @@ public: DECLARE_READ_LINE_MEMBER(do_r) { return m_do; } protected: - md4330b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 qmax); + md4330b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 qmax); // device-level overrides virtual void device_start() override; @@ -81,7 +81,7 @@ protected: class md4332b_device : public md4330b_device { public: - md4332b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + md4332b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/video/mga2064w.cpp b/src/devices/video/mga2064w.cpp index 6654aa9ec2e..1ec67829fbc 100644 --- a/src/devices/video/mga2064w.cpp +++ b/src/devices/video/mga2064w.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(MGA2064W, mga2064w_device, "mga2064w", "Matrox Millennium") -mga2064w_device::mga2064w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mga2064w_device::mga2064w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MGA2064W, tag, owner, clock) { set_ids(0x102b0519, 0x01, 0x030000, 0x00000000); diff --git a/src/devices/video/mga2064w.h b/src/devices/video/mga2064w.h index 6766bf304a9..33c52b998f1 100644 --- a/src/devices/video/mga2064w.h +++ b/src/devices/video/mga2064w.h @@ -9,7 +9,7 @@ class mga2064w_device : public pci_device { public: - mga2064w_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mga2064w_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/video/mm5445.cpp b/src/devices/video/mm5445.cpp index 6b857ed19b3..b52b6ba5bff 100644 --- a/src/devices/video/mm5445.cpp +++ b/src/devices/video/mm5445.cpp @@ -22,25 +22,25 @@ DEFINE_DEVICE_TYPE(MM5448, mm5448_device, "mm5448", "MM5448 VFD Driver") // constructor //------------------------------------------------- -mm5445_device::mm5445_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 outpins) : +mm5445_device::mm5445_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 outpins) : device_t(mconfig, type, tag, owner, clock), m_outmask((u64(1) << outpins) - 1), m_write_output(*this) { } -mm5445_device::mm5445_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm5445_device::mm5445_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5445_device(mconfig, MM5445, tag, owner, clock, 33) { } -mm5446_device::mm5446_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm5446_device::mm5446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5445_device(mconfig, MM5446, tag, owner, clock, 34) { } -mm5447_device::mm5447_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm5447_device::mm5447_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5445_device(mconfig, MM5447, tag, owner, clock, 34) { } -mm5448_device::mm5448_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mm5448_device::mm5448_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5445_device(mconfig, MM5448, tag, owner, clock, 35) { } diff --git a/src/devices/video/mm5445.h b/src/devices/video/mm5445.h index 7d16d4f2ee2..d4a5e373bb3 100644 --- a/src/devices/video/mm5445.h +++ b/src/devices/video/mm5445.h @@ -45,7 +45,7 @@ class mm5445_device : public device_t { public: - mm5445_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mm5445_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto output_cb() { return m_write_output.bind(); } @@ -55,7 +55,7 @@ public: DECLARE_WRITE_LINE_MEMBER(data_w) { m_data = (state) ? 1 : 0; } protected: - mm5445_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 outpins); + mm5445_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 outpins); // device-level overrides virtual void device_start() override; @@ -77,19 +77,19 @@ protected: class mm5446_device : public mm5445_device { public: - mm5446_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mm5447_device : public mm5445_device { public: - mm5447_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5447_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mm5448_device : public mm5445_device { public: - mm5448_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5448_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/mos6566.cpp b/src/devices/video/mos6566.cpp index 80d8a7c01b6..3b6d37788f2 100644 --- a/src/devices/video/mos6566.cpp +++ b/src/devices/video/mos6566.cpp @@ -559,12 +559,12 @@ inline void mos6566_device::draw_multi( uint16_t p, uint8_t c0, uint8_t c1, uint // mos6566_device - constructor //------------------------------------------------- -mos6566_device::mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6566_device::mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6566_device(mconfig, MOS6566, tag, owner, clock, TYPE_6566) { } -mos6566_device::mos6566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mos6566_device::mos6566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), @@ -584,42 +584,42 @@ mos6566_device::mos6566_device(const machine_config &mconfig, device_type type, { } -mos6567_device::mos6567_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6567_device::mos6567_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6567_device(mconfig, MOS6567, tag, owner, clock, TYPE_6567) { } -mos6567_device::mos6567_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mos6567_device::mos6567_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : mos6566_device(mconfig, type, tag, owner, clock, variant) { } -mos8562_device::mos8562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8562_device::mos8562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6567_device(mconfig, MOS8562, tag, owner, clock, TYPE_8562) { } -mos8564_device::mos8564_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8564_device::mos8564_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6567_device(mconfig, MOS8564, tag, owner, clock, TYPE_8564) { } -mos6569_device::mos6569_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6569_device::mos6569_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6569_device(mconfig, MOS6569, tag, owner, clock, TYPE_6569) { } -mos6569_device::mos6569_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mos6569_device::mos6569_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : mos6566_device(mconfig, type, tag, owner, clock, variant) { } -mos8565_device::mos8565_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8565_device::mos8565_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6569_device(mconfig, MOS8565, tag, owner, clock, TYPE_8565) { } -mos8566_device::mos8566_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8566_device::mos8566_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6569_device(mconfig, MOS8566, tag, owner, clock, TYPE_8566) { } @@ -2741,7 +2741,7 @@ void mos6566_device::write(offs_t offset, uint8_t data) { if (BIT(m_reg[offset], 0) != BIT(data, 0)) { - m_cpu->set_unscaled_clock(clock() << BIT(data, 0)); + m_cpu->set_unscaled_clock(clock() * (BIT(data, 0) ? 2 : 1)); } m_reg[offset] = data | 0xfc; diff --git a/src/devices/video/mos6566.h b/src/devices/video/mos6566.h index a7147295196..0e64aada3de 100644 --- a/src/devices/video/mos6566.h +++ b/src/devices/video/mos6566.h @@ -189,7 +189,7 @@ class mos6566_device : public device_t, { public: // construction/destruction - mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6566_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(tag); } auto irq_callback() { return m_write_irq.bind(); } @@ -228,7 +228,7 @@ protected: TYPE_8569 // PAL-N VIC-IIe (C128) }; - mos6566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mos6566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void device_start() override; @@ -356,10 +356,10 @@ class mos6567_device : public mos6566_device { public: // construction/destruction - mos6567_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6567_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mos6567_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mos6567_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); }; @@ -369,7 +369,7 @@ class mos8562_device : public mos6567_device { public: // construction/destruction - mos8562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -379,7 +379,7 @@ class mos8564_device : public mos6567_device { public: // construction/destruction - mos8564_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8564_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides @@ -394,10 +394,10 @@ class mos6569_device : public mos6566_device { public: // construction/destruction - mos6569_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6569_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - mos6569_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mos6569_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); // device-level overrides virtual void execute_run() override; @@ -410,7 +410,7 @@ class mos8565_device : public mos6569_device { public: // construction/destruction - mos8565_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8565_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -420,7 +420,7 @@ class mos8566_device : public mos6569_device { public: // construction/destruction - mos8566_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8566_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_execute_interface overrides diff --git a/src/devices/video/msm6222b.cpp b/src/devices/video/msm6222b.cpp index ebcbfea24fe..dcd84569f7b 100644 --- a/src/devices/video/msm6222b.cpp +++ b/src/devices/video/msm6222b.cpp @@ -21,20 +21,20 @@ ROM_START( msm6222b_01 ) ROM_LOAD( "msm6222b-01.bin", 0x0000, 0x1000, CRC(8ffa8521) SHA1(e108b520e6d20459a7bbd5958bbfa1d551a690bd) ) ROM_END -msm6222b_device::msm6222b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +msm6222b_device::msm6222b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_cgrom(*this, finder_base::DUMMY_TAG), cursor_direction(false), cursor_blinking(false), two_line(false), shift_on_write(false), double_height(false), cursor_on(false), display_on(false), adc(0), shift(0) { } -msm6222b_device::msm6222b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +msm6222b_device::msm6222b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6222b_device(mconfig, MSM6222B, tag, owner, clock) { m_cgrom.set_tag(*this, DEVICE_SELF); } -msm6222b_01_device::msm6222b_01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +msm6222b_01_device::msm6222b_01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6222b_device(mconfig, MSM6222B_01, tag, owner, clock) { // load the fixed cgrom diff --git a/src/devices/video/msm6222b.h b/src/devices/video/msm6222b.h index 7a2cb00fd89..da5c6321b80 100644 --- a/src/devices/video/msm6222b.h +++ b/src/devices/video/msm6222b.h @@ -18,7 +18,7 @@ class msm6222b_device : public device_t { public: - msm6222b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm6222b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void control_w(uint8_t data); uint8_t control_r(); @@ -29,7 +29,7 @@ public: const uint8_t *render(); protected: - msm6222b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msm6222b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -49,7 +49,7 @@ private: class msm6222b_01_device : public msm6222b_device { public: - msm6222b_01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm6222b_01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/video/msm6255.cpp b/src/devices/video/msm6255.cpp index de34d079cde..664ef16242a 100644 --- a/src/devices/video/msm6255.cpp +++ b/src/devices/video/msm6255.cpp @@ -77,7 +77,7 @@ void msm6255_device::msm6255(address_map &map) // msm6255_device - constructor //------------------------------------------------- -msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM6255, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/msm6255.h b/src/devices/video/msm6255.h index 8e821c7668e..85344705cb1 100644 --- a/src/devices/video/msm6255.h +++ b/src/devices/video/msm6255.h @@ -25,7 +25,7 @@ class msm6255_device : public device_t, { public: // construction/destruction - msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm6255_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map); diff --git a/src/devices/video/nereid.cpp b/src/devices/video/nereid.cpp index 47a4c28371b..50d375d8a44 100644 --- a/src/devices/video/nereid.cpp +++ b/src/devices/video/nereid.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(NEREID, nereid_device, "nereid", "HP Nereid ASIC") -nereid_device::nereid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nereid_device::nereid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_palette_interface(mconfig, *this), m_red(0), @@ -20,7 +20,7 @@ nereid_device::nereid_device(const machine_config &mconfig, device_type type, co { } -nereid_device::nereid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nereid_device::nereid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nereid_device(mconfig, NEREID, tag, owner, clock) { } diff --git a/src/devices/video/nereid.h b/src/devices/video/nereid.h index 18717de2b22..fa3a6ee1e5c 100644 --- a/src/devices/video/nereid.h +++ b/src/devices/video/nereid.h @@ -8,7 +8,7 @@ class nereid_device : public device_t, public device_palette_interface { public: - nereid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nereid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t ctrl_r(offs_t offset, uint16_t mem_mask = ~0); void ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -16,7 +16,7 @@ public: rgb_t map_color(uint8_t input, uint8_t ovl = 0); protected: - nereid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nereid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; virtual u32 palette_entries() const noexcept override { return 0x200; } diff --git a/src/devices/video/nt7534.cpp b/src/devices/video/nt7534.cpp index e1065376860..bb8eb2cf06a 100644 --- a/src/devices/video/nt7534.cpp +++ b/src/devices/video/nt7534.cpp @@ -27,12 +27,12 @@ DEFINE_DEVICE_TYPE(NT7534, nt7534_device, "nt7534", "NT7534 LCD Controller // nt7534_device - constructor //------------------------------------------------- -nt7534_device::nt7534_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nt7534_device::nt7534_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nt7534_device(mconfig, NT7534, tag, owner, clock) { } -nt7534_device::nt7534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nt7534_device::nt7534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_pixel_update_cb(*this) { diff --git a/src/devices/video/nt7534.h b/src/devices/video/nt7534.h index 126d5dfff92..48ed4cc5309 100644 --- a/src/devices/video/nt7534.h +++ b/src/devices/video/nt7534.h @@ -27,7 +27,7 @@ public: typedef device_delegate pixel_update_delegate; // construction/destruction - nt7534_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nt7534_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_pixel_update_cb(T &&... args) { m_pixel_update_cb.set(std::forward(args)...); } @@ -43,7 +43,7 @@ public: virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: - nt7534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nt7534_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp index 35c2f6e5d0b..87ac6bfd88b 100644 --- a/src/devices/video/pc_vga.cpp +++ b/src/devices/video/pc_vga.cpp @@ -132,7 +132,7 @@ DEFINE_DEVICE_TYPE(MACH8, mach8_device, "mach8", "Mach8") DEFINE_DEVICE_TYPE(XGA_COPRO, xga_copro_device, "xga_copro", "IBM XGA Coprocessor") DEFINE_DEVICE_TYPE(OTI111, oak_oti111_vga_device, "oti111_vga", "Oak Technologies Spitfire 64111") -vga_device::vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vga_device::vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , device_palette_interface(mconfig, *this) @@ -140,63 +140,63 @@ vga_device::vga_device(const machine_config &mconfig, device_type type, const ch { } -vga_device::vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vga_device::vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vga_device(mconfig, VGA, tag, owner, clock) { } -svga_device::svga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +svga_device::svga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : vga_device(mconfig, type, tag, owner, clock) { } -tseng_vga_device::tseng_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tseng_vga_device::tseng_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, TSENG_VGA, tag, owner, clock) { } -s3_vga_device::s3_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3_vga_device::s3_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3_vga_device(mconfig, S3_VGA, tag, owner, clock) { } -s3_vga_device::s3_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +s3_vga_device::s3_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ati_vga_device(mconfig, type, tag, owner, clock) { } -gamtor_vga_device::gamtor_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gamtor_vga_device::gamtor_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, GAMTOR_VGA, tag, owner, clock) { } -ati_vga_device::ati_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ati_vga_device::ati_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ati_vga_device(mconfig, ATI_VGA, tag, owner, clock) { } -ati_vga_device::ati_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ati_vga_device::ati_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, type, tag, owner, clock) { } -ibm8514a_device::ibm8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm8514a_device::ibm8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm8514a_device(mconfig, IBM8514A, tag, owner, clock) { } -ibm8514a_device::ibm8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ibm8514a_device::ibm8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_vga(*this, finder_base::DUMMY_TAG) { } -mach8_device::mach8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mach8_device::mach8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ibm8514a_device(mconfig, type, tag, owner, clock) { } -mach8_device::mach8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mach8_device::mach8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mach8_device(mconfig, MACH8, tag, owner, clock) { } @@ -2170,13 +2170,13 @@ void vga_device::mem_linear_w(offs_t offset, uint8_t data) void ati_vga_device::device_add_mconfig(machine_config &config) { - MACH8(config, "8514a", 0).set_vga_owner(); + MACH8(config, "8514a").set_vga_owner(); EEPROM_93C46_16BIT(config, "ati_eeprom"); } void s3_vga_device::device_add_mconfig(machine_config &config) { - IBM8514A(config, "8514a", 0).set_vga_owner(); + IBM8514A(config, "8514a").set_vga_owner(); } /****************************************** @@ -5845,7 +5845,7 @@ void mach8_device::mach8_ge_ext_config_w(uint16_t data) popmessage("EEPROM enabled via 7AEE"); } -xga_copro_device::xga_copro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xga_copro_device::xga_copro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XGA_COPRO, tag, owner, clock) , m_var(TYPE::XGA) , m_mem_read_cb(*this) @@ -6593,7 +6593,7 @@ void xga_copro_device::device_reset() m_pelmap = 0; } -oak_oti111_vga_device::oak_oti111_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +oak_oti111_vga_device::oak_oti111_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, OTI111, tag, owner, clock) , m_xga(*this, "xga") { @@ -6601,7 +6601,7 @@ oak_oti111_vga_device::oak_oti111_vga_device(const machine_config &mconfig, cons void oak_oti111_vga_device::device_add_mconfig(machine_config &config) { - XGA_COPRO(config, m_xga, 0); + XGA_COPRO(config, m_xga); m_xga->mem_read_callback().set(FUNC(oak_oti111_vga_device::mem_linear_r)); m_xga->mem_write_callback().set(FUNC(oak_oti111_vga_device::mem_linear_w)); m_xga->set_type(xga_copro_device::TYPE::OTI111); diff --git a/src/devices/video/pc_vga.h b/src/devices/video/pc_vga.h index a12ef1c477c..6255498f8e4 100644 --- a/src/devices/video/pc_vga.h +++ b/src/devices/video/pc_vga.h @@ -21,7 +21,7 @@ class vga_device : public device_t, public device_video_interface, public device public: // construction/destruction - vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void zero(); virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -57,7 +57,7 @@ protected: RGB32_MODE }; - vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -255,7 +255,7 @@ public: protected: // construction/destruction - svga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + svga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void svga_vh_rgb8(bitmap_rgb32 &bitmap, const rectangle &cliprect); void svga_vh_rgb15(bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -281,7 +281,7 @@ protected: class ibm8514a_device : public device_t { public: - ibm8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_vga(T &&tag) { m_vga.set_tag(std::forward(tag)); } void set_vga_owner() { m_vga.set_tag(DEVICE_SELF); } @@ -397,7 +397,7 @@ public: } ibm8514; protected: - ibm8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm8514a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; void ibm8514_write(uint32_t offset, uint32_t src); @@ -423,7 +423,7 @@ DECLARE_DEVICE_TYPE(IBM8514A, ibm8514a_device) class mach8_device : public ibm8514a_device { public: - mach8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mach8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t mach8_ec0_r(); void mach8_ec0_w(uint16_t data); @@ -467,7 +467,7 @@ public: uint16_t offset() { if(mach8.ati_mode) return mach8.ge_pitch; else return 128; } protected: - mach8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mach8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; struct { @@ -499,7 +499,7 @@ class tseng_vga_device : public svga_device { public: // construction/destruction - tseng_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tseng_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t port_03b0_r(offs_t offset) override; virtual void port_03b0_w(offs_t offset, uint8_t data) override; @@ -546,7 +546,7 @@ class ati_vga_device : public svga_device { public: // construction/destruction - ati_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ati_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t mem_r(offs_t offset) override; virtual void mem_w(offs_t offset, uint8_t data) override; @@ -560,7 +560,7 @@ public: mach8_device* get_8514() { return m_8514; } protected: - ati_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ati_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; @@ -587,7 +587,7 @@ class s3_vga_device : public ati_vga_device { public: // construction/destruction - s3_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t port_03b0_r(offs_t offset) override; virtual void port_03b0_w(offs_t offset, uint8_t data) override; @@ -605,7 +605,7 @@ public: ibm8514a_device* get_8514() { return m_8514; } protected: - s3_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + s3_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -679,7 +679,7 @@ class gamtor_vga_device : public svga_device { public: // construction/destruction - gamtor_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamtor_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t port_03b0_r(offs_t offset) override; @@ -704,7 +704,7 @@ public: OTI111 }; - xga_copro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xga_copro_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 xga_read(offs_t offset); void xga_write(offs_t offset, u8 data); @@ -760,7 +760,7 @@ DECLARE_DEVICE_TYPE(XGA_COPRO, xga_copro_device) class oak_oti111_vga_device : public svga_device { public: - oak_oti111_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + oak_oti111_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 xga_read(offs_t offset); void xga_write(offs_t offset, u8 data); diff --git a/src/devices/video/pcd8544.cpp b/src/devices/video/pcd8544.cpp index b0592592509..87f2254dd5a 100644 --- a/src/devices/video/pcd8544.cpp +++ b/src/devices/video/pcd8544.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(PCD8544, pcd8544_device, "pcd8544_device", "Philips PCD8544 L // pcd8544_device - constructor //------------------------------------------------- -pcd8544_device::pcd8544_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pcd8544_device::pcd8544_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCD8544, tag, owner, clock), m_screen_update_cb(*this) { diff --git a/src/devices/video/pcd8544.h b/src/devices/video/pcd8544.h index 6706097a4db..81a7e49cbf7 100644 --- a/src/devices/video/pcd8544.h +++ b/src/devices/video/pcd8544.h @@ -27,7 +27,7 @@ public: typedef device_delegate screen_update_delegate; // construction/destruction - pcd8544_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcd8544_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_screen_update_cb(T &&... args) { m_screen_update_cb.set(std::forward(args)...); } // device interface diff --git a/src/devices/video/pcf2100.cpp b/src/devices/video/pcf2100.cpp index ae686b98b1a..f70c12ebe7f 100644 --- a/src/devices/video/pcf2100.cpp +++ b/src/devices/video/pcf2100.cpp @@ -27,24 +27,24 @@ DEFINE_DEVICE_TYPE(PCF2112, pcf2112_device, "pcf2112", "Philips PCF2112 LCD Driv // constructor //------------------------------------------------- -pcf2100_device::pcf2100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bpmax, u8 smax) : +pcf2100_device::pcf2100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bpmax, u8 smax) : device_t(mconfig, type, tag, owner, clock), m_bpmax(bpmax), m_smax(smax), m_write_segs(*this) { } -pcf2100_device::pcf2100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pcf2100_device::pcf2100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pcf2100_device(mconfig, PCF2100, tag, owner, clock, 2, 20) { } -pcf2110_device::pcf2110_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pcf2110_device::pcf2110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pcf2100_device(mconfig, PCF2110, tag, owner, clock, 2, 32) { } -pcf2111_device::pcf2111_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pcf2111_device::pcf2111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pcf2100_device(mconfig, PCF2111, tag, owner, clock, 2, 32) { } -pcf2112_device::pcf2112_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pcf2112_device::pcf2112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pcf2100_device(mconfig, PCF2112, tag, owner, clock, 1, 32) { } diff --git a/src/devices/video/pcf2100.h b/src/devices/video/pcf2100.h index 1d0963b2896..f5372592923 100644 --- a/src/devices/video/pcf2100.h +++ b/src/devices/video/pcf2100.h @@ -33,7 +33,7 @@ BP1/BP2: backplane drivers (LCD commons) class pcf2100_device : public device_t { public: - pcf2100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pcf2100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto write_segs() { return m_write_segs.bind(); } @@ -43,7 +43,7 @@ public: DECLARE_WRITE_LINE_MEMBER(dlen_w) { m_dlen = (state) ? 1 : 0; } protected: - pcf2100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bpmax, u8 smax); + pcf2100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bpmax, u8 smax); // device-level overrides virtual void device_start() override; @@ -71,19 +71,19 @@ protected: class pcf2110_device : public pcf2100_device { public: - pcf2110_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pcf2110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pcf2111_device : public pcf2100_device { public: - pcf2111_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pcf2111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class pcf2112_device : public pcf2100_device { public: - pcf2112_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pcf2112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/ppu2c0x.cpp b/src/devices/video/ppu2c0x.cpp index d8f3ca4748b..c9fcccd0d11 100644 --- a/src/devices/video/ppu2c0x.cpp +++ b/src/devices/video/ppu2c0x.cpp @@ -85,7 +85,7 @@ void ppu2c0x_device::device_config_complete() m_latch.set(nullptr); } -ppu2c0x_device::ppu2c0x_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock, address_map_constructor internal_map) : +ppu2c0x_device::ppu2c0x_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock, address_map_constructor internal_map) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), @@ -127,45 +127,45 @@ ppu2c0x_device::ppu2c0x_device(const machine_config& mconfig, device_type type, m_security_value = 0; } -ppu2c0x_device::ppu2c0x_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +ppu2c0x_device::ppu2c0x_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(ppu2c0x_device::ppu2c0x), this)) { m_paletteram_in_ppuspace = true; } -ppu2c0x_rgb_device::ppu2c0x_rgb_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +ppu2c0x_rgb_device::ppu2c0x_rgb_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, type, tag, owner, clock), m_palette_data(*this, "palette") { } // NTSC NES -ppu2c02_device::ppu2c02_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c02_device::ppu2c02_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, PPU_2C02, tag, owner, clock) { } // Playchoice 10 -ppu2c03b_device::ppu2c03b_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c03b_device::ppu2c03b_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_rgb_device(mconfig, PPU_2C03B, tag, owner, clock) { } // Vs. Unisystem -ppu2c04_device::ppu2c04_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c04_device::ppu2c04_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_rgb_device(mconfig, PPU_2C04, tag, owner, clock) { } // PAL NES -ppu2c07_device::ppu2c07_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c07_device::ppu2c07_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, PPU_2C07, tag, owner, clock) { m_scanlines_per_frame = PAL_SCANLINES_PER_FRAME; } // PAL clones -ppupalc_device::ppupalc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppupalc_device::ppupalc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, PPU_PALC, tag, owner, clock) { m_scanlines_per_frame = PAL_SCANLINES_PER_FRAME; @@ -174,32 +174,32 @@ ppupalc_device::ppupalc_device(const machine_config& mconfig, const char* tag, d // The PPU_2C05 variants have different protection value, set at device start, but otherwise are all the same... // Vs. Unisystem (Ninja Jajamaru Kun) -ppu2c05_01_device::ppu2c05_01_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c05_01_device::ppu2c05_01_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_rgb_device(mconfig, PPU_2C05_01, tag, owner, clock) { m_security_value = 0x1b; // game (jajamaru) doesn't seem to ever actually check it } // Vs. Unisystem (Mighty Bomb Jack) -ppu2c05_02_device::ppu2c05_02_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c05_02_device::ppu2c05_02_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_rgb_device(mconfig, PPU_2C05_02, tag, owner, clock) { m_security_value = 0x3d; } // Vs. Unisystem (Gumshoe) -ppu2c05_03_device::ppu2c05_03_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c05_03_device::ppu2c05_03_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_rgb_device(mconfig, PPU_2C05_03, tag, owner, clock) { m_security_value = 0x1c; } // Vs. Unisystem (Top Gun) -ppu2c05_04_device::ppu2c05_04_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c05_04_device::ppu2c05_04_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_rgb_device(mconfig, PPU_2C05_04, tag, owner, clock) { m_security_value = 0x1b; } // Vs. Unisystem (Super Mario Bros. bootlegs) -ppu2c04_clone_device::ppu2c04_clone_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu2c04_clone_device::ppu2c04_clone_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, PPU_2C04C, tag, owner, clock), m_palette_data(*this, "palette") { diff --git a/src/devices/video/ppu2c0x.h b/src/devices/video/ppu2c0x.h index 0be6231b97d..8488300aeed 100644 --- a/src/devices/video/ppu2c0x.h +++ b/src/devices/video/ppu2c0x.h @@ -136,7 +136,7 @@ public: bool in_vblanking() { return (m_scanline >= m_vblank_first_scanline - 1); } protected: - ppu2c0x_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock, address_map_constructor internal_map); + ppu2c0x_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock, address_map_constructor internal_map); // registers definition enum @@ -174,7 +174,7 @@ protected: }; // construction/destruction - ppu2c0x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c0x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void device_start() override; virtual void device_config_complete() override; @@ -250,7 +250,7 @@ private: class ppu2c0x_rgb_device : public ppu2c0x_device { protected: - ppu2c0x_rgb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c0x_rgb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void init_palette_tables() override; @@ -260,52 +260,52 @@ private: class ppu2c02_device : public ppu2c0x_device { public: - ppu2c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c03b_device : public ppu2c0x_rgb_device { public: - ppu2c03b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c03b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c04_device : public ppu2c0x_rgb_device { public: - ppu2c04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c07_device : public ppu2c0x_device { public: - ppu2c07_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c07_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppupalc_device : public ppu2c0x_device { public: - ppupalc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppupalc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c05_01_device : public ppu2c0x_rgb_device { public: - ppu2c05_01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c05_01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c05_02_device : public ppu2c0x_rgb_device { public: - ppu2c05_02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c05_02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c05_03_device : public ppu2c0x_rgb_device { public: - ppu2c05_03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c05_03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c05_04_device : public ppu2c0x_rgb_device { public: - ppu2c05_04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c05_04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ppu2c04_clone_device : public ppu2c0x_device { public: - ppu2c04_clone_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ppu2c04_clone_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/video/ppu2c0x_sh6578.cpp b/src/devices/video/ppu2c0x_sh6578.cpp index a63fa2a5162..ab010dc7607 100644 --- a/src/devices/video/ppu2c0x_sh6578.cpp +++ b/src/devices/video/ppu2c0x_sh6578.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(PPU_SH6578, ppu_sh6578_device, "ppu_sh6578", "SH6578 PPU (NTSC)") DEFINE_DEVICE_TYPE(PPU_SH6578PAL, ppu_sh6578pal_device, "ppu_sh6578pal", "SH6578 PPU (PAL)") -ppu_sh6578_device::ppu_sh6578_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +ppu_sh6578_device::ppu_sh6578_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(ppu_sh6578_device::ppu_internal_map), this)) { m_paletteram_in_ppuspace = false; @@ -26,12 +26,12 @@ ppu_sh6578_device::ppu_sh6578_device(const machine_config& mconfig, device_type m_global_refresh_mask = 0xffff; } -ppu_sh6578_device::ppu_sh6578_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu_sh6578_device::ppu_sh6578_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu_sh6578_device(mconfig, PPU_SH6578, tag, owner, clock) { } -ppu_sh6578pal_device::ppu_sh6578pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu_sh6578pal_device::ppu_sh6578pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu_sh6578_device(mconfig, PPU_SH6578PAL, tag, owner, clock) { m_scanlines_per_frame = PAL_SCANLINES_PER_FRAME; diff --git a/src/devices/video/ppu2c0x_sh6578.h b/src/devices/video/ppu2c0x_sh6578.h index 34448ac9dfa..18f11b91244 100644 --- a/src/devices/video/ppu2c0x_sh6578.h +++ b/src/devices/video/ppu2c0x_sh6578.h @@ -14,7 +14,7 @@ class ppu_sh6578_device : public ppu2c0x_device { public: - ppu_sh6578_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ppu_sh6578_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t palette_read(offs_t offset) override; virtual void palette_write(offs_t offset, uint8_t data) override; @@ -22,7 +22,7 @@ public: virtual uint8_t read_extended(offs_t offset); protected: - ppu_sh6578_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ppu_sh6578_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void ppu_internal_map(address_map& map); @@ -48,7 +48,7 @@ private: class ppu_sh6578pal_device : public ppu_sh6578_device { public: - ppu_sh6578pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + ppu_sh6578pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(PPU_SH6578, ppu_sh6578_device) diff --git a/src/devices/video/ppu2c0x_vt.cpp b/src/devices/video/ppu2c0x_vt.cpp index 2b8b9b6e3dd..dd99c321431 100644 --- a/src/devices/video/ppu2c0x_vt.cpp +++ b/src/devices/video/ppu2c0x_vt.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(PPU_VT03, ppu_vt03_device, "ppu_vt03", "VT03 PPU (NTSC)") DEFINE_DEVICE_TYPE(PPU_VT03PAL, ppu_vt03pal_device, "ppu_vt03pal", "VT03 PPU (PAL)") -ppu_vt03_device::ppu_vt03_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +ppu_vt03_device::ppu_vt03_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : ppu2c0x_device(mconfig, type, tag, owner, clock), m_is_pal(false), m_is_50hz(false), @@ -29,13 +29,13 @@ ppu_vt03_device::ppu_vt03_device(const machine_config& mconfig, device_type type { } -ppu_vt03_device::ppu_vt03_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu_vt03_device::ppu_vt03_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu_vt03_device(mconfig, PPU_VT03, tag, owner, clock) { } -ppu_vt03pal_device::ppu_vt03pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +ppu_vt03pal_device::ppu_vt03pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : ppu_vt03_device(mconfig, PPU_VT03PAL, tag, owner, clock) { m_scanlines_per_frame = PAL_SCANLINES_PER_FRAME; diff --git a/src/devices/video/ppu2c0x_vt.h b/src/devices/video/ppu2c0x_vt.h index f63da1ebdf1..2a118328cf3 100644 --- a/src/devices/video/ppu2c0x_vt.h +++ b/src/devices/video/ppu2c0x_vt.h @@ -24,8 +24,8 @@ enum vtxx_pal_mode { class ppu_vt03_device : public ppu2c0x_device { public: - ppu_vt03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - ppu_vt03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ppu_vt03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + ppu_vt03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); auto read_bg() { return m_read_bg.bind(); } auto read_sp() { return m_read_sp.bind(); } @@ -96,7 +96,7 @@ private: class ppu_vt03pal_device : public ppu_vt03_device { public: - ppu_vt03pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + ppu_vt03pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(PPU_VT03, ppu_vt03_device) diff --git a/src/devices/video/ps2gif.cpp b/src/devices/video/ps2gif.cpp index 4a8ea53db7a..1b5dc4f2fb4 100644 --- a/src/devices/video/ps2gif.cpp +++ b/src/devices/video/ps2gif.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_GIF, ps2_gif_device, "ps2gif", "Playstation 2 GIF") -ps2_gif_device::ps2_gif_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_gif_device::ps2_gif_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_GIF, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_gs(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/video/ps2gif.h b/src/devices/video/ps2gif.h index 39f4f911e01..76762bd00f7 100644 --- a/src/devices/video/ps2gif.h +++ b/src/devices/video/ps2gif.h @@ -23,14 +23,14 @@ class ps2_gif_device : public device_t, public device_execute_interface { public: template - ps2_gif_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gs_tag, U &&vu1_tag) + ps2_gif_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gs_tag, U &&vu1_tag) : ps2_gif_device(mconfig, tag, owner, clock) { m_gs.set_tag(std::forward(gs_tag)); m_vu1.set_tag(std::forward(vu1_tag)); } - ps2_gif_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_gif_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~ps2_gif_device() override; uint32_t read(offs_t offset); diff --git a/src/devices/video/ps2gs.cpp b/src/devices/video/ps2gs.cpp index 1065ae0da60..c767609562a 100644 --- a/src/devices/video/ps2gs.cpp +++ b/src/devices/video/ps2gs.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_GS, ps2_gs_device, "ps2gs", "Playstation 2 GS") 1, 2, 2, 3, 3, 3, 2, 1 }; -ps2_gs_device::ps2_gs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_gs_device::ps2_gs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_GS, tag, owner, clock) , m_intc(*this, finder_base::DUMMY_TAG) , m_vu1(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/video/ps2gs.h b/src/devices/video/ps2gs.h index f4ca034f688..057a572b94f 100644 --- a/src/devices/video/ps2gs.h +++ b/src/devices/video/ps2gs.h @@ -25,14 +25,14 @@ class ps2_gs_device : public device_t public: template - ps2_gs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&intc_tag, U &&vu1_tag) + ps2_gs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&intc_tag, U &&vu1_tag) : ps2_gs_device(mconfig, tag, owner, clock) { m_intc.set_tag(std::forward(intc_tag)); m_vu1.set_tag(std::forward(vu1_tag)); } - ps2_gs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_gs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~ps2_gs_device() override; uint64_t priv_regs0_r(offs_t offset); diff --git a/src/devices/video/psx.cpp b/src/devices/video/psx.cpp index 448d384f1fe..73b4e8dadc1 100644 --- a/src/devices/video/psx.cpp +++ b/src/devices/video/psx.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(CXD8561BQ, cxd8561bq_device, "cxd8561bq", "CXD8561BQ GPU") // DEFINE_DEVICE_TYPE(CXD8561CQ, cxd8561cq_device, "cxd8561cq", "CXD8561CQ GPU") // SGRAM DEFINE_DEVICE_TYPE(CXD8654Q, cxd8654q_device, "cxd8654q", "CXD8654Q GPU") // SGRAM -psxgpu_device::psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu) +psxgpu_device::psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu) : psxgpu_device(mconfig, type, tag, owner, clock) { set_vram_size(vram_size); @@ -41,7 +41,7 @@ psxgpu_device::psxgpu_device(const machine_config &mconfig, device_type type, co vblank_callback().set(*cpu->subdevice("irq"), FUNC(psxirq_device::intin0)); } -psxgpu_device::psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +psxgpu_device::psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , device_palette_interface(mconfig, *this) @@ -75,62 +75,62 @@ void psxgpu_device::device_reset() gpu_reset(); } -cxd8514q_device::cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu) +cxd8514q_device::cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu) : psxgpu_device(mconfig, CXD8514Q, tag, owner, clock, vram_size, cpu) { } -cxd8514q_device::cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cxd8514q_device::cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxgpu_device(mconfig, CXD8514Q, tag, owner, clock) { } -cxd8538q_device::cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu) +cxd8538q_device::cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu) : psxgpu_device(mconfig, CXD8538Q, tag, owner, clock, vram_size, cpu) { } -cxd8538q_device::cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cxd8538q_device::cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxgpu_device(mconfig, CXD8538Q, tag, owner, clock) { } -cxd8561q_device::cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu) +cxd8561q_device::cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu) : psxgpu_device(mconfig, CXD8561Q, tag, owner, clock, vram_size, cpu) { } -cxd8561q_device::cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cxd8561q_device::cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxgpu_device(mconfig, CXD8561Q, tag, owner, clock) { } -cxd8561bq_device::cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu) +cxd8561bq_device::cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu) : psxgpu_device(mconfig, CXD8561BQ, tag, owner, clock, vram_size, cpu) { } -cxd8561bq_device::cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cxd8561bq_device::cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxgpu_device(mconfig, CXD8561BQ, tag, owner, clock) { } -cxd8561cq_device::cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu) +cxd8561cq_device::cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu) : psxgpu_device(mconfig, CXD8561CQ, tag, owner, clock, vram_size, cpu) { } -cxd8561cq_device::cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cxd8561cq_device::cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxgpu_device(mconfig, CXD8561CQ, tag, owner, clock) { } -cxd8654q_device::cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu) +cxd8654q_device::cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu) : psxgpu_device(mconfig, CXD8654Q, tag, owner, clock, vram_size, cpu) { } -cxd8654q_device::cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cxd8654q_device::cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : psxgpu_device(mconfig, CXD8654Q, tag, owner, clock) { } diff --git a/src/devices/video/psx.h b/src/devices/video/psx.h index 0482369692e..ec12ee1a90c 100644 --- a/src/devices/video/psx.h +++ b/src/devices/video/psx.h @@ -45,8 +45,8 @@ protected: static constexpr unsigned MID_SHADE = 0x80; // construction/destruction - psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu_tag); - psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu_tag); + psxgpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_post_load() override; @@ -311,48 +311,48 @@ class cxd8514q_device : public psxgpu_device { public: // construction/destruction - cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu); - cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu); + cxd8514q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8538q_device : public psxgpu_device { public: // construction/destruction - cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu); - cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu); + cxd8538q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8561q_device : public psxgpu_device { public: // construction/destruction - cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu); - cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu); + cxd8561q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8561bq_device : public psxgpu_device { public: // construction/destruction - cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu); - cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu); + cxd8561bq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8561cq_device : public psxgpu_device { public: // construction/destruction - cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu); - cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu); + cxd8561cq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class cxd8654q_device : public psxgpu_device { public: // construction/destruction - cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t vram_size, psxcpu_device *cpu); - cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t vram_size, psxcpu_device *cpu); + cxd8654q_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_VIDEO_PSX_H diff --git a/src/devices/video/pwm.cpp b/src/devices/video/pwm.cpp index 5258b204392..2f7ec798f3e 100644 --- a/src/devices/video/pwm.cpp +++ b/src/devices/video/pwm.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(PWM_DISPLAY, pwm_display_device, "pwm_display", "PWM Display" // constructor //------------------------------------------------- -pwm_display_device::pwm_display_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +pwm_display_device::pwm_display_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PWM_DISPLAY, tag, owner, clock), m_out_x(*this, "%u.%u", 0U, 0U), m_out_a(*this, "%u.a", 0U), diff --git a/src/devices/video/pwm.h b/src/devices/video/pwm.h index 48a04ec9756..331695e9d83 100644 --- a/src/devices/video/pwm.h +++ b/src/devices/video/pwm.h @@ -14,7 +14,7 @@ class pwm_display_device : public device_t { public: - pwm_display_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + pwm_display_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers pwm_display_device &set_size(u8 numrows, u8 rowbits) { m_height = numrows; m_width = rowbits; return *this; } // max 64 * 64 diff --git a/src/devices/video/ramdac.cpp b/src/devices/video/ramdac.cpp index 9d749bc2c7f..22f9c23cc57 100644 --- a/src/devices/video/ramdac.cpp +++ b/src/devices/video/ramdac.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(RAMDAC, ramdac_device, "ramdac", "RAMDAC") // ramdac_device - constructor //------------------------------------------------- -ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RAMDAC, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(ramdac_device::ramdac_palram), this)), diff --git a/src/devices/video/ramdac.h b/src/devices/video/ramdac.h index d21ea4a51ee..e2ac243f72b 100644 --- a/src/devices/video/ramdac.h +++ b/src/devices/video/ramdac.h @@ -26,12 +26,12 @@ class ramdac_device : public device_t, public: // construction/destruction template - ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&palette_tag) - : ramdac_device(mconfig, tag, owner, clock) + ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&palette_tag) + : ramdac_device(mconfig, tag, owner) { m_palette.set_tag(std::forward(palette_tag)); } - ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void set_color_base(uint32_t color_base) { m_color_base = color_base; } diff --git a/src/devices/video/saa5050.cpp b/src/devices/video/saa5050.cpp index 5dae957d699..c0d47a25de9 100644 --- a/src/devices/video/saa5050.cpp +++ b/src/devices/video/saa5050.cpp @@ -174,7 +174,7 @@ const tiny_rom_entry *saa5057_device::device_rom_region() const // saa5050_device - constructor //------------------------------------------------- -saa5050_device::saa5050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +saa5050_device::saa5050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_char_rom(*this, "chargen"), m_read_d(*this), @@ -185,42 +185,42 @@ saa5050_device::saa5050_device(const machine_config &mconfig, device_type type, { } -saa5050_device::saa5050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saa5050_device::saa5050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5050, tag, owner, clock) { } -saa5051_device::saa5051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa5051_device::saa5051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5051, tag, owner, clock) { } -saa5052_device::saa5052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa5052_device::saa5052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5052, tag, owner, clock) { } -saa5053_device::saa5053_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa5053_device::saa5053_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5053, tag, owner, clock) { } -saa5054_device::saa5054_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa5054_device::saa5054_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5054, tag, owner, clock) { } -saa5055_device::saa5055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa5055_device::saa5055_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5055, tag, owner, clock) { } -saa5056_device::saa5056_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa5056_device::saa5056_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5056, tag, owner, clock) { } -saa5057_device::saa5057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa5057_device::saa5057_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5050_device(mconfig, SAA5057, tag, owner, clock) { } diff --git a/src/devices/video/saa5050.h b/src/devices/video/saa5050.h index 99a0e69836f..83f8111ba97 100644 --- a/src/devices/video/saa5050.h +++ b/src/devices/video/saa5050.h @@ -39,7 +39,7 @@ class saa5050_device : public device_t { public: // construction/destruction - saa5050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_screen_size(int cols, int rows, int size) { m_cols = cols; m_rows = rows; m_size = size; } @@ -63,7 +63,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - saa5050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + saa5050_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -155,7 +155,7 @@ class saa5051_device : public saa5050_device { public: // construction/destruction - saa5051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -168,7 +168,7 @@ class saa5052_device : public saa5050_device { public: // construction/destruction - saa5052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -181,7 +181,7 @@ class saa5053_device : public saa5050_device { public: // construction/destruction - saa5053_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5053_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -194,7 +194,7 @@ class saa5054_device : public saa5050_device { public: // construction/destruction - saa5054_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5054_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -207,7 +207,7 @@ class saa5055_device : public saa5050_device { public: // construction/destruction - saa5055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5055_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -220,7 +220,7 @@ class saa5056_device : public saa5050_device { public: // construction/destruction - saa5056_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5056_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -233,7 +233,7 @@ class saa5057_device : public saa5050_device { public: // construction/destruction - saa5057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5057_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/video/saa5240.cpp b/src/devices/video/saa5240.cpp index a9336398a5a..ceb14491788 100644 --- a/src/devices/video/saa5240.cpp +++ b/src/devices/video/saa5240.cpp @@ -98,7 +98,7 @@ const tiny_rom_entry *saa5243e_device::device_rom_region() const // saa5240_device - constructor //------------------------------------------------- -saa5240_device::saa5240_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +saa5240_device::saa5240_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_char_rom(*this, "chargen") @@ -115,17 +115,17 @@ saa5240_device::saa5240_device(const machine_config &mconfig, device_type type, { } -saa5240a_device::saa5240a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saa5240a_device::saa5240a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5240_device(mconfig, SAA5240A, tag, owner, clock) { } -saa5240b_device::saa5240b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saa5240b_device::saa5240b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5240_device(mconfig, SAA5240B, tag, owner, clock) { } -saa5243e_device::saa5243e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +saa5243e_device::saa5243e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : saa5240_device(mconfig, SAA5243E, tag, owner, clock) { } diff --git a/src/devices/video/saa5240.h b/src/devices/video/saa5240.h index b4f2a78decd..36a0e394e02 100644 --- a/src/devices/video/saa5240.h +++ b/src/devices/video/saa5240.h @@ -58,7 +58,7 @@ class saa5240_device : { public: // construction/destruction - saa5240_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5240_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(write_scl); DECLARE_WRITE_LINE_MEMBER(write_sda); @@ -71,7 +71,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - saa5240_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + saa5240_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -183,7 +183,7 @@ class saa5240a_device : public saa5240_device { public: // construction/destruction - saa5240a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5240a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -196,7 +196,7 @@ class saa5240b_device : public saa5240_device { public: // construction/destruction - saa5240b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5240b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; @@ -209,7 +209,7 @@ class saa5243e_device : public saa5240_device { public: // construction/destruction - saa5243e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa5243e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/video/scn2674.cpp b/src/devices/video/scn2674.cpp index 3461a15083c..4acfde57fd9 100644 --- a/src/devices/video/scn2674.cpp +++ b/src/devices/video/scn2674.cpp @@ -29,17 +29,17 @@ void scn2674_device::scn2674_vram(address_map &map) map(0x0000, (1 << space_config(0)->addr_width()) - 1).noprw(); } -scn2672_device::scn2672_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scn2672_device::scn2672_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn2674_device(mconfig, SCN2672, tag, owner, clock, false) { } -scn2674_device::scn2674_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scn2674_device::scn2674_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn2674_device(mconfig, SCN2674, tag, owner, clock, true) { } -scn2674_device::scn2674_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool extend_addressing) +scn2674_device::scn2674_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool extend_addressing) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/devices/video/scn2674.h b/src/devices/video/scn2674.h index ebcea6915b8..011bc3d4501 100644 --- a/src/devices/video/scn2674.h +++ b/src/devices/video/scn2674.h @@ -28,7 +28,7 @@ public: template void set_display_callback(T &&... args) { m_display_cb.set(std::forward(args)...); } - scn2674_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scn2674_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); @@ -40,7 +40,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - scn2674_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool extend_addressing); + scn2674_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool extend_addressing); virtual void device_start() override; virtual void device_reset() override; @@ -138,7 +138,7 @@ protected: class scn2672_device : public scn2674_device { public: - scn2672_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scn2672_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void write_init_regs(uint8_t data) override; diff --git a/src/devices/video/sda5708.cpp b/src/devices/video/sda5708.cpp index 05453afadb7..2867fe8517e 100644 --- a/src/devices/video/sda5708.cpp +++ b/src/devices/video/sda5708.cpp @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(SDA5708, sda5708_device, "sda5708", "SDA570 // sda5708_device - constructor //------------------------------------------------- -sda5708_device::sda5708_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sda5708_device::sda5708_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SDA5708, tag, owner, clock) , m_dots(*this, "Dot_%u%u%u", 1U, 1U, 1U) , m_serial(0) diff --git a/src/devices/video/sda5708.h b/src/devices/video/sda5708.h index 4237675b95e..bd2a02f2f76 100644 --- a/src/devices/video/sda5708.h +++ b/src/devices/video/sda5708.h @@ -52,7 +52,7 @@ class sda5708_device : public device_t { public: // construction/destruction - sda5708_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sda5708_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( load_w ); DECLARE_WRITE_LINE_MEMBER( data_w ); diff --git a/src/devices/video/sed1200.cpp b/src/devices/video/sed1200.cpp index 371832f579a..0dd2c20cc33 100644 --- a/src/devices/video/sed1200.cpp +++ b/src/devices/video/sed1200.cpp @@ -31,27 +31,27 @@ ROM_START( sed1200x0b ) ROM_LOAD( "sed1200-b.bin", 0x000, 0x800, CRC(d0741f51) SHA1(c8c856f1357286a2c8c806af81724a828345357e)) ROM_END -sed1200_device::sed1200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +sed1200_device::sed1200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), cursor_direction(false), cursor_blinking(false), cursor_full(false), cursor_on(false), display_on(false), cursor_address(0), cgram_address(0), cgrom(nullptr) { } -sed1200d0a_device::sed1200d0a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sed1200d0a_device::sed1200d0a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1200_device(mconfig, SED1200D0A, tag, owner, clock) { } -sed1200f0a_device::sed1200f0a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sed1200f0a_device::sed1200f0a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1200_device(mconfig, SED1200F0A, tag, owner, clock) { } -sed1200d0b_device::sed1200d0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sed1200d0b_device::sed1200d0b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1200_device(mconfig, SED1200D0B, tag, owner, clock) { } -sed1200f0b_device::sed1200f0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sed1200f0b_device::sed1200f0b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1200_device(mconfig, SED1200F0B, tag, owner, clock) { } diff --git a/src/devices/video/sed1200.h b/src/devices/video/sed1200.h index d6590af49ab..d6f46dd7544 100644 --- a/src/devices/video/sed1200.h +++ b/src/devices/video/sed1200.h @@ -27,7 +27,7 @@ public: const uint8_t *render(); protected: - sed1200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sed1200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -45,7 +45,7 @@ private: class sed1200d0a_device : public sed1200_device { public: - sed1200d0a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sed1200d0a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -53,7 +53,7 @@ protected: class sed1200f0a_device : public sed1200_device { public: - sed1200f0a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sed1200f0a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -61,7 +61,7 @@ protected: class sed1200d0b_device : public sed1200_device { public: - sed1200d0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sed1200d0b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -69,7 +69,7 @@ protected: class sed1200f0b_device : public sed1200_device { public: - sed1200f0b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sed1200f0b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp index 37d95caac7b..0e03ed4d428 100644 --- a/src/devices/video/sed1330.cpp +++ b/src/devices/video/sed1330.cpp @@ -148,7 +148,7 @@ inline void sed1330_device::increment_csr() // sed1330_device - constructor //------------------------------------------------- -sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SED1330, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), @@ -384,7 +384,7 @@ void sed1330_device::data_w(uint8_t data) case 5: m_lf = data + 1; LOG("SED1330 Frame Height: %u\n", m_lf); - if (clock() != 0) + if (!clock().disabled()) { attotime fr = clocks_to_attotime(m_tcr * m_lf * 9); screen().configure(m_tcr * m_fx, m_lf, screen().visible_area(), fr.as_attoseconds()); diff --git a/src/devices/video/sed1330.h b/src/devices/video/sed1330.h index c9bff82f578..13266ed295b 100644 --- a/src/devices/video/sed1330.h +++ b/src/devices/video/sed1330.h @@ -26,7 +26,7 @@ class sed1330_device : public device_t, { public: // construction/destruction - sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t status_r(); void command_w(uint8_t data); diff --git a/src/devices/video/sed1356.cpp b/src/devices/video/sed1356.cpp index ccc60d94a95..7ed04aea016 100644 --- a/src/devices/video/sed1356.cpp +++ b/src/devices/video/sed1356.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(SED1356, sed1356_device, "sed1356", "Epson SED1356") -sed1356_device::sed1356_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sed1356_device::sed1356_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SED1356, tag, owner, clock) , device_video_interface(mconfig, *this) , m_vram(*this, "vram") diff --git a/src/devices/video/sed1356.h b/src/devices/video/sed1356.h index 98d80684253..003698ccf91 100644 --- a/src/devices/video/sed1356.h +++ b/src/devices/video/sed1356.h @@ -21,7 +21,7 @@ class sed1356_device : public device_t, { public: // construction/destruction - sed1356_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sed1356_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); void vram_map(address_map &map); diff --git a/src/devices/video/sed1500.cpp b/src/devices/video/sed1500.cpp index 41ade315d56..f8f11992085 100644 --- a/src/devices/video/sed1500.cpp +++ b/src/devices/video/sed1500.cpp @@ -34,25 +34,25 @@ DEFINE_DEVICE_TYPE(SED1503, sed1503_device, "sed1503", "Epson SED1503 LCD Driver // constructor //------------------------------------------------- -sed1500_device::sed1500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cmax, u8 smax) : +sed1500_device::sed1500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cmax, u8 smax) : device_t(mconfig, type, tag, owner, clock), m_cmax(cmax), m_smax(smax), m_write_segs(*this) { } -sed1500_device::sed1500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sed1500_device::sed1500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1500_device(mconfig, SED1500, tag, owner, clock, 8, 42) { } -sed1501_device::sed1501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sed1501_device::sed1501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1500_device(mconfig, SED1501, tag, owner, clock, 10, 40) { } -sed1502_device::sed1502_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sed1502_device::sed1502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1500_device(mconfig, SED1502, tag, owner, clock, 16, 34) { } -sed1503_device::sed1503_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sed1503_device::sed1503_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1500_device(mconfig, SED1503, tag, owner, clock, 8+8, 42) { } diff --git a/src/devices/video/sed1500.h b/src/devices/video/sed1500.h index a72e124f772..6cc56c2a699 100644 --- a/src/devices/video/sed1500.h +++ b/src/devices/video/sed1500.h @@ -31,7 +31,7 @@ SEG: LCD segments class sed1500_device : public device_t { public: - sed1500_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sed1500_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto write_segs() { return m_write_segs.bind(); } // common number in offset, segment data in data @@ -40,7 +40,7 @@ public: u8 read(offs_t offset); protected: - sed1500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 cmax, u8 smax); + sed1500_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 cmax, u8 smax); // device-level overrides virtual void device_start() override; @@ -62,19 +62,19 @@ protected: class sed1501_device : public sed1500_device { public: - sed1501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sed1501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sed1502_device : public sed1500_device { public: - sed1502_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sed1502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sed1503_device : public sed1500_device { public: - sed1503_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sed1503_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/sed1520.cpp b/src/devices/video/sed1520.cpp index 9dd8017155d..944cb2ee825 100644 --- a/src/devices/video/sed1520.cpp +++ b/src/devices/video/sed1520.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(EPL43102, epl43102_device, "epl43102", "Elan EPL43102 LCD Dri // sed1520_device - constructor //------------------------------------------------- -sed15xx_device_base::sed15xx_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t ddr_size, uint32_t page_size) +sed15xx_device_base::sed15xx_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t ddr_size, uint32_t page_size) : device_t(mconfig, type, tag, owner, clock) , m_ddr_size(ddr_size) , m_page_size(page_size) @@ -51,24 +51,24 @@ sed15xx_device_base::sed15xx_device_base(const machine_config &mconfig, device_t { } -sed1520_device::sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sed1520_device::sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed15xx_device_base(mconfig, SED1520, tag, owner, clock, 320, 80) // 2560-bit display RAM , m_screen_update_cb(*this) { } -sed1560_device::sed1560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t ddr_size, uint32_t page_size) +sed1560_device::sed1560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t ddr_size, uint32_t page_size) : sed15xx_device_base(mconfig, type, tag, owner, clock, ddr_size, page_size) , m_screen_update_cb(*this) { } -sed1560_device::sed1560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sed1560_device::sed1560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1560_device(mconfig, SED1560, tag, owner, clock, 1349, 166) // 166 × 65-bit display RAM { } -epl43102_device::epl43102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +epl43102_device::epl43102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sed1560_device(mconfig, EPL43102, tag, owner, clock, 455, 102) // 102 × 43-bit display RAM (TODO: page map is not straightforward) { } diff --git a/src/devices/video/sed1520.h b/src/devices/video/sed1520.h index 58fc364f69a..89d7a5001b0 100644 --- a/src/devices/video/sed1520.h +++ b/src/devices/video/sed1520.h @@ -38,7 +38,7 @@ public: protected: // construction/destruction - sed15xx_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t ddr_size, uint32_t page_size); + sed15xx_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t ddr_size, uint32_t page_size); // device-level overrides virtual void device_start() override; @@ -72,7 +72,7 @@ public: typedef device_delegate sed1520_update_delegate; // construction/destruction - sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sed1520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template void set_screen_update_cb(T &&... args) { m_screen_update_cb.set(std::forward(args)...); } @@ -103,7 +103,7 @@ public: typedef device_delegate sed1560_update_delegate; // construction/destruction - sed1560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sed1560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template void set_screen_update_cb(T &&... args) { m_screen_update_cb.set(std::forward(args)...); } @@ -113,7 +113,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: - sed1560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t ddr_size, uint32_t page_size); + sed1560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t ddr_size, uint32_t page_size); // device-level overrides virtual void device_resolve_objects() override; @@ -139,7 +139,7 @@ class epl43102_device : public sed1560_device { public: // construction/destruction - epl43102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + epl43102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void control_write(uint8_t data) override; diff --git a/src/devices/video/snes_ppu.cpp b/src/devices/video/snes_ppu.cpp index 9fddaa1b8d1..4e95beb3bb3 100644 --- a/src/devices/video/snes_ppu.cpp +++ b/src/devices/video/snes_ppu.cpp @@ -189,7 +189,7 @@ DEFINE_DEVICE_TYPE(SNES_PPU, snes_ppu_device, "snes_ppu", "SNES PPU") // snes_ppu_device - constructor //------------------------------------------------- -snes_ppu_device::snes_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +snes_ppu_device::snes_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNES_PPU, tag, owner, clock) , device_video_interface(mconfig, *this) , device_palette_interface(mconfig, *this) diff --git a/src/devices/video/snes_ppu.h b/src/devices/video/snes_ppu.h index c07f878f402..28af99e45c7 100644 --- a/src/devices/video/snes_ppu.h +++ b/src/devices/video/snes_ppu.h @@ -42,7 +42,7 @@ class snes_ppu_device : public device_t, { public: // construction/destruction - snes_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snes_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers auto open_bus_callback() { return m_openbus_cb.bind(); } diff --git a/src/devices/video/sprite.h b/src/devices/video/sprite.h index 2ef3234b9d9..048ed3eb56f 100644 --- a/src/devices/video/sprite.h +++ b/src/devices/video/sprite.h @@ -82,7 +82,7 @@ class sprite_device : public device_t protected: // construction/destruction - only for subclasses sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, int dirty_granularity = 3) - : device_t(mconfig, type, tag, owner, 0) + : device_t(mconfig, type, tag, owner) , m_xorigin(0) , m_yorigin(0) , m_spriteram(nullptr) diff --git a/src/devices/video/t6963c.cpp b/src/devices/video/t6963c.cpp index bf0841450c0..520b4c4bde0 100644 --- a/src/devices/video/t6963c.cpp +++ b/src/devices/video/t6963c.cpp @@ -32,7 +32,7 @@ ALLOW_SAVE_TYPE(t6963c_device::auto_mode); // t6963c_device - constructor //------------------------------------------------- -t6963c_device::t6963c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +t6963c_device::t6963c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, T6963C, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_display_config("display", ENDIANNESS_LITTLE, 8, 16, 0) @@ -394,7 +394,7 @@ uint32_t t6963c_device::screen_update(screen_device &screen, bitmap_ind16 &bitma // lm24014h_device - constructor //------------------------------------------------- -lm24014h_device::lm24014h_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +lm24014h_device::lm24014h_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LM24014H, tag, owner, clock) , m_lcdc(*this, "lcdc") , m_fs(1) @@ -439,7 +439,7 @@ void lm24014h_device::lcd_palette(palette_device &palette) const void lm24014h_device::device_add_mconfig(machine_config &config) { - T6963C(config, m_lcdc, 0); // XTAL is unknown + T6963C(config, m_lcdc); // XTAL is unknown m_lcdc->set_addrmap(0, &lm24014h_device::ram_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); diff --git a/src/devices/video/t6963c.h b/src/devices/video/t6963c.h index aaaeb7c3e57..c7ddf5bb89b 100644 --- a/src/devices/video/t6963c.h +++ b/src/devices/video/t6963c.h @@ -33,7 +33,7 @@ class t6963c_device : public device_t, public device_memory_interface public: // construction/destruction - t6963c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + t6963c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // CPU read/write access u8 read(offs_t offset); @@ -86,7 +86,7 @@ class lm24014h_device : public device_t { public: // construction/destruction - lm24014h_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + lm24014h_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // CPU read/write access u8 read(offs_t offset) { return m_lcdc->read(offset); } diff --git a/src/devices/video/t6a04.cpp b/src/devices/video/t6a04.cpp index a5dc8bfa928..0ff55ec3544 100644 --- a/src/devices/video/t6a04.cpp +++ b/src/devices/video/t6a04.cpp @@ -36,7 +36,7 @@ void t6a04_device::device_validity_check(validity_checker &valid) const // t6a04_device - constructor //------------------------------------------------- -t6a04_device::t6a04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +t6a04_device::t6a04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, T6A04, tag, owner, clock), m_busy_flag(0), m_display_on(0), m_contrast(0), m_xpos(0), m_ypos(0), m_zpos(0), diff --git a/src/devices/video/t6a04.h b/src/devices/video/t6a04.h index 72900b171bb..5d700b7be90 100644 --- a/src/devices/video/t6a04.h +++ b/src/devices/video/t6a04.h @@ -21,7 +21,7 @@ class t6a04_device : public device_t { public: // construction/destruction - t6a04_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + t6a04_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_size(int w, int h) { diff --git a/src/devices/video/tea1002.cpp b/src/devices/video/tea1002.cpp index af80f9908a3..fd5ef980b29 100644 --- a/src/devices/video/tea1002.cpp +++ b/src/devices/video/tea1002.cpp @@ -50,7 +50,7 @@ DEFINE_DEVICE_TYPE(TEA1002, tea1002_device, "tea1002", "Mullard TEA1002 PAL colo // paula_device - constructor //------------------------------------------------- -tea1002_device::tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tea1002_device::tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TEA1002, tag, owner, clock) { } diff --git a/src/devices/video/tea1002.h b/src/devices/video/tea1002.h index e208d20fb0a..fec7a9ea7f5 100644 --- a/src/devices/video/tea1002.h +++ b/src/devices/video/tea1002.h @@ -35,7 +35,7 @@ class tea1002_device : public device_t { public: // construction/destruction - tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tea1002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); rgb_t color(int index); diff --git a/src/devices/video/tlc34076.cpp b/src/devices/video/tlc34076.cpp index 01cc9070fb3..7ebd51c7912 100644 --- a/src/devices/video/tlc34076.cpp +++ b/src/devices/video/tlc34076.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(TLC34076, tlc34076_device, "tlc34076", "TI TLC34076 VIP") //------------------------------------------------- // tlc34076_device - constructor //------------------------------------------------- -tlc34076_device::tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tlc34076_device::tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TLC34076, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_dacbits(6) diff --git a/src/devices/video/tlc34076.h b/src/devices/video/tlc34076.h index c495cf82088..1e86541b2e5 100644 --- a/src/devices/video/tlc34076.h +++ b/src/devices/video/tlc34076.h @@ -30,12 +30,12 @@ public: // construction/destruction tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, tlc34076_bits bits) - : tlc34076_device(mconfig, tag, owner, (uint32_t)0) + : tlc34076_device(mconfig, tag, owner) { set_bits(bits); } - tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers void set_bits(tlc34076_bits bits) { m_dacbits = bits; } diff --git a/src/devices/video/tmap038.cpp b/src/devices/video/tmap038.cpp index 9b007e28a2c..f675d430bb7 100644 --- a/src/devices/video/tmap038.cpp +++ b/src/devices/video/tmap038.cpp @@ -128,7 +128,7 @@ void tilemap038_device::vram_8x8_map(address_map &map) DEFINE_DEVICE_TYPE(TMAP038, tilemap038_device, "tmap038", "038 Tilemap generator") -tilemap038_device::tilemap038_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tilemap038_device::tilemap038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMAP038, tag, owner, clock) , m_vram_8x8(*this, "vram_8x8") , m_vram_16x16(*this, "vram_16x16") diff --git a/src/devices/video/tmap038.h b/src/devices/video/tmap038.h index cc5ba89813d..852b48e2f33 100644 --- a/src/devices/video/tmap038.h +++ b/src/devices/video/tmap038.h @@ -12,12 +12,7 @@ class tilemap038_device : public device_t public: typedef device_delegate tmap038_cb_delegate; - tilemap038_device(const machine_config &mconfig, const char *tag, device_t *owner) - : tilemap038_device(mconfig, tag, owner, (u32)0) - { - } - - tilemap038_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tilemap038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configurations template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/devices/video/tms34061.cpp b/src/devices/video/tms34061.cpp index 8d987b06701..6f32777c0fc 100644 --- a/src/devices/video/tms34061.cpp +++ b/src/devices/video/tms34061.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(TMS34061, tms34061_device, "tms34061", "TI TMS34061 VSC") -tms34061_device::tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms34061_device::tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS34061, tag, owner, clock), device_video_interface(mconfig, *this), m_rowshift(0), diff --git a/src/devices/video/tms34061.h b/src/devices/video/tms34061.h index 47cd6e68c60..e8bbc469ec8 100644 --- a/src/devices/video/tms34061.h +++ b/src/devices/video/tms34061.h @@ -31,7 +31,7 @@ public: }; // construction/destruction - tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms34061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_rowshift(u8 rowshift) { m_rowshift = rowshift; } void set_vram_size(u32 vramsize) { m_vramsize = vramsize; } diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp index 3088e02e685..325cb0070f6 100644 --- a/src/devices/video/tms3556.cpp +++ b/src/devices/video/tms3556.cpp @@ -108,7 +108,7 @@ inline void tms3556_device::writebyte(offs_t address, uint8_t data) // tms3556_device - constructor //------------------------------------------------- -tms3556_device::tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms3556_device::tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS3556, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/tms3556.h b/src/devices/video/tms3556.h index a6ced908b02..0f516c991ba 100644 --- a/src/devices/video/tms3556.h +++ b/src/devices/video/tms3556.h @@ -38,7 +38,7 @@ public: static constexpr unsigned TOTAL_HEIGHT = 250 + TOP_BORDER + BOTTOM_BORDER; // construction/destruction - tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t vram_r(); void vram_w(uint8_t data); diff --git a/src/devices/video/tms9927.cpp b/src/devices/video/tms9927.cpp index 6ae31a1a9d5..c8ef0559ed3 100644 --- a/src/devices/video/tms9927.cpp +++ b/src/devices/video/tms9927.cpp @@ -36,12 +36,12 @@ DEFINE_DEVICE_TYPE(CRT5027, crt5027_device, "crt5027", "CRT5027 VTAC") DEFINE_DEVICE_TYPE(CRT5037, crt5037_device, "crt5037", "CRT5037 VTAC") DEFINE_DEVICE_TYPE(CRT5057, crt5057_device, "crt5057", "CRT5057 VTAC") -tms9927_device::tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9927_device::tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9927_device(mconfig, TMS9927, tag, owner, clock) { } -tms9927_device::tms9927_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tms9927_device::tms9927_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , m_write_vsyn(*this) @@ -59,17 +59,17 @@ tms9927_device::tms9927_device(const machine_config &mconfig, device_type type, std::fill(std::begin(m_reg), std::end(m_reg), 0x00); } -crt5027_device::crt5027_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crt5027_device::crt5027_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9927_device(mconfig, CRT5027, tag, owner, clock) { } -crt5037_device::crt5037_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crt5037_device::crt5037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9927_device(mconfig, CRT5037, tag, owner, clock) { } -crt5057_device::crt5057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crt5057_device::crt5057_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9927_device(mconfig, CRT5057, tag, owner, clock) { } @@ -81,7 +81,7 @@ crt5057_device::crt5057_device(const machine_config &mconfig, const char *tag, d void tms9927_device::device_start() { - assert(clock() > 0); + assert(!clock().disabled()); if (!(m_hpixels_per_column > 0)) fatalerror("TMS9927: number of pixels per column must be explicitly set using set_char_width()!\n"); // resolve callbacks @@ -127,7 +127,7 @@ void tms9927_device::device_clock_changed() void tms9927_device::device_stop() { osd_printf_debug("TMS9927: Final params: (%d, %d, %d, %d, %d, %d, %d)\n", - clock() * m_hpixels_per_column, + clock().value() * m_hpixels_per_column, m_total_hpix, 0, m_visible_hpix, m_total_vpix, @@ -331,7 +331,7 @@ void tms9927_device::recompute_parameters(bool postload) logerror("tms9927: invalid visible size (%dx%d) versus total size (%dx%d)\n", m_visible_hpix, m_visible_vpix, m_total_hpix, m_total_vpix); } - if (clock() == 0) + if (clock().disabled()) { m_valid_config = false; // TODO: make the screen refresh never, and disable the vblank and odd/even interrupts here! diff --git a/src/devices/video/tms9927.h b/src/devices/video/tms9927.h index 5b517f7f78a..2b6bd57bb52 100644 --- a/src/devices/video/tms9927.h +++ b/src/devices/video/tms9927.h @@ -13,7 +13,7 @@ class tms9927_device : public device_t, public device_video_interface { public: - tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9927_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto vsyn_callback() { return m_write_vsyn.bind(); } auto hsyn_callback() { return m_write_hsyn.bind(); } @@ -38,7 +38,7 @@ public: bool cursor_bounds(rectangle &bounds) const; protected: - tms9927_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tms9927_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -89,21 +89,21 @@ private: class crt5027_device : public tms9927_device { public: - crt5027_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crt5027_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class crt5037_device : public tms9927_device { public: - crt5037_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crt5037_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class crt5057_device : public tms9927_device { public: - crt5057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crt5057_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/tms9928a.cpp b/src/devices/video/tms9928a.cpp index dffe7b8ba72..a1e901762e1 100644 --- a/src/devices/video/tms9928a.cpp +++ b/src/devices/video/tms9928a.cpp @@ -56,7 +56,7 @@ void tms9928a_device::memmap(address_map &map) map(0x0000, 0x3fff).ram(); } -tms9928a_device::tms9928a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t horz_total, bool is_50hz, bool is_reva, bool is_99) +tms9928a_device::tms9928a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t horz_total, bool is_50hz, bool is_reva, bool is_99) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_palette_interface(mconfig, *this) @@ -92,47 +92,47 @@ void tms9928a_device::device_config_complete() } -tms9928a_device::tms9928a_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9928a_device::tms9928a_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9928A, tag, owner, clock, 342, false, true, true) { } -tms9129_device::tms9129_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9129_device::tms9129_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9129, tag, owner, clock, 342, true, true, false) { } -tms9918_device::tms9918_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9918_device::tms9918_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9918, tag, owner, clock, 342, false, false, true) { } -tms9918a_device::tms9918a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9918a_device::tms9918a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9918A, tag, owner, clock, 342, false, true, true) { } -tms9118_device::tms9118_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9118_device::tms9118_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9118, tag, owner, clock, 342, false, true, false) { } -tms9128_device::tms9128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9128_device::tms9128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9128, tag, owner, clock, 342, false, true, false) { } -tms9929_device::tms9929_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9929_device::tms9929_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9929, tag, owner, clock, 342, true, false, true) { } -tms9929a_device::tms9929a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9929a_device::tms9929a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, TMS9929A, tag, owner, clock, 342, true, true, true) { } -efo90501_device::efo90501_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +efo90501_device::efo90501_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms9928a_device(mconfig, EFO90501, tag, owner, clock, 346, true, true, true) { } diff --git a/src/devices/video/tms9928a.h b/src/devices/video/tms9928a.h index d50bec1cf4d..240ba5c364d 100644 --- a/src/devices/video/tms9928a.h +++ b/src/devices/video/tms9928a.h @@ -67,7 +67,7 @@ public: static constexpr unsigned VERT_DISPLAY_START_NTSC = 13 + 27; // construction/destruction - tms9928a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9928a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_vram_size(int vram_size) { m_vram_size = vram_size; } auto int_callback() { return m_out_int_line_cb.bind(); } @@ -89,7 +89,7 @@ public: void reset_line(int state) { if (state==ASSERT_LINE) device_reset(); } protected: - tms9928a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t horz_total, bool is_50hz, bool is_reva, bool is_99); + tms9928a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t horz_total, bool is_50hz, bool is_reva, bool is_99); // device-level overrides virtual void device_config_complete() override; @@ -156,56 +156,56 @@ private: class tms9918_device : public tms9928a_device { public: - tms9918_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9918_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms9918a_device : public tms9928a_device { public: - tms9918a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9918a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms9118_device : public tms9928a_device { public: - tms9118_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9118_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms9128_device : public tms9928a_device { public: - tms9128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms9929_device : public tms9928a_device { public: - tms9929_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9929_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms9929a_device : public tms9928a_device { public: - tms9929a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9929a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms9129_device : public tms9928a_device { public: - tms9129_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9129_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class efo90501_device : public tms9928a_device { public: - efo90501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + efo90501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/video/topcat.cpp b/src/devices/video/topcat.cpp index 5ba43d81e44..d917ea58271 100644 --- a/src/devices/video/topcat.cpp +++ b/src/devices/video/topcat.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(TOPCAT, topcat_device, "topcat", "HP Topcat ASIC") -topcat_device::topcat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +topcat_device::topcat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_int_write_func(*this), m_cursor_timer(nullptr), @@ -17,7 +17,7 @@ topcat_device::topcat_device(const machine_config &mconfig, device_type type, co { } -topcat_device::topcat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +topcat_device::topcat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : topcat_device(mconfig, TOPCAT, tag, owner, clock) { } diff --git a/src/devices/video/topcat.h b/src/devices/video/topcat.h index ca08f16b9d4..96114bd0728 100644 --- a/src/devices/video/topcat.h +++ b/src/devices/video/topcat.h @@ -8,7 +8,7 @@ class topcat_device : public device_t { public: - topcat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + topcat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bool has_changed() { bool ret = m_changed; m_changed = false; return ret; } void set_fb_width(int _pixels) { m_fb_width = _pixels; } void set_fb_height(int _pixels) { m_fb_height = _pixels; } @@ -27,7 +27,7 @@ public: auto irq_out_cb() { return m_int_write_func.bind(); } protected: - topcat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + topcat_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/video/upd3301.cpp b/src/devices/video/upd3301.cpp index 9e213a6c292..9387ce4b173 100644 --- a/src/devices/video/upd3301.cpp +++ b/src/devices/video/upd3301.cpp @@ -102,7 +102,7 @@ DEFINE_DEVICE_TYPE(UPD3301, upd3301_device, "upd3301", "NEC uPD3301") // upd3301_device - constructor //------------------------------------------------- -upd3301_device::upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd3301_device::upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD3301, tag, owner, clock) , device_video_interface(mconfig, *this) , m_write_int(*this) diff --git a/src/devices/video/upd3301.h b/src/devices/video/upd3301.h index 9343f6275b2..13a7753cd61 100644 --- a/src/devices/video/upd3301.h +++ b/src/devices/video/upd3301.h @@ -61,7 +61,7 @@ public: typedef device_delegate (const std::array attr_row, u8 gfx_mode, int y, u8 attr_fifo_size, u8 row_size)> fetch_attribute_delegate; // construction/destruction - upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd3301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_character_width(int value) { m_width = value; } template void set_display_callback(T &&... args) { m_display_cb.set(std::forward(args)...); } diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp index 91a78531ea5..2efab8a780e 100644 --- a/src/devices/video/upd7220.cpp +++ b/src/devices/video/upd7220.cpp @@ -598,7 +598,7 @@ inline void upd7220_device::get_graphics_partition(int index, uint32_t *sad, uin // upd7220_device - constructor //------------------------------------------------- -upd7220_device::upd7220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +upd7220_device::upd7220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7220, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/devices/video/upd7220.h b/src/devices/video/upd7220.h index af203e2fdd7..a582c75b239 100644 --- a/src/devices/video/upd7220.h +++ b/src/devices/video/upd7220.h @@ -60,7 +60,7 @@ public: using draw_text_delegate = device_delegate; // construction/destruction - upd7220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_display_pixels(T &&... args) { m_display_cb.set(std::forward(args)...); } template void set_draw_text(T &&... args) { m_draw_text_cb.set(std::forward(args)...); } diff --git a/src/devices/video/upd7227.cpp b/src/devices/video/upd7227.cpp index f512f8832be..9d07d80f38f 100644 --- a/src/devices/video/upd7227.cpp +++ b/src/devices/video/upd7227.cpp @@ -37,7 +37,7 @@ void upd7227_device::upd7227_map(address_map &map) // upd7227_device - constructor //------------------------------------------------- -upd7227_device::upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7227_device::upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7227, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("videoram", ENDIANNESS_BIG, 8, 7, 0, address_map_constructor(FUNC(upd7227_device::upd7227_map), this)) diff --git a/src/devices/video/upd7227.h b/src/devices/video/upd7227.h index 1f74b8d6102..4eb6d1e4fd5 100644 --- a/src/devices/video/upd7227.h +++ b/src/devices/video/upd7227.h @@ -23,8 +23,8 @@ class upd7227_device : public device_t, public device_memory_interface { public: // construction/destruction - upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, int sx, int sy) : upd7227_device(mconfig, tag, owner, 0) + upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); + upd7227_device(const machine_config &mconfig, const char *tag, device_t *owner, int sx, int sy) : upd7227_device(mconfig, tag, owner) { set_offsets(sx, sy); } // inline configuration helpers diff --git a/src/devices/video/v9938.cpp b/src/devices/video/v9938.cpp index 906e92353f7..fea57e42973 100644 --- a/src/devices/video/v9938.cpp +++ b/src/devices/video/v9938.cpp @@ -100,7 +100,7 @@ DEFINE_DEVICE_TYPE(V9938, v9938_device, "v9938", "Yamaha V9938 VDP") DEFINE_DEVICE_TYPE(V9958, v9958_device, "v9958", "Yamaha V9958 VDP") -v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int model) +v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int model) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), device_palette_interface(mconfig, *this), @@ -135,12 +135,12 @@ v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, cons set_addrmap(AS_DATA, address_map_constructor(FUNC(v99x8_device::memmap), this)); } -v9938_device::v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v9938_device::v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v99x8_device(mconfig, V9938, tag, owner, clock, MODEL_V9938) { } -v9958_device::v9958_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v9958_device::v9958_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v99x8_device(mconfig, V9958, tag, owner, clock, MODEL_V9958) { } diff --git a/src/devices/video/v9938.h b/src/devices/video/v9938.h index 265cad5eac1..754599d973e 100644 --- a/src/devices/video/v9938.h +++ b/src/devices/video/v9938.h @@ -86,7 +86,7 @@ public: protected: // construction/destruction - v99x8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int model); + v99x8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int model); const address_space_config m_space_config; address_space* m_vram_space; @@ -257,7 +257,7 @@ protected: class v9938_device : public v99x8_device { public: - v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void palette_init() override; @@ -266,7 +266,7 @@ protected: class v9958_device : public v99x8_device { public: - v9958_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v9958_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void palette_init() override; diff --git a/src/devices/video/vector.cpp b/src/devices/video/vector.cpp index aa0210eda28..6917e0b35cf 100644 --- a/src/devices/video/vector.cpp +++ b/src/devices/video/vector.cpp @@ -72,7 +72,7 @@ void vector_options::init(emu_options& options) // device type definition DEFINE_DEVICE_TYPE(VECTOR, vector_device, "vector_device", "VECTOR") -vector_device::vector_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vector_device::vector_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VECTOR, tag, owner, clock), device_video_interface(mconfig, *this), m_vector_list(nullptr), diff --git a/src/devices/video/vector.h b/src/devices/video/vector.h index 0465a7c9a43..88336a9faa5 100644 --- a/src/devices/video/vector.h +++ b/src/devices/video/vector.h @@ -31,7 +31,7 @@ public: template static constexpr rgb_t color444(T c) { return rgb_t(pal4bit(c >> 8), pal4bit(c >> 4), pal4bit(c >> 0)); } // construction/destruction - vector_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vector_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void clear_list(); diff --git a/src/devices/video/vic4567.cpp b/src/devices/video/vic4567.cpp index 5f1c756c50d..c94b3f9bd1d 100644 --- a/src/devices/video/vic4567.cpp +++ b/src/devices/video/vic4567.cpp @@ -149,7 +149,7 @@ DEFINE_DEVICE_TYPE(VIC3, vic3_device, "vic3", "CSG 4567 VIC-III") -vic3_device::vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic3_device::vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIC3, tag, owner, clock) , device_palette_interface(mconfig, *this) , device_video_interface(mconfig, *this) diff --git a/src/devices/video/vic4567.h b/src/devices/video/vic4567.h index 06c78f2a48e..f7c55182b1b 100644 --- a/src/devices/video/vic4567.h +++ b/src/devices/video/vic4567.h @@ -108,7 +108,7 @@ class vic3_device : public device_t, public: enum class vic3_type { NTSC, PAL }; - vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vic3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&tag) { m_cpu.set_tag(std::forward(tag)); } void set_vic3_type(vic3_type type) { m_type = type; } diff --git a/src/devices/video/virge_pci.cpp b/src/devices/video/virge_pci.cpp index a76fc33966b..51b69fc7629 100644 --- a/src/devices/video/virge_pci.cpp +++ b/src/devices/video/virge_pci.cpp @@ -6,12 +6,12 @@ #include "screen.h" -virge_pci_device::virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +virge_pci_device::virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : virge_pci_device(mconfig, VIRGE_PCI, tag, owner, clock) { } -virge_pci_device::virge_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +virge_pci_device::virge_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, type, tag, owner, clock), m_vga(*this, "vga"), m_bios(*this, "bios"), @@ -19,7 +19,7 @@ virge_pci_device::virge_pci_device(const machine_config &mconfig, device_type ty { } -virgedx_pci_device::virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +virgedx_pci_device::virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : virge_pci_device(mconfig, VIRGEDX_PCI, tag, owner, clock) { } @@ -272,7 +272,7 @@ void virge_pci_device::device_add_mconfig(machine_config &config) screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(s3virge_vga_device::screen_update)); - S3VIRGE(config, m_vga, 0); + S3VIRGE(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x400000); } @@ -283,7 +283,7 @@ void virgedx_pci_device::device_add_mconfig(machine_config &config) screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(s3virge_vga_device::screen_update)); - S3VIRGEDX(config, m_vga, 0); + S3VIRGEDX(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x400000); } diff --git a/src/devices/video/virge_pci.h b/src/devices/video/virge_pci.h index f4b6ce29009..a9bc4ce2d6c 100644 --- a/src/devices/video/virge_pci.h +++ b/src/devices/video/virge_pci.h @@ -17,7 +17,7 @@ class virge_pci_device : public pci_device { public: template - virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : virge_pci_device(mconfig, tag, owner, clock) { set_screen_tag(std::forward(screen_tag)); @@ -31,8 +31,8 @@ public: LAW_4MB }; - virge_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + virge_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + virge_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void lfb_map(address_map &map); void mmio_map(address_map& map); @@ -73,12 +73,12 @@ class virgedx_pci_device : public virge_pci_device { public: template - virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : virgedx_pci_device(mconfig, tag, owner, clock) { set_screen_tag(std::forward(screen_tag)); } - virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + virgedx_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp index 94c9a5ca7c7..182e335269f 100644 --- a/src/devices/video/voodoo.cpp +++ b/src/devices/video/voodoo.cpp @@ -663,7 +663,7 @@ bool debug_stats::update_display_state(bool key_pressed) // generic_voodoo_device - constructor //------------------------------------------------- -generic_voodoo_device::generic_voodoo_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo_model model) : +generic_voodoo_device::generic_voodoo_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo_model model) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), m_model(model), @@ -702,7 +702,7 @@ void generic_voodoo_device::device_start() DEFINE_DEVICE_TYPE(VOODOO_1, voodoo_1_device, "voodoo_1", "3dfx Voodoo Graphics") -voodoo_1_device::voodoo_1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo_model model) : +voodoo_1_device::voodoo_1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo_model model) : generic_voodoo_device(mconfig, type, tag, owner, clock, model), m_chipmask(1), m_init_enable(0), @@ -2347,7 +2347,7 @@ u32 voodoo_1_device::reg_swapbuffer_w(u32 chipmask, u32 regnum, u32 data) // determine how many cycles to wait; we deliberately overshoot here because // the final count gets updated on the VBLANK - return (m_vblank_swap + 1) * clock() / 10; + return (m_vblank_swap + 1) * clock().value() / 10; } diff --git a/src/devices/video/voodoo.h b/src/devices/video/voodoo.h index 94a20c0f7af..d1275bb3322 100644 --- a/src/devices/video/voodoo.h +++ b/src/devices/video/voodoo.h @@ -418,7 +418,7 @@ public: protected: // internal construction - generic_voodoo_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo::voodoo_model model); + generic_voodoo_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo::voodoo_model model); // device-level overrides virtual void device_start() override; @@ -476,14 +476,14 @@ protected: static constexpr u32 TRIANGLE_SETUP_CLOCKS = 100; // internal construction - voodoo_1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo::voodoo_model model); + voodoo_1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo::voodoo_model model); public: // nominal clock values - static constexpr u32 NOMINAL_CLOCK = 50'000'000; + static constexpr XTAL NOMINAL_CLOCK = XTAL::u(50'000'000); // construction - voodoo_1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + voodoo_1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_1_device(mconfig, VOODOO_1, tag, owner, clock, voodoo::voodoo_model::VOODOO_1) { } // destruction diff --git a/src/devices/video/voodoo_2.cpp b/src/devices/video/voodoo_2.cpp index 56fd7cdcc65..5715356e732 100644 --- a/src/devices/video/voodoo_2.cpp +++ b/src/devices/video/voodoo_2.cpp @@ -653,7 +653,7 @@ command_fifo::packet_handler command_fifo::s_packet_handler[8] = DEFINE_DEVICE_TYPE(VOODOO_2, voodoo_2_device, "voodoo_2", "3dfx Voodoo 2") -voodoo_2_device::voodoo_2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo_model model) : +voodoo_2_device::voodoo_2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo_model model) : voodoo_1_device(mconfig, type, tag, owner, clock, model), m_sverts(0), m_cmdfifo(*this) diff --git a/src/devices/video/voodoo_2.h b/src/devices/video/voodoo_2.h index a68886b846e..a4f0c5cb908 100644 --- a/src/devices/video/voodoo_2.h +++ b/src/devices/video/voodoo_2.h @@ -173,14 +173,14 @@ class voodoo_2_device : public voodoo_1_device protected: // internal construction - voodoo_2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo::voodoo_model model); + voodoo_2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo::voodoo_model model); public: // nominal clock value - static constexpr u32 NOMINAL_CLOCK = 90'000'000; + static constexpr XTAL NOMINAL_CLOCK = XTAL::u(90'000'000); // construction - voodoo_2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + voodoo_2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_2_device(mconfig, VOODOO_2, tag, owner, clock, voodoo::voodoo_model::VOODOO_2) { } // address map and read/write helpers diff --git a/src/devices/video/voodoo_banshee.cpp b/src/devices/video/voodoo_banshee.cpp index a23311802c8..c80144798ac 100644 --- a/src/devices/video/voodoo_banshee.cpp +++ b/src/devices/video/voodoo_banshee.cpp @@ -178,7 +178,7 @@ void banshee_vga_regs::register_save(save_proxy &save) DEFINE_DEVICE_TYPE(VOODOO_BANSHEE, voodoo_banshee_device, "voodoo_banshee", "3dfx Voodoo Banshee") -voodoo_banshee_device::voodoo_banshee_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo_model model) : +voodoo_banshee_device::voodoo_banshee_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo_model model) : voodoo_2_device(mconfig, type, tag, owner, clock, model), m_cmdfifo2(*this) { @@ -1633,7 +1633,7 @@ void voodoo_banshee_device::execute_blit(u32 data) DEFINE_DEVICE_TYPE(VOODOO_3, voodoo_3_device, "voodoo_3", "3dfx Voodoo 3") -voodoo_3_device::voodoo_3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +voodoo_3_device::voodoo_3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_banshee_device(mconfig, VOODOO_3, tag, owner, clock, voodoo_model::VOODOO_3) { } diff --git a/src/devices/video/voodoo_banshee.h b/src/devices/video/voodoo_banshee.h index 31afb8289ae..8c6fbd5e2a1 100644 --- a/src/devices/video/voodoo_banshee.h +++ b/src/devices/video/voodoo_banshee.h @@ -41,14 +41,14 @@ class voodoo_banshee_device : public voodoo_2_device { protected: // internal construction - voodoo_banshee_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, voodoo::voodoo_model model); + voodoo_banshee_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, voodoo::voodoo_model model); public: // nominal clock values - static constexpr u32 NOMINAL_CLOCK = 90'000'000; + static constexpr XTAL NOMINAL_CLOCK = XTAL::u(90'000'000); // construction - voodoo_banshee_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + voodoo_banshee_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_banshee_device(mconfig, VOODOO_BANSHEE, tag, owner, clock, voodoo::voodoo_model::VOODOO_BANSHEE) { } // core address map and read/write helpers @@ -172,10 +172,10 @@ class voodoo_3_device : public voodoo_banshee_device { public: // nominal clock values - static constexpr u32 NOMINAL_CLOCK = 132'000'000; + static constexpr XTAL NOMINAL_CLOCK = XTAL::u(132'000'000); // construction - voodoo_3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + voodoo_3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/video/voodoo_pci.cpp b/src/devices/video/voodoo_pci.cpp index e27413c8851..11641f0efef 100644 --- a/src/devices/video/voodoo_pci.cpp +++ b/src/devices/video/voodoo_pci.cpp @@ -55,28 +55,28 @@ void voodoo_pci_device::config_map(address_map &map) map(0x40, 0x5f).rw(FUNC(voodoo_pci_device::pcictrl_r), FUNC(voodoo_pci_device::pcictrl_w)); } -voodoo_pci_device::voodoo_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +voodoo_pci_device::voodoo_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, type, tag, owner, clock), m_generic_voodoo(*this, "voodoo"), m_cpu(*this, finder_base::DUMMY_TAG), m_screen(*this, finder_base::DUMMY_TAG), m_fbmem(2), m_tmumem0(0), m_tmumem1(0) { } -voodoo_1_pci_device::voodoo_1_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +voodoo_1_pci_device::voodoo_1_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_pci_device(mconfig, VOODOO_1_PCI, tag, owner, clock), m_voodoo(*this, "voodoo") { } -voodoo_2_pci_device::voodoo_2_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +voodoo_2_pci_device::voodoo_2_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_pci_device(mconfig, VOODOO_2_PCI, tag, owner, clock), m_voodoo(*this, "voodoo") { } -voodoo_banshee_pci_device::voodoo_banshee_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +voodoo_banshee_pci_device::voodoo_banshee_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_pci_device(mconfig, VOODOO_BANSHEE_PCI, tag, owner, clock), m_voodoo(*this, "voodoo") { } -voodoo_3_pci_device::voodoo_3_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +voodoo_3_pci_device::voodoo_3_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : voodoo_pci_device(mconfig, VOODOO_3_PCI, tag, owner, clock), m_voodoo(*this, "voodoo") { } diff --git a/src/devices/video/voodoo_pci.h b/src/devices/video/voodoo_pci.h index c56358b2c2f..283432b86df 100644 --- a/src/devices/video/voodoo_pci.h +++ b/src/devices/video/voodoo_pci.h @@ -25,7 +25,7 @@ public: void vga_w(offs_t offset, u32 data, u32 mem_mask = ~0); protected: - voodoo_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + voodoo_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void map_extra(u64 memory_window_start, u64 memory_window_end, u64 memory_offset, address_space *memory_space, u64 io_window_start, u64 io_window_end, u64 io_offset, address_space *io_space) override; @@ -53,14 +53,14 @@ class voodoo_1_pci_device : public voodoo_pci_device { public: template - voodoo_1_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpu_tag, U &&screen_tag) - : voodoo_1_pci_device(mconfig, tag, owner, clock) + voodoo_1_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&screen_tag) + : voodoo_1_pci_device(mconfig, tag, owner) { set_cpu(std::forward(cpu_tag)); set_screen(std::forward(screen_tag)); } - voodoo_1_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + voodoo_1_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; @@ -72,14 +72,14 @@ class voodoo_2_pci_device : public voodoo_pci_device { public: template - voodoo_2_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpu_tag, U &&screen_tag) - : voodoo_2_pci_device(mconfig, tag, owner, clock) + voodoo_2_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&screen_tag) + : voodoo_2_pci_device(mconfig, tag, owner) { set_cpu(std::forward(cpu_tag)); set_screen(std::forward(screen_tag)); } - voodoo_2_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + voodoo_2_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; @@ -91,14 +91,14 @@ class voodoo_banshee_pci_device : public voodoo_pci_device { public: template - voodoo_banshee_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpu_tag, U &&screen_tag) - : voodoo_banshee_pci_device(mconfig, tag, owner, clock) + voodoo_banshee_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&screen_tag) + : voodoo_banshee_pci_device(mconfig, tag, owner) { set_cpu(std::forward(cpu_tag)); set_screen(std::forward(screen_tag)); } - voodoo_banshee_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + voodoo_banshee_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; @@ -113,14 +113,14 @@ class voodoo_3_pci_device : public voodoo_pci_device { public: template - voodoo_3_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpu_tag, U &&screen_tag) - : voodoo_3_pci_device(mconfig, tag, owner, clock) + voodoo_3_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&screen_tag) + : voodoo_3_pci_device(mconfig, tag, owner) { set_cpu(std::forward(cpu_tag)); set_screen(std::forward(screen_tag)); } - voodoo_3_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + voodoo_3_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; diff --git a/src/devices/video/vrender0.cpp b/src/devices/video/vrender0.cpp index 8a0e7c9319c..1347aa30639 100644 --- a/src/devices/video/vrender0.cpp +++ b/src/devices/video/vrender0.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(VIDEO_VRENDER0, vr0video_device, "vr0video", "MagicEyes VRender0 Video Engine") -vr0video_device::vr0video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vr0video_device::vr0video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIDEO_VRENDER0, tag, owner, clock) , device_video_interface(mconfig, *this) , m_idleskip_cb(*this) diff --git a/src/devices/video/vrender0.h b/src/devices/video/vrender0.h index 3414721a5e7..ef332e6eae1 100644 --- a/src/devices/video/vrender0.h +++ b/src/devices/video/vrender0.h @@ -14,7 +14,7 @@ class vr0video_device : public device_t, public device_video_interface { public: - vr0video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vr0video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_areas(uint16_t *textureram, uint16_t *frameram); void regs_map(address_map &map); diff --git a/src/devices/video/x1_001.cpp b/src/devices/video/x1_001.cpp index 59ea53bd062..1c03dc4b811 100644 --- a/src/devices/video/x1_001.cpp +++ b/src/devices/video/x1_001.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(X1_001, x1_001_device, "x1_001", "Seta X1-001 Sprites") -x1_001_device::x1_001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +x1_001_device::x1_001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X1_001, tag, owner, clock) , device_gfx_interface(mconfig, *this) , m_gfxbank_cb(*this) diff --git a/src/devices/video/x1_001.h b/src/devices/video/x1_001.h index 74cdb239be0..8bf8f11b1b4 100644 --- a/src/devices/video/x1_001.h +++ b/src/devices/video/x1_001.h @@ -12,8 +12,8 @@ typedef device_delegate gfxbank_cb_delegate; class x1_001_device : public device_t, public device_gfx_interface { public: - x1_001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template x1_001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&palette_tag, const gfx_decode_entry *gfxinfo) + x1_001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + template x1_001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&palette_tag, const gfx_decode_entry *gfxinfo) : x1_001_device(mconfig, tag, owner, clock) { set_info(gfxinfo); diff --git a/src/devices/video/zeus2.cpp b/src/devices/video/zeus2.cpp index 300b5ad2d0c..7093b2700f3 100644 --- a/src/devices/video/zeus2.cpp +++ b/src/devices/video/zeus2.cpp @@ -27,7 +27,7 @@ zeus2_renderer::zeus2_renderer(zeus2_device *state) DEFINE_DEVICE_TYPE(ZEUS2, zeus2_device, "zeus2", "Midway Zeus2") -zeus2_device::zeus2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +zeus2_device::zeus2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZEUS2, tag, owner, clock) , device_video_interface(mconfig, *this) , m_vblank(*this), m_irq(*this), m_atlantis(0) diff --git a/src/devices/video/zeus2.h b/src/devices/video/zeus2.h index 459fff99799..1dcff6e0746 100644 --- a/src/devices/video/zeus2.h +++ b/src/devices/video/zeus2.h @@ -104,7 +104,7 @@ typedef zeus2_renderer::extent_t z2_poly_extent; class zeus2_device : public device_t, public device_video_interface { public: - zeus2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + zeus2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t zeus2_r(offs_t offset); diff --git a/src/emu/devcpu.cpp b/src/emu/devcpu.cpp index 03df7990a3d..67968a69efa 100644 --- a/src/emu/devcpu.cpp +++ b/src/emu/devcpu.cpp @@ -21,7 +21,7 @@ // cpu_device - constructor //------------------------------------------------- -cpu_device::cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +cpu_device::cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_execute_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h index 6e9251ab3a9..222a941a325 100644 --- a/src/emu/devcpu.h +++ b/src/emu/devcpu.h @@ -38,7 +38,7 @@ public: protected: // construction/destruction - cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: // configured state diff --git a/src/emu/device.cpp b/src/emu/device.cpp index 425ce52d461..f0ecdc1053d 100644 --- a/src/emu/device.cpp +++ b/src/emu/device.cpp @@ -82,16 +82,16 @@ emu::detail::device_registrar const registered_device_types; // from the provided config //------------------------------------------------- -device_t::device_t(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +device_t::device_t(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m_type(type) , m_owner(owner) , m_next(nullptr) - , m_configured_clock(clock) - , m_unscaled_clock(clock) - , m_clock(clock) + , m_configured_clock(clock.dvalue()) + , m_unscaled_clock(clock.dvalue()) + , m_clock(clock.dvalue()) , m_clock_scale(1.0) - , m_attoseconds_per_clock((clock == 0) ? 0 : HZ_TO_ATTOSECONDS(clock)) + , m_attoseconds_per_clock(clock.disabled() ? 0 : HZ_TO_ATTOSECONDS(clock)) , m_machine_config(mconfig) , m_input_defaults(nullptr) @@ -234,7 +234,7 @@ void device_t::add_machine_configuration(machine_config &config) // a device //------------------------------------------------- -void device_t::set_clock(u32 clock) +void device_t::internal_set_clock(u32 clock) { m_configured_clock = clock; @@ -242,7 +242,7 @@ void device_t::set_clock(u32 clock) if ((clock & 0xff000000) == 0xff000000) calculate_derived_clock(); else - set_unscaled_clock(clock); + internal_set_unscaled_clock(clock); } @@ -365,7 +365,7 @@ void device_t::reset() // unscaled clock //------------------------------------------------- -void device_t::set_unscaled_clock(u32 clock, bool sync_on_new_clock_domain) +void device_t::internal_set_unscaled_clock(u32 clock, bool sync_on_new_clock_domain) { // do nothing if no actual change if (clock == m_unscaled_clock) @@ -420,7 +420,7 @@ void device_t::calculate_derived_clock() if ((m_configured_clock & 0xff000000) == 0xff000000) { assert(m_owner != nullptr); - set_unscaled_clock(m_owner->m_clock * ((m_configured_clock >> 12) & 0xfff) / ((m_configured_clock >> 0) & 0xfff)); + internal_set_unscaled_clock(m_owner->m_clock * ((m_configured_clock >> 12) & 0xfff) / ((m_configured_clock >> 0) & 0xfff)); } } diff --git a/src/emu/device.h b/src/emu/device.h index 402bbb1ccff..4392ede1a7c 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -32,7 +32,7 @@ //************************************************************************** // macro for specifying a clock derived from an owning device -#define DERIVED_CLOCK(num, den) (0xff000000 | ((num) << 12) | ((den) << 0)) +#define DERIVED_CLOCK(num, den) XTAL::u((0xff000000 | ((num) << 12) | ((den) << 0))) @@ -191,7 +191,7 @@ class device_type_impl_base private: friend class device_registrar; - typedef std::unique_ptr (*create_func)(device_type_impl_base const &type, machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + typedef std::unique_ptr (*create_func)(device_type_impl_base const &type, machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); device_type_impl_base(device_type_impl_base const &) = delete; device_type_impl_base(device_type_impl_base &&) = delete; @@ -199,16 +199,15 @@ private: device_type_impl_base &operator=(device_type_impl_base &&) = delete; template - static std::unique_ptr create_device(device_type_impl_base const &type, machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + static std::unique_ptr create_device(device_type_impl_base const &type, machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) { return std::make_unique(mconfig, tag, owner, clock); } template - static std::unique_ptr create_driver(device_type_impl_base const &type, machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + static std::unique_ptr create_driver(device_type_impl_base const &type, machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) { assert(!owner); - assert(!clock); return std::make_unique(mconfig, type, tag); } @@ -276,7 +275,7 @@ public: device_feature::type imperfect_features() const { return m_imperfect_features; } device_type_impl_base const *parent_rom_device_type() const { return m_parent_rom; } - std::unique_ptr create(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) const + std::unique_ptr create(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) const { return m_creator(*this, mconfig, tag, owner, clock); } @@ -575,7 +574,7 @@ protected: device_type type, const char *tag, device_t *owner, - u32 clock); + const XTAL &clock = XTAL()); public: // device flags @@ -634,7 +633,7 @@ public: const char *source() const { return m_type.source(); } device_t *owner() const { return m_owner; } device_t *next() const { return m_next; } - u32 configured_clock() const { return m_configured_clock; } + XTAL configured_clock() const { return XTAL::u(m_configured_clock); } const machine_config &mconfig() const { return m_machine_config; } const input_device_default *input_ports_defaults() const { return m_input_defaults; } const std::vector &rom_region_vector() const; @@ -677,8 +676,11 @@ public: // configuration helpers void add_machine_configuration(machine_config &config); - void set_clock(u32 clock); - void set_clock(const XTAL &xtal) { set_clock(xtal.value()); } + +private: + void internal_set_clock(u32 clock); +public: + void set_clock(const XTAL &xtal) { internal_set_clock(xtal.value()); } void set_input_default(const input_device_default *config) { m_input_defaults = config; } template void set_default_bios_tag(Params &&... args) { assert(!configured()); m_default_bios_tag.assign(std::forward(args)...); } @@ -690,12 +692,14 @@ public: void reset(); // clock/timing accessors - u32 clock() const { return m_clock; } - u32 unscaled_clock() const { return m_unscaled_clock; } - void set_unscaled_clock(u32 clock, bool sync_on_new_clock_domain = false); - void set_unscaled_clock(const XTAL &xtal, bool sync_on_new_clock_domain = false) { set_unscaled_clock(xtal.value(), sync_on_new_clock_domain); } - void set_unscaled_clock_int(u32 clock) { set_unscaled_clock(clock, false); } // non-overloaded name because binding to overloads is ugly - void set_unscaled_clock_int_sync(u32 clock) { set_unscaled_clock(clock, true); } // non-overloaded name because binding to overloads is ugly + XTAL clock() const { return XTAL::u(m_clock); } + XTAL unscaled_clock() const { return XTAL::u(m_unscaled_clock); } +private: + void internal_set_unscaled_clock(u32 clock, bool sync_on_new_clock_domain = false); +public: + void set_unscaled_clock(const XTAL &xtal, bool sync_on_new_clock_domain = false) { internal_set_unscaled_clock(xtal.value(), sync_on_new_clock_domain); } + void set_unscaled_clock_ns(const XTAL &clock) { set_unscaled_clock(clock, false); } // non-overloaded name because binding to overloads is ugly + void set_unscaled_clock_s(const XTAL &clock) { set_unscaled_clock(clock, true); } // non-overloaded name because binding to overloads is ugly double clock_scale() const { return m_clock_scale; } void set_clock_scale(double clockscale); attotime clocks_to_attotime(u64 clocks) const noexcept; diff --git a/src/emu/device.ipp b/src/emu/device.ipp index c7b2d43346b..b886bb47205 100644 --- a/src/emu/device.ipp +++ b/src/emu/device.ipp @@ -21,7 +21,7 @@ // TYPE DEFINITIONS //************************************************************************** -typedef device_delegate clock_update_delegate; +typedef device_delegate clock_update_delegate; //************************************************************************** diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp index b1f885e2b9d..eab91b55f89 100644 --- a/src/emu/diexec.cpp +++ b/src/emu/diexec.cpp @@ -442,7 +442,7 @@ void device_execute_interface::interface_pre_reset() // enable all devices (except for disabled and unclocked devices) if (disabled()) suspend(SUSPEND_REASON_DISABLE, true); - else if (device().clock() != 0) + else if (!device().clock().disabled()) resume(SUSPEND_ANY_REASON); } @@ -486,7 +486,7 @@ void device_execute_interface::interface_post_reset() void device_execute_interface::interface_clock_changed(bool sync_on_new_clock_domain) { // a clock of zero disables the device - if (device().clock() == 0) + if (device().clock().disabled()) { suspend(SUSPEND_REASON_CLOCK, true); return; @@ -497,7 +497,7 @@ void device_execute_interface::interface_clock_changed(bool sync_on_new_clock_do resume(SUSPEND_REASON_CLOCK); // recompute cps and spc - m_cycles_per_second = clocks_to_cycles(device().clock()); + m_cycles_per_second = clocks_to_cycles(device().clock().value()); m_attoseconds_per_cycle = HZ_TO_ATTOSECONDS(m_cycles_per_second); // resynchronize the localtime to the clock domain when asked to @@ -557,13 +557,13 @@ int device_execute_interface::standard_irq_callback(int irqline) attoseconds_t device_execute_interface::minimum_quantum() const { // if we don't have a clock, return a huge factor - if (device().clock() == 0) + if (device().clock().disabled()) return ATTOSECONDS_PER_SECOND - 1; // if we don't have the quantum time, compute it attoseconds_t basetick = m_attoseconds_per_cycle; if (basetick == 0) - basetick = HZ_TO_ATTOSECONDS(clocks_to_cycles(device().clock())); + basetick = HZ_TO_ATTOSECONDS(clocks_to_cycles(device().clock().value())); // apply the minimum cycle count return basetick * min_cycles(); diff --git a/src/emu/diserial.h b/src/emu/diserial.h index 62b13c028a1..3c6e42456c6 100644 --- a/src/emu/diserial.h +++ b/src/emu/diserial.h @@ -90,13 +90,10 @@ protected: void set_rcv_rate(const attotime &rate); void set_tra_rate(const attotime &rate); - void set_rcv_rate(u32 clock, int div) { set_rcv_rate((clock && div) ? (attotime::from_hz(clock) * div) : attotime::never); } - void set_tra_rate(u32 clock, int div) { set_tra_rate((clock && div) ? (attotime::from_hz(clock) * div) : attotime::never); } - void set_rcv_rate(int baud) { set_rcv_rate(baud ? attotime::from_hz(baud) : attotime::never); } - void set_tra_rate(int baud) { set_tra_rate(baud ? attotime::from_hz(baud) : attotime::never); } + void set_rcv_rate(const XTAL &clock) { set_rcv_rate(clock.disabled() ? attotime::never : attotime::from_seconds(1/clock.dvalue())); } + void set_tra_rate(const XTAL &clock) { set_tra_rate(clock.disabled() ? attotime::never : attotime::from_seconds(1/clock.dvalue())); } void set_rate(const attotime &rate) { set_rcv_rate(rate); set_tra_rate(rate); } - void set_rate(u32 clock, int div) { set_rcv_rate(clock, div); set_tra_rate(clock, div); } - void set_rate(int baud) { set_rcv_rate(baud); set_tra_rate(baud); } + void set_rate(const XTAL &clock) { set_rcv_rate(clock); set_tra_rate(clock); } void transmit_register_reset(); void transmit_register_add_bit(int bit); diff --git a/src/emu/dislot.h b/src/emu/dislot.h index dd2fde5fac1..b337e5b4e3a 100644 --- a/src/emu/dislot.h +++ b/src/emu/dislot.h @@ -54,13 +54,12 @@ public: char const *default_bios() const { return m_default_bios; } std::function const &machine_config() const { return m_machine_config; } input_device_default const *input_device_defaults() const { return m_input_device_defaults; } - u32 clock() const { return m_clock; } + XTAL clock() const { return m_clock; } slot_option &default_bios(char const *default_bios) { m_default_bios = default_bios; return *this; } template slot_option &machine_config(Object &&cb) { m_machine_config = std::forward(cb); return *this; } slot_option &input_device_defaults(input_device_default const *dev_inp_def) { m_input_device_defaults = dev_inp_def; return *this; } - slot_option &clock(u32 clock) { m_clock = clock; return *this; } - slot_option &clock(XTAL clock) { clock.validate(std::string("Configuring slot option ") + m_name); m_clock = clock.value(); return *this; } + slot_option &clock(const XTAL &clock) { clock.validate(std::string("Configuring slot option ") + m_name); m_clock = clock; return *this; } private: // internal state @@ -70,7 +69,7 @@ public: char const *m_default_bios; std::function m_machine_config; input_device_default const *m_input_device_defaults; - u32 m_clock; + XTAL m_clock; }; virtual ~device_slot_interface(); @@ -171,12 +170,12 @@ public: protected: device_slot_interface(machine_config const &mconfig, device_t &device); virtual void interface_validity_check(validity_checker &valid) const override ATTR_COLD; - void set_default_clock(u32 clock) { m_default_clock = clock; } + void set_default_clock(const XTAL &clock) { m_default_clock = clock; } private: // internal state std::unordered_map> m_options; - u32 m_default_clock; + XTAL m_default_clock; char const *m_default_option; bool m_fixed; device_t *m_card_device; diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp index 83d2c2bf084..0a57a9d4bd7 100644 --- a/src/emu/disound.cpp +++ b/src/emu/disound.cpp @@ -71,12 +71,12 @@ device_sound_interface &device_sound_interface::add_route(u32 output, device_t & // associated with this device //------------------------------------------------- -sound_stream *device_sound_interface::stream_alloc(int inputs, int outputs, int sample_rate) +sound_stream *device_sound_interface::stream_alloc(int inputs, int outputs, const XTAL &sample_rate) { return device().machine().sound().stream_alloc(*this, inputs, outputs, sample_rate, stream_update_delegate(&device_sound_interface::sound_stream_update, this), STREAM_DEFAULT_FLAGS); } -sound_stream *device_sound_interface::stream_alloc(int inputs, int outputs, int sample_rate, sound_stream_flags flags) +sound_stream *device_sound_interface::stream_alloc(int inputs, int outputs, const XTAL &sample_rate, sound_stream_flags flags) { return device().machine().sound().stream_alloc(*this, inputs, outputs, sample_rate, stream_update_delegate(&device_sound_interface::sound_stream_update, this), flags); } diff --git a/src/emu/disound.h b/src/emu/disound.h index e48ba290bc6..8ad9dbd8494 100644 --- a/src/emu/disound.h +++ b/src/emu/disound.h @@ -80,8 +80,8 @@ public: virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs); // stream creation - sound_stream *stream_alloc(int inputs, int outputs, int sample_rate); - sound_stream *stream_alloc(int inputs, int outputs, int sample_rate, sound_stream_flags flags); + sound_stream *stream_alloc(int inputs, int outputs, const XTAL &sample_rate); + sound_stream *stream_alloc(int inputs, int outputs, const XTAL &sample_rate, sound_stream_flags flags); // helpers int inputs() const; diff --git a/src/emu/drawgfx.cpp b/src/emu/drawgfx.cpp index 8a63d71467c..42b2b5db79e 100644 --- a/src/emu/drawgfx.cpp +++ b/src/emu/drawgfx.cpp @@ -58,7 +58,7 @@ static inline s32 normalize_yscroll(const bitmap_t &bitmap, s32 yscroll) DEFINE_DEVICE_TYPE(GFXDECODE, gfxdecode_device, "gfxdecode", "gfxdecode") -gfxdecode_device::gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +gfxdecode_device::gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GFXDECODE, tag, owner, clock), device_gfx_interface(mconfig, *this) { diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h index 4b5be8a4fa3..f88d3f98c9b 100644 --- a/src/emu/drawgfx.h +++ b/src/emu/drawgfx.h @@ -539,12 +539,12 @@ public: // construction/destruction template gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&palette_tag, const gfx_decode_entry *gfxinfo) - : gfxdecode_device(mconfig, tag, owner, 0) + : gfxdecode_device(mconfig, tag, owner) { set_palette(std::forward(palette_tag)); set_info(gfxinfo); } - gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override {} diff --git a/src/emu/driver.cpp b/src/emu/driver.cpp index 9b0dd9c5e59..09690110829 100644 --- a/src/emu/driver.cpp +++ b/src/emu/driver.cpp @@ -23,7 +23,7 @@ //------------------------------------------------- driver_device::driver_device(const machine_config &mconfig, device_type type, const char *tag) - : device_t(mconfig, type, tag, nullptr, 0) + : device_t(mconfig, type, tag, nullptr, XTAL()) , m_system(mconfig.gamedrv()) , m_flip_screen_x(0) , m_flip_screen_y(0) diff --git a/src/emu/drivers/testcpu.cpp b/src/emu/drivers/testcpu.cpp index 95e3d5a1ec2..e7fa0cbbb13 100644 --- a/src/emu/drivers/testcpu.cpp +++ b/src/emu/drivers/testcpu.cpp @@ -193,7 +193,7 @@ void testcpu_state::ppc_mem(address_map &map) void testcpu_state::testcpu(machine_config &config) { // CPUs - PPC603E(config, m_cpu, 66000000); + PPC603E(config, m_cpu, XTAL::u(66000000)); m_cpu->set_bus_frequency(66000000); // Multiplier 1, Bus = 66MHz, Core = 66MHz m_cpu->set_addrmap(AS_PROGRAM, &testcpu_state::ppc_mem); } diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp index 9e1370a24ed..f83d2150b61 100644 --- a/src/emu/emupal.cpp +++ b/src/emu/emupal.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(PALETTE, palette_device, "palette", "palette") palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, init_delegate &&init, u32 entries, u32 indirect) - : palette_device(mconfig, tag, owner, 0U) + : palette_device(mconfig, tag, owner) { set_entries(entries, indirect); m_init = std::move(init); @@ -101,7 +101,7 @@ palette_device::palette_device(const machine_config &mconfig, const char *tag, d } -palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +palette_device::palette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PALETTE, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_entries(0) diff --git a/src/emu/emupal.h b/src/emu/emupal.h index cb4884a72fb..60bab6efc6c 100644 --- a/src/emu/emupal.h +++ b/src/emu/emupal.h @@ -267,7 +267,7 @@ public: palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_555_t); palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_565_t); palette_device(const machine_config &mconfig, const char *tag, device_t *owner, bgr_565_t); - palette_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + palette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template palette_device(const machine_config &mconfig, const char *tag, device_t *owner, rgb_444_prom_t, T &®ion, u32 entries) @@ -278,11 +278,11 @@ public: template palette_device(const machine_config &mconfig, const char *tag, device_t *owner, F &&init, std::enable_if_t::value, const char *> name, u32 entries = 0U, u32 indirect = 0U) - : palette_device(mconfig, tag, owner, 0U) + : palette_device(mconfig, tag, owner) { set_init(std::forward(init), name).set_entries(entries, indirect); } template palette_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&devname, F &&init, std::enable_if_t::value, const char *> name, u32 entries = 0U, u32 indirect = 0U) - : palette_device(mconfig, tag, owner, 0U) + : palette_device(mconfig, tag, owner) { set_init(std::forward(devname), std::forward(init), name).set_entries(entries, indirect); } // configuration diff --git a/src/emu/machine.h b/src/emu/machine.h index a49c5f1dbf9..cd99867ac95 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -147,7 +147,7 @@ public: bool hard_reset_pending() const { return m_hard_reset_pending; } bool ui_active() const { return m_ui_active; } const std::string &basename() const { return m_basename; } - int sample_rate() const { return m_sample_rate; } + XTAL sample_rate() const { return XTAL::u(m_sample_rate); } bool save_or_load_pending() const { return !m_saveload_pending_file.empty(); } // RAII-based side effect disable diff --git a/src/emu/mconfig.cpp b/src/emu/mconfig.cpp index 2c8c1aa011b..26debad4119 100644 --- a/src/emu/mconfig.cpp +++ b/src/emu/mconfig.cpp @@ -48,7 +48,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options) , m_perfect_quantum_device(nullptr, "") { // add the root device - device_add("root", gamedrv.type, 0); + device_add("root", gamedrv.type, XTAL()); // intialize slot devices - make sure that any required devices have been allocated for (device_slot_interface &slot : slot_interface_enumerator(root_device())) @@ -195,8 +195,9 @@ void machine_config::set_maximum_quantum(attotime const &quantum) // new device //------------------------------------------------- -device_t *machine_config::device_add(const char *tag, device_type type, u32 clock) +device_t *machine_config::device_add(const char *tag, device_type type, const XTAL &clock) { + clock.validate(std::string("Instanciating device ") + tag); std::pair const owner(resolve_owner(tag)); return &add_device(type.create(*this, owner.first, owner.second, clock), owner.second); } @@ -207,8 +208,9 @@ device_t *machine_config::device_add(const char *tag, device_type type, u32 cloc // replace one device with a new device //------------------------------------------------- -device_t *machine_config::device_replace(const char *tag, device_type type, u32 clock) +device_t *machine_config::device_replace(const char *tag, device_type type, const XTAL &clock) { + clock.validate(std::string("Replacing device ") + tag); std::tuple const existing(prepare_replace(tag)); std::unique_ptr device(type.create(*this, std::get<0>(existing), std::get<1>(existing), clock)); return &replace_device(std::move(device), *std::get<1>(existing), std::get<2>(existing)); diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h index c6cacde581f..203c213f649 100644 --- a/src/emu/mconfig.h +++ b/src/emu/mconfig.h @@ -180,9 +180,9 @@ public: m_current_device = &device; return token(*this, device); } - device_t *device_add(const char *tag, device_type type, u32 clock); + device_t *device_add(const char *tag, device_type type, const XTAL &clock = XTAL()); template - device_t *device_add(const char *tag, Creator &&type, u32 clock) + device_t *device_add(const char *tag, Creator &&type, const XTAL &clock = XTAL()) { return device_add(tag, device_type(type), clock); } @@ -196,15 +196,9 @@ public: add_device(std::move(device), owner.second); return &result; } - template - auto device_add(const char *tag, Creator &&type, XTAL clock, Params &&... args) - { - clock.validate(std::string("Instantiating device ") + tag); - return device_add(tag, std::forward(type), clock.value(), std::forward(args)...); - } - device_t *device_replace(const char *tag, device_type type, u32 clock); + device_t *device_replace(const char *tag, device_type type, const XTAL &clock = XTAL()); template - device_t *device_replace(const char *tag, Creator &&type, u32 clock) + device_t *device_replace(const char *tag, Creator &&type, const XTAL &clock = XTAL()) { return device_replace(tag, device_type(type), clock); } @@ -218,12 +212,6 @@ public: replace_device(std::move(device), *std::get<1>(existing), std::get<2>(existing)); return &result; } - template - auto device_replace(const char *tag, Creator &&type, XTAL clock, Params &&... args) - { - clock.validate(std::string("Replacing device ") + tag); - return device_replace(tag, std::forward(type), clock.value(), std::forward(args)...); - } device_t *device_remove(const char *tag); private: diff --git a/src/emu/recording.cpp b/src/emu/recording.cpp index 611e5ae327b..2208d2fe7b2 100644 --- a/src/emu/recording.cpp +++ b/src/emu/recording.cpp @@ -186,12 +186,12 @@ bool avi_movie_recording::initialize(running_machine &machine, std::unique_ptr + std::enable_if_t::underlying_type, XTAL>::value> save_item(device_t *device, const char *module, const char *tag, int index, ItemType &value, const char *valname) + { + std::string tempstr; + tempstr.assign(valname).append(".base_clock"); + save_item(device, module, tag, index, value, &XTAL::m_base_clock, tempstr.c_str()); + tempstr.assign(valname).append(".current_clock"); + save_item(device, module, tag, index, value, &XTAL::m_current_clock, tempstr.c_str()); + tempstr.assign(valname).append(".disable_validation"); + save_item(device, module, tag, index, value, &XTAL::m_disable_validation, tempstr.c_str()); + } + + template + std::enable_if_t::underlying_type, XTAL>::value> save_pointer(device_t *device, const char *module, const char *tag, int index, ItemType *value, const char *valname, u32 count) + { + std::string tempstr; + tempstr.assign(valname).append(".base_clock"); + save_item(device, module, tag, index, value, &XTAL::m_base_clock, tempstr.c_str()); + tempstr.assign(valname).append(".current_clock"); + save_item(device, module, tag, index, value, &XTAL::m_current_clock, tempstr.c_str()); + tempstr.assign(valname).append(".disable_validation"); + save_item(device, module, tag, index, value, &XTAL::m_disable_validation, tempstr.c_str()); + } + + template + std::enable_if_t::underlying_type, XTAL>::value> save_pointer(device_t *device, const char *module, const char *tag, int index, const std::unique_ptr &value, const char *valname, u32 count) + { + std::string tempstr; + tempstr.assign(valname).append(".base_clock"); + save_item(device, module, tag, index, value, &XTAL::m_base_clock, tempstr.c_str()); + tempstr.assign(valname).append(".current_clock"); + save_item(device, module, tag, index, value, &XTAL::m_current_clock, tempstr.c_str()); + tempstr.assign(valname).append(".disable_validation"); + save_item(device, module, tag, index, value, &XTAL::m_disable_validation, tempstr.c_str()); + } + // global memory registration template void save_item(ItemType &value, const char *valname, int index = 0) diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp index f69a03ac13e..3932ffa7b94 100644 --- a/src/emu/screen.cpp +++ b/src/emu/screen.cpp @@ -526,7 +526,7 @@ void screen_device::svg_renderer::rebuild_cache() // screen_device - constructor //------------------------------------------------- -screen_device::screen_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +screen_device::screen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCREEN, tag, owner, clock) , m_type(SCREEN_TYPE_RASTER) , m_orientation(ROT0) diff --git a/src/emu/screen.h b/src/emu/screen.h index 685d4c913a9..daafa2c822a 100644 --- a/src/emu/screen.h +++ b/src/emu/screen.h @@ -167,15 +167,15 @@ class screen_device : public device_t public: // construction/destruction - screen_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + screen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); screen_device(const machine_config &mconfig, const char *tag, device_t *owner, screen_type_enum type) - : screen_device(mconfig, tag, owner, u32(0)) + : screen_device(mconfig, tag, owner, XTAL()) { set_type(type); } screen_device(const machine_config &mconfig, const char *tag, device_t *owner, screen_type_enum type, rgb_t color) - : screen_device(mconfig, tag, owner, u32(0)) + : screen_device(mconfig, tag, owner, XTAL()) { set_type(type); set_color(color); @@ -222,10 +222,10 @@ public: /// \param [in] vbstart Index of first line in vertical blanking /// period after visible lines. /// \return Reference to device for method chaining. - screen_device &set_raw(u32 pixclock, u16 htotal, u16 hbend, u16 hbstart, u16 vtotal, u16 vbend, u16 vbstart) +private: + screen_device &internal_set_raw(u32 pixclock, u16 htotal, u16 hbend, u16 hbstart, u16 vtotal, u16 vbend, u16 vbstart) { assert(pixclock != 0); - set_clock(pixclock); m_refresh = HZ_TO_ATTOSECONDS(pixclock) * htotal * vtotal; m_vblank = m_refresh / vtotal * (vtotal - (vbstart - vbend)); m_width = htotal; @@ -233,10 +233,12 @@ public: m_visarea.set(hbend, hbstart ? hbstart - 1 : htotal - 1, vbend, vbstart - 1); return *this; } +public: screen_device &set_raw(const XTAL &xtal, u16 htotal, u16 hbend, u16 hbstart, u16 vtotal, u16 vbend, u16 vbstart) { xtal.validate(std::string("Configuring screen ") + tag()); - return set_raw(xtal.value(), htotal, hbend, hbstart, vtotal, vbend, vbstart); + set_clock(xtal); + return internal_set_raw(xtal.value(), htotal, hbend, hbstart, vtotal, vbend, vbstart); } screen_device &set_raw(const XTAL &xtal, u16 htotal, u16 vtotal, rectangle visarea) { diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp index 6db85f917cf..0098dd7d02d 100644 --- a/src/emu/softlist_dev.cpp +++ b/src/emu/softlist_dev.cpp @@ -85,7 +85,7 @@ bool image_software_list_loader::load_software(device_image_interface &image, so // software_list_device - constructor //------------------------------------------------- -software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SOFTWARE_LIST, tag, owner, clock), m_list_type(softlist_type::ORIGINAL_SYSTEM), m_filter(nullptr), diff --git a/src/emu/softlist_dev.h b/src/emu/softlist_dev.h index 9e919dabe78..19275e379bc 100644 --- a/src/emu/softlist_dev.h +++ b/src/emu/softlist_dev.h @@ -99,7 +99,7 @@ public: }; // construction/destruction - software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers software_list_device &set_type(const char *list, softlist_type list_type) { m_list_name.assign(list); m_list_type = list_type; return *this; } diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 6862845e8da..b52111dc612 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -55,12 +55,12 @@ const attotime sound_manager::STREAMS_UPDATE_ATTOTIME = attotime::from_hz(STREAM // stream_buffer - constructor //------------------------------------------------- -stream_buffer::stream_buffer(u32 sample_rate) : +stream_buffer::stream_buffer(const XTAL &sample_rate) : m_end_second(0), m_end_sample(0), m_sample_rate(sample_rate), - m_sample_attos((sample_rate == 0) ? ATTOSECONDS_PER_SECOND : ((ATTOSECONDS_PER_SECOND + sample_rate - 1) / sample_rate)), - m_buffer(sample_rate) + m_sample_attos(sample_rate.disabled() ? ATTOSECONDS_PER_SECOND : ((ATTOSECONDS_PER_SECOND + sample_rate.value() - 1) / sample_rate.value())), + m_buffer(sample_rate.disabled() ? 1 : sample_rate.value()) { } @@ -83,15 +83,16 @@ stream_buffer::~stream_buffer() // this buffer //------------------------------------------------- -void stream_buffer::set_sample_rate(u32 rate, bool resample) +void stream_buffer::set_sample_rate(const XTAL &rate, bool resample) { // skip if nothing is actually changing if (rate == m_sample_rate) return; + u32 irate = rate.value(); + // force resampling off if coming to or from an invalid rate, or if we're at time 0 (startup) - sound_assert(rate >= SAMPLE_RATE_MINIMUM - 1); - if (rate < SAMPLE_RATE_MINIMUM || m_sample_rate < SAMPLE_RATE_MINIMUM || (m_end_second == 0 && m_end_sample == 0)) + if (rate.disabled() || !m_sample_rate.disabled() || (m_end_second == 0 && m_end_sample == 0)) resample = false; // note the time and period of the current buffer (end_time is AFTER the final sample) @@ -99,7 +100,7 @@ void stream_buffer::set_sample_rate(u32 rate, bool resample) attotime prevend = end_time(); // compute the time and period of the new buffer - attotime newperiod = attotime(0, (ATTOSECONDS_PER_SECOND + rate - 1) / rate); + attotime newperiod = attotime(0, (ATTOSECONDS_PER_SECOND + irate - 1) / irate); attotime newend = attotime(prevend.seconds(), (prevend.attoseconds() / newperiod.attoseconds()) * newperiod.attoseconds()); // buffer a short runway of previous samples; in order to support smooth @@ -109,11 +110,11 @@ void stream_buffer::set_sample_rate(u32 rate, bool resample) // voice when jumping off the edge in Q*Bert; without this extra effort // it is crackly and/or glitchy at times sample_t buffer[64]; - int buffered_samples = std::min(m_sample_rate, std::min(rate, u32(std::size(buffer)))); + int buffered_samples = std::min(m_sample_rate.value(), std::min(irate, u32(std::size(buffer)))); // if the new rate is lower, downsample into our holding buffer; // otherwise just copy into our holding buffer for later upsampling - bool new_rate_higher = (rate > m_sample_rate); + bool new_rate_higher = (irate > m_sample_rate.value()); if (resample) { if (!new_rate_higher) @@ -137,8 +138,8 @@ void stream_buffer::set_sample_rate(u32 rate, bool resample) } // ensure our buffer is large enough to hold a full second at the new rate - if (m_buffer.size() < rate) - m_buffer.resize(rate); + if (m_buffer.size() < irate) + m_buffer.resize(irate); // set the new rate m_sample_rate = rate; @@ -529,7 +530,7 @@ read_stream_view sound_stream_input::update(attotime start, attotime end) // them of our current rate //------------------------------------------------- -void sound_stream_input::apply_sample_rate_changes(u32 updatenum, u32 downstream_rate) +void sound_stream_input::apply_sample_rate_changes(u32 updatenum, const XTAL &downstream_rate) { // shouldn't get here unless valid sound_assert(valid()); @@ -553,21 +554,21 @@ void sound_stream_input::apply_sample_rate_changes(u32 updatenum, u32 downstream // sound_stream - private common constructor //------------------------------------------------- -sound_stream::sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, u32 sample_rate, sound_stream_flags flags) : +sound_stream::sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, const XTAL &sample_rate, u32 flags) : m_device(device), m_next(nullptr), - m_sample_rate((sample_rate < SAMPLE_RATE_MINIMUM) ? (SAMPLE_RATE_MINIMUM - 1) : (sample_rate < SAMPLE_RATE_OUTPUT_ADAPTIVE) ? sample_rate : 48000), - m_pending_sample_rate(SAMPLE_RATE_INVALID), + m_sample_rate(sample_rate), + m_pending_sample_rate(), m_last_sample_rate_update(0), - m_input_adaptive(sample_rate == SAMPLE_RATE_INPUT_ADAPTIVE), - m_output_adaptive(sample_rate == SAMPLE_RATE_OUTPUT_ADAPTIVE), + m_input_adaptive(flags & SAMPLE_RATE_INPUT_ADAPTIVE), + m_output_adaptive(flags & SAMPLE_RATE_OUTPUT_ADAPTIVE), m_synchronous((flags & STREAM_SYNCHRONOUS) != 0), m_resampling_disabled((flags & STREAM_DISABLE_INPUT_RESAMPLING) != 0), m_sync_timer(nullptr), m_last_update_end_time(attotime::zero), m_input(inputs), m_input_view(inputs), - m_empty_buffer(100), + m_empty_buffer(), m_output_base(output_base), m_output(outputs), m_output_view(outputs) @@ -620,7 +621,7 @@ sound_stream::sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output // sound_stream - constructor //------------------------------------------------- -sound_stream::sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, u32 sample_rate, stream_update_delegate callback, sound_stream_flags flags) : +sound_stream::sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, const XTAL &sample_rate, stream_update_delegate callback, u32 flags) : sound_stream(device, inputs, outputs, output_base, sample_rate, flags) { m_callback_ex = std::move(callback); @@ -641,7 +642,7 @@ sound_stream::~sound_stream() // given stream //------------------------------------------------- -void sound_stream::set_sample_rate(u32 new_rate) +void sound_stream::set_sample_rate(const XTAL &new_rate) { // we will update this on the next global update if (new_rate != sample_rate()) @@ -724,7 +725,7 @@ read_stream_view sound_stream::update_view(attotime start, attotime end, u32 out // skip if nothing to do u32 samples = m_output_view[0].samples(); sound_assert(samples >= 0); - if (samples != 0 && m_sample_rate >= SAMPLE_RATE_MINIMUM) + if (samples != 0 && m_sample_rate.enabled()) { sound_assert(!synchronous() || samples == 1); @@ -771,16 +772,11 @@ read_stream_view sound_stream::update_view(attotime start, attotime end, u32 out // pending sample rate change, apply it now //------------------------------------------------- -void sound_stream::apply_sample_rate_changes(u32 updatenum, u32 downstream_rate) +void sound_stream::apply_sample_rate_changes(u32 updatenum, const XTAL &downstream_rate) { // grab the new rate and invalidate - u32 new_rate = (m_pending_sample_rate != SAMPLE_RATE_INVALID) ? m_pending_sample_rate : m_sample_rate; - m_pending_sample_rate = SAMPLE_RATE_INVALID; - - // clamp to the minimum - 1 (anything below minimum means "off" and - // will not call the sound callback at all) - if (new_rate < SAMPLE_RATE_MINIMUM) - new_rate = SAMPLE_RATE_MINIMUM - 1; + XTAL new_rate = m_pending_sample_rate.enabled() ? m_pending_sample_rate : m_sample_rate; + m_pending_sample_rate = XTAL(); // if we're input adaptive, override with the rate of our input if (input_adaptive() && m_input.size() > 0 && m_input[0].valid()) @@ -797,11 +793,11 @@ void sound_stream::apply_sample_rate_changes(u32 updatenum, u32 downstream_rate) } // if something is different, process the change - if (new_rate != SAMPLE_RATE_INVALID && new_rate != m_sample_rate) + if (new_rate.enabled() && new_rate != m_sample_rate) { // update to the new rate and notify everyone #if (SOUND_DEBUG) - printf("stream %s changing rates %d -> %d\n", name().c_str(), m_sample_rate, new_rate); + printf("stream %s changing rates %d -> %d\n", name().c_str(), m_sample_rate.value(), new_rate.value()); #endif m_sample_rate = new_rate; sample_rate_changed(); @@ -845,7 +841,7 @@ void sound_stream::print_graph_recursive(int indent, int index) void sound_stream::sample_rate_changed() { // if invalid, just punt - if (m_sample_rate == SAMPLE_RATE_INVALID) + if (m_sample_rate.disabled()) return; // update all output buffers @@ -938,7 +934,7 @@ read_stream_view sound_stream::empty_view(attotime start, attotime end) //------------------------------------------------- default_resampler_stream::default_resampler_stream(device_t &device) : - sound_stream(device, 1, 1, 0, SAMPLE_RATE_OUTPUT_ADAPTIVE, stream_update_delegate(&default_resampler_stream::resampler_sound_update, this), STREAM_DISABLE_INPUT_RESAMPLING), + sound_stream(device, 1, 1, 0, XTAL(), stream_update_delegate(&default_resampler_stream::resampler_sound_update, this), STREAM_DISABLE_INPUT_RESAMPLING|SAMPLE_RATE_OUTPUT_ADAPTIVE), m_max_latency(0) { // create a name @@ -963,7 +959,7 @@ void default_resampler_stream::resampler_sound_update(sound_stream &stream, std: auto &output = outputs[0]; // if the input has an invalid rate, just fill with zeros - if (input.sample_rate() <= 1) + if (input.sample_rate().disabled()) { output.fill(0); return; @@ -973,7 +969,7 @@ void default_resampler_stream::resampler_sound_update(sound_stream &stream, std: sound_assert(input.sample_rate() != output.sample_rate()); // compute the stepping value and the inverse - stream_buffer::sample_t step = stream_buffer::sample_t(input.sample_rate()) / stream_buffer::sample_t(output.sample_rate()); + stream_buffer::sample_t step = stream_buffer::sample_t(input.sample_rate().value()) / stream_buffer::sample_t(output.sample_rate().value()); stream_buffer::sample_t stepinv = 1.0 / step; // determine the latency we need to introduce, in input samples: @@ -1080,9 +1076,9 @@ sound_manager::sound_manager(running_machine &machine) : m_last_update(attotime::zero), m_finalmix_leftover(0), m_samples_this_update(0), - m_finalmix(machine.sample_rate()), - m_leftmix(machine.sample_rate()), - m_rightmix(machine.sample_rate()), + m_finalmix(machine.sample_rate().value()), + m_leftmix(machine.sample_rate().value()), + m_rightmix(machine.sample_rate().value()), m_compressor_scale(1.0), m_compressor_counter(0), m_compressor_enabled(machine.options().compressor()), @@ -1135,7 +1131,7 @@ sound_manager::~sound_manager() // new-style callback and flags //------------------------------------------------- -sound_stream *sound_manager::stream_alloc(device_t &device, u32 inputs, u32 outputs, u32 sample_rate, stream_update_delegate callback, sound_stream_flags flags) +sound_stream *sound_manager::stream_alloc(device_t &device, u32 inputs, u32 outputs, const XTAL &sample_rate, stream_update_delegate callback, u32 flags) { // determine output base u32 output_base = 0; @@ -1156,7 +1152,7 @@ bool sound_manager::start_recording(std::string_view filename) { if (m_wavfile) return false; - m_wavfile = util::wav_open(filename, machine().sample_rate(), 2); + m_wavfile = util::wav_open(filename, machine().sample_rate().value(), 2); return bool(m_wavfile); } diff --git a/src/emu/sound.h b/src/emu/sound.h index 15f6a5743a2..9387a6bc30c 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -64,20 +64,6 @@ #include "wavwrite.h" -//************************************************************************** -// CONSTANTS -//************************************************************************** - -// special sample-rate values -constexpr u32 SAMPLE_RATE_INVALID = 0xffffffff; -constexpr u32 SAMPLE_RATE_INPUT_ADAPTIVE = 0xfffffffe; -constexpr u32 SAMPLE_RATE_OUTPUT_ADAPTIVE = 0xfffffffd; - -// anything below this sample rate is effectively treated as "off" -constexpr u32 SAMPLE_RATE_MINIMUM = 50; - - - //************************************************************************** // DEBUGGING //************************************************************************** @@ -119,7 +105,7 @@ public: private: // constructor/destructor - stream_buffer(u32 sample_rate = 48000); + stream_buffer(const XTAL &sample_rate = XTAL()); ~stream_buffer(); // disable copying of stream_buffers directly @@ -127,10 +113,10 @@ private: stream_buffer &operator=(stream_buffer const &rhs) = delete; // return the current sample rate - u32 sample_rate() const { return m_sample_rate; } + XTAL sample_rate() const { return m_sample_rate; } // set a new sample rate - void set_sample_rate(u32 rate, bool resample); + void set_sample_rate(const XTAL &rate, bool resample); // return the current sample period in attoseconds attoseconds_t sample_period_attoseconds() const { return m_sample_attos; } @@ -148,7 +134,7 @@ private: // return the effective buffer size; currently it is a full second of audio // at the current sample rate, but this maybe change in the future - u32 size() const { return m_sample_rate; } + u32 size() const { return m_sample_rate.value(); } // read the sample at the given index (clamped); should be valid in all cases sample_t get(s32 index) const @@ -202,7 +188,7 @@ private: // internal state u32 m_end_second; // current full second of the buffer end u32 m_end_sample; // current sample number within the final second - u32 m_sample_rate; // sample rate of the data in the buffer + XTAL m_sample_rate; // sample rate of the data in the buffer attoseconds_t m_sample_attos; // pre-computed attoseconds per sample std::vector m_buffer; // vector of actual buffer data @@ -288,7 +274,7 @@ public: sample_t gain() const { return m_gain; } // return the sample rate of the data - u32 sample_rate() const { return m_buffer->sample_rate(); } + XTAL sample_rate() const { return m_buffer->sample_rate(); } // return the sample period (in attoseconds) of the data attoseconds_t sample_period_attoseconds() const { return m_buffer->sample_period_attoseconds(); } @@ -492,7 +478,7 @@ public: attotime end_time() const { return m_buffer.end_time(); } u32 index() const { return m_index; } stream_buffer::sample_t gain() const { return m_gain; } - u32 buffer_sample_rate() const { return m_buffer.sample_rate(); } + XTAL buffer_sample_rate() const { return m_buffer.sample_rate(); } // simple setters void set_gain(float gain) { m_gain = gain; } @@ -501,7 +487,7 @@ public: std::string name() const; // handle a changing sample rate - void sample_rate_changed(u32 rate) { m_buffer.set_sample_rate(rate, true); } + void sample_rate_changed(const XTAL &rate) { m_buffer.set_sample_rate(rate, true); } // return an output view covering a time period write_stream_view view(attotime start, attotime end) { return write_stream_view(m_buffer, start, end); } @@ -563,7 +549,7 @@ public: read_stream_view update(attotime start, attotime end); // tell inputs to apply sample rate changes - void apply_sample_rate_changes(u32 updatenum, u32 downstream_rate); + void apply_sample_rate_changes(u32 updatenum, const XTAL &downstream_rate); private: // internal state @@ -596,7 +582,15 @@ enum sound_stream_flags : u32 // specify that input streams should not be resampled; stream update handler // must be able to accommodate multiple strams of differing input rates - STREAM_DISABLE_INPUT_RESAMPLING = 0x02 + STREAM_DISABLE_INPUT_RESAMPLING = 0x02, + + // specify that the input frequency should be set to the connected + // source frequency + SAMPLE_RATE_INPUT_ADAPTIVE = 0x04, + + // specify that the output frequency should be set to the connected + // sink frequency + SAMPLE_RATE_OUTPUT_ADAPTIVE = 0x08, }; @@ -607,11 +601,11 @@ class sound_stream friend class sound_manager; // private common constructopr - sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, u32 sample_rate, sound_stream_flags flags); + sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, const XTAL &sample_rate, u32 flags); public: // construction/destruction - sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, u32 sample_rate, stream_update_delegate callback, sound_stream_flags flags = STREAM_DEFAULT_FLAGS); + sound_stream(device_t &device, u32 inputs, u32 outputs, u32 output_base, const XTAL &sample_rate, stream_update_delegate callback, u32 flags = STREAM_DEFAULT_FLAGS); virtual ~sound_stream(); // simple getters @@ -631,13 +625,13 @@ public: sound_stream_output &output(int index) { sound_assert(index >= 0 && index < m_output.size()); return m_output[index]; } // sample rate and timing getters - u32 sample_rate() const { return (m_pending_sample_rate != SAMPLE_RATE_INVALID) ? m_pending_sample_rate : m_sample_rate; } + XTAL sample_rate() const { return m_pending_sample_rate.enabled() ? m_pending_sample_rate : m_sample_rate; } attotime sample_time() const { return m_output[0].end_time(); } attotime sample_period() const { return attotime(0, sample_period_attoseconds()); } - attoseconds_t sample_period_attoseconds() const { return (m_sample_rate != SAMPLE_RATE_INVALID) ? HZ_TO_ATTOSECONDS(m_sample_rate) : ATTOSECONDS_PER_SECOND; } + attoseconds_t sample_period_attoseconds() const { return m_sample_rate.enabled() ? HZ_TO_ATTOSECONDS(m_sample_rate.dvalue()) : ATTOSECONDS_PER_SECOND; } // set the sample rate of the stream; will kick in at the next global update - void set_sample_rate(u32 sample_rate); + void set_sample_rate(const XTAL &sample_rate); // connect the output 'outputnum' of given input_stream to this stream's input 'inputnum' void set_input(int inputnum, sound_stream *input_stream, int outputnum = 0, float gain = 1.0f); @@ -649,7 +643,7 @@ public: read_stream_view update_view(attotime start, attotime end, u32 outputnum = 0); // apply any pending sample rate changes; should only be called by the sound manager - void apply_sample_rate_changes(u32 updatenum, u32 downstream_rate); + void apply_sample_rate_changes(u32 updatenum, const XTAL &downstream_rate); #if (SOUND_DEBUG) // print one level of the sound graph and recursively tell our inputs to do the same @@ -662,7 +656,7 @@ protected: private: // perform most of the initialization here - void init_common(u32 inputs, u32 outputs, u32 sample_rate, sound_stream_flags flags); + void init_common(u32 inputs, u32 outputs, const XTAL &sample_rate, u32 flags); // if the sample rate has changed, this gets called to update internals void sample_rate_changed(); @@ -687,8 +681,8 @@ private: sound_stream *m_next; // next stream in the chain // general information - u32 m_sample_rate; // current live sample rate - u32 m_pending_sample_rate; // pending sample rate for dynamic changes + XTAL m_sample_rate; // current live sample rate + XTAL m_pending_sample_rate; // pending sample rate for dynamic changes u32 m_last_sample_rate_update; // update number of last sample rate change bool m_input_adaptive; // adaptive stream that runs at the sample rate of its input bool m_output_adaptive; // adaptive stream that runs at the sample rate of its output @@ -771,7 +765,7 @@ public: stream_buffer::sample_t compressor_scale() const { return m_compressor_scale; } // allocate a new stream with a new-style callback - sound_stream *stream_alloc(device_t &device, u32 inputs, u32 outputs, u32 sample_rate, stream_update_delegate callback, sound_stream_flags flags); + sound_stream *stream_alloc(device_t &device, u32 inputs, u32 outputs, const XTAL &sample_rate, stream_update_delegate callback, u32 flags); // WAV recording bool is_recording() const { return bool(m_wavfile); } diff --git a/src/emu/speaker.cpp b/src/emu/speaker.cpp index 3cbb14355a4..58792327ad1 100644 --- a/src/emu/speaker.cpp +++ b/src/emu/speaker.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(SPEAKER, speaker_device, "speaker", "Speaker") // speaker_device - constructor //------------------------------------------------- -speaker_device::speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +speaker_device::speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPEAKER, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_x(0.0) @@ -73,7 +73,7 @@ void speaker_device::mix(stream_buffer::sample_t *leftmix, stream_buffer::sample // track maximum sample value for each 0.1s bucket if (machine().options().speaker_report() != 0) { - u32 samples_per_bucket = m_mixer_stream->sample_rate() / BUCKETS_PER_SECOND; + u32 samples_per_bucket = m_mixer_stream->sample_rate().value() / BUCKETS_PER_SECOND; for (int sample = 0; sample < expected_samples; sample++) { m_current_max = std::max(m_current_max, fabsf(view.get(sample))); diff --git a/src/emu/speaker.h b/src/emu/speaker.h index 54aa00603c9..751ba29e566 100644 --- a/src/emu/speaker.h +++ b/src/emu/speaker.h @@ -46,11 +46,11 @@ class speaker_device : public device_t, public device_mixer_interface public: // construction/destruction speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, double x, double y, double z) - : speaker_device(mconfig, tag, owner, 0) + : speaker_device(mconfig, tag, owner) { set_position(x, y, z); } - speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~speaker_device(); // inline configuration helpers diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp index 5757f35341f..422aca9bbd6 100644 --- a/src/emu/tilemap.cpp +++ b/src/emu/tilemap.cpp @@ -1659,7 +1659,7 @@ DEFINE_DEVICE_TYPE(TILEMAP, tilemap_device, "tilemap", "Tilemap") // tilemap_device - constructor //------------------------------------------------- -tilemap_device::tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tilemap_device::tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TILEMAP, tag, owner, clock) , tilemap_t(static_cast(*this)) , m_gfxdecode(*this, finder_base::DUMMY_TAG) diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h index b6b2c566bfa..46ffe2a836b 100644 --- a/src/emu/tilemap.h +++ b/src/emu/tilemap.h @@ -669,7 +669,7 @@ public: template tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxtag, int entrybytes , u16 tilewidth, u16 tileheight, tilemap_standard_mapper mapper, u32 columns, u32 rows, pen_t transpen) - : tilemap_device(mconfig, tag, owner, (u32)0) + : tilemap_device(mconfig, tag, owner) { set_gfxdecode(std::forward(gfxtag)); set_bytes_per_entry(entrybytes); @@ -681,7 +681,7 @@ public: template tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxtag, int entrybytes , u16 tilewidth, u16 tileheight, tilemap_standard_mapper mapper, u32 columns, u32 rows) - : tilemap_device(mconfig, tag, owner, (u32)0) + : tilemap_device(mconfig, tag, owner) { set_gfxdecode(std::forward(gfxtag)); set_bytes_per_entry(entrybytes); @@ -691,14 +691,14 @@ public: template tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxtag, int entrybytes, u16 tilewidth, u16 tileheight) - : tilemap_device(mconfig, tag, owner, (u32)0) + : tilemap_device(mconfig, tag, owner) { set_gfxdecode(std::forward(gfxtag)); set_bytes_per_entry(entrybytes); set_tile_size(tilewidth, tileheight); } - tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_gfxdecode(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_bytes_per_entry(int bpe) { m_bytes_per_entry = bpe; } diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index 8fed2d6def0..6b23a8831d8 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -2656,7 +2656,7 @@ void validity_checker::validate_device_types() machine_config::token const tok(config.begin_configuration(config.root_device())); for (device_type type : registered_device_types) { - device_t *const dev = config.device_add(type.shortname(), type, 0); + device_t *const dev = config.device_add(type.shortname(), type); char const *name((dev->shortname() && *dev->shortname()) ? dev->shortname() : type.type().name()); std::string const description((dev->source() && *dev->source()) ? util::string_format("%s(%s)", core_filename_extract_base(dev->source()), name) : name); @@ -2696,7 +2696,7 @@ void validity_checker::validate_device_types() } else if (!devname.second) { - device_t *const dup = config.device_add("_dup", *devname.first->second, 0); + device_t *const dup = config.device_add("_dup", *devname.first->second); osd_printf_error("Device %s short name is a duplicate of %s(%s)\n", description, core_filename_extract_base(dup->source()), dup->shortname()); config.device_remove("_dup"); } @@ -2720,7 +2720,7 @@ void validity_checker::validate_device_types() } else if (!devdesc.second) { - device_t *const dup = config.device_add("_dup", *devdesc.first->second, 0); + device_t *const dup = config.device_add("_dup", *devdesc.first->second); osd_printf_error("Device %s name '%s' is a duplicate of %s(%s)\n", description, dev->name(), core_filename_extract_base(dup->source()), dup->shortname()); config.device_remove("_dup"); } diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index fc606c4f7db..5f9d661acf6 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -550,12 +550,18 @@ bool XTAL::validate(double base_clock) void XTAL::validate(const char *message) const { + if(!m_base_clock || m_disable_validation) + return; + if(!validate(m_base_clock)) fail(m_base_clock, message); } void XTAL::validate(const std::string &message) const { + if(!m_base_clock || m_disable_validation) + return; + if(!validate(m_base_clock)) fail(m_base_clock, message); } diff --git a/src/emu/xtal.h b/src/emu/xtal.h index b58f00943b2..700e75e730f 100644 --- a/src/emu/xtal.h +++ b/src/emu/xtal.h @@ -45,27 +45,47 @@ Usage: class XTAL { public: + constexpr explicit XTAL() : m_base_clock(0), m_current_clock(0), m_disable_validation(true) {} - constexpr explicit XTAL(double base_clock) : m_base_clock(base_clock), m_current_clock(base_clock) {} + constexpr explicit XTAL(double base_clock) : m_base_clock(base_clock), m_current_clock(base_clock), m_disable_validation(true) {} constexpr double dvalue() const noexcept { return m_current_clock; } constexpr u32 value() const noexcept { return u32(m_current_clock + 1e-3); } constexpr double base() const noexcept { return m_base_clock; } - template constexpr XTAL operator *(T &&mult) const noexcept { return XTAL(m_base_clock, m_current_clock * mult); } - template constexpr XTAL operator /(T &&div) const noexcept { return XTAL(m_base_clock, m_current_clock / div); } + template constexpr XTAL operator *(T &&mult) const noexcept { return XTAL(m_base_clock, m_current_clock * mult, m_disable_validation); } + template constexpr XTAL operator /(T &&div) const noexcept { return XTAL(m_base_clock, m_current_clock / div, m_disable_validation); } friend constexpr XTAL operator *(int mult, const XTAL &xtal); friend constexpr XTAL operator *(unsigned int mult, const XTAL &xtal); - friend constexpr XTAL operator *(double mult, const XTAL &xtal); + friend constexpr XTAL operator *(const XTAL &xtal, int mult); + friend constexpr XTAL operator *(const XTAL &xtal, unsigned int mult); + friend constexpr XTAL operator /(const XTAL &xtal, int div); + friend constexpr XTAL operator /(const XTAL &xtal, unsigned int div); + + static constexpr XTAL u(unsigned int clock); void validate(const char *message) const; void validate(const std::string &message) const; + bool disabled() const noexcept { return m_base_clock == 0; } + bool enabled() const noexcept { return m_base_clock != 0; } + + bool operator == (const XTAL &clock) const { + return clock.m_base_clock == m_base_clock && clock.m_current_clock == m_current_clock; + } + + bool operator != (const XTAL &clock) const { + return !(*this == clock); + } + + private: + friend class save_manager; double m_base_clock, m_current_clock; + bool m_disable_validation; - constexpr XTAL(double base_clock, double current_clock) noexcept : m_base_clock(base_clock), m_current_clock(current_clock) {} + constexpr XTAL(double base_clock, double current_clock, bool disable_validation) noexcept : m_base_clock(base_clock), m_current_clock(current_clock), m_disable_validation(disable_validation) {} static const double known_xtals[]; static double last_correct_value, xtal_error_low, xtal_error_high; @@ -76,9 +96,14 @@ private: template constexpr auto operator /(T &&div, const XTAL &xtal) { return div / xtal.dvalue(); } -constexpr XTAL operator *(int mult, const XTAL &xtal) { return XTAL(xtal.base(), mult * xtal.dvalue()); } -constexpr XTAL operator *(unsigned int mult, const XTAL &xtal) { return XTAL(xtal.base(), mult * xtal.dvalue()); } -constexpr XTAL operator *(double mult, const XTAL &xtal) { return XTAL(xtal.base(), mult * xtal.dvalue()); } +constexpr XTAL operator *(int mult, const XTAL &xtal) { return XTAL(xtal.base(), xtal.dvalue() * mult, xtal.m_disable_validation); } +constexpr XTAL operator *(unsigned int mult, const XTAL &xtal) { return XTAL(xtal.base(), xtal.dvalue() * mult, xtal.m_disable_validation); } +constexpr XTAL operator *(const XTAL &xtal, int mult) { return XTAL(xtal.base(), xtal.dvalue() * mult, xtal.m_disable_validation); } +constexpr XTAL operator *(const XTAL &xtal, unsigned int mult) { return XTAL(xtal.base(), xtal.dvalue() * mult, xtal.m_disable_validation); } +constexpr XTAL operator /(const XTAL &xtal, int div) { return XTAL(xtal.base(), xtal.dvalue() / div, xtal.m_disable_validation); } +constexpr XTAL operator /(const XTAL &xtal, unsigned int div) { return XTAL(xtal.base(), xtal.dvalue() / div, xtal.m_disable_validation); } + +constexpr XTAL XTAL::u(unsigned int clock) { return XTAL(clock, clock, true); } constexpr XTAL operator ""_Hz_XTAL(long double clock) { return XTAL(double(clock)); } constexpr XTAL operator ""_kHz_XTAL(long double clock) { return XTAL(double(clock * 1e3)); } diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp index dfe0436e079..3552eff559a 100644 --- a/src/frontend/mame/clifront.cpp +++ b/src/frontend/mame/clifront.cpp @@ -766,7 +766,7 @@ void cli_frontend::listdevices(const std::vector &args) printf(" %*s%-*s %s", depth * 2, "", 30 - depth * 2, tag, device->name()); // add more information - uint32_t clock = device->clock(); + uint32_t clock = device->clock().value(); if (clock >= 1000000000) printf(" @ %d.%02d GHz\n", clock / 1000000000, (clock / 10000000) % 100); else if (clock >= 1000000) @@ -974,7 +974,7 @@ void cli_frontend::verifyroms(const std::vector &args) if (included(type.shortname())) { // audit the ROMs in this set - device_t *const dev = config.device_add("_tmp", type, 0); + device_t *const dev = config.device_add("_tmp", type); media_auditor::summary summary = auditor.audit_device(*dev, AUDIT_VALIDATE_FAST); print_summary( @@ -1620,7 +1620,7 @@ template void cli_frontend::apply_device_action(const std::vector\n"; } } @@ -1188,8 +1188,8 @@ void output_chips(std::ostream &out, device_t &device, const char *root_tag) out << " type=\"audio\""; util::stream_format(out, " tag=\"%s\"", normalize_string(newtag)); util::stream_format(out, " name=\"%s\"", normalize_string(sound.device().name())); - if (sound.device().clock() != 0) - util::stream_format(out, " clock=\"%d\"", sound.device().clock()); + if (!sound.device().clock().disabled()) + util::stream_format(out, " clock=\"%d\"", sound.device().clock().value()); out << "/>\n"; } } @@ -2203,7 +2203,7 @@ char const *get_merge_name(machine_config &config, device_t const &device, util: { // instantiate the parent device machine_config::token const tok(config.begin_configuration(config.root_device())); - device_t *const parent = config.device_add("_parent", *parenttype, 0); + device_t *const parent = config.device_add("_parent", *parenttype); // look in the parent's ROMs result = get_merge_name(parent->rom_region(), romhashes); diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp index 386d6dc841d..d0a3a8ee141 100644 --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -1752,7 +1752,7 @@ void lua_engine::initialize() dislot_option_type["device_shortname"] = sol::property([] (device_slot_interface::slot_option &opt) { return opt.devtype().shortname(); }); dislot_option_type["selectable"] = sol::property(&device_slot_interface::slot_option::selectable); dislot_option_type["default_bios"] = sol::property(static_cast(&device_slot_interface::slot_option::default_bios)); - dislot_option_type["clock"] = sol::property(static_cast(&device_slot_interface::slot_option::clock)); + dislot_option_type["clock"] = sol::property([] (device_slot_interface::slot_option &opt) -> u32 { return opt.clock().value(); }); auto parameters_type = sol().registry().new_usertype("parameters", sol::no_constructor); diff --git a/src/frontend/mame/media_ident.cpp b/src/frontend/mame/media_ident.cpp index d09858198ea..e8e646924d9 100644 --- a/src/frontend/mame/media_ident.cpp +++ b/src/frontend/mame/media_ident.cpp @@ -389,7 +389,7 @@ void media_identifier::match_hashes(std::vector &info) machine_config::token const tok(config.begin_configuration(config.root_device())); for (device_type type : registered_device_types) { - match_device(*config.device_add("_tmp", type, 0)); + match_device(*config.device_add("_tmp", type)); config.device_remove("_tmp"); } } diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp index 1fc1e83564f..35d362aa354 100644 --- a/src/frontend/mame/ui/devopt.cpp +++ b/src/frontend/mame/ui/devopt.cpp @@ -50,7 +50,7 @@ void menu_device_config::populate_text(std::optional &layout, float machine_config &mconfig(const_cast(machine().config())); machine_config::token const tok(mconfig.begin_configuration(mconfig.root_device())); - device_t *const dev = mconfig.device_add(m_option->name(), m_option->devtype(), 0); + device_t *const dev = mconfig.device_add(m_option->name(), m_option->devtype()); for (device_t &d : device_enumerator(*dev)) if (!d.configured()) d.config_complete(); @@ -76,14 +76,14 @@ void menu_device_config::populate_text(std::optional &layout, float continue; // get cpu specific clock that takes internal multiplier/dividers into account - u32 clock = exec.device().clock(); + u32 clock = exec.device().clock().value(); // count how many identical CPUs we have int count = 1; const char *name = exec.device().name(); for (device_execute_interface &scan : execiter) { - if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock() == scan.device().clock()) + if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock().value() == scan.device().clock().value()) if (exectags.insert(scan.device().tag()).second) count++; } @@ -164,12 +164,12 @@ void menu_device_config::populate_text(std::optional &layout, float int count = 1; for (device_sound_interface &scan : snditer) { - if (sound.device().type() == scan.device().type() && sound.device().clock() == scan.device().clock()) + if (sound.device().type() == scan.device().type() && sound.device().clock().value() == scan.device().clock().value()) if (soundtags.insert(scan.device().tag()).second) count++; } - const u32 clock = sound.device().clock(); + const u32 clock = sound.device().clock().value(); std::string hz(std::to_string(clock)); int d = (clock >= 1'000'000'000) ? 9 : (clock >= 1'000'000) ? 6 : (clock >= 1000) ? 3 : 0; if (d > 0) diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index e2d1435b1ba..e9f4f272bd2 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -385,14 +385,14 @@ std::string machine_info::game_info_string() const if (!exectags.insert(exec.device().tag()).second) continue; // get cpu specific clock that takes internal multiplier/dividers into account - u32 clock = exec.device().clock(); + u32 clock = exec.device().clock().value(); // count how many identical CPUs we have int count = 1; const char *name = exec.device().name(); for (device_execute_interface &scan : execiter) { - if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock() == scan.device().clock()) + if (exec.device().type() == scan.device().type() && strcmp(name, scan.device().name()) == 0 && exec.device().clock().value() == scan.device().clock().value()) if (exectags.insert(scan.device().tag()).second) count++; } @@ -434,12 +434,12 @@ std::string machine_info::game_info_string() const int count = 1; for (device_sound_interface &scan : snditer) { - if (sound.device().type() == scan.device().type() && sound.device().clock() == scan.device().clock()) + if (sound.device().type() == scan.device().type() && sound.device().clock().value() == scan.device().clock().value()) if (soundtags.insert(scan.device().tag()).second) count++; } - const u32 clock = sound.device().clock(); + const u32 clock = sound.device().clock().value(); std::string hz(std::to_string(clock)); int d = (clock >= 1'000'000'000) ? 9 : (clock >= 1'000'000) ? 6 : (clock >= 1000) ? 3 : 0; if (d > 0) diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 878e175d22a..a6b7c09a010 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -1499,7 +1499,7 @@ std::vector mame_ui_manager::slider_init(running_machine &machine for (device_sound_interface &snd : sound_interface_enumerator(machine.root_device())) { device_execute_interface *exec; - if (!snd.device().interface(exec) && snd.device().unscaled_clock() != 0) + if (!snd.device().interface(exec) && !snd.device().unscaled_clock().disabled()) { std::string str = string_format(_("Overclock %1$s sound"), snd.device().tag()); slider_alloc(std::move(str), 100, 1000, 4000, 10, std::bind(&mame_ui_manager::slider_overclock, this, std::ref(snd.device()), _1, _2)); diff --git a/src/mame/acorn/aa310.cpp b/src/mame/acorn/aa310.cpp index a14cfe7ac2c..6f03fc68227 100644 --- a/src/mame/acorn/aa310.cpp +++ b/src/mame/acorn/aa310.cpp @@ -1128,12 +1128,12 @@ void aa500_state::aa500(machine_config &config) m_adlc->out_irq_cb().set(m_ioc, FUNC(acorn_ioc_device::fl_w)); //m_adlc->out_rts_cb(). - econet_device &econet(ECONET(config, "network", 0)); + econet_device &econet(ECONET(config, "network")); econet.clk_wr_callback().set(m_adlc, FUNC(mc6854_device::txc_w)); econet.clk_wr_callback().append(m_adlc, FUNC(mc6854_device::rxc_w)); econet.data_wr_callback().set(m_adlc, FUNC(mc6854_device::set_rx)); - mos6551_device &acia(MOS6551(config, "acia", 0)); + mos6551_device &acia(MOS6551(config, "acia")); acia.set_xtal(1.8432_MHz_XTAL); acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); acia.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -1213,7 +1213,7 @@ void aa310_state::aa310(machine_config &config) OUTPUT_LATCH(config, m_cent_data_out); m_centronics->set_output_latch(*m_cent_data_out); - mos6551_device &acia(MOS6551(config, "acia", 0)); + mos6551_device &acia(MOS6551(config, "acia")); acia.set_xtal(1.8432_MHz_XTAL); acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); acia.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -1491,7 +1491,7 @@ void aa4000_state::aa3010(machine_config &config) PCF8583(config, m_i2cmem, 32.768_kHz_XTAL); - DS2401(config, "idrom", 0); // DS2400 + DS2401(config, "idrom"); // DS2400 upc82c711_device &upc(UPC82C711(config, "upc", 24_MHz_XTAL)); upc.irq4().set(m_ioc, FUNC(acorn_ioc_device::il2_w)); @@ -1575,7 +1575,7 @@ void aa5000_state::aa5000(machine_config &config) PCF8583(config, "i2cmem", 32.768_kHz_XTAL); - DS2401(config, "idrom", 0); // DS2400 + DS2401(config, "idrom"); // DS2400 upc82c710_device &upc(UPC82C710(config, "upc", 24_MHz_XTAL)); upc.sintr().set(m_ioc, FUNC(acorn_ioc_device::il2_w)); diff --git a/src/mame/acorn/accomm.cpp b/src/mame/acorn/accomm.cpp index 14bb28621ae..ccee5540506 100644 --- a/src/mame/acorn/accomm.cpp +++ b/src/mame/acorn/accomm.cpp @@ -915,7 +915,7 @@ void accomm_state::accomm(machine_config &config) /* sound */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(300)).add_route(ALL_OUTPUTS, "mono", 1.00); /* rtc */ PCF8573(config, m_rtc, 32.768_kHz_XTAL); @@ -949,7 +949,7 @@ void accomm_state::accomm(machine_config &config) rs423.cts_handler().set(m_scn2641, FUNC(scn2641_device::cts_w)); /* modem */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("modem", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("modem", FUNC(rs232_port_device::write_rts)); m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<2>)); @@ -970,7 +970,7 @@ void accomm_state::accomm(machine_config &config) m_adlc->out_txd_cb().set("econet", FUNC(econet_device::host_data_w)); m_adlc->out_irq_cb().set_inputline(m_maincpu, G65816_LINE_NMI); - econet_device &econet(ECONET(config, "econet", 0)); + econet_device &econet(ECONET(config, "econet")); econet.clk_wr_callback().set(m_adlc, FUNC(mc6854_device::txc_w)); econet.clk_wr_callback().append(m_adlc, FUNC(mc6854_device::rxc_w)); econet.data_wr_callback().set(m_adlc, FUNC(mc6854_device::set_rx)); diff --git a/src/mame/acorn/acrnsys.cpp b/src/mame/acorn/acrnsys.cpp index 07779589a20..04e9a261ea8 100644 --- a/src/mame/acorn/acrnsys.cpp +++ b/src/mame/acorn/acrnsys.cpp @@ -374,7 +374,7 @@ void acrnsys_state::a6502(machine_config &config) //m_ins8154->out_a().set(FUNC(acrnsys_state::ins8154_pa_w)); m_ins8154->in_b().set(FUNC(acrnsys_state::kbd_r)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(acrnsys_state::kbd_put)); } @@ -395,7 +395,7 @@ void acrnsys_state::a6502a(machine_config &config) //m_via6522->cb2_handler().set(FUNC(acrnsys_state::cass_w)); m_via6522->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(acrnsys_state::kbd_put)); } @@ -423,7 +423,7 @@ void acrnsys_state::a6809(machine_config &config) output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(latch); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(acrnsys_state::kbd_put_pb)); } @@ -461,7 +461,7 @@ void acrnsys_state::acrnsys2(machine_config &config) a6502(config); /* Acorn Bus - 8 Slot Backplane */ - ACORN_BUS(config, m_bus, 0); + ACORN_BUS(config, m_bus); m_bus->set_space(m_maincpu, AS_PROGRAM); m_bus->out_irq_callback().set(m_irqs, FUNC(input_merger_device::in_w<1>)); m_bus->out_nmi_callback().set(FUNC(acrnsys_state::bus_nmi_w)); @@ -485,7 +485,7 @@ void acrnsys_state::acrnsys3(machine_config &config) a6502(config); /* Acorn Bus - 8 Slot Backplane */ - ACORN_BUS(config, m_bus, 0); + ACORN_BUS(config, m_bus); m_bus->set_space(m_maincpu, AS_PROGRAM); m_bus->out_irq_callback().set(m_irqs, FUNC(input_merger_device::in_w<1>)); m_bus->out_nmi_callback().set(FUNC(acrnsys_state::bus_nmi_w)); @@ -509,7 +509,7 @@ void acrnsys_state::acrnsys3_6809(machine_config &config) a6809(config); /* Acorn Bus - 8 Slot Backplane */ - ACORN_BUS(config, m_bus, 0); + ACORN_BUS(config, m_bus); m_bus->set_space(m_maincpu, AS_PROGRAM); m_bus->out_irq_callback().set(m_irqs, FUNC(input_merger_device::in_w<1>)); m_bus->out_nmi_callback().set(FUNC(acrnsys_state::bus_nmi_w)); @@ -532,7 +532,7 @@ void acrnsys_state::acrnsys4(machine_config &config) a6502(config); /* Acorn Bus - 14 Slot Backplane */ - ACORN_BUS(config, m_bus, 0); + ACORN_BUS(config, m_bus); m_bus->set_space(m_maincpu, AS_PROGRAM); m_bus->out_irq_callback().set(m_irqs, FUNC(input_merger_device::in_w<1>)); m_bus->out_nmi_callback().set(FUNC(acrnsys_state::bus_nmi_w)); @@ -562,7 +562,7 @@ void acrnsys_state::acrnsys5(machine_config &config) a6502a(config); /* Acorn Bus - 7 Slot Backplane */ - ACORN_BUS(config, m_bus, 0); + ACORN_BUS(config, m_bus); m_bus->set_space(m_maincpu, AS_PROGRAM); m_bus->out_irq_callback().set(m_irqs, FUNC(input_merger_device::in_w<1>)); m_bus->out_nmi_callback().set(FUNC(acrnsys_state::bus_nmi_w)); diff --git a/src/mame/acorn/acrnsys1.cpp b/src/mame/acorn/acrnsys1.cpp index af84fb30161..24b02857c83 100644 --- a/src/mame/acorn/acrnsys1.cpp +++ b/src/mame/acorn/acrnsys1.cpp @@ -280,7 +280,7 @@ void acrnsys1_state::acrnsys1(machine_config &config) b1.out_a().set(FUNC(acrnsys1_state::ins8154_b1_port_a_w)); b1.out_b().set(FUNC(acrnsys1_state::acrnsys1_led_segment_w)); - TTL74145(config, m_ttl74145, 0); + TTL74145(config, m_ttl74145); CASSETTE(config, m_cass); m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); diff --git a/src/mame/acorn/aristmk5.cpp b/src/mame/acorn/aristmk5.cpp index 5c699ed4155..54dab5c7d5b 100644 --- a/src/mame/acorn/aristmk5.cpp +++ b/src/mame/acorn/aristmk5.cpp @@ -2390,7 +2390,7 @@ void aristmk5_state::aristmk5_touch(machine_config &config) aristmk5(config); subdevice("uart_0a")->out_tx_callback().set("microtouch", FUNC(microtouch_device::rx)); - microtouch_device µtouch(MICROTOUCH(config, "microtouch", 2400)); + microtouch_device µtouch(MICROTOUCH(config, "microtouch", XTAL::u(2400))); microtouch.stx().set("uart_0a", FUNC(ins8250_uart_device::rx_w)); } @@ -2405,7 +2405,7 @@ void aristmk5_state::aristmk5_usa_touch(machine_config &config) aristmk5_usa(config); subdevice("uart_0a")->out_tx_callback().set("microtouch", FUNC(microtouch_device::rx)); - microtouch_device µtouch(MICROTOUCH(config, "microtouch", 2400)); + microtouch_device µtouch(MICROTOUCH(config, "microtouch", XTAL::u(2400))); microtouch.stx().set("uart_0a", FUNC(ins8250_uart_device::rx_w)); } diff --git a/src/mame/acorn/atom.cpp b/src/mame/acorn/atom.cpp index 59e2dc01809..3a1639585b5 100644 --- a/src/mame/acorn/atom.cpp +++ b/src/mame/acorn/atom.cpp @@ -760,7 +760,7 @@ void atom_state::atom(machine_config &config) atom_common(config); m_maincpu->set_addrmap(AS_PROGRAM, &atom_state::atom_mem); - I8271(config, m_fdc, 0); + I8271(config, m_fdc); m_fdc->intrq_wr_callback().set(FUNC(atom_state::atom_8271_interrupt_callback)); m_fdc->hdl_wr_callback().set(FUNC(atom_state::motor_w)); FLOPPY_CONNECTOR(config, I8271_TAG ":0", atom_floppies, "525sssd", atom_state::floppy_formats).enable_sound(true); diff --git a/src/mame/acorn/bbc.cpp b/src/mame/acorn/bbc.cpp index fd2d4ea22dc..391bb11099e 100644 --- a/src/mame/acorn/bbc.cpp +++ b/src/mame/acorn/bbc.cpp @@ -1154,7 +1154,7 @@ void bbc_state::bbca(machine_config &config) m_cassette->set_interface("bbc_cass"); /* acia */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set(FUNC(bbc_state::write_txd)); m_acia->rts_handler().set(FUNC(bbc_state::write_rts)); m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); @@ -1201,8 +1201,8 @@ void bbc_state::bbcb(machine_config &config) m_ram->set_default_size("32K"); /* speech hardware */ - SPEECHROM(config, "vsm", 0); - TMS5220(config, m_tms, 640000); + SPEECHROM(config, "vsm"); + TMS5220(config, m_tms, XTAL::u(640000)); m_tms->set_speechrom_tag("vsm"); m_tms->add_route(ALL_OUTPUTS, "mono", 1.0); @@ -1238,7 +1238,7 @@ void bbc_state::bbcb(machine_config &config) m_adlc->out_txd_cb().set("econet", FUNC(econet_device::host_data_w)); m_adlc->out_irq_cb().set(FUNC(bbc_state::adlc_irq_w)); - econet_device &econet(ECONET(config, "econet", 0)); + econet_device &econet(ECONET(config, "econet")); econet.clk_wr_callback().set(m_adlc, FUNC(mc6854_device::txc_w)); econet.clk_wr_callback().append(m_adlc, FUNC(mc6854_device::rxc_w)); econet.data_wr_callback().set(m_adlc, FUNC(mc6854_device::set_rx)); @@ -1696,7 +1696,7 @@ void bbcm_state::bbcm(machine_config &config) m_cassette->set_interface("bbc_cass"); /* acia */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set(FUNC(bbc_state::write_txd)); m_acia->rts_handler().set(FUNC(bbc_state::write_rts)); m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); @@ -1746,7 +1746,7 @@ void bbcm_state::bbcm(machine_config &config) m_adlc->out_txd_cb().set("econet", FUNC(econet_device::host_data_w)); m_adlc->out_irq_cb().set(FUNC(bbc_state::adlc_irq_w)); - econet_device &econet(ECONET(config, "econet", 0)); + econet_device &econet(ECONET(config, "econet")); econet.clk_wr_callback().set(m_adlc, FUNC(mc6854_device::txc_w)); econet.clk_wr_callback().append(m_adlc, FUNC(mc6854_device::rxc_w)); econet.data_wr_callback().set(m_adlc, FUNC(mc6854_device::set_rx)); @@ -2045,7 +2045,7 @@ void bbcm_state::bbcmc(machine_config &config) FLOPPY_CONNECTOR(config, "wd_fdc:0", bbc_floppies, "35dd", bbc_state::floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "wd_fdc:1", bbc_floppies, "35dd", bbc_state::floppy_formats).enable_sound(true); - I2C_PCD8572(config, "i2cmem", 0); + I2C_PCD8572(config, "i2cmem"); config.device_remove("rtc"); /* user via */ diff --git a/src/mame/acorn/cms.cpp b/src/mame/acorn/cms.cpp index 8c9b5389276..5a94d428a04 100644 --- a/src/mame/acorn/cms.cpp +++ b/src/mame/acorn/cms.cpp @@ -169,7 +169,7 @@ void cms_state::cms6502(machine_config &config) M3002(config, "rtc", 32.768_kHz_XTAL); /* 7 Slot Backplane */ - ACORN_BUS(config, m_bus, 0); + ACORN_BUS(config, m_bus); m_bus->set_space(m_maincpu, AS_PROGRAM); m_bus->out_irq_callback().set(m_irqs, FUNC(input_merger_device::in_w<1>)); m_bus->out_nmi_callback().set(FUNC(cms_state::bus_nmi_w)); diff --git a/src/mame/acorn/electron.cpp b/src/mame/acorn/electron.cpp index 3cecb7ef5a7..0eb316ca1c8 100644 --- a/src/mame/acorn/electron.cpp +++ b/src/mame/acorn/electron.cpp @@ -261,7 +261,7 @@ void electron_state::electron(machine_config &config) PALETTE(config, "palette", FUNC(electron_state::electron_colours), 8); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(300)).add_route(ALL_OUTPUTS, "mono", 1.00); RAM(config, m_ram).set_default_size("32K"); diff --git a/src/mame/acorn/upd65031.cpp b/src/mame/acorn/upd65031.cpp index 9811769901d..228c9cf56da 100644 --- a/src/mame/acorn/upd65031.cpp +++ b/src/mame/acorn/upd65031.cpp @@ -265,7 +265,7 @@ inline void upd65031_device::set_mode(int mode) // upd65031_device - constructor //------------------------------------------------- -upd65031_device::upd65031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +upd65031_device::upd65031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD65031, tag, owner, clock), device_serial_interface(mconfig, *this), m_read_kb(*this), @@ -370,7 +370,7 @@ void upd65031_device::device_reset() } set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rate(9600); + set_rate(XTAL::u(9600)); transmit_register_reset(); receive_register_reset(); m_write_rts(1); diff --git a/src/mame/acorn/upd65031.h b/src/mame/acorn/upd65031.h index 427ba877408..f0fd1778d21 100644 --- a/src/mame/acorn/upd65031.h +++ b/src/mame/acorn/upd65031.h @@ -31,7 +31,7 @@ public: typedef device_delegate memory_update_delegate; // construction/destruction - upd65031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd65031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto kb_rd_callback() { return m_read_kb.bind(); } auto int_wr_callback() { return m_write_int.bind(); } diff --git a/src/mame/acorn/z88_impexp.cpp b/src/mame/acorn/z88_impexp.cpp index fbbdf8f80ad..5eae9ac088b 100644 --- a/src/mame/acorn/z88_impexp.cpp +++ b/src/mame/acorn/z88_impexp.cpp @@ -28,12 +28,12 @@ #include "emu.h" #include "z88_impexp.h" -static constexpr uint32_t Z88_RS232_BAUD = 9600; +static constexpr XTAL Z88_RS232_BAUD = XTAL::u(9600); // device type definition DEFINE_DEVICE_TYPE(Z88_IMPEXP, z88_impexp_device, "z88_impexp", "Z88 Imp-Export protocol"); -z88_impexp_device::z88_impexp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z88_impexp_device::z88_impexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z88_IMPEXP, tag, owner, clock) , device_serial_interface(mconfig, *this) , device_rs232_port_interface(mconfig, *this) diff --git a/src/mame/acorn/z88_impexp.h b/src/mame/acorn/z88_impexp.h index c73bc04a041..a809415102b 100644 --- a/src/mame/acorn/z88_impexp.h +++ b/src/mame/acorn/z88_impexp.h @@ -18,7 +18,7 @@ class z88_impexp_device : public device_t, public device_image_interface { public: - z88_impexp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z88_impexp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual WRITE_LINE_MEMBER( input_txd ) override { device_serial_interface::rx_w(state); } virtual WRITE_LINE_MEMBER( input_rts ) override; diff --git a/src/mame/act/apricot.cpp b/src/mame/act/apricot.cpp index cd0c37653f7..ac17a30dff5 100644 --- a/src/mame/act/apricot.cpp +++ b/src/mame/act/apricot.cpp @@ -406,17 +406,17 @@ void apricot_state::apricot(machine_config &config) SN76489(config, "ic7", 4_MHz_XTAL / 2).add_route(ALL_OUTPUTS, "mono", 1.0); // devices - I8255A(config, m_ppi, 0); + I8255A(config, m_ppi); m_ppi->in_pa_callback().set("cent_data_in", FUNC(input_buffer_device::read)); m_ppi->out_pa_callback().set("cent_data_out", FUNC(output_latch_device::write)); m_ppi->out_pb_callback().set(FUNC(apricot_state::i8255_portb_w)); m_ppi->in_pc_callback().set(FUNC(apricot_state::i8255_portc_r)); m_ppi->out_pc_callback().set(FUNC(apricot_state::i8255_portc_w)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_cpu, 0); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(4_MHz_XTAL / 16); m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir6_w)); m_pit->set_clk<1>(4_MHz_XTAL / 2); @@ -478,7 +478,7 @@ void apricot_state::apricot(machine_config &config) SOFTWARE_LIST(config, "flop_list").set_original("apricot_flop"); // expansion bus - APRICOT_EXPANSION_BUS(config, m_exp, 0); + APRICOT_EXPANSION_BUS(config, m_exp); m_exp->set_program_space(m_cpu, AS_PROGRAM); m_exp->set_io_space(m_cpu, AS_IO); m_exp->set_program_iop_space(m_iop, AS_PROGRAM); diff --git a/src/mame/act/apricotf.cpp b/src/mame/act/apricotf.cpp index 1785799f91d..d4127de3a80 100644 --- a/src/mame/act/apricotf.cpp +++ b/src/mame/act/apricotf.cpp @@ -55,7 +55,7 @@ class f1_daisy_device : public device_t, public z80_daisy_chain_interface { public: - f1_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + f1_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); IRQ_CALLBACK_MEMBER(inta_cb); @@ -349,7 +349,7 @@ void apricotf_floppies(device_slot_interface &device) DEFINE_DEVICE_TYPE(F1_DAISY, f1_daisy_device, "f1_daisy", "F1 daisy chain abstraction") -f1_daisy_device::f1_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +f1_daisy_device::f1_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, F1_DAISY, tag, owner, clock) , z80_daisy_chain_interface(mconfig, *this) { @@ -409,12 +409,12 @@ void f1_state::act_f1(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfx_act_f1); /* Devices */ - APRICOT_KEYBOARD(config, APRICOT_KEYBOARD_TAG, 0); + APRICOT_KEYBOARD(config, APRICOT_KEYBOARD_TAG); - Z80SIO(config, m_sio, 2500000); + Z80SIO(config, m_sio, XTAL::u(2500000)); m_sio->out_int_callback().set("irqs", FUNC(input_merger_device::in_w<0>)); - Z80CTC(config, m_ctc, 2500000); + Z80CTC(config, m_ctc, XTAL::u(2500000)); m_ctc->intr_callback().set("irqs", FUNC(input_merger_device::in_w<1>)); m_ctc->zc_callback<1>().set(FUNC(f1_state::ctc_z1_w)); m_ctc->zc_callback<2>().set(FUNC(f1_state::ctc_z2_w)); diff --git a/src/mame/act/apricotkb.cpp b/src/mame/act/apricotkb.cpp index 383fa1fe07b..d5b72921fbd 100644 --- a/src/mame/act/apricotkb.cpp +++ b/src/mame/act/apricotkb.cpp @@ -237,7 +237,7 @@ ioport_constructor apricot_keyboard_device::device_input_ports() const // apricot_keyboard_device - constructor //------------------------------------------------- -apricot_keyboard_device::apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apricot_keyboard_device::apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APRICOT_KEYBOARD, tag, owner, clock), m_write_txd(*this), m_y(*this, "Y%u", 0), diff --git a/src/mame/act/apricotkb.h b/src/mame/act/apricotkb.h index e9a9d401ef0..bfa029cf88c 100644 --- a/src/mame/act/apricotkb.h +++ b/src/mame/act/apricotkb.h @@ -31,7 +31,7 @@ class apricot_keyboard_device : public device_t { public: // construction/destruction - apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto txd_wr_callback() { return m_write_txd.bind(); } diff --git a/src/mame/act/apricotp.cpp b/src/mame/act/apricotp.cpp index c40cdcb0a7a..bd1c9316b3c 100644 --- a/src/mame/act/apricotp.cpp +++ b/src/mame/act/apricotp.cpp @@ -573,7 +573,7 @@ void fp_state::fp(machine_config &config) m_maincpu->set_addrmap(AS_IO, &fp_state::fp_io); m_maincpu->set_irq_acknowledge_callback(I8259A_TAG, FUNC(pic8259_device::inta_cb)); - HD6301V1(config, m_soundcpu, 2000000); + HD6301V1(config, m_soundcpu, XTAL::u(2000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &fp_state::sound_mem); m_soundcpu->set_disable(); @@ -598,7 +598,7 @@ void fp_state::fp(machine_config &config) PALETTE(config, "palette").set_entries(16); GFXDECODE(config, "gfxdecode", "palette", gfx_act_f1); - MC6845(config, m_crtc, 4000000); + MC6845(config, m_crtc, XTAL::u(4000000)); m_crtc->set_screen(SCREEN_CRT_TAG); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); @@ -606,29 +606,29 @@ void fp_state::fp(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76489A(config, SN76489AN_TAG, 2000000).add_route(ALL_OUTPUTS, "mono", 1.00); + SN76489A(config, SN76489AN_TAG, XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 1.00); /* Devices */ - APRICOT_KEYBOARD(config, APRICOT_KEYBOARD_TAG, 0); + APRICOT_KEYBOARD(config, APRICOT_KEYBOARD_TAG); - AM9517A(config, m_dmac, 250000); + AM9517A(config, m_dmac, XTAL::u(250000)); m_dmac->out_eop_callback().set(m_pic, FUNC(pic8259_device::ir7_w)); m_dmac->in_ior_callback<1>().set(m_fdc, FUNC(wd2797_device::data_r)); m_dmac->out_iow_callback<1>().set(m_fdc, FUNC(wd2797_device::data_w)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(2000000); m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir0_w)); m_pit->set_clk<1>(2000000); m_pit->set_clk<2>(2000000); - Z80SIO(config, m_sio, 2500000); + Z80SIO(config, m_sio, XTAL::u(2500000)); m_sio->out_int_callback().set(m_pic, FUNC(pic8259_device::ir4_w)); - WD2797(config, m_fdc, 2000000); + WD2797(config, m_fdc, XTAL::u(2000000)); m_fdc->intrq_wr_callback().set(m_pic, FUNC(pic8259_device::ir1_w)); m_fdc->drq_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq1_w)); diff --git a/src/mame/act/apxen.cpp b/src/mame/act/apxen.cpp index 4a0604d019b..c4e30a0fcfc 100644 --- a/src/mame/act/apxen.cpp +++ b/src/mame/act/apxen.cpp @@ -60,7 +60,7 @@ class xen_daisy_device : public device_t, public z80_daisy_chain_interface { public: - xen_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + xen_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t acknowledge(); IRQ_CALLBACK_MEMBER(inta_cb); @@ -71,7 +71,7 @@ protected: DEFINE_DEVICE_TYPE(XEN_DAISY, xen_daisy_device, "xen_daisy", "Apricot XEN daisy chain abstraction") -xen_daisy_device::xen_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +xen_daisy_device::xen_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XEN_DAISY, tag, owner, clock) , z80_daisy_chain_interface(mconfig, *this) { @@ -481,9 +481,9 @@ void apxen_state::apxen(machine_config &config) m_io->set_addr_width(16); m_io->set_endianness(ENDIANNESS_LITTLE); - UPD71071(config, m_dmac, 8000000); + UPD71071(config, m_dmac, XTAL::u(8000000)); m_dmac->set_cpu_tag("maincpu"); - m_dmac->set_clock(8000000); + m_dmac->set_clock(XTAL::u(8000000)); m_dmac->out_eop_callback().set(m_pic[1], FUNC(pic8259_device::ir2_w)); m_dmac->dma_read_callback<1>().set(m_fdc, FUNC(wd2797_device::data_r)); m_dmac->dma_write_callback<1>().set(m_fdc, FUNC(wd2797_device::data_w)); @@ -491,19 +491,19 @@ void apxen_state::apxen(machine_config &config) EEPROM_93C06_16BIT(config, m_eeprom); // NMC9306 m_eeprom->do_callback().set(m_sio, FUNC(z80sio_device::ctsb_w)); - PIC8259(config, m_pic[0], 0); + PIC8259(config, m_pic[0]); m_pic[0]->out_int_callback().set_inputline(m_maincpu, 0); m_pic[0]->in_sp_callback().set_constant(1); m_pic[0]->read_slave_ack_callback().set(FUNC(apxen_state::get_slave_ack)); - PIC8259(config, m_pic[1], 0); + PIC8259(config, m_pic[1]); m_pic[1]->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir2_w)); m_pic[1]->in_sp_callback().set_constant(0); XEN_DAISY(config, m_daisy); m_daisy->set_daisy_config(xen_daisy_chain); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(2000000); m_pit->out_handler<0>().set(m_sio, FUNC(z80sio_device::rxca_w)); m_pit->set_clk<1>(2000000); @@ -513,14 +513,14 @@ void apxen_state::apxen(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "z80int").output_handler().set(m_pic[0], FUNC(pic8259_device::ir1_w)); - Z8536(config, m_cio, 4000000); + Z8536(config, m_cio, XTAL::u(4000000)); m_cio->irq_wr_cb().set("z80int", FUNC(input_merger_device::in_w<0>)); m_cio->pa_rd_cb().set(FUNC(apxen_state::cio_porta_r)); m_cio->pa_wr_cb().set(FUNC(apxen_state::cio_porta_w)); m_cio->pb_wr_cb().set(FUNC(apxen_state::cio_portb_w)); m_cio->pc_wr_cb().set(FUNC(apxen_state::cio_portc_w)); - Z80SIO(config, m_sio, 4000000); + Z80SIO(config, m_sio, XTAL::u(4000000)); m_sio->out_int_callback().set("z80int", FUNC(input_merger_device::in_w<1>)); // channel a: rs232 m_sio->out_txdb_callback().set("kbd", FUNC(apricot_keyboard_bus_device::out_w)); @@ -530,7 +530,7 @@ void apxen_state::apxen(machine_config &config) MM58274C(config, "rtc", 32.768_kHz_XTAL); // floppy - WD2797(config, m_fdc, 2000000); + WD2797(config, m_fdc, XTAL::u(2000000)); m_fdc->intrq_wr_callback().set(m_pic[1], FUNC(pic8259_device::ir1_w)); m_fdc->drq_wr_callback().set([this](int state) { m_dmac->dmarq(state, 1); }); FLOPPY_CONNECTOR(config, "fdc:0", apricot_floppies, "d32w", apxen_state::floppy_formats); @@ -544,7 +544,7 @@ void apxen_state::apxen(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76489(config, "sn", 2000000).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 1.0); // keyboard APRICOT_KEYBOARD_INTERFACE(config, "kbd", apricot_keyboard_devices, "hle").in_handler().set(m_sio, FUNC(z80sio_device::rxb_w)); diff --git a/src/mame/act/victor9k.cpp b/src/mame/act/victor9k.cpp index f990dc2c379..f71b32354f3 100644 --- a/src/mame/act/victor9k.cpp +++ b/src/mame/act/victor9k.cpp @@ -734,12 +734,12 @@ void victor9k_state::victor9k(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - HC55516(config, m_cvsd, 0); + HC55516(config, m_cvsd); //MCFG_HC55516_DIG_OUT_CB(WRITELINE(MC6852_TAG, mc6852_device, rx_w)) m_cvsd->add_route(ALL_OUTPUTS, "mono", 0.25); // devices - IEEE488(config, m_ieee488, 0); + IEEE488(config, m_ieee488); m_ieee488->dav_callback().set(M6522_1_TAG, FUNC(via6522_device::write_pb0)); m_ieee488->eoi_callback().set(M6522_1_TAG, FUNC(via6522_device::write_pb1)); @@ -750,10 +750,10 @@ void victor9k_state::victor9k(machine_config &config) m_ieee488->nrfd_callback().set(FUNC(victor9k_state::write_nfrd)); m_ieee488->ndac_callback().set(FUNC(victor9k_state::write_ndac)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - pit8253_device &pit(PIT8253(config, I8253_TAG, 0)); + pit8253_device &pit(PIT8253(config, I8253_TAG)); pit.set_clk<0>(2500000); pit.out_handler<0>().set(FUNC(victor9k_state::mux_serial_b_w)); pit.set_clk<1>(2500000); @@ -810,11 +810,11 @@ void victor9k_state::victor9k(machine_config &config) m_rs232b->cts_handler().set(m_upd7201, FUNC(upd7201_device::ctsb_w)); m_rs232b->dsr_handler().set(m_via2, FUNC(via6522_device::write_pa5)); - VICTOR9K_KEYBOARD(config, m_kb, 0); + VICTOR9K_KEYBOARD(config, m_kb); m_kb->kbrdy_handler().set(FUNC(victor9k_state::kbrdy_w)); m_kb->kbdata_handler().set(FUNC(victor9k_state::kbdata_w)); - VICTOR_9000_FDC(config, m_fdc, 0); + VICTOR_9000_FDC(config, m_fdc); m_fdc->irq_wr_callback().set(FUNC(victor9k_state::fdc_irq_w)); m_fdc->syn_wr_callback().set(I8259A_TAG, FUNC(pic8259_device::ir0_w)).invert(); m_fdc->lbrdy_wr_callback().set_inputline(I8088_TAG, INPUT_LINE_TEST).invert(); diff --git a/src/mame/act/victor9k_fdc.cpp b/src/mame/act/victor9k_fdc.cpp index 430fb511949..5fbcdf8bc0f 100644 --- a/src/mame/act/victor9k_fdc.cpp +++ b/src/mame/act/victor9k_fdc.cpp @@ -122,7 +122,7 @@ const tiny_rom_entry *victor_9000_fdc_device::device_rom_region() const void victor_9000_fdc_device::add_floppy_drive(machine_config &config, const char *_tag) { - floppy_connector &connector(FLOPPY_CONNECTOR(config, _tag, 0)); + floppy_connector &connector(FLOPPY_CONNECTOR(config, _tag)); connector.option_add("525ssqd", FLOPPY_525_SSQD); // Tandon TM100-3 with custom electronics connector.option_add("525qd", FLOPPY_525_QD); // Tandon TM100-4 with custom electronics connector.set_default_option("525qd"); @@ -212,7 +212,7 @@ void victor_9000_fdc_device::device_add_mconfig(machine_config &config) // victor_9000_fdc_device - constructor //------------------------------------------------- -victor_9000_fdc_device::victor_9000_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +victor_9000_fdc_device::victor_9000_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VICTOR_9000_FDC, tag, owner, clock), m_irq_cb(*this), m_syn_cb(*this), diff --git a/src/mame/act/victor9k_fdc.h b/src/mame/act/victor9k_fdc.h index 6f91f426d48..cf08773c410 100644 --- a/src/mame/act/victor9k_fdc.h +++ b/src/mame/act/victor9k_fdc.h @@ -29,7 +29,7 @@ class victor_9000_fdc_device : public device_t { public: // construction/destruction - victor_9000_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + victor_9000_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_wr_callback() { return m_irq_cb.bind(); } auto syn_wr_callback() { return m_syn_cb.bind(); } diff --git a/src/mame/act/victor9k_kb.cpp b/src/mame/act/victor9k_kb.cpp index 42c319c642a..dc9680866de 100644 --- a/src/mame/act/victor9k_kb.cpp +++ b/src/mame/act/victor9k_kb.cpp @@ -549,7 +549,7 @@ ioport_constructor victor_9000_keyboard_device::device_input_ports() const // victor_9000_keyboard_device - constructor //------------------------------------------------- -victor_9000_keyboard_device::victor_9000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +victor_9000_keyboard_device::victor_9000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VICTOR9K_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8021_TAG), m_y(*this, "Y%u", 0), diff --git a/src/mame/act/victor9k_kb.h b/src/mame/act/victor9k_kb.h index ae5c614c95e..78bbdda6c44 100644 --- a/src/mame/act/victor9k_kb.h +++ b/src/mame/act/victor9k_kb.h @@ -26,7 +26,7 @@ class victor_9000_keyboard_device : public device_t { public: // construction/destruction - victor_9000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + victor_9000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto kbrdy_handler() { return m_kbrdy_cb.bind(); } auto kbdata_handler() { return m_kbdata_cb.bind(); } diff --git a/src/mame/adc/superslave.cpp b/src/mame/adc/superslave.cpp index 9f6b843e6b4..59e60b6cf10 100644 --- a/src/mame/adc/superslave.cpp +++ b/src/mame/adc/superslave.cpp @@ -369,7 +369,7 @@ void superslave_state::superslave(machine_config &config) m_maincpu->set_daisy_config(superslave_daisy_chain); // devices - am9519_device &am9519(AM9519(config, AM9519_TAG, 0)); + am9519_device &am9519(AM9519(config, AM9519_TAG)); am9519.out_int_callback().set_inputline(Z80_TAG, INPUT_LINE_IRQ0); z80pio_device& pio(Z80PIO(config, Z80PIO_TAG, XTAL(8'000'000)/2)); diff --git a/src/mame/adp/adp.cpp b/src/mame/adp/adp.cpp index df35b00170e..052290a97ca 100644 --- a/src/mame/adp/adp.cpp +++ b/src/mame/adp/adp.cpp @@ -541,7 +541,7 @@ void adp_state::fstation_hd63484_map(address_map &map) void adp_state::quickjac(machine_config &config) { - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &adp_state::quickjac_mem); m_maincpu->set_addrmap(m68000_device::AS_CPU_SPACE, &adp_state::fc7_map); @@ -550,7 +550,7 @@ void adp_state::quickjac(machine_config &config) m_duart->a_tx_cb().set(m_microtouch, FUNC(microtouch_device::rx)); m_duart->inport_cb().set_ioport("DSW1"); - MICROTOUCH(config, m_microtouch, 9600).stx().set(m_duart, FUNC(mc68681_device::rx_a_w)); + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(m_duart, FUNC(mc68681_device::rx_a_w)); NVRAM(config, m_nvram, nvram_device::DEFAULT_NONE); @@ -567,10 +567,10 @@ void adp_state::quickjac(machine_config &config) PALETTE(config, m_palette, FUNC(adp_state::adp_palette), 0x10); - HD63484(config, m_acrtc, 0).set_addrmap(0, &adp_state::adp_hd63484_map); + HD63484(config, m_acrtc).set_addrmap(0, &adp_state::adp_hd63484_map); SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", 3686400/2)); + ym2149_device &aysnd(YM2149(config, "aysnd", XTAL::u(3686400)/2)); aysnd.port_a_read_callback().set_ioport("PA"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.10); } @@ -606,7 +606,7 @@ void adp_state::funland(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &adp_state::funland_mem); PALETTE(config.replace(), m_palette, palette_device::BLACK, 0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &adp_state::ramdac_map); m_acrtc->set_addrmap(0, &adp_state::fstation_hd63484_map); diff --git a/src/mame/adp/stellafr.cpp b/src/mame/adp/stellafr.cpp index e71916c1e4e..5794efd5abe 100644 --- a/src/mame/adp/stellafr.cpp +++ b/src/mame/adp/stellafr.cpp @@ -92,16 +92,16 @@ INPUT_PORTS_END void stellafr_state::stellafr(machine_config &config) { - M68000(config, m_maincpu, 10000000 ); //? + M68000(config, m_maincpu, XTAL::u(10000000)); //? m_maincpu->set_addrmap(AS_PROGRAM, &stellafr_state::mem_map); m_maincpu->set_addrmap(m68000_device::AS_CPU_SPACE, &stellafr_state::fc7_map); - MC68681(config, m_duart, 3686400); + MC68681(config, m_duart, XTAL::u(3686400)); m_duart->irq_cb().set_inputline(m_maincpu, M68K_IRQ_2); // ? m_duart->outport_cb().set(FUNC(stellafr_state::duart_output_w)); SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1000000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1000000))); aysnd.add_route(ALL_OUTPUTS, "mono", 0.85); aysnd.port_a_read_callback().set_ioport("INPUTS"); aysnd.port_b_write_callback().set(FUNC(stellafr_state::ay8910_portb_w)); diff --git a/src/mame/agat/agat.cpp b/src/mame/agat/agat.cpp index bb523edca4a..c18b3cb27fd 100644 --- a/src/mame/agat/agat.cpp +++ b/src/mame/agat/agat.cpp @@ -1246,7 +1246,7 @@ void agat7_state::agat7(machine_config &config) /* /INH banking */ ADDRESS_MAP_BANK(config, m_upperbank).set_map(&agat7_state::inhbank_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x3000); - agat_keyboard_device &keyboard(AGAT_KEYBOARD(config, "keyboard", 0)); + agat_keyboard_device &keyboard(AGAT_KEYBOARD(config, "keyboard")); keyboard.out_callback().set(FUNC(agat_base_state::kbd_put)); keyboard.out_meta_callback().set(FUNC(agat_base_state::kbd_meta)); keyboard.out_reset_callback().set([this](bool state) { m_maincpu->reset(); }); @@ -1256,7 +1256,7 @@ void agat7_state::agat7(machine_config &config) * slot 1 always holds the CPU card. * most of the software expects a7lang in slot 2 and a7ram in slot 6. */ - A2BUS(config, m_a2bus, 0); + A2BUS(config, m_a2bus); m_a2bus->set_space(m_maincpu, AS_PROGRAM); m_a2bus->irq_w().set(FUNC(agat_base_state::a2bus_irq_w)); m_a2bus->nmi_w().set(FUNC(agat_base_state::a2bus_nmi_w)); @@ -1292,12 +1292,12 @@ void agat9_state::agat9(machine_config &config) /* /INH banking */ ADDRESS_MAP_BANK(config, m_upperbank).set_map(&agat9_state::inhbank_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x10000); - agat_keyboard_device &keyboard(AGAT_KEYBOARD(config, "keyboard", 0)); + agat_keyboard_device &keyboard(AGAT_KEYBOARD(config, "keyboard")); keyboard.out_callback().set(FUNC(agat_base_state::kbd_put)); keyboard.out_meta_callback().set(FUNC(agat_base_state::kbd_meta)); keyboard.out_reset_callback().set([this](bool state) { m_maincpu->reset(); }); - A2BUS(config, m_a2bus, 0); + A2BUS(config, m_a2bus); m_a2bus->set_space(m_maincpu, AS_PROGRAM); m_a2bus->irq_w().set(FUNC(agat_base_state::a2bus_irq_w)); m_a2bus->nmi_w().set(FUNC(agat_base_state::a2bus_nmi_w)); diff --git a/src/mame/agat/agat7.cpp b/src/mame/agat/agat7.cpp index 8ececb32dd8..060d7b477d2 100644 --- a/src/mame/agat/agat7.cpp +++ b/src/mame/agat/agat7.cpp @@ -53,7 +53,7 @@ void agat7video_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -agat7video_device::agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +agat7video_device::agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AGAT7VIDEO, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_ram_dev(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/agat/agat7.h b/src/mame/agat/agat7.h index 7c54582510b..95d26428fbb 100644 --- a/src/mame/agat/agat7.h +++ b/src/mame/agat/agat7.h @@ -25,13 +25,13 @@ class agat7video_device : public device_t, public device_palette_interface public: template agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&ram_tag, U &&char_tag) - : agat7video_device(mconfig, tag, owner, (uint32_t)0) + : agat7video_device(mconfig, tag, owner) { m_ram_dev.set_tag(std::forward(ram_tag)); m_char_region.set_tag(std::forward(char_tag)); } - agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/mame/agat/agat9.cpp b/src/mame/agat/agat9.cpp index b5ada9621c9..32997e02b7c 100644 --- a/src/mame/agat/agat9.cpp +++ b/src/mame/agat/agat9.cpp @@ -63,7 +63,7 @@ void agat9video_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -agat9video_device::agat9video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +agat9video_device::agat9video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AGAT9VIDEO, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_screen(*this, "a9screen") diff --git a/src/mame/agat/agat9.h b/src/mame/agat/agat9.h index d9c2116f72a..c878b808ab2 100644 --- a/src/mame/agat/agat9.h +++ b/src/mame/agat/agat9.h @@ -25,13 +25,13 @@ class agat9video_device : public device_t, public device_palette_interface public: template agat9video_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&ram_tag, U &&char_tag) - : agat9video_device(mconfig, tag, owner, (uint32_t)0) + : agat9video_device(mconfig, tag, owner) { m_ram_dev.set_tag(std::forward(ram_tag)); m_char_region.set_tag(std::forward(char_tag)); } - agat9video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + agat9video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/mame/agat/agatkeyb.cpp b/src/mame/agat/agatkeyb.cpp index f6ba09d6c45..015a80c0abc 100644 --- a/src/mame/agat/agatkeyb.cpp +++ b/src/mame/agat/agatkeyb.cpp @@ -152,7 +152,7 @@ agat_keyboard_device::agat_keyboard_device( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "AGATKBD_ROW0", "AGATKBD_ROW1", "AGATKBD_ROW2", "AGATKBD_ROW3", "AGATKBD_ROW4", "AGATKBD_ROW5") @@ -165,7 +165,7 @@ agat_keyboard_device::agat_keyboard_device( } -agat_keyboard_device::agat_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +agat_keyboard_device::agat_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : agat_keyboard_device(mconfig, AGAT_KEYBOARD, tag, owner, clock) { } diff --git a/src/mame/agat/agatkeyb.h b/src/mame/agat/agatkeyb.h index fe56998c05d..9b7eb33a665 100644 --- a/src/mame/agat/agatkeyb.h +++ b/src/mame/agat/agatkeyb.h @@ -27,7 +27,7 @@ public: const machine_config &mconfig, const char *tag, device_t *owner, - u32 clock); + const XTAL &clock); virtual ioport_constructor device_input_ports() const override; @@ -44,7 +44,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; virtual void key_make(u8 row, u8 column) override; diff --git a/src/mame/akai/akaiax80.cpp b/src/mame/akai/akaiax80.cpp index a4231325afb..dce104f9533 100644 --- a/src/mame/akai/akaiax80.cpp +++ b/src/mame/akai/akaiax80.cpp @@ -97,17 +97,17 @@ void ax80_state::ax80(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &ax80_state::ax80_map); //m_maincpu->set_addrmap(AS_IO, &ax80_state::ax80_io); - PIT8253(config, PIT0_TAG, 0); - PIT8253(config, PIT1_TAG, 0); - PIT8253(config, PIT2_TAG, 0); - PIT8253(config, PIT3_TAG, 0); - PIT8253(config, PIT4_TAG, 0); - PIT8253(config, PIT5_TAG, 0); + PIT8253(config, PIT0_TAG); + PIT8253(config, PIT1_TAG); + PIT8253(config, PIT2_TAG); + PIT8253(config, PIT3_TAG); + PIT8253(config, PIT4_TAG); + PIT8253(config, PIT5_TAG); I8255A(config, PPI0_TAG); I8255A(config, PPI1_TAG); - I8279(config, "kdc", 6554800 / 8); // Keyboard/Display Controller + I8279(config, "kdc", XTAL::u(6554800) / 8); // Keyboard/Display Controller //kdc.out_irq_calback().set_inputline("maincpu", UPD7810_INTF1); // irq //kdc.out_sl_callback().set(FUNC(ax80_state::scanlines_w)); // scan SL lines //kdc.out_disp_callback().set(FUNC(ax80_state::digit_w)); // display A&B diff --git a/src/mame/akai/mpc3000.cpp b/src/mame/akai/mpc3000.cpp index 7337f62ce98..ec359e227d2 100644 --- a/src/mame/akai/mpc3000.cpp +++ b/src/mame/akai/mpc3000.cpp @@ -231,7 +231,7 @@ void mpc3000_state::mpc3000(machine_config &config) //m_fdc->intrq_wr_callback().set(m_maincpu, FUNC(v53a_device::ir?_w)); //m_fdc->drq_wr_callback().set(m_maincpu, FUNC(v53a_device::drq?_w)); - pit8254_device &pit(PIT8254(config, "synctmr", 0)); // MB89254 + pit8254_device &pit(PIT8254(config, "synctmr")); // MB89254 pit.set_clk<0>(16_MHz_XTAL / 4); pit.set_clk<1>(16_MHz_XTAL / 4); pit.set_clk<2>(16_MHz_XTAL / 4); diff --git a/src/mame/akai/mpc60.cpp b/src/mame/akai/mpc60.cpp index a68c645e6a8..fbd3cbcdbfa 100644 --- a/src/mame/akai/mpc60.cpp +++ b/src/mame/akai/mpc60.cpp @@ -135,7 +135,7 @@ void mpc60_state::mpc60(machine_config &config) m_fdc->intrq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::int0_w)); m_fdc->drq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::drq1_w)); // FIXME: delayed and combined with DRQAD - hd61830_device &lcdc(HD61830(config, "lcdc", 0)); // LC7981 + hd61830_device &lcdc(HD61830(config, "lcdc")); // LC7981 lcdc.set_addrmap(0, &mpc60_state::lcd_map); lcdc.set_screen("screen"); diff --git a/src/mame/alba/rmhaihai.cpp b/src/mame/alba/rmhaihai.cpp index 471ca6ae24f..9ef37380a52 100644 --- a/src/mame/alba/rmhaihai.cpp +++ b/src/mame/alba/rmhaihai.cpp @@ -509,7 +509,7 @@ GFXDECODE_END void rmhaihai_state::rmhaihai(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 20000000/4); // 5 MHz ??? + Z80(config, m_maincpu, XTAL::u(20000000)/4); // 5 MHz ??? m_maincpu->set_addrmap(AS_PROGRAM, &rmhaihai_state::rmhaihai_map); m_maincpu->set_addrmap(AS_IO, &rmhaihai_state::rmhaihai_io_map); m_maincpu->set_vblank_int("screen", FUNC(rmhaihai_state::irq0_line_hold)); @@ -531,12 +531,12 @@ void rmhaihai_state::rmhaihai(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 20000000/16)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(20000000)/16)); aysnd.port_a_read_callback().set_ioport("DSW2"); aysnd.port_b_read_callback().set_ioport("DSW1"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); - MSM5205(config, m_msm, 500000); + MSM5205(config, m_msm, XTAL::u(500000)); m_msm->set_prescaler_selector(msm5205_device::SEX_4B); m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/alesis/alesis.cpp b/src/mame/alesis/alesis.cpp index 268678882dc..e03bf9537f1 100644 --- a/src/mame/alesis/alesis.cpp +++ b/src/mame/alesis/alesis.cpp @@ -431,7 +431,7 @@ void alesis_state::hr16(machine_config &config) m_cassette->set_default_state(CASSETTE_STOPPED); m_cassette->set_interface("hr16_cass"); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 16); /* sound hardware */ diff --git a/src/mame/alesis/alesis.h b/src/mame/alesis/alesis.h index 0d1ef4ac055..0d5cce69b11 100644 --- a/src/mame/alesis/alesis.h +++ b/src/mame/alesis/alesis.h @@ -25,7 +25,7 @@ class alesis_dm3ag_device : public device_t { public: // construction/destruction - alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device interface void write(uint8_t data); diff --git a/src/mame/alesis/alesis_a.cpp b/src/mame/alesis/alesis_a.cpp index bc48b0f234c..2c7b5962a1f 100644 --- a/src/mame/alesis/alesis_a.cpp +++ b/src/mame/alesis/alesis_a.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(ALESIS_DM3AG, alesis_dm3ag_device, "alesis_dm3ag", "Alesis DM // alesis_dm3ag_device - constructor //------------------------------------------------- -alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +alesis_dm3ag_device::alesis_dm3ag_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ALESIS_DM3AG, tag, owner, clock) , m_dac(*this, "dac") , m_samples(*this, DEVICE_SELF) @@ -51,7 +51,7 @@ void alesis_dm3ag_device::device_add_mconfig(machine_config &config) SPEAKER(config, "rspeaker1").front_right(); SPEAKER(config, "lspeaker2").front_left(); SPEAKER(config, "rspeaker2").front_right(); - PCM54HP(config, m_dac, 0).add_route(ALL_OUTPUTS, "lspeaker1", 1.0).add_route(ALL_OUTPUTS, "rspeaker1", 1.0); // PCM54HP DAC + R63/R73-75 + Sample and hold + PCM54HP(config, m_dac).add_route(ALL_OUTPUTS, "lspeaker1", 1.0).add_route(ALL_OUTPUTS, "rspeaker1", 1.0); // PCM54HP DAC + R63/R73-75 + Sample and hold } //------------------------------------------------- diff --git a/src/mame/alliedleisure/aleisttl.cpp b/src/mame/alliedleisure/aleisttl.cpp index 0b207a4bdb5..d4aaa4151b9 100644 --- a/src/mame/alliedleisure/aleisttl.cpp +++ b/src/mame/alliedleisure/aleisttl.cpp @@ -34,7 +34,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -104,7 +104,7 @@ void sburners_state::video_start() void sburners_state::sburners(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_sburners); + NETLIST_CPU(config, m_maincpu).set_source(netlist_sburners); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/alliedleisure/clayshoo.cpp b/src/mame/alliedleisure/clayshoo.cpp index 22aaf533664..18dc100caa8 100644 --- a/src/mame/alliedleisure/clayshoo.cpp +++ b/src/mame/alliedleisure/clayshoo.cpp @@ -325,7 +325,7 @@ void clayshoo_state::machine_reset() void clayshoo_state::clayshoo(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5068000/4); /* 5.068/4 Mhz (divider is a guess) */ + Z80(config, m_maincpu, XTAL::u(5068000)/4); /* 5.068/4 Mhz (divider is a guess) */ m_maincpu->set_addrmap(AS_PROGRAM, &clayshoo_state::main_map); m_maincpu->set_addrmap(AS_IO, &clayshoo_state::main_io_map); m_maincpu->set_vblank_int("screen", FUNC(clayshoo_state::irq0_line_hold)); diff --git a/src/mame/alpha/ad_sound.cpp b/src/mame/alpha/ad_sound.cpp index 92b7288f1ac..47a32f55e03 100644 --- a/src/mame/alpha/ad_sound.cpp +++ b/src/mame/alpha/ad_sound.cpp @@ -121,7 +121,7 @@ void ad_59mc07_device::sound_portmap(address_map &map) // ad_59mc07_device: Constructor //------------------------------------------------- -ad_59mc07_device::ad_59mc07_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ad_59mc07_device::ad_59mc07_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AD_59MC07, tag, owner, clock), m_audiocpu(*this, "audiocpu"), m_audio8155(*this, "audio8155"), @@ -138,8 +138,8 @@ ad_59mc07_device::ad_59mc07_device(const machine_config &mconfig, const char *ta // have been hand-tuned to a recording claiming to be an original recording from the // boards. You can adjust this in the Slider Controls while using -cheat if needed. -#define MSM5232_MAX_CLOCK 6144000 -#define MSM5232_MIN_CLOCK 214000 // unstable +#define MSM5232_MAX_CLOCK XTAL::u(6144000) +#define MSM5232_MIN_CLOCK XTAL::u( 214000) // unstable @@ -156,7 +156,7 @@ TIMER_CALLBACK_MEMBER(ad_59mc07_device::frq_adjuster_callback) { uint8_t frq = m_frq_adjuster->read(); - m_msm->set_clock(MSM5232_MIN_CLOCK + frq * (MSM5232_MAX_CLOCK - MSM5232_MIN_CLOCK) / 100); + m_msm->set_clock(XTAL::u(MSM5232_MIN_CLOCK.value() + frq * (MSM5232_MAX_CLOCK.value() - MSM5232_MIN_CLOCK.value() / 100))); //popmessage("8155: C %02x A %02x AY: A %02x B %02x Unk:%x", m_8155_port_c, m_8155_port_a, m_ay_port_a, m_ay_port_b, m_cymbal_ctrl & 15); m_cymvol *= 0.94f; @@ -334,9 +334,9 @@ void ad_59mc07_device::device_add_mconfig(machine_config &config) I8085A(config, m_audiocpu, 6.144_MHz_XTAL); // verified on pcb m_audiocpu->set_addrmap(AS_PROGRAM, &ad_59mc07_device::sound_map); m_audiocpu->set_addrmap(AS_IO, &ad_59mc07_device::sound_portmap); - m_audiocpu->set_clk_out(m_audio8155, FUNC(i8155_device::set_unscaled_clock_int)); + m_audiocpu->set_clk_out(m_audio8155, FUNC(i8155_device::set_unscaled_clock_ns)); - I8155(config, m_audio8155, 0); + I8155(config, m_audio8155); m_audio8155->out_pa_callback().set(FUNC(ad_59mc07_device::i8155_porta_w)); m_audio8155->out_pb_callback().set(FUNC(ad_59mc07_device::i8155_portb_w)); m_audio8155->out_pc_callback().set(FUNC(ad_59mc07_device::i8155_portc_w)); @@ -367,8 +367,8 @@ void ad_59mc07_device::device_add_mconfig(machine_config &config) aysnd.port_b_write_callback().set(FUNC(ad_59mc07_device::ay8910_portb_w)); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.105); - DAC_6BIT_R2R(config, m_dac_1, 0).add_route(ALL_OUTPUTS, "speaker", 0.35); // unknown DAC - DAC_6BIT_R2R(config, m_dac_2, 0).add_route(ALL_OUTPUTS, "speaker", 0.35); // unknown DAC + DAC_6BIT_R2R(config, m_dac_1).add_route(ALL_OUTPUTS, "speaker", 0.35); // unknown DAC + DAC_6BIT_R2R(config, m_dac_2).add_route(ALL_OUTPUTS, "speaker", 0.35); // unknown DAC SAMPLES(config, m_samples); m_samples->set_channels(3); @@ -472,7 +472,7 @@ void ad_60mc01_device::sound_portmap(address_map &map) // ad_60mc01_device: Constructor //------------------------------------------------- -ad_60mc01_device::ad_60mc01_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ad_60mc01_device::ad_60mc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AD_60MC01, tag, owner, clock), m_audiocpu(*this, "audiocpu"), m_soundlatch(*this, "soundlatch") diff --git a/src/mame/alpha/ad_sound.h b/src/mame/alpha/ad_sound.h index c508386c221..ae66bc10d1a 100644 --- a/src/mame/alpha/ad_sound.h +++ b/src/mame/alpha/ad_sound.h @@ -35,7 +35,7 @@ class ad_59mc07_device : public device_t { public: // construction/destruction - ad_59mc07_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ad_59mc07_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void sound_command_w(uint8_t data) { m_soundlatch->write(data); } @@ -106,7 +106,7 @@ class ad_60mc01_device : public device_t { public: // construction/destruction - ad_60mc01_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ad_60mc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); static constexpr feature_type imperfect_features() { return feature::SOUND; } // TODO: fix interrupts, missing music? diff --git a/src/mame/alpha/alpha68k.cpp b/src/mame/alpha/alpha68k.cpp index ae0785f9473..a8ecea8ff8c 100644 --- a/src/mame/alpha/alpha68k.cpp +++ b/src/mame/alpha/alpha68k.cpp @@ -1285,7 +1285,7 @@ void alpha68k_II_state::base_config(machine_config &config) ym2413_device &ym2(YM2413(config, "ym2", 3.579545_MHz_XTAL)); // TODO: verify me ym2.add_route(ALL_OUTPUTS, "speaker", 1.0); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.75); // ALPHA-VOICE88 custom DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.75); // ALPHA-VOICE88 custom DAC } void alpha68k_II_state::video_config(machine_config &config, u16 num_pens) @@ -1299,14 +1299,14 @@ void alpha68k_II_state::video_config(machine_config &config, u16 num_pens) // TODO: should really be same as snk68.cpp MCFG_VIDEO_START_OVERRIDE(alpha68k_II_state,alpha68k) - SNK68_SPR(config, m_sprites, 0); + SNK68_SPR(config, m_sprites); m_sprites->set_gfxdecode_tag(m_gfxdecode); m_sprites->set_tile_indirect_cb(FUNC(alpha68k_II_state::tile_callback)); m_sprites->set_xpos_shift(15); m_sprites->set_color_entry_mask((num_pens / 16) - 1); // TODO: change into NeoGeo palette format ... - ALPHA68K_PALETTE(config, m_palette, 0); + ALPHA68K_PALETTE(config, m_palette); m_palette->set_entries(num_pens); } @@ -1316,11 +1316,11 @@ void alpha68k_II_state::alpha68k_II(machine_config &config) m_outlatch->parallel_out_cb().set(FUNC(alpha68k_II_state::video_bank_w)).rshift(4).mask(0x07); /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); // TODO: verify me + M68000(config, m_maincpu, XTAL::u(8000000)); // TODO: verify me m_maincpu->set_addrmap(AS_PROGRAM, &alpha68k_II_state::alpha68k_II_map); m_maincpu->set_vblank_int("screen", FUNC(alpha68k_state::irq3_line_hold)); /* VBL */ - Z80(config, m_audiocpu, 6000000); // TODO: verify me + Z80(config, m_audiocpu, XTAL::u(6000000)); // TODO: verify me m_audiocpu->set_addrmap(AS_PROGRAM, &alpha68k_II_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &alpha68k_II_state::sound_portmap); m_audiocpu->set_periodic_int(FUNC(alpha68k_II_state::sound_nmi), attotime::from_hz(7614)); diff --git a/src/mame/alpha/alpha68k_n.cpp b/src/mame/alpha/alpha68k_n.cpp index f48fc754380..44fec022833 100644 --- a/src/mame/alpha/alpha68k_n.cpp +++ b/src/mame/alpha/alpha68k_n.cpp @@ -735,18 +735,18 @@ void sstingray_state::sstingry(machine_config &config) { base_config(config); /* basic machine hardware */ - M68000(config, m_maincpu, 6000000); /* 24MHz/4? */ + M68000(config, m_maincpu, XTAL::u(6000000)); /* 24MHz/4? */ m_maincpu->set_addrmap(AS_PROGRAM, &sstingray_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(sstingray_state::irq1_line_hold)); //m_maincpu->set_periodic_int(FUNC(sstingray_state::irq2_line_hold), attotime::from_hz(60)); // MCU irq - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &sstingray_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &sstingray_state::sound_iomap); m_audiocpu->set_vblank_int("screen", FUNC(sstingray_state::irq0_line_hold)); m_audiocpu->set_periodic_int(FUNC(sstingray_state::nmi_line_pulse), attotime::from_hz(4000)); - I8748(config, m_alpha8511, 9263750); /* 9.263750 MHz(?) oscillator, divided by 3*5 internally */ + I8748(config, m_alpha8511, XTAL::u(9263750)); /* 9.263750 MHz(?) oscillator, divided by 3*5 internally */ m_alpha8511->bus_in_cb().set(FUNC(sstingray_state::alpha8511_bus_r)); m_alpha8511->bus_out_cb().set(FUNC(sstingray_state::alpha8511_bus_w)); m_alpha8511->p1_in_cb().set(FUNC(sstingray_state::alpha8511_address_r)); @@ -759,16 +759,16 @@ void sstingray_state::sstingry(machine_config &config) video_config(config, 0x40, 0, true); // sound hardware - ym2203_device &ym(YM2203(config, "ym", 2'000'000)); // Verified from video by PCB, 24MHz/12? + ym2203_device &ym(YM2203(config, "ym", XTAL::u(2'000'000))); // Verified from video by PCB, 24MHz/12? ym.add_route(ALL_OUTPUTS, "speaker", 0.30); - ay8910_device &aysnd1(AY8910(config, "aysnd1", 2'000'000)); // Verified from video by PCB, 24MHz/12? + ay8910_device &aysnd1(AY8910(config, "aysnd1", XTAL::u(2'000'000))); // Verified from video by PCB, 24MHz/12? aysnd1.add_route(ALL_OUTPUTS, "speaker", 0.30); - ay8910_device &aysnd2(AY8910(config, "aysnd2", 2'000'000)); // Verified from video by PCB, 24MHz/12? + ay8910_device &aysnd2(AY8910(config, "aysnd2", XTAL::u(2'000'000))); // Verified from video by PCB, 24MHz/12? aysnd2.add_route(ALL_OUTPUTS, "speaker", 0.45); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.50); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.50); // unknown DAC } void kyros_state::kyros(machine_config &config) @@ -801,19 +801,19 @@ void kyros_state::kyros(machine_config &config) ay8910_device &aysnd2(AY8910(config, "aysnd2", 16_MHz_XTAL / 8)); // Verified on original PCB aysnd2.add_route(ALL_OUTPUTS, "speaker", 0.6); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.50); + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.50); } void jongbou_state::jongbou(machine_config &config) { base_config(config); /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &jongbou_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(jongbou_state::irq1_line_hold)); m_maincpu->set_periodic_int(FUNC(jongbou_state::irq2_line_hold), attotime::from_hz(60*16)); // MCU irq - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &jongbou_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &jongbou_state::sound_iomap); m_audiocpu->set_periodic_int(FUNC(jongbou_state::irq0_line_hold), attotime::from_hz(160*60)); @@ -824,7 +824,7 @@ void jongbou_state::jongbou(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_jongbou); /* sound hardware */ - ay8910_device &aysnd(AY8910(config, "aysnd", 2000000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(2000000))); aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.65); } diff --git a/src/mame/alpha/alpha8201.cpp b/src/mame/alpha/alpha8201.cpp index 0f3da510f57..a68f4da4969 100644 --- a/src/mame/alpha/alpha8201.cpp +++ b/src/mame/alpha/alpha8201.cpp @@ -284,7 +284,7 @@ DEFINE_DEVICE_TYPE(ALPHA_8201, alpha_8201_device, "alpha8201", "ALPHA-8201") // alpha_8201_device - constructor //------------------------------------------------- -alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +alpha_8201_device::alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ALPHA_8201, tag, owner, clock) , m_mcu(*this, "mcu") { diff --git a/src/mame/alpha/alpha8201.h b/src/mame/alpha/alpha8201.h index 77b292fb17c..aee5a9d8c34 100644 --- a/src/mame/alpha/alpha8201.h +++ b/src/mame/alpha/alpha8201.h @@ -14,7 +14,7 @@ class alpha_8201_device : public device_t { public: - alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + alpha_8201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~alpha_8201_device() {} // external I/O diff --git a/src/mame/alpha/champbas.cpp b/src/mame/alpha/champbas.cpp index 048e138450d..e51907ddd3b 100644 --- a/src/mame/alpha/champbas.cpp +++ b/src/mame/alpha/champbas.cpp @@ -601,7 +601,7 @@ void champbas_state::champbas(machine_config &config) AY8910(config, "ay1", XTAL(18'432'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.3); - DAC_6BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.7); // unknown DAC + DAC_6BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.7); // unknown DAC } void champbas_state::champbasj(machine_config &config) @@ -717,7 +717,7 @@ void exctsccr_state::exctsccr(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); /* AY (melody) clock is specified by a VR (0.9 - 3.9 MHz) */ - AY8910(config, "ay1", 1940000).add_route(ALL_OUTPUTS, "speaker", 0.08); /* VR has a factory mark and this is the value read */ + AY8910(config, "ay1", XTAL::u(1940000)).add_route(ALL_OUTPUTS, "speaker", 0.08); /* VR has a factory mark and this is the value read */ AY8910(config, "ay2", XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "speaker", 0.08); @@ -725,8 +725,8 @@ void exctsccr_state::exctsccr(machine_config &config) AY8910(config, "ay4", XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "speaker", 0.08); - DAC_6BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC - DAC_6BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC + DAC_6BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC + DAC_6BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC } void exctsccr_state::exctscc2(machine_config &config) @@ -786,7 +786,7 @@ void exctsccr_state::exctsccrb(machine_config &config) AY8910(config, "ay1", XTAL(18'432'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.3); - DAC_6BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.7); // unknown DAC + DAC_6BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.7); // unknown DAC } diff --git a/src/mame/alpha/equites.cpp b/src/mame/alpha/equites.cpp index 16dbda26210..6bce7bdd475 100644 --- a/src/mame/alpha/equites.cpp +++ b/src/mame/alpha/equites.cpp @@ -870,7 +870,7 @@ void equites_state::equites(machine_config &config) m_mainlatch->q_out_cb<2>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w)); m_mainlatch->q_out_cb<3>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w)).invert(); - ALPHA_8201(config, m_alpha_8201, 4000000/8); // 8303 or 8304 (same device!) + ALPHA_8201(config, m_alpha_8201, XTAL::u(4000000)/8); // 8303 or 8304 (same device!) config.set_perfect_quantum("alpha_8201:mcu"); AD_59MC07(config, "sound_board"); @@ -926,7 +926,7 @@ void splndrbt_state::splndrbt(machine_config &config) AD_59MC07(config, "sound_board"); - ALPHA_8201(config, m_alpha_8201, 4000000/8); // 8303 or 8304 (same device!) + ALPHA_8201(config, m_alpha_8201, XTAL::u(4000000)/8); // 8303 or 8304 (same device!) config.set_perfect_quantum("alpha_8201:mcu"); /* video hardware */ diff --git a/src/mame/alpha/meijinsn.cpp b/src/mame/alpha/meijinsn.cpp index 413879662a9..eb1db15ac66 100644 --- a/src/mame/alpha/meijinsn.cpp +++ b/src/mame/alpha/meijinsn.cpp @@ -352,11 +352,11 @@ void meijinsn_state::machine_reset() void meijinsn_state::meijinsn(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 9000000); + M68000(config, m_maincpu, XTAL::u(9000000)); m_maincpu->set_addrmap(AS_PROGRAM, &meijinsn_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(meijinsn_state::interrupt), "screen", 0, 1); - z80_device &audiocpu(Z80(config, "audiocpu", 4000000)); + z80_device &audiocpu(Z80(config, "audiocpu", XTAL::u(4000000))); audiocpu.set_addrmap(AS_PROGRAM, &meijinsn_state::sound_map); audiocpu.set_addrmap(AS_IO, &meijinsn_state::sound_io_map); audiocpu.set_periodic_int(FUNC(meijinsn_state::irq0_line_hold), attotime::from_hz(160*60)); @@ -378,7 +378,7 @@ void meijinsn_state::meijinsn(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ay8910_device &aysnd(AY8910(config, "aysnd", 2000000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(2000000))); aysnd.port_a_read_callback().set("soundlatch", FUNC(generic_latch_8_device::read)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.75); } diff --git a/src/mame/altos/acs8600_ics.cpp b/src/mame/altos/acs8600_ics.cpp index a5d29748e2e..7f680b11292 100644 --- a/src/mame/altos/acs8600_ics.cpp +++ b/src/mame/altos/acs8600_ics.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(ACS8600_ICS, acs8600_ics_device, "acs8600_ics", "Altos ACS8600 Intelligent Serial Concentrator") -acs8600_ics_device::acs8600_ics_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +acs8600_ics_device::acs8600_ics_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACS8600_ICS, tag, owner, clock), m_icscpu(*this, "icscpu"), m_out_irq1_func(*this), diff --git a/src/mame/altos/acs8600_ics.h b/src/mame/altos/acs8600_ics.h index 1252bf7988d..dbd2c475527 100644 --- a/src/mame/altos/acs8600_ics.h +++ b/src/mame/altos/acs8600_ics.h @@ -11,7 +11,7 @@ class acs8600_ics_device : public device_t { public: - acs8600_ics_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acs8600_ics_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(attn_w); diff --git a/src/mame/altos/altos2.cpp b/src/mame/altos/altos2.cpp index 129da0e7433..f0e61d4d958 100644 --- a/src/mame/altos/altos2.cpp +++ b/src/mame/altos/altos2.cpp @@ -168,7 +168,7 @@ void altos2_state::altos2(machine_config &config) m_vpac->int_callback().set("ctc", FUNC(z80ctc_device::trg3)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_bell, 1000).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_bell, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 0.50); } ROM_START( altos2 ) diff --git a/src/mame/altos/altos486.cpp b/src/mame/altos/altos486.cpp index dd6f4728d14..c9bcdd720b6 100644 --- a/src/mame/altos/altos486.cpp +++ b/src/mame/altos/altos486.cpp @@ -138,7 +138,7 @@ void altos486_state::altos486(machine_config &config) iocpu.set_addrmap(AS_PROGRAM, &altos486_state::altos486_z80_mem); iocpu.set_addrmap(AS_IO, &altos486_state::altos486_z80_io); - pic8259_device &pic8259(PIC8259(config, "pic8259", 0)); + pic8259_device &pic8259(PIC8259(config, "pic8259")); pic8259.out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int0_w)); pic8259.in_sp_callback().set_constant(1); pic8259.read_slave_ack_callback().set(FUNC(altos486_state::read_rmx_ack)); @@ -209,12 +209,12 @@ void altos486_state::altos486(machine_config &config) rs422_wn.dcd_handler().set("i8274", FUNC(i8274_device::dcda_w)); rs422_wn.cts_handler().set("i8274", FUNC(i8274_device::ctsa_w)); - pit8253_device &pit0(PIT8253(config, "pit0", 0)); + pit8253_device &pit0(PIT8253(config, "pit0")); pit0.set_clk<0>(XTAL(22'118'400)/18); // FIXME pit0.set_clk<1>(XTAL(22'118'400)/144); // FIXME pit0.set_clk<2>(XTAL(22'118'400)/18); // FIXME - pit8253_device &pit1(PIT8253(config, "pit1", 0)); + pit8253_device &pit1(PIT8253(config, "pit1")); pit1.set_clk<0>(XTAL(22'118'400)/18); // FIXME pit1.set_clk<1>(XTAL(22'118'400)/144); // FIXME pit1.set_clk<2>(XTAL(22'118'400)/18); // FIXME diff --git a/src/mame/altos/altos8600.cpp b/src/mame/altos/altos8600.cpp index b57c3cd81b0..5e134f6139a 100644 --- a/src/mame/altos/altos8600.cpp +++ b/src/mame/altos/altos8600.cpp @@ -740,16 +740,16 @@ void altos8600_state::altos8600(machine_config &config) m_dmac->sintr1().set(FUNC(altos8600_state::sintr1_w)); m_dmac->sintr2().set(m_pic[1], FUNC(pic8259_device::ir4_w)); - PIC8259(config, m_pic[0], 0); + PIC8259(config, m_pic[0]); m_pic[0]->out_int_callback().set_inputline(m_maincpu, 0); m_pic[0]->in_sp_callback().set_constant(1); m_pic[0]->read_slave_ack_callback().set(FUNC(altos8600_state::get_slave_ack)); - PIC8259(config, m_pic[1], 0); + PIC8259(config, m_pic[1]); m_pic[1]->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir2_w)); m_pic[1]->in_sp_callback().set_constant(0); - PIC8259(config, m_pic[2], 0); + PIC8259(config, m_pic[2]); m_pic[2]->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir3_w)); m_pic[2]->in_sp_callback().set_constant(0); @@ -774,9 +774,9 @@ void altos8600_state::altos8600(machine_config &config) rs232b.dcd_handler().set(m_uart8274, FUNC(i8274_device::dcdb_w)); rs232b.cts_handler().set(m_uart8274, FUNC(i8274_device::ctsb_w)); - I8255A(config, "ppi", 0); + I8255A(config, "ppi"); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(1228800); pit.out_handler<0>().set(m_uart8274, FUNC(i8274_device::rxca_w)); pit.out_handler<0>().append(m_uart8274, FUNC(i8274_device::txca_w)); @@ -785,7 +785,7 @@ void altos8600_state::altos8600(machine_config &config) pit.set_clk<2>(1228800); pit.out_handler<1>().set(m_pic[0], FUNC(pic8259_device::ir1_w)); - FD1797(config, m_fdc, 2000000); + FD1797(config, m_fdc, XTAL::u(2000000)); m_fdc->intrq_wr_callback().set(m_pic[1], FUNC(pic8259_device::ir1_w)); m_fdc->drq_wr_callback().set(FUNC(altos8600_state::fddrq_w)); FLOPPY_CONNECTOR(config, "fd1797:0", altos8600_floppies, "8dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); @@ -793,12 +793,12 @@ void altos8600_state::altos8600(machine_config &config) FLOPPY_CONNECTOR(config, "fd1797:2", altos8600_floppies, "8dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fd1797:3", altos8600_floppies, "8dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - ACS8600_ICS(config, m_ics, 0); + ACS8600_ICS(config, m_ics); m_ics->set_host_space(m_dmac, AS_PROGRAM); // TODO: fixme m_ics->irq1_callback().set(m_pic[0], FUNC(pic8259_device::ir5_w)); m_ics->irq2_callback().set(m_pic[0], FUNC(pic8259_device::ir6_w)); - HARDDISK(config, "hdd", 0); + HARDDISK(config, "hdd"); SOFTWARE_LIST(config, "flop_list").set_original("altos8600"); } diff --git a/src/mame/amiga/alg.cpp b/src/mame/amiga/alg.cpp index 7e8230069c0..648f28006ca 100644 --- a/src/mame/amiga/alg.cpp +++ b/src/mame/amiga/alg.cpp @@ -345,7 +345,7 @@ void alg_state::alg_r1(machine_config &config) m_copper->mem_read_cb().set(FUNC(amiga_state::chip_ram_r)); m_copper->set_ecs_mode(false); - SONY_LDP1450(config, m_laserdisc, 9600); + SONY_LDP1450(config, m_laserdisc, XTAL::u(9600)); m_laserdisc->set_screen("screen"); m_laserdisc->set_overlay(512*2, 262, FUNC(amiga_state::screen_update_amiga)); m_laserdisc->set_overlay_clip((129-8)*2, (449+8-1)*2, 44-8, 244+8-1); diff --git a/src/mame/amiga/amiga.cpp b/src/mame/amiga/amiga.cpp index 7bfc1bd5d44..d803290f875 100644 --- a/src/mame/amiga/amiga.cpp +++ b/src/mame/amiga/amiga.cpp @@ -98,7 +98,7 @@ DECLARE_DEVICE_TYPE(A1000_KBRESET, a1000_kbreset_device) class a1000_kbreset_device : public device_t { public: - a1000_kbreset_device(machine_config const &config, char const *tag, device_t *owner, u32 clock = 0U) : + a1000_kbreset_device(machine_config const &config, char const *tag, device_t *owner, const XTAL &clock = XTAL()) : device_t(config, A1000_KBRESET, tag, owner, clock), m_kbrst_cb(*this) { @@ -1707,11 +1707,11 @@ void a2000_state::a2000(machine_config &config) MSM6242(config, m_rtc, XTAL(32'768)); // cpu slot - EXP_SLOT(config, EXP_SLOT_TAG, 0).set_space(m_maincpu, AS_PROGRAM); + EXP_SLOT(config, EXP_SLOT_TAG).set_space(m_maincpu, AS_PROGRAM); ZORRO_SLOT(config, "slot", EXP_SLOT_TAG, a2000_expansion_cards, nullptr); // zorro slots - ZORRO2(config, m_zorro, 0); + ZORRO2(config, m_zorro); m_zorro->set_space(m_maincpu, AS_PROGRAM); m_zorro->int2_handler().set(FUNC(a2000_state::zorro2_int2_w)); m_zorro->int6_handler().set(FUNC(a2000_state::zorro2_int6_w)); @@ -1754,7 +1754,7 @@ void a500_state::a500(machine_config &config) ADDRESS_MAP_BANK(config, m_chipset).set_map(&a500_state::ocs_map).set_options(ENDIANNESS_BIG, 16, 9, 0x200); // cpu slot - EXP_SLOT(config, m_side, 0).set_space(m_maincpu, AS_PROGRAM); + EXP_SLOT(config, m_side).set_space(m_maincpu, AS_PROGRAM); m_side->int2_handler().set(FUNC(a500_state::side_int2_w)); m_side->int6_handler().set(FUNC(a500_state::side_int6_w)); ZORRO_SLOT(config, "slot", m_side, a500_expansion_cards, nullptr); @@ -1823,12 +1823,12 @@ void cdtv_state::cdtv(machine_config &config) m_dmac->io_write_handler().set(m_cdrom, FUNC(cr511b_device::write)); m_dmac->int_handler().set(FUNC(cdtv_state::dmac_int_w)); - TPI6525(config, m_tpi, 0); + TPI6525(config, m_tpi); m_tpi->out_irq_cb().set(FUNC(cdtv_state::tpi_int_w)); m_tpi->out_pb_cb().set(FUNC(cdtv_state::tpi_port_b_write)); // cd-rom - CR511B(config, m_cdrom, 0); + CR511B(config, m_cdrom); m_cdrom->scor_handler().set(m_tpi, FUNC(tpi6525_device::i1_w)).invert(); m_cdrom->stch_handler().set(m_tpi, FUNC(tpi6525_device::i2_w)).invert(); m_cdrom->sten_handler().set(m_tpi, FUNC(tpi6525_device::i3_w)); @@ -1914,7 +1914,7 @@ void a500p_state::a500p(machine_config &config) MSM6242(config, m_rtc, XTAL(32'768)); // cpu slot - EXP_SLOT(config, m_side, 0).set_space(m_maincpu, AS_PROGRAM); + EXP_SLOT(config, m_side).set_space(m_maincpu, AS_PROGRAM); ZORRO_SLOT(config, "slot", m_side, a500_expansion_cards, nullptr); // software @@ -2134,9 +2134,9 @@ void cd32_state::cd32(machine_config &config) // disable floppy as default (available only via back port as expansion) subdevice("fdc:0")->set_default_option(nullptr); - I2C_24C08(config, "i2cmem", 0); // AT24C08N + I2C_24C08(config, "i2cmem"); // AT24C08N - akiko_device &akiko(AKIKO(config, "akiko", 0)); + akiko_device &akiko(AKIKO(config, "akiko")); akiko.mem_r_callback().set(FUNC(amiga_state::chip_ram_r)); akiko.mem_w_callback().set(FUNC(amiga_state::chip_ram_w)); akiko.int_callback().set(FUNC(cd32_state::akiko_int_w)); diff --git a/src/mame/amiga/amiga_m.cpp b/src/mame/amiga/amiga_m.cpp index b516ea7c266..fba847b7ed6 100644 --- a/src/mame/amiga/amiga_m.cpp +++ b/src/mame/amiga/amiga_m.cpp @@ -1699,9 +1699,9 @@ void amiga_state::custom_chip_w(offs_t offset, uint16_t data) void amiga_state::serial_adjust() { uint32_t divisor = (CUSTOM_REG(REG_SERPER) & 0x7fff) + 1; - uint32_t baud = m_paula->clock() / divisor; + XTAL baud = m_paula->clock() / divisor; - m_serial_timer->adjust(attotime::from_hz(baud) / 2, 0, attotime::from_hz(baud)); + m_serial_timer->adjust(attotime::from_hz(baud.value()) / 2, 0, attotime::from_hz(baud.value())); } TIMER_CALLBACK_MEMBER(amiga_state::serial_shift) diff --git a/src/mame/amiga/cubo.cpp b/src/mame/amiga/cubo.cpp index 4f1cf746a72..22a18168797 100644 --- a/src/mame/amiga/cubo.cpp +++ b/src/mame/amiga/cubo.cpp @@ -1077,9 +1077,9 @@ void cubo_state::cubo(machine_config &config) m_copper->mem_read_cb().set(FUNC(amiga_state::chip_ram_r)); m_copper->set_ecs_mode(true); - I2C_24C08(config, "i2cmem", 0); // AT24C08N + I2C_24C08(config, "i2cmem"); // AT24C08N - akiko_device &akiko(AKIKO(config, "akiko", 0)); + akiko_device &akiko(AKIKO(config, "akiko")); akiko.mem_r_callback().set(FUNC(amiga_state::chip_ram_r)); akiko.mem_w_callback().set(FUNC(amiga_state::chip_ram_w)); akiko.int_callback().set(FUNC(cubo_state::akiko_int_w)); @@ -1120,7 +1120,7 @@ void cubo_state::cubo(machine_config &config) MOS8520(config, m_cia_1, amiga_state::CLK_E_PAL); m_cia_1->irq_wr_callback().set(FUNC(amiga_state::cia_1_irq)); - MICROTOUCH(config, m_microtouch, 9600).stx().set(FUNC(cubo_state::rs232_rx_w)); + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(FUNC(cubo_state::rs232_rx_w)); CDROM(config, "cd32_cdrom").set_interface("cd32_cdrom"); diff --git a/src/mame/ampro/lbpc.cpp b/src/mame/ampro/lbpc.cpp index 2c83db5cb87..637cb871c17 100644 --- a/src/mame/ampro/lbpc.cpp +++ b/src/mame/ampro/lbpc.cpp @@ -401,7 +401,7 @@ void lbpc_state::lbpc(machine_config &config) m_expbus->irq3_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ3); m_expbus->iochck_callback().set(FUNC(lbpc_state::iochck_w)); - ISA8_SLOT(config, "exp", 0, m_expbus, pc_isa8_cards, "ega", false); + ISA8_SLOT(config, "exp", m_expbus, pc_isa8_cards, "ega", false); } diff --git a/src/mame/amstrad/ams40041.cpp b/src/mame/amstrad/ams40041.cpp index 6dacc421a29..9e96aa13f11 100644 --- a/src/mame/amstrad/ams40041.cpp +++ b/src/mame/amstrad/ams40041.cpp @@ -74,7 +74,7 @@ DEFINE_DEVICE_TYPE(AMS40041, ams40041_device, "ams40041", "AMS40041 VDU") // ams40041_device - constructor //------------------------------------------------- -ams40041_device::ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ams40041_device::ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc6845_device(mconfig, AMS40041, tag, owner, clock) , m_char_rom(*this, DEVICE_SELF) , m_lk(*this, "^LK") // hack diff --git a/src/mame/amstrad/ams40041.h b/src/mame/amstrad/ams40041.h index 34acdc077c6..26f7a17543d 100644 --- a/src/mame/amstrad/ams40041.h +++ b/src/mame/amstrad/ams40041.h @@ -19,7 +19,7 @@ class ams40041_device : public mc6845_device { public: // device type constructor - ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ams40041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // screen update callback uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/amstrad/amstr_pc.cpp b/src/mame/amstrad/amstr_pc.cpp index d872082db4c..f950ca58453 100644 --- a/src/mame/amstrad/amstr_pc.cpp +++ b/src/mame/amstrad/amstr_pc.cpp @@ -672,22 +672,22 @@ void amstrad_pc_state::cfg_fdc(device_t *device) void amstrad_pc_state::pc200(machine_config &config) { /* basic machine hardware */ - I8086(config, m_maincpu, 8000000); + I8086(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &amstrad_pc_state::ppc640_map); m_maincpu->set_addrmap(AS_IO, &amstrad_pc_state::pc200_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + PCNOPPI_MOTHERBOARD(config, m_mb).set_cputag(m_maincpu); m_mb->int_callback().set_inputline(m_maincpu, 0); m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "aga", 0, "mb:isa", pc_isa8_cards, "aga_pc200", true); - ISA8_SLOT(config, "fdc", 0, "mb:isa", pc_isa8_cards, "fdc_xt", true).set_option_machine_config("fdc_xt", cfg_fdc); - ISA8_SLOT(config, "com", 0, "mb:isa", pc_isa8_cards, "com", true).set_option_machine_config("com", cfg_com); + ISA8_SLOT(config, "aga", "mb:isa", pc_isa8_cards, "aga_pc200", true); + ISA8_SLOT(config, "fdc", "mb:isa", pc_isa8_cards, "fdc_xt", true).set_option_machine_config("fdc_xt", cfg_fdc); + ISA8_SLOT(config, "com", "mb:isa", pc_isa8_cards, "com", true).set_option_machine_config("com", cfg_com); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, nullptr, false); /* printer */ pc_lpt_device &lpt0(PC_LPT(config, "lpt_0")); @@ -720,7 +720,7 @@ void amstrad_pc_state::pc2086(machine_config &config) void amstrad_pc_state::ppc640(machine_config &config) { pc200(config); - V30(config.replace(), m_maincpu, 8000000); + V30(config.replace(), m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &amstrad_pc_state::ppc640_map); m_maincpu->set_addrmap(AS_IO, &amstrad_pc_state::ppc512_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); diff --git a/src/mame/amstrad/nc.cpp b/src/mame/amstrad/nc.cpp index 9e3474aef44..a45d12c06a4 100644 --- a/src/mame/amstrad/nc.cpp +++ b/src/mame/amstrad/nc.cpp @@ -1351,7 +1351,7 @@ INPUT_PORTS_END void nc_state::nc_base(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, /*6000000*/ 4606000); /* Russell Marks says this is more accurate */ + Z80(config, m_maincpu, XTAL::u(/*6000000*/ 4606000)); /* Russell Marks says this is more accurate */ m_maincpu->set_addrmap(AS_PROGRAM, &nc_state::nc_map); config.set_maximum_quantum(attotime::from_hz(60)); @@ -1365,8 +1365,8 @@ void nc_state::nc_base(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper1, 0).add_route(ALL_OUTPUTS, "mono", 0.50); - BEEP(config, m_beeper2, 0).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beeper1).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beeper2).add_route(ALL_OUTPUTS, "mono", 0.50); /* printer */ CENTRONICS(config, m_centronics, centronics_devices, "printer"); @@ -1376,9 +1376,9 @@ void nc_state::nc_base(machine_config &config) m_centronics->set_output_latch(cent_data_out); /* uart */ - I8251(config, m_uart, 0); + I8251(config, m_uart); - clock_device &uart_clock(CLOCK(config, "uart_clock", 19200)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(19200))); uart_clock.signal_handler().set(FUNC(nc_state::write_uart_clock)); /* cartridge */ @@ -1446,7 +1446,7 @@ void nc200_state::nc200(machine_config &config) m_uart->rxrdy_handler().set(FUNC(nc200_state::nc200_rxrdy_callback)); m_uart->txrdy_handler().set(FUNC(nc200_state::nc200_txrdy_callback)); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set(FUNC(nc200_state::nc200_fdc_interrupt)); FLOPPY_CONNECTOR(config, "upd765:0", ibmpc_floppies, "525dd", floppy_image_device::default_pc_floppy_formats); FLOPPY_CONNECTOR(config, "upd765:1", ibmpc_floppies, "525dd", floppy_image_device::default_pc_floppy_formats); diff --git a/src/mame/amstrad/pc1512.cpp b/src/mame/amstrad/pc1512.cpp index 2cd85a836a7..066cb7c286f 100644 --- a/src/mame/amstrad/pc1512.cpp +++ b/src/mame/amstrad/pc1512.cpp @@ -1168,7 +1168,7 @@ void pc1512_state::pc1512(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.80); // devices - PC1512_KEYBOARD(config, m_kb, 0); + PC1512_KEYBOARD(config, m_kb); m_kb->clock_wr_callback().set(FUNC(pc1512_state::kbclk_w)); m_kb->data_wr_callback().set(FUNC(pc1512_state::kbdata_w)); @@ -1240,7 +1240,7 @@ void pc1512_state::pc1512(machine_config &config) rs232.cts_handler().set(m_uart, FUNC(ins8250_uart_device::cts_w)); // ISA8 bus - isa8_device &isa(ISA8(config, ISA_BUS_TAG, 0)); + isa8_device &isa(ISA8(config, ISA_BUS_TAG)); isa.set_memspace(m_maincpu, AS_PROGRAM); isa.set_iospace(m_maincpu, AS_IO); isa.irq2_callback().set(m_pic, FUNC(pic8259_device::ir2_w)); @@ -1252,9 +1252,9 @@ void pc1512_state::pc1512(machine_config &config) isa.drq1_callback().set(I8237A5_TAG, FUNC(am9517a_device::dreq1_w)); isa.drq2_callback().set(I8237A5_TAG, FUNC(am9517a_device::dreq2_w)); isa.drq3_callback().set(I8237A5_TAG, FUNC(am9517a_device::dreq3_w)); - ISA8_SLOT(config, "isa1", 0, ISA_BUS_TAG, pc_isa8_cards, nullptr, false); // FIXME: determine ISA clock - ISA8_SLOT(config, "isa2", 0, ISA_BUS_TAG, pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, ISA_BUS_TAG, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", ISA_BUS_TAG, pc_isa8_cards, nullptr, false); // FIXME: determine ISA clock + ISA8_SLOT(config, "isa2", ISA_BUS_TAG, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", ISA_BUS_TAG, pc_isa8_cards, nullptr, false); // internal ram RAM(config, RAM_TAG).set_default_size("512K").set_extra_options("544K,576K,608K,640K"); @@ -1304,7 +1304,7 @@ void pc1640_state::pc1640(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.80); // devices - PC1512_KEYBOARD(config, m_kb, 0); + PC1512_KEYBOARD(config, m_kb); m_kb->clock_wr_callback().set(FUNC(pc1512_base_state::kbclk_w)); m_kb->data_wr_callback().set(FUNC(pc1512_base_state::kbdata_w)); @@ -1376,7 +1376,7 @@ void pc1640_state::pc1640(machine_config &config) rs232.cts_handler().set(m_uart, FUNC(ins8250_uart_device::cts_w)); // ISA8 bus - isa8_device &isa(ISA8(config, ISA_BUS_TAG, 0)); + isa8_device &isa(ISA8(config, ISA_BUS_TAG)); isa.set_memspace(m_maincpu, AS_PROGRAM); isa.set_iospace(m_maincpu, AS_IO); isa.irq2_callback().set(m_pic, FUNC(pic8259_device::ir2_w)); @@ -1388,11 +1388,11 @@ void pc1640_state::pc1640(machine_config &config) isa.drq1_callback().set(I8237A5_TAG, FUNC(am9517a_device::dreq1_w)); isa.drq2_callback().set(I8237A5_TAG, FUNC(am9517a_device::dreq2_w)); isa.drq3_callback().set(I8237A5_TAG, FUNC(am9517a_device::dreq3_w)); - ISA8_SLOT(config, "isa1", 0, ISA_BUS_TAG, pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, ISA_BUS_TAG, pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, ISA_BUS_TAG, pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, ISA_BUS_TAG, pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa5", 0, ISA_BUS_TAG, pc1640_isa8_cards, "iga", false); + ISA8_SLOT(config, "isa1", ISA_BUS_TAG, pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", ISA_BUS_TAG, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", ISA_BUS_TAG, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", ISA_BUS_TAG, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa5", ISA_BUS_TAG, pc1640_isa8_cards, "iga", false); // internal ram RAM(config, RAM_TAG).set_default_size("640K"); diff --git a/src/mame/amstrad/pc1512kb.cpp b/src/mame/amstrad/pc1512kb.cpp index febc7d917f9..eaaef64f11a 100644 --- a/src/mame/amstrad/pc1512kb.cpp +++ b/src/mame/amstrad/pc1512kb.cpp @@ -201,7 +201,7 @@ ioport_constructor pc1512_keyboard_device::device_input_ports() const // pc1512_keyboard_device - constructor //------------------------------------------------- -pc1512_keyboard_device::pc1512_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc1512_keyboard_device::pc1512_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC1512_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8048_TAG), m_joy(*this, "joy"), diff --git a/src/mame/amstrad/pc1512kb.h b/src/mame/amstrad/pc1512kb.h index d6a69f29061..bf9b51f9404 100644 --- a/src/mame/amstrad/pc1512kb.h +++ b/src/mame/amstrad/pc1512kb.h @@ -34,7 +34,7 @@ class pc1512_keyboard_device : public device_t { public: // construction/destruction - pc1512_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc1512_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto clock_wr_callback() { return m_write_clock.bind(); } auto data_wr_callback() { return m_write_data.bind(); } diff --git a/src/mame/amstrad/pcw.cpp b/src/mame/amstrad/pcw.cpp index 2966b14a50a..1d7676a1238 100644 --- a/src/mame/amstrad/pcw.cpp +++ b/src/mame/amstrad/pcw.cpp @@ -1252,7 +1252,7 @@ void pcw_state::pcw(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pcw_state::pcw_map); m_maincpu->set_addrmap(AS_IO, &pcw_state::pcw_io); - I8041AH(config, m_printer_mcu, 11000000); // 11MHz + I8041AH(config, m_printer_mcu, XTAL::u(11000000)); // 11MHz m_printer_mcu->p2_in_cb().set(FUNC(pcw_state::mcu_printer_p2_r)); m_printer_mcu->p2_out_cb().set(FUNC(pcw_state::mcu_printer_p2_w)); m_printer_mcu->p1_in_cb().set(FUNC(pcw_state::mcu_printer_p1_r)); @@ -1260,7 +1260,7 @@ void pcw_state::pcw(machine_config &config) m_printer_mcu->t1_in_cb().set(FUNC(pcw_state::mcu_printer_t1_r)); m_printer_mcu->t0_in_cb().set(FUNC(pcw_state::mcu_printer_t0_r)); - I8048(config, m_keyboard_mcu, 5000000); // 5MHz + I8048(config, m_keyboard_mcu, XTAL::u(5000000)); // 5MHz m_keyboard_mcu->p1_in_cb().set(FUNC(pcw_state::mcu_kb_scan_r)); m_keyboard_mcu->p1_out_cb().set(FUNC(pcw_state::mcu_kb_scan_w)); m_keyboard_mcu->p2_in_cb().set(FUNC(pcw_state::mcu_kb_scan_high_r)); @@ -1284,9 +1284,9 @@ void pcw_state::pcw(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 3750).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(3750)).add_route(ALL_OUTPUTS, "mono", 1.00); - UPD765A(config, m_fdc, 4'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(4'000'000), true, true); m_fdc->intrq_wr_callback().set(FUNC(pcw_state::pcw_fdc_interrupt)); SOFTWARE_LIST(config, "disk_list").set_original("pcw"); @@ -1294,7 +1294,7 @@ void pcw_state::pcw(machine_config &config) /* internal ram */ RAM(config, m_ram).set_default_size("256K"); - TIMER(config, "pcw_timer", 0).configure_periodic(FUNC(pcw_state::pcw_timer_interrupt), attotime::from_hz(300)); + TIMER(config, "pcw_timer").configure_periodic(FUNC(pcw_state::pcw_timer_interrupt), attotime::from_hz(300)); } void pcw_state::pcw8256(machine_config &config) diff --git a/src/mame/amstrad/pcw16.cpp b/src/mame/amstrad/pcw16.cpp index 30269417e00..c83cb64d685 100644 --- a/src/mame/amstrad/pcw16.cpp +++ b/src/mame/amstrad/pcw16.cpp @@ -1008,7 +1008,7 @@ static void pcw16_com(device_slot_interface &device) void pcw16_state::pcw16(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 16000000); + Z80(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pcw16_state::pcw16_map); m_maincpu->set_addrmap(AS_IO, &pcw16_state::pcw16_io); config.set_maximum_quantum(attotime::from_hz(60)); @@ -1051,7 +1051,7 @@ void pcw16_state::pcw16(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 3750).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(3750)).add_route(ALL_OUTPUTS, "mono", 1.00); /* printer */ pc_lpt_device &lpt(PC_LPT(config, "lpt")); diff --git a/src/mame/apf/apf.cpp b/src/mame/apf/apf.cpp index d806253d1a1..2df11e50f27 100644 --- a/src/mame/apf/apf.cpp +++ b/src/mame/apf/apf.cpp @@ -563,7 +563,7 @@ void apf_state::apfm1000(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpa_handler().set(FUNC(apf_state::pia0_porta_r)); m_pia0->writepb_handler().set(FUNC(apf_state::pia0_portb_w)); m_pia0->ca2_handler().set(FUNC(apf_state::pia0_ca2_w)); @@ -585,7 +585,7 @@ void apf_state::apfimag(machine_config &config) /* internal ram */ RAM(config, RAM_TAG).set_default_size("8K").set_extra_options("16K"); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set(FUNC(apf_state::pia1_porta_r)); m_pia1->readpb_handler().set(FUNC(apf_state::pia1_portb_r)); m_pia1->writepb_handler().set(FUNC(apf_state::pia1_portb_w)); @@ -596,7 +596,7 @@ void apf_state::apfimag(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.15); m_cass->set_interface("apf_cass"); - FD1771(config, m_fdc, 1000000); // guess + FD1771(config, m_fdc, XTAL::u(1000000)); // guess FLOPPY_CONNECTOR(config, "fdc:0", apf_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", apf_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); diff --git a/src/mame/apollo/apollo.cpp b/src/mame/apollo/apollo.cpp index 2debb4d6c46..d3fbf2bf29a 100644 --- a/src/mame/apollo/apollo.cpp +++ b/src/mame/apollo/apollo.cpp @@ -1047,7 +1047,7 @@ READ_LINE_MEMBER( apollo_state::apollo_kbd_is_german ) void apollo_state::dn3500(machine_config &config) { /* basic machine hardware */ - M68030(config, m_maincpu, 25000000); /* 25 MHz 68030 */ + M68030(config, m_maincpu, XTAL::u(25000000)); /* 25 MHz 68030 */ m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dn3500_map); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map); @@ -1059,14 +1059,14 @@ void apollo_state::dn3500(machine_config &config) RAM(config, m_ram).set_default_size("8M").set_extra_options("4M,8M,16M,32M"); #ifdef APOLLO_XXL - apollo_stdio_device &stdio(APOLLO_STDIO(config, APOLLO_STDIO_TAG, 0)); + apollo_stdio_device &stdio(APOLLO_STDIO(config, APOLLO_STDIO_TAG)); stdio.tx_cb().set(m_sio, FUNC(apollo_sio::rx_b_w)); #endif } void apollo_state::dsp3500(machine_config &config) { - M68030(config, m_maincpu, 25000000); /* 25 MHz 68030 */ + M68030(config, m_maincpu, XTAL::u(25000000)); /* 25 MHz 68030 */ m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dsp3500_map); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map); config.set_maximum_quantum(attotime::from_hz(60)); @@ -1084,8 +1084,8 @@ void apollo_state::dn3500_19i(machine_config &config) { dn3500(config); /* video hardware 19" monochrome */ - APOLLO_MONO19I(config, m_graphics, 0); - APOLLO_KBD(config, m_keyboard, 0); + APOLLO_MONO19I(config, m_graphics); + APOLLO_KBD(config, m_keyboard); m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w)); m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german)); } @@ -1094,8 +1094,8 @@ void apollo_state::dn3500_15i(machine_config &config) { dn3500(config); /* video hardware is 15" monochrome or color */ - APOLLO_GRAPHICS(config, m_graphics, 0); - APOLLO_KBD(config, m_keyboard, 0); + APOLLO_GRAPHICS(config, m_graphics); + APOLLO_KBD(config, m_keyboard); m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w)); m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german)); } @@ -1103,7 +1103,7 @@ void apollo_state::dn3500_15i(machine_config &config) void apollo_state::dn3000(machine_config &config) { dn3500(config); - M68020PMMU(config.replace(), m_maincpu, 12000000); /* 12 MHz */ + M68020PMMU(config.replace(), m_maincpu, XTAL::u(12000000)); /* 12 MHz */ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map); m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dn3000_map); config.device_remove( APOLLO_SIO2_TAG ); @@ -1115,7 +1115,7 @@ void apollo_state::dn3000(machine_config &config) void apollo_state::dsp3000(machine_config &config) { - M68020PMMU(config, m_maincpu, 12000000); /* 12 MHz */ + M68020PMMU(config, m_maincpu, XTAL::u(12000000)); /* 12 MHz */ m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map); m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dsp3000_map); config.set_maximum_quantum(attotime::from_hz(60)); @@ -1135,8 +1135,8 @@ void apollo_state::dn3000_19i(machine_config &config) { dn3000(config); /* video hardware 19" monochrome */ - APOLLO_MONO19I(config, m_graphics, 0); - APOLLO_KBD(config, m_keyboard, 0); + APOLLO_MONO19I(config, m_graphics); + APOLLO_KBD(config, m_keyboard); m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w)); m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german)); } @@ -1145,8 +1145,8 @@ void apollo_state::dn3000_15i(machine_config &config) { dn3000(config); /* video hardware 15" monochrome */ - APOLLO_GRAPHICS(config, m_graphics, 0); - APOLLO_KBD(config, m_keyboard, 0); + APOLLO_GRAPHICS(config, m_graphics); + APOLLO_KBD(config, m_keyboard); m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w)); m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german)); } @@ -1154,13 +1154,13 @@ void apollo_state::dn3000_15i(machine_config &config) void apollo_state::dn5500(machine_config &config) { dn3500(config); - M68040(config.replace(), m_maincpu, 25000000); /* 25 MHz */ + M68040(config.replace(), m_maincpu, XTAL::u(25000000)); /* 25 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dn5500_map); } void apollo_state::dsp5500(machine_config &config) { - M68040(config, m_maincpu, 25000000); /* 25 MHz */ + M68040(config, m_maincpu, XTAL::u(25000000)); /* 25 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &apollo_state::dsp5500_map); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &apollo_state::cpu_space_map); config.set_maximum_quantum(attotime::from_hz(60)); @@ -1179,8 +1179,8 @@ void apollo_state::dn5500_19i(machine_config &config) { dn5500(config); /* video hardware 19" monochrome */ - APOLLO_MONO19I(config, m_graphics, 0); - APOLLO_KBD(config, m_keyboard, 0); + APOLLO_MONO19I(config, m_graphics); + APOLLO_KBD(config, m_keyboard); m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w)); m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german)); } @@ -1189,8 +1189,8 @@ void apollo_state::dn5500_15i(machine_config &config) { dn5500(config); /* video hardware 15" monochrome */ - APOLLO_GRAPHICS(config, m_graphics, 0); - APOLLO_KBD(config, m_keyboard, 0); + APOLLO_GRAPHICS(config, m_graphics); + APOLLO_KBD(config, m_keyboard); m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w)); m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german)); } diff --git a/src/mame/apollo/apollo.h b/src/mame/apollo/apollo.h index cbbad59d4fa..46be8f71399 100644 --- a/src/mame/apollo/apollo.h +++ b/src/mame/apollo/apollo.h @@ -353,7 +353,7 @@ void apollo_csr_set_status_register(uint16_t mask, uint16_t data); class apollo_sio: public duart_base_device { public: - apollo_sio(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apollo_sio(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -376,7 +376,7 @@ class apollo_ni: public device_t, public device_image_interface { public: // construction/destruction - apollo_ni(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apollo_ni(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~apollo_ni(); // image-level overrides @@ -417,7 +417,7 @@ DECLARE_DEVICE_TYPE(APOLLO_NI, apollo_ni) class apollo_graphics_15i : public device_t { public: - apollo_graphics_15i(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apollo_graphics_15i(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~apollo_graphics_15i(); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -447,7 +447,7 @@ public: protected: required_device m_screen; - apollo_graphics_15i(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + apollo_graphics_15i(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -655,7 +655,7 @@ DECLARE_DEVICE_TYPE(APOLLO_GRAPHICS, apollo_graphics_15i) class apollo_graphics_19i : public apollo_graphics_15i { public: - apollo_graphics_19i(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apollo_graphics_19i(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides virtual void device_start() override; @@ -684,7 +684,7 @@ class apollo_stdio_device: public device_t, public device_serial_interface public: // construction/destruction apollo_stdio_device(const machine_config &mconfig, const char *tag, - device_t *owner, uint32_t clock); + device_t *owner, const XTAL &clock); auto tx_cb() { return m_tx_w.bind(); } diff --git a/src/mame/apollo/apollo_kbd.cpp b/src/mame/apollo/apollo_kbd.cpp index 8d43814ee31..dd104c6c40c 100644 --- a/src/mame/apollo/apollo_kbd.cpp +++ b/src/mame/apollo/apollo_kbd.cpp @@ -186,7 +186,7 @@ DEFINE_DEVICE_TYPE(APOLLO_KBD, apollo_kbd_device, "apollo_kbd", "Apollo Keyboard // apollo_kbd_device - constructor //------------------------------------------------- -apollo_kbd_device::apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apollo_kbd_device::apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APOLLO_KBD, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_beep(*this, "beep") @@ -206,7 +206,7 @@ void apollo_kbd_device::device_add_mconfig(machine_config &config) { /* keyboard beeper */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 1000).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 1.00); } //------------------------------------------------- @@ -269,8 +269,8 @@ void apollo_kbd_device::device_reset() // keyboard comms is at 8E1, 1200 baud set_data_frame(1, 8, PARITY_EVEN, STOP_BITS_1); - set_rcv_rate(1200); - set_tra_rate(1200); + set_rcv_rate(XTAL::u(1200)); + set_tra_rate(XTAL::u(1200)); m_tx_busy = false; m_xmit_read = m_xmit_write = 0; diff --git a/src/mame/apollo/apollo_kbd.h b/src/mame/apollo/apollo_kbd.h index bb3027663ae..b2095bafac3 100644 --- a/src/mame/apollo/apollo_kbd.h +++ b/src/mame/apollo/apollo_kbd.h @@ -38,7 +38,7 @@ class apollo_kbd_device : public device_t, public device_serial_interface { public: // construction/destruction - apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto tx_cb() { return m_tx_w.bind(); } auto german_cb() { return m_german_r.bind(); } diff --git a/src/mame/apollo/apollo_m.cpp b/src/mame/apollo/apollo_m.cpp index 554fd9e3db4..d0c5fbd01d4 100644 --- a/src/mame/apollo/apollo_m.cpp +++ b/src/mame/apollo/apollo_m.cpp @@ -128,7 +128,7 @@ INPUT_PORTS_END class apollo_config_device : public device_t { public: - apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides virtual void device_start() override; @@ -139,7 +139,7 @@ private: DEFINE_DEVICE_TYPE(APOLLO_CONF, apollo_config_device, "apollo_config", "Apollo Configuration") -apollo_config_device::apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apollo_config_device::apollo_config_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APOLLO_CONF, tag, owner, clock) { } @@ -700,7 +700,7 @@ WRITE_LINE_MEMBER(apollo_state::apollo_rtc_irq_function) #undef VERBOSE #define VERBOSE 0 -apollo_sio::apollo_sio(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apollo_sio::apollo_sio(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, APOLLO_SIO, tag, owner, clock), m_csrb(0) { @@ -847,7 +847,7 @@ DEFINE_DEVICE_TYPE(APOLLO_NI, apollo_ni, "node_id", "Apollo Node ID") // apollo_ni - constructor //------------------------------------------------- -apollo_ni::apollo_ni(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apollo_ni::apollo_ni(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APOLLO_NI, tag, owner, clock), device_image_interface(mconfig, *this), m_wdc(*this, ":isa1:wdc") @@ -1055,7 +1055,7 @@ static void apollo_isa_cards(device_slot_interface &device) void apollo_state::common(machine_config &config) { // configuration MUST be reset first ! - APOLLO_CONF(config, APOLLO_CONF_TAG, 0); + APOLLO_CONF(config, APOLLO_CONF_TAG); AM9517A(config, m_dma8237_1, 14.318181_MHz_XTAL / 3); m_dma8237_1->out_hreq_callback().set(FUNC(apollo_state::apollo_dma_1_hrq_changed)); @@ -1090,20 +1090,20 @@ void apollo_state::common(machine_config &config) m_dma8237_2->out_dack_callback<2>().set(FUNC(apollo_state::pc_dack6_w)); m_dma8237_2->out_dack_callback<3>().set(FUNC(apollo_state::pc_dack7_w)); - PIC8259(config, m_pic8259_master, 0); + PIC8259(config, m_pic8259_master); m_pic8259_master->out_int_callback().set(FUNC(apollo_state::apollo_pic8259_master_set_int_line)); m_pic8259_master->in_sp_callback().set_constant(1); m_pic8259_master->read_slave_ack_callback().set(FUNC(apollo_state::apollo_pic8259_get_slave_ack)); - PIC8259(config, m_pic8259_slave, 0); + PIC8259(config, m_pic8259_slave); m_pic8259_slave->out_int_callback().set(FUNC(apollo_state::apollo_pic8259_slave_set_int_line)); m_pic8259_slave->in_sp_callback().set_constant(0); - PTM6840(config, m_ptm, 0); - m_ptm->set_external_clocks(250000, 125000, 62500); + PTM6840(config, m_ptm); + m_ptm->set_external_clocks(XTAL::u(250000), XTAL::u(125000), XTAL::u(62500)); m_ptm->irq_callback().set(FUNC(apollo_state::apollo_ptm_irq_function)); - clock_device &ptmclock(CLOCK(config, "ptmclock", 250000)); + clock_device &ptmclock(CLOCK(config, "ptmclock", XTAL::u(250000))); ptmclock.signal_handler().set(FUNC(apollo_state::apollo_ptm_timer_tick)); MC146818(config, m_rtc, 32.768_kHz_XTAL); @@ -1114,12 +1114,12 @@ void apollo_state::common(machine_config &config) m_rtc->set_24hrs(false); m_rtc->set_epoch(0); - APOLLO_NI(config, m_node_id, 0); + APOLLO_NI(config, m_node_id); APOLLO_SIO(config, m_sio2, 3.6864_MHz_XTAL); m_sio2->irq_cb().set(FUNC(apollo_state::sio2_irq_handler)); - ISA16(config, m_isa, 0); + ISA16(config, m_isa); m_isa->set_custom_spaces(); m_isa->irq2_callback().set(m_pic8259_slave, FUNC(pic8259_device::ir1_w)); // in place of irq 2 on at irq 9 is used m_isa->irq3_callback().set(m_pic8259_master, FUNC(pic8259_device::ir3_w)); @@ -1140,13 +1140,13 @@ void apollo_state::common(machine_config &config) m_isa->drq6_callback().set(m_dma8237_2, FUNC(am9517a_device::dreq2_w)); m_isa->drq7_callback().set(m_dma8237_2, FUNC(am9517a_device::dreq3_w)); - ISA16_SLOT(config, "isa1", 0, APOLLO_ISA_TAG, apollo_isa_cards, "wdc", false); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa2", 0, APOLLO_ISA_TAG, apollo_isa_cards, "ctape", false); - ISA16_SLOT(config, "isa3", 0, APOLLO_ISA_TAG, apollo_isa_cards, "3c505", false); - ISA16_SLOT(config, "isa4", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); - ISA16_SLOT(config, "isa6", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); - ISA16_SLOT(config, "isa7", 0, APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); + ISA16_SLOT(config, "isa1", APOLLO_ISA_TAG, apollo_isa_cards, "wdc", false); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "isa2", APOLLO_ISA_TAG, apollo_isa_cards, "ctape", false); + ISA16_SLOT(config, "isa3", APOLLO_ISA_TAG, apollo_isa_cards, "3c505", false); + ISA16_SLOT(config, "isa4", APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); + ISA16_SLOT(config, "isa5", APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); + ISA16_SLOT(config, "isa6", APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); + ISA16_SLOT(config, "isa7", APOLLO_ISA_TAG, apollo_isa_cards, nullptr, false); SOFTWARE_LIST(config, "ctape_list").set_original("apollo_ctape"); } @@ -1259,7 +1259,7 @@ DEFINE_DEVICE_TYPE(APOLLO_STDIO, apollo_stdio_device, "apollo_stdio", "Apollo ST // apollo_stdio_device - constructor //------------------------------------------------- -apollo_stdio_device::apollo_stdio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apollo_stdio_device::apollo_stdio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APOLLO_STDIO, tag, owner, clock), device_serial_interface(mconfig, *this), m_tx_w(*this) @@ -1289,8 +1289,8 @@ void apollo_stdio_device::device_reset() // comms is at 8N1, 9600 baud set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(9600); - set_tra_rate(9600); + set_rcv_rate(XTAL::u(9600)); + set_tra_rate(XTAL::u(9600)); m_tx_busy = false; m_xmit_read = m_xmit_write = 0; diff --git a/src/mame/apollo/apollo_v.cpp b/src/mame/apollo/apollo_v.cpp index f8b4f0551a8..940e27aa6d5 100644 --- a/src/mame/apollo/apollo_v.cpp +++ b/src/mame/apollo/apollo_v.cpp @@ -1717,18 +1717,18 @@ void apollo_graphics_15i::device_add_mconfig(machine_config &config) config.set_default_layout(layout_apollo_15i); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); - m_screen->set_raw(68000000, 1346, 0, 1024, 841, 0, 800); + m_screen->set_raw(XTAL::u(68000000), 1346, 0, 1024, 841, 0, 800); m_screen->set_screen_update(FUNC(apollo_graphics_15i::screen_update)); } DEFINE_DEVICE_TYPE(APOLLO_GRAPHICS, apollo_graphics_15i, "apollo_graphics_15i", "Apollo Screen") -apollo_graphics_15i::apollo_graphics_15i(const machine_config &mconfig,const char *tag, device_t *owner, uint32_t clock) : +apollo_graphics_15i::apollo_graphics_15i(const machine_config &mconfig,const char *tag, device_t *owner, const XTAL &clock) : apollo_graphics_15i(mconfig, APOLLO_GRAPHICS, tag, owner, clock) { } -apollo_graphics_15i::apollo_graphics_15i(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +apollo_graphics_15i::apollo_graphics_15i(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_screen(*this, VIDEO_SCREEN_TAG) { @@ -1881,13 +1881,13 @@ void apollo_graphics_19i::device_add_mconfig(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); - m_screen->set_raw(120000000, 1728, 0, 1280, 1066, 0, 1024); + m_screen->set_raw(XTAL::u(120000000), 1728, 0, 1280, 1066, 0, 1024); m_screen->set_screen_update(FUNC(apollo_graphics_19i::screen_update)); } DEFINE_DEVICE_TYPE(APOLLO_MONO19I, apollo_graphics_19i, "apollo_graphics_19i", "Apollo 19\" Monochrome Screen") -apollo_graphics_19i::apollo_graphics_19i(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +apollo_graphics_19i::apollo_graphics_19i(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : apollo_graphics_15i(mconfig, APOLLO_MONO19I, tag, owner, clock) { } diff --git a/src/mame/apple/adbmodem.cpp b/src/mame/apple/adbmodem.cpp index a0e787f2493..4be7e1389b8 100644 --- a/src/mame/apple/adbmodem.cpp +++ b/src/mame/apple/adbmodem.cpp @@ -95,7 +95,7 @@ void adbmodem_device::adb_change() // adbmodem_device - constructor //------------------------------------------------- -adbmodem_device::adbmodem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adbmodem_device::adbmodem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADBMODEM, tag, owner, clock), write_reset(*this), write_linechange(*this), diff --git a/src/mame/apple/adbmodem.h b/src/mame/apple/adbmodem.h index e27ec122940..f9432de45a3 100644 --- a/src/mame/apple/adbmodem.h +++ b/src/mame/apple/adbmodem.h @@ -20,12 +20,12 @@ class adbmodem_device : public device_t public: // construction/destruction adbmodem_device(const machine_config &mconfig, const char *tag, device_t *owner, int type) - : adbmodem_device(mconfig, tag, owner, (uint32_t)0) + : adbmodem_device(mconfig, tag, owner) { set_type(type); } - adbmodem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adbmodem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void set_type(int type) { rom_offset = type; } diff --git a/src/mame/apple/apple1.cpp b/src/mame/apple/apple1.cpp index 418c333779f..22192d670ae 100644 --- a/src/mame/apple/apple1.cpp +++ b/src/mame/apple/apple1.cpp @@ -590,7 +590,7 @@ static void apple1_cards(device_slot_interface &device) void apple1_state::apple1(machine_config &config) { - M6502(config, m_maincpu, 960000); // effective CPU speed + M6502(config, m_maincpu, XTAL::u(960000)); // effective CPU speed m_maincpu->set_addrmap(AS_PROGRAM, &apple1_state::apple1_map); // video timings are identical to the Apple II, unsurprisingly @@ -601,13 +601,13 @@ void apple1_state::apple1(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(apple1_state::pia_keyboard_r)); m_pia->writepb_handler().set(FUNC(apple1_state::pia_display_w)); m_pia->cb2_handler().set(FUNC(apple1_state::pia_display_gate_w)); - A1BUS(config, A1_BUS_TAG, 0).set_space(m_maincpu, AS_PROGRAM); - A1BUS_SLOT(config, "exp", 0, A1_BUS_TAG, apple1_cards, "cassette"); + A1BUS(config, A1_BUS_TAG).set_space(m_maincpu, AS_PROGRAM); + A1BUS_SLOT(config, "exp", A1_BUS_TAG, apple1_cards, "cassette"); SNAPSHOT(config, "snapshot", "snp").set_load_callback(FUNC(apple1_state::snapshot_cb)); diff --git a/src/mame/apple/apple2.cpp b/src/mame/apple/apple2.cpp index 61617c21b1a..3b676101024 100644 --- a/src/mame/apple/apple2.cpp +++ b/src/mame/apple/apple2.cpp @@ -1235,11 +1235,11 @@ INPUT_PORTS_END void apple2_state::apple2_common(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1021800); + M6502(config, m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2_state::apple2_map); m_maincpu->set_dasm_override(FUNC(apple2_state::dasm_trampoline)); - TIMER(config, m_scantimer, 0); + TIMER(config, m_scantimer); m_scantimer->configure_scanline(FUNC(apple2_state::apple2_interrupt), "screen", 0, 1); config.set_maximum_quantum(attotime::from_hz(60)); @@ -1247,7 +1247,7 @@ void apple2_state::apple2_common(machine_config &config) APPLE2_COMMON(config, m_a2common, XTAL(14'318'181)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192); + m_screen->set_raw(XTAL::u(1021800)*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192); m_screen->set_screen_update(FUNC(apple2_state::screen_update_tt)); m_screen->set_palette(m_video); @@ -1270,7 +1270,7 @@ void apple2_state::apple2_common(machine_config &config) APPLE2_GAMEIO(config, m_gameio, apple2_gameio_device::iiandplus_options, nullptr); /* keyboard controller */ - AY3600(config, m_ay3600, 0); + AY3600(config, m_ay3600); m_ay3600->x0().set_ioport("X0"); m_ay3600->x1().set_ioport("X1"); m_ay3600->x2().set_ioport("X2"); @@ -1286,10 +1286,10 @@ void apple2_state::apple2_common(machine_config &config) m_ay3600->ako().set(FUNC(apple2_state::ay3600_ako_w)); /* repeat timer. 15 Hz from page 90 of "The Apple II Circuit Description */ - TIMER(config, "repttmr", 0).configure_periodic(FUNC(apple2_state::ay3600_repeat), attotime::from_hz(15)); + TIMER(config, "repttmr").configure_periodic(FUNC(apple2_state::ay3600_repeat), attotime::from_hz(15)); /* slot devices */ - A2BUS(config, m_a2bus, 0); + A2BUS(config, m_a2bus); m_a2bus->set_space(m_maincpu, AS_PROGRAM); m_a2bus->irq_w().set(FUNC(apple2_state::a2bus_irq_w)); m_a2bus->nmi_w().set(FUNC(apple2_state::a2bus_nmi_w)); diff --git a/src/mame/apple/apple2common.cpp b/src/mame/apple/apple2common.cpp index 317f4061cc6..10340323c52 100644 --- a/src/mame/apple/apple2common.cpp +++ b/src/mame/apple/apple2common.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(APPLE2_COMMON, apple2_common_device, "apple2com", "Apple II C // apple2_common_device - constructor //------------------------------------------------- -apple2_common_device::apple2_common_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apple2_common_device::apple2_common_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_COMMON, tag, owner, clock), m_GScpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/mame/apple/apple2common.h b/src/mame/apple/apple2common.h index ba179a30ad9..c0e1ae11477 100644 --- a/src/mame/apple/apple2common.h +++ b/src/mame/apple/apple2common.h @@ -20,7 +20,7 @@ class apple2_common_device : public device_t { public: // construction/destruction - apple2_common_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apple2_common_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_GS_cputag(T &&tag) { m_GScpu.set_tag(std::forward(tag)); } diff --git a/src/mame/apple/apple2e.cpp b/src/mame/apple/apple2e.cpp index 935014e17d2..ff9b5b1d3a6 100644 --- a/src/mame/apple/apple2e.cpp +++ b/src/mame/apple/apple2e.cpp @@ -464,7 +464,7 @@ private: bool m_has_laser_mouse; bool m_laser_fdc_on; int m_accel_stage; - u32 m_accel_speed; + XTAL m_accel_speed; u8 m_accel_slotspk, m_accel_gameio, m_laser_speed; emu_timer *m_strobe_timer; @@ -1193,7 +1193,7 @@ void apple2e_state::machine_reset() if (((m_sysconfig->read() & 0x30) == 0x30) || (m_isiicplus)) { - m_accel_speed = 4000000; // Zip speed + m_accel_speed = XTAL::u(4000000); // Zip speed accel_full_speed(); m_accel_fast = true; } @@ -1201,7 +1201,7 @@ void apple2e_state::machine_reset() if (m_accel_laser) { m_accel_present = true; - m_accel_speed = 1021800; + m_accel_speed = XTAL::u(1021800); } if (m_has_laser_mouse) @@ -1422,7 +1422,7 @@ void apple2e_state::accel_full_speed() void apple2e_state::accel_normal_speed() { - m_maincpu->set_unscaled_clock(1021800); + m_maincpu->set_unscaled_clock(XTAL::u(1021800)); } void apple2e_state::accel_slot(int slot) @@ -4981,20 +4981,20 @@ static void apple2eaux_cards(device_slot_interface &device) void apple2e_state::apple2e(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1021800); + M6502(config, m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::base_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); - TIMER(config, m_scantimer, 0).configure_scanline(FUNC(apple2e_state::apple2_interrupt), "screen", 0, 1); + TIMER(config, m_scantimer).configure_scanline(FUNC(apple2e_state::apple2_interrupt), "screen", 0, 1); config.set_maximum_quantum(attotime::from_hz(60)); - TIMER(config, m_acceltimer, 0).configure_generic(FUNC(apple2e_state::accel_timer)); + TIMER(config, m_acceltimer).configure_generic(FUNC(apple2e_state::accel_timer)); APPLE2_VIDEO(config, m_video, XTAL(14'318'181)).set_screen(m_screen); APPLE2_COMMON(config, m_a2common, XTAL(14'318'181)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192); + m_screen->set_raw(XTAL::u(1021800)*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192); m_screen->set_screen_update(FUNC(apple2e_state::screen_update_ff)); m_screen->set_palette(m_video); @@ -5003,13 +5003,13 @@ void apple2e_state::apple2e(machine_config &config) SPEAKER_SOUND(config, A2_SPEAKER_TAG).add_route(ALL_OUTPUTS, "mono", 0.4); /* DS1315 for no-slot clock */ - DS1315(config, m_ds1315, 0).read_backing().set(FUNC(apple2e_state::nsc_backing_r)); + DS1315(config, m_ds1315).read_backing().set(FUNC(apple2e_state::nsc_backing_r)); /* RAM */ RAM(config, m_ram).set_default_size("64K").set_default_value(0x00); /* keyboard controller */ - ay3600_device &kbdc(AY3600(config, "ay3600", 0)); + ay3600_device &kbdc(AY3600(config, "ay3600")); kbdc.x0().set_ioport("X0"); kbdc.x1().set_ioport("X1"); kbdc.x2().set_ioport("X2"); @@ -5025,11 +5025,11 @@ void apple2e_state::apple2e(machine_config &config) kbdc.ako().set(FUNC(apple2e_state::ay3600_ako_w)); /* repeat timer. 15 Hz from page 7-15 of "Understanding the Apple IIe" */ - timer_device &timer(TIMER(config, "repttmr", 0)); + timer_device &timer(TIMER(config, "repttmr")); timer.configure_periodic(FUNC(apple2e_state::ay3600_repeat), attotime::from_hz(15)); /* slot devices */ - A2BUS(config, m_a2bus, 0); + A2BUS(config, m_a2bus); m_a2bus->set_space(m_maincpu, AS_PROGRAM); m_a2bus->irq_w().set(FUNC(apple2e_state::a2bus_irq_w)); m_a2bus->nmi_w().set(FUNC(apple2e_state::a2bus_nmi_w)); @@ -5043,7 +5043,7 @@ void apple2e_state::apple2e(machine_config &config) A2BUS_SLOT(config, "sl6", m_a2bus, apple2e_cards, "diskiing"); A2BUS_SLOT(config, "sl7", m_a2bus, apple2e_cards, nullptr); - A2EAUXSLOT(config, m_a2eauxslot, 0); + A2EAUXSLOT(config, m_a2eauxslot); m_a2eauxslot->set_space(m_maincpu, AS_PROGRAM); m_a2eauxslot->out_irq_callback().set(FUNC(apple2e_state::a2bus_irq_w)); m_a2eauxslot->out_nmi_callback().set(FUNC(apple2e_state::a2bus_nmi_w)); @@ -5065,10 +5065,10 @@ void apple2e_state::apple2e(machine_config &config) void apple2e_state::apple2epal(machine_config &config) { apple2e(config); - M6502(config.replace(), m_maincpu, 1016966); + M6502(config.replace(), m_maincpu, XTAL::u(1016966)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::base_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); - m_screen->set_raw(1016966 * 14, (65 * 7) * 2, 0, (40 * 7) * 2, 312, 0, 192); + m_screen->set_raw(XTAL::u(1016966) * 14, (65 * 7) * 2, 0, (40 * 7) * 2, 312, 0, 192); } void apple2e_state::mprof3(machine_config &config) @@ -5083,7 +5083,7 @@ void apple2e_state::apple2ee(machine_config &config) apple2e(config); subdevice("flop_a2_orig")->set_filter("A2EE"); // Filter list to compatible disks for this machine. - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::base_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); } @@ -5091,11 +5091,11 @@ void apple2e_state::apple2ee(machine_config &config) void apple2e_state::apple2eepal(machine_config &config) { apple2ee(config); - M65C02(config.replace(), m_maincpu, 1016966); + M65C02(config.replace(), m_maincpu, XTAL::u(1016966)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::base_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); - m_screen->set_raw(1016966 * 14, (65 * 7) * 2, 0, (40 * 7) * 2, 312, 0, 192); + m_screen->set_raw(XTAL::u(1016966) * 14, (65 * 7) * 2, 0, (40 * 7) * 2, 312, 0, 192); } void apple2e_state::spectred(machine_config &config) @@ -5112,17 +5112,17 @@ void apple2e_state::spectred(machine_config &config) void apple2e_state::tk3000(machine_config &config) { apple2e(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::base_map); -// z80_device &subcpu(Z80(config, "subcpu", 1021800)); // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock +// z80_device &subcpu(Z80(config, "subcpu", XTAL::u(1021800))); // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock // subcpu.set_addrmap(AS_PROGRAM, &apple2e_state::tk3000_kbd_map); } void apple2e_state::apple2ep(machine_config &config) { apple2e(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::base_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); } @@ -5132,7 +5132,7 @@ void apple2e_state::apple2c(machine_config &config) apple2ee(config); subdevice("flop_a2_orig")->set_filter("A2C"); // Filter list to compatible disks for this machine. - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2c_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); @@ -5147,12 +5147,12 @@ void apple2e_state::apple2c(machine_config &config) config.device_remove("sl6"); config.device_remove("sl7"); - MOS6551(config, m_acia1, 0); + MOS6551(config, m_acia1); m_acia1->set_xtal(XTAL(14'318'181) / 8); // ~1.789 MHz m_acia1->txd_handler().set(PRINTER_PORT_TAG, FUNC(rs232_port_device::write_txd)); m_acia1->irq_handler().set(FUNC(apple2e_state::a2bus_irq_w)); - MOS6551(config, m_acia2, 0); + MOS6551(config, m_acia2); m_acia2->set_xtal(1.8432_MHz_XTAL); // matches SSC so modem software is compatible m_acia2->txd_handler().set("modem", FUNC(rs232_port_device::write_txd)); m_acia2->irq_handler().set(FUNC(apple2e_state::a2bus_irq_w)); @@ -5182,14 +5182,14 @@ void apple2e_state::apple2c(machine_config &config) void apple2e_state::apple2cp(machine_config &config) { apple2c(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2c_memexp_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); config.device_remove("sl4"); config.device_remove("sl6"); - IWM(config, m_iwm, A2BUS_7M_CLOCK, 1021800*2); + IWM(config, m_iwm, A2BUS_7M_CLOCK, XTAL::u(1021800)*2); m_iwm->phases_cb().set(FUNC(apple2e_state::phases_w)); m_iwm->sel35_cb().set(FUNC(apple2e_state::sel35_w)); m_iwm->devsel_cb().set(FUNC(apple2e_state::devsel_w)); @@ -5213,7 +5213,7 @@ void apple2e_state::apple2c_iwm(machine_config &config) void apple2e_state::apple2c_mem(machine_config &config) { apple2c(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::apple2c_memexp_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); @@ -5226,7 +5226,7 @@ void apple2e_state::apple2c_mem(machine_config &config) void apple2e_state::laser128(machine_config &config) { apple2c(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::laser128_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); @@ -5261,7 +5261,7 @@ void apple2e_state::laser128(machine_config &config) void apple2e_state::laser128o(machine_config &config) { apple2c(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::laser128_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); @@ -5297,7 +5297,7 @@ void apple2e_state::laser128o(machine_config &config) void apple2e_state::laser128ex2(machine_config &config) { apple2c(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::laser128_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); @@ -5334,7 +5334,7 @@ void apple2e_state::ace500(machine_config &config) apple2ee(config); subdevice("flop_a2_orig")->set_filter("A2C"); // Filter list to compatible disks for this machine. - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::ace500_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); @@ -5345,7 +5345,7 @@ void apple2e_state::ace500(machine_config &config) OUTPUT_LATCH(config, m_printer_out); m_printer_conn->set_output_latch(*m_printer_out); - MOS6551(config, m_acia1, 0); + MOS6551(config, m_acia1); m_acia1->set_xtal(1.8432_MHz_XTAL); m_acia1->txd_handler().set(MODEM_PORT_TAG, FUNC(rs232_port_device::write_txd)); m_acia1->irq_handler().set(FUNC(apple2e_state::a2bus_irq_w)); @@ -5376,7 +5376,7 @@ void apple2e_state::ace500(machine_config &config) void apple2e_state::ace2200(machine_config &config) { apple2e(config); - M65C02(config.replace(), m_maincpu, 1021800); + M65C02(config.replace(), m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &apple2e_state::ace2200_map); m_maincpu->set_dasm_override(FUNC(apple2e_state::dasm_trampoline)); diff --git a/src/mame/apple/apple2gs.cpp b/src/mame/apple/apple2gs.cpp index 6ba277355d1..821e1ab74e2 100644 --- a/src/mame/apple/apple2gs.cpp +++ b/src/mame/apple/apple2gs.cpp @@ -574,7 +574,7 @@ private: bool m_accel_present = false; bool m_accel_temp_slowdown = false; int m_accel_stage = 0; - u32 m_accel_speed = 0; + XTAL m_accel_speed = XTAL(); u8 m_accel_slotspk = 0, m_accel_gsxsettings = 0, m_accel_percent = 0; void accel_full_speed() @@ -597,7 +597,7 @@ private: } else { - m_maincpu->set_unscaled_clock(1021800); + m_maincpu->set_unscaled_clock(XTAL::u(1021800)); } } @@ -621,7 +621,7 @@ private: } else { - m_maincpu->set_unscaled_clock(1021800); + m_maincpu->set_unscaled_clock(XTAL::u(1021800)); } } @@ -1646,7 +1646,7 @@ void apple2gs_state::machine_reset() static const int speeds[4] = { 7000000, 8000000, 12000000, 16000000 }; m_accel_present = true; int idxSpeed = (m_sysconfig->read() >> 1); - m_accel_speed = speeds[idxSpeed]; + m_accel_speed = XTAL::u(speeds[idxSpeed]); m_accel_fast = true; accel_full_speed(); } @@ -4833,10 +4833,10 @@ void apple2gs_state::apple2gs(machine_config &config) m_maincpu->set_addrmap(g65816_device::AS_VECTORS, &apple2gs_state::vectors_map); m_maincpu->set_dasm_override(FUNC(apple2gs_state::dasm_trampoline)); m_maincpu->wdm_handler().set(FUNC(apple2gs_state::wdm_trampoline)); - TIMER(config, m_scantimer, 0); + TIMER(config, m_scantimer); m_scantimer->configure_scanline(FUNC(apple2gs_state::apple2_interrupt), "screen", 0, 1); - TIMER(config, m_acceltimer, 0).configure_generic(FUNC(apple2gs_state::accel_timer)); + TIMER(config, m_acceltimer).configure_generic(FUNC(apple2gs_state::accel_timer)); config.set_maximum_quantum(attotime::from_hz(60)); @@ -4858,7 +4858,7 @@ void apple2gs_state::apple2gs(machine_config &config) #if !RUN_ADB_MICRO /* keyboard controller */ - AY3600(config, m_ay3600, 0); + AY3600(config, m_ay3600); m_ay3600->x0().set_ioport("X0"); m_ay3600->x1().set_ioport("X1"); m_ay3600->x2().set_ioport("X2"); @@ -4920,7 +4920,7 @@ void apple2gs_state::apple2gs(machine_config &config) /* serial */ SCC85C30(config, m_scc, A2GS_14M / 2); - m_scc->configure_channels(3'686'400, 3'686'400, 3'686'400, 3'686'400); + m_scc->configure_channels(XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400)); m_scc->out_int_callback().set(FUNC(apple2gs_state::scc_irq_w)); m_scc->out_txda_callback().set("printer", FUNC(rs232_port_device::write_txd)); m_scc->out_txdb_callback().set("modem", FUNC(rs232_port_device::write_txd)); @@ -4936,7 +4936,7 @@ void apple2gs_state::apple2gs(machine_config &config) rs232b.cts_handler().set(m_scc, FUNC(z80scc_device::ctsb_w)); /* slot devices */ - A2BUS(config, m_a2bus, 0); + A2BUS(config, m_a2bus); m_a2bus->set_space(m_maincpu, AS_PROGRAM); m_a2bus->irq_w().set(FUNC(apple2gs_state::a2bus_irq_w)); m_a2bus->nmi_w().set(FUNC(apple2gs_state::a2bus_nmi_w)); diff --git a/src/mame/apple/apple2video.cpp b/src/mame/apple/apple2video.cpp index edfd0bd5a1d..fa26c939b1f 100644 --- a/src/mame/apple/apple2video.cpp +++ b/src/mame/apple/apple2video.cpp @@ -39,7 +39,7 @@ DEFINE_DEVICE_TYPE(APPLE2_VIDEO, a2_video_device, "a2video", "Apple II video") // a2_video_device - constructor //------------------------------------------------- -a2_video_device::a2_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +a2_video_device::a2_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLE2_VIDEO, tag, owner, clock) , device_palette_interface(mconfig, *this) , device_video_interface(mconfig, *this) diff --git a/src/mame/apple/apple2video.h b/src/mame/apple/apple2video.h index 21a1eb8f9e0..379df89688e 100644 --- a/src/mame/apple/apple2video.h +++ b/src/mame/apple/apple2video.h @@ -19,7 +19,7 @@ class a2_video_device : public device_t, public device_palette_interface, public { public: // construction/destruction - a2_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + a2_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bool m_page2 = false; bool m_flash = false; diff --git a/src/mame/apple/apple3.cpp b/src/mame/apple/apple3.cpp index 36968d01fdc..e1ba4d18528 100644 --- a/src/mame/apple/apple3.cpp +++ b/src/mame/apple/apple3.cpp @@ -77,7 +77,7 @@ void apple3_state::apple3(machine_config &config) PALETTE(config, m_palette, FUNC(apple3_state::palette_init), 32); /* keyboard controller */ - AY3600(config, m_ay3600, 0); + AY3600(config, m_ay3600); m_ay3600->x0().set_ioport("X0"); m_ay3600->x1().set_ioport("X1"); m_ay3600->x2().set_ioport("X2"); @@ -92,7 +92,7 @@ void apple3_state::apple3(machine_config &config) m_ay3600->data_ready().set(FUNC(apple3_state::ay3600_data_ready_w)); /* slot bus */ - A2BUS(config, m_a2bus, 0); + A2BUS(config, m_a2bus); m_a2bus->set_space(m_maincpu, AS_PROGRAM); m_a2bus->irq_w().set(FUNC(apple3_state::a2bus_irq_w)); m_a2bus->nmi_w().set(FUNC(apple3_state::a2bus_nmi_w)); @@ -104,7 +104,7 @@ void apple3_state::apple3(machine_config &config) A2BUS_SLOT(config, "sl4", m_a2bus, apple3_cards, nullptr); /* fdc */ - APPLEIII_FDC(config, m_fdc, 1021800*2); + APPLEIII_FDC(config, m_fdc, XTAL::u(1021800)*2); FLOPPY_CONNECTOR(config, "0", a3_floppies, "525", apple3_state::floppy_formats); FLOPPY_CONNECTOR(config, "1", a3_floppies, "525", apple3_state::floppy_formats); FLOPPY_CONNECTOR(config, "2", a3_floppies, "525", apple3_state::floppy_formats); @@ -114,7 +114,7 @@ void apple3_state::apple3(machine_config &config) SOFTWARE_LIST(config, "flop525_list").set_original("apple3"); /* acia */ - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(XTAL(1'843'200)); // HACK: The schematic shows an external clock generator but using a XTAL is faster to emulate. m_acia->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); @@ -147,8 +147,8 @@ void apple3_state::apple3(machine_config &config) /* sound */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_bell, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); - DAC_6BIT_BINARY_WEIGHTED(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.125); // 6522.b5(pb0-pb5) + 320k,160k,80k,40k,20k,10k + DAC_1BIT(config, m_bell).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_6BIT_BINARY_WEIGHTED(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.125); // 6522.b5(pb0-pb5) + 320k,160k,80k,40k,20k,10k TIMER(config, "c040").configure_periodic(FUNC(apple3_state::apple3_c040_tick), attotime::from_hz(2000)); diff --git a/src/mame/apple/cuda.cpp b/src/mame/apple/cuda.cpp index d1b6214075a..cf9769f97c6 100644 --- a/src/mame/apple/cuda.cpp +++ b/src/mame/apple/cuda.cpp @@ -381,7 +381,7 @@ void cuda_device::pram_w(offs_t offset, uint8_t data) // cuda_device - constructor //------------------------------------------------- -cuda_device::cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cuda_device::cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CUDA, tag, owner, clock), device_nvram_interface(mconfig, *this), write_reset(*this), diff --git a/src/mame/apple/cuda.h b/src/mame/apple/cuda.h index b6ccf42a755..9b284a06380 100644 --- a/src/mame/apple/cuda.h +++ b/src/mame/apple/cuda.h @@ -28,12 +28,12 @@ class cuda_device : public device_t, public device_nvram_interface public: // construction/destruction cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, int type) - : cuda_device(mconfig, tag, owner, (uint32_t)0) + : cuda_device(mconfig, tag, owner) { set_type(type); } - cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void set_type(int type) { rom_offset = type; } diff --git a/src/mame/apple/egret.cpp b/src/mame/apple/egret.cpp index fed99abb31d..cf44835794c 100644 --- a/src/mame/apple/egret.cpp +++ b/src/mame/apple/egret.cpp @@ -375,7 +375,7 @@ void egret_device::pram_w(offs_t offset, uint8_t data) // egret_device - constructor //------------------------------------------------- -egret_device::egret_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +egret_device::egret_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EGRET, tag, owner, clock), device_nvram_interface(mconfig, *this), write_reset(*this), diff --git a/src/mame/apple/egret.h b/src/mame/apple/egret.h index f82c4a2e203..abccdcb2614 100644 --- a/src/mame/apple/egret.h +++ b/src/mame/apple/egret.h @@ -33,12 +33,12 @@ class egret_device : public device_t, public device_nvram_interface public: // construction/destruction egret_device(const machine_config &mconfig, const char *tag, device_t *owner, int type) - : egret_device(mconfig, tag, owner, (uint32_t)0) + : egret_device(mconfig, tag, owner) { set_type(type); } - egret_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + egret_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void set_type(int type) { rom_offset = type; } diff --git a/src/mame/apple/iphone2g.cpp b/src/mame/apple/iphone2g.cpp index b68aac7ed8a..271f66399bf 100644 --- a/src/mame/apple/iphone2g.cpp +++ b/src/mame/apple/iphone2g.cpp @@ -18,14 +18,14 @@ class iphone2g_spi_device : public device_t, public device_memory_interface { public: - iphone2g_spi_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + iphone2g_spi_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); auto out_irq_cb() { return m_out_irq_func.bind(); } void map(address_map &map); protected: - iphone2g_spi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + iphone2g_spi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -111,7 +111,7 @@ void iphone2g_spi_device::device_reset() DEFINE_DEVICE_TYPE(IPHONE2G_SPI, iphone2g_spi_device, "iphone2g_spi", "iPhone 2G SPI controller") -iphone2g_spi_device::iphone2g_spi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +iphone2g_spi_device::iphone2g_spi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_mmio_config("mmio", ENDIANNESS_LITTLE, 32, 32, 0) @@ -119,7 +119,7 @@ iphone2g_spi_device::iphone2g_spi_device(const machine_config &mconfig, device_t { } -iphone2g_spi_device::iphone2g_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iphone2g_spi_device::iphone2g_spi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : iphone2g_spi_device(mconfig, IPHONE2G_SPI, tag, owner, clock) { } @@ -127,7 +127,7 @@ iphone2g_spi_device::iphone2g_spi_device(const machine_config &mconfig, const ch class iphone2g_timer_device : public device_t, public device_memory_interface { public: - iphone2g_timer_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + iphone2g_timer_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); auto out_irq_cb() { return m_out_irq_func.bind(); } @@ -135,7 +135,7 @@ public: void timer_map(address_map &map); protected: - iphone2g_timer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + iphone2g_timer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -198,7 +198,7 @@ void iphone2g_timer_device::device_reset() DEFINE_DEVICE_TYPE(IPHONE2G_TIMER, iphone2g_timer_device, "iphone2g_timer", "iPhone 2G timers") -iphone2g_timer_device::iphone2g_timer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +iphone2g_timer_device::iphone2g_timer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_mmio_config("mmio", ENDIANNESS_LITTLE, 32, 32, 0) @@ -206,7 +206,7 @@ iphone2g_timer_device::iphone2g_timer_device(const machine_config &mconfig, devi { } -iphone2g_timer_device::iphone2g_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iphone2g_timer_device::iphone2g_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : iphone2g_timer_device(mconfig, IPHONE2G_TIMER, tag, owner, clock) { } diff --git a/src/mame/apple/lisa.cpp b/src/mame/apple/lisa.cpp index 91bf04173da..944cfa560eb 100644 --- a/src/mame/apple/lisa.cpp +++ b/src/mame/apple/lisa.cpp @@ -63,12 +63,12 @@ void lisa_state::lisa(machine_config &config) iocop.read_si().set_constant(1); // FIXME: actually tied to VIA CA2 but both pulled up to +5 iocop.read_g().set_constant(15); - cop421_cpu_device &kbcop(COP421(config, "kbcop", 3932160)); // same clock as other COP? + cop421_cpu_device &kbcop(COP421(config, "kbcop", XTAL::u(3932160))); // same clock as other COP? kbcop.set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, true); kbcop.read_si().set_constant(0); kbcop.read_g().set_constant(15); - M6504(config, m_fdc_cpu, 2000000); /* 16.000 MHz / 8 in when DIS asserted, 16.000 MHz / 9 otherwise (?) */ + M6504(config, m_fdc_cpu, XTAL::u(2000000)); /* 16.000 MHz / 8 in when DIS asserted, 16.000 MHz / 9 otherwise (?) */ m_fdc_cpu->set_addrmap(AS_PROGRAM, &lisa_state::lisa_fdc_map); config.set_maximum_quantum(attotime::from_hz(60)); @@ -121,7 +121,7 @@ void lisa_state::lisa(machine_config &config) MOS6522(config, m_via1, 20.37504_MHz_XTAL / 40); // CPU E clock (nominally 500 kHz) - SCC8530(config, m_scc, 7833600); + SCC8530(config, m_scc, XTAL::u(7833600)); } void lisa_state::lisa210(machine_config &config) @@ -130,8 +130,8 @@ void lisa_state::lisa210(machine_config &config) m_fdc_cpu->set_addrmap(AS_PROGRAM, &lisa_state::lisa210_fdc_map); /* via */ - m_via0->set_clock(1250000); - m_via1->set_clock(1250000); + m_via0->set_clock(XTAL::u(1250000)); + m_via1->set_clock(XTAL::u(1250000)); } void lisa_state::macxl(machine_config &config) diff --git a/src/mame/apple/lwriter.cpp b/src/mame/apple/lwriter.cpp index 1964c633fb5..993d511f46e 100644 --- a/src/mame/apple/lwriter.cpp +++ b/src/mame/apple/lwriter.cpp @@ -545,7 +545,7 @@ WRITE_LINE_MEMBER(lwriter_state::scc_int) }*/ #define CPU_CLK (22.321_MHz_XTAL / 2) // Based on pictures form here: http://picclick.co.uk/Apple-Postscript-LaserWriter-IINT-Printer-640-4105-M6009-Mainboard-282160713108.html#&gid=1&pid=7 -#define RXC_CLK ((CPU_CLK.value() - (87 * 16 * 70)) / 3) // Tuned to get 9600 baud according to manual, needs rework based on real hardware +#define RXC_CLK XTAL::u((CPU_CLK.value() - (87 * 16 * 70)) / 3) // Tuned to get 9600 baud according to manual, needs rework based on real hardware /* These are from LBP-CX Series Video Interface Manual: * http://beefchicken.com/retro/laserwriter/LBP-CX%20Series%20Video%20Interface%20Service%20Manual.pdf */ @@ -662,7 +662,7 @@ void lwriter_state::lwriter(machine_config &config) m_screen->set_screen_update(FUNC(lwriter_state::screen_update)); SCC8530N(config, m_scc, CPU_CLK); - m_scc->configure_channels(RXC_CLK, 0, RXC_CLK, 0); + m_scc->configure_channels(RXC_CLK, XTAL(), RXC_CLK, XTAL()); /* Port A */ m_scc->out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd)); m_scc->out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr)); diff --git a/src/mame/apple/mac.cpp b/src/mame/apple/mac.cpp index f57b263a907..391706f7375 100644 --- a/src/mame/apple/mac.cpp +++ b/src/mame/apple/mac.cpp @@ -567,7 +567,7 @@ void mac_state::add_asc(machine_config &config, asc_device::asc_type type) void mac_state::add_nubus(machine_config &config, bool bank1, bool bank2) { - nubus_device &nubus(NUBUS(config, "nubus", 0)); + nubus_device &nubus(NUBUS(config, "nubus")); nubus.set_space(m_maincpu, AS_PROGRAM); nubus.out_irq9_callback().set(FUNC(mac_state::nubus_irq_9_w)); nubus.out_irqa_callback().set(FUNC(mac_state::nubus_irq_a_w)); @@ -591,7 +591,7 @@ void mac_state::add_nubus(machine_config &config, bool bank1, bool bank2) template void mac_state::add_nubus_pds(machine_config &config, const char *slot_tag, T &&opts) { - nubus_device &nubus(NUBUS(config, "pds", 0)); + nubus_device &nubus(NUBUS(config, "pds")); nubus.set_space(m_maincpu, AS_PROGRAM); nubus.out_irq9_callback().set(FUNC(mac_state::nubus_irq_9_w)); nubus.out_irqa_callback().set(FUNC(mac_state::nubus_irq_a_w)); @@ -667,7 +667,7 @@ void mac_state::maciihd(machine_config &config) void mac_state::maciifx(machine_config &config) { /* basic machine hardware */ - M68030(config, m_maincpu, 40000000); + M68030(config, m_maincpu, XTAL::u(40000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mac_state::maciifx_map); m_maincpu->set_dasm_override(std::function(&mac68k_dasm_override), "mac68k_dasm_override"); @@ -798,12 +798,12 @@ void mac_state::maciici(machine_config &config) { macii(config, false, asc_device::asc_type::ASC, true, false, true, 1); - M68030(config, m_maincpu, 25000000); + M68030(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mac_state::maciici_map); m_maincpu->set_dasm_override(std::function(&mac68k_dasm_override), "mac68k_dasm_override"); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(25175000, 800, 0, 640, 525, 0, 480); + m_screen->set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); m_screen->set_size(640, 870); m_screen->set_visarea(0, 640-1, 0, 480-1); m_screen->set_screen_update(FUNC(mac_state::screen_update_macrbv)); @@ -817,7 +817,7 @@ void mac_state::maciici(machine_config &config) void mac_state::maciisi(machine_config &config) { - M68030(config, m_maincpu, 20000000); + M68030(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mac_state::maciici_map); m_maincpu->set_dasm_override(std::function(&mac68k_dasm_override), "mac68k_dasm_override"); @@ -837,7 +837,7 @@ void mac_state::maciisi(machine_config &config) SOFTWARE_LIST(config, "flop35_list").set_original("mac_flop"); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(25175000, 800, 0, 640, 525, 0, 480); + m_screen->set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); m_screen->set_size(640, 870); m_screen->set_visarea(0, 640-1, 0, 480-1); m_screen->set_screen_update(FUNC(mac_state::screen_update_macrbv)); diff --git a/src/mame/apple/mac128.cpp b/src/mame/apple/mac128.cpp index 5d575a4cf39..407837749e1 100644 --- a/src/mame/apple/mac128.cpp +++ b/src/mame/apple/mac128.cpp @@ -116,7 +116,7 @@ Scanline 0 is the start of vblank. #include "speaker.h" #define C7M (15.6672_MHz_XTAL / 2) -#define C3_7M (15.6672_MHz_XTAL / 4).value() +#define C3_7M (15.6672_MHz_XTAL / 4) // video parameters static constexpr int MAC_H_VIS = 512; @@ -1136,7 +1136,7 @@ void mac128_state::mac512ke(machine_config &config) m_volfilter->add_route(ALL_OUTPUTS, "speaker", 0.195); // this filter has a max gain of ~5.126, so we diminish it by the inverse of that (0.195) FILTER_BIQUAD(config, m_filter).opamp_sk_lowpass_setup(RES_K(47), RES_K(47), RES_M(999.99), RES_R(0.001), CAP_U(0.001), CAP_P(470)); // R18, R14, absent, short, C18, C19 m_filter->add_route(ALL_OUTPUTS, m_volfilter, 1.0); - DAC_12BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, m_filter, 1.0); // 2 x ls161; this is a 1-bit PWM value selecting an 8-bit fraction from 0/352nds to 255/352nds of a scanline, with /SNDRES forcing it active for 352/352nds. + DAC_12BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, m_filter, 1.0); // 2 x ls161; this is a 1-bit PWM value selecting an 8-bit fraction from 0/352nds to 255/352nds of a scanline, with /SNDRES forcing it active for 352/352nds. /* devices */ RTC3430042(config, m_rtc, 32.768_kHz_XTAL); @@ -1150,7 +1150,7 @@ void mac128_state::mac512ke(machine_config &config) applefdintf_device::add_35(config, m_floppy[1]); SCC85C30(config, m_scc, C7M); - m_scc->configure_channels(C3_7M, 0, C3_7M, 0); + m_scc->configure_channels(C3_7M, XTAL(), C3_7M, XTAL()); m_scc->out_int_callback().set(FUNC(mac128_state::set_scc_interrupt)); MOS6522(config, m_via, C7M/10); diff --git a/src/mame/apple/mac_m.cpp b/src/mame/apple/mac_m.cpp index c97f2ba729d..02cf0f53040 100644 --- a/src/mame/apple/mac_m.cpp +++ b/src/mame/apple/mac_m.cpp @@ -679,13 +679,13 @@ void mac_state::mac_via_sync() u64 cycle = m_maincpu->total_cycles(); // Get the number of the cycle the via is in at that time - u64 via_cycle = cycle * m_via1->clock() / m_maincpu->clock(); + u64 via_cycle = cycle * m_via1->clock().value() / m_maincpu->clock().value(); // The access is going to start at via_cycle+1 and end at // via_cycle+1.5, compute what that means in maincpu cycles (the // +1 rounds up, since the clocks are too different to ever be // synced). - u64 main_cycle = (via_cycle*2+3) * m_maincpu->clock() / (2*m_via1->clock()) + 1; + u64 main_cycle = (via_cycle*2+3) * m_maincpu->clock().value() / (2*m_via1->clock().value()) + 1; // Finally adjust the main cpu icount as needed. m_maincpu->adjust_icount(-int(main_cycle - cycle)); diff --git a/src/mame/apple/macadb.cpp b/src/mame/apple/macadb.cpp index 76725041afa..f70ce53275d 100644 --- a/src/mame/apple/macadb.cpp +++ b/src/mame/apple/macadb.cpp @@ -196,7 +196,7 @@ static INPUT_PORTS_START( macadb ) PORT_BIT(0xE000, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END -macadb_device::macadb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +macadb_device::macadb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MACADB, tag, owner, clock), m_mouse0(*this, "MOUSE0"), m_mouse1(*this, "MOUSE1"), diff --git a/src/mame/apple/macadb.h b/src/mame/apple/macadb.h index 2ea4b061dfe..da23143418f 100644 --- a/src/mame/apple/macadb.h +++ b/src/mame/apple/macadb.h @@ -17,7 +17,7 @@ class macadb_device : public device_t { public: // construction/destruction - macadb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + macadb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto adb_data_callback() { return write_adb_data.bind(); } auto adb_irq_callback() { return write_adb_irq.bind(); } diff --git a/src/mame/apple/maciivx.cpp b/src/mame/apple/maciivx.cpp index 88eece14399..250bc136728 100644 --- a/src/mame/apple/maciivx.cpp +++ b/src/mame/apple/maciivx.cpp @@ -315,7 +315,7 @@ void maciivx_state::maciiv_base(machine_config &config) SOFTWARE_LIST(config, "flop35hd_list").set_original("mac_hdflop"); SCC85C30(config, m_scc, C7M); - m_scc->configure_channels(3'686'400, 3'686'400, 3'686'400, 3'686'400); + m_scc->configure_channels(XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400)); m_scc->out_int_callback().set(m_vasp, FUNC(vasp_device::scc_irq_w)); m_scc->out_txda_callback().set("printer", FUNC(rs232_port_device::write_txd)); m_scc->out_txdb_callback().set("modem", FUNC(rs232_port_device::write_txd)); @@ -337,7 +337,7 @@ void maciivx_state::maciiv_base(machine_config &config) MACADB(config, m_macadb, C15M); - nubus_device &nubus(NUBUS(config, "nubus", 0)); + nubus_device &nubus(NUBUS(config, "nubus")); nubus.set_space(m_maincpu, AS_PROGRAM); nubus.out_irqc_callback().set(m_vasp, FUNC(vasp_device::slot0_irq_w)); nubus.out_irqd_callback().set(m_vasp, FUNC(vasp_device::slot1_irq_w)); diff --git a/src/mame/apple/maclc.cpp b/src/mame/apple/maclc.cpp index 1d653adf351..0b32286cf68 100644 --- a/src/mame/apple/maclc.cpp +++ b/src/mame/apple/maclc.cpp @@ -330,7 +330,7 @@ void maclc_state::maclc_base(machine_config &config) SOFTWARE_LIST(config, "flop35hd_list").set_original("mac_hdflop"); SCC85C30(config, m_scc, C7M); - m_scc->configure_channels(3'686'400, 3'686'400, 3'686'400, 3'686'400); + m_scc->configure_channels(XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400)); m_scc->out_int_callback().set(m_v8, FUNC(v8_device::scc_irq_w)); m_scc->out_txda_callback().set("printer", FUNC(rs232_port_device::write_txd)); m_scc->out_txdb_callback().set("modem", FUNC(rs232_port_device::write_txd)); diff --git a/src/mame/apple/maclc3.cpp b/src/mame/apple/maclc3.cpp index c4e731c09d0..aa3642c2436 100644 --- a/src/mame/apple/maclc3.cpp +++ b/src/mame/apple/maclc3.cpp @@ -38,8 +38,8 @@ namespace { -static constexpr u32 C7M = 7833600; -static constexpr u32 C15M = (C7M * 2); + static constexpr XTAL C7M = XTAL::u(7833600); +static constexpr XTAL C15M = (C7M * 2); class macvail_state : public driver_device { @@ -213,7 +213,7 @@ INPUT_PORTS_END void macvail_state::maclc3_base(machine_config &config) { - M68030(config, m_maincpu, 25000000); + M68030(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_dasm_override(std::function(&mac68k_dasm_override), "mac68k_dasm_override"); RAM(config, m_ram); @@ -246,7 +246,7 @@ void macvail_state::maclc3_base(machine_config &config) SOFTWARE_LIST(config, "flop35hd_list").set_original("mac_hdflop"); SCC85C30(config, m_scc, C7M); - m_scc->configure_channels(3'686'400, 3'686'400, 3'686'400, 3'686'400); + m_scc->configure_channels(XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400), XTAL::u(3'686'400)); m_scc->out_int_callback().set(m_sonora, FUNC(sonora_device::scc_irq_w)); m_scc->out_txda_callback().set("printer", FUNC(rs232_port_device::write_txd)); m_scc->out_txdb_callback().set("modem", FUNC(rs232_port_device::write_txd)); diff --git a/src/mame/apple/macpci.cpp b/src/mame/apple/macpci.cpp index c892916d64b..63faecdf7c8 100644 --- a/src/mame/apple/macpci.cpp +++ b/src/mame/apple/macpci.cpp @@ -121,7 +121,7 @@ uint32_t macpci_state::screen_update_pippin(screen_device &screen, bitmap_ind16 void macpci_state::pippin(machine_config &config) { /* basic machine hardware */ - PPC603(config, m_maincpu, 66000000); + PPC603(config, m_maincpu, XTAL::u(66000000)); m_maincpu->set_addrmap(AS_PROGRAM, &macpci_state::pippin_mem); /* video hardware */ @@ -143,7 +143,7 @@ void macpci_state::pippin(machine_config &config) cdda.add_route(0, "lspeaker", 1.00); cdda.add_route(1, "rspeaker", 1.00); - cdrom_image_device &cdrom(CDROM(config, "cdrom", 0)); + cdrom_image_device &cdrom(CDROM(config, "cdrom")); cdrom.set_interface("pippin_cdrom"); SOFTWARE_LIST(config, "cd_list").set_original("pippin"); @@ -160,7 +160,7 @@ void macpci_state::pippin(machine_config &config) //scc8530_t &scc(SCC8530(config, "scc", C7M)); //scc.intrq_callback().set(FUNC(macpci_state::set_scc_interrupt)); - CUDA(config, m_cuda, 0); + CUDA(config, m_cuda); m_cuda->set_type(CUDA_341S0060); m_cuda->reset_callback().set(FUNC(macpci_state::cuda_reset_w)); m_cuda->linechange_callback().set(FUNC(macpci_state::cuda_adb_linechange_w)); @@ -168,7 +168,7 @@ void macpci_state::pippin(machine_config &config) m_cuda->via_data_callback().set(m_via1, FUNC(via6522_device::write_cb2)); config.set_perfect_quantum(m_maincpu); - mn1880_device &cdmcu(MN1880(config, "cdmcu", 8388608)); // type and clock unknown + mn1880_device &cdmcu(MN1880(config, "cdmcu", XTAL::u(8388608))); // type and clock unknown cdmcu.set_addrmap(AS_PROGRAM, &macpci_state::cdmcu_mem); cdmcu.set_addrmap(AS_DATA, &macpci_state::cdmcu_data); } diff --git a/src/mame/apple/macpci.h b/src/mame/apple/macpci.h index 87775a987aa..93f2002dadf 100644 --- a/src/mame/apple/macpci.h +++ b/src/mame/apple/macpci.h @@ -18,7 +18,7 @@ #include "machine/ncr539x.h" #include "sound/awacs.h" -#define C7M (7833600) +#define C7M XTAL::u(7833600) #define C15M (C7M*2) #define MAC_SCREEN_NAME "screen" diff --git a/src/mame/apple/macpdm.cpp b/src/mame/apple/macpdm.cpp index ab5aad7aae6..ed18799ce6e 100644 --- a/src/mame/apple/macpdm.cpp +++ b/src/mame/apple/macpdm.cpp @@ -1072,7 +1072,7 @@ void macpdm_state::pdm_map(address_map &map) void macpdm_state::macpdm(machine_config &config) { - PPC601(config, m_maincpu, 60000000); + PPC601(config, m_maincpu, XTAL::u(60000000)); m_maincpu->set_addrmap(AS_PROGRAM, &macpdm_state::pdm_map); MAC_VIDEO_SONORA(config, m_video); @@ -1120,7 +1120,7 @@ void macpdm_state::macpdm(machine_config &config) applefdintf_device::add_35_nc(config, m_floppy[1]); // pclk is maincpu:60MHz/4, RTxCA is IO_CLOCK*2/17 or GPI input, RTxCB is IO_CLOCK*2/17 - SCC8530(config, m_scc, 60000000/4); + SCC8530(config, m_scc, XTAL::u(60000000)/4); m_scc->intrq_callback().set(FUNC(macpdm_state::scc_irq)); R65NC22(config, m_via1, IO_CLOCK/40); diff --git a/src/mame/apple/macpwrbk030.cpp b/src/mame/apple/macpwrbk030.cpp index c97ff4698d8..3bca24528bb 100644 --- a/src/mame/apple/macpwrbk030.cpp +++ b/src/mame/apple/macpwrbk030.cpp @@ -357,13 +357,14 @@ void macpb030_state::mac_via_sync() u64 cycle = m_maincpu->total_cycles(); // Get the number of the cycle the via is in at that time - u64 via_cycle = cycle * m_via1->clock() / m_maincpu->clock(); + + u64 via_cycle = cycle * m_via1->clock().value() / m_maincpu->clock().value(); // The access is going to start at via_cycle+1 and end at // via_cycle+1.5, compute what that means in maincpu cycles (the // +1 rounds up, since the clocks are too different to ever be // synced). - u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock() / (2 * m_via1->clock()) + 1; + u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock().value() / (2 * m_via1->clock().value()) + 1; // Finally adjust the main cpu icount as needed. m_maincpu->adjust_icount(-int(main_cycle - cycle)); @@ -988,7 +989,7 @@ void macpb030_state::macpb140(machine_config &config) void macpb030_state::macpb145(machine_config &config) { macpb140(config); - m_maincpu->set_clock(25000000); + m_maincpu->set_clock(XTAL::u(25000000)); m_ram->set_default_size("4M"); m_ram->set_extra_options("6M,8M"); @@ -998,7 +999,7 @@ void macpb030_state::macpb145(machine_config &config) void macpb030_state::macpb170(machine_config &config) { macpb140(config); - m_maincpu->set_clock(25000000); + m_maincpu->set_clock(XTAL::u(25000000)); m_ram->set_default_size("4M"); m_ram->set_extra_options("6M,8M"); @@ -1006,7 +1007,7 @@ void macpb030_state::macpb170(machine_config &config) void macpb030_state::macpb160(machine_config &config) { - M68030(config, m_maincpu, 25000000); + M68030(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &macpb030_state::macpb160_map); m_maincpu->set_dasm_override(std::function(&mac68k_dasm_override), "mac68k_dasm_override"); @@ -1100,13 +1101,13 @@ void macpb030_state::macpb160(machine_config &config) void macpb030_state::macpb180(machine_config &config) { macpb160(config); - m_maincpu->set_clock(33000000); + m_maincpu->set_clock(XTAL::u(33000000)); } void macpb030_state::macpb180c(machine_config &config) { macpb160(config); - m_maincpu->set_clock(33000000); + m_maincpu->set_clock(XTAL::u(33000000)); m_maincpu->set_addrmap(AS_PROGRAM, &macpb030_state::macpb165c_map); m_screen->set_size(800, 525); diff --git a/src/mame/apple/macquadra700.cpp b/src/mame/apple/macquadra700.cpp index e4de4f02fc9..7e05ec13020 100644 --- a/src/mame/apple/macquadra700.cpp +++ b/src/mame/apple/macquadra700.cpp @@ -729,13 +729,13 @@ void macquadra_state::mac_via_sync() u64 cycle = m_maincpu->total_cycles(); // Get the number of the cycle the via is in at that time - u64 via_cycle = cycle * m_via1->clock() / m_maincpu->clock(); + u64 via_cycle = cycle * m_via1->clock().value() / m_maincpu->clock().value(); // The access is going to start at via_cycle+1 and end at // via_cycle+1.5, compute what that means in maincpu cycles (the // +1 rounds up, since the clocks are too different to ever be // synced). - u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock() / (2 * m_via1->clock()) + 1; + u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock().value() / (2 * m_via1->clock().value()) + 1; // Finally adjust the main cpu icount as needed. m_maincpu->adjust_icount(-int(main_cycle - cycle)); diff --git a/src/mame/apple/macrtc.cpp b/src/mame/apple/macrtc.cpp index 46741e0f28c..20cf9a5b49f 100644 --- a/src/mame/apple/macrtc.cpp +++ b/src/mame/apple/macrtc.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(RTC3430042, rtc3430042_device, "rtc3430042", "Apple 343-0042 // rtc4543_device - constructor //------------------------------------------------- -rtc3430042_device::rtc3430042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtc3430042_device::rtc3430042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTC3430042, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/mame/apple/macrtc.h b/src/mame/apple/macrtc.h index 3daf9e8d753..64be05430f2 100644 --- a/src/mame/apple/macrtc.h +++ b/src/mame/apple/macrtc.h @@ -27,7 +27,7 @@ class rtc3430042_device : public device_t, { public: // construction/destruction - rtc3430042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtc3430042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( clk_w ); diff --git a/src/mame/apple/macscsi.cpp b/src/mame/apple/macscsi.cpp index 3bc17a15fad..42eb7c6c5b0 100644 --- a/src/mame/apple/macscsi.cpp +++ b/src/mame/apple/macscsi.cpp @@ -66,7 +66,7 @@ DEFINE_DEVICE_TYPE(MAC_SCSI_HELPER, mac_scsi_helper_device, "scsipdma", "Mac 538 ALLOW_SAVE_TYPE(mac_scsi_helper_device::mode); -mac_scsi_helper_device::mac_scsi_helper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mac_scsi_helper_device::mac_scsi_helper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MAC_SCSI_HELPER, tag, owner, clock) , m_scsi_read_callback(*this) , m_scsi_write_callback(*this) diff --git a/src/mame/apple/macscsi.h b/src/mame/apple/macscsi.h index dcefbf494cf..962713502dc 100644 --- a/src/mame/apple/macscsi.h +++ b/src/mame/apple/macscsi.h @@ -10,7 +10,7 @@ class mac_scsi_helper_device : public device_t { public: // device type constructor - mac_scsi_helper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mac_scsi_helper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto scsi_read_callback() { return m_scsi_read_callback.bind(); } diff --git a/src/mame/apple/newton.cpp b/src/mame/apple/newton.cpp index f9c6f787516..d89667350fa 100644 --- a/src/mame/apple/newton.cpp +++ b/src/mame/apple/newton.cpp @@ -102,7 +102,7 @@ void newton_state::mp130(machine_config &config) void newton_state::emate(machine_config &config) { - ARM710A(config, m_maincpu, 162000000); + ARM710A(config, m_maincpu, XTAL::u(162000000)); m_maincpu->set_addrmap(AS_PROGRAM, &newton_state::mem_map); RAM(config, m_ram); @@ -112,7 +112,7 @@ void newton_state::emate(machine_config &config) void newton_state::mp2000(machine_config &config) { - ARM710A(config, m_maincpu, 162000000); // really SA110 + ARM710A(config, m_maincpu, XTAL::u(162000000)); // really SA110 m_maincpu->set_addrmap(AS_PROGRAM, &newton_state::mem_map); RAM(config, m_ram); diff --git a/src/mame/apple/sonora.cpp b/src/mame/apple/sonora.cpp index 96c97269d2a..b5e973b1f0a 100644 --- a/src/mame/apple/sonora.cpp +++ b/src/mame/apple/sonora.cpp @@ -29,8 +29,8 @@ #include "formats/ap_dsk35.h" -static constexpr u32 C7M = 7833600; -static constexpr u32 C15M = (C7M * 2); +static constexpr XTAL C7M = XTAL::u(7833600); +static constexpr XTAL C15M = (C7M * 2); //************************************************************************** // DEVICE DEFINITIONS @@ -92,7 +92,7 @@ void sonora_device::device_add_mconfig(machine_config &config) // sonora_device - constructor //------------------------------------------------- -sonora_device::sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sonora_device::sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONORA, tag, owner, clock), write_pb4(*this), write_pb5(*this), @@ -530,13 +530,13 @@ void sonora_device::via_sync() u64 cycle = m_maincpu->total_cycles(); // Get the number of the cycle the via is in at that time - u64 via_cycle = cycle * m_via1->clock() / m_maincpu->clock(); + u64 via_cycle = cycle * m_via1->clock().value() / m_maincpu->clock().value(); // The access is going to start at via_cycle+1 and end at // via_cycle+1.5, compute what that means in maincpu cycles (the // +1 rounds up, since the clocks are too different to ever be // synced). - u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock() / (2 * m_via1->clock()) + 1; + u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock().value() / (2 * m_via1->clock().value()) + 1; // Finally adjust the main cpu icount as needed. m_maincpu->adjust_icount(-int(main_cycle - cycle)); diff --git a/src/mame/apple/sonora.h b/src/mame/apple/sonora.h index 7898dddea31..a455a5426fe 100644 --- a/src/mame/apple/sonora.h +++ b/src/mame/apple/sonora.h @@ -19,12 +19,7 @@ class sonora_device : public device_t { public: // construction/destruction - sonora_device(const machine_config &mconfig, const char *tag, device_t *owner) - : sonora_device(mconfig, tag, owner, (uint32_t)0) - { - } - - sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // interface routines auto pb4_callback() { return write_pb4.bind(); } diff --git a/src/mame/apple/superga2.cpp b/src/mame/apple/superga2.cpp index a64c35f3015..6fee24a7b85 100644 --- a/src/mame/apple/superga2.cpp +++ b/src/mame/apple/superga2.cpp @@ -216,14 +216,14 @@ INPUT_PORTS_END void superga2_state::superga2(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1021800); + M6502(config, m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &superga2_state::superga2_map); APPLE2_VIDEO(config, m_video, XTAL(14'318'181)).set_screen(m_screen); APPLE2_COMMON(config, m_a2common, XTAL(14'318'181)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(1021800*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192); + m_screen->set_raw(XTAL::u(1021800)*14, (65*7)*2, 0, (40*7)*2, 262, 0, 192); m_screen->set_screen_update(FUNC(superga2_state::screen_update)); m_screen->set_palette(m_video); diff --git a/src/mame/apple/tk2000.cpp b/src/mame/apple/tk2000.cpp index bc4ebf327cb..a7badac29f8 100644 --- a/src/mame/apple/tk2000.cpp +++ b/src/mame/apple/tk2000.cpp @@ -583,7 +583,7 @@ INPUT_PORTS_END void tk2000_state::tk2000(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1021800); /* close to actual CPU frequency of 1.020484 MHz */ + M6502(config, m_maincpu, XTAL::u(1021800)); /* close to actual CPU frequency of 1.020484 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &tk2000_state::apple2_map); TIMER(config, "scantimer").configure_scanline(FUNC(tk2000_state::apple2_interrupt), "screen", 0, 1); diff --git a/src/mame/apple/v8.cpp b/src/mame/apple/v8.cpp index 5be6273afc6..686dbf57b6d 100644 --- a/src/mame/apple/v8.cpp +++ b/src/mame/apple/v8.cpp @@ -42,8 +42,8 @@ #define VERBOSE (LOG_RAM) #include "logmacro.h" -static constexpr u32 C7M = 7833600; -static constexpr u32 C15M = (C7M * 2); +static constexpr XTAL C7M = XTAL::u(7833600); +static constexpr XTAL C15M = (C7M * 2); //************************************************************************** // DEVICE DEFINITIONS @@ -93,7 +93,7 @@ void v8_device::map(address_map &map) void v8_device::device_add_mconfig(machine_config &config) { SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(25175000, 800, 0, 640, 525, 0, 480); + m_screen->set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); m_screen->set_size(1024, 768); m_screen->set_visarea(0, 640 - 1, 0, 480 - 1); m_screen->set_screen_update(FUNC(v8_device::screen_update)); @@ -122,12 +122,12 @@ void v8_device::device_add_mconfig(machine_config &config) // v8_device - constructor //------------------------------------------------- -v8_device::v8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +v8_device::v8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v8_device(mconfig, V8, tag, owner, clock) { } -v8_device::v8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +v8_device::v8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_maincpu(*this, finder_base::DUMMY_TAG), m_screen(*this, "screen"), @@ -652,13 +652,13 @@ void v8_device::via_sync() u64 cycle = m_maincpu->total_cycles(); // Get the number of the cycle the via is in at that time - u64 via_cycle = cycle * m_via1->clock() / m_maincpu->clock(); + u64 via_cycle = cycle * m_via1->clock().value() / m_maincpu->clock().value(); // The access is going to start at via_cycle+1 and end at // via_cycle+1.5, compute what that means in maincpu cycles (the // +1 rounds up, since the clocks are too different to ever be // synced). - u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock() / (2 * m_via1->clock()) + 1; + u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock().value() / (2 * m_via1->clock().value()) + 1; // Finally adjust the main cpu icount as needed. m_maincpu->adjust_icount(-int(main_cycle - cycle)); @@ -877,7 +877,7 @@ void eagle_device::device_add_mconfig(machine_config &config) m_asc->irqf_callback().set(FUNC(eagle_device::asc_irq)); } -eagle_device::eagle_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +eagle_device::eagle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v8_device(mconfig, EAGLE, tag, owner, clock) { } @@ -964,7 +964,7 @@ void spice_device::device_add_mconfig(machine_config &config) applefdintf_device::add_35_nc(config, m_floppy[1]); } -spice_device::spice_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +spice_device::spice_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : v8_device(mconfig, SPICE, tag, owner, clock), m_fdc(*this, "fdc"), m_floppy(*this, "fdc:%d", 0U), diff --git a/src/mame/apple/v8.h b/src/mame/apple/v8.h index 8f2b1931726..626b989e8f6 100644 --- a/src/mame/apple/v8.h +++ b/src/mame/apple/v8.h @@ -20,7 +20,7 @@ class v8_device : public device_t { public: // construction/destruction - v8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + v8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // interface routines auto pb4_callback() { return write_pb4.bind(); } @@ -53,7 +53,7 @@ protected: u8 m_pseudovia_regs[256]; u32 *m_ram_ptr; - v8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + v8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -115,7 +115,7 @@ private: class eagle_device : public v8_device { public: - eagle_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + eagle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -132,7 +132,7 @@ private: class spice_device : public v8_device { public: - spice_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + spice_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; diff --git a/src/mame/apple/vasp.cpp b/src/mame/apple/vasp.cpp index 6024e51bc72..b93c12b22f4 100644 --- a/src/mame/apple/vasp.cpp +++ b/src/mame/apple/vasp.cpp @@ -19,8 +19,8 @@ #include "formats/ap_dsk35.h" #include "layout/generic.h" -static constexpr u32 C7M = 7833600; -static constexpr u32 C15M = (C7M * 2); +static constexpr XTAL C7M = XTAL::u(7833600); +static constexpr XTAL C15M = (C7M * 2); //************************************************************************** // DEVICE DEFINITIONS @@ -68,7 +68,7 @@ void vasp_device::map(address_map &map) void vasp_device::device_add_mconfig(machine_config &config) { SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(25175000, 800, 0, 640, 525, 0, 480); + m_screen->set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480); m_screen->set_size(1024, 768); m_screen->set_visarea(0, 640 - 1, 0, 480 - 1); m_screen->set_screen_update(FUNC(vasp_device::screen_update)); @@ -97,7 +97,7 @@ void vasp_device::device_add_mconfig(machine_config &config) // vasp_device - constructor //------------------------------------------------- -vasp_device::vasp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vasp_device::vasp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VASP, tag, owner, clock), write_pb4(*this), write_pb5(*this), @@ -575,13 +575,13 @@ void vasp_device::via_sync() u64 cycle = m_maincpu->total_cycles(); // Get the number of the cycle the via is in at that time - u64 via_cycle = cycle * m_via1->clock() / m_maincpu->clock(); + u64 via_cycle = cycle * m_via1->clock().value() / m_maincpu->clock().value(); // The access is going to start at via_cycle+1 and end at // via_cycle+1.5, compute what that means in maincpu cycles (the // +1 rounds up, since the clocks are too different to ever be // synced). - u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock() / (2 * m_via1->clock()) + 1; + u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock().value() / (2 * m_via1->clock().value()) + 1; // Finally adjust the main cpu icount as needed. m_maincpu->adjust_icount(-int(main_cycle - cycle)); diff --git a/src/mame/apple/vasp.h b/src/mame/apple/vasp.h index f935208e484..b75d17a3619 100644 --- a/src/mame/apple/vasp.h +++ b/src/mame/apple/vasp.h @@ -18,12 +18,7 @@ class vasp_device : public device_t { public: // construction/destruction - vasp_device(const machine_config &mconfig, const char *tag, device_t *owner) - : vasp_device(mconfig, tag, owner, (uint32_t)0) - { - } - - vasp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vasp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // interface routines auto pb4_callback() { return write_pb4.bind(); } diff --git a/src/mame/appliedconcepts/borisdpl.cpp b/src/mame/appliedconcepts/borisdpl.cpp index f6bd43a8dc7..25e45b7aaf2 100644 --- a/src/mame/appliedconcepts/borisdpl.cpp +++ b/src/mame/appliedconcepts/borisdpl.cpp @@ -183,12 +183,12 @@ INPUT_PORTS_END void borisdpl_state::borisdpl(machine_config &config) { /* basic machine hardware */ - F8(config, m_maincpu, 3000000/2); // frequency approximated from video reference + F8(config, m_maincpu, XTAL::u(3000000)/2); // frequency approximated from video reference m_maincpu->set_addrmap(AS_PROGRAM, &borisdpl_state::main_map); m_maincpu->set_addrmap(AS_IO, &borisdpl_state::main_io); m_maincpu->set_irq_acknowledge_callback("psu", FUNC(f38t56_device::int_acknowledge)); - f38t56_device &psu(F38T56(config, "psu", 3000000/2)); + f38t56_device &psu(F38T56(config, "psu", XTAL::u(3000000)/2)); psu.set_int_vector(0x5020); psu.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ); psu.read_a().set(FUNC(borisdpl_state::ram_data_r)); diff --git a/src/mame/arcadia/arcadia.cpp b/src/mame/arcadia/arcadia.cpp index e8bcd875cc1..0d9f5017112 100644 --- a/src/mame/arcadia/arcadia.cpp +++ b/src/mame/arcadia/arcadia.cpp @@ -466,7 +466,7 @@ static void arcadia_cart(device_slot_interface &device) void arcadia_state::arcadia(machine_config &config) { /* basic machine hardware */ - S2650(config, m_maincpu, 3580000/4); /* 0.895 MHz */ + S2650(config, m_maincpu, XTAL::u(3580000)/4); /* 0.895 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &arcadia_state::arcadia_mem); m_maincpu->sense_handler().set(FUNC(arcadia_state::vsync_r)); m_maincpu->set_periodic_int(FUNC(arcadia_state::video_line), attotime::from_hz(262*60)); diff --git a/src/mame/arcadia/arcadia_a.cpp b/src/mame/arcadia/arcadia_a.cpp index f4498fc18b7..08bb9b664d6 100644 --- a/src/mame/arcadia/arcadia_a.cpp +++ b/src/mame/arcadia/arcadia_a.cpp @@ -16,8 +16,8 @@ #include "arcadia.h" //known UVI audio clocks -#define UVI_NTSC 15734 -#define UVI_PAL 15625 +#define UVI_NTSC XTAL::u(15734) +#define UVI_PAL XTAL::u(15625) /* we need to create pulse transitions that sound 'decent' with the current mess/mame interp scheme @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(ARCADIA_SOUND, arcadia_sound_device, "arcadia_sound", "Arcadi // arcadia_sound_device - constructor //------------------------------------------------- -arcadia_sound_device::arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arcadia_sound_device::arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARCADIA_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) { diff --git a/src/mame/arcadia/arcadia_a.h b/src/mame/arcadia/arcadia_a.h index 029236e6295..89a866677e9 100644 --- a/src/mame/arcadia/arcadia_a.h +++ b/src/mame/arcadia/arcadia_a.h @@ -13,7 +13,7 @@ class arcadia_sound_device : public device_t, public device_sound_interface { public: // construction/destruction - arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + arcadia_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void write(offs_t offset, uint8_t data); diff --git a/src/mame/aristocrat/aristmk4.cpp b/src/mame/aristocrat/aristmk4.cpp index 5f53816b824..0afa7cdd0fb 100644 --- a/src/mame/aristocrat/aristmk4.cpp +++ b/src/mame/aristocrat/aristmk4.cpp @@ -1805,7 +1805,7 @@ void aristmk4_state::aristmk4(machine_config &config) via.irq_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE); // CA1 is connected to +5V, CB1 is not connected. - pia6821_device &pia(PIA6821(config, "pia6821_0", 0)); + pia6821_device &pia(PIA6821(config, "pia6821_0")); pia.readpa_handler().set(FUNC(aristmk4_state::mkiv_pia_ina)); pia.writepa_handler().set(FUNC(aristmk4_state::mkiv_pia_outa)); pia.writepb_handler().set(FUNC(aristmk4_state::mkiv_pia_outb)); diff --git a/src/mame/aristocrat/caswin.cpp b/src/mame/aristocrat/caswin.cpp index 5763f71c144..ad87f629dd7 100644 --- a/src/mame/aristocrat/caswin.cpp +++ b/src/mame/aristocrat/caswin.cpp @@ -337,7 +337,7 @@ void caswin_state::caswin_palette(palette_device &palette) const void caswin_state::vvillage(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &caswin_state::vvillage_mem); m_maincpu->set_addrmap(AS_IO, &caswin_state::vvillage_io); m_maincpu->set_vblank_int("screen", FUNC(caswin_state::irq0_line_hold)); @@ -358,7 +358,7 @@ void caswin_state::vvillage(machine_config &config) SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 4000000 / 4)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(4000000) / 4)); aysnd.port_a_read_callback().set_ioport("DSW1"); aysnd.port_b_read_callback().set_ioport("DSW2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.40); diff --git a/src/mame/atari/a2600.cpp b/src/mame/atari/a2600.cpp index 69518574b9b..dc4ccd31ba1 100644 --- a/src/mame/atari/a2600.cpp +++ b/src/mame/atari/a2600.cpp @@ -622,7 +622,7 @@ void a2600_base_state::a2600_base_ntsc(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &a2600_base_state::a2600_mem); /* video hardware */ - TIA_NTSC_VIDEO(config, m_tia, 0, "tia"); + TIA_NTSC_VIDEO(config, m_tia, "tia"); m_tia->read_input_port_callback().set(FUNC(a2600_state::a2600_read_input_port)); m_tia->databus_contents_callback().set(FUNC(a2600_state::a2600_get_databus_contents)); m_tia->vsync_callback().set(FUNC(a2600_state::a2600_tia_vsync_callback)); @@ -664,7 +664,7 @@ void a2600_base_state::a2600_base_pal(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &a2600_state::a2600_mem); /* video hardware */ - TIA_PAL_VIDEO(config, m_tia, 0, "tia"); + TIA_PAL_VIDEO(config, m_tia, "tia"); m_tia->read_input_port_callback().set(FUNC(a2600_state::a2600_read_input_port)); m_tia->databus_contents_callback().set(FUNC(a2600_state::a2600_get_databus_contents)); m_tia->vsync_callback().set(FUNC(a2600_state::a2600_tia_vsync_callback)); diff --git a/src/mame/atari/a7800.cpp b/src/mame/atari/a7800.cpp index e2b06af8e0c..49c46596256 100644 --- a/src/mame/atari/a7800.cpp +++ b/src/mame/atari/a7800.cpp @@ -110,7 +110,7 @@ #include "speaker.h" #define A7800_NTSC_Y1 XTAL(14'318'181) -#define CLK_PAL 1773447 +#define CLK_PAL XTAL::u(1773447) class a7800_state : public driver_device @@ -1387,19 +1387,19 @@ void a7800_state::a7800_ntsc(machine_config &config) /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(7159090, 454, 0, 320, 263, 27, 27 + 192 + 32); + m_screen->set_raw(XTAL::u(7159090), 454, 0, 320, 263, 27, 27 + 192 + 32); m_screen->set_screen_update("maria", FUNC(atari_maria_device::screen_update)); m_screen->set_palette("palette"); PALETTE(config, "palette", FUNC(a7800_state::a7800_palette), std::size(a7800_colors)); - ATARI_MARIA(config, m_maria, 0); + ATARI_MARIA(config, m_maria); m_maria->set_dmacpu_tag(m_maincpu); m_maria->set_screen_tag(m_screen); /* sound hardware */ SPEAKER(config, "mono").front_center(); - TIA(config, "tia", 31400).add_route(ALL_OUTPUTS, "mono", 1.00); + TIA(config, "tia", XTAL::u(31400)).add_route(ALL_OUTPUTS, "mono", 1.00); /* devices */ mos6532_new_device &riot(MOS6532_NEW(config, "riot", A7800_NTSC_Y1/8)); @@ -1420,7 +1420,7 @@ void a7800_pal_state::a7800_pal(machine_config &config) /* basic machine hardware */ m_maincpu->set_clock(CLK_PAL); - m_screen->set_raw(7093788, 454, 0, 320, 313, 35, 35 + 228 + 32); + m_screen->set_raw(XTAL::u(7093788), 454, 0, 320, 313, 35, 35 + 228 + 32); subdevice("palette")->set_init(FUNC(a7800_pal_state::a7800p_palette)); diff --git a/src/mame/atari/akkaarrh.cpp b/src/mame/atari/akkaarrh.cpp index 863107568a0..9e6bc7024a2 100644 --- a/src/mame/atari/akkaarrh.cpp +++ b/src/mame/atari/akkaarrh.cpp @@ -398,10 +398,10 @@ void akkaarrh_state::akkaarrh(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - pokey_device &pokey1(POKEY(config, "pokey1", 1250000)); // Unverified + pokey_device &pokey1(POKEY(config, "pokey1", XTAL::u(1250000))); // Unverified pokey1.add_route(ALL_OUTPUTS, "mono", 0.5); - pokey_device &pokey2(POKEY(config, "pokey2", 1250000)); // Unverified + pokey_device &pokey2(POKEY(config, "pokey2", XTAL::u(1250000))); // Unverified pokey2.add_route(ALL_OUTPUTS, "mono", 0.5); } diff --git a/src/mame/atari/antic.cpp b/src/mame/atari/antic.cpp index 93b482ff19d..f3cb25feb27 100644 --- a/src/mame/atari/antic.cpp +++ b/src/mame/atari/antic.cpp @@ -298,7 +298,7 @@ DEFINE_DEVICE_TYPE(ATARI_ANTIC, antic_device, "antic", "Atari ANTIC") // antic_device - constructor //------------------------------------------------- -antic_device::antic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +antic_device::antic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATARI_ANTIC, tag, owner, clock), device_video_interface(mconfig, *this), m_gtia(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/atari/antic.h b/src/mame/atari/antic.h index 8aaf838abe8..138c079b377 100644 --- a/src/mame/atari/antic.h +++ b/src/mame/atari/antic.h @@ -43,7 +43,7 @@ public: static constexpr unsigned MAX_Y = VDATA_END - 1; // construction/destruction - antic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + antic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/mame/atari/arcadecl.cpp b/src/mame/atari/arcadecl.cpp index d4ef61f5cc5..2495554044e 100644 --- a/src/mame/atari/arcadecl.cpp +++ b/src/mame/atari/arcadecl.cpp @@ -339,7 +339,7 @@ void arcadecl_state::arcadecl(machine_config &config) { sparkz(config); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, arcadecl_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, arcadecl_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); } diff --git a/src/mame/atari/asic65.cpp b/src/mame/atari/asic65.cpp index 89f0776c1b9..d194cbc7714 100644 --- a/src/mame/atari/asic65.cpp +++ b/src/mame/atari/asic65.cpp @@ -87,7 +87,7 @@ static const u8 command_map[3][MAX_COMMANDS] = DEFINE_DEVICE_TYPE(ASIC65, asic65_device, "asic65", "Atari ASIC65") -asic65_device::asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +asic65_device::asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASIC65, tag, owner, clock) , m_synced_write_timer(nullptr) , m_asic65_type(0) @@ -552,7 +552,7 @@ void asic65_device::asic65_io_map(address_map &map) void asic65_device::device_add_mconfig(machine_config &config) { /* ASIC65 */ - TMS32010(config, m_ourcpu, 20000000); + TMS32010(config, m_ourcpu, XTAL::u(20000000)); m_ourcpu->set_addrmap(AS_PROGRAM, &asic65_device::asic65_program_map); m_ourcpu->set_addrmap(AS_IO, &asic65_device::asic65_io_map); m_ourcpu->bio().set(FUNC(asic65_device::get_bio)); diff --git a/src/mame/atari/asic65.h b/src/mame/atari/asic65.h index 16950cf47e6..2c38e557359 100644 --- a/src/mame/atari/asic65.h +++ b/src/mame/atari/asic65.h @@ -22,13 +22,13 @@ enum { class asic65_device : public device_t { public: - asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, u8 type) - : asic65_device(mconfig, tag, owner, clock) + asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, u8 type) + : asic65_device(mconfig, tag, owner) { set_type(type); } - asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers void set_type(u8 type) { m_asic65_type = type; } diff --git a/src/mame/atari/asteroid.cpp b/src/mame/atari/asteroid.cpp index 04efc06c9c9..e36f67a9af6 100644 --- a/src/mame/atari/asteroid.cpp +++ b/src/mame/atari/asteroid.cpp @@ -860,7 +860,7 @@ void asteroid_state::asteroid_base(machine_config &config) screen.set_visarea(522, 1566, 394, 1182); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - DVG(config, m_dvg, 0); + DVG(config, m_dvg); m_dvg->set_vector("vector"); m_dvg->set_memory(m_maincpu, AS_PROGRAM, 0x4000); } diff --git a/src/mame/atari/atari400.cpp b/src/mame/atari/atari400.cpp index 7f70d334307..888c8fc66be 100644 --- a/src/mame/atari/atari400.cpp +++ b/src/mame/atari/atari400.cpp @@ -2209,21 +2209,21 @@ void a400_state::atari_common(machine_config &config) m_pokey->pot_r<6>().set(m_ctrl[3], FUNC(vcs_control_port_device::read_pot_y)); m_pokey->pot_r<7>().set(m_ctrl[3], FUNC(vcs_control_port_device::read_pot_x)); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.03); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.03); /* internal ram */ RAM(config, m_ram).set_default_size("48K"); - ATARI_GTIA(config, m_gtia, 0); + ATARI_GTIA(config, m_gtia); m_gtia->read_callback().set_ioport("console"); m_gtia->write_callback().set(FUNC(a400_state::gtia_cb)); m_gtia->trigger_callback().set(FUNC(a400_state::djoy_b_r)); - ATARI_ANTIC(config, m_antic, 0); + ATARI_ANTIC(config, m_antic); m_antic->set_gtia_tag(m_gtia); /* devices */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(a400_state::djoy_0_1_r)); m_pia->writepa_handler().set(FUNC(a400_state::djoy_0_1_w)); m_pia->readpb_handler().set(FUNC(a400_state::djoy_2_3_r)); @@ -2240,7 +2240,7 @@ void a400_state::atari_common(machine_config &config) sio.proceed().set(m_pia, FUNC(pia6821_device::ca1_w)); sio.interrupt().set(m_pia, FUNC(pia6821_device::cb1_w)); - ATARI_FDC(config, "fdc", 0); + ATARI_FDC(config, "fdc"); A800_CART_SLOT(config, m_cartleft, a800_left, nullptr); @@ -2368,11 +2368,11 @@ void a800xl_state::a800xlpal(machine_config &config) { a800xl(config); - m_maincpu->set_clock(1773000); + m_maincpu->set_clock(XTAL::u(1773000)); config_pal_screen(config); - m_pokey->set_clock(1773000); + m_pokey->set_clock(XTAL::u(1773000)); } // memory map A130XE @@ -2426,10 +2426,10 @@ void a5200_state::a5200(machine_config &config) m_pokey->set_keyboard_callback(FUNC(a5200_state::a5200_keypads)); m_pokey->add_route(ALL_OUTPUTS, "speaker", 1.0); - ATARI_GTIA(config, m_gtia, 0); + ATARI_GTIA(config, m_gtia); m_gtia->trigger_callback().set_ioport("djoy_b"); - ATARI_ANTIC(config, m_antic, 0); + ATARI_ANTIC(config, m_antic); m_antic->set_gtia_tag(m_gtia); config_ntsc_screen(config); diff --git a/src/mame/atari/atarifdc.cpp b/src/mame/atari/atarifdc.cpp index 83da87a0be3..0eb6b7d0669 100644 --- a/src/mame/atari/atarifdc.cpp +++ b/src/mame/atari/atarifdc.cpp @@ -741,7 +741,7 @@ static const floppy_interface atari_floppy_interface = DEFINE_DEVICE_TYPE(ATARI_FDC, atari_fdc_device, "atari_fdc", "Atari FDC") -atari_fdc_device::atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_fdc_device::atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATARI_FDC, tag, owner, clock), m_floppy(*this, "floppy%u", 0U), m_pokey(*this, "^pokey"), @@ -778,5 +778,5 @@ void atari_fdc_device::device_start() void atari_fdc_device::device_add_mconfig(machine_config &config) { for (auto &floppy : m_floppy) - LEGACY_FLOPPY(config, floppy, 0, &atari_floppy_interface); + LEGACY_FLOPPY(config, floppy, &atari_floppy_interface); } diff --git a/src/mame/atari/atarifdc.h b/src/mame/atari/atarifdc.h index 8608b538397..ee48b457dd6 100644 --- a/src/mame/atari/atarifdc.h +++ b/src/mame/atari/atarifdc.h @@ -15,7 +15,7 @@ class atari_fdc_device : public device_t { public: - atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t serin_r(); void serout_w(uint8_t data); diff --git a/src/mame/atari/atarig1.cpp b/src/mame/atari/atarig1.cpp index f5ed25a8688..ee1ae084721 100644 --- a/src/mame/atari/atarig1.cpp +++ b/src/mame/atari/atarig1.cpp @@ -368,7 +368,7 @@ void atarig1_state::atarig1(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_II(config, m_jsa, 0); + ATARI_JSA_II(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_2); m_jsa->test_read_cb().set_ioport("IN0").bit(14); m_jsa->add_route(ALL_OUTPUTS, "mono", 0.6); @@ -385,7 +385,7 @@ void atarig1_state::hydrap(machine_config &config) m_adc->in_callback<1>().set_ioport("ADC1"); m_adc->in_callback<2>().set_ioport("ADC2"); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_hydra); + ATARI_RLE_OBJECTS(config, m_rle, modesc_hydra); } @@ -393,7 +393,7 @@ void atarig1_state::hydra(machine_config &config) { hydrap(config); m_maincpu->set_addrmap(AS_PROGRAM, &atarig1_state::hydra_map); - SLAPSTIC(config, m_slapstic, 116); + SLAPSTIC(config, m_slapstic, XTAL::u(116)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x78000, 0x79fff, 0x6000); m_slapstic->set_bank(m_slapstic_bank); } @@ -404,8 +404,8 @@ void atarig1_state::pfslap111(machine_config &config) atarig1(config); m_maincpu->set_addrmap(AS_PROGRAM, &atarig1_state::pitfight_map); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_pitfight); - SLAPSTIC(config, m_slapstic, 111); + ATARI_RLE_OBJECTS(config, m_rle, modesc_pitfight); + SLAPSTIC(config, m_slapstic, XTAL::u(111)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x39fff, 0x6000); m_slapstic->set_bank(m_slapstic_bank); } @@ -416,8 +416,8 @@ void atarig1_state::pfslap112(machine_config &config) atarig1(config); m_maincpu->set_addrmap(AS_PROGRAM, &atarig1_state::pitfight_map); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_pitfight); - SLAPSTIC(config, m_slapstic, 112); + ATARI_RLE_OBJECTS(config, m_rle, modesc_pitfight); + SLAPSTIC(config, m_slapstic, XTAL::u(112)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x39fff, 0x6000); m_slapstic->set_bank(m_slapstic_bank); } @@ -428,8 +428,8 @@ void atarig1_state::pfslap113(machine_config &config) atarig1(config); m_maincpu->set_addrmap(AS_PROGRAM, &atarig1_state::pitfight_map); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_pitfight); - SLAPSTIC(config, m_slapstic, 113); + ATARI_RLE_OBJECTS(config, m_rle, modesc_pitfight); + SLAPSTIC(config, m_slapstic, XTAL::u(113)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x39fff, 0x6000); m_slapstic->set_bank(m_slapstic_bank); } @@ -440,8 +440,8 @@ void atarig1_state::pfslap114(machine_config &config) atarig1(config); m_maincpu->set_addrmap(AS_PROGRAM, &atarig1_state::pitfight_map); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_pitfight); - SLAPSTIC(config, m_slapstic, 114); + ATARI_RLE_OBJECTS(config, m_rle, modesc_pitfight); + SLAPSTIC(config, m_slapstic, XTAL::u(114)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x39fff, 0x6000); m_slapstic->set_bank(m_slapstic_bank); } @@ -452,7 +452,7 @@ void atarig1_state::pitfightb(machine_config &config) atarig1(config); m_maincpu->set_addrmap(AS_PROGRAM, &atarig1_state::pitfight_map); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_pitfight); + ATARI_RLE_OBJECTS(config, m_rle, modesc_pitfight); } diff --git a/src/mame/atari/atarig42.cpp b/src/mame/atari/atarig42.cpp index 897df598da6..3155c4c8a33 100644 --- a/src/mame/atari/atarig42.cpp +++ b/src/mame/atari/atarig42.cpp @@ -578,7 +578,7 @@ void atarig42_state::atarig42(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_III(config, m_jsa, 0); + ATARI_JSA_III(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_5); m_jsa->test_read_cb().set_ioport("IN2").bit(6); m_jsa->add_route(ALL_OUTPUTS, "mono", 0.8); @@ -587,23 +587,23 @@ void atarig42_state::atarig42(machine_config &config) void atarig42_0x200_state::atarig42_0x200(machine_config &config) { atarig42(config); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_0x200); + ATARI_RLE_OBJECTS(config, m_rle, modesc_0x200); ADC0809(config, m_adc, 14.318181_MHz_XTAL / 16); m_adc->in_callback<0>().set_ioport("A2D0"); m_adc->in_callback<1>().set_ioport("A2D1"); /* ASIC65 */ - ASIC65(config, m_asic65, 0, ASIC65_ROMBASED); + ASIC65(config, m_asic65, ASIC65_ROMBASED); } void atarig42_0x400_state::atarig42_0x400(machine_config &config) { atarig42(config); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_0x400); + ATARI_RLE_OBJECTS(config, m_rle, modesc_0x400); /* ASIC65 */ - ASIC65(config, m_asic65, 0, ASIC65_GUARDIANS); + ASIC65(config, m_asic65, ASIC65_GUARDIANS); } diff --git a/src/mame/atari/atarigt.cpp b/src/mame/atari/atarigt.cpp index 44a72cdd6fe..21e247f23e3 100644 --- a/src/mame/atari/atarigt.cpp +++ b/src/mame/atari/atarigt.cpp @@ -848,10 +848,10 @@ void atarigt_state::atarigt(machine_config &config) m_screen->set_screen_update(FUNC(atarigt_state::screen_update_atarigt)); m_screen->screen_vblank().set(FUNC(atarigt_state::video_int_write_line)); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc); + ATARI_RLE_OBJECTS(config, m_rle, modesc); /* sound hardware */ - ATARI_CAGE(config, m_cage, 0); + ATARI_CAGE(config, m_cage); m_cage->irq_handler().set(FUNC(atarigt_state::cage_irq_callback)); } diff --git a/src/mame/atari/atarigx2.cpp b/src/mame/atari/atarigx2.cpp index 74c6efdbf1e..74fbe0f23cf 100644 --- a/src/mame/atari/atarigx2.cpp +++ b/src/mame/atari/atarigx2.cpp @@ -1524,7 +1524,7 @@ void atarigx2_state::atarigx2(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ATARI_JSA_IIIS(config, m_jsa, 0); + ATARI_JSA_IIIS(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_5); m_jsa->test_read_cb().set_ioport("SERVICE").bit(6); m_jsa->add_route(0, "lspeaker", 0.7); @@ -1534,15 +1534,15 @@ void atarigx2_state::atarigx2(machine_config &config) void atarigx2_state::atarigx2_0x200(machine_config &config) { atarigx2(config); - ATARI_136094_0072(config, m_xga, 0); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_0x200); + ATARI_136094_0072(config, m_xga); + ATARI_RLE_OBJECTS(config, m_rle, modesc_0x200); } void atarigx2_state::atarigx2_0x400(machine_config &config) { atarigx2(config); - ATARI_136095_0072(config, m_xga, 0); - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc_0x400); + ATARI_136095_0072(config, m_xga); + ATARI_RLE_OBJECTS(config, m_rle, modesc_0x400); } diff --git a/src/mame/atari/atarijsa.cpp b/src/mame/atari/atarijsa.cpp index 765de024b78..e5a1595f254 100644 --- a/src/mame/atari/atarijsa.cpp +++ b/src/mame/atari/atarijsa.cpp @@ -234,7 +234,7 @@ INPUT_PORTS_END // atari_jsa_base_device - constructor //------------------------------------------------- -atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, uint32_t clock, int channels) +atari_jsa_base_device::atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, const XTAL &clock, int channels) : device_t(mconfig, devtype, tag, owner, clock), device_mixer_interface(mconfig, *this, channels), m_soundcomm(*this, "soundcomm"), @@ -430,7 +430,7 @@ void atari_jsa_base_device::update_sound_irq() // atari_jsa_oki_base_device: Constructor //------------------------------------------------- -atari_jsa_oki_base_device::atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, uint32_t clock, int channels) +atari_jsa_oki_base_device::atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, const XTAL &clock, int channels) : atari_jsa_base_device(mconfig, devtype, tag, owner, clock, channels), m_oki1(*this, "oki1"), m_oki2(*this, "oki2"), @@ -647,7 +647,7 @@ void atari_jsa_oki_base_device::update_all_volumes() // atari_jsa_i_device: Constructor //------------------------------------------------- -atari_jsa_i_device::atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_jsa_i_device::atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_jsa_base_device(mconfig, ATARI_JSA_I, tag, owner, clock, 2), m_pokey(*this, "pokey"), m_tms5220(*this, "tms"), @@ -882,7 +882,7 @@ void atari_jsa_i_device::update_all_volumes() // atari_jsa_ii_device: Constructor //------------------------------------------------- -atari_jsa_ii_device::atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_jsa_ii_device::atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_jsa_oki_base_device(mconfig, ATARI_JSA_II, tag, owner, clock, 1) , m_jsaii(*this, "JSAII") { @@ -961,12 +961,12 @@ ioport_constructor atari_jsa_ii_device::device_input_ports() const // atari_jsa_iii_device: Constructor //------------------------------------------------- -atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_jsa_iii_device(mconfig, ATARI_JSA_III, tag, owner, clock, 1) { } -atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, uint32_t clock, int channels) +atari_jsa_iii_device::atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, const XTAL &clock, int channels) : atari_jsa_oki_base_device(mconfig, devtype, tag, owner, clock, channels) , m_jsaiii(*this, "JSAIII") { @@ -1045,7 +1045,7 @@ ioport_constructor atari_jsa_iii_device::device_input_ports() const // atari_jsa_iiis_device: Constructor //------------------------------------------------- -atari_jsa_iiis_device::atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_jsa_iiis_device::atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_jsa_iii_device(mconfig, ATARI_JSA_IIIS, tag, owner, clock, 2) { } diff --git a/src/mame/atari/atarijsa.h b/src/mame/atari/atarijsa.h index 7d3efe36663..e2211d1d73c 100644 --- a/src/mame/atari/atarijsa.h +++ b/src/mame/atari/atarijsa.h @@ -54,7 +54,7 @@ class atari_jsa_base_device : public device_t, { protected: // construction/destruction - atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, uint32_t clock, int channels); + atari_jsa_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, const XTAL &clock, int channels); public: // configuration @@ -125,7 +125,7 @@ class atari_jsa_oki_base_device : public atari_jsa_base_device { protected: // derived construction/destruction - atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, uint32_t clock, int channels); + atari_jsa_oki_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, const XTAL &clock, int channels); public: // read/write handlers @@ -169,7 +169,7 @@ class atari_jsa_i_device : public atari_jsa_base_device { public: // construction/destruction - atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_jsa_i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read/write handlers uint8_t rdio_r(); @@ -207,7 +207,7 @@ class atari_jsa_ii_device : public atari_jsa_oki_base_device { public: // construction/destruction - atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_jsa_ii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read/write handlers uint8_t rdio_r(); @@ -228,13 +228,13 @@ class atari_jsa_iii_device : public atari_jsa_oki_base_device { public: // construction/destruction - atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_jsa_iii_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void atarijsa3_map(address_map &map); void jsa3_oki1_map(address_map &map); protected: // derived construction/destruction - atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, uint32_t clock, int channels); + atari_jsa_iii_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner, const XTAL &clock, int channels); public: // read/write handlers @@ -255,7 +255,7 @@ class atari_jsa_iiis_device : public atari_jsa_iii_device { public: // construction/destruction - atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_jsa_iiis_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void jsa3_oki2_map(address_map &map); protected: diff --git a/src/mame/atari/atarimo.cpp b/src/mame/atari/atarimo.cpp index 74701174253..cd3a5cad7e5 100644 --- a/src/mame/atari/atarimo.cpp +++ b/src/mame/atari/atarimo.cpp @@ -124,7 +124,7 @@ DEFINE_DEVICE_TYPE(ATARI_MOTION_OBJECTS, atari_motion_objects_device, "atarimo", // atari_motion_objects_device - constructor //------------------------------------------------- -atari_motion_objects_device::atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_motion_objects_device::atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sprite16_device_ind16(mconfig, ATARI_MOTION_OBJECTS, tag, owner) , device_video_interface(mconfig, *this) , m_tilewidth(0) diff --git a/src/mame/atari/atarimo.h b/src/mame/atari/atarimo.h index 8c3c38ca44c..50a5f9cc511 100644 --- a/src/mame/atari/atarimo.h +++ b/src/mame/atari/atarimo.h @@ -71,14 +71,14 @@ class atari_motion_objects_device : public sprite16_device_ind16, public: // construction/destruction template - atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag, const atari_motion_objects_config &config) - : atari_motion_objects_device(mconfig, tag, owner, clock) + atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&screen_tag, const atari_motion_objects_config &config) + : atari_motion_objects_device(mconfig, tag, owner) { set_screen(std::forward(screen_tag)); set_config(config); } - atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_motion_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration template void set_gfxdecode(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/atari/atarirle.cpp b/src/mame/atari/atarirle.cpp index 4db45368632..da66ef5443e 100644 --- a/src/mame/atari/atarirle.cpp +++ b/src/mame/atari/atarirle.cpp @@ -67,7 +67,7 @@ inline int atari_rle_objects_device::round_to_powerof2(int value) // atari_rle_objects_device: Constructor //------------------------------------------------- -atari_rle_objects_device::atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +atari_rle_objects_device::atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATARI_RLE_OBJECTS, tag, owner, clock) , device_video_interface(mconfig, *this) , m_rombase(*this, DEVICE_SELF) diff --git a/src/mame/atari/atarirle.h b/src/mame/atari/atarirle.h index 1b1ae2ce8e0..f75b1179d67 100644 --- a/src/mame/atari/atarirle.h +++ b/src/mame/atari/atarirle.h @@ -70,13 +70,13 @@ class atari_rle_objects_device : public device_t, { public: // construction/destruction - atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, const atari_rle_objects_config &config) - : atari_rle_objects_device(mconfig, tag, owner, clock) + atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, const atari_rle_objects_config &config) + : atari_rle_objects_device(mconfig, tag, owner) { set_config(config); } - atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + atari_rle_objects_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers void set_config(const atari_rle_objects_config &config) { static_cast(*this) = config; } diff --git a/src/mame/atari/atarisac.cpp b/src/mame/atari/atarisac.cpp index ac21f8ed86d..eb4984be8ba 100644 --- a/src/mame/atari/atarisac.cpp +++ b/src/mame/atari/atarisac.cpp @@ -94,7 +94,7 @@ INPUT_PORTS_END // atari_sac_device: Constructor //------------------------------------------------- -atari_sac_device::atari_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +atari_sac_device::atari_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_jsa_base_device(mconfig, ATARI_SAC, tag, owner, clock, 2) , m_daccpu(*this, "dac") , m_datin(*this, "datin") diff --git a/src/mame/atari/atarisac.h b/src/mame/atari/atarisac.h index f085fc78168..c200f5f25fa 100644 --- a/src/mame/atari/atarisac.h +++ b/src/mame/atari/atarisac.h @@ -35,7 +35,7 @@ class atari_sac_device : public atari_jsa_base_device { public: // construction/destruction - atari_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + atari_sac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device level overrides diff --git a/src/mame/atari/atariscom.cpp b/src/mame/atari/atariscom.cpp index 36e0bb37d2a..402a1a1595b 100644 --- a/src/mame/atari/atariscom.cpp +++ b/src/mame/atari/atariscom.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(ATARI_SOUND_COMM, atari_sound_comm_device, "atariscom", "Atar // atari_sound_comm_device - constructor //------------------------------------------------- -atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATARI_SOUND_COMM, tag, owner, clock) , m_main_int_cb(*this) , m_sound_cpu(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/atari/atariscom.h b/src/mame/atari/atariscom.h index 39633550b75..744d1cba367 100644 --- a/src/mame/atari/atariscom.h +++ b/src/mame/atari/atariscom.h @@ -36,12 +36,12 @@ public: // construction/destruction template atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cputag) - : atari_sound_comm_device(mconfig, tag, owner, (u32)0) + : atari_sound_comm_device(mconfig, tag, owner) { m_sound_cpu.set_tag(std::forward(cputag)); } - atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto int_callback() { return m_main_int_cb.bind(); } diff --git a/src/mame/atari/atarist.cpp b/src/mame/atari/atarist.cpp index 28fdefafdbf..6aded00b514 100644 --- a/src/mame/atari/atarist.cpp +++ b/src/mame/atari/atarist.cpp @@ -85,8 +85,8 @@ namespace { #define Y1 XTAL(2'457'600) // 32028400 also exists -#define Y2 32084988.0 -#define Y2_NTSC 32042400.0 +#define Y2 XTAL::u(32084988) +#define Y2_NTSC XTAL::u(32042400) // STBook @@ -109,7 +109,7 @@ namespace { #define DMA_SECTOR_SIZE 512 -static const double DMASOUND_RATE[] = { Y2/640.0/8.0, Y2/640.0/4.0, Y2/640.0/2.0, Y2/640.0 }; +static const XTAL DMASOUND_RATE[] = { Y2/640.0/8.0, Y2/640.0/4.0, Y2/640.0/2.0, Y2/640.0 }; static const int IKBD_MOUSE_XYA[3][4] = { { 0, 0, 0, 0 }, { 1, 1, 0, 0 }, { 0, 1, 1, 0 } }; static const int IKBD_MOUSE_XYB[3][4] = { { 0, 0, 0, 0 }, { 0, 1, 1, 0 }, { 1, 1, 0, 0 } }; @@ -2486,7 +2486,7 @@ void ste_state::ste(machine_config &config) m_ymsnd->add_route(0, "lspeaker", 0.50); m_ymsnd->add_route(0, "rspeaker", 0.50); /* - custom_device &custom_dac(CUSTOM(config, "custom", 0)); // DAC + custom_device &custom_dac(CUSTOM(config, "custom")); // DAC custom_dac.add_route(0, "rspeaker", 0.50); custom_dac.add_route(1, "lspeaker", 0.50); */ diff --git a/src/mame/atari/atarist_v.cpp b/src/mame/atari/atarist_v.cpp index d55a2c05ad2..97c0b721e0d 100644 --- a/src/mame/atari/atarist_v.cpp +++ b/src/mame/atari/atarist_v.cpp @@ -596,7 +596,7 @@ void ste_video_device::shifter_pixelofs_w(uint8_t data) // VIDEO //************************************************************************** -st_video_device::st_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +st_video_device::st_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_palette_interface(mconfig, *this) , device_video_interface(mconfig, *this, true) @@ -606,12 +606,12 @@ st_video_device::st_video_device(const machine_config &mconfig, device_type type { } -st_video_device::st_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +st_video_device::st_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st_video_device(mconfig, ST_VIDEO, tag, owner, clock) { } -ste_video_device::ste_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ste_video_device::ste_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st_video_device(mconfig, STE_VIDEO, tag, owner, clock) { } diff --git a/src/mame/atari/atarist_v.h b/src/mame/atari/atarist_v.h index dd41f293652..c785345642d 100644 --- a/src/mame/atari/atarist_v.h +++ b/src/mame/atari/atarist_v.h @@ -32,7 +32,7 @@ class st_video_device : public device_t, public device_palette_interface, public device_video_interface { public: - st_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + st_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_ram_space(T &&tag, int spacenum) { m_ram_space.set_tag(tag, spacenum); } auto de_callback() { return m_de_callback.bind(); } @@ -51,7 +51,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: - st_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + st_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -104,7 +104,7 @@ protected: class ste_video_device : public st_video_device { public: - ste_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ste_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t shifter_base_low_r(); void shifter_base_low_w(uint8_t data); diff --git a/src/mame/atari/ataristb.cpp b/src/mame/atari/ataristb.cpp index 9e4364bce77..08a9b1f40cd 100644 --- a/src/mame/atari/ataristb.cpp +++ b/src/mame/atari/ataristb.cpp @@ -509,7 +509,7 @@ void st_blitter_device::ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) // VIDEO //************************************************************************** -st_blitter_device::st_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +st_blitter_device::st_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ST_BLITTER, tag, owner, clock) , m_space(*this, finder_base::DUMMY_TAG, 0) , m_int_callback(*this) diff --git a/src/mame/atari/ataristb.h b/src/mame/atari/ataristb.h index 87efdafa183..e78209777b7 100644 --- a/src/mame/atari/ataristb.h +++ b/src/mame/atari/ataristb.h @@ -15,7 +15,7 @@ class st_blitter_device : public device_t static constexpr uint8_t CTRL_BUSY = 0x80; public: - st_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + st_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_space(T &&tag, int spacenum) { m_space.set_tag(tag, spacenum); } auto int_callback() { return m_int_callback.bind(); } diff --git a/src/mame/atari/atarisy1.cpp b/src/mame/atari/atarisy1.cpp index f452939c2c2..dc541570757 100644 --- a/src/mame/atari/atarisy1.cpp +++ b/src/mame/atari/atarisy1.cpp @@ -760,7 +760,7 @@ void atarisy1_state::atarisy1(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,64).set_info_callback(FUNC(atarisy1_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(atarisy1_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, atarisy1_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, atarisy1_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -796,7 +796,7 @@ void atarisy1_state::atarisy1(machine_config &config) void atarisy1_state::marble(machine_config &config) { atarisy1(config); - SLAPSTIC(config, m_slapstic, 103); + SLAPSTIC(config, m_slapstic, XTAL::u(103)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x80000, 0x87fff, 0); m_slapstic->set_bank(m_slapstic_bank); } @@ -805,7 +805,7 @@ void atarisy1_state::peterpak(machine_config &config) { atarisy1(config); add_adc(config); - SLAPSTIC(config, m_slapstic, 107); + SLAPSTIC(config, m_slapstic, XTAL::u(107)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x80000, 0x87fff, 0); m_slapstic->set_bank(m_slapstic_bank); @@ -821,7 +821,7 @@ void atarisy1_state::indytemp(machine_config &config) atarisy1(config); add_adc(config); add_speech(config); - SLAPSTIC(config, m_slapstic, 105); + SLAPSTIC(config, m_slapstic, XTAL::u(105)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x80000, 0x87fff, 0); m_slapstic->set_bank(m_slapstic_bank); @@ -837,7 +837,7 @@ void atarisy1_state::roadrunn(machine_config &config) atarisy1(config); add_adc(config); add_speech(config); - SLAPSTIC(config, m_slapstic, 108); + SLAPSTIC(config, m_slapstic, XTAL::u(108)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x80000, 0x87fff, 0); m_slapstic->set_bank(m_slapstic_bank); @@ -851,7 +851,7 @@ void atarisy1_state::roadb109(machine_config &config) atarisy1(config); add_adc(config); add_speech(config); - SLAPSTIC(config, m_slapstic, 109); + SLAPSTIC(config, m_slapstic, XTAL::u(109)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x80000, 0x87fff, 0); m_slapstic->set_bank(m_slapstic_bank); @@ -864,7 +864,7 @@ void atarisy1_state::roadb110(machine_config &config) atarisy1(config); add_adc(config); add_speech(config); - SLAPSTIC(config, m_slapstic, 110); + SLAPSTIC(config, m_slapstic, XTAL::u(110)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x80000, 0x87fff, 0); m_slapstic->set_bank(m_slapstic_bank); diff --git a/src/mame/atari/atarisy2.cpp b/src/mame/atari/atarisy2.cpp index a0d90255d1a..82719d924ab 100644 --- a/src/mame/atari/atarisy2.cpp +++ b/src/mame/atari/atarisy2.cpp @@ -1243,7 +1243,7 @@ void atarisy2_state::atarisy2(machine_config &config) TILEMAP(config, m_playfield_tilemap, "gfxdecode", 2, 8,8, TILEMAP_SCAN_ROWS, 128,64).set_info_callback(FUNC(atarisy2_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, "gfxdecode", 2, 8,8, TILEMAP_SCAN_ROWS, 64,48, 0).set_info_callback(FUNC(atarisy2_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, atarisy2_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, atarisy2_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -1285,7 +1285,7 @@ void atarisy2_state::atarisy2(machine_config &config) void atarisy2_state::paperboy(machine_config &config) { atarisy2(config); - SLAPSTIC(config, m_slapstic, 105); + SLAPSTIC(config, m_slapstic, XTAL::u(105)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0100000, 0100777, 0); m_slapstic->set_view(m_vmmu); } @@ -1298,7 +1298,7 @@ void atarisy2_state::_720(machine_config &config) issues with the sound CPU; temporarily increasing the sound CPU frequency to ~2.2MHz "fixes" the problem */ - SLAPSTIC(config, m_slapstic, 107); + SLAPSTIC(config, m_slapstic, XTAL::u(107)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0100000, 0100777, 0); m_slapstic->set_view(m_vmmu); } @@ -1307,7 +1307,7 @@ void atarisy2_state::_720(machine_config &config) void atarisy2_state::ssprint(machine_config &config) { atarisy2(config); - SLAPSTIC(config, m_slapstic, 108); + SLAPSTIC(config, m_slapstic, XTAL::u(108)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0100000, 0100777, 0); m_slapstic->set_view(m_vmmu); @@ -1319,7 +1319,7 @@ void atarisy2_state::ssprint(machine_config &config) void atarisy2_state::csprint(machine_config &config) { atarisy2(config); - SLAPSTIC(config, m_slapstic, 109); + SLAPSTIC(config, m_slapstic, XTAL::u(109)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0100000, 0100777, 0); m_slapstic->set_view(m_vmmu); @@ -1331,7 +1331,7 @@ void atarisy2_state::csprint(machine_config &config) void atarisy2_state::apb(machine_config &config) { atarisy2(config); - SLAPSTIC(config, m_slapstic, 110); + SLAPSTIC(config, m_slapstic, XTAL::u(110)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0100000, 0100777, 0); m_slapstic->set_view(m_vmmu); } diff --git a/src/mame/atari/atarisy4.cpp b/src/mame/atari/atarisy4.cpp index 567c9050974..a145b73f327 100644 --- a/src/mame/atari/atarisy4.cpp +++ b/src/mame/atari/atarisy4.cpp @@ -807,17 +807,17 @@ INPUT_PORTS_END void atarisy4_state::atarisy4(machine_config &config) { - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &atarisy4_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(atarisy4_state::vblank_int)); - TMS32010(config, m_dsp0, 16000000); + TMS32010(config, m_dsp0, XTAL::u(16000000)); m_dsp0->set_addrmap(AS_PROGRAM, &atarisy4_state::dsp0_map); m_dsp0->set_addrmap(AS_IO, &atarisy4_state::dsp0_io_map); m_dsp0->bio().set(FUNC(atarisy4_state::dsp0_bio_r)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(32000000/2, 660, 0, 512, 404, 0, 384); + m_screen->set_raw(XTAL::u(32000000)/2, 660, 0, 512, 404, 0, 384); m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); m_screen->set_screen_update(FUNC(atarisy4_state::screen_update_atarisy4)); @@ -830,7 +830,7 @@ void airrace_state::airrace(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &airrace_state::airrace_map); - TMS32010(config, m_dsp1, 16000000); + TMS32010(config, m_dsp1, XTAL::u(16000000)); m_dsp1->set_addrmap(AS_PROGRAM, &airrace_state::dsp1_map); m_dsp1->set_addrmap(AS_IO, &airrace_state::dsp1_io_map); m_dsp1->bio().set(FUNC(airrace_state::dsp1_bio_r)); diff --git a/src/mame/atari/atarittl.cpp b/src/mame/atari/atarittl.cpp index 635f6bfca41..de65cb4027d 100644 --- a/src/mame/atari/atarittl.cpp +++ b/src/mame/atari/atarittl.cpp @@ -83,7 +83,7 @@ namespace { // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -95,7 +95,7 @@ namespace { #define HRES_MULT (1) // end -#define SC_VIDCLOCK (14318000/2) +#define SC_VIDCLOCK (XTAL::u(14318000)/2) #define SC_HTOTAL (0x1C8+0) // 456 #define SC_VTOTAL (0x103+1) // 259 #define SC_HBSTART (SC_HTOTAL) @@ -103,11 +103,11 @@ namespace { #define SC_VBSTART (SC_VTOTAL) #define SC_VBEND (8) -#define TANK_VIDCLOCK (14318181) +#define TANK_VIDCLOCK XTAL::u(14318181) #define TANK_HTOTAL (952) #define TANK_VTOTAL (262) -#define GTRAK10_VIDCLOCK (14318181 / 2) +#define GTRAK10_VIDCLOCK (XTAL::u(14318181) / 2) #define GTRAK10_HTOTAL 451 #define GTRAK10_VTOTAL 521 @@ -194,7 +194,7 @@ static NETLIST_START(atarikee) void atarikee_state::atarikee(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_atarikee); + NETLIST_CPU(config, m_maincpu).set_source(netlist_atarikee); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); @@ -206,13 +206,13 @@ void atarikee_state::atarikee(machine_config &config) m_video->set_threshold(0.30); } -#define STUNTCYC_NL_CLOCK (SC_HTOTAL*SC_VTOTAL*60*140) +#define STUNTCYC_NL_CLOCK XTAL::u(SC_HTOTAL*SC_VTOTAL*60*140) void stuntcyc_state::stuntcyc(machine_config &config) { /* basic machine hardware */ NETLIST_CPU(config, m_maincpu, STUNTCYC_NL_CLOCK).set_source(netlist_stuntcyc); - NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0", 0).set_params("VIDEO_OUT", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("VIDEO_OUT", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); NETLIST_LOGIC_INPUT(config, "maincpu:coinsw", "coinsw.POS", 0); NETLIST_LOGIC_INPUT(config, "maincpu:startsw1", "START1.POS", 0); NETLIST_LOGIC_INPUT(config, "maincpu:startsw2", "START2.POS", 0); @@ -232,8 +232,8 @@ void stuntcyc_state::stuntcyc(machine_config &config) void tank_state::tank(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(NETLIST_NAME(tank)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0", 0).set_params("VIDEO_OUT", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); + NETLIST_CPU(config, m_maincpu).set_source(NETLIST_NAME(tank)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("VIDEO_OUT", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); NETLIST_LOGIC_INPUT(config, "maincpu:p1lup", "P1_LEFT_UP.POS", 0); NETLIST_LOGIC_INPUT(config, "maincpu:p1ldown", "P1_LEFT_DOWN.POS", 0); NETLIST_LOGIC_INPUT(config, "maincpu:p1rup", "P1_RIGHT_UP.POS", 0); @@ -264,9 +264,9 @@ void tank_state::tank(machine_config &config) void gtrak10_state::gtrak10(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, "maincpu", netlist::config::DEFAULT_CLOCK()).set_source(netlist_gtrak10); + NETLIST_CPU(config, "maincpu").set_source(netlist_gtrak10); - NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0", 0).set_params("VIDEO_OUT", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("VIDEO_OUT", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); NETLIST_LOGIC_INPUT(config, "maincpu:p1lup", "P1_LEFT_UP.POS", 0); NETLIST_LOGIC_INPUT(config, "maincpu:p1lleft", "P1_LEFT_LEFT.POS", 0); diff --git a/src/mame/atari/atarivad.cpp b/src/mame/atari/atarivad.cpp index 258324c40df..9b8a2bdee72 100644 --- a/src/mame/atari/atarivad.cpp +++ b/src/mame/atari/atarivad.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(ATARI_VAD, atari_vad_device, "atarivad", "Atari VAD") // atari_vad_device - constructor //------------------------------------------------- -atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATARI_VAD, tag, owner, clock) , device_video_interface(mconfig, *this) , m_scanline_int_cb(*this) diff --git a/src/mame/atari/atarivad.h b/src/mame/atari/atarivad.h index d51b31ba9dc..aa50ee9f334 100644 --- a/src/mame/atari/atarivad.h +++ b/src/mame/atari/atarivad.h @@ -29,12 +29,12 @@ class atari_vad_device : public device_t, public device_video_interface public: // construction/destruction template - atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) - : atari_vad_device(mconfig, tag, owner, clock) + atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&screen_tag) + : atari_vad_device(mconfig, tag, owner) { set_screen(std::forward(screen_tag)); } - atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_vad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto scanline_int_cb() { return m_scanline_int_cb.bind(); } diff --git a/src/mame/atari/atarixga.cpp b/src/mame/atari/atarixga.cpp index 9e17b6018b6..7796aea7aa4 100644 --- a/src/mame/atari/atarixga.cpp +++ b/src/mame/atari/atarixga.cpp @@ -65,7 +65,7 @@ static uint16_t parity(uint16_t x) DEFINE_DEVICE_TYPE(ATARI_136094_0072, atari_136094_0072_device, "136094_0072", "Atari 136094-0072 XGA") -atari_136094_0072_device::atari_136094_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_136094_0072_device::atari_136094_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_xga_device(mconfig, ATARI_136094_0072, tag, owner, clock) { } @@ -285,7 +285,7 @@ uint32_t atari_136094_0072_device::read(offs_t offset, uint32_t mem_mask) DEFINE_DEVICE_TYPE(ATARI_136095_0072, atari_136095_0072_device, "136095_0072", "Atari 136095-0072 XGA") -atari_136095_0072_device::atari_136095_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_136095_0072_device::atari_136095_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_xga_device(mconfig, ATARI_136095_0072, tag, owner, clock) { } diff --git a/src/mame/atari/atarixga.h b/src/mame/atari/atarixga.h index 6d7e1861de9..70981a20fbb 100644 --- a/src/mame/atari/atarixga.h +++ b/src/mame/atari/atarixga.h @@ -22,7 +22,7 @@ public: protected: // construction/destruction - atari_xga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + atari_xga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } @@ -36,7 +36,7 @@ protected: class atari_136094_0072_device : public atari_xga_device { public: - atari_136094_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_136094_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; virtual uint32_t read(offs_t offset, uint32_t mem_mask = ~0) override; @@ -68,7 +68,7 @@ private: class atari_136095_0072_device : public atari_xga_device { public: - atari_136095_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_136095_0072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void polylsb_write(offs_t offset, uint32_t data); uint32_t polylsb_read(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/mame/atari/atetris.cpp b/src/mame/atari/atetris.cpp index 8175757238f..349340b0999 100644 --- a/src/mame/atari/atetris.cpp +++ b/src/mame/atari/atetris.cpp @@ -596,7 +596,7 @@ void atetris_state::atetris(machine_config &config) { atetris_pokey(config); - SLAPSTIC(config, m_slapstic, 101); + SLAPSTIC(config, m_slapstic, XTAL::u(101)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x6000, 0x7fff, 0); m_slapstic->set_bank(m_slapstic_bank); } diff --git a/src/mame/atari/badlands.cpp b/src/mame/atari/badlands.cpp index 4745c5b9655..021d70b4379 100644 --- a/src/mame/atari/badlands.cpp +++ b/src/mame/atari/badlands.cpp @@ -443,7 +443,7 @@ void badlands_state::badlands(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32).set_info_callback(FUNC(badlands_state::get_playfield_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, badlands_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, badlands_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/atari/badlandsbl.cpp b/src/mame/atari/badlandsbl.cpp index 42febffddeb..68445275a1f 100644 --- a/src/mame/atari/badlandsbl.cpp +++ b/src/mame/atari/badlandsbl.cpp @@ -241,7 +241,7 @@ void badlandsbl_state::badlandsb(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32).set_info_callback(FUNC(badlandsbl_state::get_playfield_tile_info)); -// ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, badlands_state::s_mob_config); +// ATARI_MOTION_OBJECTS(config, m_mob, m_screen, badlands_state::s_mob_config); // m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/atari/bartop52.cpp b/src/mame/atari/bartop52.cpp index 7c4353c3e57..c951c3a2ac6 100644 --- a/src/mame/atari/bartop52.cpp +++ b/src/mame/atari/bartop52.cpp @@ -135,11 +135,11 @@ void bartop52_state::a5200(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &bartop52_state::a5200_mem); TIMER(config, "scantimer").configure_scanline(FUNC(bartop52_state::bartop_interrupt), "screen", 0, 1); - ATARI_GTIA(config, m_gtia, 0); + ATARI_GTIA(config, m_gtia); m_gtia->set_region(GTIA_NTSC); m_gtia->trigger_callback().set_ioport("djoy_b"); - ATARI_ANTIC(config, m_antic, 0); + ATARI_ANTIC(config, m_antic); m_antic->set_gtia_tag(m_gtia); /* video hardware */ diff --git a/src/mame/atari/batman.cpp b/src/mame/atari/batman.cpp index 2ad7b2b134b..11317e9848a 100644 --- a/src/mame/atari/batman.cpp +++ b/src/mame/atari/batman.cpp @@ -197,7 +197,7 @@ void batman_state::batman(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_batman); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); - ATARI_VAD(config, m_vad, 0, m_screen); + ATARI_VAD(config, m_vad, m_screen); m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); m_vad->set_xoffsets(2, 6); @@ -205,7 +205,7 @@ void batman_state::batman(machine_config &config) TILEMAP(config, "vad:playfield2", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(FUNC(batman_state::get_playfield2_tile_info)); TILEMAP(config, "vad:alpha", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(FUNC(batman_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, batman_state::s_mob_config).set_gfxdecode("gfxdecode"); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, batman_state::s_mob_config).set_gfxdecode("gfxdecode"); m_mob->set_xoffset(-1); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -219,7 +219,7 @@ void batman_state::batman(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_III(config, m_jsa, 0); + ATARI_JSA_III(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("260010").bit(6); m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/atari/beathead.cpp b/src/mame/atari/beathead.cpp index bfabcfb271a..e5cd750ba2b 100644 --- a/src/mame/atari/beathead.cpp +++ b/src/mame/atari/beathead.cpp @@ -361,7 +361,7 @@ void beathead_state::beathead(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_III(config, m_jsa, 0); + ATARI_JSA_III(config, m_jsa); m_jsa->test_read_cb().set_ioport("IN2").bit(6); m_jsa->add_route(ALL_OUTPUTS, "mono", 0.6); } diff --git a/src/mame/atari/blstroid.cpp b/src/mame/atari/blstroid.cpp index 49f3a0efe74..e8d5a1e43da 100644 --- a/src/mame/atari/blstroid.cpp +++ b/src/mame/atari/blstroid.cpp @@ -198,7 +198,7 @@ void blstroid_state::blstroid(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 16,8, TILEMAP_SCAN_ROWS, 64,64).set_info_callback(FUNC(blstroid_state::get_playfield_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, blstroid_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, blstroid_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -214,7 +214,7 @@ void blstroid_state::blstroid(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ATARI_JSA_I(config, m_jsa, 0); + ATARI_JSA_I(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); m_jsa->test_read_cb().set_ioport("IN0").bit(7); m_jsa->add_route(0, "lspeaker", 1.0); diff --git a/src/mame/atari/bwidow.cpp b/src/mame/atari/bwidow.cpp index 0d4f814c47d..8b9439ba712 100644 --- a/src/mame/atari/bwidow.cpp +++ b/src/mame/atari/bwidow.cpp @@ -778,13 +778,13 @@ void bwidow_state::bwidow(machine_config &config) ER2055(config, m_earom); /* video hardware */ - VECTOR(config, "vector", 0); + VECTOR(config, "vector"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR)); screen.set_refresh_hz(CLOCK_3KHZ / 12 / 4); screen.set_size(400, 300); screen.set_visarea(0, 480, 0, 440); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - AVG(config, m_avg, 0); + AVG(config, m_avg); m_avg->set_vector("vector"); m_avg->set_memory(m_maincpu, AS_PROGRAM, 0x2000); diff --git a/src/mame/atari/bzone.cpp b/src/mame/atari/bzone.cpp index 4fc4233de48..5eda19ca1b9 100644 --- a/src/mame/atari/bzone.cpp +++ b/src/mame/atari/bzone.cpp @@ -596,12 +596,12 @@ void bzone_state::bzone_base(machine_config &config) m_screen->set_visarea(0, 580, 0, 400); m_screen->set_screen_update("vector", FUNC(vector_device::screen_update)); - avg_device &avg(AVG_BZONE(config, "avg", 0)); + avg_device &avg(AVG_BZONE(config, "avg")); avg.set_vector("vector"); avg.set_memory(m_maincpu, AS_PROGRAM, 0x2000); /* Drivers */ - MATHBOX(config, m_mathbox, 0); + MATHBOX(config, m_mathbox); } void bzone_state::bzone(machine_config &config) @@ -634,11 +634,11 @@ void redbaron_state::redbaron(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - pokey_device &pokey(POKEY(config, "pokey", 1500000)); + pokey_device &pokey(POKEY(config, "pokey", XTAL::u(1500000))); pokey.allpot_r().set(FUNC(redbaron_state::redbaron_joy_r)); pokey.add_route(ALL_OUTPUTS, "mono", 1.0); - REDBARON(config, m_redbaronsound, 0); + REDBARON(config, m_redbaronsound); m_redbaronsound->add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/atari/ccastles.cpp b/src/mame/atari/ccastles.cpp index 8d1dc7fb357..1e3ffcc1df0 100644 --- a/src/mame/atari/ccastles.cpp +++ b/src/mame/atari/ccastles.cpp @@ -129,7 +129,7 @@ #include "speaker.h" -#define MASTER_CLOCK (10000000) +#define MASTER_CLOCK XTAL::u(10000000) #define PIXEL_CLOCK (MASTER_CLOCK/2) #define HTOTAL (320) diff --git a/src/mame/atari/centiped.cpp b/src/mame/atari/centiped.cpp index 668c7c09ebe..392cdbac23d 100644 --- a/src/mame/atari/centiped.cpp +++ b/src/mame/atari/centiped.cpp @@ -1775,7 +1775,7 @@ GFXDECODE_END void centiped_state::centiped_base(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 12096000/8); /* 1.512 MHz (slows down to 0.75MHz while accessing playfield RAM) */ + M6502(config, m_maincpu, XTAL::u(12096000)/8); /* 1.512 MHz (slows down to 0.75MHz while accessing playfield RAM) */ MCFG_MACHINE_RESET_OVERRIDE(centiped_state,centiped) @@ -1818,7 +1818,7 @@ void centiped_state::centiped(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - pokey_device &pokey(POKEY(config, "pokey", 12096000/8)); + pokey_device &pokey(POKEY(config, "pokey", XTAL::u(12096000)/8)); pokey.set_output_opamp_low_pass(RES_K(3.3), CAP_U(0.01), 5.0); pokey.add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -1843,7 +1843,7 @@ void centiped_state::caterplr(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, m_aysnd, 12096000/8).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8910(config, m_aysnd, XTAL::u(12096000)/8).add_route(ALL_OUTPUTS, "mono", 1.0); } void centiped_state::centipdb(machine_config &config) @@ -1858,7 +1858,7 @@ void centiped_state::centipdb(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, m_aysnd, 12096000/8); + AY8910(config, m_aysnd, XTAL::u(12096000)/8); m_aysnd->port_a_read_callback().set(FUNC(centiped_state::caterplr_unknown_r)); m_aysnd->add_route(ALL_OUTPUTS, "mono", 2.0); } @@ -1878,7 +1878,7 @@ void centiped_state::magworm(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8912(config, m_aysnd, 12096000/8).add_route(ALL_OUTPUTS, "mono", 2.0); // AY-3-8912 at 2/3H + AY8912(config, m_aysnd, XTAL::u(12096000)/8).add_route(ALL_OUTPUTS, "mono", 2.0); // AY-3-8912 at 2/3H } void centiped_state::milliped(machine_config &config) @@ -1903,11 +1903,11 @@ void centiped_state::milliped(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - pokey_device &pokey1(POKEY(config, "pokey", 12096000/8)); + pokey_device &pokey1(POKEY(config, "pokey", XTAL::u(12096000)/8)); pokey1.allpot_r().set_ioport("DSW1"); pokey1.add_route(ALL_OUTPUTS, "mono", 0.50); - pokey_device &pokey2(POKEY(config, "pokey2", 12096000/8)); + pokey_device &pokey2(POKEY(config, "pokey2", XTAL::u(12096000)/8)); pokey2.allpot_r().set_ioport("DSW2"); pokey2.add_route(ALL_OUTPUTS, "mono", 0.50); } @@ -1949,7 +1949,7 @@ void centiped_state::warlords(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - pokey_device &pokey(POKEY(config, "pokey", 12096000/8)); + pokey_device &pokey(POKEY(config, "pokey", XTAL::u(12096000)/8)); pokey.pot_r<0>().set_ioport("PADDLE0"); pokey.pot_r<1>().set_ioport("PADDLE1"); pokey.pot_r<2>().set_ioport("PADDLE2"); @@ -1972,7 +1972,7 @@ void centiped_state::mazeinv(machine_config &config) void centiped_state::bullsdrt(machine_config &config) { /* basic machine hardware */ - S2650(config, m_maincpu, 12096000/8); + S2650(config, m_maincpu, XTAL::u(12096000)/8); m_maincpu->set_addrmap(AS_PROGRAM, ¢iped_state::bullsdrt_map); m_maincpu->set_addrmap(AS_IO, ¢iped_state::bullsdrt_port_map); m_maincpu->set_addrmap(AS_DATA, ¢iped_state::bullsdrt_data_map); @@ -2003,7 +2003,7 @@ void centiped_state::bullsdrt(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - sn76496_device &snsnd(SN76496(config, "snsnd", 12096000/8)); + sn76496_device &snsnd(SN76496(config, "snsnd", XTAL::u(12096000)/8)); snsnd.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/atari/cloak.cpp b/src/mame/atari/cloak.cpp index b94e285235f..47c94c5a58d 100644 --- a/src/mame/atari/cloak.cpp +++ b/src/mame/atari/cloak.cpp @@ -317,11 +317,11 @@ GFXDECODE_END void cloak_state::cloak(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1000000); /* 1 MHz ???? */ + M6502(config, m_maincpu, XTAL::u(1000000)); /* 1 MHz ???? */ m_maincpu->set_addrmap(AS_PROGRAM, &cloak_state::master_map); m_maincpu->set_periodic_int(FUNC(cloak_state::irq0_line_hold), attotime::from_hz(4*60)); - M6502(config, m_slave, 1250000); /* 1.25 MHz ???? */ + M6502(config, m_slave, XTAL::u(1250000)); /* 1.25 MHz ???? */ m_slave->set_addrmap(AS_PROGRAM, &cloak_state::slave_map); m_slave->set_periodic_int(FUNC(cloak_state::irq0_line_hold), attotime::from_hz(2*60)); diff --git a/src/mame/atari/cloud9.cpp b/src/mame/atari/cloud9.cpp index f9a03634530..c5c3816221e 100644 --- a/src/mame/atari/cloud9.cpp +++ b/src/mame/atari/cloud9.cpp @@ -101,7 +101,7 @@ #include "speaker.h" -#define MASTER_CLOCK (10000000) +#define MASTER_CLOCK XTAL::u(10000000) #define PIXEL_CLOCK (MASTER_CLOCK/2) #define HTOTAL (320) @@ -413,7 +413,7 @@ void cloud9_state::cloud9(machine_config &config) PALETTE(config, m_palette).set_entries(64); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_refresh_hz((double)PIXEL_CLOCK / (double)VTOTAL / (double)HTOTAL); + m_screen->set_refresh_hz(PIXEL_CLOCK.dvalue() / (double)VTOTAL / (double)HTOTAL); m_screen->set_size(HTOTAL, VTOTAL); m_screen->set_vblank_time(0); /* VBLANK is handled manually */ m_screen->set_visarea(0, 255, 0, 231); diff --git a/src/mame/atari/cops.cpp b/src/mame/atari/cops.cpp index e118dd5ce89..5ca97436815 100644 --- a/src/mame/atari/cops.cpp +++ b/src/mame/atari/cops.cpp @@ -915,7 +915,7 @@ void cops_state::base(machine_config &config) { M6502(config, m_maincpu, MAIN_CLOCK/2); - SONY_LDP1450(config, m_ld, 9600); + SONY_LDP1450(config, m_ld, XTAL::u(9600)); m_ld->set_screen("screen"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/atari/cyberbal.cpp b/src/mame/atari/cyberbal.cpp index 4107c59da38..918ca3fd288 100644 --- a/src/mame/atari/cyberbal.cpp +++ b/src/mame/atari/cyberbal.cpp @@ -368,7 +368,7 @@ void cyberbal_state::cyberbal_base(machine_config &config) .set_info_callback(FUNC(cyberbal_state::get_playfield_tile_info)); TILEMAP(config, m_alpha, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0) .set_info_callback(FUNC(cyberbal_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0).set_screen("lscreen"); + ATARI_MOTION_OBJECTS(config, m_mob).set_screen("lscreen"); m_mob->set_config(cyberbal_state::s_mob_config); m_mob->set_gfxdecode("gfxdecode"); @@ -376,7 +376,7 @@ void cyberbal_state::cyberbal_base(machine_config &config) .set_info_callback(FUNC(cyberbal_state::get_playfield2_tile_info)); TILEMAP(config, m_alpha2, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0) .set_info_callback(FUNC(cyberbal_state::get_alpha2_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob2, 0).set_screen("rscreen"); + ATARI_MOTION_OBJECTS(config, m_mob2).set_screen("rscreen"); m_mob2->set_config(cyberbal_state::s_mob_config); m_mob2->set_gfxdecode("gfxdecode"); @@ -420,7 +420,7 @@ void cyberbal_state::cyberbalt(machine_config &config) cyberbal_base(config); EEPROM_2816(config, "eeprom").lock_after_write(true); - SLAPSTIC(config, m_slapstic, 116); + SLAPSTIC(config, m_slapstic, XTAL::u(116)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x18000, 0x1ffff, 0); m_slapstic->set_bank(m_slapstic_bank); m_maincpu->set_addrmap(AS_PROGRAM, &cyberbal_state::tournament_map); @@ -446,7 +446,7 @@ void cyberbal2p_state::cyberbal2p(machine_config &config) .set_info_callback(FUNC(cyberbal2p_state::get_playfield_tile_info)); TILEMAP(config, m_alpha, "gfxdecode", 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0) .set_info_callback(FUNC(cyberbal2p_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0).set_screen("screen"); + ATARI_MOTION_OBJECTS(config, m_mob).set_screen("screen"); m_mob->set_config(cyberbal2p_state::s_mob_config); m_mob->set_gfxdecode("gfxdecode"); @@ -462,7 +462,7 @@ void cyberbal2p_state::cyberbal2p(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_II(config, m_jsa, 0); + ATARI_JSA_II(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_3); m_jsa->test_read_cb().set_ioport("IN2").bit(15); m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/atari/cybstorm.cpp b/src/mame/atari/cybstorm.cpp index 5e0d77085a3..f2f0d050c8f 100644 --- a/src/mame/atari/cybstorm.cpp +++ b/src/mame/atari/cybstorm.cpp @@ -241,12 +241,12 @@ void cybstorm_state::round2(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - ATARI_VAD(config, m_vad, 0, m_screen); + ATARI_VAD(config, m_vad, m_screen); m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(FUNC(cybstorm_state::get_playfield_tile_info)); TILEMAP(config, "vad:playfield2", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(FUNC(cybstorm_state::get_playfield2_tile_info)); TILEMAP(config, "vad:alpha", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(FUNC(cybstorm_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, cybstorm_state::s_mob_config).set_gfxdecode(m_gfxdecode); + ATARI_MOTION_OBJECTS(config, "vad:mob", m_screen, cybstorm_state::s_mob_config).set_gfxdecode(m_gfxdecode); ADDRESS_MAP_BANK(config, "vadbank").set_map(&cybstorm_state::vadbank_map).set_options(ENDIANNESS_BIG, 16, 32, 0x90000); @@ -271,7 +271,7 @@ void cybstorm_state::cybstorm(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ATARI_JSA_IIIS(config, m_jsa, 0); + ATARI_JSA_IIIS(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("9F0010").bit(22); m_jsa->add_route(0, "lspeaker", 0.9); diff --git a/src/mame/atari/destroyr.cpp b/src/mame/atari/destroyr.cpp index 5ac190f0f49..e216b37e197 100644 --- a/src/mame/atari/destroyr.cpp +++ b/src/mame/atari/destroyr.cpp @@ -498,7 +498,7 @@ void destroyr_state::destroyr(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(destroyr)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/atari/eprom.cpp b/src/mame/atari/eprom.cpp index 52fbea13998..824ffd23e72 100644 --- a/src/mame/atari/eprom.cpp +++ b/src/mame/atari/eprom.cpp @@ -392,7 +392,7 @@ void eprom_state::eprom(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_COLS, 64,64).set_info_callback(FUNC(eprom_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(eprom_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, eprom_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, eprom_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -408,7 +408,7 @@ void eprom_state::eprom(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_I(config, m_jsa, 0); + ATARI_JSA_I(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("260010").bit(1); m_jsa->add_route(ALL_OUTPUTS, "mono", 0.4); @@ -437,7 +437,7 @@ void eprom_state::klaxp(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_COLS, 64,64).set_info_callback(FUNC(eprom_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(eprom_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, eprom_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, eprom_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -452,7 +452,7 @@ void eprom_state::klaxp(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_II(config, m_jsa, 0); + ATARI_JSA_II(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("260010").bit(1); m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0); @@ -486,7 +486,7 @@ void eprom_state::guts(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_COLS, 64,64).set_info_callback(FUNC(eprom_state::guts_get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(eprom_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, eprom_state::s_guts_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, eprom_state::s_guts_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -501,7 +501,7 @@ void eprom_state::guts(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_II(config, m_jsa, 0); + ATARI_JSA_II(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("260010").bit(1); m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/atari/firefox.cpp b/src/mame/atari/firefox.cpp index 3706cf28594..67536c40a5b 100644 --- a/src/mame/atari/firefox.cpp +++ b/src/mame/atari/firefox.cpp @@ -665,7 +665,7 @@ void firefox_state::firefox(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_firefox); PALETTE(config, m_palette).set_entries(512); - PHILIPS_22VP931(config, m_laserdisc, 0); + PHILIPS_22VP931(config, m_laserdisc); m_laserdisc->set_overlay(64*8, 525, FUNC(firefox_state::screen_update_firefox)); m_laserdisc->set_overlay_clip(7*8, 53*8-1, 44, 480+44); m_laserdisc->add_route(0, "lspeaker", 0.50); diff --git a/src/mame/atari/flyball.cpp b/src/mame/atari/flyball.cpp index 947bf7e1c55..3608698d8ce 100644 --- a/src/mame/atari/flyball.cpp +++ b/src/mame/atari/flyball.cpp @@ -482,7 +482,7 @@ void flyball_state::flyball(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(flyball)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/atari/gauntlet.cpp b/src/mame/atari/gauntlet.cpp index fc02cfe4363..d31e6ae0b42 100644 --- a/src/mame/atari/gauntlet.cpp +++ b/src/mame/atari/gauntlet.cpp @@ -489,7 +489,7 @@ void gauntlet_state::gauntlet_base(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_COLS, 64,64).set_info_callback(FUNC(gauntlet_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(gauntlet_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, gauntlet_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, gauntlet_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -537,7 +537,7 @@ void gauntlet_state::gauntlet_base(machine_config &config) void gauntlet_state::gauntlet(machine_config & config) { gauntlet_base(config); - SLAPSTIC(config, m_slapstic, 104); + SLAPSTIC(config, m_slapstic, XTAL::u(104)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x3ffff, 0x280000); m_slapstic->set_bank(m_slapstic_bank); } @@ -546,7 +546,7 @@ void gauntlet_state::gauntlet(machine_config & config) void gauntlet_state::gaunt2p(machine_config & config) { gauntlet_base(config); - SLAPSTIC(config, m_slapstic, 107); + SLAPSTIC(config, m_slapstic, XTAL::u(107)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x3ffff, 0x280000); m_slapstic->set_bank(m_slapstic_bank); } @@ -555,7 +555,7 @@ void gauntlet_state::gaunt2p(machine_config & config) void gauntlet_state::gauntlet2(machine_config & config) { gauntlet_base(config); - SLAPSTIC(config, m_slapstic, 106); + SLAPSTIC(config, m_slapstic, XTAL::u(106)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x3ffff, 0x280000); m_slapstic->set_bank(m_slapstic_bank); } @@ -564,7 +564,7 @@ void gauntlet_state::gauntlet2(machine_config & config) void gauntlet_state::vindctr2(machine_config & config) { gauntlet_base(config); - SLAPSTIC(config, m_slapstic, 118); + SLAPSTIC(config, m_slapstic, XTAL::u(118)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x38000, 0x3ffff, 0x280000); m_slapstic->set_bank(m_slapstic_bank); } diff --git a/src/mame/atari/gtia.cpp b/src/mame/atari/gtia.cpp index 94ea2e591dd..d8069781383 100644 --- a/src/mame/atari/gtia.cpp +++ b/src/mame/atari/gtia.cpp @@ -120,7 +120,7 @@ DEFINE_DEVICE_TYPE(ATARI_GTIA, gtia_device, "gtia", "Atari GTIA") // upd7220_device - constructor //------------------------------------------------- -gtia_device::gtia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gtia_device::gtia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATARI_GTIA, tag, owner, clock) , m_region(GTIA_NTSC) , m_read_cb(*this) diff --git a/src/mame/atari/gtia.h b/src/mame/atari/gtia.h index a9e6cc9e9e2..e7907abf0d1 100644 --- a/src/mame/atari/gtia.h +++ b/src/mame/atari/gtia.h @@ -28,7 +28,7 @@ class gtia_device : public device_t { public: // construction/destruction - gtia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gtia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_region(gtia_region region) { m_region = region; } auto read_callback() { return m_read_cb.bind(); } diff --git a/src/mame/atari/gumrally.cpp b/src/mame/atari/gumrally.cpp index 45633820979..32b9ede5c57 100644 --- a/src/mame/atari/gumrally.cpp +++ b/src/mame/atari/gumrally.cpp @@ -105,7 +105,7 @@ INPUT_PORTS_END void gumrally_state::gumrally(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 14'318'000); // clock not verified + M68000(config, m_maincpu, XTAL::u(14'318'000)); // clock not verified m_maincpu->set_addrmap(AS_PROGRAM, &gumrally_state::prg_map); EEPROM_2816(config, "eeprom"); @@ -116,9 +116,9 @@ void gumrally_state::gumrally(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - YM2149(config, "ym", 14'318'000 / 12).add_route(ALL_OUTPUTS, "mono", 0.3); // clock not verified + YM2149(config, "ym", XTAL::u(14'318'000) / 12).add_route(ALL_OUTPUTS, "mono", 0.3); // clock not verified - OKIM6295(config, "oki", 14'318'000 / 12, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); // clock and pin not verified + OKIM6295(config, "oki", XTAL::u(14'318'000) / 12, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); // clock and pin not verified } diff --git a/src/mame/atari/harddriv.cpp b/src/mame/atari/harddriv.cpp index 1bef4ed24e6..2005efdc4c4 100644 --- a/src/mame/atari/harddriv.cpp +++ b/src/mame/atari/harddriv.cpp @@ -339,7 +339,7 @@ Notes: * *************************************/ -harddriv_state::harddriv_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +harddriv_state::harddriv_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), /* device_video_interface(mconfig, *this, false), */ m_maincpu(*this, "maincpu"), @@ -1458,13 +1458,13 @@ void harddriv_state::driver_nomsp(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &harddriv_state::driver_68k_map); m_maincpu->set_periodic_int(FUNC(harddriv_state::hd68k_irq_gen), attotime::from_hz(HARDDRIV_MASTER_CLOCK/16/16/16/16/2)); - SLAPSTIC(config, m_slapstic, 117); + SLAPSTIC(config, m_slapstic, XTAL::u(117)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0xe0000, 0xe7fff, 0x18000); m_slapstic->set_bank(m_slapstic_bank); WATCHDOG_TIMER(config, "watchdog"); - ADC0809(config, m_adc8, 1000000); // unknown clock + ADC0809(config, m_adc8, XTAL::u(1000000)); // unknown clock m_adc8->in_callback<0>().set_ioport("8BADC.0"); m_adc8->in_callback<1>().set_ioport("8BADC.1"); m_adc8->in_callback<2>().set_ioport("8BADC.2"); @@ -1487,7 +1487,7 @@ void harddriv_state::driver_nomsp(machine_config &config) config.set_maximum_quantum(attotime::from_hz(30000)); - M48T02(config, m_200e, 0); + M48T02(config, m_200e); EEPROM_2816(config, m_210e); // MK48Z02 @@ -1624,8 +1624,8 @@ void harddriv_state::ds3(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC - DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC } @@ -1648,7 +1648,7 @@ void harddriv_state::dsk(machine_config &config) EEPROM_2816(config, m_dsk_30c); // MK48Z02 /* ASIC65 */ - ASIC65(config, m_asic65, 0, ASIC65_STANDARD); + ASIC65(config, m_asic65, ASIC65_STANDARD); } @@ -1661,7 +1661,7 @@ void harddriv_state::dsk2(machine_config &config) m_dsp32->set_addrmap(AS_PROGRAM, &harddriv_state::dsk2_dsp32_map); /* ASIC65 */ - ASIC65(config, m_asic65, 0, ASIC65_STANDARD); + ASIC65(config, m_asic65, ASIC65_STANDARD); } @@ -1674,7 +1674,7 @@ WRITE_LINE_MEMBER(harddriv_state::sound_int_write_line) DEFINE_DEVICE_TYPE(HARDDRIV_BOARD, harddriv_board_device_state, "harddriv_board", "Hard Drivin' Board Device") -harddriv_board_device_state::harddriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +harddriv_board_device_state::harddriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, HARDDRIV_BOARD, tag, owner, clock) { } @@ -1684,7 +1684,7 @@ void harddriv_board_device_state::device_add_mconfig(machine_config &config) driver_msp(config); /* basic machine hardware */ /* original driver board with MSP */ adsp(config); /* ADSP board */ - HARDDRIV_SOUND_BOARD(config, m_harddriv_sound, 0); /* driver sound board */ + HARDDRIV_SOUND_BOARD(config, m_harddriv_sound); /* driver sound board */ } void harddriv_board_device_state::device_start() @@ -1703,7 +1703,7 @@ void harddrivc_board_device_state::device_start() DEFINE_DEVICE_TYPE(HARDDRIVC_BOARD, harddrivc_board_device_state, "harddrivc_board", "Hard Drivin' C Board Device") -harddrivc_board_device_state::harddrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +harddrivc_board_device_state::harddrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, HARDDRIVC_BOARD, tag, owner, clock) { } @@ -1714,7 +1714,7 @@ void harddrivc_board_device_state::device_add_mconfig(machine_config &config) /* basic machine hardware */ /* multisync board with MSP */ adsp(config); /* ADSP board */ - HARDDRIV_SOUND_BOARD(config, m_harddriv_sound, 0); /* driver sound board */ + HARDDRIV_SOUND_BOARD(config, m_harddriv_sound); /* driver sound board */ } @@ -1735,17 +1735,17 @@ void racedrivb1_board_device_state::device_start() DEFINE_DEVICE_TYPE(RACEDRIV_BOARD, racedriv_board_device_state, "racedriv_board", "Race Drivin' Board Device") DEFINE_DEVICE_TYPE(RACEDRIVB1_BOARD, racedrivb1_board_device_state, "racedrivb1_board", "Race Drivin' B1 Board Device") -racedriv_board_device_state::racedriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +racedriv_board_device_state::racedriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : racedriv_board_device_state(mconfig, RACEDRIV_BOARD, tag, owner, clock) { } -racedriv_board_device_state::racedriv_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +racedriv_board_device_state::racedriv_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, type, tag, owner, clock) { } -racedrivb1_board_device_state::racedrivb1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +racedrivb1_board_device_state::racedrivb1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : racedriv_board_device_state(mconfig, RACEDRIVB1_BOARD, tag, owner, clock) { } @@ -1757,7 +1757,7 @@ void racedriv_board_device_state::device_add_mconfig(machine_config &config) /* basic machine hardware */ /* original driver board without MSP */ adsp(config); /* ADSP board */ dsk(config); /* DSK board */ - HARDDRIV_SOUND_BOARD(config, m_harddriv_sound, 0); /* driver sound board */ + HARDDRIV_SOUND_BOARD(config, m_harddriv_sound); /* driver sound board */ } /* Race Drivin Compact */ @@ -1786,22 +1786,22 @@ DEFINE_DEVICE_TYPE(RACEDRIVC_BOARD, racedrivc_board_device_state, "racedrivc_boa DEFINE_DEVICE_TYPE(RACEDRIVC1_BOARD, racedrivc1_board_device_state, "racedrivc1_board", "Race Drivin' C1 Board Device") DEFINE_DEVICE_TYPE(RACEDRIVC_PANORAMA_SIDE_BOARD, racedrivc_panorama_side_board_device_state, "racedrivc_panorama_side_board", "Race Drivin' C Panorama Board Device") -racedrivc_board_device_state::racedrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +racedrivc_board_device_state::racedrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : racedrivc_board_device_state(mconfig, RACEDRIVC_BOARD, tag, owner, clock) { } -racedrivc_board_device_state::racedrivc_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +racedrivc_board_device_state::racedrivc_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, type, tag, owner, clock) { } -racedrivc1_board_device_state::racedrivc1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +racedrivc1_board_device_state::racedrivc1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : racedrivc_board_device_state(mconfig, RACEDRIVC1_BOARD, tag, owner, clock) { } -racedrivc_panorama_side_board_device_state::racedrivc_panorama_side_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +racedrivc_panorama_side_board_device_state::racedrivc_panorama_side_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : racedrivc_board_device_state(mconfig, RACEDRIVC_PANORAMA_SIDE_BOARD, tag, owner, clock) { } @@ -1813,7 +1813,7 @@ void racedrivc_board_device_state::device_add_mconfig(machine_config &config) /* basic machine hardware */ /* multisync board without MSP */ adsp(config); /* ADSP board */ dsk(config); /* DSK board */ - HARDDRIV_SOUND_BOARD(config, m_harddriv_sound, 0); /* driver sound board */ + HARDDRIV_SOUND_BOARD(config, m_harddriv_sound); /* driver sound board */ } void racedrivc_panorama_side_board_device_state::device_add_mconfig(machine_config &config) @@ -1833,7 +1833,7 @@ void racedrivc_panorama_side_board_device_state::device_add_mconfig(machine_conf /* basic machine hardware */ /* multisync board without MSP */ adsp(config); /* ADSP board */ // dsk(config); /* DSK board */ -// HARDDRIV_SOUND_BOARD(config, "sound_board", 0); /* driver sound board */ +// HARDDRIV_SOUND_BOARD(config, "sound_board"); /* driver sound board */ } /* Stun Runner */ @@ -1846,7 +1846,7 @@ void stunrun_board_device_state::device_start() DEFINE_DEVICE_TYPE(STUNRUN_BOARD, stunrun_board_device_state, "stunrun_board", "Stun Runner Board Device") -stunrun_board_device_state::stunrun_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +stunrun_board_device_state::stunrun_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, STUNRUN_BOARD, tag, owner, clock) { } @@ -1861,12 +1861,12 @@ void stunrun_board_device_state::device_add_mconfig(machine_config &config) config.device_remove("slapstic"); /* video hardware */ - m_screen->set_raw(5000000*2, 317*2, 0, 256*2, 262, 0, 228); + m_screen->set_raw(XTAL::u(5000000)*2, 317*2, 0, 256*2, 262, 0, 228); /* sund hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_II(config, m_jsa, 0); + ATARI_JSA_II(config, m_jsa); m_jsa->main_int_cb().set(FUNC(harddriv_state::sound_int_write_line)); m_jsa->test_read_cb().set_ioport("IN0").bit(5); m_jsa->add_route(ALL_OUTPUTS, "mono", 0.5); @@ -1896,22 +1896,22 @@ DEFINE_DEVICE_TYPE(STEELTAL_BOARD, steeltal_board_device_state, "steeltal_board" DEFINE_DEVICE_TYPE(STEELTAL1_BOARD, steeltal1_board_device_state, "steeltal1_board", "Steel Talons 1 Board Device") DEFINE_DEVICE_TYPE(STEELTALP_BOARD, steeltalp_board_device_state, "steeltalp_board", "Steel Talons P Board Device") -steeltal_board_device_state::steeltal_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +steeltal_board_device_state::steeltal_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : steeltal_board_device_state(mconfig, STEELTAL_BOARD, tag, owner, clock) { } -steeltal_board_device_state::steeltal_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +steeltal_board_device_state::steeltal_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, type, tag, owner, clock) { } -steeltal1_board_device_state::steeltal1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +steeltal1_board_device_state::steeltal1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : steeltal_board_device_state(mconfig, STEELTAL1_BOARD, tag, owner, clock) { } -steeltalp_board_device_state::steeltalp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +steeltalp_board_device_state::steeltalp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : steeltal_board_device_state(mconfig, STEELTALP_BOARD, tag, owner, clock) { } @@ -1929,12 +1929,12 @@ void steeltal_board_device_state::device_add_mconfig(machine_config &config) //t config.device_remove("lspeaker"); config.device_remove("rspeaker"); - ASIC65(config, m_asic65, 0, ASIC65_STEELTAL); /* ASIC65 on DSPCOM board */ + ASIC65(config, m_asic65, ASIC65_STEELTAL); /* ASIC65 on DSPCOM board */ /* sund hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_III(config, m_jsa, 0); + ATARI_JSA_III(config, m_jsa); m_jsa->main_int_cb().set(FUNC(harddriv_state::sound_int_write_line)); m_jsa->test_read_cb().set_ioport("IN0").bit(5); m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0); @@ -1950,7 +1950,7 @@ void strtdriv_board_device_state::device_start() DEFINE_DEVICE_TYPE(STRTDRIV_BOARD, strtdriv_board_device_state, "strtdriv_board", "Street Drivin' Board Device") -strtdriv_board_device_state::strtdriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +strtdriv_board_device_state::strtdriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, STRTDRIV_BOARD, tag, owner, clock) { } @@ -1983,17 +1983,17 @@ void hdrivairp_board_device_state::device_start() DEFINE_DEVICE_TYPE(HDRIVAIR_BOARD, hdrivair_board_device_state, "hdrivair_board", "Hard Drivin' Airborne Board Device") DEFINE_DEVICE_TYPE(HDRIVAIRP_BOARD, hdrivairp_board_device_state, "hdrivairp_board", "Hard Drivin' Airborne P Board Device") -hdrivair_board_device_state::hdrivair_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hdrivair_board_device_state::hdrivair_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hdrivair_board_device_state(mconfig, HDRIVAIR_BOARD, tag, owner, clock) { } -hdrivair_board_device_state::hdrivair_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hdrivair_board_device_state::hdrivair_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : harddriv_state(mconfig, type, tag, owner, clock) { } -hdrivairp_board_device_state::hdrivairp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hdrivairp_board_device_state::hdrivairp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hdrivair_board_device_state(mconfig, HDRIVAIRP_BOARD, tag, owner, clock) { } @@ -2010,67 +2010,67 @@ void hdrivair_board_device_state::device_add_mconfig(machine_config &config) void harddriv_new_state::harddriv_machine(machine_config &config) { - HARDDRIV_BOARD(config, "mainpcb", 0); + HARDDRIV_BOARD(config, "mainpcb"); } void harddriv_new_state::harddrivc_machine(machine_config &config) { - HARDDRIVC_BOARD(config, "mainpcb", 0); + HARDDRIVC_BOARD(config, "mainpcb"); } void harddriv_new_state::racedriv_machine(machine_config &config) { - RACEDRIV_BOARD(config, "mainpcb", 0); + RACEDRIV_BOARD(config, "mainpcb"); } void harddriv_new_state::racedrivb1_machine(machine_config &config) { - RACEDRIVB1_BOARD(config, "mainpcb", 0); + RACEDRIVB1_BOARD(config, "mainpcb"); } void harddriv_new_state::racedrivc_machine(machine_config &config) { - RACEDRIVC_BOARD(config, "mainpcb", 0); + RACEDRIVC_BOARD(config, "mainpcb"); } void harddriv_new_state::racedrivc1_machine(machine_config &config) { - RACEDRIVC1_BOARD(config, "mainpcb", 0); + RACEDRIVC1_BOARD(config, "mainpcb"); } void harddriv_new_state::stunrun_machine(machine_config &config) { - STUNRUN_BOARD(config, "mainpcb", 0); + STUNRUN_BOARD(config, "mainpcb"); } void harddriv_new_state::strtdriv_machine(machine_config &config) { - STRTDRIV_BOARD(config, "mainpcb", 0); + STRTDRIV_BOARD(config, "mainpcb"); } void harddriv_new_state::hdrivair_machine(machine_config &config) { - HDRIVAIR_BOARD(config, "mainpcb", 0); + HDRIVAIR_BOARD(config, "mainpcb"); } void harddriv_new_state::hdrivairp_machine(machine_config &config) { - HDRIVAIRP_BOARD(config, "mainpcb", 0); + HDRIVAIRP_BOARD(config, "mainpcb"); } void harddriv_new_state::steeltal_machine(machine_config &config) { - STEELTAL_BOARD(config, "mainpcb", 0); + STEELTAL_BOARD(config, "mainpcb"); } void harddriv_new_state::steeltal1_machine(machine_config &config) { - STEELTAL1_BOARD(config, "mainpcb", 0); + STEELTAL1_BOARD(config, "mainpcb"); } void harddriv_new_state::steeltalp_machine(machine_config &config) { - STEELTALP_BOARD(config, "mainpcb", 0); + STEELTALP_BOARD(config, "mainpcb"); } WRITE_LINE_MEMBER(harddriv_new_state::tx_a) @@ -2082,9 +2082,9 @@ WRITE_LINE_MEMBER(harddriv_new_state::tx_a) void harddriv_new_state::racedriv_panorama_machine(machine_config &config) { - RACEDRIV_BOARD(config, "mainpcb", 0); - RACEDRIVC_PANORAMA_SIDE_BOARD(config, "leftpcb", 0); - RACEDRIVC_PANORAMA_SIDE_BOARD(config, "rightpcb", 0); + RACEDRIV_BOARD(config, "mainpcb"); + RACEDRIVC_PANORAMA_SIDE_BOARD(config, "leftpcb"); + RACEDRIVC_PANORAMA_SIDE_BOARD(config, "rightpcb"); // config.set_maximum_quantum(attotime::from_hz(100000)); subdevice("mainpcb:duartn68681")->a_tx_cb().set(FUNC(harddriv_new_state::tx_a)); diff --git a/src/mame/atari/harddriv.h b/src/mame/atari/harddriv.h index e1e2cb52cff..2c8e6c28667 100644 --- a/src/mame/atari/harddriv.h +++ b/src/mame/atari/harddriv.h @@ -58,7 +58,7 @@ DECLARE_DEVICE_TYPE(HARDDRIV_SOUND_BOARD, harddriv_sound_board_device) class harddriv_state : public device_t { public: - harddriv_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + harddriv_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void driver_msp(machine_config &config); void driver_nomsp(machine_config &config); @@ -506,7 +506,7 @@ class harddriv_sound_board_device : public device_t { public: // construction/destruction - harddriv_sound_board_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + harddriv_sound_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~harddriv_sound_board_device() {} uint16_t hd68k_snd_data_r(); @@ -583,7 +583,7 @@ private: class harddriv_board_device_state : public harddriv_state { public: - harddriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + harddriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -596,7 +596,7 @@ protected: class harddrivc_board_device_state : public harddriv_state { public: - harddrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + harddrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -609,10 +609,10 @@ protected: class racedriv_board_device_state : public harddriv_state { public: - racedriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + racedriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - racedriv_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + racedriv_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -622,7 +622,7 @@ protected: class racedrivb1_board_device_state : public racedriv_board_device_state { public: - racedrivb1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + racedrivb1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -633,10 +633,10 @@ protected: class racedrivc_board_device_state : public harddriv_state { public: - racedrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + racedrivc_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - racedrivc_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + racedrivc_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -646,7 +646,7 @@ protected: class racedrivc1_board_device_state : public racedrivc_board_device_state { public: - racedrivc1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + racedrivc1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -655,7 +655,7 @@ protected: class racedrivc_panorama_side_board_device_state : public racedrivc_board_device_state { public: - racedrivc_panorama_side_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + racedrivc_panorama_side_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -668,7 +668,7 @@ protected: class stunrun_board_device_state : public harddriv_state { public: - stunrun_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + stunrun_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -681,10 +681,10 @@ protected: class steeltal_board_device_state : public harddriv_state { public: - steeltal_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + steeltal_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - steeltal_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + steeltal_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -694,7 +694,7 @@ protected: class steeltal1_board_device_state : public steeltal_board_device_state { public: - steeltal1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + steeltal1_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -703,7 +703,7 @@ protected: class steeltalp_board_device_state : public steeltal_board_device_state { public: - steeltalp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + steeltalp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -716,7 +716,7 @@ protected: class strtdriv_board_device_state : public harddriv_state { public: - strtdriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + strtdriv_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -729,10 +729,10 @@ protected: class hdrivair_board_device_state : public harddriv_state { public: - hdrivair_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hdrivair_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - hdrivair_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hdrivair_board_device_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -742,7 +742,7 @@ protected: class hdrivairp_board_device_state : public hdrivair_board_device_state { public: - hdrivairp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hdrivairp_board_device_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; }; diff --git a/src/mame/atari/harddriv_a.cpp b/src/mame/atari/harddriv_a.cpp index a9a876c643e..22b5f92cba2 100644 --- a/src/mame/atari/harddriv_a.cpp +++ b/src/mame/atari/harddriv_a.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(HARDDRIV_SOUND_BOARD, harddriv_sound_board_device, "harddriv_sound", "Hard Drivin' Sound Board") -harddriv_sound_board_device::harddriv_sound_board_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +harddriv_sound_board_device::harddriv_sound_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HARDDRIV_SOUND_BOARD, tag, owner, clock), m_soundcpu(*this, "soundcpu"), m_latch(*this, "latch"), @@ -436,7 +436,7 @@ void harddriv_sound_board_device::device_add_mconfig(machine_config &config) M68000(config, m_soundcpu, 16_MHz_XTAL/2); m_soundcpu->set_addrmap(AS_PROGRAM, &harddriv_sound_board_device::driversnd_68k_map); - LS259(config, m_latch, 0); // 80R + LS259(config, m_latch); // 80R m_latch->q_out_cb<0>().set(FUNC(harddriv_sound_board_device::speech_write_w)); // SPWR - 5220 write strobe m_latch->q_out_cb<1>().set(FUNC(harddriv_sound_board_device::speech_reset_w)); // SPRES - 5220 hard reset m_latch->q_out_cb<2>().set(FUNC(harddriv_sound_board_device::speech_rate_w)); // SPRATE @@ -453,5 +453,5 @@ void harddriv_sound_board_device::device_add_mconfig(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - AM6012(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // ls374d.75e + ls374d.90e + am6012 + AM6012(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // ls374d.75e + ls374d.90e + am6012 } diff --git a/src/mame/atari/hitparade.cpp b/src/mame/atari/hitparade.cpp index 8db024e5e56..9fdf8175594 100644 --- a/src/mame/atari/hitparade.cpp +++ b/src/mame/atari/hitparade.cpp @@ -183,7 +183,7 @@ INPUT_PORTS_END void hitpar_state::hitpar(machine_config &config) { // basic machine hardware - TMS1300(config, m_maincpu, 350000); // guessed + TMS1300(config, m_maincpu, XTAL::u(350000)); // guessed m_maincpu->read_k().set(FUNC(hitpar_state::read_k)); m_maincpu->write_r().set(FUNC(hitpar_state::write_r)); m_maincpu->write_o().set(FUNC(hitpar_state::write_o)); diff --git a/src/mame/atari/jag_blitter.cpp b/src/mame/atari/jag_blitter.cpp index 64343259ba4..facdb10a3c0 100644 --- a/src/mame/atari/jag_blitter.cpp +++ b/src/mame/atari/jag_blitter.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(JAG_BLITTER, jag_blitter_device, "jag_blitter", "Atari Jaguar // jag_blitter_device - constructor //------------------------------------------------- -jag_blitter_device::jag_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jag_blitter_device::jag_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JAG_BLITTER, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("regs", ENDIANNESS_BIG, 32, 8, 0, address_map_constructor(FUNC(jag_blitter_device::regs_map), this)) diff --git a/src/mame/atari/jag_blitter.h b/src/mame/atari/jag_blitter.h index 10d062a6b3b..ae3c3da2b0d 100644 --- a/src/mame/atari/jag_blitter.h +++ b/src/mame/atari/jag_blitter.h @@ -30,7 +30,7 @@ class jag_blitter_device : public device_t, { public: // construction/destruction - jag_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jag_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // TODO: add which device triggered the I/O void iobus_w(offs_t offset, u32 data, u32 mem_mask = ~0); diff --git a/src/mame/atari/jaguar.cpp b/src/mame/atari/jaguar.cpp index fa0ae67a906..35771329244 100644 --- a/src/mame/atari/jaguar.cpp +++ b/src/mame/atari/jaguar.cpp @@ -373,7 +373,7 @@ DECLARE_DEVICE_TYPE(COJAG_HARDDISK, cojag_hdd) class cojag_hdd : public ide_hdd_device { public: - cojag_hdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + cojag_hdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_hdd_device(mconfig, COJAG_HARDDISK, tag, owner, clock) { } @@ -1820,8 +1820,8 @@ void jaguar_state::cojagr3k(machine_config &config) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC // TODO: subwoofer speaker } @@ -1870,8 +1870,8 @@ void jaguar_state::jaguar(machine_config &config) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC /* quickload */ QUICKLOAD(config, "quickload", "abs,bin,cof,jag,prg").set_load_callback(FUNC(jaguar_state::quickload_cb)); diff --git a/src/mame/atari/klax.cpp b/src/mame/atari/klax.cpp index 199f5812378..a5e69f5f61c 100644 --- a/src/mame/atari/klax.cpp +++ b/src/mame/atari/klax.cpp @@ -214,7 +214,7 @@ void klax_state::klax_base(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 32); m_playfield_tilemap->set_info_callback(FUNC(klax_state::get_playfield_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, klax_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, klax_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -265,12 +265,12 @@ void klax_bootleg_state::klax5bl(machine_config &config) m_mob->set_origin(8, 7); // sprites are offset in bootlegs m_gfxdecode->set_info(gfx_klax5bl); - MSM5205(config, m_msm[0], 384000); // clock speed / prescaler not verified + MSM5205(config, m_msm[0], XTAL::u(384000)); // clock speed / prescaler not verified m_msm[0]->vck_callback().set(FUNC(klax_bootleg_state::m5205_int1)); m_msm[0]->set_prescaler_selector(msm5205_device::S64_4B); /* ? */ m_msm[0]->add_route(ALL_OUTPUTS, "mono", 1.00); - MSM5205(config, m_msm[1], 384000); + MSM5205(config, m_msm[1], XTAL::u(384000)); m_msm[1]->set_prescaler_selector(msm5205_device::S64_4B); m_msm[1]->add_route(ALL_OUTPUTS, "mono", 1.00); } diff --git a/src/mame/atari/liberatr.cpp b/src/mame/atari/liberatr.cpp index 08b4ca2b250..fedfdfc976f 100644 --- a/src/mame/atari/liberatr.cpp +++ b/src/mame/atari/liberatr.cpp @@ -141,7 +141,7 @@ #include "machine/rescap.h" #include "speaker.h" -#define MASTER_CLOCK 20000000 /* 20Mhz Main Clock Xtal */ +#define MASTER_CLOCK XTAL::u(20000000) /* 20Mhz Main Clock Xtal */ void liberatr_state::machine_start() diff --git a/src/mame/atari/marblmd2.cpp b/src/mame/atari/marblmd2.cpp index 2da70cc4cb3..b6a0d600016 100644 --- a/src/mame/atari/marblmd2.cpp +++ b/src/mame/atari/marblmd2.cpp @@ -334,18 +334,18 @@ void marblmd2_state::marblmd2(machine_config &config) PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 256).set_membits(8); - ATARI_VAD(config, m_vad, 0, m_screen); + ATARI_VAD(config, m_vad, m_screen); m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); m_vad->set_xoffsets(4, 4); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, marblmd2_state::s_mob_config).set_gfxdecode("gfxdecode"); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, marblmd2_state::s_mob_config).set_gfxdecode("gfxdecode"); TILEMAP(config, "vad:playfield", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(FUNC(marblmd2_state::get_playfield_tile_info)); // sound hardware SPEAKER(config, "mono").front_center(); - ATARI_JSA_III(config, m_jsa, 0); + ATARI_JSA_III(config, m_jsa); m_jsa->set_swapped_coins(true); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("600010").bit(6); diff --git a/src/mame/atari/maria.cpp b/src/mame/atari/maria.cpp index 25e5c497dba..0ff85c999f4 100644 --- a/src/mame/atari/maria.cpp +++ b/src/mame/atari/maria.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(ATARI_MARIA, atari_maria_device, "atari_maria", "Atari MARIA" -atari_maria_device::atari_maria_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atari_maria_device::atari_maria_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ATARI_MARIA, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG) , m_screen(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/atari/maria.h b/src/mame/atari/maria.h index 130bc4de367..f1d359caebe 100644 --- a/src/mame/atari/maria.h +++ b/src/mame/atari/maria.h @@ -12,7 +12,7 @@ class atari_maria_device : public device_t { public: // construction/destruction - atari_maria_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_maria_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward(tag)); } template void set_dmacpu_tag(T &&tag) { m_cpu.set_tag(std::forward(tag)); } diff --git a/src/mame/atari/mathbox.cpp b/src/mame/atari/mathbox.cpp index 957bc606779..c1e0c19a04a 100644 --- a/src/mame/atari/mathbox.cpp +++ b/src/mame/atari/mathbox.cpp @@ -39,7 +39,7 @@ DEFINE_DEVICE_TYPE(MATHBOX, mathbox_device, "mathbox", "Atari MATHBOX") -mathbox_device::mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mathbox_device::mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MATHBOX, tag, owner, clock) { } diff --git a/src/mame/atari/mathbox.h b/src/mame/atari/mathbox.h index 665dd93d8ed..38900e8c176 100644 --- a/src/mame/atari/mathbox.h +++ b/src/mame/atari/mathbox.h @@ -16,7 +16,7 @@ class mathbox_device : public device_t { public: - mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void go_w(offs_t offset, uint8_t data); uint8_t status_r(); diff --git a/src/mame/atari/maxaflex.cpp b/src/mame/atari/maxaflex.cpp index 3ffa2d27fc8..d35d4a4e7b6 100644 --- a/src/mame/atari/maxaflex.cpp +++ b/src/mame/atari/maxaflex.cpp @@ -328,21 +328,21 @@ void maxaflex_state::maxaflex(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline("maincpu", m6502_device::IRQ_LINE); - M68705P3(config, m_mcu, 3579545); + M68705P3(config, m_mcu, XTAL::u(3579545)); m_mcu->porta_r().set(FUNC(maxaflex_state::mcu_porta_r)); m_mcu->porta_w().set(FUNC(maxaflex_state::mcu_porta_w)); m_mcu->portb_w().set(FUNC(maxaflex_state::mcu_portb_w)); m_mcu->portc_w().set(FUNC(maxaflex_state::mcu_portc_w)); - ATARI_GTIA(config, m_gtia, 0); + ATARI_GTIA(config, m_gtia); m_gtia->set_region(GTIA_NTSC); m_gtia->read_callback().set_ioport("console"); m_gtia->trigger_callback().set_ioport("djoy_b"); - ATARI_ANTIC(config, m_antic, 0); + ATARI_ANTIC(config, m_antic); m_antic->set_gtia_tag(m_gtia); - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.readpa_handler().set(FUNC(maxaflex_state::pia_pa_r)); pia.readpb_handler().set(FUNC(maxaflex_state::pia_pb_r)); pia.writepb_handler().set(FUNC(maxaflex_state::pia_pb_w)); diff --git a/src/mame/atari/mediagx.cpp b/src/mame/atari/mediagx.cpp index 9e706bf6d7c..92e8f52707f 100644 --- a/src/mame/atari/mediagx.cpp +++ b/src/mame/atari/mediagx.cpp @@ -874,14 +874,14 @@ void mediagx_state::ramdac_map(address_map &map) void mediagx_state::mediagx(machine_config &config) { /* basic machine hardware */ - MEDIAGX(config, m_maincpu, 166000000); + MEDIAGX(config, m_maincpu, XTAL::u(166000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mediagx_state::mediagx_map); m_maincpu->set_addrmap(AS_IO, &mediagx_state::mediagx_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); pcat_common(config); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(18, FUNC(mediagx_state::cx5510_pci_r), FUNC(mediagx_state::cx5510_pci_w)); ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "hdd", nullptr, true)); @@ -889,7 +889,7 @@ void mediagx_state::mediagx(machine_config &config) TIMER(config, "sound_timer").configure_generic(FUNC(mediagx_state::sound_timer_callback)); - RAMDAC(config, m_ramdac, 0, m_palette); + RAMDAC(config, m_ramdac, m_palette); m_ramdac->set_addrmap(0, &mediagx_state::ramdac_map); /* video hardware */ diff --git a/src/mame/atari/metalmx.cpp b/src/mame/atari/metalmx.cpp index a580d4f1f96..0facd514527 100644 --- a/src/mame/atari/metalmx.cpp +++ b/src/mame/atari/metalmx.cpp @@ -667,17 +667,17 @@ void metalmx_state::metalmx(machine_config &config) m_adsp->set_addrmap(AS_PROGRAM, &metalmx_state::adsp_program_map); m_adsp->set_addrmap(AS_DATA, &metalmx_state::adsp_data_map); - TMS34020(config, m_gsp, 40000000); /* Unverified */ + TMS34020(config, m_gsp, XTAL::u(40000000)); /* Unverified */ m_gsp->set_addrmap(AS_PROGRAM, &metalmx_state::gsp_map); m_gsp->set_halt_on_reset(true); m_gsp->set_pixel_clock(4000000); m_gsp->set_pixels_per_clock(2); m_gsp->output_int().set_inputline("maincpu", 4); - DSP32C(config, m_dsp32c[0], 40000000); /* Unverified */ + DSP32C(config, m_dsp32c[0], XTAL::u(40000000)); /* Unverified */ m_dsp32c[0]->set_addrmap(AS_PROGRAM, &metalmx_state::dsp32c_1_map); - DSP32C(config, m_dsp32c[1], 40000000); /* Unverified */ + DSP32C(config, m_dsp32c[1], XTAL::u(40000000)); /* Unverified */ m_dsp32c[1]->set_addrmap(AS_PROGRAM, &metalmx_state::dsp32c_2_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -698,7 +698,7 @@ void metalmx_state::metalmx(machine_config &config) SPEAKER(config, "rrspeaker").headrest_right(); //SPEAKER(config, "subwoofer").seat(); Not implemented, Quad Amp PCB output; - ATARI_CAGE(config, m_cage, 0); + ATARI_CAGE(config, m_cage); m_cage->set_speedup(0); // TODO: speedup address m_cage->irq_handler().set(FUNC(metalmx_state::cage_irq_callback)); m_cage->add_route(0, "frspeaker", 1.0); // Foward Right diff --git a/src/mame/atari/mgolf.cpp b/src/mame/atari/mgolf.cpp index 645aadc752c..47b55fd713d 100644 --- a/src/mame/atari/mgolf.cpp +++ b/src/mame/atari/mgolf.cpp @@ -348,7 +348,7 @@ void mgolf_state::machine_reset() void mgolf_state::mgolf(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 12096000 / 16); /* ? */ + M6502(config, m_maincpu, XTAL::u(12096000) / 16); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &mgolf_state::cpu_map); diff --git a/src/mame/atari/mhavoc.cpp b/src/mame/atari/mhavoc.cpp index b526fe63672..8b6a847dcc8 100644 --- a/src/mame/atari/mhavoc.cpp +++ b/src/mame/atari/mhavoc.cpp @@ -546,7 +546,7 @@ void mhavoc_state::mhavoc(machine_config &config) screen.set_visarea(0, 300, 0, 260); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - avg_device &avg(AVG_MHAVOC(config, "avg", 0)); + avg_device &avg(AVG_MHAVOC(config, "avg")); avg.set_vector("vector"); avg.set_memory(m_alpha, AS_PROGRAM, 0x4000); diff --git a/src/mame/atari/mhavoc.h b/src/mame/atari/mhavoc.h index 2b32b03dded..8ea736c162a 100644 --- a/src/mame/atari/mhavoc.h +++ b/src/mame/atari/mhavoc.h @@ -10,7 +10,7 @@ #include "sound/pokey.h" #include "sound/tms5220.h" -#define MHAVOC_CLOCK 10000000 +#define MHAVOC_CLOCK XTAL::u(10000000) #define MHAVOC_CLOCK_5M (MHAVOC_CLOCK/2) #define MHAVOC_CLOCK_2_5M (MHAVOC_CLOCK/4) #define MHAVOC_CLOCK_1_25M (MHAVOC_CLOCK/8) diff --git a/src/mame/atari/offtwall.cpp b/src/mame/atari/offtwall.cpp index c303a855dc5..92cfef94f89 100644 --- a/src/mame/atari/offtwall.cpp +++ b/src/mame/atari/offtwall.cpp @@ -350,10 +350,10 @@ void offtwall_state::offtwall(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_offtwall); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); - ATARI_VAD(config, m_vad, 0, "screen"); + ATARI_VAD(config, m_vad, "screen"); m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); TILEMAP(config, "vad:playfield", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(FUNC(offtwall_state::get_playfield_tile_info)); - ATARI_MOTION_OBJECTS(config, "vad:mob", 0, "screen", offtwall_state::s_mob_config).set_gfxdecode("gfxdecode"); + ATARI_MOTION_OBJECTS(config, "vad:mob", "screen", offtwall_state::s_mob_config).set_gfxdecode("gfxdecode"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); @@ -366,7 +366,7 @@ void offtwall_state::offtwall(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_III(config, m_jsa, 0); + ATARI_JSA_III(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("260010").bit(6); m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/atari/pofo_kbd.cpp b/src/mame/atari/pofo_kbd.cpp index 35c5f56c6b7..ff328aebe91 100644 --- a/src/mame/atari/pofo_kbd.cpp +++ b/src/mame/atari/pofo_kbd.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(POFO_KEYBOARD, pofo_keyboard_device, "pofo_keyboard", "Atari Portfolio keyboard"); -pofo_keyboard_device::pofo_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pofo_keyboard_device::pofo_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, POFO_KEYBOARD, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"), m_int_handler(*this) diff --git a/src/mame/atari/pofo_kbd.h b/src/mame/atari/pofo_kbd.h index 07762ff6af5..2e785282ee8 100644 --- a/src/mame/atari/pofo_kbd.h +++ b/src/mame/atari/pofo_kbd.h @@ -10,7 +10,7 @@ class pofo_keyboard_device : public device_t, protected device_matrix_keyboard_interface<8U> { public: - pofo_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pofo_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/mame/atari/pong.cpp b/src/mame/atari/pong.cpp index 7bd96d00b6a..cf02ba4dd34 100644 --- a/src/mame/atari/pong.cpp +++ b/src/mame/atari/pong.cpp @@ -105,7 +105,7 @@ TODO: Volleyball... */ static const int NS_PER_CLOCK_PONG = static_cast((double) netlist::config::INTERNAL_RES::value / (double) 7159000 + 0.5); -static const int MASTER_CLOCK_PONG = static_cast((double) netlist::config::INTERNAL_RES::value / (double) NS_PER_CLOCK_PONG + 0.5); +static const XTAL MASTER_CLOCK_PONG = XTAL::u(static_cast((double) netlist::config::INTERNAL_RES::value / (double) NS_PER_CLOCK_PONG + 0.5)); #define V_TOTAL_PONG (0x105+1) // 262 #define H_TOTAL_PONG (0x1C5+1) // 454 @@ -125,9 +125,9 @@ static const int MASTER_CLOCK_PONG = static_cast((double) netlist::config: * */ -//#define MASTER_CLOCK_BREAKOUT (14318000) +//#define MASTER_CLOCK_BREAKOUT XTAL::u(14318000) static const int NS_PER_CLOCK_BREAKOUT = static_cast((double) netlist::config::INTERNAL_RES::value / (double) 14318000 + 0.5); -static const int MASTER_CLOCK_BREAKOUT = static_cast((double) netlist::config::INTERNAL_RES::value / (double) NS_PER_CLOCK_BREAKOUT + 0.5); +static const XTAL MASTER_CLOCK_BREAKOUT = XTAL::u(static_cast((double) netlist::config::INTERNAL_RES::value / (double) NS_PER_CLOCK_BREAKOUT + 0.5)); static const int V_TOTAL_BREAKOUT = (0xFC); // 252 static const int H_TOTAL_BREAKOUT = (448*2); // 448 @@ -463,7 +463,7 @@ INPUT_PORTS_END void pong_state::pong(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, "maincpu", netlist::config::DEFAULT_CLOCK()).set_source(NETLIST_NAME(pong)); + NETLIST_CPU(config, "maincpu").set_source(NETLIST_NAME(pong)); NETLIST_ANALOG_INPUT(config, "maincpu:vr0", "ic_b9_R.R").set_mult_offset(1.0 / 100.0 * RES_K(50), RES_K(56) ); NETLIST_ANALOG_INPUT(config, "maincpu:vr1", "ic_a9_R.R").set_mult_offset(1.0 / 100.0 * RES_K(50), RES_K(56) ); @@ -474,8 +474,8 @@ void pong_state::pong(machine_config &config) NETLIST_LOGIC_INPUT(config, "maincpu:coinsw", "coinsw.POS", 0); NETLIST_LOGIC_INPUT(config, "maincpu:antenna", "antenna.IN", 0); - NETLIST_LOGIC_OUTPUT(config, "maincpu:snd0", 0).set_params("sound", FUNC(pong_state::sound_cb_logic)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0", 0).set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); + NETLIST_LOGIC_OUTPUT(config, "maincpu:snd0").set_params("sound", FUNC(pong_state::sound_cb_logic)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); @@ -491,13 +491,13 @@ void pong_state::pong(machine_config &config) .set_screen("screen"); /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void breakout_state::breakout(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, "maincpu", netlist::config::DEFAULT_CLOCK()).set_source(NETLIST_NAME(breakout)); + NETLIST_CPU(config, "maincpu").set_source(NETLIST_NAME(breakout)); NETLIST_ANALOG_INPUT(config, "maincpu:pot1", "POTP1.DIAL"); NETLIST_ANALOG_INPUT(config, "maincpu:pot2", "POTP2.DIAL"); @@ -517,15 +517,15 @@ void breakout_state::breakout(machine_config &config) NETLIST_LOGIC_INPUT(config, "maincpu:antenna", "antenna.IN", 0); - NETLIST_ANALOG_OUTPUT(config, "maincpu:snd0", 0).set_params("sound", FUNC(breakout_state::sound_cb_analog)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0", 0).set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:snd0").set_params("sound", FUNC(breakout_state::sound_cb_analog)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); // Leds and lamps - NETLIST_ANALOG_OUTPUT(config, "maincpu:led_serve", 0).set_params("CON_P", FUNC(breakout_state::serve_cb)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:lamp_credit1", 0).set_params("CON_CREDIT1", FUNC(breakout_state::credit1_cb)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:lamp_credit2", 0).set_params("CON_CREDIT2", FUNC(breakout_state::credit2_cb)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:coin_counter", 0).set_params("CON_T", FUNC(breakout_state::coin_counter_cb)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:led_serve").set_params("CON_P", FUNC(breakout_state::serve_cb)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:lamp_credit1").set_params("CON_CREDIT1", FUNC(breakout_state::credit1_cb)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:lamp_credit2").set_params("CON_CREDIT2", FUNC(breakout_state::credit2_cb)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:coin_counter").set_params("CON_T", FUNC(breakout_state::coin_counter_cb)); /* video hardware */ /* The Pixel width is a 2,1,2,1,2,1,1,1 repeating pattern @@ -545,13 +545,13 @@ void breakout_state::breakout(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void pong_state::pongd(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, "maincpu", netlist::config::DEFAULT_CLOCK()).set_source(NETLIST_NAME(pongdoubles)); + NETLIST_CPU(config, "maincpu").set_source(NETLIST_NAME(pongdoubles)); NETLIST_ANALOG_INPUT(config, "maincpu:pot0", "A10_POT.DIAL"); NETLIST_ANALOG_INPUT(config, "maincpu:pot1", "B10_POT.DIAL"); @@ -566,8 +566,8 @@ void pong_state::pongd(machine_config &config) NETLIST_LOGIC_INPUT(config, "maincpu:antenna", "antenna.IN", 0, 0x01) #endif - NETLIST_ANALOG_OUTPUT(config, "maincpu:snd0", 0).set_params("AUDIO", FUNC(pong_state::sound_cb_analog)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0", 0).set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:snd0").set_params("AUDIO", FUNC(pong_state::sound_cb_analog)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); @@ -583,13 +583,13 @@ void pong_state::pongd(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void rebound_state::rebound(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, "maincpu", netlist::config::DEFAULT_CLOCK()).set_source(NETLIST_NAME(rebound)); + NETLIST_CPU(config, "maincpu").set_source(NETLIST_NAME(rebound)); // FIXME: Later NETLIST_ANALOG_INPUT(config, "maincpu:pot1", "POTP1.DIAL"); @@ -602,11 +602,11 @@ void rebound_state::rebound(machine_config &config) NETLIST_LOGIC_INPUT(config, "maincpu:dsw1b", "DSW1b.POS", 0); NETLIST_LOGIC_INPUT(config, "maincpu:dsw2", "DSW2.POS", 0); - NETLIST_ANALOG_OUTPUT(config, "maincpu:snd0", 0).set_params("sound", FUNC(rebound_state::sound_cb_analog)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0", 0).set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:snd0").set_params("sound", FUNC(rebound_state::sound_cb_analog)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", "fixfreq", FUNC(fixedfreq_device::update_composite_monochrome)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:led_credit", 0).set_params("CON11", FUNC(rebound_state::led_credit_cb)); - NETLIST_ANALOG_OUTPUT(config, "maincpu:coin_counter", 0).set_params("CON10", FUNC(rebound_state::coin_counter_cb)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:led_credit").set_params("CON11", FUNC(rebound_state::led_credit_cb)); + NETLIST_ANALOG_OUTPUT(config, "maincpu:coin_counter").set_params("CON10", FUNC(rebound_state::coin_counter_cb)); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); @@ -623,7 +623,7 @@ void rebound_state::rebound(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); //FIXME: this is not related to reality at all. - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } diff --git a/src/mame/atari/poolshrk.cpp b/src/mame/atari/poolshrk.cpp index 788f2fb994b..f7a21515e9c 100644 --- a/src/mame/atari/poolshrk.cpp +++ b/src/mame/atari/poolshrk.cpp @@ -219,7 +219,7 @@ void poolshrk_state::poolshrk_palette(palette_device &palette) const void poolshrk_state::poolshrk(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 11055000 / 8); /* ? */ + M6800(config, m_maincpu, XTAL::u(11055000) / 8); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &poolshrk_state::poolshrk_cpu_map); m_maincpu->set_vblank_int("screen", FUNC(poolshrk_state::irq0_line_assert)); diff --git a/src/mame/atari/quantum.cpp b/src/mame/atari/quantum.cpp index ab6eb93a9d5..a176b371f2e 100644 --- a/src/mame/atari/quantum.cpp +++ b/src/mame/atari/quantum.cpp @@ -310,14 +310,14 @@ void quantum_state::quantum(machine_config &config) screen.set_visarea(0, 900, 0, 600); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - AVG_QUANTUM(config, m_avg, 0); + AVG_QUANTUM(config, m_avg); m_avg->set_vector("vector"); m_avg->set_memory(m_maincpu, AS_PROGRAM, 0x800000); /* sound hardware */ SPEAKER(config, "mono").front_center(); - pokey_device &pokey1(POKEY(config, "pokey1", 600000)); + pokey_device &pokey1(POKEY(config, "pokey1", XTAL::u(600000))); pokey1.pot_r<0>().set(FUNC(quantum_state::input_1_r)); pokey1.pot_r<1>().set(FUNC(quantum_state::input_1_r)); pokey1.pot_r<2>().set(FUNC(quantum_state::input_1_r)); @@ -329,7 +329,7 @@ void quantum_state::quantum(machine_config &config) pokey1.set_output_opamp(RES_K(1), 0.0, 5.0); pokey1.add_route(0, "discrete", 1.0, 0); - pokey_device &pokey2(POKEY(config, "pokey2", 600000)); + pokey_device &pokey2(POKEY(config, "pokey2", XTAL::u(600000))); pokey2.pot_r<0>().set(FUNC(quantum_state::input_2_r)); pokey2.pot_r<1>().set(FUNC(quantum_state::input_2_r)); pokey2.pot_r<2>().set(FUNC(quantum_state::input_2_r)); diff --git a/src/mame/atari/quizshow.cpp b/src/mame/atari/quizshow.cpp index fee79e86895..ef4ef96e5a2 100644 --- a/src/mame/atari/quizshow.cpp +++ b/src/mame/atari/quizshow.cpp @@ -421,7 +421,7 @@ void quizshow_state::quizshow(machine_config &config) // sound hardware (discrete) SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); // cassette CASSETTE(config, m_cass); diff --git a/src/mame/atari/rampart.cpp b/src/mame/atari/rampart.cpp index 6defc1fad80..7113ba7c7e0 100644 --- a/src/mame/atari/rampart.cpp +++ b/src/mame/atari/rampart.cpp @@ -328,7 +328,7 @@ void rampart_state::rampart(machine_config &config) M68000(config, m_maincpu, MASTER_CLOCK/2); m_maincpu->set_addrmap(AS_PROGRAM, &rampart_state::main_map); - SLAPSTIC(config, m_slapstic, 118); + SLAPSTIC(config, m_slapstic, XTAL::u(118)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x140000, 0x147fff, 0x438000); m_slapstic->set_bank(m_slapstic_bank); @@ -342,7 +342,7 @@ void rampart_state::rampart(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_rampart); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 512).set_membits(8); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, rampart_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, rampart_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/atari/redbaron.cpp b/src/mame/atari/redbaron.cpp index 2db97bd8eeb..a3ae261b386 100644 --- a/src/mame/atari/redbaron.cpp +++ b/src/mame/atari/redbaron.cpp @@ -23,7 +23,7 @@ #include -#define OUTPUT_RATE (48000) +#define OUTPUT_RATE 48000 // device type definition @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(REDBARON, redbaron_sound_device, "redbaron_custom", "Red Baro // redbaron_sound_device - constructor //------------------------------------------------- -redbaron_sound_device::redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +redbaron_sound_device::redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, REDBARON, tag, owner, clock), device_sound_interface(mconfig, *this), m_vol_lookup(nullptr), @@ -99,7 +99,7 @@ void redbaron_sound_device::device_start() m_vol_crash[i] = 32767 * r0 / (r0 + r1); } - m_channel = stream_alloc(0, 1, OUTPUT_RATE); + m_channel = stream_alloc(0, 1, XTAL::u(OUTPUT_RATE)); save_item(NAME(m_latch)); save_item(NAME(m_poly_counter)); diff --git a/src/mame/atari/redbaron.h b/src/mame/atari/redbaron.h index 8262f9619db..530ac2122bd 100644 --- a/src/mame/atari/redbaron.h +++ b/src/mame/atari/redbaron.h @@ -10,7 +10,7 @@ class redbaron_sound_device : public device_t, public device_sound_interface { public: - redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sounds_w(uint8_t data); diff --git a/src/mame/atari/relief.cpp b/src/mame/atari/relief.cpp index d9fbc3cc70e..2ec5b2c7297 100644 --- a/src/mame/atari/relief.cpp +++ b/src/mame/atari/relief.cpp @@ -336,11 +336,11 @@ void relief_state::relief(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_relief); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); - ATARI_VAD(config, m_vad, 0, m_screen); + ATARI_VAD(config, m_vad, m_screen); m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(FUNC(relief_state::get_playfield_tile_info)); TILEMAP(config, "vad:playfield2", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(FUNC(relief_state::get_playfield2_tile_info)); - ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, relief_state::s_mob_config).set_gfxdecode(m_gfxdecode); + ATARI_MOTION_OBJECTS(config, "vad:mob", m_screen, relief_state::s_mob_config).set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); diff --git a/src/mame/atari/runaway.cpp b/src/mame/atari/runaway.cpp index b1640603a0d..04dfb1f12b0 100644 --- a/src/mame/atari/runaway.cpp +++ b/src/mame/atari/runaway.cpp @@ -552,7 +552,7 @@ GFXDECODE_END void qwak_state::qwak(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 12096000 / 8); /* ? */ + M6502(config, m_maincpu, XTAL::u(12096000) / 8); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &qwak_state::qwak_map); ls259_device &mainlatch(LS259(config, "mainlatch")); @@ -576,11 +576,11 @@ void qwak_state::qwak(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - pokey_device &pokey1(POKEY(config, "pokey1", 12096000 / 8)); + pokey_device &pokey1(POKEY(config, "pokey1", XTAL::u(12096000) / 8)); pokey1.allpot_r().set_ioport("6008"); pokey1.add_route(ALL_OUTPUTS, "mono", 0.50); - pokey_device &pokey2(POKEY(config, "pokey2", 12096000 / 8)); + pokey_device &pokey2(POKEY(config, "pokey2", XTAL::u(12096000) / 8)); pokey2.pot_r<0>().set(FUNC(qwak_state::pot_r)); pokey2.pot_r<1>().set(FUNC(qwak_state::pot_r)); pokey2.pot_r<2>().set(FUNC(qwak_state::pot_r)); diff --git a/src/mame/atari/sbrkout.cpp b/src/mame/atari/sbrkout.cpp index 6c6de61b814..28fcc8f1d85 100644 --- a/src/mame/atari/sbrkout.cpp +++ b/src/mame/atari/sbrkout.cpp @@ -570,7 +570,7 @@ void sbrkout_state::sbrkout(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.99); } diff --git a/src/mame/atari/shuuz.cpp b/src/mame/atari/shuuz.cpp index 8d6842d9de0..d8699de8cfd 100644 --- a/src/mame/atari/shuuz.cpp +++ b/src/mame/atari/shuuz.cpp @@ -234,10 +234,10 @@ void shuuz_state::shuuz(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_shuuz); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 1024); - ATARI_VAD(config, m_vad, 0, m_screen); + ATARI_VAD(config, m_vad, m_screen); m_vad->scanline_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(FUNC(shuuz_state::get_playfield_tile_info)); - ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, shuuz_state::s_mob_config).set_gfxdecode(m_gfxdecode); + ATARI_MOTION_OBJECTS(config, "vad:mob", m_screen, shuuz_state::s_mob_config).set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); diff --git a/src/mame/atari/skullxbo.cpp b/src/mame/atari/skullxbo.cpp index 9115f4b4a29..970f58dd30c 100644 --- a/src/mame/atari/skullxbo.cpp +++ b/src/mame/atari/skullxbo.cpp @@ -254,7 +254,7 @@ void skullxbo_state::skullxbo(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 16,8, TILEMAP_SCAN_COLS, 64,64).set_info_callback(FUNC(skullxbo_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(skullxbo_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, skullxbo_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, skullxbo_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -269,7 +269,7 @@ void skullxbo_state::skullxbo(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_II(config, m_jsa, 0); + ATARI_JSA_II(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_4); m_jsa->test_read_cb().set_ioport("FF5802").bit(7); m_jsa->add_route(ALL_OUTPUTS, "mono", 0.8); diff --git a/src/mame/atari/skyraid.cpp b/src/mame/atari/skyraid.cpp index 08d2b58b40b..18d2b8fdf33 100644 --- a/src/mame/atari/skyraid.cpp +++ b/src/mame/atari/skyraid.cpp @@ -225,7 +225,7 @@ GFXDECODE_END void skyraid_state::skyraid(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 12096000 / 12); + M6502(config, m_maincpu, XTAL::u(12096000) / 12); m_maincpu->set_addrmap(AS_PROGRAM, &skyraid_state::skyraid_map); m_maincpu->set_vblank_int("screen", FUNC(skyraid_state::irq0_line_hold)); diff --git a/src/mame/atari/slapstic.cpp b/src/mame/atari/slapstic.cpp index b2de723df47..241456f7dc9 100644 --- a/src/mame/atari/slapstic.cpp +++ b/src/mame/atari/slapstic.cpp @@ -203,7 +203,7 @@ DEFINE_DEVICE_TYPE(SLAPSTIC, atari_slapstic_device, "slapstic", "Atari Slapstic") -atari_slapstic_device::atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +atari_slapstic_device::atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SLAPSTIC, tag, owner, clock), m_bank(*this, finder_base::DUMMY_TAG), m_view(nullptr), diff --git a/src/mame/atari/slapstic.h b/src/mame/atari/slapstic.h index a74bd1a8992..b8182cfe158 100644 --- a/src/mame/atari/slapstic.h +++ b/src/mame/atari/slapstic.h @@ -30,12 +30,12 @@ class atari_slapstic_device : public device_t public: // construction/destruction atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, int chipnum) - : atari_slapstic_device(mconfig, tag, owner, u32(0)) + : atari_slapstic_device(mconfig, tag, owner) { m_chipnum = chipnum; } - atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_bank(T &&tag) { m_bank.set_tag(std::forward(tag)); } void set_view(memory_view &view) { m_view = &view; } diff --git a/src/mame/atari/sprint4.cpp b/src/mame/atari/sprint4.cpp index 8c422ad1541..21736dda073 100644 --- a/src/mame/atari/sprint4.cpp +++ b/src/mame/atari/sprint4.cpp @@ -22,7 +22,7 @@ Atari Sprint 4 driver namespace { -#define MASTER_CLOCK 12096000 +#define MASTER_CLOCK XTAL::u(12096000) #define HTOTAL 384 #define VTOTAL 262 diff --git a/src/mame/atari/sprint8.cpp b/src/mame/atari/sprint8.cpp index 5dee6532124..65bfbe39b7d 100644 --- a/src/mame/atari/sprint8.cpp +++ b/src/mame/atari/sprint8.cpp @@ -459,7 +459,7 @@ GFXDECODE_END void sprint8_state::sprint8(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 11055000 / 11); /* ? */ + M6800(config, m_maincpu, XTAL::u(11055000) / 11); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &sprint8_state::sprint8_map); TIMER(config, "input_timer").configure_periodic(FUNC(sprint8_state::input_callback), attotime::from_hz(60)); diff --git a/src/mame/atari/starshp1.h b/src/mame/atari/starshp1.h index 203e7aa1a1a..3a4490d2fb9 100644 --- a/src/mame/atari/starshp1.h +++ b/src/mame/atari/starshp1.h @@ -36,7 +36,7 @@ #include "tilemap.h" -#define STARSHP1_MASTER_CLOCK (12096000) +#define STARSHP1_MASTER_CLOCK XTAL::u(12096000) #define STARSHP1_CPU_CLOCK (STARSHP1_MASTER_CLOCK / 16) #define STARSHP1_PIXEL_CLOCK (STARSHP1_MASTER_CLOCK) #define STARSHP1_HTOTAL (0x300) diff --git a/src/mame/atari/starshp1_a.cpp b/src/mame/atari/starshp1_a.cpp index 5b262b7403e..07333dfbe11 100644 --- a/src/mame/atari/starshp1_a.cpp +++ b/src/mame/atari/starshp1_a.cpp @@ -26,7 +26,7 @@ #define STARSHP1_SL2_SND NODE_17 /* Timing signals */ -#define STARSHP1_HSYNC (STARSHP1_PIXEL_CLOCK / STARSHP1_HTOTAL) +#define STARSHP1_HSYNC (STARSHP1_PIXEL_CLOCK / STARSHP1_HTOTAL).value() #define STARSHP1_S1V STARSHP1_HSYNC / 2 #define STARSHP1_S128V STARSHP1_S1V / 128 diff --git a/src/mame/atari/starwars.cpp b/src/mame/atari/starwars.cpp index 50307ecdaaa..46180c0665b 100644 --- a/src/mame/atari/starwars.cpp +++ b/src/mame/atari/starwars.cpp @@ -292,14 +292,14 @@ void starwars_state::starwars(machine_config &config) outlatch.q_out_cb<7>().set(FUNC(starwars_state::recall_w)); // NVRAM array recall /* video hardware */ - VECTOR(config, "vector", 0); + VECTOR(config, "vector"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR)); screen.set_refresh_hz(CLOCK_3KHZ / 12 / 6); screen.set_size(400, 300); screen.set_visarea(0, 250, 0, 280); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - avg_device &avg(AVG_STARWARS(config, "avg", 0)); + avg_device &avg(AVG_STARWARS(config, "avg")); avg.set_vector("vector"); avg.set_memory(m_maincpu, AS_PROGRAM, 0x0000); @@ -329,7 +329,7 @@ void starwars_state::esb(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &starwars_state::esb_main_map); - SLAPSTIC(config, m_slapstic, 101); + SLAPSTIC(config, m_slapstic, XTAL::u(101)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x8000, 0x9fff, 0); m_slapstic->set_bank(m_slapstic_bank); diff --git a/src/mame/atari/starwars_m.cpp b/src/mame/atari/starwars_m.cpp index 9417dabc789..015d1ae15c6 100644 --- a/src/mame/atari/starwars_m.cpp +++ b/src/mame/atari/starwars_m.cpp @@ -27,7 +27,7 @@ /* Debugging flag */ #define MATHDEBUG 0 -#define MASTER_CLOCK (12096000) +#define MASTER_CLOCK XTAL::u(12096000) diff --git a/src/mame/atari/subs.cpp b/src/mame/atari/subs.cpp index ed9f3bc7269..c2e4508f854 100644 --- a/src/mame/atari/subs.cpp +++ b/src/mame/atari/subs.cpp @@ -178,7 +178,7 @@ GFXDECODE_END void subs_state::subs(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 12096000/16); /* clock input is the "4H" signal */ + M6502(config, m_maincpu, XTAL::u(12096000)/16); /* clock input is the "4H" signal */ m_maincpu->set_addrmap(AS_PROGRAM, &subs_state::main_map); m_maincpu->set_periodic_int(FUNC(subs_state::interrupt), attotime::from_hz(4*57)); diff --git a/src/mame/atari/tank8.cpp b/src/mame/atari/tank8.cpp index 95379f5c69a..3e9d7c13c90 100644 --- a/src/mame/atari/tank8.cpp +++ b/src/mame/atari/tank8.cpp @@ -331,7 +331,7 @@ GFXDECODE_END void tank8_state::tank8(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 11055000 / 10); /* ? */ + M6800(config, m_maincpu, XTAL::u(11055000) / 10); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &tank8_state::tank8_cpu_map); /* video hardware */ diff --git a/src/mame/atari/tempest.cpp b/src/mame/atari/tempest.cpp index d4bd415a9b3..89d5d94160b 100644 --- a/src/mame/atari/tempest.cpp +++ b/src/mame/atari/tempest.cpp @@ -655,12 +655,12 @@ void tempest_state::tempest(machine_config &config) screen.set_visarea(0, 580, 0, 570); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - AVG_TEMPEST(config, m_avg, 0); + AVG_TEMPEST(config, m_avg); m_avg->set_vector("vector"); m_avg->set_memory(m_maincpu, AS_PROGRAM, 0x2000); /* Drivers */ - MATHBOX(config, m_mathbox, 0); + MATHBOX(config, m_mathbox); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/atari/thunderj.cpp b/src/mame/atari/thunderj.cpp index 066184f7d1e..54c40083d08 100644 --- a/src/mame/atari/thunderj.cpp +++ b/src/mame/atari/thunderj.cpp @@ -249,12 +249,12 @@ void thunderj_state::thunderj(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_thunderj); PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048); - ATARI_VAD(config, m_vad, 0, m_screen); + ATARI_VAD(config, m_vad, m_screen); m_vad->scanline_int_cb().set(FUNC(thunderj_state::scanline_int_write_line)); TILEMAP(config, "vad:playfield", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(FUNC(thunderj_state::get_playfield_tile_info)); TILEMAP(config, "vad:playfield2", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64, 0).set_info_callback(FUNC(thunderj_state::get_playfield2_tile_info)); TILEMAP(config, "vad:alpha", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(FUNC(thunderj_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, thunderj_state::s_mob_config).set_gfxdecode("gfxdecode"); + ATARI_MOTION_OBJECTS(config, "vad:mob", m_screen, thunderj_state::s_mob_config).set_gfxdecode("gfxdecode"); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK); @@ -267,7 +267,7 @@ void thunderj_state::thunderj(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ATARI_JSA_II(config, m_jsa, 0); + ATARI_JSA_II(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("260012").bit(1); m_jsa->add_route(ALL_OUTPUTS, "mono", 0.8); diff --git a/src/mame/atari/tia.cpp b/src/mame/atari/tia.cpp index 4ba53742b73..1e29a652357 100644 --- a/src/mame/atari/tia.cpp +++ b/src/mame/atari/tia.cpp @@ -349,7 +349,7 @@ void tia_pal_video_device::init_palette() extend_palette(); } -tia_video_device::tia_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tia_video_device::tia_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , device_palette_interface(mconfig, *this) @@ -368,7 +368,7 @@ DEFINE_DEVICE_TYPE(TIA_PAL_VIDEO, tia_pal_video_device, "tia_pal_video", "TIA Vi // tia_pal_video_device - constructor //------------------------------------------------- -tia_pal_video_device::tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tia_pal_video_device::tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tia_video_device(mconfig, TIA_PAL_VIDEO, tag, owner, clock) { } @@ -380,7 +380,7 @@ DEFINE_DEVICE_TYPE(TIA_NTSC_VIDEO, tia_ntsc_video_device, "tia_ntsc_video", "TIA // tia_ntsc_video_device - constructor //------------------------------------------------- -tia_ntsc_video_device::tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tia_ntsc_video_device::tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tia_video_device(mconfig, TIA_NTSC_VIDEO, tag, owner, clock) { } diff --git a/src/mame/atari/tia.h b/src/mame/atari/tia.h index 8a169e24415..8b14d2f0f3c 100644 --- a/src/mame/atari/tia.h +++ b/src/mame/atari/tia.h @@ -52,7 +52,7 @@ public: protected: // construction/destruction - tia_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tia_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template void set_tia_tag(T &&tag) { m_tia.set_tag(std::forward(tag)); } @@ -210,13 +210,13 @@ private: class tia_pal_video_device : public tia_video_device { public: - template tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&tia_tag) - : tia_pal_video_device(mconfig, tag, owner, clock) + template tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&tia_tag) + : tia_pal_video_device(mconfig, tag, owner) { set_tia_tag(std::forward(tia_tag)); } - tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void init_palette() override; @@ -225,13 +225,13 @@ protected: class tia_ntsc_video_device : public tia_video_device { public: - template tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&tia_tag) - : tia_ntsc_video_device(mconfig, tag, owner, clock) + template tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&tia_tag) + : tia_ntsc_video_device(mconfig, tag, owner) { set_tia_tag(std::forward(tia_tag)); } - tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void init_palette() override; diff --git a/src/mame/atari/tomcat.cpp b/src/mame/atari/tomcat.cpp index df2cc459164..3f3092f5f7a 100644 --- a/src/mame/atari/tomcat.cpp +++ b/src/mame/atari/tomcat.cpp @@ -362,9 +362,9 @@ void tomcat_state::tomcat(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); - M48T02(config, "m48t02", 0); + M48T02(config, "m48t02"); - VECTOR(config, "vector", 0); + VECTOR(config, "vector"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR)); screen.set_refresh_hz(40); //screen.set_refresh_hz((double)XTAL(12'000'000) / 16 / 16 / 16 / 12 / 5 ); @@ -372,7 +372,7 @@ void tomcat_state::tomcat(machine_config &config) screen.set_visarea(0, 280, 0, 250); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - avg_device &avg(AVG_STARWARS(config, "avg", 0)); + avg_device &avg(AVG_STARWARS(config, "avg")); avg.set_vector("vector"); avg.set_memory(m_maincpu, AS_PROGRAM, 0x800000); @@ -382,7 +382,7 @@ void tomcat_state::tomcat(machine_config &config) POKEY(config, "pokey2", XTAL(14'318'181) / 8).add_route(ALL_OUTPUTS, "rspeaker", 0.20); - TMS5220(config, m_tms, 325000); + TMS5220(config, m_tms, XTAL::u(325000)); m_tms->add_route(ALL_OUTPUTS, "lspeaker", 0.50); m_tms->add_route(ALL_OUTPUTS, "rspeaker", 0.50); diff --git a/src/mame/atari/toobin.cpp b/src/mame/atari/toobin.cpp index 8bc4a1cd919..c5e8bbf3600 100644 --- a/src/mame/atari/toobin.cpp +++ b/src/mame/atari/toobin.cpp @@ -218,7 +218,7 @@ void toobin_state::toobin(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 4, 8,8, TILEMAP_SCAN_ROWS, 128,64).set_info_callback(FUNC(toobin_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,48, 0).set_info_callback(FUNC(toobin_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, toobin_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, toobin_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -233,7 +233,7 @@ void toobin_state::toobin(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ATARI_JSA_I(config, m_jsa, 0); + ATARI_JSA_I(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_IPL1); m_jsa->test_read_cb().set_ioport("FF9000").bit(12); m_jsa->add_route(0, "lspeaker", 1.0); diff --git a/src/mame/atari/tourtabl.cpp b/src/mame/atari/tourtabl.cpp index 122667da571..2a1c7ccca71 100644 --- a/src/mame/atari/tourtabl.cpp +++ b/src/mame/atari/tourtabl.cpp @@ -173,7 +173,7 @@ void tourtabl_state::tourtabl(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - tia_ntsc_video_device &tia(TIA_NTSC_VIDEO(config, "tia_video", 0, "tia")); + tia_ntsc_video_device &tia(TIA_NTSC_VIDEO(config, "tia_video", "tia")); tia.read_input_port_callback().set(FUNC(tourtabl_state::tourtabl_read_input_port)); tia.databus_contents_callback().set(FUNC(tourtabl_state::tourtabl_get_databus_contents)); diff --git a/src/mame/atari/triplhnt.cpp b/src/mame/atari/triplhnt.cpp index 5833214e761..9cbc3bbfe4b 100644 --- a/src/mame/atari/triplhnt.cpp +++ b/src/mame/atari/triplhnt.cpp @@ -276,7 +276,7 @@ void triplhnt_state::triplhnt_palette(palette_device &palette) const void triplhnt_state::triplhnt(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 800000); + M6800(config, m_maincpu, XTAL::u(800000)); m_maincpu->set_addrmap(AS_PROGRAM, &triplhnt_state::triplhnt_map); m_maincpu->set_vblank_int("screen", FUNC(triplhnt_state::irq0_line_hold)); diff --git a/src/mame/atari/videopin.cpp b/src/mame/atari/videopin.cpp index 83580fc733c..6362ea05094 100644 --- a/src/mame/atari/videopin.cpp +++ b/src/mame/atari/videopin.cpp @@ -349,7 +349,7 @@ GFXDECODE_END void videopin_state::videopin(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 12096000 / 16); + M6502(config, m_maincpu, XTAL::u(12096000) / 16); m_maincpu->set_addrmap(AS_PROGRAM, &videopin_state::main_map); WATCHDOG_TIMER(config, "watchdog"); diff --git a/src/mame/atari/vindictr.cpp b/src/mame/atari/vindictr.cpp index 9bc8b9bf49b..3b773325061 100644 --- a/src/mame/atari/vindictr.cpp +++ b/src/mame/atari/vindictr.cpp @@ -205,7 +205,7 @@ void vindictr_state::vindictr(machine_config &config) TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_COLS, 64,64).set_info_callback(FUNC(vindictr_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(vindictr_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, vindictr_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, vindictr_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -220,7 +220,7 @@ void vindictr_state::vindictr(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ATARI_JSA_I(config, m_jsa, 0); + ATARI_JSA_I(config, m_jsa); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6); m_jsa->test_read_cb().set_ioport("260010").bit(12); m_jsa->add_route(0, "lspeaker", 1.0); diff --git a/src/mame/atari/wolfpack.cpp b/src/mame/atari/wolfpack.cpp index 13d5183adb1..e118e903367 100644 --- a/src/mame/atari/wolfpack.cpp +++ b/src/mame/atari/wolfpack.cpp @@ -296,7 +296,7 @@ GFXDECODE_END void wolfpack_state::wolfpack(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 12096000 / 16); + M6502(config, m_maincpu, XTAL::u(12096000) / 16); m_maincpu->set_addrmap(AS_PROGRAM, &wolfpack_state::main_map); WATCHDOG_TIMER(config, "watchdog"); @@ -315,7 +315,7 @@ void wolfpack_state::wolfpack(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - S14001A(config, m_s14001a, 20000); /* RC Clock (C=100pf, R=470K-670K ohms, adjustable) ranging from 14925.37313hz to 21276.59574hz, likely factory set to 20000hz since anything below 19500 is too slow */ + S14001A(config, m_s14001a, XTAL::u(20000)); /* RC Clock (C=100pf, R=470K-670K ohms, adjustable) ranging from 14925.37313hz to 21276.59574hz, likely factory set to 20000hz since anything below 19500 is too slow */ m_s14001a->add_route(ALL_OUTPUTS, "mono", 1.00); } diff --git a/src/mame/atari/xybots.cpp b/src/mame/atari/xybots.cpp index b9558089848..5b1fe6a921a 100644 --- a/src/mame/atari/xybots.cpp +++ b/src/mame/atari/xybots.cpp @@ -175,7 +175,7 @@ void xybots_state::xybots(machine_config &config) M68000(config, m_maincpu, 14.318181_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &xybots_state::main_map); - SLAPSTIC(config, m_slapstic, 107); + SLAPSTIC(config, m_slapstic, XTAL::u(107)); m_slapstic->set_range(m_maincpu, AS_PROGRAM, 0x8000, 0xffff, 0x7c0000); m_slapstic->set_bank(m_slapstic_bank); @@ -190,7 +190,7 @@ void xybots_state::xybots(machine_config &config) TILEMAP(config, m_playfield_tilemap, "gfxdecode", 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32).set_info_callback(FUNC(xybots_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, "gfxdecode", 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(FUNC(xybots_state::get_alpha_tile_info)); - ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, xybots_state::s_mob_config); + ATARI_MOTION_OBJECTS(config, m_mob, m_screen, xybots_state::s_mob_config); m_mob->set_gfxdecode(m_gfxdecode); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -206,7 +206,7 @@ void xybots_state::xybots(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ATARI_JSA_I(config, m_jsa, 0); + ATARI_JSA_I(config, m_jsa); m_jsa->set_swapped_coins(true); m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_2); m_jsa->test_read_cb().set_ioport("FFE200").bit(8); diff --git a/src/mame/atlus/bowltry.cpp b/src/mame/atlus/bowltry.cpp index 172035cfd57..05c09b4eec9 100644 --- a/src/mame/atlus/bowltry.cpp +++ b/src/mame/atlus/bowltry.cpp @@ -155,7 +155,7 @@ INPUT_PORTS_END void bowltry_state::bowltry(machine_config &config) { - H83008(config, m_maincpu, 16000000); + H83008(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &bowltry_state::bowltry_map); m_maincpu->set_addrmap(AS_IO, &bowltry_state::bowltry_io); // uses vector $64, IMIAB according to the manual (timer/compare B, internal to the CPU) @@ -176,7 +176,7 @@ void bowltry_state::bowltry(machine_config &config) /* tt5665 sound */ SPEAKER(config, "speaker").front_center(); - TT5665(config, "tt5665", 16000000/4, tt5665_device::ss_state::SS_HIGH, 0).add_route(1, "speaker", 1.0); // clock and SS pin unverified + TT5665(config, "tt5665", XTAL::u(16000000)/4, tt5665_device::ss_state::SS_HIGH, 0).add_route(1, "speaker", 1.0); // clock and SS pin unverified } ROM_START( bowltry ) diff --git a/src/mame/atlus/ohmygod.cpp b/src/mame/atlus/ohmygod.cpp index 96f19318451..4aedf895e81 100644 --- a/src/mame/atlus/ohmygod.cpp +++ b/src/mame/atlus/ohmygod.cpp @@ -457,7 +457,7 @@ void ohmygod_state::machine_reset() void ohmygod_state::ohmygod(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ohmygod_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(ohmygod_state::irq1_line_hold)); @@ -480,7 +480,7 @@ void ohmygod_state::ohmygod(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - okim6295_device &oki(OKIM6295(config, "oki", 14000000 / 8, okim6295_device::PIN7_HIGH)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(14000000) / 8, okim6295_device::PIN7_HIGH)); oki.set_addrmap(0, &ohmygod_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/atlus/patapata.cpp b/src/mame/atlus/patapata.cpp index 8e188281ecb..a3a2cae4200 100644 --- a/src/mame/atlus/patapata.cpp +++ b/src/mame/atlus/patapata.cpp @@ -299,7 +299,7 @@ void patapata_state::patapata(machine_config &config) OKIM6295(config, "oki2", 16_MHz_XTAL / 4, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); // not verified - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); // or 212? difficult to read (maybe 212 is 2* 112?) + nmk112_device &nmk112(NMK112(config, "nmk112")); // or 212? difficult to read (maybe 212 is 2* 112?) nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); } diff --git a/src/mame/att/att3b2.cpp b/src/mame/att/att3b2.cpp index ba081e2e23a..14e7487272b 100644 --- a/src/mame/att/att3b2.cpp +++ b/src/mame/att/att3b2.cpp @@ -76,13 +76,13 @@ void att3b2_state::att3b2v2(machine_config &config) PIT8253(config, "pit"); // D8253C-5; unknown clocks - AM9517A(config, "dmac", 5'000'000); // AM9517A-5DC; unknown clock + AM9517A(config, "dmac", XTAL::u(5'000'000)); // AM9517A-5DC; unknown clock - SCN2681(config, "duart", 3'686'400); // MC2681P + SCN2681(config, "duart", XTAL::u(3'686'400)); // MC2681P // TODO: hard disk controller (NEC D7261AD) - WD2797(config, "fdc", 1'000'000); // TMS2797NL + WD2797(config, "fdc", XTAL::u(1'000'000)); // TMS2797NL // TODO: RTC (MM58174AN) } @@ -90,12 +90,12 @@ void att3b2_state::att3b2v2(machine_config &config) void att3b2_state::att3b2v3(machine_config &config) { att3b2v2(config); - m_maincpu->set_clock(18'000'000); + m_maincpu->set_clock(XTAL::u(18'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &att3b2_state::mem_map_600); PIT8254(config.replace(), "pit"); // Intel 82C54 - FD1793(config.replace(), "fdc", 1'000'000); // FD 1793-02 + FD1793(config.replace(), "fdc", XTAL::u(1'000'000)); // FD 1793-02 } ROM_START(3b2_300) diff --git a/src/mame/att/att4425.cpp b/src/mame/att/att4425.cpp index 3399fd99ac9..0b9f8299ceb 100644 --- a/src/mame/att/att4425.cpp +++ b/src/mame/att/att4425.cpp @@ -253,7 +253,7 @@ void att4425_state::att4425(machine_config &config) ctc.zc_callback<2>().set(m_sio, FUNC(z80sio_device::rxtxcb_w)); #endif - Z80SIO(config, m_sio, 4800); + Z80SIO(config, m_sio, XTAL::u(4800)); m_sio->out_int_callback().set_inputline(Z80_TAG, INPUT_LINE_IRQ0); m_sio->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd)); m_sio->out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr)); @@ -270,10 +270,10 @@ void att4425_state::att4425(machine_config &config) rs232_port_device &rs232b(RS232_PORT(config, RS232_B_TAG, default_rs232_devices, "printer")); rs232b.rxd_handler().set(m_sio, FUNC(z80sio_device::rxb_w)); - clock_device &line_clock(CLOCK(config, "line_clock", 9600 * 64)); + clock_device &line_clock(CLOCK(config, "line_clock", XTAL::u(9600 * 64))); line_clock.signal_handler().set(FUNC(att4425_state::write_line_clock)); - I8251(config, m_i8251, 0); + I8251(config, m_i8251); m_i8251->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_i8251->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_i8251->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -283,7 +283,7 @@ void att4425_state::att4425(machine_config &config) rs232.cts_handler().set(m_i8251, FUNC(i8251_device::write_cts)); rs232.dsr_handler().set(m_i8251, FUNC(i8251_device::write_dsr)); - clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", 4800 * 64)); + clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", XTAL::u(4800 * 64))); keyboard_clock.signal_handler().set(FUNC(att4425_state::write_keyboard_clock)); RAM(config, RAM_TAG).set_default_size("32K").set_default_value(0); diff --git a/src/mame/att/att610.cpp b/src/mame/att/att610.cpp index 35ce4f2ced5..de16d523cf2 100644 --- a/src/mame/att/att610.cpp +++ b/src/mame/att/att610.cpp @@ -139,7 +139,7 @@ void att610_state::att610(machine_config &config) Z80SIO(config, m_sio, 27.72_MHz_XTAL / 7); // Z8441APS (SIO/1) m_sio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - scn2681_device &duart(SCN2681(config, "duart", 3'686'400)); // MC2681P (adjacent XTAL not legible) + scn2681_device &duart(SCN2681(config, "duart", XTAL::u(3'686'400))); // MC2681P (adjacent XTAL not legible) duart.irq_cb().set("sio", FUNC(z80sio_device::syncb_w)).invert(); duart.outport_cb().set("sio", FUNC(z80sio_device::rxcb_w)).bit(3); duart.outport_cb().append("sio", FUNC(z80sio_device::txcb_w)).bit(3); diff --git a/src/mame/att/unixpc.cpp b/src/mame/att/unixpc.cpp index 7806d65f6af..fd8e01972a8 100644 --- a/src/mame/att/unixpc.cpp +++ b/src/mame/att/unixpc.cpp @@ -412,7 +412,7 @@ void unixpc_state::unixpc(machine_config &config) WD1010(config, m_hdc, 40_MHz_XTAL / 8); m_hdc->out_intrq_callback().set(FUNC(unixpc_state::wd1010_intrq_w)); - HARDDISK(config, m_hdr0, 0); + HARDDISK(config, m_hdr0); upd7201_device &mpsc(UPD7201(config, "mpsc", 19.6608_MHz_XTAL / 8)); mpsc.out_txda_callback().set("rs232", FUNC(rs232_port_device::write_txd)); @@ -420,7 +420,7 @@ void unixpc_state::unixpc(machine_config &config) mpsc.out_rtsa_callback().set("rs232", FUNC(rs232_port_device::write_rts)); mpsc.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_4); - acia6850_device &kbc(ACIA6850(config, "kbc", 0)); + acia6850_device &kbc(ACIA6850(config, "kbc")); kbc.irq_handler().set_inputline(m_maincpu, M68K_IRQ_3); // TODO: RTC diff --git a/src/mame/ausnz/amust.cpp b/src/mame/ausnz/amust.cpp index b2f1e6fd22f..e10180a9358 100644 --- a/src/mame/ausnz/amust.cpp +++ b/src/mame/ausnz/amust.cpp @@ -417,7 +417,7 @@ void amust_state::machine_reset() m_vsync = false; m_drq = false; m_fdc->set_ready_line_connected(1); // always ready for minifloppy; controlled by fdc for 20cm - m_fdc->set_unscaled_clock(4000000); // 4MHz for minifloppy; 8MHz for 20cm + m_fdc->set_unscaled_clock(XTAL::u(4000000)); // 4MHz for minifloppy; 8MHz for 20cm address_space &program = m_maincpu->space(AS_PROGRAM); program.install_rom(0x0000, 0x07ff, m_rom); // do it here for F3 @@ -476,7 +476,7 @@ void amust_state::amust(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 800).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beep, XTAL::u(800)).add_route(ALL_OUTPUTS, "mono", 0.50); TIMER(config, m_beep_timer).configure_generic(FUNC(amust_state::beep_timer)); /* Devices */ @@ -488,17 +488,17 @@ void amust_state::amust(machine_config &config) crtc.out_hsync_callback().set(FUNC(amust_state::hsync_w)); crtc.out_vsync_callback().set(FUNC(amust_state::vsync_w)); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->drq_wr_callback().set(FUNC(amust_state::drq_w)); m_fdc->intrq_wr_callback().set(FUNC(amust_state::intrq_w)); FLOPPY_CONNECTOR(config, "fdc:0", amust_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", amust_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set("uart1", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart1", FUNC(i8251_device::write_rxc)); - i8251_device &uart1(I8251(config, "uart1", 0)); + i8251_device &uart1(I8251(config, "uart1")); uart1.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart1.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart1.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -508,12 +508,12 @@ void amust_state::amust(machine_config &config) rs232.cts_handler().set("uart1", FUNC(i8251_device::write_cts)); rs232.dsr_handler().set("uart1", FUNC(i8251_device::write_dsr)); - I8251(config, "uart2", 0); + I8251(config, "uart2"); //uart2.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); //uart2.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); //uart2.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); - PIT8253(config, "pit", 0); + PIT8253(config, "pit"); i8255_device &ppi1(I8255A(config, "ppi1")); ppi1.in_pa_callback().set(FUNC(amust_state::port04_r)); diff --git a/src/mame/ausnz/applix.cpp b/src/mame/ausnz/applix.cpp index b1fed2a8d84..d992c6d6e3f 100644 --- a/src/mame/ausnz/applix.cpp +++ b/src/mame/ausnz/applix.cpp @@ -888,7 +888,7 @@ void applix_state::applix(machine_config &config) subcpu.set_addrmap(AS_PROGRAM, &applix_state::sub_mem); subcpu.set_addrmap(AS_IO, &applix_state::sub_io); - i8051_device &kbdcpu(I8051(config, "kbdcpu", 11060250)); + i8051_device &kbdcpu(I8051(config, "kbdcpu", XTAL::u(11060250))); kbdcpu.set_addrmap(AS_PROGRAM, &applix_state::keytronic_pc3270_program); kbdcpu.set_addrmap(AS_IO, &applix_state::keytronic_pc3270_io); kbdcpu.port_in_cb<1>().set(FUNC(applix_state::p1_read)); @@ -910,8 +910,8 @@ void applix_state::applix(machine_config &config) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC0800(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // 74ls374.u20 + dac0800.u21 + 4052.u23 - DAC0800(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // 74ls374.u20 + dac0800.u21 + 4052.u23 + DAC0800(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 1.0); // 74ls374.u20 + dac0800.u21 + 4052.u23 + DAC0800(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 1.0); // 74ls374.u20 + dac0800.u21 + 4052.u23 /* Devices */ MC6845(config, m_crtc, 30_MHz_XTAL / 16); // MC6545 @ 1.875 MHz diff --git a/src/mame/ausnz/aussiebyte.cpp b/src/mame/ausnz/aussiebyte.cpp index 3d452580ed7..16ae11726d8 100644 --- a/src/mame/ausnz/aussiebyte.cpp +++ b/src/mame/ausnz/aussiebyte.cpp @@ -154,7 +154,7 @@ void aussiebyte_state::port17_w(u8 data) 3 WIEN: WD2797 Double density select. */ void aussiebyte_state::port18_w(u8 data) { - m_fdc->set_unscaled_clock(BIT(data, 2) ? 1e6 : 2e6); + m_fdc->set_unscaled_clock(BIT(data, 2) ? XTAL::u(1e6) : XTAL::u(2e6)); m_fdc->dden_w(BIT(data, 3)); } @@ -517,7 +517,7 @@ void aussiebyte_state::aussiebyte(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - VOTRAX_SC01(config, m_votrax, 720000); // 720kHz? needs verify + VOTRAX_SC01(config, m_votrax, XTAL::u(720000)); // 720kHz? needs verify m_votrax->ar_callback().set([this] (bool state) { m_port28 = state ? 0 : 1; }); m_votrax->add_route(ALL_OUTPUTS, "mono", 1.00); diff --git a/src/mame/ausnz/binbug.cpp b/src/mame/ausnz/binbug.cpp index 300af799dd4..7ef4a0df37a 100644 --- a/src/mame/ausnz/binbug.cpp +++ b/src/mame/ausnz/binbug.cpp @@ -261,7 +261,7 @@ void binbug_state::binbug(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); TIMER(config, "kansas_r").configure_periodic(FUNC(binbug_state::kansas_r), attotime::from_hz(40000)); - CLOCK(config, m_clock, 4'800); // 300 baud x 16(divider) = 4800 + CLOCK(config, m_clock, XTAL::u(4'800)); // 300 baud x 16(divider) = 4800 m_clock->signal_handler().set(FUNC(binbug_state::kansas_w)); /* basic machine hardware */ @@ -276,7 +276,7 @@ void binbug_state::binbug(machine_config &config) /* quickload */ QUICKLOAD(config, "quickload", "pgm", attotime::from_seconds(1)).set_load_callback(FUNC(binbug_state::quickload_cb)); - S100_BUS(config, m_s100, 0); + S100_BUS(config, m_s100); S100_SLOT(config, "s100:1", binbug_s100_devices, "dg640"); } diff --git a/src/mame/ausnz/d6800.cpp b/src/mame/ausnz/d6800.cpp index a0981b8ad48..fc6ca04bd99 100644 --- a/src/mame/ausnz/d6800.cpp +++ b/src/mame/ausnz/d6800.cpp @@ -241,7 +241,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(d6800_state::kansas_r) WRITE_LINE_MEMBER( d6800_state::d6800_screen_w ) { m_cb2 = state; - m_maincpu->set_unscaled_clock(state ? 589744 : 1e6); // effective clock is ~590kHz while screen is on + m_maincpu->set_unscaled_clock(state ? XTAL::u(589744) : XTAL::u(1e6)); // effective clock is ~590kHz while screen is on } uint8_t d6800_state::d6800_cassette_r() @@ -390,10 +390,10 @@ void d6800_state::d6800(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper", XTAL::u(1200)).add_route(ALL_OUTPUTS, "mono", 0.50); /* devices */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(d6800_state::d6800_keyboard_r)); m_pia->readpb_handler().set(FUNC(d6800_state::d6800_cassette_r)); m_pia->writepa_handler().set(FUNC(d6800_state::d6800_keyboard_w)); diff --git a/src/mame/ausnz/datum.cpp b/src/mame/ausnz/datum.cpp index e8763504aca..a306f33902b 100644 --- a/src/mame/ausnz/datum.cpp +++ b/src/mame/ausnz/datum.cpp @@ -203,18 +203,18 @@ void datum_state::datum(machine_config &config) m_display->set_segmask(0x3f0, 0x7f); /* Devices */ - PIA6821(config, m_pia1, 0); // keyboard & display + PIA6821(config, m_pia1); // keyboard & display m_pia1->readpa_handler().set(FUNC(datum_state::pa_r)); m_pia1->writepa_handler().set(FUNC(datum_state::pa_w)); m_pia1->writepb_handler().set(FUNC(datum_state::pb_w)); m_pia1->irqa_handler().set_inputline("maincpu", M6802_IRQ_LINE); m_pia1->irqb_handler().set_inputline("maincpu", M6802_IRQ_LINE); - PIA6821(config, m_pia2, 0); // expansion + PIA6821(config, m_pia2); // expansion m_pia2->irqa_handler().set_inputline("maincpu", M6802_IRQ_LINE); m_pia2->irqb_handler().set_inputline("maincpu", M6802_IRQ_LINE); - ACIA6850(config, m_acia, 0); // rs232 + ACIA6850(config, m_acia); // rs232 m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr)); diff --git a/src/mame/ausnz/dg680.cpp b/src/mame/ausnz/dg680.cpp index ccb6b441e00..62eac40effa 100644 --- a/src/mame/ausnz/dg680.cpp +++ b/src/mame/ausnz/dg680.cpp @@ -289,7 +289,7 @@ void dg680_state::dg680(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); TIMER(config, "kansas_r").configure_periodic(FUNC(dg680_state::kansas_r), attotime::from_hz(40000)); - CLOCK(config, m_clock, 4'800); // 300 baud x 16(divider) = 4800 + CLOCK(config, m_clock, XTAL::u(4'800)); // 300 baud x 16(divider) = 4800 m_clock->signal_handler().set(FUNC(dg680_state::kansas_w)); m_clock->signal_handler().append(m_ctc, FUNC(z80ctc_device::trg2)); m_clock->signal_handler().append(m_ctc, FUNC(z80ctc_device::trg3)); @@ -301,13 +301,13 @@ void dg680_state::dg680(machine_config &config) maincpu.set_daisy_config(dg680_daisy_chain); /* Keyboard */ - generic_keyboard_device &keyb(GENERIC_KEYBOARD(config, "keyb", 0)); + generic_keyboard_device &keyb(GENERIC_KEYBOARD(config, "keyb")); keyb.set_keyboard_callback(FUNC(dg680_state::kbd_put)); /* Devices */ Z80CTC(config, m_ctc, XTAL(8'000'000) / 4); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - m_ctc->set_clk<0>(200); + m_ctc->set_clk<0>(XTAL::u(200)); m_ctc->zc_callback<0>().set(m_ctc, FUNC(z80ctc_device::trg1)); Z80PIO(config, m_pio, XTAL(8'000'000) / 4); diff --git a/src/mame/ausnz/dmax8000.cpp b/src/mame/ausnz/dmax8000.cpp index d63b2224d45..948321e9b15 100644 --- a/src/mame/ausnz/dmax8000.cpp +++ b/src/mame/ausnz/dmax8000.cpp @@ -155,7 +155,7 @@ static void floppies(device_slot_interface &device) void dmax8000_state::dmax8000(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4'000'000); // no idea what crystal is used, but 4MHz clock is confirmed + Z80(config, m_maincpu, XTAL::u(4'000'000)); // no idea what crystal is used, but 4MHz clock is confirmed m_maincpu->set_addrmap(AS_PROGRAM, &dmax8000_state::mem_map); m_maincpu->set_addrmap(AS_IO, &dmax8000_state::io_map); @@ -170,7 +170,7 @@ void dmax8000_state::dmax8000(machine_config &config) ctc.set_clk<2>(4_MHz_XTAL / 2); // 2MHz ctc.zc_callback<2>().set("dart1", FUNC(z80dart_device::rxtxcb_w)); - z80dart_device& dart1(Z80DART(config, "dart1", 4'000'000)); // A = terminal; B = aux + z80dart_device& dart1(Z80DART(config, "dart1", XTAL::u(4'000'000))); // A = terminal; B = aux dart1.out_txda_callback().set("rs232", FUNC(rs232_port_device::write_txd)); dart1.out_dtra_callback().set("rs232", FUNC(rs232_port_device::write_dtr)); dart1.out_rtsa_callback().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -181,20 +181,20 @@ void dmax8000_state::dmax8000(machine_config &config) rs232.ri_handler().set("dart1", FUNC(z80dart_device::ria_w)); rs232.cts_handler().set("dart1", FUNC(z80dart_device::ctsa_w)); - Z80DART(config, "dart2", 4'000'000); // RS232 ports + Z80DART(config, "dart2", XTAL::u(4'000'000)); // RS232 ports - z80pio_device& pio1(Z80PIO(config, "pio1", 4'000'000)); + z80pio_device& pio1(Z80PIO(config, "pio1", XTAL::u(4'000'000))); pio1.out_pa_callback().set(FUNC(dmax8000_state::port0c_w)); pio1.out_pb_callback().set(FUNC(dmax8000_state::port0d_w)); - Z80PIO(config, "pio2", 4'000'000); + Z80PIO(config, "pio2", XTAL::u(4'000'000)); - FD1793(config, m_fdc, 2'000'000); // no idea + FD1793(config, m_fdc, XTAL::u(2'000'000)); // no idea m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_fdc->drq_wr_callback().set(FUNC(dmax8000_state::fdc_drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", floppies, "8dsdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - MM58174(config, "rtc", 0); + MM58174(config, "rtc"); } diff --git a/src/mame/ausnz/eacc.cpp b/src/mame/ausnz/eacc.cpp index 57102dac044..7a5da8d8a1d 100644 --- a/src/mame/ausnz/eacc.cpp +++ b/src/mame/ausnz/eacc.cpp @@ -259,7 +259,7 @@ void eacc_state::eacc(machine_config &config) config.set_default_layout(layout_eacc); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpb_handler().set(FUNC(eacc_state::keyboard_r)); m_pia->writepa_handler().set(FUNC(eacc_state::segment_w)); m_pia->writepb_handler().set(FUNC(eacc_state::digit_w)); @@ -269,16 +269,16 @@ void eacc_state::eacc(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - TTL7474(config, m_7474, 0); + TTL7474(config, m_7474); m_7474->output_cb().set(m_pia, FUNC(pia6821_device::cb1_w)); - clock_device &eacc_scan(CLOCK(config, "eacc_scan", 600)); // 74C14 with 100k & 10nF = 1200Hz, but article says 600. + clock_device &eacc_scan(CLOCK(config, "eacc_scan", XTAL::u(600))); // 74C14 with 100k & 10nF = 1200Hz, but article says 600. eacc_scan.signal_handler().set(FUNC(eacc_state::scan_w)); - clock_device &eacc_cb1(CLOCK(config, "eacc_cb1", 15)); // cpu E -> MM5369 -> 15Hz + clock_device &eacc_cb1(CLOCK(config, "eacc_cb1", XTAL::u(15))); // cpu E -> MM5369 -> 15Hz eacc_cb1.signal_handler().set(m_7474, FUNC(ttl7474_device::d_w)); - clock_device &eacc_rnd(CLOCK(config, "eacc_rnd", 30)); // random pulse for distance and fuel + clock_device &eacc_rnd(CLOCK(config, "eacc_rnd", XTAL::u(30))); // random pulse for distance and fuel eacc_rnd.signal_handler().set(FUNC(eacc_state::inputs_w)); } diff --git a/src/mame/ausnz/eti660.cpp b/src/mame/ausnz/eti660.cpp index df72dd86e63..af458299707 100644 --- a/src/mame/ausnz/eti660.cpp +++ b/src/mame/ausnz/eti660.cpp @@ -379,7 +379,7 @@ void eti660_state::eti660(machine_config &config) m_cti->add_route(ALL_OUTPUTS, "mono", 0.25); /* devices */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(eti660_state::pia_pa_r)); m_pia->writepa_handler().set(FUNC(eti660_state::pia_pa_w)); m_pia->ca2_handler().set(FUNC(eti660_state::ca2_w)); // not working, bug in pia diff --git a/src/mame/ausnz/excali64.cpp b/src/mame/ausnz/excali64.cpp index d0e78a93245..b6b1e6a46ab 100644 --- a/src/mame/ausnz/excali64.cpp +++ b/src/mame/ausnz/excali64.cpp @@ -387,7 +387,7 @@ d0,1,2,3,5 : same as port50 void excali64_state::port70_w(u8 data) { m_sys_status = data; - m_crtc->set_unscaled_clock(BIT(data, 2) ? 2e6 : 1e6); + m_crtc->set_unscaled_clock(BIT(data, 2) ? XTAL::u(2e6) : XTAL::u(1e6)); if (BIT(data, 1)) { // select 64k ram @@ -593,11 +593,11 @@ void excali64_state::excali64(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &excali64_state::mem_map); m_maincpu->set_addrmap(AS_IO, &excali64_state::io_map); - I8251(config, "uart", 0); + I8251(config, "uart"); //uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); //uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(16_MHz_XTAL / 16); /* Timer 0: tone gen for speaker */ pit.out_handler<0>().set("speaker", FUNC(speaker_sound_device::level_w)); //pit.set_clk<1>(16_MHz_XTAL / 16); /* Timer 1: baud rate gen for 8251 */ @@ -649,7 +649,7 @@ void excali64_state::excali64(machine_config &config) m_dma->in_iorq_callback().set(FUNC(excali64_state::io_read_byte)); m_dma->out_iorq_callback().set(FUNC(excali64_state::io_write_byte)); - TTL74123(config, m_u12, 0); + TTL74123(config, m_u12); m_u12->set_connection_type(TTL74123_GROUNDED); /* Hook up type (no idea what this means) */ m_u12->set_resistor_value(RES_K(100)); /* resistor connected between RCext & 5v */ m_u12->set_capacitor_value(CAP_U(100)); /* capacitor connected between Cext and RCext */ diff --git a/src/mame/ausnz/magnum.cpp b/src/mame/ausnz/magnum.cpp index f6e17c87b27..5b3d4065ec3 100644 --- a/src/mame/ausnz/magnum.cpp +++ b/src/mame/ausnz/magnum.cpp @@ -301,22 +301,22 @@ void magnum_state::magnum(machine_config &config) screen2.set_visarea(0, 6*40-1, 0, 8*16-1); screen2.set_palette("palette"); - hd61830_device &lcdc1(HD61830(config, "lcdc1", 1000000)); // unknown clock + hd61830_device &lcdc1(HD61830(config, "lcdc1", XTAL::u(1000000))); // unknown clock lcdc1.set_addrmap(0, &magnum_state::magnum_lcdc); lcdc1.set_screen("screen1"); - hd61830_device &lcdc2(HD61830(config, "lcdc2", 1000000)); // unknown clock + hd61830_device &lcdc2(HD61830(config, "lcdc2", XTAL::u(1000000))); // unknown clock lcdc2.set_addrmap(0, &magnum_state::magnum_lcdc); lcdc2.set_screen("screen2"); - //I8275(config, "crtc", 3000000); // unknown clock + //I8275(config, "crtc", XTAL::u(3000000)); // unknown clock - //WD1793(config, "fdc", 1000000); // nothing known, type or if any disks even exist, port 0x44 is possibly motor control + //WD1793(config, "fdc", XTAL::u(1000000)); // nothing known, type or if any disks even exist, port 0x44 is possibly motor control PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED); SPEAKER(config, "speaker").front_center(); - BEEP(config, m_beep, 500).add_route(ALL_OUTPUTS, "speaker", 0.50); // frequency is guessed + BEEP(config, m_beep, XTAL::u(500)).add_route(ALL_OUTPUTS, "speaker", 0.50); // frequency is guessed } ROM_START( magnum ) diff --git a/src/mame/ausnz/mbee_m.cpp b/src/mame/ausnz/mbee_m.cpp index b26b127d645..7d9e0399656 100644 --- a/src/mame/ausnz/mbee_m.cpp +++ b/src/mame/ausnz/mbee_m.cpp @@ -203,7 +203,7 @@ u8 mbee_state::port18_r() u8 mbee_state::speed_r(offs_t offset) { - m_maincpu->set_unscaled_clock(BIT(offset, 8, 2) ? 6750000 : 3375000); + m_maincpu->set_unscaled_clock(BIT(offset, 8, 2) ? XTAL::u(6750000) : XTAL::u(3375000)); return 0xff; } diff --git a/src/mame/ausnz/pegasus.cpp b/src/mame/ausnz/pegasus.cpp index 0ad7221646f..d53d309445c 100644 --- a/src/mame/ausnz/pegasus.cpp +++ b/src/mame/ausnz/pegasus.cpp @@ -508,7 +508,7 @@ void pegasus_state::pegasus(machine_config &config) SPEAKER(config, "mono").front_center(); /* devices */ - PIA6821(config, m_pia_s, 0); + PIA6821(config, m_pia_s); m_pia_s->readpb_handler().set(FUNC(pegasus_state::pegasus_keyboard_r)); m_pia_s->readca1_handler().set(FUNC(pegasus_state::pegasus_cassette_r)); m_pia_s->writepa_handler().set(FUNC(pegasus_state::pegasus_keyboard_w)); @@ -518,7 +518,7 @@ void pegasus_state::pegasus(machine_config &config) m_pia_s->irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); m_pia_s->irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); - PIA6821(config, m_pia_u, 0); + PIA6821(config, m_pia_u); m_pia_u->irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); m_pia_u->irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); diff --git a/src/mame/ausnz/poly.cpp b/src/mame/ausnz/poly.cpp index 46449fe23d0..be6ed904c00 100644 --- a/src/mame/ausnz/poly.cpp +++ b/src/mame/ausnz/poly.cpp @@ -301,13 +301,13 @@ void poly_state::poly(machine_config &config) /* timer */ PTM6840(config, m_ptm, 12.0576_MHz_XTAL / 3); - m_ptm->set_external_clocks(0, 0, 0); + m_ptm->set_external_clocks(XTAL(), XTAL(), XTAL()); m_ptm->o2_callback().set(FUNC(poly_state::ptm_o2_callback)); m_ptm->o3_callback().set(FUNC(poly_state::ptm_o3_callback)); //m_ptm->irq_callback().set("irqs", FUNC(input_merger_device::in_w<1>)); /* keyboard encoder */ - //KR2376_12(config, m_kr2376, 50000); + //KR2376_12(config, m_kr2376, XTAL::u(50000)); //m_kr2376->x<0>().set_ioport("X0"); //m_kr2376->x<1>().set_ioport("X1"); //m_kr2376->x<2>().set_ioport("X2"); @@ -321,29 +321,29 @@ void poly_state::poly(machine_config &config) //m_kr2376->strobe().set("pia1", FUNC(pia6821_device::cb1_w)); /* generic keyboard until ROM in KR2376-12 is known */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(poly_state::kbd_put)); /* video control */ - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->writepa_handler().set(FUNC(poly_state::pia0_pa_w)); m_pia[0]->writepb_handler().set(FUNC(poly_state::pia0_pb_w)); m_pia[0]->irqa_handler().set("irqs", FUNC(input_merger_device::in_w<2>)); m_pia[0]->irqb_handler().set("irqs", FUNC(input_merger_device::in_w<3>)); /* keyboard PIA */ - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpb_handler().set(FUNC(poly_state::pia1_b_in)); m_pia[1]->irqa_handler().set("irqs", FUNC(input_merger_device::in_w<4>)); m_pia[1]->irqb_handler().set("irqs", FUNC(input_merger_device::in_w<5>)); /* optional rs232 interface */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); //m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); //m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); m_acia->irq_handler().set("irqs", FUNC(input_merger_device::in_w<6>)); - CLOCK(config, m_acia_clock, 153600); + CLOCK(config, m_acia_clock, XTAL::u(153600)); m_acia_clock->signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); m_acia_clock->signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); diff --git a/src/mame/ausnz/proteus.cpp b/src/mame/ausnz/proteus.cpp index cccc4cc2cac..983fffcf7e7 100644 --- a/src/mame/ausnz/proteus.cpp +++ b/src/mame/ausnz/proteus.cpp @@ -353,13 +353,13 @@ void proteus_state::proteus(machine_config &config) m_adlc->out_irq_cb().set("irqs", FUNC(input_merger_device::in_w<0>)); PTM6840(config, m_ptm, 4_MHz_XTAL / 2); - m_ptm->set_external_clocks(0, 0, 0); + m_ptm->set_external_clocks(XTAL(), XTAL(), XTAL()); m_ptm->o2_callback().set(FUNC(proteus_state::ptm_o2_callback)); m_ptm->o3_callback().set(FUNC(proteus_state::ptm_o3_callback)); m_ptm->irq_callback().set("irqs", FUNC(input_merger_device::in_w<1>)); /* parallel port */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); //m_pia->readpb_handler().set(FUNC(proteus_state::pia_pb_r)); //m_pia->writepa_handler().set(FUNC(proteus_state::pia_pa_w)); //m_pia->writepb_handler().set(FUNC(proteus_state::pia_pb_w)); @@ -373,7 +373,7 @@ void proteus_state::proteus(machine_config &config) parallel.set_output_latch(cent_data_out); /* terminal port */ - ACIA6850(config, m_acia[0], 0); + ACIA6850(config, m_acia[0]); m_acia[0]->txd_handler().set("terminal", FUNC(rs232_port_device::write_txd)); m_acia[0]->rts_handler().set("terminal", FUNC(rs232_port_device::write_rts)); m_acia[0]->irq_handler().set("irqs", FUNC(input_merger_device::in_w<4>)); @@ -387,7 +387,7 @@ void proteus_state::proteus(machine_config &config) acia0_clock.signal_handler().append(m_acia[0], FUNC(acia6850_device::write_rxc)); /* printer port */ - ACIA6850(config, m_acia[1], 0); + ACIA6850(config, m_acia[1]); m_acia[1]->txd_handler().set("printer", FUNC(rs232_port_device::write_txd)); m_acia[1]->rts_handler().set("printer", FUNC(rs232_port_device::write_rts)); m_acia[1]->irq_handler().set("irqs", FUNC(input_merger_device::in_w<5>)); @@ -401,7 +401,7 @@ void proteus_state::proteus(machine_config &config) acia1_clock.signal_handler().append(m_acia[1], FUNC(acia6850_device::write_rxc)); /* modem port */ - ACIA6850(config, m_acia[2], 0); + ACIA6850(config, m_acia[2]); m_acia[2]->txd_handler().set("modem", FUNC(rs232_port_device::write_txd)); m_acia[2]->rts_handler().set("modem", FUNC(rs232_port_device::write_rts)); m_acia[2]->irq_handler().set("irqs", FUNC(input_merger_device::in_w<6>)); diff --git a/src/mame/ausnz/super80.cpp b/src/mame/ausnz/super80.cpp index 50c9113bb32..7e90e8548e4 100644 --- a/src/mame/ausnz/super80.cpp +++ b/src/mame/ausnz/super80.cpp @@ -721,7 +721,7 @@ void super80_state::super80(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - INPUT_BUFFER(config, "cent_status_in", 0); + INPUT_BUFFER(config, "cent_status_in"); /* quickload */ quickload_image_device &quickload(QUICKLOAD(config, "quickload", "bin", attotime::from_seconds(3))); @@ -827,7 +827,7 @@ void super80v_state::super80v(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - INPUT_BUFFER(config, "cent_status_in", 0); + INPUT_BUFFER(config, "cent_status_in"); /* quickload */ quickload_image_device &quickload(QUICKLOAD(config, "quickload", "bin", attotime::from_seconds(3))); diff --git a/src/mame/ausnz/tec1.cpp b/src/mame/ausnz/tec1.cpp index eb3a3ff630c..682b7740915 100644 --- a/src/mame/ausnz/tec1.cpp +++ b/src/mame/ausnz/tec1.cpp @@ -326,7 +326,7 @@ INPUT_CHANGED_MEMBER(tec1_state::reset_button) void tec1_state::tec1(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 1000000); /* speed can be varied between 250kHz and 2MHz */ + Z80(config, m_maincpu, XTAL::u(1000000)); /* speed can be varied between 250kHz and 2MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &tec1_state::tec1_map); m_maincpu->set_addrmap(AS_IO, &tec1_state::tec1_io); @@ -335,7 +335,7 @@ void tec1_state::tec1(machine_config &config) PWM_DISPLAY(config, m_display).set_size(6, 8); m_display->set_segmask(0x3f, 0xff); - MM74C923(config, m_kb, 0); + MM74C923(config, m_kb); m_kb->set_cap_osc(CAP_N(100)); m_kb->set_cap_debounce(CAP_U(1)); m_kb->da_wr_callback().set(FUNC(tec1_state::da_w)); @@ -361,7 +361,7 @@ void tec1_state::tecjmon(machine_config &config) PWM_DISPLAY(config, m_display).set_size(6, 8); m_display->set_segmask(0x3f, 0xff); - MM74C923(config, m_kb, 0); + MM74C923(config, m_kb); m_kb->set_cap_osc(CAP_N(100)); m_kb->set_cap_debounce(CAP_U(1)); m_kb->da_wr_callback().set(FUNC(tec1_state::da_w)); diff --git a/src/mame/banctec/banctec.cpp b/src/mame/banctec/banctec.cpp index 220ad278819..59825121400 100644 --- a/src/mame/banctec/banctec.cpp +++ b/src/mame/banctec/banctec.cpp @@ -140,7 +140,7 @@ void banctec_state::banctec(machine_config &config) I80C31(config, m_maincpu, XTAL(11'059'200)); m_maincpu->set_addrmap(AS_PROGRAM, &banctec_state::banctec_mem); - m6803_cpu_device &mcu(M6803(config, "mcu", 4000000)); /* Actual MCU is a Motorola 6803 and the clock frequency is still unknown */ + m6803_cpu_device &mcu(M6803(config, "mcu", XTAL::u(4000000))); /* Actual MCU is a Motorola 6803 and the clock frequency is still unknown */ mcu.set_addrmap(AS_PROGRAM, &banctec_state::banctec_mcu_mem); // The video signal is generated by a R6545EAP character generator chip diff --git a/src/mame/bandai/wswan_v.cpp b/src/mame/bandai/wswan_v.cpp index 596781d0c73..4b98036e164 100644 --- a/src/mame/bandai/wswan_v.cpp +++ b/src/mame/bandai/wswan_v.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(WSWAN_VIDEO, wswan_video_device, "wswan_video", "Bandai WonderSwam VDP") -wswan_video_device::wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +wswan_video_device::wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WSWAN_VIDEO, tag, owner, clock) , device_video_interface(mconfig, *this) , m_set_irq_cb(*this) diff --git a/src/mame/bandai/wswan_v.h b/src/mame/bandai/wswan_v.h index 030f9ef5f1b..7f63f31b264 100644 --- a/src/mame/bandai/wswan_v.h +++ b/src/mame/bandai/wswan_v.h @@ -22,7 +22,7 @@ public: typedef device_delegate irq_cb_delegate; typedef device_delegate dmasnd_cb_delegate; - wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wswan_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~wswan_video_device(); // static configuration diff --git a/src/mame/barcrest/mpu1.cpp b/src/mame/barcrest/mpu1.cpp index e6edc8e42ee..1912f229551 100644 --- a/src/mame/barcrest/mpu1.cpp +++ b/src/mame/barcrest/mpu1.cpp @@ -406,14 +406,14 @@ void mpu1_state::machine_reset() void mpu1_state::mpu1(machine_config &config) { - M6800(config, m_maincpu, 1'000'000); /* On MPU1, the clock comes from a multivibrator circuit varying somewhere around 1 MHz from + M6800(config, m_maincpu, XTAL::u(1'000'000)); /* On MPU1, the clock comes from a multivibrator circuit varying somewhere around 1 MHz from board to board. This results in for example slightly different sound pitch across machines. I've set a stable 1 MHz clock here, which is also the case on MPU2. */ m_maincpu->set_addrmap(AS_PROGRAM, &mpu1_state::mpu1_map); TIMER(config, "nmi").configure_periodic(FUNC(mpu1_state::nmi), attotime::from_hz(100)); // From AC zero crossing detector - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set_ioport("IN"); m_pia1->irqa_handler().set_inputline(m_maincpu, M6800_IRQ_LINE); m_pia1->ca1_w(0); @@ -423,7 +423,7 @@ void mpu1_state::mpu1(machine_config &config) m_pia1->cb1_w(0); m_pia1->cb2_handler().set(FUNC(mpu1_state::pia_lamp_w<8>)); - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); m_pia2->readpa_handler().set(FUNC(mpu1_state::pia2_porta_r)); m_pia2->set_port_a_input_overrides_output_mask(0x80); m_pia2->writepa_handler().set(FUNC(mpu1_state::pia2_porta_w)); @@ -438,7 +438,7 @@ void mpu1_state::mpu1(machine_config &config) m_reel_speed = attotime::from_usec(2000); // Seems close enough to footage of a real machine SPEAKER(config, "mono").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.25); FRUIT_SAMPLES(config, m_samples); } diff --git a/src/mame/barcrest/mpu2.cpp b/src/mame/barcrest/mpu2.cpp index 914dd61b447..9dc41d7ae18 100644 --- a/src/mame/barcrest/mpu2.cpp +++ b/src/mame/barcrest/mpu2.cpp @@ -76,7 +76,7 @@ INPUT_PORTS_END void mpu2_state::mpu2(machine_config &config) { - M6800(config, m_maincpu, 2000000); // ? + M6800(config, m_maincpu, XTAL::u(2000000)); // ? m_maincpu->set_addrmap(AS_PROGRAM, &mpu2_state::mpu2_basemap); } diff --git a/src/mame/barcrest/mpu3.cpp b/src/mame/barcrest/mpu3.cpp index b403f8970a8..e46daa69b4b 100644 --- a/src/mame/barcrest/mpu3.cpp +++ b/src/mame/barcrest/mpu3.cpp @@ -813,19 +813,19 @@ void mpu3_state::mpu3base(machine_config &config) /* 6840 PTM */ PTM6840(config, m_ptm2, 4_MHz_XTAL / 4); - m_ptm2->set_external_clocks(0, 0, 0); + m_ptm2->set_external_clocks(XTAL(), XTAL(), XTAL()); m_ptm2->o1_callback().set(FUNC(mpu3_state::ic2_o1_callback)); m_ptm2->o2_callback().set(FUNC(mpu3_state::ic2_o2_callback)); m_ptm2->o3_callback().set(FUNC(mpu3_state::ic2_o3_callback)); m_ptm2->irq_callback().set("mainirq", FUNC(input_merger_device::in_w<0>)); - PIA6821(config, m_pia3, 0); + PIA6821(config, m_pia3); m_pia3->readpa_handler().set(FUNC(mpu3_state::pia_ic3_porta_r)); m_pia3->writepb_handler().set(FUNC(mpu3_state::pia_ic3_portb_w)); m_pia3->ca2_handler().set(FUNC(mpu3_state::pia_ic3_ca2_w)); m_pia3->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_pia4, 0); + PIA6821(config, m_pia4); m_pia4->readpa_handler().set(FUNC(mpu3_state::pia_ic4_porta_r)); m_pia4->writepa_handler().set(FUNC(mpu3_state::pia_ic4_porta_w)); m_pia4->writepb_handler().set(FUNC(mpu3_state::pia_ic4_portb_w)); @@ -833,14 +833,14 @@ void mpu3_state::mpu3base(machine_config &config) m_pia4->cb2_handler().set(FUNC(mpu3_state::pia_ic4_cb2_w)); m_pia4->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia5, 0); + PIA6821(config, m_pia5); m_pia5->readpb_handler().set(FUNC(mpu3_state::pia_ic5_portb_r)); m_pia5->writepa_handler().set(FUNC(mpu3_state::pia_ic5_porta_w)); m_pia5->writepb_handler().set(FUNC(mpu3_state::pia_ic5_portb_w)); m_pia5->ca2_handler().set(FUNC(mpu3_state::pia_ic5_ca2_w)); m_pia5->cb2_handler().set(FUNC(mpu3_state::pia_ic5_cb2_w)); - PIA6821(config, m_pia6, 0); + PIA6821(config, m_pia6); m_pia6->readpa_handler().set(FUNC(mpu3_state::pia_ic6_porta_r)); m_pia6->readpb_handler().set(FUNC(mpu3_state::pia_ic6_portb_r)); m_pia6->writepa_handler().set(FUNC(mpu3_state::pia_ic6_porta_w)); @@ -857,7 +857,7 @@ void mpu3_state::mpu3base(machine_config &config) REEL(config, m_reels[3], MPU3_48STEP_REEL, 96, 2, 0x00, 2); m_reels[3]->optic_handler().set(FUNC(mpu3_state::reel_optic_cb<3>)); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // 2x HM4334 or HMI6514 or MB8414 + 2.4V battery @@ -870,7 +870,7 @@ void mpu3_chr_state::mpu3_chr_3000(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mpu3_chr_state::mpu3_map_chr_3000); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6800_cheat(true); } @@ -881,7 +881,7 @@ void mpu3_chr_state::mpu3_chr_c000(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mpu3_chr_state::mpu3_map_chr_c000); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6800_cheat(true); } diff --git a/src/mame/barcrest/mpu4.cpp b/src/mame/barcrest/mpu4.cpp index 93b52eacad5..2ef81fc2bb5 100644 --- a/src/mame/barcrest/mpu4.cpp +++ b/src/mame/barcrest/mpu4.cpp @@ -1316,16 +1316,13 @@ void mpu4_state::ic3ss_w(offs_t offset, uint8_t data) m_t3l = data; } - float num = (1720000/((m_t3l + 1)*(m_t3h + 1))); + XTAL num = XTAL::u(1720000)/((m_t3l + 1)*(m_t3h + 1)); float denom1 = ((m_t3h *(m_t3l + 1)+ 1)/(2*(m_t1 + 1))); int denom2 = denom1 + 0.5f;//need to round up, this gives same precision as chip - int freq=num*denom2; + XTAL freq=num*denom2; - if (freq) - { - m_msm6376->set_unscaled_clock(freq); - } + m_msm6376->set_unscaled_clock(freq); } /* input ports for MPU4 board */ @@ -2291,13 +2288,13 @@ void mpu4_state::mpu4_common(machine_config &config) MSC1937(config, m_vfd); /* 6840 PTM */ PTM6840(config, m_6840ptm, MPU4_MASTER_CLOCK / 4); - m_6840ptm->set_external_clocks(0, 0, 0); + m_6840ptm->set_external_clocks(XTAL(), XTAL(), XTAL()); m_6840ptm->o1_callback().set(FUNC(mpu4_state::ic2_o1_callback)); m_6840ptm->o2_callback().set(FUNC(mpu4_state::ic2_o2_callback)); m_6840ptm->o3_callback().set(FUNC(mpu4_state::ic2_o3_callback)); m_6840ptm->irq_callback().set(FUNC(mpu4_state::cpu0_irq)); - PIA6821(config, m_pia3, 0); + PIA6821(config, m_pia3); m_pia3->writepa_handler().set(FUNC(mpu4_state::pia_ic3_porta_w)); m_pia3->writepb_handler().set(FUNC(mpu4_state::pia_ic3_portb_w)); m_pia3->ca2_handler().set(FUNC(mpu4_state::pia_ic3_ca2_w)); @@ -2305,7 +2302,7 @@ void mpu4_state::mpu4_common(machine_config &config) m_pia3->irqa_handler().set(FUNC(mpu4_state::cpu0_irq)); m_pia3->irqb_handler().set(FUNC(mpu4_state::cpu0_irq)); - PIA6821(config, m_pia4, 0); + PIA6821(config, m_pia4); m_pia4->readpb_handler().set(FUNC(mpu4_state::pia_ic4_portb_r)); m_pia4->writepa_handler().set(FUNC(mpu4_state::pia_ic4_porta_w)); m_pia4->writepb_handler().set(FUNC(mpu4_state::pia_ic4_portb_w)); @@ -2314,7 +2311,7 @@ void mpu4_state::mpu4_common(machine_config &config) m_pia4->irqa_handler().set(FUNC(mpu4_state::cpu0_irq)); m_pia4->irqb_handler().set(FUNC(mpu4_state::cpu0_irq)); - PIA6821(config, m_pia5, 0); + PIA6821(config, m_pia5); m_pia5->readpa_handler().set(FUNC(mpu4_state::pia_ic5_porta_r)); m_pia5->readpb_handler().set(FUNC(mpu4_state::pia_ic5_portb_r)); m_pia5->writepa_handler().set(FUNC(mpu4_state::pia_ic5_porta_w)); @@ -2325,7 +2322,7 @@ void mpu4_state::mpu4_common(machine_config &config) m_pia5->irqb_handler().set(FUNC(mpu4_state::cpu0_irq)); m_pia5->set_port_a_input_overrides_output_mask(0x40); // needed for m4madhse - PIA6821(config, m_pia6, 0); + PIA6821(config, m_pia6); m_pia6->writepa_handler().set(FUNC(mpu4_state::pia_ic6_porta_w)); m_pia6->writepb_handler().set(FUNC(mpu4_state::pia_ic6_portb_w)); m_pia6->ca2_handler().set(FUNC(mpu4_state::pia_ic6_ca2_w)); @@ -2333,7 +2330,7 @@ void mpu4_state::mpu4_common(machine_config &config) m_pia6->irqa_handler().set(FUNC(mpu4_state::cpu0_irq)); m_pia6->irqb_handler().set(FUNC(mpu4_state::cpu0_irq)); - PIA6821(config, m_pia7, 0); + PIA6821(config, m_pia7); m_pia7->readpb_handler().set(FUNC(mpu4_state::pia_ic7_portb_r)); m_pia7->writepa_handler().set(FUNC(mpu4_state::pia_ic7_porta_w)); m_pia7->writepb_handler().set(FUNC(mpu4_state::pia_ic7_portb_w)); @@ -2342,7 +2339,7 @@ void mpu4_state::mpu4_common(machine_config &config) m_pia7->irqa_handler().set(FUNC(mpu4_state::cpu0_irq)); m_pia7->irqb_handler().set(FUNC(mpu4_state::cpu0_irq)); - PIA6821(config, m_pia8, 0); + PIA6821(config, m_pia8); m_pia8->readpa_handler().set(FUNC(mpu4_state::pia_ic8_porta_r)); m_pia8->writepb_handler().set(FUNC(mpu4_state::pia_ic8_portb_w)); m_pia8->ca2_handler().set(FUNC(mpu4_state::pia_ic8_ca2_w)); @@ -2350,9 +2347,9 @@ void mpu4_state::mpu4_common(machine_config &config) m_pia8->irqa_handler().set(FUNC(mpu4_state::cpu0_irq)); m_pia8->irqb_handler().set(FUNC(mpu4_state::cpu0_irq)); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); - BACTA_DATALOGGER(config, m_dataport, 0); + BACTA_DATALOGGER(config, m_dataport); m_dataport->rxd_handler().set(FUNC(mpu4_state::dataport_rxd)); HOPPER(config, m_hopper1, attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); @@ -2361,12 +2358,12 @@ void mpu4_state::mpu4_common(machine_config &config) void mpu4_state::mpu4_common2(machine_config &config) { PTM6840(config, m_ptm_ic3ss, MPU4_MASTER_CLOCK / 4); - m_ptm_ic3ss->set_external_clocks(0, 0, 0); + m_ptm_ic3ss->set_external_clocks(XTAL(), XTAL(), XTAL()); m_ptm_ic3ss->o1_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_c2)); m_ptm_ic3ss->o2_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_c1)); m_ptm_ic3ss->o3_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_g1)); - PIA6821(config, m_pia_ic4ss, 0); + PIA6821(config, m_pia_ic4ss); m_pia_ic4ss->readpb_handler().set(FUNC(mpu4_state::pia_gb_portb_r)); m_pia_ic4ss->writepa_handler().set(FUNC(mpu4_state::pia_gb_porta_w)); m_pia_ic4ss->writepb_handler().set(FUNC(mpu4_state::pia_gb_portb_w)); @@ -2430,7 +2427,7 @@ void mpu4_state::mod2_cheatchr_f(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mpu4_state::mpu4_memmap_characteriser); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6809_cheat(true); m_characteriser->set_lamp_table(nullptr); @@ -2453,7 +2450,7 @@ void mpu4_state::mod4oki_f(machine_config &config) mpu4_common2(config); - OKIM6376(config, m_msm6376, 128000); //Adjusted by IC3, default to 16KHz sample. Can also be 85430 at 10.5KHz and 64000 at 8KHz + OKIM6376(config, m_msm6376, XTAL::u(128000)); //Adjusted by IC3, default to 16KHz sample. Can also be 85430 at 10.5KHz and 64000 at 8KHz m_msm6376->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm6376->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -2471,7 +2468,7 @@ void mpu4_state::mod4oki_cheatchr_f(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mpu4_state::mpu4_memmap_characteriser); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6809_cheat(true); m_characteriser->set_lamp_table(nullptr); diff --git a/src/mame/barcrest/mpu4.h b/src/mame/barcrest/mpu4.h index 58eb7a79e91..e2f56c68430 100644 --- a/src/mame/barcrest/mpu4.h +++ b/src/mame/barcrest/mpu4.h @@ -561,7 +561,7 @@ template void mpu4_state::mod4oki_cheatchr_pal_f(machine_c m_maincpu->set_addrmap(AS_PROGRAM, &mpu4_state::mpu4_memmap_characteriser); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6809_cheat(true); m_characteriser->set_lamp_table(Table); @@ -573,6 +573,6 @@ template void mpu4_state::mod4oki_bootleg_fixedret_f(machine_conf m_maincpu->set_addrmap(AS_PROGRAM, &mpu4_state::mpu4_memmap_bootleg_characteriser); - MPU4_CHARACTERISER_BL(config, m_characteriser_bl, 0); + MPU4_CHARACTERISER_BL(config, m_characteriser_bl); m_characteriser_bl->set_bl_fixed_return(Fixed); } diff --git a/src/mame/barcrest/mpu4_characteriser_bootleg.cpp b/src/mame/barcrest/mpu4_characteriser_bootleg.cpp index 62dbb19e9bf..607898c0ce2 100644 --- a/src/mame/barcrest/mpu4_characteriser_bootleg.cpp +++ b/src/mame/barcrest/mpu4_characteriser_bootleg.cpp @@ -14,12 +14,12 @@ DEFINE_DEVICE_TYPE(MPU4_CHARACTERISER_BL, mpu4_characteriser_bl, "xmpu4chrpalboo DEFINE_DEVICE_TYPE(MPU4_CHARACTERISER_BL_BLASTBANK, mpu4_characteriser_bl_blastbank, "mpu4chrboot_blast", "MPU4 bootleg Characteriser (Bank A Blast)") -mpu4_characteriser_bl::mpu4_characteriser_bl(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpu4_characteriser_bl::mpu4_characteriser_bl(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpu4_characteriser_bl(mconfig, MPU4_CHARACTERISER_BL, tag, owner, clock) { } -mpu4_characteriser_bl::mpu4_characteriser_bl(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mpu4_characteriser_bl::mpu4_characteriser_bl(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } @@ -32,7 +32,7 @@ void mpu4_characteriser_bl::device_reset() { } -mpu4_characteriser_bl_blastbank::mpu4_characteriser_bl_blastbank(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpu4_characteriser_bl_blastbank::mpu4_characteriser_bl_blastbank(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MPU4_CHARACTERISER_BL_BLASTBANK, tag, owner, clock) { } diff --git a/src/mame/barcrest/mpu4_characteriser_bootleg.h b/src/mame/barcrest/mpu4_characteriser_bootleg.h index 85496f437ee..e4d52ed0f86 100644 --- a/src/mame/barcrest/mpu4_characteriser_bootleg.h +++ b/src/mame/barcrest/mpu4_characteriser_bootleg.h @@ -19,7 +19,7 @@ class mpu4_characteriser_bl : public device_t { public: // construction/destruction - mpu4_characteriser_bl(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpu4_characteriser_bl(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_bl_fixed_return(uint8_t ret) { @@ -38,7 +38,7 @@ public: } protected: - mpu4_characteriser_bl(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mpu4_characteriser_bl(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -51,7 +51,7 @@ class mpu4_characteriser_bl_blastbank : public device_t { public: // construction/destruction - mpu4_characteriser_bl_blastbank(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpu4_characteriser_bl_blastbank(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset); virtual void write(offs_t offset, uint8_t data); diff --git a/src/mame/barcrest/mpu4_characteriser_pal.cpp b/src/mame/barcrest/mpu4_characteriser_pal.cpp index 197f5da46d5..5b2c999dce1 100644 --- a/src/mame/barcrest/mpu4_characteriser_pal.cpp +++ b/src/mame/barcrest/mpu4_characteriser_pal.cpp @@ -35,12 +35,12 @@ check is bypassed. This may be something to look at for prototype ROMs and hacks DEFINE_DEVICE_TYPE(MPU4_CHARACTERISER_PAL, mpu4_characteriser_pal, "mpu4chrpal", "Barcrest MPU4 Characteriser PAL") -mpu4_characteriser_pal::mpu4_characteriser_pal(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpu4_characteriser_pal::mpu4_characteriser_pal(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpu4_characteriser_pal(mconfig, MPU4_CHARACTERISER_PAL, tag, owner, clock) { } -mpu4_characteriser_pal::mpu4_characteriser_pal(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mpu4_characteriser_pal::mpu4_characteriser_pal(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_current_chr_table(nullptr), m_prot_col(0), diff --git a/src/mame/barcrest/mpu4_characteriser_pal.h b/src/mame/barcrest/mpu4_characteriser_pal.h index ea9e3b5a816..775207bcbe2 100644 --- a/src/mame/barcrest/mpu4_characteriser_pal.h +++ b/src/mame/barcrest/mpu4_characteriser_pal.h @@ -16,7 +16,7 @@ class mpu4_characteriser_pal : public device_t { public: // construction/destruction - mpu4_characteriser_pal(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpu4_characteriser_pal(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&tag) { @@ -1401,7 +1401,7 @@ public: static constexpr uint8_t topgear_characteriser_prot[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; protected: - mpu4_characteriser_pal(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mpu4_characteriser_pal(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/barcrest/mpu4_characteriser_pal_bwb.cpp b/src/mame/barcrest/mpu4_characteriser_pal_bwb.cpp index 7d374e1063e..12c0c94d0b0 100644 --- a/src/mame/barcrest/mpu4_characteriser_pal_bwb.cpp +++ b/src/mame/barcrest/mpu4_characteriser_pal_bwb.cpp @@ -50,12 +50,12 @@ and two holding the appropriate call and response pairs for the two stages of op DEFINE_DEVICE_TYPE(MPU4_CHARACTERISER_PAL_BWB, mpu4_characteriser_pal_bwb, "mpu4chrpal_bwb", "BWB MPU4 Characteriser PAL") -mpu4_characteriser_pal_bwb::mpu4_characteriser_pal_bwb(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpu4_characteriser_pal_bwb::mpu4_characteriser_pal_bwb(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpu4_characteriser_pal_bwb(mconfig, MPU4_CHARACTERISER_PAL_BWB, tag, owner, clock) { } -mpu4_characteriser_pal_bwb::mpu4_characteriser_pal_bwb(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mpu4_characteriser_pal_bwb::mpu4_characteriser_pal_bwb(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } diff --git a/src/mame/barcrest/mpu4_characteriser_pal_bwb.h b/src/mame/barcrest/mpu4_characteriser_pal_bwb.h index 3777029602d..ae7c9afcf1e 100644 --- a/src/mame/barcrest/mpu4_characteriser_pal_bwb.h +++ b/src/mame/barcrest/mpu4_characteriser_pal_bwb.h @@ -15,7 +15,7 @@ class mpu4_characteriser_pal_bwb : public device_t { public: // construction/destruction - mpu4_characteriser_pal_bwb(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpu4_characteriser_pal_bwb(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_common_key(uint8_t commonkey) { @@ -33,7 +33,7 @@ public: constexpr static uint8_t bwb_chr_table_common[16] = {0x00,0x04,0x04,0x0c,0x0c,0x1c,0x14,0x2c,0x5c,0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; protected: - mpu4_characteriser_pal_bwb(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mpu4_characteriser_pal_bwb(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/barcrest/mpu4bwb.cpp b/src/mame/barcrest/mpu4bwb.cpp index 2eb735ff55f..f553971030d 100644 --- a/src/mame/barcrest/mpu4bwb.cpp +++ b/src/mame/barcrest/mpu4bwb.cpp @@ -129,7 +129,7 @@ void mpu4bwb_machines_state::bwboki_f(machine_config &config) MCFG_MACHINE_START_OVERRIDE(mpu4bwb_machines_state,mpu4bwb) mpu4_common2(config); - OKIM6376(config, m_msm6376, 128000); //Adjusted by IC3, default to 16KHz sample. Can also be 85430 at 10.5KHz and 64000 at 8KHz + OKIM6376(config, m_msm6376, XTAL::u(128000)); //Adjusted by IC3, default to 16KHz sample. Can also be 85430 at 10.5KHz and 64000 at 8KHz m_msm6376->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm6376->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -138,7 +138,7 @@ template void mpu4bwb_machines_state::bwboki_chr_cheat_f(ma { bwboki_f(config); m_maincpu->set_addrmap(AS_PROGRAM, &mpu4bwb_machines_state::mpu4_memmap_characteriser_bwb); - MPU4_CHARACTERISER_PAL_BWB(config, m_characteriser_bwb, 0); + MPU4_CHARACTERISER_PAL_BWB(config, m_characteriser_bwb); m_characteriser_bwb->set_common_key(Key[0] & 0xff); m_characteriser_bwb->set_other_key(Key[1]); } diff --git a/src/mame/barcrest/mpu4mod2sw.cpp b/src/mame/barcrest/mpu4mod2sw.cpp index 8e0cde95534..f595d95c060 100644 --- a/src/mame/barcrest/mpu4mod2sw.cpp +++ b/src/mame/barcrest/mpu4mod2sw.cpp @@ -82,7 +82,7 @@ template void mpu4mod2_machines_state::mod2_cheatchr_pal_f m_maincpu->set_addrmap(AS_PROGRAM, &mpu4mod2_machines_state::mpu4_memmap_characteriser); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6809_cheat(true); m_characteriser->set_lamp_table(Table); @@ -96,7 +96,7 @@ template void mpu4mod2_machines_state::mod2_bootleg_fixedret_f(ma m_maincpu->set_addrmap(AS_PROGRAM, &mpu4mod2_machines_state::mpu4_memmap_bootleg_characteriser); - MPU4_CHARACTERISER_BL(config, m_characteriser_bl, 0); + MPU4_CHARACTERISER_BL(config, m_characteriser_bl); m_characteriser_bl->set_bl_fixed_return(Fixed); } @@ -123,7 +123,7 @@ void mpu4mod2_machines_state::mod2_chr_blastbnk_f(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mpu4mod2_machines_state::mpu4_memmap_bl_characteriser_blastbank); - MPU4_CHARACTERISER_BL_BLASTBANK(config, m_characteriser_blastbank, 0); + MPU4_CHARACTERISER_BL_BLASTBANK(config, m_characteriser_blastbank); } void mpu4mod2_machines_state::mod2_chr_copcash_f(machine_config &config) @@ -132,7 +132,7 @@ void mpu4mod2_machines_state::mod2_chr_copcash_f(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mpu4mod2_machines_state::mpu4_memmap_bl_characteriser_blastbank); - MPU4_CHARACTERISER_BL_BLASTBANK(config, m_characteriser_blastbank, 0); + MPU4_CHARACTERISER_BL_BLASTBANK(config, m_characteriser_blastbank); m_characteriser_blastbank->set_retxor(0x03); } diff --git a/src/mame/barcrest/mpu4mod4yam.cpp b/src/mame/barcrest/mpu4mod4yam.cpp index a41b0261848..bb88d5aa1ea 100644 --- a/src/mame/barcrest/mpu4mod4yam.cpp +++ b/src/mame/barcrest/mpu4mod4yam.cpp @@ -107,7 +107,7 @@ template void mpu4mod4yam_machines_state::cheatchr_pal_f(m m_maincpu->set_addrmap(AS_PROGRAM, &mpu4mod4yam_machines_state::memmap_characteriser_ym2413); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6809_cheat(true); m_characteriser->set_lamp_table(Table); @@ -119,7 +119,7 @@ template void mpu4mod4yam_machines_state::bootleg_fixedret_f(mach m_maincpu->set_addrmap(AS_PROGRAM, &mpu4mod4yam_machines_state::memmap_bootleg_characteriser_ym2413); - MPU4_CHARACTERISER_BL(config, m_characteriser_bl, 0); + MPU4_CHARACTERISER_BL(config, m_characteriser_bl); m_characteriser_bl->set_bl_fixed_return(Fixed); } diff --git a/src/mame/barcrest/mpu4plasma.cpp b/src/mame/barcrest/mpu4plasma.cpp index 8a47b93a4a2..fa5f5cb283f 100644 --- a/src/mame/barcrest/mpu4plasma.cpp +++ b/src/mame/barcrest/mpu4plasma.cpp @@ -92,7 +92,7 @@ uint32_t mpu4plasma_state::screen_update_mpu4plasma(screen_device &screen, bitma void mpu4plasma_state::mpu4plasma_f(machine_config &config) { mod2_f(config); - m68000_device &plasmacpu(M68000(config, "plasmacpu", 10000000)); + m68000_device &plasmacpu(M68000(config, "plasmacpu", XTAL::u(10000000))); plasmacpu.set_addrmap(AS_PROGRAM, &mpu4plasma_state::mpu4plasma_map); plasmacpu.set_vblank_int("screen", FUNC(mpu4plasma_state::irq4_line_hold)); @@ -106,7 +106,7 @@ void mpu4plasma_state::mpu4plasma_f(machine_config &config) PALETTE(config, m_palette).set_entries(0x200); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("maincpu"); m_characteriser->set_allow_6809_cheat(true); m_characteriser->set_lamp_table(nullptr); diff --git a/src/mame/barcrest/mpu4redpoint.cpp b/src/mame/barcrest/mpu4redpoint.cpp index 86be8c59161..2357ccce9e2 100644 --- a/src/mame/barcrest/mpu4redpoint.cpp +++ b/src/mame/barcrest/mpu4redpoint.cpp @@ -37,7 +37,7 @@ private: void mpu4redpoint_state::add_ympcm(machine_config &config) { - YMZ280B(config, m_ympcm, 16'934'400); + YMZ280B(config, m_ympcm, XTAL::u(16'934'400)); m_ympcm->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_ympcm->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } diff --git a/src/mame/barcrest/mpu4vid.cpp b/src/mame/barcrest/mpu4vid.cpp index 48ab3531931..89997309e50 100644 --- a/src/mame/barcrest/mpu4vid.cpp +++ b/src/mame/barcrest/mpu4vid.cpp @@ -2093,15 +2093,12 @@ void mpu4vid_state::ic3ss_vid_w(offs_t offset, uint8_t data) // E clock = VIDEO_MASTER_CLOCK / 10 - float num = (1000000/((m_t3l + 1)*(m_t3h + 1))); + XTAL num = XTAL::u(1000000)/((m_t3l + 1)*(m_t3h + 1)); float denom1 = ((m_t3h *(m_t3l + 1)+ 1)/(2*(m_t1 + 1))); int denom2 = denom1 + 0.5f;//need to round up, this gives same precision as chip - int freq=num*denom2; - if (freq) - { - m_msm6376->set_unscaled_clock(freq); - } + XTAL freq=num*denom2; + m_msm6376->set_unscaled_clock(freq); } @@ -2146,7 +2143,7 @@ void mpu4vid_state::mpu4_vid(machine_config &config) EF9369(config, m_ef9369).set_color_update_callback(FUNC(mpu4vid_state::ef9369_color_update)); PTM6840(config, m_ptm, VIDEO_MASTER_CLOCK / 10); /* 68k E clock */ - m_ptm->set_external_clocks(0, 0, 0); + m_ptm->set_external_clocks(XTAL(), XTAL(), XTAL()); m_ptm->o1_callback().set(FUNC(mpu4vid_state::vid_o1_callback)); m_ptm->o2_callback().set(FUNC(mpu4vid_state::vid_o2_callback)); m_ptm->o3_callback().set(FUNC(mpu4vid_state::vid_o3_callback)); @@ -2155,16 +2152,16 @@ void mpu4vid_state::mpu4_vid(machine_config &config) /* Present on all video cards */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - saa1099_device &saa(SAA1099(config, "saa", 8000000)); + saa1099_device &saa(SAA1099(config, "saa", XTAL::u(8000000))); saa.add_route(0, "lspeaker", 0.5); saa.add_route(1, "rspeaker", 0.5); - ACIA6850(config, m_acia_0, 0); + ACIA6850(config, m_acia_0); m_acia_0->txd_handler().set("acia6850_1", FUNC(acia6850_device::write_rxd)); m_acia_0->rts_handler().set("acia6850_1", FUNC(acia6850_device::write_dcd)); m_acia_0->irq_handler().set(FUNC(mpu4vid_state::m6809_acia_irq)); - ACIA6850(config, m_acia_1, 0); + ACIA6850(config, m_acia_1); m_acia_1->txd_handler().set("acia6850_0", FUNC(acia6850_device::write_rxd)); m_acia_1->rts_handler().set("acia6850_0", FUNC(acia6850_device::write_dcd)); m_acia_1->irq_handler().set(FUNC(mpu4vid_state::m68k_acia_irq)); @@ -2173,7 +2170,7 @@ void mpu4vid_state::mpu4_vid(machine_config &config) void mpu4vid_state::mpu4_vid_cheatchr(machine_config &config) { mpu4_vid(config); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("video"); m_characteriser->set_allow_68k_cheat(true); } @@ -2183,7 +2180,7 @@ void mpu4vid_state::mpu4_vid_strike(machine_config& config) mpu4_vid(config); m_videocpu->set_addrmap(AS_PROGRAM, &mpu4vid_state::mpu4_68k_map_strike); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_use_4k_table_sim(true); } @@ -2202,7 +2199,7 @@ void mpu4vid_state::crmaze_base(machine_config &config) void mpu4vid_state::crmaze(machine_config& config) { crmaze_base(config); - MPU4_CHARACTERISER_PAL(config, m_characteriser, 0); + MPU4_CHARACTERISER_PAL(config, m_characteriser); m_characteriser->set_cpu_tag("video"); m_characteriser->set_allow_68k_cheat(true); @@ -2213,19 +2210,19 @@ void mpu4vid_state::vid_oki(machine_config &config) //On MPU4 Video, the sound board is clocked via the 68k E clock, //and all samples are adjusted to fit the different clock speed. PTM6840(config, m_ptm_ic3ss, VIDEO_MASTER_CLOCK / 10); - m_ptm_ic3ss->set_external_clocks(0, 0, 0); + m_ptm_ic3ss->set_external_clocks(XTAL(), XTAL(), XTAL()); m_ptm_ic3ss->o1_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_c2)); m_ptm_ic3ss->o2_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_c1)); m_ptm_ic3ss->o3_callback().set("ptm_ic3ss", FUNC(ptm6840_device::set_g1)); - PIA6821(config, m_pia_ic4ss, 0); + PIA6821(config, m_pia_ic4ss); m_pia_ic4ss->readpb_handler().set(FUNC(mpu4vid_state::pia_gb_portb_r)); m_pia_ic4ss->writepa_handler().set(FUNC(mpu4vid_state::pia_gb_porta_w)); m_pia_ic4ss->writepb_handler().set(FUNC(mpu4vid_state::pia_gb_portb_w)); m_pia_ic4ss->ca2_handler().set(FUNC(mpu4vid_state::pia_gb_ca2_w)); m_pia_ic4ss->cb2_handler().set(FUNC(mpu4vid_state::pia_gb_cb2_w)); - okim6376_device &msm6376(OKIM6376(config, "msm6376", 128000)); //Adjusted by IC3 on sound board + okim6376_device &msm6376(OKIM6376(config, "msm6376", XTAL::u(128000))); //Adjusted by IC3 on sound board msm6376.add_route(0, "lspeaker", 0.5); msm6376.add_route(1, "rspeaker", 0.5); } diff --git a/src/mame/barcrest/mpu5.cpp b/src/mame/barcrest/mpu5.cpp index f14e394fe09..851a006db06 100644 --- a/src/mame/barcrest/mpu5.cpp +++ b/src/mame/barcrest/mpu5.cpp @@ -433,7 +433,7 @@ void mpu5_state::machine_start() void mpu5_state::mpu5(machine_config &config) { - M68340(config, m_maincpu, 16000000); // ? + M68340(config, m_maincpu, XTAL::u(16000000)); // ? m_maincpu->set_addrmap(AS_PROGRAM, &mpu5_state::mpu5_map); SEC(config, m_sec); diff --git a/src/mame/be/bebox.cpp b/src/mame/be/bebox.cpp index 9aec5606578..8c04395a6d9 100644 --- a/src/mame/be/bebox.cpp +++ b/src/mame/be/bebox.cpp @@ -136,9 +136,9 @@ WRITE_LINE_MEMBER(bebox_state::bebox_keyboard_interrupt) m_pic8259[0]->ir1_w(state); } -pci_connector_device &bebox_state::add_pci_slot(machine_config &config, const char *tag, size_t index, const char *default_tag) +pci_connector_device &bebox_state::add_pci_slot(machine_config &config, const char *tag, const char *default_tag) { - pci_connector_device &pcislot(PCI_CONNECTOR(config, tag, index)); + pci_connector_device &pcislot(PCI_CONNECTOR(config, tag)); pcislot.option_add("mpc105", MPC105); pcislot.option_add("cirrus", PCI_CIRRUS_SVGA); pcislot.set_default_option(default_tag); @@ -150,7 +150,7 @@ void bebox_state::bebox_peripherals(machine_config &config) { config.set_maximum_quantum(attotime::from_hz(60)); - PIT8254(config, m_pit8254, 0); + PIT8254(config, m_pit8254); m_pit8254->set_clk<0>(4772720/4); /* heartbeat IRQ */ m_pit8254->set_clk<1>(4772720/4); /* dram refresh */ m_pit8254->set_clk<2>(4772720/4); /* pio port c pin 4, and speaker polling */ @@ -171,33 +171,33 @@ void bebox_state::bebox_peripherals(machine_config &config) AM9517A(config, m_dma8237[1], XTAL(14'318'181)/3); - PIC8259(config, m_pic8259[0], 0); + PIC8259(config, m_pic8259[0]); m_pic8259[0]->out_int_callback().set(FUNC(bebox_state::bebox_pic8259_master_set_int_line)); m_pic8259[0]->in_sp_callback().set_constant(1); m_pic8259[0]->read_slave_ack_callback().set(m_pic8259[1], FUNC(pic8259_device::acknowledge)); - PIC8259(config, m_pic8259[1], 0); + PIC8259(config, m_pic8259[1]); m_pic8259[1]->out_int_callback().set(FUNC(bebox_state::bebox_pic8259_slave_set_int_line)); m_pic8259[1]->in_sp_callback().set_constant(0); - NS16550(config, "ns16550_0", 0); /* TODO: Verify model */ - NS16550(config, "ns16550_1", 0); /* TODO: Verify model */ - NS16550(config, "ns16550_2", 0); /* TODO: Verify model */ - NS16550(config, "ns16550_3", 0); /* TODO: Verify model */ + NS16550(config, "ns16550_0"); /* TODO: Verify model */ + NS16550(config, "ns16550_1"); /* TODO: Verify model */ + NS16550(config, "ns16550_2"); /* TODO: Verify model */ + NS16550(config, "ns16550_3"); /* TODO: Verify model */ /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480); screen.set_screen_update(m_vga, FUNC(cirrus_gd5428_device::screen_update)); - CIRRUS_GD5428(config, m_vga, 0); + CIRRUS_GD5428(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x200000); speaker_device &speaker(SPEAKER(config, "mono")); speaker.front_center(); - ym3812_device &ym3812(YM3812(config, "ym3812", 3579545)); + ym3812_device &ym3812(YM3812(config, "ym3812", XTAL::u(3579545))); ym3812.add_route(ALL_OUTPUTS, speaker, 1.0); FUJITSU_29F016A(config, "flash"); @@ -217,17 +217,17 @@ void bebox_state::bebox_peripherals(machine_config &config) idectrl.irq_handler().set(FUNC(bebox_state::bebox_ide_interrupt)); /* pci */ - PCI_BUS(config, m_pcibus, 0); + PCI_BUS(config, m_pcibus); m_pcibus->set_busnum(0); - pci_connector_device &pcislot0 = add_pci_slot(config, "pcibus:0", 0, "mpc105"); + pci_connector_device &pcislot0 = add_pci_slot(config, "pcibus:0", "mpc105"); pcislot0.set_option_machine_config("mpc105", [this](device_t *device) { mpc105_config(device); }); - pci_connector_device &pcislot1 = add_pci_slot(config, "pcibus:1", 1, "cirrus"); + pci_connector_device &pcislot1 = add_pci_slot(config, "pcibus:1", "cirrus"); pcislot1.set_option_machine_config("cirrus", [this](device_t *device) { cirrus_config(device); }); /*PCI_BUS_LEGACY_DEVICE(12, nullptr, scsi53c810_pci_read, scsi53c810_pci_write)*/ - SMC37C78(config, m_smc37c78, 24'000'000); + SMC37C78(config, m_smc37c78, XTAL::u(24'000'000)); m_smc37c78->intrq_wr_callback().set(FUNC(bebox_state::fdc_interrupt)); m_smc37c78->drq_wr_callback().set(m_dma8237[0], FUNC(am9517a_device::dreq2_w)); @@ -251,10 +251,10 @@ void bebox_state::bebox_peripherals(machine_config &config) void bebox_state::bebox(machine_config &config) { - PPC603(config, m_ppc[0], 66000000); /* 66 MHz */ + PPC603(config, m_ppc[0], XTAL::u(66000000)); /* 66 MHz */ m_ppc[0]->set_addrmap(AS_PROGRAM, &bebox_state::main_mem); - PPC603(config, m_ppc[1], 66000000); /* 66 MHz */ + PPC603(config, m_ppc[1], XTAL::u(66000000)); /* 66 MHz */ m_ppc[1]->set_addrmap(AS_PROGRAM, &bebox_state::slave_mem); bebox_peripherals(config); @@ -262,10 +262,10 @@ void bebox_state::bebox(machine_config &config) void bebox_state::bebox2(machine_config &config) { - PPC603E(config, m_ppc[0], 133000000); /* 133 MHz */ + PPC603E(config, m_ppc[0], XTAL::u(133000000)); /* 133 MHz */ m_ppc[0]->set_addrmap(AS_PROGRAM, &bebox_state::main_mem); - PPC603E(config, m_ppc[1], 133000000); /* 133 MHz */ + PPC603E(config, m_ppc[1], XTAL::u(133000000)); /* 133 MHz */ m_ppc[1]->set_addrmap(AS_PROGRAM, &bebox_state::slave_mem); bebox_peripherals(config); diff --git a/src/mame/be/bebox.h b/src/mame/be/bebox.h index ccb3282e1e3..79b2c8534a4 100644 --- a/src/mame/be/bebox.h +++ b/src/mame/be/bebox.h @@ -126,7 +126,7 @@ private: void mpc105_config(device_t *device); void cirrus_config(device_t *device); - pci_connector_device & add_pci_slot(machine_config &config, const char *tag, size_t index, const char *default_tag); + pci_connector_device & add_pci_slot(machine_config &config, const char *tag, const char *default_tag); void main_mem(address_map &map); void slave_mem(address_map &map); diff --git a/src/mame/beehive/microb.cpp b/src/mame/beehive/microb.cpp index 3155bf93bbf..99cfda8f6af 100644 --- a/src/mame/beehive/microb.cpp +++ b/src/mame/beehive/microb.cpp @@ -304,7 +304,7 @@ void microb_state::microb(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "usartint").output_handler().set_inputline(m_maincpu, I8085_RST55_LINE); - I8257(config, m_dmac, 2'000'000); + I8257(config, m_dmac, XTAL::u(2'000'000)); m_dmac->out_hrq_cb().set(FUNC(microb_state::dmac_hrq_w)); m_dmac->in_memr_cb().set(FUNC(microb_state::dmac_mem_r)); m_dmac->out_memw_cb().set(FUNC(microb_state::dmac_mem_w)); @@ -313,11 +313,11 @@ void microb_state::microb(machine_config &config) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER, rgb_t::green())); - screen.set_raw(1'620'000 * 8, 800, 0, 640, 324, 0, 300); - //screen.set_raw(1'620'000 * 8, 800, 0, 640, 270, 0, 250); + screen.set_raw(XTAL::u(1'620'000) * 8, 800, 0, 640, 324, 0, 300); + //screen.set_raw(XTAL::u(1'620'000) * 8, 800, 0, 640, 270, 0, 250); screen.set_screen_update("crtc", FUNC(i8275_device::screen_update)); - i8275_device &crtc(I8275(config, "crtc", 1'620'000)); + i8275_device &crtc(I8275(config, "crtc", XTAL::u(1'620'000))); crtc.set_screen("screen"); crtc.set_character_width(8); crtc.set_display_callback(FUNC(microb_state::draw_character)); @@ -345,9 +345,9 @@ void microb_state::microb(machine_config &config) pit2.out_handler<2>().set(m_usart[1], FUNC(i8251_device::write_txc)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 1000).add_route(ALL_OUTPUTS, "mono", 0.5); + BEEP(config, m_beep, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 0.5); - I8251(config, m_usart[0], 0); + I8251(config, m_usart[0]); m_usart[0]->txd_handler().set(m_rs232[0], FUNC(rs232_port_device::write_txd)); m_usart[0]->dtr_handler().set(m_rs232[0], FUNC(rs232_port_device::write_dtr)); m_usart[0]->rts_handler().set(m_rs232[0], FUNC(rs232_port_device::write_rts)); @@ -359,7 +359,7 @@ void microb_state::microb(machine_config &config) m_rs232[0]->dsr_handler().set(m_usart[0], FUNC(i8251_device::write_dsr)); m_rs232[0]->cts_handler().set(m_usart[0], FUNC(i8251_device::write_cts)); - I8251(config, m_usart[1], 0); + I8251(config, m_usart[1]); m_usart[1]->txd_handler().set(m_rs232[1], FUNC(rs232_port_device::write_txd)); m_usart[1]->dtr_handler().set(m_rs232[1], FUNC(rs232_port_device::write_dtr)); m_usart[1]->rts_handler().set(m_rs232[1], FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/bfm/bfcobra.cpp b/src/mame/bfm/bfcobra.cpp index e1819043364..a870db1608a 100644 --- a/src/mame/bfm/bfcobra.cpp +++ b/src/mame/bfm/bfcobra.cpp @@ -130,9 +130,9 @@ namespace { /* Defines */ -#define Z8S180_XTAL 24000000 -#define Z80_XTAL 5910000 /* Unconfirmed */ -#define M6809_XTAL 4000000 +#define Z8S180_XTAL XTAL::u(24000000) +#define Z80_XTAL XTAL::u(5910000) /* Unconfirmed */ +#define M6809_XTAL XTAL::u(4000000) @@ -1695,7 +1695,7 @@ void bfcobra_state::bfcobra(machine_config &config) PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // MUSIC Semiconductor TR9C1710 RAMDAC or equivalent + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // MUSIC Semiconductor TR9C1710 RAMDAC or equivalent ramdac.set_addrmap(0, &bfcobra_state::ramdac_map); ramdac.set_split_read(1); @@ -1706,21 +1706,21 @@ void bfcobra_state::bfcobra(machine_config &config) UPD7759(config, m_upd7759).add_route(ALL_OUTPUTS, "mono", 0.40); /* ACIAs */ - ACIA6850(config, m_acia6850_0, 0); + ACIA6850(config, m_acia6850_0); m_acia6850_0->txd_handler().set(m_acia6850_1, FUNC(acia6850_device::write_rxd)); m_acia6850_0->irq_handler().set(FUNC(bfcobra_state::z80_acia_irq)); - ACIA6850(config, m_acia6850_1, 0); + ACIA6850(config, m_acia6850_1); m_acia6850_1->txd_handler().set(m_acia6850_0, FUNC(acia6850_device::write_rxd)); - ACIA6850(config, m_acia6850_2, 0); + ACIA6850(config, m_acia6850_2); m_acia6850_2->txd_handler().set(FUNC(bfcobra_state::data_acia_tx_w)); m_acia6850_2->irq_handler().set(FUNC(bfcobra_state::m6809_data_irq)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); // What are the correct ACIA clocks ? + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); // What are the correct ACIA clocks ? acia_clock.signal_handler().set(FUNC(bfcobra_state::write_acia_clock)); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); } /*************************************************************************** @@ -2776,7 +2776,7 @@ void bfcobjam_state::bfcobjam(machine_config &config) PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // MUSIC Semiconductor TR9C1710 RAMDAC or equivalent + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // MUSIC Semiconductor TR9C1710 RAMDAC or equivalent ramdac.set_addrmap(0, &bfcobjam_state::ramdac_map); ramdac.set_split_read(1); @@ -2790,10 +2790,10 @@ void bfcobjam_state::bfcobjam(machine_config &config) /* ACIAs */ - ACIA6850(config, m_acia6850_0, 0); + ACIA6850(config, m_acia6850_0); m_acia6850_0->irq_handler().set(FUNC(bfcobjam_state::z8s180_acia_irq)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); // What are the correct ACIA clocks ? + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); // What are the correct ACIA clocks ? acia_clock.signal_handler().set(FUNC(bfcobjam_state::write_acia_clock)); I2C_24C08(config, m_i2cmem); @@ -2806,7 +2806,7 @@ void bfcobjam_state::bfcobjam_with_dmd(machine_config &config) UPD7759(config, m_aux_upd7759); m_aux_upd7759->add_route(ALL_OUTPUTS, "mono", 0.40); - BFM_DM01(config, m_dm01, 0); + BFM_DM01(config, m_dm01); } /*************************************************************************** diff --git a/src/mame/bfm/bfm_ad5.cpp b/src/mame/bfm/bfm_ad5.cpp index 35066900f67..dbd686419bd 100644 --- a/src/mame/bfm/bfm_ad5.cpp +++ b/src/mame/bfm/bfm_ad5.cpp @@ -182,10 +182,10 @@ INTERRUPT_GEN_MEMBER(adder5_state::ad5_fake_timer_int) void adder5_state::bfm_ad5(machine_config &config) { - MCF5206E(config, m_maincpu, 40000000); /* MCF5206eFT */ + MCF5206E(config, m_maincpu, XTAL::u(40000000)); /* MCF5206eFT */ m_maincpu->set_addrmap(AS_PROGRAM, &adder5_state::ad5_map); m_maincpu->set_periodic_int(FUNC(adder5_state::ad5_fake_timer_int), attotime::from_hz(1000)); - MCF5206E_PERIPHERAL(config, "maincpu_onboard", 0, m_maincpu); + MCF5206E_PERIPHERAL(config, "maincpu_onboard", m_maincpu); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/bfm/bfm_adr2.cpp b/src/mame/bfm/bfm_adr2.cpp index 1b947b8826a..6fa4805dc92 100644 --- a/src/mame/bfm/bfm_adr2.cpp +++ b/src/mame/bfm/bfm_adr2.cpp @@ -127,7 +127,7 @@ GFXDECODE_END DEFINE_DEVICE_TYPE(BFM_ADDER2, bfm_adder2_device, "bfm_adder2", "BFM ADDER2") -bfm_adder2_device::bfm_adder2_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +bfm_adder2_device::bfm_adder2_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, BFM_ADDER2, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo, "palette") , m_cpu(*this, "cpu") diff --git a/src/mame/bfm/bfm_adr2.h b/src/mame/bfm/bfm_adr2.h index 21cfaa67d96..34a68b10776 100644 --- a/src/mame/bfm/bfm_adr2.h +++ b/src/mame/bfm/bfm_adr2.h @@ -12,7 +12,7 @@ class bfm_adder2_device : public device_t, public device_gfx_interface { public: // construction/destruction - bfm_adder2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bfm_adder2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void vid_uart_tx_w(uint8_t data); void vid_uart_ctrl_w(uint8_t data); diff --git a/src/mame/bfm/bfm_bd1.cpp b/src/mame/bfm/bfm_bd1.cpp index 3d593c4b871..bcbc64fe4d9 100644 --- a/src/mame/bfm/bfm_bd1.cpp +++ b/src/mame/bfm/bfm_bd1.cpp @@ -103,7 +103,7 @@ static const uint16_t BD1charset[]= 0x4406, // 0100 0100 0000 0110 ? }; -bfm_bd1_device::bfm_bd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bfm_bd1_device::bfm_bd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BFM_BD1, tag, owner, clock) , m_outputs() , m_port_val(0) diff --git a/src/mame/bfm/bfm_bd1.h b/src/mame/bfm/bfm_bd1.h index 9c3b520d915..bc428ea632d 100644 --- a/src/mame/bfm/bfm_bd1.h +++ b/src/mame/bfm/bfm_bd1.h @@ -9,13 +9,13 @@ class bfm_bd1_device : public device_t { public: - bfm_bd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint8_t port_val) + bfm_bd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint8_t port_val) : bfm_bd1_device(mconfig, tag, owner, clock) { set_port_val(port_val); } - bfm_bd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bfm_bd1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void set_port_val(uint8_t val) { m_port_val = val; } diff --git a/src/mame/bfm/bfm_bda.cpp b/src/mame/bfm/bfm_bda.cpp index 1ff2d67b967..0ad22101be1 100644 --- a/src/mame/bfm/bfm_bda.cpp +++ b/src/mame/bfm/bfm_bda.cpp @@ -83,7 +83,7 @@ static const uint16_t BDAcharset[]= 0x4406, // 0100 0100 0000 0110 ? }; -bfm_bda_device::bfm_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bfm_bda_device::bfm_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BFM_BDA, tag, owner, clock) , m_outputs() , m_port_val(0) diff --git a/src/mame/bfm/bfm_bda.h b/src/mame/bfm/bfm_bda.h index f937c5a8709..9f9a7ad99b1 100644 --- a/src/mame/bfm/bfm_bda.h +++ b/src/mame/bfm/bfm_bda.h @@ -9,13 +9,13 @@ class bfm_bda_device : public device_t { public: - bfm_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint8_t port_val) + bfm_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint8_t port_val) : bfm_bda_device(mconfig, tag, owner, clock) { set_port_val(port_val); } - bfm_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bfm_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void set_port_val(uint8_t val) { m_port_val = val; } diff --git a/src/mame/bfm/bfm_dm01.cpp b/src/mame/bfm/bfm_dm01.cpp index a37eb7ab50b..473429f5408 100644 --- a/src/mame/bfm/bfm_dm01.cpp +++ b/src/mame/bfm/bfm_dm01.cpp @@ -57,7 +57,7 @@ Standard dm01 memorymap DEFINE_DEVICE_TYPE(BFM_DM01, bfm_dm01_device, "bfm_dm01", "BFM Dotmatrix 01") -bfm_dm01_device::bfm_dm01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bfm_dm01_device::bfm_dm01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BFM_DM01, tag, owner, clock), m_matrixcpu(*this, "matrix"), m_data_avail(0), @@ -268,7 +268,7 @@ INTERRUPT_GEN_MEMBER( bfm_dm01_device::nmi_line_assert ) void bfm_dm01_device::device_add_mconfig(machine_config &config) { - MC6809(config, m_matrixcpu, 8000000); // MC68B09CP (clock unknown) + MC6809(config, m_matrixcpu, XTAL::u(8000000)); // MC68B09CP (clock unknown) m_matrixcpu->set_addrmap(AS_PROGRAM, &bfm_dm01_device::bfm_dm01_memmap); m_matrixcpu->set_periodic_int(FUNC(bfm_dm01_device::nmi_line_assert), attotime::from_hz(1500)); /* generate 1500 NMI's per second ?? what is the exact freq?? */ } diff --git a/src/mame/bfm/bfm_dm01.h b/src/mame/bfm/bfm_dm01.h index 9bb459ea5df..395d1eedad0 100644 --- a/src/mame/bfm/bfm_dm01.h +++ b/src/mame/bfm/bfm_dm01.h @@ -16,7 +16,7 @@ class bfm_dm01_device : public device_t { public: - bfm_dm01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bfm_dm01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto busy_callback() { return m_busy_cb.bind(); } diff --git a/src/mame/bfm/bfm_sc1.cpp b/src/mame/bfm/bfm_sc1.cpp index 998e642cfac..5b914cb5ea4 100644 --- a/src/mame/bfm/bfm_sc1.cpp +++ b/src/mame/bfm/bfm_sc1.cpp @@ -1088,7 +1088,7 @@ void bfm_sc1_state::scorpion1(machine_config &config) WATCHDOG_TIMER(config, "watchdog").set_time(PERIOD_OF_555_MONOSTABLE(120000,100e-9)); - BFM_BD1(config, m_vfd0, 60, 0); + BFM_BD1(config, m_vfd0, XTAL::u(60), 0); SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch"); AY8912(config, "aysnd", MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 0.25); @@ -1109,7 +1109,7 @@ void bfm_sc1_state::scorpion1(machine_config &config) REEL(config, m_reels[5], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4); m_reels[5]->optic_handler().set(FUNC(bfm_sc1_state::reel_optic_cb<5>)); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); } ///////////////////////////////////////////////////////////////////////////////////// @@ -1124,7 +1124,7 @@ void bfm_sc1_state::scorpion1_adder2(machine_config &config) config.set_default_layout(layout_sc1_vid); - BFM_ADDER2(config, "adder2", 0); + BFM_ADDER2(config, "adder2"); } ///////////////////////////////////////////////////////////////////////////////////// diff --git a/src/mame/bfm/bfm_sc2.cpp b/src/mame/bfm/bfm_sc2.cpp index 214af05eacd..013d67d2d1d 100644 --- a/src/mame/bfm/bfm_sc2.cpp +++ b/src/mame/bfm/bfm_sc2.cpp @@ -2240,17 +2240,17 @@ INPUT_PORTS_END void bfm_sc2_state::_3meters(machine_config &config) { - METERS(config, m_meters, 0).set_number(3); + METERS(config, m_meters).set_number(3); } void bfm_sc2_state::_5meters(machine_config &config) { - METERS(config, m_meters, 0).set_number(5); + METERS(config, m_meters).set_number(5); } void bfm_sc2_state::_8meters(machine_config &config) { - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); } /////////////////////////////////////////////////////////////////////////// @@ -2276,14 +2276,14 @@ void bfm_sc2_vid_state::scorpion2_vid(machine_config &config) WATCHDOG_TIMER(config, "watchdog").set_time(PERIOD_OF_555_MONOSTABLE(120000,100e-9)); - BFM_BD1(config, m_vfd0, 60, 0); - BFM_BD1(config, m_vfd1, 60, 1); + BFM_BD1(config, m_vfd0, XTAL::u(60), 0); + BFM_BD1(config, m_vfd1, XTAL::u(60), 1); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); NVRAM(config, "e2ram").set_custom_handler(FUNC(bfm_sc2_vid_state::e2ram_init)); config.set_default_layout(layout_sc2_vid); - BFM_ADDER2(config, "adder2", 0); + BFM_ADDER2(config, "adder2"); SPEAKER(config, "mono").front_center(); UPD7759(config, m_upd7759).add_route(ALL_OUTPUTS, "mono", 0.50); @@ -3745,8 +3745,8 @@ void bfm_sc2_awp_state::scorpion2(machine_config &config) WATCHDOG_TIMER(config, "watchdog").set_time(PERIOD_OF_555_MONOSTABLE(120000,100e-9)); - BFM_BD1(config, m_vfd0, 60, 0); - BFM_BD1(config, m_vfd1, 60, 1); + BFM_BD1(config, m_vfd0, XTAL::u(60), 0); + BFM_BD1(config, m_vfd1, XTAL::u(60), 1); SPEAKER(config, "mono").front_center(); UPD7759(config, m_upd7759).add_route(ALL_OUTPUTS, "mono", 0.50); @@ -3815,7 +3815,7 @@ void bfm_sc2_dmd_state::scorpion2_dm01(machine_config &config) /* video hardware */ config.set_default_layout(layout_sc2_dmd); - BFM_DM01(config, m_dm01, 0); + BFM_DM01(config, m_dm01); m_dm01->busy_callback().set(FUNC(bfm_sc2_dmd_state::bfmdm01_busy)); REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4); diff --git a/src/mame/bfm/bfm_sc4.cpp b/src/mame/bfm/bfm_sc4.cpp index 83df93c11eb..69fa39b70c0 100644 --- a/src/mame/bfm/bfm_sc4.cpp +++ b/src/mame/bfm/bfm_sc4.cpp @@ -890,7 +890,7 @@ WRITE_LINE_MEMBER(sc4_state::bfmdm01_busy) void sc4_state::sc4_common(machine_config &config) { - M68307(config, m_maincpu, 16000000); // 68307! (EC000 core) + M68307(config, m_maincpu, XTAL::u(16000000)); // 68307! (EC000 core) m_maincpu->set_addrmap(AS_PROGRAM, &sc4_state::sc4_map); m_maincpu->serial_a_tx_callback().set(FUNC(sc4_state::m68307_duart_txa)); m_maincpu->serial_inport_callback().set(FUNC(sc4_state::m68307_duart_input_r)); @@ -901,18 +901,18 @@ void sc4_state::sc4_common(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - MC68681(config, m_duart, 16000000/4); // ?? Mhz - m_duart->set_clocks(XTAL(16'000'000)/2/8, XTAL(16'000'000)/2/16, XTAL(16'000'000)/2/16, XTAL(16'000'000)/2/8); + MC68681(config, m_duart, XTAL::u(16000000)/4); // ?? Mhz + m_duart->set_clocks(XTAL::u(16'000'000)/2/8, XTAL::u(16'000'000)/2/16, XTAL::u(16'000'000)/2/16, XTAL::u(16'000'000)/2/8); m_duart->irq_cb().set(FUNC(sc4_state::bfm_sc4_duart_irq_handler)); m_duart->a_tx_cb().set(FUNC(sc4_state::bfm_sc4_duart_txa)); m_duart->inport_cb().set(FUNC(sc4_state::bfm_sc4_duart_input_r)); m_duart->outport_cb().set(FUNC(sc4_state::bfm_sc4_duart_output_w)); - BFM_BDA(config, m_vfd0, 60, 0); + BFM_BDA(config, m_vfd0, XTAL::u(60), 0); // config.set_default_layout(layout_bfm_sc4); - YMZ280B(config, m_ymz, 16000000); // ?? Mhz + YMZ280B(config, m_ymz, XTAL::u(16000000)); // ?? Mhz m_ymz->add_route(ALL_OUTPUTS, "mono", 1.0); SEC(config, m_sec); @@ -1275,7 +1275,7 @@ void sc4_adder4_state::sc4_adder4(machine_config &config) { sc4_common(config); - M68340(config, m_adder4cpu, 25175000); // 68340 (CPU32 core) + M68340(config, m_adder4cpu, XTAL::u(25175000)); // 68340 (CPU32 core) m_adder4cpu->set_addrmap(AS_PROGRAM, &sc4_adder4_state::sc4_adder4_map); } @@ -1285,7 +1285,7 @@ void sc4_state::sc4dmd(machine_config &config) /* video hardware */ //config.set_default_layout(layout_sc4_dmd); - BFM_DM01(config, m_dm01, 0); + BFM_DM01(config, m_dm01); m_dm01->busy_callback().set(FUNC(sc4_state::bfmdm01_busy)); REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); diff --git a/src/mame/bfm/bfm_sc5.cpp b/src/mame/bfm/bfm_sc5.cpp index 4e696e3e4aa..06698e21c50 100644 --- a/src/mame/bfm/bfm_sc5.cpp +++ b/src/mame/bfm/bfm_sc5.cpp @@ -337,24 +337,24 @@ void bfm_sc5_state::bfm_sc5_duart_output_w(uint8_t data) void bfm_sc5_state::bfm_sc5(machine_config &config) { - MCF5206E(config, m_maincpu, 40000000); /* MCF5206eFT */ + MCF5206E(config, m_maincpu, XTAL::u(40000000)); /* MCF5206eFT */ m_maincpu->set_addrmap(AS_PROGRAM, &bfm_sc5_state::sc5_map); - MCF5206E_PERIPHERAL(config, "maincpu_onboard", 0, m_maincpu); + MCF5206E_PERIPHERAL(config, "maincpu_onboard", m_maincpu); /* sound hardware */ SPEAKER(config, "mono").front_center(); - MC68681(config, m_duart, 16000000/4); // ?? Mhz - m_duart->set_clocks(16000000/2/8, 16000000/2/16, 16000000/2/16, 16000000/2/8); + MC68681(config, m_duart, XTAL::u(16000000)/4); // ?? Mhz + m_duart->set_clocks(XTAL::u(16000000)/2/8, XTAL::u(16000000)/2/16, XTAL::u(16000000)/2/16, XTAL::u(16000000)/2/8); m_duart->irq_cb().set(FUNC(bfm_sc5_state::bfm_sc5_duart_irq_handler)); m_duart->a_tx_cb().set(FUNC(bfm_sc5_state::bfm_sc5_duart_txa)); m_duart->inport_cb().set(FUNC(bfm_sc5_state::bfm_sc5_duart_input_r)); m_duart->outport_cb().set(FUNC(bfm_sc5_state::bfm_sc5_duart_output_w)); - BFM_BDA(config, m_vfd0, 60, 0); + BFM_BDA(config, m_vfd0, XTAL::u(60), 0); config.set_default_layout(layout_bfm_sc5); - YMZ280B(config, m_ymz, 16000000); // ?? Mhz + YMZ280B(config, m_ymz, XTAL::u(16000000)); // ?? Mhz m_ymz->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/bfm/bfm_swp.cpp b/src/mame/bfm/bfm_swp.cpp index 9205d6ea68b..4c7411bbfd0 100644 --- a/src/mame/bfm/bfm_swp.cpp +++ b/src/mame/bfm/bfm_swp.cpp @@ -195,7 +195,7 @@ void bfm_swp_state::machine_start() void bfm_swp_state::bfm_swp(machine_config &config) { /* basic machine hardware */ - M68340(config, m_maincpu, 16000000); + M68340(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &bfm_swp_state::bfm_swp_map); @@ -208,7 +208,7 @@ void bfm_swp_state::bfm_swp(machine_config &config) SPEAKER(config, "mono").front_center(); - YMZ280B(config, "ymz", 10000000).add_route(ALL_OUTPUTS, "mono", 1.0); + YMZ280B(config, "ymz", XTAL::u(10000000)).add_route(ALL_OUTPUTS, "mono", 1.0); } ROM_START( c3_rtime ) diff --git a/src/mame/bfm/bfmsys83.cpp b/src/mame/bfm/bfmsys83.cpp index a5b654979d6..1fb2ba11f4f 100644 --- a/src/mame/bfm/bfmsys83.cpp +++ b/src/mame/bfm/bfmsys83.cpp @@ -36,11 +36,11 @@ INPUT_PORTS_END void bfmsys83_state::bfmsys83(machine_config &config) { - M6802(config, m_maincpu, 40000000/4); + M6802(config, m_maincpu, XTAL::u(40000000)/4); m_maincpu->set_addrmap(AS_PROGRAM, &bfmsys83_state::memmap); SPEAKER(config, "mono").front_center(); - AY8912(config, "aysnd", 40000000/4).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8912(config, "aysnd", XTAL::u(40000000)/4).add_route(ALL_OUTPUTS, "mono", 0.25); } /* diff --git a/src/mame/bfm/bfmsys85.cpp b/src/mame/bfm/bfmsys85.cpp index d9af14ad13a..8eeefcabd34 100644 --- a/src/mame/bfm/bfmsys85.cpp +++ b/src/mame/bfm/bfmsys85.cpp @@ -414,10 +414,10 @@ void bfmsys85_state::bfmsys85(machine_config &config) MSC1937(config, m_vfd); - ACIA6850(config, m_acia6850_0, 0); + ACIA6850(config, m_acia6850_0); m_acia6850_0->txd_handler().set(FUNC(bfmsys85_state::sys85_data_w)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 31250*16)); // What are the correct ACIA clocks ? + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(31250*16))); // What are the correct ACIA clocks ? acia_clock.signal_handler().set(FUNC(bfmsys85_state::write_acia_clock)); SPEAKER(config, "mono").front_center(); @@ -434,7 +434,7 @@ void bfmsys85_state::bfmsys85(machine_config &config) REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4); m_reel[3]->optic_handler().set(FUNC(bfmsys85_state::reel_optic_cb<3>)); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); config.set_default_layout(layout_bfmsys85); } diff --git a/src/mame/bfm/rastersp.cpp b/src/mame/bfm/rastersp.cpp index d412f6d3bd3..cbde2726a8e 100644 --- a/src/mame/bfm/rastersp.cpp +++ b/src/mame/bfm/rastersp.cpp @@ -1434,7 +1434,7 @@ void rastersp_state::ncr53c700_config(device_t *device) { auto *state = device->subdevice(":"); ncr53c7xx_device &scsictrl = downcast(*device); - scsictrl.set_clock(66'000'000); + scsictrl.set_clock(XTAL::u(66'000'000)); scsictrl.irq_handler().set(*state, FUNC(rastersp_state::scsi_irq)); scsictrl.host_read().set(*state, FUNC(rastersp_state::ncr53c700_read)); scsictrl.host_write().set(*state, FUNC(rastersp_state::ncr53c700_write)); @@ -1442,22 +1442,22 @@ void rastersp_state::ncr53c700_config(device_t *device) void rastersp_state::rs_config_base(machine_config &config) { - I486(config, m_maincpu, 33'330'000); + I486(config, m_maincpu, XTAL::u(33'330'000)); m_maincpu->set_irq_acknowledge_callback(FUNC(rastersp_state::irq_callback)); m_maincpu->set_addrmap(AS_IO, &rastersp_state::io_map); - TMS32031(config, m_dsp, 33'330'000); + TMS32031(config, m_dsp, XTAL::u(33'330'000)); m_dsp->set_mcbl_mode(true); // Boot-loader mode MC146818(config, "rtc", 32.768_kHz_XTAL); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - NSCSI_BUS(config, "scsibus", 0); + NSCSI_BUS(config, "scsibus"); WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_seconds(1)); - nscsi_connector &connector7(NSCSI_CONNECTOR(config, "scsibus:7", 0)); + nscsi_connector &connector7(NSCSI_CONNECTOR(config, "scsibus:7")); connector7.option_add("harddisk", NSCSI_HARDDISK); connector7.option_add_internal("ncr53c700", NCR53C7XX); connector7.set_default_option("ncr53c700"); @@ -1480,13 +1480,13 @@ void rastersp_state::rs_config_base(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac, 0); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac, 0); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac); m_ldac->add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC m_rdac->add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC - SCC85C30(config, m_duart, 8'000'000); - m_duart->configure_channels(1'843'200, 0, 1'843'200, 0); + SCC85C30(config, m_duart, XTAL::u(8'000'000)); + m_duart->configure_channels(XTAL::u(1'843'200), XTAL(), XTAL::u(1'843'200), XTAL()); m_duart->out_int_callback().set(FUNC(rastersp_state::duart_irq)); } @@ -1503,7 +1503,7 @@ void rastersp_state::rastersp(machine_config &config) m_dsp->set_addrmap(AS_PROGRAM, &rastersp_state::dsp_map); - nscsi_connector &connector0(NSCSI_CONNECTOR(config, "scsibus:0", 0)); + nscsi_connector &connector0(NSCSI_CONNECTOR(config, "scsibus:0")); connector0.option_add("harddisk", NSCSI_HARDDISK); connector0.option_add_internal("ncr53c700", NCR53C7XX); connector0.set_default_option("harddisk"); @@ -1518,13 +1518,13 @@ void fbcrazy_state::fbcrazy(machine_config &config) m_dsp->set_addrmap(AS_PROGRAM, &fbcrazy_state::dsp_map); - nscsi_connector &connector3(NSCSI_CONNECTOR(config, "scsibus:3", 0)); + nscsi_connector &connector3(NSCSI_CONNECTOR(config, "scsibus:3")); connector3.option_add("cdrom", NSCSI_CDROM); connector3.option_add_internal("ncr53c700", NCR53C7XX); connector3.set_default_option("cdrom"); connector3.set_fixed(true); - bacta_datalogger_device &bacta(BACTA_DATALOGGER(config, "bacta", 0)); + bacta_datalogger_device &bacta(BACTA_DATALOGGER(config, "bacta")); m_duart->out_txda_callback().set("bacta", FUNC(bacta_datalogger_device::write_txd)); bacta.rxd_handler().set(m_duart, FUNC(z80scc_device::rxa_w)); diff --git a/src/mame/bitcorp/gamate.cpp b/src/mame/bitcorp/gamate.cpp index 5218223f293..ea7f044eb0f 100644 --- a/src/mame/bitcorp/gamate.cpp +++ b/src/mame/bitcorp/gamate.cpp @@ -182,15 +182,15 @@ TIMER_CALLBACK_MEMBER(gamate_state::gamate_timer2) void gamate_state::gamate(machine_config &config) { - M6502(config, m_maincpu, 4433000/2); // NCR 65CX02 + M6502(config, m_maincpu, XTAL::u(4433000)/2); // NCR 65CX02 m_maincpu->set_addrmap(AS_PROGRAM, &gamate_state::gamate_mem); - GAMATE_VIDEO(config, "video", 0); + GAMATE_VIDEO(config, "video"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); // Stereo headphone output SPEAKER(config, "rspeaker").front_right(); - AY8910(config, m_ay, 4433000 / 4); // AY compatible, no actual AY chip present + AY8910(config, m_ay, XTAL::u(4433000) / 4); // AY compatible, no actual AY chip present m_ay->add_route(0, "lspeaker", 0.5); m_ay->add_route(1, "rspeaker", 0.5); m_ay->add_route(2, "lspeaker", 0.25); diff --git a/src/mame/bitcorp/gamate_v.cpp b/src/mame/bitcorp/gamate_v.cpp index 0107c42c9a2..12fd71c16ec 100644 --- a/src/mame/bitcorp/gamate_v.cpp +++ b/src/mame/bitcorp/gamate_v.cpp @@ -46,7 +46,7 @@ void gamate_video_device::vram_map(address_map &map) map(0x0000, 0x3fff).ram().share("vram"); // 2x 8KB SRAMs } -gamate_video_device::gamate_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gamate_video_device::gamate_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAMATE_VIDEO, tag, owner, clock), device_memory_interface(mconfig, *this), m_vram_space_config("vramspace", ENDIANNESS_BIG, 8, 14, 0, address_map_constructor(FUNC(gamate_video_device::vram_map), this)), diff --git a/src/mame/bitcorp/gamate_v.h b/src/mame/bitcorp/gamate_v.h index b3d593165e6..c5297bacbb7 100644 --- a/src/mame/bitcorp/gamate_v.h +++ b/src/mame/bitcorp/gamate_v.h @@ -15,7 +15,7 @@ class gamate_video_device : public device_t, { public: // construction/destruction - gamate_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamate_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void lcdcon_w(uint8_t data); void xscroll_w(uint8_t data); diff --git a/src/mame/bmc/bmcbowl.cpp b/src/mame/bmc/bmcbowl.cpp index 55d1de7bed4..18955163025 100644 --- a/src/mame/bmc/bmcbowl.cpp +++ b/src/mame/bmc/bmcbowl.cpp @@ -476,7 +476,7 @@ void bmcbowl_state::bmcbowl(machine_config &config) screen.screen_vblank().append("via6522_0", FUNC(via6522_device::write_cb1)); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &bmcbowl_state::ramdac_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); @@ -494,7 +494,7 @@ void bmcbowl_state::bmcbowl(machine_config &config) aysnd.add_route(ALL_OUTPUTS, "lspeaker", 0.50); aysnd.add_route(ALL_OUTPUTS, "rspeaker", 0.50); - okim6295_device &oki(OKIM6295(config, "oki", 1122000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1122000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50); diff --git a/src/mame/bmc/bmcpokr.cpp b/src/mame/bmc/bmcpokr.cpp index ee027673297..d719d335664 100644 --- a/src/mame/bmc/bmcpokr.cpp +++ b/src/mame/bmc/bmcpokr.cpp @@ -799,7 +799,7 @@ void bmcpokr_state::bmcpokr(machine_config &config) M68000(config, m_maincpu, XTAL(42'000'000) / 4); // 68000 @10.50MHz (42/4) m_maincpu->set_addrmap(AS_PROGRAM, &bmcpokr_state::bmcpokr_mem); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(bmcpokr_state::interrupt), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(bmcpokr_state::interrupt), "screen", 0, 1); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh(HZ_TO_ATTOSECONDS(58.935)); // HSync - 15.440kHz, VSync - 58.935Hz @@ -811,14 +811,14 @@ void bmcpokr_state::bmcpokr(machine_config &config) PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &bmcpokr_state::ramdac_map); GFXDECODE(config, m_gfxdecode, m_palette, gfx_bmcpokr); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - TICKET_DISPENSER(config, m_hopper, 0); + TICKET_DISPENSER(config, m_hopper); m_hopper->set_period(attotime::from_msec(10)); m_hopper->set_senses(TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW, false); // hopper stuck low if too slow diff --git a/src/mame/bmc/koftball.cpp b/src/mame/bmc/koftball.cpp index 4a03cda0ef3..b476af9d045 100644 --- a/src/mame/bmc/koftball.cpp +++ b/src/mame/bmc/koftball.cpp @@ -242,7 +242,7 @@ void koftball_state::koftball(machine_config &config) screen.set_palette(m_palette); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &koftball_state::ramdac_map); GFXDECODE(config, m_gfxdecode, m_palette, gfx_koftball); @@ -254,7 +254,7 @@ void koftball_state::koftball(machine_config &config) ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 0.50); ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 0.50); - okim6295_device &oki(OKIM6295(config, "oki", 1122000, okim6295_device::PIN7_LOW)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1122000), okim6295_device::PIN7_LOW)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50); } diff --git a/src/mame/bondwell/bw12.cpp b/src/mame/bondwell/bw12.cpp index be39a356ad7..57518d20fe2 100644 --- a/src/mame/bondwell/bw12.cpp +++ b/src/mame/bondwell/bw12.cpp @@ -544,13 +544,13 @@ void bw12_state::common(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.125); // ls273.ic5 + mc1408.ic4 + MC1408(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.125); // ls273.ic5 + mc1408.ic4 /* devices */ TIMER(config, FLOPPY_TIMER_TAG).configure_generic(FUNC(bw12_state::floppy_motor_off_tick)); UPD765A(config, m_fdc, 16_MHz_XTAL / 4, false, true); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(bw12_state::pia_pa_r)); m_pia->writepb_handler().set("cent_data_out", FUNC(output_latch_device::write)); m_pia->ca2_handler().set(CENTRONICS_TAG, FUNC(centronics_device::write_strobe)); @@ -578,7 +578,7 @@ void bw12_state::common(machine_config &config) m_pit->set_clk<2>(1.8432_MHz_XTAL); m_pit->out_handler<2>().set(FUNC(bw12_state::pit_out2_w)); - AY3600(config, m_kbc, 0); + AY3600(config, m_kbc); m_kbc->x0().set_ioport("X0"); m_kbc->x1().set_ioport("X1"); m_kbc->x2().set_ioport("X2"); diff --git a/src/mame/bondwell/bw2.cpp b/src/mame/bondwell/bw2.cpp index 14f38fc75b7..2a57abdb89c 100644 --- a/src/mame/bondwell/bw2.cpp +++ b/src/mame/bondwell/bw2.cpp @@ -562,7 +562,7 @@ void bw2_state::bw2(machine_config &config) PALETTE(config, "palette", FUNC(bw2_state::bw2_palette), 2); // devices - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(16_MHz_XTAL / 4); // 8251 USART TXC, RXC m_pit->out_handler<0>().set(m_uart, FUNC(i8251_device::write_txc)); m_pit->out_handler<0>().append(m_uart, FUNC(i8251_device::write_rxc)); @@ -587,7 +587,7 @@ void bw2_state::bw2(machine_config &config) output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(latch); - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); m_uart->dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); m_uart->rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/booth/apexc.cpp b/src/mame/booth/apexc.cpp index c00b8c48a72..78e653f0a7d 100644 --- a/src/mame/booth/apexc.cpp +++ b/src/mame/booth/apexc.cpp @@ -353,7 +353,7 @@ void apexc_state::apexc(machine_config &config) { /* basic machine hardware */ /* APEXC CPU @ 2.0 kHz (memory word clock frequency) */ - APEXC(config, m_maincpu, 2000); + APEXC(config, m_maincpu, XTAL::u(2000)); m_maincpu->set_addrmap(AS_PROGRAM, &apexc_state::mem); m_maincpu->tape_read().set(m_tape_reader, FUNC(apexc_tape_reader_image_device::read)); m_maincpu->tape_punch().set(FUNC(apexc_state::tape_write)); diff --git a/src/mame/booth/apexc_m.cpp b/src/mame/booth/apexc_m.cpp index 6c7c23fb42b..ae285d9bae2 100644 --- a/src/mame/booth/apexc_m.cpp +++ b/src/mame/booth/apexc_m.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(APEXC_CYLINDER, apexc_cylinder_image_device, "apexc_cylinder_ DEFINE_DEVICE_TYPE(APEXC_TAPE_PUNCHER, apexc_tape_puncher_image_device, "apexc_tape_puncher_image", "APEXC Tape Puncher") DEFINE_DEVICE_TYPE(APEXC_TAPE_READER, apexc_tape_reader_image_device, "apexc_tape_reader_image", "APEXC Tape Reader") -apexc_cylinder_image_device::apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apexc_cylinder_image_device::apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APEXC_CYLINDER, tag, owner, clock) , device_image_interface(mconfig, *this) { @@ -65,7 +65,7 @@ void apexc_cylinder_image_device::call_unload() } -apexc_tape_puncher_image_device::apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apexc_tape_puncher_image_device::apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_punch_device(mconfig, APEXC_TAPE_PUNCHER, tag, owner, clock) { } @@ -83,7 +83,7 @@ void apexc_tape_puncher_image_device::write(uint8_t data) } } -apexc_tape_reader_image_device::apexc_tape_reader_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apexc_tape_reader_image_device::apexc_tape_reader_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_reader_device(mconfig, APEXC_TAPE_READER, tag, owner, clock) { } diff --git a/src/mame/booth/apexc_m.h b/src/mame/booth/apexc_m.h index 24e3e3215c9..b2cfc620c70 100644 --- a/src/mame/booth/apexc_m.h +++ b/src/mame/booth/apexc_m.h @@ -32,7 +32,7 @@ class apexc_cylinder_image_device : public device_t, public device_image_interfa { public: // construction/destruction - apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + apexc_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // image-level overrides virtual bool is_readable() const noexcept override { return true; } @@ -103,7 +103,7 @@ class apexc_tape_puncher_image_device : public paper_tape_punch_device { public: // construction/destruction - apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + apexc_tape_puncher_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // image-level overrides virtual const char *file_extensions() const noexcept override { return "tap"; } @@ -118,12 +118,7 @@ class apexc_tape_reader_image_device : public paper_tape_reader_device { public: // construction/destruction - apexc_tape_reader_image_device(const machine_config &mconfig, const char *tag, device_t *owner) - : apexc_tape_reader_image_device(mconfig, tag, owner, (uint32_t)0) - { - } - - apexc_tape_reader_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apexc_tape_reader_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // image-level overrides virtual const char *file_extensions() const noexcept override { return "tap"; } diff --git a/src/mame/camputers/camplynx.cpp b/src/mame/camputers/camplynx.cpp index f179beb7354..e1ffd4fa892 100644 --- a/src/mame/camputers/camplynx.cpp +++ b/src/mame/camputers/camplynx.cpp @@ -863,7 +863,7 @@ void camplynx_state::lynx_common(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_6BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.375); // unknown DAC + DAC_6BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.375); // unknown DAC } void camplynx_state::lynx_disk(machine_config &config) diff --git a/src/mame/canon/x07.cpp b/src/mame/canon/x07.cpp index c8ef2b404a7..1a35b1e0ac6 100644 --- a/src/mame/canon/x07.cpp +++ b/src/mame/canon/x07.cpp @@ -1500,10 +1500,10 @@ void x07_state::x07(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 0).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper").add_route(ALL_OUTPUTS, "mono", 0.50); /* printer */ - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); TIMER(config, "blink_timer").configure_periodic(FUNC(x07_state::blink_timer), attotime::from_msec(300)); diff --git a/src/mame/capcom/bionicc.cpp b/src/mame/capcom/bionicc.cpp index fb2af5b2ee7..4b8eb1bc603 100644 --- a/src/mame/capcom/bionicc.cpp +++ b/src/mame/capcom/bionicc.cpp @@ -663,7 +663,7 @@ void bionicc_state::bionicc(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_bionicc); - TIGEROAD_SPRITE(config, m_spritegen, 0); + TIGEROAD_SPRITE(config, m_spritegen); m_spritegen->set_palette(m_palette); m_spritegen->set_color_base(512); /* colors 512- 767 */ diff --git a/src/mame/capcom/cbasebal.cpp b/src/mame/capcom/cbasebal.cpp index c3c323efe0d..79cd0f4ae70 100644 --- a/src/mame/capcom/cbasebal.cpp +++ b/src/mame/capcom/cbasebal.cpp @@ -462,7 +462,7 @@ void cbasebal_state::machine_reset() void cbasebal_state::cbasebal(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 6000000); // ??? + Z80(config, m_maincpu, XTAL::u(6000000)); // ??? m_maincpu->set_addrmap(AS_PROGRAM, &cbasebal_state::prg_map); m_maincpu->set_addrmap(AS_IO, &cbasebal_state::port_map); m_maincpu->set_addrmap(AS_OPCODES, &cbasebal_state::decrypted_opcodes_map); @@ -487,9 +487,9 @@ void cbasebal_state::cbasebal(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified - YM2413(config, "ymsnd", 3579545).add_route(ALL_OUTPUTS, "mono", 1.0); + YM2413(config, "ymsnd", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/capcom/commando.cpp b/src/mame/capcom/commando.cpp index 5f11831d9c9..342611f5fc5 100644 --- a/src/mame/capcom/commando.cpp +++ b/src/mame/capcom/commando.cpp @@ -342,7 +342,7 @@ GFXDECODE_END /* Sound Interface */ -#define XTAL 12000000 +#define XTAL XTAL::u(12000000) #define PHI_B XTAL/2/2 #define PHI_MAIN XTAL/2/2 // As seen in the schematics: // the signal goes into a bus arbitrion logic that doesn't affect its frequency diff --git a/src/mame/capcom/cps1.cpp b/src/mame/capcom/cps1.cpp index 626cd6aa653..b3c13dd2875 100644 --- a/src/mame/capcom/cps1.cpp +++ b/src/mame/capcom/cps1.cpp @@ -3765,7 +3765,7 @@ void cps_state::ganbare(machine_config &config) /* basic machine hardware */ TIMER(config, "scantimer").configure_scanline(FUNC(cps_state::ganbare_interrupt), "screen", 0, 1); // need to investigate more - M48T35(config, m_m48t35, 0); + M48T35(config, m_m48t35); } void cps_state::qsound(machine_config &config) diff --git a/src/mame/capcom/cps1bl_5205.cpp b/src/mame/capcom/cps1bl_5205.cpp index 507f11002c7..ae5b83c611c 100644 --- a/src/mame/capcom/cps1bl_5205.cpp +++ b/src/mame/capcom/cps1bl_5205.cpp @@ -350,12 +350,12 @@ void cps1bl_5205_state::sf2mdta_layer_w(offs_t offset, uint16_t data) void cps1bl_5205_state::captcommb2(machine_config &config) { // xtals: 30MHz, 24MHz, 400KHz - M68000(config, m_maincpu, 24000000 / 2); // 12MHz measured on pcb + M68000(config, m_maincpu, XTAL(24000000) / 2); // 12MHz measured on pcb m_maincpu->set_addrmap(AS_PROGRAM, &cps1bl_5205_state::captcommb2_map); m_maincpu->set_vblank_int("screen", FUNC(cps1bl_5205_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps1bl_5205_state::cpu_space_map); - Z80(config, m_audiocpu, 30000000 / 8); // 3.75MHz measured on pcb + Z80(config, m_audiocpu, XTAL(30000000) / 8); // 3.75MHz measured on pcb m_audiocpu->set_addrmap(AS_PROGRAM, &cps1bl_5205_state::captcommb2_z80map); MCFG_MACHINE_START_OVERRIDE(cps1bl_5205_state, captcommb2) @@ -373,24 +373,24 @@ void cps1bl_5205_state::captcommb2(machine_config &config) SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, m_soundlatch); - ym2151_device &ym2151(YM2151(config, "2151", 30000000 / 8)); // 3.75MHz measured on pcb + ym2151_device &ym2151(YM2151(config, "2151", XTAL(30000000) / 8)); // 3.75MHz measured on pcb // IRQ pin not used ym2151.add_route(0, "mono", 0.35); ym2151.add_route(1, "mono", 0.35); - LS157(config, m_msm_mux[0], 0); + LS157(config, m_msm_mux[0]); m_msm_mux[0]->out_callback().set("msm1", FUNC(msm5205_device::data_w)); - LS157(config, m_msm_mux[1], 0); + LS157(config, m_msm_mux[1]); m_msm_mux[1]->out_callback().set("msm2", FUNC(msm5205_device::data_w)); - MSM5205(config, m_msm_1, 400000); // 400kHz measured on pcb + MSM5205(config, m_msm_1, XTAL(400000)); // 400kHz measured on pcb m_msm_1->vck_callback().set(FUNC(cps1bl_5205_state::captcommb2_mux_select_w)); m_msm_1->vck_callback().append(m_msm_2, FUNC(msm5205_device::vclk_w)); m_msm_1->set_prescaler_selector(msm5205_device::S96_4B); m_msm_1->add_route(ALL_OUTPUTS, "mono", 0.25); - MSM5205(config, m_msm_2, 400000); + MSM5205(config, m_msm_2, XTAL(400000)); m_msm_2->set_prescaler_selector(msm5205_device::SEX_4B); m_msm_2->add_route(ALL_OUTPUTS, "mono", 0.25); } @@ -411,11 +411,11 @@ void cps1bl_5205_state::sf2b(machine_config &config) void cps1bl_5205_state::sf2mdt(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &cps1bl_5205_state::sf2mdt_map); m_maincpu->set_vblank_int("screen", FUNC(cps1bl_5205_state::irq4_line_hold)); /* triggers the sprite ram and scroll writes */ - Z80(config, m_audiocpu, 3750000); + Z80(config, m_audiocpu, XTAL::u(3750000)); m_audiocpu->set_addrmap(AS_PROGRAM, &cps1bl_5205_state::captcommb2_z80map); MCFG_MACHINE_START_OVERRIDE(cps1bl_5205_state, sf2mdt) @@ -436,21 +436,21 @@ void cps1bl_5205_state::sf2mdt(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM2151(config, "2151", 3750000).add_route(0, "mono", 0.35).add_route(1, "mono", 0.35); + YM2151(config, "2151", XTAL::u(3750000)).add_route(0, "mono", 0.35).add_route(1, "mono", 0.35); - LS157(config, m_msm_mux[0], 0); + LS157(config, m_msm_mux[0]); m_msm_mux[0]->out_callback().set("msm1", FUNC(msm5205_device::data_w)); - LS157(config, m_msm_mux[1], 0); + LS157(config, m_msm_mux[1]); m_msm_mux[1]->out_callback().set("msm2", FUNC(msm5205_device::data_w)); - MSM5205(config, m_msm_1, 400000); // 400kHz ? + MSM5205(config, m_msm_1, XTAL::u(400000)); // 400kHz ? m_msm_1->vck_callback().set(FUNC(cps1bl_5205_state::captcommb2_mux_select_w)); m_msm_1->vck_callback().append(m_msm_2, FUNC(msm5205_device::vclk_w)); m_msm_1->set_prescaler_selector(msm5205_device::S96_4B); m_msm_1->add_route(ALL_OUTPUTS, "mono", 0.25); - MSM5205(config, m_msm_2, 400000); + MSM5205(config, m_msm_2, XTAL::u(400000)); m_msm_2->set_prescaler_selector(msm5205_device::SEX_4B); m_msm_2->add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/capcom/cps1bl_pic.cpp b/src/mame/capcom/cps1bl_pic.cpp index d6ece77ad21..9be14918495 100644 --- a/src/mame/capcom/cps1bl_pic.cpp +++ b/src/mame/capcom/cps1bl_pic.cpp @@ -398,12 +398,12 @@ void wofpic_state::wofpic_spr_base_w(uint16_t data) void dinopic_state::dinopic(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dinopic_state::dinopic_map); m_maincpu->set_vblank_int("screen", FUNC(dinopic_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &dinopic_state::cpu_space_map); - //PIC16C57(config, m_audiocpu, 3750000).set_disable(); /* no valid dumps .. */ + //PIC16C57(config, m_audiocpu, XTAL::u(3750000)).set_disable(); /* no valid dumps .. */ MCFG_MACHINE_START_OVERRIDE(dinopic_state, dinopic) @@ -427,18 +427,18 @@ void dinopic_state::dinopic(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); } void cps1bl_pic_state::punipic(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &cps1bl_pic_state::punipic_map); m_maincpu->set_vblank_int("screen", FUNC(cps1bl_pic_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps1bl_pic_state::cpu_space_map); - //PIC16C57(config, m_audiocpu, 12000000).set_disable(); /* no valid dumps .. */ + //PIC16C57(config, m_audiocpu, XTAL::u(12000000)).set_disable(); /* no valid dumps .. */ MCFG_MACHINE_START_OVERRIDE(cps1bl_pic_state, punipic) @@ -462,18 +462,18 @@ void cps1bl_pic_state::punipic(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); } void cps1bl_pic_state::slampic(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &cps1bl_pic_state::slampic_map); m_maincpu->set_vblank_int("screen", FUNC(cps1bl_pic_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cps1bl_pic_state::cpu_space_map); - //PIC16C57(config, m_audiocpu, 12000000).set_disable(); /* no valid dumps .. */ + //PIC16C57(config, m_audiocpu, XTAL::u(12000000)).set_disable(); /* no valid dumps .. */ MCFG_MACHINE_START_OVERRIDE(cps1bl_pic_state, slampic) @@ -495,17 +495,17 @@ void cps1bl_pic_state::slampic(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); } void slampic2_state::slampic2(machine_config &config) { - M68000(config, m_maincpu, 10000000); // measured + M68000(config, m_maincpu, XTAL::u(10000000)); // measured m_maincpu->set_addrmap(AS_PROGRAM, &slampic2_state::slampic2_map); m_maincpu->set_vblank_int("screen", FUNC(slampic2_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &slampic2_state::cpu_space_map); - PIC16C57(config, m_audiocpu, 4000000); // measured + PIC16C57(config, m_audiocpu, XTAL::u(4000000)); // measured //m_audiocpu->set_disable(); MCFG_MACHINE_START_OVERRIDE(slampic2_state, slampic2) @@ -522,7 +522,7 @@ void slampic2_state::slampic2(machine_config &config) SPEAKER(config, "mono").front_center(); //GENERIC_LATCH_8(config, m_soundlatch); //GENERIC_LATCH_8(config, m_soundlatch2); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_LOW); // measured & pin 7 verified + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_LOW); // measured & pin 7 verified //m_oki->set_addrmap(0, &slampic2_state::slampic2_oki_map); m_oki->add_route(ALL_OUTPUTS, "mono", 0.80); } diff --git a/src/mame/capcom/cps2.cpp b/src/mame/capcom/cps2.cpp index fecc18716f2..2382fb7218e 100644 --- a/src/mame/capcom/cps2.cpp +++ b/src/mame/capcom/cps2.cpp @@ -1834,7 +1834,7 @@ void cps2_state::cps2comm(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &cps2_state::cps2_comm_map); - CAPCOM_CPS2_COMM(config, m_comm, 0U); + CAPCOM_CPS2_COMM(config, m_comm); } diff --git a/src/mame/capcom/cps2comm.cpp b/src/mame/capcom/cps2comm.cpp index 95701ef264d..a903373e151 100644 --- a/src/mame/capcom/cps2comm.cpp +++ b/src/mame/capcom/cps2comm.cpp @@ -556,7 +556,7 @@ private: DEFINE_DEVICE_TYPE(CAPCOM_CPS2_COMM, cps2_comm_device, "cps2comm", "Capcom CPS-2 communication board") -cps2_comm_device::cps2_comm_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +cps2_comm_device::cps2_comm_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CAPCOM_CPS2_COMM, tag, owner, clock), m_config(*this, "CFG") { diff --git a/src/mame/capcom/cps2comm.h b/src/mame/capcom/cps2comm.h index 97f4e017f4e..1f1581cd85d 100644 --- a/src/mame/capcom/cps2comm.h +++ b/src/mame/capcom/cps2comm.h @@ -11,7 +11,7 @@ class cps2_comm_device : public device_t { public: - cps2_comm_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + cps2_comm_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); u16 usart_data_r(offs_t offset, u16 mem_mask); u16 usart_status_r(offs_t offset, u16 mem_mask); diff --git a/src/mame/capcom/cps3.cpp b/src/mame/capcom/cps3.cpp index a8dafd55cba..b76f8bdfc81 100644 --- a/src/mame/capcom/cps3.cpp +++ b/src/mame/capcom/cps3.cpp @@ -2513,14 +2513,14 @@ void cps3_state::simm6_128mbit(machine_config &config) void cps3_state::cps3(machine_config &config) { /* basic machine hardware */ - SH2(config, m_maincpu, 6250000*4); // external clock is 6.25 Mhz, it sets the internal multiplier to 4x (this should probably be handled in the core..) + SH2(config, m_maincpu, XTAL::u(6250000)*4); // external clock is 6.25 Mhz, it sets the internal multiplier to 4x (this should probably be handled in the core..) m_maincpu->set_addrmap(AS_PROGRAM, &cps3_state::cps3_map); m_maincpu->set_addrmap(AS_OPCODES, &cps3_state::decrypted_opcodes_map); m_maincpu->set_dma_kludge_callback(FUNC(cps3_state::dma_callback)); NSCSI_BUS(config, "scsi"); NSCSI_CONNECTOR(config, "scsi:1").option_set("cdrom", NSCSI_CDROM); - NSCSI_CONNECTOR(config, "scsi:7").option_set("wd33c93", WD33C93A).clock(10'000'000); + NSCSI_CONNECTOR(config, "scsi:7").option_set("wd33c93", WD33C93A).clock(XTAL::u(10'000'000)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/capcom/cps3_a.cpp b/src/mame/capcom/cps3_a.cpp index 95dfe625c3e..99522ab72c7 100644 --- a/src/mame/capcom/cps3_a.cpp +++ b/src/mame/capcom/cps3_a.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(CPS3, cps3_sound_device, "cps3_custom", "CPS3 Custom Sound") // cps3_sound_device - constructor //------------------------------------------------- -cps3_sound_device::cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cps3_sound_device::cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CPS3, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/mame/capcom/cps3_a.h b/src/mame/capcom/cps3_a.h index 101fa8903ce..f9cc046b123 100644 --- a/src/mame/capcom/cps3_a.h +++ b/src/mame/capcom/cps3_a.h @@ -33,7 +33,7 @@ struct cps3_voice class cps3_sound_device : public device_t, public device_sound_interface { public: - cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~cps3_sound_device() { } void set_base(int8_t* base) { m_base = base; } diff --git a/src/mame/capcom/egghunt.cpp b/src/mame/capcom/egghunt.cpp index e2012e26fb1..3f6fec729df 100644 --- a/src/mame/capcom/egghunt.cpp +++ b/src/mame/capcom/egghunt.cpp @@ -432,12 +432,12 @@ void egghunt_state::machine_reset() void egghunt_state::egghunt(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 12000000/2); /* 6 MHz ?*/ + Z80(config, m_maincpu, XTAL::u(12000000)/2); /* 6 MHz ?*/ m_maincpu->set_addrmap(AS_PROGRAM, &egghunt_state::egghunt_map); m_maincpu->set_addrmap(AS_IO, &egghunt_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(egghunt_state::irq0_line_hold)); // or 2 like mitchell.cpp? - Z80(config, m_audiocpu, 12000000/2); /* 6 MHz ?*/ + Z80(config, m_audiocpu, XTAL::u(12000000)/2); /* 6 MHz ?*/ m_audiocpu->set_addrmap(AS_PROGRAM, &egghunt_state::sound_map); @@ -459,7 +459,7 @@ void egghunt_state::egghunt(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } ROM_START( egghunt ) diff --git a/src/mame/capcom/fcrash.cpp b/src/mame/capcom/fcrash.cpp index 28e7158096d..f8a2a98f69c 100644 --- a/src/mame/capcom/fcrash.cpp +++ b/src/mame/capcom/fcrash.cpp @@ -430,12 +430,12 @@ void fcrash_state::wofr1bl_spr_base_w(uint16_t data) void fcrash_state::fcrash(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fcrash_state::fcrash_map); m_maincpu->set_vblank_int("screen", FUNC(fcrash_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &fcrash_state::cpu_space_map); - Z80(config, m_audiocpu, 24000000/6); /* ? */ + Z80(config, m_audiocpu, XTAL::u(24000000)/6); /* ? */ m_audiocpu->set_addrmap(AS_PROGRAM, &fcrash_state::fcrash_sound_map); MCFG_MACHINE_START_OVERRIDE(fcrash_state, fcrash) @@ -459,24 +459,24 @@ void fcrash_state::fcrash(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym1(YM2203(config, "ym1", 24000000/6)); /* ? */ + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(24000000)/6)); /* ? */ ym1.add_route(0, "mono", 0.10); ym1.add_route(1, "mono", 0.10); ym1.add_route(2, "mono", 0.10); ym1.add_route(3, "mono", 1.0); - ym2203_device &ym2(YM2203(config, "ym2", 24000000/6)); /* ? */ + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(24000000)/6)); /* ? */ ym2.add_route(0, "mono", 0.10); ym2.add_route(1, "mono", 0.10); ym2.add_route(2, "mono", 0.10); ym2.add_route(3, "mono", 1.0); - MSM5205(config, m_msm_1, 24000000/64); /* ? */ + MSM5205(config, m_msm_1, XTAL::u(24000000)/64); /* ? */ m_msm_1->vck_legacy_callback().set(FUNC(fcrash_state::m5205_int1)); /* interrupt function */ m_msm_1->set_prescaler_selector(msm5205_device::S96_4B); /* 4KHz 4-bit */ m_msm_1->add_route(ALL_OUTPUTS, "mono", 0.25); - MSM5205(config, m_msm_2, 24000000/64); /* ? */ + MSM5205(config, m_msm_2, XTAL::u(24000000)/64); /* ? */ m_msm_2->vck_legacy_callback().set(FUNC(fcrash_state::m5205_int2)); /* interrupt function */ m_msm_2->set_prescaler_selector(msm5205_device::S96_4B); /* 4KHz 4-bit */ m_msm_2->add_route(ALL_OUTPUTS, "mono", 0.25); @@ -485,12 +485,12 @@ void fcrash_state::fcrash(machine_config &config) void fcrash_state::ffightblb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fcrash_state::fcrash_map); m_maincpu->set_vblank_int("screen", FUNC(fcrash_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &fcrash_state::cpu_space_map); - Z80(config, m_audiocpu, 24000000/6); /* ? */ + Z80(config, m_audiocpu, XTAL::u(24000000)/6); /* ? */ m_audiocpu->set_addrmap(AS_PROGRAM, &fcrash_state::ffightblb_sound_map); MCFG_MACHINE_START_OVERRIDE(fcrash_state, ffightblb) @@ -514,7 +514,7 @@ void fcrash_state::ffightblb(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1000000 , okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki->set_addrmap(0, &fcrash_state::ffightblb_oki_map); m_oki->add_route(ALL_OUTPUTS, "mono", 0.30); } @@ -531,12 +531,12 @@ void fcrash_state::cawingbl(machine_config &config) void fcrash_state::kodb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fcrash_state::fcrash_map); m_maincpu->set_vblank_int("screen", FUNC(fcrash_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &fcrash_state::cpu_space_map); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &fcrash_state::kodb_sound_map); MCFG_MACHINE_START_OVERRIDE(fcrash_state, kodb) @@ -572,12 +572,12 @@ void fcrash_state::kodb(machine_config &config) void fcrash_state::mtwinsb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fcrash_state::mtwinsb_map); m_maincpu->set_vblank_int("screen", FUNC(fcrash_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &fcrash_state::cpu_space_map); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &fcrash_state::sgyxz_sound_map); MCFG_MACHINE_START_OVERRIDE(fcrash_state, mtwinsb) @@ -647,12 +647,12 @@ void fcrash_state::sf2m1(machine_config &config) void fcrash_state::sgyxz(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fcrash_state::sgyxz_map); m_maincpu->set_vblank_int("screen", FUNC(fcrash_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &fcrash_state::cpu_space_map); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &fcrash_state::sgyxz_sound_map); MCFG_MACHINE_START_OVERRIDE(fcrash_state, sgyxz) @@ -703,12 +703,12 @@ void fcrash_state::wofr1bl(machine_config &config) void fcrash_state::varthb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fcrash_state::varthb_map); m_maincpu->set_vblank_int("screen", FUNC(fcrash_state::cps1_interrupt)); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &fcrash_state::cpu_space_map); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &fcrash_state::sgyxz_sound_map); MCFG_MACHINE_START_OVERRIDE(fcrash_state, cps1) diff --git a/src/mame/capcom/instantm.cpp b/src/mame/capcom/instantm.cpp index 0089da7b754..383109d3bca 100644 --- a/src/mame/capcom/instantm.cpp +++ b/src/mame/capcom/instantm.cpp @@ -136,11 +136,11 @@ void instantm_state::instantm(machine_config &config) subcpu.set_addrmap(AS_IO, &instantm_state::sub_io); // all guesswork - clock_device &voice_clock(CLOCK(config, "voice_clock", 24000)); + clock_device &voice_clock(CLOCK(config, "voice_clock", XTAL::u(24000))); voice_clock.signal_handler().set(FUNC(instantm_state::clock_w)); SPEAKER(config, "speaker").front_center(); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + MC1408(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); } diff --git a/src/mame/capcom/lastduel.cpp b/src/mame/capcom/lastduel.cpp index bebdb764eb1..cb765399cfb 100644 --- a/src/mame/capcom/lastduel.cpp +++ b/src/mame/capcom/lastduel.cpp @@ -517,7 +517,7 @@ void lastduel_state::machine_reset() void lastduel_state::lastduel(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); // Unconfirmed - could be 8MHz + M68000(config, m_maincpu, XTAL::u(10000000)); // Unconfirmed - could be 8MHz m_maincpu->set_addrmap(AS_PROGRAM, &lastduel_state::lastduel_map); m_maincpu->set_vblank_int("screen", FUNC(lastduel_state::irq2_line_hold)); TIMER(config, "timer_irq").configure_periodic(FUNC(lastduel_state::lastduel_timer_cb), attotime::from_hz(120)); diff --git a/src/mame/capcom/mitchell.cpp b/src/mame/capcom/mitchell.cpp index f3a1038d490..59ff4833a63 100644 --- a/src/mame/capcom/mitchell.cpp +++ b/src/mame/capcom/mitchell.cpp @@ -1906,7 +1906,7 @@ void spangbl_state::spangbl(machine_config &config) config.device_remove("scantimer"); - Z80(config, m_audiocpu, 4000000); // Z80A CPU; clock unknown + Z80(config, m_audiocpu, XTAL::u(4000000)); // Z80A CPU; clock unknown m_audiocpu->set_addrmap(AS_PROGRAM, &spangbl_state::spangbl_sound_map); m_gfxdecode->set_info(gfx_spangbl); @@ -1914,12 +1914,12 @@ void spangbl_state::spangbl(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0); config.device_remove("oki"); - MSM5205(config, m_msm, 400000); // clock and prescaler unknown + MSM5205(config, m_msm, XTAL::u(400000)); // clock and prescaler unknown m_msm->vck_legacy_callback().set(FUNC(spangbl_state::adpcm_int)); // controls music as well as ADCPM rate m_msm->set_prescaler_selector(msm5205_device::S96_4B); m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); } @@ -1928,7 +1928,7 @@ void spangbl_state::pangba(machine_config &config) spangbl(config); m_audiocpu->set_addrmap(AS_PROGRAM, &spangbl_state::pangba_sound_map); - YM3812(config.replace(), "ymsnd", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); + YM3812(config.replace(), "ymsnd", XTAL::u(4000000)).add_route(ALL_OUTPUTS, "mono", 1.0); } void spangbl_state::mstworld2(machine_config &config) @@ -1946,13 +1946,13 @@ void mstworld_state::mstworld(machine_config &config) /* it doesn't glitch with the clock speed set to 4x normal, however this is incorrect.. the interrupt handling (and probably various irq flags / vbl flags handling etc.) is more likely wrong.. the game appears to run too fast anyway .. */ - Z80(config, m_maincpu, 6000000 * 4); + Z80(config, m_maincpu, XTAL::u(6000000) * 4); m_maincpu->set_addrmap(AS_PROGRAM, &mstworld_state::mitchell_map); m_maincpu->set_addrmap(AS_IO, &mstworld_state::io_map); m_maincpu->set_addrmap(AS_OPCODES, &mstworld_state::decrypted_opcodes_map); m_maincpu->set_vblank_int("screen", FUNC(mstworld_state::irq0_line_hold)); - Z80(config, m_audiocpu, 6000000); // 6 MHz? + Z80(config, m_audiocpu, XTAL::u(6000000)); // 6 MHz? m_audiocpu->set_addrmap(AS_PROGRAM, &mstworld_state::sound_map); // video hardware @@ -1972,7 +1972,7 @@ void mstworld_state::mstworld(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0); - OKIM6295(config, m_oki, 990000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(990000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 0.50); } @@ -2029,10 +2029,10 @@ void pkladiesbl_state::pkladiesbl(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); - ym2413_device &ymsnd(YM2413(config, "ymsnd", 3750000)); // verified on PCB, read the comments + ym2413_device &ymsnd(YM2413(config, "ymsnd", XTAL::u(3750000))); // verified on PCB, read the comments ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/capcom/psrockman.cpp b/src/mame/capcom/psrockman.cpp index 3d5cdf25a4d..15c0b65f066 100644 --- a/src/mame/capcom/psrockman.cpp +++ b/src/mame/capcom/psrockman.cpp @@ -120,7 +120,7 @@ void psrockman_state::psrockman(machine_config &config) ym.irq_handler().set_inputline("maincpu", 0); // TODO: with this the game says 係員をお呼びください (Please call staff) over and over ym.add_route(ALL_OUTPUTS, "mono", 0.5); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); // clock frequency & pin 7 not verified } diff --git a/src/mame/capcom/sf.cpp b/src/mame/capcom/sf.cpp index b25bfeb0c40..d1673be1ca5 100644 --- a/src/mame/capcom/sf.cpp +++ b/src/mame/capcom/sf.cpp @@ -783,12 +783,12 @@ void sf_state::sfan(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.60); ymsnd.add_route(1, "rspeaker", 0.60); - MSM5205(config, m_msm[0], 384000); + MSM5205(config, m_msm[0], XTAL::u(384000)); m_msm[0]->set_prescaler_selector(msm5205_device::SEX_4B); /* 8KHz playback ? */ m_msm[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - MSM5205(config, m_msm[1], 384000); + MSM5205(config, m_msm[1], XTAL::u(384000)); m_msm[1]->set_prescaler_selector(msm5205_device::SEX_4B); /* 8KHz playback ? */ m_msm[1]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm[1]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); diff --git a/src/mame/capcom/sidearms.cpp b/src/mame/capcom/sidearms.cpp index 42ef833e881..4be419d6774 100644 --- a/src/mame/capcom/sidearms.cpp +++ b/src/mame/capcom/sidearms.cpp @@ -608,11 +608,11 @@ GFXDECODE_END void sidearms_state::sidearms(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* 4 MHz (?) */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz (?) */ m_maincpu->set_addrmap(AS_PROGRAM, &sidearms_state::sidearms_map); m_maincpu->set_vblank_int("screen", FUNC(sidearms_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4000000); /* 4 MHz (?) */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* 4 MHz (?) */ m_audiocpu->set_addrmap(AS_PROGRAM, &sidearms_state::sidearms_sound_map); WATCHDOG_TIMER(config, "watchdog"); @@ -637,14 +637,14 @@ void sidearms_state::sidearms(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ym2203_device &ym1(YM2203(config, "ym1", 4000000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(4000000))); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(0, "mono", 0.15); ym1.add_route(1, "mono", 0.15); ym1.add_route(2, "mono", 0.15); ym1.add_route(3, "mono", 0.25); - ym2203_device &ym2(YM2203(config, "ym2", 4000000)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(4000000))); ym2.add_route(0, "mono", 0.15); ym2.add_route(1, "mono", 0.15); ym2.add_route(2, "mono", 0.15); @@ -700,11 +700,11 @@ void sidearms_state::turtship(machine_config &config) void sidearms_state::whizz(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* 4 MHz (?) */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz (?) */ m_maincpu->set_addrmap(AS_PROGRAM, &sidearms_state::whizz_map); m_maincpu->set_vblank_int("screen", FUNC(sidearms_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &sidearms_state::whizz_sound_map); m_audiocpu->set_addrmap(AS_IO, &sidearms_state::whizz_io_map); @@ -732,7 +732,7 @@ void sidearms_state::whizz(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 4000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(4000000))); ymsnd.add_route(0, "mono", 1.0); ymsnd.add_route(1, "mono", 1.0); } diff --git a/src/mame/capcom/supduck.cpp b/src/mame/capcom/supduck.cpp index 8cdc103d312..6461d144369 100644 --- a/src/mame/capcom/supduck.cpp +++ b/src/mame/capcom/supduck.cpp @@ -443,7 +443,7 @@ void supduck_state::supduck(machine_config &config) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(6000000, 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259 + screen.set_raw(XTAL::u(6000000), 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259 screen.set_screen_update(FUNC(supduck_state::screen_update)); screen.set_palette(m_palette); screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising)); @@ -452,7 +452,7 @@ void supduck_state::supduck(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_supduck); - TIGEROAD_SPRITE(config, m_spritegen, 0); + TIGEROAD_SPRITE(config, m_spritegen); m_spritegen->set_palette(m_palette); m_spritegen->set_color_base(512); // colors 512- 767 diff --git a/src/mame/capcom/tigeroad.cpp b/src/mame/capcom/tigeroad.cpp index f56449c25c8..f142ce31110 100644 --- a/src/mame/capcom/tigeroad.cpp +++ b/src/mame/capcom/tigeroad.cpp @@ -634,14 +634,14 @@ void tigeroad_state::tigeroad(machine_config &config) // Timings may be different, driver originally had 60.08Hz vblank. screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(6000000, 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259 + screen.set_raw(XTAL::u(6000000), 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259 screen.set_screen_update(FUNC(tigeroad_state::screen_update)); screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_tigeroad); - TIGEROAD_SPRITE(config, m_spritegen, 0); + TIGEROAD_SPRITE(config, m_spritegen); m_spritegen->set_palette(m_palette); m_spritegen->set_color_base(0x200); @@ -685,13 +685,13 @@ void tigeroad_state::toramich(machine_config &config) // basic machine hardware - z80_device &sample(Z80(config, "sample", 3579545)); // ? + z80_device &sample(Z80(config, "sample", XTAL::u(3579545))); // ? sample.set_addrmap(AS_PROGRAM, &tigeroad_state::sample_map); sample.set_addrmap(AS_IO, &tigeroad_state::sample_port_map); sample.set_periodic_int(FUNC(tigeroad_state::irq0_line_hold), attotime::from_hz(4000)); // ? // sound hardware - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->set_prescaler_selector(msm5205_device::SEX_4B); // 4KHz playback ? m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -699,11 +699,11 @@ void tigeroad_state::toramich(machine_config &config) void tigeroad_state::f1dream_comad(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &tigeroad_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(tigeroad_state::irq2_line_hold)); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &tigeroad_state::comad_sound_map); m_audiocpu->set_addrmap(AS_IO, &tigeroad_state::comad_sound_io_map); @@ -713,14 +713,14 @@ void tigeroad_state::f1dream_comad(machine_config &config) BUFFERED_SPRITERAM16(config, "spriteram"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(6000000, 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259 + screen.set_raw(XTAL::u(6000000), 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259 screen.set_screen_update(FUNC(tigeroad_state::screen_update)); screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_tigeroad); - TIGEROAD_SPRITE(config, m_spritegen, 0); + TIGEROAD_SPRITE(config, m_spritegen); m_spritegen->set_palette(m_palette); m_spritegen->set_color_base(0x200); @@ -731,11 +731,11 @@ void tigeroad_state::f1dream_comad(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ym2203_device &ym1(YM2203(config, "ym1", 2000000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(2000000))); ym1.irq_handler().set_inputline("audiocpu", 0); ym1.add_route(ALL_OUTPUTS, "mono", 0.40); - ym2203_device &ym2(YM2203(config, "ym2", 2000000)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(2000000))); ym2.add_route(ALL_OUTPUTS, "mono", 0.40); } @@ -755,7 +755,7 @@ void pushman_state::pushman(machine_config &config) f1dream_comad(config); m_maincpu->set_addrmap(AS_PROGRAM, &pushman_state::pushman_map); - M68705R3(config, m_mcu, 4000000); // No idea + M68705R3(config, m_mcu, XTAL::u(4000000)); // No idea m_mcu->porta_w().set(FUNC(pushman_state::mcu_pa_w)); m_mcu->portb_w().set(FUNC(pushman_state::mcu_pb_w)); m_mcu->portc_w().set(FUNC(pushman_state::mcu_pc_w)); diff --git a/src/mame/capcom/tigeroad_spr.cpp b/src/mame/capcom/tigeroad_spr.cpp index dab1db5c7b5..789a97c1772 100644 --- a/src/mame/capcom/tigeroad_spr.cpp +++ b/src/mame/capcom/tigeroad_spr.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(TIGEROAD_SPRITE, tigeroad_spr_device, "tigeroad_spr", "Simple Capcom (Tiger Road) Sprite") -tigeroad_spr_device::tigeroad_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tigeroad_spr_device::tigeroad_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIGEROAD_SPRITE, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , m_gfx_region(*this, DEVICE_SELF) diff --git a/src/mame/capcom/tigeroad_spr.h b/src/mame/capcom/tigeroad_spr.h index b41e049e34d..eddb7203705 100644 --- a/src/mame/capcom/tigeroad_spr.h +++ b/src/mame/capcom/tigeroad_spr.h @@ -8,7 +8,7 @@ class tigeroad_spr_device : public device_t, public device_gfx_interface { public: - tigeroad_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tigeroad_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configurations void set_color_base(u16 base) { m_colbase = base; } diff --git a/src/mame/capcom/tvcapcom.cpp b/src/mame/capcom/tvcapcom.cpp index 8e010cd477e..b4398f3e2e8 100644 --- a/src/mame/capcom/tvcapcom.cpp +++ b/src/mame/capcom/tvcapcom.cpp @@ -58,7 +58,7 @@ INPUT_PORTS_END void tvcapcom_state::tvcapcom(machine_config &config) { /* basic machine hardware */ - PPC603(config, m_maincpu, 72900000); // IBM PowerPC Broadway CPU @ 729 MHz ? + PPC603(config, m_maincpu, XTAL::u(72900000)); // IBM PowerPC Broadway CPU @ 729 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &tvcapcom_state::gc_map); m_maincpu->set_disable(); diff --git a/src/mame/casio/casloopy.cpp b/src/mame/casio/casloopy.cpp index dc082852876..43f2e6424ba 100644 --- a/src/mame/casio/casloopy.cpp +++ b/src/mame/casio/casloopy.cpp @@ -509,15 +509,15 @@ DEVICE_IMAGE_LOAD_MEMBER( casloopy_state::cart_load ) void casloopy_state::casloopy(machine_config &config) { /* basic machine hardware */ - SH2A(config, m_maincpu, 8000000); + SH2A(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &casloopy_state::casloopy_map); -// v60_device &subcpu(V60(config, "subcpu", 8000000)); +// v60_device &subcpu(V60(config, "subcpu", XTAL::u(8000000))); // subcpu.set_addrmap(AS_PROGRAM, &casloopy_state::casloopy_sub_map); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(8000000, 444, 0, 256, 263, 0, 224); + m_screen->set_raw(XTAL::u(8000000), 444, 0, 256, 263, 0, 224); // m_screen->set_refresh_hz(60); // m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // m_screen->set_size(444, 263); diff --git a/src/mame/casio/cfx9850.cpp b/src/mame/casio/cfx9850.cpp index cfd718e9aa1..b9c7cf61a17 100644 --- a/src/mame/casio/cfx9850.cpp +++ b/src/mame/casio/cfx9850.cpp @@ -285,7 +285,7 @@ u32 cfx9850_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co void cfx9850_state::cfx9850(machine_config &config) { - HCD62121(config, m_maincpu, 4300000); /* X1 - 4.3 MHz */ + HCD62121(config, m_maincpu, XTAL::u(4300000)); /* X1 - 4.3 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &cfx9850_state::cfx9850_mem); m_maincpu->kol_cb().set(FUNC(cfx9850_state::kol_w)); m_maincpu->koh_cb().set(FUNC(cfx9850_state::koh_w)); diff --git a/src/mame/casio/ctk2000.cpp b/src/mame/casio/ctk2000.cpp index d92908a9637..a46d61e630d 100644 --- a/src/mame/casio/ctk2000.cpp +++ b/src/mame/casio/ctk2000.cpp @@ -101,7 +101,7 @@ void ctk2000_state::driver_reset() void ctk2000_state::ctk2000(machine_config &config) { // CPU - UPD800468(config, m_maincpu, 48'000'000); + UPD800468(config, m_maincpu, XTAL::u(48'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &ctk2000_state::ctk2000_map); m_maincpu->port_in_cb<2>().set_ioport("P2_R"); m_maincpu->port_out_cb<2>().set_ioport("P2_W"); @@ -113,7 +113,7 @@ void ctk2000_state::ctk2000(machine_config &config) m_maincpu->adc_cb<3>().set_ioport("AIN3"); // LCD - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 8); m_lcdc->set_pixel_update_cb(FUNC(ctk2000_state::lcd_update)); diff --git a/src/mame/casio/ctk551.cpp b/src/mame/casio/ctk551.cpp index 4d10df8a95f..6a7f865ce8b 100644 --- a/src/mame/casio/ctk551.cpp +++ b/src/mame/casio/ctk551.cpp @@ -527,7 +527,7 @@ void ctk551_state::ctk530(machine_config& config) midiout_slot(mdout); m_maincpu->subdevice("sci0")->tx_handler().set(mdout, FUNC(midi_port_device::write_txd)); - PWM_DISPLAY(config, m_pwm, 0); + PWM_DISPLAY(config, m_pwm); m_pwm->set_size(4, 8); m_pwm->set_segmask(0x7, 0xff); @@ -576,7 +576,7 @@ void ctk551_state::ctk601(machine_config& config) m_maincpu->subdevice("sci0")->tx_handler().set(mdout, FUNC(midi_port_device::write_txd)); // LCD - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 8); auto& screen = SCREEN(config, "screen", SCREEN_TYPE_SVG); @@ -594,7 +594,7 @@ void ctk551_state::ctk601(machine_config& config) void ctk551_state::ctk551(machine_config &config) { // CPU - GT913(config, m_maincpu, 30'000'000 / 2); + GT913(config, m_maincpu, XTAL::u(30'000'000) / 2); m_maincpu->set_addrmap(AS_DATA, &ctk551_state::ctk530_map); m_maincpu->set_addrmap(AS_IO, &ctk551_state::ctk551_io_map); m_maincpu->add_route(0, "lspeaker", 1.0); @@ -610,7 +610,7 @@ void ctk551_state::ctk551(machine_config &config) m_maincpu->subdevice("sci0")->tx_handler().set(mdout, FUNC(midi_port_device::write_txd)); // LCD - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 8); auto &screen = SCREEN(config, "screen", SCREEN_TYPE_SVG); diff --git a/src/mame/casio/cz101.cpp b/src/mame/casio/cz101.cpp index a10bf9c7537..7e3a57c61b6 100644 --- a/src/mame/casio/cz101.cpp +++ b/src/mame/casio/cz101.cpp @@ -392,7 +392,7 @@ void cz101_state::cz101(machine_config &config) PALETTE(config, "palette", FUNC(cz101_state::cz101_palette), 3); - HD44780(config, m_hd44780, 0); + HD44780(config, m_hd44780); m_hd44780->set_lcd_size(2, 16); m_hd44780->set_pixel_update_cb(FUNC(cz101_state::lcd_pixel_update)); diff --git a/src/mame/casio/fp1100.cpp b/src/mame/casio/fp1100.cpp index 562f212bdea..f408c346c9e 100644 --- a/src/mame/casio/fp1100.cpp +++ b/src/mame/casio/fp1100.cpp @@ -675,7 +675,7 @@ void fp1100_state::fp1100(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 950) // guess + BEEP(config, "beeper", XTAL::u(950)) // guess .add_route(ALL_OUTPUTS, "mono", 0.50); // inside the keyboard /* CRTC */ diff --git a/src/mame/casio/fp6000.cpp b/src/mame/casio/fp6000.cpp index 7b3b6558f58..01aa29201bc 100644 --- a/src/mame/casio/fp6000.cpp +++ b/src/mame/casio/fp6000.cpp @@ -453,26 +453,26 @@ void fp6000_state::machine_reset() void fp6000_state::fp6000(machine_config &config) { - I8086(config, m_maincpu, 16000000 / 2); // 8 Mhz? + I8086(config, m_maincpu, XTAL::u(16000000) / 2); // 8 Mhz? m_maincpu->set_addrmap(AS_PROGRAM, &fp6000_state::fp6000_map); m_maincpu->set_addrmap(AS_IO, &fp6000_state::fp6000_io); m_maincpu->set_irq_acknowledge_callback(m_pic, FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - PIT8253(config, m_pit, 0); - m_pit->set_clk<0>(16000000 / 16); // 1 MHz + PIT8253(config, m_pit); + m_pit->set_clk<0>(XTAL::u(16000000) / 16); // 1 MHz m_pit->out_handler<0>().set(FUNC(fp6000_state::pit_timer0_w)).invert(); - m_pit->set_clk<2>(16000000 / 8); // 2 MHz? + m_pit->set_clk<2>(XTAL::u(16000000) / 8); // 2 MHz? m_pit->out_handler<2>().set(FUNC(fp6000_state::pit_timer2_w)); // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(16000000, 1024, 0, 640, 272, 0, 200); // 16 MHz? + screen.set_raw(XTAL::u(16000000), 1024, 0, 640, 272, 0, 200); // 16 MHz? screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - MC6845(config, m_crtc, 16000000 / 8); // unknown variant, 2 MHz? + MC6845(config, m_crtc, XTAL::u(16000000) / 8); // unknown variant, 2 MHz? m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); diff --git a/src/mame/casio/fp6000_kbd.cpp b/src/mame/casio/fp6000_kbd.cpp index 31825ad01d5..95ab832b412 100644 --- a/src/mame/casio/fp6000_kbd.cpp +++ b/src/mame/casio/fp6000_kbd.cpp @@ -148,7 +148,7 @@ ioport_constructor fp6000_kbd_device::device_input_ports() const // fp6000_kbd_device - constructor //------------------------------------------------- -fp6000_kbd_device::fp6000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fp6000_kbd_device::fp6000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FP6000_KBD, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5"), m_int_handler(*this) diff --git a/src/mame/casio/fp6000_kbd.h b/src/mame/casio/fp6000_kbd.h index 1570eea16c6..74bce803a64 100644 --- a/src/mame/casio/fp6000_kbd.h +++ b/src/mame/casio/fp6000_kbd.h @@ -24,7 +24,7 @@ class fp6000_kbd_device : public device_t, protected device_matrix_keyboard_int { public: // construction/destruction - fp6000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fp6000_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/mame/casio/ld50.cpp b/src/mame/casio/ld50.cpp index 5087f02faed..a2295b87616 100644 --- a/src/mame/casio/ld50.cpp +++ b/src/mame/casio/ld50.cpp @@ -251,7 +251,7 @@ void ld50_state::ld50(machine_config &config) m_maincpu->port_out_cb<3>().set(FUNC(ld50_state::port3_w)); // LCD - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 8); m_lcdc->set_pixel_update_cb(FUNC(ld50_state::lcd_update)); diff --git a/src/mame/casio/pb1000.cpp b/src/mame/casio/pb1000.cpp index 9a4f9218ce6..d0bd5694133 100644 --- a/src/mame/casio/pb1000.cpp +++ b/src/mame/casio/pb1000.cpp @@ -464,7 +464,7 @@ void pb1000_state::machine_start() void pb1000_state::pb1000(machine_config &config) { /* basic machine hardware */ - HD61700(config, m_maincpu, 910000); + HD61700(config, m_maincpu, XTAL::u(910000)); m_maincpu->set_addrmap(AS_PROGRAM, &pb1000_state::pb1000_mem); m_maincpu->lcd_ctrl().set(m_hd44352, FUNC(hd44352_device::control_write)); m_maincpu->lcd_read().set(m_hd44352, FUNC(hd44352_device::data_read)); @@ -486,7 +486,7 @@ void pb1000_state::pb1000(machine_config &config) PALETTE(config, "palette", FUNC(pb1000_state::pb1000_palette), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_pb1000); - HD44352(config, m_hd44352, 910000); + HD44352(config, m_hd44352, XTAL::u(910000)); m_hd44352->on_cb().set_inputline("maincpu", HD61700_ON_INT); NVRAM(config, "nvram1", nvram_device::DEFAULT_ALL_0); @@ -494,7 +494,7 @@ void pb1000_state::pb1000(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 3250).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 1.00); } void pb1000_state::pb2000c(machine_config &config) diff --git a/src/mame/casio/pv1000.cpp b/src/mame/casio/pv1000.cpp index a100a0776db..086c26630b8 100644 --- a/src/mame/casio/pv1000.cpp +++ b/src/mame/casio/pv1000.cpp @@ -22,7 +22,7 @@ class pv1000_sound_device : public device_t, public device_sound_interface { public: - pv1000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pv1000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void voice_w(offs_t offset, uint8_t data); @@ -48,7 +48,7 @@ private: DEFINE_DEVICE_TYPE(PV1000, pv1000_sound_device, "pv1000_sound", "NEC D65010G031") -pv1000_sound_device::pv1000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pv1000_sound_device::pv1000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PV1000, tag, owner, clock) , device_sound_interface(mconfig, *this) { @@ -441,13 +441,13 @@ GFXDECODE_END void pv1000_state::pv1000(machine_config &config) { - Z80(config, m_maincpu, 17897725/5); + Z80(config, m_maincpu, XTAL::u(17897725)/5); m_maincpu->set_addrmap(AS_PROGRAM, &pv1000_state::pv1000_mem); m_maincpu->set_addrmap(AS_IO, &pv1000_state::pv1000_io); /* D65010G031 - Video & sound chip */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(17897725/3, 380, 0, 256, 262, 0, 192); + m_screen->set_raw(XTAL::u(17897725)/3, 380, 0, 256, 262, 0, 192); m_screen->set_screen_update(FUNC(pv1000_state::screen_update_pv1000)); m_screen->set_palette(m_palette); @@ -456,7 +456,7 @@ void pv1000_state::pv1000(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pv1000); SPEAKER(config, "mono").front_center(); - PV1000(config, m_sound, 17897725).add_route(ALL_OUTPUTS, "mono", 1.00); + PV1000(config, m_sound, XTAL::u(17897725)).add_route(ALL_OUTPUTS, "mono", 1.00); /* Cartridge slot */ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "pv1000_cart")); diff --git a/src/mame/casio/rz1.cpp b/src/mame/casio/rz1.cpp index aa9eca9848d..93b85f4741c 100644 --- a/src/mame/casio/rz1.cpp +++ b/src/mame/casio/rz1.cpp @@ -441,7 +441,7 @@ void rz1_state::rz1(machine_config &config) PALETTE(config, "palette", FUNC(rz1_state::rz1_palette), 3); - HD44780(config, m_hd44780, 0); + HD44780(config, m_hd44780); m_hd44780->set_lcd_size(1, 16); m_hd44780->set_pixel_update_cb(FUNC(rz1_state::lcd_pixel_update)); @@ -449,10 +449,10 @@ void rz1_state::rz1(machine_config &config) // audio hardware SPEAKER(config, "speaker").front_center(); - UPD934G(config, m_pg[0], 1333000); + UPD934G(config, m_pg[0], XTAL::u(1333000)); m_pg[0]->data_callback().set(FUNC(rz1_state::upd934g_c_data_r)); m_pg[0]->add_route(ALL_OUTPUTS, "speaker", 1.0); - UPD934G(config, m_pg[1], 1280000); + UPD934G(config, m_pg[1], XTAL::u(1280000)); m_pg[1]->data_callback().set(FUNC(rz1_state::upd934g_b_data_r)); m_pg[1]->add_route(ALL_OUTPUTS, "speaker", 1.0); diff --git a/src/mame/casio/sx1000.cpp b/src/mame/casio/sx1000.cpp index 8b1456cc1ac..b963f239138 100644 --- a/src/mame/casio/sx1000.cpp +++ b/src/mame/casio/sx1000.cpp @@ -233,7 +233,7 @@ DEVICE_INPUT_DEFAULTS_END void sx1000_state::common(machine_config &config) { - M68010(config, m_cpu, 10'000'000); + M68010(config, m_cpu, XTAL::u(10'000'000)); m_cpu->set_addrmap(AS_PROGRAM, &sx1000_state::cpu_map); // 36 x D41256C-15 (256Kb DRAM) on CPU board @@ -246,12 +246,12 @@ void sx1000_state::common(machine_config &config) // M6845 config screen: HTOTAL: 944 VTOTAL: 444 MAX_X: 639 MAX_Y: 399 HSYNC: 720-823 VSYNC: 416-425 Freq: 76.347534fps SCREEN(config, m_screen_crtc, SCREEN_TYPE_RASTER); - m_screen_crtc->set_raw(48'800'000, 944, 0, 640, 444, 0, 400); + m_screen_crtc->set_raw(XTAL::u(48'800'000), 944, 0, 640, 444, 0, 400); m_screen_crtc->set_screen_update(m_crtc, FUNC(hd6345_device::screen_update)); // ACRTC: full 944x449 vis (200, 18)-(847, 417) SCREEN(config, m_screen_acrtc, SCREEN_TYPE_RASTER); - m_screen_acrtc->set_raw(48'800'000, 944, 200, 847, 449, 18, 417); + m_screen_acrtc->set_raw(XTAL::u(48'800'000), 944, 200, 847, 449, 18, 417); m_screen_acrtc->set_screen_update(m_acrtc, FUNC(hd63484_device::update_screen)); m_screen_acrtc->set_palette(m_palette_acrtc); @@ -263,13 +263,13 @@ void sx1000_state::common(machine_config &config) // vdisp = 25 // mrast = 15 // MB89321A - HD6345(config, m_crtc, 4'000'000); + HD6345(config, m_crtc, XTAL::u(4'000'000)); m_crtc->set_screen(m_screen_crtc); m_crtc->set_update_row_callback(FUNC(sx1000_state::crtc_update_row)); m_crtc->out_vsync_callback().set(m_pic, FUNC(pic8259_device::ir5_w)); m_crtc->set_hpixels_per_column(8); - HD63484(config, m_acrtc, 8'000'000); + HD63484(config, m_acrtc, XTAL::u(8'000'000)); m_acrtc->set_screen(m_screen_acrtc); m_acrtc->set_addrmap(0, &sx1000_state::acrtc_map); @@ -279,12 +279,12 @@ void sx1000_state::common(machine_config &config) rs232_1.cts_handler().set(m_serial1, FUNC(i8251_device::write_cts)); rs232_1.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal1)); - I8251(config, m_serial1, 4'000'000); + I8251(config, m_serial1, XTAL::u(4'000'000)); m_serial1->txd_handler().set(rs232_1, FUNC(rs232_port_device::write_txd)); m_serial1->dtr_handler().set(rs232_1, FUNC(rs232_port_device::write_dtr)); m_serial1->rts_handler().set(rs232_1, FUNC(rs232_port_device::write_rts)); - CLOCK(config, "clock1", 1200*16).signal_handler().set(m_serial1, FUNC(i8251_device::write_txc)); + CLOCK(config, "clock1", XTAL::u(1200*16)).signal_handler().set(m_serial1, FUNC(i8251_device::write_txc)); auto &rs232_2(RS232_PORT(config, "serial2", default_rs232_devices, nullptr)); rs232_2.rxd_handler().set(m_serial2, FUNC(i8251_device::write_rxd)); @@ -292,12 +292,12 @@ void sx1000_state::common(machine_config &config) rs232_2.cts_handler().set(m_serial2, FUNC(i8251_device::write_cts)); rs232_2.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal2)); - I8251(config, m_serial2, 4'000'000); + I8251(config, m_serial2, XTAL::u(4'000'000)); m_serial2->txd_handler().set(rs232_2, FUNC(rs232_port_device::write_txd)); m_serial2->dtr_handler().set(rs232_2, FUNC(rs232_port_device::write_dtr)); m_serial2->rts_handler().set(rs232_2, FUNC(rs232_port_device::write_rts)); - CLOCK(config, "clock2", 9600*16).signal_handler().set(m_serial2, FUNC(i8251_device::write_txc)); + CLOCK(config, "clock2", XTAL::u(9600*16)).signal_handler().set(m_serial2, FUNC(i8251_device::write_txc)); } void sx1000_state::sx1010(machine_config &config) diff --git a/src/mame/cce/mc1000.cpp b/src/mame/cce/mc1000.cpp index 37d0d2b7ebc..56441008a61 100644 --- a/src/mame/cce/mc1000.cpp +++ b/src/mame/cce/mc1000.cpp @@ -550,7 +550,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mc1000_state::ne555_tick) void mc1000_state::mc1000(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3579545); + Z80(config, m_maincpu, XTAL::u(3579545)); m_maincpu->set_addrmap(AS_PROGRAM, &mc1000_state::mc1000_mem); m_maincpu->set_addrmap(AS_OPCODES, &mc1000_state::mc1000_banking_mem); m_maincpu->set_addrmap(AS_IO, &mc1000_state::mc1000_io); @@ -576,7 +576,7 @@ void mc1000_state::mc1000(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &ay8910(AY8910(config, AY8910_TAG, 3579545/2)); + ay8910_device &ay8910(AY8910(config, AY8910_TAG, XTAL::u(3579545)/2)); ay8910.set_flags(AY8910_SINGLE_OUTPUT); ay8910.set_resistors_load(RES_K(2.2), 0, 0); ay8910.port_b_read_callback().set(FUNC(mc1000_state::keydata_r)); diff --git a/src/mame/ceres/ceres.cpp b/src/mame/ceres/ceres.cpp index 0b9fba78a0b..b71c164e12c 100644 --- a/src/mame/ceres/ceres.cpp +++ b/src/mame/ceres/ceres.cpp @@ -368,7 +368,7 @@ void ceres1_state::ceres1(machine_config &config) // TODO: RS-485 ports "na" and "nb" SCC8530N(config, m_scc, 6_MHz_XTAL); - m_scc->configure_channels(m_uart->clock(), 0, m_uart->clock(), 0); + m_scc->configure_channels(m_uart->clock(), XTAL(), m_uart->clock(), XTAL()); m_scc->out_int_callback().set(m_icu, FUNC(am9519_device::ireq1_w)).invert(); M3002(config, m_rtc, 32.768_kHz_XTAL); @@ -378,15 +378,15 @@ void ceres1_state::ceres1(machine_config &config) m_icu->out_int_callback().set_inputline(m_cpu, INPUT_LINE_IRQ0); // TODO: WD1002-05 Winchester/Floppy Disk Controller (WFC) - HARDDISK(config, m_hdd[0], 0); - HARDDISK(config, m_hdd[1], 0); - HARDDISK(config, m_hdd[2], 0); + HARDDISK(config, m_hdd[0]); + HARDDISK(config, m_hdd[1]); + HARDDISK(config, m_hdd[2]); WD2797(config, m_fdc, 20_MHz_XTAL / 20); FLOPPY_CONNECTOR(config, "fdc:0", "fdd", FLOPPY_35_DD, true, floppy_image_device::default_mfm_floppy_formats); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(70'000'000, 1344, 0, 1024, 838, 0, 800); + m_screen->set_raw(XTAL::u(70'000'000), 1344, 0, 1024, 838, 0, 800); m_screen->set_screen_update(FUNC(ceres1_state::screen_update)); } diff --git a/src/mame/ces/cesclass.cpp b/src/mame/ces/cesclass.cpp index 1ebb1c639f9..5e82fab36c0 100644 --- a/src/mame/ces/cesclass.cpp +++ b/src/mame/ces/cesclass.cpp @@ -246,7 +246,7 @@ void cesclassic_state::cesclassic_palette(palette_device &palette) const void cesclassic_state::cesclassic(machine_config &config) { - M68000(config, m_maincpu, 24000000/2); + M68000(config, m_maincpu, XTAL::u(24000000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &cesclassic_state::cesclassic_map); m_maincpu->set_vblank_int("l_lcd", FUNC(cesclassic_state::irq2_line_assert)); // TODO: unknown sources m_maincpu->set_periodic_int(FUNC(cesclassic_state::irq3_line_assert), attotime::from_hz(60*8)); @@ -264,7 +264,7 @@ void cesclassic_state::cesclassic(machine_config &config) PALETTE(config, m_palette, FUNC(cesclassic_state::cesclassic_palette), 4); SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 24000000/16, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.5); + OKIM6295(config, m_oki, XTAL::u(24000000)/16, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.5); } diff --git a/src/mame/ces/galgames.cpp b/src/mame/ces/galgames.cpp index 7c4087a3b0d..4edfd505ce7 100644 --- a/src/mame/ces/galgames.cpp +++ b/src/mame/ces/galgames.cpp @@ -77,11 +77,17 @@ public: // construction/destruction galgames_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, u8 cart) - : galgames_cart_device(mconfig, GALGAMES_CART, tag, owner, (u32)0) + : galgames_cart_device(mconfig, GALGAMES_CART, tag, owner) { set_cart(cart); } + galgames_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : galgames_cart_device(mconfig, GALGAMES_CART, tag, owner, clock) + { + set_cart(0); + } + // static configuration void set_cart(u8 cart) { m_cart = cart; } void set_pic_bits(int clk, int in, int out, int dis); @@ -110,7 +116,7 @@ protected: device_type type, const char *tag, device_t *owner, - u32 clock); + const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; @@ -147,11 +153,16 @@ class galgames_bios_cart_device : public galgames_cart_device public: // construction/destruction galgames_bios_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, u8 cart) - : galgames_cart_device(mconfig, GALGAMES_BIOS_CART, tag, owner, (u32)0) + : galgames_cart_device(mconfig, GALGAMES_BIOS_CART, tag, owner) { set_cart(cart); } + galgames_bios_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : galgames_cart_device(mconfig, GALGAMES_BIOS_CART, tag, owner, clock) + { + } + protected: // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -172,12 +183,18 @@ class galgames_starpak2_cart_device : public galgames_cart_device public: // construction/destruction galgames_starpak2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, u8 cart) - : galgames_cart_device(mconfig, GALGAMES_STARPAK2_CART, tag, owner, (u32)0) + : galgames_cart_device(mconfig, GALGAMES_STARPAK2_CART, tag, owner) { set_cart(cart); set_pic_bits(5, 4, 2, 1); } + + galgames_starpak2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : galgames_cart_device(mconfig, GALGAMES_STARPAK2_CART, tag, owner, clock) + { + } + protected: // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -202,12 +219,18 @@ class galgames_starpak3_cart_device : public galgames_cart_device public: // construction/destruction galgames_starpak3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, u8 cart) - : galgames_cart_device(mconfig, GALGAMES_STARPAK3_CART, tag, owner, (u32)0) + : galgames_cart_device(mconfig, GALGAMES_STARPAK3_CART, tag, owner) { set_cart(cart); set_pic_bits(0, 2, 3, 4); } + + galgames_starpak3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : galgames_cart_device(mconfig, GALGAMES_STARPAK3_CART, tag, owner, clock) + { + } + protected: // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -238,7 +261,7 @@ class galgames_slot_device : public device_t, public device_memory_interface { public: // construction/destruction - galgames_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + galgames_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void slot_map(address_map &map); @@ -314,7 +337,7 @@ galgames_cart_device::galgames_cart_device( device_type type, const char *tag, device_t *owner, - u32 clock): + const XTAL &clock): device_t(mconfig, type, tag, owner, clock), device_rom_interface(mconfig, *this), m_cart(0), @@ -567,7 +590,7 @@ void galgames_slot_device::slot_map(address_map &map) map(0x200000, 0x23ffff).rw(FUNC(galgames_slot_device::rom_or_ram_r), FUNC(galgames_slot_device::ram_w)); } -galgames_slot_device::galgames_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +galgames_slot_device::galgames_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GALGAMES_SLOT, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("slot_space", ENDIANNESS_BIG, 16,22, 0, address_map_constructor(FUNC(galgames_slot_device::slot_map), this)), @@ -998,8 +1021,8 @@ void galgames_state::galgames_base(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(galgames_state::scanline_interrupt), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); - GALGAMES_SLOT(config, m_slot, 0); - GALGAMES_BIOS_CART(config, "cart0", 0); + GALGAMES_SLOT(config, m_slot); + GALGAMES_BIOS_CART(config, "cart0"); // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/chess/cking_master.cpp b/src/mame/chess/cking_master.cpp index e3f01842858..5c6c9d1db61 100644 --- a/src/mame/chess/cking_master.cpp +++ b/src/mame/chess/cking_master.cpp @@ -218,7 +218,7 @@ void master_state::master(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &master_state::main_trampoline); ADDRESS_MAP_BANK(config, "mainmap").set_map(&master_state::main_map).set_options(ENDIANNESS_LITTLE, 8, 16); - auto &irq_clock(CLOCK(config, "irq_clock", 418)); // 555 timer (22nF, 150K, 1K5), measured 418Hz + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(418))); // 555 timer (22nF, 150K, 1K5), measured 418Hz irq_clock.set_pulse_width(attotime::from_nsec(22870)); // active for 22.87us irq_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); diff --git a/src/mame/chess/compuchess.cpp b/src/mame/chess/compuchess.cpp index ea2ca1d95f0..0a366ba5f2a 100644 --- a/src/mame/chess/compuchess.cpp +++ b/src/mame/chess/compuchess.cpp @@ -211,7 +211,7 @@ void cmpchess_state::update_reset(ioport_value state) void cmpchess_state::update_cpu_freq(ioport_value state) { // 2 MK I versions, 2nd one was a lot faster - const u32 freq = state ? 3500000 : 2250000; + const XTAL freq = state ? XTAL::u(3500000) : XTAL::u(2250000); m_maincpu->set_unscaled_clock(freq); subdevice("smi")->set_unscaled_clock(freq); } @@ -438,8 +438,8 @@ void cmpchess_state::mk1(machine_config &config) cmpchess(config); /* basic machine hardware */ - m_maincpu->set_clock(2250000); // see notes - subdevice("smi")->set_clock(2250000); + m_maincpu->set_clock(XTAL::u(2250000)); // see notes + subdevice("smi")->set_clock(XTAL::u(2250000)); config.set_default_layout(layout_novag_mk1); } @@ -449,17 +449,17 @@ void cmpchess_state::cncchess(machine_config &config) cmpchess2(config); /* basic machine hardware */ - m_maincpu->set_clock(2000000); // LC circuit, measured 2MHz + m_maincpu->set_clock(XTAL::u(2000000)); // LC circuit, measured 2MHz m_maincpu->set_addrmap(AS_PROGRAM, &cmpchess_state::cncchess_map); m_maincpu->set_addrmap(AS_IO, &cmpchess_state::cncchess_io); - subdevice("smi")->set_clock(2000000); + subdevice("smi")->set_clock(XTAL::u(2000000)); config.set_default_layout(layout_conic_cchess); /* sound hardware */ SPEAKER(config, "speaker").front_center(); - BEEP(config, m_beeper, 2000); // wrong, see TODO + BEEP(config, m_beeper, XTAL::u(2000)); // wrong, see TODO m_beeper->add_route(ALL_OUTPUTS, "speaker", 0.25); TIMER(config, "beeper_off").configure_generic(FUNC(cmpchess_state::beeper_off)); } diff --git a/src/mame/chess/conic_cchess2.cpp b/src/mame/chess/conic_cchess2.cpp index f2613fee8a9..2151659bf88 100644 --- a/src/mame/chess/conic_cchess2.cpp +++ b/src/mame/chess/conic_cchess2.cpp @@ -237,14 +237,14 @@ INPUT_PORTS_END void cchess2_state::cncchess2(machine_config &config) { // basic machine hardware - M6504(config, m_maincpu, 1000000); // approximation, no XTAL + M6504(config, m_maincpu, XTAL::u(1000000)); // approximation, no XTAL m_maincpu->set_addrmap(AS_PROGRAM, &cchess2_state::main_map); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->writepa_handler().set(FUNC(cchess2_state::pia0_pa_w)); m_pia[0]->writepb_handler().set(FUNC(cchess2_state::pia0_pb_w)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set(FUNC(cchess2_state::pia1_pa_r)); m_pia[1]->readpb_handler().set(FUNC(cchess2_state::pia1_pb_r)); m_pia[1]->writepb_handler().set(FUNC(cchess2_state::pia1_pb_w)); diff --git a/src/mame/chess/tasc.cpp b/src/mame/chess/tasc.cpp index 72ddff1c5f7..f0f931b4a2d 100644 --- a/src/mame/chess/tasc.cpp +++ b/src/mame/chess/tasc.cpp @@ -321,7 +321,7 @@ void tasc_state::tasc(machine_config &config) subdevice("smartboard:board")->set_nvram_enable(true); /* video hardware */ - LM24014H(config, m_lcd, 0); + LM24014H(config, m_lcd); m_lcd->set_fs(1); // font size 6x8 config.set_default_layout(layout_tascr30); diff --git a/src/mame/chess/yeno_532xl.cpp b/src/mame/chess/yeno_532xl.cpp index 4f6ebdbf736..26a5ac43322 100644 --- a/src/mame/chess/yeno_532xl.cpp +++ b/src/mame/chess/yeno_532xl.cpp @@ -247,7 +247,7 @@ void y532xl_state::y532xl(machine_config &config) m_board->set_nvram_enable(true); // video hardware - HD61603(config, m_lcd, 0); + HD61603(config, m_lcd); m_lcd->write_segs().set(FUNC(y532xl_state::lcd_seg_w)); PWM_DISPLAY(config, m_display).set_size(9, 8); diff --git a/src/mame/chromatics/cgc7900.cpp b/src/mame/chromatics/cgc7900.cpp index 40911469fb6..c2f11ea737b 100644 --- a/src/mame/chromatics/cgc7900.cpp +++ b/src/mame/chromatics/cgc7900.cpp @@ -468,7 +468,7 @@ void cgc7900_state::cgc7900(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &cgc7900_state::cgc7900_mem); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cgc7900_state::cpu_space_map); - i8035_device &kbmcu(I8035(config, I8035_TAG, 1000000)); + i8035_device &kbmcu(I8035(config, I8035_TAG, XTAL::u(1000000))); kbmcu.set_addrmap(AS_PROGRAM, &cgc7900_state::keyboard_mem); kbmcu.set_disable(); @@ -484,7 +484,7 @@ void cgc7900_state::cgc7900(machine_config &config) AY8910(config, AY8910_TAG, XTAL(28'480'000)/16).add_route(ALL_OUTPUTS, "mono", 0.25); /* devices */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(cgc7900_state::kbd_put)); mm58167_device &rtc(MM58167(config, MM58167_TAG, XTAL(32'768))); @@ -496,7 +496,7 @@ void cgc7900_state::cgc7900(machine_config &config) k1135a.ft_handler().set(m_i8251_1, FUNC(i8251_device::write_txc)); k1135a.ft_handler().append(m_i8251_1, FUNC(i8251_device::write_rxc)); - I8251(config, m_i8251_0, 0); + I8251(config, m_i8251_0); m_i8251_0->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_i8251_0->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_i8251_0->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -507,7 +507,7 @@ void cgc7900_state::cgc7900(machine_config &config) rs232.rxd_handler().set(m_i8251_0, FUNC(i8251_device::write_rxd)); rs232.dsr_handler().set(m_i8251_0, FUNC(i8251_device::write_dsr)); - I8251(config, m_i8251_1, 0); + I8251(config, m_i8251_1); m_i8251_1->txd_handler().set("rs449", FUNC(rs232_port_device::write_txd)); m_i8251_1->dtr_handler().set("rs449", FUNC(rs232_port_device::write_dtr)); m_i8251_1->rts_handler().set("rs449", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/cinematronics/cchasm.cpp b/src/mame/cinematronics/cchasm.cpp index a67396c9923..b7ee7062458 100644 --- a/src/mame/cinematronics/cchasm.cpp +++ b/src/mame/cinematronics/cchasm.cpp @@ -467,12 +467,12 @@ void cchasm_state::cchasm(machine_config &config) M68000(config, m_maincpu, CCHASM_68K_CLOCK); /* 8 MHz (from schematics) */ m_maincpu->set_addrmap(AS_PROGRAM, &cchasm_state::memmap); - Z80(config, m_audiocpu, 3584229); /* 3.58 MHz (from schematics) */ + Z80(config, m_audiocpu, XTAL::u(3584229)); /* 3.58 MHz (from schematics) */ m_audiocpu->set_daisy_config(daisy_chain); m_audiocpu->set_addrmap(AS_PROGRAM, &cchasm_state::sound_memmap); m_audiocpu->set_addrmap(AS_IO, &cchasm_state::sound_portmap); - Z80CTC(config, m_ctc, 3584229 /* same as "audiocpu" */); + Z80CTC(config, m_ctc, XTAL::u(3584229) /* same as "audiocpu" */); m_ctc->intr_callback().set_inputline(m_audiocpu, INPUT_LINE_IRQ0); m_ctc->zc_callback<1>().set(FUNC(cchasm_state::ctc_timer_1_w)); m_ctc->zc_callback<2>().set(FUNC(cchasm_state::ctc_timer_2_w)); @@ -480,7 +480,7 @@ void cchasm_state::cchasm(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - VECTOR(config, m_vector, 0); + VECTOR(config, m_vector); SCREEN(config, m_screen, SCREEN_TYPE_VECTOR); m_screen->set_refresh_hz(40); m_screen->set_size(400, 300); @@ -495,16 +495,16 @@ void cchasm_state::cchasm(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch3); GENERIC_LATCH_8(config, m_soundlatch4); - AY8910(config, "ay1", 1818182).add_route(ALL_OUTPUTS, "speaker", 0.15); + AY8910(config, "ay1", XTAL::u(1818182)).add_route(ALL_OUTPUTS, "speaker", 0.15); - AY8910(config, "ay2", 1818182).add_route(ALL_OUTPUTS, "speaker", 0.15); + AY8910(config, "ay2", XTAL::u(1818182)).add_route(ALL_OUTPUTS, "speaker", 0.15); - DAC_1BIT(config, m_dac1, 0).add_route(ALL_OUTPUTS, "speaker", 0.375); - DAC_1BIT(config, m_dac2, 0).add_route(ALL_OUTPUTS, "speaker", 0.375); + DAC_1BIT(config, m_dac1).add_route(ALL_OUTPUTS, "speaker", 0.375); + DAC_1BIT(config, m_dac2).add_route(ALL_OUTPUTS, "speaker", 0.375); /* 6840 PTM */ ptm6840_device &ptm(PTM6840(config, "6840ptm", CCHASM_68K_CLOCK/10)); - ptm.set_external_clocks(0, (CCHASM_68K_CLOCK / 10).value(), 0); + ptm.set_external_clocks(XTAL(), CCHASM_68K_CLOCK / 10, XTAL()); ptm.irq_callback().set_inputline("maincpu", 4); } diff --git a/src/mame/cinematronics/cinemat.cpp b/src/mame/cinematronics/cinemat.cpp index 71a4b00c9a9..e895da81f95 100644 --- a/src/mame/cinematronics/cinemat.cpp +++ b/src/mame/cinematronics/cinemat.cpp @@ -1036,7 +1036,7 @@ void cinemat_state::cinemat_nojmi_4k(machine_config &config) m_outlatch->q_out_cb<6>().set(FUNC(cinemat_state::vector_control_w)); // video hardware - VECTOR(config, "vector", 0); + VECTOR(config, "vector"); SCREEN(config, m_screen, SCREEN_TYPE_VECTOR); m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE); m_screen->set_refresh_hz(MASTER_CLOCK/4/16/16/16/16/2); @@ -1089,7 +1089,7 @@ void cinemat_state::spacewar(machine_config &config) cinemat_nojmi_4k(config); SPEAKER(config, "mono").front_center(); - SPACE_WARS_AUDIO(config, "soundboard", 0) + SPACE_WARS_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); @@ -1101,7 +1101,7 @@ void cinemat_state::barrier(machine_config &config) cinemat_jmi_4k(config); SPEAKER(config, "mono").front_center(); - BARRIER_AUDIO(config, "soundboard", 0) + BARRIER_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1117,7 +1117,7 @@ void cinemat_state::speedfrk(machine_config &config) cinemat_nojmi_8k(config); SPEAKER(config, "mono").front_center(); - SPEED_FREAK_AUDIO(config, "soundboard", 0) + SPEED_FREAK_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); // m_outlatch->q_out_cb<1>().set(FUNC(cinemat_state::speedfrk_start_led_w)); @@ -1128,7 +1128,7 @@ void cinemat_state::starhawk(machine_config &config) cinemat_jmi_4k(config); SPEAKER(config, "mono").front_center(); - STAR_HAWK_AUDIO(config, "soundboard", 0) + STAR_HAWK_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1138,7 +1138,7 @@ void cinemat_16level_state::sundance(machine_config &config) cinemat_jmi_8k(config); SPEAKER(config, "mono").front_center(); - SUNDANCE_AUDIO(config, "soundboard", 0) + SUNDANCE_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1148,7 +1148,7 @@ void cinemat_state::tailg(machine_config &config) cinemat_nojmi_8k(config); SPEAKER(config, "mono").front_center(); - TAIL_GUNNER_AUDIO(config, "soundboard", 0) + TAIL_GUNNER_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); m_outlatch->q_out_cb<7>().set(FUNC(cinemat_state::mux_select_w)); @@ -1159,7 +1159,7 @@ void cinemat_state::warrior(machine_config &config) cinemat_jmi_8k(config); SPEAKER(config, "mono").front_center(); - WARRIOR_AUDIO(config, "soundboard", 0) + WARRIOR_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1169,7 +1169,7 @@ void cinemat_state::armora(machine_config &config) cinemat_jmi_16k(config); SPEAKER(config, "mono").front_center(); - ARMOR_ATTACK_AUDIO(config, "soundboard", 0) + ARMOR_ATTACK_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1179,7 +1179,7 @@ void cinemat_state::ripoff(machine_config &config) cinemat_jmi_8k(config); SPEAKER(config, "mono").front_center(); - RIPOFF_AUDIO(config, "soundboard", 0) + RIPOFF_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1189,7 +1189,7 @@ void cinemat_state::starcas(machine_config &config) cinemat_jmi_8k(config); SPEAKER(config, "mono").front_center(); - STAR_CASTLE_AUDIO(config, "soundboard", 0) + STAR_CASTLE_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1199,7 +1199,7 @@ void cinemat_64level_state::solarq(machine_config &config) cinemat_jmi_16k(config); SPEAKER(config, "mono").front_center(); - SOLAR_QUEST_AUDIO(config, "soundboard", 0) + SOLAR_QUEST_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1209,7 +1209,7 @@ void cinemat_color_state::boxingb(machine_config &config) cinemat_jmi_32k(config); SPEAKER(config, "mono").front_center(); - BOXING_BUGS_AUDIO(config, "soundboard", 0) + BOXING_BUGS_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); m_outlatch->q_out_cb<7>().append(FUNC(cinemat_state::mux_select_w)); @@ -1223,7 +1223,7 @@ void cinemat_state::wotw(machine_config &config) m_screen->set_visarea(0, 1120, 0, 767); SPEAKER(config, "mono").front_center(); - WAR_OF_THE_WORLDS_AUDIO(config, "soundboard", 0) + WAR_OF_THE_WORLDS_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1233,7 +1233,7 @@ void cinemat_color_state::wotwc(machine_config &config) cinemat_jmi_16k(config); SPEAKER(config, "mono").front_center(); - WAR_OF_THE_WORLDS_AUDIO(config, "soundboard", 0) + WAR_OF_THE_WORLDS_AUDIO(config, "soundboard") .configure_latch_inputs(*m_outlatch) .add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/cinematronics/cinemat_a.cpp b/src/mame/cinematronics/cinemat_a.cpp index 866ed382711..4a7591b609c 100644 --- a/src/mame/cinematronics/cinemat_a.cpp +++ b/src/mame/cinematronics/cinemat_a.cpp @@ -45,7 +45,7 @@ * *************************************/ -cinemat_audio_device_base::cinemat_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale) : +cinemat_audio_device_base::cinemat_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale) : device_t(mconfig, type, tag, owner, clock), device_mixer_interface(mconfig, *this), m_out_input(*this, "sound_nl:out_%u", 0), @@ -76,7 +76,7 @@ cinemat_audio_device_base &cinemat_audio_device_base::configure_latch_inputs(ls2 void cinemat_audio_device_base::device_add_mconfig(machine_config &config) { - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(m_netlist) .add_route(ALL_OUTPUTS, *this, 1.0); @@ -122,7 +122,7 @@ void cinemat_audio_device_base::input_set(int bit, int state) DEFINE_DEVICE_TYPE(SPACE_WARS_AUDIO, spacewar_audio_device, "spacewar_audio", "Space Wars Sound Board") -spacewar_audio_device::spacewar_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +spacewar_audio_device::spacewar_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, SPACE_WARS_AUDIO, tag, owner, clock, 0x1f, NETLIST_NAME(spacewar), 4.5) { } @@ -137,7 +137,7 @@ spacewar_audio_device::spacewar_audio_device(const machine_config &mconfig, cons DEFINE_DEVICE_TYPE(BARRIER_AUDIO, barrier_audio_device, "barrier_audio", "Barrier Sound Board") -barrier_audio_device::barrier_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +barrier_audio_device::barrier_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, BARRIER_AUDIO, tag, owner, clock, 0x07, NETLIST_NAME(barrier), 6.1) { } @@ -152,7 +152,7 @@ barrier_audio_device::barrier_audio_device(const machine_config &mconfig, const DEFINE_DEVICE_TYPE(SPEED_FREAK_AUDIO, speedfrk_audio_device, "speedfrk_audio", "Speed Freak Sound Board") -speedfrk_audio_device::speedfrk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +speedfrk_audio_device::speedfrk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, SPEED_FREAK_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(speedfrk), 0.35) { } @@ -167,7 +167,7 @@ speedfrk_audio_device::speedfrk_audio_device(const machine_config &mconfig, cons DEFINE_DEVICE_TYPE(STAR_HAWK_AUDIO, starhawk_audio_device, "starhawk_audio", "Star Hawk Sound Board") -starhawk_audio_device::starhawk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +starhawk_audio_device::starhawk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, STAR_HAWK_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(starhawk), 1.5) { } @@ -182,7 +182,7 @@ starhawk_audio_device::starhawk_audio_device(const machine_config &mconfig, cons DEFINE_DEVICE_TYPE(SUNDANCE_AUDIO, sundance_audio_device, "sundance_audio", "Sundance Sound Board") -sundance_audio_device::sundance_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sundance_audio_device::sundance_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, SUNDANCE_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(sundance), 1.0) { } @@ -197,7 +197,7 @@ sundance_audio_device::sundance_audio_device(const machine_config &mconfig, cons DEFINE_DEVICE_TYPE(TAIL_GUNNER_AUDIO, tailg_audio_device, "tailg_audio", "Tail Gunner Sound Board") -tailg_audio_device::tailg_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tailg_audio_device::tailg_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, TAIL_GUNNER_AUDIO, tag, owner, clock, 0x1f, NETLIST_NAME(tailg), 2.2) { } @@ -212,7 +212,7 @@ tailg_audio_device::tailg_audio_device(const machine_config &mconfig, const char DEFINE_DEVICE_TYPE(WARRIOR_AUDIO, warrior_audio_device, "warrior_audio", "Warrior Sound Board") -warrior_audio_device::warrior_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +warrior_audio_device::warrior_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, WARRIOR_AUDIO, tag, owner, clock, 0x1f, NETLIST_NAME(warrior), 1.5) { } @@ -227,7 +227,7 @@ warrior_audio_device::warrior_audio_device(const machine_config &mconfig, const DEFINE_DEVICE_TYPE(ARMOR_ATTACK_AUDIO, armora_audio_device, "armora_audio", "Armor Atrack Sound Board") -armora_audio_device::armora_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +armora_audio_device::armora_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, ARMOR_ATTACK_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(armora), 0.15) { } @@ -242,7 +242,7 @@ armora_audio_device::armora_audio_device(const machine_config &mconfig, const ch DEFINE_DEVICE_TYPE(RIPOFF_AUDIO, ripoff_audio_device, "ripoff_audio", "Rip Off Sound Board") -ripoff_audio_device::ripoff_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ripoff_audio_device::ripoff_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, RIPOFF_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(ripoff), 0.61) { } @@ -257,7 +257,7 @@ ripoff_audio_device::ripoff_audio_device(const machine_config &mconfig, const ch DEFINE_DEVICE_TYPE(STAR_CASTLE_AUDIO, starcas_audio_device, "starcas_audio", "Star Castle Sound Board") -starcas_audio_device::starcas_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +starcas_audio_device::starcas_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, STAR_CASTLE_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(starcas), 0.15) { } @@ -272,7 +272,7 @@ starcas_audio_device::starcas_audio_device(const machine_config &mconfig, const DEFINE_DEVICE_TYPE(SOLAR_QUEST_AUDIO, solarq_audio_device, "solarq_audio", "Solar Quest Sound Board") -solarq_audio_device::solarq_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +solarq_audio_device::solarq_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, SOLAR_QUEST_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(solarq), 0.15) { } @@ -287,7 +287,7 @@ solarq_audio_device::solarq_audio_device(const machine_config &mconfig, const ch DEFINE_DEVICE_TYPE(BOXING_BUGS_AUDIO, boxingb_audio_device, "boxingb_audio", "Boxing Bugs Sound Board") -boxingb_audio_device::boxingb_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +boxingb_audio_device::boxingb_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, BOXING_BUGS_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(boxingb), 0.15) { } @@ -302,7 +302,7 @@ boxingb_audio_device::boxingb_audio_device(const machine_config &mconfig, const DEFINE_DEVICE_TYPE(WAR_OF_THE_WORLDS_AUDIO, wotw_audio_device, "wotw_audio", "War of the Worlds Sound Board") -wotw_audio_device::wotw_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +wotw_audio_device::wotw_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cinemat_audio_device_base(mconfig, WAR_OF_THE_WORLDS_AUDIO, tag, owner, clock, 0x9f, NETLIST_NAME(wotw), 0.15) { } @@ -424,12 +424,12 @@ static const z80_daisy_config daisy_chain[] = void demon_state::demon_sound(machine_config &config) { /* basic machine hardware */ - z80_device& audiocpu(Z80(config, "audiocpu", 3579545)); + z80_device& audiocpu(Z80(config, "audiocpu", XTAL::u(3579545))); audiocpu.set_daisy_config(daisy_chain); audiocpu.set_addrmap(AS_PROGRAM, &demon_state::demon_sound_map); audiocpu.set_addrmap(AS_IO, &demon_state::demon_sound_ports); - z80ctc_device& ctc(Z80CTC(config, "ctc", 3579545 /* same as "audiocpu" */)); + z80ctc_device& ctc(Z80CTC(config, "ctc", XTAL::u(3579545) /* same as "audiocpu" */)); ctc.intr_callback().set_inputline("audiocpu", INPUT_LINE_IRQ0); m_outlatch->q_out_cb<4>().set(FUNC(demon_state::demon_sound4_w)); @@ -437,15 +437,15 @@ void demon_state::demon_sound(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay1, 3579545); + AY8910(config, m_ay1, XTAL::u(3579545)); m_ay1->port_a_read_callback().set(FUNC(demon_state::sound_porta_r)); m_ay1->port_b_read_callback().set(FUNC(demon_state::sound_portb_r)); m_ay1->port_b_write_callback().set(FUNC(demon_state::sound_portb_w)); m_ay1->add_route(ALL_OUTPUTS, "mono", 0.25); - AY8910(config, "ay2", 3579545).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8910(config, "ay2", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 0.25); - ay8910_device &ay3(AY8910(config, "ay3", 3579545)); + ay8910_device &ay3(AY8910(config, "ay3", XTAL::u(3579545))); ay3.port_b_write_callback().set(FUNC(demon_state::sound_output_w)); ay3.add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/cinematronics/cinemat_a.h b/src/mame/cinematronics/cinemat_a.h index dd7791668f9..a4f11b2464d 100644 --- a/src/mame/cinematronics/cinemat_a.h +++ b/src/mame/cinematronics/cinemat_a.h @@ -16,7 +16,7 @@ public: cinemat_audio_device_base &configure_latch_inputs(ls259_device &latch, u8 mask = 0); protected: - cinemat_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale); + cinemat_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -37,91 +37,91 @@ private: class spacewar_audio_device : public cinemat_audio_device_base { public: - spacewar_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + spacewar_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class barrier_audio_device : public cinemat_audio_device_base { public: - barrier_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + barrier_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class speedfrk_audio_device : public cinemat_audio_device_base { public: - speedfrk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + speedfrk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class starhawk_audio_device : public cinemat_audio_device_base { public: - starhawk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + starhawk_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sundance_audio_device : public cinemat_audio_device_base { public: - sundance_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sundance_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tailg_audio_device : public cinemat_audio_device_base { public: - tailg_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tailg_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class warrior_audio_device : public cinemat_audio_device_base { public: - warrior_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + warrior_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class armora_audio_device : public cinemat_audio_device_base { public: - armora_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + armora_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ripoff_audio_device : public cinemat_audio_device_base { public: - ripoff_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ripoff_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class starcas_audio_device : public cinemat_audio_device_base { public: - starcas_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + starcas_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class solarq_audio_device : public cinemat_audio_device_base { public: - solarq_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + solarq_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class boxingb_audio_device : public cinemat_audio_device_base { public: - boxingb_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + boxingb_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class wotw_audio_device : public cinemat_audio_device_base { public: - wotw_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + wotw_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/mame/cinematronics/dlair.cpp b/src/mame/cinematronics/dlair.cpp index 7f2490d1a20..8d95c00f2f7 100644 --- a/src/mame/cinematronics/dlair.cpp +++ b/src/mame/cinematronics/dlair.cpp @@ -157,8 +157,8 @@ private: * *************************************/ -#define MASTER_CLOCK_US 16000000 -#define MASTER_CLOCK_EURO 14318180 +#define MASTER_CLOCK_US XTAL::u(16000000) +#define MASTER_CLOCK_EURO XTAL::u(14318180) @@ -728,7 +728,7 @@ void dlair_state::dlair_base(machine_config &config) /* basic machine hardware */ Z80(config, m_maincpu, MASTER_CLOCK_US/4); m_maincpu->set_addrmap(AS_PROGRAM, &dlair_state::dlus_map); - m_maincpu->set_periodic_int(FUNC(dlair_state::irq0_line_hold), attotime::from_hz((double)MASTER_CLOCK_US/8/16/16/16/16)); + m_maincpu->set_periodic_int(FUNC(dlair_state::irq0_line_hold), attotime::from_hz(MASTER_CLOCK_US.dvalue()/8/16/16/16/16)); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -744,7 +744,7 @@ void dlair_state::dlair_base(machine_config &config) void dlair_state::dlair_pr7820(machine_config &config) { dlair_base(config); - PIONEER_PR7820(config, m_pr7820, 0); + PIONEER_PR7820(config, m_pr7820); m_pr7820->add_route(0, "lspeaker", 1.0); m_pr7820->add_route(1, "rspeaker", 1.0); m_pr7820->add_ntsc_screen(config, "screen"); @@ -754,7 +754,7 @@ void dlair_state::dlair_pr7820(machine_config &config) void dlair_state::dlair_ldv1000(machine_config &config) { dlair_base(config); - PIONEER_LDV1000(config, m_ldv1000, 0); + PIONEER_LDV1000(config, m_ldv1000); m_ldv1000->add_route(0, "lspeaker", 1.0); m_ldv1000->add_route(1, "rspeaker", 1.0); m_ldv1000->add_ntsc_screen(config, "screen"); @@ -779,7 +779,7 @@ void dlair_state::dleuro(machine_config &config) WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(MASTER_CLOCK_EURO/(16*16*16*16*16*8))); - PHILIPS_22VP932(config, m_22vp932, 0); + PHILIPS_22VP932(config, m_22vp932); m_22vp932->set_overlay(256, 256, FUNC(dlair_state::screen_update_dleuro)); m_22vp932->add_route(0, "lspeaker", 1.0); m_22vp932->add_route(1, "rspeaker", 1.0); diff --git a/src/mame/cinematronics/embargo.cpp b/src/mame/cinematronics/embargo.cpp index a157629901a..c916a44ce3d 100644 --- a/src/mame/cinematronics/embargo.cpp +++ b/src/mame/cinematronics/embargo.cpp @@ -270,7 +270,7 @@ void embargo_state::machine_reset() void embargo_state::embargo(machine_config &config) { // basic machine hardware - S2650(config, m_maincpu, 625000); + S2650(config, m_maincpu, XTAL::u(625000)); m_maincpu->set_addrmap(AS_PROGRAM, &embargo_state::main_map); m_maincpu->set_addrmap(AS_IO, &embargo_state::main_io_map); m_maincpu->set_addrmap(AS_DATA, &embargo_state::main_data_map); diff --git a/src/mame/cinematronics/leland.cpp b/src/mame/cinematronics/leland.cpp index 4324878bffb..ac442e90060 100644 --- a/src/mame/cinematronics/leland.cpp +++ b/src/mame/cinematronics/leland.cpp @@ -1143,22 +1143,22 @@ void leland_state::leland(machine_config &config) SPEAKER(config, "speaker").front_center(); // only one of the AY sockets is populated - AY8910(config, m_ay8910, 10000000/6); + AY8910(config, m_ay8910, XTAL::u(10000000)/6); m_ay8910->set_flags(AY8910_SINGLE_OUTPUT); m_ay8910->set_resistors_load(1000, 0, 0); m_ay8910->port_a_read_callback().set(FUNC(leland_state::sound_port_r)); m_ay8910->port_a_write_callback().set(FUNC(leland_state::sound_port_w)); m_ay8910->add_route(ALL_OUTPUTS, "speaker", 0.25); -// AY8912(config, m_ay8912, 10000000/6); +// AY8912(config, m_ay8912, XTAL::u(10000000)/6); // m_ay8912->set_flags(AY8910_SINGLE_OUTPUT); // m_ay8912->set_resistors_load(1000, 0, 0); // m_ay8912->port_a_read_callback().set(FUNC(leland_state::sound_port_r)); // m_ay8912->port_a_write_callback().set(FUNC(leland_state::sound_port_w)); // m_ay8912->add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_8BIT_BINARY_WEIGHTED(config, m_dac[0], 0).add_route(ALL_OUTPUTS, "speaker", 0.0625); // ls374.u79 + r17-r23 (24k,12k,6.2k,3k,1.5k,750,390,180) - DAC_8BIT_BINARY_WEIGHTED(config, m_dac[1], 0).add_route(ALL_OUTPUTS, "speaker", 0.0625); // ls374.u88 + r27-r34 (24k,12k,6.2k,3k,1.5k,750,390,180) + DAC_8BIT_BINARY_WEIGHTED(config, m_dac[0]).add_route(ALL_OUTPUTS, "speaker", 0.0625); // ls374.u79 + r17-r23 (24k,12k,6.2k,3k,1.5k,750,390,180) + DAC_8BIT_BINARY_WEIGHTED(config, m_dac[1]).add_route(ALL_OUTPUTS, "speaker", 0.0625); // ls374.u88 + r27-r34 (24k,12k,6.2k,3k,1.5k,750,390,180) } @@ -1170,7 +1170,7 @@ void redline_state::redline(machine_config &config) m_master->set_addrmap(AS_IO, &redline_state::master_redline_map_io); /* sound hardware */ - REDLINE_80186(config, m_sound, 0).set_master_cpu_tag(m_master); + REDLINE_80186(config, m_sound).set_master_cpu_tag(m_master); } @@ -1179,7 +1179,7 @@ void redline_state::quarterb(machine_config &config) redline(config); /* sound hardware */ - LELAND_80186(config.replace(), m_sound, 0).set_master_cpu_tag(m_master); + LELAND_80186(config.replace(), m_sound).set_master_cpu_tag(m_master); } @@ -1195,11 +1195,11 @@ void redline_state::lelandi(machine_config &config) void ataxx_state::ataxx(machine_config &config) { /* basic machine hardware */ - Z80(config, m_master, 6000000); + Z80(config, m_master, XTAL::u(6000000)); m_master->set_addrmap(AS_PROGRAM, &ataxx_state::master_map_program_2); m_master->set_addrmap(AS_IO, &ataxx_state::master_map_io_2); - Z80(config, m_slave, 6000000); + Z80(config, m_slave, XTAL::u(6000000)); m_slave->set_addrmap(AS_PROGRAM, &ataxx_state::slave_map_program); m_slave->set_addrmap(AS_IO, &ataxx_state::slave_map_io_2); @@ -1211,7 +1211,7 @@ void ataxx_state::ataxx(machine_config &config) ataxx_video(config); /* sound hardware */ - ATAXX_80186(config, m_sound, 0).set_master_cpu_tag(m_master); + ATAXX_80186(config, m_sound).set_master_cpu_tag(m_master); } @@ -1219,7 +1219,7 @@ void ataxx_state::wsf(machine_config &config) { ataxx(config); - WSF_80186(config.replace(), m_sound, 0).set_master_cpu_tag(m_master); + WSF_80186(config.replace(), m_sound).set_master_cpu_tag(m_master); } void ataxx_state::asylum(machine_config &config) diff --git a/src/mame/cinematronics/leland_a.cpp b/src/mame/cinematronics/leland_a.cpp index eb76aa34361..dac392df6a7 100644 --- a/src/mame/cinematronics/leland_a.cpp +++ b/src/mame/cinematronics/leland_a.cpp @@ -146,14 +146,14 @@ void leland_80186_sound_device::device_add_mconfig(machine_config &config) SPEAKER(config, "speaker").front_center(); for (int i = 0; i < 6; i++) { - AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // 74hc374.u31..6 + ad7524.u46..51 - DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0).set_output_range(0, 1); // 74hc374.u17..22 + rX2-rX9 (24k,12k,6.2k,3k,1.5k,750,360,160) where X is 0..5 + AD7524(config, m_dac[i]).add_route(ALL_OUTPUTS, "speaker", 0.2); // 74hc374.u31..6 + ad7524.u46..51 + DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i]).set_output_range(0, 1); // 74hc374.u17..22 + rX2-rX9 (24k,12k,6.2k,3k,1.5k,750,360,160) where X is 0..5 m_dacvol[i]->add_route(0, m_dac[i], 1.0, DAC_INPUT_RANGE_HI); m_dacvol[i]->add_route(0, m_dac[i], -1.0, DAC_INPUT_RANGE_LO); } - AD7533(config, "dac9", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // ad7533.u64 + AD7533(config, "dac9").add_route(ALL_OUTPUTS, "speaker", 1.0); // ad7533.u64 - PIT8254(config, m_pit[0], 0); + PIT8254(config, m_pit[0]); m_pit[0]->set_clk<0>(4000000); m_pit[0]->out_handler<0>().set(m_audiocpu, FUNC(i80186_cpu_device::drq0_w)); m_pit[0]->set_clk<1>(4000000); @@ -161,7 +161,7 @@ void leland_80186_sound_device::device_add_mconfig(machine_config &config) m_pit[0]->set_clk<2>(4000000); m_pit[0]->out_handler<2>().set(FUNC(leland_80186_sound_device::pit0_2_w)); - PIT8254(config, m_pit[1], 0); + PIT8254(config, m_pit[1]); m_pit[1]->set_clk<0>(4000000); m_pit[1]->out_handler<0>().set(FUNC(leland_80186_sound_device::pit1_0_w)); m_pit[1]->set_clk<1>(4000000); @@ -182,13 +182,13 @@ void redline_80186_sound_device::device_add_mconfig(machine_config &config) SPEAKER(config, "speaker").front_center(); for (int i = 0; i < 8; i++) { - AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC - DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0).set_output_range(0, 1); + AD7524(config, m_dac[i]).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC + DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i]).set_output_range(0, 1); m_dacvol[i]->add_route(0, m_dac[i], 1.0, DAC_INPUT_RANGE_HI); m_dacvol[i]->add_route(0, m_dac[i], -1.0, DAC_INPUT_RANGE_LO); // unknown DAC } - PIT8254(config, m_pit[0], 0); + PIT8254(config, m_pit[0]); m_pit[0]->set_clk<0>(7000000); m_pit[0]->out_handler<0>().set(m_audiocpu, FUNC(i80186_cpu_device::drq0_w)); m_pit[0]->set_clk<1>(7000000); @@ -196,14 +196,14 @@ void redline_80186_sound_device::device_add_mconfig(machine_config &config) m_pit[0]->set_clk<2>(7000000); m_pit[0]->out_handler<2>().set(FUNC(leland_80186_sound_device::pit0_2_w)); - PIT8254(config, m_pit[1], 0); + PIT8254(config, m_pit[1]); m_pit[1]->set_clk<0>(7000000); m_pit[1]->out_handler<0>().set(FUNC(leland_80186_sound_device::pit1_0_w)); m_pit[1]->set_clk<1>(7000000); m_pit[1]->out_handler<1>().set(FUNC(leland_80186_sound_device::pit1_1_w)); m_pit[1]->set_clk<2>(7000000); - PIT8254(config, m_pit[2], 0); + PIT8254(config, m_pit[2]); m_pit[2]->set_clk<0>(7000000); m_pit[2]->out_handler<0>().set(FUNC(leland_80186_sound_device::pit1_2_w)); m_pit[2]->set_clk<1>(7000000); @@ -223,14 +223,14 @@ void ataxx_80186_sound_device::device_add_mconfig(machine_config &config) SPEAKER(config, "speaker").front_center(); for (int i = 0; i < 4; i++) { - AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC - DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0).set_output_range(0, 1); // unknown DAC + AD7524(config, m_dac[i]).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC + DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i]).set_output_range(0, 1); // unknown DAC m_dacvol[i]->add_route(0, m_dac[i], 1.0, DAC_INPUT_RANGE_HI); m_dacvol[i]->add_route(0, m_dac[i], -1.0, DAC_INPUT_RANGE_LO); } - AD7533(config, "dac9", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + AD7533(config, "dac9").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC - PIT8254(config, m_pit[0], 0); + PIT8254(config, m_pit[0]); m_pit[0]->set_clk<0>(4000000); m_pit[0]->out_handler<0>().set(m_audiocpu, FUNC(i80186_cpu_device::drq0_w)); m_pit[0]->set_clk<1>(4000000); @@ -253,19 +253,19 @@ void wsf_80186_sound_device::device_add_mconfig(machine_config &config) SPEAKER(config, "speaker").front_center(); for (int i = 0; i < 4; i++) { - AD7524(config, m_dac[i], 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC - DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i], 0).set_output_range(0, 1); // unknown DAC + AD7524(config, m_dac[i]).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC + DAC_8BIT_BINARY_WEIGHTED(config, m_dacvol[i]).set_output_range(0, 1); // unknown DAC m_dacvol[i]->add_route(0, m_dac[i], 1.0, DAC_INPUT_RANGE_HI); m_dacvol[i]->add_route(0, m_dac[i], -1.0, DAC_INPUT_RANGE_LO); // unknown DAC } - AD7533(config, "dac9", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + AD7533(config, "dac9").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC /* sound hardware */ - YM2151(config, m_ymsnd, 4000000); + YM2151(config, m_ymsnd, XTAL::u(4000000)); m_ymsnd->add_route(0, "speaker", 0.40); m_ymsnd->add_route(1, "speaker", 0.40); - PIT8254(config, m_pit[0], 0); + PIT8254(config, m_pit[0]); m_pit[0]->set_clk<0>(4000000); m_pit[0]->out_handler<0>().set(m_audiocpu, FUNC(i80186_cpu_device::drq0_w)); m_pit[0]->set_clk<1>(4000000); @@ -343,13 +343,13 @@ void leland_80186_sound_device::device_reset() DEFINE_DEVICE_TYPE(LELAND_80186, leland_80186_sound_device, "leland_80186_sound", "80186 DAC (Leland)") -leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : leland_80186_sound_device(mconfig, LELAND_80186, tag, owner, clock) { m_type = TYPE_LELAND; } -leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_soundlatch(*this, "soundlatch") , m_dac(*this, "dac%u", 1U) @@ -365,7 +365,7 @@ leland_80186_sound_device::leland_80186_sound_device(const machine_config &mconf DEFINE_DEVICE_TYPE(REDLINE_80186, redline_80186_sound_device, "redline_80186_sound", "80186 DAC (Redline Racer)") -redline_80186_sound_device::redline_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +redline_80186_sound_device::redline_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : leland_80186_sound_device(mconfig, REDLINE_80186, tag, owner, clock) { m_type = TYPE_REDLINE; @@ -373,7 +373,7 @@ redline_80186_sound_device::redline_80186_sound_device(const machine_config &mco DEFINE_DEVICE_TYPE(ATAXX_80186, ataxx_80186_sound_device, "ataxx_80186_sound", "80186 DAC (Ataxx)") -ataxx_80186_sound_device::ataxx_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ataxx_80186_sound_device::ataxx_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : leland_80186_sound_device(mconfig, ATAXX_80186, tag, owner, clock) { m_type = TYPE_ATAXX; @@ -381,7 +381,7 @@ ataxx_80186_sound_device::ataxx_80186_sound_device(const machine_config &mconfig DEFINE_DEVICE_TYPE(WSF_80186, wsf_80186_sound_device, "wsf_80186_sound", "80186 DAC (WSF)") -wsf_80186_sound_device::wsf_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +wsf_80186_sound_device::wsf_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : leland_80186_sound_device(mconfig, WSF_80186, tag, owner, clock) { m_type = TYPE_WSF; diff --git a/src/mame/cinematronics/leland_a.h b/src/mame/cinematronics/leland_a.h index f2e33db8609..a36a7f75323 100644 --- a/src/mame/cinematronics/leland_a.h +++ b/src/mame/cinematronics/leland_a.h @@ -20,7 +20,7 @@ class leland_80186_sound_device : public device_t { public: - leland_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + leland_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_master_cpu_tag(T &&tag) { m_master.set_tag(std::forward(tag)); } @@ -43,7 +43,7 @@ public: DECLARE_WRITE_LINE_MEMBER(pit1_2_w); protected: - leland_80186_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + leland_80186_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -94,7 +94,7 @@ private: class redline_80186_sound_device : public leland_80186_sound_device { public: - redline_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + redline_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void redline_dac_w(offs_t offset, u16 data); protected: @@ -107,7 +107,7 @@ private: class ataxx_80186_sound_device : public leland_80186_sound_device { public: - ataxx_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ataxx_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -117,7 +117,7 @@ protected: class wsf_80186_sound_device : public leland_80186_sound_device { public: - wsf_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + wsf_80186_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/cirsa/cirsa820xxx.cpp b/src/mame/cirsa/cirsa820xxx.cpp index 56866acc7c5..725b57bb094 100644 --- a/src/mame/cirsa/cirsa820xxx.cpp +++ b/src/mame/cirsa/cirsa820xxx.cpp @@ -114,14 +114,14 @@ INPUT_PORTS_END void cirsa820xxx_state::cirsa820xxx(machine_config &config) { - I8085A(config, m_maincpu, 6'000'000); // XTAL value was unreadable, guessed for now + I8085A(config, m_maincpu, XTAL::u(6'000'000)); // XTAL value was unreadable, guessed for now m_maincpu->set_addrmap(AS_PROGRAM, &cirsa820xxx_state::prg_map); m_maincpu->set_addrmap(AS_IO, &cirsa820xxx_state::io_map); PIT8254(config, "pit"); SPEAKER(config, "mono").front_center(); - ay8910_device &psg(AY8910(config, "psg", 6'000'000 / 4)); // XTAL value was unreadable, guessed for now. Unknown divider + ay8910_device &psg(AY8910(config, "psg", XTAL::u(6'000'000) / 4)); // XTAL value was unreadable, guessed for now. Unknown divider psg.port_a_read_callback().set_ioport("DSW1"); psg.port_b_read_callback().set_ioport("DSW2"); psg.add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/cirsa/cirsa910510.cpp b/src/mame/cirsa/cirsa910510.cpp index a299c2eed93..1ac55e86751 100644 --- a/src/mame/cirsa/cirsa910510.cpp +++ b/src/mame/cirsa/cirsa910510.cpp @@ -124,11 +124,11 @@ void cirsa910510_state::cirsa910510(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &cirsa910510_state::main_map); m_maincpu->set_addrmap(AS_IO, &cirsa910510_state::io_map); - I8155(config, "main_8155_0", 0); + I8155(config, "main_8155_0"); - I8155(config, "main_8155_1", 0); + I8155(config, "main_8155_1"); - I8155(config, "sound_8155", 0); // on sound PCB + I8155(config, "sound_8155"); // on sound PCB //I8256(config, "muart1", 18.432_MHz_XTAL / 3); diff --git a/src/mame/citoh/cit101.cpp b/src/mame/citoh/cit101.cpp index 094185b43be..0dfb0aea914 100644 --- a/src/mame/citoh/cit101.cpp +++ b/src/mame/citoh/cit101.cpp @@ -436,7 +436,7 @@ void cit101_state::cit101(machine_config &config) CIT101_KEYBOARD(config, "keyboard").txd_callback().set("kbduart", FUNC(i8251_device::write_rxd)); - pit8253_device &pit0(PIT8253(config, "pit0", 0)); + pit8253_device &pit0(PIT8253(config, "pit0")); pit0.set_clk<0>(6.144_MHz_XTAL / 4); pit0.set_clk<1>(6.144_MHz_XTAL / 4); //pit0.set_clk<2>(6.144_MHz_XTAL / 4); @@ -445,7 +445,7 @@ void cit101_state::cit101(machine_config &config) // OUT2 might be used for an internal expansion similar to the VT100 STP. // The output appears to be fixed to a 307.2 kHz rate; turning this off boosts driver performance. - pit8253_device &pit1(PIT8253(config, "pit1", 0)); + pit8253_device &pit1(PIT8253(config, "pit1")); pit1.set_clk<0>(6.144_MHz_XTAL / 4); pit1.set_clk<1>(6.144_MHz_XTAL / 4); pit1.set_clk<2>(6.144_MHz_XTAL / 4); @@ -454,7 +454,7 @@ void cit101_state::cit101(machine_config &config) pit1.out_handler<2>().set("kbduart", FUNC(i8251_device::write_txc)); pit1.out_handler<2>().append("kbduart", FUNC(i8251_device::write_rxc)); - i8255_device &ppi(I8255A(config, "ppi", 0)); + i8255_device &ppi(I8255A(config, "ppi")); ppi.out_pa_callback().set(FUNC(cit101_state::nvr_address_w)); ppi.in_pb_callback().set(m_nvr, FUNC(er2055_device::data)); ppi.out_pb_callback().set(m_nvr, FUNC(er2055_device::set_data)); diff --git a/src/mame/citoh/cit101_kbd.cpp b/src/mame/citoh/cit101_kbd.cpp index 5d3363bdc44..c9e3effaec8 100644 --- a/src/mame/citoh/cit101_kbd.cpp +++ b/src/mame/citoh/cit101_kbd.cpp @@ -62,7 +62,7 @@ DEFINE_DEVICE_TYPE(CIT101_KEYBOARD, cit101_keyboard_device, "cit101_kbd", "CIT-101 Keyboard") DEFINE_DEVICE_TYPE(CIT101E_KEYBOARD, cit101e_keyboard_device, "cit101e_kbd", "CIT-101e Keyboard") -cit101_keyboard_device::cit101_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +cit101_keyboard_device::cit101_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_mcu(*this, "mcu") , m_beeper(*this, "beeper") @@ -74,12 +74,12 @@ cit101_keyboard_device::cit101_keyboard_device(const machine_config &mconfig, de { } -cit101_keyboard_device::cit101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cit101_keyboard_device::cit101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cit101_keyboard_device(mconfig, CIT101_KEYBOARD, tag, owner, clock) { } -cit101e_keyboard_device::cit101e_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cit101e_keyboard_device::cit101e_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cit101_keyboard_device(mconfig, CIT101E_KEYBOARD, tag, owner, clock) { } @@ -368,7 +368,7 @@ void cit101_keyboard_device::device_add_mconfig(machine_config &config) m_mcu->t1_in_cb().set_ioport("MODIFIERS").bit(1); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 786).add_route(ALL_OUTPUTS, "mono", 0.5); // unknown frequency (original keyboard has a NE555) + BEEP(config, m_beeper, XTAL::u(786)).add_route(ALL_OUTPUTS, "mono", 0.5); // unknown frequency (original keyboard has a NE555) } diff --git a/src/mame/citoh/cit101_kbd.h b/src/mame/citoh/cit101_kbd.h index 1f3a842ad21..fd0e7de0ddb 100644 --- a/src/mame/citoh/cit101_kbd.h +++ b/src/mame/citoh/cit101_kbd.h @@ -25,7 +25,7 @@ class cit101_keyboard_device : public device_t { public: // device type constructor - cit101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cit101_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); static constexpr feature_type imperfect_features() { return feature::SOUND; } @@ -36,7 +36,7 @@ public: DECLARE_WRITE_LINE_MEMBER(write_rxd); protected: - cit101_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + cit101_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -75,7 +75,7 @@ class cit101e_keyboard_device : public cit101_keyboard_device { public: // device type constructor - cit101e_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cit101e_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/mame/citoh/cit220.cpp b/src/mame/citoh/cit220.cpp index 998f9552443..6ce45d343ee 100644 --- a/src/mame/citoh/cit220.cpp +++ b/src/mame/citoh/cit220.cpp @@ -84,7 +84,7 @@ WRITE_LINE_MEMBER(cit220_state::cols_w) { m_132_cols = !state; m_avdc->set_character_width(m_132_cols ? 9 : 10); - m_avdc->set_unscaled_clock(m_132_cols ? 22'096'000 / 9 : 14'916'000 / 10); + m_avdc->set_unscaled_clock(m_132_cols ? XTAL::u(22'096'000) / 9 : XTAL::u(14'916'000) / 10); } } @@ -159,17 +159,17 @@ INPUT_PORTS_END void cit220_state::cit220p(machine_config &config) { - I8085A(config, m_maincpu, 8'000'000); + I8085A(config, m_maincpu, XTAL::u(8'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &cit220_state::cit220p_mem_map); m_maincpu->set_addrmap(AS_IO, &cit220_state::cit220p_io_map); m_maincpu->out_sod_func().set(FUNC(cit220_state::sod_w)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - //m_screen->set_raw(14'916'000, 960, 0, 800, 259, 0, 240); - m_screen->set_raw(22'096'000, 1422, 0, 1188, 259, 0, 240); + //m_screen->set_raw(XTAL::u(14'916'000), 960, 0, 800, 259, 0, 240); + m_screen->set_raw(XTAL::u(22'096'000), 1422, 0, 1188, 259, 0, 240); m_screen->set_screen_update(m_avdc, FUNC(scn2674_device::screen_update)); - SCN2674(config, m_avdc, 22'096'000 / 9); + SCN2674(config, m_avdc, XTAL::u(22'096'000) / 9); m_avdc->intr_callback().set_inputline(m_maincpu, I8085_RST65_LINE); m_avdc->set_character_width(9); // 10 in 80-column modes m_avdc->set_display_callback(FUNC(cit220_state::draw_character)); @@ -177,13 +177,13 @@ void cit220_state::cit220p(machine_config &config) m_avdc->set_addrmap(1, &cit220_state::attr_map); m_avdc->set_screen(m_screen); - scn2681_device &duart(SCN2681(config, "duart", 3'686'400)); + scn2681_device &duart(SCN2681(config, "duart", XTAL::u(3'686'400))); duart.irq_cb().set_inputline(m_maincpu, I8085_RST55_LINE); duart.outport_cb().set("usart", FUNC(i8251_device::write_txc)).bit(3); duart.outport_cb().append("usart", FUNC(i8251_device::write_rxc)).bit(3); duart.outport_cb().append(FUNC(cit220_state::cols_w)).bit(7); - i8251_device &usart(I8251(config, "usart", 4'000'000)); + i8251_device &usart(I8251(config, "usart", XTAL::u(4'000'000))); usart.txd_handler().set("keyboard", FUNC(cit220p_keyboard_device::write_rxd)); cit220p_keyboard_device &keyboard(CIT220P_KEYBOARD(config, "keyboard")); diff --git a/src/mame/citoh/cit220_kbd.cpp b/src/mame/citoh/cit220_kbd.cpp index 3523e592ece..497c12f66e5 100644 --- a/src/mame/citoh/cit220_kbd.cpp +++ b/src/mame/citoh/cit220_kbd.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(CIT220P_KEYBOARD, cit220p_keyboard_device, "cit220p_kbd", "CIT-220+ Keyboard") -cit220p_keyboard_device::cit220p_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cit220p_keyboard_device::cit220p_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CIT220P_KEYBOARD, tag, owner, clock) , m_mcu(*this, "mcu") , m_beeper(*this, "beeper") @@ -234,7 +234,7 @@ ioport_constructor cit220p_keyboard_device::device_input_ports() const void cit220p_keyboard_device::device_add_mconfig(machine_config &config) { - I8035(config, m_mcu, 2376000); // type and clock guessed + I8035(config, m_mcu, XTAL::u(2376000)); // type and clock guessed m_mcu->set_addrmap(AS_PROGRAM, &cit220p_keyboard_device::prog_map); m_mcu->set_addrmap(AS_IO, &cit220p_keyboard_device::ext_map); m_mcu->bus_in_cb().set(FUNC(cit220p_keyboard_device::mcu_bus_r)); @@ -244,7 +244,7 @@ void cit220p_keyboard_device::device_add_mconfig(machine_config &config) m_mcu->t1_in_cb().set_ioport("MODIFIERS").bit(0); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1000).add_route(ALL_OUTPUTS, "mono", 1.0); // unknown frequency + BEEP(config, m_beeper, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 1.0); // unknown frequency } diff --git a/src/mame/citoh/cit220_kbd.h b/src/mame/citoh/cit220_kbd.h index f63b07daf47..d401b380402 100644 --- a/src/mame/citoh/cit220_kbd.h +++ b/src/mame/citoh/cit220_kbd.h @@ -20,7 +20,7 @@ class cit220p_keyboard_device : public device_t { public: // device type constructor - cit220p_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cit220p_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto txd_callback() { return m_txd_callback.bind(); } diff --git a/src/mame/coleco/adam.cpp b/src/mame/coleco/adam.cpp index 0fc80ecd6c4..ccc60a4f131 100644 --- a/src/mame/coleco/adam.cpp +++ b/src/mame/coleco/adam.cpp @@ -1058,7 +1058,7 @@ void adam_state::adam(machine_config &config) //m_psg->ready_cb().set_inputline(m_maincpu, Z80_INPUT_LINE_WAIT).invert(); // devices - ADAMNET(config, m_adamnet, 0); + ADAMNET(config, m_adamnet); ADAMNET_SLOT(config, "net1", m_adamnet, adamnet_devices, "kb"); ADAMNET_SLOT(config, "net2", m_adamnet, adamnet_devices, "prn"); ADAMNET_SLOT(config, "net3", m_adamnet, adamnet_devices, "ddp"); diff --git a/src/mame/comad/funybubl.cpp b/src/mame/comad/funybubl.cpp index e026e2c6139..e51d5a2b5c0 100644 --- a/src/mame/comad/funybubl.cpp +++ b/src/mame/comad/funybubl.cpp @@ -220,12 +220,12 @@ void funybubl_state::machine_start() void funybubl_state::funybubl(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 12000000/2); /* 6 MHz?? */ + Z80(config, m_maincpu, XTAL::u(12000000)/2); /* 6 MHz?? */ m_maincpu->set_addrmap(AS_PROGRAM, &funybubl_state::funybubl_map); m_maincpu->set_addrmap(AS_IO, &funybubl_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(funybubl_state::irq0_line_hold)); - Z80(config, m_audiocpu, 8000000/2); /* 4 MHz?? */ + Z80(config, m_audiocpu, XTAL::u(8000000)/2); /* 4 MHz?? */ m_audiocpu->set_addrmap(AS_PROGRAM, &funybubl_state::sound_map); ADDRESS_MAP_BANK(config, m_vrambank).set_map(&funybubl_state::vrambank_map).set_options(ENDIANNESS_LITTLE, 8, 13, 0x1000); @@ -249,7 +249,7 @@ void funybubl_state::funybubl(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); - OKIM6295(config, m_oki, 8000000/8, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(8000000)/8, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->set_addrmap(0, &funybubl_state::oki_map); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/comad/galspnbl.cpp b/src/mame/comad/galspnbl.cpp index cb94eae2e6a..8dde14aea8b 100644 --- a/src/mame/comad/galspnbl.cpp +++ b/src/mame/comad/galspnbl.cpp @@ -249,7 +249,7 @@ void galspnbl_state::galspnbl(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_galspnbl); PALETTE(config, m_palette, FUNC(galspnbl_state::galspnbl_palette)).set_format(palette_device::xBGR_444, 1024 + 32768); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); m_sprgen->set_bootleg(true); /* sound hardware */ diff --git a/src/mame/comad/zerozone.cpp b/src/mame/comad/zerozone.cpp index 2afcc9556e5..49ac0ff7aed 100644 --- a/src/mame/comad/zerozone.cpp +++ b/src/mame/comad/zerozone.cpp @@ -205,7 +205,7 @@ void zerozone_state::zerozone(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/commodore/cbm2.cpp b/src/mame/commodore/cbm2.cpp index 52dbc52afdd..81850b0cc06 100644 --- a/src/mame/commodore/cbm2.cpp +++ b/src/mame/commodore/cbm2.cpp @@ -2269,7 +2269,7 @@ void p500_state::p500_ntsc(machine_config &config) PLS100(config, m_pla1); PLS100(config, m_pla2); - TPI6525(config, m_tpi1, 0); + TPI6525(config, m_tpi1); m_tpi1->out_irq_cb().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_tpi1->in_pa_cb().set(FUNC(cbm2_state::tpi1_pa_r)); m_tpi1->out_pa_cb().set(FUNC(cbm2_state::tpi1_pa_w)); @@ -2278,7 +2278,7 @@ void p500_state::p500_ntsc(machine_config &config) m_tpi1->out_ca_cb().set(FUNC(p500_state::tpi1_ca_w)); m_tpi1->out_cb_cb().set(FUNC(p500_state::tpi1_cb_w)); - TPI6525(config, m_tpi2, 0); + TPI6525(config, m_tpi2); m_tpi2->out_pa_cb().set(FUNC(cbm2_state::tpi2_pa_w)); m_tpi2->out_pb_cb().set(FUNC(cbm2_state::tpi2_pb_w)); m_tpi2->in_pc_cb().set(FUNC(p500_state::tpi2_pc_r)); @@ -2303,11 +2303,11 @@ void p500_state::p500_ntsc(machine_config &config) m_cia->pb_wr_callback().set(m_user, FUNC(cbm2_user_port_device::d2_w)); m_cia->pc_wr_callback().set(m_user, FUNC(cbm2_user_port_device::pc_w)); - DS75160A(config, m_ieee1, 0); + DS75160A(config, m_ieee1); m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r)); m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w)); - DS75161A(config, m_ieee2, 0); + DS75161A(config, m_ieee2); m_ieee2->in_ren().set(IEEE488_TAG, FUNC(ieee488_device::ren_r)); m_ieee2->in_ifc().set(IEEE488_TAG, FUNC(ieee488_device::ifc_r)); m_ieee2->in_ndac().set(IEEE488_TAG, FUNC(ieee488_device::ndac_r)); @@ -2325,7 +2325,7 @@ void p500_state::p500_ntsc(machine_config &config) m_ieee2->out_atn().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w)); m_ieee2->out_srq().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w)); - IEEE488(config, m_ieee, 0); + IEEE488(config, m_ieee); ieee488_slot_device::add_cbm_defaults(config, "c8050"); m_ieee->srq_callback().set(m_tpi1, FUNC(tpi6525_device::i1_w)); @@ -2402,7 +2402,7 @@ void p500_state::p500_pal(machine_config &config) PLS100(config, m_pla1); PLS100(config, m_pla2); - TPI6525(config, m_tpi1, 0); + TPI6525(config, m_tpi1); m_tpi1->out_irq_cb().set("mainirq", FUNC(input_merger_device::in_w<1>)); m_tpi1->in_pa_cb().set(FUNC(cbm2_state::tpi1_pa_r)); m_tpi1->out_pa_cb().set(FUNC(cbm2_state::tpi1_pa_w)); @@ -2411,13 +2411,13 @@ void p500_state::p500_pal(machine_config &config) m_tpi1->out_ca_cb().set(FUNC(p500_state::tpi1_ca_w)); m_tpi1->out_cb_cb().set(FUNC(p500_state::tpi1_cb_w)); - TPI6525(config, m_tpi2, 0); + TPI6525(config, m_tpi2); m_tpi2->out_pa_cb().set(FUNC(cbm2_state::tpi2_pa_w)); m_tpi2->out_pb_cb().set(FUNC(cbm2_state::tpi2_pb_w)); m_tpi2->in_pc_cb().set(FUNC(p500_state::tpi2_pc_r)); m_tpi2->out_pc_cb().set(FUNC(p500_state::tpi2_pc_w)); - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(XTAL(1'843'200)); m_acia->irq_handler().set(m_tpi1, FUNC(tpi6525_device::i4_w)); m_acia->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); @@ -2433,11 +2433,11 @@ void p500_state::p500_pal(machine_config &config) m_cia->pb_wr_callback().set(m_user, FUNC(cbm2_user_port_device::d2_w)); m_cia->pc_wr_callback().set(m_user, FUNC(cbm2_user_port_device::pc_w)); - DS75160A(config, m_ieee1, 0); + DS75160A(config, m_ieee1); m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r)); m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w)); - DS75161A(config, m_ieee2, 0); + DS75161A(config, m_ieee2); m_ieee2->in_ren().set(IEEE488_TAG, FUNC(ieee488_device::ren_r)); m_ieee2->in_ifc().set(IEEE488_TAG, FUNC(ieee488_device::ifc_r)); m_ieee2->in_ndac().set(IEEE488_TAG, FUNC(ieee488_device::ndac_r)); @@ -2455,7 +2455,7 @@ void p500_state::p500_pal(machine_config &config) m_ieee2->out_atn().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w)); m_ieee2->out_srq().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w)); - IEEE488(config, m_ieee, 0); + IEEE488(config, m_ieee); ieee488_slot_device::add_cbm_defaults(config, "c8050"); m_ieee->srq_callback().set(m_tpi1, FUNC(tpi6525_device::i1_w)); @@ -2534,7 +2534,7 @@ void cbm2_state::cbm2lp_ntsc(machine_config &config) // devices PLS100(config, m_pla1); - TPI6525(config, m_tpi1, 0); + TPI6525(config, m_tpi1); m_tpi1->out_irq_cb().set("mainirq", FUNC(input_merger_device::in_w<1>)); m_tpi1->in_pa_cb().set(FUNC(cbm2_state::tpi1_pa_r)); m_tpi1->out_pa_cb().set(FUNC(cbm2_state::tpi1_pa_w)); @@ -2542,12 +2542,12 @@ void cbm2_state::cbm2lp_ntsc(machine_config &config) m_tpi1->out_pb_cb().set(FUNC(cbm2_state::tpi1_pb_w)); m_tpi1->out_ca_cb().set(FUNC(cbm2_state::tpi1_ca_w)); - TPI6525(config, m_tpi2, 0); + TPI6525(config, m_tpi2); m_tpi2->out_pa_cb().set(FUNC(cbm2_state::tpi2_pa_w)); m_tpi2->out_pb_cb().set(FUNC(cbm2_state::tpi2_pb_w)); m_tpi2->in_pc_cb().set(FUNC(cbm2_state::tpi2_pc_r)); - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(XTAL(1'843'200)); m_acia->irq_handler().set(m_tpi1, FUNC(tpi6525_device::i4_w)); m_acia->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); @@ -2563,11 +2563,11 @@ void cbm2_state::cbm2lp_ntsc(machine_config &config) m_cia->pb_wr_callback().set(m_user, FUNC(cbm2_user_port_device::d2_w)); m_cia->pc_wr_callback().set(m_user, FUNC(cbm2_user_port_device::pc_w)); - DS75160A(config, m_ieee1, 0); + DS75160A(config, m_ieee1); m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r)); m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w)); - DS75161A(config, m_ieee2, 0); + DS75161A(config, m_ieee2); m_ieee2->in_ren().set(IEEE488_TAG, FUNC(ieee488_device::ren_r)); m_ieee2->in_ifc().set(IEEE488_TAG, FUNC(ieee488_device::ifc_r)); m_ieee2->in_ndac().set(IEEE488_TAG, FUNC(ieee488_device::ndac_r)); @@ -2585,7 +2585,7 @@ void cbm2_state::cbm2lp_ntsc(machine_config &config) m_ieee2->out_atn().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w)); m_ieee2->out_srq().set(IEEE488_TAG, FUNC(ieee488_device::host_srq_w)); - IEEE488(config, m_ieee, 0); + IEEE488(config, m_ieee); ieee488_slot_device::add_cbm_defaults(config, "c8050"); m_ieee->srq_callback().set(m_tpi1, FUNC(tpi6525_device::i1_w)); @@ -2720,10 +2720,10 @@ void cbm2hp_state::bx256hp(machine_config &config) m_ext_cpu->set_addrmap(AS_IO, &cbm2hp_state::ext_io); m_ext_cpu->set_irq_acknowledge_callback(EXT_I8259A_TAG, FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_ext_pic, 0); + PIC8259(config, m_ext_pic); m_ext_pic->out_int_callback().set_inputline(m_ext_cpu, INPUT_LINE_IRQ0); - TPI6525(config, m_ext_tpi, 0); + TPI6525(config, m_ext_tpi); m_ext_tpi->in_pa_cb().set(m_ext_cia, FUNC(mos6526_device::pa_r)); m_ext_tpi->in_pb_cb().set(FUNC(cbm2_state::ext_tpi_pb_r)); m_ext_tpi->out_pb_cb().set(FUNC(cbm2_state::ext_tpi_pb_w)); @@ -2791,10 +2791,10 @@ void cbm2hp_state::cbm730(machine_config &config) m_ext_cpu->set_addrmap(AS_IO, &cbm2hp_state::ext_io); m_ext_cpu->set_irq_acknowledge_callback(EXT_I8259A_TAG, FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_ext_pic, 0); + PIC8259(config, m_ext_pic); m_ext_pic->out_int_callback().set_inputline(m_ext_cpu, INPUT_LINE_IRQ0); - TPI6525(config, m_ext_tpi, 0); + TPI6525(config, m_ext_tpi); m_ext_tpi->in_pa_cb().set(EXT_MOS6526_TAG, FUNC(mos6526_device::pa_r)); m_ext_tpi->in_pb_cb().set(FUNC(cbm2_state::ext_tpi_pb_r)); m_ext_tpi->out_pb_cb().set(FUNC(cbm2_state::ext_tpi_pb_w)); diff --git a/src/mame/commodore/clcd.cpp b/src/mame/commodore/clcd.cpp index 73513efadf5..50344127b3c 100644 --- a/src/mame/commodore/clcd.cpp +++ b/src/mame/commodore/clcd.cpp @@ -714,26 +714,26 @@ INPUT_PORTS_END void clcd_state::clcd(machine_config &config) { /* basic machine hardware */ - M65C02(config, m_maincpu, 1000000); + M65C02(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &clcd_state::clcd_mem); INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline("maincpu", m65c02_device::IRQ_LINE); - via6522_device &via0(R65C22(config, "via0", 1000000)); + via6522_device &via0(R65C22(config, "via0", XTAL::u(1000000))); via0.writepa_handler().set(FUNC(clcd_state::via0_pa_w)); via0.writepb_handler().set(FUNC(clcd_state::via0_pb_w)); via0.readpb_handler().set(FUNC(clcd_state::via0_pb_r)); via0.cb1_handler().set(FUNC(clcd_state::via0_cb1_w)); via0.irq_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); - via6522_device &via1(R65C22(config, "via1", 1000000)); + via6522_device &via1(R65C22(config, "via1", XTAL::u(1000000))); via1.writepa_handler().set(FUNC(clcd_state::via1_pa_w)); via1.writepb_handler().set(FUNC(clcd_state::via1_pb_w)); via1.irq_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); via1.ca2_handler().set(m_centronics, FUNC(centronics_device::write_strobe)).invert(); via1.cb2_handler().set("speaker", FUNC(speaker_sound_device::level_w)); - MOS6551(config, m_acia, 1000000); + MOS6551(config, m_acia, XTAL::u(1000000)); m_acia->set_xtal(XTAL(1'843'200)); m_acia->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); diff --git a/src/mame/commodore/mps1230.cpp b/src/mame/commodore/mps1230.cpp index 425d93fa6e9..0b0d4bf17ee 100644 --- a/src/mame/commodore/mps1230.cpp +++ b/src/mame/commodore/mps1230.cpp @@ -140,13 +140,13 @@ INPUT_PORTS_END void mps1230_state::mps1230(machine_config &config) { - UPD7810(config, m_maincpu, 11060000); + UPD7810(config, m_maincpu, XTAL::u(11060000)); m_maincpu->set_addrmap(AS_PROGRAM, &mps1230_state::mps1230_map); } void mps1230_state::mps1000(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mps1230_state::mps1230_map); } diff --git a/src/mame/commodore/pet.cpp b/src/mame/commodore/pet.cpp index b086fb65566..238b5cb8238 100644 --- a/src/mame/commodore/pet.cpp +++ b/src/mame/commodore/pet.cpp @@ -1671,7 +1671,7 @@ void pet_state::base_pet_devices(machine_config &config, const char *default_dri m_via->cb2_handler().set(FUNC(pet_state::via_cb2_w)); m_via->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set(FUNC(pet_state::pia1_pa_r)); m_pia1->readpb_handler().set(FUNC(pet_state::pia1_pb_r)); m_pia1->writepa_handler().set(FUNC(pet_state::pia1_pa_w)); @@ -1680,7 +1680,7 @@ void pet_state::base_pet_devices(machine_config &config, const char *default_dri m_pia1->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); m_pia1->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); m_pia2->readpa_handler().set(IEEE488_TAG, FUNC(ieee488_device::dio_r)); m_pia2->writepb_handler().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w)); m_pia2->ca2_handler().set(IEEE488_TAG, FUNC(ieee488_device::host_ndac_w)); @@ -1689,7 +1689,7 @@ void pet_state::base_pet_devices(machine_config &config, const char *default_dri m_pia2->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<4>)); ieee488_slot_device::add_cbm_defaults(config, default_drive); - IEEE488(config, m_ieee, 0); + IEEE488(config, m_ieee); m_ieee->srq_callback().set(m_pia2, FUNC(pia6821_device::cb1_w)); m_ieee->atn_callback().set(m_pia2, FUNC(pia6821_device::ca1_w)); diff --git a/src/mame/commodore/plus4.cpp b/src/mame/commodore/plus4.cpp index 4092e92a361..604d16e8b82 100644 --- a/src/mame/commodore/plus4.cpp +++ b/src/mame/commodore/plus4.cpp @@ -842,7 +842,7 @@ void plus4_state::machine_reset() void plus4_state::plus4(machine_config &config) { // basic machine hardware - M7501(config, m_maincpu, 0); + M7501(config, m_maincpu); m_maincpu->set_addrmap(AS_PROGRAM, &plus4_state::plus4_mem); m_maincpu->read_callback().set(FUNC(plus4_state::cpu_r)); m_maincpu->write_callback().set(FUNC(plus4_state::cpu_w)); @@ -861,7 +861,7 @@ void plus4_state::plus4(machine_config &config) SPEAKER(config, "mono").front_center(); - MOS7360(config, m_ted, 0); + MOS7360(config, m_ted); m_ted->set_addrmap(0, &plus4_state::ted_videoram_map); m_ted->set_screen(SCREEN_TAG); m_ted->write_irq_callback().set("mainirq", FUNC(input_merger_device::in_w<0>)); @@ -885,7 +885,7 @@ void plus4_state::plus4(machine_config &config) m_user->pk_handler().set(m_spi_user, FUNC(mos6529_device::write_p1)); m_user->pl_handler().set(m_acia, FUNC(mos6551_device::write_dsr)).invert(); // TODO: add missing pull up before inverter - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(1.8432_MHz_XTAL); m_acia->rxc_handler().set(m_user, FUNC(pet_user_port_device::write_8)); m_acia->rts_handler().set(m_user, FUNC(pet_user_port_device::write_d)).invert(); @@ -893,7 +893,7 @@ void plus4_state::plus4(machine_config &config) m_acia->txd_handler().set(m_user, FUNC(pet_user_port_device::write_m)); m_acia->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); - MOS6529(config, m_spi_user, 0); + MOS6529(config, m_spi_user); m_spi_user->p_handler<0>().set(m_user, FUNC(pet_user_port_device::write_b)); m_spi_user->p_handler<1>().set(m_user, FUNC(pet_user_port_device::write_k)); m_spi_user->p_handler<2>().set(m_user, FUNC(pet_user_port_device::write_4)); @@ -903,7 +903,7 @@ void plus4_state::plus4(machine_config &config) m_spi_user->p_handler<6>().set(m_user, FUNC(pet_user_port_device::write_j)); m_spi_user->p_handler<7>().set(m_user, FUNC(pet_user_port_device::write_f)); - MOS6529(config, m_spi_kb, 0); + MOS6529(config, m_spi_kb); m_spi_kb->p_handler<0>().set(FUNC(plus4_state::write_kb0)); m_spi_kb->p_handler<1>().set(FUNC(plus4_state::write_kb1)); m_spi_kb->p_handler<2>().set(FUNC(plus4_state::write_kb2)); diff --git a/src/mame/commodore/vic20.cpp b/src/mame/commodore/vic20.cpp index 780ba25c053..46b88f75e8e 100644 --- a/src/mame/commodore/vic20.cpp +++ b/src/mame/commodore/vic20.cpp @@ -63,7 +63,7 @@ public: protected: void vic20(machine_config &config, const char* softlist_filter); - void add_clocked_devices(machine_config &config, uint32_t clock); + void add_clocked_devices(machine_config &config, XTAL clock); private: required_device m_maincpu; @@ -848,7 +848,7 @@ void vic20_state::vic20(machine_config &config, const char* softlist_filter) m_vic->poty_rd_callback().set(m_joy, FUNC(vcs_control_port_device::read_pot_y)); m_vic->add_route(ALL_OUTPUTS, "mono", 0.25); - PET_DATASSETTE_PORT(config, m_cassette, 0); + PET_DATASSETTE_PORT(config, m_cassette); cbm_datassette_devices(*m_cassette); m_cassette->set_default_option("c1530"); m_cassette->read_handler().set(m_via2, FUNC(via6522_device::write_ca1)); @@ -856,7 +856,7 @@ void vic20_state::vic20(machine_config &config, const char* softlist_filter) cbm_iec_slot_device::add(config, m_iec, "c1541"); m_iec->srq_callback().set(m_via2, FUNC(via6522_device::write_cb1)); - VCS_CONTROL_PORT(config, m_joy, 0); + VCS_CONTROL_PORT(config, m_joy); vcs_control_port_devices(*m_joy); m_joy->set_default_option("joy"); m_joy->trigger_wr_callback().set(FUNC(vic20_state::write_light_pen)); @@ -890,7 +890,7 @@ void vic20_state::vic20(machine_config &config, const char* softlist_filter) } -void vic20_state::add_clocked_devices(machine_config &config, uint32_t clock) +void vic20_state::add_clocked_devices(machine_config &config, XTAL clock) { // basic machine hardware M6502(config, m_maincpu, clock); diff --git a/src/mame/compugraphic/pwrview.cpp b/src/mame/compugraphic/pwrview.cpp index a92c6d2c5ca..a3f0084b36e 100644 --- a/src/mame/compugraphic/pwrview.cpp +++ b/src/mame/compugraphic/pwrview.cpp @@ -506,7 +506,7 @@ void pwrview_state::pwrview(machine_config &config) screen.set_raw(XTAL(64'000'000)/8, 992, 0, 744, 1040, 0, 960); // clock unknown screen.set_screen_update("crtc", FUNC(hd6845s_device::screen_update)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(XTAL(16'000'000)/16); // clocks unknown, fix above when found m_pit->set_clk<1>(XTAL(16'000'000)/16); m_pit->set_clk<2>(XTAL(16'000'000)/16); @@ -516,20 +516,19 @@ void pwrview_state::pwrview(machine_config &config) m_pit->out_handler<1>().append([this](int state){ if (!m_rtsb) m_sio->txcb_w(state); }); // floppy disk controller - UPD765A(config, m_fdc, 8'000'000, false, false); // Rockwell R6765P + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, false); // Rockwell R6765P m_fdc->intrq_wr_callback().set([this](int state){ if(m_enable_fdc) m_maincpu->int3_w(state); }); m_fdc->drq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::drq0_w)); FLOPPY_CONNECTOR(config, "fdc:0", pwrview_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, "fdc:1", pwrview_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->rxrdy_handler().set(m_maincpu, FUNC(i80186_cpu_device::int3_w)); m_uart->txd_handler().set([this](bool state){ if(BIT(m_c280, 4) && m_dtr) m_uart->write_rxd(state); }); // m_dtr here appears unlikely but the post seems to expect it m_uart->dtr_handler().set([this](bool state){ m_dtr = state; }); m_uart->rts_handler().set([this](bool state){ m_rts = state; }); - - Z80SIO(config, m_sio, 4000000); // Z8442BPS (SIO/2) + Z80SIO(config, m_sio, XTAL::u(4000000)); // Z8442BPS (SIO/2) m_sio->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int2_w)); m_sio->out_txda_callback().set([this](int state){ m_sio->rxa_w(state); }); // TODO: find loopback control reg m_sio->out_rtsa_callback().set([this](int state){ m_rtsa = state; }); diff --git a/src/mame/comx/comx35.cpp b/src/mame/comx/comx35.cpp index 6aa3d71d827..d3e992c59a5 100644 --- a/src/mame/comx/comx35.cpp +++ b/src/mame/comx/comx35.cpp @@ -633,7 +633,7 @@ void comx35_state::base(machine_config &config, const XTAL clock) CASSETTE(config, m_cassette).set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); // expansion bus - COMX_EXPANSION_SLOT(config, m_exp, 0, comx_expansion_cards, "eb").irq_callback().set(FUNC(comx35_state::irq_w)); + COMX_EXPANSION_SLOT(config, m_exp, comx_expansion_cards, "eb").irq_callback().set(FUNC(comx35_state::irq_w)); // internal ram RAM(config, m_ram).set_default_size("32K"); diff --git a/src/mame/concept/concept.cpp b/src/mame/concept/concept.cpp index f907ff0810a..33fcb8034a0 100644 --- a/src/mame/concept/concept.cpp +++ b/src/mame/concept/concept.cpp @@ -261,7 +261,7 @@ void concept_state::concept(machine_config &config) m_kbdacia->set_xtal(16.364_MHz_XTAL / 9); /* Apple II bus */ - A2BUS(config, m_a2bus, 0).set_space(m_maincpu, AS_PROGRAM); + A2BUS(config, m_a2bus).set_space(m_maincpu, AS_PROGRAM); m_a2bus->nmi_w().set("iocint", FUNC(input_merger_device::in_w<0>)); m_a2bus->irq_w().set("iocint", FUNC(input_merger_device::in_w<1>)); A2BUS_SLOT(config, "sl1", m_a2bus, concept_a2_cards, nullptr); diff --git a/src/mame/conitec/prof180x.cpp b/src/mame/conitec/prof180x.cpp index 3954d9df9ab..0ac25f06d57 100644 --- a/src/mame/conitec/prof180x.cpp +++ b/src/mame/conitec/prof180x.cpp @@ -245,7 +245,7 @@ void prof180x_state::prof180x(machine_config &config) screen.set_visarea(0, 640-1, 0, 480-1); /* devices */ - UPD765A(config, FDC9268_TAG, 8'000'000, false, true); + UPD765A(config, FDC9268_TAG, XTAL::u(8'000'000), false, true); FLOPPY_CONNECTOR(config, FDC9268_TAG ":0", prof180x_floppies, "35dd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, FDC9268_TAG ":1", prof180x_floppies, "35dd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, FDC9268_TAG ":2", prof180x_floppies, "35dd", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/conitec/prof80.cpp b/src/mame/conitec/prof80.cpp index a557a1e1f1e..48e1718e187 100644 --- a/src/mame/conitec/prof80.cpp +++ b/src/mame/conitec/prof80.cpp @@ -448,7 +448,7 @@ void prof80_state::prof80(machine_config &config) m_maincpu->set_addrmap(AS_IO, &prof80_state::prof80_io); // MMU - PROF80_MMU(config, m_mmu, 0); + PROF80_MMU(config, m_mmu); m_mmu->set_addrmap(AS_PROGRAM, &prof80_state::prof80_mmu); // RTC diff --git a/src/mame/conitec/prof80mmu.cpp b/src/mame/conitec/prof80mmu.cpp index ad26c67bfbe..24748937f10 100644 --- a/src/mame/conitec/prof80mmu.cpp +++ b/src/mame/conitec/prof80mmu.cpp @@ -37,7 +37,7 @@ void prof80_mmu_device::program_map(address_map &map) // prof80_mmu_device - constructor //------------------------------------------------- -prof80_mmu_device::prof80_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +prof80_mmu_device::prof80_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PROF80_MMU, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_program_space_config("program", ENDIANNESS_LITTLE, 8, 20, 0, address_map_constructor(FUNC(prof80_mmu_device::program_map), this)) diff --git a/src/mame/conitec/prof80mmu.h b/src/mame/conitec/prof80mmu.h index f4bea24d3bb..1cdeb6dee7f 100644 --- a/src/mame/conitec/prof80mmu.h +++ b/src/mame/conitec/prof80mmu.h @@ -21,7 +21,7 @@ class prof80_mmu_device : public device_t, public device_memory_interface { public: - prof80_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + prof80_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void z80_program_map(address_map &map); diff --git a/src/mame/cvs/cvs.cpp b/src/mame/cvs/cvs.cpp index bc421eb314e..9a59672c8fc 100644 --- a/src/mame/cvs/cvs.cpp +++ b/src/mame/cvs/cvs.cpp @@ -996,13 +996,13 @@ void cvs_state::cvs(machine_config &config) m_screen->set_screen_update(FUNC(cvs_state::screen_update_cvs)); m_screen->set_palette(m_palette); - S2636(config, m_s2636[0], 0); + S2636(config, m_s2636[0]); m_s2636[0]->set_offsets(CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); - S2636(config, m_s2636[1], 0); + S2636(config, m_s2636[1]); m_s2636[1]->set_offsets(CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); - S2636(config, m_s2636[2], 0); + S2636(config, m_s2636[2]); m_s2636[2]->set_offsets(CVS_S2636_Y_OFFSET, CVS_S2636_X_OFFSET); /* audio hardware */ @@ -1010,9 +1010,9 @@ void cvs_state::cvs(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC - DAC_4BIT_R2R(config, m_dac2, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC - DAC_1BIT(config, m_dac3, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_4BIT_R2R(config, m_dac2).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_1BIT(config, m_dac3).add_route(ALL_OUTPUTS, "speaker", 0.5); TMS5100(config, m_tms5110, XTAL(640'000)); m_tms5110->data().set(FUNC(cvs_state::speech_rom_read_bit)); diff --git a/src/mame/cvs/galaxia.cpp b/src/mame/cvs/galaxia.cpp index c905cd9e7bb..f057bf7e541 100644 --- a/src/mame/cvs/galaxia.cpp +++ b/src/mame/cvs/galaxia.cpp @@ -314,15 +314,15 @@ void galaxia_state::galaxia(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_galaxia); PALETTE(config, m_palette, FUNC(galaxia_state::galaxia_palette), 0x18+2); - S2636(config, m_s2636[0], 0); + S2636(config, m_s2636[0]); m_s2636[0]->set_offsets(-13, -26); m_s2636[0]->add_route(ALL_OUTPUTS, "mono", 0.25); - S2636(config, m_s2636[1], 0); + S2636(config, m_s2636[1]); m_s2636[1]->set_offsets(-13, -26); m_s2636[1]->add_route(ALL_OUTPUTS, "mono", 0.25); - S2636(config, m_s2636[2], 0); + S2636(config, m_s2636[2]); m_s2636[2]->set_offsets(-13, -26); m_s2636[2]->add_route(ALL_OUTPUTS, "mono", 0.25); @@ -357,7 +357,7 @@ void galaxia_state::astrowar(machine_config &config) MCFG_VIDEO_START_OVERRIDE(galaxia_state,astrowar) - S2636(config, m_s2636[0], 0); + S2636(config, m_s2636[0]); m_s2636[0]->set_offsets(-13, -8); m_s2636[0]->add_route(ALL_OUTPUTS, "mono", 0.25); diff --git a/src/mame/cvs/quasar.cpp b/src/mame/cvs/quasar.cpp index d46d99f2cef..8e485eeece3 100644 --- a/src/mame/cvs/quasar.cpp +++ b/src/mame/cvs/quasar.cpp @@ -301,7 +301,7 @@ void quasar_state::machine_reset() void quasar_state::quasar(machine_config &config) { /* basic machine hardware */ - S2650(config, m_maincpu, 14318000/4); /* 14 mhz crystal divide by 4 on board */ + S2650(config, m_maincpu, XTAL::u(14318000)/4); /* 14 mhz crystal divide by 4 on board */ m_maincpu->set_addrmap(AS_PROGRAM, &quasar_state::quasar_program); m_maincpu->set_addrmap(AS_IO, &quasar_state::quasar_io); m_maincpu->set_addrmap(AS_DATA, &quasar_state::quasar_data); @@ -309,7 +309,7 @@ void quasar_state::quasar(machine_config &config) m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank)); m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; }); - i8035_device &soundcpu(I8035(config, "soundcpu", 6000000)); /* 6MHz crystal divide by 15 in CPU */ + i8035_device &soundcpu(I8035(config, "soundcpu", XTAL::u(6000000))); /* 6MHz crystal divide by 15 in CPU */ soundcpu.set_addrmap(AS_PROGRAM, &quasar_state::sound_map); soundcpu.set_addrmap(AS_IO, &quasar_state::sound_portmap); soundcpu.t1_in_cb().set(FUNC(quasar_state::audio_t1_r)); @@ -329,20 +329,20 @@ void quasar_state::quasar(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_quasar); PALETTE(config, m_palette, FUNC(quasar_state::quasar_palette), (64 + 1) * 8 + (4 * 256), 0x500); - S2636(config, m_s2636[0], 0); + S2636(config, m_s2636[0]); m_s2636[0]->set_offsets(CVS_S2636_Y_OFFSET - 8, CVS_S2636_X_OFFSET - 9); - S2636(config, m_s2636[1], 0); + S2636(config, m_s2636[1]); m_s2636[1]->set_offsets(CVS_S2636_Y_OFFSET - 8, CVS_S2636_X_OFFSET - 9); - S2636(config, m_s2636[2], 0); + S2636(config, m_s2636[2]); m_s2636[2]->set_offsets(CVS_S2636_Y_OFFSET - 8, CVS_S2636_X_OFFSET - 9); /* sound hardware */ GENERIC_LATCH_8(config, m_soundlatch); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC } ROM_START( quasar ) diff --git a/src/mame/cxg/ch2001.cpp b/src/mame/cxg/ch2001.cpp index 7989629ba83..f03ef759b99 100644 --- a/src/mame/cxg/ch2001.cpp +++ b/src/mame/cxg/ch2001.cpp @@ -180,7 +180,7 @@ void ch2001_state::ch2001(machine_config &config) Z80(config, m_maincpu, 8_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &ch2001_state::main_map); - auto &irq_clock(CLOCK(config, "irq_clock", 568)); // 555 timer (20nF, 100K+33K, 1K2), measured 568Hz + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(568))); // 555 timer (20nF, 100K+33K, 1K2), measured 568Hz irq_clock.set_pulse_width(attotime::from_nsec(16600)); // active for 16.6us irq_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); diff --git a/src/mame/cxg/dominator.cpp b/src/mame/cxg/dominator.cpp index a3ff19b21a7..3082a7436c9 100644 --- a/src/mame/cxg/dominator.cpp +++ b/src/mame/cxg/dominator.cpp @@ -225,7 +225,7 @@ void dominator_state::dominator(machine_config &config) m_board->set_delay(attotime::from_msec(150)); /* video hardware */ - LC7582(config, m_lcd, 0); + LC7582(config, m_lcd); m_lcd->write_segs().set(FUNC(dominator_state::lcd_s_w)); PWM_DISPLAY(config, m_display).set_size(8+1, 8); diff --git a/src/mame/cxg/scptchess.cpp b/src/mame/cxg/scptchess.cpp index 2d16d08f7b9..faced32755d 100644 --- a/src/mame/cxg/scptchess.cpp +++ b/src/mame/cxg/scptchess.cpp @@ -184,7 +184,7 @@ INPUT_PORTS_END void scptchess_state::scptchess_v1(machine_config &config) { /* basic machine hardware */ - HD44801(config, m_maincpu, 400000); + HD44801(config, m_maincpu, XTAL::u(400000)); m_maincpu->write_r<2>().set(FUNC(scptchess_state::mux_w<0>)); m_maincpu->write_r<3>().set(FUNC(scptchess_state::mux_w<1>)); m_maincpu->write_d().set(FUNC(scptchess_state::leds_w)); diff --git a/src/mame/cxg/sphinx40.cpp b/src/mame/cxg/sphinx40.cpp index 71f4e749118..1954f0a3fff 100644 --- a/src/mame/cxg/sphinx40.cpp +++ b/src/mame/cxg/sphinx40.cpp @@ -273,13 +273,13 @@ INPUT_PORTS_END void sphinx40_state::sphinx40(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sphinx40_state::main_map); const attotime irq_period = attotime::from_hz(8000000 / 0x1000); m_maincpu->set_periodic_int(FUNC(sphinx40_state::irq4_line_hold), irq_period); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(sphinx40_state::cb_mux_w)); m_pia->writepb_handler().set(FUNC(sphinx40_state::cb_leds_w)); m_pia->cb2_handler().set("dac", FUNC(dac_bit_interface::write)); @@ -292,7 +292,7 @@ void sphinx40_state::sphinx40(machine_config &config) m_board->set_nvram_enable(true); /* video hardware */ - HD61603(config, m_lcd, 0); + HD61603(config, m_lcd); m_lcd->write_segs().set(FUNC(sphinx40_state::lcd_seg_w)); PWM_DISPLAY(config, m_display).set_size(8, 8); diff --git a/src/mame/cybiko/cybiko.cpp b/src/mame/cybiko/cybiko.cpp index 0d7f9e3d38b..26592ac7a20 100644 --- a/src/mame/cybiko/cybiko.cpp +++ b/src/mame/cybiko/cybiko.cpp @@ -430,7 +430,7 @@ void cybiko_state::cybikov1_base(machine_config &config) void cybiko_state::cybikov1_flash(machine_config &config) { - AT45DB041(config, m_flash1, 0); + AT45DB041(config, m_flash1); m_flash1->so_callback().set("maincpu:sci1", FUNC(h8_sci_device::rx_w)); } diff --git a/src/mame/dai/dai.cpp b/src/mame/dai/dai.cpp index 2836a137483..6ebd7b290c3 100644 --- a/src/mame/dai/dai.cpp +++ b/src/mame/dai/dai.cpp @@ -186,12 +186,12 @@ GFXDECODE_END void dai_state::dai(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dai_state::mem_map); m_maincpu->set_irq_acknowledge_callback(FUNC(dai_state::int_ack)); config.set_maximum_quantum(attotime::from_hz(60)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(2000000); m_pit->out_handler<0>().set(m_sound, FUNC(dai_sound_device::set_input_ch0)); m_pit->set_clk<1>(2000000); @@ -226,7 +226,7 @@ void dai_state::dai(machine_config &config) m_cassette->set_interface("dai_cass"); /* tms5501 */ - TMS5501(config, m_tms5501, 2000000); + TMS5501(config, m_tms5501, XTAL::u(2000000)); m_tms5501->int_callback().set_inputline("maincpu", I8085_INTR_LINE); m_tms5501->xi_callback().set(FUNC(dai_state::keyboard_r)); m_tms5501->xo_callback().set(FUNC(dai_state::keyboard_w)); diff --git a/src/mame/dai/dai_snd.cpp b/src/mame/dai/dai_snd.cpp index 52334c699f8..8c6a5c85073 100644 --- a/src/mame/dai/dai_snd.cpp +++ b/src/mame/dai/dai_snd.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(DAI_SOUND, dai_sound_device, "dai_sound", "DAI Custom Sound") // dai_sound_device - constructor //------------------------------------------------- -dai_sound_device::dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dai_sound_device::dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DAI_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) { diff --git a/src/mame/dai/dai_snd.h b/src/mame/dai/dai_snd.h index 7e7b141b96e..4380f4834b8 100644 --- a/src/mame/dai/dai_snd.h +++ b/src/mame/dai/dai_snd.h @@ -16,7 +16,7 @@ class dai_sound_device : public device_t, public device_sound_interface { public: // construction/destruction - dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER(set_input_ch0); DECLARE_WRITE_LINE_MEMBER(set_input_ch1); diff --git a/src/mame/dataeast/actfancr.cpp b/src/mame/dataeast/actfancr.cpp index ccb0e1975d9..1ddeaa5fc8a 100644 --- a/src/mame/dataeast/actfancr.cpp +++ b/src/mame/dataeast/actfancr.cpp @@ -356,11 +356,11 @@ void triothep_state::machine_reset() void actfancr_state::actfancr(machine_config &config) { // basic machine hardware - H6280(config, m_maincpu, 21477200/3); // Should be accurate + H6280(config, m_maincpu, XTAL::u(21477200)/3); // Should be accurate m_maincpu->set_addrmap(AS_PROGRAM, &actfancr_state::prg_map); m_maincpu->add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused - M6502(config, m_audiocpu, 1500000); // Should be accurate + M6502(config, m_audiocpu, XTAL::u(1500000)); // Should be accurate m_audiocpu->set_addrmap(AS_PROGRAM, &actfancr_state::dec0_s_map); // video hardware @@ -376,32 +376,32 @@ void actfancr_state::actfancr(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_actfan); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 768); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(2, 2, 2); m_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_BAC06(config, m_tilegen[1], 0); + DECO_BAC06(config, m_tilegen[1]); m_tilegen[1]->set_gfx_region_wide(0, 0, 0); m_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); // sound hardware SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.90); ym1.add_route(1, "mono", 0.90); ym1.add_route(2, "mono", 0.90); ym1.add_route(3, "mono", 0.50); - ym3812_device &ym2(YM3812(config, "ym2", 3000000)); + ym3812_device &ym2(YM3812(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline("audiocpu", M6502_IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.90); - okim6295_device &oki(OKIM6295(config, "oki", 1024188, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1024188), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "mono", 0.85); } diff --git a/src/mame/dataeast/backfire.cpp b/src/mame/dataeast/backfire.cpp index 2f835bd36d4..601b2339cb7 100644 --- a/src/mame/dataeast/backfire.cpp +++ b/src/mame/dataeast/backfire.cpp @@ -365,12 +365,12 @@ void backfire_state::machine_start() void backfire_state::backfire(machine_config &config) { /* basic machine hardware */ - ARM(config, m_maincpu, 28000000/4); /* Unconfirmed */ + ARM(config, m_maincpu, XTAL::u(28000000)/4); /* Unconfirmed */ m_maincpu->set_addrmap(AS_PROGRAM, &backfire_state::backfire_map); EEPROM_93C46_16BIT(config, "eeprom"); - ADC0808(config, m_adc, 1000000); // unknown clock + ADC0808(config, m_adc, XTAL::u(1000000)); // unknown clock m_adc->in_callback<0>().set_ioport("PADDLE0"); m_adc->in_callback<1>().set_ioport("PADDLE1"); @@ -397,7 +397,7 @@ void backfire_state::backfire(machine_config &config) rscreen.set_screen_update(FUNC(backfire_state::screen_update_right)); rscreen.set_palette(m_palette); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_screen(m_lscreen); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); @@ -411,7 +411,7 @@ void backfire_state::backfire(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_screen(m_lscreen); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); @@ -425,13 +425,13 @@ void backfire_state::backfire(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(3); m_deco_tilegen[1]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_screen(m_lscreen); m_sprgen[0]->set_gfx_region(4); m_sprgen[0]->set_pri_callback(FUNC(backfire_state::pri_callback)); m_sprgen[0]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_screen("rscreen"); m_sprgen[1]->set_gfx_region(5); m_sprgen[1]->set_pri_callback(FUNC(backfire_state::pri_callback)); @@ -441,7 +441,7 @@ void backfire_state::backfire(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 28000000 / 2)); + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(28000000) / 2)); ymz.add_route(0, "lspeaker", 1.0); ymz.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/dataeast/battlera.cpp b/src/mame/dataeast/battlera.cpp index 4145e0b46a3..00656a9fc02 100644 --- a/src/mame/dataeast/battlera.cpp +++ b/src/mame/dataeast/battlera.cpp @@ -343,7 +343,7 @@ void battlera_state::battlera(machine_config &config) m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed)); m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed)); - huc6270_device &huc6270(HUC6270(config, "huc6270", 0)); + huc6270_device &huc6270(HUC6270(config, "huc6270")); huc6270.set_vram_size(0x20000); huc6270.irq().set_inputline(m_maincpu, 0); diff --git a/src/mame/dataeast/boogwing.cpp b/src/mame/dataeast/boogwing.cpp index 336785df1b3..c848f478bad 100644 --- a/src/mame/dataeast/boogwing.cpp +++ b/src/mame/dataeast/boogwing.cpp @@ -345,9 +345,9 @@ void boogwing_state::boogwing(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); BUFFERED_SPRITERAM16(config, m_spriteram[1]); - DECO_ACE(config, m_deco_ace, 0); + DECO_ACE(config, m_deco_ace); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0); @@ -360,7 +360,7 @@ void boogwing_state::boogwing(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0); @@ -373,15 +373,15 @@ void boogwing_state::boogwing(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(4); m_sprgen[1]->set_gfxdecode_tag("gfxdecode"); - DECO104PROT(config, m_deco104, 0); + DECO104PROT(config, m_deco104); m_deco104->port_a_cb().set_ioport("INPUTS"); m_deco104->port_b_cb().set_ioport("SYSTEM"); m_deco104->port_c_cb().set_ioport("DSW"); diff --git a/src/mame/dataeast/bwing.cpp b/src/mame/dataeast/bwing.cpp index eb70b5b0247..13101e202fc 100644 --- a/src/mame/dataeast/bwing.cpp +++ b/src/mame/dataeast/bwing.cpp @@ -365,13 +365,13 @@ void bwing_state::bwing_postload() void bwing_state::bwing(machine_config &config) { // basic machine hardware - MC6809E(config, m_maincpu, 2000000); + MC6809E(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &bwing_state::bwp1_map); - MC6809E(config, m_subcpu, 2000000); + MC6809E(config, m_subcpu, XTAL::u(2000000)); m_subcpu->set_addrmap(AS_PROGRAM, &bwing_state::bwp2_map); - DECO16(config, m_audiocpu, 2000000); + DECO16(config, m_audiocpu, XTAL::u(2000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &bwing_state::bwp3_map); m_audiocpu->set_addrmap(AS_IO, &bwing_state::bwp3_io_map); m_audiocpu->set_periodic_int(FUNC(bwing_state::bwp3_interrupt), attotime::from_hz(1000)); @@ -403,7 +403,7 @@ void bwing_state::bwing(machine_config &config) AY8912(config, "ay2", XTAL(24'000'000) / 2 / 8).add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC08(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); + DAC08(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.1); } //**************************************************************************** diff --git a/src/mame/dataeast/cbuster.cpp b/src/mame/dataeast/cbuster.cpp index 5241bab2a8a..ede8fc7e39a 100644 --- a/src/mame/dataeast/cbuster.cpp +++ b/src/mame/dataeast/cbuster.cpp @@ -283,7 +283,7 @@ void cbuster_state::twocrude(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -296,7 +296,7 @@ void cbuster_state::twocrude(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x30); @@ -309,7 +309,7 @@ void cbuster_state::twocrude(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_gfxdecode_tag("gfxdecode"); diff --git a/src/mame/dataeast/chanbara.cpp b/src/mame/dataeast/chanbara.cpp index 69a418dd6fa..f582d88b92a 100644 --- a/src/mame/dataeast/chanbara.cpp +++ b/src/mame/dataeast/chanbara.cpp @@ -419,7 +419,7 @@ void chanbara_state::chanbara(machine_config &config) SPEAKER(config, "mono").front_center(); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 12000000/8)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12000000)/8)); ymsnd.irq_handler().set_inputline(m_maincpu, 0); ymsnd.port_a_write_callback().set(FUNC(chanbara_state::ay_out_0_w)); ymsnd.port_b_write_callback().set(FUNC(chanbara_state::ay_out_1_w)); diff --git a/src/mame/dataeast/cninja.cpp b/src/mame/dataeast/cninja.cpp index 4412efb3ed8..21a8f35a714 100644 --- a/src/mame/dataeast/cninja.cpp +++ b/src/mame/dataeast/cninja.cpp @@ -765,7 +765,7 @@ void cninja_state::cninja(machine_config &config) audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map); audiocpu.add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused - deco_irq_device &irq(DECO_IRQ(config, "irq", 0)); + deco_irq_device &irq(DECO_IRQ(config, "irq")); irq.set_screen_tag(m_screen); irq.raster1_irq_callback().set_inputline(m_maincpu, 3); irq.raster2_irq_callback().set_inputline(m_maincpu, 4); @@ -784,7 +784,7 @@ void cninja_state::cninja(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -795,7 +795,7 @@ void cninja_state::cninja(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x00); @@ -808,12 +808,12 @@ void cninja_state::cninja(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_pri_callback(FUNC(cninja_state::pri_callback)); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO104PROT(config, m_ioprot, 0); + DECO104PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); @@ -843,10 +843,10 @@ void cninja_state::stoneage(machine_config &config) M68000(config, m_maincpu, XTAL(24'000'000) / 2); m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::cninja_map); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &cninja_state::stoneage_s_map); - deco_irq_device &irq(DECO_IRQ(config, "irq", 0)); + deco_irq_device &irq(DECO_IRQ(config, "irq")); irq.set_screen_tag(m_screen); irq.raster1_irq_callback().set_inputline(m_maincpu, 3); irq.raster2_irq_callback().set_inputline(m_maincpu, 4); @@ -867,7 +867,7 @@ void cninja_state::stoneage(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -878,7 +878,7 @@ void cninja_state::stoneage(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x00); @@ -891,12 +891,12 @@ void cninja_state::stoneage(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_pri_callback(FUNC(cninja_state::pri_callback)); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO104PROT(config, m_ioprot, 0); + DECO104PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); @@ -937,10 +937,10 @@ void cninja_state::cninjabl(machine_config &config) M68000(config, m_maincpu, XTAL(24'000'000) / 2); m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::cninjabl_map); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &cninja_state::cninjabl_sound_map); - deco_irq_device &irq(DECO_IRQ(config, "irq", 0)); + deco_irq_device &irq(DECO_IRQ(config, "irq")); irq.set_screen_tag(m_screen); irq.raster1_irq_callback().set_inputline(m_maincpu, 3); irq.raster2_irq_callback().set_inputline(m_maincpu, 4); @@ -959,7 +959,7 @@ void cninja_state::cninjabl(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -970,7 +970,7 @@ void cninja_state::cninjabl(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x00); @@ -1008,7 +1008,7 @@ void cninja_state::edrandy(machine_config &config) audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map); audiocpu.add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused - deco_irq_device &irq(DECO_IRQ(config, "irq", 0)); + deco_irq_device &irq(DECO_IRQ(config, "irq")); irq.set_screen_tag(m_screen); irq.raster1_irq_callback().set_inputline(m_maincpu, 3); irq.raster2_irq_callback().set_inputline(m_maincpu, 4); @@ -1025,7 +1025,7 @@ void cninja_state::edrandy(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -1036,7 +1036,7 @@ void cninja_state::edrandy(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x00); @@ -1049,12 +1049,12 @@ void cninja_state::edrandy(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_pri_callback(FUNC(cninja_state::pri_callback)); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO146PROT(config, m_ioprot, 0); + DECO146PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); @@ -1087,7 +1087,7 @@ void cninja_state::robocop2(machine_config &config) audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map); audiocpu.add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused - deco_irq_device &irq(DECO_IRQ(config, "irq", 0)); + deco_irq_device &irq(DECO_IRQ(config, "irq")); irq.set_screen_tag(m_screen); irq.raster1_irq_callback().set_inputline(m_maincpu, 3); irq.raster2_irq_callback().set_inputline(m_maincpu, 4); @@ -1107,7 +1107,7 @@ void cninja_state::robocop2(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -1119,7 +1119,7 @@ void cninja_state::robocop2(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x00); @@ -1133,12 +1133,12 @@ void cninja_state::robocop2(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_pri_callback(FUNC(cninja_state::pri_callback)); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO146PROT(config, m_ioprot, 0); + DECO146PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); @@ -1188,7 +1188,7 @@ void cninja_state::mutantf(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); BUFFERED_SPRITERAM16(config, m_spriteram[1]); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -1201,7 +1201,7 @@ void cninja_state::mutantf(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x20); @@ -1214,15 +1214,15 @@ void cninja_state::mutantf(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(4); m_sprgen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO146PROT(config, m_ioprot, 0); + DECO146PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); diff --git a/src/mame/dataeast/cntsteer.cpp b/src/mame/dataeast/cntsteer.cpp index f0b12b8daef..c0d877977be 100644 --- a/src/mame/dataeast/cntsteer.cpp +++ b/src/mame/dataeast/cntsteer.cpp @@ -978,10 +978,10 @@ MACHINE_RESET_MEMBER(cntsteer_state,cntsteer) void cntsteer_state::cntsteer(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); /* MC68B09E */ + MC6809E(config, m_maincpu, XTAL::u(2000000)); /* MC68B09E */ m_maincpu->set_addrmap(AS_PROGRAM, &cntsteer_state::cntsteer_cpu1_map); - MC6809E(config, m_subcpu, 2000000); /* MC68B09E */ + MC6809E(config, m_subcpu, XTAL::u(2000000)); /* MC68B09E */ m_subcpu->set_addrmap(AS_PROGRAM, &cntsteer_state::cntsteer_cpu2_map); // m_subcpu->set_disable(); @@ -1021,19 +1021,19 @@ void cntsteer_state::cntsteer(machine_config &config) YM2149(config, "ay2", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // labeled DAC-08CQ + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // labeled DAC-08CQ } void cntsteer_state::zerotrgt(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); /* ? */ + MC6809E(config, m_maincpu, XTAL::u(2000000)); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &cntsteer_state::gekitsui_cpu1_map); - MC6809E(config, m_subcpu, 2000000); /* ? */ + MC6809E(config, m_subcpu, XTAL::u(2000000)); /* ? */ m_subcpu->set_addrmap(AS_PROGRAM, &cntsteer_state::gekitsui_cpu2_map); - M6502(config, m_audiocpu, 1500000); /* ? */ + M6502(config, m_audiocpu, XTAL::u(1500000)); /* ? */ m_audiocpu->set_addrmap(AS_PROGRAM, &cntsteer_state::sound_map); m_audiocpu->set_periodic_int(FUNC(cntsteer_state::sound_interrupt), attotime::from_hz(480)); @@ -1062,9 +1062,9 @@ void cntsteer_state::zerotrgt(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM2149(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "speaker", 0.5); + YM2149(config, "ay1", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "speaker", 0.5); - YM2149(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "speaker", 0.5); + YM2149(config, "ay2", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "speaker", 0.5); } /***************************************************************************/ diff --git a/src/mame/dataeast/compgolf.cpp b/src/mame/dataeast/compgolf.cpp index f5c8e8f2b58..e027867205b 100644 --- a/src/mame/dataeast/compgolf.cpp +++ b/src/mame/dataeast/compgolf.cpp @@ -225,7 +225,7 @@ void compgolf_state::machine_reset() void compgolf_state::compgolf(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); // HD68B09EP + MC6809E(config, m_maincpu, XTAL::u(2000000)); // HD68B09EP m_maincpu->set_addrmap(AS_PROGRAM, &compgolf_state::compgolf_map); /* video hardware */ @@ -244,7 +244,7 @@ void compgolf_state::compgolf(machine_config &config) SPEAKER(config, "mono").front_center(); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set_inputline(m_maincpu, 0); ymsnd.port_a_write_callback().set(FUNC(compgolf_state::compgolf_scrollx_lo_w)); ymsnd.port_b_write_callback().set(FUNC(compgolf_state::compgolf_scrolly_lo_w)); diff --git a/src/mame/dataeast/darkseal.cpp b/src/mame/dataeast/darkseal.cpp index afd01ae620f..702b797107a 100644 --- a/src/mame/dataeast/darkseal.cpp +++ b/src/mame/dataeast/darkseal.cpp @@ -342,7 +342,7 @@ void darkseal_state::darkseal(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x64); m_deco_tilegen[0]->set_pf2_size(DECO_64x64); // both these tilemaps need to be twice the y size of usual! m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -353,7 +353,7 @@ void darkseal_state::darkseal(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x00); @@ -364,7 +364,7 @@ void darkseal_state::darkseal(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_gfxdecode_tag("gfxdecode"); diff --git a/src/mame/dataeast/dassault.cpp b/src/mame/dataeast/dassault.cpp index 3fb99741b16..96481bea10f 100644 --- a/src/mame/dataeast/dassault.cpp +++ b/src/mame/dataeast/dassault.cpp @@ -556,7 +556,7 @@ void dassault_state::dassault(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); BUFFERED_SPRITERAM16(config, m_spriteram[1]); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0); @@ -569,7 +569,7 @@ void dassault_state::dassault(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0); @@ -582,11 +582,11 @@ void dassault_state::dassault(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(4); m_sprgen[1]->set_gfxdecode_tag("gfxdecode"); diff --git a/src/mame/dataeast/dblewing.cpp b/src/mame/dataeast/dblewing.cpp index 88706ab89f2..34bff57a6c4 100644 --- a/src/mame/dataeast/dblewing.cpp +++ b/src/mame/dataeast/dblewing.cpp @@ -367,7 +367,7 @@ void dblewing_state::dblewing(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_444, 4096); GFXDECODE(config, "gfxdecode", "palette", gfx_dblewing); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -380,12 +380,12 @@ void dblewing_state::dblewing(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_pri_callback(FUNC(dblewing_state::pri_callback)); m_sprgen->set_gfxdecode_tag("gfxdecode"); - DECO104PROT(config, m_deco104, 0); + DECO104PROT(config, m_deco104); m_deco104->port_a_cb().set_ioport("INPUTS"); m_deco104->port_b_cb().set_ioport("SYSTEM"); m_deco104->port_c_cb().set_ioport("DSW"); diff --git a/src/mame/dataeast/dec0.cpp b/src/mame/dataeast/dec0.cpp index 164057ba953..4511c8fdb5a 100644 --- a/src/mame/dataeast/dec0.cpp +++ b/src/mame/dataeast/dec0.cpp @@ -1811,19 +1811,19 @@ void dec0_state::dec0_base(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_dec0); PALETTE(config, m_palette); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(0, 0, 0); m_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_BAC06(config, m_tilegen[1], 0); + DECO_BAC06(config, m_tilegen[1]); m_tilegen[1]->set_gfx_region_wide(0, 1, 0); m_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_BAC06(config, m_tilegen[2], 0); + DECO_BAC06(config, m_tilegen[2]); m_tilegen[2]->set_gfx_region_wide(0, 2, 0); m_tilegen[2]->set_gfxdecode_tag(m_gfxdecode); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); @@ -1925,11 +1925,11 @@ WRITE_LINE_MEMBER(dec0_automat_state::msm2_vclk_cb) void dec0_automat_state::automat(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dec0_automat_state::automat_map); m_maincpu->set_vblank_int("screen", FUNC(dec0_state::irq6_line_hold)); /* VBL */ - Z80(config, m_audiocpu, 3000000); // ? + Z80(config, m_audiocpu, XTAL::u(3000000)); // ? m_audiocpu->set_addrmap(AS_PROGRAM, &dec0_automat_state::automat_s_map); /* video hardware */ @@ -1944,19 +1944,19 @@ void dec0_automat_state::automat(machine_config &config) m_screen->set_screen_update(FUNC(dec0_automat_state::screen_update_automat)); m_screen->set_palette(m_palette); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(0, 0, 0); m_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO_BAC06(config, m_tilegen[1], 0); + DECO_BAC06(config, m_tilegen[1]); m_tilegen[1]->set_gfx_region_wide(0, 1, 0); m_tilegen[1]->set_gfxdecode_tag("gfxdecode"); - DECO_BAC06(config, m_tilegen[2], 0); + DECO_BAC06(config, m_tilegen[2]); m_tilegen[2]->set_gfx_region_wide(0, 2, 0); m_tilegen[2]->set_gfxdecode_tag("gfxdecode"); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); m_spritegen->set_colpri_callback(FUNC(dec0_automat_state::robocop_colpri_cb)); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 1024); @@ -1968,30 +1968,30 @@ void dec0_automat_state::automat(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); - ym2203_device &ym2203a(YM2203(config, "2203a", 1250000)); + ym2203_device &ym2203a(YM2203(config, "2203a", XTAL::u(1250000))); ym2203a.add_route(0, "mono", 0.90); ym2203a.add_route(1, "mono", 0.90); ym2203a.add_route(2, "mono", 0.90); ym2203a.add_route(3, "mono", 0.35); - ym2203_device &ym2203b(YM2203(config, "2203b", 1250000)); + ym2203_device &ym2203b(YM2203(config, "2203b", XTAL::u(1250000))); ym2203b.add_route(0, "mono", 0.90); ym2203b.add_route(1, "mono", 0.90); ym2203b.add_route(2, "mono", 0.90); ym2203b.add_route(3, "mono", 0.35); - LS157(config, m_adpcm_select[0], 0); + LS157(config, m_adpcm_select[0]); m_adpcm_select[0]->out_callback().set("msm1", FUNC(msm5205_device::data_w)); - LS157(config, m_adpcm_select[1], 0); + LS157(config, m_adpcm_select[1]); m_adpcm_select[1]->out_callback().set("msm2", FUNC(msm5205_device::data_w)); - msm5205_device &msm1(MSM5205(config, "msm1", 384000)); + msm5205_device &msm1(MSM5205(config, "msm1", XTAL::u(384000))); msm1.vck_legacy_callback().set(FUNC(dec0_automat_state::msm1_vclk_cb)); msm1.set_prescaler_selector(msm5205_device::S96_4B); msm1.add_route(ALL_OUTPUTS, "mono", 1.0); - msm5205_device &msm2(MSM5205(config, "msm2", 384000)); + msm5205_device &msm2(MSM5205(config, "msm2", XTAL::u(384000))); msm2.vck_legacy_callback().set(FUNC(dec0_automat_state::msm2_vclk_cb)); msm2.set_prescaler_selector(msm5205_device::S96_4B); msm2.add_route(ALL_OUTPUTS, "mono", 1.0); @@ -2020,20 +2020,20 @@ void dec0_automat_state::secretab(machine_config &config) // all clocks verified m_screen->set_screen_update(FUNC(dec0_automat_state::screen_update_secretab)); m_screen->set_palette(m_palette); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(0, 0, 0); m_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO_BAC06(config, m_tilegen[1], 0); + DECO_BAC06(config, m_tilegen[1]); m_tilegen[1]->set_gfx_region_wide(0, 1, 0); m_tilegen[1]->set_gfxdecode_tag("gfxdecode"); m_tilegen[1]->set_tile_callback(FUNC(dec0_automat_state::baddudes_tile_cb)); - DECO_BAC06(config, m_tilegen[2], 0); + DECO_BAC06(config, m_tilegen[2]); m_tilegen[2]->set_gfx_region_wide(0, 2, 0); m_tilegen[2]->set_gfxdecode_tag("gfxdecode"); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 1024); @@ -2054,10 +2054,10 @@ void dec0_automat_state::secretab(machine_config &config) // all clocks verified ym3812_device &ym3812(YM3812(config, "ym3812", 20_MHz_XTAL / 8)); ym3812.add_route(ALL_OUTPUTS, "mono", 0.80); - LS157(config, m_adpcm_select[0], 0); + LS157(config, m_adpcm_select[0]); m_adpcm_select[0]->out_callback().set("msm1", FUNC(msm5205_device::data_w)); - LS157(config, m_adpcm_select[1], 0); + LS157(config, m_adpcm_select[1]); m_adpcm_select[1]->out_callback().set("msm2", FUNC(msm5205_device::data_w)); msm5205_device &msm1(MSM5205(config, "msm1", 400_kHz_XTAL)); @@ -2300,7 +2300,7 @@ void dec0_state::midresb(machine_config &config) midres(config); m_maincpu->set_addrmap(AS_PROGRAM, &dec0_state::midresb_map); - M6502(config.replace(), m_audiocpu, 1500000); + M6502(config.replace(), m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec0_state::dec0_s_map); M68705R3(config, m_mcu, XTAL(3'579'545)); diff --git a/src/mame/dataeast/dec8.cpp b/src/mame/dataeast/dec8.cpp index 354a47b4061..6bf2d1954e9 100644 --- a/src/mame/dataeast/dec8.cpp +++ b/src/mame/dataeast/dec8.cpp @@ -1870,13 +1870,13 @@ void dec8_state::set_screen_raw_params_data_east(machine_config &config) void dec8_state::lastmisn(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); + MC6809E(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dec8_state::lastmisn_map); - MC6809E(config, m_subcpu, 2000000); + MC6809E(config, m_subcpu, XTAL::u(2000000)); m_subcpu->set_addrmap(AS_PROGRAM, &dec8_state::lastmisn_sub_map); - M6502(config, m_audiocpu, 1500000); + M6502(config, m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::ym3526_s_map); /* NMIs are caused by the main CPU */ I8751(config, m_mcu, XTAL(8'000'000)); @@ -1894,7 +1894,7 @@ void dec8_state::lastmisn(machine_config &config) /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_KARNOVSPRITES(config, m_spritegen_krn, 0); + DECO_KARNOVSPRITES(config, m_spritegen_krn); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_refresh_hz(58); @@ -1906,7 +1906,7 @@ void dec8_state::lastmisn(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_shackled); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(dec8_state,lastmisn) @@ -1915,13 +1915,13 @@ void dec8_state::lastmisn(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.23); ym1.add_route(1, "mono", 0.23); ym1.add_route(2, "mono", 0.23); ym1.add_route(3, "mono", 0.20); - ym3526_device &ym2(YM3526(config, "ym2", 3000000)); + ym3526_device &ym2(YM3526(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.70); } @@ -1929,13 +1929,13 @@ void dec8_state::lastmisn(machine_config &config) void dec8_state::shackled(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); + MC6809E(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dec8_state::shackled_map); - MC6809E(config, m_subcpu, 2000000); + MC6809E(config, m_subcpu, XTAL::u(2000000)); m_subcpu->set_addrmap(AS_PROGRAM, &dec8_state::shackled_sub_map); - M6502(config, m_audiocpu, 1500000); + M6502(config, m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::ym3526_s_map); /* NMIs are caused by the main CPU */ I8751(config, m_mcu, XTAL(8'000'000)); @@ -1954,7 +1954,7 @@ void dec8_state::shackled(machine_config &config) /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_KARNOVSPRITES(config, m_spritegen_krn, 0); + DECO_KARNOVSPRITES(config, m_spritegen_krn); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_refresh_hz(58); @@ -1966,7 +1966,7 @@ void dec8_state::shackled(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_shackled); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(dec8_state,shackled) @@ -1975,13 +1975,13 @@ void dec8_state::shackled(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.23); ym1.add_route(1, "mono", 0.23); ym1.add_route(2, "mono", 0.23); ym1.add_route(3, "mono", 0.20); - ym3526_device &ym2(YM3526(config, "ym2", 3000000)); + ym3526_device &ym2(YM3526(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.70); } @@ -1989,10 +1989,10 @@ void dec8_state::shackled(machine_config &config) void dec8_state::gondo(machine_config &config) { /* basic machine hardware */ - HD6309E(config, m_maincpu, 3000000); /* HD63C09EP */ + HD6309E(config, m_maincpu, XTAL::u(3000000)); /* HD63C09EP */ m_maincpu->set_addrmap(AS_PROGRAM, &dec8_state::gondo_map); - M6502(config, m_audiocpu, 1500000); + M6502(config, m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::oscar_s_map); /* NMIs are caused by the main CPU */ I8751(config, m_mcu, XTAL(8'000'000)); @@ -2006,7 +2006,7 @@ void dec8_state::gondo(machine_config &config) /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_KARNOVSPRITES(config, m_spritegen_krn, 0); + DECO_KARNOVSPRITES(config, m_spritegen_krn); m_spritegen_krn->set_colpri_callback(FUNC(dec8_state::gondo_colpri_cb)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -2023,7 +2023,7 @@ void dec8_state::gondo(machine_config &config) INPUT_MERGER_ALL_HIGH(config, m_nmigate).output_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gondo); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(dec8_state,gondo) @@ -2032,13 +2032,13 @@ void dec8_state::gondo(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.23); ym1.add_route(1, "mono", 0.23); ym1.add_route(2, "mono", 0.23); ym1.add_route(3, "mono", 0.20); - ym3526_device &ym2(YM3526(config, "ym2", 3000000)); + ym3526_device &ym2(YM3526(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.70); } @@ -2046,10 +2046,10 @@ void dec8_state::gondo(machine_config &config) void dec8_state::garyoret(machine_config &config) { /* basic machine hardware */ - HD6309E(config, m_maincpu, 3000000); /* HD63C09EP */ + HD6309E(config, m_maincpu, XTAL::u(3000000)); /* HD63C09EP */ m_maincpu->set_addrmap(AS_PROGRAM, &dec8_state::garyoret_map); - M6502(config, m_audiocpu, 1500000); + M6502(config, m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::oscar_s_map); /* NMIs are caused by the main CPU */ I8751(config, m_mcu, XTAL(8'000'000)); @@ -2063,7 +2063,7 @@ void dec8_state::garyoret(machine_config &config) /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_KARNOVSPRITES(config, m_spritegen_krn, 0); + DECO_KARNOVSPRITES(config, m_spritegen_krn); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_refresh_hz(58); @@ -2079,7 +2079,7 @@ void dec8_state::garyoret(machine_config &config) INPUT_MERGER_ALL_HIGH(config, m_nmigate).output_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gondo); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(dec8_state,garyoret) @@ -2088,13 +2088,13 @@ void dec8_state::garyoret(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.23); ym1.add_route(1, "mono", 0.23); ym1.add_route(2, "mono", 0.23); ym1.add_route(3, "mono", 0.20); - ym3526_device &ym2(YM3526(config, "ym2", 3000000)); + ym3526_device &ym2(YM3526(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.70); } @@ -2119,11 +2119,11 @@ void dec8_state::ghostb(machine_config &config) /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(2, 2, 0); m_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_KARNOVSPRITES(config, m_spritegen_krn, 0); + DECO_KARNOVSPRITES(config, m_spritegen_krn); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_refresh_hz(58); @@ -2137,7 +2137,7 @@ void dec8_state::ghostb(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_ghostb); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting m_palette->set_prom_region("proms"); m_palette->set_init(m_palette, FUNC(deco_rmc3_device::palette_init_proms)); MCFG_VIDEO_START_OVERRIDE(dec8_state,ghostb) @@ -2161,7 +2161,7 @@ void dec8_state::ghostb(machine_config &config) void dec8_state::meikyuh(machine_config &config) { ghostb(config); - M6502(config.replace(), m_audiocpu, 1500000); + M6502(config.replace(), m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::dec8_s_map); } @@ -2193,7 +2193,7 @@ void csilver_state::csilver(machine_config &config) /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_KARNOVSPRITES(config, m_spritegen_krn, 0); + DECO_KARNOVSPRITES(config, m_spritegen_krn); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_refresh_hz(58); @@ -2206,7 +2206,7 @@ void csilver_state::csilver(machine_config &config) m_screen->screen_vblank().set_inputline(m_subcpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_shackled); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(csilver_state,lastmisn) @@ -2250,12 +2250,12 @@ void dec8_state::oscar(machine_config &config) /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(2, 2, 0); m_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); m_tilegen[0]->set_tile_callback(FUNC(dec8_state::oscar_tile_cb)); - DECO_MXC06(config, m_spritegen_mxc, 0); + DECO_MXC06(config, m_spritegen_mxc); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_refresh_hz(58); @@ -2267,7 +2267,7 @@ void dec8_state::oscar(machine_config &config) m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_oscar); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(dec8_state,oscar) @@ -2291,10 +2291,10 @@ void dec8_state::oscar(machine_config &config) void dec8_state::srdarwin(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); /* MC68A09EP */ + MC6809E(config, m_maincpu, XTAL::u(2000000)); /* MC68A09EP */ m_maincpu->set_addrmap(AS_PROGRAM, &dec8_state::srdarwin_map); - DECO_222(config, m_audiocpu, 1500000); + DECO_222(config, m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::dec8_s_map); /* NMIs are caused by the main CPU */ I8751(config, m_mcu, XTAL(8'000'000)); /* unknown frequency */ @@ -2319,7 +2319,7 @@ void dec8_state::srdarwin(machine_config &config) m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_srdarwin); - DECO_RMC3(config, m_palette, 0, 144); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 144); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(dec8_state,srdarwin) @@ -2328,13 +2328,13 @@ void dec8_state::srdarwin(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.23); ym1.add_route(1, "mono", 0.23); ym1.add_route(2, "mono", 0.23); ym1.add_route(3, "mono", 0.20); - ym3812_device &ym2(YM3812(config, "ym2", 3000000)); + ym3812_device &ym2(YM3812(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.70); } @@ -2342,24 +2342,24 @@ void dec8_state::srdarwin(machine_config &config) void dec8_state::cobracom(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); /* MC68B09EP */ + MC6809E(config, m_maincpu, XTAL::u(2000000)); /* MC68B09EP */ m_maincpu->set_addrmap(AS_PROGRAM, &dec8_state::cobra_map); - M6502(config, m_audiocpu, 1500000); + M6502(config, m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dec8_state::dec8_s_map); /* NMIs are caused by the main CPU */ /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(2, 2, 0); m_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_BAC06(config, m_tilegen[1], 0); + DECO_BAC06(config, m_tilegen[1]); m_tilegen[1]->set_gfx_region_wide(3, 3, 0); m_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_MXC06(config, m_spritegen_mxc, 0); + DECO_MXC06(config, m_spritegen_mxc); m_spritegen_mxc->set_colpri_callback(FUNC(dec8_state::cobracom_colpri_cb)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -2373,7 +2373,7 @@ void dec8_state::cobracom(machine_config &config) m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_cobracom); - DECO_RMC3(config, m_palette, 0, 256); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 256); // xxxxBBBBGGGGRRRR with custom weighting MCFG_VIDEO_START_OVERRIDE(dec8_state,cobracom) @@ -2382,13 +2382,13 @@ void dec8_state::cobracom(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.53); ym1.add_route(1, "mono", 0.53); ym1.add_route(2, "mono", 0.53); ym1.add_route(3, "mono", 0.50); - ym3812_device &ym2(YM3812(config, "ym2", 3000000)); + ym3812_device &ym2(YM3812(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.70); } diff --git a/src/mame/dataeast/decbac06.cpp b/src/mame/dataeast/decbac06.cpp index 567ceadf928..1f489130a3a 100644 --- a/src/mame/dataeast/decbac06.cpp +++ b/src/mame/dataeast/decbac06.cpp @@ -75,7 +75,7 @@ Priority word (Midres): DEFINE_DEVICE_TYPE(DECO_BAC06, deco_bac06_device, "deco_bac06", "DECO BAC06 Tilemap") -deco_bac06_device::deco_bac06_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +deco_bac06_device::deco_bac06_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO_BAC06, tag, owner, clock) , m_pf_data(nullptr) , m_pf_rowscroll(nullptr) diff --git a/src/mame/dataeast/decbac06.h b/src/mame/dataeast/decbac06.h index 8cf9fcc9cae..4b8119de8b5 100644 --- a/src/mame/dataeast/decbac06.h +++ b/src/mame/dataeast/decbac06.h @@ -17,7 +17,7 @@ typedef device_delegate void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/dataeast/deckarn.cpp b/src/mame/dataeast/deckarn.cpp index 67543ea4239..914bf437c28 100644 --- a/src/mame/dataeast/deckarn.cpp +++ b/src/mame/dataeast/deckarn.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(DECO_KARNOVSPRITES, deco_karnovsprites_device, "deco_karnovsprites", "DECO Karnov Sprites") -deco_karnovsprites_device::deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +deco_karnovsprites_device::deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO_KARNOVSPRITES, tag, owner, clock) , m_colpri_cb(*this) { diff --git a/src/mame/dataeast/deckarn.h b/src/mame/dataeast/deckarn.h index 6563dd5a8a3..bcc327506fd 100644 --- a/src/mame/dataeast/deckarn.h +++ b/src/mame/dataeast/deckarn.h @@ -12,7 +12,7 @@ class deco_karnovsprites_device : public device_t public: typedef device_delegate colpri_cb_delegate; - deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + deco_karnovsprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx, u16* spriteram, int size); void set_flip_screen(bool flip) { m_flip_screen = flip; } diff --git a/src/mame/dataeast/decmxc06.cpp b/src/mame/dataeast/decmxc06.cpp index c83bf1f5a90..2f58ae59913 100644 --- a/src/mame/dataeast/decmxc06.cpp +++ b/src/mame/dataeast/decmxc06.cpp @@ -45,7 +45,7 @@ Notes (dec0.cpp) DEFINE_DEVICE_TYPE(DECO_MXC06, deco_mxc06_device, "deco_mxc06", "DECO MXC06 Sprite") -deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +deco_mxc06_device::deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO_MXC06, tag, owner, clock) , device_video_interface(mconfig, *this) , m_colpri_cb(*this) diff --git a/src/mame/dataeast/decmxc06.h b/src/mame/dataeast/decmxc06.h index f0b7071a83a..8e3b2589480 100644 --- a/src/mame/dataeast/decmxc06.h +++ b/src/mame/dataeast/decmxc06.h @@ -12,7 +12,7 @@ class deco_mxc06_device : public device_t, public device_video_interface public: typedef device_delegate colpri_cb_delegate; - deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco_mxc06_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_colpri_callback(T &&... args) { m_colpri_cb.set(std::forward(args)...); } diff --git a/src/mame/dataeast/deco104.cpp b/src/mame/dataeast/deco104.cpp index 673e3cef383..47e29a980ad 100644 --- a/src/mame/dataeast/deco104.cpp +++ b/src/mame/dataeast/deco104.cpp @@ -1051,7 +1051,7 @@ static deco146port_xx const port104_table[] = { DEFINE_DEVICE_TYPE(DECO104PROT, deco104_device, "deco104", "DECO 104 Protection") -deco104_device::deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +deco104_device::deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : deco_146_base_device(mconfig, DECO104PROT, tag, owner, clock) { m_bankswitch_swap_read_address = 0x66; diff --git a/src/mame/dataeast/deco104.h b/src/mame/dataeast/deco104.h index f2649f71601..ebf479f2a35 100644 --- a/src/mame/dataeast/deco104.h +++ b/src/mame/dataeast/deco104.h @@ -13,7 +13,7 @@ class deco104_device : public deco_146_base_device { public: - deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + deco104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/mame/dataeast/deco146.cpp b/src/mame/dataeast/deco146.cpp index 6d4368171be..975a3ea4e59 100644 --- a/src/mame/dataeast/deco146.cpp +++ b/src/mame/dataeast/deco146.cpp @@ -1305,7 +1305,7 @@ u8 deco_146_base_device::soundlatch_r() return m_soundlatch; } -deco_146_base_device::deco_146_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +deco_146_base_device::deco_146_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_port_a_r(*this), m_port_b_r(*this), @@ -1412,7 +1412,7 @@ u16 deco_146_base_device::read_data_getloc(u16 address, int& location) DEFINE_DEVICE_TYPE(DECO146PROT, deco146_device, "deco146", "DECO 146 Protection") -deco146_device::deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +deco146_device::deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : deco_146_base_device(mconfig, DECO146PROT, tag, owner, clock) { m_bankswitch_swap_read_address = 0x78; diff --git a/src/mame/dataeast/deco146.h b/src/mame/dataeast/deco146.h index 31a4b5a4af5..4b13febbc73 100644 --- a/src/mame/dataeast/deco146.h +++ b/src/mame/dataeast/deco146.h @@ -94,7 +94,7 @@ public: deco146port_xx const *m_lookup_table; protected: - deco_146_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + deco_146_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -128,7 +128,7 @@ private: class deco146_device : public deco_146_base_device { public: - deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + deco146_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(DECO146PROT, deco146_device) diff --git a/src/mame/dataeast/deco156.cpp b/src/mame/dataeast/deco156.cpp index 837df667acf..d38665fb3de 100644 --- a/src/mame/dataeast/deco156.cpp +++ b/src/mame/dataeast/deco156.cpp @@ -317,7 +317,7 @@ DECOSPR_PRIORITY_CB_MEMBER(deco156_state::pri_callback) void deco156_state::hvysmsh(machine_config &config) { /* basic machine hardware */ - ARM(config, m_maincpu, 28000000); /* Unconfirmed */ + ARM(config, m_maincpu, XTAL::u(28000000)); /* Unconfirmed */ m_maincpu->set_addrmap(AS_PROGRAM, &deco156_state::hvysmsh_map); EEPROM_93C46_16BIT(config, "eeprom"); @@ -333,7 +333,7 @@ void deco156_state::hvysmsh(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfx_hvysmsh); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 1024); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -346,7 +346,7 @@ void deco156_state::hvysmsh(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_pri_callback(FUNC(deco156_state::pri_callback)); m_sprgen->set_gfxdecode_tag("gfxdecode"); @@ -355,11 +355,11 @@ void deco156_state::hvysmsh(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - OKIM6295(config, m_oki1, 28000000/28, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki1, XTAL::u(28000000)/28, okim6295_device::PIN7_HIGH); m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - OKIM6295(config, m_oki2, 28000000/14, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki2, XTAL::u(28000000)/14, okim6295_device::PIN7_HIGH); m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.35); m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.35); } @@ -367,7 +367,7 @@ void deco156_state::hvysmsh(machine_config &config) void deco156_state::wcvol95(machine_config &config) { /* basic machine hardware */ - ARM(config, m_maincpu, 28000000); /* Unconfirmed */ + ARM(config, m_maincpu, XTAL::u(28000000)); /* Unconfirmed */ m_maincpu->set_addrmap(AS_PROGRAM, &deco156_state::wcvol95_map); EEPROM_93C46_16BIT(config, "eeprom"); @@ -383,7 +383,7 @@ void deco156_state::wcvol95(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfx_hvysmsh); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -396,7 +396,7 @@ void deco156_state::wcvol95(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_pri_callback(FUNC(deco156_state::pri_callback)); m_sprgen->set_gfxdecode_tag("gfxdecode"); @@ -405,7 +405,7 @@ void deco156_state::wcvol95(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 28000000 / 2)); + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(28000000) / 2)); ymz.add_route(0, "lspeaker", 1.0); ymz.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/dataeast/deco16ic.cpp b/src/mame/dataeast/deco16ic.cpp index 59f16889aea..f9c19e74d3f 100644 --- a/src/mame/dataeast/deco16ic.cpp +++ b/src/mame/dataeast/deco16ic.cpp @@ -178,7 +178,7 @@ Rowscroll style: DEFINE_DEVICE_TYPE(DECO16IC, deco16ic_device, "deco16ic", "DECO 55 / 56 / 74 / 141 Tilemap Generator") -deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO16IC, tag, owner, clock) , device_video_interface(mconfig, *this) , m_pf1_data(nullptr) diff --git a/src/mame/dataeast/deco16ic.h b/src/mame/dataeast/deco16ic.h index af35e1ddebb..bf4c22ae860 100644 --- a/src/mame/dataeast/deco16ic.h +++ b/src/mame/dataeast/deco16ic.h @@ -32,7 +32,7 @@ typedef device_delegate deco16_mix_cb_delegate; class deco16ic_device : public device_t, public device_video_interface { public: - deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/dataeast/deco222.cpp b/src/mame/dataeast/deco222.cpp index 2e78dcbfdfd..74621af3eb2 100644 --- a/src/mame/dataeast/deco222.cpp +++ b/src/mame/dataeast/deco222.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(DECO_222, deco_222_device, "deco222", "DECO 222") DEFINE_DEVICE_TYPE(DECO_C10707, deco_c10707_device, "decoc10707", "DECO C10707") -deco_222_device::deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +deco_222_device::deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, DECO_222, tag, owner, clock) { } @@ -49,7 +49,7 @@ u8 deco_222_device::disassembler::decrypt8(u8 value, offs_t pc, bool opcode) con return opcode ? bitswap<8>(value,7,5,6,4,3,2,1,0) : value; } -deco_c10707_device::deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +deco_c10707_device::deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, DECO_C10707, tag, owner, clock) { } diff --git a/src/mame/dataeast/deco222.h b/src/mame/dataeast/deco222.h index e7a6d6b8990..23fbed793bc 100644 --- a/src/mame/dataeast/deco222.h +++ b/src/mame/dataeast/deco222.h @@ -10,7 +10,7 @@ class deco_222_device : public m6502_device { public: - deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco_222_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: class mi_decrypt : public mi_default { @@ -38,7 +38,7 @@ protected: class deco_c10707_device : public m6502_device { public: - deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco_c10707_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: class mi_decrypt : public mi_default { diff --git a/src/mame/dataeast/deco32.cpp b/src/mame/dataeast/deco32.cpp index 619ba2c7a18..53fd77accdf 100644 --- a/src/mame/dataeast/deco32.cpp +++ b/src/mame/dataeast/deco32.cpp @@ -1901,7 +1901,7 @@ void captaven_state::captaven(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "irq_merger").output_handler().set_inputline(m_maincpu, ARM_IRQ_LINE); - DECO_IRQ(config, m_deco_irq, 0); + DECO_IRQ(config, m_deco_irq); m_deco_irq->set_screen_tag(m_screen); m_deco_irq->raster2_irq_callback().set("irq_merger", FUNC(input_merger_any_high_device::in_w<0>)); m_deco_irq->vblank_irq_callback().set("irq_merger", FUNC(input_merger_any_high_device::in_w<1>)); @@ -1914,7 +1914,7 @@ void captaven_state::captaven(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_captaven); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x20); @@ -1925,7 +1925,7 @@ void captaven_state::captaven(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); // pf3 is in 8bpp mode, pf4 is not used + DECO16IC(config, m_deco_tilegen[1]); // pf3 is in 8bpp mode, pf4 is not used m_deco_tilegen[1]->set_pf1_size(DECO_32x32); m_deco_tilegen[1]->set_pf2_size(DECO_32x32); m_deco_tilegen[1]->set_pf1_col_bank(0x04); @@ -1939,12 +1939,12 @@ void captaven_state::captaven(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_pri_callback(FUNC(captaven_state::captaven_pri_callback)); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO146PROT(config, m_ioprot, 0); + DECO146PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("IN0"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("IN1"); @@ -1990,7 +1990,7 @@ void fghthist_state::fghthist(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_fghthist); PALETTE(config, m_palette).set_entries(2048); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -2003,7 +2003,7 @@ void fghthist_state::fghthist(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x20); @@ -2016,12 +2016,12 @@ void fghthist_state::fghthist(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_pri_callback(FUNC(fghthist_state::fghthist_pri_callback)); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO146PROT(config, m_ioprot, 0); + DECO146PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("IN0"); m_ioprot->port_b_cb().set("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)).lshift(0); m_ioprot->port_c_cb().set_ioport("IN1"); @@ -2035,17 +2035,17 @@ void fghthist_state::fghthist(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); - YM2151(config, m_ym2151, 32220000/9); + YM2151(config, m_ym2151, XTAL::u(32220000)/9); m_ym2151->irq_handler().set_inputline(m_audiocpu, 1); m_ym2151->port_write_handler().set(FUNC(deco32_state::sound_bankswitch_w)); m_ym2151->add_route(0, "lspeaker", 0.42); m_ym2151->add_route(1, "rspeaker", 0.42); - OKIM6295(config, m_oki[0], 32220000/32, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[0], XTAL::u(32220000)/32, okim6295_device::PIN7_HIGH); m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - OKIM6295(config, m_oki[1], 32220000/16, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[1], XTAL::u(32220000)/16, okim6295_device::PIN7_HIGH); m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.35); m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.35); } @@ -2088,14 +2088,14 @@ void dragngun_state::dragngun(machine_config &config) ARM(config, m_maincpu, XTAL(28'000'000) / 4); m_maincpu->set_addrmap(AS_PROGRAM, &dragngun_state::dragngun_map); - h6280_device &audiocpu(H6280(config, m_audiocpu, 32220000/8)); + h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL::u(32220000)/8)); audiocpu.set_addrmap(AS_PROGRAM, &dragngun_state::h6280_sound_map); audiocpu.add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused audiocpu.add_route(ALL_OUTPUTS, "rspeaker", 0); INPUT_MERGER_ANY_HIGH(config, "irq_merger").output_handler().set_inputline("maincpu", ARM_IRQ_LINE); - DECO_IRQ(config, m_deco_irq, 0); + DECO_IRQ(config, m_deco_irq); m_deco_irq->set_screen_tag(m_screen); m_deco_irq->raster2_irq_callback().set("irq_merger", FUNC(input_merger_any_high_device::in_w<0>)); m_deco_irq->vblank_irq_callback().set("irq_merger", FUNC(input_merger_any_high_device::in_w<1>)); @@ -2110,7 +2110,7 @@ void dragngun_state::dragngun(machine_config &config) BUFFERED_SPRITERAM32(config, m_spriteram); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x20); @@ -2123,7 +2123,7 @@ void dragngun_state::dragngun(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x04); @@ -2145,7 +2145,7 @@ void dragngun_state::dragngun(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_dragngun); PALETTE(config, m_palette).set_entries(2048); - DECO146PROT(config, m_ioprot, 0); + DECO146PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); @@ -2156,23 +2156,23 @@ void dragngun_state::dragngun(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, m_ym2151, 32220000/9); + YM2151(config, m_ym2151, XTAL::u(32220000)/9); m_ym2151->irq_handler().set_inputline(m_audiocpu, 1); m_ym2151->port_write_handler().set(FUNC(deco32_state::sound_bankswitch_w)); m_ym2151->add_route(0, "lspeaker", 0.42); m_ym2151->add_route(1, "rspeaker", 0.42); - OKIM6295(config, m_oki[0], 32220000/32, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[0], XTAL::u(32220000)/32, okim6295_device::PIN7_HIGH); m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - OKIM6295(config, m_oki[1], 32220000/16, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[1], XTAL::u(32220000)/16, okim6295_device::PIN7_HIGH); m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.35); m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.35); SPEAKER(config, "gun_speaker").front_center(); - OKIM6295(config, m_oki[2], 32220000/32, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[2], XTAL::u(32220000)/32, okim6295_device::PIN7_HIGH); m_oki[2]->add_route(ALL_OUTPUTS, "gun_speaker", 1.0); LC7535(config, m_vol_main); @@ -2200,7 +2200,7 @@ void dragngun_state::lockloadu(machine_config &config) void dragngun_state::namco_sprites(machine_config &config) { - NAMCO_C355SPR(config, m_sprgenzoom, 0); + NAMCO_C355SPR(config, m_sprgenzoom); m_sprgenzoom->set_tile_callback(namco_c355spr_device::c355_obj_code2tile_delegate(&dragngun_state::sprite_bank_callback, this)); m_sprgenzoom->set_palette(m_palette); m_sprgenzoom->set_colors(32); @@ -2223,13 +2223,13 @@ void dragngun_state::lockload(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "irq_merger").output_handler().set_inputline("maincpu", ARM_IRQ_LINE); - Z80(config, m_audiocpu, 32220000/8); + Z80(config, m_audiocpu, XTAL::u(32220000)/8); m_audiocpu->set_addrmap(AS_PROGRAM, &dragngun_state::lockload_sound_map); m_audiocpu->set_addrmap(AS_IO, &dragngun_state::z80_sound_io); INPUT_MERGER_ANY_HIGH(config, "sound_irq_merger").output_handler().set_inputline("audiocpu", INPUT_LINE_IRQ0); - DECO_IRQ(config, m_deco_irq, 0); + DECO_IRQ(config, m_deco_irq); m_deco_irq->set_screen_tag(m_screen); m_deco_irq->lightgun1_callback().set_ioport("LIGHT0_Y"); m_deco_irq->lightgun2_callback().set_ioport("LIGHT1_Y"); @@ -2251,7 +2251,7 @@ void dragngun_state::lockload(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_dragngun); PALETTE(config, m_palette).set_entries(2048); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x20); @@ -2264,7 +2264,7 @@ void dragngun_state::lockload(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_32x32); m_deco_tilegen[1]->set_pf2_size(DECO_32x32); // lockload definitely wants pf34 half width.. m_deco_tilegen[1]->set_pf1_col_bank(0x04); @@ -2279,7 +2279,7 @@ void dragngun_state::lockload(machine_config &config) namco_sprites(config); - DECO146PROT(config, m_ioprot, 0); + DECO146PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); @@ -2290,17 +2290,17 @@ void dragngun_state::lockload(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, m_ym2151, 32220000/9); + YM2151(config, m_ym2151, XTAL::u(32220000)/9); m_ym2151->irq_handler().set("sound_irq_merger", FUNC(input_merger_any_high_device::in_w<1>)); m_ym2151->port_write_handler().set(FUNC(dragngun_state::lockload_okibank_lo_w)); m_ym2151->add_route(0, "lspeaker", 0.42); m_ym2151->add_route(1, "rspeaker", 0.42); - OKIM6295(config, m_oki[0], 32220000/32, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[0], XTAL::u(32220000)/32, okim6295_device::PIN7_HIGH); m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - OKIM6295(config, m_oki[1], 32220000/16, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[1], XTAL::u(32220000)/16, okim6295_device::PIN7_HIGH); m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.35); m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.35); @@ -2312,7 +2312,7 @@ void dragngun_state::lockload(machine_config &config) void nslasher_state::tattass(machine_config &config) { /* basic machine hardware */ - ARM(config, m_maincpu, 28000000/4); // unconfirmed + ARM(config, m_maincpu, XTAL::u(28000000)/4); // unconfirmed m_maincpu->set_addrmap(AS_PROGRAM, &nslasher_state::tattass_map); m_maincpu->set_vblank_int("screen", FUNC(deco32_state::irq0_line_assert)); @@ -2322,9 +2322,9 @@ void nslasher_state::tattass(machine_config &config) m_screen->set_raw(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248); m_screen->set_screen_update(FUNC(nslasher_state::screen_update_tattass)); - DECO_ACE(config, m_deco_ace, 0); + DECO_ACE(config, m_deco_ace); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -2337,7 +2337,7 @@ void nslasher_state::tattass(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x20); @@ -2351,17 +2351,17 @@ void nslasher_state::tattass(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(4); m_sprgen[1]->set_gfxdecode_tag(m_gfxdecode); GFXDECODE(config, m_gfxdecode, m_deco_ace, gfx_nslasher); - DECO104PROT(config, m_ioprot, 0); + DECO104PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("IN0"); m_ioprot->port_b_cb().set(FUNC(nslasher_state::port_b_tattass)); m_ioprot->port_c_cb().set_ioport("IN1"); @@ -2369,7 +2369,7 @@ void nslasher_state::tattass(machine_config &config) m_ioprot->set_interface_scramble_interleave(); /* sound hardware */ - DECOBSMT(config, m_decobsmt, 0); + DECOBSMT(config, m_decobsmt); } void nslasher_state::nslasher(machine_config &config) @@ -2379,7 +2379,7 @@ void nslasher_state::nslasher(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &nslasher_state::nslasher_map); m_maincpu->set_vblank_int("screen", FUNC(deco32_state::irq0_line_assert)); - Z80(config, m_audiocpu, 32220000/9); + Z80(config, m_audiocpu, XTAL::u(32220000)/9); m_audiocpu->set_addrmap(AS_PROGRAM, &nslasher_state::z80_sound_map); m_audiocpu->set_addrmap(AS_IO, &nslasher_state::z80_sound_io); @@ -2393,9 +2393,9 @@ void nslasher_state::nslasher(machine_config &config) m_screen->set_raw(XTAL(28'322'000) / 4, 442, 0, 320, 274, 8, 248); m_screen->set_screen_update(FUNC(nslasher_state::screen_update_nslasher)); - DECO_ACE(config, m_deco_ace, 0); + DECO_ACE(config, m_deco_ace); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -2408,7 +2408,7 @@ void nslasher_state::nslasher(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x20); @@ -2422,17 +2422,17 @@ void nslasher_state::nslasher(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(4); m_sprgen[1]->set_gfxdecode_tag(m_gfxdecode); GFXDECODE(config, m_gfxdecode, m_deco_ace, gfx_nslasher); - DECO104PROT(config, m_ioprot, 0); + DECO104PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("IN0"); m_ioprot->port_b_cb().set("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)).lshift(0); m_ioprot->port_c_cb().set_ioport("IN1"); @@ -2443,17 +2443,17 @@ void nslasher_state::nslasher(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, m_ym2151, 32220000/9); + YM2151(config, m_ym2151, XTAL::u(32220000)/9); m_ym2151->irq_handler().set("sound_irq_merger", FUNC(input_merger_any_high_device::in_w<1>)); m_ym2151->port_write_handler().set(FUNC(deco32_state::sound_bankswitch_w)); m_ym2151->add_route(0, "lspeaker", 0.40); m_ym2151->add_route(1, "rspeaker", 0.40); - OKIM6295(config, m_oki[0], 32220000/32, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[0], XTAL::u(32220000)/32, okim6295_device::PIN7_HIGH); m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.80); m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.80); - OKIM6295(config, m_oki[1], 32220000/16, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[1], XTAL::u(32220000)/16, okim6295_device::PIN7_HIGH); m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.10); m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.10); } @@ -2464,7 +2464,7 @@ void nslasher_state::nslasheru(machine_config &config) nslasher(config); config.device_remove("audiocpu"); - h6280_device &audiocpu(H6280(config, m_audiocpu, 32220000/8)); + h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL::u(32220000)/8)); audiocpu.set_addrmap(AS_PROGRAM, &nslasher_state::h6280_sound_map); audiocpu.add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused audiocpu.add_route(ALL_OUTPUTS, "rspeaker", 0); diff --git a/src/mame/dataeast/deco_ace.cpp b/src/mame/dataeast/deco_ace.cpp index 65354495077..75df759529b 100644 --- a/src/mame/dataeast/deco_ace.cpp +++ b/src/mame/dataeast/deco_ace.cpp @@ -72,7 +72,7 @@ DEFINE_DEVICE_TYPE(DECO_ACE, deco_ace_device, "deco_ace", "Data East 99 'ACE' Chip") -deco_ace_device::deco_ace_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +deco_ace_device::deco_ace_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO_ACE, tag, owner, clock), device_video_interface(mconfig, *this), device_palette_interface(mconfig, *this), diff --git a/src/mame/dataeast/deco_ace.h b/src/mame/dataeast/deco_ace.h index e79680aae98..12c64eeb1ea 100644 --- a/src/mame/dataeast/deco_ace.h +++ b/src/mame/dataeast/deco_ace.h @@ -23,7 +23,7 @@ class deco_ace_device : public device_t, public device_video_interface, public device_palette_interface { public: - deco_ace_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco_ace_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t buffered_palette_r(offs_t offset); uint16_t buffered_palette16_r(offs_t offset); diff --git a/src/mame/dataeast/deco_irq.cpp b/src/mame/dataeast/deco_irq.cpp index f164e481444..ea5436b1815 100644 --- a/src/mame/dataeast/deco_irq.cpp +++ b/src/mame/dataeast/deco_irq.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(DECO_IRQ, deco_irq_device, "deco_irq", "Data East IRQ Control // deco_irq_device - constructor //------------------------------------------------- -deco_irq_device::deco_irq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +deco_irq_device::deco_irq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO_IRQ, tag, owner, clock), m_screen(*this, finder_base::DUMMY_TAG), m_scanline_timer(nullptr), diff --git a/src/mame/dataeast/deco_irq.h b/src/mame/dataeast/deco_irq.h index 2ad9417cde3..e376967619e 100644 --- a/src/mame/dataeast/deco_irq.h +++ b/src/mame/dataeast/deco_irq.h @@ -22,7 +22,7 @@ class deco_irq_device : public device_t { public: // construction/destruction - deco_irq_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco_irq_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto lightgun1_callback() { return m_lightgun1_cb.bind(); } diff --git a/src/mame/dataeast/deco_ld.cpp b/src/mame/dataeast/deco_ld.cpp index d1218f82ffb..b1f56c0236a 100644 --- a/src/mame/dataeast/deco_ld.cpp +++ b/src/mame/dataeast/deco_ld.cpp @@ -466,17 +466,17 @@ void deco_ld_state::machine_start() void deco_ld_state::rblaster(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 8000000/2); + M6502(config, m_maincpu, XTAL::u(8000000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &deco_ld_state::rblaster_map); m_maincpu->set_vblank_int("screen", FUNC(deco_ld_state::irq0_line_hold)); - M6502(config, m_audiocpu, 8000000/2); + M6502(config, m_audiocpu, XTAL::u(8000000)/2); m_audiocpu->set_addrmap(AS_PROGRAM, &deco_ld_state::rblaster_sound_map); m_audiocpu->set_periodic_int(FUNC(deco_ld_state::sound_interrupt), attotime::from_hz(640)); // config.set_maximum_quantum(attotime::from_hz(6000)); - SONY_LDP1000(config, m_laserdisc, 0); + SONY_LDP1000(config, m_laserdisc); m_laserdisc->set_overlay(256, 256, FUNC(deco_ld_state::screen_update_rblaster)); //m_laserdisc->set_overlay_clip(0, 256-1, 8, 240-1); m_laserdisc->add_route(0, "lspeaker", 1.0); @@ -487,7 +487,7 @@ void deco_ld_state::rblaster(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_rblaster); PALETTE(config, m_palette).set_format(palette_device::BGR_233_inverted, 0x800); - //ACIA6850(config, m_acia, 0); + //ACIA6850(config, m_acia); //m_acia->txd_handler().set("laserdisc", FUNC(sony_ldp1000_device::write)); //m_acia->rxd_handler().set("laserdisc", FUNC(sony_ldp1000_device::read)); @@ -499,9 +499,9 @@ void deco_ld_state::rblaster(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); GENERIC_LATCH_8(config, m_soundlatch2); - AY8910(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); + AY8910(config, "ay1", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); - AY8910(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); + AY8910(config, "ay2", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); } /*************************************************************************** diff --git a/src/mame/dataeast/deco_mlc.cpp b/src/mame/dataeast/deco_mlc.cpp index 0839d0d0301..0e0711ec036 100644 --- a/src/mame/dataeast/deco_mlc.cpp +++ b/src/mame/dataeast/deco_mlc.cpp @@ -539,7 +539,7 @@ void deco_mlc_state::machine_reset() void deco_mlc_state::avengrgs(machine_config &config) { // basic machine hardware - SH2(config, m_maincpu, 42000000/2); // 21 MHz clock confirmed on real board + SH2(config, m_maincpu, XTAL::u(42000000)/2); // 21 MHz clock confirmed on real board m_maincpu->set_addrmap(AS_PROGRAM, &deco_mlc_state::avengrgs_map); EEPROM_93C46_16BIT(config, m_eeprom); // Actually 93c45 @@ -563,7 +563,7 @@ void deco_mlc_state::avengrgs(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YMZ280B(config, m_ymz, 42000000 / 3); + YMZ280B(config, m_ymz, XTAL::u(42000000) / 3); m_ymz->add_route(0, "lspeaker", 1.0); m_ymz->add_route(1, "rspeaker", 1.0); } @@ -571,7 +571,7 @@ void deco_mlc_state::avengrgs(machine_config &config) void deco_mlc_state::mlc(machine_config &config) { // basic machine hardware - ARM(config, m_maincpu, 42000000/6); // 42 MHz -> 7MHz clock confirmed on real board + ARM(config, m_maincpu, XTAL::u(42000000)/6); // 42 MHz -> 7MHz clock confirmed on real board m_maincpu->set_addrmap(AS_PROGRAM, &deco_mlc_state::decomlc_no146_map); EEPROM_93C46_16BIT(config, m_eeprom); // Actually 93c45 @@ -595,7 +595,7 @@ void deco_mlc_state::mlc(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YMZ280B(config, m_ymz, 42000000 / 3); + YMZ280B(config, m_ymz, XTAL::u(42000000) / 3); m_ymz->add_route(0, "lspeaker", 1.0); m_ymz->add_route(1, "rspeaker", 1.0); } @@ -624,7 +624,7 @@ void deco_mlc_state::stadhr96(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &deco_mlc_state::decomlc_146_map); - DECO146PROT(config, m_deco146, 0); + DECO146PROT(config, m_deco146); m_deco146->set_use_magic_read_address_xor(true); } diff --git a/src/mame/dataeast/decocass.cpp b/src/mame/dataeast/decocass.cpp index 9b789f5bc8f..f218f8263b5 100644 --- a/src/mame/dataeast/decocass.cpp +++ b/src/mame/dataeast/decocass.cpp @@ -1027,7 +1027,7 @@ void decocass_state::decocass(machine_config &config) WATCHDOG_TIMER(config, m_watchdog); - DECOCASS_TAPE(config, m_cassette, 0); + DECOCASS_TAPE(config, m_cassette); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/dataeast/decocass_tape.cpp b/src/mame/dataeast/decocass_tape.cpp index e29d53a0e91..080b676a827 100644 --- a/src/mame/dataeast/decocass_tape.cpp +++ b/src/mame/dataeast/decocass_tape.cpp @@ -61,7 +61,7 @@ static uint16_t tape_crc16_byte(uint16_t crc, uint8_t data); DEFINE_DEVICE_TYPE(DECOCASS_TAPE, decocass_tape_device, "decocass_tape", "DECO Cassette Tape") -decocass_tape_device::decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decocass_tape_device::decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECOCASS_TAPE, tag, owner, clock), m_tape_timer(nullptr), m_speed(0), diff --git a/src/mame/dataeast/decocass_tape.h b/src/mame/dataeast/decocass_tape.h index 051e6af3784..a60b4c77053 100644 --- a/src/mame/dataeast/decocass_tape.h +++ b/src/mame/dataeast/decocass_tape.h @@ -8,7 +8,7 @@ class decocass_tape_device : public device_t { public: - decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~decocass_tape_device() {} uint8_t get_status_bits(); diff --git a/src/mame/dataeast/decocomn.cpp b/src/mame/dataeast/decocomn.cpp index 6d13a1a0d2d..37051dde172 100644 --- a/src/mame/dataeast/decocomn.cpp +++ b/src/mame/dataeast/decocomn.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(DECOCOMN, decocomn_device, "decocomn", "DECO Common Video Functions") -decocomn_device::decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decocomn_device::decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECOCOMN, tag, owner, clock), device_video_interface(mconfig, *this), m_dirty_palette(nullptr), diff --git a/src/mame/dataeast/decocomn.h b/src/mame/dataeast/decocomn.h index 3e9aad17d20..90f34c82fd7 100644 --- a/src/mame/dataeast/decocomn.h +++ b/src/mame/dataeast/decocomn.h @@ -22,7 +22,7 @@ class decocomn_device : public device_t, public device_video_interface { public: - decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } diff --git a/src/mame/dataeast/decocpu6.cpp b/src/mame/dataeast/decocpu6.cpp index bc167c5e35f..8c6500e3b44 100644 --- a/src/mame/dataeast/decocpu6.cpp +++ b/src/mame/dataeast/decocpu6.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(DECO_CPU6, deco_cpu6_device, "decocpu6", "DECO CPU-6") -deco_cpu6_device::deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +deco_cpu6_device::deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, DECO_CPU6, tag, owner, clock) { } diff --git a/src/mame/dataeast/decocpu6.h b/src/mame/dataeast/decocpu6.h index 3b46ec1093e..9524bb27e6f 100644 --- a/src/mame/dataeast/decocpu6.h +++ b/src/mame/dataeast/decocpu6.h @@ -10,7 +10,7 @@ class deco_cpu6_device : public m6502_device { public: - deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco_cpu6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: class mi_decrypt : public mi_default { diff --git a/src/mame/dataeast/decocpu7.cpp b/src/mame/dataeast/decocpu7.cpp index 7f90c30ff01..95022c243f2 100644 --- a/src/mame/dataeast/decocpu7.cpp +++ b/src/mame/dataeast/decocpu7.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(DECO_CPU7, deco_cpu7_device, "decocpu7", "DECO CPU-7") -deco_cpu7_device::deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +deco_cpu7_device::deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, DECO_CPU7, tag, owner, clock) { } diff --git a/src/mame/dataeast/decocpu7.h b/src/mame/dataeast/decocpu7.h index 824f80834ff..7cd32645b99 100644 --- a/src/mame/dataeast/decocpu7.h +++ b/src/mame/dataeast/decocpu7.h @@ -10,7 +10,7 @@ class deco_cpu7_device : public m6502_device { public: - deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco_cpu7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: class mi_decrypt : public mi_default { diff --git a/src/mame/dataeast/decrmc3.cpp b/src/mame/dataeast/decrmc3.cpp index a50cfc4b385..1a3e0652cd3 100644 --- a/src/mame/dataeast/decrmc3.cpp +++ b/src/mame/dataeast/decrmc3.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(DECO_RMC3, deco_rmc3_device, "deco_rmc3", "DECO RM-C3 PALETTE") -deco_rmc3_device::deco_rmc3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +deco_rmc3_device::deco_rmc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO_RMC3, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_entries(0) diff --git a/src/mame/dataeast/decrmc3.h b/src/mame/dataeast/decrmc3.h index aa5da4e3982..d7f3e83e736 100644 --- a/src/mame/dataeast/decrmc3.h +++ b/src/mame/dataeast/decrmc3.h @@ -35,13 +35,13 @@ class deco_rmc3_device : public device_t, public device_palette_interface { public: // construction/destruction - deco_rmc3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, u32 entries) - : deco_rmc3_device(mconfig, tag, owner, clock) + deco_rmc3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 entries) + : deco_rmc3_device(mconfig, tag, owner) { set_entries(entries); } - deco_rmc3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + deco_rmc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration template void set_init(T &&... args) { m_init.set(std::forward(args)...); } diff --git a/src/mame/dataeast/deshoros.cpp b/src/mame/dataeast/deshoros.cpp index 7c6b9c29997..221c01489a2 100644 --- a/src/mame/dataeast/deshoros.cpp +++ b/src/mame/dataeast/deshoros.cpp @@ -286,7 +286,7 @@ void destiny_state::destiny(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 800); // TODO: determine exact frequency thru schematics + BEEP(config, m_beeper, XTAL::u(800)); // TODO: determine exact frequency thru schematics m_beeper->add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/dataeast/dietgo.cpp b/src/mame/dataeast/dietgo.cpp index df44ea6db53..ae7587bc24b 100644 --- a/src/mame/dataeast/dietgo.cpp +++ b/src/mame/dataeast/dietgo.cpp @@ -286,7 +286,7 @@ void dietgo_state::dietgo(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_dietgo); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -299,11 +299,11 @@ void dietgo_state::dietgo(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_gfxdecode_tag("gfxdecode"); - DECO104PROT(config, m_deco104, 0); + DECO104PROT(config, m_deco104); m_deco104->port_a_cb().set_ioport("INPUTS"); m_deco104->port_b_cb().set_ioport("SYSTEM"); m_deco104->port_c_cb().set_ioport("DSW"); diff --git a/src/mame/dataeast/dreambal.cpp b/src/mame/dataeast/dreambal.cpp index edd0f39796a..1a0e02017b2 100644 --- a/src/mame/dataeast/dreambal.cpp +++ b/src/mame/dataeast/dreambal.cpp @@ -313,7 +313,7 @@ void dreambal_state::machine_reset() void dreambal_state::dreambal(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 28000000/2); + M68000(config, m_maincpu, XTAL::u(28000000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &dreambal_state::dreambal_map); m_maincpu->set_vblank_int("screen", FUNC(dreambal_state::irq6_line_hold)); // 5 valid too? @@ -331,12 +331,12 @@ void dreambal_state::dreambal(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); // 93lc46b - DECO104PROT(config, m_deco104, 0); + DECO104PROT(config, m_deco104); m_deco104->port_a_cb().set_ioport("INPUTS"); m_deco104->port_b_cb().set_ioport("SYSTEM"); m_deco104->port_c_cb().set_ioport("DSW"); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -352,7 +352,7 @@ void dreambal_state::dreambal(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 9830400/8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); + OKIM6295(config, "oki", XTAL::u(9830400)/8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); } diff --git a/src/mame/dataeast/exprraid.cpp b/src/mame/dataeast/exprraid.cpp index c73fb741681..0214fb418cb 100644 --- a/src/mame/dataeast/exprraid.cpp +++ b/src/mame/dataeast/exprraid.cpp @@ -524,7 +524,7 @@ void exprraid_state::exprboot(machine_config &config) { exprraid(config); - M6502(config.replace(), m_maincpu, 1500000); /* 1.5 MHz ??? */ + M6502(config.replace(), m_maincpu, XTAL::u(1500000)); /* 1.5 MHz ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &exprraid_state::master_map); } diff --git a/src/mame/dataeast/firetrap.cpp b/src/mame/dataeast/firetrap.cpp index cdd8f40a617..33186d964f9 100644 --- a/src/mame/dataeast/firetrap.cpp +++ b/src/mame/dataeast/firetrap.cpp @@ -993,7 +993,7 @@ void base_state::base(machine_config &config) ym3526_device &ymsnd(YM3526(config, "ymsnd", FIRETRAP_XTAL / 4)); // 3 MHz ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); MSM5205(config, m_msm, FIRETRAP_XTAL / 32); // 375 kHz @@ -1009,7 +1009,7 @@ void original_state::firetrap(machine_config &config) // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &original_state::main_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(original_state::interrupt), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(original_state::interrupt), "screen", 0, 1); I8751(config, m_mcu, 8_MHz_XTAL); m_mcu->port_in_cb<0>().set(FUNC(original_state::mcu_p0_r)); @@ -1028,7 +1028,7 @@ void bootleg_state::firetrapbl(machine_config &config) // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &bootleg_state::main_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(bootleg_state::interrupt), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(bootleg_state::interrupt), "screen", 0, 1); } diff --git a/src/mame/dataeast/funkyjet.cpp b/src/mame/dataeast/funkyjet.cpp index 17179832b49..c8652afde4f 100644 --- a/src/mame/dataeast/funkyjet.cpp +++ b/src/mame/dataeast/funkyjet.cpp @@ -414,7 +414,7 @@ void funkyjet_state::funkyjet(machine_config &config) m_screen->set_screen_update(FUNC(funkyjet_state::screen_update)); m_screen->set_palette("palette"); - DECO146PROT(config, m_deco146, 0); + DECO146PROT(config, m_deco146); m_deco146->port_a_cb().set_ioport("INPUTS"); m_deco146->port_b_cb().set_ioport("SYSTEM"); m_deco146->port_c_cb().set_ioport("DSW"); @@ -424,7 +424,7 @@ void funkyjet_state::funkyjet(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_funkyjet); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -435,7 +435,7 @@ void funkyjet_state::funkyjet(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_gfxdecode_tag("gfxdecode"); diff --git a/src/mame/dataeast/karnov.cpp b/src/mame/dataeast/karnov.cpp index 3998c71bf3a..5fd9de44c44 100644 --- a/src/mame/dataeast/karnov.cpp +++ b/src/mame/dataeast/karnov.cpp @@ -748,11 +748,11 @@ void karnov_state::karnov(machine_config &config) m_screen->screen_vblank().set_inputline(m_maincpu, 7, ASSERT_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_karnov); - DECO_RMC3(config, m_palette, 0, 1024); // xxxxBBBBGGGGRRRR with custom weighting + DECO_RMC3(config, m_palette, 1024); // xxxxBBBBGGGGRRRR with custom weighting m_palette->set_prom_region("proms"); m_palette->set_init("palette", FUNC(deco_rmc3_device::palette_init_proms)); - DECO_KARNOVSPRITES(config, m_spritegen, 0); + DECO_KARNOVSPRITES(config, m_spritegen); MCFG_VIDEO_START_OVERRIDE(karnov_state,karnov) @@ -786,7 +786,7 @@ void karnov_state::karnovjbl(machine_config &config) config.device_remove("mcu"); config.device_remove("coin"); - ym3812_device &ym2(YM3812(config.replace(), "ym2", 3000000)); + ym3812_device &ym2(YM3812(config.replace(), "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_audiocpu, M6502_IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/dataeast/kchamp.cpp b/src/mame/dataeast/kchamp.cpp index b9fcbf035f8..2bdd0006d9f 100644 --- a/src/mame/dataeast/kchamp.cpp +++ b/src/mame/dataeast/kchamp.cpp @@ -446,10 +446,10 @@ void kchamp_state::kchampvs(machine_config &config) AY8910(config, m_ay[0], XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "speaker", 0.3); // verified on PCB AY8910(config, m_ay[1], XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "speaker", 0.3); // verified on PCB - LS157(config, m_adpcm_select, 0); // at 4C + LS157(config, m_adpcm_select); // at 4C m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); - MSM5205(config, m_msm, 375000); // verified on PCB, discrete circuit clock + MSM5205(config, m_msm, XTAL::u(375000)); // verified on PCB, discrete circuit clock m_msm->vck_callback().set(FUNC(kchamp_state::msmint)); // interrupt function m_msm->set_prescaler_selector(msm5205_device::S96_4B); // 1 / 96 = 3906.25Hz playback m_msm->add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -501,7 +501,7 @@ void kchamp_state::kchamp(machine_config &config) AY8910(config, m_ay[0], XTAL(12'000'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.3); // Guess based on actual PCB recordings of karatedo AY8910(config, m_ay[1], XTAL(12'000'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.3); // Guess based on actual PCB recordings of karatedo - DAC08(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // IC11 + DAC08(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.3); // IC11 } void kchamp_state::kchamp_arfyc(machine_config &config) diff --git a/src/mame/dataeast/kingobox.cpp b/src/mame/dataeast/kingobox.cpp index e6e703ece4b..a553f373dad 100644 --- a/src/mame/dataeast/kingobox.cpp +++ b/src/mame/dataeast/kingobox.cpp @@ -464,13 +464,13 @@ void kingofb_state::machine_reset() void kingofb_state::kingofb(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); // 4.0 MHz + Z80(config, m_maincpu, XTAL::u(4000000)); // 4.0 MHz m_maincpu->set_addrmap(AS_PROGRAM, &kingofb_state::kingobox_map); - Z80(config, m_video_cpu, 4000000); // 4.0 MHz + Z80(config, m_video_cpu, XTAL::u(4000000)); // 4.0 MHz m_video_cpu->set_addrmap(AS_PROGRAM, &kingofb_state::kingobox_video_map); - Z80(config, m_sprite_cpu, 4000000); // 4.0 MHz + Z80(config, m_sprite_cpu, XTAL::u(4000000)); // 4.0 MHz m_sprite_cpu->set_addrmap(AS_PROGRAM, &kingofb_state::kingobox_sprite_map); INPUT_MERGER_ALL_HIGH(config, m_nmigate); @@ -478,11 +478,11 @@ void kingofb_state::kingofb(machine_config &config) m_nmigate->output_handler().append_inputline(m_video_cpu, INPUT_LINE_NMI); m_nmigate->output_handler().append_inputline(m_sprite_cpu, INPUT_LINE_NMI); - Z80(config, m_audiocpu, 4000000); // 4.0 MHz + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4.0 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &kingofb_state::kingobox_sound_map); m_audiocpu->set_addrmap(AS_IO, &kingofb_state::kingobox_sound_io_map); - CLOCK(config, "soundnmi", 6000).signal_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); + CLOCK(config, "soundnmi", XTAL::u(6000)).signal_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); config.set_maximum_quantum(attotime::from_hz(6000)); // We really need heavy synching among the processors @@ -506,11 +506,11 @@ void kingofb_state::kingofb(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ay8910_device &aysnd(AY8910(config, "aysnd", 1500000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1500000))); aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.125); // 100K (R30-44 even)/200K (R31-45 odd) ladder network + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.125); // 100K (R30-44 even)/200K (R31-45 odd) ladder network } @@ -518,13 +518,13 @@ void kingofb_state::kingofb(machine_config &config) void kingofb_state::ringking(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); // 4.0 MHz + Z80(config, m_maincpu, XTAL::u(4000000)); // 4.0 MHz m_maincpu->set_addrmap(AS_PROGRAM, &kingofb_state::ringking_map); - Z80(config, m_video_cpu, 4000000); // 4.0 MHz + Z80(config, m_video_cpu, XTAL::u(4000000)); // 4.0 MHz m_video_cpu->set_addrmap(AS_PROGRAM, &kingofb_state::ringking_video_map); - Z80(config, m_sprite_cpu, 4000000); // 4.0 MHz + Z80(config, m_sprite_cpu, XTAL::u(4000000)); // 4.0 MHz m_sprite_cpu->set_addrmap(AS_PROGRAM, &kingofb_state::ringking_sprite_map); INPUT_MERGER_ALL_HIGH(config, m_nmigate); @@ -532,11 +532,11 @@ void kingofb_state::ringking(machine_config &config) m_nmigate->output_handler().append_inputline(m_video_cpu, INPUT_LINE_NMI); m_nmigate->output_handler().append_inputline(m_sprite_cpu, INPUT_LINE_NMI); - Z80(config, m_audiocpu, 4000000); // 4.0 MHz + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4.0 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &kingofb_state::kingobox_sound_map); m_audiocpu->set_addrmap(AS_IO, &kingofb_state::ringking_sound_io_map); - CLOCK(config, "soundnmi", 6000).signal_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); + CLOCK(config, "soundnmi", XTAL::u(6000)).signal_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); config.set_maximum_quantum(attotime::from_hz(6000)); // We really need heavy synching among the processors @@ -560,11 +560,11 @@ void kingofb_state::ringking(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ay8910_device &aysnd(AY8910(config, "aysnd", 1500000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1500000))); aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.125); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.125); // unknown DAC } diff --git a/src/mame/dataeast/lemmings.cpp b/src/mame/dataeast/lemmings.cpp index 705ec7aff33..ee4d0230ae3 100644 --- a/src/mame/dataeast/lemmings.cpp +++ b/src/mame/dataeast/lemmings.cpp @@ -238,15 +238,15 @@ void lemmings_state::lemmings(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_lemmings); PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 1024); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(1); m_sprgen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(0); m_sprgen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO146PROT(config, m_deco146, 0); + DECO146PROT(config, m_deco146); m_deco146->port_a_cb().set_ioport("INPUTS"); m_deco146->port_b_cb().set_ioport("SYSTEM"); m_deco146->port_c_cb().set_ioport("DSW"); @@ -264,7 +264,7 @@ void lemmings_state::lemmings(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.45); ymsnd.add_route(1, "rspeaker", 0.45); - okim6295_device &oki(OKIM6295(config, "oki", 1023924, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1023924), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50); } diff --git a/src/mame/dataeast/liberate.cpp b/src/mame/dataeast/liberate.cpp index e8bd9ead34a..151a179d8ed 100644 --- a/src/mame/dataeast/liberate.cpp +++ b/src/mame/dataeast/liberate.cpp @@ -734,11 +734,11 @@ MACHINE_RESET_MEMBER(liberate_state,liberate) void liberate_state::liberate_base(machine_config &config) { /* basic machine hardware */ - DECO16(config, m_maincpu, 2000000); + DECO16(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::liberate_map); m_maincpu->set_addrmap(AS_IO, &liberate_state::deco16_io_map); - DECO_222(config, m_audiocpu, 1500000); /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */ + DECO_222(config, m_audiocpu, XTAL::u(1500000)); /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */ m_audiocpu->set_addrmap(AS_PROGRAM, &liberate_state::liberate_sound_map); m_audiocpu->set_periodic_int(FUNC(liberate_state::nmi_line_pulse), attotime::from_hz(16*60)); /* ??? */ @@ -767,9 +767,9 @@ void liberate_state::liberate_base(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8912(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.30); + AY8912(config, "ay1", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.30); - AY8912(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8912(config, "ay2", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.50); } void liberate_state::liberate(machine_config &config) @@ -783,7 +783,7 @@ void liberate_state::liberatb(machine_config &config) liberate_base(config); /* basic machine hardware */ - M6502(config.replace(), m_maincpu, 2000000); + M6502(config.replace(), m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::liberatb_map); } @@ -800,11 +800,11 @@ void liberate_state::prosoccr(machine_config &config) liberate_base(config); /* basic machine hardware */ - m_maincpu->set_clock(10000000/8); //xtal is unknown? + m_maincpu->set_clock(XTAL::u(10000000)/8); //xtal is unknown? m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::prosoccr_map); m_maincpu->set_addrmap(AS_IO, &liberate_state::prosoccr_io_map); - m_audiocpu->set_clock(10000000/8); //xtal is 12 Mhz, divider is unknown + m_audiocpu->set_clock(XTAL::u(10000000)/8); //xtal is 12 Mhz, divider is unknown m_audiocpu->set_addrmap(AS_PROGRAM, &liberate_state::prosoccr_sound_map); config.set_maximum_quantum(attotime::from_hz(12000)); @@ -820,11 +820,11 @@ void liberate_state::prosoccr(machine_config &config) void liberate_state::prosport(machine_config &config) { /* basic machine hardware */ - DECO16(config, m_maincpu, 2000000); + DECO16(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &liberate_state::prosport_map); m_maincpu->set_addrmap(AS_IO, &liberate_state::deco16_io_map); - DECO_222(config, m_audiocpu, 1500000/2); /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */ + DECO_222(config, m_audiocpu, XTAL::u(1500000)/2); /* is it a real 222 (M6502 with bitswapped opcodes), or the same thing in external logic? */ m_audiocpu->set_addrmap(AS_PROGRAM, &liberate_state::liberate_sound_map); m_audiocpu->set_periodic_int(FUNC(liberate_state::nmi_line_pulse), attotime::from_hz(16*60)); /* ??? */ @@ -853,9 +853,9 @@ void liberate_state::prosport(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8912(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.30); + AY8912(config, "ay1", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.30); - AY8912(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8912(config, "ay2", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/dataeast/madmotor.cpp b/src/mame/dataeast/madmotor.cpp index 847184979b6..bdb567d4c77 100644 --- a/src/mame/dataeast/madmotor.cpp +++ b/src/mame/dataeast/madmotor.cpp @@ -241,11 +241,11 @@ uint32_t madmotor_state::screen_update(screen_device &screen, bitmap_ind16 &bitm void madmotor_state::madmotor(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* Custom chip 59, 24 MHz crystal */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* Custom chip 59, 24 MHz crystal */ m_maincpu->set_addrmap(AS_PROGRAM, &madmotor_state::madmotor_map); m_maincpu->set_vblank_int("screen", FUNC(madmotor_state::irq6_line_hold)); /* VBL */ - H6280(config, m_audiocpu, 8053000/2); /* Custom chip 45, Crystal near CPU is 8.053 MHz */ + H6280(config, m_audiocpu, XTAL::u(8053000)/2); /* Custom chip 45, Crystal near CPU is 8.053 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &madmotor_state::sound_map); m_audiocpu->add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused @@ -262,35 +262,35 @@ void madmotor_state::madmotor(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_madmotor); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024); - DECO_BAC06(config, m_tilegen[0], 0); + DECO_BAC06(config, m_tilegen[0]); m_tilegen[0]->set_gfx_region_wide(0, 0, 0); m_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO_BAC06(config, m_tilegen[1], 0); + DECO_BAC06(config, m_tilegen[1]); m_tilegen[1]->set_gfx_region_wide(0, 1, 0); m_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_BAC06(config, m_tilegen[2], 0); + DECO_BAC06(config, m_tilegen[2]); m_tilegen[2]->set_gfx_region_wide(0, 2, 1); m_tilegen[2]->set_gfxdecode_tag(m_gfxdecode); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0); - YM2203(config, "ym1", 21470000/6).add_route(ALL_OUTPUTS, "mono", 0.40); + YM2203(config, "ym1", XTAL::u(21470000)/6).add_route(ALL_OUTPUTS, "mono", 0.40); - ym2151_device &ym2(YM2151(config, "ym2", 21470000/6)); + ym2151_device &ym2(YM2151(config, "ym2", XTAL::u(21470000)/6)); ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */ ym2.add_route(0, "mono", 0.45); ym2.add_route(1, "mono", 0.45); - OKIM6295(config, "oki1", 1023924, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified + OKIM6295(config, "oki1", XTAL::u(1023924), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified - OKIM6295(config, "oki2", 2047848, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.25); // clock frequency & pin 7 not verified + OKIM6295(config, "oki2", XTAL::u(2047848), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.25); // clock frequency & pin 7 not verified } /******************************************************************************/ diff --git a/src/mame/dataeast/metlclsh.cpp b/src/mame/dataeast/metlclsh.cpp index 749e209cc75..0459e610273 100644 --- a/src/mame/dataeast/metlclsh.cpp +++ b/src/mame/dataeast/metlclsh.cpp @@ -278,11 +278,11 @@ void metlclsh_state::machine_reset() void metlclsh_state::metlclsh(machine_config &config) { /* basic machine hardware */ - M6809(config, m_maincpu, 1500000); // ? + M6809(config, m_maincpu, XTAL::u(1500000)); // ? m_maincpu->set_addrmap(AS_PROGRAM, &metlclsh_state::metlclsh_master_map); // IRQ by YM3526, NMI by CPU #2 - M6809(config, m_subcpu, 1500000); // ? + M6809(config, m_subcpu, XTAL::u(1500000)); // ? m_subcpu->set_addrmap(AS_PROGRAM, &metlclsh_state::metlclsh_slave_map); // IRQ by CPU #1, NMI by coin insertion @@ -301,13 +301,13 @@ void metlclsh_state::metlclsh(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym2203_device &ym1(YM2203(config, "ym1", 1500000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1500000))); ym1.add_route(0, "mono", 0.10); ym1.add_route(1, "mono", 0.10); ym1.add_route(2, "mono", 0.10); ym1.add_route(3, "mono", 0.50); - ym3526_device &ym2(YM3526(config, "ym2", 3000000)); + ym3526_device &ym2(YM3526(config, "ym2", XTAL::u(3000000))); ym2.irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); ym2.add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/dataeast/mirage.cpp b/src/mame/dataeast/mirage.cpp index 6822ce3114a..4c9e318d49a 100644 --- a/src/mame/dataeast/mirage.cpp +++ b/src/mame/dataeast/mirage.cpp @@ -288,7 +288,7 @@ void miragemj_state::machine_reset() void miragemj_state::mirage(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 28000000/2); + M68000(config, m_maincpu, XTAL::u(28000000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &miragemj_state::mirage_map); m_maincpu->set_vblank_int("screen", FUNC(miragemj_state::irq6_line_hold)); @@ -308,7 +308,7 @@ void miragemj_state::mirage(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_mirage); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 1024); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -321,7 +321,7 @@ void miragemj_state::mirage(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_pri_callback(FUNC(miragemj_state::pri_callback)); m_sprgen->set_gfxdecode_tag("gfxdecode"); @@ -329,9 +329,9 @@ void miragemj_state::mirage(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki_bgm, 2000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki_bgm, XTAL::u(2000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); // clock frequency & pin 7 not verified - OKIM6295(config, m_oki_sfx, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki_sfx, XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70); // clock frequency & pin 7 not verified } diff --git a/src/mame/dataeast/pcktgal.cpp b/src/mame/dataeast/pcktgal.cpp index 20e02f7299a..4515cd21d60 100644 --- a/src/mame/dataeast/pcktgal.cpp +++ b/src/mame/dataeast/pcktgal.cpp @@ -371,10 +371,10 @@ void pcktgal_state::machine_start() void pcktgal_state::pcktgal(machine_config &config) { // basic machine hardware - M6502(config, m_maincpu, 2000000); + M6502(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pcktgal_state::main_map); - DECO_222(config, m_audiocpu, 1500000); + DECO_222(config, m_audiocpu, XTAL::u(1500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &pcktgal_state::sound_map); // IRQs are caused by the ADPCM chip // NMIs are caused by the main CPU @@ -392,7 +392,7 @@ void pcktgal_state::pcktgal(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_pcktgal); PALETTE(config, m_palette, FUNC(pcktgal_state::palette), 512); - DECO_BAC06(config, m_tilegen, 0); + DECO_BAC06(config, m_tilegen); m_tilegen->set_gfx_region_wide(0, 0, 0); m_tilegen->set_gfxdecode_tag(m_gfxdecode); @@ -401,10 +401,10 @@ void pcktgal_state::pcktgal(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM2203(config, "ym1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.60); - YM3812(config, "ym2", 3000000).add_route(ALL_OUTPUTS, "mono", 1.00); + YM2203(config, "ym1", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.60); + YM3812(config, "ym2", XTAL::u(3000000)).add_route(ALL_OUTPUTS, "mono", 1.00); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(pcktgal_state::adpcm_int)); m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8kHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.70); @@ -420,7 +420,7 @@ void pcktgal_state::bootleg(machine_config &config) void pcktgal_state::pcktgal2(machine_config &config) { pcktgal(config); - M6502(config.replace(), m_audiocpu, 1500000); // doesn't use the encrypted 222 + M6502(config.replace(), m_audiocpu, XTAL::u(1500000)); // doesn't use the encrypted 222 m_audiocpu->set_addrmap(AS_PROGRAM, &pcktgal_state::sound_map); } diff --git a/src/mame/dataeast/pktgaldx.cpp b/src/mame/dataeast/pktgaldx.cpp index 1ed0fd67fb6..d1f92ef07ff 100644 --- a/src/mame/dataeast/pktgaldx.cpp +++ b/src/mame/dataeast/pktgaldx.cpp @@ -524,7 +524,7 @@ void pktgaldx_state::pktgaldx(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pktgaldx); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -537,11 +537,11 @@ void pktgaldx_state::pktgaldx(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag(m_gfxdecode); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_gfxdecode_tag(m_gfxdecode); - DECO104PROT(config, m_deco104, 0); + DECO104PROT(config, m_deco104); m_deco104->port_a_cb().set_ioport("INPUTS"); m_deco104->port_b_cb().set_ioport("SYSTEM"); m_deco104->port_c_cb().set_ioport("DSW"); @@ -564,7 +564,7 @@ void pktgaldx_state::pktgaldx(machine_config &config) void pktgaldxb_state::pktgaldxb(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pktgaldxb_state::prg_map); // video hardware @@ -585,11 +585,11 @@ void pktgaldxb_state::pktgaldxb(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - okim6295_device &oki1(OKIM6295(config, "oki1", 32220000 / 32, okim6295_device::PIN7_HIGH)); + okim6295_device &oki1(OKIM6295(config, "oki1", XTAL::u(32220000)/32, okim6295_device::PIN7_HIGH)); oki1.add_route(ALL_OUTPUTS, "lspeaker", 0.75); oki1.add_route(ALL_OUTPUTS, "rspeaker", 0.75); - OKIM6295(config, m_oki2, 32220000 / 16, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki2, XTAL::u(32220000)/16, okim6295_device::PIN7_HIGH); m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.60); m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.60); } diff --git a/src/mame/dataeast/rohga.cpp b/src/mame/dataeast/rohga.cpp index 72670e830c6..054c3eb8b5c 100644 --- a/src/mame/dataeast/rohga.cpp +++ b/src/mame/dataeast/rohga.cpp @@ -869,10 +869,10 @@ DECOSPR_COLOUR_CB_MEMBER(rohga_state::schmeisr_col_callback) void rohga_state::rohga_base(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 14'000'000); + M68000(config, m_maincpu, XTAL::u(14'000'000)); m_maincpu->set_vblank_int("screen", FUNC(rohga_state::irq6_line_assert)); - H6280(config, m_audiocpu, 32'220'000/4/3); /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */ + H6280(config, m_audiocpu, XTAL::u(32'220'000)/4/3); /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */ m_audiocpu->set_addrmap(AS_PROGRAM, &rohga_state::sound_map); m_audiocpu->add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused m_audiocpu->add_route(ALL_OUTPUTS, "rspeaker", 0); @@ -888,10 +888,10 @@ void rohga_state::rohga_base(machine_config &config) PALETTE(config, m_palette).set_entries(2048); - DECOCOMN(config, m_decocomn, 0); + DECOCOMN(config, m_decocomn); m_decocomn->set_palette_tag(m_palette); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x64); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -904,7 +904,7 @@ void rohga_state::rohga_base(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag("gfxdecode"); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x00); @@ -917,11 +917,11 @@ void rohga_state::rohga_base(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(2); m_deco_tilegen[1]->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen[0], 0); + DECO_SPRITE(config, m_sprgen[0]); m_sprgen[0]->set_gfx_region(3); m_sprgen[0]->set_gfxdecode_tag("gfxdecode"); - DECO104PROT(config, m_ioprot, 0); + DECO104PROT(config, m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); @@ -931,17 +931,17 @@ void rohga_state::rohga_base(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 32'220'000/9)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(32'220'000)/9)); ymsnd.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */ ymsnd.port_write_handler().set(FUNC(rohga_state::sound_bankswitch_w)); ymsnd.add_route(0, "lspeaker", 0.36); ymsnd.add_route(1, "rspeaker", 0.36); - OKIM6295(config, m_oki[0], 32'220'000/32, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[0], XTAL::u(32'220'000)/32, okim6295_device::PIN7_HIGH); m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.46); m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.46); - OKIM6295(config, m_oki[1], 32'220'000/16, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[1], XTAL::u(32'220'000)/16, okim6295_device::PIN7_HIGH); m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.18); m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.18); } @@ -979,7 +979,7 @@ void rohga_state::wizdfire(machine_config &config) m_deco_tilegen[0]->set_pf1_size(DECO_64x32); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(4); m_sprgen[1]->set_gfxdecode_tag("gfxdecode"); @@ -1012,13 +1012,13 @@ void rohga_state::nitrobal(machine_config &config) m_deco_tilegen[1]->set_pf1_col_mask(0); m_deco_tilegen[1]->set_pf2_col_mask(0); - DECO_SPRITE(config, m_sprgen[1], 0); + DECO_SPRITE(config, m_sprgen[1]); m_sprgen[1]->set_gfx_region(4); m_sprgen[1]->set_gfxdecode_tag("gfxdecode"); MCFG_VIDEO_START_OVERRIDE(rohga_state, wizdfire) - DECO146PROT(config.replace(), m_ioprot, 0); + DECO146PROT(config.replace(), m_ioprot); m_ioprot->port_a_cb().set_ioport("INPUTS"); m_ioprot->port_b_cb().set_ioport("SYSTEM"); m_ioprot->port_c_cb().set_ioport("DSW"); diff --git a/src/mame/dataeast/simpl156.cpp b/src/mame/dataeast/simpl156.cpp index 64facf8b13e..2e1be1a05d5 100644 --- a/src/mame/dataeast/simpl156.cpp +++ b/src/mame/dataeast/simpl156.cpp @@ -403,7 +403,7 @@ void simpl156_state::chainrec(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfx_simpl156); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -416,7 +416,7 @@ void simpl156_state::chainrec(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_pri_callback(FUNC(simpl156_state::pri_callback)); m_sprgen->set_gfxdecode_tag("gfxdecode"); diff --git a/src/mame/dataeast/sshangha.cpp b/src/mame/dataeast/sshangha.cpp index ea10a2e6d19..2d121aa7004 100644 --- a/src/mame/dataeast/sshangha.cpp +++ b/src/mame/dataeast/sshangha.cpp @@ -392,7 +392,7 @@ void sshangha_state::sshangha(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 0x4000/4); - DECO16IC(config, m_tilegen, 0); + DECO16IC(config, m_tilegen); // requires pf1 to be 64x64 for the ending screen to be displayed properly // TODO: confirm arrangement, game barely uses scrolling otherwise m_tilegen->set_pf1_size(DECO_64x64); @@ -408,15 +408,15 @@ void sshangha_state::sshangha(machine_config &config) m_tilegen->set_pf12_16x16_bank(1); m_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen1, 0); + DECO_SPRITE(config, m_sprgen1); m_sprgen1->set_gfx_region(2); m_sprgen1->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen2, 0); + DECO_SPRITE(config, m_sprgen2); m_sprgen2->set_gfx_region(3); m_sprgen2->set_gfxdecode_tag("gfxdecode"); - DECO146PROT(config, m_deco146, 0); + DECO146PROT(config, m_deco146); m_deco146->port_a_cb().set_ioport("INPUTS"); m_deco146->port_b_cb().set_ioport("SYSTEM"); m_deco146->port_c_cb().set_ioport("DSW"); diff --git a/src/mame/dataeast/stadhero.cpp b/src/mame/dataeast/stadhero.cpp index afe60bd5fe5..b71e5a8702a 100644 --- a/src/mame/dataeast/stadhero.cpp +++ b/src/mame/dataeast/stadhero.cpp @@ -278,16 +278,16 @@ void stadhero_state::stadhero(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_stadhero); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024); - DECO_BAC06(config, m_tilegen, 0); + DECO_BAC06(config, m_tilegen); m_tilegen->set_gfx_region_wide(1, 1, 2); m_tilegen->set_gfxdecode_tag(m_gfxdecode); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); /* sound hardware */ SPEAKER(config, "mono").front_center(); - GENERIC_LATCH_8(config, m_soundlatch, 0); + GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); ym2203_device &ym1(YM2203(config, "ym1", 24_MHz_XTAL/16)); diff --git a/src/mame/dataeast/supbtime.cpp b/src/mame/dataeast/supbtime.cpp index 60ef66c8a25..47109f916ac 100644 --- a/src/mame/dataeast/supbtime.cpp +++ b/src/mame/dataeast/supbtime.cpp @@ -344,7 +344,7 @@ void supbtime_state::supbtime(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_supbtime); PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024); - DECO16IC(config, m_deco_tilegen, 0); + DECO16IC(config, m_deco_tilegen); m_deco_tilegen->set_pf1_size(DECO_64x32); m_deco_tilegen->set_pf2_size(DECO_64x32); m_deco_tilegen->set_pf1_col_bank(0x00); @@ -355,7 +355,7 @@ void supbtime_state::supbtime(machine_config &config) m_deco_tilegen->set_pf12_16x16_bank(1); m_deco_tilegen->set_gfxdecode_tag("gfxdecode"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(2); m_sprgen->set_gfxdecode_tag("gfxdecode"); diff --git a/src/mame/dataeast/thedeep.cpp b/src/mame/dataeast/thedeep.cpp index c027a1a8d21..b059fca1232 100644 --- a/src/mame/dataeast/thedeep.cpp +++ b/src/mame/dataeast/thedeep.cpp @@ -510,7 +510,7 @@ void thedeep_state::thedeep(machine_config &config) Z80(config, m_maincpu, 12_MHz_XTAL / 2); // verified on PCB m_maincpu->set_addrmap(AS_PROGRAM, &thedeep_state::main_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(thedeep_state::interrupt), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(thedeep_state::interrupt), "screen", 0, 1); r65c02_device &audiocpu(R65C02(config, "audiocpu", 12_MHz_XTAL / 8)); // verified on PCB audiocpu.set_addrmap(AS_PROGRAM, &thedeep_state::audio_map); @@ -539,9 +539,9 @@ void thedeep_state::thedeep(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_thedeep); PALETTE(config, m_palette, FUNC(thedeep_state::palette), 512); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); - DECO_BAC06(config, m_tilegen, 0); + DECO_BAC06(config, m_tilegen); m_tilegen->set_gfx_region_wide(1, 1, 0); m_tilegen->set_gfxdecode_tag(m_gfxdecode); m_tilegen->set_thedeep_kludge(); // TODO: this game wants TILE_FLIPX always set. Investigate why. diff --git a/src/mame/dataeast/tryout.cpp b/src/mame/dataeast/tryout.cpp index cdcf57e6811..cffd523edb4 100644 --- a/src/mame/dataeast/tryout.cpp +++ b/src/mame/dataeast/tryout.cpp @@ -188,10 +188,10 @@ GFXDECODE_END void tryout_state::tryout(machine_config &config) { // basic machine hardware - M6502(config, m_maincpu, 2000000); // ? + M6502(config, m_maincpu, XTAL::u(2000000)); // ? m_maincpu->set_addrmap(AS_PROGRAM, &tryout_state::main_cpu); - M6502(config, m_audiocpu, 1500000); // ? + M6502(config, m_audiocpu, XTAL::u(1500000)); // ? m_audiocpu->set_addrmap(AS_PROGRAM, &tryout_state::sound_cpu); m_audiocpu->set_periodic_int(FUNC(tryout_state::nmi_line_pulse), attotime::from_hz(1000)); // controls BGM tempo, 1000 is an hand-tuned value to match a side-by-side video @@ -213,7 +213,7 @@ void tryout_state::tryout(machine_config &config) generic_latch_8_device &soundlatch(GENERIC_LATCH_8(config, "soundlatch")); soundlatch.data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_IRQ0); - YM2203(config, "ymsnd", 1500000).add_route(ALL_OUTPUTS, "mono", 0.50); + YM2203(config, "ymsnd", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.50); } ROM_START( tryout ) diff --git a/src/mame/dataeast/tumbleb.cpp b/src/mame/dataeast/tumbleb.cpp index e934e75e362..197a9bcd00f 100644 --- a/src/mame/dataeast/tumbleb.cpp +++ b/src/mame/dataeast/tumbleb.cpp @@ -2122,7 +2122,7 @@ MACHINE_RESET_MEMBER(tumbleb_state,tumbleb) void tumbleb_state::tumblepb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 14000000); + M68000(config, m_maincpu, XTAL::u(14000000)); m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::tumblepopb_main_map); m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::irq6_line_hold)); @@ -2138,7 +2138,7 @@ void tumbleb_state::tumblepb(machine_config &config) m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_tumblepb)); m_screen->set_palette(m_palette); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); @@ -2151,7 +2151,7 @@ void tumbleb_state::tumblepb(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 8000000/10, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70); + OKIM6295(config, m_oki, XTAL::u(8000000)/10, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70); } void tumbleb_state::tumblepba(machine_config &config) @@ -2163,7 +2163,7 @@ void tumbleb_state::tumblepba(machine_config &config) void tumbleb_state::tumbleb2(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 14000000); + M68000(config, m_maincpu, XTAL::u(14000000)); m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::tumblepopb_main_map); m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::tumbleb2_interrupt)); @@ -2179,7 +2179,7 @@ void tumbleb_state::tumbleb2(machine_config &config) m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_tumblepb)); m_screen->set_palette(m_palette); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); @@ -2192,7 +2192,7 @@ void tumbleb_state::tumbleb2(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 8000000/10, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70); + OKIM6295(config, m_oki, XTAL::u(8000000)/10, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70); } void tumbleb_pic_state::funkyjetb(machine_config &config) @@ -2237,7 +2237,7 @@ void tumbleb_state::jumpkids(machine_config &config) // OSCs: 12MHz, 8MHz & 14.3 m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_jumpkids)); m_screen->set_palette(m_palette); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); @@ -2274,7 +2274,7 @@ void tumbleb_state::fncywld(machine_config &config) // OSCs: 12MHz, 4MHz & 28.63 m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_fncywld)); m_screen->set_palette(m_palette); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_transpen(15); @@ -2312,7 +2312,7 @@ void tumbleb_state::magipur(machine_config &config) // OSCs: 12MHz, 4MHz, 28.636 m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_fncywld)); m_screen->set_palette(m_palette); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_transpen(15); @@ -2369,7 +2369,7 @@ void tumbleb_state::htchctch(machine_config &config) // OSCs: 15MHz, 4.096MHz m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_semicom)); m_screen->set_palette(m_palette); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); @@ -2482,7 +2482,7 @@ void tumbleb_state::suprtrio(machine_config &config) // OSCs: 14MHz, 12MHz & 8MH m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_suprtrio)); m_screen->set_palette("palette"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); @@ -2520,7 +2520,7 @@ void tumbleb_state::pangpang(machine_config &config) // OSCs: 14MHz, 12MHz & 8MH m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_pangpang)); m_screen->set_palette(m_palette); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(3); m_sprgen->set_is_bootleg(true); m_sprgen->set_gfxdecode_tag(m_gfxdecode); diff --git a/src/mame/dataeast/vaportra.cpp b/src/mame/dataeast/vaportra.cpp index a531204898b..494b3fc0ec9 100644 --- a/src/mame/dataeast/vaportra.cpp +++ b/src/mame/dataeast/vaportra.cpp @@ -399,7 +399,7 @@ void vaportra_state::vaportra(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_vaportra); PALETTE(config, m_palette).set_entries(1280); - DECO16IC(config, m_deco_tilegen[0], 0); + DECO16IC(config, m_deco_tilegen[0]); m_deco_tilegen[0]->set_pf1_size(DECO_64x32); m_deco_tilegen[0]->set_pf2_size(DECO_64x32); m_deco_tilegen[0]->set_pf1_col_bank(0x00); @@ -412,7 +412,7 @@ void vaportra_state::vaportra(machine_config &config) m_deco_tilegen[0]->set_pf12_16x16_bank(1); m_deco_tilegen[0]->set_gfxdecode_tag(m_gfxdecode); - DECO16IC(config, m_deco_tilegen[1], 0); + DECO16IC(config, m_deco_tilegen[1]); m_deco_tilegen[1]->set_pf1_size(DECO_64x32); m_deco_tilegen[1]->set_pf2_size(DECO_64x32); m_deco_tilegen[1]->set_pf1_col_bank(0x30); @@ -425,7 +425,7 @@ void vaportra_state::vaportra(machine_config &config) m_deco_tilegen[1]->set_pf12_16x16_bank(3); m_deco_tilegen[1]->set_gfxdecode_tag(m_gfxdecode); - DECO_MXC06(config, m_spritegen, 0); + DECO_MXC06(config, m_spritegen); m_spritegen->set_colpri_callback(FUNC(vaportra_state::colpri_cb)); // sound hardware diff --git a/src/mame/ddr/ac1.cpp b/src/mame/ddr/ac1.cpp index 3caf06bb921..c7ac1945ee2 100644 --- a/src/mame/ddr/ac1.cpp +++ b/src/mame/ddr/ac1.cpp @@ -331,7 +331,7 @@ void ac1_state::ac1(machine_config &config) pio.in_pb_callback().set(FUNC(ac1_state::ac1_port_b_r)); pio.out_pb_callback().set(FUNC(ac1_state::ac1_port_b_w)); - Z80CTC(config, "ctc", 8'000'000 / 4); // all connections go external + Z80CTC(config, "ctc", XTAL::u(8'000'000) / 4); // all connections go external // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/ddr/c80.cpp b/src/mame/ddr/c80.cpp index d6105f039c1..638f4fd8fdc 100644 --- a/src/mame/ddr/c80.cpp +++ b/src/mame/ddr/c80.cpp @@ -71,7 +71,7 @@ namespace { #define Z80PIO2_TAG "d12" // You could use a piezo at 455 kHz, or a crystal 500 to 2500 kHz. // Cassette successfully tested at 455 kHz -#define MASTER_CLOCK 455000 +#define MASTER_CLOCK XTAL(455000) class c80_state : public driver_device { diff --git a/src/mame/ddr/chessmstdm.cpp b/src/mame/ddr/chessmstdm.cpp index fe60781591d..1fe7918bf93 100644 --- a/src/mame/ddr/chessmstdm.cpp +++ b/src/mame/ddr/chessmstdm.cpp @@ -297,7 +297,7 @@ void chessmstdm_state::chessmstdm(machine_config &config) m_maincpu->set_addrmap(AS_IO, &chessmstdm_state::chessmstdm_io); m_maincpu->set_daisy_config(chessmstdm_daisy_chain); - auto &strobe(CLOCK(config, "strobe", 500)); // from 555 timer, 50% duty + auto &strobe(CLOCK(config, "strobe", XTAL::u(500))); // from 555 timer, 50% duty strobe.signal_handler().set(m_pio[1], FUNC(z80pio_device::strobe_b)); strobe.signal_handler().append([this](int) { m_pio[1]->data_b_write(m_matrix); }); @@ -326,7 +326,7 @@ void chessmstdm_state::chessmstdm(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - BEEP(config, m_beeper, 1000).add_route(ALL_OUTPUTS, "speaker", 0.25); + BEEP(config, m_beeper, XTAL::u(1000)).add_route(ALL_OUTPUTS, "speaker", 0.25); // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "chessmstdm_cart"); diff --git a/src/mame/ddr/huebler.cpp b/src/mame/ddr/huebler.cpp index a6984ac46fc..97ab136788b 100644 --- a/src/mame/ddr/huebler.cpp +++ b/src/mame/ddr/huebler.cpp @@ -358,7 +358,7 @@ void amu880_state::amu880(machine_config &config) /* video hardware */ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER)); screen.set_screen_update(FUNC(amu880_state::screen_update)); - screen.set_raw(9000000, 576, 0*6, 64*6, 320, 0*10, 24*10); + screen.set_raw(XTAL::u(9000000), 576, 0*6, 64*6, 320, 0*10, 24*10); GFXDECODE(config, "gfxdecode", m_palette, gfx_amu880); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/ddr/k7659kb.cpp b/src/mame/ddr/k7659kb.cpp index 9ff45834d8b..0bcb7b0560c 100644 --- a/src/mame/ddr/k7659kb.cpp +++ b/src/mame/ddr/k7659kb.cpp @@ -195,7 +195,7 @@ ioport_constructor k7659_keyboard_device::device_input_ports() const // k7659_keyboard_device - constructor //------------------------------------------------- -k7659_keyboard_device::k7659_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k7659_keyboard_device::k7659_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K7659_KEYBOARD, tag, owner, clock) , m_keys(*this, "A%u", 1U) {} diff --git a/src/mame/ddr/k7659kb.h b/src/mame/ddr/k7659kb.h index e01ba695418..9b93055a17d 100644 --- a/src/mame/ddr/k7659kb.h +++ b/src/mame/ddr/k7659kb.h @@ -31,7 +31,7 @@ class k7659_keyboard_device : public device_t { public: // construction/destruction - k7659_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k7659_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(); diff --git a/src/mame/ddr/kc.cpp b/src/mame/ddr/kc.cpp index 9a7ea78325b..547a64fa4a9 100644 --- a/src/mame/ddr/kc.cpp +++ b/src/mame/ddr/kc.cpp @@ -203,7 +203,7 @@ void kc85_4_state::kc85_4(machine_config &config) m_z80pio->out_pb_callback().set(FUNC(kc_state::pio_portb_w)); m_z80pio->out_brdy_callback().set(FUNC(kc_state::pio_brdy_cb)); - Z80CTC(config, m_z80ctc, 0); + Z80CTC(config, m_z80ctc); m_z80ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_z80ctc->zc_callback<0>().set(FUNC(kc_state::ctc_zc0_callback)); m_z80ctc->zc_callback<1>().set(FUNC(kc_state::ctc_zc1_callback)); diff --git a/src/mame/ddr/kc.h b/src/mame/ddr/kc.h index 272c235e190..817d195b18c 100644 --- a/src/mame/ddr/kc.h +++ b/src/mame/ddr/kc.h @@ -42,8 +42,8 @@ #include "formats/kc_cas.h" // from service manual -#define KC85_3_CLOCK 1751938 -#define KC85_4_CLOCK 1773447 +#define KC85_3_CLOCK XTAL::u(1751938) +#define KC85_4_CLOCK XTAL::u(1773447) #define KC85_4_SCREEN_PIXEL_RAM_SIZE 0x04000 #define KC85_4_SCREEN_COLOUR_RAM_SIZE 0x04000 diff --git a/src/mame/ddr/kc_keyb.cpp b/src/mame/ddr/kc_keyb.cpp index 2c8190e7d4e..34cb6abad78 100644 --- a/src/mame/ddr/kc_keyb.cpp +++ b/src/mame/ddr/kc_keyb.cpp @@ -435,7 +435,7 @@ INPUT_PORTS_END //------------------------------------------------- // kc_keyboard_device - constructor //------------------------------------------------- -kc_keyboard_device::kc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +kc_keyboard_device::kc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KC_KEYBOARD, tag, owner, clock), m_write_out(*this) { diff --git a/src/mame/ddr/kc_keyb.h b/src/mame/ddr/kc_keyb.h index c05cb8c1e5e..64cc4d78768 100644 --- a/src/mame/ddr/kc_keyb.h +++ b/src/mame/ddr/kc_keyb.h @@ -22,7 +22,7 @@ class kc_keyboard_device : public device_t { public: // construction/destruction - kc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~kc_keyboard_device(); auto out_wr_callback() { return m_write_out.bind(); } diff --git a/src/mame/ddr/kramermc.cpp b/src/mame/ddr/kramermc.cpp index 13ef6bb5b2e..f42d725ae2c 100644 --- a/src/mame/ddr/kramermc.cpp +++ b/src/mame/ddr/kramermc.cpp @@ -242,11 +242,11 @@ uint32_t kramermc_state::screen_update_kramermc(screen_device &screen, bitmap_in void kramermc_state::kramermc(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 1500000); + Z80(config, m_maincpu, XTAL::u(1500000)); m_maincpu->set_addrmap(AS_PROGRAM, &kramermc_state::kramermc_mem); m_maincpu->set_addrmap(AS_IO, &kramermc_state::kramermc_io); - z80pio_device& pio(Z80PIO(config, "pio", 1500000)); + z80pio_device& pio(Z80PIO(config, "pio", XTAL::u(1500000))); pio.in_pa_callback().set(FUNC(kramermc_state::port_a_r)); pio.out_pa_callback().set(FUNC(kramermc_state::port_a_w)); pio.in_pb_callback().set(FUNC(kramermc_state::port_b_r)); diff --git a/src/mame/ddr/lc80.cpp b/src/mame/ddr/lc80.cpp index 09329bf7d02..22805d777d9 100644 --- a/src/mame/ddr/lc80.cpp +++ b/src/mame/ddr/lc80.cpp @@ -347,7 +347,7 @@ void lc80_state::machine_start() void lc80_state::lc80(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 900000); // UD880D + Z80(config, m_maincpu, XTAL::u(900000)); // UD880D m_maincpu->set_addrmap(AS_PROGRAM, &lc80_state::lc80_mem); m_maincpu->set_addrmap(AS_IO, &lc80_state::lc80_io); m_maincpu->halt_cb().set(FUNC(lc80_state::halt_w)); @@ -363,19 +363,19 @@ void lc80_state::lc80(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); // devices - Z80CTC(config, m_ctc, 900000); + Z80CTC(config, m_ctc, XTAL::u(900000)); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_ctc->zc_callback<0>().set(FUNC(lc80_state::ctc_z0_w)); m_ctc->zc_callback<1>().set(FUNC(lc80_state::ctc_z1_w)); m_ctc->zc_callback<2>().set(FUNC(lc80_state::ctc_z2_w)); - Z80PIO(config, m_pio[0], 900000); + Z80PIO(config, m_pio[0], XTAL::u(900000)); m_pio[0]->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_pio[0]->out_pa_callback().set(FUNC(lc80_state::pio1_pa_w)); m_pio[0]->in_pb_callback().set(FUNC(lc80_state::pio1_pb_r)); m_pio[0]->out_pb_callback().set(FUNC(lc80_state::pio1_pb_w)); - Z80PIO(config, m_pio[1], 900000); + Z80PIO(config, m_pio[1], XTAL::u(900000)); m_pio[1]->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_pio[1]->in_pb_callback().set(FUNC(lc80_state::pio2_pb_r)); diff --git a/src/mame/ddr/llc1.cpp b/src/mame/ddr/llc1.cpp index 88327b94f3f..e47a8d30113 100644 --- a/src/mame/ddr/llc1.cpp +++ b/src/mame/ddr/llc1.cpp @@ -341,7 +341,7 @@ void llc1_state::llc1(machine_config &config) m_ctc->zc_callback<0>().set(m_ctc, FUNC(z80ctc_device::trg1)); m_ctc->zc_callback<1>().set(m_ctc, FUNC(z80ctc_device::trg2)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(llc1_state::kbd_put)); } diff --git a/src/mame/ddr/llc2.cpp b/src/mame/ddr/llc2.cpp index 0aa4a5406a4..d76e129d615 100644 --- a/src/mame/ddr/llc2.cpp +++ b/src/mame/ddr/llc2.cpp @@ -277,14 +277,14 @@ void llc2_state::llc2(machine_config &config) m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_ctc->set_clk<0>(12_MHz_XTAL / 8); m_ctc->set_clk<1>(12_MHz_XTAL / 8); - m_ctc->set_clk<2>(50); // comes from deep in the video section, assumed to be 50Hz + m_ctc->set_clk<2>(XTAL::u(50)); // comes from deep in the video section, assumed to be 50Hz m_ctc->zc_callback<2>().set(m_ctc, FUNC(z80ctc_device::trg3)); CASSETTE(config, m_cass); m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); - K7659_KEYBOARD(config, K7659_KEYBOARD_TAG, 0); + K7659_KEYBOARD(config, K7659_KEYBOARD_TAG); /* internal ram */ RAM(config, RAM_TAG).set_default_size("64K"); diff --git a/src/mame/ddr/mc8030.cpp b/src/mame/ddr/mc8030.cpp index e8f0abcdfe1..9b08227846a 100644 --- a/src/mame/ddr/mc8030.cpp +++ b/src/mame/ddr/mc8030.cpp @@ -230,11 +230,11 @@ void mc8030_state::mc8030(machine_config &config) // ZC1: to SIO CLK CH B // ZC2: KMBG (??) - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set("asp_sio", FUNC(z80sio_device::txca_w)); uart_clock.signal_handler().append("asp_sio", FUNC(z80sio_device::rxca_w)); - z80sio_device& sio(Z80SIO(config, "asp_sio", 4800)); + z80sio_device& sio(Z80SIO(config, "asp_sio", XTAL::u(4800))); // SIO CH A in = keyboard; out = beeper; CH B = IFSS (??) sio.out_txda_callback().set("rs232", FUNC(rs232_port_device::write_txd)); sio.out_dtra_callback().set("rs232", FUNC(rs232_port_device::write_dtr)); diff --git a/src/mame/ddr/nanos.cpp b/src/mame/ddr/nanos.cpp index 51049295a5c..204af275004 100644 --- a/src/mame/ddr/nanos.cpp +++ b/src/mame/ddr/nanos.cpp @@ -522,7 +522,7 @@ void nanos_state::nanos(machine_config &config) m_pio->out_pb_callback().set(FUNC(nanos_state::port_b_w)); /* UPD765 */ - UPD765A(config, m_fdc, 8'000'000, false, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, true); FLOPPY_CONNECTOR(config, m_floppy, nanos_floppies, "525hd", nanos_state::floppy_formats); TIMER(config, "keyboard_timer").configure_periodic(FUNC(nanos_state::keyboard_callback), attotime::from_hz(240)); diff --git a/src/mame/ddr/pcm.cpp b/src/mame/ddr/pcm.cpp index 03b3a0d6586..0a9e73be334 100644 --- a/src/mame/ddr/pcm.cpp +++ b/src/mame/ddr/pcm.cpp @@ -321,7 +321,7 @@ void pcm_state::pcm(machine_config &config) SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - K7659_KEYBOARD(config, K7659_KEYBOARD_TAG, 0); + K7659_KEYBOARD(config, K7659_KEYBOARD_TAG); CASSETTE(config, m_cass); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); diff --git a/src/mame/ddr/slc1.cpp b/src/mame/ddr/slc1.cpp index 3e88bab193e..ef4950b5c45 100644 --- a/src/mame/ddr/slc1.cpp +++ b/src/mame/ddr/slc1.cpp @@ -212,7 +212,7 @@ INPUT_PORTS_END void slc1_state::slc1(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); + Z80(config, m_maincpu, XTAL::u(2500000)); m_maincpu->set_addrmap(AS_PROGRAM, &slc1_state::mem_map); m_maincpu->set_addrmap(AS_IO, &slc1_state::io_map); diff --git a/src/mame/ddr/vcs80.cpp b/src/mame/ddr/vcs80.cpp index ce6d6e0ba6e..c717e6ab730 100644 --- a/src/mame/ddr/vcs80.cpp +++ b/src/mame/ddr/vcs80.cpp @@ -261,7 +261,7 @@ void vcs80_state::machine_start() void vcs80_state::vcs80(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5'000'000 /2); // U880D - Uses a LC oscillator rather than a crystal + Z80(config, m_maincpu, XTAL::u(5'000'000) /2); // U880D - Uses a LC oscillator rather than a crystal m_maincpu->set_addrmap(AS_PROGRAM, &vcs80_state::mem_map); m_maincpu->set_addrmap(AS_IO, &vcs80_state::io_map); m_maincpu->set_daisy_config(daisy_chain); @@ -275,7 +275,7 @@ void vcs80_state::vcs80(machine_config &config) m_display->set_segmask(0xff, 0xff); /* devices */ - Z80PIO(config, m_pio, 5'000'000 /2); + Z80PIO(config, m_pio, XTAL::u(5'000'000) /2); m_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_pio->in_pa_callback().set(FUNC(vcs80_state::pio_pa_r)); m_pio->out_pb_callback().set(FUNC(vcs80_state::pio_pb_w)); diff --git a/src/mame/dec/dc305.cpp b/src/mame/dec/dc305.cpp index d98480fb7ea..6f1c20ac985 100644 --- a/src/mame/dec/dc305.cpp +++ b/src/mame/dec/dc305.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(DC305, dc305_device, "dc305", "DC305 Printer Controller") // dc305_device - constructor //------------------------------------------------- -dc305_device::dc305_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dc305_device::dc305_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DC305, tag, owner, clock) , m_int_callback(*this) , m_rxc_callback(*this) diff --git a/src/mame/dec/dc305.h b/src/mame/dec/dc305.h index c2dbd0672d8..d08e8ecba90 100644 --- a/src/mame/dec/dc305.h +++ b/src/mame/dec/dc305.h @@ -44,7 +44,7 @@ class dc305_device : public device_t { public: // construction/destruction - dc305_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dc305_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto int_callback() { return m_int_callback.bind(); } diff --git a/src/mame/dec/dct11em.cpp b/src/mame/dec/dct11em.cpp index 5fc66f2c4ab..f29ca5e06f3 100644 --- a/src/mame/dec/dct11em.cpp +++ b/src/mame/dec/dct11em.cpp @@ -265,7 +265,7 @@ void dct11em_state::kbd_put(u8 data) void dct11em_state::dct11em(machine_config &config) { /* basic machine hardware */ - T11(config, m_maincpu, 7'500'000); // 7.5MHz XTAL + T11(config, m_maincpu, XTAL::u(7'500'000)); // 7.5MHz XTAL m_maincpu->set_initial_mode(0x1403); /* according to specs */ m_maincpu->set_addrmap(AS_PROGRAM, &dct11em_state::mem_map); @@ -277,19 +277,19 @@ void dct11em_state::dct11em(machine_config &config) m_ppi->in_pc_callback().set(FUNC(dct11em_state::portc_r)); // keyboard m_ppi->out_pc_callback().set(FUNC(dct11em_state::portc_w)); // digits - I8251(config, m_uart, 2'457'600 / 8); + I8251(config, m_uart, XTAL::u(2'457'600) / 8); m_uart->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_uart->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_uart->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); m_uart->rxrdy_handler().set([this] (bool state) { irq_encoder(7, state); }); m_uart->txrdy_handler().set([this] (bool state) { irq_encoder(6, state); }); - clock_device &inta_clock(CLOCK(config, "inta_clock", 614'400 / 768)); // 800Hz, from DLART pin 25 + clock_device &inta_clock(CLOCK(config, "inta_clock", XTAL::u(614'400) / 768)); // 800Hz, from DLART pin 25 inta_clock.signal_handler().set([this] (bool state) { if (state) irq_encoder(10, 1); }); // Assert IRQ10 - //clock_device &dlart_clock(CLOCK(config, "dlart_clock", 2'457'600 / 4)); --> to DLART CLK pin 32 + //clock_device &dlart_clock(CLOCK(config, "dlart_clock", XTAL::u(2'457'600) / 4)); --> to DLART CLK pin 32 - clock_device &uart_clock(CLOCK(config, "uart_clock", 2'457'600 / 32)); // from DLART pin 34 + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(2'457'600) / 32)); // from DLART pin 34 uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); @@ -298,7 +298,7 @@ void dct11em_state::dct11em(machine_config &config) rs232.dsr_handler().set(m_uart, FUNC(i8251_device::write_dsr)); rs232.cts_handler().set(m_uart, FUNC(i8251_device::write_cts)); - GENERIC_TERMINAL(config, m_terminal, 0); // Main terminal for now + GENERIC_TERMINAL(config, m_terminal); // Main terminal for now m_terminal->set_keyboard_callback(FUNC(dct11em_state::kbd_put)); } diff --git a/src/mame/dec/dec_lk201.cpp b/src/mame/dec/dec_lk201.cpp index 1e1a87a3011..01962232168 100644 --- a/src/mame/dec/dec_lk201.cpp +++ b/src/mame/dec/dec_lk201.cpp @@ -217,7 +217,7 @@ void lk201_device::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &lk201_device::lk201_map); SPEAKER(config, "mono").front_center(); - BEEP(config, m_speaker, 2000); // clocked by a 555 timer at E8, the volume of the beep is controllable by: (8051 model) P2.0 thru P2.3, or (6805 model) the upper 4 bits of the LED data latch + BEEP(config, m_speaker, XTAL::u(2000)); // clocked by a 555 timer at E8, the volume of the beep is controllable by: (8051 model) P2.0 thru P2.3, or (6805 model) the upper 4 bits of the LED data latch m_speaker->add_route(ALL_OUTPUTS, "mono", 0.50); } @@ -503,7 +503,7 @@ ioport_constructor lk201_device::device_input_ports() const // lk201_device - constructor //------------------------------------------------- -lk201_device::lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lk201_device::lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LK201, tag, owner, clock), device_serial_interface(mconfig, *this), m_maincpu(*this, LK201_CPU_TAG), @@ -550,7 +550,7 @@ void lk201_device::device_reset() ports[0] = ports[1] = ports[2] = 0; set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rate(4800); + set_rate(XTAL::u(4800)); m_count->adjust(attotime::from_hz(1200), 0, attotime::from_hz(1200)); memset(m_timer.regs, 0, sizeof(m_timer.regs)); diff --git a/src/mame/dec/dec_lk201.h b/src/mame/dec/dec_lk201.h index 9ed6d7c5368..860aefabcec 100644 --- a/src/mame/dec/dec_lk201.h +++ b/src/mame/dec/dec_lk201.h @@ -44,7 +44,7 @@ class lk201_device : public device_t, public device_serial_interface { public: // construction/destruction - lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lk201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t ddr_r(offs_t offset); void ddr_w(offs_t offset, uint8_t data); diff --git a/src/mame/dec/decioga.cpp b/src/mame/dec/decioga.cpp index e8e60182696..c16b7e9c3f0 100644 --- a/src/mame/dec/decioga.cpp +++ b/src/mame/dec/decioga.cpp @@ -27,7 +27,7 @@ void dec_ioga_device::map(address_map &map) map(0x040120, 0x040123).rw(FUNC(dec_ioga_device::imsk_r), FUNC(dec_ioga_device::imsk_w)); } -dec_ioga_device::dec_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dec_ioga_device::dec_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECSTATION_IOGA, tag, owner, clock), m_irq_out_cb(*this) { diff --git a/src/mame/dec/decioga.h b/src/mame/dec/decioga.h index 88c70556dfb..4e1ab6bedc0 100644 --- a/src/mame/dec/decioga.h +++ b/src/mame/dec/decioga.h @@ -15,7 +15,7 @@ class dec_ioga_device : public device_t { public: - dec_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + dec_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); diff --git a/src/mame/dec/decstation.cpp b/src/mame/dec/decstation.cpp index 5a3920c231a..b95bcf4dcdc 100644 --- a/src/mame/dec/decstation.cpp +++ b/src/mame/dec/decstation.cpp @@ -104,9 +104,9 @@ public: { } - void kn01(machine_config &config, u32 clock); - void pmax(machine_config &config) { kn01(config, (33.3_MHz_XTAL / 2).value()); } - void pmin(machine_config &config) { kn01(config, 12'000'000); } + void kn01(machine_config &config, const XTAL &clock); + void pmax(machine_config &config) { kn01(config, 33.3_MHz_XTAL / 2); } + void pmin(machine_config &config) { kn01(config, XTAL::u(12'000'000)); } void init(); @@ -216,10 +216,10 @@ public: { } - void kn02ba(machine_config &config, u32 clock); - void m120(machine_config &config) { kn02ba(config, 20'000'000); } - void m125(machine_config &config) { kn02ba(config, 25'000'000); } - void m133(machine_config &config) { kn02ba(config, 33'300'000); } + void kn02ba(machine_config &config, const XTAL & clock); + void m120(machine_config &config) { kn02ba(config, XTAL::u(20'000'000)); } + void m125(machine_config &config) { kn02ba(config, XTAL::u(25'000'000)); } + void m133(machine_config &config) { kn02ba(config, XTAL::u(33'300'000)); } void init() {} @@ -545,7 +545,7 @@ static void dec_scsi_devices(device_slot_interface &device) device.option_add("harddisk", NSCSI_HARDDISK); } -void kn01_state::kn01(machine_config &config, u32 clock) +void kn01_state::kn01(machine_config &config, const XTAL &clock) { R2000(config, m_cpu, clock, 65536, 131072); m_cpu->set_endianness(ENDIANNESS_LITTLE); @@ -558,13 +558,13 @@ void kn01_state::kn01(machine_config &config, u32 clock) m_mram->set_extra_options("4MiB,8MiB,12MiB,16MiB,20MiB"); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(69169800, 1280, 212, 1024+212, 901, 34, 864+34); + m_screen->set_raw(XTAL::u(69169800), 1280, 212, 1024+212, 901, 34, 864+34); m_screen->set_screen_update(FUNC(kn01_state::screen_update)); - TIMER(config, m_scantimer, 0); + TIMER(config, m_scantimer); m_scantimer->configure_scanline(FUNC(kn01_state::scanline_timer), "screen", 0, 1); - BT478(config, m_vdac, 69169800); + BT478(config, m_vdac, XTAL::u(69169800)); AM79C90(config, m_lance, XTAL(12'500'000)); m_lance->intr_out().set_inputline(m_cpu, INPUT_LINE_IRQ1).invert(); @@ -584,7 +584,7 @@ void kn01_state::kn01(machine_config &config, u32 clock) DC7085(config, m_dz, 15.2064_MHz_XTAL); m_dz->int_cb().set_inputline(m_cpu, INPUT_LINE_IRQ2); - LK201(config, m_lk201, 0); + LK201(config, m_lk201); m_dz->tx_cb<0>().set([this](int state) { if (!(m_status & TXDIS)) m_lk201->rx_w(state); }); m_lk201->tx_handler().set(m_dz, FUNC(dc7085_device::rx_w<0>)); @@ -638,7 +638,7 @@ void kn01_state::kn01(machine_config &config, u32 clock) config.set_default_layout(layout_kn01); } -void kn02ba_state::kn02ba(machine_config &config, u32 clock) +void kn02ba_state::kn02ba(machine_config &config, const XTAL &clock) { R3000A(config, m_cpu, clock, 65536, 131072); m_cpu->set_endianness(ENDIANNESS_LITTLE); @@ -647,13 +647,13 @@ void kn02ba_state::kn02ba(machine_config &config, u32 clock) m_cpu->set_addrmap(AS_PROGRAM, &kn02ba_state::map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(130000000, 1704, 32, (1280+32), 1064, 3, (1024+3)); + m_screen->set_raw(XTAL::u(130000000), 1704, 32, (1280+32), 1064, 3, (1024+3)); m_screen->set_screen_update(FUNC(kn02ba_state::screen_update)); - DECSFB(config, m_sfb, 25'000'000); // clock based on white paper which quotes "40ns" gate array cycle times + DECSFB(config, m_sfb, XTAL::u(25'000'000)); // clock based on white paper which quotes "40ns" gate array cycle times // m_sfb->int_cb().set(FUNC(dec_ioga_device::slot0_irq_w)); - BT459(config, m_bt459, 83'020'800); + BT459(config, m_bt459, XTAL::u(83'020'800)); AM79C90(config, m_lance, XTAL(12'500'000)); m_lance->intr_out().set("ioga", FUNC(dec_ioga_device::lance_irq_w)); @@ -676,7 +676,7 @@ void kn02ba_state::kn02ba(machine_config &config, u32 clock) m_scc[1]->out_int_callback().set("ioga", FUNC(dec_ioga_device::scc1_irq_w)); m_scc[1]->out_txdb_callback().set(m_lk201, FUNC(lk201_device::rx_w)); - LK201(config, m_lk201, 0); + LK201(config, m_lk201); m_lk201->tx_handler().set(m_scc[1], FUNC(z80scc_device::rxb_w)); rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, nullptr)); diff --git a/src/mame/dec/dectalk.cpp b/src/mame/dec/dectalk.cpp index 37f4144f5c5..c34544451e2 100644 --- a/src/mame/dec/dectalk.cpp +++ b/src/mame/dec/dectalk.cpp @@ -879,7 +879,7 @@ void dectalk_state::dectalk(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - AD7541(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.9); // ad7541.e107 (E88 10KHz OSC, handled by timer) + AD7541(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.9); // ad7541.e107 (E88 10KHz OSC, handled by timer) /* Y2 is a 3.579545 MHz xtal for the dtmf decoder chip */ diff --git a/src/mame/dec/decwritr.cpp b/src/mame/dec/decwritr.cpp index e5ada3255d7..80b26937e2a 100644 --- a/src/mame/dec/decwritr.cpp +++ b/src/mame/dec/decwritr.cpp @@ -458,7 +458,7 @@ void decwriter_state::la120(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_speaker, 786).add_route(ALL_OUTPUTS, "mono", 0.50); // TODO: LA120 speaker is controlled by asic; VT100 has: 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz + BEEP(config, m_speaker, XTAL::u(786)).add_route(ALL_OUTPUTS, "mono", 0.50); // TODO: LA120 speaker is controlled by asic; VT100 has: 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz /* i8251 */ i8251_device &usart(I8251(config, "usart", XTAL(18'000'000) / 9)); diff --git a/src/mame/dec/jensen.cpp b/src/mame/dec/jensen.cpp index 890705c03d2..b7278c6724d 100644 --- a/src/mame/dec/jensen.cpp +++ b/src/mame/dec/jensen.cpp @@ -161,7 +161,7 @@ void jensen_state::eisa_io(address_map &map) void jensen_state::jensen(machine_config &config) { - DEC_21064(config, m_cpu, 300'000'000).set_clock_scale(0.5); + DEC_21064(config, m_cpu, XTAL::u(300'000'000)).set_clock_scale(0.5); m_cpu->set_dasm_type(alpha_disassembler::dasm_type::TYPE_NT); m_cpu->set_addrmap(0, &jensen_state::local_memory); m_cpu->set_addrmap(2, &jensen_state::local_io); @@ -213,7 +213,7 @@ void jensen_state::jensen(machine_config &config) serial1.ri_handler().set(m_ace[1], FUNC(ns16550_device::ri_w)); serial1.rxd_handler().set(m_ace[1], FUNC(ns16550_device::rx_w)); - PC_LPT(config, m_lpt, 0); + PC_LPT(config, m_lpt); m_lpt->irq_handler().set(m_mct_adr, FUNC(jazz_mct_adr_device::irq<0>)); #endif diff --git a/src/mame/dec/pdp1.cpp b/src/mame/dec/pdp1.cpp index fd719ce63b0..a113ee660b5 100644 --- a/src/mame/dec/pdp1.cpp +++ b/src/mame/dec/pdp1.cpp @@ -610,7 +610,7 @@ void pdp1_state::machine_start() DEFINE_DEVICE_TYPE(PDP1_READTAPE, pdp1_readtape_image_device, "pdp1_readtape_image", "PDP-1 Tape Reader") -pdp1_readtape_image_device::pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pdp1_readtape_image_device::pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_reader_device(mconfig, PDP1_READTAPE, tag, owner, clock) , m_maincpu(*this, "^maincpu") , m_st_ptr(*this) @@ -633,7 +633,7 @@ void pdp1_readtape_image_device::device_start() DEFINE_DEVICE_TYPE(PDP1_PUNCHTAPE, pdp1_punchtape_image_device, "pdp1_punchtape_image_device", "PDP-1 Tape Puncher") -pdp1_punchtape_image_device::pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pdp1_punchtape_image_device::pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_punch_device(mconfig, PDP1_PUNCHTAPE, tag, owner, clock) , m_maincpu(*this, "^maincpu") , m_st_ptp(*this) @@ -654,7 +654,7 @@ void pdp1_punchtape_image_device::device_start() DEFINE_DEVICE_TYPE(PDP1_TYPEWRITER, pdp1_typewriter_device, "pdp1_typewriter_image", "PDP-1 Typewriter") -pdp1_typewriter_device::pdp1_typewriter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pdp1_typewriter_device::pdp1_typewriter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PDP1_TYPEWRITER, tag, owner, clock) , device_image_interface(mconfig, *this) , m_maincpu(*this, "^maincpu") @@ -682,7 +682,7 @@ void pdp1_typewriter_device::device_start() DEFINE_DEVICE_TYPE(PDP1_CYLINDER, pdp1_cylinder_image_device, "pdp1_cylinder_image", "PDP-1 Cylinder") -pdp1_cylinder_image_device::pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pdp1_cylinder_image_device::pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PDP1_CYLINDER, tag, owner, clock) , device_image_interface(mconfig, *this) , m_maincpu(*this, "^maincpu") @@ -1763,7 +1763,7 @@ void pdp1_state::pdp1(machine_config &config) { /* basic machine hardware */ /* PDP1 CPU @ 200 kHz (no master clock, but the instruction and memory rate is 200 kHz) */ - PDP1(config, m_maincpu, 1000000); /* the CPU core uses microsecond counts */ + PDP1(config, m_maincpu, XTAL::u(1000000)); /* the CPU core uses microsecond counts */ m_maincpu->set_reset_param(&pdp1_reset_param); m_maincpu->set_addrmap(AS_PROGRAM, &pdp1_state::pdp1_map); m_maincpu->set_vblank_int("screen", FUNC(pdp1_state::pdp1_interrupt)); /* dummy interrupt: handles input */ @@ -1808,7 +1808,7 @@ void pdp1_state::pdp1(machine_config &config) screen.screen_vblank().set(FUNC(pdp1_state::screen_vblank_pdp1)); screen.set_palette(m_palette); - CRT(config, m_crt, 0); + CRT(config, m_crt); m_crt->set_num_levels(pen_crt_num_levels); m_crt->set_offsets(crt_window_offset_x, crt_window_offset_y); m_crt->set_size(crt_window_width, crt_window_height); diff --git a/src/mame/dec/pdp1.h b/src/mame/dec/pdp1.h index 203bee6e168..91ccbf0a2b0 100644 --- a/src/mame/dec/pdp1.h +++ b/src/mame/dec/pdp1.h @@ -178,7 +178,7 @@ class pdp1_readtape_image_device : public paper_tape_reader_device { public: // construction/destruction - pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + pdp1_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual const char *image_interface() const noexcept override { return "pdp1_ptp"; } auto st_ptr() { return m_st_ptr.bind(); } @@ -226,7 +226,7 @@ class pdp1_punchtape_image_device : public paper_tape_punch_device { public: // construction/destruction - pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + pdp1_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto st_ptp() { return m_st_ptp.bind(); } @@ -268,7 +268,7 @@ class pdp1_typewriter_device : public device_t, { public: // construction/destruction - pdp1_typewriter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + pdp1_typewriter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto st_tyo() { return m_st_tyo.bind(); } auto st_tyi() { return m_st_tyi.bind(); } @@ -327,7 +327,7 @@ class pdp1_cylinder_image_device : public device_t, { public: // construction/destruction - pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + pdp1_cylinder_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void iot_dia(int op2, int nac, int mb, int &io, int ac); void iot_dba(int op2, int nac, int mb, int &io, int ac); diff --git a/src/mame/dec/pdp11.cpp b/src/mame/dec/pdp11.cpp index 6d9292456de..88b672b2c41 100644 --- a/src/mame/dec/pdp11.cpp +++ b/src/mame/dec/pdp11.cpp @@ -334,7 +334,7 @@ MACHINE_RESET_MEMBER(pdp11_state,pdp11qb) void pdp11_state::pdp11(machine_config &config) { /* basic machine hardware */ - T11(config, m_maincpu, 4'000'000); // Need proper CPU here + T11(config, m_maincpu, XTAL::u(4'000'000)); // Need proper CPU here m_maincpu->set_initial_mode(6 << 13); m_maincpu->set_addrmap(AS_PROGRAM, &pdp11_state::pdp11_mem); @@ -351,8 +351,8 @@ void pdp11_state::pdp11(machine_config &config) RS232_PORT(config, m_rs232, default_rs232_devices, "terminal"); m_rs232->rxd_handler().set(m_dl11, FUNC(dl11_device::rx_w)); - RX01(config, "rx01", 0); - QBUS(config, m_qbus, 0); + RX01(config, "rx01"); + QBUS(config, m_qbus); m_qbus->set_space(m_maincpu, AS_PROGRAM); m_qbus->birq4().set_inputline(m_maincpu, T11_IRQ0); QBUS_SLOT(config, "qbus" ":1", qbus_cards, "pc11"); diff --git a/src/mame/dec/rainbow.cpp b/src/mame/dec/rainbow.cpp index 000821799a4..999ccb29a62 100644 --- a/src/mame/dec/rainbow.cpp +++ b/src/mame/dec/rainbow.cpp @@ -3217,7 +3217,7 @@ void rainbow_base_state::rainbow_base(machine_config &config) // *************************** COLOR GRAPHICS (OPTION) ************************************** // While the OSC frequency is confirmed, the divider is not (refresh rate is ~60 Hz with 32). - UPD7220(config, m_hgdc, 31188000 / 32); // Duell schematics shows a 31.188 Mhz oscillator (confirmed by RFKA). + UPD7220(config, m_hgdc, XTAL(31188000) / 32); // Duell schematics shows a 31.188 Mhz oscillator (confirmed by RFKA). m_hgdc->vsync_wr_callback().set(FUNC(rainbow_base_state::GDC_vblank_irq)); // "The vsync callback line needs to be below the 7220 DEVICE_ADD line." m_hgdc->set_addrmap(0, &rainbow_base_state::upd7220_map); @@ -3231,10 +3231,10 @@ void rainbow_base_state::rainbow_base(machine_config &config) // VR241 color monitor is specified for 20 MHz bandwidth ( 60 Hz / 15.72 kHz horizontal rate ) // - sufficient for 800 x 240 non-interlaced at 60 Hz (non interlaced). - //m_screen2->set_raw(31188000 / 2 , 992, 0, 800, 262, 0, 240); + //m_screen2->set_raw(XTAL(31188000) / 2 , 992, 0, 800, 262, 0, 240); // Alternate configuration: - m_screen2->set_raw(31188000 / 4 , 496, 0, 400, 262, 0, 240); + m_screen2->set_raw(XTAL(31188000) / 4 , 496, 0, 400, 262, 0, 240); m_screen2->set_screen_update("upd7220", FUNC(upd7220_device::screen_update)); @@ -3248,7 +3248,7 @@ void rainbow_base_state::rainbow_base(machine_config &config) SOFTWARE_LIST(config, "flop_list").set_original("rainbow"); /// ********************************* HARD DISK CONTROLLER ***************************************** - WD2010(config, m_hdc, 5000000); // 10 Mhz quartz on controller (divided by 2 for WCLK) + WD2010(config, m_hdc, XTAL(10000000)/2); // 10 Mhz quartz on controller (divided by 2 for WCLK) m_hdc->out_intrq_callback().set(FUNC(rainbow_base_state::bundle_irq)); // FIRST IRQ SOURCE (OR'ed with DRQ) m_hdc->out_bdrq_callback().set(FUNC(rainbow_base_state::hdc_bdrq)); // BUFFER DATA REQUEST @@ -3271,13 +3271,13 @@ void rainbow_base_state::rainbow_base(machine_config &config) HARDDISK(config, "decharddisk1"); /// ******************************** / HARD DISK CONTROLLER **************************************** - CORVUS_HDC(config, m_corvus_hdc, 0); + CORVUS_HDC(config, m_corvus_hdc); HARDDISK(config, "harddisk1", "corvus_hdd"); HARDDISK(config, "harddisk2", "corvus_hdd"); HARDDISK(config, "harddisk3", "corvus_hdd"); HARDDISK(config, "harddisk4", "corvus_hdd"); - DS1315(config, m_rtc, 0); // DS1315 (ClikClok for DEC-100 B) * OPTIONAL * + DS1315(config, m_rtc); // DS1315 (ClikClok for DEC-100 B) * OPTIONAL * COM8116_003(config, m_dbrg, 24.0734_MHz_XTAL / 4); // 6.01835 MHz (nominally 6 MHz) m_dbrg->fr_handler().set(FUNC(rainbow_base_state::dbrg_fr_w)); @@ -3310,7 +3310,7 @@ void rainbow_base_state::rainbow_base(machine_config &config) m_kbd8251->rxrdy_handler().set(FUNC(rainbow_base_state::kbd_rxready_w)); m_kbd8251->txrdy_handler().set(FUNC(rainbow_base_state::kbd_txready_w)); - LK201(config, m_lk201, 0); + LK201(config, m_lk201); m_lk201->tx_handler().set(m_kbd8251, FUNC(i8251_device::write_rxd)); ripple_counter_device &prtbrg(RIPPLE_COUNTER(config, "prtbrg", 24.0734_MHz_XTAL / 6 / 13)); // 74LS393 at E17 (both halves) diff --git a/src/mame/dec/rx01.cpp b/src/mame/dec/rx01.cpp index a8fca77df27..577623817c6 100644 --- a/src/mame/dec/rx01.cpp +++ b/src/mame/dec/rx01.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(RX01, rx01_device, "rx01", "RX01 Floppy Disk Controller") // rx01_device - constructor //------------------------------------------------- -rx01_device::rx01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rx01_device::rx01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RX01, tag, owner, clock) , m_image(*this, "floppy%u", 0U) { @@ -72,7 +72,7 @@ void rx01_device::device_add_mconfig(machine_config &config) cpu.set_addrmap(AS_DATA, &rx01_device::secbuf_map); for (auto &floppy : m_image) - LEGACY_FLOPPY(config, floppy, 0, &rx01_floppy_interface); + LEGACY_FLOPPY(config, floppy, &rx01_floppy_interface); } //------------------------------------------------- diff --git a/src/mame/dec/rx01.h b/src/mame/dec/rx01.h index a6c128f71e8..efca5ba19ec 100644 --- a/src/mame/dec/rx01.h +++ b/src/mame/dec/rx01.h @@ -24,7 +24,7 @@ class rx01_device : public device_t { public: // construction/destruction - rx01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rx01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data); diff --git a/src/mame/dec/vax11.cpp b/src/mame/dec/vax11.cpp index 34061d3061a..a684ab81507 100644 --- a/src/mame/dec/vax11.cpp +++ b/src/mame/dec/vax11.cpp @@ -148,10 +148,10 @@ void vax11_state::vax11(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &vax11_state::vax11_mem); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(vax11_state::kbd_put)); - RX01(config, "rx01", 0); + RX01(config, "rx01"); } ROM_START( vax785 ) diff --git a/src/mame/dec/vk100.cpp b/src/mame/dec/vk100.cpp index ce2535aac6e..19adc74fe07 100644 --- a/src/mame/dec/vk100.cpp +++ b/src/mame/dec/vk100.cpp @@ -1057,7 +1057,7 @@ void vk100_state::vk100(machine_config &config) m_crtc->out_vsync_callback().set(FUNC(vk100_state::crtc_vsync)); /* i8251 uart */ - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); m_uart->dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); m_uart->rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); @@ -1075,7 +1075,7 @@ void vk100_state::vk100(machine_config &config) config.set_default_layout(layout_vk100); SPEAKER(config, "mono").front_center(); - BEEP(config, m_speaker, 116).add_route(ALL_OUTPUTS, "mono", 0.25); // 116 hz (page 172 of TM), but duty cycle is wrong here! + BEEP(config, m_speaker, XTAL::u(116)).add_route(ALL_OUTPUTS, "mono", 0.25); // 116 hz (page 172 of TM), but duty cycle is wrong here! } /* ROM definition */ diff --git a/src/mame/dec/vt100.cpp b/src/mame/dec/vt100.cpp index 8c50cd35a23..823b917750c 100644 --- a/src/mame/dec/vt100.cpp +++ b/src/mame/dec/vt100.cpp @@ -355,13 +355,13 @@ void vt100_state::vt100(machine_config &config) ER1400(config, m_nvr); - VT100_KEYBOARD(config, m_keyboard, 0).signal_out_callback().set(m_kbduart, FUNC(ay31015_device::write_si)); + VT100_KEYBOARD(config, m_keyboard).signal_out_callback().set(m_kbduart, FUNC(ay31015_device::write_si)); - AY31015(config, m_kbduart, 0); + AY31015(config, m_kbduart); m_kbduart->write_dav_callback().set(m_rstbuf, FUNC(rst_pos_buffer_device::rst1_w)); m_kbduart->set_auto_rdav(true); - RST_POS_BUFFER(config, m_rstbuf, 0).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, m_rstbuf).int_callback().set_inputline(m_maincpu, 0); } void vt100_state::stp_mem(address_map &map) @@ -385,19 +385,19 @@ void vt100_state::vt100ac(machine_config &config) { vt100(config); - i8085a_cpu_device &stpcpu(I8085A(config, "stpcpu", 4915200)); + i8085a_cpu_device &stpcpu(I8085A(config, "stpcpu", XTAL::u(4915200))); stpcpu.set_addrmap(AS_PROGRAM, &vt100_state::stp_mem); stpcpu.set_addrmap(AS_IO, &vt100_state::stp_io); - i8251_device &stpusart0(I8251(config, "stpusart0", 2457600)); + i8251_device &stpusart0(I8251(config, "stpusart0", XTAL::u(2457600))); stpusart0.rxrdy_handler().set("stprxint", FUNC(input_merger_device::in_w<0>)); stpusart0.txrdy_handler().set("stptxint", FUNC(input_merger_device::in_w<0>)); - i8251_device &stpusart1(I8251(config, "stpusart1", 2457600)); + i8251_device &stpusart1(I8251(config, "stpusart1", XTAL::u(2457600))); stpusart1.rxrdy_handler().set("stprxint", FUNC(input_merger_device::in_w<1>)); stpusart1.txrdy_handler().set("stptxint", FUNC(input_merger_device::in_w<1>)); - i8251_device &stpusart2(I8251(config, "stpusart2", 2457600)); // for printer? + i8251_device &stpusart2(I8251(config, "stpusart2", XTAL::u(2457600))); // for printer? stpusart2.rxrdy_handler().set("stprxint", FUNC(input_merger_device::in_w<2>)); stpusart2.txrdy_handler().set("stptxint", FUNC(input_merger_device::in_w<2>)); diff --git a/src/mame/dec/vt240.cpp b/src/mame/dec/vt240.cpp index bdf51fecbfe..630878a2af6 100644 --- a/src/mame/dec/vt240.cpp +++ b/src/mame/dec/vt240.cpp @@ -676,16 +676,16 @@ void vt240_state::vt240(machine_config &config) m_duart->b_tx_cb().set("printer", FUNC(rs232_port_device::write_txd)); m_duart->outport_cb().set(FUNC(vt240_state::duartout_w)); - I8251(config, m_i8251, 0); + I8251(config, m_i8251); m_i8251->txd_handler().set(FUNC(vt240_state::tx_w)); m_i8251->dtr_handler().set(FUNC(vt240_state::lben_w)); m_i8251->rxrdy_handler().set(FUNC(vt240_state::irq9_w)); m_i8251->txrdy_handler().set(FUNC(vt240_state::irq7_w)); - LK201(config, m_lk201, 0); + LK201(config, m_lk201); m_lk201->tx_handler().set(m_i8251, FUNC(i8251_device::write_rxd)); - CLOCK(config, "keyboard_clock", 4800 * 64).signal_handler().set(FUNC(vt240_state::write_keyboard_clock)); // 8251 is set to /64 on the clock input + CLOCK(config, "keyboard_clock", XTAL::u(4800 * 64)).signal_handler().set(FUNC(vt240_state::write_keyboard_clock)); // 8251 is set to /64 on the clock input RS232_PORT(config, m_host, default_rs232_devices, "null_modem"); m_host->rxd_handler().set(m_duart, FUNC(scn2681_device::rx_a_w)); @@ -705,14 +705,14 @@ void vt240_state::mc7105(machine_config &config) config.device_remove("lk201"); - ms7004_device &ms7004(MS7004(config, "ms7004", 0)); + ms7004_device &ms7004(MS7004(config, "ms7004")); ms7004.tx_handler().set(m_i8251, FUNC(i8251_device::write_rxd)); m_i8251->txd_handler().set_nop(); //m_i8251->txd_handler().set("ms7004", FUNC(ms7004_device::rx_w)); // baud rate is supposed to be 4800 but keyboard is slightly faster - CLOCK(config.replace(), "keyboard_clock", 4960*64).signal_handler().set(FUNC(vt240_state::write_keyboard_clock)); + CLOCK(config.replace(), "keyboard_clock", XTAL::u(4960*64)).signal_handler().set(FUNC(vt240_state::write_keyboard_clock)); } /* ROM definition */ diff --git a/src/mame/dec/vtvideo.cpp b/src/mame/dec/vtvideo.cpp index eecfd80fb5f..3033399cdd0 100644 --- a/src/mame/dec/vtvideo.cpp +++ b/src/mame/dec/vtvideo.cpp @@ -73,7 +73,7 @@ DEFINE_DEVICE_TYPE(VT100_VIDEO, vt100_video_device, "vt100_video", "VT100 Video" DEFINE_DEVICE_TYPE(RAINBOW_VIDEO, rainbow_video_device, "rainbow_video", "Rainbow Video") -vt100_video_device::vt100_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vt100_video_device::vt100_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , m_read_ram(*this) @@ -86,13 +86,13 @@ vt100_video_device::vt100_video_device(const machine_config &mconfig, device_typ } -vt100_video_device::vt100_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vt100_video_device::vt100_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vt100_video_device(mconfig, VT100_VIDEO, tag, owner, clock) { } -rainbow_video_device::rainbow_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rainbow_video_device::rainbow_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vt100_video_device(mconfig, RAINBOW_VIDEO, tag, owner, clock) { } diff --git a/src/mame/dec/vtvideo.h b/src/mame/dec/vtvideo.h index 9e1c6d91814..34cc22ccf46 100644 --- a/src/mame/dec/vtvideo.h +++ b/src/mame/dec/vtvideo.h @@ -21,7 +21,7 @@ class vt100_video_device : public device_t, public device_video_interface { public: - vt100_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vt100_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ram_rd_callback() { return m_read_ram.bind(); } auto vert_freq_intr_wr_callback() { return m_write_vert_freq_intr.bind(); } @@ -38,7 +38,7 @@ public: virtual void video_update(bitmap_ind16 &bitmap, const rectangle &cliprect); protected: - vt100_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vt100_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -92,7 +92,7 @@ protected: class rainbow_video_device : public vt100_video_device { public: - rainbow_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rainbow_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void video_update(bitmap_ind16 &bitmap, const rectangle &cliprect) override; virtual void video_blanking(bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/dg/aviion88k.cpp b/src/mame/dg/aviion88k.cpp index e0225b951ec..ee85f8b06fe 100644 --- a/src/mame/dg/aviion88k.cpp +++ b/src/mame/dg/aviion88k.cpp @@ -220,7 +220,7 @@ static void aviion88k_scsi_devices(device_slot_interface &device) void aviion88k_state::aviion_4600(machine_config &config) { - MC88100(config, m_cpu, 33'333'333); + MC88100(config, m_cpu, XTAL::u(33'333'333)); m_cpu->set_addrmap(AS_PROGRAM, &aviion88k_state::cpu_map); INTEL_28F010(config, m_prom[0]); @@ -237,7 +237,7 @@ void aviion88k_state::aviion_4600(machine_config &config) MK48T12(config, m_novram); // uart - keyboard interface - SCN2661A(config, m_uart, 0); + SCN2661A(config, m_uart); // keyboard connector PC_KBDC(config, m_kbdc, pc_at_keyboards, nullptr); @@ -278,7 +278,7 @@ void aviion88k_state::aviion_4600(machine_config &config) NSCSI_CONNECTOR(config, "scsi:6", aviion88k_scsi_devices, nullptr); // scsi host adapter (NCR53C700) - NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c700", NCR53C7XX).clock(66'000'000); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c700", NCR53C7XX).clock(XTAL::u(66'000'000)); // TODO: ethernet (AM79C900) diff --git a/src/mame/dgrm/blackt96.cpp b/src/mame/dgrm/blackt96.cpp index ce7942b4a42..02067480027 100644 --- a/src/mame/dgrm/blackt96.cpp +++ b/src/mame/dgrm/blackt96.cpp @@ -509,7 +509,7 @@ void blackt96_state::blackt96(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 0x800); - SNK68_SPR(config, m_sprites, 0); + SNK68_SPR(config, m_sprites); m_sprites->set_gfxdecode_tag(m_gfxdecode); m_sprites->set_tile_indirect_cb(FUNC(blackt96_state::tile_callback)); m_sprites->set_no_partial(); diff --git a/src/mame/dms/dms5000.cpp b/src/mame/dms/dms5000.cpp index ffadaa98778..869335607c4 100644 --- a/src/mame/dms/dms5000.cpp +++ b/src/mame/dms/dms5000.cpp @@ -91,7 +91,7 @@ void dms5000_state::dms5000(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &dms5000_state::mem_map); m_maincpu->set_addrmap(AS_IO, &dms5000_state::io_map); - LS259(config, "cntlatch", 0); // V34 + LS259(config, "cntlatch"); // V34 /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/dms/dms86.cpp b/src/mame/dms/dms86.cpp index 68d55b7c64e..6b8aba700ec 100644 --- a/src/mame/dms/dms86.cpp +++ b/src/mame/dms/dms86.cpp @@ -173,7 +173,7 @@ void dms86_state::dms86(machine_config &config) rs232.dcd_handler().set(m_sio[0], FUNC(z80sio_device::dcdb_w)); // HiNet / Monitor switch rs232.cts_handler().set(m_sio[0], FUNC(z80sio_device::ctsb_w)).invert(); - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(dms86_state::kbd_put)); } diff --git a/src/mame/dooyong/dooyong.cpp b/src/mame/dooyong/dooyong.cpp index 2f3fd0bbbf6..6fc02bb8ac1 100644 --- a/src/mame/dooyong/dooyong.cpp +++ b/src/mame/dooyong/dooyong.cpp @@ -295,8 +295,7 @@ protected: save_item(NAME(m_palette_bank)); } - template - void sound_2203(machine_config &config, T ymclk); + void sound_2203(machine_config &config, XTAL ymclk); void lastday_map(address_map &map); void gulfstrm_map(address_map &map); @@ -1425,8 +1424,7 @@ u8 dooyong_z80_ym2203_state::unk_r() ***************************************************************************/ -template -void dooyong_z80_ym2203_state::sound_2203(machine_config &config, T ymclk) +void dooyong_z80_ym2203_state::sound_2203(machine_config &config, XTAL ymclk) { INPUT_MERGER_ANY_HIGH(config, "soundirq").output_handler().set_inputline(m_audiocpu, 0); @@ -1499,11 +1497,11 @@ void dooyong_z80_ym2203_state::lastday(machine_config &config) void dooyong_z80_ym2203_state::gulfstrm(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 8000000); /* ??? */ + Z80(config, m_maincpu, XTAL::u(8000000)); /* ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &dooyong_z80_ym2203_state::gulfstrm_map); m_maincpu->set_vblank_int("screen", FUNC(dooyong_state::irq0_line_hold)); - Z80(config, m_audiocpu, 8000000); /* ??? */ + Z80(config, m_audiocpu, XTAL::u(8000000)); /* ??? */ m_audiocpu->set_addrmap(AS_PROGRAM, &dooyong_z80_ym2203_state::lastday_sound_map); MCFG_MACHINE_START_OVERRIDE(dooyong_z80_ym2203_state, cpu_z80) @@ -1530,7 +1528,7 @@ void dooyong_z80_ym2203_state::gulfstrm(machine_config &config) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_ym2203_state, gulfstrm) /* sound hardware */ - sound_2203(config, 1'500'000); /* 3.579545MHz */ + sound_2203(config, XTAL::u(1'500'000)); /* 3.579545MHz */ } void dooyong_z80_ym2203_state::pollux(machine_config &config) @@ -1567,17 +1565,17 @@ void dooyong_z80_ym2203_state::pollux(machine_config &config) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_ym2203_state, pollux) /* sound hardware */ - sound_2203(config, 1'500'000); /* 1.5MHz verified */ + sound_2203(config, XTAL::u(1'500'000)); /* 1.5MHz verified */ } void dooyong_z80_state::bluehawk(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 8000000); /* ??? */ + Z80(config, m_maincpu, XTAL::u(8000000)); /* ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &dooyong_z80_state::bluehawk_map); m_maincpu->set_vblank_int("screen", FUNC(dooyong_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4000000); /* ??? */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* ??? */ m_audiocpu->set_addrmap(AS_PROGRAM, &dooyong_z80_state::bluehawk_sound_map); MCFG_MACHINE_START_OVERRIDE(dooyong_z80_state, cpu_z80) diff --git a/src/mame/dooyong/dooyong_tilemap.cpp b/src/mame/dooyong/dooyong_tilemap.cpp index 309c2b76983..d74b55c286b 100644 --- a/src/mame/dooyong/dooyong_tilemap.cpp +++ b/src/mame/dooyong/dooyong_tilemap.cpp @@ -26,7 +26,7 @@ dooyong_tilemap_device_base::dooyong_tilemap_device_base( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_gfxdecode(*this, finder_base::DUMMY_TAG) , m_gfxnum(0) @@ -49,7 +49,7 @@ void dooyong_tilemap_device_base::set_palette_bank(u16 bank) } } -dooyong_rom_tilemap_device::dooyong_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dooyong_rom_tilemap_device::dooyong_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dooyong_rom_tilemap_device(mconfig, DOOYONG_ROM_TILEMAP, tag, owner, clock) { } @@ -59,7 +59,7 @@ dooyong_rom_tilemap_device::dooyong_rom_tilemap_device( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : dooyong_tilemap_device_base(mconfig, type, tag, owner, clock) , m_rows(8) , m_tilerom(*this, finder_base::DUMMY_TAG) @@ -182,7 +182,7 @@ TILE_GET_INFO_MEMBER(dooyong_rom_tilemap_device::tile_info) } -rshark_rom_tilemap_device::rshark_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +rshark_rom_tilemap_device::rshark_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dooyong_rom_tilemap_device(mconfig, RSHARK_ROM_TILEMAP, tag, owner, clock) , m_colorrom(*this, finder_base::DUMMY_TAG) , m_colorrom_offset(0) @@ -212,7 +212,7 @@ TILE_GET_INFO_MEMBER(rshark_rom_tilemap_device::tile_info) } -dooyong_ram_tilemap_device::dooyong_ram_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dooyong_ram_tilemap_device::dooyong_ram_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : dooyong_tilemap_device_base(mconfig, DOOYONG_RAM_TILEMAP, tag, owner, clock) , m_tileram() { diff --git a/src/mame/dooyong/dooyong_tilemap.h b/src/mame/dooyong/dooyong_tilemap.h index 2ee165fba1f..6e92069236f 100644 --- a/src/mame/dooyong/dooyong_tilemap.h +++ b/src/mame/dooyong/dooyong_tilemap.h @@ -29,7 +29,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); gfx_element const &gfx() const { return *m_gfxdecode->gfx(m_gfxnum); } @@ -45,7 +45,7 @@ class dooyong_rom_tilemap_device : public dooyong_tilemap_device_base public: template dooyong_rom_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxdecode_tag, int gfxnum, U &&tilerom_tag, int tilerom_offset, int tilerom_length) - : dooyong_rom_tilemap_device(mconfig, tag, owner, 0) + : dooyong_rom_tilemap_device(mconfig, tag, owner) { set_gfxdecode_tag(std::forward(gfxdecode_tag)); set_gfxnum(gfxnum); @@ -54,7 +54,7 @@ public: set_tilerom_length(tilerom_length); } - dooyong_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dooyong_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_tilerom_tag(U &&tilerom_tag) { m_tilerom.set_tag(std::forward(tilerom_tag)); } void set_tilerom_offset(int offset) { m_tilerom_offset = offset; } @@ -72,7 +72,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); virtual void device_start() override; @@ -98,7 +98,7 @@ class rshark_rom_tilemap_device : public dooyong_rom_tilemap_device public: template rshark_rom_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxdecode_tag, int gfxnum, U &&tilerom_tag, int tilerom_offset, int tilerom_length, V &&colorrom_tag, int colorrom_offset, int colorrom_length) - : rshark_rom_tilemap_device(mconfig, tag, owner, 0) + : rshark_rom_tilemap_device(mconfig, tag, owner) { set_gfxdecode_tag(std::forward(gfxdecode_tag)); set_gfxnum(gfxnum); @@ -110,7 +110,7 @@ public: set_colorrom_length(colorrom_length); } - rshark_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + rshark_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); template void set_colorrom_tag(V &&colorrom_tag) { m_colorrom.set_tag(std::forward(colorrom_tag)); } void set_colorrom_offset(int offset) { m_colorrom_offset = offset; } @@ -132,13 +132,13 @@ class dooyong_ram_tilemap_device : public dooyong_tilemap_device_base public: template dooyong_ram_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&gfxdecode_tag, int gfxnum) - : dooyong_ram_tilemap_device(mconfig, tag, owner, 0) + : dooyong_ram_tilemap_device(mconfig, tag, owner) { set_gfxdecode_tag(std::forward(gfxdecode_tag)); set_gfxnum(gfxnum); } - dooyong_ram_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dooyong_ram_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); u16 tileram_r(offs_t offset) { return m_tileram[offset & ((64U * 32U) - 1)]; } void tileram_w(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/mame/drc/zrt80.cpp b/src/mame/drc/zrt80.cpp index c2c595d85dd..6e8f2c04176 100644 --- a/src/mame/drc/zrt80.cpp +++ b/src/mame/drc/zrt80.cpp @@ -291,7 +291,7 @@ void zrt80_state::zrt80(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 800).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beep, XTAL::u(800)).add_route(ALL_OUTPUTS, "mono", 0.50); TIMER(config, m_beep_timer).configure_generic(FUNC(zrt80_state::beep_timer)); /* Devices */ @@ -301,10 +301,10 @@ void zrt80_state::zrt80(machine_config &config) m_crtc->set_char_width(8); /*?*/ m_crtc->set_update_row_callback(FUNC(zrt80_state::crtc_update_row)); - INS8250(config, m_8250, 2457600); + INS8250(config, m_8250, XTAL::u(2457600)); m_8250->out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(zrt80_state::kbd_put)); } diff --git a/src/mame/dynax/ddenlovr.cpp b/src/mame/dynax/ddenlovr.cpp index 8f023a30237..aad734f9905 100644 --- a/src/mame/dynax/ddenlovr.cpp +++ b/src/mame/dynax/ddenlovr.cpp @@ -4444,12 +4444,12 @@ void htengoku_state::htengoku_banked_map(address_map &map) void htengoku_state::htengoku(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 20000000 / 4); + Z80(config, m_maincpu, XTAL::u(20000000) / 4); m_maincpu->set_addrmap(AS_PROGRAM, &htengoku_state::htengoku_mem_map); m_maincpu->set_addrmap(AS_IO, &htengoku_state::htengoku_io_map); m_maincpu->set_irq_acknowledge_callback("mainirq", FUNC(rst_pos_buffer_device::inta_cb)); // IM 0 needs an opcode on the data bus - ADDRESS_MAP_BANK(config, m_bankdev, 0); + ADDRESS_MAP_BANK(config, m_bankdev); m_bankdev->set_addrmap(0, &htengoku_state::htengoku_banked_map); m_bankdev->set_data_width(8); m_bankdev->set_addr_width(20); @@ -4460,7 +4460,7 @@ void htengoku_state::htengoku(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - RST_POS_BUFFER(config, "mainirq", 0).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, "mainirq").int_callback().set_inputline(m_maincpu, 0); LS259(config, m_mainlatch); m_mainlatch->q_out_cb<0>().set(FUNC(dynax_state::flipscreen_w)); @@ -4478,7 +4478,7 @@ void htengoku_state::htengoku(machine_config &config) m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE); m_screen->screen_vblank().set(FUNC(htengoku_state::sprtmtch_vblank_w)); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::hnoridur_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4491,12 +4491,12 @@ void htengoku_state::htengoku(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 20000000 / 16)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(20000000) / 16)); aysnd.port_a_read_callback().set(FUNC(htengoku_state::htengoku_dsw_r)); aysnd.port_b_write_callback().set(FUNC(htengoku_state::htengoku_dsw_w)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.20); - YM2413(config, "ym2413", 3579545).add_route(ALL_OUTPUTS, "mono", 1.0); + YM2413(config, "ym2413", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 1.0); /* devices */ msm6242_device &rtc(MSM6242(config, "rtc", XTAL(32'768))); @@ -10029,11 +10029,11 @@ WRITE_LINE_MEMBER(mmpanic_state::mmpanic_rtc_irq) void mmpanic_state::mmpanic(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 8000000); + Z80(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mmpanic_state::mmpanic_map); m_maincpu->set_addrmap(AS_IO, &mmpanic_state::mmpanic_portmap); - Z80(config, m_soundcpu, 3579545); + Z80(config, m_soundcpu, XTAL::u(3579545)); m_soundcpu->set_addrmap(AS_PROGRAM, &mmpanic_state::mmpanic_sound_map); m_soundcpu->set_addrmap(AS_IO, &mmpanic_state::mmpanic_sound_portmap); @@ -10062,11 +10062,11 @@ void mmpanic_state::mmpanic(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, INPUT_LINE_NMI); - YM2413(config, "ym2413", 3579545).add_route(ALL_OUTPUTS, "mono", 0.80); + YM2413(config, "ym2413", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 0.80); - AY8910(config, "aysnd", 3579545).add_route(ALL_OUTPUTS, "mono", 0.30); + AY8910(config, "aysnd", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 0.30); - OKIM6295(config, m_oki, 1022720, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1022720), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 0.80); /* devices */ @@ -10090,7 +10090,7 @@ void mmpanic_state::mmpanic(machine_config &config) void hanakanz_state::hanakanz(machine_config &config) { /* basic machine hardware */ - kl5c80a12_device &maincpu(KL5C80A12(config, m_maincpu, 20'000'000)); + kl5c80a12_device &maincpu(KL5C80A12(config, m_maincpu, XTAL::u(20'000'000))); maincpu.set_addrmap(AS_PROGRAM, &hanakanz_state::hanakanz_map); maincpu.set_addrmap(AS_IO, &hanakanz_state::hanakanz_portmap); maincpu.in_p0_callback().set(FUNC(hanakanz_state::hanakanz_busy_r)); @@ -10122,9 +10122,9 @@ void hanakanz_state::hanakanz(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ym2413", 3579545).add_route(ALL_OUTPUTS, "mono", 0.80); + YM2413(config, "ym2413", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 0.80); - OKIM6295(config, m_oki, 1022720, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1022720), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 0.80); /* devices */ @@ -10215,7 +10215,7 @@ void hanakanz_state::mjchuuka(machine_config &config) hanakanz(config); /* basic machine hardware */ - tmpz84c015_device &tmpz(TMPZ84C015(config.replace(), m_maincpu, 8000000)); + tmpz84c015_device &tmpz(TMPZ84C015(config.replace(), m_maincpu, XTAL::u(8000000))); tmpz.set_addrmap(AS_PROGRAM, &hanakanz_state::hanakanz_map); tmpz.set_addrmap(AS_IO, &hanakanz_state::mjchuuka_portmap); tmpz.out_pa_callback().set(FUNC(hanakanz_state::hanakanz_rombank_w)); @@ -10225,7 +10225,7 @@ void hanakanz_state::mjchuuka(machine_config &config) subdevice("rtc")->out_int_handler().set(m_maincpu, FUNC(tmpz84c015_device::trg1)); - AY8910(config, "aysnd", 1789772).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8910(config, "aysnd", XTAL::u(1789772)).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -10238,7 +10238,7 @@ WRITE_LINE_MEMBER(mmpanic_state::funkyfig_sound_irq) void mmpanic_state::funkyfig(machine_config &config) { mmpanic(config); - tmpz84c015_device &tmpz(TMPZ84C015(config.replace(), m_maincpu, 8000000)); + tmpz84c015_device &tmpz(TMPZ84C015(config.replace(), m_maincpu, XTAL::u(8000000))); tmpz.set_addrmap(AS_PROGRAM, &mmpanic_state::funkyfig_map); tmpz.set_addrmap(AS_IO, &mmpanic_state::funkyfig_portmap); tmpz.in_pa_callback().set(FUNC(mmpanic_state::funkyfig_dsw_r)); @@ -10351,7 +10351,7 @@ void ddenlovr_state::mjmyster(machine_config &config) MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,mjmyster) - ay8910_device &aysnd(AY8910(config, "aysnd", 3579545)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(3579545))); aysnd.port_b_write_callback().set(FUNC(ddenlovr_state::ddenlovr_select_w)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); } @@ -10389,7 +10389,7 @@ void ddenlovr_state::hginga(machine_config &config) MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,mjmyster) - ay8910_device &aysnd(AY8910(config, "aysnd", 3579545)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(3579545))); aysnd.port_a_read_callback().set(FUNC(ddenlovr_state::hginga_dsw_r)); aysnd.port_b_write_callback().set(FUNC(ddenlovr_state::ddenlovr_select_w)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); @@ -10416,7 +10416,7 @@ void ddenlovr_state::hgokou(machine_config &config) MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,mjmyster) - ay8910_device &aysnd(AY8910(config, "aysnd", 3579545)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(3579545))); aysnd.port_a_read_callback().set(FUNC(ddenlovr_state::hginga_dsw_r)); aysnd.port_b_write_callback().set(FUNC(ddenlovr_state::ddenlovr_select_w)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); @@ -10463,7 +10463,7 @@ void ddenlovr_state::mjmyuniv(machine_config &config) blitter_irq().set("maincpu", FUNC(tmpz84c015_device::trg1)); blitter_irq().append("maincpu", FUNC(tmpz84c015_device::trg2)); - ay8910_device &aysnd(AY8910(config, "aysnd", 1789772)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1789772))); aysnd.port_b_write_callback().set(FUNC(ddenlovr_state::ddenlovr_select_w)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); } @@ -10490,7 +10490,7 @@ void ddenlovr_state::mjmyornt(machine_config &config) blitter_irq().set("maincpu", FUNC(tmpz84c015_device::trg1)); blitter_irq().append("maincpu", FUNC(tmpz84c015_device::trg2)); - ay8910_device &aysnd(AY8910(config, "aysnd", 1789772)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1789772))); aysnd.port_b_write_callback().set(FUNC(ddenlovr_state::ddenlovr_select_w)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.30); } @@ -10543,7 +10543,7 @@ void ddenlovr_state::mjflove(machine_config &config) MCFG_VIDEO_START_OVERRIDE(ddenlovr_state,mjflove) // blitter commands in the roms are shuffled around - AY8910(config, "aysnd", 28636363/8).add_route(ALL_OUTPUTS, "mono", 0.30); + AY8910(config, "aysnd", XTAL::u(28636363)/8).add_route(ALL_OUTPUTS, "mono", 0.30); } void ddenlovr_state::hparadis(machine_config &config) diff --git a/src/mame/dynax/dynax.cpp b/src/mame/dynax/dynax.cpp index 604495f52b3..404538ef8a0 100644 --- a/src/mame/dynax/dynax.cpp +++ b/src/mame/dynax/dynax.cpp @@ -4215,7 +4215,7 @@ void dynax_state::cdracula(machine_config &config) // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // no battery - RST_POS_BUFFER(config, m_mainirq, 0).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, m_mainirq).int_callback().set_inputline(m_maincpu, 0); LS259(config, m_mainlatch); m_mainlatch->q_out_cb<1>().set(FUNC(dynax_state::flipscreen_w)); // Flip Screen @@ -4232,7 +4232,7 @@ void dynax_state::cdracula(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set(FUNC(dynax_state::sprtmtch_vblank_w)); - cdracula_blitter_device &blitter(CDRACULA_BLITTER(config, m_blitter, 0)); + cdracula_blitter_device &blitter(CDRACULA_BLITTER(config, m_blitter)); blitter.vram_out_cb().set(FUNC(dynax_state::cdracula_blit_pixel_w)); blitter.scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); blitter.scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4257,7 +4257,7 @@ void dynax_state::cdracula(machine_config &config) void dynax_state::hanamai(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 22000000 / 4); /* 5.5MHz */ + Z80(config, m_maincpu, XTAL::u(22000000) / 4); /* 5.5MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &dynax_state::sprtmtch_mem_map); m_maincpu->set_addrmap(AS_IO, &dynax_state::hanamai_io_map); m_maincpu->set_irq_acknowledge_callback("mainirq", FUNC(rst_pos_buffer_device::inta_cb)); // IM 0 needs an opcode on the data bus @@ -4267,7 +4267,7 @@ void dynax_state::hanamai(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - RST_POS_BUFFER(config, m_mainirq, 0).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, m_mainirq).int_callback().set_inputline(m_maincpu, 0); LS259(config, m_mainlatch); m_mainlatch->q_out_cb<0>().set(m_msm, FUNC(msm5205_device::reset_w)).invert(); // MSM5205 reset @@ -4289,7 +4289,7 @@ void dynax_state::hanamai(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set(FUNC(dynax_state::sprtmtch_vblank_w)); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::hanamai_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4301,9 +4301,9 @@ void dynax_state::hanamai(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8912(config, "aysnd", 22000000 / 8).add_route(ALL_OUTPUTS, "mono", 0.20); + AY8912(config, "aysnd", XTAL::u(22000000) / 8).add_route(ALL_OUTPUTS, "mono", 0.20); - ym2203_device &ym2203(YM2203(config, "ym2203", 22000000 / 8)); + ym2203_device &ym2203(YM2203(config, "ym2203", XTAL::u(22000000) / 8)); ym2203.irq_handler().set("mainirq", FUNC(rst_pos_buffer_device::rst1_w)); ym2203.port_a_read_callback().set_ioport("DSW1"); ym2203.port_b_read_callback().set_ioport("DSW0"); @@ -4312,7 +4312,7 @@ void dynax_state::hanamai(machine_config &config) ym2203.add_route(2, "mono", 0.20); ym2203.add_route(3, "mono", 0.50); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(dynax_state::adpcm_int)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz, 4 Bits */ m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); @@ -4339,7 +4339,7 @@ void dynax_state::hnoridur(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - RST_POS_BUFFER(config, m_mainirq, 0).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, m_mainirq).int_callback().set_inputline(m_maincpu, 0); LS259(config, m_mainlatch); // IC25 m_mainlatch->q_out_cb<0>().set(FUNC(dynax_state::flipscreen_w)); @@ -4361,7 +4361,7 @@ void dynax_state::hnoridur(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set(FUNC(dynax_state::sprtmtch_vblank_w)); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::hnoridur_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4406,7 +4406,7 @@ void dynax_state::hjingi(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - RST_POS_BUFFER(config, m_mainirq, 0).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, m_mainirq).int_callback().set_inputline(m_maincpu, 0); LS259(config, m_mainlatch); m_mainlatch->q_out_cb<0>().set(FUNC(dynax_state::flipscreen_w)); @@ -4430,7 +4430,7 @@ void dynax_state::hjingi(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set(FUNC(dynax_state::sprtmtch_vblank_w)); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::hnoridur_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4463,7 +4463,7 @@ void dynax_state::hjingi(machine_config &config) void dynax_state::sprtmtch(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 22000000 / 4); /* 5.5MHz */ + Z80(config, m_maincpu, XTAL::u(22000000) / 4); /* 5.5MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &dynax_state::sprtmtch_mem_map); m_maincpu->set_addrmap(AS_IO, &dynax_state::sprtmtch_io_map); m_maincpu->set_irq_acknowledge_callback("mainirq", FUNC(rst_pos_buffer_device::inta_cb)); // IM 0 needs an opcode on the data bus @@ -4473,7 +4473,7 @@ void dynax_state::sprtmtch(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - RST_POS_BUFFER(config, m_mainirq, 0).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, m_mainirq).int_callback().set_inputline(m_maincpu, 0); LS259(config, m_mainlatch); // UF12 on Intergirl m_mainlatch->q_out_cb<1>().set(FUNC(dynax_state::flipscreen_w)); @@ -4492,7 +4492,7 @@ void dynax_state::sprtmtch(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set(FUNC(dynax_state::sprtmtch_vblank_w)); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::drgpunch_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4504,7 +4504,7 @@ void dynax_state::sprtmtch(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym2203_device &ym2203(YM2203(config, "ym2203", 22000000 / 8)); + ym2203_device &ym2203(YM2203(config, "ym2203", XTAL::u(22000000) / 8)); ym2203.irq_handler().set("mainirq", FUNC(rst_pos_buffer_device::rst1_w)); ym2203.port_a_read_callback().set_ioport("DSW0"); ym2203.port_b_read_callback().set_ioport("DSW1"); @@ -4528,7 +4528,7 @@ WRITE_LINE_MEMBER(dynax_state::mjfriday_vblank_w) void dynax_state::mjfriday(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 24000000/4); /* 6 MHz? */ + Z80(config, m_maincpu, XTAL::u(24000000)/4); /* 6 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &dynax_state::sprtmtch_mem_map); m_maincpu->set_addrmap(AS_IO, &dynax_state::mjfriday_io_map); @@ -4557,7 +4557,7 @@ void dynax_state::mjfriday(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set(FUNC(dynax_state::mjfriday_vblank_w)); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::mjdialq2_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4569,7 +4569,7 @@ void dynax_state::mjfriday(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ym2413", 24000000/6).add_route(ALL_OUTPUTS, "mono", 1.0); + YM2413(config, "ym2413", XTAL::u(24000000)/6).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4672,12 +4672,12 @@ MACHINE_START_MEMBER(dynax_state,jantouki) void dynax_state::jantouki(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 22000000 / 4); /* 5.5MHz */ + Z80(config, m_maincpu, XTAL::u(22000000) / 4); /* 5.5MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &dynax_state::jantouki_mem_map); m_maincpu->set_addrmap(AS_IO, &dynax_state::jantouki_io_map); m_maincpu->set_irq_acknowledge_callback("mainirq", FUNC(rst_pos_buffer_device::inta_cb)); // IM 0 needs an opcode on the data bus - Z80(config, m_soundcpu, 22000000 / 4); /* 5.5MHz */ + Z80(config, m_soundcpu, XTAL::u(22000000) / 4); /* 5.5MHz */ m_soundcpu->set_addrmap(AS_PROGRAM, &dynax_state::jantouki_sound_mem_map); m_soundcpu->set_addrmap(AS_IO, &dynax_state::jantouki_sound_io_map); m_soundcpu->set_irq_acknowledge_callback("soundirq", FUNC(rst_pos_buffer_device::inta_cb)); // IM 0 needs an opcode on the data bus @@ -4687,8 +4687,8 @@ void dynax_state::jantouki(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - RST_POS_BUFFER(config, m_mainirq, 0).int_callback().set_inputline(m_maincpu, 0); - RST_POS_BUFFER(config, m_soundirq, 0).int_callback().set_inputline(m_soundcpu, 0); + RST_POS_BUFFER(config, m_mainirq).int_callback().set_inputline(m_maincpu, 0); + RST_POS_BUFFER(config, m_soundirq).int_callback().set_inputline(m_soundcpu, 0); LS259(config, m_mainlatch); m_mainlatch->q_out_cb<0>().set(FUNC(dynax_state::coincounter_0_w)); // Coin Counter @@ -4714,7 +4714,7 @@ void dynax_state::jantouki(machine_config &config) top.set_palette(m_palette); top.screen_vblank().set(FUNC(dynax_state::jantouki_vblank_w)); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::jantouki_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); @@ -4728,7 +4728,7 @@ void dynax_state::jantouki(machine_config &config) bottom.set_screen_update(FUNC(dynax_state::screen_update_jantouki_bottom)); bottom.set_palette(m_palette); - DYNAX_BLITTER_REV2(config, m_blitter2, 0); + DYNAX_BLITTER_REV2(config, m_blitter2); m_blitter2->vram_out_cb().set(FUNC(dynax_state::jantouki_blit2_pixel_w)); m_blitter2->scrollx_cb().set(FUNC(dynax_state::dynax_blit2_scrollx_w)); m_blitter2->scrolly_cb().set(FUNC(dynax_state::dynax_blit2_scrolly_w)); @@ -4739,16 +4739,16 @@ void dynax_state::jantouki(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8912(config, "aysnd", 22000000 / 8).add_route(ALL_OUTPUTS, "mono", 0.20); + AY8912(config, "aysnd", XTAL::u(22000000) / 8).add_route(ALL_OUTPUTS, "mono", 0.20); - ym2203_device &ym2203(YM2203(config, "ym2203", 22000000 / 8)); + ym2203_device &ym2203(YM2203(config, "ym2203", XTAL::u(22000000) / 8)); ym2203.irq_handler().set("soundirq", FUNC(rst_pos_buffer_device::rst1_w)); ym2203.add_route(0, "mono", 0.20); ym2203.add_route(1, "mono", 0.20); ym2203.add_route(2, "mono", 0.20); ym2203.add_route(3, "mono", 0.50); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(dynax_state::adpcm_int_cpu1)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz, 4 Bits */ m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); @@ -4854,7 +4854,7 @@ WRITE_LINE_MEMBER(dynax_state::tenkai_blitter_ack_w) void dynax_state::tenkai(machine_config &config) { /* basic machine hardware */ - tmp91640_device &tmp(TMP91640(config, m_maincpu, 21472700 / 2)); + tmp91640_device &tmp(TMP91640(config, m_maincpu, XTAL::u(21472700) / 2)); tmp.set_addrmap(AS_PROGRAM, &dynax_state::tenkai_map); tmp.port_read<3>().set(FUNC(dynax_state::tenkai_p3_r)); tmp.port_write<3>().set(FUNC(dynax_state::tenkai_p3_w)); @@ -4890,7 +4890,7 @@ void dynax_state::tenkai(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_IRQ1); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::hnoridur_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::tenkai_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::tenkai_blit_scrolly_w)); @@ -4903,12 +4903,12 @@ void dynax_state::tenkai(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &ay8910(AY8910(config, "aysnd", 22000000 / 16)); + ay8910_device &ay8910(AY8910(config, "aysnd", XTAL::u(22000000) / 16)); ay8910.port_a_read_callback().set(FUNC(dynax_state::tenkai_dsw_r)); ay8910.port_b_write_callback().set(FUNC(dynax_state::tenkai_dswsel_w)); ay8910.add_route(ALL_OUTPUTS, "mono", 0.20); - YM2413(config, "ym2413", 3579545).add_route(ALL_OUTPUTS, "mono", 1.0); + YM2413(config, "ym2413", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 1.0); /* devices */ MSM6242(config, "rtc", 32.768_kHz_XTAL).out_int_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ2); @@ -4973,7 +4973,7 @@ void dynax_state::gekisha(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - DYNAX_BLITTER_REV2(config, m_blitter, 0); + DYNAX_BLITTER_REV2(config, m_blitter); m_blitter->vram_out_cb().set(FUNC(dynax_state::mjdialq2_blit_pixel_w)); m_blitter->scrollx_cb().set(FUNC(dynax_state::dynax_blit_scrollx_w)); m_blitter->scrolly_cb().set(FUNC(dynax_state::dynax_blit_scrolly_w)); diff --git a/src/mame/dynax/dynax_blitter_rev2.cpp b/src/mame/dynax/dynax_blitter_rev2.cpp index 237a06876d9..d3005349eb9 100644 --- a/src/mame/dynax/dynax_blitter_rev2.cpp +++ b/src/mame/dynax/dynax_blitter_rev2.cpp @@ -54,12 +54,12 @@ DEFINE_DEVICE_TYPE(CDRACULA_BLITTER, cdracula_blitter_device, "cdracula_blitter" // dynax_blitter_rev2_device - constructor //------------------------------------------------- -dynax_blitter_rev2_device::dynax_blitter_rev2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dynax_blitter_rev2_device::dynax_blitter_rev2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dynax_blitter_rev2_device(mconfig, DYNAX_BLITTER_REV2, tag, owner, clock) { } -dynax_blitter_rev2_device::dynax_blitter_rev2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +dynax_blitter_rev2_device::dynax_blitter_rev2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_rom_interface(mconfig, *this) , m_vram_out_cb(*this) @@ -325,7 +325,7 @@ void dynax_blitter_rev2_device::regs_w(offs_t offset, uint8_t data) // cdracula_blitter_device - constructor //------------------------------------------------- -cdracula_blitter_device::cdracula_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cdracula_blitter_device::cdracula_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dynax_blitter_rev2_device(mconfig, CDRACULA_BLITTER, tag, owner, clock) , m_blit_dest_cb(*this) { diff --git a/src/mame/dynax/dynax_blitter_rev2.h b/src/mame/dynax/dynax_blitter_rev2.h index 2e26a5f0faa..c8f718bbfeb 100644 --- a/src/mame/dynax/dynax_blitter_rev2.h +++ b/src/mame/dynax/dynax_blitter_rev2.h @@ -22,7 +22,7 @@ class dynax_blitter_rev2_device : public device_t, public device_rom_interface<2 { public: // construction/destruction - dynax_blitter_rev2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dynax_blitter_rev2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration auto vram_out_cb() { return m_vram_out_cb.bind(); } @@ -39,7 +39,7 @@ public: protected: // delegated construction - dynax_blitter_rev2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + dynax_blitter_rev2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -72,7 +72,7 @@ class cdracula_blitter_device : public dynax_blitter_rev2_device { public: // construction/destruction - cdracula_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cdracula_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto blit_dest_cb() { return m_blit_dest_cb.bind(); } diff --git a/src/mame/dynax/hnayayoi.cpp b/src/mame/dynax/hnayayoi.cpp index 3e0d0170390..45299db94cf 100644 --- a/src/mame/dynax/hnayayoi.cpp +++ b/src/mame/dynax/hnayayoi.cpp @@ -956,7 +956,7 @@ void hnayayoi_state::hnayayoi(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &hnayayoi_state::hnayayoi_map); m_maincpu->set_addrmap(AS_IO, &hnayayoi_state::hnayayoi_io_map); - CLOCK(config, "nmiclock", 8000).signal_handler().set(FUNC(hnayayoi_state::nmi_clock_w)); + CLOCK(config, "nmiclock", XTAL::u(8000)).signal_handler().set(FUNC(hnayayoi_state::nmi_clock_w)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -992,7 +992,7 @@ void hnayayoi_state::hnayayoi(machine_config &config) ymsnd.add_route(2, "mono", 0.25); ymsnd.add_route(3, "mono", 0.80); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->set_prescaler_selector(msm5205_device::SEX_4B); m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/dynax/royalmah.cpp b/src/mame/dynax/royalmah.cpp index 7a16f84948a..f29489afa59 100644 --- a/src/mame/dynax/royalmah.cpp +++ b/src/mame/dynax/royalmah.cpp @@ -3720,7 +3720,7 @@ INPUT_PORTS_END void royalmah_state::royalmah(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 18432000 / 6); // 3.072 MHz + Z80(config, m_maincpu, XTAL::u(18432000) / 6); // 3.072 MHz m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::royalmah_map); m_maincpu->set_addrmap(AS_IO, &royalmah_state::royalmah_iomap); m_maincpu->set_vblank_int("screen", FUNC(royalmah_state::irq0_line_hold)); @@ -3740,7 +3740,7 @@ void royalmah_state::royalmah(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - AY8910(config, m_ay, 18432000 / 12); + AY8910(config, m_ay, XTAL::u(18432000) / 12); m_ay->port_a_read_callback().set(FUNC(royalmah_state::player_1_port_r)); m_ay->port_b_read_callback().set(FUNC(royalmah_state::player_2_port_r)); m_ay->add_route(ALL_OUTPUTS, "speaker", 0.33); @@ -3750,17 +3750,17 @@ void royalmah_state::royalmah(machine_config &config) void royalmah_state::janoh(machine_config &config) { royalmah(config); - m_maincpu->set_clock(8000000 / 2); // 4 MHz ? + m_maincpu->set_clock(XTAL::u(8000000) / 2); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::janoh_map); } void royalmah_state::janoha(machine_config &config) { royalmah(config); - m_maincpu->set_clock(8000000 / 2); // 4 MHz ? + m_maincpu->set_clock(XTAL::u(8000000) / 2); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::janoh_map); - z80_device &sub(Z80(config, "sub", 4000000)); // 4 MHz ? + z80_device &sub(Z80(config, "sub", XTAL::u(4000000))); // 4 MHz ? sub.set_addrmap(AS_PROGRAM, &royalmah_state::janoh_sub_map); sub.set_addrmap(AS_IO, &royalmah_state::janoh_sub_iomap); sub.set_vblank_int("screen", FUNC(royalmah_state::irq0_line_hold)); @@ -3773,20 +3773,20 @@ void royalmah_state::jansou(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::jansou_map); m_maincpu->set_addrmap(AS_IO, &royalmah_state::royalmah_iomap); - Z80(config, m_audiocpu, 4000000); // 4.000 MHz + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4.000 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &royalmah_state::jansou_sub_map); m_audiocpu->set_addrmap(AS_IO, &royalmah_state::jansou_sub_iomap); m_audiocpu->set_periodic_int(FUNC(royalmah_state::irq0_line_hold), attotime::from_hz(4000000 / 512)); GENERIC_LATCH_8(config, m_soundlatch); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } void royalmah_state::dondenmj(machine_config &config) { royalmah(config); - m_maincpu->set_clock(8000000 / 2); // 4 MHz ? + m_maincpu->set_clock(XTAL::u(8000000) / 2); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::royalmah_banked_map); m_maincpu->set_addrmap(AS_IO, &royalmah_state::dondenmj_iomap); } @@ -3794,7 +3794,7 @@ void royalmah_state::dondenmj(machine_config &config) void royalmah_state::tahjong(machine_config &config) { royalmah(config); - m_maincpu->set_clock(8000000 / 2); // 4 MHz ? + m_maincpu->set_clock(XTAL::u(8000000) / 2); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::tahjong_map); m_maincpu->set_addrmap(AS_IO, &royalmah_state::tahjong_iomap); } @@ -3802,7 +3802,7 @@ void royalmah_state::tahjong(machine_config &config) void royalmah_state::makaijan(machine_config &config) { royalmah(config); - m_maincpu->set_clock(8000000 / 2); // 4 MHz ? + m_maincpu->set_clock(XTAL::u(8000000) / 2); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::royalmah_banked_map); m_maincpu->set_addrmap(AS_IO, &royalmah_state::makaijan_iomap); } @@ -3810,7 +3810,7 @@ void royalmah_state::makaijan(machine_config &config) void royalmah_state::daisyari(machine_config &config) { royalmah(config); - m_maincpu->set_clock(8000000 / 2); // 4 MHz ? + m_maincpu->set_clock(XTAL::u(8000000) / 2); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::royalmah_banked_map); m_maincpu->set_addrmap(AS_IO, &royalmah_state::daisyari_iomap); } @@ -3818,7 +3818,7 @@ void royalmah_state::daisyari(machine_config &config) void royalmah_state::mjclub(machine_config &config) { royalmah(config); - m_maincpu->set_clock(8000000 / 2); // 4 MHz ? + m_maincpu->set_clock(XTAL::u(8000000) / 2); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &royalmah_state::royalmah_banked_map); m_maincpu->set_addrmap(AS_IO, &royalmah_state::mjclub_iomap); } @@ -3965,7 +3965,7 @@ void royalmah_state::janptr96(machine_config &config) void royalmah_state::mjifb(machine_config &config) { mjderngr(config); - tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, 8000000)); // ? + tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, XTAL::u(8000000))); // ? tmp.set_addrmap(AS_PROGRAM, &royalmah_state::mjifb_map); tmp.port_read<3>().set_ioport("PORT3_5").rshift(6); tmp.port_write<3>().set(FUNC(royalmah_state::mjifb_p3_w)); @@ -3985,7 +3985,7 @@ void royalmah_state::mjifb(machine_config &config) void royalmah_state::mjdejavu(machine_config &config) { mjderngr(config); - tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, 8000000)); // ? + tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, XTAL::u(8000000))); // ? tmp.set_addrmap(AS_PROGRAM, &royalmah_state::mjdejavu_map); tmp.port_read<3>().set_ioport("PORT3_5").rshift(6); tmp.port_write<3>().set(FUNC(royalmah_state::mjifb_p3_w)); @@ -4005,7 +4005,7 @@ void royalmah_state::mjdejavu(machine_config &config) void royalmah_state::mjtensin(machine_config &config) { mjderngr(config); - tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, 12000000)); // ? + tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, XTAL::u(12000000))); // ? tmp.set_addrmap(AS_PROGRAM, &royalmah_state::mjtensin_map); tmp.port_read<3>().set(FUNC(royalmah_state::mjtensin_p3_r)); tmp.port_write<4>().set(FUNC(royalmah_state::mjtensin_p4_w)); @@ -4021,7 +4021,7 @@ void royalmah_state::mjtensin(machine_config &config) void royalmah_state::cafetime(machine_config &config) { mjderngr(config); - tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, 12000000)); // ? + tmp90841_device &tmp(TMP90841(config.replace(), m_maincpu, XTAL::u(12000000))); // ? tmp.set_addrmap(AS_PROGRAM, &royalmah_state::cafetime_map); tmp.port_write<3>().set(FUNC(royalmah_state::cafetime_p3_w)); tmp.port_write<4>().set(FUNC(royalmah_state::cafetime_p4_w)); @@ -4107,7 +4107,7 @@ void royalmah_state::pongboo2(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1'000'000, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.5); // frequency and pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1'000'000), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.5); // frequency and pin 7 not verified } diff --git a/src/mame/edevices/diverboy.cpp b/src/mame/edevices/diverboy.cpp index 01c0510097e..b8785ea3cea 100644 --- a/src/mame/edevices/diverboy.cpp +++ b/src/mame/edevices/diverboy.cpp @@ -263,11 +263,11 @@ void diverboy_state::machine_start() void diverboy_state::diverboy(machine_config &config) { - M68000(config, m_maincpu, 12000000); /* guess */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* guess */ m_maincpu->set_addrmap(AS_PROGRAM, &diverboy_state::diverboy_map); m_maincpu->set_vblank_int("screen", FUNC(diverboy_state::irq6_line_hold)); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &diverboy_state::snd_map); @@ -288,7 +288,7 @@ void diverboy_state::diverboy(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1320000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1320000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified } /* diff --git a/src/mame/edevices/edevices.cpp b/src/mame/edevices/edevices.cpp index 47859c589ee..572a0198f69 100644 --- a/src/mame/edevices/edevices.cpp +++ b/src/mame/edevices/edevices.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(EDEVICES_VID, edevices_device, "edevices_vid", "Electronic De DEFINE_DEVICE_TYPE(EDEVICES_SFORCE_VID, edevices_sforce_device, "edevices_sforce_vid", "Electronic Devices Video (Steel Forces)") -edevices_device::edevices_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +edevices_device::edevices_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_bg_videoram(*this, finder_base::DUMMY_TAG), m_mlow_videoram(*this, finder_base::DUMMY_TAG), @@ -39,12 +39,12 @@ edevices_device::edevices_device(const machine_config &mconfig, device_type type } -edevices_device::edevices_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +edevices_device::edevices_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edevices_device(mconfig, EDEVICES_VID, tag, owner, clock) { } -edevices_sforce_device::edevices_sforce_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +edevices_sforce_device::edevices_sforce_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : edevices_device(mconfig, EDEVICES_SFORCE_VID, tag, owner, clock) { } diff --git a/src/mame/edevices/edevices.h b/src/mame/edevices/edevices.h index 536250445a9..39ad93b1916 100644 --- a/src/mame/edevices/edevices.h +++ b/src/mame/edevices/edevices.h @@ -12,8 +12,8 @@ class edevices_device : public device_t { public: - edevices_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - edevices_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + edevices_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + edevices_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_bg_videoram_tag(T &&tag) { m_bg_videoram.set_tag(std::forward(tag)); } template void set_mlow_videoram_tag(T &&tag) { m_mlow_videoram.set_tag(std::forward(tag)); } @@ -82,7 +82,7 @@ private: class edevices_sforce_device : public edevices_device { public: - edevices_sforce_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + edevices_sforce_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int get_priority(const uint16_t *source) override; }; diff --git a/src/mame/edevices/fantland.cpp b/src/mame/edevices/fantland.cpp index 16cf813cc54..2e78a94e82c 100644 --- a/src/mame/edevices/fantland.cpp +++ b/src/mame/edevices/fantland.cpp @@ -838,7 +838,7 @@ void fantland_state::fantland(machine_config &config) YM2151(config, "ymsnd", 16_MHz_XTAL / 4).add_route(0, "speaker", 0.35).add_route(1, "speaker", 0.35); // divider not verified - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } @@ -876,7 +876,7 @@ void fantland_state::galaxygn(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 3000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(3000000))); ymsnd.irq_handler().set(FUNC(fantland_state::galaxygn_sound_irq)); ymsnd.add_route(0, "speaker", 1.0); ymsnd.add_route(1, "speaker", 1.0); @@ -928,10 +928,10 @@ void borntofi_state::machine_reset() void borntofi_state::borntofi(machine_config &config) { // Basic machine hardware - V20(config, m_maincpu, 16000000/2); // D701080C-8 - NEC D70108C-8 V20 CPU, running at 8.000MHz [16/2] + V20(config, m_maincpu, XTAL(16000000)/2); // D701080C-8 - NEC D70108C-8 V20 CPU, running at 8.000MHz [16/2] m_maincpu->set_addrmap(AS_PROGRAM, &borntofi_state::main_map); - I8088(config, m_audiocpu, 18432000/3); // 8088 - AMD P8088-2 CPU, running at 6.144MHz [18.432/3] + I8088(config, m_audiocpu, XTAL(18432000)/3); // 8088 - AMD P8088-2 CPU, running at 6.144MHz [18.432/3] m_audiocpu->set_addrmap(AS_PROGRAM, &borntofi_state::sound_map); // Video hardware @@ -953,22 +953,22 @@ void borntofi_state::borntofi(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); // OKI M5205 running at 384kHz [18.432/48]. Sample rate = 384000 / 48 - msm5205_device &msm1(MSM5205(config, "msm1", 384000)); + msm5205_device &msm1(MSM5205(config, "msm1", XTAL(18432000)/48)); msm1.vck_legacy_callback().set(FUNC(borntofi_state::adpcm_int<0>)); // IRQ handler msm1.set_prescaler_selector(msm5205_device::S48_4B); // 8 kHz, 4 Bits msm1.add_route(ALL_OUTPUTS, "speaker", 1.0); - msm5205_device &msm2(MSM5205(config, "msm2", 384000)); + msm5205_device &msm2(MSM5205(config, "msm2", XTAL(18432000)/48)); msm2.vck_legacy_callback().set(FUNC(borntofi_state::adpcm_int<1>)); // IRQ handler msm2.set_prescaler_selector(msm5205_device::S48_4B); // 8 kHz, 4 Bits msm2.add_route(ALL_OUTPUTS, "speaker", 1.0); - msm5205_device &msm3(MSM5205(config, "msm3", 384000)); + msm5205_device &msm3(MSM5205(config, "msm3", XTAL(18432000)/48)); msm3.vck_legacy_callback().set(FUNC(borntofi_state::adpcm_int<2>)); // IRQ handler msm3.set_prescaler_selector(msm5205_device::S48_4B); // 8 kHz, 4 Bits msm3.add_route(ALL_OUTPUTS, "speaker", 1.0); - msm5205_device &msm4(MSM5205(config, "msm4", 384000)); + msm5205_device &msm4(MSM5205(config, "msm4", XTAL(18432000)/48)); msm4.vck_legacy_callback().set(FUNC(borntofi_state::adpcm_int<3>)); // IRQ handler msm4.set_prescaler_selector(msm5205_device::S48_4B); // 8 kHz, 4 Bits msm3.add_route(ALL_OUTPUTS, "speaker", 1.0); diff --git a/src/mame/edevices/mugsmash.cpp b/src/mame/edevices/mugsmash.cpp index 647023304b8..dd64cf82f49 100644 --- a/src/mame/edevices/mugsmash.cpp +++ b/src/mame/edevices/mugsmash.cpp @@ -488,11 +488,11 @@ GFXDECODE_END void mugsmash_state::mugsmash(machine_config &config) { - M68000(config, m_maincpu, 12'000'000); + M68000(config, m_maincpu, XTAL::u(12'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &mugsmash_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(mugsmash_state::irq6_line_hold)); - Z80(config, m_audiocpu, 4'000'000); // guess + Z80(config, m_audiocpu, XTAL::u(4'000'000)); // guess m_audiocpu->set_addrmap(AS_PROGRAM, &mugsmash_state::sound_map); @@ -514,12 +514,12 @@ void mugsmash_state::mugsmash(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 3'579'545)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(3'579'545))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 1.00); // music ymsnd.add_route(1, "rspeaker", 1.00); - okim6295_device &oki(OKIM6295(config, "oki", 1'122'000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1'122'000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50); // sound fx oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50); } diff --git a/src/mame/edevices/mwarr.cpp b/src/mame/edevices/mwarr.cpp index 7d46dc1f15c..324493009e7 100644 --- a/src/mame/edevices/mwarr.cpp +++ b/src/mame/edevices/mwarr.cpp @@ -322,7 +322,7 @@ void mwarr_state::mwarr(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_mwarr); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800); - EDEVICES_VID(config, m_video, 0); + EDEVICES_VID(config, m_video); m_video->set_bg_videoram_tag("bg_videoram"); m_video->set_mlow_videoram_tag("mlow_videoram"); m_video->set_mhigh_videoram_tag("mhigh_videoram"); diff --git a/src/mame/edevices/ppmast93.cpp b/src/mame/edevices/ppmast93.cpp index 6ab91cb042b..570a5492e87 100644 --- a/src/mame/edevices/ppmast93.cpp +++ b/src/mame/edevices/ppmast93.cpp @@ -411,7 +411,7 @@ void ppmast93_state::ppmast93(machine_config &config) YM2413(config, "ymsnd", 5_MHz_XTAL / 2).add_route(ALL_OUTPUTS, "speaker", 1.0); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC } ROM_START( ppmast93 ) diff --git a/src/mame/edevices/pzletime.cpp b/src/mame/edevices/pzletime.cpp index 7f1cd4fd7a0..c9ca0c9090f 100644 --- a/src/mame/edevices/pzletime.cpp +++ b/src/mame/edevices/pzletime.cpp @@ -286,7 +286,7 @@ void pzletime_state::machine_reset() void pzletime_state::pzletime(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pzletime_state::pzletime_map); m_maincpu->set_vblank_int("screen", FUNC(pzletime_state::irq4_line_hold)); @@ -308,7 +308,7 @@ void pzletime_state::pzletime(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 937500, okim6295_device::PIN7_HIGH); //freq & pin7 taken from stlforce + OKIM6295(config, m_oki, XTAL::u(937500), okim6295_device::PIN7_HIGH); //freq & pin7 taken from stlforce m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/edevices/stlforce.cpp b/src/mame/edevices/stlforce.cpp index 5859aa7cd6c..376de073d6b 100644 --- a/src/mame/edevices/stlforce.cpp +++ b/src/mame/edevices/stlforce.cpp @@ -282,7 +282,7 @@ void stlforce_state::stlforce(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_stlforce); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800); - edevices_sforce_device &video(EDEVICES_SFORCE_VID(config, "video", 0)); + edevices_sforce_device &video(EDEVICES_SFORCE_VID(config, "video")); video.set_bg_videoram_tag("bg_videoram"); video.set_mlow_videoram_tag("mlow_videoram"); video.set_mhigh_videoram_tag("mhigh_videoram"); diff --git a/src/mame/edevices/twins.cpp b/src/mame/edevices/twins.cpp index 8607f52e978..606f57fd294 100644 --- a/src/mame/edevices/twins.cpp +++ b/src/mame/edevices/twins.cpp @@ -564,7 +564,7 @@ void twins_state::base_config(machine_config &config) void twins_state::video_config(machine_config &config) { SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(8000000, 512, 0, 320, 312, 0, 204); // Common PAL values, HSync of 15.625 kHz unverified + m_screen->set_raw(XTAL::u(8000000), 512, 0, 320, 312, 0, 204); // Common PAL values, HSync of 15.625 kHz unverified m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); } @@ -582,7 +582,7 @@ void twins_state::sound_config(machine_config &config) void twinsed1_state::twinsed1(machine_config &config) { /* basic machine hardware */ - V30(config, m_maincpu, 8000000); + V30(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &twinsed1_state::twins_map); m_maincpu->set_addrmap(AS_IO, &twinsed1_state::twinsed1_io); @@ -606,7 +606,7 @@ void twins_state::twins(machine_config &config) m_screen->set_screen_update(FUNC(twins_state::screen_update_twins)); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &twins_state::ramdac_map); ramdac.set_split_read(0); @@ -618,7 +618,7 @@ void twins_state::twins(machine_config &config) void spider_state::spider(machine_config &config) { /* basic machine hardware */ - V30(config, m_maincpu, 8000000); + V30(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &spider_state::twins_map); m_maincpu->set_addrmap(AS_IO, &spider_state::spider_io); diff --git a/src/mame/efo/cedar_magnet.cpp b/src/mame/efo/cedar_magnet.cpp index 89bd13ffe85..73e2b2497f5 100644 --- a/src/mame/efo/cedar_magnet.cpp +++ b/src/mame/efo/cedar_magnet.cpp @@ -933,7 +933,7 @@ INTERRUPT_GEN_MEMBER(cedar_magnet_state::irq) void cedar_magnet_state::cedar_magnet(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &cedar_magnet_state::cedar_magnet_map); m_maincpu->set_addrmap(AS_IO, &cedar_magnet_state::cedar_magnet_io); m_maincpu->set_vblank_int("screen", FUNC(cedar_magnet_state::irq)); @@ -942,14 +942,14 @@ void cedar_magnet_state::cedar_magnet(machine_config &config) ADDRESS_MAP_BANK(config, "mb_sub_ram").set_map(&cedar_magnet_state::cedar_magnet_mainboard_sub_ram_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000); ADDRESS_MAP_BANK(config, "mb_sub_pal").set_map(&cedar_magnet_state::cedar_magnet_mainboard_sub_pal_map).set_options(ENDIANNESS_LITTLE, 8, 8+6, 0x100); - Z80PIO(config, m_ic48_pio, 4000000/2); + Z80PIO(config, m_ic48_pio, XTAL::u(4000000)/2); // m_ic48_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_ic48_pio->in_pa_callback().set(FUNC(cedar_magnet_state::ic48_pio_pa_r)); m_ic48_pio->out_pa_callback().set(FUNC(cedar_magnet_state::ic48_pio_pa_w)); m_ic48_pio->in_pb_callback().set(FUNC(cedar_magnet_state::ic48_pio_pb_r)); m_ic48_pio->out_pb_callback().set(FUNC(cedar_magnet_state::ic48_pio_pb_w)); - Z80PIO(config, m_ic49_pio, 4000000/2); + Z80PIO(config, m_ic49_pio, XTAL::u(4000000)/2); // m_ic49_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); // m_ic49_pio->in_pa_callback().set(FUNC(cedar_magnet_state::ic49_pio_pa_r)); // NOT USED // m_ic49_pio->out_pa_callback().set(FUNC(cedar_magnet_state::ic49_pio_pa_w)); // NOT USED @@ -967,12 +967,12 @@ void cedar_magnet_state::cedar_magnet(machine_config &config) PALETTE(config, m_palette).set_entries(0x400); - CEDAR_MAGNET_SOUND(config, m_cedsound, 0); - CEDAR_MAGNET_PLANE(config, m_cedplane0, 0); - CEDAR_MAGNET_PLANE(config, m_cedplane1, 0); - CEDAR_MAGNET_SPRITE(config, m_cedsprite, 0); + CEDAR_MAGNET_SOUND(config, m_cedsound); + CEDAR_MAGNET_PLANE(config, m_cedplane0); + CEDAR_MAGNET_PLANE(config, m_cedplane1); + CEDAR_MAGNET_SPRITE(config, m_cedsprite); - CEDAR_MAGNET_FLOP(config, "flop", 0); + CEDAR_MAGNET_FLOP(config, "flop"); config.set_perfect_quantum(m_maincpu); } diff --git a/src/mame/efo/cedar_magnet_flop.cpp b/src/mame/efo/cedar_magnet_flop.cpp index 013233e75de..3160a8bea5e 100644 --- a/src/mame/efo/cedar_magnet_flop.cpp +++ b/src/mame/efo/cedar_magnet_flop.cpp @@ -10,7 +10,7 @@ DEFINE_DEVICE_TYPE(CEDAR_MAGNET_FLOP, cedar_magnet_flop_device, "cedmag_flop", "Cedar Floppy Simulation") -cedar_magnet_flop_device::cedar_magnet_flop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cedar_magnet_flop_device::cedar_magnet_flop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CEDAR_MAGNET_FLOP, tag, owner, clock) , m_disk(*this, "disk") { diff --git a/src/mame/efo/cedar_magnet_flop.h b/src/mame/efo/cedar_magnet_flop.h index fecedcdedd4..c5f0154d3d6 100644 --- a/src/mame/efo/cedar_magnet_flop.h +++ b/src/mame/efo/cedar_magnet_flop.h @@ -14,7 +14,7 @@ class cedar_magnet_flop_device : public device_t { public: // construction/destruction - cedar_magnet_flop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cedar_magnet_flop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 port60_r(); u8 port61_r(); diff --git a/src/mame/efo/cedar_magnet_plane.cpp b/src/mame/efo/cedar_magnet_plane.cpp index 9ecb7a7eea3..0d46450af65 100644 --- a/src/mame/efo/cedar_magnet_plane.cpp +++ b/src/mame/efo/cedar_magnet_plane.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(CEDAR_MAGNET_PLANE, cedar_magnet_plane_device, "cedmag_plane", "Cedar Plane") -cedar_magnet_plane_device::cedar_magnet_plane_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cedar_magnet_plane_device::cedar_magnet_plane_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CEDAR_MAGNET_PLANE, tag, owner, clock) , cedar_magnet_board_interface(mconfig, *this, "planecpu", "ram") { @@ -69,18 +69,18 @@ void cedar_magnet_plane_device::plane_portcf_w(u8 data) void cedar_magnet_plane_device::device_add_mconfig(machine_config &config) { - z80_device &planecpu(Z80(config, "planecpu", 4000000)); + z80_device &planecpu(Z80(config, "planecpu", XTAL::u(4000000))); planecpu.set_addrmap(AS_PROGRAM, &cedar_magnet_plane_device::cedar_magnet_plane_map); planecpu.set_addrmap(AS_IO, &cedar_magnet_plane_device::cedar_magnet_plane_io); - z80pio_device& pio0(Z80PIO(config, "z80pio0", 4000000/2)); + z80pio_device& pio0(Z80PIO(config, "z80pio0", XTAL::u(4000000)/2)); // pio0.out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); pio0.in_pa_callback().set(FUNC(cedar_magnet_plane_device::pio0_pa_r)); pio0.out_pa_callback().set(FUNC(cedar_magnet_plane_device::pio0_pa_w)); // pio0.in_pb_callback().set(FUNC(cedar_magnet_plane_device::pio0_pb_r)); pio0.out_pb_callback().set(FUNC(cedar_magnet_plane_device::pio0_pb_w)); - z80pio_device& pio1(Z80PIO(config, "z80pio1", 4000000/2)); + z80pio_device& pio1(Z80PIO(config, "z80pio1", XTAL::u(4000000)/2)); // pio1.out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); // pio1.in_pa_callback().set(FUNC(cedar_magnet_plane_device::pio1_pa_r)); pio1.out_pa_callback().set(FUNC(cedar_magnet_plane_device::pio1_pa_w)); diff --git a/src/mame/efo/cedar_magnet_plane.h b/src/mame/efo/cedar_magnet_plane.h index 532a9ba628b..54de9145435 100644 --- a/src/mame/efo/cedar_magnet_plane.h +++ b/src/mame/efo/cedar_magnet_plane.h @@ -15,7 +15,7 @@ class cedar_magnet_plane_device : public device_t, public cedar_magnet_board_int { public: // construction/destruction - cedar_magnet_plane_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cedar_magnet_plane_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void plane_portcc_w(u8 data); void plane_portcd_w(u8 data); diff --git a/src/mame/efo/cedar_magnet_sprite.cpp b/src/mame/efo/cedar_magnet_sprite.cpp index 0109d59efe0..09171f9c63a 100644 --- a/src/mame/efo/cedar_magnet_sprite.cpp +++ b/src/mame/efo/cedar_magnet_sprite.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(CEDAR_MAGNET_SPRITE, cedar_magnet_sprite_device, "cedmag_sprite", "Cedar Sprite") -cedar_magnet_sprite_device::cedar_magnet_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cedar_magnet_sprite_device::cedar_magnet_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CEDAR_MAGNET_SPRITE, tag, owner, clock) , cedar_magnet_board_interface(mconfig, *this, "spritecpu", "ram") , m_sprite_ram_bankdev(*this, "sp_sub_ram") @@ -200,25 +200,25 @@ void cedar_magnet_sprite_device::sprite_port9c_w(u8 data) void cedar_magnet_sprite_device::device_add_mconfig(machine_config &config) { - z80_device &spritecpu(Z80(config, "spritecpu", 4000000)); + z80_device &spritecpu(Z80(config, "spritecpu", XTAL::u(4000000))); spritecpu.set_addrmap(AS_PROGRAM, &cedar_magnet_sprite_device::cedar_magnet_sprite_map); spritecpu.set_addrmap(AS_IO, &cedar_magnet_sprite_device::cedar_magnet_sprite_io); - Z80PIO(config, m_pio[0], 4000000/2); + Z80PIO(config, m_pio[0], XTAL::u(4000000)/2); // m_pio[0]->out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); m_pio[0]->in_pa_callback().set(FUNC(cedar_magnet_sprite_device::pio0_pa_r)); m_pio[0]->out_pa_callback().set(FUNC(cedar_magnet_sprite_device::pio0_pa_w)); // m_pio[0]->in_pb_callback().set(FUNC(cedar_magnet_sprite_device::pio0_pb_r)); m_pio[0]->out_pb_callback().set(FUNC(cedar_magnet_sprite_device::pio0_pb_w)); - Z80PIO(config, m_pio[1], 4000000/2); + Z80PIO(config, m_pio[1], XTAL::u(4000000)/2); // m_pio[1]->out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); // m_pio[1]->in_pa_callback().set(FUNC(cedar_magnet_sprite_device::pio1_pa_r)); m_pio[1]->out_pa_callback().set(FUNC(cedar_magnet_sprite_device::pio1_pa_w)); // m_pio[1]->in_pb_callback().set(FUNC(cedar_magnet_sprite_device::pio1_pb_r)); m_pio[1]->out_pb_callback().set(FUNC(cedar_magnet_sprite_device::pio1_pb_w)); - Z80PIO(config, m_pio[2], 4000000/2); + Z80PIO(config, m_pio[2], XTAL::u(4000000)/2); // m_pio[2]->out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); // m_pio[2]->in_pa_callback().set(FUNC(cedar_magnet_sprite_device::pio2_pa_r)); m_pio[2]->out_pa_callback().set(FUNC(cedar_magnet_sprite_device::pio2_pa_w)); diff --git a/src/mame/efo/cedar_magnet_sprite.h b/src/mame/efo/cedar_magnet_sprite.h index feb6c38604d..78c61eca16c 100644 --- a/src/mame/efo/cedar_magnet_sprite.h +++ b/src/mame/efo/cedar_magnet_sprite.h @@ -18,7 +18,7 @@ class cedar_magnet_sprite_device : public device_t, public cedar_magnet_board_in { public: // construction/destruction - cedar_magnet_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cedar_magnet_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sprite_port80_w(u8 data); void sprite_port84_w(u8 data); diff --git a/src/mame/efo/cidelsa.h b/src/mame/efo/cidelsa.h index f9f12d8b557..f081eab8a9b 100644 --- a/src/mame/efo/cidelsa.h +++ b/src/mame/efo/cidelsa.h @@ -20,9 +20,9 @@ #define COP402N_TAG "cop402n" #define AY8910_TAG "ay8910" -#define DESTRYER_CHR1 3579000.0 // unverified +#define DESTRYER_CHR1 XTAL::u(3579000) // unverified #define DESTRYER_CHR2 XTAL(5'714'300) -#define ALTAIR_CHR1 3579000.0 // unverified +#define ALTAIR_CHR1 XTAL::u(3579000) // unverified #define ALTAIR_CHR2 cdp1869_device::DOT_CLK_PAL // unverified #define DRACO_CHR1 XTAL(4'433'610) #define DRACO_CHR2 cdp1869_device::DOT_CLK_PAL // unverified diff --git a/src/mame/elektor/avrmax.cpp b/src/mame/elektor/avrmax.cpp index 5e46abe4920..9c1fb031d58 100644 --- a/src/mame/elektor/avrmax.cpp +++ b/src/mame/elektor/avrmax.cpp @@ -263,7 +263,7 @@ void avrmax_state::avrmax(machine_config &config) base(config); // basic machine hardware - m_maincpu->set_clock(8000000); // internal R/C clock + m_maincpu->set_clock(XTAL::u(8000000)); // internal R/C clock m_maincpu->gpio_out().set(FUNC(avrmax_state::digit_w)); m_maincpu->gpio_out().set(FUNC(avrmax_state::segment_w)); @@ -287,7 +287,7 @@ void avrmax_state::atm18mcc(machine_config &config) screen.set_visarea_full(); screen.set_screen_update(FUNC(avrmax_state::screen_update)); - HD44780(config, m_lcd, 0); + HD44780(config, m_lcd); config.set_default_layout(layout_atm18mcc); } diff --git a/src/mame/elektor/ec65.cpp b/src/mame/elektor/ec65.cpp index 0251c04bbb1..6ead13d0247 100644 --- a/src/mame/elektor/ec65.cpp +++ b/src/mame/elektor/ec65.cpp @@ -231,17 +231,17 @@ void ec65_state::ec65(machine_config &config) crtc.set_update_row_callback(FUNC(ec65_state::crtc_update_row)); /* devices */ - ACIA6850(config, "fdc", 0); // used as a FDC on separate card - PIA6821(config, "pia", 0); // assists 6850 + ACIA6850(config, "fdc"); // used as a FDC on separate card + PIA6821(config, "pia"); // assists 6850 MOS6522(config, m_via0, XTAL(4'000'000) / 4); MOS6522(config, m_via1, XTAL(4'000'000) / 4); - mos6551_device &uart(MOS6551(config, "uart", 0)); + mos6551_device &uart(MOS6551(config, "uart")); uart.set_xtal(XTAL(1'843'200)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(ec65_state::kbd_put)); } @@ -269,19 +269,19 @@ void ec65k_state::ec65k(machine_config &config) crtc.set_update_row_callback(FUNC(ec65k_state::crtc_update_row)); /* devices */ - ACIA6850(config, "fdc", 0); // used as a FDC on separate card - PIA6821(config, "pia", 0); // assists 6850 + ACIA6850(config, "fdc"); // used as a FDC on separate card + PIA6821(config, "pia"); // assists 6850 MC146818(config, m_rtc, 32.768_kHz_XTAL); //m_rtc->irq().set(FUNC(micronic_state::mc146818_irq)); Connects to common irq line used by below PIAs and UART - PIA6821(config, m_pia0, 0); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia0); + PIA6821(config, m_pia1); - mos6551_device &uart(MOS6551(config, "uart", 0)); + mos6551_device &uart(MOS6551(config, "uart")); uart.set_xtal(XTAL(1'843'200)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(ec65k_state::kbd_put)); } diff --git a/src/mame/emusys/emax.cpp b/src/mame/emusys/emax.cpp index 24181200f9f..9286a9c2e2b 100644 --- a/src/mame/emusys/emax.cpp +++ b/src/mame/emusys/emax.cpp @@ -245,7 +245,7 @@ void emax_state::emax2(machine_config &config) PIT8254(config, m_ctc); - WD1772(config, m_fdc, 8'000'000); + WD1772(config, m_fdc, XTAL::u(8'000'000)); ACIA6850(config, "acia1"); ACIA6850(config, "acia2"); diff --git a/src/mame/emusys/emu3.cpp b/src/mame/emusys/emu3.cpp index 5bc87d93251..081e0c541be 100644 --- a/src/mame/emusys/emu3.cpp +++ b/src/mame/emusys/emu3.cpp @@ -249,7 +249,7 @@ void emu3_state::emu3(machine_config &config) SCC85230(config, m_scc, 16_MHz_XTAL / 4); m_scc->out_int_callback().set(*this, FUNC(emu3_state::irq_w)).invert(); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(4, 20); PALETTE(config, "palette", FUNC(emu3_state::palette_init), 2); diff --git a/src/mame/emusys/emu68k.cpp b/src/mame/emusys/emu68k.cpp index 8a4eb6367f0..12dac273284 100644 --- a/src/mame/emusys/emu68k.cpp +++ b/src/mame/emusys/emu68k.cpp @@ -139,18 +139,18 @@ void emu68k_state::add_lcd(machine_config &config) PALETTE(config, "palette", FUNC(emu68k_state::palette_init), 2); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(HD44780(config, "lcdc")); lcdc.set_lcd_size(2, 16); lcdc.set_pixel_update_cb(FUNC(emu68k_state::lcd_pixel_update)); } void emu68k_state::proteus1(machine_config &config) { - M68000(config, m_maincpu, 10'000'000); + M68000(config, m_maincpu, XTAL::u(10'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &emu68k_state::proteus1_map); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &emu68k_state::fc7_map); - MC68901(config, m_mfp, 10'000'000); // FIXME: not the right type at all + MC68901(config, m_mfp, XTAL::u(10'000'000)); // FIXME: not the right type at all m_mfp->set_timer_clock(2'500'000); m_mfp->out_irq_cb().set_inputline(m_maincpu, M68K_IRQ_1); // TODO: verify level diff --git a/src/mame/ensoniq/enmirage.cpp b/src/mame/ensoniq/enmirage.cpp index 5684c66d0fe..d55df4c052b 100644 --- a/src/mame/ensoniq/enmirage.cpp +++ b/src/mame/ensoniq/enmirage.cpp @@ -337,7 +337,7 @@ void enmirage_state::enmirage_es5503_map(address_map &map) void enmirage_state::mirage(machine_config &config) { - MC6809E(config, m_maincpu, 2000000); + MC6809E(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &enmirage_state::mirage_map); INPUT_MERGER_ANY_HIGH(config, m_irq_merge).output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); @@ -352,14 +352,14 @@ void enmirage_state::mirage(machine_config &config) m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cassette->add_route(ALL_OUTPUTS, "speaker", 1.0); - es5503_device &es5503(ES5503(config, "es5503", 8000000)); + es5503_device &es5503(ES5503(config, "es5503", XTAL::u(8000000))); es5503.set_channels(8); es5503.set_addrmap(0, &enmirage_state::enmirage_es5503_map); es5503.irq_func().set(m_irq_merge, FUNC(input_merger_device::in_w<2>)); es5503.adc_func().set(FUNC(enmirage_state::mirage_adc_read)); es5503.add_route(ALL_OUTPUTS, "speaker", 1.0); - MOS6522(config, m_via, 3000000); + MOS6522(config, m_via, XTAL::u(3000000)); m_via->writepa_handler().set(FUNC(enmirage_state::mirage_via_write_porta)); m_via->readpb_handler().set(FUNC(enmirage_state::mirage_via_read_portb)); m_via->writepb_handler().set(FUNC(enmirage_state::mirage_via_write_portb)); @@ -373,7 +373,7 @@ void enmirage_state::mirage(machine_config &config) MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd)); MIDI_PORT(config, "mdout", midiout_slot, "midiout"); - WD1772(config, m_fdc, 8000000); + WD1772(config, m_fdc, XTAL::u(8000000)); m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); m_fdc->drq_wr_callback().set(m_irq_merge, FUNC(input_merger_device::in_w<1>)); diff --git a/src/mame/ensoniq/esq1.cpp b/src/mame/ensoniq/esq1.cpp index b39b7c2d67a..3880a24f8fc 100644 --- a/src/mame/ensoniq/esq1.cpp +++ b/src/mame/ensoniq/esq1.cpp @@ -198,7 +198,7 @@ class esq1_filters : public device_t, { public: // construction/destruction - esq1_filters(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + esq1_filters(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_vca(int channel, uint8_t value); void set_vpan(int channel, uint8_t value); @@ -229,7 +229,7 @@ private: DEFINE_DEVICE_TYPE(ESQ1_FILTERS, esq1_filters, "esq1_filters", "ESQ1 Filters stage") -esq1_filters::esq1_filters(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +esq1_filters::esq1_filters(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ESQ1_FILTERS, tag, owner, clock) , device_sound_interface(mconfig, *this) { @@ -334,7 +334,7 @@ void esq1_filters::recalc_filter(filter &f) void esq1_filters::device_start() { - stream = stream_alloc(8, 2, 44100); + stream = stream_alloc(8, 2, XTAL::u(44100)); memset(filters, 0, sizeof(filters)); for(auto & elem : filters) recalc_filter(elem); diff --git a/src/mame/ensoniq/esq5505.cpp b/src/mame/ensoniq/esq5505.cpp index 519ea695126..782b2e1138c 100644 --- a/src/mame/ensoniq/esq5505.cpp +++ b/src/mame/ensoniq/esq5505.cpp @@ -469,7 +469,7 @@ WRITE_LINE_MEMBER(esq5505_state::esq5505_otis_irq) void esq5505_state::es5505_clock_changed(u32 data) { - m_pump->set_unscaled_clock(data); + m_pump->set_unscaled_clock(XTAL::u(data)); } void esq5505_state::analog_w(offs_t offset, uint16_t data) @@ -645,12 +645,12 @@ void esq5505_state::vfx(machine_config &config) m_panel->write_tx().set(m_duart, FUNC(mc68681_device::rx_b_w)); m_panel->write_analog().set(FUNC(esq5505_state::analog_w)); - MC68681(config, m_duart, 4000000); + MC68681(config, m_duart, XTAL::u(4000000)); m_duart->irq_cb().set(FUNC(esq5505_state::duart_irq_handler)); m_duart->a_tx_cb().set(FUNC(esq5505_state::duart_tx_a)); m_duart->b_tx_cb().set(FUNC(esq5505_state::duart_tx_b)); m_duart->outport_cb().set(FUNC(esq5505_state::duart_output)); - m_duart->set_clocks(500000, 500000, 1000000, 1000000); + m_duart->set_clocks(XTAL::u(500000), XTAL::u(500000), XTAL::u(1000000), XTAL::u(1000000)); auto &mdin(MIDI_PORT(config, "mdin")); midiin_slot(mdin); @@ -715,7 +715,7 @@ void esq5505_state::vfxsd(machine_config &config) vfx(config); m_maincpu->set_addrmap(AS_PROGRAM, &esq5505_state::vfxsd_map); - WD1772(config, m_fdc, 8000000); + WD1772(config, m_fdc, XTAL::u(8000000)); FLOPPY_CONNECTOR(config, m_floppy_connector); m_floppy_connector->option_add("35dd", FLOPPY_35_DD); m_floppy_connector->set_default_option("35dd"); @@ -736,12 +736,12 @@ void esq5505_state::vfx32(machine_config &config) m_panel->write_tx().set(m_duart, FUNC(mc68681_device::rx_b_w)); m_panel->write_analog().set(FUNC(esq5505_state::analog_w)); - MC68681(config, m_duart, 4000000); + MC68681(config, m_duart, XTAL::u(4000000)); m_duart->irq_cb().set(FUNC(esq5505_state::duart_irq_handler)); m_duart->a_tx_cb().set(FUNC(esq5505_state::duart_tx_a)); m_duart->b_tx_cb().set(FUNC(esq5505_state::duart_tx_b)); m_duart->outport_cb().set(FUNC(esq5505_state::duart_output)); - m_duart->set_clocks(500000, 500000, 1000000, 1000000); + m_duart->set_clocks(XTAL::u(500000), XTAL::u(500000), XTAL::u(1000000), XTAL::u(1000000)); auto &mdin(MIDI_PORT(config, "mdin")); midiin_slot(mdin); @@ -773,7 +773,7 @@ void esq5505_state::vfx32(machine_config &config) es5505.add_route(6, "pump", 1.0, 6); es5505.add_route(7, "pump", 1.0, 7); - WD1772(config, m_fdc, 8000000); + WD1772(config, m_fdc, XTAL::u(8000000)); FLOPPY_CONNECTOR(config, m_floppy_connector, "35dd", FLOPPY_35_DD, true, floppy_formats); } diff --git a/src/mame/ensoniq/esqasr.cpp b/src/mame/ensoniq/esqasr.cpp index ed947762c72..81306e15ea0 100644 --- a/src/mame/ensoniq/esqasr.cpp +++ b/src/mame/ensoniq/esqasr.cpp @@ -115,7 +115,7 @@ u16 esqasr_state::esq5506_read_adc() void esqasr_state::es5506_clock_changed(u32 data) { - m_pump->set_unscaled_clock(data); + m_pump->set_unscaled_clock(XTAL::u(data)); } void esqasr_state::asr(machine_config &config) @@ -126,7 +126,7 @@ void esqasr_state::asr(machine_config &config) ES5510(config, m_esp, XTAL(10'000'000)); m_esp->set_disable(); - ESQ2X40_SQ1(config, m_sq1vfd, 60); + ESQ2X40_SQ1(config, m_sq1vfd, XTAL::u(60)); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -163,7 +163,7 @@ void esqasr_state::asrx(machine_config &config) ES5510(config, m_esp, XTAL(10'000'000)); // Actually ES5511 m_esp->set_disable(); - ESQ2X40_SQ1(config, m_sq1vfd, 60); + ESQ2X40_SQ1(config, m_sq1vfd, XTAL::u(60)); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/ensoniq/esqkt.cpp b/src/mame/ensoniq/esqkt.cpp index b1806799506..cd733380af5 100644 --- a/src/mame/ensoniq/esqkt.cpp +++ b/src/mame/ensoniq/esqkt.cpp @@ -224,7 +224,7 @@ u16 esqkt_state::esq5506_read_adc() void esqkt_state::es5506_clock_changed(u32 data) { - m_pump->set_unscaled_clock(data); + m_pump->set_unscaled_clock(XTAL::u(data)); } WRITE_LINE_MEMBER(esqkt_state::duart_irq_handler) @@ -260,12 +260,12 @@ void esqkt_state::kt(machine_config &config) auto &panel(ESQPANEL2X16_SQ1(config, "sq1panel")); panel.write_tx().set(m_duart, FUNC(scn2681_device::rx_b_w)); - SCN2681(config, m_duart, 4000000); + SCN2681(config, m_duart, XTAL::u(4000000)); m_duart->irq_cb().set(FUNC(esqkt_state::duart_irq_handler)); m_duart->a_tx_cb().set(FUNC(esqkt_state::duart_tx_a)); m_duart->b_tx_cb().set(FUNC(esqkt_state::duart_tx_b)); m_duart->outport_cb().set(FUNC(esqkt_state::duart_output)); - m_duart->set_clocks(500000, 500000, 1000000, 1000000); + m_duart->set_clocks(XTAL::u(500000), XTAL::u(500000), XTAL::u(1000000), XTAL::u(1000000)); auto &mdin(MIDI_PORT(config, "mdin")); midiin_slot(mdin); @@ -325,12 +325,12 @@ void esqkt_state::ts(machine_config &config) auto &panel(ESQPANEL2X40_VFX(config, "sq1panel")); panel.write_tx().set(m_duart, FUNC(scn2681_device::rx_b_w)); - SCN2681(config, m_duart, 4000000); + SCN2681(config, m_duart, XTAL::u(4000000)); m_duart->irq_cb().set(FUNC(esqkt_state::duart_irq_handler)); m_duart->a_tx_cb().set(FUNC(esqkt_state::duart_tx_a)); m_duart->b_tx_cb().set(FUNC(esqkt_state::duart_tx_b)); m_duart->outport_cb().set(FUNC(esqkt_state::duart_output)); - m_duart->set_clocks(500000, 500000, 1000000, 1000000); + m_duart->set_clocks(XTAL::u(500000), XTAL::u(500000), XTAL::u(1000000), XTAL::u(1000000)); auto &mdin(MIDI_PORT(config, "mdin")); midiin_slot(mdin); diff --git a/src/mame/ensoniq/esqlcd.cpp b/src/mame/ensoniq/esqlcd.cpp index a9348a5bde2..a224a91fb17 100644 --- a/src/mame/ensoniq/esqlcd.cpp +++ b/src/mame/ensoniq/esqlcd.cpp @@ -304,7 +304,7 @@ void esq2x16_sq1_device::write_char(int data) } } //-------------------------------------------------------------------------------------------------------------------------------------------- -esq2x16_sq1_device::esq2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esq2x16_sq1_device::esq2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqvfd_device(mconfig, ESQ2X16_SQ1, tag, owner, clock, make_dimensions<2, 16>(*this)), m_lcdPix(*this, "pg_%u%03u", 1U, 0U), m_leds(*this, "rLed_%u", 0U) diff --git a/src/mame/ensoniq/esqlcd.h b/src/mame/ensoniq/esqlcd.h index 47affeed641..16e87360600 100644 --- a/src/mame/ensoniq/esqlcd.h +++ b/src/mame/ensoniq/esqlcd.h @@ -12,7 +12,7 @@ class esq2x16_sq1_device : public esqvfd_device { public: - esq2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + esq2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_char(int data) override; virtual void update_display() override; diff --git a/src/mame/ensoniq/esqmr.cpp b/src/mame/ensoniq/esqmr.cpp index fed626afe5d..d776f11528d 100644 --- a/src/mame/ensoniq/esqmr.cpp +++ b/src/mame/ensoniq/esqmr.cpp @@ -277,11 +277,11 @@ void esqmr_state::mr(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &esqmr_state::mr_map); mc68340_serial_module_device &duart(*m_maincpu->subdevice("serial")); - duart.set_clocks(500000, 500000, 1000000, 1000000); + duart.set_clocks(XTAL::u(500000), XTAL::u(500000), XTAL::u(1000000), XTAL::u(1000000)); duart.a_tx_cb().set(FUNC(esqmr_state::duart_tx_a)); duart.b_tx_cb().set(FUNC(esqmr_state::duart_tx_b)); - M68HC705C4A(config, "mcu", 4'000'000); + M68HC705C4A(config, "mcu", XTAL::u(4'000'000)); //IDT7130(config, "dpram"); // present in PCB, but unknown purpose (mcu communication?) diff --git a/src/mame/ensoniq/esqpanel.cpp b/src/mame/ensoniq/esqpanel.cpp index ba33ee64e2f..d77d1ef636e 100644 --- a/src/mame/ensoniq/esqpanel.cpp +++ b/src/mame/ensoniq/esqpanel.cpp @@ -408,7 +408,7 @@ DEFINE_DEVICE_TYPE(ESQPANEL2X16_SQ1, esqpanel2x16_sq1_device, "esqpanel216_sq1", // esqpanel_device - constructor //------------------------------------------------- -esqpanel_device::esqpanel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +esqpanel_device::esqpanel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_serial_interface(mconfig, *this), m_light_states(0x3f), // maximum number of lights @@ -453,8 +453,8 @@ void esqpanel_device::device_reset() { // panel comms is at 62500 baud (double the MIDI rate), 8N2 set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); - set_rcv_rate(62500); - set_tra_rate(62500); + set_rcv_rate(XTAL::u(62500)); + set_tra_rate(XTAL::u(62500)); m_tx_busy = false; m_xmit_read = m_xmit_write = 0; @@ -650,11 +650,11 @@ void esqpanel_device::set_analog_value(offs_t offset, uint16_t value) void esqpanel1x22_device::device_add_mconfig(machine_config &config) { - ESQ1X22(config, m_vfd, 60); + ESQ1X22(config, m_vfd, XTAL::u(60)); } -esqpanel1x22_device::esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esqpanel1x22_device::esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqpanel_device(mconfig, ESQPANEL1X22, tag, owner, clock), m_vfd(*this, "vfd") { @@ -665,11 +665,11 @@ esqpanel1x22_device::esqpanel1x22_device(const machine_config &mconfig, const ch void esqpanel2x40_device::device_add_mconfig(machine_config &config) { - ESQ2X40(config, m_vfd, 60); + ESQ2X40(config, m_vfd, XTAL::u(60)); } -esqpanel2x40_device::esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esqpanel2x40_device::esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqpanel_device(mconfig, ESQPANEL2X40, tag, owner, clock), m_vfd(*this, "vfd") { @@ -680,10 +680,10 @@ esqpanel2x40_device::esqpanel2x40_device(const machine_config &mconfig, const ch void esqpanel2x40_vfx_device::device_add_mconfig(machine_config &config) { - ESQ2X40(config, m_vfd, 60); + ESQ2X40(config, m_vfd, XTAL::u(60)); } -esqpanel2x40_vfx_device::esqpanel2x40_vfx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esqpanel2x40_vfx_device::esqpanel2x40_vfx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqpanel_device(mconfig, ESQPANEL2X40_VFX, tag, owner, clock), m_vfd(*this, "vfd") { @@ -706,11 +706,11 @@ bool esqpanel2x40_vfx_device::write_contents(std::ostream &o) // --- SQ1 - Parduz -------------------------------------------------------------------------------------------------------------------------- void esqpanel2x16_sq1_device::device_add_mconfig(machine_config &config) { - ESQ2X16_SQ1(config, m_vfd, 60); + ESQ2X16_SQ1(config, m_vfd, XTAL::u(60)); } // --- SQ1 - Parduz -------------------------------------------------------------------------------------------------------------------------- -esqpanel2x16_sq1_device::esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esqpanel2x16_sq1_device::esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqpanel_device(mconfig, ESQPANEL2X16_SQ1, tag, owner, clock), m_vfd(*this, "vfd") { diff --git a/src/mame/ensoniq/esqpanel.h b/src/mame/ensoniq/esqpanel.h index 58c2398ad36..53505b32d63 100644 --- a/src/mame/ensoniq/esqpanel.h +++ b/src/mame/ensoniq/esqpanel.h @@ -34,7 +34,7 @@ public: protected: // construction/destruction - esqpanel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + esqpanel_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -77,7 +77,7 @@ private: class esqpanel1x22_device : public esqpanel_device { public: - esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + esqpanel1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -89,7 +89,7 @@ protected: class esqpanel2x40_device : public esqpanel_device { public: - esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + esqpanel2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -101,7 +101,7 @@ protected: class esqpanel2x40_vfx_device : public esqpanel_device { public: - esqpanel2x40_vfx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + esqpanel2x40_vfx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -117,7 +117,7 @@ protected: class esqpanel2x40_sq1_device : public esqpanel_device { public: - esqpanel2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + esqpanel2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -130,7 +130,7 @@ protected: // --- SQ1 - Parduz -------------------------------------------------------------------------------------------------------------------------- class esqpanel2x16_sq1_device : public esqpanel_device { public: - esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + esqpanel2x16_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/ensoniq/esqvfd.cpp b/src/mame/ensoniq/esqvfd.cpp index 68b913f9c22..248e40951ba 100644 --- a/src/mame/ensoniq/esqvfd.cpp +++ b/src/mame/ensoniq/esqvfd.cpp @@ -116,7 +116,7 @@ static const uint16_t font[]= 0x0000, // 0000 0000 0000 0000 (DEL) }; -esqvfd_device::esqvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dimensions_param &&dimensions) : +esqvfd_device::esqvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dimensions_param &&dimensions) : device_t(mconfig, type, tag, owner, clock), m_vfds(std::move(std::get<0>(dimensions))), m_rows(std::get<1>(dimensions)), @@ -292,7 +292,7 @@ bool esq2x40_device::write_contents(std::ostream &o) } -esq2x40_device::esq2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esq2x40_device::esq2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqvfd_device(mconfig, ESQ2X40, tag, owner, clock, make_dimensions<2, 40>(*this)) { } @@ -341,7 +341,7 @@ void esq1x22_device::write_char(int data) update_display(); } -esq1x22_device::esq1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esq1x22_device::esq1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqvfd_device(mconfig, ESQ1X22, tag, owner, clock, make_dimensions<1, 22>(*this)) { } @@ -404,7 +404,7 @@ void esq2x40_sq1_device::write_char(int data) } } -esq2x40_sq1_device::esq2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +esq2x40_sq1_device::esq2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : esqvfd_device(mconfig, ESQ2X40_SQ1, tag, owner, clock, make_dimensions<2, 40>(*this)) { m_wait87shift = false; diff --git a/src/mame/ensoniq/esqvfd.h b/src/mame/ensoniq/esqvfd.h index ec6c7772173..80dd8be6af0 100644 --- a/src/mame/ensoniq/esqvfd.h +++ b/src/mame/ensoniq/esqvfd.h @@ -38,7 +38,7 @@ protected: template static dimensions_param make_dimensions(device_t &device) { return dimensions_param(std::make_unique >(device), R, C); } - esqvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dimensions_param &&dimensions); + esqvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dimensions_param &&dimensions); static constexpr uint8_t AT_NORMAL = 0x00; static constexpr uint8_t AT_BOLD = 0x01; @@ -62,7 +62,7 @@ protected: class esq1x22_device : public esqvfd_device { public: - esq1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + esq1x22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_char(int data) override; @@ -74,7 +74,7 @@ private: class esq2x40_device : public esqvfd_device { public: - esq2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + esq2x40_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_char(int data) override; virtual bool write_contents(std::ostream &o) override; @@ -85,7 +85,7 @@ protected: class esq2x40_sq1_device : public esqvfd_device { public: - esq2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + esq2x40_sq1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void write_char(int data) override; diff --git a/src/mame/enterprise/nick.cpp b/src/mame/enterprise/nick.cpp index 905d6195ade..c098a84b895 100644 --- a/src/mame/enterprise/nick.cpp +++ b/src/mame/enterprise/nick.cpp @@ -105,7 +105,7 @@ void nick_device::nick_map(address_map &map) // nick_device - constructor //------------------------------------------------- -nick_device::nick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nick_device::nick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NICK, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/mame/enterprise/nick.h b/src/mame/enterprise/nick.h index 9420142c37e..0333dca63fd 100644 --- a/src/mame/enterprise/nick.h +++ b/src/mame/enterprise/nick.h @@ -59,13 +59,13 @@ class nick_device : public device_t, public: // construction/destruction template - nick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + nick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : nick_device(mconfig, tag, owner, clock) { set_screen(std::forward(screen_tag)); } - nick_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nick_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto virq_wr_callback() { return m_write_virq.bind(); } diff --git a/src/mame/entex/advision.cpp b/src/mame/entex/advision.cpp index 321868cbe61..9b7d51e82ad 100644 --- a/src/mame/entex/advision.cpp +++ b/src/mame/entex/advision.cpp @@ -422,7 +422,7 @@ void advision_state::advision(machine_config &config) m_maincpu->p2_out_cb().set(FUNC(advision_state::av_control_w)); m_maincpu->t1_in_cb().set(FUNC(advision_state::vsync_r)); - COP411(config, m_soundcpu, 200000); // COP411L-KCN/N, R11=82k, C8=56pF + COP411(config, m_soundcpu, XTAL::u(200000)); // COP411L-KCN/N, R11=82k, C8=56pF m_soundcpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_RAM_POWER_SUPPLY, false); m_soundcpu->read_l().set(FUNC(advision_state::sound_cmd_r)); m_soundcpu->write_g().set(FUNC(advision_state::sound_g_w)); diff --git a/src/mame/entex/sag.cpp b/src/mame/entex/sag.cpp index 494252a5c3c..ec99ca37158 100644 --- a/src/mame/entex/sag.cpp +++ b/src/mame/entex/sag.cpp @@ -119,7 +119,7 @@ DEVICE_IMAGE_LOAD_MEMBER(sag_state::cart_load) } memcpy(memregion("tms1k_cpu")->base(), m_cart->get_rom_base(), size); - m_tms1k_cpu->set_clock(375000); // approximation - RC osc. R=47K, C=47pF + m_tms1k_cpu->set_clock(XTAL::u(375000)); // approximation - RC osc. R=47K, C=47pF // init PLAs size = image.get_software_region_length("rom:mpla"); @@ -151,7 +151,7 @@ DEVICE_IMAGE_LOAD_MEMBER(sag_state::cart_load) if (size == 0x1100) memmove(dest + 0x1e80, dest + 0x1000, 0x100); - m_hmcs40_cpu->set_clock(450000); // from main PCB + m_hmcs40_cpu->set_clock(XTAL::u(450000)); // from main PCB } return image_init_result::PASS; @@ -304,7 +304,7 @@ INPUT_PORTS_END void sag_state::sag(machine_config &config) { /* basic machine hardware */ - HD38800(config, m_hmcs40_cpu, 0); + HD38800(config, m_hmcs40_cpu); m_hmcs40_cpu->write_r<0>().set(FUNC(sag_state::hmcs40_write_r)); m_hmcs40_cpu->write_r<1>().set(FUNC(sag_state::hmcs40_write_r)); m_hmcs40_cpu->write_r<2>().set(FUNC(sag_state::hmcs40_write_r)); @@ -312,7 +312,7 @@ void sag_state::sag(machine_config &config) m_hmcs40_cpu->write_d().set(FUNC(sag_state::hmcs40_write_d)); m_hmcs40_cpu->read_d().set(FUNC(sag_state::hmcs40_read_d)); - TMS1670(config, m_tms1k_cpu, 0); + TMS1670(config, m_tms1k_cpu); m_tms1k_cpu->read_k().set(FUNC(sag_state::tms1k_read_k)); m_tms1k_cpu->write_r().set(FUNC(sag_state::tms1k_write_r)); m_tms1k_cpu->write_o().set(FUNC(sag_state::tms1k_write_o)); diff --git a/src/mame/eolith/eolith.cpp b/src/mame/eolith/eolith.cpp index 6723f890ff1..59541adffd9 100644 --- a/src/mame/eolith/eolith.cpp +++ b/src/mame/eolith/eolith.cpp @@ -540,7 +540,7 @@ INPUT_PORTS_END void eolith_state::eolith45(machine_config &config) { - E132N(config, m_maincpu, 45000000); /* 45 MHz */ + E132N(config, m_maincpu, XTAL::u(45000000)); /* 45 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &eolith_state::eolith_map); TIMER(config, "scantimer").configure_scanline(FUNC(eolith_state::eolith_speedup), "screen", 0, 1); @@ -589,13 +589,13 @@ void eolith_state::eolith45(machine_config &config) void eolith_state::eolith50(machine_config &config) { eolith45(config); - m_maincpu->set_clock(50000000); /* 50 MHz */ + m_maincpu->set_clock(XTAL::u(50000000)); /* 50 MHz */ } void eolith_state::ironfort(machine_config &config) { eolith45(config); - m_maincpu->set_clock(44900000); /* Normally 45MHz??? but PCB actually had a 44.9MHz OSC, so it's value is used */ + m_maincpu->set_clock(XTAL::u(44900000)); /* Normally 45MHz??? but PCB actually had a 44.9MHz OSC, so it's value is used */ } void eolith_state::hidctch3(machine_config &config) diff --git a/src/mame/eolith/ghosteo.cpp b/src/mame/eolith/ghosteo.cpp index 4875b160fc0..c9abfd94e0c 100644 --- a/src/mame/eolith/ghosteo.cpp +++ b/src/mame/eolith/ghosteo.cpp @@ -615,7 +615,7 @@ void ghosteo_state::machine_reset() void ghosteo_state::ghosteo(machine_config &config) { /* basic machine hardware */ - ARM9(config, m_maincpu, 200000000); + ARM9(config, m_maincpu, XTAL::u(200000000)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -626,7 +626,7 @@ void ghosteo_state::ghosteo(machine_config &config) PALETTE(config, "palette").set_entries(256); - S3C2410(config, m_s3c2410, 12000000); + S3C2410(config, m_s3c2410, XTAL::u(12000000)); m_s3c2410->set_palette_tag("palette"); m_s3c2410->set_screen_tag("screen"); m_s3c2410->core_pin_r_callback().set(FUNC(ghosteo_state::s3c2410_core_pin_r)); @@ -640,11 +640,11 @@ void ghosteo_state::ghosteo(machine_config &config) m_s3c2410->nand_data_r_callback().set(FUNC(ghosteo_state::s3c2410_nand_data_r)); m_s3c2410->nand_data_w_callback().set(FUNC(ghosteo_state::s3c2410_nand_data_w)); -// nand_device &nand(NAND(config, "nand", 0)); +// nand_device &nand(NAND(config, "nand")); // nand.set_nand_type(nand_device::chip::K9F5608U0D); // or another variant with ID 0xEC 0x75 ? // nand.rnb_wr_callback().set(m_s3c2410, FUNC(s3c2410_device::s3c24xx_pin_frnb_w)); - I2C_24C16(config, "i2cmem", 0); // M24CL16-S + I2C_24C16(config, "i2cmem"); // M24CL16-S /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/eolith/vegaeo.cpp b/src/mame/eolith/vegaeo.cpp index c644b62f369..12998c8a555 100644 --- a/src/mame/eolith/vegaeo.cpp +++ b/src/mame/eolith/vegaeo.cpp @@ -181,7 +181,7 @@ void vegaeo_state::vega(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &vegaeo_state::vega_map); TIMER(config, "scantimer").configure_scanline(FUNC(vegaeo_state::eolith_speedup), "screen", 0, 1); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/epoch/scv.cpp b/src/mame/epoch/scv.cpp index 6e6a25c7f24..19c88d1c786 100644 --- a/src/mame/epoch/scv.cpp +++ b/src/mame/epoch/scv.cpp @@ -663,7 +663,7 @@ void scv_state::scv_pal(machine_config &config) { scv(config); - m_maincpu->set_clock(3780000); + m_maincpu->set_clock(XTAL::u(3780000)); // Video chip is EPOCH TV-1A m_screen->set_raw(13.4_MHz_XTAL/2, 456, 24, 24+192, 342, 23, 23+222); // TODO: Verify diff --git a/src/mame/epson/px4.cpp b/src/mame/epson/px4.cpp index a687561333a..a0442aac951 100644 --- a/src/mame/epson/px4.cpp +++ b/src/mame/epson/px4.cpp @@ -395,8 +395,8 @@ void px4_state::ctrl1_w(uint8_t data) if (VERBOSE) logerror("rcv baud = %d, tra baud = %d\n", rcv_rates[baud], tra_rates[baud]); - set_rcv_rate(rcv_rates[baud]); - set_tra_rate(tra_rates[baud]); + set_rcv_rate(XTAL::u(rcv_rates[baud])); + set_tra_rate(XTAL::u(tra_rates[baud])); } m_ctrl1 = data; diff --git a/src/mame/epson/px8.cpp b/src/mame/epson/px8.cpp index 4da56549a01..751765eee44 100644 --- a/src/mame/epson/px8.cpp +++ b/src/mame/epson/px8.cpp @@ -755,7 +755,7 @@ void px8_state::px8(machine_config &config) slave.set_disable(); /* sub CPU (uPD7508) */ -// upd7508_device &sub(UPD7508(config, UPD7508_TAG, 200000)); /* 200 kHz */ +// upd7508_device &sub(UPD7508(config, UPD7508_TAG, XTAL::u(200000))); /* 200 kHz */ // sub.set_addrmap(AS_IO, &px8_state::px8_sub_io); // sub.set_disable(); diff --git a/src/mame/epson/qx10.cpp b/src/mame/epson/qx10.cpp index 95b5095182c..9a6c3bacef8 100644 --- a/src/mame/epson/qx10.cpp +++ b/src/mame/epson/qx10.cpp @@ -59,7 +59,7 @@ #include "imagedev/snapquik.h" -#define MAIN_CLK 15974400 +#define MAIN_CLK XTAL::u(15974400) #define RS232_TAG "rs232" @@ -922,7 +922,7 @@ void qx10_state::qx10(machine_config &config) 1 Keyboard clock (1200bps) +5V 8259A (10E) IR5 Software timer 2 Clock 1,9668MHz Memory register D7 8259 (12E) IR1 Software timer */ - PIT8253(config, m_pit_1, 0); + PIT8253(config, m_pit_1); m_pit_1->set_clk<0>(1200); m_pit_1->out_handler<0>().set(FUNC(qx10_state::speaker_duration)); m_pit_1->set_clk<1>(1200); @@ -937,7 +937,7 @@ void qx10_state::qx10(machine_config &config) 1 Clock 1,9668MHz +5V Keyboard clock 1200bps (Clock / 1664) 2 Clock 1,9668MHz +5V RS-232C baud rate 9600bps (Clock / 208) */ - PIT8253(config, m_pit_2, 0); + PIT8253(config, m_pit_2); m_pit_2->set_clk<0>(MAIN_CLK / 8); m_pit_2->out_handler<0>().set(FUNC(qx10_state::speaker_freq)); m_pit_2->set_clk<1>(MAIN_CLK / 8); @@ -945,12 +945,12 @@ void qx10_state::qx10(machine_config &config) m_pit_2->set_clk<2>(MAIN_CLK / 8); m_pit_2->out_handler<2>().set(m_scc, FUNC(upd7201_device::rxtxcb_w)); - PIC8259(config, m_pic_m, 0); + PIC8259(config, m_pic_m); m_pic_m->out_int_callback().set_inputline(m_maincpu, 0); m_pic_m->in_sp_callback().set_constant(1); m_pic_m->read_slave_ack_callback().set(FUNC(qx10_state::get_slave_ack)); - PIC8259(config, m_pic_s, 0); + PIC8259(config, m_pic_s); m_pic_s->out_int_callback().set(m_pic_m, FUNC(pic8259_device::ir7_w)); m_pic_s->in_sp_callback().set_constant(0); @@ -977,7 +977,7 @@ void qx10_state::qx10(machine_config &config) AM9517A(config, m_dma_2, MAIN_CLK/4); m_dma_2->dreq_active_low(); - I8255(config, m_ppi, 0); + I8255(config, m_ppi); m_ppi->out_pa_callback().set("prndata", FUNC(output_latch_device::write)); m_ppi->in_pb_callback().set(FUNC(qx10_state::portb_r)); m_ppi->out_pc_callback().set(FUNC(qx10_state::portc_w)); @@ -993,7 +993,7 @@ void qx10_state::qx10(machine_config &config) m_rtc->irq().set(m_pic_s, FUNC(pic8259_device::ir2_w)); m_rtc->sqw().set(FUNC(qx10_state::sqw_out)); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set(FUNC(qx10_state::qx10_upd765_interrupt)); m_fdc->drq_wr_callback().set(m_dma_1, FUNC(am9517a_device::dreq0_w)).invert(); FLOPPY_CONNECTOR(config, m_floppy[0], qx10_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/ericsson/e9161.cpp b/src/mame/ericsson/e9161.cpp index 4901a34a4c9..14726e12834 100644 --- a/src/mame/ericsson/e9161.cpp +++ b/src/mame/ericsson/e9161.cpp @@ -73,14 +73,14 @@ INPUT_PORTS_END void e9161_state::e9161(machine_config &config) { - M68000(config, m_maincpu, 8'000'000); + M68000(config, m_maincpu, XTAL::u(8'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &e9161_state::mem_map); - HD63450(config, m_dmac, 8'000'000, m_maincpu); + HD63450(config, m_dmac, XTAL::u(8'000'000), m_maincpu); - AM8052(config, "crtc", 8'000'000); + AM8052(config, "crtc", XTAL::u(8'000'000)); - MK68564(config, "sio", 4'000'000); + MK68564(config, "sio", XTAL::u(4'000'000)); } diff --git a/src/mame/ericsson/eispc.cpp b/src/mame/ericsson/eispc.cpp index 605a3a63e27..4fd677decea 100644 --- a/src/mame/ericsson/eispc.cpp +++ b/src/mame/ericsson/eispc.cpp @@ -910,12 +910,12 @@ void epc_state::epc(machine_config &config) } }); - ISA8_SLOT(config, "isa1", 0, m_isabus, epc_isa8_cards, "epc_mda", false); - ISA8_SLOT(config, "isa2", 0, m_isabus, epc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, m_isabus, epc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, m_isabus, epc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa5", 0, m_isabus, epc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa6", 0, m_isabus, epc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", m_isabus, epc_isa8_cards, "epc_mda", false); + ISA8_SLOT(config, "isa2", m_isabus, epc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", m_isabus, epc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", m_isabus, epc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa5", m_isabus, epc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", m_isabus, epc_isa8_cards, nullptr, false); // System board has 128kB memory with parity, expansion can be achieved through the // 128kB Memory Expansion Board 1090 and/or the 128kB Multifunction Board MB1080-001 @@ -1067,4 +1067,4 @@ ROM_START( epc ) ROM_END COMP( 1985, epc, 0, 0, epc, epc_ports, epc_state, init_epc, "Ericsson Information System", "Ericsson PC" , 0) -//COMP( 1985, eppc, ibm5150, 0, pccga, pccga, pc_state, empty_init, "Ericsson Information System", "Ericsson Portable PC", MACHINE_NOT_WORKING ) +//COMP( 1985, eppc, ibm5150, pccga, pccga, pc_state, empty_init, "Ericsson Information System", "Ericsson Portable PC", MACHINE_NOT_WORKING ) diff --git a/src/mame/ericsson/eispc_kb.cpp b/src/mame/ericsson/eispc_kb.cpp index cbcdcccb42e..9d6b959e9de 100644 --- a/src/mame/ericsson/eispc_kb.cpp +++ b/src/mame/ericsson/eispc_kb.cpp @@ -246,7 +246,7 @@ eispc_keyboard_device::eispc_keyboard_device( machine_config const &mconfig, char const *tag, device_t *owner, - uint32_t clock) + const XTAL &clock) : device_t(mconfig, EISPC_KB, tag, owner, clock) , m_mcu(*this, M6801_TAG) , m_rows(*this, "P1%u", 0) diff --git a/src/mame/ericsson/eispc_kb.h b/src/mame/ericsson/eispc_kb.h index 19b627c8d40..852c2d9ba06 100644 --- a/src/mame/ericsson/eispc_kb.h +++ b/src/mame/ericsson/eispc_kb.h @@ -17,7 +17,7 @@ public: auto num_cb() { return m_led_num_cb.bind(); } auto scroll_cb() { return m_led_scroll_cb.bind(); } - eispc_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + eispc_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_INPUT_CHANGED_MEMBER(key); DECLARE_WRITE_LINE_MEMBER(rxd_w); diff --git a/src/mame/excellent/aquarium.cpp b/src/mame/excellent/aquarium.cpp index e8bad570836..066013fc980 100644 --- a/src/mame/excellent/aquarium.cpp +++ b/src/mame/excellent/aquarium.cpp @@ -231,7 +231,7 @@ void aquarium_state::aquarium(machine_config &config) m_audiocpu->set_addrmap(AS_IO, &aquarium_state::snd_portmap); // Is this the actual IC type? Some other Excellent games from this period use a MAX693. - MB3773(config, m_watchdog, 0); + MB3773(config, m_watchdog); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -245,7 +245,7 @@ void aquarium_state::aquarium(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_aquarium); PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x1000/2); - EXCELLENT_SPRITE(config, m_sprgen, 0); + EXCELLENT_SPRITE(config, m_sprgen); m_sprgen->set_palette(m_palette); m_sprgen->set_color_base(0x300); m_sprgen->set_colpri_callback(FUNC(aquarium_state::aquarium_colpri_cb)); diff --git a/src/mame/excellent/d9final.cpp b/src/mame/excellent/d9final.cpp index ba7ad4f4fd9..f0e2677acea 100644 --- a/src/mame/excellent/d9final.cpp +++ b/src/mame/excellent/d9final.cpp @@ -311,7 +311,7 @@ void d9final_state::machine_start() void d9final_state::d9final(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 24000000 / 4); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(24000000) / 4); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &d9final_state::prg_map); m_maincpu->set_addrmap(AS_IO, &d9final_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(d9final_state::irq0_line_hold)); diff --git a/src/mame/excellent/excellent_spr.cpp b/src/mame/excellent/excellent_spr.cpp index 5c4cc9f9200..f993b6e78cf 100644 --- a/src/mame/excellent/excellent_spr.cpp +++ b/src/mame/excellent/excellent_spr.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(EXCELLENT_SPRITE, excellent_spr_device, "excellent_spr", "Excellent 8-bit Sprite") -excellent_spr_device::excellent_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +excellent_spr_device::excellent_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EXCELLENT_SPRITE, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , device_video_interface(mconfig, *this) diff --git a/src/mame/excellent/excellent_spr.h b/src/mame/excellent/excellent_spr.h index 12e27c5922b..4ba193676ef 100644 --- a/src/mame/excellent/excellent_spr.h +++ b/src/mame/excellent/excellent_spr.h @@ -10,7 +10,7 @@ class excellent_spr_device : public device_t, public device_gfx_interface, publi public: typedef device_delegate colpri_cb_delegate; - excellent_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + excellent_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_color_base(u16 base) { m_colbase = base; } template void set_colpri_callback(T &&... args) { m_colpri_cb.set(std::forward(args)...); } diff --git a/src/mame/excellent/gcpinbal.cpp b/src/mame/excellent/gcpinbal.cpp index e20f64c3e30..847d715e457 100644 --- a/src/mame/excellent/gcpinbal.cpp +++ b/src/mame/excellent/gcpinbal.cpp @@ -337,7 +337,7 @@ void gcpinbal_state::gcpinbal(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - MB3773(config, m_watchdog, 0); + MB3773(config, m_watchdog); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -351,7 +351,7 @@ void gcpinbal_state::gcpinbal(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_gcpinbal); PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x1000/2); - EXCELLENT_SPRITE(config, m_sprgen, 0); + EXCELLENT_SPRITE(config, m_sprgen); m_sprgen->set_palette(m_palette); m_sprgen->set_color_base(0x600); m_sprgen->set_colpri_callback(FUNC(gcpinbal_state::gcpinbal_colpri_cb)); @@ -361,7 +361,7 @@ void gcpinbal_state::gcpinbal(machine_config &config) OKIM6295(config, m_oki, 1.056_MHz_XTAL, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); - ES8712(config, m_essnd, 0); + ES8712(config, m_essnd); m_essnd->reset_handler().set_inputline("maincpu", 3); m_essnd->msm_write_handler().set("msm", FUNC(msm6585_device::data_w)); m_essnd->set_msm_tag("msm"); diff --git a/src/mame/excellent/lastbank.cpp b/src/mame/excellent/lastbank.cpp index 8216892c7a8..715740f0b7a 100644 --- a/src/mame/excellent/lastbank.cpp +++ b/src/mame/excellent/lastbank.cpp @@ -423,9 +423,9 @@ void lastbank_state::lastbank(machine_config &config) GENERIC_LATCH_8(config, "soundlatch1"); GENERIC_LATCH_8(config, "soundlatch2"); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75); - ES8712(config, m_essnd, 0); + ES8712(config, m_essnd); m_essnd->msm_write_handler().set("msm", FUNC(msm6585_device::data_w)); m_essnd->set_msm_tag("msm"); diff --git a/src/mame/excellent/witch.cpp b/src/mame/excellent/witch.cpp index b053a61bcf0..2cc28148867 100644 --- a/src/mame/excellent/witch.cpp +++ b/src/mame/excellent/witch.cpp @@ -971,7 +971,7 @@ void witch_state::witch(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - es8712_device &essnd(ES8712(config, "essnd", 0)); + es8712_device &essnd(ES8712(config, "essnd")); essnd.msm_write_handler().set("msm", FUNC(msm5205_device::data_w)); essnd.set_msm_tag("msm"); diff --git a/src/mame/exidy/carpolo.cpp b/src/mame/exidy/carpolo.cpp index 7bc70465373..15f204bd5a7 100644 --- a/src/mame/exidy/carpolo.cpp +++ b/src/mame/exidy/carpolo.cpp @@ -226,41 +226,41 @@ void carpolo_state::carpolo(machine_config &config) M6502(config, m_maincpu, XTAL(11'289'000)/12); /* 940.75 kHz */ m_maincpu->set_addrmap(AS_PROGRAM, &carpolo_state::main_map); - pia6821_device &pia0(PIA6821(config, "pia0", 0)); + pia6821_device &pia0(PIA6821(config, "pia0")); pia0.readpb_handler().set(FUNC(carpolo_state::pia_0_port_b_r)); pia0.writepa_handler().set(FUNC(carpolo_state::pia_0_port_a_w)); pia0.writepb_handler().set(FUNC(carpolo_state::pia_0_port_b_w)); pia0.ca2_handler().set(FUNC(carpolo_state::coin1_interrupt_clear_w)); pia0.cb2_handler().set(FUNC(carpolo_state::coin2_interrupt_clear_w)); - pia6821_device &pia1(PIA6821(config, "pia1", 0)); + pia6821_device &pia1(PIA6821(config, "pia1")); pia1.readpa_handler().set(FUNC(carpolo_state::pia_1_port_a_r)); pia1.readpb_handler().set(FUNC(carpolo_state::pia_1_port_b_r)); pia1.ca2_handler().set(FUNC(carpolo_state::coin3_interrupt_clear_w)); pia1.cb2_handler().set(FUNC(carpolo_state::coin4_interrupt_clear_w)); - TTL7474(config, m_ttl7474_2s_1, 0); + TTL7474(config, m_ttl7474_2s_1); m_ttl7474_2s_1->comp_output_cb().set(FUNC(carpolo_state::ttl7474_2s_1_q_cb)); - TTL7474(config, m_ttl7474_2s_2, 0); + TTL7474(config, m_ttl7474_2s_2); m_ttl7474_2s_2->comp_output_cb().set(FUNC(carpolo_state::ttl7474_2s_2_q_cb)); - TTL7474(config, m_ttl7474_2u_1, 0); + TTL7474(config, m_ttl7474_2u_1); m_ttl7474_2u_1->comp_output_cb().set(FUNC(carpolo_state::ttl7474_2u_1_q_cb)); - TTL7474(config, m_ttl7474_2u_2, 0); + TTL7474(config, m_ttl7474_2u_2); m_ttl7474_2u_2->comp_output_cb().set(FUNC(carpolo_state::ttl7474_2u_2_q_cb)); - TTL7474(config, m_ttl7474_1f_1, 0); - TTL7474(config, m_ttl7474_1f_2, 0); - TTL7474(config, m_ttl7474_1d_1, 0); - TTL7474(config, m_ttl7474_1d_2, 0); - TTL7474(config, m_ttl7474_1c_1, 0); - TTL7474(config, m_ttl7474_1c_2, 0); - TTL7474(config, m_ttl7474_1a_1, 0); - TTL7474(config, m_ttl7474_1a_2, 0); + TTL7474(config, m_ttl7474_1f_1); + TTL7474(config, m_ttl7474_1f_2); + TTL7474(config, m_ttl7474_1d_1); + TTL7474(config, m_ttl7474_1d_2); + TTL7474(config, m_ttl7474_1c_1); + TTL7474(config, m_ttl7474_1c_2); + TTL7474(config, m_ttl7474_1a_1); + TTL7474(config, m_ttl7474_1a_2); - TTL74148(config, m_ttl74148_3s, 0); + TTL74148(config, m_ttl74148_3s); m_ttl74148_3s->out_cb().set(FUNC(carpolo_state::ttl74148_3s_cb)); TTL153(config, m_ttl74153_1k); @@ -283,7 +283,7 @@ void carpolo_state::carpolo(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(carpolo)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/exidy/exidy.cpp b/src/mame/exidy/exidy.cpp index 7f6e6fc72e7..fdfb501ef33 100644 --- a/src/mame/exidy/exidy.cpp +++ b/src/mame/exidy/exidy.cpp @@ -1557,7 +1557,7 @@ void spectar_state::sidetrac(machine_config &config) m_samples->set_samples_names(sample_names); m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.99); } @@ -1613,13 +1613,13 @@ void exidy_state::venture(machine_config &config) exidy_video_config(0x04, 0x04, false); // audio hardware - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.writepa_handler().set("soundbd", FUNC(venture_sound_device::pb_w)); pia.writepb_handler().set("soundbd", FUNC(venture_sound_device::pa_w)); pia.ca2_handler().set("soundbd", FUNC(venture_sound_device::cb_w)); pia.cb2_handler().set("soundbd", FUNC(venture_sound_device::ca_w)); - venture_sound_device &soundbd(EXIDY_VENTURE(config, "soundbd", 0)); + venture_sound_device &soundbd(EXIDY_VENTURE(config, "soundbd")); soundbd.pa_callback().set("pia", FUNC(pia6821_device::portb_w)); soundbd.pb_callback().set("pia", FUNC(pia6821_device::porta_w)); soundbd.ca2_callback().set("pia", FUNC(pia6821_device::cb1_w)); @@ -1652,13 +1652,13 @@ void exidy_state::mtrap(machine_config &config) exidy_video_config(0x14, 0x00, false); // audio hardware - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.writepa_handler().set("soundbd", FUNC(venture_sound_device::pb_w)); pia.writepb_handler().set("soundbd", FUNC(venture_sound_device::pa_w)); pia.ca2_handler().set("soundbd", FUNC(venture_sound_device::cb_w)); pia.cb2_handler().set("soundbd", FUNC(venture_sound_device::ca_w)); - mtrap_sound_device &soundbd(EXIDY_MTRAP(config, "soundbd", 0)); + mtrap_sound_device &soundbd(EXIDY_MTRAP(config, "soundbd")); soundbd.pa_callback().set("pia", FUNC(pia6821_device::portb_w)); soundbd.pb_callback().set("pia", FUNC(pia6821_device::porta_w)); soundbd.ca2_callback().set("pia", FUNC(pia6821_device::cb1_w)); diff --git a/src/mame/exidy/exidy440_a.cpp b/src/mame/exidy/exidy440_a.cpp index 5cdb884610c..02dd2e3f900 100644 --- a/src/mame/exidy/exidy440_a.cpp +++ b/src/mame/exidy/exidy440_a.cpp @@ -66,7 +66,7 @@ void exidy440_sound_device::exidy440_audio_map(address_map &map) DEFINE_DEVICE_TYPE(EXIDY440, exidy440_sound_device, "exidy440_sound", "Exidy 440 CVSD") -exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EXIDY440, tag, owner, clock), device_sound_interface(mconfig, *this), m_audiocpu(*this, "audiocpu"), @@ -134,17 +134,17 @@ void exidy440_sound_device::device_start() save_item(NAME(m_m6844_interrupt)); save_item(NAME(m_m6844_chain)); - m_channel_frequency[0] = clock(); /* channels 0 and 1 are run by FCLK */ - m_channel_frequency[1] = clock(); - m_channel_frequency[2] = clock()/2; /* channels 2 and 3 are run by SCLK */ - m_channel_frequency[3] = clock()/2; + m_channel_frequency[0] = clock().value(); /* channels 0 and 1 are run by FCLK */ + m_channel_frequency[1] = clock().value(); + m_channel_frequency[2] = clock().value()/2; /* channels 2 and 3 are run by SCLK */ + m_channel_frequency[3] = clock().value()/2; /* get stream channels */ m_stream = stream_alloc(0, 2, clock()); /* allocate the mixer buffer */ - m_mixer_buffer_left.resize(clock()/50); - m_mixer_buffer_right.resize(clock()/50); + m_mixer_buffer_left.resize(clock().value()/50); + m_mixer_buffer_right.resize(clock().value()/50); if (SOUND_LOG) m_debuglog = fopen("sound.log", "w"); diff --git a/src/mame/exidy/exidy440_a.h b/src/mame/exidy/exidy440_a.h index 97f674a3471..993ccbcfd66 100644 --- a/src/mame/exidy/exidy440_a.h +++ b/src/mame/exidy/exidy440_a.h @@ -13,7 +13,7 @@ class exidy440_sound_device : public device_t, public device_sound_interface { public: - exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~exidy440_sound_device() {} void exidy440_sound_command(uint8_t param); diff --git a/src/mame/exidy/exidyttl.cpp b/src/mame/exidy/exidyttl.cpp index 311892078f2..ebec54e9ca6 100644 --- a/src/mame/exidy/exidyttl.cpp +++ b/src/mame/exidy/exidyttl.cpp @@ -28,7 +28,7 @@ Exidy discrete hardware games // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -100,7 +100,7 @@ void exidyttl_state::video_start() void exidyttl_state::attack(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_attack); + NETLIST_CPU(config, m_maincpu).set_source(netlist_attack); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); @@ -115,7 +115,7 @@ void exidyttl_state::attack(machine_config &config) void exidyttl_state::destdrby(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_attack); + NETLIST_CPU(config, m_maincpu).set_source(netlist_attack); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/exidy/micropolis.cpp b/src/mame/exidy/micropolis.cpp index ec57ac39a1f..1a3e39f182f 100644 --- a/src/mame/exidy/micropolis.cpp +++ b/src/mame/exidy/micropolis.cpp @@ -65,7 +65,7 @@ static const uint8_t track_SD[][2] = { DEFINE_DEVICE_TYPE(MICROPOLIS, micropolis_device, "micropolis", "Micropolis FDC") -micropolis_device::micropolis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +micropolis_device::micropolis_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MICROPOLIS, tag, owner, clock), m_read_dden(*this), m_write_intrq(*this), diff --git a/src/mame/exidy/micropolis.h b/src/mame/exidy/micropolis.h index b63ae0357d4..7caa7bea126 100644 --- a/src/mame/exidy/micropolis.h +++ b/src/mame/exidy/micropolis.h @@ -24,7 +24,7 @@ class micropolis_device : public device_t { public: - micropolis_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + micropolis_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto dden_rd_callback() { return m_read_dden.bind(); } auto intrq_wr_callback() { return m_write_intrq.bind(); } diff --git a/src/mame/exidy/sorcerer.cpp b/src/mame/exidy/sorcerer.cpp index 2a0f08e8790..09b0a503b54 100644 --- a/src/mame/exidy/sorcerer.cpp +++ b/src/mame/exidy/sorcerer.cpp @@ -513,13 +513,13 @@ void sorcererd_state::sorcererd(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sorcererd_state::sorcererd_mem); m_maincpu->set_addrmap(AS_IO, &sorcererd_state::sorcererd_io); - MICROPOLIS(config, m_fdc, 0); + MICROPOLIS(config, m_fdc); m_fdc->set_drive_tags(FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3); - LEGACY_FLOPPY(config, FLOPPY_0, 0, &sorcerer_floppy_interface); - LEGACY_FLOPPY(config, FLOPPY_1, 0, &sorcerer_floppy_interface); - LEGACY_FLOPPY(config, FLOPPY_2, 0, &sorcerer_floppy_interface); - LEGACY_FLOPPY(config, FLOPPY_3, 0, &sorcerer_floppy_interface); + LEGACY_FLOPPY(config, FLOPPY_0, &sorcerer_floppy_interface); + LEGACY_FLOPPY(config, FLOPPY_1, &sorcerer_floppy_interface); + LEGACY_FLOPPY(config, FLOPPY_2, &sorcerer_floppy_interface); + LEGACY_FLOPPY(config, FLOPPY_3, &sorcerer_floppy_interface); FD1793(config, m_fdc2, 8_MHz_XTAL / 8); // confirmed clock m_fdc2->set_force_ready(true); diff --git a/src/mame/exidy/sorcerer_m.cpp b/src/mame/exidy/sorcerer_m.cpp index 86b0616bbe4..bf2e6dd1610 100644 --- a/src/mame/exidy/sorcerer_m.cpp +++ b/src/mame/exidy/sorcerer_m.cpp @@ -255,7 +255,7 @@ void sorcerer_state::port34_w(u8 data) } m_fdc3->dden_w(BIT(data, 6)); - m_fdc3->set_unscaled_clock (BIT(data, 4) ? 2'000'000 : 1'000'000); + m_fdc3->set_unscaled_clock (BIT(data, 4) ? XTAL::u(2'000'000) : XTAL::u(1'000'000)); } // ************ DIGITRIO DMA ************** diff --git a/src/mame/exidy/starfire.cpp b/src/mame/exidy/starfire.cpp index 6f7a3ce6195..663e72dc4ff 100644 --- a/src/mame/exidy/starfire.cpp +++ b/src/mame/exidy/starfire.cpp @@ -422,7 +422,7 @@ void fireone_state::fireone(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(fireone)) .add_route(0, "lspeaker", 1.0) .add_route(1, "rspeaker", 1.0); @@ -458,7 +458,7 @@ void starfire_state::starfire(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - NETLIST_CPU(config, "sound_nl", netlist::config::DEFAULT_CLOCK()).set_source(NETLIST_NAME(starfire)); + NETLIST_CPU(config, "sound_nl").set_source(NETLIST_NAME(starfire)); NETLIST_LOGIC_INPUT(config, "sound_nl:size", "SIZE.IN", 0); NETLIST_LOGIC_INPUT(config, "sound_nl:sexplo", "SEXPLO.IN", 0); @@ -477,11 +477,11 @@ void starfire_state::starfire(machine_config &config) NETLIST_ANALOG_INPUT(config, "sound_nl:lohvol", "R15.DIAL"); NETLIST_ANALOG_INPUT(config, "sound_nl:mainvol", "R21.DIAL"); - NETLIST_ANALOG_OUTPUT(config, "sound_nl:tieon1", 0).set_params("TIEON1", FUNC(starfire_state::tieon1_cb)); - NETLIST_ANALOG_OUTPUT(config, "sound_nl:laseron1", 0).set_params("LASERON1", FUNC(starfire_state::laseron1_cb)); - NETLIST_ANALOG_OUTPUT(config, "sound_nl:output", 0).set_params("OUTPUT", FUNC(starfire_state::sound_out_cb)); + NETLIST_ANALOG_OUTPUT(config, "sound_nl:tieon1").set_params("TIEON1", FUNC(starfire_state::tieon1_cb)); + NETLIST_ANALOG_OUTPUT(config, "sound_nl:laseron1").set_params("LASERON1", FUNC(starfire_state::laseron1_cb)); + NETLIST_ANALOG_OUTPUT(config, "sound_nl:output").set_params("OUTPUT", FUNC(starfire_state::sound_out_cb)); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.5); // Not actually a DAC, just here to receive output. + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.5); // Not actually a DAC, just here to receive output. } diff --git a/src/mame/exidy/vertigo.cpp b/src/mame/exidy/vertigo.cpp index 9a9f512d9c4..47131061c05 100644 --- a/src/mame/exidy/vertigo.cpp +++ b/src/mame/exidy/vertigo.cpp @@ -126,14 +126,14 @@ void vertigo_state::vertigo(machine_config &config) m_custom->add_route(0, "lspeaker", 1.0); m_custom->add_route(1, "rspeaker", 1.0); - pit8254_device &pit(PIT8254(config, "pit", 0)); + pit8254_device &pit(PIT8254(config, "pit")); pit.set_clk<0>(24_MHz_XTAL / 100); pit.out_handler<0>().set(FUNC(vertigo_state::v_irq4_w)); pit.set_clk<1>(24_MHz_XTAL / 100); pit.out_handler<1>().set(FUNC(vertigo_state::v_irq3_w)); pit.set_clk<2>(24_MHz_XTAL / 100); - TTL74148(config, m_ttl74148, 0); + TTL74148(config, m_ttl74148); m_ttl74148->out_cb().set(FUNC(vertigo_state::update_irq)); /* motor controller */ @@ -142,7 +142,7 @@ void vertigo_state::vertigo(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ - VECTOR(config, m_vector, 0); + VECTOR(config, m_vector); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR)); screen.set_refresh_hz(60); screen.set_size(400, 300); diff --git a/src/mame/exidy/victory.cpp b/src/mame/exidy/victory.cpp index 3cb61c017cc..5866b829cb6 100644 --- a/src/mame/exidy/victory.cpp +++ b/src/mame/exidy/victory.cpp @@ -243,7 +243,7 @@ void victory_state::victory(machine_config &config) PALETTE(config, m_palette).set_entries(64); /* audio hardware */ - EXIDY_VICTORY(config, "soundbd", 0); + EXIDY_VICTORY(config, "soundbd"); } diff --git a/src/mame/f32/crospang.cpp b/src/mame/f32/crospang.cpp index 4ffd084f693..1fe588d03cc 100644 --- a/src/mame/f32/crospang.cpp +++ b/src/mame/f32/crospang.cpp @@ -454,7 +454,7 @@ void crospang_state::crospang(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x300); GFXDECODE(config, m_gfxdecode, "palette", gfx_crospang); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(0); m_sprgen->set_is_bootleg(true); m_sprgen->set_offsets(5, 7); diff --git a/src/mame/f32/silvmil.cpp b/src/mame/f32/silvmil.cpp index eaa79846d8b..ff100bc223b 100644 --- a/src/mame/f32/silvmil.cpp +++ b/src/mame/f32/silvmil.cpp @@ -441,7 +441,7 @@ void silvmil_state::silvmil(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x300); GFXDECODE(config, m_gfxdecode, "palette", gfx_silvmil); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(0); m_sprgen->set_is_bootleg(true); m_sprgen->set_offsets(5, 7); diff --git a/src/mame/facit/f4431_kbd.cpp b/src/mame/facit/f4431_kbd.cpp index e691ae2d1f6..9f040edbfb3 100644 --- a/src/mame/facit/f4431_kbd.cpp +++ b/src/mame/facit/f4431_kbd.cpp @@ -238,7 +238,7 @@ ioport_constructor f4431_kbd_device::device_input_ports() const // f4431_kbd_device - constructor //------------------------------------------------- -f4431_kbd_device::f4431_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +f4431_kbd_device::f4431_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, F4431_KBD, tag, owner, clock), m_mcu(*this, "mcu"), m_speaker(*this, "speaker"), diff --git a/src/mame/facit/f4431_kbd.h b/src/mame/facit/f4431_kbd.h index 878795222c1..14398f11b66 100644 --- a/src/mame/facit/f4431_kbd.h +++ b/src/mame/facit/f4431_kbd.h @@ -25,7 +25,7 @@ class f4431_kbd_device : public device_t { public: // construction/destruction - f4431_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + f4431_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto tx_handler() { return m_tx_handler.bind(); } diff --git a/src/mame/fairchild/channelf_a.cpp b/src/mame/fairchild/channelf_a.cpp index bd1dbe765f1..669f0e92e84 100644 --- a/src/mame/fairchild/channelf_a.cpp +++ b/src/mame/fairchild/channelf_a.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(CHANNELF_SOUND, channelf_sound_device, "channelf_sound", "Channel F Sound") -channelf_sound_device::channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +channelf_sound_device::channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CHANNELF_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), m_channel(nullptr), @@ -31,7 +31,7 @@ void channelf_sound_device::device_start() int rate; m_channel = stream_alloc(0, 1, machine().sample_rate()); - rate = machine().sample_rate(); + rate = machine().sample_rate().value(); /* * 2V = 1000Hz ~= 3579535/224/16 diff --git a/src/mame/fairchild/channelf_a.h b/src/mame/fairchild/channelf_a.h index ce1231c3951..0a5d1997278 100644 --- a/src/mame/fairchild/channelf_a.h +++ b/src/mame/fairchild/channelf_a.h @@ -12,7 +12,7 @@ class channelf_sound_device : public device_t, public device_sound_interface { public: - channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void sound_w(int mode); protected: diff --git a/src/mame/fairchild/f387x.cpp b/src/mame/fairchild/f387x.cpp index 6563128ff5b..a6ae1e8026f 100644 --- a/src/mame/fairchild/f387x.cpp +++ b/src/mame/fairchild/f387x.cpp @@ -158,7 +158,7 @@ void f387x_state::f387x(machine_config &config) m_maincpu->set_addrmap(AS_IO, &f387x_state::io_map); m_maincpu->romc08_callback().set_constant(0x80); - F3853(config, "smi", 0); + F3853(config, "smi"); RS232_PORT(config, m_rs232c, default_rs232_devices, "terminal"); m_rs232c->set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); diff --git a/src/mame/fairlight/cmi.cpp b/src/mame/fairlight/cmi.cpp index 9773e806a68..11705b35eff 100644 --- a/src/mame/fairlight/cmi.cpp +++ b/src/mame/fairlight/cmi.cpp @@ -2065,11 +2065,11 @@ void cmi_state::cmi2x(machine_config &config) MSM5832(config, m_msm5832, 32.768_kHz_XTAL); - I8214(config, m_i8214[0], 1000000); + I8214(config, m_i8214[0], XTAL::u(1000000)); m_i8214[0]->int_wr_callback().set(FUNC(cmi_state::i8214_1_int_w)); - I8214(config, m_i8214[1], 1000000); + I8214(config, m_i8214[1], XTAL::u(1000000)); m_i8214[1]->int_wr_callback().set(FUNC(cmi_state::i8214_2_int_w)); - I8214(config, m_i8214[2], 1000000); + I8214(config, m_i8214[2], XTAL::u(1000000)); m_i8214[2]->int_wr_callback().set(FUNC(cmi_state::i8214_3_int_w)); m_i8214[2]->enlg_wr_callback().set(FUNC(cmi_state::i8214_3_enlg)); @@ -2088,7 +2088,7 @@ void cmi_state::cmi2x(machine_config &config) PIA6821(config, m_q133_pia[1]); PTM6840(config, m_q133_ptm, SYSTEM_CAS_CLOCK); - m_q133_ptm->set_external_clocks(1024, 1, 111); // Third is todo + m_q133_ptm->set_external_clocks(XTAL::u(1024), XTAL::u(1), XTAL::u(111)); // Third is todo m_q133_ptm->irq_callback().set(m_maincpu2_irq0_merger, FUNC(input_merger_any_high_device::in_w<0>)); PIA6821(config, m_q219_pia); @@ -2099,7 +2099,7 @@ void cmi_state::cmi2x(machine_config &config) m_q219_pia->irqb_handler().set(FUNC(cmi_state::pia_q219_irqb)); PTM6840(config, m_q219_ptm, SYSTEM_CAS_CLOCK); - m_q219_ptm->set_external_clocks(HBLANK_FREQ.dvalue(), VBLANK_FREQ.dvalue(), SYSTEM_CAS_CLOCK.dvalue() / 2.0); + m_q219_ptm->set_external_clocks(HBLANK_FREQ, VBLANK_FREQ, SYSTEM_CAS_CLOCK / 2.0); m_q219_ptm->irq_callback().set(FUNC(cmi_state::ptm_q219_irq)); PIA6821(config, m_cmi02_pia[0]); @@ -2114,7 +2114,7 @@ void cmi_state::cmi2x(machine_config &config) m_cmi02_pia[1]->cb2_handler().set(FUNC(cmi_state::cmi02_pia2_cb2_w)); PTM6840(config, m_cmi02_ptm, SYSTEM_CAS_CLOCK); - m_cmi02_ptm->set_external_clocks(0, 0, 0); + m_cmi02_ptm->set_external_clocks(XTAL(), XTAL(), XTAL()); m_cmi02_ptm->o2_callback().set(FUNC(cmi_state::cmi02_ptm_o2)); m_cmi02_ptm->irq_callback().set(FUNC(cmi_state::cmi02_ptm_irq)); @@ -2146,16 +2146,16 @@ void cmi_state::cmi2x(machine_config &config) alphakeys.txd_handler().set("mkbd", FUNC(cmi_music_keyboard_device::kbd_rxd_w)); alphakeys.rts_handler().set("mkbd", FUNC(cmi_music_keyboard_device::kbd_cts_w)); - PTM6840(config, m_cmi07_ptm, 2000000); // ptm_cmi07_config + PTM6840(config, m_cmi07_ptm, XTAL::u(2000000)); // ptm_cmi07_config m_cmi07_ptm->irq_callback().set(FUNC(cmi_state::cmi07_irq)); - PTM6840(config, m_midi_ptm[0], 0); - m_midi_ptm[0]->set_external_clocks(0, 384000, 0); // C1 is 0, C2 is 384kHz per schematic block diagram, C3 is CLICK SYNC IN + PTM6840(config, m_midi_ptm[0]); + m_midi_ptm[0]->set_external_clocks(XTAL(), XTAL::u(384000), XTAL()); // C1 is 0, C2 is 384kHz per schematic block diagram, C3 is CLICK SYNC IN //m_midi_ptm[0]->o1_callback().set(FUNC(cmi_state::midi_ptm0_c1_w)); // TIMER 1A O/P per schematic //m_midi_ptm[0]->o2_callback().set(FUNC(cmi_state::midi_ptm0_c2_w)); // CLK 2 per schematic m_midi_ptm[0]->o3_callback().set(FUNC(cmi_state::midi_ptm0_c3_w)); - PTM6840(config, m_midi_ptm[1], 0); // entirely clocked by PTM 0 + PTM6840(config, m_midi_ptm[1]); // entirely clocked by PTM 0 //m_midi_ptm[1]->o1_callback().set(FUNC(cmi_state::midi_sync_out_1_w)); // SYNC OUT 1 per schematic //m_midi_ptm[1]->o2_callback().set(FUNC(cmi_state::midi_sync_out_2_w)); // SYNC OUT 2 per schematic //m_midi_ptm[1]->o3_callback().set(FUNC(cmi_state::midi_sync_out_3_w)); // SYNC OUT 3 per schematic diff --git a/src/mame/fairlight/cmi01a.cpp b/src/mame/fairlight/cmi01a.cpp index 767cf71b94f..dcf0fb7c75a 100644 --- a/src/mame/fairlight/cmi01a.cpp +++ b/src/mame/fairlight/cmi01a.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(CMI01A_CHANNEL_CARD, cmi01a_device, "cmi_01a", "Fairlight CMI-01A Channel Card") -cmi01a_device::cmi01a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cmi01a_device::cmi01a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMI01A_CHANNEL_CARD, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_irq_merger(*this, "cmi01a_irq") @@ -38,7 +38,7 @@ cmi01a_device::cmi01a_device(const machine_config &mconfig, const char *tag, dev void cmi01a_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia[0], 0); // 6821 C6/7/8/9 + PIA6821(config, m_pia[0]); // 6821 C6/7/8/9 m_pia[0]->readcb1_handler().set(FUNC(cmi01a_device::tri_r)); m_pia[0]->readpa_handler().set(FUNC(cmi01a_device::ws_dir_r)); m_pia[0]->writepa_handler().set(FUNC(cmi01a_device::ws_dir_w)); @@ -49,7 +49,7 @@ void cmi01a_device::device_add_mconfig(machine_config &config) m_pia[0]->irqa_handler().set(m_irq_merger, FUNC(input_merger_device::in_w<0>)); m_pia[0]->irqb_handler().set(m_irq_merger, FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_pia[1], 0); // 6821 D6/7/8/9 + PIA6821(config, m_pia[1]); // 6821 D6/7/8/9 m_pia[1]->readca1_handler().set(FUNC(cmi01a_device::zx_r)); m_pia[1]->readcb1_handler().set(FUNC(cmi01a_device::eosi_r)); m_pia[1]->readpa_handler().set(FUNC(cmi01a_device::pitch_octave_r)); @@ -79,9 +79,9 @@ void cmi01a_device::device_start() m_rstb_pulse_timer = timer_alloc(FUNC(cmi01a_device::rstb_pulse_cb), this); m_sample_timer = timer_alloc(FUNC(cmi01a_device::update_sample), this); - m_stream = stream_alloc(0, 1, 48000); + m_stream = stream_alloc(0, 1, XTAL::u(48000)); - m_ptm->set_external_clocks(0, 0, 0); + m_ptm->set_external_clocks(XTAL(), XTAL(), XTAL()); save_pointer(NAME(m_wave_ram), 0x4000); save_item(NAME(m_current_sample)); diff --git a/src/mame/fairlight/cmi01a.h b/src/mame/fairlight/cmi01a.h index 84179ece3f7..d073acc69ca 100644 --- a/src/mame/fairlight/cmi01a.h +++ b/src/mame/fairlight/cmi01a.h @@ -15,13 +15,13 @@ class cmi01a_device : public device_t, public device_sound_interface { public: - cmi01a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, u32 channel) + cmi01a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t channel) : cmi01a_device(mconfig, tag, owner, clock) { m_channel = channel; } - cmi01a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cmi01a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_irq_cb.bind(); } diff --git a/src/mame/fairlight/cmi_ankbd.cpp b/src/mame/fairlight/cmi_ankbd.cpp index f66d061def7..a2748ec7d7c 100644 --- a/src/mame/fairlight/cmi_ankbd.cpp +++ b/src/mame/fairlight/cmi_ankbd.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(CMI_ALPHANUMERIC_KEYBOARD, cmi_alphanumeric_keyboard_device, "cmi_ankbd", "Fairlight Intelligent Alphanumeric Keyboard") -cmi_alphanumeric_keyboard_device::cmi_alphanumeric_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cmi_alphanumeric_keyboard_device::cmi_alphanumeric_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMI_ALPHANUMERIC_KEYBOARD, tag, owner, clock) , m_txd_handler(*this) , m_rts_handler(*this) diff --git a/src/mame/fairlight/cmi_ankbd.h b/src/mame/fairlight/cmi_ankbd.h index c4515f704e7..ae40264a00b 100644 --- a/src/mame/fairlight/cmi_ankbd.h +++ b/src/mame/fairlight/cmi_ankbd.h @@ -16,7 +16,7 @@ class cmi_alphanumeric_keyboard_device : public device_t { public: - cmi_alphanumeric_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cmi_alphanumeric_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto txd_handler() { return m_txd_handler.bind(); } auto rts_handler() { return m_rts_handler.bind(); } diff --git a/src/mame/fairlight/cmi_mkbd.cpp b/src/mame/fairlight/cmi_mkbd.cpp index a8986e3aae3..e86666bf6a8 100644 --- a/src/mame/fairlight/cmi_mkbd.cpp +++ b/src/mame/fairlight/cmi_mkbd.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(CMI_MUSIC_KEYBOARD, cmi_music_keyboard_device, "cmi_mkbd", "Fairlight CMI Music Keyboard") -cmi_music_keyboard_device::cmi_music_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cmi_music_keyboard_device::cmi_music_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CMI_MUSIC_KEYBOARD, tag, owner, clock) , m_cmi_txd(*this) , m_cmi_rts(*this) @@ -558,11 +558,11 @@ void cmi_music_keyboard_device::device_add_mconfig(machine_config &config) m_acia_kbd->irq_handler().set(FUNC(cmi_music_keyboard_device::kbd_acia_int)); /* alpha-numeric display */ - DL1416T(config, m_dp1, u32(0)); + DL1416T(config, m_dp1); m_dp1->update().set(FUNC(cmi_music_keyboard_device::update_dp<0>)); - DL1416T(config, m_dp2, u32(0)); + DL1416T(config, m_dp2); m_dp2->update().set(FUNC(cmi_music_keyboard_device::update_dp<1>)); - DL1416T(config, m_dp3, u32(0)); + DL1416T(config, m_dp3); m_dp3->update().set(FUNC(cmi_music_keyboard_device::update_dp<2>)); } diff --git a/src/mame/fairlight/cmi_mkbd.h b/src/mame/fairlight/cmi_mkbd.h index 5f8c76e3eab..c43a4df460c 100644 --- a/src/mame/fairlight/cmi_mkbd.h +++ b/src/mame/fairlight/cmi_mkbd.h @@ -18,7 +18,7 @@ class cmi_music_keyboard_device : public device_t { public: - cmi_music_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cmi_music_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto cmi_txd_handler() { return m_cmi_txd.bind(); } auto cmi_rts_handler() { return m_cmi_rts.bind(); } diff --git a/src/mame/falco/f5220_kbd.cpp b/src/mame/falco/f5220_kbd.cpp index df6f81ea62b..f26807c933a 100644 --- a/src/mame/falco/f5220_kbd.cpp +++ b/src/mame/falco/f5220_kbd.cpp @@ -184,7 +184,7 @@ ioport_constructor f5220_kbd_device::device_input_ports() const // f5220_kbd_device - constructor //------------------------------------------------- -f5220_kbd_device::f5220_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +f5220_kbd_device::f5220_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, F5220_KBD, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6", "row_7"), m_int_handler(*this), diff --git a/src/mame/falco/f5220_kbd.h b/src/mame/falco/f5220_kbd.h index 3cf1c050cbc..1b66afe5b21 100644 --- a/src/mame/falco/f5220_kbd.h +++ b/src/mame/falco/f5220_kbd.h @@ -24,7 +24,7 @@ class f5220_kbd_device : public device_t, protected device_matrix_keyboard_inte { public: // construction/destruction - f5220_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + f5220_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/mame/fidelity/as12.cpp b/src/mame/fidelity/as12.cpp index d8d9886b17a..9fe75dd4883 100644 --- a/src/mame/fidelity/as12.cpp +++ b/src/mame/fidelity/as12.cpp @@ -235,7 +235,7 @@ void as12_state::feleg(machine_config &config) R65C02(config, m_maincpu, 4_MHz_XTAL); // R65C02P4 m_maincpu->set_addrmap(AS_PROGRAM, &as12_state::main_map); - auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 110K, 1K), ideal frequency is 600Hz + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(600))); // from 556 timer (22nF, 110K, 1K), ideal frequency is 600Hz irq_clock.set_pulse_width(attotime::from_usec(17)); // active for 17us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); diff --git a/src/mame/fidelity/card.cpp b/src/mame/fidelity/card.cpp index d92e8530afa..bda02714593 100644 --- a/src/mame/fidelity/card.cpp +++ b/src/mame/fidelity/card.cpp @@ -621,7 +621,7 @@ void card_state::vbrc(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - S14001A(config, m_speech, 25000); // R/C circuit, around 25khz + S14001A(config, m_speech, XTAL::u(25000)); // R/C circuit, around 25khz m_speech->bsy().set_inputline("maincpu", Z80_INPUT_LINE_WAIT); m_speech->add_route(ALL_OUTPUTS, "speaker", 0.75); } diff --git a/src/mame/fidelity/cc10.cpp b/src/mame/fidelity/cc10.cpp index c36f0f1c909..fec053fcd14 100644 --- a/src/mame/fidelity/cc10.cpp +++ b/src/mame/fidelity/cc10.cpp @@ -321,7 +321,7 @@ void ccx_state::ccx(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - BEEP(config, m_beeper, 1360); // approximation, from 556 timer ic + BEEP(config, m_beeper, XTAL::u(1360)); // approximation, from 556 timer ic m_beeper->add_route(ALL_OUTPUTS, "speaker", 0.25); TIMER(config, "beeper_off").configure_generic(FUNC(ccx_state::beeper_off)); } diff --git a/src/mame/fidelity/checkc2.cpp b/src/mame/fidelity/checkc2.cpp index 642a01263a3..bef336eb569 100644 --- a/src/mame/fidelity/checkc2.cpp +++ b/src/mame/fidelity/checkc2.cpp @@ -208,7 +208,7 @@ INPUT_PORTS_END void cr_state::cr(machine_config &config) { /* basic machine hardware */ - NEC_D546(config, m_maincpu, 400000); // approximation + NEC_D546(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set(FUNC(cr_state::input_r)); m_maincpu->read_b().set(FUNC(cr_state::ram_r)); m_maincpu->write_c().set(FUNC(cr_state::ram_w)); diff --git a/src/mame/fidelity/chesster.cpp b/src/mame/fidelity/chesster.cpp index b46e41eabe2..1d2f003b12c 100644 --- a/src/mame/fidelity/chesster.cpp +++ b/src/mame/fidelity/chesster.cpp @@ -186,7 +186,7 @@ void chesster_state::chesster(machine_config &config) R65C02(config, m_maincpu, 5_MHz_XTAL); // RP65C02G m_maincpu->set_addrmap(AS_PROGRAM, &chesster_state::main_map); - auto &irq_clock(CLOCK(config, "irq_clock", 9500)); // from 555 timer, measured (9.6kHz on a Chesster, 9.3kHz on a Kishon) + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(9500))); // from 555 timer, measured (9.6kHz on a Chesster, 9.3kHz on a Kishon) irq_clock.set_pulse_width(attotime::from_nsec(2600)); // active for 2.6us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); diff --git a/src/mame/fidelity/csc.cpp b/src/mame/fidelity/csc.cpp index 4f9018d5dc7..5158bfe6ac7 100644 --- a/src/mame/fidelity/csc.cpp +++ b/src/mame/fidelity/csc.cpp @@ -625,14 +625,14 @@ void csc_state::csc(machine_config &config) irq_clock.set_pulse_width(attotime::from_nsec(42750)); // measured ~42.75us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set(FUNC(csc_state::pia0_pa_r)); m_pia[0]->writepa_handler().set(FUNC(csc_state::pia0_pa_w)); m_pia[0]->writepb_handler().set(FUNC(csc_state::pia0_pb_w)); m_pia[0]->ca2_handler().set(FUNC(csc_state::pia0_ca2_w)); m_pia[0]->cb2_handler().set(FUNC(csc_state::pia0_cb2_w)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpb_handler().set(FUNC(csc_state::pia1_pb_r)); m_pia[1]->writepa_handler().set(FUNC(csc_state::pia1_pa_w)); m_pia[1]->writepb_handler().set(FUNC(csc_state::pia1_pb_w)); @@ -649,7 +649,7 @@ void csc_state::csc(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - S14001A(config, m_speech, 25000); // R/C circuit, around 25khz + S14001A(config, m_speech, XTAL::u(25000)); // R/C circuit, around 25khz m_speech->ext_read().set(FUNC(csc_state::speech_r)); m_speech->add_route(ALL_OUTPUTS, "speaker", 0.75); @@ -682,14 +682,14 @@ void su9_state::su9(machine_config &config) void csc_state::rsc(machine_config &config) { // basic machine hardware - M6502(config, m_maincpu, 1800000); // measured approx 1.81MHz + M6502(config, m_maincpu, XTAL::u(1800000)); // measured approx 1.81MHz m_maincpu->set_addrmap(AS_PROGRAM, &csc_state::rsc_map); - auto &irq_clock(CLOCK(config, "irq_clock", 546)); // from 555 timer, measured + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(546))); // from 555 timer, measured irq_clock.set_pulse_width(attotime::from_usec(38)); // active for 38us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); - PIA6821(config, m_pia[0], 0); // MOS 6520 + PIA6821(config, m_pia[0]); // MOS 6520 m_pia[0]->readpa_handler().set(FUNC(csc_state::pia0_pa_r)); m_pia[0]->writepa_handler().set(FUNC(csc_state::pia0_pa_w)); m_pia[0]->writepb_handler().set(FUNC(csc_state::pia0_pb_w)); diff --git a/src/mame/fidelity/dames.cpp b/src/mame/fidelity/dames.cpp index 4f97f02bec2..b248aa27ff7 100644 --- a/src/mame/fidelity/dames.cpp +++ b/src/mame/fidelity/dames.cpp @@ -224,7 +224,7 @@ void dsc_state::dsc(machine_config &config) Z80(config, m_maincpu, 3.9_MHz_XTAL); // 3.9MHz resonator m_maincpu->set_addrmap(AS_PROGRAM, &dsc_state::main_map); - auto &irq_clock(CLOCK(config, "irq_clock", 523)); // from 555 timer (22nF, 120K, 2.7K) + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(523))); // from 555 timer (22nF, 120K, 2.7K) irq_clock.set_pulse_width(attotime::from_usec(41)); // active for 41us irq_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); diff --git a/src/mame/fidelity/desdis.cpp b/src/mame/fidelity/desdis.cpp index e53b42a3806..95011f83da1 100644 --- a/src/mame/fidelity/desdis.cpp +++ b/src/mame/fidelity/desdis.cpp @@ -290,7 +290,7 @@ void desdis_state::fdes2100d(machine_config &config) M65C02(config, m_maincpu, 6_MHz_XTAL); // W65C02P-6 m_maincpu->set_addrmap(AS_PROGRAM, &desdis_state::fdes2100d_map); - auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(600))); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz irq_clock.set_pulse_width(attotime::from_nsec(15250)); // active for 15.25us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); @@ -325,7 +325,7 @@ void desmas_state::fdes2265(machine_config &config) M68000(config.replace(), m_maincpu, 16_MHz_XTAL); // MC68HC000P12F m_maincpu->set_addrmap(AS_PROGRAM, &desmas_state::fdes2265_map); - auto &irq_clock(CLOCK(config.replace(), "irq_clock", 600)); // from 555 timer, ideal frequency is 600Hz (measured 597Hz) + auto &irq_clock(CLOCK(config.replace(), "irq_clock", XTAL::u(600))); // from 555 timer, ideal frequency is 600Hz (measured 597Hz) irq_clock.set_pulse_width(attotime::from_usec(6)); // active for 6us irq_clock.signal_handler().set_inputline(m_maincpu, M68K_IRQ_4); diff --git a/src/mame/fidelity/eag68k.cpp b/src/mame/fidelity/eag68k.cpp index f5d52fd95e4..fef7b007184 100644 --- a/src/mame/fidelity/eag68k.cpp +++ b/src/mame/fidelity/eag68k.cpp @@ -557,7 +557,7 @@ void excel68k_state::fex68k(machine_config &config) M68000(config, m_maincpu, 12_MHz_XTAL); // HD68HC000P12 m_maincpu->set_addrmap(AS_PROGRAM, &excel68k_state::fex68k_map); - auto &irq_clock(CLOCK(config, "irq_clock", 600)); // 556 timer (22nF, 91K + 20K POT @ 14.8K, 0.1K), ideal is 600Hz (measured 580Hz, 604Hz, 632Hz) + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(600))); // 556 timer (22nF, 91K + 20K POT @ 14.8K, 0.1K), ideal is 600Hz (measured 580Hz, 604Hz, 632Hz) irq_clock.set_pulse_width(attotime::from_nsec(1525)); // active for 1.525us irq_clock.signal_handler().set_inputline(m_maincpu, M68K_IRQ_2); diff --git a/src/mame/fidelity/elite.cpp b/src/mame/fidelity/elite.cpp index c4f9647ca65..662ac4e4fb4 100644 --- a/src/mame/fidelity/elite.cpp +++ b/src/mame/fidelity/elite.cpp @@ -480,7 +480,7 @@ void elite_state::pc(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - S14001A(config, m_speech, 25000); // R/C circuit, around 25khz + S14001A(config, m_speech, XTAL::u(25000)); // R/C circuit, around 25khz m_speech->ext_read().set(FUNC(elite_state::speech_r)); m_speech->add_route(ALL_OUTPUTS, "speaker", 0.75); @@ -532,7 +532,7 @@ void eag_state::eag(machine_config &config) m_maincpu->set_clock(5_MHz_XTAL); // R65C02P4 m_maincpu->set_addrmap(AS_PROGRAM, &eag_state::eag_map); - auto &irq_clock(CLOCK(config.replace(), "irq_clock", 600)); // from 556 timer (22nF, 82K+pot, 1K), ideal frequency is 600Hz + auto &irq_clock(CLOCK(config.replace(), "irq_clock", XTAL::u(600))); // from 556 timer (22nF, 82K+pot, 1K), ideal frequency is 600Hz irq_clock.set_pulse_width(attotime::from_nsec(15250)); // active for 15.25us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); diff --git a/src/mame/fidelity/excel.cpp b/src/mame/fidelity/excel.cpp index 4485ea088b7..8f7d0dc8d7c 100644 --- a/src/mame/fidelity/excel.cpp +++ b/src/mame/fidelity/excel.cpp @@ -388,7 +388,7 @@ void excel_state::fexcel(machine_config &config) M65SC02(config, m_maincpu, 12_MHz_XTAL/4); // G65SC102P-3, 12.0M ceramic resonator m_maincpu->set_addrmap(AS_PROGRAM, &excel_state::fexcel_map); - auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(600))); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz irq_clock.set_pulse_width(attotime::from_nsec(15250)); // active for 15.25us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); @@ -467,7 +467,7 @@ void excel_state::fexcelv(machine_config &config) config.set_default_layout(layout_fidel_exv); /* sound hardware */ - S14001A(config, m_speech, 25000); // R/C circuit, around 25khz + S14001A(config, m_speech, XTAL::u(25000)); // R/C circuit, around 25khz m_speech->ext_read().set(FUNC(excel_state::speech_r)); m_speech->add_route(ALL_OUTPUTS, "speaker", 0.75); } diff --git a/src/mame/fidelity/sc12.cpp b/src/mame/fidelity/sc12.cpp index 1ca19647edf..32aa78d5718 100644 --- a/src/mame/fidelity/sc12.cpp +++ b/src/mame/fidelity/sc12.cpp @@ -241,7 +241,7 @@ void sc12_state::sc12(machine_config &config) R65C02(config, m_maincpu, 3_MHz_XTAL); // R65C02P3 m_maincpu->set_addrmap(AS_PROGRAM, &sc12_state::main_map); - auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(600))); // from 556 timer (22nF, 102K, 1K), ideal frequency is 600Hz irq_clock.set_pulse_width(attotime::from_nsec(15250)); // active for 15.25us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); diff --git a/src/mame/fidelity/sc9.cpp b/src/mame/fidelity/sc9.cpp index cb16007ebaf..a078c70220b 100644 --- a/src/mame/fidelity/sc9.cpp +++ b/src/mame/fidelity/sc9.cpp @@ -142,7 +142,7 @@ void sc9c_state::sc9c_set_cpu_freq() { // SC9(C01) was released with 1.5MHz, 1.6MHz, or 1.9MHz CPU u8 inp = ioport("FAKE")->read(); - m_maincpu->set_unscaled_clock((inp & 2) ? 1900000 : ((inp & 1) ? 1600000 : 1500000)); + m_maincpu->set_unscaled_clock(XTAL::u((inp & 2) ? 1900000 : ((inp & 1) ? 1600000 : 1500000))); } @@ -263,7 +263,7 @@ void sc9_state::sc9d(machine_config &config) M6502(config, m_maincpu, 3.9_MHz_XTAL / 2); // R6502AP, 3.9MHz resonator m_maincpu->set_addrmap(AS_PROGRAM, &sc9_state::sc9d_map); - auto &irq_clock(CLOCK(config, "irq_clock", 600)); // from 555 timer (22nF, 102K, 2.7K), ideal frequency is 600Hz + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(600))); // from 555 timer (22nF, 102K, 2.7K), ideal frequency is 600Hz irq_clock.set_pulse_width(attotime::from_usec(41)); // active for 41us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); @@ -289,7 +289,7 @@ void sc9_state::sc9b(machine_config &config) sc9d(config); /* basic machine hardware */ - m_maincpu->set_clock(1500000); // from ceramic resonator "681 JSA", measured + m_maincpu->set_clock(XTAL::u(1500000)); // from ceramic resonator "681 JSA", measured m_maincpu->set_addrmap(AS_PROGRAM, &sc9_state::sc9_map); } diff --git a/src/mame/fidelity/vcc.cpp b/src/mame/fidelity/vcc.cpp index 495dd5d298a..0372113fcbc 100644 --- a/src/mame/fidelity/vcc.cpp +++ b/src/mame/fidelity/vcc.cpp @@ -341,7 +341,7 @@ void vcc_state::vcc(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - S14001A(config, m_speech, 25000); // R/C circuit, around 25khz + S14001A(config, m_speech, XTAL::u(25000)); // R/C circuit, around 25khz m_speech->ext_read().set(FUNC(vcc_state::speech_r)); m_speech->add_route(ALL_OUTPUTS, "speaker", 0.75); } diff --git a/src/mame/fidelity/vsc.cpp b/src/mame/fidelity/vsc.cpp index 3d9523c9be4..48e4e537619 100644 --- a/src/mame/fidelity/vsc.cpp +++ b/src/mame/fidelity/vsc.cpp @@ -414,7 +414,7 @@ void vsc_state::vsc(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &vsc_state::main_map); m_maincpu->set_addrmap(AS_IO, &vsc_state::main_io); - auto &nmi_clock(CLOCK(config, "nmi_clock", 600)); // 555 timer, ideal frequency is 600Hz (measurement was 587Hz) + auto &nmi_clock(CLOCK(config, "nmi_clock", XTAL::u(600))); // 555 timer, ideal frequency is 600Hz (measurement was 587Hz) nmi_clock.set_pulse_width(attotime::from_usec(845)); // active for 0.845ms (approx half) nmi_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); @@ -439,7 +439,7 @@ void vsc_state::vsc(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - S14001A(config, m_speech, 25000); // R/C circuit, around 25khz + S14001A(config, m_speech, XTAL::u(25000)); // R/C circuit, around 25khz m_speech->ext_read().set(FUNC(vsc_state::speech_r)); m_speech->add_route(ALL_OUTPUTS, "speaker", 0.75); } diff --git a/src/mame/force/fccpu20.cpp b/src/mame/force/fccpu20.cpp index df443f4841f..541d6d03e96 100644 --- a/src/mame/force/fccpu20.cpp +++ b/src/mame/force/fccpu20.cpp @@ -156,43 +156,43 @@ static void cpu21yb_vme_cards(device_slot_interface &device) /* Machine configurations */ void cpu20_state::cpu20(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", cpu20_vme_cards, "fccpu20", 1, "vme"); } void cpu20_state::cpu21s(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", cpu21s_vme_cards, "fccpu21s", 1, "vme"); } void cpu20_state::cpu21(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", cpu21_vme_cards, "fccpu21", 1, "vme"); } void cpu20_state::cpu21a(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", cpu21a_vme_cards, "fccpu21a", 1, "vme"); } void cpu20_state::cpu21ya(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", cpu21ya_vme_cards, "fccpu21ya", 1, "vme"); } void cpu20_state::cpu21b(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", cpu21b_vme_cards, "fccpu21b", 1, "vme"); } void cpu20_state::cpu21yb(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", cpu21yb_vme_cards, "fccpu21yb", 1, "vme"); } diff --git a/src/mame/force/fccpu30.cpp b/src/mame/force/fccpu30.cpp index 1534761ce5d..0e1dc4d8218 100644 --- a/src/mame/force/fccpu30.cpp +++ b/src/mame/force/fccpu30.cpp @@ -672,7 +672,7 @@ void cpu30_state::cpu30(machine_config &config) m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cpu30_state::cpu_space_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", fccpu30_vme_cards, nullptr, 1, "vme"); /* Terminal Port config */ /* Force CPU30 series of boards has up to four serial ports, p1-p4, the FGA boot uses p4 as console and subsequent @@ -697,7 +697,7 @@ void cpu30_state::cpu30(machine_config &config) #define RS232P4_TAG "rs232p4" DUSCC68562(config, m_dusccterm, DUSCC_CLOCK); - m_dusccterm->configure_channels(0, 0, 0, 0); + m_dusccterm->configure_channels(XTAL(), XTAL(), XTAL(), XTAL()); /* Port 1 on Port B */ m_dusccterm->out_txdb_callback().set(RS232P1_TAG, FUNC(rs232_port_device::write_txd)); m_dusccterm->out_dtrb_callback().set(RS232P1_TAG, FUNC(rs232_port_device::write_dtr)); @@ -710,7 +710,7 @@ void cpu30_state::cpu30(machine_config &config) m_dusccterm->out_int_callback().set(m_fga002, FUNC(fga002_device::lirq4_w)); duscc68562_device &duscc2(DUSCC68562(config, "duscc2", DUSCC_CLOCK)); - duscc2.configure_channels(0, 0, 0, 0); + duscc2.configure_channels(XTAL(), XTAL(), XTAL(), XTAL()); /* Port 2 on Port A */ duscc2.out_txda_callback().set(RS232P2_TAG, FUNC(rs232_port_device::write_txd)); duscc2.out_dtra_callback().set(RS232P2_TAG, FUNC(rs232_port_device::write_dtr)); @@ -756,7 +756,7 @@ void cpu30_state::cpu30(machine_config &config) // m_pit2->timer_irq_callback().set(m_fga002, FUNC(fga002_device::lirq3_w)); // The timer interrupt seems to silence the terminal interrupt, needs invectigation /* FGA-002, Force Gate Array */ - FGA002(config, m_fga002, 0); + FGA002(config, m_fga002); m_fga002->out_int().set(FUNC(cpu30_state::fga_irq_callback)); m_fga002->liack4().set("duscc", FUNC(duscc_device::iack)); m_fga002->liack5().set("duscc2", FUNC(duscc_device::iack)); diff --git a/src/mame/force/force68k.cpp b/src/mame/force/force68k.cpp index f84ace19d75..a28a8341339 100644 --- a/src/mame/force/force68k.cpp +++ b/src/mame/force/force68k.cpp @@ -547,7 +547,7 @@ void force68k_state::fccpu1(machine_config &config) * the ROM monitor is over-run while checking for checksums etc if used with * UI mount feature. */ - ACIA6850(config, m_aciahost, 0); + ACIA6850(config, m_aciahost); m_aciahost->txd_handler().set("rs232host", FUNC(rs232_port_device::write_txd)); m_aciahost->rts_handler().set("rs232host", FUNC(rs232_port_device::write_rts)); @@ -556,7 +556,7 @@ void force68k_state::fccpu1(machine_config &config) rs232host.cts_handler().set(m_aciahost, FUNC(acia6850_device::write_cts)); /* P4/Terminal Port config */ - ACIA6850(config, m_aciaterm, 0); + ACIA6850(config, m_aciaterm); m_aciaterm->txd_handler().set("rs232trm", FUNC(rs232_port_device::write_txd)); m_aciaterm->rts_handler().set("rs232trm", FUNC(rs232_port_device::write_rts)); @@ -565,7 +565,7 @@ void force68k_state::fccpu1(machine_config &config) rs232trm.cts_handler().set(m_aciaterm, FUNC(acia6850_device::write_cts)); /* P5/Remote Port config */ - ACIA6850(config, m_aciaremt, 0); + ACIA6850(config, m_aciaremt); /* Bit Rate Generator */ MC14411(config, m_brg, XTAL(1'843'200)); @@ -601,7 +601,7 @@ void force68k_state::fccpu1(machine_config &config) fccpu1_eprom_sockets(config); // VME interface - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", fccpu1_vme_cards, nullptr, 1, "vme"); } diff --git a/src/mame/force/miniforce.cpp b/src/mame/force/miniforce.cpp index 8c2283a2a11..9e72d781943 100644 --- a/src/mame/force/miniforce.cpp +++ b/src/mame/force/miniforce.cpp @@ -187,7 +187,7 @@ static void miniforce_vme_cards(device_slot_interface &device) void miniforce_state::miniforce(machine_config &config) { // ->set_addrmap(AS_PROGRAM, &miniforce_state::miniforce_mem); - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", miniforce_vme_cards, "fccpu21", 1, "vme"); VME_SLOT(config, "slot2", miniforce_vme_cards, nullptr, 2, "vme"); VME_SLOT(config, "slot3", miniforce_vme_cards, nullptr, 3, "vme"); diff --git a/src/mame/fujitsu/fm7.cpp b/src/mame/fujitsu/fm7.cpp index 61bf8f427c8..d98408a81e6 100644 --- a/src/mame/fujitsu/fm7.cpp +++ b/src/mame/fujitsu/fm7.cpp @@ -1891,7 +1891,7 @@ void fm7_state::fm7(machine_config &config) SPEAKER(config, "mono").front_center(); AY8913(config, m_psg, 4.9152_MHz_XTAL / 4).add_route(ALL_OUTPUTS,"mono", 1.00); - BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper", XTAL::u(1200)).add_route(ALL_OUTPUTS, "mono", 0.50); MCFG_MACHINE_START_OVERRIDE(fm7_state,fm7) @@ -1944,7 +1944,7 @@ void fm7_state::fm8(machine_config &config) config.set_perfect_quantum(m_sub); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beeper, XTAL::u(1200)).add_route(ALL_OUTPUTS, "mono", 0.50); MCFG_MACHINE_START_OVERRIDE(fm7_state,fm7) @@ -1998,7 +1998,7 @@ void fm77_state::fm77av(machine_config &config) m_ym->port_a_read_callback().set_ioport("joy1"); m_ym->port_b_read_callback().set_ioport("joy2"); m_ym->add_route(ALL_OUTPUTS,"mono", 1.00); - BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper", XTAL::u(1200)).add_route(ALL_OUTPUTS, "mono", 0.50); MCFG_MACHINE_START_OVERRIDE(fm77_state,fm77av) @@ -2047,21 +2047,21 @@ void fm77_state::fm77av(machine_config &config) void fm11_state::fm11(machine_config &config) { /* basic machine hardware */ - MC6809E(config, m_maincpu, 2000000); // 2MHz 68B09E + MC6809E(config, m_maincpu, XTAL::u(2000000)); // 2MHz 68B09E m_maincpu->set_addrmap(AS_PROGRAM, &fm11_state::fm11_mem); m_maincpu->set_irq_acknowledge_callback(FUNC(fm11_state::irq_ack)); - MC6809(config, m_sub, 8000000); // 2MHz 68B09 + MC6809(config, m_sub, XTAL::u(8000000)); // 2MHz 68B09 m_sub->set_addrmap(AS_PROGRAM, &fm11_state::fm11_sub_mem); m_sub->set_irq_acknowledge_callback(FUNC(fm11_state::sub_irq_ack)); config.set_perfect_quantum(m_sub); - I8088(config, m_x86, 8000000); // 8MHz i8088 + I8088(config, m_x86, XTAL::u(8000000)); // 8MHz i8088 m_x86->set_addrmap(AS_PROGRAM, &fm11_state::fm11_x86_mem); m_x86->set_addrmap(AS_IO, &fm11_state::fm11_x86_io); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beeper, XTAL::u(1200)).add_route(ALL_OUTPUTS, "mono", 0.50); MCFG_MACHINE_START_OVERRIDE(fm11_state,fm11) @@ -2072,7 +2072,7 @@ void fm11_state::fm11(machine_config &config) /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(16128000, 1024, 0, 640, 262, 0, 200); + m_screen->set_raw(XTAL::u(16128000), 1024, 0, 640, 262, 0, 200); m_screen->set_screen_update(FUNC(fm11_state::screen_update_fm7)); PALETTE(config, m_palette, palette_device::BRG_3BIT); @@ -2103,23 +2103,23 @@ void fm11_state::fm11(machine_config &config) void fm7_state::fm16beta(machine_config &config) { /* basic machine hardware */ - I8086(config, m_maincpu, 8000000); // 8MHz i8086 + I8086(config, m_maincpu, XTAL::u(8000000)); // 8MHz i8086 m_maincpu->set_addrmap(AS_PROGRAM, &fm7_state::fm16_mem); m_maincpu->set_addrmap(AS_IO, &fm7_state::fm16_io); - MC6809(config, m_sub, 8000000); + MC6809(config, m_sub, XTAL::u(8000000)); m_sub->set_irq_acknowledge_callback(FUNC(fm7_state::sub_irq_ack)); m_sub->set_addrmap(AS_PROGRAM, &fm7_state::fm16_sub_mem); config.set_perfect_quantum(m_sub); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beeper, XTAL::u(1200)).add_route(ALL_OUTPUTS, "mono", 0.50); MCFG_MACHINE_START_OVERRIDE(fm7_state,fm16) /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(16128000, 1024, 0, 640, 262, 0, 200); + m_screen->set_raw(XTAL::u(16128000), 1024, 0, 640, 262, 0, 200); m_screen->set_screen_update(FUNC(fm7_state::screen_update_fm7)); PALETTE(config, m_palette, palette_device::BRG_3BIT); diff --git a/src/mame/fujitsu/fmt_icmem.cpp b/src/mame/fujitsu/fmt_icmem.cpp index b38c3057eb7..e4718c8c52f 100644 --- a/src/mame/fujitsu/fmt_icmem.cpp +++ b/src/mame/fujitsu/fmt_icmem.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(FMT_ICMEM, fmt_icmem_device, "fmt_icmem", "FM Towns IC Memory // fmt_icmem_device - constructor //------------------------------------------------- -fmt_icmem_device::fmt_icmem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fmt_icmem_device::fmt_icmem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FMT_ICMEM, tag, owner, clock), device_memcard_image_interface(mconfig, *this), m_writeprotect(*this,"icmem"), diff --git a/src/mame/fujitsu/fmt_icmem.h b/src/mame/fujitsu/fmt_icmem.h index 9f45ebcfe18..8d4c8700288 100644 --- a/src/mame/fujitsu/fmt_icmem.h +++ b/src/mame/fujitsu/fmt_icmem.h @@ -24,7 +24,7 @@ class fmt_icmem_device : public device_t, public device_memcard_image_interface { public: // construction/destruction - fmt_icmem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fmt_icmem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual bool is_reset_on_load() const noexcept override { return false; } virtual const char *file_extensions() const noexcept override { return "icm"; } diff --git a/src/mame/fujitsu/fmtowns.cpp b/src/mame/fujitsu/fmtowns.cpp index 8cecbb14c82..beb3a4763c1 100644 --- a/src/mame/fujitsu/fmtowns.cpp +++ b/src/mame/fujitsu/fmtowns.cpp @@ -2826,7 +2826,7 @@ GFXDECODE_END void towns_state::towns_base(machine_config &config) { /* basic machine hardware */ - I386(config, m_maincpu, 16000000); + I386(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem); m_maincpu->set_addrmap(AS_IO, &towns_state::towns_1g_io); m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq)); @@ -2850,20 +2850,20 @@ void towns_state::towns_base(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ym3438_device &fm(YM3438(config, "fm", 16000000 / 2)); // actual clock speed unknown + ym3438_device &fm(YM3438(config, "fm", XTAL::u(16000000) / 2)); // actual clock speed unknown fm.irq_handler().set(FUNC(towns_state::towns_fm_irq)); fm.add_route(0, "lspeaker", 1.00); fm.add_route(1, "rspeaker", 1.00); /* // Later model uses YMF276 for FM - ymf276_device &fm(YMF276(config, "fm", 16000000 / 2)); // actual clock speed unknown + ymf276_device &fm(YMF276(config, "fm", XTAL::u(16000000) / 2)); // actual clock speed unknown fm.irq_handler().set(FUNC(towns_state::towns_fm_irq)); fm.add_route(0, "lspeaker", 1.00); fm.add_route(1, "rspeaker", 1.00); */ - rf5c68_device &pcm(RF5C68(config, "pcm", 16000000 / 2)); // actual clock speed unknown + rf5c68_device &pcm(RF5C68(config, "pcm", XTAL::u(16000000) / 2)); // actual clock speed unknown pcm.set_end_callback(FUNC(towns_state::towns_pcm_irq)); pcm.set_addrmap(0, &towns_state::pcm_mem); pcm.add_route(0, "lspeaker", 1.00); @@ -2876,7 +2876,7 @@ void towns_state::towns_base(machine_config &config) m_speaker->add_route(ALL_OUTPUTS, "lspeaker", 0.50); m_speaker->add_route(ALL_OUTPUTS, "rspeaker", 0.50); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(307200); m_pit->out_handler<0>().set(FUNC(towns_state::towns_pit_out0_changed)); m_pit->set_clk<1>(307200); @@ -2884,22 +2884,22 @@ void towns_state::towns_base(machine_config &config) m_pit->set_clk<2>(307200); m_pit->out_handler<2>().set(FUNC(towns_state::pit_out2_changed)); - pit8253_device &pit2(PIT8253(config, "pit2", 0)); + pit8253_device &pit2(PIT8253(config, "pit2")); pit2.set_clk<0>(307200); // reserved pit2.set_clk<1>(1228800); // RS-232 pit2.out_handler<1>().set(FUNC(towns_state::pit2_out1_changed)); pit2.set_clk<2>(307200); // reserved - PIC8259(config, m_pic_master, 0); + PIC8259(config, m_pic_master); m_pic_master->out_int_callback().set_inputline(m_maincpu, 0); m_pic_master->in_sp_callback().set_constant(1); m_pic_master->read_slave_ack_callback().set(FUNC(towns_state::get_slave_ack)); - PIC8259(config, m_pic_slave, 0); + PIC8259(config, m_pic_slave); m_pic_slave->out_int_callback().set(m_pic_master, FUNC(pic8259_device::ir7_w)); m_pic_slave->in_sp_callback().set_constant(0); - MB8877(config, m_fdc, 8'000'000 / 4); // clock unknown + MB8877(config, m_fdc, XTAL::u(8'000'000) / 4); // clock unknown m_fdc->intrq_wr_callback().set(FUNC(towns_state::mb8877a_irq_w)); m_fdc->drq_wr_callback().set(FUNC(towns_state::mb8877a_drq_w)); FLOPPY_CONNECTOR(config, m_flop[0], towns_floppies, "35hd", towns_state::floppy_formats); @@ -2908,25 +2908,25 @@ void towns_state::towns_base(machine_config &config) SOFTWARE_LIST(config, "fd_list_cracked").set_original("fmtowns_flop_cracked"); SOFTWARE_LIST(config, "fd_list_misc").set_original("fmtowns_flop_misc"); - CDROM(config, m_cdrom, 0).set_interface("fmt_cdrom"); + CDROM(config, m_cdrom).set_interface("fmt_cdrom"); SOFTWARE_LIST(config, "cd_list").set_original("fmtowns_cd"); - UPD71071(config, m_dma[0], 0); + UPD71071(config, m_dma[0]); m_dma[0]->set_cpu_tag("maincpu"); - m_dma[0]->set_clock(4000000); + m_dma[0]->set_clock(XTAL::u(4000000)); m_dma[0]->dma_read_callback<0>().set(FUNC(towns_state::towns_fdc_dma_r)); m_dma[0]->dma_read_callback<3>().set(FUNC(towns_state::towns_state::towns_cdrom_dma_r)); m_dma[0]->dma_write_callback<0>().set(FUNC(towns_state::towns_fdc_dma_w)); - UPD71071(config, m_dma[1], 0); + UPD71071(config, m_dma[1]); m_dma[1]->set_cpu_tag("maincpu"); - m_dma[1]->set_clock(4000000); + m_dma[1]->set_clock(XTAL::u(4000000)); m_dma[1]->dma_read_callback<0>().set(FUNC(towns_state::towns_fdc_dma_r)); m_dma[1]->dma_read_callback<3>().set(FUNC(towns_state::towns_state::towns_cdrom_dma_r)); m_dma[1]->dma_write_callback<0>().set(FUNC(towns_state::towns_fdc_dma_w)); //MCFG_VIDEO_START_OVERRIDE(towns_state,towns) - I8251(config, m_i8251, 0); + I8251(config, m_i8251); m_i8251->rxrdy_handler().set(FUNC(towns_state::towns_rxrdy_irq)); m_i8251->txrdy_handler().set(FUNC(towns_state::towns_txrdy_irq)); m_i8251->syndet_handler().set(FUNC(towns_state::towns_syndet_irq)); @@ -2939,7 +2939,7 @@ void towns_state::towns_base(machine_config &config) rs232c.dsr_handler().set(m_i8251, FUNC(i8251_device::write_dsr)); rs232c.cts_handler().set(m_i8251, FUNC(i8251_device::write_cts)); - FMT_ICMEM(config, m_icmemcard, 0); + FMT_ICMEM(config, m_icmemcard); /* First-generation models: 1 MB onboard, 3 SIMM slots with 1 or 2 MB each, except slot 1 (limited to 1 MB). Model 2 comes with a 1 MB SIMM preinstalled on slot 1, Model 1 doesn't. */ @@ -2974,20 +2974,20 @@ void towns16_state::townsux(machine_config &config) { towns_base(config); - I386SX(config.replace(), m_maincpu, 16000000); + I386SX(config.replace(), m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &towns16_state::ux_mem); m_maincpu->set_addrmap(AS_IO, &towns16_state::townsux_io); m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq)); m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); - scsi_port_device &scsi(SCSI_PORT(config, "scsi", 0)); + scsi_port_device &scsi(SCSI_PORT(config, "scsi")); scsi.set_slot_device(1, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0)); scsi.set_slot_device(2, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_1)); scsi.set_slot_device(3, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_2)); scsi.set_slot_device(4, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_3)); scsi.set_slot_device(5, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_4)); - FMSCSI(config, m_scsi, 0); + FMSCSI(config, m_scsi); m_scsi->set_scsi_port("scsi"); m_scsi->irq_handler().set(FUNC(towns16_state::towns_scsi_irq)); m_scsi->drq_handler().set(FUNC(towns16_state::towns_scsi_drq)); @@ -3007,20 +3007,20 @@ void towns_state::townssj(machine_config &config) { towns_base(config); - I486(config.replace(), m_maincpu, 66000000); + I486(config.replace(), m_maincpu, XTAL::u(66000000)); m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem); m_maincpu->set_addrmap(AS_IO, &towns_state::towns2_io); m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq)); m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); - scsi_port_device &scsi(SCSI_PORT(config, "scsi", 0)); + scsi_port_device &scsi(SCSI_PORT(config, "scsi")); scsi.set_slot_device(1, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0)); scsi.set_slot_device(2, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_1)); scsi.set_slot_device(3, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_2)); scsi.set_slot_device(4, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_3)); scsi.set_slot_device(5, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_4)); - FMSCSI(config, m_scsi, 0); + FMSCSI(config, m_scsi); m_scsi->set_scsi_port("scsi"); m_scsi->irq_handler().set(FUNC(towns_state::towns_scsi_irq)); m_scsi->drq_handler().set(FUNC(towns_state::towns_scsi_drq)); @@ -3039,7 +3039,7 @@ void towns_state::townssj(machine_config &config) void towns_state::townshr(machine_config &config) { townssj(config); - I486(config.replace(), m_maincpu, 20000000); + I486(config.replace(), m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem); m_maincpu->set_addrmap(AS_IO, &towns_state::towns2_io); m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq)); @@ -3060,7 +3060,7 @@ void towns_state::townsmx(machine_config &config) void towns_state::townsftv(machine_config &config) { townssj(config); - I486(config.replace(), m_maincpu, 33000000); + I486(config.replace(), m_maincpu, XTAL::u(33000000)); m_maincpu->set_addrmap(AS_PROGRAM, &towns_state::towns_mem); m_maincpu->set_addrmap(AS_IO, &towns_state::towns2_io); m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq)); @@ -3074,7 +3074,7 @@ void marty_state::marty(machine_config &config) { towns_base(config); - I386SX(config.replace(), m_maincpu, 16000000); + I386SX(config.replace(), m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &marty_state::marty_mem); m_maincpu->set_addrmap(AS_IO, &marty_state::towns16_io); m_maincpu->set_vblank_int("screen", FUNC(towns_state::towns_vsync_irq)); diff --git a/src/mame/funtech/acan.cpp b/src/mame/funtech/acan.cpp index 9afd46a1292..3661223dae4 100644 --- a/src/mame/funtech/acan.cpp +++ b/src/mame/funtech/acan.cpp @@ -17,7 +17,7 @@ // device type definition DEFINE_DEVICE_TYPE(ACANSND, acan_sound_device, "acansound", "Super A'Can Audio") -acan_sound_device::acan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acan_sound_device::acan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACANSND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) @@ -34,7 +34,7 @@ acan_sound_device::acan_sound_device(const machine_config &mconfig, const char * void acan_sound_device::device_start() { m_stream = stream_alloc(0, 2, clock() / 16 / 5); - m_mix = std::make_unique((clock() / 16 / 5) * 2); + m_mix = std::make_unique((clock().value() / 16 / 5) * 2); m_timer = timer_alloc(FUNC(acan_sound_device::channel_irq), this); m_timer_irq_handler.resolve_safe(); diff --git a/src/mame/funtech/acan.h b/src/mame/funtech/acan.h index f3cbe74b1f4..51a01544203 100644 --- a/src/mame/funtech/acan.h +++ b/src/mame/funtech/acan.h @@ -14,7 +14,7 @@ class acan_sound_device : public device_t, public device_sound_interface { public: - acan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ram_read() { return m_ram_read.bind(); } auto timer_irq_handler() { return m_timer_irq_handler.bind(); } diff --git a/src/mame/funworld/funworld.cpp b/src/mame/funworld/funworld.cpp index 9e1628d4014..3817bd26803 100644 --- a/src/mame/funworld/funworld.cpp +++ b/src/mame/funworld/funworld.cpp @@ -3271,11 +3271,11 @@ void funworld_state::fw1stpal(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - pia6821_device &pia0(PIA6821(config, "pia0", 0)); + pia6821_device &pia0(PIA6821(config, "pia0")); pia0.readpa_handler().set_ioport("IN0"); pia0.readpb_handler().set_ioport("IN1"); - pia6821_device &pia1(PIA6821(config, "pia1", 0)); + pia6821_device &pia1(PIA6821(config, "pia1")); pia1.readpa_handler().set_ioport("IN2"); pia1.readpb_handler().set_ioport("DSW"); pia1.ca2_handler().set(FUNC(funworld_state::pia1_ca2_w)); @@ -3387,7 +3387,7 @@ void funworld_state::saloon(machine_config &config) config.device_remove("pia1"); // Serial Memory - I2C_24C02(config, "i2cmem", 0).set_e0(1); // ? or maybe 2nd half of 24C04? + I2C_24C02(config, "i2cmem").set_e0(1); // ? or maybe 2nd half of 24C04? } diff --git a/src/mame/funworld/photoply.cpp b/src/mame/funworld/photoply.cpp index 930651757a6..e3024510343 100644 --- a/src/mame/funworld/photoply.cpp +++ b/src/mame/funworld/photoply.cpp @@ -297,7 +297,7 @@ GFXDECODE_END void photoply_state::photoply(machine_config &config) { // Basic machine hardware - I486DX4(config, m_maincpu, 75000000); // I486DX4, 75 or 100 Mhz + I486DX4(config, m_maincpu, XTAL::u(75000000)); // I486DX4, 75 or 100 Mhz m_maincpu->set_addrmap(AS_PROGRAM, &photoply_state::photoply_map); m_maincpu->set_addrmap(AS_IO, &photoply_state::photoply_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -312,14 +312,14 @@ void photoply_state::photoply(machine_config &config) ide_controller_32_device &ide2(IDE_CONTROLLER_32(config, "ide2").options(ata_devices, nullptr, nullptr, true)); ide2.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir7_w)); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(5, FUNC(photoply_state::sis_pcm_r), FUNC(photoply_state::sis_pcm_w)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(XTAL(25'174'800),900,0,640,526,0,480); screen.set_screen_update("vga", FUNC(cirrus_gd5446_device::screen_update)); - cirrus_gd5446_device &vga(CIRRUS_GD5446(config, "vga", 0)); + cirrus_gd5446_device &vga(CIRRUS_GD5446(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x200000); @@ -333,7 +333,7 @@ void photoply_state::photoply(machine_config &config) void photoply_state::photoply_dx4_100(machine_config &config) { photoply(config); - m_maincpu->set_clock(100000000); // 100MHz + m_maincpu->set_clock(XTAL::u(100000000)); // 100MHz } ROM_START(photoply98sp) diff --git a/src/mame/funworld/photoplys.cpp b/src/mame/funworld/photoplys.cpp index 05a13a8fe63..fb9a4164c91 100644 --- a/src/mame/funworld/photoplys.cpp +++ b/src/mame/funworld/photoplys.cpp @@ -71,7 +71,7 @@ void photoplays_state::machine_reset() void photoplays_state::photoplays(machine_config &config) { // Basic machine hardware - PENTIUM2(config, m_maincpu, 366'000'000); // Actually an Intel CELERON FV524RX366 128 SL36C + PENTIUM2(config, m_maincpu, XTAL::u(366'000'000)); // Actually an Intel CELERON FV524RX366 128 SL36C m_maincpu->set_addrmap(AS_PROGRAM, &photoplays_state::photoplays_map); // Video hardware diff --git a/src/mame/funworld/photoplysx.cpp b/src/mame/funworld/photoplysx.cpp index 76feace1eec..ff9961ca16c 100644 --- a/src/mame/funworld/photoplysx.cpp +++ b/src/mame/funworld/photoplysx.cpp @@ -80,7 +80,7 @@ void photoplaysx_state::machine_reset() void photoplaysx_state::photoplaysx(machine_config &config) { // Basic machine hardware - PENTIUM4(config, m_maincpu, 100000000); // Actually an Intel CELERON 2 GHz / 128 / 400 (SL6VR) + PENTIUM4(config, m_maincpu, XTAL::u(100000000)); // Actually an Intel CELERON 2 GHz / 128 / 400 (SL6VR) m_maincpu->set_addrmap(AS_PROGRAM, &photoplaysx_state::photoplaysx_map); // Video hardware diff --git a/src/mame/funworld/supercrd.cpp b/src/mame/funworld/supercrd.cpp index 56aea6667cd..aa2af7be249 100644 --- a/src/mame/funworld/supercrd.cpp +++ b/src/mame/funworld/supercrd.cpp @@ -447,8 +447,8 @@ void supercrd_state::supercrd(machine_config &config) // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); -// I8255(config, "ppi8255_0", 0); -// I8255(config, "ppi8255_1", 0); +// I8255(config, "ppi8255_0"); +// I8255(config, "ppi8255_1"); // video hardware diff --git a/src/mame/fuuki/fuukifg.cpp b/src/mame/fuuki/fuukifg.cpp index 2add15d2b8a..f7163992d82 100644 --- a/src/mame/fuuki/fuukifg.cpp +++ b/src/mame/fuuki/fuukifg.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(FUUKI_VIDEO, fuukivid_device, "fuukivid", "Fuuki Video") -fuukivid_device::fuukivid_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +fuukivid_device::fuukivid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FUUKI_VIDEO, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , device_video_interface(mconfig, *this) diff --git a/src/mame/fuuki/fuukifg.h b/src/mame/fuuki/fuukifg.h index 2fb522e257f..6e70c2e05fb 100644 --- a/src/mame/fuuki/fuukifg.h +++ b/src/mame/fuuki/fuukifg.h @@ -11,7 +11,7 @@ public: typedef device_delegate tile_delegate; typedef device_delegate colpri_cb_delegate; - fuukivid_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + fuukivid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_color_base(u16 base) { m_colbase = base; } diff --git a/src/mame/fuuki/fuukifg2.cpp b/src/mame/fuuki/fuukifg2.cpp index 7df72eda02c..dbe19cb2bdf 100644 --- a/src/mame/fuuki/fuukifg2.cpp +++ b/src/mame/fuuki/fuukifg2.cpp @@ -435,7 +435,7 @@ void fuuki16_state::fuuki16(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_fuuki16); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x4000 / 2); - FUUKI_VIDEO(config, m_fuukivid, 0); + FUUKI_VIDEO(config, m_fuukivid); m_fuukivid->set_palette(m_palette); m_fuukivid->set_color_base(0x400*2); m_fuukivid->set_color_num(0x40); diff --git a/src/mame/fuuki/fuukifg3.cpp b/src/mame/fuuki/fuukifg3.cpp index 1f5ecb8a742..f21ac40c2ba 100644 --- a/src/mame/fuuki/fuukifg3.cpp +++ b/src/mame/fuuki/fuukifg3.cpp @@ -517,7 +517,7 @@ void fuuki32_state::fuuki32(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_fuuki32); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x4000 / 2); - FUUKI_VIDEO(config, m_fuukivid, 0); + FUUKI_VIDEO(config, m_fuukivid); m_fuukivid->set_palette(m_palette); m_fuukivid->set_color_base(0x400*2); m_fuukivid->set_color_num(0x40); diff --git a/src/mame/gaelco/blmbycar.cpp b/src/mame/gaelco/blmbycar.cpp index 2bee88817d3..c2f6b882c91 100644 --- a/src/mame/gaelco/blmbycar.cpp +++ b/src/mame/gaelco/blmbycar.cpp @@ -606,7 +606,7 @@ void base_state::base(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 0x2000); - BLMBYCAR_SPRITES(config, m_sprites, 0); + BLMBYCAR_SPRITES(config, m_sprites); m_sprites->set_gfxdecode_tag("gfxdecode"); m_sprites->set_screen_tag("screen"); diff --git a/src/mame/gaelco/gaelco3d.cpp b/src/mame/gaelco/gaelco3d.cpp index 925d8bf8da3..97c3a2c243c 100644 --- a/src/mame/gaelco/gaelco3d.cpp +++ b/src/mame/gaelco/gaelco3d.cpp @@ -913,16 +913,16 @@ INPUT_PORTS_END void gaelco3d_state::gaelco3d(machine_config &config) { // Basic machine hardware - M68000(config, m_maincpu, 15000000); + M68000(config, m_maincpu, XTAL::u(15000000)); m_maincpu->set_addrmap(AS_PROGRAM, &gaelco3d_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(gaelco3d_state::vblank_gen)); - TMS32031(config, m_tms, 60000000); + TMS32031(config, m_tms, XTAL::u(60000000)); m_tms->set_addrmap(AS_PROGRAM, &gaelco3d_state::tms_map); m_tms->set_mcbl_mode(true); m_tms->iack().set(FUNC(gaelco3d_state::tms_iack_w)); - ADSP2115(config, m_adsp, 16000000); + ADSP2115(config, m_adsp, XTAL::u(16000000)); m_adsp->sport_tx().set(FUNC(gaelco3d_state::adsp_tx_callback)); m_adsp->set_addrmap(AS_PROGRAM, &gaelco3d_state::adsp_program_map); m_adsp->set_addrmap(AS_DATA, &gaelco3d_state::adsp_data_map); @@ -933,7 +933,7 @@ void gaelco3d_state::gaelco3d(machine_config &config) TIMER(config, "adsp_timer").configure_generic(FUNC(gaelco3d_state::adsp_autobuffer_irq)); - GAELCO_SERIAL(config, m_serial, 0); + GAELCO_SERIAL(config, m_serial); m_serial->irq_handler().set(FUNC(gaelco3d_state::ser_irq)); LS259(config, m_mainlatch); // IC5 on bottom board next to EEPROM @@ -983,11 +983,11 @@ void gaelco3d_state::gaelco3d2(machine_config &config) gaelco3d(config); // Basic machine hardware - M68EC020(config.replace(), m_maincpu, 25000000); + M68EC020(config.replace(), m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &gaelco3d_state::main020_map); m_maincpu->set_vblank_int("screen", FUNC(gaelco3d_state::vblank_gen)); - m_tms->set_clock(50000000); + m_tms->set_clock(XTAL::u(50000000)); MCFG_MACHINE_RESET_OVERRIDE(gaelco3d_state,gaelco3d2) } diff --git a/src/mame/gaelco/gaelco3d_m.cpp b/src/mame/gaelco/gaelco3d_m.cpp index 6edc2d15ff2..2833c40b92d 100644 --- a/src/mame/gaelco/gaelco3d_m.cpp +++ b/src/mame/gaelco/gaelco3d_m.cpp @@ -182,7 +182,7 @@ void gaelco_serial_device::buf_reset(buf_t *buf) DEFINE_DEVICE_TYPE(GAELCO_SERIAL, gaelco_serial_device, "gaelco_serial", "Gaelco 3D Serial Hardware") -gaelco_serial_device::gaelco_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gaelco_serial_device::gaelco_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAELCO_SERIAL, tag, owner, clock), m_irq_handler(*this), m_status(0), diff --git a/src/mame/gaelco/gaelco3d_m.h b/src/mame/gaelco/gaelco3d_m.h index b30856e6bf9..a4ebf439b5e 100644 --- a/src/mame/gaelco/gaelco3d_m.h +++ b/src/mame/gaelco/gaelco3d_m.h @@ -23,7 +23,7 @@ class gaelco_serial_device : public device_t public: static constexpr unsigned EXT_STATUS_MASK = 0x03; - gaelco_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gaelco_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/mame/gaelco/gaelco_ds5002fp.cpp b/src/mame/gaelco/gaelco_ds5002fp.cpp index ca19f2ed2a2..d5f5ab22fc9 100644 --- a/src/mame/gaelco/gaelco_ds5002fp.cpp +++ b/src/mame/gaelco/gaelco_ds5002fp.cpp @@ -20,7 +20,7 @@ void gaelco_ds5002fp_device::dallas_ram(address_map &map) map(0x10000, 0x17fff).ram().share("sram"); // yes, the games access it as data and use it for temporary storage!! } -gaelco_ds5002fp_device::gaelco_ds5002fp_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +gaelco_ds5002fp_device::gaelco_ds5002fp_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAELCO_DS5002FP, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_hostmem_config({ "hostmem", ENDIANNESS_BIG, 8, 16, 0 }) diff --git a/src/mame/gaelco/gaelco_ds5002fp.h b/src/mame/gaelco/gaelco_ds5002fp.h index 5ab7f31da21..7c6e76f7b04 100644 --- a/src/mame/gaelco/gaelco_ds5002fp.h +++ b/src/mame/gaelco/gaelco_ds5002fp.h @@ -12,7 +12,7 @@ DECLARE_DEVICE_TYPE(GAELCO_DS5002FP, gaelco_ds5002fp_device) class gaelco_ds5002fp_device : public device_t, public device_memory_interface { public: - gaelco_ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gaelco_ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device_t implementation diff --git a/src/mame/gaelco/gaelco_wrally_sprites.cpp b/src/mame/gaelco/gaelco_wrally_sprites.cpp index b1ade9e73e1..bae24620c3b 100644 --- a/src/mame/gaelco/gaelco_wrally_sprites.cpp +++ b/src/mame/gaelco/gaelco_wrally_sprites.cpp @@ -7,14 +7,14 @@ DEFINE_DEVICE_TYPE(GAELCO_WRALLY_SPRITES, gaelco_wrally_sprites_device, "gaelco_wrally_sprites", "Gaelco World Rally Sprites") DEFINE_DEVICE_TYPE(BLMBYCAR_SPRITES, blmbycar_sprites_device, "blmbycar_sprites", "Blomby Car Sprites") -gaelco_wrally_sprites_device::gaelco_wrally_sprites_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gaelco_wrally_sprites_device::gaelco_wrally_sprites_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_gfxdecode(*this, finder_base::DUMMY_TAG) , m_screen(*this, finder_base::DUMMY_TAG) { } -gaelco_wrally_sprites_device::gaelco_wrally_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gaelco_wrally_sprites_device::gaelco_wrally_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gaelco_wrally_sprites_device(mconfig, GAELCO_WRALLY_SPRITES, tag, owner, clock) { } @@ -220,7 +220,7 @@ void gaelco_wrally_sprites_device::mix_sprites(bitmap_ind16 &bitmap, const recta ***************************************************************************/ -blmbycar_sprites_device::blmbycar_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +blmbycar_sprites_device::blmbycar_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gaelco_wrally_sprites_device(mconfig, BLMBYCAR_SPRITES, tag, owner, clock) { } diff --git a/src/mame/gaelco/gaelco_wrally_sprites.h b/src/mame/gaelco/gaelco_wrally_sprites.h index 19b450d8217..85258cdf927 100644 --- a/src/mame/gaelco/gaelco_wrally_sprites.h +++ b/src/mame/gaelco/gaelco_wrally_sprites.h @@ -10,7 +10,7 @@ class gaelco_wrally_sprites_device : public device_t { public: - gaelco_wrally_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gaelco_wrally_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } template void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward(tag)); } @@ -19,7 +19,7 @@ public: void mix_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority); protected: - gaelco_wrally_sprites_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gaelco_wrally_sprites_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -36,7 +36,7 @@ private: class blmbycar_sprites_device : public gaelco_wrally_sprites_device { public: - blmbycar_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + blmbycar_sprites_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void get_sprites_info(uint16_t* spriteram, int& sx, int& sy, int& number, int& color, int& color_effect, int& attr, int& high_priotiy, int &end) override; diff --git a/src/mame/gaelco/gaelcof3.cpp b/src/mame/gaelco/gaelcof3.cpp index 379ad789beb..d5f6265c8fc 100644 --- a/src/mame/gaelco/gaelcof3.cpp +++ b/src/mame/gaelco/gaelcof3.cpp @@ -99,7 +99,7 @@ INPUT_PORTS_END void gaelcof3_state::gaelcof3(machine_config &config) { - PIC16C56(config, m_maincpu, 4000000); // clock not confirmed + PIC16C56(config, m_maincpu, XTAL::u(4000000)); // clock not confirmed m_maincpu->read_a().set_ioport("IN0"); m_maincpu->write_a().set([this] (uint8_t data) { logerror("port A write: %02x\n", data); }); m_maincpu->read_b().set_ioport("DSW1"); @@ -107,7 +107,7 @@ void gaelcof3_state::gaelcof3(machine_config &config) SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock and pin not confirmed + OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock and pin not confirmed } diff --git a/src/mame/gaelco/gaelcopc.cpp b/src/mame/gaelco/gaelcopc.cpp index b3762621ec1..7c0aca9c14b 100644 --- a/src/mame/gaelco/gaelcopc.cpp +++ b/src/mame/gaelco/gaelcopc.cpp @@ -74,7 +74,7 @@ INPUT_PORTS_END void gaelcopc_state::gaelcopc(machine_config &config) { /* basic machine hardware */ - PENTIUM(config, m_maincpu, 2000000000); /* Pentium4? */ + PENTIUM(config, m_maincpu, XTAL::u(2000000000)); /* Pentium4? */ m_maincpu->set_addrmap(AS_PROGRAM, &gaelcopc_state::gaelcopc_map); /* video hardware */ diff --git a/src/mame/gaelco/gaelcrpt.cpp b/src/mame/gaelco/gaelcrpt.cpp index 786baf00c6f..3855b1a2da1 100644 --- a/src/mame/gaelco/gaelcrpt.cpp +++ b/src/mame/gaelco/gaelcrpt.cpp @@ -17,7 +17,7 @@ TODO: the device must be able to know a 32-bit write was from the same DEFINE_DEVICE_TYPE(GAELCO_VRAM_ENCRYPTION, gaelco_vram_encryption_device, "gaelco_vram_crypt", "Gaelco VRAM Encryption") -gaelco_vram_encryption_device::gaelco_vram_encryption_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gaelco_vram_encryption_device::gaelco_vram_encryption_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAELCO_VRAM_ENCRYPTION, tag, owner, clock), m_param1(0), m_param2(0) diff --git a/src/mame/gaelco/gaelcrpt.h b/src/mame/gaelco/gaelcrpt.h index a6c987a3709..7b525853b67 100644 --- a/src/mame/gaelco/gaelcrpt.h +++ b/src/mame/gaelco/gaelcrpt.h @@ -13,7 +13,7 @@ class gaelco_vram_encryption_device : public device_t { public: // construction/destruction - gaelco_vram_encryption_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gaelco_vram_encryption_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(uint8_t param1, uint16_t param2) { m_param1 = param1; m_param2 = param2; } diff --git a/src/mame/gaelco/goldart.cpp b/src/mame/gaelco/goldart.cpp index ada14631051..d9c6784592c 100644 --- a/src/mame/gaelco/goldart.cpp +++ b/src/mame/gaelco/goldart.cpp @@ -322,7 +322,7 @@ void goldart_state::machine_reset() void goldart_state::goldart(machine_config &config) { /* basic machine hardware */ - ds5002fp_device &mcu(DS5002FP(config, "mcu", 12000000)); + ds5002fp_device &mcu(DS5002FP(config, "mcu", XTAL::u(12000000))); mcu.set_addrmap(AS_PROGRAM, &goldart_state::dallas_rom); mcu.set_addrmap(AS_IO, &goldart_state::dallas_ram); mcu.set_vblank_int("screen", FUNC(goldart_state::irq0_line_hold)); @@ -346,7 +346,7 @@ void goldart_state::goldart(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } /* Different versions of the internal code exist (0x6000-0x6fff code is VERY different between them) diff --git a/src/mame/gaelco/mastboy.cpp b/src/mame/gaelco/mastboy.cpp index 5dba8a268da..bb4df6701b0 100644 --- a/src/mame/gaelco/mastboy.cpp +++ b/src/mame/gaelco/mastboy.cpp @@ -825,9 +825,9 @@ void mastboy_state::mastboy(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SAA1099(config, "saa", 6000000).add_route(ALL_OUTPUTS, "mono", 0.50); + SAA1099(config, "saa", XTAL::u(6000000)).add_route(ALL_OUTPUTS, "mono", 0.50); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(mastboy_state::adpcm_int)); // interrupt function m_msm->set_prescaler_selector(msm5205_device::SEX_4B); // 4KHz 4-bit m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/gaelco/rollext.cpp b/src/mame/gaelco/rollext.cpp index 2946ac217c3..ab3d00a8dcb 100644 --- a/src/mame/gaelco/rollext.cpp +++ b/src/mame/gaelco/rollext.cpp @@ -748,12 +748,12 @@ void rollext_state::machine_start() void rollext_state::rollext(machine_config &config) { - TMS32082_MP(config, m_maincpu, 60000000); + TMS32082_MP(config, m_maincpu, XTAL::u(60000000)); m_maincpu->set_addrmap(AS_PROGRAM, &rollext_state::memmap); m_maincpu->set_vblank_int("screen", FUNC(rollext_state::vblank_interrupt)); //m_maincpu->set_periodic_int(FUNC(rollext_state::irq3_line_assert), attotime::from_hz(500)); - tms32082_pp_device &pp0(TMS32082_PP(config, "pp0", 60000000)); + tms32082_pp_device &pp0(TMS32082_PP(config, "pp0", XTAL::u(60000000))); pp0.set_addrmap(AS_PROGRAM, &rollext_state::memmap); config.set_maximum_quantum(attotime::from_hz(100)); diff --git a/src/mame/gaelco/wrally.cpp b/src/mame/gaelco/wrally.cpp index 110f99f6926..e305bf4550f 100644 --- a/src/mame/gaelco/wrally.cpp +++ b/src/mame/gaelco/wrally.cpp @@ -552,7 +552,7 @@ void wrally_state::wrally(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_wrally); PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 1024*8); - GAELCO_WRALLY_SPRITES(config, m_sprites, 0); + GAELCO_WRALLY_SPRITES(config, m_sprites); m_sprites->set_gfxdecode_tag("gfxdecode"); m_sprites->set_screen_tag("screen"); diff --git a/src/mame/gaelco/xorworld.cpp b/src/mame/gaelco/xorworld.cpp index 721c2c768da..754cfc546a3 100644 --- a/src/mame/gaelco/xorworld.cpp +++ b/src/mame/gaelco/xorworld.cpp @@ -311,7 +311,7 @@ GFXDECODE_END void xorworld_state::xorworld(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10'000'000); // 10 MHz + M68000(config, m_maincpu, XTAL::u(10'000'000)); // 10 MHz m_maincpu->set_addrmap(AS_PROGRAM, &xorworld_state::prg_map); //m_maincpu->set_vblank_int("screen", FUNC(xorworld_state::irq6_line_assert)); // irq 4 or 6 //m_maincpu->set_periodic_int(FUNC(xorworld_state::irq2_line_assert), attotime::from_hz(3 * 60)); //timed irq, unknown timing @@ -342,7 +342,7 @@ void xorworld_state::xorworld(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SAA1099(config, "saa", 8'000'000).add_route(ALL_OUTPUTS, "mono", 1.0); // guessed clock + SAA1099(config, "saa", XTAL::u(8'000'000)).add_route(ALL_OUTPUTS, "mono", 1.0); // guessed clock } diff --git a/src/mame/galaxian/dambustr.cpp b/src/mame/galaxian/dambustr.cpp index 7efb12fa2fe..8916cd23e2b 100644 --- a/src/mame/galaxian/dambustr.cpp +++ b/src/mame/galaxian/dambustr.cpp @@ -264,13 +264,13 @@ void dambustr_state::init_dambustr() void dambustr_state::dambustr(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */ + Z80(config, m_maincpu, XTAL::u(18432000)/6); /* 3.072 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &dambustr_state::dambustr_map); MCFG_MACHINE_RESET_OVERRIDE(dambustr_state,galaxold) - TTL7474(config, "7474_9m_1", 0).output_cb().set(FUNC(dambustr_state::galaxold_7474_9m_1_callback)); - TTL7474(config, "7474_9m_2", 0).comp_output_cb().set(FUNC(dambustr_state::galaxold_7474_9m_2_q_callback)); + TTL7474(config, "7474_9m_1").output_cb().set(FUNC(dambustr_state::galaxold_7474_9m_1_callback)); + TTL7474(config, "7474_9m_2").comp_output_cb().set(FUNC(dambustr_state::galaxold_7474_9m_2_q_callback)); TIMER(config, "int_timer").configure_generic(FUNC(dambustr_state::galaxold_interrupt_timer)); diff --git a/src/mame/galaxian/galaxian.cpp b/src/mame/galaxian/galaxian.cpp index b27e7d409b8..0cf0352e7ee 100644 --- a/src/mame/galaxian/galaxian.cpp +++ b/src/mame/galaxian/galaxian.cpp @@ -7499,7 +7499,7 @@ void galaxian_state::konami_sound_1x_ay8910(machine_config &config) m_ay8910[0]->add_route(1, "konami", 1.0, 1); m_ay8910[0]->add_route(2, "konami", 1.0, 2); - NETLIST_SOUND(config, "konami", 48000) + NETLIST_SOUND(config, "konami", XTAL::u(48000)) .set_source(netlist_konami1x) .add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -7546,7 +7546,7 @@ void galaxian_state::konami_sound_2x_ay8910(machine_config &config) m_ay8910[1]->add_route(1, "konami", 1.0, 4); m_ay8910[1]->add_route(2, "konami", 1.0, 5); - NETLIST_SOUND(config, "konami", 48000) + NETLIST_SOUND(config, "konami", XTAL::u(48000)) .set_source(netlist_konami2x) .add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -7598,7 +7598,7 @@ void galaxian_state::galaxian(machine_config &config) { galaxian_base(config); - GALAXIAN_SOUND(config, "cust", 0); + GALAXIAN_SOUND(config, "cust"); } void galaxian_state::galartic(machine_config &config) @@ -7724,7 +7724,7 @@ void galaxian_state::mooncrst(machine_config &config) // alternate memory map m_maincpu->set_addrmap(AS_PROGRAM, &galaxian_state::mooncrst_map); - MOONCRST_SOUND(config, "cust", 0); + MOONCRST_SOUND(config, "cust"); } void galaxian_state::eagle(machine_config &config) @@ -7788,12 +7788,12 @@ void bmxstunts_state::bmxstunts(machine_config &config) { galaxian_base(config); - M6502(config.replace(), m_maincpu, 3'072'000 / 2); // Synertek 6502A, TODO: verify clock + M6502(config.replace(), m_maincpu, XTAL::u(3'072'000) / 2); // Synertek 6502A, TODO: verify clock m_maincpu->set_addrmap(AS_PROGRAM, &bmxstunts_state::bmxstunts_map); set_irq_line(0); - SN76489A(config, m_snsnd, 3'072'000); // SN76489AN, TODO: verify clock + SN76489A(config, m_snsnd, XTAL::u(3'072'000)); // SN76489AN, TODO: verify clock m_snsnd->add_route(ALL_OUTPUTS, "speaker", 0.5); } @@ -7899,7 +7899,7 @@ void galaxian_state::checkman(machine_config &config) mooncrst(config); /* basic machine hardware */ - Z80(config, m_audiocpu, 1620000); /* 1.62 MHz */ + Z80(config, m_audiocpu, XTAL::u(1620000)); /* 1.62 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &galaxian_state::checkman_sound_map); m_audiocpu->set_addrmap(AS_IO, &galaxian_state::checkman_sound_portmap); m_audiocpu->set_vblank_int("screen", FUNC(galaxian_state::irq0_line_hold)); /* NMIs are triggered by the main CPU */ @@ -7907,7 +7907,7 @@ void galaxian_state::checkman(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); /* sound hardware */ - AY8910(config, m_ay8910[0], 1789750).add_route(ALL_OUTPUTS, "speaker", 0.5); + AY8910(config, m_ay8910[0], XTAL::u(1789750)).add_route(ALL_OUTPUTS, "speaker", 0.5); } @@ -7918,7 +7918,7 @@ void galaxian_state::checkmaj(machine_config &config) // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &galaxian_state::galaxian_map_base); // no discrete sound - Z80(config, m_audiocpu, 1620000); + Z80(config, m_audiocpu, XTAL::u(1620000)); m_audiocpu->set_addrmap(AS_PROGRAM, &galaxian_state::checkmaj_sound_map); TIMER(config, "irq0").configure_scanline(FUNC(galaxian_state::checkmaj_irq0_gen), "screen", 0, 8); @@ -7926,7 +7926,7 @@ void galaxian_state::checkmaj(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); // sound hardware - AY8910(config, m_ay8910[0], 1620000); + AY8910(config, m_ay8910[0], XTAL::u(1620000)); m_ay8910[0]->port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); m_ay8910[0]->add_route(ALL_OUTPUTS, "speaker", 2); } @@ -7956,14 +7956,14 @@ void kingball_state::kingball(machine_config &config) // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &kingball_state::kingball_map); - Z80(config, m_audiocpu, 5000000/2); + Z80(config, m_audiocpu, XTAL::u(5000000)/2); m_audiocpu->set_addrmap(AS_PROGRAM, &kingball_state::kingball_sound_map); m_audiocpu->set_addrmap(AS_IO, &kingball_state::kingball_sound_portmap); GENERIC_LATCH_8(config, m_soundlatch); // sound hardware - DAC_4BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.53); // unknown DAC + DAC_4BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.53); // unknown DAC } @@ -8241,7 +8241,7 @@ void nihon_sfx_state::sfx(machine_config &config) m_screen->set_raw(GALAXIAN_PIXEL_CLOCK, GALAXIAN_HTOTAL, GALAXIAN_HBEND + 3 * 8 * GALAXIAN_XSCALE, GALAXIAN_HBSTART - 2 * 8 * GALAXIAN_XSCALE, GALAXIAN_VTOTAL, GALAXIAN_VBEND, GALAXIAN_VBSTART); /* DAC for the sample player */ - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // 16-pin IC (not identified by schematics) + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 1.0); // 16-pin IC (not identified by schematics) } @@ -8276,7 +8276,7 @@ void monsterz_state::monsterz(machine_config &config) }); /* DAC for the sample player */ - DAC_8BIT_R2R(config, m_dac2, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // TODO: check dac type + DAC_8BIT_R2R(config, m_dac2).add_route(ALL_OUTPUTS, "speaker", 1.0); // TODO: check dac type } @@ -8336,7 +8336,7 @@ void sbhoei_state::sbhoei(machine_config &config) SP0250(config, m_sp0250, 3.12_MHz_XTAL).add_route(ALL_OUTPUTS, "speaker", 1.0); - SBHOEI_SOUND(config, "cust", 0); + SBHOEI_SOUND(config, "cust"); } diff --git a/src/mame/galaxian/galaxian_a.cpp b/src/mame/galaxian/galaxian_a.cpp index ef7486a29f5..ca967f8b6e5 100644 --- a/src/mame/galaxian/galaxian_a.cpp +++ b/src/mame/galaxian/galaxian_a.cpp @@ -606,23 +606,23 @@ DEFINE_DEVICE_TYPE(GALAXIAN_SOUND, galaxian_sound_device, "galaxian_sound", "Gal DEFINE_DEVICE_TYPE(MOONCRST_SOUND, mooncrst_sound_device, "mooncrst_sound", "Moon Cresta Custom Sound") DEFINE_DEVICE_TYPE(SBHOEI_SOUND, sbhoei_sound_device, "sbhoei_sound", "Space Battle Custom Sound") -galaxian_sound_device::galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +galaxian_sound_device::galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : galaxian_sound_device(mconfig, GALAXIAN_SOUND, tag, owner, clock) { } -galaxian_sound_device::galaxian_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +galaxian_sound_device::galaxian_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_discrete(*this, "discrete") { } -mooncrst_sound_device::mooncrst_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mooncrst_sound_device::mooncrst_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : galaxian_sound_device(mconfig, MOONCRST_SOUND, tag, owner, clock) { } -sbhoei_sound_device::sbhoei_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sbhoei_sound_device::sbhoei_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : galaxian_sound_device(mconfig, SBHOEI_SOUND, tag, owner, clock) { } diff --git a/src/mame/galaxian/galaxian_a.h b/src/mame/galaxian/galaxian_a.h index e64bb8bef7e..e63c80b5453 100644 --- a/src/mame/galaxian/galaxian_a.h +++ b/src/mame/galaxian/galaxian_a.h @@ -10,7 +10,7 @@ class galaxian_sound_device : public device_t { public: - galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + galaxian_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void pitch_w(uint8_t data); void vol_w(offs_t offset, uint8_t data); @@ -21,7 +21,7 @@ public: void sound_w(offs_t offset, uint8_t data); protected: - galaxian_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + galaxian_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -37,7 +37,7 @@ private: class mooncrst_sound_device : public galaxian_sound_device { public: - mooncrst_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mooncrst_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -47,7 +47,7 @@ protected: class sbhoei_sound_device : public galaxian_sound_device { public: - sbhoei_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sbhoei_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void noise1_enable_w(offs_t offset, uint8_t data); void noise2_enable_w(offs_t offset, uint8_t data); diff --git a/src/mame/galaxian/galaxold.cpp b/src/mame/galaxian/galaxold.cpp index caad315e73d..5583ea5249d 100644 --- a/src/mame/galaxian/galaxold.cpp +++ b/src/mame/galaxian/galaxold.cpp @@ -1550,10 +1550,10 @@ void galaxold_state::galaxold_base(machine_config &config) MCFG_MACHINE_RESET_OVERRIDE(galaxold_state,galaxold) - TTL7474(config, m_7474_9m_1, 0); + TTL7474(config, m_7474_9m_1); m_7474_9m_1->output_cb().set(FUNC(galaxold_state::galaxold_7474_9m_1_callback)); - TTL7474(config, m_7474_9m_2, 0); + TTL7474(config, m_7474_9m_2); m_7474_9m_2->comp_output_cb().set(FUNC(galaxold_state::galaxold_7474_9m_2_q_callback)); TIMER(config, "int_timer").configure_generic(FUNC(galaxold_state::galaxold_interrupt_timer)); @@ -1577,12 +1577,12 @@ void galaxold_state::galaxold_base(machine_config &config) void galaxold_state::galaxian_audio(machine_config &config) { - GALAXIAN_SOUND(config, "cust", 0); + GALAXIAN_SOUND(config, "cust"); } void galaxold_state::mooncrst_audio(machine_config &config) { - MOONCRST_SOUND(config, "cust", 0); + MOONCRST_SOUND(config, "cust"); } diff --git a/src/mame/galaxian/scobra.cpp b/src/mame/galaxian/scobra.cpp index ab627c1e4a4..07421d55e43 100644 --- a/src/mame/galaxian/scobra.cpp +++ b/src/mame/galaxian/scobra.cpp @@ -883,15 +883,15 @@ INPUT_PORTS_END void scobra_state::type1(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */ + Z80(config, m_maincpu, XTAL::u(18432000)/6); /* 3.072 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::type1_map); - Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */ + Z80(config, m_audiocpu, XTAL::u(14318000)/8); /* 1.78975 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &scobra_state::scobra_sound_map); m_audiocpu->set_addrmap(AS_IO, &scobra_state::scobra_sound_io_map); m_audiocpu->set_irq_acknowledge_callback(FUNC(scramble_state::scramble_sh_irq_callback)); - ttl7474_device &konami_7474(TTL7474(config, "konami_7474", 0)); + ttl7474_device &konami_7474(TTL7474(config, "konami_7474")); konami_7474.comp_output_cb().set(FUNC(scobra_state::scramble_sh_7474_q_callback)); MCFG_MACHINE_RESET_OVERRIDE(scobra_state,scramble) @@ -905,10 +905,10 @@ void scobra_state::type1(machine_config &config) m_ppi8255_1->out_pa_callback().set(m_soundlatch, FUNC(generic_latch_8_device::write)); m_ppi8255_1->out_pb_callback().set(FUNC(scramble_state::scramble_sh_irqtrigger_w)); - ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0)); + ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1")); ttl7474_9m_1.output_cb().set(FUNC(scobra_state::galaxold_7474_9m_1_callback)); - ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2", 0)); + ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2")); ttl7474_9m_2.comp_output_cb().set(FUNC(scobra_state::galaxold_7474_9m_2_q_callback)); TIMER(config, "int_timer").configure_generic(FUNC(scobra_state::galaxold_interrupt_timer)); @@ -934,9 +934,9 @@ void scobra_state::type1(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "ay1", 14318000/8).add_route(ALL_OUTPUTS, "mono", 0.16); + AY8910(config, "ay1", XTAL::u(14318000)/8).add_route(ALL_OUTPUTS, "mono", 0.16); - ay8910_device &ay2(AY8910(config, "ay2", 14318000/8)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(14318000)/8)); ay2.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); ay2.port_b_read_callback().set(FUNC(scramble_state::scramble_portB_r)); ay2.add_route(ALL_OUTPUTS, "mono", 0.16); @@ -992,15 +992,15 @@ void scobra_state::minefldfe(machine_config &config) void scobra_state::mimonkeyug(machine_config &config) { - Z80(config, m_maincpu, 18432000/6); + Z80(config, m_maincpu, XTAL::u(18432000)/6); m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::mimonkeyug_map); MCFG_MACHINE_RESET_OVERRIDE(scobra_state,scramble) - ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0)); + ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1")); ttl7474_9m_1.output_cb().set(FUNC(scobra_state::galaxold_7474_9m_1_callback)); - ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2", 0)); + ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2")); ttl7474_9m_2.comp_output_cb().set(FUNC(scobra_state::galaxold_7474_9m_2_q_callback)); TIMER(config, "int_timer").configure_generic(FUNC(scobra_state::galaxold_interrupt_timer)); @@ -1076,23 +1076,23 @@ void scobra_state::darkplnt(machine_config &config) void scobra_state::hustler(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */ + Z80(config, m_maincpu, XTAL::u(18432000)/6); /* 3.072 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::hustler_map); - Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */ + Z80(config, m_audiocpu, XTAL::u(14318000)/8); /* 1.78975 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &scobra_state::hustler_sound_map); m_audiocpu->set_addrmap(AS_IO, &scobra_state::hustler_sound_io_map); m_audiocpu->set_irq_acknowledge_callback(FUNC(scramble_state::scramble_sh_irq_callback)); - ttl7474_device &konami_7474(TTL7474(config, "konami_7474", 0)); + ttl7474_device &konami_7474(TTL7474(config, "konami_7474")); konami_7474.comp_output_cb().set(FUNC(scobra_state::scramble_sh_7474_q_callback)); MCFG_MACHINE_RESET_OVERRIDE(scobra_state,scramble) - ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0)); + ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1")); ttl7474_9m_1.output_cb().set(FUNC(scobra_state::galaxold_7474_9m_1_callback)); - ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2", 0)); + ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2")); ttl7474_9m_2.comp_output_cb().set(FUNC(scobra_state::galaxold_7474_9m_2_q_callback)); TIMER(config, "int_timer").configure_generic(FUNC(scobra_state::galaxold_interrupt_timer)); @@ -1126,7 +1126,7 @@ void scobra_state::hustler(machine_config &config) SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, m_soundlatch); - ay8910_device &aysnd(AY8910(config, "aysnd", 14318000/8)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(14318000)/8)); aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); aysnd.port_b_read_callback().set(FUNC(scramble_state::hustler_portB_r)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.33); diff --git a/src/mame/galaxian/scramble.cpp b/src/mame/galaxian/scramble.cpp index 54b89e18cbc..ebeedf9a88e 100644 --- a/src/mame/galaxian/scramble.cpp +++ b/src/mame/galaxian/scramble.cpp @@ -1165,21 +1165,21 @@ GFXDECODE_END void scramble_state::scramble(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */ + Z80(config, m_maincpu, XTAL::u(18432000)/6); /* 3.072 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::scramble_map); - Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */ + Z80(config, m_audiocpu, XTAL::u(14318000)/8); /* 1.78975 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &scramble_state::scramble_sound_map); m_audiocpu->set_addrmap(AS_IO, &scramble_state::scramble_sound_io_map); m_audiocpu->set_irq_acknowledge_callback(FUNC(scramble_state::scramble_sh_irq_callback)); - ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0)); + ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1")); ttl7474_9m_1.output_cb().set(FUNC(scramble_state::galaxold_7474_9m_1_callback)); - ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2", 0)); + ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2")); ttl7474_9m_2.comp_output_cb().set(FUNC(scramble_state::galaxold_7474_9m_2_q_callback)); - ttl7474_device &konami_7474(TTL7474(config, "konami_7474", 0)); + ttl7474_device &konami_7474(TTL7474(config, "konami_7474")); konami_7474.comp_output_cb().set(FUNC(scramble_state::scramble_sh_7474_q_callback)); TIMER(config, "int_timer").configure_generic(FUNC(scramble_state::galaxold_interrupt_timer)); @@ -1216,9 +1216,9 @@ void scramble_state::scramble(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "8910.1", 14318000/8).add_route(ALL_OUTPUTS, "mono", 0.16); + AY8910(config, "8910.1", XTAL::u(14318000)/8).add_route(ALL_OUTPUTS, "mono", 0.16); - ay8910_device &ay2(AY8910(config, "8910.2", 14318000/8)); + ay8910_device &ay2(AY8910(config, "8910.2", XTAL::u(14318000)/8)); ay2.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); ay2.port_b_read_callback().set(FUNC(scramble_state::scramble_portB_r)); ay2.add_route(ALL_OUTPUTS, "mono", 0.16); @@ -1347,7 +1347,7 @@ void scramble_state::triplep(machine_config &config) m_palette->set_init(FUNC(scramble_state::galaxold_palette)); /* sound hardware */ - subdevice("8910.1")->set_clock(18432000/12); // triple punch/knock out ay clock is 1.535MHz, derived from main cpu xtal; verified on hardware + subdevice("8910.1")->set_clock(XTAL::u(18432000)/12); // triple punch/knock out ay clock is 1.535MHz, derived from main cpu xtal; verified on hardware subdevice("8910.1")->reset_routes().add_route(ALL_OUTPUTS, "mono", 1.0); config.device_remove("8910.2"); @@ -1370,7 +1370,7 @@ void scramble_state::hunchbks(machine_config &config) scramble(config); /* basic machine hardware */ - s2650_device &maincpu(S2650(config.replace(), m_maincpu, 18432000/6)); + s2650_device &maincpu(S2650(config.replace(), m_maincpu, XTAL::u(18432000)/6)); maincpu.set_addrmap(AS_PROGRAM, &scramble_state::hunchbks_map); maincpu.set_addrmap(AS_IO, &scramble_state::hunchbks_readport); maincpu.sense_handler().set("screen", FUNC(screen_device::vblank)); @@ -1389,7 +1389,7 @@ void scramble_state::hncholms(machine_config &config) hunchbks(config); /* basic machine hardware */ - m_maincpu->set_clock(18432000/6/2/2); + m_maincpu->set_clock(XTAL::u(18432000)/6/2/2); MCFG_VIDEO_START_OVERRIDE(scramble_state,scorpion) } @@ -1397,16 +1397,16 @@ void scramble_state::hncholms(machine_config &config) void scramble_state::ad2083(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */ + Z80(config, m_maincpu, XTAL::u(18432000)/6); /* 3.072 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::ad2083_map); - ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0)); + ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1")); ttl7474_9m_1.output_cb().set(FUNC(scramble_state::galaxold_7474_9m_1_callback)); - ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2", 0)); + ttl7474_device &ttl7474_9m_2(TTL7474(config, "7474_9m_2")); ttl7474_9m_2.comp_output_cb().set(FUNC(scramble_state::galaxold_7474_9m_2_q_callback)); - ttl7474_device &konami_7474(TTL7474(config, "konami_7474", 0)); + ttl7474_device &konami_7474(TTL7474(config, "konami_7474")); konami_7474.comp_output_cb().set(FUNC(scramble_state::scramble_sh_7474_q_callback)); TIMER(config, "int_timer").configure_generic(FUNC(scramble_state::galaxold_interrupt_timer)); @@ -1450,12 +1450,12 @@ void scramble_state::harem(machine_config &config) MCFG_VIDEO_START_OVERRIDE(scramble_state,harem) /* extra AY8910 with I/O ports */ - ay8910_device &ay3(AY8910(config, "8910.3", 14318000/8)); + ay8910_device &ay3(AY8910(config, "8910.3", XTAL::u(14318000)/8)); ay3.add_route(ALL_OUTPUTS, "mono", 0.16); ay3.port_a_write_callback().set(m_digitalker, FUNC(digitalker_device::digitalker_data_w)); ay3.port_b_write_callback().set(FUNC(scramble_state::harem_digitalker_control_w)); - DIGITALKER(config, m_digitalker, 4000000).add_route(ALL_OUTPUTS, "mono", 0.16); + DIGITALKER(config, m_digitalker, XTAL::u(4000000)).add_route(ALL_OUTPUTS, "mono", 0.16); } /*************************************************************************** diff --git a/src/mame/galaxian/scramble_a.cpp b/src/mame/galaxian/scramble_a.cpp index 35b11032d2e..7616cde9f99 100644 --- a/src/mame/galaxian/scramble_a.cpp +++ b/src/mame/galaxian/scramble_a.cpp @@ -265,7 +265,7 @@ void scramble_state::ad2083_sound_io_map(address_map &map) void scramble_state::ad2083_audio(machine_config &config) { - Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */ + Z80(config, m_audiocpu, XTAL::u(14318000)/8); /* 1.78975 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &scramble_state::ad2083_sound_map); m_audiocpu->set_addrmap(AS_IO, &scramble_state::ad2083_sound_io_map); @@ -287,11 +287,11 @@ void scramble_state::ad2083_audio(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ay8910_device &ay1(AY8910(config, "ay1", 14318000/8)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(14318000)/8)); ay1.port_a_read_callback().set(FUNC(scramble_state::scramble_portB_r)); ay1.add_route(ALL_OUTPUTS, "mono", 1.0); - ay8910_device &ay2(AY8910(config, "ay2", 14318000/8)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(14318000)/8)); ay2.port_a_read_callback().set(FUNC(scramble_state::hotshock_soundlatch_r)); ay2.add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/gamepark/gp2x.cpp b/src/mame/gamepark/gp2x.cpp index 9a422e0dc9d..510abe9729f 100644 --- a/src/mame/gamepark/gp2x.cpp +++ b/src/mame/gamepark/gp2x.cpp @@ -363,7 +363,7 @@ INPUT_PORTS_END void gp2x_state::gp2x(machine_config &config) { - ARM9(config, m_maincpu, 80000000); + ARM9(config, m_maincpu, XTAL::u(80000000)); m_maincpu->set_addrmap(AS_PROGRAM, &gp2x_state::gp2x_map); PALETTE(config, "palette").set_entries(32768); diff --git a/src/mame/gamepark/gp32.cpp b/src/mame/gamepark/gp32.cpp index 2a84059509f..1b98ab178d5 100644 --- a/src/mame/gamepark/gp32.cpp +++ b/src/mame/gamepark/gp32.cpp @@ -308,7 +308,7 @@ uint32_t gp32_state::s3c240x_lcd_r(offs_t offset) void gp32_state::s3c240x_lcd_configure() { - uint32_t vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk; + uint32_t vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval; double framerate, vclk; rectangle visarea; vspw = BITS( m_s3c240x_lcd_regs[1], 5, 0); @@ -320,9 +320,9 @@ void gp32_state::s3c240x_lcd_configure() hfpd = BITS( m_s3c240x_lcd_regs[2], 7, 0); hozval = BITS( m_s3c240x_lcd_regs[2], 18, 8); clkval = BITS( m_s3c240x_lcd_regs[0], 17, 8); - hclk = s3c240x_get_hclk(MPLLCON); - LOGMASKED(LOG_VRAM, "LCD - vspw %d vbpd %d lineval %d vfpd %d hspw %d hbpd %d hfpd %d hozval %d clkval %d hclk %d\n", vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk); - vclk = (double)(hclk / ((clkval + 1) * 2)); + XTAL hclk = s3c240x_get_hclk(MPLLCON); + LOGMASKED(LOG_VRAM, "LCD - vspw %d vbpd %d lineval %d vfpd %d hspw %d hbpd %d hfpd %d hozval %d clkval %d hclk %d\n", vspw, vbpd, lineval, vfpd, hspw, hbpd, hfpd, hozval, clkval, hclk.value()); + vclk = hclk.dvalue() / ((clkval + 1) * 2); LOGMASKED(LOG_VRAM, "LCD - vclk %f\n", vclk); framerate = vclk / (((vspw + 1) + (vbpd + 1) + (lineval + 1) + (vfpd + 1)) * ((hspw + 1) + (hbpd + 1) + (hfpd + 1) + (hozval + 1))); LOGMASKED(LOG_VRAM, "LCD - framerate %f\n", framerate); @@ -400,17 +400,17 @@ void gp32_state::s3c240x_lcd_palette_w(offs_t offset, uint32_t data, uint32_t me // CLOCK & POWER MANAGEMENT -uint32_t gp32_state::s3c240x_get_fclk(int reg) +XTAL gp32_state::s3c240x_get_fclk(int reg) { uint32_t data, mdiv, pdiv, sdiv; data = m_s3c240x_clkpow_regs[reg]; // MPLLCON or UPLLCON mdiv = BITS( data, 19, 12); pdiv = BITS( data, 9, 4); sdiv = BITS( data, 1, 0); - return (uint32_t)((double)((mdiv + 8) * 12000000) / (double)((pdiv + 2) * (1 << sdiv))); + return XTAL::u(12000000) * ((mdiv + 8) << sdiv) / (pdiv + 2); } -uint32_t gp32_state::s3c240x_get_hclk(int reg) +XTAL gp32_state::s3c240x_get_hclk(int reg) { switch (m_s3c240x_clkpow_regs[5] & 0x3) // CLKDIVN { @@ -419,10 +419,10 @@ uint32_t gp32_state::s3c240x_get_hclk(int reg) case 2 : return s3c240x_get_fclk(reg) / 2; case 3 : return s3c240x_get_fclk(reg) / 2; } - return 0; + return XTAL(); } -uint32_t gp32_state::s3c240x_get_pclk(int reg) +XTAL gp32_state::s3c240x_get_pclk(int reg) { switch (m_s3c240x_clkpow_regs[5] & 0x3) // CLKDIVN { @@ -431,7 +431,7 @@ uint32_t gp32_state::s3c240x_get_pclk(int reg) case 2 : return s3c240x_get_fclk(reg) / 2; case 3 : return s3c240x_get_fclk(reg) / 4; } - return 0; + return XTAL(); } uint32_t gp32_state::s3c240x_clkpow_r(offs_t offset) @@ -570,11 +570,11 @@ void gp32_state::s3c240x_pwm_start(int timer) static const int tcon_shift[] = { 0, 8, 12, 16, 20 }; const uint32_t *regs = &m_s3c240x_pwm_regs[3+timer*3]; uint32_t prescaler, mux, cnt, cmp, auto_reload; - double freq, hz; + double hz; LOGMASKED(LOG_STARTSTOP, "PWM %d start\n", timer); prescaler = (m_s3c240x_pwm_regs[0] >> prescaler_shift[timer]) & 0xFF; mux = (m_s3c240x_pwm_regs[1] >> mux_shift[timer]) & 0x0F; - freq = s3c240x_get_pclk(MPLLCON) / (prescaler + 1) / mux_table[mux]; + XTAL freq = s3c240x_get_pclk(MPLLCON) / (prescaler + 1) / mux_table[mux]; cnt = BITS( regs[0], 15, 0); if (timer != 4) { @@ -586,8 +586,8 @@ void gp32_state::s3c240x_pwm_start(int timer) cmp = 0; auto_reload = BIT( m_s3c240x_pwm_regs[2], tcon_shift[timer] + 2); } - hz = freq / (cnt - cmp + 1); - LOGMASKED(LOG_MISC, "PWM %d - FCLK=%d HCLK=%d PCLK=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, s3c240x_get_fclk(MPLLCON), s3c240x_get_hclk(MPLLCON), s3c240x_get_pclk(MPLLCON), prescaler, mux_table[mux], freq, cnt, cmp, auto_reload, hz); + hz = freq.dvalue() / (cnt - cmp + 1); + LOGMASKED(LOG_MISC, "PWM %d - FCLK=%d HCLK=%d PCLK=%d prescaler=%d div=%d freq=%f cnt=%d cmp=%d auto_reload=%d hz=%f\n", timer, s3c240x_get_fclk(MPLLCON).value(), s3c240x_get_hclk(MPLLCON).value(), s3c240x_get_pclk(MPLLCON).value(), prescaler, mux_table[mux], freq.value(), cnt, cmp, auto_reload, hz); if (auto_reload) { m_s3c240x_pwm_timer[timer]->adjust( attotime::from_hz( hz), timer, attotime::from_hz( hz)); @@ -1456,8 +1456,8 @@ void gp32_state::s3c240x_iis_start() prescaler_control_a = BITS( m_s3c240x_iis_regs[2], 9, 5); prescaler_control_b = BITS( m_s3c240x_iis_regs[2], 4, 0); codeclk = BIT( m_s3c240x_iis_regs[1], 2); - freq = (double)(s3c240x_get_pclk(MPLLCON) / (prescaler_control_a + 1) / codeclk_table[codeclk]) * 2; // why do I have to multiply by two? - LOGMASKED(LOG_MISC, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", s3c240x_get_pclk(MPLLCON), prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq); + freq = s3c240x_get_pclk(MPLLCON).dvalue() / (prescaler_control_a + 1) / codeclk_table[codeclk] * 2; // why do I have to multiply by two? + LOGMASKED(LOG_MISC, "IIS - pclk %d psc_enable %d psc_a %d psc_b %d codeclk %d freq %f\n", s3c240x_get_pclk(MPLLCON).value(), prescaler_enable, prescaler_control_a, prescaler_control_b, codeclk_table[codeclk], freq); m_s3c240x_iis_timer->adjust( attotime::from_hz( freq), 0, attotime::from_hz( freq)); } @@ -1684,7 +1684,7 @@ void gp32_state::machine_reset() void gp32_state::gp32(machine_config &config) { - ARM9(config, m_maincpu, 40000000); + ARM9(config, m_maincpu, XTAL::u(40000000)); m_maincpu->set_addrmap(AS_PROGRAM, &gp32_state::gp32_map); PALETTE(config, m_palette).set_entries(32768); @@ -1700,12 +1700,12 @@ void gp32_state::gp32(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - SMARTMEDIA(config, m_smartmedia, 0); + SMARTMEDIA(config, m_smartmedia); SOFTWARE_LIST(config, "memc_list").set_original("gp32"); } diff --git a/src/mame/gamepark/gp32.h b/src/mame/gamepark/gp32.h index e93e605c169..8b5479c0cc8 100644 --- a/src/mame/gamepark/gp32.h +++ b/src/mame/gamepark/gp32.h @@ -207,9 +207,9 @@ private: required_device m_screen; required_device m_palette; - uint32_t s3c240x_get_fclk(int reg); - uint32_t s3c240x_get_hclk(int reg); - uint32_t s3c240x_get_pclk(int reg); + XTAL s3c240x_get_fclk(int reg); + XTAL s3c240x_get_hclk(int reg); + XTAL s3c240x_get_pclk(int reg); void s3c240x_lcd_dma_reload(); void s3c240x_lcd_dma_init(); void s3c240x_lcd_configure(); diff --git a/src/mame/gameplan/enigma2.cpp b/src/mame/gameplan/enigma2.cpp index 4bb3e66cf14..99b50feb45d 100644 --- a/src/mame/gameplan/enigma2.cpp +++ b/src/mame/gameplan/enigma2.cpp @@ -141,7 +141,7 @@ namespace { they were derived from the schematics. The horizontal synch chain counts from 0x0c0-0x1ff and the vertical one from 0x0d8-0x1ff. */ -#define MASTER_CLOCK (10000000) +#define MASTER_CLOCK XTAL::u(10000000) #define CPU_CLOCK (MASTER_CLOCK / 4) #define PIXEL_CLOCK (MASTER_CLOCK / 2) #define AY8910_CLOCK (MASTER_CLOCK / 8) @@ -715,7 +715,7 @@ void enigma2_state::enigma2(machine_config &config) Z80(config, m_maincpu, CPU_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &enigma2_state::enigma2_main_cpu_map); - Z80(config, m_audiocpu, 2500000); + Z80(config, m_audiocpu, XTAL::u(2500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &enigma2_state::enigma2_audio_cpu_map); m_audiocpu->set_periodic_int(FUNC(enigma2_state::irq0_line_hold), attotime::from_hz(8*52)); @@ -744,7 +744,7 @@ void enigma2_state::enigma2a(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &enigma2_state::enigma2a_main_cpu_map); m_maincpu->set_addrmap(AS_IO, &enigma2_state::enigma2a_main_cpu_io_map); - Z80(config, m_audiocpu, 2500000); + Z80(config, m_audiocpu, XTAL::u(2500000)); m_audiocpu->set_addrmap(AS_PROGRAM, &enigma2_state::enigma2_audio_cpu_map); m_audiocpu->set_periodic_int(FUNC(enigma2_state::irq0_line_hold), attotime::from_hz(8*52)); diff --git a/src/mame/gameplan/gameplan.cpp b/src/mame/gameplan/gameplan.cpp index d339842f5e6..080b7822c90 100644 --- a/src/mame/gameplan/gameplan.cpp +++ b/src/mame/gameplan/gameplan.cpp @@ -968,7 +968,7 @@ void gameplan_state::gameplan(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - GENERIC_LATCH_8(config, m_soundlatch, 0); + GENERIC_LATCH_8(config, m_soundlatch); ay8910_device &aysnd(AY8910(config, "aysnd", GAMEPLAN_AY8910_CLOCK)); aysnd.port_a_read_callback().set_ioport("DSW2"); diff --git a/src/mame/gametron/gotya.cpp b/src/mame/gametron/gotya.cpp index c717fc0ccf2..cf8a3444b9e 100644 --- a/src/mame/gametron/gotya.cpp +++ b/src/mame/gametron/gotya.cpp @@ -509,7 +509,7 @@ void gotya_state::machine_reset() void gotya_state::gotya(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 18432000 / 6); // 3.072 MHz ??? + Z80(config, m_maincpu, XTAL::u(18432000) / 6); // 3.072 MHz ??? m_maincpu->set_addrmap(AS_PROGRAM, &gotya_state::prg_map); m_maincpu->set_vblank_int("screen", FUNC(gotya_state::irq0_line_hold)); diff --git a/src/mame/gametron/sbugger.cpp b/src/mame/gametron/sbugger.cpp index 45c1291dfed..7310d65bda1 100644 --- a/src/mame/gametron/sbugger.cpp +++ b/src/mame/gametron/sbugger.cpp @@ -301,11 +301,11 @@ INPUT_PORTS_END void sbugger_state::sbugger(machine_config &config) { - I8085A(config, m_maincpu, 6'000'000); // 3.00 MHz??? + I8085A(config, m_maincpu, XTAL::u(6'000'000)); // 3.00 MHz??? m_maincpu->set_addrmap(AS_PROGRAM, &sbugger_state::prg_map); m_maincpu->set_addrmap(AS_IO, &sbugger_state::io_map); - i8156_device &i8156(I8156(config, "i8156", 200'000)); // freq is an approximation + i8156_device &i8156(I8156(config, "i8156", XTAL::u(200'000))); // freq is an approximation i8156.in_pa_callback().set_ioport("INPUTS"); i8156.in_pb_callback().set_ioport("DSW1"); i8156.in_pc_callback().set_ioport("DSW2"); @@ -326,9 +326,9 @@ void sbugger_state::sbugger(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76489(config, "sn76489.1", 3'000'000).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn76489.1", XTAL::u(3'000'000)).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn76489.2", 3'000'000).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn76489.2", XTAL::u(3'000'000)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/gottlieb/exterm.cpp b/src/mame/gottlieb/exterm.cpp index 25d8bf59d1a..4c09ecfa8a0 100644 --- a/src/mame/gottlieb/exterm.cpp +++ b/src/mame/gottlieb/exterm.cpp @@ -371,16 +371,16 @@ INPUT_PORTS_END void exterm_state::exterm(machine_config &config) { /* basic machine hardware */ - TMS34010(config, m_maincpu, 40000000); + TMS34010(config, m_maincpu, XTAL::u(40000000)); m_maincpu->set_addrmap(AS_PROGRAM, &exterm_state::master_map); m_maincpu->set_halt_on_reset(false); - m_maincpu->set_pixel_clock(40000000/8); + m_maincpu->set_pixel_clock(XTAL::u(40000000)/8); m_maincpu->set_pixels_per_clock(1); m_maincpu->set_scanline_ind16_callback(FUNC(exterm_state::scanline_update)); m_maincpu->set_shiftreg_in_callback(FUNC(exterm_state::to_shiftreg_master)); m_maincpu->set_shiftreg_out_callback(FUNC(exterm_state::from_shiftreg_master)); - TMS34010(config, m_slave, 40000000); + TMS34010(config, m_slave, XTAL::u(40000000)); m_slave->set_addrmap(AS_PROGRAM, &exterm_state::slave_map); m_slave->set_halt_on_reset(true); m_slave->set_pixel_clock(40000000/8); @@ -388,8 +388,8 @@ void exterm_state::exterm(machine_config &config) m_slave->set_shiftreg_in_callback(FUNC(exterm_state::to_shiftreg_slave)); m_slave->set_shiftreg_out_callback(FUNC(exterm_state::from_shiftreg_slave)); - M6502(config, m_audiocpu, 2000000).set_addrmap(AS_PROGRAM, &exterm_state::sound_master_map); - M6502(config, m_audioslave, 2000000).set_addrmap(AS_PROGRAM, &exterm_state::sound_slave_map); + M6502(config, m_audiocpu, XTAL::u(2000000)).set_addrmap(AS_PROGRAM, &exterm_state::sound_master_map); + M6502(config, m_audioslave, XTAL::u(2000000)).set_addrmap(AS_PROGRAM, &exterm_state::sound_slave_map); GENERIC_LATCH_8(config, m_soundlatch[0]).data_pending_callback().set_inputline(m_audiocpu, M6502_IRQ_LINE); GENERIC_LATCH_8(config, m_soundlatch[1]).data_pending_callback().set_inputline(m_audioslave, M6502_IRQ_LINE); @@ -406,7 +406,7 @@ void exterm_state::exterm(machine_config &config) PALETTE(config, "palette", FUNC(exterm_state::exterm_palette)).set_format(palette_device::xRGB_555, 2048+32768); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(40000000/8, 318, 0, 256, 264, 0, 240); + screen.set_raw(XTAL::u(40000000)/8, 318, 0, 256, 264, 0, 240); screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_ind16)); screen.set_palette("palette"); @@ -414,13 +414,13 @@ void exterm_state::exterm(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - AD7528(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // ad7528j.e2 - AD7528(config, "dacvol", 0) + AD7528(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.4); // ad7528j.e2 + AD7528(config, "dacvol") .set_output_range(0, 1) .add_route(0, "dac", 1.0, DAC_INPUT_RANGE_HI) .add_route(0, "dac", -1.0, DAC_INPUT_RANGE_LO); // ad7528j.e2 - YM2151(config, m_ym2151, 4000000).add_route(ALL_OUTPUTS, "speaker", 1.0); + YM2151(config, m_ym2151, XTAL::u(4000000)).add_route(ALL_OUTPUTS, "speaker", 1.0); } diff --git a/src/mame/gottlieb/gottlieb.cpp b/src/mame/gottlieb/gottlieb.cpp index 96ee4038043..10ec63964af 100644 --- a/src/mame/gottlieb/gottlieb.cpp +++ b/src/mame/gottlieb/gottlieb.cpp @@ -1784,7 +1784,7 @@ void gottlieb_state::gottlieb_core(machine_config &config) void gottlieb_state::gottlieb1(machine_config &config) { gottlieb_core(config); - GOTTLIEB_SOUND_REV1(config, m_r1_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + GOTTLIEB_SOUND_REV1(config, m_r1_sound).add_route(ALL_OUTPUTS, "speaker", 1.0); } void gottlieb_state::gottlieb1_rom(machine_config &config) @@ -1796,7 +1796,7 @@ void gottlieb_state::gottlieb1_rom(machine_config &config) void gottlieb_state::gottlieb2(machine_config &config) { gottlieb_core(config); - GOTTLIEB_SOUND_REV2(config, m_r2_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + GOTTLIEB_SOUND_REV2(config, m_r2_sound).add_route(ALL_OUTPUTS, "speaker", 1.0); } void gottlieb_state::gottlieb2_ram_rom(machine_config &config) @@ -1808,9 +1808,9 @@ void gottlieb_state::gottlieb2_ram_rom(machine_config &config) void gottlieb_state::g2laser(machine_config &config) { gottlieb_core(config); - GOTTLIEB_SOUND_REV2(config, m_r2_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + GOTTLIEB_SOUND_REV2(config, m_r2_sound).add_route(ALL_OUTPUTS, "speaker", 1.0); - PIONEER_PR8210(config, m_laserdisc, 0); + PIONEER_PR8210(config, m_laserdisc); m_laserdisc->set_audio(FUNC(gottlieb_state::laserdisc_audio_process)); m_laserdisc->set_overlay(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, FUNC(gottlieb_state::screen_update)); m_laserdisc->set_overlay_clip(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8); @@ -1836,7 +1836,7 @@ void gottlieb_state::g2laser(machine_config &config) void gottlieb_state::gottlieb1_votrax(machine_config &config) { gottlieb_core(config); - GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound).add_route(ALL_OUTPUTS, "speaker", 1.0); } void gottlieb_state::reactor(machine_config &config) @@ -1872,10 +1872,10 @@ void gottlieb_state::screwloo(machine_config &config) void gottlieb_state::cobram3(machine_config &config) { gottlieb_core(config); - GOTTLIEB_SOUND_REV2(config, m_r2_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + GOTTLIEB_SOUND_REV2(config, m_r2_sound).add_route(ALL_OUTPUTS, "speaker", 1.0); m_r2_sound->enable_cobram3_mods(); - PIONEER_PR8210(config, m_laserdisc, 0); + PIONEER_PR8210(config, m_laserdisc); m_laserdisc->set_audio(FUNC(gottlieb_state::laserdisc_audio_process)); m_laserdisc->set_overlay(GOTTLIEB_VIDEO_HCOUNT, GOTTLIEB_VIDEO_VCOUNT, FUNC(gottlieb_state::screen_update)); m_laserdisc->set_overlay_clip(0, GOTTLIEB_VIDEO_HBLANK-1, 0, GOTTLIEB_VIDEO_VBLANK-8); diff --git a/src/mame/gridcomp/gridcomp.cpp b/src/mame/gridcomp/gridcomp.cpp index 1f33e36ab01..43d0f2857b1 100644 --- a/src/mame/gridcomp/gridcomp.cpp +++ b/src/mame/gridcomp/gridcomp.cpp @@ -370,7 +370,7 @@ void gridcomp_state::grid1101(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - grid_keyboard_device &keyboard(GRID_KEYBOARD(config, "keyboard", 0)); + grid_keyboard_device &keyboard(GRID_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(gridcomp_state::kbd_put)); i7220_device &i7220(I7220(config, "i7220", XTAL(4'000'000))); @@ -417,7 +417,7 @@ void gridcomp_state::grid1101(machine_config &config) rs232_port.dcd_handler().set("uart8274", FUNC(i8274_device::dcda_w)); rs232_port.cts_handler().set("uart8274", FUNC(i8274_device::ctsa_w)); - I8255(config, "modem", 0); + I8255(config, "modem"); RAM(config, m_ram).set_default_size("256K").set_default_value(0); } diff --git a/src/mame/gridcomp/gridkeyb.cpp b/src/mame/gridcomp/gridkeyb.cpp index 5614ea011a8..41653acb9be 100644 --- a/src/mame/gridcomp/gridkeyb.cpp +++ b/src/mame/gridcomp/gridkeyb.cpp @@ -206,7 +206,7 @@ grid_keyboard_device::grid_keyboard_device( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "GRIDKBD_ROW0", "GRIDKBD_ROW1", "GRIDKBD_ROW2", "GRIDKBD_ROW3") , m_config(*this, "GRIDKBD_CFG") @@ -217,7 +217,7 @@ grid_keyboard_device::grid_keyboard_device( } -grid_keyboard_device::grid_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +grid_keyboard_device::grid_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : grid_keyboard_device(mconfig, GRID_KEYBOARD, tag, owner, clock) { } diff --git a/src/mame/gridcomp/gridkeyb.h b/src/mame/gridcomp/gridkeyb.h index e0072d7ea38..03eb0f4d72b 100644 --- a/src/mame/gridcomp/gridkeyb.h +++ b/src/mame/gridcomp/gridkeyb.h @@ -38,7 +38,7 @@ public: const machine_config &mconfig, const char *tag, device_t *owner, - u32 clock); + const XTAL &clock); template void set_keyboard_callback(T &&... args) @@ -54,7 +54,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; virtual void key_make(u8 row, u8 column) override; diff --git a/src/mame/handheld/gameking.cpp b/src/mame/handheld/gameking.cpp index c6c59de70ef..0b232bfb3e2 100644 --- a/src/mame/handheld/gameking.cpp +++ b/src/mame/handheld/gameking.cpp @@ -285,7 +285,7 @@ void gameking_state::machine_start() void gameking_state::gameking(machine_config &config) { // basic machine hardware - ST2204(config, m_maincpu, 6000000); + ST2204(config, m_maincpu, XTAL::u(6000000)); m_maincpu->set_addrmap(AS_DATA, &gameking_state::gameking_mem); m_maincpu->in_pa_callback().set(FUNC(gameking_state::input_r)); m_maincpu->in_pb_callback().set(FUNC(gameking_state::input2_r)); @@ -305,7 +305,7 @@ void gameking_state::gameking(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac", 0).add_route(0, "speaker", 1.0); + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac").add_route(0, "speaker", 1.0); // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "gameking_cart", "bin").set_device_load(FUNC(gameking_state::cart_load)); @@ -321,7 +321,7 @@ void gameking_state::gameking3(machine_config &config) { // basic machine hardware gameking(config); - m_maincpu->set_clock(8000000); + m_maincpu->set_clock(XTAL::u(8000000)); m_maincpu->set_addrmap(AS_DATA, &gameking_state::gameking3_mem); // video hardware diff --git a/src/mame/handheld/hh_cop400.cpp b/src/mame/handheld/hh_cop400.cpp index 2719a748052..6080a2e515f 100644 --- a/src/mame/handheld/hh_cop400.cpp +++ b/src/mame/handheld/hh_cop400.cpp @@ -216,7 +216,7 @@ INPUT_PORTS_END void ctstein_state::ctstein(machine_config &config) { // basic machine hardware - COP421(config, m_maincpu, 850000); // approximation - RC osc. R=12K, C=100pF + COP421(config, m_maincpu, XTAL::u(850000)); // approximation - RC osc. R=12K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_g().set(FUNC(ctstein_state::write_g)); m_maincpu->write_l().set(FUNC(ctstein_state::write_l)); @@ -364,7 +364,7 @@ INPUT_PORTS_END void h2hbaskbc_state::h2hbaskbc(machine_config &config) { // basic machine hardware - COP420(config, m_maincpu, 1000000); // approximation - RC osc. R=43K, C=101pF + COP420(config, m_maincpu, XTAL::u(1000000)); // approximation - RC osc. R=43K, C=101pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(h2hbaskbc_state::write_d)); m_maincpu->write_g().set(FUNC(h2hbaskbc_state::write_g)); @@ -498,7 +498,7 @@ INPUT_PORTS_END void einvaderc_state::einvaderc(machine_config &config) { // basic machine hardware - COP444L(config, m_maincpu, 850000); // approximation - RC osc. R=47K, C=100pF + COP444L(config, m_maincpu, XTAL::u(850000)); // approximation - RC osc. R=47K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->read_in().set_ioport("IN.0"); m_maincpu->write_d().set(FUNC(einvaderc_state::write_d)); @@ -628,7 +628,7 @@ INPUT_PORTS_END void unkeinv_state::unkeinv(machine_config &config) { // basic machine hardware - COP421(config, m_maincpu, 850000); // frequency guessed + COP421(config, m_maincpu, XTAL::u(850000)); // frequency guessed m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_g().set(FUNC(unkeinv_state::write_g)); m_maincpu->write_d().set(FUNC(unkeinv_state::write_d)); @@ -786,7 +786,7 @@ INPUT_PORTS_END void lchicken_state::lchicken(machine_config &config) { // basic machine hardware - COP421(config, m_maincpu, 850000); // approximation - RC osc. R=12K, C=100pF + COP421(config, m_maincpu, XTAL::u(850000)); // approximation - RC osc. R=12K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_l().set(FUNC(lchicken_state::write_l)); m_maincpu->write_d().set(FUNC(lchicken_state::write_d)); @@ -912,7 +912,7 @@ INPUT_PORTS_END void funjacks_state::funjacks(machine_config &config) { // basic machine hardware - COP410(config, m_maincpu, 850000); // approximation - RC osc. R=47K, C=56pF + COP410(config, m_maincpu, XTAL::u(850000)); // approximation - RC osc. R=47K, C=56pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(funjacks_state::write_d)); m_maincpu->write_l().set(FUNC(funjacks_state::write_l)); @@ -1014,7 +1014,7 @@ INPUT_PORTS_END void funrlgl_state::funrlgl(machine_config &config) { // basic machine hardware - COP410(config, m_maincpu, 800000); // approximation - RC osc. R=51K, C=91pF + COP410(config, m_maincpu, XTAL::u(800000)); // approximation - RC osc. R=51K, C=91pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(funrlgl_state::write_d)); m_maincpu->write_l().set(FUNC(funrlgl_state::write_l)); @@ -1137,7 +1137,7 @@ INPUT_PORTS_END void funtag_state::funtag(machine_config &config) { // basic machine hardware - COP410(config, m_maincpu, 1000000); // approximation - RC osc. R=47K, C=91pF + COP410(config, m_maincpu, XTAL::u(1000000)); // approximation - RC osc. R=47K, C=91pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(funtag_state::write_d)); m_maincpu->write_l().set(FUNC(funtag_state::write_l)); @@ -1302,7 +1302,7 @@ INPUT_PORTS_END void mbaskb2_state::mbaskb2(machine_config &config) { // basic machine hardware - COP420(config, m_maincpu, 500000); // approximation + COP420(config, m_maincpu, XTAL::u(500000)); // approximation m_maincpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_SYNC_INPUT, false); // guessed m_maincpu->write_g().set(FUNC(mbaskb2_state::main_write_g)); m_maincpu->write_l().set(FUNC(mbaskb2_state::shared_write_l)); @@ -1310,7 +1310,7 @@ void mbaskb2_state::mbaskb2(machine_config &config) m_maincpu->read_l_tristate().set_constant(0x80); m_maincpu->read_si().set(m_subcpu, FUNC(cop400_cpu_device::so_r)); - COP420(config, m_subcpu, 500000); // same as maincpu + COP420(config, m_subcpu, XTAL::u(500000)); // same as maincpu m_subcpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_SYNC_INPUT, false); // guessed m_subcpu->write_d().set(FUNC(mbaskb2_state::sub_write_d)); m_subcpu->write_g().set(FUNC(mbaskb2_state::sub_write_g)); @@ -1441,7 +1441,7 @@ INPUT_PORTS_END void lafootb_state::lafootb(machine_config &config) { // basic machine hardware - COP421(config, m_maincpu, 900000); // approximation - RC osc. R=51K, C=100pF + COP421(config, m_maincpu, XTAL::u(900000)); // approximation - RC osc. R=51K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_l().set(FUNC(lafootb_state::write_l)); m_maincpu->write_d().set(FUNC(lafootb_state::write_d)); @@ -1595,7 +1595,7 @@ INPUT_PORTS_END void mdallas_state::mdallas(machine_config &config) { // basic machine hardware - COP444L(config, m_maincpu, 900000); // approximation - RC osc. R=57K, C=101pF + COP444L(config, m_maincpu, XTAL::u(900000)); // approximation - RC osc. R=57K, C=101pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_l().set(FUNC(mdallas_state::write_l)); m_maincpu->write_d().set(FUNC(mdallas_state::write_d)); @@ -1689,7 +1689,7 @@ INPUT_PORTS_END void plus1_state::plus1(machine_config &config) { // basic machine hardware - COP410(config, m_maincpu, 1000000); // approximation - RC osc. R=51K, C=100pF + COP410(config, m_maincpu, XTAL::u(1000000)); // approximation - RC osc. R=51K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(plus1_state::write_d)); m_maincpu->read_g().set_ioport("IN.0"); @@ -1825,7 +1825,7 @@ INPUT_PORTS_END void lightfgt_state::lightfgt(machine_config &config) { // basic machine hardware - COP421(config, m_maincpu, 950000); // approximation - RC osc. R=82K, C=56pF + COP421(config, m_maincpu, XTAL::u(950000)); // approximation - RC osc. R=82K, C=56pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_so().set(FUNC(lightfgt_state::write_so)); m_maincpu->write_d().set(FUNC(lightfgt_state::write_d)); @@ -1978,7 +1978,7 @@ INPUT_PORTS_END void bship82_state::bship82(machine_config &config) { // basic machine hardware - COP420(config, m_maincpu, 750000); // approximation - RC osc. R=14K, C=100pF + COP420(config, m_maincpu, XTAL::u(750000)); // approximation - RC osc. R=14K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(bship82_state::write_d)); m_maincpu->write_g().set(FUNC(bship82_state::write_g)); @@ -2119,7 +2119,7 @@ INPUT_PORTS_END void qkracer_state::qkracer(machine_config &config) { // basic machine hardware - COP420(config, m_maincpu, 950000); // approximation - RC osc. R=47K, C=100pF + COP420(config, m_maincpu, XTAL::u(950000)); // approximation - RC osc. R=47K, C=100pF m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(qkracer_state::write_d)); m_maincpu->write_g().set(FUNC(qkracer_state::write_g)); @@ -2334,7 +2334,7 @@ INPUT_PORTS_END void scat_state::scat(machine_config &config) { // basic machine hardware - COP404L(config, m_maincpu, 1500000); // R/C OSC via MM74C14N + COP404L(config, m_maincpu, XTAL::u(1500000)); // R/C OSC via MM74C14N m_maincpu->set_config(COP400_CKI_DIVISOR_32, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->set_addrmap(AS_PROGRAM, &scat_state::main_map); m_maincpu->write_d().set(FUNC(scat_state::write_d)); @@ -2435,7 +2435,7 @@ INPUT_PORTS_END void vidchal_state::vidchal(machine_config &config) { // basic machine hardware - COP420(config, m_maincpu, 900000); // approximation + COP420(config, m_maincpu, XTAL::u(900000)); // approximation m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_maincpu->write_d().set(FUNC(vidchal_state::write_d)); m_maincpu->write_g().set("dac", FUNC(dac_byte_interface::data_w)); diff --git a/src/mame/handheld/hh_cops1.cpp b/src/mame/handheld/hh_cops1.cpp index 2cd2aaf0699..d7472c11166 100644 --- a/src/mame/handheld/hh_cops1.cpp +++ b/src/mame/handheld/hh_cops1.cpp @@ -248,7 +248,7 @@ INPUT_PORTS_END void mbaskb_state::mbaskb(machine_config &config) { // basic machine hardware - MM5799(config, m_maincpu, 370000); // approximation + MM5799(config, m_maincpu, XTAL::u(370000)); // approximation m_maincpu->write_do().set(FUNC(mbaskb_state::write_do)); m_maincpu->write_blk().set(FUNC(mbaskb_state::write_blk)); m_maincpu->write_s().set(FUNC(mbaskb_state::write_s)); @@ -456,7 +456,7 @@ INPUT_PORTS_END void qkracerm_state::qkracerm(machine_config &config) { // basic machine hardware - MM5799(config, m_maincpu, 220000); // approximation + MM5799(config, m_maincpu, XTAL::u(220000)); // approximation m_maincpu->set_option_ram_d12(true); m_maincpu->set_option_lb_10(5); m_maincpu->write_do().set(FUNC(qkracerm_state::write_do)); @@ -638,7 +638,7 @@ INPUT_PORTS_END void qkspeller_state::qkspeller(machine_config &config) { // basic machine hardware - MM5799(config, m_maincpu, 220000); // approximation + MM5799(config, m_maincpu, XTAL::u(220000)); // approximation m_maincpu->write_do().set(FUNC(qkspeller_state::write_do)); m_maincpu->write_s().set(FUNC(qkspeller_state::write_s)); m_maincpu->write_f().set(FUNC(qkspeller_state::write_f)); @@ -799,7 +799,7 @@ INPUT_PORTS_END void cambrp_state::cambrp(machine_config &config) { // basic machine hardware - MM5799(config, m_maincpu, 200000); // approximation + MM5799(config, m_maincpu, XTAL::u(200000)); // approximation m_maincpu->set_option_ram_d12(true); m_maincpu->set_option_lb_10(4); m_maincpu->write_do().set(FUNC(cambrp_state::write_do)); diff --git a/src/mame/handheld/hh_hmcs40.cpp b/src/mame/handheld/hh_hmcs40.cpp index ab5264dd2b8..e4fd72d7896 100644 --- a/src/mame/handheld/hh_hmcs40.cpp +++ b/src/mame/handheld/hh_hmcs40.cpp @@ -349,7 +349,7 @@ INPUT_PORTS_END void wantgman_state::wantgman(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(wantgman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(wantgman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(wantgman_state::plate_w)); @@ -471,7 +471,7 @@ INPUT_PORTS_END void bambball_state::bambball(machine_config &config) { // basic machine hardware - HD38750(config, m_maincpu, 400000); // approximation + HD38750(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_r<0>().set(FUNC(bambball_state::input_r)); m_maincpu->write_r<1>().set(FUNC(bambball_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bambball_state::plate_w)); @@ -618,7 +618,7 @@ INPUT_PORTS_END void bmboxing_state::bmboxing(machine_config &config) { // basic machine hardware - HD38750(config, m_maincpu, 400000); // approximation + HD38750(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_r<0>().set(FUNC(bmboxing_state::input_r)); m_maincpu->write_r<1>().set(FUNC(bmboxing_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bmboxing_state::plate_w)); @@ -749,7 +749,7 @@ INPUT_PORTS_END void bfriskyt_state::bfriskyt(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(bfriskyt_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(bfriskyt_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bfriskyt_state::plate_w)); @@ -869,7 +869,7 @@ INPUT_PORTS_END void packmon_state::packmon(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(packmon_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(packmon_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(packmon_state::plate_w)); @@ -997,7 +997,7 @@ INPUT_PORTS_END void bzaxxon_state::bzaxxon(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 450000); // approximation + HD38800(config, m_maincpu, XTAL::u(450000)); // approximation m_maincpu->write_r<0>().set(FUNC(bzaxxon_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(bzaxxon_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bzaxxon_state::plate_w)); @@ -1125,7 +1125,7 @@ INPUT_PORTS_END void zackman_state::zackman(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(zackman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(zackman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(zackman_state::plate_w)); @@ -1257,7 +1257,7 @@ INPUT_PORTS_END void bpengo_state::bpengo(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(bpengo_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(bpengo_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bpengo_state::plate_w)); @@ -1387,7 +1387,7 @@ INPUT_PORTS_END void bbtime_state::bbtime(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(bbtime_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(bbtime_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bbtime_state::plate_w)); @@ -1487,7 +1487,7 @@ INPUT_PORTS_END void ktparman_state::ktparman(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(ktparman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(ktparman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(ktparman_state::plate_w)); @@ -1591,7 +1591,7 @@ INPUT_PORTS_END void bdoramon_state::bdoramon(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(bdoramon_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(bdoramon_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bdoramon_state::plate_w)); @@ -1709,7 +1709,7 @@ INPUT_PORTS_END void tkjmaru_state::tkjmaru(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(tkjmaru_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(tkjmaru_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(tkjmaru_state::plate_w)); @@ -1806,7 +1806,7 @@ INPUT_PORTS_END void bultrman_state::bultrman(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 350000); // approximation + HD38800(config, m_maincpu, XTAL::u(350000)); // approximation m_maincpu->write_r<0>().set(FUNC(bultrman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(bultrman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bultrman_state::plate_w)); @@ -1933,7 +1933,7 @@ INPUT_PORTS_END void ggdman_state::ggdman(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(ggdman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(ggdman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(ggdman_state::plate_w)); @@ -2030,7 +2030,7 @@ INPUT_PORTS_END void machiman_state::machiman(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(machiman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(machiman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(machiman_state::plate_w)); @@ -2200,7 +2200,7 @@ INPUT_PORTS_END void pairmtch_state::pairmtch(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<2>().set(FUNC(pairmtch_state::plate_w)); m_maincpu->write_r<3>().set(FUNC(pairmtch_state::plate_w)); m_maincpu->read_r<4>().set(FUNC(pairmtch_state::input_r)); @@ -2210,7 +2210,7 @@ void pairmtch_state::pairmtch(machine_config &config) m_maincpu->write_d().set(FUNC(pairmtch_state::grid_w)); m_maincpu->read_d().set_ioport("IN.2"); - HD38820(config, m_audiocpu, 400000); // approximation + HD38820(config, m_audiocpu, XTAL::u(400000)); // approximation m_audiocpu->write_r<2>().set(FUNC(pairmtch_state::sound2_w)); m_audiocpu->read_r<2>().set(m_soundlatch[0], FUNC(generic_latch_8_device::read)); m_audiocpu->write_d().set(FUNC(pairmtch_state::speaker_w)); @@ -2334,7 +2334,7 @@ INPUT_PORTS_END void alnattck_state::alnattck(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(alnattck_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(alnattck_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(alnattck_state::plate_w)); @@ -2473,7 +2473,7 @@ INPUT_PORTS_END void cdkong_state::cdkong(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(cdkong_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(cdkong_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(cdkong_state::plate_w)); @@ -2619,7 +2619,7 @@ INPUT_PORTS_END void cgalaxn_state::cgalaxn(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_r<0>().set(FUNC(cgalaxn_state::input_r)); m_maincpu->write_r<1>().set(FUNC(cgalaxn_state::grid_w)); m_maincpu->write_r<2>().set(FUNC(cgalaxn_state::grid_w)); @@ -2749,7 +2749,7 @@ INPUT_PORTS_END void cpacman_state::cpacman(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_r<0>().set(FUNC(cpacman_state::input_r)); m_maincpu->write_r<1>().set(FUNC(cpacman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(cpacman_state::plate_w)); @@ -2886,7 +2886,7 @@ INPUT_PORTS_END void cmspacmn_state::cmspacmn(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_r<0>().set(FUNC(cmspacmn_state::input_r)); m_maincpu->write_r<1>().set(FUNC(cmspacmn_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(cmspacmn_state::plate_w)); @@ -3022,7 +3022,7 @@ INPUT_PORTS_END void egalaxn2_state::egalaxn2(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_r<0>().set(FUNC(egalaxn2_state::input_r)); m_maincpu->write_r<1>().set(FUNC(egalaxn2_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(egalaxn2_state::plate_w)); @@ -3240,7 +3240,7 @@ INPUT_PORTS_END void einvader2_state::einvader2(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 450000); // approximation + HD38800(config, m_maincpu, XTAL::u(450000)); // approximation m_maincpu->write_r<0>().set(FUNC(einvader2_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(einvader2_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(einvader2_state::plate_w)); @@ -3336,7 +3336,7 @@ void eturtles_state::machine_reset() void eturtles_state::set_clock() { // maincpu clock is controlled by game speed knob, range is around 150kHz - m_maincpu->set_unscaled_clock(m_inputs[6]->read() * 1500 + 325000); + m_maincpu->set_unscaled_clock(XTAL::u(m_inputs[6]->read() * 1500 + 325000)); } void eturtles_state::update_display() @@ -3446,7 +3446,7 @@ INPUT_PORTS_END void eturtles_state::eturtles(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // see set_clock + HD38820(config, m_maincpu, XTAL::u(400000)); // see set_clock m_maincpu->write_r<0>().set(FUNC(eturtles_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(eturtles_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(eturtles_state::plate_w)); @@ -3456,7 +3456,7 @@ void eturtles_state::eturtles(machine_config &config) m_maincpu->write_r<6>().set(FUNC(eturtles_state::plate_w)); m_maincpu->write_d().set(FUNC(eturtles_state::grid_w)); - COP411(config, m_audiocpu, 215000); // approximation + COP411(config, m_audiocpu, XTAL::u(215000)); // approximation m_audiocpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_audiocpu->write_sk().set(FUNC(eturtles_state::speaker_w)); m_audiocpu->write_d().set(FUNC(eturtles_state::cop_irq_w)); @@ -3584,7 +3584,7 @@ INPUT_PORTS_END void estargte_state::estargte(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // see set_clock + HD38820(config, m_maincpu, XTAL::u(400000)); // see set_clock m_maincpu->write_r<0>().set(FUNC(estargte_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(estargte_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(estargte_state::plate_w)); @@ -3594,7 +3594,7 @@ void estargte_state::estargte(machine_config &config) m_maincpu->write_r<6>().set(FUNC(estargte_state::plate_w)); m_maincpu->write_d().set(FUNC(estargte_state::grid_w)); - COP411(config, m_audiocpu, 195000); // approximation + COP411(config, m_audiocpu, XTAL::u(195000)); // approximation m_audiocpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed m_audiocpu->write_sk().set(FUNC(estargte_state::speaker_w)); m_audiocpu->write_d().set(FUNC(estargte_state::cop_irq_w)); @@ -3725,7 +3725,7 @@ INPUT_PORTS_END void ghalien_state::ghalien(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(ghalien_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(ghalien_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(ghalien_state::plate_w)); @@ -3857,7 +3857,7 @@ INPUT_PORTS_END void gckong_state::gckong(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(gckong_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(gckong_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(gckong_state::plate_w)); @@ -3992,7 +3992,7 @@ INPUT_PORTS_END void gscobra_state::gscobra(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(gscobra_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(gscobra_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(gscobra_state::plate_w)); @@ -4127,7 +4127,7 @@ INPUT_PORTS_END void gdefender_state::gdefender(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(gdefender_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(gdefender_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(gdefender_state::plate_w)); @@ -4252,7 +4252,7 @@ INPUT_PORTS_END void gdigdug_state::gdigdug(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(gdigdug_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(gdigdug_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(gdigdug_state::plate_w)); @@ -4424,7 +4424,7 @@ INPUT_PORTS_END void mwcbaseb_state::mwcbaseb(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<1>().set(FUNC(mwcbaseb_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(mwcbaseb_state::plate_w)); m_maincpu->write_r<3>().set(FUNC(mwcbaseb_state::plate_w)); @@ -4568,7 +4568,7 @@ INPUT_PORTS_END void msthawk_state::msthawk(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(msthawk_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(msthawk_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(msthawk_state::plate_w)); @@ -4665,7 +4665,7 @@ INPUT_PORTS_END void pbqbert_state::pbqbert(machine_config &config) { // basic machine hardware - HD38820(config, m_maincpu, 400000); // approximation + HD38820(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(pbqbert_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(pbqbert_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(pbqbert_state::plate_w)); @@ -4770,7 +4770,7 @@ INPUT_PORTS_END void puckimon_state::puckimon(machine_config &config) { // basic machine hardware - HD38750(config, m_maincpu, 400000); // approximation + HD38750(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_r<0>().set_ioport("IN.0").invert(); m_maincpu->write_r<1>().set(FUNC(puckimon_state::grid_w)); m_maincpu->write_r<2>().set(FUNC(puckimon_state::grid_w)); @@ -4892,7 +4892,7 @@ INPUT_PORTS_END void tmtron_state::tmtron(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(tmtron_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(tmtron_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(tmtron_state::plate_w)); @@ -5022,7 +5022,7 @@ INPUT_PORTS_END void kingman_state::kingman(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(kingman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(kingman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(kingman_state::plate_w)); @@ -5147,7 +5147,7 @@ INPUT_PORTS_END void bombman_state::bombman(machine_config &config) { // basic machine hardware - HD38800(config, m_maincpu, 400000); // approximation + HD38800(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->write_r<0>().set(FUNC(bombman_state::plate_w)); m_maincpu->write_r<1>().set(FUNC(bombman_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(bombman_state::plate_w)); @@ -5249,7 +5249,7 @@ INPUT_PORTS_END void vinvader_state::vinvader(machine_config &config) { // basic machine hardware - HD38750(config, m_maincpu, 300000); // approximation + HD38750(config, m_maincpu, XTAL::u(300000)); // approximation m_maincpu->read_r<0>().set_ioport("IN.0"); m_maincpu->write_r<1>().set(FUNC(vinvader_state::plate_w)); m_maincpu->write_r<2>().set(FUNC(vinvader_state::plate_w)); diff --git a/src/mame/handheld/hh_pic16.cpp b/src/mame/handheld/hh_pic16.cpp index bdd0dbfc11d..98734780fab 100644 --- a/src/mame/handheld/hh_pic16.cpp +++ b/src/mame/handheld/hh_pic16.cpp @@ -284,14 +284,14 @@ INPUT_PORTS_END void touchme_state::touchme(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 300000); // approximation - RC osc. R=100K, C=47pF + PIC1655(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=100K, C=47pF m_maincpu->read_a().set(FUNC(touchme_state::read_a)); m_maincpu->write_b().set(FUNC(touchme_state::write_b)); m_maincpu->read_c().set_constant(0xff); m_maincpu->write_c().set(FUNC(touchme_state::write_c)); // PIC CLKOUT, tied to RTCC - CLOCK(config, "clock", 300000/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC); + CLOCK(config, "clock", XTAL::u(300000)/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC); // video hardware PWM_DISPLAY(config, m_display).set_size(7, 7); @@ -396,7 +396,7 @@ INPUT_PORTS_END void pabball_state::pabball(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 1200000); // approximation - RC osc. R=18K, C=27pF + PIC1655(config, m_maincpu, XTAL::u(1200000)); // approximation - RC osc. R=18K, C=27pF m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->write_b().set(FUNC(pabball_state::write_b)); m_maincpu->read_c().set_ioport("IN.1"); @@ -520,7 +520,7 @@ INPUT_PORTS_END void melodym_state::melodym(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 1000000); // approximation + PIC1655(config, m_maincpu, XTAL::u(1000000)); // approximation m_maincpu->read_a().set_ioport("IN.5"); m_maincpu->write_b().set(FUNC(melodym_state::write_b)); m_maincpu->read_c().set(FUNC(melodym_state::read_c)); @@ -624,7 +624,7 @@ INPUT_PORTS_END void maniac_state::maniac(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 1000000); // approximation - RC osc. R=~13.4K, C=470pF + PIC1655(config, m_maincpu, XTAL::u(1000000)); // approximation - RC osc. R=~13.4K, C=470pF m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->write_b().set(FUNC(maniac_state::write_b)); m_maincpu->write_c().set(FUNC(maniac_state::write_c)); @@ -781,7 +781,7 @@ INPUT_PORTS_END void flash_state::flash(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 1050000); // approximation + PIC1655(config, m_maincpu, XTAL::u(1050000)); // approximation m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->write_b().set(FUNC(flash_state::write_b)); m_maincpu->read_c().set(FUNC(flash_state::read_c)); @@ -864,7 +864,7 @@ void matchme_state::set_clock() { // MCU clock is ~1.2MHz by default (R=18K, C=15pF), high speed setting adds a // 10pF cap to speed it up by about 7.5%. - m_maincpu->set_unscaled_clock((m_inputs[4]->read() & 1) ? 1300000 : 1200000); + m_maincpu->set_unscaled_clock((m_inputs[4]->read() & 1) ? XTAL::u(1300000) : XTAL::u(1200000)); } void matchme_state::write_b(u8 data) @@ -942,7 +942,7 @@ INPUT_PORTS_END void matchme_state::matchme(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 1200000); // see set_clock + PIC1655(config, m_maincpu, XTAL::u(1200000)); // see set_clock m_maincpu->read_a().set_ioport("IN.3"); m_maincpu->write_b().set(FUNC(matchme_state::write_b)); m_maincpu->read_c().set(FUNC(matchme_state::read_c)); @@ -1064,7 +1064,7 @@ INPUT_PORTS_END void drdunk_state::drdunk(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 800000); // approximation - RC osc. R=18K, C=47pF + PIC1655(config, m_maincpu, XTAL::u(800000)); // approximation - RC osc. R=18K, C=47pF m_maincpu->read_a().set(FUNC(drdunk_state::read_a)); m_maincpu->write_b().set(FUNC(drdunk_state::write_b)); m_maincpu->read_c().set_constant(0xff); @@ -1231,7 +1231,7 @@ INPUT_PORTS_END void leboom_state::leboom(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 1000000); // approximation + PIC1655(config, m_maincpu, XTAL::u(1000000)); // approximation m_maincpu->read_a().set(FUNC(leboom_state::read_a)); m_maincpu->write_b().set(FUNC(leboom_state::write_b)); m_maincpu->read_c().set_constant(0xff); @@ -1346,7 +1346,7 @@ INPUT_PORTS_END void rockpin_state::rockpin(machine_config &config) { // basic machine hardware - PIC1650(config, m_maincpu, 450000); // approximation - RC osc. R=47K, C=47pF + PIC1650(config, m_maincpu, XTAL::u(450000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->write_a().set(FUNC(rockpin_state::write_a)); m_maincpu->read_b().set_constant(0xff); @@ -1357,7 +1357,7 @@ void rockpin_state::rockpin(machine_config &config) m_maincpu->write_d().set(FUNC(rockpin_state::write_d)); // PIC CLKOUT, tied to RTCC - CLOCK(config, "clock", 450000/4).signal_handler().set_inputline(m_maincpu, PIC16C5x_RTCC); + CLOCK(config, "clock", XTAL::u(450000)/4).signal_handler().set_inputline(m_maincpu, PIC16C5x_RTCC); // video hardware PWM_DISPLAY(config, m_display).set_size(3+6, 8); @@ -1475,7 +1475,7 @@ INPUT_PORTS_END void hccbaskb_state::hccbaskb(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 800000); // approximation - RC osc. R=15K, C=47pF + PIC1655(config, m_maincpu, XTAL::u(800000)); // approximation - RC osc. R=15K, C=47pF m_maincpu->read_a().set(FUNC(hccbaskb_state::read_a)); m_maincpu->write_b().set(FUNC(hccbaskb_state::write_b)); m_maincpu->read_c().set_constant(0xff); @@ -1635,7 +1635,7 @@ INPUT_PORTS_END void ttfball_state::ttfball(machine_config &config) { // basic machine hardware - PIC1655(config, m_maincpu, 600000); // approximation - RC osc. R=27K(set 1) or 33K(set 2), C=68pF + PIC1655(config, m_maincpu, XTAL::u(600000)); // approximation - RC osc. R=27K(set 1) or 33K(set 2), C=68pF m_maincpu->read_a().set(FUNC(ttfball_state::read_a)); m_maincpu->write_b().set(FUNC(ttfball_state::write_b)); m_maincpu->read_c().set_constant(0xff); @@ -1754,7 +1754,7 @@ INPUT_PORTS_END void uspbball_state::uspbball(machine_config &config) { // basic machine hardware - PIC1650(config, m_maincpu, 900000); // approximation - RC osc. R=22K, C=47pF + PIC1650(config, m_maincpu, XTAL::u(900000)); // approximation - RC osc. R=22K, C=47pF m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->write_a().set(FUNC(uspbball_state::write_a)); m_maincpu->read_b().set_constant(0xff); @@ -1765,7 +1765,7 @@ void uspbball_state::uspbball(machine_config &config) m_maincpu->write_d().set(FUNC(uspbball_state::write_d)); // PIC CLKOUT, tied to RTCC - CLOCK(config, "clock", 900000/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC); + CLOCK(config, "clock", XTAL::u(900000)/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC); // video hardware PWM_DISPLAY(config, m_display).set_size(6, 16); @@ -1898,7 +1898,7 @@ INPUT_PORTS_END void us2pfball_state::us2pfball(machine_config &config) { // basic machine hardware - PIC1650(config, m_maincpu, 800000); // approximation - RC osc. R=39K, C=75pF + PIC1650(config, m_maincpu, XTAL::u(800000)); // approximation - RC osc. R=39K, C=75pF m_maincpu->read_a().set(FUNC(us2pfball_state::read_a)); m_maincpu->write_a().set(FUNC(us2pfball_state::write_a)); m_maincpu->read_b().set_ioport("IN.5"); @@ -1909,7 +1909,7 @@ void us2pfball_state::us2pfball(machine_config &config) m_maincpu->write_d().set(FUNC(us2pfball_state::write_d)); // PIC CLKOUT, tied to RTCC - CLOCK(config, "clock", 800000/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC); + CLOCK(config, "clock", XTAL::u(800000)/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC); // video hardware PWM_DISPLAY(config, m_display).set_size(10, 7); diff --git a/src/mame/handheld/hh_pps41.cpp b/src/mame/handheld/hh_pps41.cpp index 392934177d4..d05dfc7ef04 100644 --- a/src/mame/handheld/hh_pps41.cpp +++ b/src/mame/handheld/hh_pps41.cpp @@ -203,7 +203,7 @@ INPUT_PORTS_END void ftri1_state::ftri1(machine_config &config) { // basic machine hardware - MM78(config, m_maincpu, 300000); // approximation - VC osc. R=68K + MM78(config, m_maincpu, XTAL::u(300000)); // approximation - VC osc. R=68K m_maincpu->write_d().set(FUNC(ftri1_state::write_d)); m_maincpu->write_r().set(FUNC(ftri1_state::write_r)); m_maincpu->read_p().set_ioport("IN.0"); @@ -329,7 +329,7 @@ INPUT_PORTS_END void mastmind_state::mastmind(machine_config &config) { // basic machine hardware - MM75(config, m_maincpu, 360000); // approximation - VC osc. R=56K + MM75(config, m_maincpu, XTAL::u(360000)); // approximation - VC osc. R=56K m_maincpu->write_d().set(FUNC(mastmind_state::write_d)); m_maincpu->write_r().set(FUNC(mastmind_state::write_r)); m_maincpu->read_p().set(FUNC(mastmind_state::read_p)); @@ -350,7 +350,7 @@ void mastmind_state::smastmind(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2400); // approximation + BEEP(config, m_beeper, XTAL::u(2400)); // approximation m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25); } @@ -473,7 +473,7 @@ INPUT_PORTS_END void dunksunk_state::dunksunk(machine_config &config) { // basic machine hardware - MM76EL(config, m_maincpu, 390000); // approximation - VC osc. R=56K + MM76EL(config, m_maincpu, XTAL::u(390000)); // approximation - VC osc. R=56K m_maincpu->write_d().set(FUNC(dunksunk_state::write_d)); m_maincpu->write_r().set(FUNC(dunksunk_state::write_r)); m_maincpu->read_p().set_ioport("IN.0"); @@ -616,7 +616,7 @@ INPUT_PORTS_END void memoquiz_state::memoquiz(machine_config &config) { // basic machine hardware - MM75(config, m_maincpu, 360000); // approximation - VC osc. R=56K + MM75(config, m_maincpu, XTAL::u(360000)); // approximation - VC osc. R=56K m_maincpu->write_d().set(FUNC(memoquiz_state::write_d)); m_maincpu->write_r().set(FUNC(memoquiz_state::write_r)); m_maincpu->read_p().set(FUNC(memoquiz_state::read_p)); @@ -722,7 +722,7 @@ INPUT_PORTS_END void mfootb2_state::mfootb2(machine_config &config) { // basic machine hardware - MM77LA(config, m_maincpu, 380000); // approximation - VC osc. R=56K + MM77LA(config, m_maincpu, XTAL::u(380000)); // approximation - VC osc. R=56K m_maincpu->write_d().set(FUNC(mfootb2_state::write_d)); m_maincpu->read_d().set_ioport("IN.1"); m_maincpu->write_r().set(FUNC(mfootb2_state::write_r)); @@ -887,7 +887,7 @@ INPUT_PORTS_END void brainbaf_state::brainbaf(machine_config &config) { // basic machine hardware - MM78LA(config, m_maincpu, 440000); // approximation - VC osc. R=10K + MM78LA(config, m_maincpu, XTAL::u(440000)); // approximation - VC osc. R=10K m_maincpu->write_d().set(FUNC(brainbaf_state::write_d)); m_maincpu->write_r().set(FUNC(brainbaf_state::write_r)); m_maincpu->read_p().set(FUNC(brainbaf_state::read_p)); @@ -1065,7 +1065,7 @@ INPUT_PORTS_END void horocomp_state::horocomp(machine_config &config) { // basic machine hardware - MM78LA(config, m_maincpu, 440000); // approximation - VC osc. R=10K + MM78LA(config, m_maincpu, XTAL::u(440000)); // approximation - VC osc. R=10K m_maincpu->write_d().set(FUNC(horocomp_state::write_d)); m_maincpu->write_r().set(FUNC(horocomp_state::write_r)); m_maincpu->read_p().set(FUNC(horocomp_state::read_p)); @@ -1249,7 +1249,7 @@ INPUT_PORTS_END void mwcfootb_state::mwcfootb(machine_config &config) { // basic machine hardware - MM78(config, m_maincpu, 360000); // approximation - VC osc. R=56K + MM78(config, m_maincpu, XTAL::u(360000)); // approximation - VC osc. R=56K m_maincpu->write_d().set(FUNC(mwcfootb_state::main_write_d)); m_maincpu->read_d().set(FUNC(mwcfootb_state::main_read_d)); m_maincpu->write_r().set(FUNC(mwcfootb_state::main_write_r)); @@ -1257,7 +1257,7 @@ void mwcfootb_state::mwcfootb(machine_config &config) m_maincpu->read_sdi().set(m_subcpu, FUNC(pps41_base_device::sdo_r)); m_maincpu->write_ssc().set(m_subcpu, FUNC(pps41_base_device::ssc_w)); - MM78(config, m_subcpu, 360000); // osc. from maincpu + MM78(config, m_subcpu, XTAL::u(360000)); // osc. from maincpu m_subcpu->write_d().set(FUNC(mwcfootb_state::sub_write_d)); m_subcpu->write_r().set(FUNC(mwcfootb_state::sub_write_r)); m_subcpu->read_sdi().set(m_maincpu, FUNC(pps41_base_device::sdo_r)); @@ -1421,7 +1421,7 @@ INPUT_PORTS_END void scrabsen_state::scrabsen(machine_config &config) { // basic machine hardware - MM76EL(config, m_maincpu, 380000); // approximation - VC osc. R=56K + MM76EL(config, m_maincpu, XTAL::u(380000)); // approximation - VC osc. R=56K m_maincpu->write_d().set(FUNC(scrabsen_state::write_d)); m_maincpu->write_r().set(FUNC(scrabsen_state::write_r)); m_maincpu->read_p().set(FUNC(scrabsen_state::read_p)); @@ -1557,7 +1557,7 @@ INPUT_PORTS_END void rdqa_state::rdqa(machine_config &config) { // basic machine hardware - MM76EL(config, m_maincpu, 400000); // approximation - VC osc. R=56K + MM76EL(config, m_maincpu, XTAL::u(400000)); // approximation - VC osc. R=56K m_maincpu->write_d().set(FUNC(rdqa_state::write_d)); m_maincpu->write_r().set(FUNC(rdqa_state::write_r)); m_maincpu->read_p().set(FUNC(rdqa_state::read_p)); diff --git a/src/mame/handheld/hh_rw5000.cpp b/src/mame/handheld/hh_rw5000.cpp index eb85d570585..9d6df8df232 100644 --- a/src/mame/handheld/hh_rw5000.cpp +++ b/src/mame/handheld/hh_rw5000.cpp @@ -213,7 +213,7 @@ INPUT_PORTS_END void autorace_state::autorace(machine_config &config) { // basic machine hardware - B6000(config, m_maincpu, 160000); // approximation + B6000(config, m_maincpu, XTAL::u(160000)); // approximation m_maincpu->write_str().set(FUNC(autorace_state::write_str)); m_maincpu->write_seg().set(FUNC(autorace_state::write_seg)); m_maincpu->read_kb().set_ioport("IN.0"); @@ -303,7 +303,7 @@ INPUT_PORTS_END void misatk_state::misatk(machine_config &config) { // basic machine hardware - B6000(config, m_maincpu, 250000); // approximation + B6000(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->write_str().set(FUNC(misatk_state::write_str)); m_maincpu->write_seg().set(FUNC(misatk_state::write_seg)); m_maincpu->read_kb().set_ioport("IN.0"); @@ -403,7 +403,7 @@ INPUT_PORTS_END void mfootb_state::mfootb(machine_config &config) { // basic machine hardware - B6100(config, m_maincpu, 280000); // approximation + B6100(config, m_maincpu, XTAL::u(280000)); // approximation m_maincpu->write_str().set(FUNC(mfootb_state::write_str)); m_maincpu->write_seg().set(FUNC(mfootb_state::write_seg)); m_maincpu->read_kb().set_ioport("IN.0"); @@ -491,7 +491,7 @@ INPUT_PORTS_END void mbaseb_state::mbaseb(machine_config &config) { // basic machine hardware - B6100(config, m_maincpu, 280000); // approximation + B6100(config, m_maincpu, XTAL::u(280000)); // approximation m_maincpu->write_str().set(FUNC(mbaseb_state::write_str)); m_maincpu->write_seg().set(FUNC(mbaseb_state::write_seg)); m_maincpu->read_kb().set_ioport("IN.0"); @@ -581,7 +581,7 @@ INPUT_PORTS_END void gravity_state::gravity(machine_config &config) { // basic machine hardware - B6100(config, m_maincpu, 250000); // approximation + B6100(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->write_str().set(FUNC(gravity_state::write_str)); m_maincpu->write_seg().set(FUNC(gravity_state::write_seg)); m_maincpu->read_kb().set_ioport("IN.0"); @@ -692,7 +692,7 @@ INPUT_PORTS_END void rw10r_state::rw10r(machine_config &config) { // basic machine hardware - A5000(config, m_maincpu, 250000); // approximation + A5000(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->write_str().set(FUNC(rw10r_state::write_str)); m_maincpu->write_seg().set(FUNC(rw10r_state::write_seg)); m_maincpu->read_kb().set(FUNC(rw10r_state::read_kb)); @@ -808,7 +808,7 @@ INPUT_PORTS_END void rw18r_state::rw18r(machine_config &config) { // basic machine hardware - B5000(config, m_maincpu, 250000); // approximation + B5000(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->write_str().set(FUNC(rw18r_state::write_str)); m_maincpu->write_seg().set(FUNC(rw18r_state::write_seg)); m_maincpu->read_kb().set(FUNC(rw18r_state::read_kb)); @@ -921,7 +921,7 @@ INPUT_PORTS_END void rw30r_state::rw30r(machine_config &config) { // basic machine hardware - B5500(config, m_maincpu, 250000); // approximation + B5500(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->write_str().set(FUNC(rw30r_state::write_str)); m_maincpu->write_seg().set(FUNC(rw30r_state::write_seg)); m_maincpu->read_kb().set(FUNC(rw30r_state::read_kb)); @@ -937,7 +937,7 @@ void rw30r_state::rw31r(machine_config &config) rw30r(config); // basic machine hardware - A5500(config.replace(), m_maincpu, 250000); // approximation + A5500(config.replace(), m_maincpu, XTAL::u(250000)); // approximation m_maincpu->write_str().set(FUNC(rw30r_state::write_str)); m_maincpu->write_seg().set(FUNC(rw30r_state::write_seg)); m_maincpu->read_kb().set(FUNC(rw30r_state::read_kb)); @@ -1068,7 +1068,7 @@ INPUT_PORTS_END void rw24k_state::rw24k(machine_config &config) { // basic machine hardware - A5900(config, m_maincpu, 250000); // approximation + A5900(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->write_str().set(FUNC(rw24k_state::write_str)); m_maincpu->write_seg().set(FUNC(rw24k_state::write_seg)); m_maincpu->read_kb().set(FUNC(rw24k_state::read_kb)); diff --git a/src/mame/handheld/hh_tms1k.cpp b/src/mame/handheld/hh_tms1k.cpp index 38530da7872..10bb430d798 100644 --- a/src/mame/handheld/hh_tms1k.cpp +++ b/src/mame/handheld/hh_tms1k.cpp @@ -546,7 +546,7 @@ INPUT_PORTS_END void matchnum_state::matchnum(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=47K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(325000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(matchnum_state::read_k)); m_maincpu->write_r().set(FUNC(matchnum_state::write_r)); m_maincpu->write_o().set(FUNC(matchnum_state::write_o)); @@ -659,7 +659,7 @@ INPUT_PORTS_END void arrball_state::arrball(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=47K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(325000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(arrball_state::read_k)); m_maincpu->write_r().set(FUNC(arrball_state::write_r)); m_maincpu->write_o().set(FUNC(arrball_state::write_o)); @@ -828,7 +828,7 @@ static const u16 mathmagi_output_pla[0x20] = void mathmagi_state::mathmagi(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 175000); // approximation - RC osc. R=68K, C=82pF + TMS1100(config, m_maincpu, XTAL::u(175000)); // approximation - RC osc. R=68K, C=82pF m_maincpu->set_output_pla(mathmagi_output_pla); m_maincpu->read_k().set(FUNC(mathmagi_state::read_k)); m_maincpu->write_r().set(FUNC(mathmagi_state::write_r)); @@ -968,7 +968,7 @@ INPUT_PORTS_END void bcheetah_state::bcheetah(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 100000); // approximation - RC osc. R=47K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(100000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(bcheetah_state::read_k)); m_maincpu->write_r().set(FUNC(bcheetah_state::write_r)); m_maincpu->write_o().set(FUNC(bcheetah_state::write_o)); @@ -1088,7 +1088,7 @@ INPUT_PORTS_END void tc7atc_state::tc7atc(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=68K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=68K, C=47pF m_maincpu->read_k().set(FUNC(tc7atc_state::read_k)); m_maincpu->write_r().set(FUNC(tc7atc_state::write_r)); m_maincpu->write_o().set(FUNC(tc7atc_state::write_o)); @@ -1259,7 +1259,7 @@ INPUT_PORTS_END void palmf31_state::palmf31(machine_config &config) { // basic machine hardware - TMS1040(config, m_maincpu, 250000); // approximation + TMS1040(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(palmf31_state::read_k)); m_maincpu->write_o().set(FUNC(palmf31_state::write_o)); m_maincpu->write_r().set(FUNC(palmf31_state::write_r)); @@ -1427,7 +1427,7 @@ INPUT_PORTS_END void palmmd8_state::palmmd8(machine_config &config) { // basic machine hardware - TMS1070(config, m_maincpu, 250000); // approximation - RC osc. R=56K, C=68pf + TMS1070(config, m_maincpu, XTAL::u(250000)); // approximation - RC osc. R=56K, C=68pf m_maincpu->read_k().set(FUNC(palmmd8_state::read_k)); m_maincpu->write_o().set(FUNC(palmmd8_state::write_o)); m_maincpu->write_r().set(FUNC(palmmd8_state::write_r)); @@ -1600,7 +1600,7 @@ INPUT_PORTS_END void cchime_state::cchime(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 400000); // approximation - RC osc. R=39K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(400000)); // approximation - RC osc. R=39K, C=47pF m_maincpu->read_k().set(FUNC(cchime_state::read_k)); m_maincpu->write_o().set(FUNC(cchime_state::write_o)); m_maincpu->write_r().set(FUNC(cchime_state::write_r)); @@ -1747,7 +1747,7 @@ INPUT_PORTS_END void amaztron_state::amaztron(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 300000); // approximation - RC osc. R=33K?, C=100pF + TMS1100(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=33K?, C=100pF m_maincpu->read_k().set(FUNC(amaztron_state::read_k)); m_maincpu->write_r().set(FUNC(amaztron_state::write_r)); m_maincpu->write_o().set(FUNC(amaztron_state::write_o)); @@ -1903,7 +1903,7 @@ INPUT_PORTS_END void zodiac_state::zodiac(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 500000); // approximation - RC osc. R=18K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(500000)); // approximation - RC osc. R=18K, C=100pF m_maincpu->read_k().set(FUNC(zodiac_state::read_k)); m_maincpu->write_r().set(FUNC(zodiac_state::write_r)); m_maincpu->write_o().set(FUNC(zodiac_state::write_o)); @@ -2032,7 +2032,7 @@ INPUT_PORTS_END void cqback_state::cqback(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 310000); // approximation - RC osc. R=33K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(310000)); // approximation - RC osc. R=33K, C=100pF m_maincpu->read_k().set(FUNC(cqback_state::read_k)); m_maincpu->write_r().set(FUNC(cqback_state::write_r)); m_maincpu->write_o().set(FUNC(cqback_state::write_o)); @@ -2162,7 +2162,7 @@ INPUT_PORTS_END void h2hfootb_state::h2hfootb(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 310000); // approximation - RC osc. R=39K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(310000)); // approximation - RC osc. R=39K, C=100pF m_maincpu->read_k().set(FUNC(h2hfootb_state::read_k)); m_maincpu->write_r().set(FUNC(h2hfootb_state::write_r)); m_maincpu->write_o().set(FUNC(h2hfootb_state::write_o)); @@ -2348,7 +2348,7 @@ INPUT_PORTS_END void h2hbaskb_state::h2hbaskb(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=43K, C=100pF + TMS1000(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=43K, C=100pF m_maincpu->read_k().set(FUNC(h2hbaskb_state::read_k)); m_maincpu->write_r().set(FUNC(h2hbaskb_state::write_r)); m_maincpu->write_o().set(FUNC(h2hbaskb_state::write_o)); @@ -2445,7 +2445,7 @@ void h2hbaseb_state::set_clock() { // MCU clock is from an RC circuit with C=47pF, and R value is depending on // skill switch: R=51K(1) or 43K(2) - m_maincpu->set_unscaled_clock((m_inputs[5]->read() & 1) ? 400000 : 350000); + m_maincpu->set_unscaled_clock((m_inputs[5]->read() & 1) ? XTAL::u(400000) : XTAL::u(350000)); } void h2hbaseb_state::update_display() @@ -2515,7 +2515,7 @@ INPUT_PORTS_END void h2hbaseb_state::h2hbaseb(machine_config &config) { // basic machine hardware - TMS1170(config, m_maincpu, 350000); // see set_clock + TMS1170(config, m_maincpu, XTAL::u(350000)); // see set_clock m_maincpu->read_k().set(FUNC(h2hbaseb_state::read_k)); m_maincpu->write_r().set(FUNC(h2hbaseb_state::write_r)); m_maincpu->write_o().set(FUNC(h2hbaseb_state::write_o)); @@ -2642,7 +2642,7 @@ INPUT_PORTS_END void h2hboxing_state::h2hboxing(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=39K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=39K, C=100pF m_maincpu->read_k().set(FUNC(h2hboxing_state::read_k)); m_maincpu->write_r().set(FUNC(h2hboxing_state::write_r)); m_maincpu->write_o().set(FUNC(h2hboxing_state::write_o)); @@ -2831,7 +2831,7 @@ INPUT_PORTS_END void quizwizc_state::quizwizc(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 300000); // approximation - RC osc. R=43K, C=100pF + TMS1000(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=43K, C=100pF m_maincpu->read_k().set(FUNC(quizwizc_state::read_k)); m_maincpu->write_r().set(FUNC(quizwizc_state::write_r)); m_maincpu->write_o().set(FUNC(quizwizc_state::write_o)); @@ -3019,7 +3019,7 @@ INPUT_PORTS_END void tc4_state::tc4(machine_config &config) { // basic machine hardware - TMS1400(config, m_maincpu, 450000); // approximation - RC osc. R=27.3K, C=100pF + TMS1400(config, m_maincpu, XTAL::u(450000)); // approximation - RC osc. R=27.3K, C=100pF m_maincpu->read_k().set(FUNC(tc4_state::read_k)); m_maincpu->write_r().set(FUNC(tc4_state::write_r)); m_maincpu->write_o().set(FUNC(tc4_state::write_o)); @@ -3164,7 +3164,7 @@ INPUT_PORTS_END void mrmusical_state::mrmusical(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 300000); // approximation - RC osc. R=33K, C=100pF + TMS1000(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=33K, C=100pF m_maincpu->read_k().set(FUNC(mrmusical_state::read_k)); m_maincpu->write_o().set(FUNC(mrmusical_state::write_o)); m_maincpu->write_r().set(FUNC(mrmusical_state::write_r)); @@ -3289,7 +3289,7 @@ INPUT_PORTS_END void cnbaskb_state::cnbaskb(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=39K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=39K, C=47pF m_maincpu->read_k().set(FUNC(cnbaskb_state::read_k)); m_maincpu->write_r().set(FUNC(cnbaskb_state::write_r)); m_maincpu->write_o().set(FUNC(cnbaskb_state::write_o)); @@ -3418,7 +3418,7 @@ INPUT_PORTS_END void cmsport_state::cmsport(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(cmsport_state::read_k)); m_maincpu->write_r().set(FUNC(cmsport_state::write_r)); m_maincpu->write_o().set(FUNC(cmsport_state::write_o)); @@ -3557,7 +3557,7 @@ INPUT_PORTS_END void cnfball_state::cnfball(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 350000); // approximation - RC osc. R=39K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=39K, C=47pF m_maincpu->read_k().set(FUNC(cnfball_state::read_k)); m_maincpu->write_r().set(FUNC(cnfball_state::write_r)); m_maincpu->write_o().set(FUNC(cnfball_state::write_o)); @@ -3693,7 +3693,7 @@ INPUT_PORTS_END void cnfball2_state::cnfball2(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 325000); // approximation - RC osc. R=47K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(325000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(cnfball2_state::read_k)); m_maincpu->write_r().set(FUNC(cnfball2_state::write_r)); m_maincpu->write_o().set(FUNC(cnfball2_state::write_o)); @@ -3844,7 +3844,7 @@ INPUT_PORTS_END void eleciq_state::eleciq(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=47K, C=50pF + TMS1000(config, m_maincpu, XTAL::u(325000)); // approximation - RC osc. R=47K, C=50pF m_maincpu->read_k().set(FUNC(eleciq_state::read_k)); m_maincpu->write_r().set(FUNC(eleciq_state::write_r)); m_maincpu->write_o().set(FUNC(eleciq_state::write_o)); @@ -3960,7 +3960,7 @@ INPUT_PORTS_END void qfire_state::qfire(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=39K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=39K, C=47pF m_maincpu->read_k().set(FUNC(qfire_state::read_k)); m_maincpu->write_r().set(FUNC(qfire_state::write_r)); m_maincpu->write_o().set(FUNC(qfire_state::write_o)); @@ -4080,7 +4080,7 @@ INPUT_PORTS_END void esoccer_state::esoccer(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 475000); // approximation - RC osc. R=47K, C=33pF + TMS1000(config, m_maincpu, XTAL::u(475000)); // approximation - RC osc. R=47K, C=33pF m_maincpu->read_k().set(FUNC(esoccer_state::read_k)); m_maincpu->write_r().set(FUNC(esoccer_state::write_r)); m_maincpu->write_o().set(FUNC(esoccer_state::write_o)); @@ -4230,7 +4230,7 @@ INPUT_PORTS_END void ebball_state::ebball(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 375000); // approximation - RC osc. R=43K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=43K, C=47pF m_maincpu->read_k().set(FUNC(ebball_state::read_k)); m_maincpu->write_r().set(FUNC(ebball_state::write_r)); m_maincpu->write_o().set(FUNC(ebball_state::write_o)); @@ -4368,7 +4368,7 @@ INPUT_PORTS_END void ebball2_state::ebball2(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(ebball2_state::read_k)); m_maincpu->write_r().set(FUNC(ebball2_state::write_r)); m_maincpu->write_o().set(FUNC(ebball2_state::write_o)); @@ -4467,7 +4467,7 @@ void ebball3_state::set_clock() // MCU clock is from an RC circuit(R=47K, C=33pF) oscillating by default at ~340kHz, // but on PRO, the difficulty switch adds an extra 150K resistor to Vdd to speed // it up to around ~440kHz. - m_maincpu->set_unscaled_clock((m_inputs[3]->read() & 1) ? 440000 : 340000); + m_maincpu->set_unscaled_clock((m_inputs[3]->read() & 1) ? XTAL::u(440000) : XTAL::u(340000)); } void ebball3_state::update_display() @@ -4552,7 +4552,7 @@ INPUT_PORTS_END void ebball3_state::ebball3(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 340000); // see set_clock + TMS1100(config, m_maincpu, XTAL::u(340000)); // see set_clock m_maincpu->read_k().set(FUNC(ebball3_state::read_k)); m_maincpu->write_r().set(FUNC(ebball3_state::write_r)); m_maincpu->write_o().set(FUNC(ebball3_state::write_o)); @@ -4679,7 +4679,7 @@ INPUT_PORTS_END void esbattle_state::esbattle(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 450000); // approximation - RC osc. R=47K, C=33pF + TMS1000(config, m_maincpu, XTAL::u(450000)); // approximation - RC osc. R=47K, C=33pF m_maincpu->read_k().set(FUNC(esbattle_state::read_k)); m_maincpu->write_r().set(FUNC(esbattle_state::write_r)); m_maincpu->write_o().set(FUNC(esbattle_state::write_o)); @@ -4784,7 +4784,7 @@ INPUT_PORTS_END void blastit_state::blastit(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=33pF + TMS1000(config, m_maincpu, XTAL::u(425000)); // approximation - RC osc. R=47K, C=33pF m_maincpu->read_k().set(FUNC(blastit_state::read_k)); m_maincpu->write_r().set(FUNC(blastit_state::write_r)); m_maincpu->write_o().set(FUNC(blastit_state::write_o)); @@ -4862,7 +4862,7 @@ void einvader_state::set_clock() // MCU clock is from an RC circuit(R=47K, C=56pF) oscillating by default at ~320kHz, // but on PRO, the difficulty switch adds an extra 180K resistor to Vdd to speed // it up to around ~400kHz. - m_maincpu->set_unscaled_clock((m_inputs[0]->read() & 8) ? 400000 : 320000); + m_maincpu->set_unscaled_clock((m_inputs[0]->read() & 8) ? XTAL::u(400000) : XTAL::u(320000)); } void einvader_state::update_display() @@ -4903,7 +4903,7 @@ INPUT_PORTS_END void einvader_state::einvader(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 320000); // see set_clock + TMS1100(config, m_maincpu, XTAL::u(320000)); // see set_clock m_maincpu->read_k().set_ioport("IN.0"); m_maincpu->write_r().set(FUNC(einvader_state::write_r)); m_maincpu->write_o().set(FUNC(einvader_state::write_o)); @@ -5044,7 +5044,7 @@ INPUT_PORTS_END void efootb4_state::efootb4(machine_config &config) { // basic machine hardware - TMS1670(config, m_maincpu, 400000); // approximation - RC osc. R=42K, C=47pF + TMS1670(config, m_maincpu, XTAL::u(400000)); // approximation - RC osc. R=42K, C=47pF m_maincpu->read_k().set(FUNC(efootb4_state::read_k)); m_maincpu->write_r().set(FUNC(efootb4_state::write_r)); m_maincpu->write_o().set(FUNC(efootb4_state::write_o)); @@ -5188,7 +5188,7 @@ INPUT_PORTS_END void ebaskb2_state::ebaskb2(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 360000); // approximation - RC osc. R=33K, C=82pF + TMS1100(config, m_maincpu, XTAL::u(360000)); // approximation - RC osc. R=33K, C=82pF m_maincpu->read_k().set(FUNC(ebaskb2_state::read_k)); m_maincpu->write_r().set(FUNC(ebaskb2_state::write_r)); m_maincpu->write_o().set(FUNC(ebaskb2_state::write_o)); @@ -5288,7 +5288,7 @@ void raisedvl_state::set_clock() // 2,3: R=35K8 -> ~425kHz (combined) // 4: R=32K -> ~465kHz (combined) u8 inp = m_inputs[1]->read(); - m_maincpu->set_unscaled_clock((inp & 0x20) ? 465000 : ((inp & 0x10) ? 425000 : 350000)); + m_maincpu->set_unscaled_clock((inp & 0x20) ? XTAL::u(465000) : ((inp & 0x10) ? XTAL::u(425000) : XTAL::u(350000))); } void raisedvl_state::update_display() @@ -5344,7 +5344,7 @@ INPUT_PORTS_END void raisedvl_state::raisedvl(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // see set_clock + TMS1100(config, m_maincpu, XTAL::u(350000)); // see set_clock m_maincpu->read_k().set(FUNC(raisedvl_state::read_k)); m_maincpu->write_r().set(FUNC(raisedvl_state::write_r)); m_maincpu->write_o().set(FUNC(raisedvl_state::write_o)); @@ -5526,7 +5526,7 @@ INPUT_PORTS_END void mmarvin_state::mmarvin(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 300000); // approximation - RC osc. R=51K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=51K, C=47pF m_maincpu->read_k().set(FUNC(mmarvin_state::read_k)); m_maincpu->write_r().set(FUNC(mmarvin_state::write_r)); m_maincpu->write_o().set(FUNC(mmarvin_state::write_o)); @@ -5672,7 +5672,7 @@ INPUT_PORTS_END void f2pbball_state::f2pbball(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=51K, C=39pF + TMS1000(config, m_maincpu, XTAL::u(325000)); // approximation - RC osc. R=51K, C=39pF m_maincpu->read_k().set(FUNC(f2pbball_state::read_k)); m_maincpu->write_r().set(FUNC(f2pbball_state::write_r)); m_maincpu->write_o().set(FUNC(f2pbball_state::write_o)); @@ -5750,7 +5750,7 @@ void f3in1_state::machine_reset() void f3in1_state::set_clock() { // MCU clock is from an RC circuit where C=47pF, R=39K(PROF) or 56K(REG) - m_maincpu->set_unscaled_clock((m_inputs[4]->read() & 1) ? 400000 : 300000); + m_maincpu->set_unscaled_clock((m_inputs[4]->read() & 1) ? XTAL::u(400000) : XTAL::u(300000)); } void f3in1_state::update_display() @@ -5820,7 +5820,7 @@ INPUT_PORTS_END void f3in1_state::f3in1(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 300000); // see set_clock + TMS1100(config, m_maincpu, XTAL::u(300000)); // see set_clock m_maincpu->read_k().set(FUNC(f3in1_state::read_k)); m_maincpu->write_r().set(FUNC(f3in1_state::write_r)); m_maincpu->write_o().set(FUNC(f3in1_state::write_o)); @@ -5976,7 +5976,7 @@ INPUT_PORTS_END void gpoker_state::gpoker(machine_config &config) { // basic machine hardware - TMS1370(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + TMS1370(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(gpoker_state::read_k)); m_maincpu->write_r().set(FUNC(gpoker_state::write_r)); m_maincpu->write_o().set(FUNC(gpoker_state::write_o)); @@ -5988,7 +5988,7 @@ void gpoker_state::gpoker(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2400); // astable multivibrator - C1 and C2 are 0.003uF, R1 and R4 are 1K, R2 and R3 are 100K + BEEP(config, m_beeper, XTAL::u(2400)); // astable multivibrator - C1 and C2 are 0.003uF, R1 and R4 are 1K, R2 and R3 are 100K m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25); } @@ -6107,7 +6107,7 @@ void gjackpot_state::gjackpot(machine_config &config) gpoker(config); // basic machine hardware - TMS1670(config.replace(), m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + TMS1670(config.replace(), m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(gjackpot_state::read_k)); m_maincpu->write_r().set(FUNC(gjackpot_state::write_r)); m_maincpu->write_o().set(FUNC(gjackpot_state::write_o)); @@ -6223,7 +6223,7 @@ INPUT_PORTS_END void ginv_state::ginv(machine_config &config) { // basic machine hardware - TMS1370(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + TMS1370(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(ginv_state::read_k)); m_maincpu->write_r().set(FUNC(ginv_state::write_r)); m_maincpu->write_o().set(FUNC(ginv_state::write_o)); @@ -6348,7 +6348,7 @@ INPUT_PORTS_END void ginv1000_state::ginv1000(machine_config &config) { // basic machine hardware - TMS1370(config, m_maincpu, 350000); // approximation + TMS1370(config, m_maincpu, XTAL::u(350000)); // approximation m_maincpu->read_k().set(FUNC(ginv1000_state::read_k)); m_maincpu->write_r().set(FUNC(ginv1000_state::write_r)); m_maincpu->write_o().set(FUNC(ginv1000_state::write_o)); @@ -6486,7 +6486,7 @@ INPUT_PORTS_END void ginv2000_state::ginv2000(machine_config &config) { // basic machine hardware - TMS1370(config, m_maincpu, 425000); // approximation - RC osc. R=36K, C=47pF + TMS1370(config, m_maincpu, XTAL::u(425000)); // approximation - RC osc. R=36K, C=47pF m_maincpu->read_k().set(FUNC(ginv2000_state::read_k)); m_maincpu->write_r().set(FUNC(ginv2000_state::write_r)); m_maincpu->write_o().set(FUNC(ginv2000_state::write_o)); @@ -6790,7 +6790,7 @@ INPUT_PORTS_END void elecdet_state::elecdet(machine_config &config) { // basic machine hardware - TMS0980(config, m_maincpu, 425000); // approximation + TMS0980(config, m_maincpu, XTAL::u(425000)); // approximation m_maincpu->read_k().set(FUNC(elecdet_state::read_k)); m_maincpu->write_r().set(FUNC(elecdet_state::write_r)); m_maincpu->write_o().set(FUNC(elecdet_state::write_o)); @@ -6938,7 +6938,7 @@ INPUT_PORTS_END void starwbc_state::starwbc(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=51K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=51K, C=47pF m_maincpu->read_k().set(FUNC(starwbc_state::read_k)); m_maincpu->write_r().set(FUNC(starwbc_state::write_r)); m_maincpu->write_o().set(FUNC(starwbc_state::write_o)); @@ -7087,7 +7087,7 @@ INPUT_PORTS_END void liveafb_state::liveafb(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=33K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=33K, C=100pF m_maincpu->read_k().set(FUNC(liveafb_state::read_k)); m_maincpu->write_r().set(FUNC(liveafb_state::write_r)); m_maincpu->write_o().set(FUNC(liveafb_state::write_o)); @@ -7238,7 +7238,7 @@ INPUT_PORTS_END void astro_state::astro(machine_config &config) { // basic machine hardware - TMS1470(config, m_maincpu, 450000); // approximation - RC osc. R=4.7K, C=33pF + TMS1470(config, m_maincpu, XTAL::u(450000)); // approximation - RC osc. R=4.7K, C=33pF m_maincpu->read_k().set(FUNC(astro_state::read_k)); m_maincpu->write_r().set(FUNC(astro_state::write_r)); m_maincpu->write_o().set(FUNC(astro_state::write_o)); @@ -7401,7 +7401,7 @@ static const u16 elecbowl_output_pla[0x20] = void elecbowl_state::elecbowl(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=33K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=33K, C=100pF m_maincpu->set_output_pla(elecbowl_output_pla); m_maincpu->read_k().set(FUNC(elecbowl_state::read_k)); m_maincpu->write_r().set(FUNC(elecbowl_state::write_r)); @@ -7569,12 +7569,12 @@ INPUT_PORTS_END void horseran_state::horseran(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 300000); // approximation - RC osc. R=56K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=56K, C=47pF m_maincpu->read_k().set(FUNC(horseran_state::read_k)); m_maincpu->write_r().set(FUNC(horseran_state::write_r)); // video hardware - HLCD0569(config, m_lcd, 1100); // C=0.022uF + HLCD0569(config, m_lcd, XTAL::u(1100)); // C=0.022uF m_lcd->write_cols().set(FUNC(horseran_state::lcd_output_w)); PWM_DISPLAY(config, m_display).set_size(3+6, 24); @@ -7764,7 +7764,7 @@ INPUT_PORTS_END void mdndclab_state::mdndclab(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 475000); // approximation - RC osc. R=27K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(475000)); // approximation - RC osc. R=27K, C=100pF m_maincpu->read_k().set(FUNC(mdndclab_state::read_k)); m_maincpu->write_r().set(FUNC(mdndclab_state::write_r)); m_maincpu->write_o().set(FUNC(mdndclab_state::write_o)); @@ -7880,7 +7880,7 @@ INPUT_PORTS_END void comp4_state::comp4(machine_config &config) { // basic machine hardware - TMS0970(config, m_maincpu, 250000); // approximation + TMS0970(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(comp4_state::read_k)); m_maincpu->write_r().set(FUNC(comp4_state::write_r)); m_maincpu->write_o().set(FUNC(comp4_state::write_o)); @@ -8049,7 +8049,7 @@ INPUT_PORTS_END void bship_state::bship(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=100K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(200000)); // approximation - RC osc. R=100K, C=47pF m_maincpu->read_k().set(FUNC(bship_state::read_k)); m_maincpu->write_r().set(FUNC(bship_state::write_r)); m_maincpu->write_o().set(FUNC(bship_state::write_o)); @@ -8167,7 +8167,7 @@ u8 bshipb_state::read_k() void bshipb_state::bshipb(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=100K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(200000)); // approximation - RC osc. R=100K, C=47pF m_maincpu->read_k().set(FUNC(bshipb_state::read_k)); m_maincpu->write_r().set(FUNC(bshipb_state::write_r)); m_maincpu->write_o().set(FUNC(bshipb_state::write_o)); @@ -8306,7 +8306,7 @@ INPUT_PORTS_END void simon_state::simon(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 325000); // approximation - RC osc. R=33K, C=100pF + TMS1000(config, m_maincpu, XTAL::u(325000)); // approximation - RC osc. R=33K, C=100pF m_maincpu->read_k().set(FUNC(simon_state::read_k)); m_maincpu->write_r().set(FUNC(simon_state::write_r)); @@ -8392,7 +8392,7 @@ void ssimon_state::set_clock() // 1 Normal: R=37K -> ~275kHz // 2 Super: R=22K -> ~400kHz u8 inp = m_inputs[6]->read(); - m_maincpu->set_unscaled_clock((inp & 2) ? 400000 : ((inp & 1) ? 275000 : 200000)); + m_maincpu->set_unscaled_clock((inp & 2) ? XTAL::u(400000) : ((inp & 1) ? XTAL::u(275000) : XTAL::u(200000))); } void ssimon_state::write_r(u32 data) @@ -8475,7 +8475,7 @@ INPUT_PORTS_END void ssimon_state::ssimon(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 275000); // see set_clock + TMS1100(config, m_maincpu, XTAL::u(275000)); // see set_clock m_maincpu->read_k().set(FUNC(ssimon_state::read_k)); m_maincpu->write_r().set(FUNC(ssimon_state::write_r)); @@ -8692,7 +8692,7 @@ INPUT_PORTS_END void bigtrak_state::bigtrak(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=83K, C=100pF + TMS1000(config, m_maincpu, XTAL::u(200000)); // approximation - RC osc. R=83K, C=100pF m_maincpu->read_k().set(FUNC(bigtrak_state::read_k)); m_maincpu->write_r().set(FUNC(bigtrak_state::write_r)); m_maincpu->write_o().set(FUNC(bigtrak_state::write_o)); @@ -8939,7 +8939,7 @@ INPUT_PORTS_END void mbdtower_state::mbdtower(machine_config &config) { // basic machine hardware - TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=43K, C=56pF + TMS1400(config, m_maincpu, XTAL::u(425000)); // approximation - RC osc. R=43K, C=56pF m_maincpu->read_k().set(FUNC(mbdtower_state::read_k)); m_maincpu->write_r().set(FUNC(mbdtower_state::write_r)); m_maincpu->write_o().set(FUNC(mbdtower_state::write_o)); @@ -9065,7 +9065,7 @@ INPUT_PORTS_END void arcmania_state::arcmania(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 250000); // approximation - RC osc. R=56K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(250000)); // approximation - RC osc. R=56K, C=100pF m_maincpu->read_k().set(FUNC(arcmania_state::read_k)); m_maincpu->write_r().set(FUNC(arcmania_state::write_r)); m_maincpu->write_o().set(FUNC(arcmania_state::write_o)); @@ -9199,7 +9199,7 @@ INPUT_PORTS_END void cnsector_state::cnsector(machine_config &config) { // basic machine hardware - TMS0970(config, m_maincpu, 250000); // approximation + TMS0970(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(cnsector_state::read_k)); m_maincpu->write_r().set(FUNC(cnsector_state::write_r)); m_maincpu->write_o().set(FUNC(cnsector_state::write_o)); @@ -9331,7 +9331,7 @@ INPUT_PORTS_END void merlin_state::merlin(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=33K, C=100pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=33K, C=100pF m_maincpu->read_k().set(FUNC(merlin_state::read_k)); m_maincpu->write_r().set(FUNC(merlin_state::write_r)); m_maincpu->write_o().set(FUNC(merlin_state::write_o)); @@ -9412,7 +9412,7 @@ void mmerlin_state::mmerlin(machine_config &config) merlin(config); // basic machine hardware - TMS1400(config.replace(), m_maincpu, 425000); // approximation - RC osc. R=30K, C=100pF + TMS1400(config.replace(), m_maincpu, XTAL::u(425000)); // approximation - RC osc. R=30K, C=100pF m_maincpu->read_k().set(FUNC(mmerlin_state::read_k)); m_maincpu->write_r().set(FUNC(mmerlin_state::write_r)); m_maincpu->write_o().set(FUNC(mmerlin_state::write_o)); @@ -9526,7 +9526,7 @@ INPUT_PORTS_END void pbmastm_state::pbmastm(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 300000); // approximation - RC osc. R=56K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=56K, C=47pF m_maincpu->read_k().set(FUNC(pbmastm_state::read_k)); m_maincpu->write_r().set(FUNC(pbmastm_state::write_r)); m_maincpu->write_o().set(FUNC(pbmastm_state::write_o)); @@ -9647,7 +9647,7 @@ INPUT_PORTS_END void stopthief_state::stopthief(machine_config &config) { // basic machine hardware - TMS0980(config, m_maincpu, 425000); // approximation + TMS0980(config, m_maincpu, XTAL::u(425000)); // approximation m_maincpu->read_k().set(FUNC(stopthief_state::read_k)); m_maincpu->write_r().set(FUNC(stopthief_state::write_r)); m_maincpu->write_o().set(FUNC(stopthief_state::write_o)); @@ -9799,7 +9799,7 @@ INPUT_PORTS_END void bankshot_state::bankshot(machine_config &config) { // basic machine hardware - TMS1400(config, m_maincpu, 475000); // approximation - RC osc. R=24K, C=100pF + TMS1400(config, m_maincpu, XTAL::u(475000)); // approximation - RC osc. R=24K, C=100pF m_maincpu->read_k().set(FUNC(bankshot_state::read_k)); m_maincpu->write_r().set(FUNC(bankshot_state::write_r)); m_maincpu->write_o().set(FUNC(bankshot_state::write_o)); @@ -9932,7 +9932,7 @@ INPUT_PORTS_END void splitsec_state::splitsec(machine_config &config) { // basic machine hardware - TMS1400(config, m_maincpu, 475000); // approximation - RC osc. R=24K, C=100pF + TMS1400(config, m_maincpu, XTAL::u(475000)); // approximation - RC osc. R=24K, C=100pF m_maincpu->read_k().set(FUNC(splitsec_state::read_k)); m_maincpu->write_r().set(FUNC(splitsec_state::write_r)); m_maincpu->write_o().set(FUNC(splitsec_state::write_o)); @@ -10059,7 +10059,7 @@ INPUT_PORTS_END void lostreas_state::lostreas(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 425000); // approximation - RC osc. R=39K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(425000)); // approximation - RC osc. R=39K, C=47pF m_maincpu->read_k().set(FUNC(lostreas_state::read_k)); m_maincpu->write_r().set(FUNC(lostreas_state::write_r)); m_maincpu->write_o().set(FUNC(lostreas_state::write_o)); @@ -10206,7 +10206,7 @@ static const u16 alphie_output_pla[0x20] = void alphie_state::alphie(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 350000); // approximation + TMS1000(config, m_maincpu, XTAL::u(350000)); // approximation m_maincpu->set_output_pla(alphie_output_pla); m_maincpu->read_k().set(FUNC(alphie_state::read_k)); m_maincpu->write_r().set(FUNC(alphie_state::write_r)); @@ -10329,7 +10329,7 @@ INPUT_PORTS_END void tcfball_state::tcfball(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=56K, C=24pF + TMS1100(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=56K, C=24pF m_maincpu->read_k().set(FUNC(tcfball_state::read_k)); m_maincpu->write_r().set(FUNC(tcfball_state::write_r)); m_maincpu->write_o().set(FUNC(tcfball_state::write_o)); @@ -10405,7 +10405,7 @@ void tcfballa_state::tcfballa(machine_config &config) tcfball(config); // basic machine hardware - m_maincpu->set_clock(375000); // approximation - RC osc. R=47K, C=50pF + m_maincpu->set_clock(XTAL::u(375000)); // approximation - RC osc. R=47K, C=50pF config.set_default_layout(layout_tcfballa); } @@ -10578,7 +10578,7 @@ static const u16 tandy12_output_pla[0x20] = void tandy12_state::tandy12(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 400000); // approximation - RC osc. R=39K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(400000)); // approximation - RC osc. R=39K, C=47pF m_maincpu->set_output_pla(tandy12_output_pla); m_maincpu->read_k().set(FUNC(tandy12_state::read_k)); m_maincpu->write_r().set(FUNC(tandy12_state::write_r)); @@ -10702,7 +10702,7 @@ INPUT_PORTS_END void monkeysee_state::monkeysee(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 250000); // approximation - RC osc. R=68K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(250000)); // approximation - RC osc. R=68K, C=47pF m_maincpu->read_k().set(FUNC(monkeysee_state::read_k)); m_maincpu->write_r().set(FUNC(monkeysee_state::write_r)); m_maincpu->write_o().set(FUNC(monkeysee_state::write_o)); @@ -10867,7 +10867,7 @@ INPUT_PORTS_END void t3in1sa_state::t3in1sa(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(t3in1sa_state::read_k)); m_maincpu->write_r().set(FUNC(t3in1sa_state::write_r)); m_maincpu->write_o().set(FUNC(t3in1sa_state::write_o)); @@ -11032,7 +11032,7 @@ INPUT_PORTS_END void speechp_state::speechp(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 400000); // approximation - RC osc. R=39K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(400000)); // approximation - RC osc. R=39K, C=47pF m_maincpu->read_k().set(FUNC(speechp_state::read_k)); m_maincpu->write_r().set(FUNC(speechp_state::write_r)); m_maincpu->write_o().set(FUNC(speechp_state::write_o)); @@ -11044,7 +11044,7 @@ void speechp_state::speechp(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - S14001A(config, m_speech, 25000); // approximation + S14001A(config, m_speech, XTAL::u(25000)); // approximation m_speech->add_route(ALL_OUTPUTS, "mono", 0.75); } @@ -11268,7 +11268,7 @@ INPUT_PORTS_END void tisr16_state::tisr16(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 300000); // approximation - RC osc. R=43K, C=68pf (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf, same freq) + TMS1000(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=43K, C=68pf (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf, same freq) m_maincpu->read_k().set(FUNC(tisr16_state::read_k)); m_maincpu->write_o().set(FUNC(tisr16_state::write_o)); m_maincpu->write_r().set(FUNC(tisr16_state::write_r)); @@ -11431,7 +11431,7 @@ INPUT_PORTS_END void ti1250_state::ti1250(machine_config &config) { // basic machine hardware - TMS0950(config, m_maincpu, 200000); // approximation - RC osc. R=68K, C=68pf + TMS0950(config, m_maincpu, XTAL::u(200000)); // approximation - RC osc. R=68K, C=68pf m_maincpu->read_k().set(FUNC(ti1250_state::read_k)); m_maincpu->write_o().set(FUNC(ti1250_state::write_o)); m_maincpu->write_r().set(FUNC(ti1250_state::write_r)); @@ -11450,7 +11450,7 @@ void ti1250_state::ti1270(machine_config &config) ti1250(config); // basic machine hardware - TMS0970(config.replace(), m_maincpu, 250000); // approximation + TMS0970(config.replace(), m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(ti1250_state::read_k)); m_maincpu->write_o().set(FUNC(ti1250_state::write_o)); m_maincpu->write_r().set(FUNC(ti1250_state::write_r)); @@ -11608,7 +11608,7 @@ INPUT_PORTS_END void ti25503_state::ti25503(machine_config &config) { // basic machine hardware - TMS1040(config, m_maincpu, 250000); // approximation + TMS1040(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(ti25503_state::read_k)); m_maincpu->write_o().set(FUNC(ti25503_state::write_o)); m_maincpu->write_r().set(FUNC(ti25503_state::write_r)); @@ -11760,7 +11760,7 @@ INPUT_PORTS_END void ti5100_state::ti5100(machine_config &config) { // basic machine hardware - TMS1070(config, m_maincpu, 250000); // approximation + TMS1070(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(ti5100_state::read_k)); m_maincpu->write_o().set(FUNC(ti5100_state::write_o)); m_maincpu->write_r().set(FUNC(ti5100_state::write_r)); @@ -12030,7 +12030,7 @@ INPUT_PORTS_END void ti30_state::ti30(machine_config &config) { // basic machine hardware - TMS0980(config, m_maincpu, 400000); // guessed + TMS0980(config, m_maincpu, XTAL::u(400000)); // guessed m_maincpu->read_k().set(FUNC(ti30_state::read_k)); m_maincpu->write_o().set(FUNC(ti30_state::write_o)); m_maincpu->write_r().set(FUNC(ti30_state::write_r)); @@ -12179,7 +12179,7 @@ INPUT_PORTS_END void ti1000_state::ti1000(machine_config &config) { // basic machine hardware - TMS1990(config, m_maincpu, 250000); // approximation + TMS1990(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(ti1000_state::read_k)); m_maincpu->write_o().set(FUNC(ti1000_state::write_o)); m_maincpu->write_r().set(FUNC(ti1000_state::write_r)); @@ -12297,7 +12297,7 @@ INPUT_PORTS_END void wizatron_state::wizatron(machine_config &config) { // basic machine hardware - TMS0970(config, m_maincpu, 250000); // approximation + TMS0970(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(wizatron_state::read_k)); m_maincpu->write_o().set(FUNC(wizatron_state::write_o)); m_maincpu->write_r().set(FUNC(wizatron_state::write_r)); @@ -12513,7 +12513,7 @@ INPUT_PORTS_END void lilprof78_state::lilprof78(machine_config &config) { // basic machine hardware - TMS1990(config, m_maincpu, 250000); // approximation + TMS1990(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(lilprof78_state::read_k)); m_maincpu->write_o().set(FUNC(lilprof78_state::write_o)); m_maincpu->write_r().set(FUNC(lilprof78_state::write_r)); @@ -12659,7 +12659,7 @@ INPUT_PORTS_END void ti1680_state::ti1680(machine_config &config) { // basic machine hardware - TMS1980(config, m_maincpu, 300000); // approximation + TMS1980(config, m_maincpu, XTAL::u(300000)); // approximation m_maincpu->read_k().set(FUNC(ti1680_state::read_k)); m_maincpu->write_o().set(FUNC(ti1680_state::write_o)); m_maincpu->write_r().set(FUNC(ti1680_state::write_r)); @@ -12791,7 +12791,7 @@ INPUT_PORTS_END void dataman_state::dataman(machine_config &config) { // basic machine hardware - TMS1980(config, m_maincpu, 300000); // patent says 300kHz + TMS1980(config, m_maincpu, XTAL::u(300000)); // patent says 300kHz m_maincpu->read_k().set(FUNC(dataman_state::read_k)); m_maincpu->write_o().set(FUNC(dataman_state::write_o)); m_maincpu->write_r().set(FUNC(dataman_state::write_r)); @@ -12970,7 +12970,7 @@ INPUT_PORTS_END void timaze_state::timaze(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 200000); // approximation - RC osc. R=80K, C=27pF + TMS1000(config, m_maincpu, XTAL::u(200000)); // approximation - RC osc. R=80K, C=27pF m_maincpu->read_k().set(FUNC(timaze_state::read_k)); m_maincpu->write_r().set(FUNC(timaze_state::write_r)); m_maincpu->write_o().set(FUNC(timaze_state::write_o)); @@ -13126,12 +13126,12 @@ INPUT_PORTS_END void tithermos_state::tithermos(machine_config &config) { // basic machine hardware - TMS0970(config, m_maincpu, 250000); // approximation + TMS0970(config, m_maincpu, XTAL::u(250000)); // approximation m_maincpu->read_k().set(FUNC(tithermos_state::read_k)); m_maincpu->write_r().set(FUNC(tithermos_state::write_r)); m_maincpu->write_o().set(FUNC(tithermos_state::write_o)); - CLOCK(config, "ac_line", 60); + CLOCK(config, "ac_line", XTAL::u(60)); // video hardware PWM_DISPLAY(config, m_display).set_size(4, 7); @@ -13228,7 +13228,7 @@ INPUT_PORTS_END void subwars_state::subwars(machine_config &config) { // basic machine hardware - TMS1200(config, m_maincpu, 550000); // approximation - RC osc. R=24K, C=47pF + TMS1200(config, m_maincpu, XTAL::u(550000)); // approximation - RC osc. R=24K, C=47pF m_maincpu->read_k().set_ioport("IN.0"); m_maincpu->write_r().set(FUNC(subwars_state::write_r)); m_maincpu->write_o().set(FUNC(subwars_state::write_o)); @@ -13384,7 +13384,7 @@ INPUT_PORTS_END void playmaker_state::playmaker(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=20K, C=250pF + TMS1100(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=20K, C=250pF m_maincpu->read_k().set(FUNC(playmaker_state::read_k)); m_maincpu->write_r().set(FUNC(playmaker_state::write_r)); m_maincpu->write_o().set(FUNC(playmaker_state::write_o)); @@ -13522,7 +13522,7 @@ INPUT_PORTS_END void dxfootb_state::dxfootb(machine_config &config) { // basic machine hardware - TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=47pF + TMS1400(config, m_maincpu, XTAL::u(425000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(dxfootb_state::read_k)); m_maincpu->write_r().set(FUNC(dxfootb_state::write_r)); m_maincpu->write_o().set(FUNC(dxfootb_state::write_o)); @@ -13643,7 +13643,7 @@ INPUT_PORTS_END void copycat_state::copycat(machine_config &config) { // basic machine hardware - TMS1000(config, m_maincpu, 320000); // approximation - RC osc. R=47K, C=47pF + TMS1000(config, m_maincpu, XTAL::u(320000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(copycat_state::read_k)); m_maincpu->write_r().set(FUNC(copycat_state::write_r)); m_maincpu->write_o().set(FUNC(copycat_state::write_o)); @@ -13735,7 +13735,7 @@ INPUT_PORTS_END void copycatm2_state::copycatm2(machine_config &config) { // basic machine hardware - TMS1730(config, m_maincpu, 275000); // approximation - RC osc. R=100K, C=47pF + TMS1730(config, m_maincpu, XTAL::u(275000)); // approximation - RC osc. R=100K, C=47pF m_maincpu->read_k().set_ioport("IN.0"); m_maincpu->write_r().set(FUNC(copycatm2_state::write_r)); m_maincpu->write_o().set(FUNC(copycatm2_state::write_o)); @@ -13822,7 +13822,7 @@ INPUT_PORTS_END void ditto_state::ditto(machine_config &config) { // basic machine hardware - TMS1700(config, m_maincpu, 275000); // approximation - RC osc. R=100K, C=47pF + TMS1700(config, m_maincpu, XTAL::u(275000)); // approximation - RC osc. R=100K, C=47pF m_maincpu->read_k().set_ioport("IN.0"); m_maincpu->write_r().set(FUNC(ditto_state::write_r)); m_maincpu->write_o().set(FUNC(ditto_state::write_o)); @@ -13953,7 +13953,7 @@ INPUT_PORTS_END void t7in1ss_state::t7in1ss(machine_config &config) { // basic machine hardware - TMS1400(config, m_maincpu, 425000); // approximation - RC osc. R=47K, C=47pF + TMS1400(config, m_maincpu, XTAL::u(425000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(t7in1ss_state::read_k)); m_maincpu->write_r().set(FUNC(t7in1ss_state::write_r)); m_maincpu->write_o().set(FUNC(t7in1ss_state::write_o)); @@ -14066,7 +14066,7 @@ void tbreakup_state::machine_reset() void tbreakup_state::set_clock() { // MCU clock is from an analog circuit with resistor of 73K, PRO2 adds 100K - m_maincpu->set_unscaled_clock((m_inputs[3]->read() & 1) ? 500000 : 325000); + m_maincpu->set_unscaled_clock((m_inputs[3]->read() & 1) ? XTAL::u(500000) : XTAL::u(325000)); } void tbreakup_state::update_display() @@ -14146,7 +14146,7 @@ INPUT_PORTS_END void tbreakup_state::tbreakup(machine_config &config) { // basic machine hardware - TMS1040(config, m_maincpu, 325000); // see set_clock + TMS1040(config, m_maincpu, XTAL::u(325000)); // see set_clock m_maincpu->read_k().set(FUNC(tbreakup_state::read_k)); m_maincpu->write_r().set(FUNC(tbreakup_state::write_r)); m_maincpu->write_o().set(FUNC(tbreakup_state::write_o)); @@ -14288,7 +14288,7 @@ INPUT_PORTS_END void phpball_state::phpball(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 375000); // approximation - RC osc. R=47K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(375000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(phpball_state::read_k)); m_maincpu->write_r().set(FUNC(phpball_state::write_r)); m_maincpu->write_o().set(FUNC(phpball_state::write_o)); @@ -14408,7 +14408,7 @@ INPUT_PORTS_END void tdracula_state::tdracula(machine_config &config) { // basic machine hardware - TMS1475(config, m_maincpu, 500000); // approximation - RC osc. R=43K, C=47pF + TMS1475(config, m_maincpu, XTAL::u(500000)); // approximation - RC osc. R=43K, C=47pF m_maincpu->read_k().set(FUNC(tdracula_state::read_k)); m_maincpu->write_r().set(FUNC(tdracula_state::write_r)); m_maincpu->write_o().set(FUNC(tdracula_state::write_o)); @@ -14541,7 +14541,7 @@ INPUT_PORTS_END void slepachi_state::slepachi(machine_config &config) { // basic machine hardware - TMS2670(config, m_maincpu, 450000); // approximation - RC osc. R=47K, C=47pF + TMS2670(config, m_maincpu, XTAL::u(450000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set_ioport("IN.0"); m_maincpu->read_j().set_ioport("IN.1"); m_maincpu->write_r().set(FUNC(slepachi_state::write_r)); @@ -14705,7 +14705,7 @@ INPUT_PORTS_END void scruiser_state::scruiser(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(scruiser_state::read_k)); m_maincpu->write_r().set(FUNC(scruiser_state::write_r)); m_maincpu->write_o().set(FUNC(scruiser_state::write_o)); @@ -14865,7 +14865,7 @@ INPUT_PORTS_END void ssports4_state::ssports4(machine_config &config) { // basic machine hardware - TMS1100(config, m_maincpu, 350000); // approximation - RC osc. R=47K, C=47pF + TMS1100(config, m_maincpu, XTAL::u(350000)); // approximation - RC osc. R=47K, C=47pF m_maincpu->read_k().set(FUNC(ssports4_state::read_k)); m_maincpu->write_r().set(FUNC(ssports4_state::write_r)); m_maincpu->write_o().set(FUNC(ssports4_state::write_o)); @@ -15049,7 +15049,7 @@ INPUT_PORTS_END void xl25_state::xl25(machine_config &config) { // basic machine hardware - TMS1000C(config, m_maincpu, 300000); // approximation - RC osc. R=5.6K, C=47pF + TMS1000C(config, m_maincpu, XTAL::u(300000)); // approximation - RC osc. R=5.6K, C=47pF m_maincpu->read_k().set(FUNC(xl25_state::read_k)); m_maincpu->write_r().set(FUNC(xl25_state::write_r)); m_maincpu->write_o().set(FUNC(xl25_state::write_o)); diff --git a/src/mame/handheld/hh_ucom4.cpp b/src/mame/handheld/hh_ucom4.cpp index 7d07ad4a970..d04311c5a2f 100644 --- a/src/mame/handheld/hh_ucom4.cpp +++ b/src/mame/handheld/hh_ucom4.cpp @@ -324,7 +324,7 @@ INPUT_PORTS_END void ufombs_state::ufombs(machine_config &config) { // basic machine hardware - NEC_D552(config, m_maincpu, 400000); // approximation + NEC_D552(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->read_b().set_ioport("IN.1"); m_maincpu->write_c().set(FUNC(ufombs_state::plate_w)); @@ -478,7 +478,7 @@ INPUT_PORTS_END void ssfball_state::ssfball(machine_config &config) { // basic machine hardware - NEC_D553(config, m_maincpu, 400000); // approximation + NEC_D553(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set_ioport("IN.3"); m_maincpu->read_b().set(FUNC(ssfball_state::input_b_r)); m_maincpu->write_c().set(FUNC(ssfball_state::grid_w)); @@ -626,7 +626,7 @@ INPUT_PORTS_END void bmsoccer_state::bmsoccer(machine_config &config) { // basic machine hardware - NEC_D552(config, m_maincpu, 400000); // approximation + NEC_D552(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set(FUNC(bmsoccer_state::input_a_r)); m_maincpu->read_b().set_ioport("IN.2"); m_maincpu->write_c().set(FUNC(bmsoccer_state::grid_w)); @@ -745,7 +745,7 @@ INPUT_PORTS_END void bmsafari_state::bmsafari(machine_config &config) { // basic machine hardware - NEC_D552(config, m_maincpu, 400000); // approximation + NEC_D552(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->read_b().set_ioport("IN.1"); m_maincpu->write_c().set(FUNC(bmsafari_state::grid_w)); @@ -905,7 +905,7 @@ INPUT_PORTS_END void splasfgt_state::splasfgt(machine_config &config) { // basic machine hardware - NEC_D553(config, m_maincpu, 400000); // approximation + NEC_D553(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set_ioport("IN.4"); m_maincpu->read_b().set(FUNC(splasfgt_state::input_b_r)); m_maincpu->write_c().set(FUNC(splasfgt_state::plate_w)); @@ -1157,7 +1157,7 @@ INPUT_PORTS_END void tactix_state::tactix(machine_config &config) { // basic machine hardware - NEC_D557L(config, m_maincpu, 200000); // approximation + NEC_D557L(config, m_maincpu, XTAL::u(200000)); // approximation m_maincpu->read_a().set(FUNC(tactix_state::input_r)); m_maincpu->write_c().set(FUNC(tactix_state::input_w)); m_maincpu->write_d().set(FUNC(tactix_state::leds_w)); @@ -1299,7 +1299,7 @@ INPUT_PORTS_END void ctntune_state::ctntune(machine_config &config) { // basic machine hardware - NEC_D557L(config, m_maincpu, 200000); // approximation + NEC_D557L(config, m_maincpu, XTAL::u(200000)); // approximation m_maincpu->read_a().set(FUNC(ctntune_state::input_r)); m_maincpu->write_c().set(FUNC(ctntune_state::input_w)); m_maincpu->write_d().set(FUNC(ctntune_state::input_w)); @@ -1994,7 +1994,7 @@ void mcompgin_state::mcompgin(machine_config &config) m_maincpu->write_e().set(FUNC(mcompgin_state::lcd_w)); // video hardware - HLCD0530(config, m_lcd, 500); // C=0.01uF + HLCD0530(config, m_lcd, XTAL::u(500)); // C=0.01uF m_lcd->write_cols().set(FUNC(mcompgin_state::lcd_output_w)); PWM_DISPLAY(config, m_display).set_size(8, 24); @@ -2094,7 +2094,7 @@ INPUT_PORTS_END void mvbfree_state::mvbfree(machine_config &config) { // basic machine hardware - NEC_D553(config, m_maincpu, 400000); // approximation + NEC_D553(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->read_b().set_ioport("IN.1"); m_maincpu->write_c().set(FUNC(mvbfree_state::plate_w)); @@ -2223,7 +2223,7 @@ INPUT_PORTS_END void grobot9_state::grobot9(machine_config &config) { // basic machine hardware - NEC_D557L(config, m_maincpu, 160000); // approximation + NEC_D557L(config, m_maincpu, XTAL::u(160000)); // approximation m_maincpu->read_a().set(FUNC(grobot9_state::input_r)); m_maincpu->write_c().set(FUNC(grobot9_state::input_w)); m_maincpu->write_d().set(FUNC(grobot9_state::lamps_w)); @@ -2325,7 +2325,7 @@ INPUT_PORTS_END void tccombat_state::tccombat(machine_config &config) { // basic machine hardware - NEC_D552(config, m_maincpu, 400000); // approximation + NEC_D552(config, m_maincpu, XTAL::u(400000)); // approximation m_maincpu->read_a().set_ioport("IN.0"); m_maincpu->write_c().set(FUNC(tccombat_state::grid_w)); m_maincpu->write_d().set(FUNC(tccombat_state::grid_w)); @@ -2415,7 +2415,7 @@ void tmtennis_state::set_clock() // MCU clock is from an LC circuit oscillating by default at ~360kHz, // but on PRO1, the difficulty switch puts a capacitor across the LC circuit // to slow it down to ~260kHz. - m_maincpu->set_unscaled_clock((m_inputs[1]->read() & 0x100) ? 260000 : 360000); + m_maincpu->set_unscaled_clock((m_inputs[1]->read() & 0x100) ? XTAL::u(260000) : XTAL::u(360000)); } void tmtennis_state::update_display() @@ -2496,7 +2496,7 @@ INPUT_PORTS_END void tmtennis_state::tmtennis(machine_config &config) { // basic machine hardware - NEC_D552(config, m_maincpu, 360000); // see set_clock + NEC_D552(config, m_maincpu, XTAL::u(360000)); // see set_clock m_maincpu->read_a().set(FUNC(tmtennis_state::input_r)); m_maincpu->read_b().set(FUNC(tmtennis_state::input_r)); m_maincpu->write_c().set(FUNC(tmtennis_state::plate_w)); diff --git a/src/mame/handheld/lk3000.cpp b/src/mame/handheld/lk3000.cpp index e781c9e6d9a..be58cb8b04c 100644 --- a/src/mame/handheld/lk3000.cpp +++ b/src/mame/handheld/lk3000.cpp @@ -318,10 +318,10 @@ void lk3000_state::lk3000(machine_config &config) psu.write_b().set(FUNC(lk3000_state::p5_w)); // video hardware - DL1414T(config, m_dl1414[0], 0U).update().set(FUNC(lk3000_state::update_display<0>)); - DL1414T(config, m_dl1414[1], 0U).update().set(FUNC(lk3000_state::update_display<1>)); - DL1414T(config, m_dl1414[2], 0U).update().set(FUNC(lk3000_state::update_display<2>)); - DL1414T(config, m_dl1414[3], 0U).update().set(FUNC(lk3000_state::update_display<3>)); + DL1414T(config, m_dl1414[0]).update().set(FUNC(lk3000_state::update_display<0>)); + DL1414T(config, m_dl1414[1]).update().set(FUNC(lk3000_state::update_display<1>)); + DL1414T(config, m_dl1414[2]).update().set(FUNC(lk3000_state::update_display<2>)); + DL1414T(config, m_dl1414[3]).update().set(FUNC(lk3000_state::update_display<3>)); config.set_default_layout(layout_lk3000); // cartridge diff --git a/src/mame/handheld/monty.cpp b/src/mame/handheld/monty.cpp index 8a2718a167a..eacf574c194 100644 --- a/src/mame/handheld/monty.cpp +++ b/src/mame/handheld/monty.cpp @@ -248,8 +248,8 @@ void monty_state::monty(machine_config &config) screen.set_visarea_full(); screen.set_screen_update(FUNC(monty_state::screen_update)); - SED1503(config, m_lcd[0], 32768).write_segs().set(FUNC(monty_state::lcd_output_w<0>)); - SED1503(config, m_lcd[1], 32768).write_segs().set(FUNC(monty_state::lcd_output_w<1>)); + SED1503(config, m_lcd[0], XTAL::u(32768)).write_segs().set(FUNC(monty_state::lcd_output_w<0>)); + SED1503(config, m_lcd[1], XTAL::u(32768)).write_segs().set(FUNC(monty_state::lcd_output_w<1>)); config.set_default_layout(layout_monty); // Sound hardware diff --git a/src/mame/handheld/pensebem.cpp b/src/mame/handheld/pensebem.cpp index 9370c009ea3..a693d654320 100644 --- a/src/mame/handheld/pensebem.cpp +++ b/src/mame/handheld/pensebem.cpp @@ -295,7 +295,7 @@ void pensebem2017_state::pensebem2017(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); } ROM_START( pbem2017 ) diff --git a/src/mame/handheld/scrablex.cpp b/src/mame/handheld/scrablex.cpp index 15b69e7f947..e20352cc00f 100644 --- a/src/mame/handheld/scrablex.cpp +++ b/src/mame/handheld/scrablex.cpp @@ -181,7 +181,7 @@ INPUT_PORTS_END void scrablex_state::scrablex(machine_config &config) { // basic machine hardware - MB8841(config, m_maincpu, 500000); // approximation - RC osc. R=15K, C=100pF + MB8841(config, m_maincpu, XTAL::u(500000)); // approximation - RC osc. R=15K, C=100pF m_maincpu->write_o().set(FUNC(scrablex_state::write_o)); m_maincpu->write_p().set(FUNC(scrablex_state::write_p)); m_maincpu->read_r<0>().set(FUNC(scrablex_state::read_r<0>)); diff --git a/src/mame/handheld/tispeak.cpp b/src/mame/handheld/tispeak.cpp index 676a1eda894..fbc42df0291 100644 --- a/src/mame/handheld/tispeak.cpp +++ b/src/mame/handheld/tispeak.cpp @@ -459,7 +459,7 @@ namespace { // The typical osc freq curve for TMS5100 is unknown. Let's assume it is set to the default frequency, // which is 640kHz for 8KHz according to the TMS5100 documentation. -#define MASTER_CLOCK 640000 +#define MASTER_CLOCK XTAL::u(640000) class tispeak_state : public hh_tms1k_state diff --git a/src/mame/handheld/tispellb.cpp b/src/mame/handheld/tispellb.cpp index be3c1b106c0..bdfac978ff5 100644 --- a/src/mame/handheld/tispellb.cpp +++ b/src/mame/handheld/tispellb.cpp @@ -327,14 +327,14 @@ INPUT_PORTS_END void tispellb_state::rev1(machine_config &config) { // basic machine hardware - TMS0270(config, m_maincpu, 350000); // approximation + TMS0270(config, m_maincpu, XTAL::u(350000)); // approximation m_maincpu->read_k().set(FUNC(tispellb_state::main_read_k)); m_maincpu->write_o().set(FUNC(tispellb_state::main_write_o)); m_maincpu->write_r().set(FUNC(tispellb_state::main_write_r)); m_maincpu->read_ctl().set(FUNC(tispellb_state::rev1_ctl_r)); m_maincpu->write_ctl().set(FUNC(tispellb_state::rev1_ctl_w)); - TMS1980(config, m_subcpu, 350000); // approximation + TMS1980(config, m_subcpu, XTAL::u(350000)); // approximation m_subcpu->read_k().set(FUNC(tispellb_state::sub_read_k)); m_subcpu->write_o().set(FUNC(tispellb_state::sub_write_o)); m_subcpu->write_r().set(FUNC(tispellb_state::sub_write_r)); @@ -353,14 +353,14 @@ void tispellb_state::rev1(machine_config &config) void tispellb_state::rev2(machine_config &config) { // basic machine hardware - TMS0270(config, m_maincpu, 350000); // approximation + TMS0270(config, m_maincpu, XTAL::u(350000)); // approximation m_maincpu->read_k().set(FUNC(tispellb_state::main_read_k)); m_maincpu->write_o().set(FUNC(tispellb_state::rev2_write_o)); m_maincpu->write_r().set(FUNC(tispellb_state::rev2_write_r)); m_maincpu->read_ctl().set(m_tms6100, FUNC(tms6100_device::data_r)); m_maincpu->write_ctl().set(m_tms6100, FUNC(tms6100_device::add_w)); - TMS6100(config, m_tms6100, 350000); + TMS6100(config, m_tms6100, XTAL::u(350000)); m_tms6100->enable_4bit_mode(true); // video hardware diff --git a/src/mame/handheld/wildfire.cpp b/src/mame/handheld/wildfire.cpp index a680974da95..fa5bec64403 100644 --- a/src/mame/handheld/wildfire.cpp +++ b/src/mame/handheld/wildfire.cpp @@ -166,7 +166,7 @@ static const u8 wildfire_7seg_table[0x10] = void wildfire_state::wildfire(machine_config &config) { // basic machine hardware - AMI_S2152(config, m_maincpu, 850000); // approximation - RC osc. R=?, C=? + AMI_S2152(config, m_maincpu, XTAL::u(850000)); // approximation - RC osc. R=?, C=? m_maincpu->set_7seg_table(wildfire_7seg_table); m_maincpu->read_i().set_ioport("IN.0"); m_maincpu->write_d().set(FUNC(wildfire_state::write_d)); diff --git a/src/mame/hds/hds200_kbd.cpp b/src/mame/hds/hds200_kbd.cpp index 2e9116d472a..53985ec7434 100644 --- a/src/mame/hds/hds200_kbd.cpp +++ b/src/mame/hds/hds200_kbd.cpp @@ -245,7 +245,7 @@ ioport_constructor hds200_kbd_hle_device::device_input_ports() const void hds200_kbd_hle_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - BEEP(config, m_bell, 786).add_route(ALL_OUTPUTS, "mono", 0.5); // unknown frequency + BEEP(config, m_bell, XTAL::u(786)).add_route(ALL_OUTPUTS, "mono", 0.5); // unknown frequency } @@ -257,7 +257,7 @@ void hds200_kbd_hle_device::device_add_mconfig(machine_config &config) // hds200_kbd_hle_device - constructor //------------------------------------------------- -hds200_kbd_hle_device::hds200_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hds200_kbd_hle_device::hds200_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HDS200_KBD_HLE, tag, owner, clock), device_buffered_serial_interface(mconfig, *this), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5"), @@ -289,8 +289,8 @@ void hds200_kbd_hle_device::device_reset() transmit_register_reset(); set_data_frame(1, 8, PARITY_EVEN, STOP_BITS_2); - set_rcv_rate(2400); - set_tra_rate(2400); + set_rcv_rate(XTAL::u(2400)); + set_tra_rate(XTAL::u(2400)); reset_key_state(); start_processing(attotime::from_hz(2400)); diff --git a/src/mame/hds/hds200_kbd.h b/src/mame/hds/hds200_kbd.h index bce33e96241..fd7ede5897f 100644 --- a/src/mame/hds/hds200_kbd.h +++ b/src/mame/hds/hds200_kbd.h @@ -28,7 +28,7 @@ class hds200_kbd_hle_device : public device_t, { public: // construction/destruction - hds200_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + hds200_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto tx_handler() { return m_tx_handler.bind(); } diff --git a/src/mame/heathkit/et3400.cpp b/src/mame/heathkit/et3400.cpp index ba4b22dea92..73f19028c39 100644 --- a/src/mame/heathkit/et3400.cpp +++ b/src/mame/heathkit/et3400.cpp @@ -228,7 +228,7 @@ void et3400_state::et3400(machine_config &config) config.set_default_layout(layout_et3400); // Devices - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(et3400_state::pia_aw)); m_pia->writepb_handler().set(FUNC(et3400_state::pia_bw)); m_pia->readpa_handler().set(FUNC(et3400_state::pia_ar)); diff --git a/src/mame/heathkit/h19.cpp b/src/mame/heathkit/h19.cpp index 8fdf9a97109..d26b7596f15 100644 --- a/src/mame/heathkit/h19.cpp +++ b/src/mame/heathkit/h19.cpp @@ -68,7 +68,7 @@ Address Description // Capacitor value in pF #define H19_KEY_DEBOUNCE_CAPACITOR 5000 -#define MM5740_CLOCK (mm5740_device::calc_effective_clock_key_debounce(H19_KEY_DEBOUNCE_CAPACITOR)) +#define MM5740_CLOCK XTAL::u(mm5740_device::calc_effective_clock_key_debounce(H19_KEY_DEBOUNCE_CAPACITOR)) // Beep Frequency is 1 KHz #define H19_BEEP_FRQ (H19_CLOCK / 2048) diff --git a/src/mame/heathkit/h8.cpp b/src/mame/heathkit/h8.cpp index 8f781cc4c51..6a37ff7367e 100644 --- a/src/mame/heathkit/h8.cpp +++ b/src/mame/heathkit/h8.cpp @@ -366,10 +366,10 @@ void h8_state::h8(machine_config &config) BEEP(config, m_beep, H8_BEEP_FRQ).add_route(ALL_OUTPUTS, "mono", 1.00); /* Devices */ - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set([this] (bool state) { m_cassbit = state; }); - clock_device &cassette_clock(CLOCK(config, "cassette_clock", 4800)); + clock_device &cassette_clock(CLOCK(config, "cassette_clock", XTAL::u(4800))); cassette_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); cassette_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); diff --git a/src/mame/heathkit/h89.cpp b/src/mame/heathkit/h89.cpp index 0b4ac5edb5b..941f50db7fd 100644 --- a/src/mame/heathkit/h89.cpp +++ b/src/mame/heathkit/h89.cpp @@ -198,7 +198,7 @@ void h89_state::h89(machine_config & config) rs232.rxd_handler().set("ins8250", FUNC(ins8250_uart_device::rx_w)); rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); - TIMER(config, "irq_timer", 0).configure_periodic(FUNC(h89_state::h89_irq_timer), attotime::from_hz(100)); + TIMER(config, "irq_timer").configure_periodic(FUNC(h89_state::h89_irq_timer), attotime::from_hz(100)); } /* ROM definition */ diff --git a/src/mame/hec2hrp/hec2hrp.cpp b/src/mame/hec2hrp/hec2hrp.cpp index a0a02243d10..380434d7ea5 100644 --- a/src/mame/hec2hrp/hec2hrp.cpp +++ b/src/mame/hec2hrp/hec2hrp.cpp @@ -412,7 +412,7 @@ void hec2hrp_state::interact_common(machine_config &config) SOFTWARE_LIST(config, "cass_list").set_original("interact"); /* printer */ - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); } void hec2hrp_state::interact(machine_config &config) @@ -483,7 +483,7 @@ void hec2hrp_state::hec2hr(machine_config &config) m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); m_cassette->set_interface("interact_cass"); - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); /* internal ram */ RAM(config, RAM_TAG).set_default_size("80K").set_default_value(0x00); @@ -501,7 +501,7 @@ void hec2hrp_state::hec2hrx(machine_config &config) m_disc2cpu->set_addrmap(AS_PROGRAM, &hec2hrp_state::hecdisc2_mem); m_disc2cpu->set_addrmap(AS_IO, &hec2hrp_state::hecdisc2_io); - UPD765A(config, m_upd_fdc, 8'000'000, false, true); + UPD765A(config, m_upd_fdc, XTAL::u(8'000'000), false, true); m_upd_fdc->intrq_wr_callback().set(FUNC(hec2hrp_state::disc2_fdc_interrupt)); m_upd_fdc->drq_wr_callback().set(FUNC(hec2hrp_state::disc2_fdc_dma_irq)); diff --git a/src/mame/hegenerglaser/mm2.cpp b/src/mame/hegenerglaser/mm2.cpp index 8f1b5a7be7f..7455d25ac5e 100644 --- a/src/mame/hegenerglaser/mm2.cpp +++ b/src/mame/hegenerglaser/mm2.cpp @@ -371,7 +371,7 @@ void mm2_state::mm4(machine_config &config) void mm2_state::mm4tk(machine_config &config) { mm4(config); - m_maincpu->set_clock(18000000); + m_maincpu->set_clock(XTAL::u(18000000)); } void mm2_state::mm5(machine_config &config) diff --git a/src/mame/hegenerglaser/mmboard.cpp b/src/mame/hegenerglaser/mmboard.cpp index c784c23a736..4ce2b5b2fc3 100644 --- a/src/mame/hegenerglaser/mmboard.cpp +++ b/src/mame/hegenerglaser/mmboard.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(MEPHISTO_BUTTONS_BOARD, mephisto_buttons_board_device, "mbboa // constructor //------------------------------------------------- -mephisto_board_device::mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +mephisto_board_device::mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_board(*this, "board") , m_led_pwm(*this, "led_pwm") @@ -33,12 +33,12 @@ mephisto_board_device::mephisto_board_device(const machine_config &mconfig, devi { } -mephisto_sensors_board_device::mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mephisto_sensors_board_device::mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mephisto_board_device(mconfig, MEPHISTO_SENSORS_BOARD, tag, owner, clock) { } -mephisto_buttons_board_device::mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mephisto_buttons_board_device::mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mephisto_board_device(mconfig, MEPHISTO_BUTTONS_BOARD, tag, owner, clock) { } diff --git a/src/mame/hegenerglaser/mmboard.h b/src/mame/hegenerglaser/mmboard.h index 0dd69194e51..88b97d8a58d 100644 --- a/src/mame/hegenerglaser/mmboard.h +++ b/src/mame/hegenerglaser/mmboard.h @@ -21,7 +21,7 @@ class mephisto_board_device : public device_t { public: // construction/destruction - mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers void set_disable_leds(bool disable_leds) { m_disable_leds = disable_leds; } @@ -60,7 +60,7 @@ class mephisto_sensors_board_device : public mephisto_board_device { public: // construction/destruction - mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // optional information overrides @@ -74,7 +74,7 @@ class mephisto_buttons_board_device : public mephisto_board_device { public: // construction/destruction - mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // optional information overrides diff --git a/src/mame/hegenerglaser/mmdisplay1.cpp b/src/mame/hegenerglaser/mmdisplay1.cpp index c7112d6b64c..4b891b0beb2 100644 --- a/src/mame/hegenerglaser/mmdisplay1.cpp +++ b/src/mame/hegenerglaser/mmdisplay1.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE1, mephisto_display1_device, "mdisplay // constructor //------------------------------------------------- -mephisto_display1_device::mephisto_display1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +mephisto_display1_device::mephisto_display1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MEPHISTO_DISPLAY_MODULE1, tag, owner, clock), m_digits(*this, "digit%u", 0U), m_output_digit(*this) diff --git a/src/mame/hegenerglaser/mmdisplay1.h b/src/mame/hegenerglaser/mmdisplay1.h index 135bc317daa..89d67d7d1eb 100644 --- a/src/mame/hegenerglaser/mmdisplay1.h +++ b/src/mame/hegenerglaser/mmdisplay1.h @@ -15,7 +15,7 @@ class mephisto_display1_device : public device_t { public: - mephisto_display1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mephisto_display1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callback is optional, it will output to digitx when not used auto output_digit() { return m_output_digit.bind(); } diff --git a/src/mame/hegenerglaser/mmdisplay2.cpp b/src/mame/hegenerglaser/mmdisplay2.cpp index bc893ac81aa..dbe9eb41c48 100644 --- a/src/mame/hegenerglaser/mmdisplay2.cpp +++ b/src/mame/hegenerglaser/mmdisplay2.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display2_device, "mdisplay // constructor //------------------------------------------------- -mephisto_display2_device::mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mephisto_display2_device::mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MEPHISTO_DISPLAY_MODULE2, tag, owner, clock) , m_lcd(*this, "hd44780") , m_dac(*this, "dac") @@ -46,7 +46,7 @@ void mephisto_display2_device::device_add_mconfig(machine_config &config) PALETTE(config, "palette", FUNC(mephisto_display2_device::lcd_palette), 3); - HD44780(config, m_lcd, 0); + HD44780(config, m_lcd); m_lcd->set_lcd_size(2, 16); m_lcd->set_pixel_update_cb(FUNC(mephisto_display2_device::lcd_pixel_update)); diff --git a/src/mame/hegenerglaser/mmdisplay2.h b/src/mame/hegenerglaser/mmdisplay2.h index b3a1c418d4b..7e7284d2f43 100644 --- a/src/mame/hegenerglaser/mmdisplay2.h +++ b/src/mame/hegenerglaser/mmdisplay2.h @@ -21,7 +21,7 @@ class mephisto_display2_device : public device_t { public: // construction/destruction - mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); hd44780_device *get() { return m_lcd; } diff --git a/src/mame/hegenerglaser/mondial.cpp b/src/mame/hegenerglaser/mondial.cpp index f863e8535d0..9bcae1fbdaa 100644 --- a/src/mame/hegenerglaser/mondial.cpp +++ b/src/mame/hegenerglaser/mondial.cpp @@ -163,7 +163,7 @@ INPUT_PORTS_END void mondial_state::mondial(machine_config &config) { /* basic machine hardware */ - M65SC02(config, m_maincpu, 2000000); + M65SC02(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mondial_state::mondial_mem); const attotime irq_period = attotime::from_hz(2000000 / 0x1000); @@ -182,7 +182,7 @@ void mondial_state::mondial(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - BEEP(config, m_beeper, 2150); // approximation + BEEP(config, m_beeper, XTAL::u(2150)); // approximation m_beeper->add_route(ALL_OUTPUTS, "speaker", 0.25); } diff --git a/src/mame/hegenerglaser/mondial68k.cpp b/src/mame/hegenerglaser/mondial68k.cpp index 36f228fa1de..1986064be30 100644 --- a/src/mame/hegenerglaser/mondial68k.cpp +++ b/src/mame/hegenerglaser/mondial68k.cpp @@ -205,7 +205,7 @@ void mondial68k_state::mondial68k(machine_config &config) m_board->set_delay(attotime::from_msec(100)); /* video hardware */ - PCF2112(config, m_lcd, 50); // frequency guessed + PCF2112(config, m_lcd, XTAL::u(50)); // frequency guessed m_lcd->write_segs().set(FUNC(mondial68k_state::lcd_output_w)); PWM_DISPLAY(config, m_led_pwm).set_size(2, 8); diff --git a/src/mame/hegenerglaser/montec.cpp b/src/mame/hegenerglaser/montec.cpp index 5239bbb1136..f0b8261d727 100644 --- a/src/mame/hegenerglaser/montec.cpp +++ b/src/mame/hegenerglaser/montec.cpp @@ -199,9 +199,9 @@ void montec_state::montec(machine_config &config) m_board->set_delay(attotime::from_msec(300)); // video hardware - PCF2112(config, m_lcd[0], 50); // frequency guessed + PCF2112(config, m_lcd[0], XTAL::u(50)); // frequency guessed m_lcd[0]->write_segs().set(FUNC(montec_state::lcd_output_w<0>)); - PCF2112(config, m_lcd[1], 50); // " + PCF2112(config, m_lcd[1], XTAL::u(50)); // " m_lcd[1]->write_segs().set(FUNC(montec_state::lcd_output_w<1>)); PWM_DISPLAY(config, m_led_pwm).set_size(4, 4); diff --git a/src/mame/hegenerglaser/risc.cpp b/src/mame/hegenerglaser/risc.cpp index 3f9e8d97a1a..dd14555c209 100644 --- a/src/mame/hegenerglaser/risc.cpp +++ b/src/mame/hegenerglaser/risc.cpp @@ -151,7 +151,7 @@ void risc_state::mrisc(machine_config &config) const attotime irq_period = attotime::from_hz(10_MHz_XTAL / 0x4000); m_maincpu->set_periodic_int(FUNC(risc_state::irq0_line_hold), irq_period); - CHESSMACHINE(config, m_chessm, 14'000'000); // Mephisto manual says 14MHz (no XTAL) + CHESSMACHINE(config, m_chessm, XTAL::u(14'000'000)); // Mephisto manual says 14MHz (no XTAL) config.set_perfect_quantum(m_maincpu); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/hegenerglaser/smondial.cpp b/src/mame/hegenerglaser/smondial.cpp index c54f5823cf7..da47ce5243d 100644 --- a/src/mame/hegenerglaser/smondial.cpp +++ b/src/mame/hegenerglaser/smondial.cpp @@ -298,9 +298,9 @@ void smondialb_state::smondialb(machine_config &config) m_board->set_delay(attotime::from_msec(250)); /* video hardware */ - PCF2112(config, m_lcd[0], 50); // frequency guessed + PCF2112(config, m_lcd[0], XTAL::u(50)); // frequency guessed m_lcd[0]->write_segs().set(FUNC(smondialb_state::lcd_output_w<0>)); - PCF2112(config, m_lcd[1], 50); // " + PCF2112(config, m_lcd[1], XTAL::u(50)); // " m_lcd[1]->write_segs().set(FUNC(smondialb_state::lcd_output_w<1>)); PWM_DISPLAY(config, m_led_pwm).set_size(8, 6); diff --git a/src/mame/heurikon/hk68v10.cpp b/src/mame/heurikon/hk68v10.cpp index 3e2c614b222..a3c75920b1f 100644 --- a/src/mame/heurikon/hk68v10.cpp +++ b/src/mame/heurikon/hk68v10.cpp @@ -355,7 +355,7 @@ void hk68v10_state::hk68v10(machine_config &config) rs232trm.rxd_handler().set(m_sccterm, FUNC(scc8530_device::rxa_w)); rs232trm.cts_handler().set(m_sccterm, FUNC(scc8530_device::ctsa_w)); - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", hk68_vme_cards, nullptr, 1, "vme"); } diff --git a/src/mame/hitachi/bmjr.cpp b/src/mame/hitachi/bmjr.cpp index 28809861c8e..aace278c3c1 100644 --- a/src/mame/hitachi/bmjr.cpp +++ b/src/mame/hitachi/bmjr.cpp @@ -356,7 +356,7 @@ void bmjr_state::bmjr(machine_config &config) { /* basic machine hardware */ // 750khz gets the cassette sound close to a normal kansas city 300 baud - M6800(config, m_maincpu, 750'000); //XTAL(4'000'000)/4); //unknown clock / divider + M6800(config, m_maincpu, XTAL::u(750'000)); //XTAL(4'000'000)/4); //unknown clock / divider m_maincpu->set_addrmap(AS_PROGRAM, &bmjr_state::mem_map); m_maincpu->set_vblank_int("screen", FUNC(bmjr_state::irq0_line_hold)); @@ -374,7 +374,7 @@ void bmjr_state::bmjr(machine_config &config) /* Audio */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 1200).add_route(ALL_OUTPUTS, "mono", 0.50); // guesswork + BEEP(config, "beeper", XTAL::u(1200)).add_route(ALL_OUTPUTS, "mono", 0.50); // guesswork /* Devices */ CASSETTE(config, m_cass); diff --git a/src/mame/hitachi/bml3.cpp b/src/mame/hitachi/bml3.cpp index c2ab639cc15..3e1bfc73f0c 100644 --- a/src/mame/hitachi/bml3.cpp +++ b/src/mame/hitachi/bml3.cpp @@ -220,14 +220,14 @@ void bml3_state::keyboard_w(u8 data) void bml3_state::m6845_change_clock(u8 setting) { - int m6845_clock = CPU_CLOCK.value(); // CRTC and MPU are synchronous by default + XTAL m6845_clock = CPU_CLOCK; // CRTC and MPU are synchronous by default switch(setting & 0x88) { - case 0x00: m6845_clock = C40_CLOCK.value(); break; //320 x 200 - case 0x08: m6845_clock = C40_CLOCK.value(); break; //320 x 200, interlace - case 0x80: m6845_clock = C80_CLOCK.value(); break; //640 x 200 - case 0x88: m6845_clock = C80_CLOCK.value(); break; //640 x 200, interlace + case 0x00: m6845_clock = C40_CLOCK; break; //320 x 200 + case 0x08: m6845_clock = C40_CLOCK; break; //320 x 200, interlace + case 0x80: m6845_clock = C80_CLOCK; break; //640 x 200 + case 0x88: m6845_clock = C80_CLOCK; break; //640 x 200, interlace } m_crtc->set_unscaled_clock(m6845_clock); @@ -910,10 +910,10 @@ void bml3_state::bml3_common(machine_config &config) TIMER(config, "kansas_w").configure_periodic(FUNC(bml3_state::kansas_w), attotime::from_hz(4800)); TIMER(config, "kansas_r").configure_periodic(FUNC(bml3_state::kansas_r), attotime::from_hz(40000)); - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.writepa_handler().set(FUNC(bml3_state::piaA_w)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set([this] (bool state) { m_cassbit = state; }); m_acia->rts_handler().set(FUNC(bml3_state::acia_rts_w)); m_acia->irq_handler().set(FUNC(bml3_state::acia_irq_w)); @@ -922,7 +922,7 @@ void bml3_state::bml3_common(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); - clock_device &acia_clock(CLOCK(config, "acia_clock", 9'600)); // 600 baud x 16(divider) = 9600 + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(9'600))); // 600 baud x 16(divider) = 9600 acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); @@ -931,7 +931,7 @@ void bml3_state::bml3_common(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); /* slot devices */ - BML3BUS(config, m_bml3bus, 0); + BML3BUS(config, m_bml3bus); m_bml3bus->set_space(m_maincpu, AS_PROGRAM); m_bml3bus->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); m_bml3bus->irq_callback().set_inputline(m_maincpu, M6809_IRQ_LINE); @@ -957,7 +957,7 @@ void bml3_state::bml3(machine_config &config) #if 0 // TODO: slot device for sound card // audio - YM2203(config, m_ym2203, 2000000); //unknown clock / divider + YM2203(config, m_ym2203, XTAL::u(2000000)); //unknown clock / divider m_ym2203->set_flags(AY8910_LEGACY_OUTPUT); m_ym2203->add_route(0, "mono", 0.25); m_ym2203->add_route(1, "mono", 0.25); diff --git a/src/mame/homebrew/4004clk.cpp b/src/mame/homebrew/4004clk.cpp index fa9933f5523..e0dab940265 100644 --- a/src/mame/homebrew/4004clk.cpp +++ b/src/mame/homebrew/4004clk.cpp @@ -32,7 +32,7 @@ public: , m_neon_out(*this, "neon%u", 0U) { } - DECLARE_INPUT_CHANGED_MEMBER(switch_hz) { m_test_line->set_clock(newval ? 60 : 50); } + DECLARE_INPUT_CHANGED_MEMBER(switch_hz) { m_test_line->set_clock(newval ? XTAL::u(60) : XTAL::u(50)); } void _4004clk(machine_config &config); protected: @@ -165,14 +165,14 @@ void nixieclock_state::_4004clk(machine_config &config) m_maincpu->set_ram_status_map(&nixieclock_state::_4004clk_stat); m_maincpu->set_ram_ports_map(&nixieclock_state::_4004clk_mp); - CLOCK(config, m_test_line, 60).signal_handler().set_inputline(m_maincpu, I4004_TEST_LINE); + CLOCK(config, m_test_line, XTAL::u(60)).signal_handler().set_inputline(m_maincpu, I4004_TEST_LINE); // video hardware config.set_default_layout(layout_4004clk); // sound hardware SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); } diff --git a/src/mame/homebrew/68ksbc.cpp b/src/mame/homebrew/68ksbc.cpp index 8985da41479..7e431ef717b 100644 --- a/src/mame/homebrew/68ksbc.cpp +++ b/src/mame/homebrew/68ksbc.cpp @@ -65,10 +65,10 @@ INPUT_PORTS_END void c68ksbc_state::c68ksbc(machine_config &config) { - M68000(config, m_maincpu, 8000000); // text says 8MHz, schematic says 10MHz + M68000(config, m_maincpu, XTAL::u(8000000)); // text says 8MHz, schematic says 10MHz m_maincpu->set_addrmap(AS_PROGRAM, &c68ksbc_state::mem_map); - acia6850_device &acia(ACIA6850(config, "acia", 0)); + acia6850_device &acia(ACIA6850(config, "acia")); acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); acia.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -76,7 +76,7 @@ void c68ksbc_state::c68ksbc(machine_config &config) rs232.rxd_handler().set("acia", FUNC(acia6850_device::write_rxd)); rs232.cts_handler().set("acia", FUNC(acia6850_device::write_cts)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 153600)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(153600))); acia_clock.signal_handler().set("acia", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia", FUNC(acia6850_device::write_rxc)); } diff --git a/src/mame/homebrew/chaos.cpp b/src/mame/homebrew/chaos.cpp index 1a57f92920a..ed2bb3ddcaf 100644 --- a/src/mame/homebrew/chaos.cpp +++ b/src/mame/homebrew/chaos.cpp @@ -169,7 +169,7 @@ void chaos_state::chaos(machine_config &config) m_maincpu->set_addrmap(AS_DATA, &chaos_state::data_map); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(chaos_state::kbd_put)); } diff --git a/src/mame/homebrew/d6809.cpp b/src/mame/homebrew/d6809.cpp index 72517bf69f5..13227d872f8 100644 --- a/src/mame/homebrew/d6809.cpp +++ b/src/mame/homebrew/d6809.cpp @@ -205,11 +205,11 @@ void d6809_state::d6809(machine_config &config) MOS6551(config, "acia2", XTAL(14'745'600) / 8); // uses Q clock /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(d6809_state::kbd_put)); // Floppy - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); //m_fdc->drq_wr_callback().set(m_fdc, FUNC(upd765a_device::dack_w)); // pin not emulated FLOPPY_CONNECTOR(config, "fdc:0", floppies, "525qd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); } diff --git a/src/mame/homebrew/gigatron.cpp b/src/mame/homebrew/gigatron.cpp index b3ea0db7ac6..31b04bd6ae9 100644 --- a/src/mame/homebrew/gigatron.cpp +++ b/src/mame/homebrew/gigatron.cpp @@ -17,7 +17,7 @@ #include "gigatron.lh" -#define MAIN_CLOCK 6250000 +#define MAIN_CLOCK XTAL::u(6250000) #define VSYNC 0x80 #define HSYNC 0x40 @@ -223,7 +223,7 @@ void gigatron_state::gigatron(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_4BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_4BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); GTRON(config, m_maincpu, MAIN_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &gigatron_state::prog_map); diff --git a/src/mame/homebrew/gs6502.cpp b/src/mame/homebrew/gs6502.cpp index b4166e0d2e5..2676c92c55f 100644 --- a/src/mame/homebrew/gs6502.cpp +++ b/src/mame/homebrew/gs6502.cpp @@ -56,12 +56,12 @@ void gs6502_state::gs6502(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &gs6502_state::gs6502_mem); // Configure UART (via m_acia) - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); // should this be reverse polarity? m_acia->irq_handler().set("rs232", FUNC(rs232_port_device::write_rts)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 1'843'200)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(1'843'200))); acia_clock.signal_handler().set("acia", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia", FUNC(acia6850_device::write_rxc)); diff --git a/src/mame/homebrew/gs6809.cpp b/src/mame/homebrew/gs6809.cpp index 90abc0734f5..34b862a00e2 100644 --- a/src/mame/homebrew/gs6809.cpp +++ b/src/mame/homebrew/gs6809.cpp @@ -56,12 +56,12 @@ void gs6809_state::gs6809(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &gs6809_state::gs6809_mem); // Configure UART (via m_acia) - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); // should this be reverse polarity? m_acia->irq_handler().set("rs232", FUNC(rs232_port_device::write_rts)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 7'372'800/4)); // E Clock from M6809 + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL(7'372'800)/4)); // E Clock from M6809 acia_clock.signal_handler().set("acia", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia", FUNC(acia6850_device::write_rxc)); diff --git a/src/mame/homebrew/gscpm.cpp b/src/mame/homebrew/gscpm.cpp index 0dbbebe454c..3369191f41d 100644 --- a/src/mame/homebrew/gscpm.cpp +++ b/src/mame/homebrew/gscpm.cpp @@ -158,12 +158,12 @@ void gscpm_state::gscpm(machine_config &config) RAM(config, m_ram).set_default_size("16K"); // This shadows the ROM - Z80SIO(config, m_sio, 0); + Z80SIO(config, m_sio); m_sio->out_txdb_callback().set("rs232", FUNC(rs232_port_device::write_txd)); m_sio->out_rtsb_callback().set("rs232", FUNC(rs232_port_device::write_rts)); m_sio->out_int_callback().set_inputline("maincpu", INPUT_LINE_IRQ0); // Connect interrupt pin to our Z80 INT line - clock_device &sio_clock(CLOCK(config, "sio_clock", 7'372'800)); + clock_device &sio_clock(CLOCK(config, "sio_clock", XTAL::u(7'372'800))); sio_clock.signal_handler().set("sio", FUNC(z80sio_device::txca_w)); sio_clock.signal_handler().append("sio", FUNC(z80sio_device::rxca_w)); sio_clock.signal_handler().append("sio", FUNC(z80sio_device::txcb_w)); diff --git a/src/mame/homebrew/gsz80.cpp b/src/mame/homebrew/gsz80.cpp index 9037b668c59..f443d43fb20 100644 --- a/src/mame/homebrew/gsz80.cpp +++ b/src/mame/homebrew/gsz80.cpp @@ -74,13 +74,13 @@ void gsz80_state::gsz80(machine_config &config) m_maincpu->set_addrmap(AS_IO, &gsz80_state::gsz80_io); // Configure UART (via m_acia) - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); m_acia->irq_handler().set_inputline("maincpu", INPUT_LINE_IRQ0); // Connect interrupt pin to our Z80 INT line // Create a clock device to connect to the transmit and receive clock on the 6850 - clock_device &acia_clock(CLOCK(config, "acia_clock", 7'372'800)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(7'372'800))); acia_clock.signal_handler().set("acia", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia", FUNC(acia6850_device::write_rxc)); diff --git a/src/mame/homebrew/lft_chiptune.cpp b/src/mame/homebrew/lft_chiptune.cpp index 24cdc3da429..5becf5e3b26 100644 --- a/src/mame/homebrew/lft_chiptune.cpp +++ b/src/mame/homebrew/lft_chiptune.cpp @@ -11,7 +11,7 @@ #include "sound/dac.h" #include "speaker.h" -#define MASTER_CLOCK 8000000 +#define MASTER_CLOCK XTAL::u(8000000) class lft_chiptune_state : public driver_device { @@ -65,7 +65,7 @@ void lft_chiptune_state::chiptune(machine_config &config) /* sound hardware */ SPEAKER(config, "avr8").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(0, "avr8", 0.9); + DAC_8BIT_R2R(config, m_dac).add_route(0, "avr8", 0.9); } ROM_START( powernin ) diff --git a/src/mame/homebrew/lft_craft.cpp b/src/mame/homebrew/lft_craft.cpp index b4ae014bd4c..24ae5122e85 100644 --- a/src/mame/homebrew/lft_craft.cpp +++ b/src/mame/homebrew/lft_craft.cpp @@ -13,7 +13,7 @@ #include "emupal.h" #include "speaker.h" -#define MASTER_CLOCK 20000000 +#define MASTER_CLOCK XTAL::u(20000000) #define VISIBLE_CYCLES 480 #define HSYNC_CYCLES 155 @@ -213,7 +213,7 @@ void lft_craft_state::craft(machine_config &config) SPEAKER(config, "avr8").front_center(); - DAC_6BIT_R2R(config, m_dac, 0).add_route(0, "avr8", 0.25); // pd1/pd2/pd4/pd5/pd6/pd7 + 2k(x7) + 1k(x5) + DAC_6BIT_R2R(config, m_dac).add_route(0, "avr8", 0.25); // pd1/pd2/pd4/pd5/pd6/pd7 + 2k(x7) + 1k(x5) } ROM_START( craft ) diff --git a/src/mame/homebrew/lft_phasor.cpp b/src/mame/homebrew/lft_phasor.cpp index 46ed2a47b5e..486887c1508 100644 --- a/src/mame/homebrew/lft_phasor.cpp +++ b/src/mame/homebrew/lft_phasor.cpp @@ -13,7 +13,7 @@ #include "emupal.h" #include "speaker.h" -#define MASTER_CLOCK 17734470 +#define MASTER_CLOCK XTAL::u(17734470) #define SAMPLES_PER_FRAME (355255) @@ -215,7 +215,7 @@ void lft_phasor_state::phasor(machine_config &config) SPEAKER(config, "avr8").front_center(); - DAC_6BIT_R2R(config, m_dac, 0).add_route(0, "avr8", 0.5); + DAC_6BIT_R2R(config, m_dac).add_route(0, "avr8", 0.5); } ROM_START( phasor ) diff --git a/src/mame/homebrew/phunsy.cpp b/src/mame/homebrew/phunsy.cpp index 336b2297aca..99b0e2529dd 100644 --- a/src/mame/homebrew/phunsy.cpp +++ b/src/mame/homebrew/phunsy.cpp @@ -366,7 +366,7 @@ void phunsy_state::phunsy(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(phunsy_state::kbd_put)); CASSETTE(config, m_cass); diff --git a/src/mame/homebrew/pimps.cpp b/src/mame/homebrew/pimps.cpp index 3e7d07075e6..c9dbc6a4bda 100644 --- a/src/mame/homebrew/pimps.cpp +++ b/src/mame/homebrew/pimps.cpp @@ -156,13 +156,13 @@ void pimps_state::pimps(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pimps_state::mem_map); m_maincpu->set_addrmap(AS_IO, &pimps_state::io_map); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153'600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153'600))); uart_clock.signal_handler().set("uart1", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart1", FUNC(i8251_device::write_rxc)); uart_clock.signal_handler().append("uart2", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart2", FUNC(i8251_device::write_rxc)); - i8251_device &uart1(I8251(config, "uart1", 0)); + i8251_device &uart1(I8251(config, "uart1")); uart1.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); uart1.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr)); uart1.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -173,7 +173,7 @@ void pimps_state::pimps(machine_config &config) rs232a.cts_handler().set("uart1", FUNC(i8251_device::write_cts)); rs232a.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); // must be exactly here - i8251_device &uart2(I8251(config, "uart2", 0)); + i8251_device &uart2(I8251(config, "uart2")); uart2.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); uart2.dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr)); uart2.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/homebrew/ravens.cpp b/src/mame/homebrew/ravens.cpp index 8f89b2fbc8f..dc6e680a7b8 100644 --- a/src/mame/homebrew/ravens.cpp +++ b/src/mame/homebrew/ravens.cpp @@ -404,7 +404,7 @@ void ravens2_state::ravens2(machine_config &config) m_maincpu->flag_handler().set(FUNC(ravens2_state::cass_w)); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(ravens2_state::kbd_put)); /* quickload */ diff --git a/src/mame/homebrew/rc2014.cpp b/src/mame/homebrew/rc2014.cpp index 663d183bb39..d5f3edb8536 100644 --- a/src/mame/homebrew/rc2014.cpp +++ b/src/mame/homebrew/rc2014.cpp @@ -33,7 +33,7 @@ public: // void rc2014(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "bus:1", m_bus, rc2014_bus_modules, "z80"); RC2014_SLOT(config, "bus:2", m_bus, rc2014_bus_modules, "clock"); RC2014_SLOT(config, "bus:3", m_bus, rc2014_bus_modules, "ram32k"); @@ -46,7 +46,7 @@ public: // void rc2014bp5(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "bus:1", m_bus, rc2014_bus_modules, nullptr); RC2014_SLOT(config, "bus:2", m_bus, rc2014_bus_modules, nullptr); RC2014_SLOT(config, "bus:3", m_bus, rc2014_bus_modules, nullptr); @@ -69,7 +69,7 @@ public: // void rc2014cl2(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "bus:1", m_bus, rc2014_bus_modules, "z80"); RC2014_SLOT(config, "bus:2", m_bus, rc2014_bus_modules, "clock"); RC2014_SLOT(config, "bus:3", m_bus, rc2014_bus_modules, "ram32k"); @@ -95,7 +95,7 @@ public: // void rc2014zed(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "bus:1", m_bus, rc2014_bus_modules, "z80_21_40p"); RC2014_SLOT(config, "bus:2", m_bus, rc2014_bus_modules, "dual_clk_40p"); RC2014_SLOT(config, "bus:3", m_bus, rc2014_bus_modules, "rom_ram"); @@ -111,7 +111,7 @@ public: // void rc2014bp8(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "bus:1", m_bus, rc2014_bus_modules, nullptr); RC2014_SLOT(config, "bus:2", m_bus, rc2014_bus_modules, nullptr); RC2014_SLOT(config, "bus:3", m_bus, rc2014_bus_modules, nullptr); @@ -127,7 +127,7 @@ public: // void sc133(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "bus:1", m_bus, rc2014_bus_modules, nullptr); RC2014_SLOT(config, "bus:2", m_bus, rc2014_bus_modules, nullptr); RC2014_SLOT(config, "bus:3", m_bus, rc2014_bus_modules, nullptr); @@ -186,7 +186,7 @@ public: // void rc2014pro(machine_config &config) { - RC2014_EXT_BUS(config, m_bus, 0); + RC2014_EXT_BUS(config, m_bus); RC2014_EXT_SLOT(config, "bus:1", m_bus, rc2014_ext_bus_modules, "z80_21"); RC2014_EXT_SLOT(config, "bus:2", m_bus, rc2014_ext_bus_modules, "dual_clk"); RC2014_EXT_SLOT(config, "bus:3", m_bus, rc2014_ext_bus_modules, "ram64k"); @@ -213,7 +213,7 @@ public: // void rc2014zedp(machine_config &config) { - RC2014_EXT_BUS(config, m_bus, 0); + RC2014_EXT_BUS(config, m_bus); RC2014_EXT_SLOT(config, "bus:1", m_bus, rc2014_ext_bus_modules, "z80_21"); RC2014_EXT_SLOT(config, "bus:2", m_bus, rc2014_ext_bus_modules, "dual_clk"); RC2014_EXT_SLOT(config, "bus:3", m_bus, rc2014_ext_bus_modules, "rom_ram"); @@ -233,7 +233,7 @@ public: // void rc2014bppro(machine_config &config) { - RC2014_EXT_BUS(config, m_bus, 0); + RC2014_EXT_BUS(config, m_bus); RC2014_EXT_SLOT(config, "bus:1", m_bus, rc2014_ext_bus_modules, nullptr); RC2014_EXT_SLOT(config, "bus:2", m_bus, rc2014_ext_bus_modules, nullptr); RC2014_EXT_SLOT(config, "bus:3", m_bus, rc2014_ext_bus_modules, nullptr); @@ -280,7 +280,7 @@ public: // void rc2014mini(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "board", m_bus, rc2014_mini_bus_modules, "mini", true); RC2014_SLOT(config, "bus:1", m_bus, rc2014_mini_bus_modules, nullptr); } @@ -290,7 +290,7 @@ public: // void rc2014minicpm(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "board", m_bus, rc2014_mini_bus_modules, "mini", true).set_option_device_input_defaults("mini", DEVICE_INPUT_DEFAULTS_NAME(mini_cpm)); RC2014_SLOT(config, "bus:1", m_bus, rc2014_mini_bus_modules, "mini_cpm", true); } @@ -303,7 +303,7 @@ public: // void rc2014micro(machine_config &config) { - RC2014_BUS(config, m_bus, 0); + RC2014_BUS(config, m_bus); RC2014_SLOT(config, "board", m_bus, rc2014_bus_modules, "micro", true); } private: @@ -336,7 +336,7 @@ public: // void sc105(machine_config &config) { - RC2014_RC80_BUS(config, m_bus, 0); + RC2014_RC80_BUS(config, m_bus); RC2014_RC80_SLOT(config, "bus:1", m_bus, rc2014_rc80_bus_modules, nullptr); RC2014_RC80_SLOT(config, "bus:2", m_bus, rc2014_rc80_bus_modules, nullptr); RC2014_RC80_SLOT(config, "bus:3", m_bus, rc2014_rc80_bus_modules, nullptr); @@ -355,7 +355,7 @@ public: // void sc112(machine_config &config) { - RC2014_RC80_BUS(config, m_bus, 0); + RC2014_RC80_BUS(config, m_bus); RC2014_RC80_SLOT(config, "bus:1", m_bus, rc2014_rc80_bus_modules, nullptr); RC2014_RC80_SLOT(config, "bus:2", m_bus, rc2014_rc80_bus_modules, nullptr); RC2014_RC80_SLOT(config, "bus:3", m_bus, rc2014_rc80_bus_modules, nullptr); @@ -373,7 +373,7 @@ public: // void sc116(machine_config &config) { - RC2014_RC80_BUS(config, m_bus, 0); + RC2014_RC80_BUS(config, m_bus); RC2014_RC80_SLOT(config, "bus:1", m_bus, rc2014_rc80_bus_modules, nullptr); RC2014_RC80_SLOT(config, "bus:2", m_bus, rc2014_rc80_bus_modules, nullptr); RC2014_RC80_SLOT(config, "bus:3", m_bus, rc2014_rc80_bus_modules, nullptr); @@ -389,7 +389,7 @@ public: // void sc203(machine_config &config) { - RC2014_RC80_BUS(config, m_bus, 0); + RC2014_RC80_BUS(config, m_bus); RC2014_RC80_SLOT(config, "bus:1", m_bus, rc2014_rc80_bus_modules, "sc111"); RC2014_RC80_SLOT(config, "bus:2", m_bus, rc2014_rc80_bus_modules, "sc119"); RC2014_RC80_SLOT(config, "bus:3", m_bus, rc2014_rc80_bus_modules, nullptr); diff --git a/src/mame/homebrew/sbc6510.cpp b/src/mame/homebrew/sbc6510.cpp index 740629632d7..736a57db971 100644 --- a/src/mame/homebrew/sbc6510.cpp +++ b/src/mame/homebrew/sbc6510.cpp @@ -290,7 +290,7 @@ void sbc6510_state::sbc6510(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_sbc6510); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/homebrew/sitcom.cpp b/src/mame/homebrew/sitcom.cpp index c1b6d1608d0..f3472b642f8 100644 --- a/src/mame/homebrew/sitcom.cpp +++ b/src/mame/homebrew/sitcom.cpp @@ -344,7 +344,7 @@ void sitcom_state::sitcom(machine_config &config) m_maincpu->in_sid_func().set(FUNC(sitcom_state::sid_line)); m_maincpu->out_sod_func().set_output("sod_led"); - CLOCK(config, "100hz", 100).signal_handler().set_inputline("maincpu", I8085_RST75_LINE); + CLOCK(config, "100hz", XTAL::u(100)).signal_handler().set_inputline("maincpu", I8085_RST75_LINE); i8255_device &ppi(I8255(config, "ppi")); ppi.out_pa_callback().set(FUNC(sitcom_state::update_ppi_pa)); @@ -352,8 +352,8 @@ void sitcom_state::sitcom(machine_config &config) ppi.in_pc_callback().set_ioport("PORTC"); // video hardware - DL1414T(config, "ds0", u32(0)).update().set(FUNC(sitcom_state::update_ds<0>)); // left display - DL1414T(config, "ds1", u32(0)).update().set(FUNC(sitcom_state::update_ds<1>)); // right display + DL1414T(config, "ds0").update().set(FUNC(sitcom_state::update_ds<0>)); // left display + DL1414T(config, "ds1").update().set(FUNC(sitcom_state::update_ds<1>)); // right display // host interface rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "null_modem")); @@ -367,7 +367,7 @@ void sitcom_state::sitcom(machine_config &config) void sitcom_timer_state::sitcomtmr(machine_config &config) { sitcom(config); - DL1414T(config, m_ds2, u32(0)).update().set(FUNC(sitcom_timer_state::update_ds<2>)); // remote display + DL1414T(config, m_ds2).update().set(FUNC(sitcom_timer_state::update_ds<2>)); // remote display config.set_default_layout(layout_sitcomtmr); } diff --git a/src/mame/homebrew/test_t400.cpp b/src/mame/homebrew/test_t400.cpp index 05c3a907066..9df704744c8 100644 --- a/src/mame/homebrew/test_t400.cpp +++ b/src/mame/homebrew/test_t400.cpp @@ -33,14 +33,14 @@ void t400_test_suite_state::port_l_w(uint8_t data) void t400_test_suite_state::test_t410(machine_config &config) { - COP410(config, m_maincpu, 1000000); + COP410(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); m_maincpu->write_l().set(FUNC(t400_test_suite_state::port_l_w)); } void t400_test_suite_state::test_t420(machine_config &config) { - COP420(config, m_maincpu, 1000000); + COP420(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, true); m_maincpu->write_l().set(FUNC(t400_test_suite_state::port_l_w)); } diff --git a/src/mame/homebrew/ultim809.cpp b/src/mame/homebrew/ultim809.cpp index 06a39844957..07970055387 100644 --- a/src/mame/homebrew/ultim809.cpp +++ b/src/mame/homebrew/ultim809.cpp @@ -135,7 +135,7 @@ DEVICE_INPUT_DEFAULTS_END void ultim809_state::ultim809(machine_config &config) { // basic machine hardware - MC6809E(config, m_maincpu, 8000000 / 4); // 68B09E + MC6809E(config, m_maincpu, XTAL::u(8000000) / 4); // 68B09E m_maincpu->set_addrmap(AS_PROGRAM, &ultim809_state::mem_map); // video hardware @@ -146,7 +146,7 @@ void ultim809_state::ultim809(machine_config &config) SCREEN(config, "screen", SCREEN_TYPE_RASTER); // TBD: what type of VIA is this? It replaced a MC68B21P at some point in development. - MOS6522(config, m_via, 8000000 / 4); + MOS6522(config, m_via, XTAL::u(8000000) / 4); // Memory banking: up to 32 banks with inbuilt U8, or replace it with external memory to get the full 4 MB m_via->writepa_handler().set([this] (u8 data) { m_membank = data & 0x1F; }); // memory banking //m_via->readpb_handler().set(FUNC(ultim809_state::portb_r)); // serial @@ -155,7 +155,7 @@ void ultim809_state::ultim809(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - AY8910(config, m_psg, 8000000 / 4).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8910(config, m_psg, XTAL::u(8000000) / 4).add_route(ALL_OUTPUTS, "mono", 0.50); //m_psg->port_a_read_callback(FUNC(ultim809_state::...); // joystick 1 //m_psg->port_b_read_callback(FUNC(ultim809_state::...); // joystick 2 diff --git a/src/mame/homebrew/uzebox.cpp b/src/mame/homebrew/uzebox.cpp index 28d5039afb3..bc9f3196a79 100644 --- a/src/mame/homebrew/uzebox.cpp +++ b/src/mame/homebrew/uzebox.cpp @@ -26,7 +26,7 @@ #include "speaker.h" // overclocked to 8 * NTSC burst frequency -#define MASTER_CLOCK 28618180 +#define MASTER_CLOCK XTAL::u(28618180) #define INTERLACED 0 diff --git a/src/mame/homebrew/z80clock.cpp b/src/mame/homebrew/z80clock.cpp index a06c5c1e1b4..5c1036e9709 100644 --- a/src/mame/homebrew/z80clock.cpp +++ b/src/mame/homebrew/z80clock.cpp @@ -84,7 +84,7 @@ public: SPEAKER_SOUND(config, m_speaker); m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25); - CLOCK(config, m_ne555, 8589).signal_handler().set(FUNC(z80clock_state::ne555)); + CLOCK(config, m_ne555, XTAL::u(8589)).signal_handler().set(FUNC(z80clock_state::ne555)); m_ne555->set_clock_scale(0.0f); m_ne555->set_duty_cycle(2/3.0f); diff --git a/src/mame/homebrew/zexall.cpp b/src/mame/homebrew/zexall.cpp index 1bc14a11b01..52f95947aab 100644 --- a/src/mame/homebrew/zexall.cpp +++ b/src/mame/homebrew/zexall.cpp @@ -165,7 +165,7 @@ void zexall_state::zexall(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &zexall_state::mem_map); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); } diff --git a/src/mame/homelab/braiplus.cpp b/src/mame/homelab/braiplus.cpp index 4fd85db6c9c..45ccdbc4aec 100644 --- a/src/mame/homelab/braiplus.cpp +++ b/src/mame/homelab/braiplus.cpp @@ -119,24 +119,24 @@ static const z80_daisy_config daisy_chain[] = void braiplus_state::braiplus(machine_config &config) { - Z80(config, m_maincpu, 4'000'000); + Z80(config, m_maincpu, XTAL::u(4'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &braiplus_state::mem_map); m_maincpu->set_addrmap(AS_IO, &braiplus_state::io_map); m_maincpu->set_daisy_config(daisy_chain); - Z80PIO(config, m_pio[0], 4'000'000); + Z80PIO(config, m_pio[0], XTAL::u(4'000'000)); m_pio[0]->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - Z80PIO(config, m_pio[1], 4'000'000); + Z80PIO(config, m_pio[1], XTAL::u(4'000'000)); m_pio[1]->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - i8251_device &usart(I8251(config, "usart", 2'000'000)); + i8251_device &usart(I8251(config, "usart", XTAL::u(2'000'000))); usart.rxrdy_handler().set(m_pio[1], FUNC(z80pio_device::pa3_w)); - WD2793(config, "fdc", 2'000'000); + WD2793(config, "fdc", XTAL::u(2'000'000)); // HACK: what should be driving this? - CLOCK(config, "clock_hack", 100).signal_handler().set(m_pio[0], FUNC(z80pio_device::pa7_w)); + CLOCK(config, "clock_hack", XTAL::u(100)).signal_handler().set(m_pio[0], FUNC(z80pio_device::pa7_w)); } ROM_START( braiplus ) diff --git a/src/mame/homelab/homelab.cpp b/src/mame/homelab/homelab.cpp index 63eba19be6d..802bca8121d 100644 --- a/src/mame/homelab/homelab.cpp +++ b/src/mame/homelab/homelab.cpp @@ -811,7 +811,7 @@ void homelab3_state::brailab4(machine_config &config) homelab3(config); m_maincpu->set_addrmap(AS_PROGRAM, &homelab3_state::brailab4_mem); m_maincpu->set_addrmap(AS_IO, &homelab3_state::brailab4_io); - MEA8000(config, "mea8000", 3840000).add_route(ALL_OUTPUTS, "mono", 1.0); + MEA8000(config, "mea8000", XTAL::u(3840000)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/hp/hp16500.cpp b/src/mame/hp/hp16500.cpp index be286cdd6f2..bc6c1816497 100644 --- a/src/mame/hp/hp16500.cpp +++ b/src/mame/hp/hp16500.cpp @@ -417,21 +417,21 @@ uint32_t hp16500_state::screen_update_hp16500(screen_device &screen, bitmap_rgb3 void hp16500_state::hp1650(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp16500_state::hp1650_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(25000000, 0x330, 0, 0x250, 0x198, 0, 0x180); + screen.set_raw(XTAL::u(25000000), 0x330, 0, 0x250, 0x198, 0, 0x180); screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - mc6845_device &crtc(MC6845(config, "crtc", 25000000/9)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(25000000)/9)); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); crtc.set_update_row_callback(FUNC(hp16500_state::crtc_update_row_1650)); crtc.out_vsync_callback().set(FUNC(hp16500_state::vsync_changed)); - SCN2661A(config, "epci", 5000000); + SCN2661A(config, "epci", XTAL::u(5000000)); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -440,21 +440,21 @@ void hp16500_state::hp1650(machine_config &config) void hp16500_state::hp1651(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp16500_state::hp1651_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(25000000, 0x330, 0, 0x250, 0x198, 0, 0x180); + screen.set_raw(XTAL::u(25000000), 0x330, 0, 0x250, 0x198, 0, 0x180); screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - mc6845_device &crtc(MC6845(config, "crtc", 25000000/9)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(25000000)/9)); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); crtc.set_update_row_callback(FUNC(hp16500_state::crtc_update_row_1650)); crtc.out_vsync_callback().set(FUNC(hp16500_state::vsync_changed)); - SCN2661A(config, "epci", 5000000); + SCN2661A(config, "epci", XTAL::u(5000000)); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -463,14 +463,14 @@ void hp16500_state::hp1651(machine_config &config) void hp16500_state::hp16500a(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp16500_state::hp16500a_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(25000000, 0x320, 0, 0x240, 0x19c, 0, 0x170); + screen.set_raw(XTAL::u(25000000), 0x320, 0, 0x240, 0x19c, 0, 0x170); screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - mc6845_device &crtc(MC6845(config, "crtc", 25000000/9)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(25000000)/9)); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); @@ -503,7 +503,7 @@ void hp16500_state::hp16500b(machine_config &config) // later with a 16500b specific keyboard implementation HP_HIL_SLOT(config, "hil1", "mlc", hp_hil_devices, "hp_ipc_kbd"); - DS1286(config, "rtc", 32768); + DS1286(config, "rtc", XTAL::u(32768)); //WD37C65C(config, "fdc", 16_MHz_XTAL); SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/hp/hp2620.cpp b/src/mame/hp/hp2620.cpp index 915102795a6..1d4dd860e10 100644 --- a/src/mame/hp/hp2620.cpp +++ b/src/mame/hp/hp2620.cpp @@ -205,7 +205,7 @@ void hp2620_state::hp2622(machine_config &config) m_crtc->hsync_callback().set(m_bellctr, FUNC(ripple_counter_device::clock_w)).invert(); m_crtc->lrc_callback().set(FUNC(hp2620_state::nlrc_w)).invert(); - mos6551_device &acia(MOS6551(config, "acia", 0)); // SY6551 + mos6551_device &acia(MOS6551(config, "acia")); // SY6551 acia.set_xtal(25.7715_MHz_XTAL / 14); // 1.84 MHz acia.irq_handler().set_inputline("maincpu", INPUT_LINE_IRQ0); acia.rts_handler().set(m_datacomm, FUNC(rs232_port_device::write_rts)); // RS (J6-22) diff --git a/src/mame/hp/hp2640.cpp b/src/mame/hp/hp2640.cpp index 150921db303..9d18456378c 100644 --- a/src/mame/hp/hp2640.cpp +++ b/src/mame/hp/hp2640.cpp @@ -159,7 +159,7 @@ constexpr unsigned VIDEO_CHAR_HEIGHT = 15; constexpr uint16_t START_DMA_ADDR = 0xffff; constexpr unsigned MAX_DMA_CYCLES = 450; constexpr unsigned CURSOR_BLINK_INH_MS = 110; -constexpr unsigned BEEP_FREQUENCY = 650; +constexpr XTAL BEEP_FREQUENCY = XTAL::u(650); constexpr unsigned BEEP_DURATION_MS = 100; // ************ @@ -354,7 +354,7 @@ void hp2640_base_state::machine_reset() m_uart->write_cs(1); m_uart->write_nb2(1); m_async_control = 0; - m_uart_clock->set_unscaled_clock(0); + m_uart_clock->set_unscaled_clock(XTAL()); update_async_control(0x00); m_rs232->write_dtr(0); async_txd_w(0); @@ -810,15 +810,15 @@ void hp2640_base_state::update_async_control(uint8_t new_control) if (diff & 0x0e) { unsigned new_rate_idx = (m_async_control >> 1) & 0x07; // Set baud rate - double rxc_txc_freq; + XTAL rxc_txc_freq; if (new_rate_idx == 0) { - rxc_txc_freq = 0.0; + rxc_txc_freq = XTAL(); } else { - rxc_txc_freq = SYS_CLOCK.dvalue() / baud_rate_divisors[ new_rate_idx ]; + rxc_txc_freq = SYS_CLOCK / baud_rate_divisors[ new_rate_idx ]; } m_uart_clock->set_unscaled_clock(rxc_txc_freq); m_uart->write_tsb(new_rate_idx == 1); - LOG("ASYNC freq=%f\n" , rxc_txc_freq); + LOG("ASYNC freq=%f\n" , rxc_txc_freq.value()); } if (diff & 0x30) { m_uart->write_np(BIT(new_control , 5)); @@ -1134,7 +1134,7 @@ void hp2640_base_state::hp2640_base(machine_config &config) m_uart->write_dav_callback().set(FUNC(hp2640_base_state::async_dav_w)); m_uart->set_auto_rdav(true); - CLOCK(config, m_uart_clock, 19200 * 16); + CLOCK(config, m_uart_clock, XTAL::u(19200 * 16)); m_uart_clock->signal_handler().set(m_uart, FUNC(ay51013_device::write_rcp)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay51013_device::write_tcp)); diff --git a/src/mame/hp/hp2640_tape.cpp b/src/mame/hp/hp2640_tape.cpp index a9a7630c4fe..77eabca0f77 100644 --- a/src/mame/hp/hp2640_tape.cpp +++ b/src/mame/hp/hp2640_tape.cpp @@ -106,7 +106,7 @@ enum : unsigned { // device type definition DEFINE_DEVICE_TYPE(HP2640_TAPE, hp2640_tape_device, "hp2640_tape" , "HP2640 tape subsystem") -hp2640_tape_device::hp2640_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp2640_tape_device::hp2640_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP2640_TAPE, tag, owner, clock) , m_irq_handler(*this) , m_led0_handler(*this) @@ -225,7 +225,7 @@ void hp2640_tape_device::device_add_mconfig(machine_config &config) for (unsigned i = 0; i < 2; i++) { auto& finder = m_drives[ i ]; - HP_DC100_TAPE(config , finder , 0); + HP_DC100_TAPE(config , finder); // Acceleration: 2000 in/s^2 finder->set_acceleration(ACCELERATION); // Slow speed: 10 ips, Fast speed: 60 ips diff --git a/src/mame/hp/hp2640_tape.h b/src/mame/hp/hp2640_tape.h index 30c511c4a8f..6c550ee15ae 100644 --- a/src/mame/hp/hp2640_tape.h +++ b/src/mame/hp/hp2640_tape.h @@ -19,7 +19,7 @@ class hp2640_tape_device : public device_t { public: // construction/destruction - hp2640_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp2640_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto irq() { return m_irq_handler.bind(); } diff --git a/src/mame/hp/hp3478a.cpp b/src/mame/hp/hp3478a.cpp index ae76df6831a..cbb2de9644e 100644 --- a/src/mame/hp/hp3478a.cpp +++ b/src/mame/hp/hp3478a.cpp @@ -720,7 +720,7 @@ void hp3478a_state::hp3478a(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - ADDRESS_MAP_BANK(config, m_iobank, 0); + ADDRESS_MAP_BANK(config, m_iobank); m_iobank->set_map(&hp3478a_state::io_bank); m_iobank->set_data_width(8); m_iobank->set_addr_width(18); diff --git a/src/mame/hp/hp48.cpp b/src/mame/hp/hp48.cpp index 0862b8ed70d..2be5cecffc4 100644 --- a/src/mame/hp/hp48.cpp +++ b/src/mame/hp/hp48.cpp @@ -1140,7 +1140,7 @@ void hp48_state::hp48(address_map &map) void hp48_state::hp48_common(machine_config &config) { /* cpu */ - SATURN(config, m_maincpu, 3937007); /* almost 4 MHz */ + SATURN(config, m_maincpu, XTAL::u(3937007)); /* almost 4 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &hp48_state::hp48); m_maincpu->out_func().set(FUNC(hp48_state::reg_out)); m_maincpu->in_func().set(FUNC(hp48_state::reg_in)); @@ -1168,7 +1168,7 @@ void hp48_state::hp48_common(machine_config &config) /* sound */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); } void hp48_state::hp48gx(machine_config &config) @@ -1208,7 +1208,7 @@ void hp48_state::hp48gp(machine_config &config) void hp48_state::hp48sx(machine_config &config) { hp48_common(config); - m_maincpu->set_clock(2000000); + m_maincpu->set_clock(XTAL::u(2000000)); MCFG_MACHINE_START_OVERRIDE(hp48_state, hp48sx) /* expansion ports */ @@ -1222,7 +1222,7 @@ void hp48_state::hp48sx(machine_config &config) void hp48_state::hp48s(machine_config &config) { hp48_common(config); - m_maincpu->set_clock(2000000); + m_maincpu->set_clock(XTAL::u(2000000)); MCFG_MACHINE_START_OVERRIDE(hp48_state, hp48s) /* serial I/O */ diff --git a/src/mame/hp/hp48_port.cpp b/src/mame/hp/hp48_port.cpp index cacc61f3297..e93e822efbb 100644 --- a/src/mame/hp/hp48_port.cpp +++ b/src/mame/hp/hp48_port.cpp @@ -106,7 +106,7 @@ void hp48_port_image_device::device_start() unfill_port(); } -hp48_port_image_device::hp48_port_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp48_port_image_device::hp48_port_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP48_PORT, tag, owner, clock) , device_image_interface(mconfig, *this) , m_port_size(0) diff --git a/src/mame/hp/hp48_port.h b/src/mame/hp/hp48_port.h index c98391198b2..0ca47c1f70b 100644 --- a/src/mame/hp/hp48_port.h +++ b/src/mame/hp/hp48_port.h @@ -21,12 +21,12 @@ class hp48_port_image_device : public device_t, public device_image_interface public: // construction/destruction hp48_port_image_device(const machine_config &mconfig, const char *tag, device_t *owner, int module, int max_size) - : hp48_port_image_device(mconfig, tag, owner, 0) + : hp48_port_image_device(mconfig, tag, owner) { set_port_config(module, max_size); } - hp48_port_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp48_port_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_port_config(int module, int max_size) { diff --git a/src/mame/hp/hp49gp.cpp b/src/mame/hp/hp49gp.cpp index b19ea48ddaf..ddeef8c96c0 100644 --- a/src/mame/hp/hp49gp.cpp +++ b/src/mame/hp/hp49gp.cpp @@ -287,7 +287,7 @@ void hp49gp_state::init_hp49gp() void hp49gp_state::hp49gp(machine_config &config) { - ARM9(config, m_maincpu, 400000000); + ARM9(config, m_maincpu, XTAL::u(400000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp49gp_state::hp49gp_map); PALETTE(config, "palette").set_entries(32768); @@ -299,7 +299,7 @@ void hp49gp_state::hp49gp(machine_config &config) screen.set_visarea(0, 131 - 1, 0, 80 - 1); screen.set_screen_update("s3c2410", FUNC(s3c2410_device::screen_update)); - S3C2410(config, m_s3c2410, 12000000); + S3C2410(config, m_s3c2410, XTAL::u(12000000)); m_s3c2410->set_palette_tag("palette"); m_s3c2410->set_screen_tag("screen"); m_s3c2410->gpio_port_r_callback().set(FUNC(hp49gp_state::s3c2410_gpio_port_r)); diff --git a/src/mame/hp/hp64k.cpp b/src/mame/hp/hp64k.cpp index 5657dae50b8..60468c0fff4 100644 --- a/src/mame/hp/hp64k.cpp +++ b/src/mame/hp/hp64k.cpp @@ -1375,7 +1375,7 @@ static void hp64k_floppies(device_slot_interface &device) void hp64k_state::hp64k(machine_config &config) { - HP_5061_3011(config, m_cpu, 6250000); + HP_5061_3011(config, m_cpu, XTAL::u(6250000)); m_cpu->set_rw_cycles(6 , 6); m_cpu->set_relative_mode(true); m_cpu->set_addrmap(AS_PROGRAM, &hp64k_state::cpu_mem_map); @@ -1389,7 +1389,7 @@ void hp64k_state::hp64k(machine_config &config) TIMER(config, "linesync_timer").configure_periodic(FUNC(hp64k_state::hp64k_line_sync), attotime::from_hz(50)); // Clock = 25 MHz / 9 * (112/114) - I8275(config, m_crtc, 2729045); + I8275(config, m_crtc, XTAL::u(2729045)); m_crtc->set_screen("screen"); m_crtc->set_character_width(9); m_crtc->set_display_callback(FUNC(hp64k_state::crtc_display_pixels)); @@ -1411,7 +1411,7 @@ void hp64k_state::hp64k(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:0", hp64k_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats, true); FLOPPY_CONNECTOR(config, "fdc:1", hp64k_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats, true); - TTL74123(config, m_ss0, 0); + TTL74123(config, m_ss0); m_ss0->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE); m_ss0->set_resistor_value(RES_K(68.1)); // Warning! Duration formula is not correct for LS123, actual capacitor is 10 uF @@ -1420,7 +1420,7 @@ void hp64k_state::hp64k(machine_config &config) m_ss0->set_clear_pin_value(1); m_ss0->out_cb().set(FUNC(hp64k_state::hp64k_floppy0_rdy)); - TTL74123(config, m_ss1, 0); + TTL74123(config, m_ss1); m_ss1->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE); m_ss1->set_resistor_value(RES_K(68.1)); m_ss1->set_capacitor_value(CAP_U(16)); @@ -1429,14 +1429,14 @@ void hp64k_state::hp64k(machine_config &config) m_ss1->out_cb().set(FUNC(hp64k_state::hp64k_floppy1_rdy)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2500).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(2500)).add_route(ALL_OUTPUTS, "mono", 1.00); TIMER(config, m_beep_timer).configure_generic(FUNC(hp64k_state::hp64k_beeper_off)); COM8116(config, m_baud_rate, 5.0688_MHz_XTAL); m_baud_rate->fr_handler().set(FUNC(hp64k_state::hp64k_baud_clk_w)); - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->rxrdy_handler().set(FUNC(hp64k_state::hp64k_rxrdy_w)); m_uart->txrdy_handler().set(FUNC(hp64k_state::hp64k_txrdy_w)); m_uart->txd_handler().set(FUNC(hp64k_state::hp64k_txd_w)); @@ -1448,7 +1448,7 @@ void hp64k_state::hp64k(machine_config &config) m_rs232->dcd_handler().set(FUNC(hp64k_state::hp64k_rs232_dcd_w)); m_rs232->cts_handler().set(FUNC(hp64k_state::hp64k_rs232_cts_w)); - PHI(config, m_phi, 0); + PHI(config, m_phi); m_phi->int_write_cb().set(FUNC(hp64k_state::hp64k_phi_int_w)); m_phi->dmarq_write_cb().set(m_cpu, FUNC(hp_5061_3011_cpu_device::halt_w)); m_phi->sys_cntrl_read_cb().set(FUNC(hp64k_state::hp64k_phi_sys_ctrl_r)); diff --git a/src/mame/hp/hp80.cpp b/src/mame/hp/hp80.cpp index de744a90076..c84c871eb3d 100644 --- a/src/mame/hp/hp80.cpp +++ b/src/mame/hp/hp80.cpp @@ -126,7 +126,7 @@ namespace { } // **** Constants **** -static constexpr unsigned CPU_CLOCK = 613000; +static constexpr XTAL CPU_CLOCK = XTAL::u(613000); // Time taken by hw timer updating (semi-made up) (in µsec) static constexpr unsigned TIMER_BUSY_USEC = 128; static constexpr unsigned IRQ_KEYBOARD_BIT = 0; @@ -271,7 +271,7 @@ void hp80_base_state::hp80_base(machine_config &config) // Beeper SPEAKER(config, "mono").front_center(); - DAC_1BIT(config, m_dac , 0).add_route(ALL_OUTPUTS, "mono", 0.5, AUTO_ALLOC_INPUT, 0); + DAC_1BIT(config, m_dac ).add_route(ALL_OUTPUTS, "mono", 0.5, AUTO_ALLOC_INPUT, 0); BEEP(config, m_beep, CPU_CLOCK / 512).add_route(ALL_OUTPUTS, "mono", 0.5, AUTO_ALLOC_INPUT, 0); // Optional ROMs @@ -925,7 +925,7 @@ public: hp85_state(const machine_config &mconfig, device_type type, const char *tag); // **** Constants of HP85 **** - static constexpr unsigned MASTER_CLOCK = 9808000; + static constexpr XTAL MASTER_CLOCK = XTAL::u(9808000); // Video memory is actually made of 16384 4-bit nibbles static constexpr unsigned VIDEO_MEM_SIZE = 8192; static constexpr unsigned ALPHA_MEM_SIZE = 4096; @@ -1575,11 +1575,11 @@ void hp85_state::hp85(machine_config &config) TIMER(config, m_prt_busy_timer).configure_generic(FUNC(hp85_state::prt_busy_timer)); // Tape drive - HP_1MA6(config, "tape", 0); + HP_1MA6(config, "tape"); // Printer output - BITBANGER(config, m_prt_graph_out, 0); - BITBANGER(config, m_prt_alpha_out, 0); + BITBANGER(config, m_prt_graph_out); + BITBANGER(config, m_prt_alpha_out); SOFTWARE_LIST(config, "optrom_list").set_original("hp85_rom"); } @@ -1609,7 +1609,7 @@ public: hp86_state(const machine_config &mconfig, device_type type, const char *tag, bool has_int_keyb = false); // **** Constants of HP86 **** - static constexpr unsigned MASTER_CLOCK = 12260000; + static constexpr XTAL MASTER_CLOCK = XTAL::u(12260000); static constexpr unsigned VIDEO_MEM_SIZE = 16384; static constexpr uint16_t VIDEO_ADDR_MASK = VIDEO_MEM_SIZE - 1; static constexpr uint16_t VIDEO_ALPHA_N_END = 0x10e0; diff --git a/src/mame/hp/hp80_optrom.cpp b/src/mame/hp/hp80_optrom.cpp index 0dc0cec1022..eff61f3a9af 100644 --- a/src/mame/hp/hp80_optrom.cpp +++ b/src/mame/hp/hp80_optrom.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(HP80_OPTROM, hp80_optrom_device, "hp80_optrom", "HP80 optiona // +------------------+ // |hp80_optrom_device| // +------------------+ -hp80_optrom_device::hp80_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hp80_optrom_device::hp80_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP80_OPTROM, tag, owner, clock), device_rom_image_interface(mconfig, *this), m_select_code(0) diff --git a/src/mame/hp/hp80_optrom.h b/src/mame/hp/hp80_optrom.h index 2f4f6cd7250..aa538f7b74e 100644 --- a/src/mame/hp/hp80_optrom.h +++ b/src/mame/hp/hp80_optrom.h @@ -23,12 +23,7 @@ class hp80_optrom_device : public device_t, { public: // construction/destruction - hp80_optrom_device(machine_config const &mconfig, char const *tag, device_t *owner) - : hp80_optrom_device(mconfig, tag, owner, (uint32_t)0) - { - } - - hp80_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp80_optrom_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~hp80_optrom_device(); void install_read_handler(address_space& space); diff --git a/src/mame/hp/hp95lx.cpp b/src/mame/hp/hp95lx.cpp index 384bf4979c7..41cc07bef38 100644 --- a/src/mame/hp/hp95lx.cpp +++ b/src/mame/hp/hp95lx.cpp @@ -728,20 +728,20 @@ void hp95lx_state::hp95lx(machine_config &config) ADDRESS_MAP_BANK(config, "bankdev_e800").set_map(&hp95lx_state::hp95lx_romdos).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000); ADDRESS_MAP_BANK(config, "bankdev_ec00").set_map(&hp95lx_state::hp95lx_romdos).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000); - PIT8254(config, m_pit8254, 0); + PIT8254(config, m_pit8254); m_pit8254->set_clk<0>(XTAL(14'318'181) / 12); /* heartbeat IRQ */ m_pit8254->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w)); m_pit8254->set_clk<1>(XTAL(14'318'181) / 12); /* misc IRQ */ m_pit8254->out_handler<1>().set(m_pic8259, FUNC(pic8259_device::ir2_w)); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace("maincpu", AS_PROGRAM); m_isabus->set_iospace("maincpu", AS_IO); - ISA8_SLOT(config, "board0", 0, "isa", pc_isa8_cards, "com", true); + ISA8_SLOT(config, "board0", "isa", pc_isa8_cards, "com", true); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)); pc_kbdc.out_clock_cb().set(FUNC(hp95lx_state::keyboard_clock_w)); @@ -751,7 +751,7 @@ void hp95lx_state::hp95lx(machine_config &config) NVRAM(config, "nvram3", nvram_device::DEFAULT_ALL_0); // card slot SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC SCREEN(config, m_screen, SCREEN_TYPE_LCD, rgb_t::white()); m_screen->set_screen_update(FUNC(hp95lx_state::screen_update)); diff --git a/src/mame/hp/hp9825.cpp b/src/mame/hp/hp9825.cpp index a993c318981..53ff5168973 100644 --- a/src/mame/hp/hp9825.cpp +++ b/src/mame/hp/hp9825.cpp @@ -59,10 +59,10 @@ #define LOG_DBG(...) LOGMASKED(LOG_DBG_MASK, __VA_ARGS__) // CPU clock (generated by a trimmered RC oscillator) -constexpr unsigned MAIN_CLOCK = 6000000; +constexpr XTAL MAIN_CLOCK = XTAL::u(6000000); // KDP chip clock -constexpr unsigned KDP_CLOCK = MAIN_CLOCK / 4; +constexpr XTAL KDP_CLOCK = MAIN_CLOCK / 4; // Peripheral Addresses (PA) constexpr uint8_t KDP_PA = 0; @@ -95,7 +95,7 @@ constexpr uint32_t PRINT_FG = 0x2d1881; // Blue-violet // Beeper constants // Values come from R/C values on schematics -constexpr unsigned BEEPER_FREQ = 1400; +constexpr XTAL BEEPER_FREQ = XTAL::u(1400); constexpr unsigned BEEPER_MS = 22; // Bit manipulation @@ -763,20 +763,20 @@ void hp9825_state::hp9825_base(machine_config &config) // Needed when 98035 RTC module is connected or time advances at about 1/4 the correct speed (NP misses a lot of 1kHz interrupts) config.set_maximum_quantum(attotime::from_hz(5000)); - HP98X5_IO_SYS(config , m_io_sys , 0); + HP98X5_IO_SYS(config , m_io_sys); m_io_sys->irl().set_inputline(m_cpu, HPHYBRID_IRL); m_io_sys->irh().set_inputline(m_cpu, HPHYBRID_IRH); m_io_sys->sts().set(m_cpu , FUNC(hp_09825_67907_cpu_device::status_w)); m_io_sys->flg().set(m_cpu , FUNC(hp_09825_67907_cpu_device::flag_w)); m_io_sys->dmar().set(m_cpu , FUNC(hp_09825_67907_cpu_device::dmar_w)); - TIMER(config , m_cursor_timer , 0).configure_generic(FUNC(hp9825_state::cursor_blink)); + TIMER(config , m_cursor_timer).configure_generic(FUNC(hp9825_state::cursor_blink)); // Keyboard scan timer. A scan of the whole keyboard should take 2^14 KDP clocks. - TIMER(config , "kb_timer" , 0).configure_periodic(FUNC(hp9825_state::kb_scan), attotime::from_ticks(16384 , KDP_CLOCK)); + TIMER(config , "kb_timer").configure_periodic(FUNC(hp9825_state::kb_scan), attotime::from_ticks(16384 , KDP_CLOCK)); // Tape drive - HP9825_TAPE(config , m_tape , 0); + HP9825_TAPE(config , m_tape); m_tape->flg().set([this](int state) { m_io_sys->set_flg(TAPE_PA , state); }); m_tape->sts().set([this](int state) { m_io_sys->set_sts(TAPE_PA , state); }); m_tape->dmar().set([this](int state) { m_io_sys->set_dmar(TAPE_PA , state); }); @@ -784,9 +784,9 @@ void hp9825_state::hp9825_base(machine_config &config) m_tape->cart_in().set([this](int state) { if (started()) m_cassette = state; }); // Printer - BITBANGER(config , m_prt_alpha_out , 0); - BITBANGER(config , m_prt_graph_out , 0); - TIMER(config , m_prt_timer , 0).configure_generic(FUNC(hp9825_state::prt_timer)); + BITBANGER(config , m_prt_alpha_out); + BITBANGER(config , m_prt_graph_out); + TIMER(config , m_prt_timer).configure_generic(FUNC(hp9825_state::prt_timer)); SCREEN(config , m_prt_out , SCREEN_TYPE_RASTER); m_prt_out->set_screen_update(FUNC(hp9825_state::printer_out_update)); m_prt_out->set_refresh_hz(60); @@ -796,12 +796,12 @@ void hp9825_state::hp9825_base(machine_config &config) // Beeper SPEAKER(config, "mono").front_center(); BEEP(config, m_beeper, BEEPER_FREQ).add_route(ALL_OUTPUTS, "mono", 1.00); - TIMER(config , m_beep_timer , 0).configure_generic(FUNC(hp9825_state::beep_timer)); + TIMER(config , m_beep_timer).configure_generic(FUNC(hp9825_state::beep_timer)); // I/O slots for (unsigned slot = 0; slot < 3; slot++) { auto& finder = m_io_slot[ slot ]; - hp9845_io_slot_device& tmp( HP9845_IO_SLOT(config , finder , 0) ); + hp9845_io_slot_device& tmp( HP9845_IO_SLOT(config , finder) ); tmp.irq().set([this , slot](int state) { set_irq_slot(slot , state); }); tmp.sts().set([this , slot](int state) { set_sts_slot(slot , state); }); tmp.flg().set([this , slot](int state) { set_flg_slot(slot , state); }); diff --git a/src/mame/hp/hp9825_optrom.cpp b/src/mame/hp/hp9825_optrom.cpp index 1466bf25b83..61ef1b6f0f7 100644 --- a/src/mame/hp/hp9825_optrom.cpp +++ b/src/mame/hp/hp9825_optrom.cpp @@ -39,12 +39,7 @@ constexpr std::array region_tab = // +--------------------+ // |hp9825_optrom_device| // +--------------------+ -hp9825_optrom_device::hp9825_optrom_device(machine_config const &mconfig, char const *tag, device_t *owner) - : hp9825_optrom_device(mconfig, tag, owner, (uint32_t)0) -{ -} - -hp9825_optrom_device::hp9825_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp9825_optrom_device::hp9825_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP9825_OPTROM, tag, owner, clock) , device_rom_image_interface(mconfig, *this) , m_rom_limit(0xffffU) diff --git a/src/mame/hp/hp9825_optrom.h b/src/mame/hp/hp9825_optrom.h index 494f2ffda20..a51d376c964 100644 --- a/src/mame/hp/hp9825_optrom.h +++ b/src/mame/hp/hp9825_optrom.h @@ -21,7 +21,7 @@ class hp9825_optrom_device : public device_t, public: // construction/destruction hp9825_optrom_device(machine_config const &mconfig, char const *tag, device_t *owner); - hp9825_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9825_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp9825_optrom_device(); void set_rom_limit(offs_t rom_limit) { m_rom_limit = rom_limit; } diff --git a/src/mame/hp/hp9825_tape.cpp b/src/mame/hp/hp9825_tape.cpp index 402d6f5ef44..5e2dec42bd3 100644 --- a/src/mame/hp/hp9825_tape.cpp +++ b/src/mame/hp/hp9825_tape.cpp @@ -75,7 +75,7 @@ enum : unsigned { // Device type definition DEFINE_DEVICE_TYPE(HP9825_TAPE, hp9825_tape_device, "hp9825_tape", "HP9825 tape sub-system") -hp9825_tape_device::hp9825_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp9825_tape_device::hp9825_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP9825_TAPE , tag , owner , clock) , m_flg_handler(*this) , m_sts_handler(*this) @@ -90,7 +90,7 @@ hp9825_tape_device::hp9825_tape_device(const machine_config &mconfig, const char void hp9825_tape_device::device_add_mconfig(machine_config &config) { - HP_DC100_TAPE(config , m_tape , 0); + HP_DC100_TAPE(config , m_tape); m_tape->set_acceleration(ACCELERATION); m_tape->set_set_points(SLOW_SPEED , FAST_SPEED); m_tape->set_tick_size(TACH_TICK_LENGTH); @@ -103,7 +103,7 @@ void hp9825_tape_device::device_add_mconfig(machine_config &config) m_tape->rd_bit().set(FUNC(hp9825_tape_device::rd_bit_w)); m_tape->wr_bit().set(FUNC(hp9825_tape_device::wr_bit_r)); - TTL74123(config , m_short_gap_timer , 0); + TTL74123(config , m_short_gap_timer); m_short_gap_timer->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE); m_short_gap_timer->set_resistor_value(RES_K(37.9)); m_short_gap_timer->set_capacitor_value(CAP_N(10)); @@ -111,7 +111,7 @@ void hp9825_tape_device::device_add_mconfig(machine_config &config) m_short_gap_timer->set_clear_pin_value(1); m_short_gap_timer->out_cb().set(FUNC(hp9825_tape_device::short_gap_w)); - TTL74123(config , m_long_gap_timer , 0); + TTL74123(config , m_long_gap_timer); m_long_gap_timer->set_connection_type(TTL74123_NOT_GROUNDED_NO_DIODE); m_long_gap_timer->set_resistor_value(RES_K(28.7)); m_long_gap_timer->set_capacitor_value(CAP_U(0.22)); diff --git a/src/mame/hp/hp9825_tape.h b/src/mame/hp/hp9825_tape.h index 768a29fde7a..5aeeebbc7c8 100644 --- a/src/mame/hp/hp9825_tape.h +++ b/src/mame/hp/hp9825_tape.h @@ -21,7 +21,7 @@ class hp9825_tape_device : public device_t { public: // construction/destruction - hp9825_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9825_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t tape_r(offs_t offset); void tape_w(offs_t offset, uint16_t data); diff --git a/src/mame/hp/hp9845.cpp b/src/mame/hp/hp9845.cpp index 0426cdedc41..eed58c7ef57 100644 --- a/src/mame/hp/hp9845.cpp +++ b/src/mame/hp/hp9845.cpp @@ -118,7 +118,7 @@ #define MAX_WORD_PER_ROW 220 // Constants of alpha video -#define VIDEO_PIXEL_CLOCK 20849400 +#define VIDEO_PIXEL_CLOCK XTAL::u(20849400) #define VIDEO_CHAR_WIDTH 9 #define VIDEO_CHAR_HEIGHT 15 #define VIDEO_CHAR_COLUMNS 80 @@ -150,7 +150,7 @@ // Constants of 98770A video // HBEND & VBEND probably are not really 0 -#define VIDEO_770_PIXEL_CLOCK 29798400 +#define VIDEO_770_PIXEL_CLOCK XTAL::u(29798400) #define VIDEO_770_HTOTAL 1024 #define VIDEO_770_HBEND 0 #define VIDEO_770_HBSTART (VIDEO_CHAR_COLUMNS * VIDEO_CHAR_WIDTH) @@ -161,7 +161,7 @@ #define VIDEO_770_ALPHA_R_LIM 640 // Right-side limit of alpha-only horizontal part // Constants of 98780A video -#define VIDEO_780_PIXEL_CLOCK 28224000 +#define VIDEO_780_PIXEL_CLOCK XTAL::u(28224000) #define VIDEO_780_HTOTAL 896 #define VIDEO_780_VTOTAL 525 #define VIDEO_780_HBEND 0 @@ -195,7 +195,7 @@ constexpr unsigned LP_XOFFSET = 5; // x-offset of LP (due to delay in hit recog #define T14_PA 14 #define T15_PA 15 -#define KEY_SCAN_OSCILLATOR 327680 +#define KEY_SCAN_OSCILLATOR XTAL::u(327680) class hp9845_state : public driver_device { @@ -3640,14 +3640,14 @@ void hp9845_base_state::ppu_io_map(address_map &map) void hp9845_base_state::hp9845_base(machine_config &config) { - HP_5061_3001(config , m_lpu , 5700000); + HP_5061_3001(config , m_lpu , XTAL::u(5700000)); // Clock scaling takes into account the slowdown caused by DRAM refresh m_lpu->set_clock_scale(0.93); m_lpu->set_addrmap(AS_PROGRAM , &hp9845_base_state::global_mem_map); m_lpu->set_9845_boot_mode(true); m_lpu->set_rw_cycles(6 , 6); m_lpu->set_relative_mode(true); - HP_5061_3001(config , m_ppu , 5700000); + HP_5061_3001(config , m_ppu , XTAL::u(5700000)); m_ppu->set_clock_scale(0.93); m_ppu->set_addrmap(AS_PROGRAM , &hp9845_base_state::global_mem_map); m_ppu->set_addrmap(AS_IO , &hp9845_base_state::ppu_io_map); @@ -3657,7 +3657,7 @@ void hp9845_base_state::hp9845_base(machine_config &config) m_ppu->set_int_cb(m_io_sys , FUNC(hp98x5_io_sys_device::int_r)); m_ppu->pa_changed_cb().set(m_io_sys , FUNC(hp98x5_io_sys_device::pa_w)); - HP98X5_IO_SYS(config , m_io_sys , 0); + HP98X5_IO_SYS(config , m_io_sys); m_io_sys->irl().set_inputline(m_ppu, HPHYBRID_IRL); m_io_sys->irh().set_inputline(m_ppu, HPHYBRID_IRH); m_io_sys->sts().set(m_ppu , FUNC(hp_5061_3001_cpu_device::status_w)); @@ -3679,11 +3679,11 @@ void hp9845_base_state::hp9845_base(machine_config &config) TIMER(config, m_beep_timer).configure_generic(FUNC(hp9845_base_state::beeper_off)); // Tape drives - HP_TACO(config , m_t15 , 4000000); + HP_TACO(config , m_t15 , XTAL::u(4000000)); m_t15->irq().set([this](int state) { m_io_sys->set_irq(T15_PA , state); }); m_t15->flg().set([this](int state) { m_io_sys->set_flg(T15_PA , state); }); m_t15->sts().set([this](int state) { m_io_sys->set_sts(T15_PA , state); }); - HP_TACO(config , m_t14 , 4000000); + HP_TACO(config , m_t14 , XTAL::u(4000000)); m_t14->irq().set([this](int state) { m_io_sys->set_irq(T14_PA , state); }); m_t14->flg().set([this](int state) { m_io_sys->set_flg(T14_PA , state); }); m_t14->sts().set([this](int state) { m_io_sys->set_sts(T14_PA , state); }); @@ -3692,19 +3692,19 @@ void hp9845_base_state::hp9845_base(machine_config &config) // right-hand side and left-hand side drawers, respectively. // Here we do away with the distinction between LPU & PPU ROMs: in the end they // are visible to both CPUs at the same addresses. - HP9845_OPTROM(config, "drawer1", 0); - HP9845_OPTROM(config, "drawer2", 0); - HP9845_OPTROM(config, "drawer3", 0); - HP9845_OPTROM(config, "drawer4", 0); - HP9845_OPTROM(config, "drawer5", 0); - HP9845_OPTROM(config, "drawer6", 0); - HP9845_OPTROM(config, "drawer7", 0); - HP9845_OPTROM(config, "drawer8", 0); + HP9845_OPTROM(config, "drawer1"); + HP9845_OPTROM(config, "drawer2"); + HP9845_OPTROM(config, "drawer3"); + HP9845_OPTROM(config, "drawer4"); + HP9845_OPTROM(config, "drawer5"); + HP9845_OPTROM(config, "drawer6"); + HP9845_OPTROM(config, "drawer7"); + HP9845_OPTROM(config, "drawer8"); // I/O slots for (unsigned slot = 0; slot < 4; slot++) { auto& finder = m_io_slot[ slot ]; - hp9845_io_slot_device& tmp( HP9845_IO_SLOT(config , finder , 0) ); + hp9845_io_slot_device& tmp( HP9845_IO_SLOT(config , finder) ); tmp.irq().set([this , slot](int state) { set_irq_slot(slot , state); }); tmp.sts().set([this , slot](int state) { set_sts_slot(slot , state); }); tmp.flg().set([this , slot](int state) { set_flg_slot(slot , state); }); @@ -3718,7 +3718,7 @@ void hp9845_base_state::hp9845_base(machine_config &config) RAM(config, RAM_TAG).set_default_size("192K").set_extra_options("64K, 320K, 448K"); // Internal printer - hp9845_printer_device& prt{ HP9845_PRINTER(config , "printer" , 0) }; + hp9845_printer_device& prt{ HP9845_PRINTER(config , "printer") }; prt.irq().set(FUNC(hp9845_base_state::prt_irl_w)); prt.flg().set([this](int state) { m_io_sys->set_flg(PRINTER_PA , state); }); prt.sts().set([this](int state) { m_io_sys->set_sts(PRINTER_PA , state); }); diff --git a/src/mame/hp/hp9845_optrom.cpp b/src/mame/hp/hp9845_optrom.cpp index c33b8b8ab16..0851cfe7697 100644 --- a/src/mame/hp/hp9845_optrom.cpp +++ b/src/mame/hp/hp9845_optrom.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(HP9845_OPTROM, hp9845_optrom_device, "hp9845_optrom", "HP9845 // +--------------------+ // |hp9845_optrom_device| // +--------------------+ -hp9845_optrom_device::hp9845_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +hp9845_optrom_device::hp9845_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP9845_OPTROM, tag, owner, clock), device_rom_image_interface(mconfig, *this), m_base_addr(0), diff --git a/src/mame/hp/hp9845_optrom.h b/src/mame/hp/hp9845_optrom.h index 0f972da3427..07432852748 100644 --- a/src/mame/hp/hp9845_optrom.h +++ b/src/mame/hp/hp9845_optrom.h @@ -20,7 +20,7 @@ class hp9845_optrom_device : public device_t, { public: // construction/destruction - hp9845_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9845_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~hp9845_optrom_device(); protected: diff --git a/src/mame/hp/hp9845_printer.cpp b/src/mame/hp/hp9845_printer.cpp index 27cafb9df07..36003e63d60 100644 --- a/src/mame/hp/hp9845_printer.cpp +++ b/src/mame/hp/hp9845_printer.cpp @@ -116,7 +116,7 @@ constexpr unsigned USEC_1_STEP = 3456; // microseconds for 1 motor step // Device type definition DEFINE_DEVICE_TYPE(HP9845_PRINTER, hp9845_printer_device, "hp9845_prt", "HP9845 internal printer") -hp9845_printer_device::hp9845_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp9845_printer_device::hp9845_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP9845_PRINTER , tag , owner , clock), m_irl_handler(*this), m_flg_handler(*this), @@ -139,8 +139,8 @@ const tiny_rom_entry *hp9845_printer_device::device_rom_region() const void hp9845_printer_device::device_add_mconfig(machine_config &config) { - BITBANGER(config, m_prt_alpha_out, 0); - BITBANGER(config, m_prt_graph_out, 0); + BITBANGER(config, m_prt_alpha_out); + BITBANGER(config, m_prt_graph_out); } void hp9845_printer_device::device_start() diff --git a/src/mame/hp/hp9845_printer.h b/src/mame/hp/hp9845_printer.h index b3da40da833..bba3a5177d1 100644 --- a/src/mame/hp/hp9845_printer.h +++ b/src/mame/hp/hp9845_printer.h @@ -19,7 +19,7 @@ class hp9845_printer_device : public device_t { public: // construction/destruction - hp9845_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp9845_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto irq() { return m_irl_handler.bind(); } diff --git a/src/mame/hp/hp98x5_io_sys.cpp b/src/mame/hp/hp98x5_io_sys.cpp index f403117f172..2f5fc6bede5 100644 --- a/src/mame/hp/hp98x5_io_sys.cpp +++ b/src/mame/hp/hp98x5_io_sys.cpp @@ -33,7 +33,7 @@ namespace { // Device type definition DEFINE_DEVICE_TYPE(HP98X5_IO_SYS, hp98x5_io_sys_device, "hp98x5_io_sys", "HP98x5 I/O sub-system") -hp98x5_io_sys_device::hp98x5_io_sys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp98x5_io_sys_device::hp98x5_io_sys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP98X5_IO_SYS , tag , owner , clock) , m_irl_handler(*this) , m_irh_handler(*this) diff --git a/src/mame/hp/hp98x5_io_sys.h b/src/mame/hp/hp98x5_io_sys.h index e83f6432b24..95d64bcf77b 100644 --- a/src/mame/hp/hp98x5_io_sys.h +++ b/src/mame/hp/hp98x5_io_sys.h @@ -17,7 +17,7 @@ class hp98x5_io_sys_device : public device_t { public: // construction/destruction - hp98x5_io_sys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp98x5_io_sys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/mame/hp/hp9k_3xx.cpp b/src/mame/hp/hp9k_3xx.cpp index 4c5222cbb03..823b6dff275 100644 --- a/src/mame/hp/hp9k_3xx.cpp +++ b/src/mame/hp/hp9k_3xx.cpp @@ -265,7 +265,7 @@ void hp9k3xx_state::led_w(offs_t offset, uint16_t data, uint16_t mem_mask) void hp9k3xx_state::add_dio16_bus(machine_config &config) { - bus::hp_dio::dio16_device &dio16(DIO16(config, "diobus", 0)); + bus::hp_dio::dio16_device &dio16(DIO16(config, "diobus")); dio16.set_program_space(m_maincpu, AS_PROGRAM); dio16.irq1_out_cb().set(FUNC(hp9k3xx_state::dio_irq1_w)); @@ -279,7 +279,7 @@ void hp9k3xx_state::add_dio16_bus(machine_config &config) void hp9k3xx_state::add_dio32_bus(machine_config &config) { - bus::hp_dio::dio32_device &dio32(DIO32(config, "diobus", 0)); + bus::hp_dio::dio32_device &dio32(DIO32(config, "diobus")); dio32.set_program_space(m_maincpu, AS_PROGRAM); dio32.irq1_out_cb().set(FUNC(hp9k3xx_state::dio_irq1_w)); @@ -333,8 +333,8 @@ void hp9k3xx_state::buserror_w(offs_t offset, uint32_t data, uint32_t mem_mask) void hp9k3xx_state::hp9k300(machine_config &config) { - ptm6840_device &ptm(PTM6840(config, PTM6840_TAG, 250000)); // from oscillator module next to the 6840 - ptm.set_external_clocks(250000.0f, 0.0f, 250000.0f); + ptm6840_device &ptm(PTM6840(config, PTM6840_TAG, XTAL::u(250000))); // from oscillator module next to the 6840 + ptm.set_external_clocks(XTAL::u(250000), XTAL(), XTAL::u(250000)); ptm.o3_callback().set(PTM6840_TAG, FUNC(ptm6840_device::set_c2)); ptm.irq_callback().set_inputline("maincpu", M68K_IRQ_6); @@ -348,71 +348,71 @@ void hp9k3xx_state::hp9k310(machine_config &config) { hp9k300(config); - M68010(config, m_maincpu, 10000000); + M68010(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k310_map); add_dio16_bus(config); - DIO16_SLOT(config, "sl0", 0, "diobus", dio16_cards, "human_interface", true); - DIO16_SLOT(config, "sl1", 0, "diobus", dio16_cards, "98544", false); - DIO16_SLOT(config, "sl2", 0, "diobus", dio16_cards, "98603b", false); - DIO32_SLOT(config, "sl3", 0, "diobus", dio32_cards, "98643", false); - DIO16_SLOT(config, "sl4", 0, "diobus", dio16_cards, "98644", false); - DIO16_SLOT(config, "sl5", 0, "diobus", dio16_cards, nullptr, false); + DIO16_SLOT(config, "sl0", "diobus", dio16_cards, "human_interface", true); + DIO16_SLOT(config, "sl1", "diobus", dio16_cards, "98544", false); + DIO16_SLOT(config, "sl2", "diobus", dio16_cards, "98603b", false); + DIO32_SLOT(config, "sl3", "diobus", dio32_cards, "98643", false); + DIO16_SLOT(config, "sl4", "diobus", dio16_cards, "98644", false); + DIO16_SLOT(config, "sl5", "diobus", dio16_cards, nullptr, false); } void hp9k3xx_state::hp9k320(machine_config &config) { - M68020FPU(config, m_maincpu, 16670000); + M68020FPU(config, m_maincpu, XTAL::u(16670000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k320_map); hp9k300(config); add_dio32_bus(config); - DIO32_SLOT(config, "sl0", 0, "diobus", dio32_cards, "human_interface", true); - DIO32_SLOT(config, "sl1", 0, "diobus", dio32_cards, "98543", false); - DIO32_SLOT(config, "sl2", 0, "diobus", dio32_cards, "98603b", false); - DIO32_SLOT(config, "sl3", 0, "diobus", dio32_cards, "98644", false); - DIO32_SLOT(config, "sl4", 0, "diobus", dio32_cards, "98620", false); - DIO32_SLOT(config, "sl5", 0, "diobus", dio32_cards, "98265a", false); - DIO32_SLOT(config, "sl7", 0, "diobus", dio32_cards, nullptr, false); + DIO32_SLOT(config, "sl0", "diobus", dio32_cards, "human_interface", true); + DIO32_SLOT(config, "sl1", "diobus", dio32_cards, "98543", false); + DIO32_SLOT(config, "sl2", "diobus", dio32_cards, "98603b", false); + DIO32_SLOT(config, "sl3", "diobus", dio32_cards, "98644", false); + DIO32_SLOT(config, "sl4", "diobus", dio32_cards, "98620", false); + DIO32_SLOT(config, "sl5", "diobus", dio32_cards, "98265a", false); + DIO32_SLOT(config, "sl7", "diobus", dio32_cards, nullptr, false); } void hp9k3xx_state::hp9k330(machine_config &config) { - M68020PMMU(config, m_maincpu, 16670000); + M68020PMMU(config, m_maincpu, XTAL::u(16670000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k330_map); hp9k300(config); add_dio32_bus(config); - DIO32_SLOT(config, "sl0", 0, "diobus", dio16_cards, "human_interface", true); - DIO32_SLOT(config, "sl1", 0, "diobus", dio16_cards, "98544", false); - DIO32_SLOT(config, "sl2", 0, "diobus", dio16_cards, "98603b", false); - DIO32_SLOT(config, "sl3", 0, "diobus", dio16_cards, "98644", false); - DIO32_SLOT(config, "sl4", 0, "diobus", dio16_cards, nullptr, false); + DIO32_SLOT(config, "sl0", "diobus", dio16_cards, "human_interface", true); + DIO32_SLOT(config, "sl1", "diobus", dio16_cards, "98544", false); + DIO32_SLOT(config, "sl2", "diobus", dio16_cards, "98603b", false); + DIO32_SLOT(config, "sl3", "diobus", dio16_cards, "98644", false); + DIO32_SLOT(config, "sl4", "diobus", dio16_cards, nullptr, false); } void hp9k3xx_state::hp9k332(machine_config &config) { - M68020PMMU(config, m_maincpu, 16670000); + M68020PMMU(config, m_maincpu, XTAL::u(16670000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k332_map); hp9k300(config); add_dio16_bus(config); - DIO16_SLOT(config, "sl0", 0, "diobus", dio16_cards, "human_interface", true); - DIO16_SLOT(config, "sl1", 0, "diobus", dio16_cards, "98603b", false); - DIO16_SLOT(config, "sl2", 0, "diobus", dio16_cards, "98644", false); - DIO16_SLOT(config, "sl3", 0, "diobus", dio16_cards, "98543", false); - DIO16_SLOT(config, "sl4", 0, "diobus", dio16_cards, nullptr, false); + DIO16_SLOT(config, "sl0", "diobus", dio16_cards, "human_interface", true); + DIO16_SLOT(config, "sl1", "diobus", dio16_cards, "98603b", false); + DIO16_SLOT(config, "sl2", "diobus", dio16_cards, "98644", false); + DIO16_SLOT(config, "sl3", "diobus", dio16_cards, "98543", false); + DIO16_SLOT(config, "sl4", "diobus", dio16_cards, nullptr, false); } void hp9k3xx_state::hp9k340(machine_config &config) { hp9k320(config); - M68030(config.replace(), m_maincpu, 16670000); + M68030(config.replace(), m_maincpu, XTAL::u(16670000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k330_map); } @@ -420,17 +420,17 @@ void hp9k3xx_state::hp9k360(machine_config &config) { hp9k300(config); - M68030(config, m_maincpu, 25000000); + M68030(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k360_map); add_dio32_bus(config); - DIO32_SLOT(config, "sl0", 0, "diobus", dio32_cards, "human_interface", true); - DIO32_SLOT(config, "sl1", 0, "diobus", dio32_cards, "98550", false); - DIO32_SLOT(config, "sl2", 0, "diobus", dio32_cards, "98644", false); - DIO32_SLOT(config, "sl3", 0, "diobus", dio32_cards, "98620", false); - DIO32_SLOT(config, "sl4", 0, "diobus", dio32_cards, "98265a", false); - DIO32_SLOT(config, "sl5", 0, "diobus", dio32_cards, nullptr, false); + DIO32_SLOT(config, "sl0", "diobus", dio32_cards, "human_interface", true); + DIO32_SLOT(config, "sl1", "diobus", dio32_cards, "98550", false); + DIO32_SLOT(config, "sl2", "diobus", dio32_cards, "98644", false); + DIO32_SLOT(config, "sl3", "diobus", dio32_cards, "98620", false); + DIO32_SLOT(config, "sl4", "diobus", dio32_cards, "98265a", false); + DIO32_SLOT(config, "sl5", "diobus", dio32_cards, nullptr, false); } @@ -438,7 +438,7 @@ void hp9k3xx_state::hp9k370(machine_config &config) { hp9k360(config); - M68030(config.replace(), m_maincpu, 33000000); + M68030(config.replace(), m_maincpu, XTAL::u(33000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k370_map); } @@ -446,7 +446,7 @@ void hp9k3xx_state::hp9k380(machine_config &config) { hp9k360(config); - M68040(config.replace(), m_maincpu, 25000000); + M68040(config.replace(), m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k380_map); } @@ -454,7 +454,7 @@ void hp9k3xx_state::hp9k382(machine_config &config) { hp9k360(config); - M68040(config.replace(), m_maincpu, 25000000); + M68040(config.replace(), m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hp9k3xx_state::hp9k382_map); } diff --git a/src/mame/hp/hp_ipc.cpp b/src/mame/hp/hp_ipc.cpp index 962a88591f9..6edf6e9f3dd 100644 --- a/src/mame/hp/hp_ipc.cpp +++ b/src/mame/hp/hp_ipc.cpp @@ -842,7 +842,7 @@ void hp_ipc_state::hp_ipc_base(machine_config &config) // Beeper COP452(config , m_spkr , 2_MHz_XTAL); SPEAKER(config, "mono").front_center(); - DAC_1BIT(config, m_dac , 0).add_route(ALL_OUTPUTS, "mono", 0.5, AUTO_ALLOC_INPUT, 0); + DAC_1BIT(config, m_dac ).add_route(ALL_OUTPUTS, "mono", 0.5, AUTO_ALLOC_INPUT, 0); m_spkr->oa_w().set(m_dac , FUNC(dac_1bit_device::write)); // IO slots diff --git a/src/mame/hp/hp_ipc_optrom.cpp b/src/mame/hp/hp_ipc_optrom.cpp index 045b420b6ef..3346c47828f 100644 --- a/src/mame/hp/hp_ipc_optrom.cpp +++ b/src/mame/hp/hp_ipc_optrom.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(HP_IPC_OPTROM, hp_ipc_optrom_device, "hp_ipc_optrom", "HP IPC // +--------------------+ // |hp_ipc_optrom_device| // +--------------------+ -hp_ipc_optrom_device::hp_ipc_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_ipc_optrom_device::hp_ipc_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HP_IPC_OPTROM, tag, owner, clock) , device_rom_image_interface(mconfig, *this) , m_base(0) diff --git a/src/mame/hp/hp_ipc_optrom.h b/src/mame/hp/hp_ipc_optrom.h index bf7d62e6920..d0f22bffb47 100644 --- a/src/mame/hp/hp_ipc_optrom.h +++ b/src/mame/hp/hp_ipc_optrom.h @@ -20,12 +20,7 @@ class hp_ipc_optrom_device : public device_t, { public: // construction/destruction - hp_ipc_optrom_device(machine_config const &mconfig, char const *tag, device_t *owner) - : hp_ipc_optrom_device(mconfig, tag, owner, (uint32_t)0) - { - } - - hp_ipc_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_ipc_optrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~hp_ipc_optrom_device(); void install_read_handler(address_space& space); diff --git a/src/mame/hp/hpz80unk.cpp b/src/mame/hp/hpz80unk.cpp index 4147444ed03..e78839e9e2b 100644 --- a/src/mame/hp/hpz80unk.cpp +++ b/src/mame/hp/hpz80unk.cpp @@ -194,7 +194,7 @@ void hpz80unk_state::hpz80unk(machine_config &config) m_uart[2]->set_auto_rdav(true); RS232_PORT(config, "rs232c", default_rs232_devices, nullptr); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set(m_uart[0], FUNC(ay51013_device::write_tcp)); uart_clock.signal_handler().append(m_uart[0], FUNC(ay51013_device::write_rcp)); uart_clock.signal_handler().append(m_uart[1], FUNC(ay51013_device::write_tcp)); diff --git a/src/mame/hp/jornada.cpp b/src/mame/hp/jornada.cpp index 9201a4d2b2f..137c31739a2 100644 --- a/src/mame/hp/jornada.cpp +++ b/src/mame/hp/jornada.cpp @@ -103,7 +103,7 @@ protected: virtual void machine_reset() override; virtual void device_reset_after_children() override; - static constexpr uint32_t SA1110_CLOCK = 206000000; + static constexpr XTAL SA1110_CLOCK = XTAL::u(206000000); void main_map(address_map &map); diff --git a/src/mame/husky/hunter2.cpp b/src/mame/husky/hunter2.cpp index 41bd0941666..7a9a65b39c9 100644 --- a/src/mame/husky/hunter2.cpp +++ b/src/mame/husky/hunter2.cpp @@ -440,7 +440,7 @@ void hunter2_state::hunter2(machine_config &config) rtc.set_mode24(0); // 12 hour rtc.set_day1(1); // monday - nsc810_device &iotimer(NSC810(config, "iotimer", 0, 8_MHz_XTAL / 2, 8_MHz_XTAL / 2)); + nsc810_device &iotimer(NSC810(config, "iotimer", 8_MHz_XTAL / 2, 8_MHz_XTAL / 2)); iotimer.portA_read_callback().set(FUNC(hunter2_state::keyboard_r)); iotimer.portB_read_callback().set(FUNC(hunter2_state::portb_r)); iotimer.portB_write_callback().set(FUNC(hunter2_state::keyboard_w)); diff --git a/src/mame/husky/husky.cpp b/src/mame/husky/husky.cpp index 84084b366cb..b5210c355af 100644 --- a/src/mame/husky/husky.cpp +++ b/src/mame/husky/husky.cpp @@ -473,7 +473,7 @@ void husky_state::husky(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 3200).add_route(ALL_OUTPUTS, "mono", 1.0); // TODO: unknown frequency + BEEP(config, m_beeper, XTAL::u(3200)).add_route(ALL_OUTPUTS, "mono", 1.0); // TODO: unknown frequency /* internal ram */ RAM(config, m_ram).set_default_size("48K").set_extra_options("16K,32K,64K,80K,96K,112K,128K,144K"); @@ -484,7 +484,7 @@ void husky_state::husky(machine_config &config) rtc.set_mode24(1); // 24 hour rtc.set_day1(1); // monday - nsc810_device &iotimer(NSC810(config, "iotimer", 0, 2_MHz_XTAL / 2, 2_MHz_XTAL / 2)); + nsc810_device &iotimer(NSC810(config, "iotimer", 2_MHz_XTAL / 2, 2_MHz_XTAL / 2)); iotimer.portA_read_callback().set(FUNC(husky_state::porta_r)); iotimer.portA_write_callback().set(FUNC(husky_state::porta_w)); iotimer.portB_read_callback().set(FUNC(husky_state::portb_r)); diff --git a/src/mame/ibm/ibm6580.cpp b/src/mame/ibm/ibm6580.cpp index 9147bb4239f..03b70a83378 100644 --- a/src/mame/ibm/ibm6580.cpp +++ b/src/mame/ibm/ibm6580.cpp @@ -903,7 +903,7 @@ void ibm6580_state::machine_start() { m_maincpu->space(AS_PROGRAM).install_ram(0, m_ram->size() - 1, m_ram->pointer()); - m_fdc->set_rate(500000); // FIXME: workaround + m_fdc->set_rate(XTAL::u(500000)); // FIXME: workaround m_floppy[0].image = m_fdc->subdevice("0")->get_device(); m_floppy[1].image = m_fdc->subdevice("1")->get_device(); @@ -960,7 +960,7 @@ void ibm6580_state::ibm6580(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_HIGHLIGHT); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); I8255(config, m_ppi8255); @@ -970,10 +970,10 @@ void ibm6580_state::ibm6580(machine_config &config) m_ppi8255->tri_pa_callback().set_constant(0); m_ppi8255->tri_pc_callback().set_constant(0); - PIT8253(config, m_pit8253, 0); + PIT8253(config, m_pit8253); m_pit8253->out_handler<0>().set([this] (int state) { m_p40 = (m_p40 & ~1) | state; }); - DW_KEYBOARD(config, m_kbd, 0); + DW_KEYBOARD(config, m_kbd); m_kbd->out_data_handler().set(FUNC(ibm6580_state::kb_data_w)); m_kbd->out_clock_handler().set(FUNC(ibm6580_state::kb_clock_w)); m_kbd->out_strobe_handler().set(FUNC(ibm6580_state::kb_strobe_w)); @@ -986,7 +986,7 @@ void ibm6580_state::ibm6580(machine_config &config) m_dma8257->in_ior_cb<0>().set(m_fdc, FUNC(upd765a_device::dma_r)); m_dma8257->out_iow_cb<0>().set(m_fdc, FUNC(upd765a_device::dma_w)); - i8251_device &upd8251a(I8251(config, "upd8251a", 0)); + i8251_device &upd8251a(I8251(config, "upd8251a")); upd8251a.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); upd8251a.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr)); upd8251a.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -998,7 +998,7 @@ void ibm6580_state::ibm6580(machine_config &config) rs232a.dsr_handler().set("upd8251a", FUNC(i8251_device::write_dsr)); rs232a.cts_handler().set("upd8251a", FUNC(i8251_device::write_cts)); - i8251_device &upd8251b(I8251(config, "upd8251b", 0)); + i8251_device &upd8251b(I8251(config, "upd8251b")); upd8251b.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); upd8251b.dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr)); upd8251b.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/ibm/ibm6580_fdc.cpp b/src/mame/ibm/ibm6580_fdc.cpp index 0cc35e56532..5aa50e22a33 100644 --- a/src/mame/ibm/ibm6580_fdc.cpp +++ b/src/mame/ibm/ibm6580_fdc.cpp @@ -37,7 +37,7 @@ void dw_fdc_device::device_add_mconfig(machine_config &config) // m_mcu->t0_in_cb().set(FUNC(dw_fdc_device::t0_r)); m_mcu->t1_in_cb().set(FUNC(dw_fdc_device::t1_r)); - I8255(config, "ppi8255", 0); + I8255(config, "ppi8255"); UPD765A(config, "upd765", 24_MHz_XTAL / 3, false, false); // m_upd_fdc->intrq_wr_callback().set("pic8259", FUNC(pic8259_device::ir4_w)); @@ -47,7 +47,7 @@ void dw_fdc_device::device_add_mconfig(machine_config &config) } -dw_fdc_device::dw_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dw_fdc_device::dw_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DW_FDC, tag, owner, clock) , m_out_data(*this) , m_out_clock(*this) diff --git a/src/mame/ibm/ibm6580_fdc.h b/src/mame/ibm/ibm6580_fdc.h index 64dcb85ffa7..d2da73724e4 100644 --- a/src/mame/ibm/ibm6580_fdc.h +++ b/src/mame/ibm/ibm6580_fdc.h @@ -13,7 +13,7 @@ class dw_fdc_device : public device_t { public: - dw_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dw_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_data_handler() { return m_out_data.bind(); } auto out_clock_handler() { return m_out_clock.bind(); } diff --git a/src/mame/ibm/ibm6580_kbd.cpp b/src/mame/ibm/ibm6580_kbd.cpp index b08095e4a9a..c6e96581884 100644 --- a/src/mame/ibm/ibm6580_kbd.cpp +++ b/src/mame/ibm/ibm6580_kbd.cpp @@ -180,7 +180,7 @@ ioport_constructor dw_keyboard_device::device_input_ports() const return INPUT_PORTS_NAME(dw_keyboard); } -dw_keyboard_device::dw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dw_keyboard_device::dw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DW_KEYBOARD, tag, owner, clock) , m_kbd(*this, "COL.%u", 0) , m_mr(*this, "MR") diff --git a/src/mame/ibm/ibm6580_kbd.h b/src/mame/ibm/ibm6580_kbd.h index 8de7a2f358c..5ffa4b327f9 100644 --- a/src/mame/ibm/ibm6580_kbd.h +++ b/src/mame/ibm/ibm6580_kbd.h @@ -10,7 +10,7 @@ class dw_keyboard_device : public device_t { public: - dw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dw_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_data_handler() { return m_out_data.bind(); } auto out_clock_handler() { return m_out_clock.bind(); } diff --git a/src/mame/ibm/rosetta.cpp b/src/mame/ibm/rosetta.cpp index 29972776c52..961859a3d7e 100644 --- a/src/mame/ibm/rosetta.cpp +++ b/src/mame/ibm/rosetta.cpp @@ -175,7 +175,7 @@ DEFINE_DEVICE_TYPE(ROSETTA, rosetta_device, "rosetta", "IBM Rosetta") ALLOW_SAVE_TYPE(rosetta_device::mear_state) -rosetta_device::rosetta_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, ram_size ram) +rosetta_device::rosetta_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, ram_size ram) : device_t(mconfig, ROSETTA, tag, owner, clock) , rsc_cpu_interface(mconfig, *this) , m_mem_space(*this, finder_base::DUMMY_TAG, -1, 32) diff --git a/src/mame/ibm/rosetta.h b/src/mame/ibm/rosetta.h index a97036a01fc..14747b40f5e 100644 --- a/src/mame/ibm/rosetta.h +++ b/src/mame/ibm/rosetta.h @@ -24,7 +24,7 @@ public: RAM_16M = 0x0040'0000, }; - rosetta_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, ram_size ram = RAM_NONE); + rosetta_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, ram_size ram = RAM_NONE); template void set_mem(T &&tag, int spacenum) { m_mem_space.set_tag(std::forward(tag), spacenum); } template void set_rom(T &&tag) { m_rom.set_tag(std::forward(tag)); } diff --git a/src/mame/ibm/rs6000_type7xxx.cpp b/src/mame/ibm/rs6000_type7xxx.cpp index ba8aaa9aeb9..c33c44f28c8 100755 --- a/src/mame/ibm/rs6000_type7xxx.cpp +++ b/src/mame/ibm/rs6000_type7xxx.cpp @@ -56,7 +56,7 @@ void type7xxx_state::type7009_map(address_map &map) void type7xxx_state::type7009(machine_config &config) { - PPC601(config, m_maincpu, 80000000); + PPC601(config, m_maincpu, XTAL::u(80000000)); m_maincpu->set_addrmap(AS_PROGRAM, &type7xxx_state::type7009_map); } diff --git a/src/mame/ibm/rtpc.cpp b/src/mame/ibm/rtpc.cpp index bb40b4e8e6d..773837bc61f 100644 --- a/src/mame/ibm/rtpc.cpp +++ b/src/mame/ibm/rtpc.cpp @@ -248,7 +248,7 @@ template void rtpc_state::iocc_pio_map(address_map &map) } // delay 1µs per byte written - map(0x00'80e0, 0x00'80e3).lw8([this](u8 data) { m_cpu->eat_cycles(m_cpu->clock() / 1000000 + 1); }, "io_delay"); + map(0x00'80e0, 0x00'80e3).lw8([this](u8 data) { m_cpu->eat_cycles(m_cpu->clock().value() / 1000000 + 1); }, "io_delay"); map(0x00'8400, 0x00'8403).mirror(0x7c).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x00'8400, 0x00'8401).mirror(0x78).w(FUNC(rtpc_state::kls_cmd_w)); @@ -466,7 +466,7 @@ void rtpc_state::dia_w(u8 data) void rtpc_state::common(machine_config &config) { - ROMP(config, m_cpu, 23'529'400 / 4); + ROMP(config, m_cpu, XTAL(23'529'400) / 4); m_cpu->set_mmu(m_mmu); m_cpu->set_iou(m_iocc); @@ -515,14 +515,14 @@ void rtpc_state::common(machine_config &config) TIMER(config, "mcu_timer").configure_periodic(FUNC(rtpc_state::mcu_timer), attotime::from_hz(32768)); - RTPC_IOCC(config, m_iocc, 0); + RTPC_IOCC(config, m_iocc); m_iocc->set_addrmap(0, &rtpc_state::iocc_mem_map); m_iocc->out_int().set(reqi2, FUNC(input_merger_device::in_w<1>)); m_iocc->out_rst().set_inputline(m_dma[0], INPUT_LINE_RESET); m_iocc->out_rst().append_inputline(m_dma[1], INPUT_LINE_RESET); // ISA bus - ISA16(config, m_isa, 14'318'180 / 3); + ISA16(config, m_isa, XTAL::u(14'318'180) / 3); m_isa->set_memspace(m_iocc, AS_PROGRAM); m_isa->set_iospace(m_iocc, AS_IO); //m_isa->iochck_callback().set(FUNC(at_mb_device::iochck_w)); @@ -702,8 +702,8 @@ void rtpc_state::ibm6150(machine_config &config) common(config); m_iocc->set_addrmap(2, &rtpc_state::iocc_pio_map); - SCC8530N(config, m_scc, 3'580'000); - m_scc->configure_channels(3'072'000, 3'072'000, 3'072'000, 3'072'000); + SCC8530N(config, m_scc, XTAL::u(3'580'000)); + m_scc->configure_channels(XTAL::u(3'072'000), XTAL::u(3'072'000), XTAL::u(3'072'000), XTAL::u(3'072'000)); m_scc->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir6_w)); // port: TXD, DTR, RTS, RI, RXD, DSR, CTS, DCD @@ -727,14 +727,14 @@ void rtpc_state::ibm6150(machine_config &config) m_scc->out_txdb_callback().set(port1, FUNC(rs232_port_device::write_txd)); // ISA slots - ISA16_SLOT(config, "isa1", 0, m_isa, rtpc_isa16_cards, "fdc", false); // slot 1: disk/diskette adapter - ISA16_SLOT(config, "isa2", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 2: option - ISA8_SLOT(config, "isa3", 0, m_isa, rtpc_isa8_cards, "mda", false); // slot 3: option - ISA16_SLOT(config, "isa4", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 4: option - ISA16_SLOT(config, "isa5", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 5: option - ISA8_SLOT(config, "isa6", 0, m_isa, rtpc_isa8_cards, nullptr, false); // slot 6: option - ISA16_SLOT(config, "isa7", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 7: option - ISA16_SLOT(config, "isa8", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 8: coprocessor/option + ISA16_SLOT(config, "isa1", m_isa, rtpc_isa16_cards, "fdc", false); // slot 1: disk/diskette adapter + ISA16_SLOT(config, "isa2", m_isa, rtpc_isa16_cards, nullptr, false); // slot 2: option + ISA8_SLOT(config, "isa3", m_isa, rtpc_isa8_cards, "mda", false); // slot 3: option + ISA16_SLOT(config, "isa4", m_isa, rtpc_isa16_cards, nullptr, false); // slot 4: option + ISA16_SLOT(config, "isa5", m_isa, rtpc_isa16_cards, nullptr, false); // slot 5: option + ISA8_SLOT(config, "isa6", m_isa, rtpc_isa8_cards, nullptr, false); // slot 6: option + ISA16_SLOT(config, "isa7", m_isa, rtpc_isa16_cards, nullptr, false); // slot 7: option + ISA16_SLOT(config, "isa8", m_isa, rtpc_isa16_cards, nullptr, false); // slot 8: coprocessor/option } void rtpc_state::ibm6151(machine_config &config) @@ -743,12 +743,12 @@ void rtpc_state::ibm6151(machine_config &config) m_iocc->set_addrmap(2, &rtpc_state::iocc_pio_map); // ISA slots - ISA8_SLOT(config, "isa1", 0, m_isa, rtpc_isa8_cards, "mda", false); // slot 1: option - ISA16_SLOT(config, "isa2", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 2: option - ISA16_SLOT(config, "isa3", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 2: option - ISA16_SLOT(config, "isa4", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 4: option - ISA16_SLOT(config, "isa5", 0, m_isa, rtpc_isa16_cards, nullptr, false); // slot 5: coprocessor/option - ISA16_SLOT(config, "isa6", 0, m_isa, rtpc_isa16_cards, "fdc", false); // slot 6: disk/diskette adapter + ISA8_SLOT(config, "isa1", m_isa, rtpc_isa8_cards, "mda", false); // slot 1: option + ISA16_SLOT(config, "isa2", m_isa, rtpc_isa16_cards, nullptr, false); // slot 2: option + ISA16_SLOT(config, "isa3", m_isa, rtpc_isa16_cards, nullptr, false); // slot 2: option + ISA16_SLOT(config, "isa4", m_isa, rtpc_isa16_cards, nullptr, false); // slot 4: option + ISA16_SLOT(config, "isa5", m_isa, rtpc_isa16_cards, nullptr, false); // slot 5: coprocessor/option + ISA16_SLOT(config, "isa6", m_isa, rtpc_isa16_cards, "fdc", false); // slot 6: disk/diskette adapter } ROM_START(ibm6150) diff --git a/src/mame/ibm/rtpc_iocc.cpp b/src/mame/ibm/rtpc_iocc.cpp index aa98670da98..566be5b5e4b 100644 --- a/src/mame/ibm/rtpc_iocc.cpp +++ b/src/mame/ibm/rtpc_iocc.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(RTPC_IOCC, rtpc_iocc_device, "rtpc_iocc", "RT PC I/O Channel Converter/Controller") -rtpc_iocc_device::rtpc_iocc_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +rtpc_iocc_device::rtpc_iocc_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTPC_IOCC, tag, owner, clock) , device_memory_interface(mconfig, *this) , rsc_bus_interface(mconfig, *this) diff --git a/src/mame/ibm/rtpc_iocc.h b/src/mame/ibm/rtpc_iocc.h index bf4d925a61e..2e5a6d896d5 100644 --- a/src/mame/ibm/rtpc_iocc.h +++ b/src/mame/ibm/rtpc_iocc.h @@ -14,7 +14,7 @@ class rtpc_iocc_device , public rsc_bus_interface { public: - rtpc_iocc_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + rtpc_iocc_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); auto out_int() { return m_out_int.bind(); } auto out_rst() { return m_out_rst.bind(); } diff --git a/src/mame/ice/frenzyxprss.cpp b/src/mame/ice/frenzyxprss.cpp index 15b7949f788..d115b2c49c3 100644 --- a/src/mame/ice/frenzyxprss.cpp +++ b/src/mame/ice/frenzyxprss.cpp @@ -86,7 +86,7 @@ void frenzyxprss_state::machine_reset() void frenzyxprss_state::frenzyxprss(machine_config &config) { // Basic machine hardware - PENTIUM3(config, m_maincpu, 100000000); // Intel Celeron SL5ZF 1GHz + PENTIUM3(config, m_maincpu, XTAL::u(100000000)); // Intel Celeron SL5ZF 1GHz m_maincpu->set_addrmap(AS_PROGRAM, &frenzyxprss_state::frenzyxprss_map); // Video hardware diff --git a/src/mame/ice/ice_bozopail.cpp b/src/mame/ice/ice_bozopail.cpp index d9ba63da518..3687a6cf8cb 100644 --- a/src/mame/ice/ice_bozopail.cpp +++ b/src/mame/ice/ice_bozopail.cpp @@ -61,7 +61,7 @@ void ice_bozopail_state::machine_reset() void ice_bozopail_state::ice_bozo(machine_config &config) { /* basic machine hardware */ - MC68HC11A1(config, m_maincpu, 8000000); // unknown clock + MC68HC11A1(config, m_maincpu, XTAL::u(8000000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &ice_bozopail_state::ice_bozo_map); /* sound hardware */ diff --git a/src/mame/ice/ice_tbd.cpp b/src/mame/ice/ice_tbd.cpp index 33922745ace..5a6504fc128 100644 --- a/src/mame/ice/ice_tbd.cpp +++ b/src/mame/ice/ice_tbd.cpp @@ -69,7 +69,7 @@ void ice_tbd_state::machine_reset() void ice_tbd_state::ice_tbd(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 8000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(8000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &ice_tbd_state::ice_tbd_map); m_maincpu->set_addrmap(AS_IO, &ice_tbd_state::ice_tbd_io_map); diff --git a/src/mame/ice/vp101.cpp b/src/mame/ice/vp101.cpp index 8a88b3a9431..9ed76c3fada 100644 --- a/src/mame/ice/vp101.cpp +++ b/src/mame/ice/vp101.cpp @@ -552,7 +552,7 @@ INPUT_PORTS_END void vp10x_state::vp101(machine_config &config) { - VR5500LE(config, m_maincpu, 400000000); + VR5500LE(config, m_maincpu, XTAL::u(400000000)); m_maincpu->set_dcache_size(32768); m_maincpu->set_system_clock(100000000); m_maincpu->set_addrmap(AS_PROGRAM, &vp10x_state::main_map); @@ -572,7 +572,7 @@ void vp10x_state::vp101(machine_config &config) void vp10x_state::vp50(machine_config &config) { - TX4925LE(config, m_maincpu, 200000000); + TX4925LE(config, m_maincpu, XTAL::u(200000000)); m_maincpu->set_dcache_size(32768); m_maincpu->set_system_clock(100000000); m_maincpu->set_addrmap(AS_PROGRAM, &vp10x_state::vp50_map); diff --git a/src/mame/igs/dunhuang.cpp b/src/mame/igs/dunhuang.cpp index 744efc8e469..5aefa662efe 100644 --- a/src/mame/igs/dunhuang.cpp +++ b/src/mame/igs/dunhuang.cpp @@ -808,7 +808,7 @@ void dunhuang_state::machine_reset() void dunhuang_state::dunhuang(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 12000000/2); + Z80(config, m_maincpu, XTAL::u(12000000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &dunhuang_state::dunhuang_map); m_maincpu->set_addrmap(AS_IO, &dunhuang_state::dunhuang_io_map); m_maincpu->set_vblank_int("screen", FUNC(dunhuang_state::irq0_line_hold)); @@ -827,20 +827,20 @@ void dunhuang_state::dunhuang(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_dunhuang); PALETTE(config, m_palette).set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &dunhuang_state::ramdac_map); /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ymsnd", 3579545).add_route(ALL_OUTPUTS, "mono", 0.80); + YM2413(config, "ymsnd", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 0.80); - ay8910_device &ay8910(AY8910(config, "ay8910", 12000000/8)); + ay8910_device &ay8910(AY8910(config, "ay8910", XTAL::u(12000000)/8)); ay8910.port_b_read_callback().set(FUNC(dunhuang_state::dsw_r)); ay8910.port_a_write_callback().set(FUNC(dunhuang_state::input_w)); ay8910.add_route(ALL_OUTPUTS, "mono", 0.30); - OKIM6295(config, "oki", 12000000/8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.80); + OKIM6295(config, "oki", XTAL::u(12000000)/8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.80); } diff --git a/src/mame/igs/funtech.cpp b/src/mame/igs/funtech.cpp index f92e74bae27..957a8549c69 100644 --- a/src/mame/igs/funtech.cpp +++ b/src/mame/igs/funtech.cpp @@ -443,7 +443,7 @@ void fun_tech_corp_state::machine_start() void fun_tech_corp_state::funtech(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &fun_tech_corp_state::funtech_map); m_maincpu->set_addrmap(AS_IO, &fun_tech_corp_state::funtech_io_map); m_maincpu->set_vblank_int("screen", FUNC(fun_tech_corp_state::vblank_interrupt)); @@ -467,7 +467,7 @@ void fun_tech_corp_state::funtech(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1500000)); /* M5255, ? MHz */ + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1500000))); /* M5255, ? MHz */ aysnd.port_a_read_callback().set_ioport("DSW1"); aysnd.port_b_read_callback().set_ioport("DSW2"); aysnd.add_route(ALL_OUTPUTS, "mono", 1.00); diff --git a/src/mame/igs/goldstar.cpp b/src/mame/igs/goldstar.cpp index 4df2e9e6291..513b869cf47 100644 --- a/src/mame/igs/goldstar.cpp +++ b/src/mame/igs/goldstar.cpp @@ -255,7 +255,7 @@ constexpr XTAL MASTER_CLOCK = 12_MHz_XTAL; constexpr XTAL CPU_CLOCK = MASTER_CLOCK / 4; constexpr XTAL PSG_CLOCK = MASTER_CLOCK / 4; constexpr XTAL AY_CLOCK = MASTER_CLOCK / 8; -#define OKI_CLOCK 1056000 /* unverified resonator */ +#define OKI_CLOCK XTAL::u(1056000) /* unverified resonator */ } @@ -8738,7 +8738,7 @@ void sanghopm_state::star100(machine_config &config) screen.screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); PALETTE(config, m_palette).set_entries(0x100); - RAMDAC(config, "ramdac", 0, "palette").set_addrmap(0, &sanghopm_state::ramdac_map); + RAMDAC(config, "ramdac", "palette").set_addrmap(0, &sanghopm_state::ramdac_map); GFXDECODE(config, m_gfxdecode, m_palette, gfx_sangho); @@ -9732,9 +9732,9 @@ void unkch_state::megaline(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &unkch_state::megaline_map); m_maincpu->set_addrmap(AS_IO, &unkch_state::megaline_portmap); - //I8255A(config, m_ppi[0], 0); - //I8255A(config, m_ppi[1], 0); - //I8255A(config, m_ppi[2], 0); + //I8255A(config, m_ppi[0]); + //I8255A(config, m_ppi[1]); + //I8255A(config, m_ppi[2]); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -9805,7 +9805,7 @@ void unkch_state::bonusch(machine_config &config) void unkch_state::feverch(machine_config &config) { - Z80(config, m_maincpu, 12'000'000 / 2); // clock not verified + Z80(config, m_maincpu, XTAL::u(12'000'000) / 2); // clock not verified m_maincpu->set_addrmap(AS_PROGRAM, &unkch_state::feverch_map); m_maincpu->set_addrmap(AS_IO, &unkch_state::feverch_portmap); @@ -9838,11 +9838,11 @@ void unkch_state::feverch(machine_config &config) SPEAKER(config, "mono").front_center(); - SN76489A(config, "sn1", 12'000'000 / 12).add_route(ALL_OUTPUTS, "mono", 0.80); // actually SN76489AN, clock not verified + SN76489A(config, "sn1", XTAL::u(12'000'000) / 12).add_route(ALL_OUTPUTS, "mono", 0.80); // actually SN76489AN, clock not verified - SN76489A(config, "sn2", 12'000'000 / 12).add_route(ALL_OUTPUTS, "mono", 0.80); // actually SN76489AN, clock not verified + SN76489A(config, "sn2", XTAL::u(12'000'000) / 12).add_route(ALL_OUTPUTS, "mono", 0.80); // actually SN76489AN, clock not verified - SN76489A(config, "sn3", 12'000'000 / 12).add_route(ALL_OUTPUTS, "mono", 0.80); // actually SN76489AN, clock not verified + SN76489A(config, "sn3", XTAL::u(12'000'000) / 12).add_route(ALL_OUTPUTS, "mono", 0.80); // actually SN76489AN, clock not verified } /*************************************************************************** diff --git a/src/mame/igs/igs017.cpp b/src/mame/igs/igs017.cpp index 67c54eaad28..bbf89e92bd1 100644 --- a/src/mame/igs/igs017.cpp +++ b/src/mame/igs/igs017.cpp @@ -91,7 +91,7 @@ class igs_mux_device : public device_memory_interface { public: - igs_mux_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + igs_mux_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void address_w(u8 data); void data_w(u8 data); @@ -117,7 +117,7 @@ device_memory_interface::space_config_vector igs_mux_device::memory_space_config DEFINE_DEVICE_TYPE(IGS_MUX, igs_mux_device, "igs_mux", "IGS I/O Multiplexer") -igs_mux_device::igs_mux_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +igs_mux_device::igs_mux_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS_MUX, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("igs_mux", ENDIANNESS_LITTLE, 8, 8, 0) @@ -156,7 +156,7 @@ u8 igs_mux_device::data_r() class igs_string_device : public device_t { public: - igs_string_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + igs_string_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 result_r(); // 0x05: result_r void do_bitswap_w(offs_t offset, u8 data); // 0x20-0x27: do_bitswap_w @@ -178,7 +178,7 @@ private: DEFINE_DEVICE_TYPE(IGS_STRING, igs_string_device, "igs_string", "IGS String Protection") -igs_string_device::igs_string_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +igs_string_device::igs_string_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS_STRING, tag, owner, clock) , m_region_key(*this, DEVICE_SELF) { } @@ -301,7 +301,7 @@ u8 igs_string_device::advance_string_offs_r(address_space &space) class igs_bitswap_device : public device_t { public: - igs_bitswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + igs_bitswap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 result_r(); // 0x03: result_r void word_w(u8 data); // 0x40-0x47: word_w @@ -368,7 +368,7 @@ void igs_bitswap_device::set_val_xor(u16 val_xor) DEFINE_DEVICE_TYPE(IGS_BITSWAP, igs_bitswap_device, "igs_bitswap", "IGS Bitswap Protection") -igs_bitswap_device::igs_bitswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +igs_bitswap_device::igs_bitswap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS_BITSWAP, tag, owner, clock) { } @@ -472,7 +472,7 @@ void igs_bitswap_device::reset_w(u8 data) class igs_incdec_device : public device_t { public: - igs_incdec_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + igs_incdec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 result_r(); void reset_w(u8 data); @@ -518,7 +518,7 @@ void igs_incdec_device::dec_w(u8 data) DEFINE_DEVICE_TYPE(IGS_INCDEC, igs_incdec_device, "igs_incdec", "IGS Inc/Dec Protection") -igs_incdec_device::igs_incdec_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +igs_incdec_device::igs_incdec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS_INCDEC, tag, owner, clock) { } @@ -541,7 +541,7 @@ void igs_incdec_device::device_reset() class igs_inc_device : public device_t { public: - igs_inc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + igs_inc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 result_r(); void reset_w(u8 data); @@ -577,7 +577,7 @@ void igs_inc_device::inc_w(u8 data) DEFINE_DEVICE_TYPE(IGS_INC, igs_inc_device, "igs_inc", "IGS Inc Protection") -igs_inc_device::igs_inc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +igs_inc_device::igs_inc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS_INC, tag, owner, clock) { } @@ -4273,7 +4273,7 @@ INPUT_PORTS_END void igs017_state::base_machine_oki(machine_config &config, const XTAL &xtal_oki) { // i/o - IGS_MUX(config, m_igs_mux, 0); + IGS_MUX(config, m_igs_mux); I8255A(config, m_ppi); @@ -4286,7 +4286,7 @@ void igs017_state::base_machine_oki(machine_config &config, const XTAL &xtal_oki m_screen->set_screen_update("igs017_igs031", FUNC(igs017_igs031_device::screen_update)); m_screen->set_palette("igs017_igs031:palette"); - IGS017_IGS031(config, m_igs017_igs031, 0); + IGS017_IGS031(config, m_igs017_igs031); m_igs017_igs031->set_i8255_tag("ppi8255"); // sound @@ -4325,7 +4325,7 @@ void igs017_state::iqblocka(machine_config &config) m_ppi->in_pc_callback().set_ioport("DSW3"); // protection - IGS_BITSWAP(config, m_igs_bitswap, 0); + IGS_BITSWAP(config, m_igs_bitswap); m_igs_bitswap->set_val_xor(0x15d6); m_igs_bitswap->set_mf_bits(3, 5, 9, 11); m_igs_bitswap->set_m3_bits<0>(~5, 8, ~10, ~15); @@ -4333,7 +4333,7 @@ void igs017_state::iqblocka(machine_config &config) m_igs_bitswap->set_m3_bits<2>( 2, ~6, ~11, ~15); m_igs_bitswap->set_m3_bits<3>( 0, ~1, ~3, ~15); - IGS_INCDEC(config, m_igs_incdec, 0); + IGS_INCDEC(config, m_igs_incdec); // sound YM2413(config, "ymsnd", 3.579545_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 0.5); @@ -4383,9 +4383,9 @@ void igs017_state::tarzan(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); - IGS_INCDEC(config, m_igs_incdec, 0); + IGS_INCDEC(config, m_igs_incdec); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::tarzan_palette_bitswap)); @@ -4417,9 +4417,9 @@ void igs017_state::starzan(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); - IGS_INCDEC(config, m_igs_incdec, 0); + IGS_INCDEC(config, m_igs_incdec); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::tarzan_palette_bitswap)); @@ -4476,9 +4476,9 @@ void igs017_state::cpoker2(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_INCDEC(config, m_igs_incdec, 0); + IGS_INCDEC(config, m_igs_incdec); - IGS_INC(config, m_igs_inc, 0); + IGS_INC(config, m_igs_inc); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::tarzan_palette_bitswap)); @@ -4506,7 +4506,7 @@ void igs017_state::tjsb(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::tjsb_palette_bitswap)); @@ -4537,9 +4537,9 @@ void igs017_state::spkrform(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); - IGS_INCDEC(config, m_igs_incdec, 0); + IGS_INCDEC(config, m_igs_incdec); // sound YM2413(config, "ymsnd", 3.579545_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 0.5); @@ -4577,7 +4577,7 @@ void igs017_state::mgcs(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::mgcs_palette_bitswap)); @@ -4604,9 +4604,9 @@ void igs017_state::lhzb2(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); - IGS022(config, m_igs022, 0); + IGS022(config, m_igs022); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::lhzb2a_palette_bitswap)); @@ -4639,9 +4639,9 @@ void igs017_state::lhzb2a(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); - IGS_BITSWAP(config, m_igs_bitswap, 0); + IGS_BITSWAP(config, m_igs_bitswap); m_igs_bitswap->set_val_xor(0x289a); m_igs_bitswap->set_mf_bits(4, 7, 10, 13); m_igs_bitswap->set_m3_bits<0>(~3, 8, ~12, ~15); @@ -4649,7 +4649,7 @@ void igs017_state::lhzb2a(machine_config &config) m_igs_bitswap->set_m3_bits<2>(~3, 4, ~5, ~15); m_igs_bitswap->set_m3_bits<3>(~9, ~11, 12, ~15); - IGS_INCDEC(config, m_igs_incdec, 0); + IGS_INCDEC(config, m_igs_incdec); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::lhzb2a_palette_bitswap)); @@ -4676,9 +4676,9 @@ void igs017_state::slqz2(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_STRING(config, m_igs_string, 0); + IGS_STRING(config, m_igs_string); - IGS022(config, m_igs022, 0); + IGS022(config, m_igs022); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::slqz2_palette_bitswap)); @@ -4705,7 +4705,7 @@ void igs017_state::sdmg2(machine_config &config) HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); // protection - IGS_INCDEC(config, m_igs_incdec, 0); + IGS_INCDEC(config, m_igs_incdec); } @@ -4745,7 +4745,7 @@ void igs017_state::mgdh(machine_config &config) m_igs_mux->set_addrmap(0, &igs017_state::mgdh_mux_map); // protection (only used for the game id check?) -// IGS_STRING(config, m_igs_string, 0); +// IGS_STRING(config, m_igs_string); } diff --git a/src/mame/igs/igs017_igs031.cpp b/src/mame/igs/igs017_igs031.cpp index 67acf4e8c0b..2ce23f1354c 100644 --- a/src/mame/igs/igs017_igs031.cpp +++ b/src/mame/igs/igs017_igs031.cpp @@ -59,7 +59,7 @@ GFXDECODE_END DEFINE_DEVICE_TYPE(IGS017_IGS031, igs017_igs031_device, "igs017_031", "IGS017_IGS031") -igs017_igs031_device::igs017_igs031_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +igs017_igs031_device::igs017_igs031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS017_IGS031, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo, "palette") , device_video_interface(mconfig, *this) diff --git a/src/mame/igs/igs017_igs031.h b/src/mame/igs/igs017_igs031.h index 6129e236a88..0dc270f71cd 100644 --- a/src/mame/igs/igs017_igs031.h +++ b/src/mame/igs/igs017_igs031.h @@ -18,7 +18,7 @@ class igs017_igs031_device : public: typedef device_delegate palette_scramble_delegate; - igs017_igs031_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + igs017_igs031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_i8255_tag(T &&tag) { m_i8255.set_tag(std::forward(tag)); } template void set_palette_scramble_cb(T &&... args) { m_palette_scramble_cb.set(std::forward(args)...); } diff --git a/src/mame/igs/igs022.cpp b/src/mame/igs/igs022.cpp index e41863df27a..7e05ea0c360 100644 --- a/src/mame/igs/igs022.cpp +++ b/src/mame/igs/igs022.cpp @@ -19,7 +19,7 @@ #define VERBOSE (0) #include "logmacro.h" -igs022_device::igs022_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +igs022_device::igs022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS022, tag, owner, clock) , m_sharedprotram(*this, "sharedprotram") , m_rom(*this, DEVICE_SELF) diff --git a/src/mame/igs/igs022.h b/src/mame/igs/igs022.h index 5fb2bd9115c..459a8d3d213 100644 --- a/src/mame/igs/igs022.h +++ b/src/mame/igs/igs022.h @@ -8,7 +8,7 @@ class igs022_device : public device_t { public: - igs022_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + igs022_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void handle_command(); diff --git a/src/mame/igs/igs025.cpp b/src/mame/igs/igs025.cpp index 1706f3c0fcc..b856ffa0b89 100644 --- a/src/mame/igs/igs025.cpp +++ b/src/mame/igs/igs025.cpp @@ -16,7 +16,7 @@ #include "igs025.h" -igs025_device::igs025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +igs025_device::igs025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS025, tag, owner, clock) , m_execute_external(*this, DEVICE_SELF, FUNC(igs025_device::no_callback_setup)) { diff --git a/src/mame/igs/igs025.h b/src/mame/igs/igs025.h index c57628d7464..ca1466f607d 100644 --- a/src/mame/igs/igs025.h +++ b/src/mame/igs/igs025.h @@ -12,7 +12,7 @@ typedef device_delegate igs025_execute_external; class igs025_device : public device_t { public: - igs025_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + igs025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t killbld_igs025_prot_r(offs_t offset); // use setters instead of making public? diff --git a/src/mame/igs/igs028.cpp b/src/mame/igs/igs028.cpp index 59f57bb43b8..46e2711835d 100644 --- a/src/mame/igs/igs028.cpp +++ b/src/mame/igs/igs028.cpp @@ -11,7 +11,7 @@ #include "igs028.h" -igs028_device::igs028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +igs028_device::igs028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IGS028, tag, owner, clock) { } diff --git a/src/mame/igs/igs028.h b/src/mame/igs/igs028.h index 9198afd1503..6c2fc21c8e2 100644 --- a/src/mame/igs/igs028.h +++ b/src/mame/igs/igs028.h @@ -10,7 +10,7 @@ class igs028_device : public device_t { public: - igs028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + igs028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t* m_sharedprotram = nullptr; diff --git a/src/mame/igs/igs_fear.cpp b/src/mame/igs/igs_fear.cpp index 00761ceef06..7dbbdf15b9a 100644 --- a/src/mame/igs/igs_fear.cpp +++ b/src/mame/igs/igs_fear.cpp @@ -84,7 +84,7 @@ WRITE_LINE_MEMBER(igs_fear_state::sound_irq) void igs_fear_state::igs_fear(machine_config &config) { - ARM7(config, m_maincpu, 50000000/2); + ARM7(config, m_maincpu, XTAL::u(50000000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &igs_fear_state::igs_igs_fear_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 78cb7467945..d2403d56b3b 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -323,7 +323,7 @@ WRITE_LINE_MEMBER(igs_m027_state::vblank_irq) void igs_m027_state::igs_mahjong(machine_config &config) { - ARM7(config, m_maincpu, 20000000); + ARM7(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &igs_m027_state::igs_mahjong_map); // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -338,7 +338,7 @@ void igs_m027_state::igs_mahjong(machine_config &config) screen.set_palette("igs017_igs031:palette"); screen.screen_vblank().set(FUNC(igs_m027_state::vblank_irq)); - IGS017_IGS031(config, m_igs017_igs031, 0); + IGS017_IGS031(config, m_igs017_igs031); m_igs017_igs031->set_text_reverse_bits(); //m_igs017_igs031->set_i8255_tag("ppi8255"); @@ -351,7 +351,7 @@ void igs_m027_state::igs_mahjong(machine_config &config) void igs_m027_state::amazonia(machine_config &config) { - ARM7(config, m_maincpu, 20000000); + ARM7(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &igs_m027_state::igs_mahjong_map); // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -365,7 +365,7 @@ void igs_m027_state::amazonia(machine_config &config) screen.set_palette("igs017_igs031:palette"); screen.screen_vblank().set(FUNC(igs_m027_state::vblank_irq)); - IGS017_IGS031(config, m_igs017_igs031, 0); + IGS017_IGS031(config, m_igs017_igs031); m_igs017_igs031->set_text_reverse_bits(); //m_igs017_igs031->set_i8255_tag("ppi8255"); diff --git a/src/mame/igs/igs_m036.cpp b/src/mame/igs/igs_m036.cpp index 8fe3f5bca20..cb9e16ac8c2 100644 --- a/src/mame/igs/igs_m036.cpp +++ b/src/mame/igs/igs_m036.cpp @@ -294,7 +294,7 @@ void igs_m036_state::pgm_create_dummy_internal_arm_region(void) void igs_m036_state::igs_m036(machine_config &config) { - IGS036_CPU(config, m_maincpu, 20000000); + IGS036_CPU(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &igs_m036_state::igs_m036_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -312,7 +312,7 @@ void igs_m036_state::igs_m036(machine_config &config) void igs_m036_state::igs_m036_tt(machine_config &config) { - IGS036_CPU(config, m_maincpu, 20000000); + IGS036_CPU(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &igs_m036_state::igs_m036_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/igs/igspoker.cpp b/src/mame/igs/igspoker.cpp index a6b77a220c5..19685233afe 100644 --- a/src/mame/igs/igspoker.cpp +++ b/src/mame/igs/igspoker.cpp @@ -1936,7 +1936,7 @@ GFXDECODE_END void igspoker_state::igspoker(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3579545); + Z80(config, m_maincpu, XTAL::u(3579545)); m_maincpu->set_addrmap(AS_PROGRAM, &igspoker_state::igspoker_prg_map); m_maincpu->set_addrmap(AS_IO, &igspoker_state::igspoker_io_map); TIMER(config, "scantimer").configure_scanline(FUNC(igspoker_state::interrupt), "screen", 0, 1); @@ -1960,7 +1960,7 @@ void igspoker_state::igspoker(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ymsnd", 3579545).add_route(ALL_OUTPUTS, "mono", 1.0); + YM2413(config, "ymsnd", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 1.0); } void igspoker_state::csk227it(machine_config &config) diff --git a/src/mame/igs/iqblock.cpp b/src/mame/igs/iqblock.cpp index 548ff62c6e4..01941f40fd0 100644 --- a/src/mame/igs/iqblock.cpp +++ b/src/mame/igs/iqblock.cpp @@ -342,7 +342,7 @@ GFXDECODE_END void iqblock_state::iqblock(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 12000000/2); /* 6 MHz */ + Z80(config, m_maincpu, XTAL::u(12000000)/2); /* 6 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &iqblock_state::main_map); m_maincpu->set_addrmap(AS_IO, &iqblock_state::main_portmap); TIMER(config, "scantimer").configure_scanline(FUNC(iqblock_state::irq), "screen", 0, 1); @@ -368,7 +368,7 @@ void iqblock_state::iqblock(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ymsnd", 3'579'545).add_route(ALL_OUTPUTS, "mono", 1.0); + YM2413(config, "ymsnd", XTAL::u(3'579'545)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/igs/jackie.cpp b/src/mame/igs/jackie.cpp index 61832a719de..1aa8a4f516a 100644 --- a/src/mame/igs/jackie.cpp +++ b/src/mame/igs/jackie.cpp @@ -558,7 +558,7 @@ void jackie_state::jackie(machine_config &config) Z80(config, m_maincpu, XTAL(12'000'000) / 2); m_maincpu->set_addrmap(AS_PROGRAM, &jackie_state::prg_map); m_maincpu->set_addrmap(AS_IO, &jackie_state::io_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(jackie_state::irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(jackie_state::irq), "screen", 0, 1); i8255_device &ppi1(I8255A(config, "ppi1")); // D8255AC ppi1.out_pa_callback().set(FUNC(jackie_state::nmi_and_coins_w)); diff --git a/src/mame/igs/pgm2.cpp b/src/mame/igs/pgm2.cpp index 98f42d32913..021cc2535e7 100644 --- a/src/mame/igs/pgm2.cpp +++ b/src/mame/igs/pgm2.cpp @@ -751,12 +751,12 @@ GFXDECODE_END void pgm2_state::pgm2(machine_config &config) { /* basic machine hardware */ - IGS036(config, m_maincpu, 100000000); // Unknown clock / divider + IGS036(config, m_maincpu, XTAL::u(100000000)); // Unknown clock / divider m_maincpu->set_addrmap(AS_PROGRAM, &pgm2_state::pgm2_rom_map); - TIMER(config, m_mcu_timer, 0).configure_generic(FUNC(pgm2_state::mcu_interrupt)); + TIMER(config, m_mcu_timer).configure_generic(FUNC(pgm2_state::mcu_interrupt)); - ARM_AIC(config, m_arm_aic, 0).irq_callback().set(FUNC(pgm2_state::irq)); + ARM_AIC(config, m_arm_aic).irq_callback().set(FUNC(pgm2_state::irq)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -779,14 +779,14 @@ void pgm2_state::pgm2(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz774_device &ymz774(YMZ774(config, "ymz774", 16384000)); // is clock correct ? + ymz774_device &ymz774(YMZ774(config, "ymz774", XTAL::u(16384000))); // is clock correct ? ymz774.add_route(0, "lspeaker", 1.0); ymz774.add_route(1, "rspeaker", 1.0); - PGM2_MEMCARD(config, m_memcard[0], 0); - PGM2_MEMCARD(config, m_memcard[1], 0); - PGM2_MEMCARD(config, m_memcard[2], 0); - PGM2_MEMCARD(config, m_memcard[3], 0); + PGM2_MEMCARD(config, m_memcard[0]); + PGM2_MEMCARD(config, m_memcard[1]); + PGM2_MEMCARD(config, m_memcard[2]); + PGM2_MEMCARD(config, m_memcard[3]); } // not strictly needed as the video code supports changing on the fly, but makes recording easier etc. diff --git a/src/mame/igs/pgm2_memcard.cpp b/src/mame/igs/pgm2_memcard.cpp index f50c8b9e07b..24ac13fba4e 100644 --- a/src/mame/igs/pgm2_memcard.cpp +++ b/src/mame/igs/pgm2_memcard.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(PGM2_MEMCARD, pgm2_memcard_device, "pgm2_memcard", "PGM2 Memo // pgm2_memcard_device - constructor //------------------------------------------------- -pgm2_memcard_device::pgm2_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pgm2_memcard_device::pgm2_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PGM2_MEMCARD, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/mame/igs/pgm2_memcard.h b/src/mame/igs/pgm2_memcard.h index 861fd0d1b3c..d8d87992927 100644 --- a/src/mame/igs/pgm2_memcard.h +++ b/src/mame/igs/pgm2_memcard.h @@ -27,7 +27,7 @@ class pgm2_memcard_device : public device_t, { public: // construction/destruction - pgm2_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pgm2_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual bool is_reset_on_load() const noexcept override { return false; } virtual const char *file_extensions() const noexcept override { return "pg2,bin,mem"; } diff --git a/src/mame/igs/pgm3.cpp b/src/mame/igs/pgm3.cpp index ba95a80a902..781a4d327df 100644 --- a/src/mame/igs/pgm3.cpp +++ b/src/mame/igs/pgm3.cpp @@ -107,7 +107,7 @@ void pgm3_state::machine_reset() void pgm3_state::pgm3(machine_config &config) { /* basic machine hardware */ - ARM9(config, m_maincpu, 800000000); // wrong, see notes at top of driver + ARM9(config, m_maincpu, XTAL::u(800000000)); // wrong, see notes at top of driver m_maincpu->set_addrmap(AS_PROGRAM, &pgm3_state::pgm3_map); m_maincpu->set_disable(); diff --git a/src/mame/igs/pgmprot_igs025_igs012.cpp b/src/mame/igs/pgmprot_igs025_igs012.cpp index 2c28f8f40da..9c9403976ff 100644 --- a/src/mame/igs/pgmprot_igs025_igs012.cpp +++ b/src/mame/igs/pgmprot_igs025_igs012.cpp @@ -128,7 +128,7 @@ void pgm_012_025_state::pgm_012_025_drgw2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pgm_012_025_state::drgw2_mem); - IGS025(config, m_igs025, 0); + IGS025(config, m_igs025); //m_igs025->set_external_cb(FUNC(pgm_022_025_state::igs025_to_igs012_callback), this); } diff --git a/src/mame/igs/pgmprot_igs025_igs022.cpp b/src/mame/igs/pgmprot_igs025_igs022.cpp index d5b21b92b3d..48a22b9d33b 100644 --- a/src/mame/igs/pgmprot_igs025_igs022.cpp +++ b/src/mame/igs/pgmprot_igs025_igs022.cpp @@ -373,10 +373,10 @@ void pgm_022_025_state::pgm_022_025(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pgm_022_025_state::killbld_mem); - IGS025(config, m_igs025, 0); + IGS025(config, m_igs025); m_igs025->set_external_cb(FUNC(pgm_022_025_state::igs025_to_igs022_callback)); - IGS022(config, m_igs022, 0); + IGS022(config, m_igs022); } void pgm_022_025_state::pgm_022_025_dw3(machine_config &config) diff --git a/src/mame/igs/pgmprot_igs025_igs028.cpp b/src/mame/igs/pgmprot_igs025_igs028.cpp index 55e9a02dee2..52cf89cc7ee 100644 --- a/src/mame/igs/pgmprot_igs025_igs028.cpp +++ b/src/mame/igs/pgmprot_igs025_igs028.cpp @@ -191,10 +191,10 @@ void pgm_028_025_state::pgm_028_025_ol(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pgm_028_025_state::olds_mem); - IGS025(config, m_igs025, 0); + IGS025(config, m_igs025); m_igs025->set_external_cb(FUNC(pgm_028_025_state::igs025_to_igs028_callback)); - IGS028(config, m_igs028, 0); + IGS028(config, m_igs028); } diff --git a/src/mame/igs/pgmprot_igs027a_type1.cpp b/src/mame/igs/pgmprot_igs027a_type1.cpp index f6c4d3fb97b..1218af0601d 100644 --- a/src/mame/igs/pgmprot_igs027a_type1.cpp +++ b/src/mame/igs/pgmprot_igs027a_type1.cpp @@ -198,7 +198,7 @@ void pgm_arm_type1_state::pgm_arm_type1(machine_config &config) // ARM7 Shared m m_maincpu->set_addrmap(AS_PROGRAM, &pgm_arm_type1_state::kov_map); /* protection CPU */ - ARM7(config, m_prot, 20000000); // 55857E? + ARM7(config, m_prot, XTAL::u(20000000)); // 55857E? m_prot->set_addrmap(AS_PROGRAM, &pgm_arm_type1_state::_55857E_arm7_map); } diff --git a/src/mame/igs/pgmprot_igs027a_type2.cpp b/src/mame/igs/pgmprot_igs027a_type2.cpp index a997e3b30ef..8f117d387ea 100644 --- a/src/mame/igs/pgmprot_igs027a_type2.cpp +++ b/src/mame/igs/pgmprot_igs027a_type2.cpp @@ -134,7 +134,7 @@ void pgm_arm_type2_state::pgm_arm_type2(machine_config &config) // ARM7 Shared m m_maincpu->set_addrmap(AS_PROGRAM, &pgm_arm_type2_state::kov2_mem); /* protection CPU */ - ARM7(config, m_prot, 20000000); // 55857F + ARM7(config, m_prot, XTAL::u(20000000)); // 55857F m_prot->set_addrmap(AS_PROGRAM, &pgm_arm_type2_state::_55857F_arm7_map); } @@ -142,7 +142,7 @@ void pgm_arm_type2_state::pgm_arm_type2_22m(machine_config &config) // ARM7 uses { pgm_arm_type2(config); - m_prot->set_clock(22000000); + m_prot->set_clock(XTAL::u(22000000)); } diff --git a/src/mame/igs/pgmprot_igs027a_type3.cpp b/src/mame/igs/pgmprot_igs027a_type3.cpp index 5f40e77e8a7..ba96ff94a7f 100644 --- a/src/mame/igs/pgmprot_igs027a_type3.cpp +++ b/src/mame/igs/pgmprot_igs027a_type3.cpp @@ -191,7 +191,7 @@ void pgm_arm_type3_state::pgm_arm_type3(machine_config &config) // ARM7 Shared m m_maincpu->set_addrmap(AS_PROGRAM, &pgm_arm_type3_state::svg_68k_mem); /* protection CPU */ - ARM7(config, m_prot, 20000000); // 55857G + ARM7(config, m_prot, XTAL::u(20000000)); // 55857G m_prot->set_addrmap(AS_PROGRAM, &pgm_arm_type3_state::_55857G_arm7_map); } @@ -199,14 +199,14 @@ void pgm_arm_type3_state::pgm_arm_type3_22m(machine_config &config) // ARM7 uses { pgm_arm_type3(config); - m_prot->set_clock(22000000); + m_prot->set_clock(XTAL::u(22000000)); } void pgm_arm_type3_state::pgm_arm_type3_24m(machine_config &config) // ARM7 uses 24MHz XTAL (dmnfrntpcb happy6) { pgm_arm_type3(config); - m_prot->set_clock(24000000); + m_prot->set_clock(XTAL::u(24000000)); } void pgm_arm_type3_state::pgm_arm_type3_33m(machine_config &config) // ARM7 uses 33MHz XTAL (thegladpcb svg) diff --git a/src/mame/igt/drw80pkr.cpp b/src/mame/igt/drw80pkr.cpp index a6d56344872..67bc4e79f1e 100644 --- a/src/mame/igt/drw80pkr.cpp +++ b/src/mame/igt/drw80pkr.cpp @@ -473,7 +473,7 @@ void drw80pkr_state::drw80pkr(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - AY8912(config, m_aysnd, 20000000/12).add_route(ALL_OUTPUTS, "mono", 0.75); + AY8912(config, m_aysnd, XTAL::u(20000000)/12).add_route(ALL_OUTPUTS, "mono", 0.75); } /************************* diff --git a/src/mame/igt/gkigt.cpp b/src/mame/igt/gkigt.cpp index 263261201af..7c92c316f4a 100644 --- a/src/mame/igt/gkigt.cpp +++ b/src/mame/igt/gkigt.cpp @@ -632,7 +632,7 @@ void igt_gameking_state::igt_gameking(machine_config &config) PALETTE(config, m_palette).set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &igt_gameking_state::ramdac_map); /* sound hardware */ diff --git a/src/mame/igt/videopkr.cpp b/src/mame/igt/videopkr.cpp index 9e1fc83714b..ecf3b38f46c 100644 --- a/src/mame/igt/videopkr.cpp +++ b/src/mame/igt/videopkr.cpp @@ -1295,7 +1295,7 @@ void videopkr_state::videopkr(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.275); + MC1408(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.275); } diff --git a/src/mame/informer/informer_207_100.cpp b/src/mame/informer/informer_207_100.cpp index 932eeccd41a..8fcd2cdfe3a 100644 --- a/src/mame/informer/informer_207_100.cpp +++ b/src/mame/informer/informer_207_100.cpp @@ -171,9 +171,9 @@ void informer_207_100_state::informer_207_100(machine_config &config) MC6809(config, m_maincpu, 19.7184_MHz_XTAL / 4); // unknown clock divisor m_maincpu->set_addrmap(AS_PROGRAM, &informer_207_100_state::mem_map); - ACIA6850(config, m_acia, 0); // unknown clock + ACIA6850(config, m_acia); // unknown clock - SCN2681(config, m_duart, 0); // unknown clock + SCN2681(config, m_duart); // unknown clock MSM58321(config, m_rtc, 32.768_kHz_XTAL); diff --git a/src/mame/informer/informer_207_376.cpp b/src/mame/informer/informer_207_376.cpp index 5f99eaeec62..9603719786f 100644 --- a/src/mame/informer/informer_207_376.cpp +++ b/src/mame/informer/informer_207_376.cpp @@ -260,7 +260,7 @@ void informer_207_376_state::informer_207_376(machine_config &config) nmi_clk.set_stages(14); nmi_clk.count_out_cb().set_inputline(m_maincpu, INPUT_LINE_NMI).bit(13); // Q14 - SCC85C30(config, m_scc, 0); // externally clocked? + SCC85C30(config, m_scc); // externally clocked? m_scc->out_txda_callback().set("com1", FUNC(rs232_port_device::write_txd)); m_scc->out_dtra_callback().set("com1", FUNC(rs232_port_device::write_dtr)); m_scc->out_rtsa_callback().set("com1", FUNC(rs232_port_device::write_rts)); @@ -311,7 +311,7 @@ void informer_207_376_state::informer_207_376(machine_config &config) // sound SPEAKER(config, "mono").front_center(); - BEEP(config, "beep", 500).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown + BEEP(config, "beep", XTAL::u(500)).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown } diff --git a/src/mame/informer/informer_207_376_kbd.cpp b/src/mame/informer/informer_207_376_kbd.cpp index 4dacd14577f..f27e54fde29 100644 --- a/src/mame/informer/informer_207_376_kbd.cpp +++ b/src/mame/informer/informer_207_376_kbd.cpp @@ -187,7 +187,7 @@ ioport_constructor informer_207_376_kbd_hle_device::device_input_ports() const // informer_207_376_kbd_hle_device - constructor //------------------------------------------------- -informer_207_376_kbd_hle_device::informer_207_376_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +informer_207_376_kbd_hle_device::informer_207_376_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INFORMER_207_376_KBD_HLE, tag, owner, clock), device_buffered_serial_interface(mconfig, *this), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6", "row_7"), @@ -217,8 +217,8 @@ void informer_207_376_kbd_hle_device::device_reset() transmit_register_reset(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); - set_rcv_rate(2400); - set_tra_rate(2400); + set_rcv_rate(XTAL::u(2400)); + set_tra_rate(XTAL::u(2400)); reset_key_state(); start_processing(attotime::from_hz(2400)); diff --git a/src/mame/informer/informer_207_376_kbd.h b/src/mame/informer/informer_207_376_kbd.h index a855b8f9d44..0a5362b7866 100644 --- a/src/mame/informer/informer_207_376_kbd.h +++ b/src/mame/informer/informer_207_376_kbd.h @@ -27,7 +27,7 @@ class informer_207_376_kbd_hle_device : public device_t, { public: // construction/destruction - informer_207_376_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + informer_207_376_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto tx_handler() { return m_tx_handler.bind(); } diff --git a/src/mame/informer/informer_213.cpp b/src/mame/informer/informer_213.cpp index cc2aefdc3c9..97b7a8fe317 100644 --- a/src/mame/informer/informer_213.cpp +++ b/src/mame/informer/informer_213.cpp @@ -437,7 +437,7 @@ void informer_213_state::informer_213(machine_config &config) // sound SPEAKER(config, "mono").front_center(); - BEEP(config, "beep", 500).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown + BEEP(config, "beep", XTAL::u(500)).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown informer_213_kbd_hle_device &kbd(INFORMER_213_KBD_HLE(config, "kbd")); kbd.int_handler().set(FUNC(informer_213_state::kbd_int_w)); diff --git a/src/mame/informer/informer_213_kbd.cpp b/src/mame/informer/informer_213_kbd.cpp index 30373f5152f..369bbb30fd1 100644 --- a/src/mame/informer/informer_213_kbd.cpp +++ b/src/mame/informer/informer_213_kbd.cpp @@ -193,7 +193,7 @@ ioport_constructor informer_213_kbd_hle_device::device_input_ports() const // informer_213_kbd_hle_device - constructor //------------------------------------------------- -informer_213_kbd_hle_device::informer_213_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +informer_213_kbd_hle_device::informer_213_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INFORMER_213_KBD_HLE, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6", "row_7", "row_8"), m_int_handler(*this) diff --git a/src/mame/informer/informer_213_kbd.h b/src/mame/informer/informer_213_kbd.h index 915e3a96c6c..780a25e0c61 100644 --- a/src/mame/informer/informer_213_kbd.h +++ b/src/mame/informer/informer_213_kbd.h @@ -26,7 +26,7 @@ class informer_213_kbd_hle_device : public device_t, { public: // construction/destruction - informer_213_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + informer_213_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/mame/intel/basic52.cpp b/src/mame/intel/basic52.cpp index 7d84ef082aa..a449b80598e 100644 --- a/src/mame/intel/basic52.cpp +++ b/src/mame/intel/basic52.cpp @@ -131,10 +131,10 @@ void basic52_state::basic31(machine_config &config) m_maincpu->serial_rx_cb().set(FUNC(basic52_state::from_term)); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(basic52_state::kbd_put)); - I8255(config, "ppi8255", 0); + I8255(config, "ppi8255"); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/intel/imds2.cpp b/src/mame/intel/imds2.cpp index 112b68403d0..7a5e9e976e3 100644 --- a/src/mame/intel/imds2.cpp +++ b/src/mame/intel/imds2.cpp @@ -259,15 +259,15 @@ void imds2_state::imds2(machine_config &config) m_ipccpu->in_inta_func().set("ipcsyspic", FUNC(pic8259_device::acknowledge)); //config.set_maximum_quantum(attotime::from_hz(100)); - PIC8259(config, m_ipcsyspic, 0); + PIC8259(config, m_ipcsyspic); m_ipcsyspic->out_int_callback().set(FUNC(imds2_state::ipc_intr_w)); m_ipcsyspic->in_sp_callback().set_constant(1); - PIC8259(config, m_ipclocpic, 0); + PIC8259(config, m_ipclocpic); m_ipclocpic->out_int_callback().set(m_ipcsyspic, FUNC(pic8259_device::ir7_w)); m_ipclocpic->in_sp_callback().set_constant(0); - PIT8253(config, m_ipctimer, 0); + PIT8253(config, m_ipctimer); m_ipctimer->set_clk<0>(IPC_XTAL_Y1 / 16); m_ipctimer->set_clk<1>(IPC_XTAL_Y1 / 16); m_ipctimer->set_clk<2>(IPC_XTAL_Y1 / 16); @@ -305,7 +305,7 @@ void imds2_state::imds2(machine_config &config) m_ioc->master_intr_cb().set(m_ipclocpic, FUNC(pic8259_device::ir6_w)); m_ioc->parallel_int_cb().set(m_ipclocpic, FUNC(pic8259_device::ir5_w)); - MULTIBUS(config, m_bus, 9'830'400); + MULTIBUS(config, m_bus, XTAL::u(9'830'400)); m_bus->xack_cb().set(FUNC(imds2_state::xack)); MULTIBUS_SLOT(config, m_slot, m_bus, imds2_cards, nullptr, false); // FIXME: isbc202 } diff --git a/src/mame/intel/imds2ioc.cpp b/src/mame/intel/imds2ioc.cpp index b3ce476d8ec..934fe2a8504 100644 --- a/src/mame/intel/imds2ioc.cpp +++ b/src/mame/intel/imds2ioc.cpp @@ -22,7 +22,7 @@ #define IOC_XTAL_Y3 6_MHz_XTAL // Frequency of beeper -#define IOC_BEEP_FREQ 3300 +#define IOC_BEEP_FREQ XTAL::u(3300) // device type definition DEFINE_DEVICE_TYPE(IMDS2IOC, imds2ioc_device, "imds2ioc", "Intellec Series II Input/Output Controller") @@ -55,7 +55,7 @@ void imds2ioc_device::io_map(address_map &map) map(0xf0, 0xf8).rw(m_iocdma, FUNC(i8257_device::read), FUNC(i8257_device::write)); } -imds2ioc_device::imds2ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +imds2ioc_device::imds2ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IMDS2IOC, tag, owner, clock), m_ioccpu(*this, "ioccpu"), m_iocdma(*this, "iocdma"), @@ -407,7 +407,7 @@ void imds2ioc_device::device_reset() { m_ipc_ioc_status = 0x0f; - m_iocfdc->set_rate(500000); // The IMD images show a rate of 500kbps + m_iocfdc->set_rate(XTAL::u(500000)); // The IMD images show a rate of 500kbps } void imds2ioc_device::update_beeper() @@ -585,7 +585,7 @@ void imds2ioc_device::device_add_mconfig(machine_config &config) // // Clock here is semi-bogus: it gives the correct frame frequency at 50 Hz (with the incorrect // assumption that CCLK is fixed at BCLK / 14) - I8275(config, m_ioccrtc, 22853600 / 14); + I8275(config, m_ioccrtc, XTAL::u(22853600) / 14); m_ioccrtc->set_character_width(14); m_ioccrtc->set_refresh_hack(true); m_ioccrtc->set_display_callback(FUNC(imds2ioc_device::crtc_display_pixels)); @@ -610,7 +610,7 @@ void imds2ioc_device::device_add_mconfig(machine_config &config) m_iocdma->out_iow_cb<1>().set("iocfdc", FUNC(i8271_device::data_w)); m_iocdma->out_iow_cb<2>().set(m_ioccrtc, FUNC(i8275_device::dack_w)); - PIT8253(config, m_ioctimer, 0); + PIT8253(config, m_ioctimer); m_ioctimer->set_clk<0>(IOC_XTAL_Y1 / 4); m_ioctimer->out_handler<0>().set(m_ioctimer, FUNC(pit8253_device::write_clk2)); m_ioctimer->out_handler<2>().set(FUNC(imds2ioc_device::beep_timer_w)); diff --git a/src/mame/intel/imds2ioc.h b/src/mame/intel/imds2ioc.h index 55dc40f5990..a20426ae39d 100644 --- a/src/mame/intel/imds2ioc.h +++ b/src/mame/intel/imds2ioc.h @@ -18,7 +18,7 @@ class imds2ioc_device : public device_t { public: - imds2ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + imds2ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto master_intr_cb() { return m_master_intr_cb.bind(); } auto parallel_int_cb() { return m_parallel_int_cb.bind(); } diff --git a/src/mame/intel/imm6_76.cpp b/src/mame/intel/imm6_76.cpp index 19a8d4ad5c8..7ac4988c7de 100644 --- a/src/mame/intel/imm6_76.cpp +++ b/src/mame/intel/imm6_76.cpp @@ -13,7 +13,7 @@ intel_imm6_76_device::intel_imm6_76_device( machine_config const &mconfig, char const *tag, device_t *owner, - uint32_t clock) + const XTAL &clock) : device_t(mconfig, INTEL_IMM6_76, tag, owner, clock) , device_image_interface(mconfig, *this) , m_cycle_tmr(nullptr), m_cycle_a_tmr(nullptr), m_prg_tmr(nullptr) diff --git a/src/mame/intel/imm6_76.h b/src/mame/intel/imm6_76.h index cef6df9ba81..6914c08299a 100644 --- a/src/mame/intel/imm6_76.h +++ b/src/mame/intel/imm6_76.h @@ -149,7 +149,7 @@ to a 1602A or 1702A PROM (15 millisecond cycle time). class intel_imm6_76_device : public device_t, public device_image_interface { public: - intel_imm6_76_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + intel_imm6_76_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device_image_interface implementation virtual image_init_result call_load() override; diff --git a/src/mame/intel/intellec4.cpp b/src/mame/intel/intellec4.cpp index 7dd24266750..13c83b83463 100644 --- a/src/mame/intel/intellec4.cpp +++ b/src/mame/intel/intellec4.cpp @@ -834,27 +834,27 @@ DEVICE_INPUT_DEFAULTS_END void intellec4_state::intellec4(machine_config &config) { - ADDRESS_MAP_BANK(config, m_program_banks, 0); + ADDRESS_MAP_BANK(config, m_program_banks); m_program_banks->set_map(&intellec4_state::intellec4_program_banks); m_program_banks->set_endianness(ENDIANNESS_LITTLE); m_program_banks->set_data_width(8); m_program_banks->set_addr_width(14); m_program_banks->set_stride(0x1000); - ADDRESS_MAP_BANK(config, m_rom_port_banks, 0); + ADDRESS_MAP_BANK(config, m_rom_port_banks); m_rom_port_banks->set_map(&intellec4_state::intellec4_rom_port_banks); m_rom_port_banks->set_endianness(ENDIANNESS_LITTLE); m_rom_port_banks->set_data_width(8); m_rom_port_banks->set_addr_width(14); m_rom_port_banks->set_stride(0x1000); - INTEL_IMM6_76(config, m_prom_programmer, 0); + INTEL_IMM6_76(config, m_prom_programmer); RS232_PORT(config, m_tty, default_rs232_devices, "terminal"); m_tty->set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(tty)); m_tty->set_option_device_input_defaults("null_modem", DEVICE_INPUT_DEFAULTS_NAME(tty)); - INTELLEC4_UNIV_BUS(config, m_bus, 518000. / 7); + INTELLEC4_UNIV_BUS(config, m_bus, XTAL::u(518000) / 7); m_bus->set_rom_space(m_program_banks, AS_PROGRAM); m_bus->set_rom_ports_space(m_rom_port_banks, AS_PROGRAM); m_bus->set_memory_space(m_cpu, mcs40_cpu_device_base::AS_RAM_MEMORY); diff --git a/src/mame/intel/intellec8.cpp b/src/mame/intel/intellec8.cpp index fc44782d178..9570be01b00 100644 --- a/src/mame/intel/intellec8.cpp +++ b/src/mame/intel/intellec8.cpp @@ -60,7 +60,7 @@ void intlc8_state::machine_start() void intlc8_state::intlc8(machine_config &config) { /* basic machine hardware */ - I8008(config, m_maincpu, 800000); // no idea of clock + I8008(config, m_maincpu, XTAL::u(800000)); // no idea of clock m_maincpu->set_addrmap(AS_PROGRAM, &intlc8_state::mem_map); m_maincpu->set_addrmap(AS_IO, &intlc8_state::io_map); } diff --git a/src/mame/intel/ipc.cpp b/src/mame/intel/ipc.cpp index d5918bd0dfd..a410eaf99c5 100644 --- a/src/mame/intel/ipc.cpp +++ b/src/mame/intel/ipc.cpp @@ -99,7 +99,7 @@ void ipc_state::ipc(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &ipc_state::mem_map); m_maincpu->set_addrmap(AS_IO, &ipc_state::io_map); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(XTAL(19'660'800) / 16); pit.set_clk<1>(XTAL(19'660'800) / 16); pit.set_clk<2>(XTAL(19'660'800) / 16); @@ -108,7 +108,7 @@ void ipc_state::ipc(machine_config &config) pit.out_handler<1>().set("uart2", FUNC(i8251_device::write_txc)); pit.out_handler<1>().append("uart2", FUNC(i8251_device::write_rxc)); - i8251_device &uart1(I8251(config, "uart1", 0)); // 8 data bits, no parity, 1 stop bit, 9600 baud + i8251_device &uart1(I8251(config, "uart1")); // 8 data bits, no parity, 1 stop bit, 9600 baud uart1.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); uart1.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr)); uart1.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -118,7 +118,7 @@ void ipc_state::ipc(machine_config &config) rs232a.dsr_handler().set("uart1", FUNC(i8251_device::write_dsr)); rs232a.cts_handler().set("uart1", FUNC(i8251_device::write_cts)); - i8251_device &uart2(I8251(config, "uart2", 0)); // 8 data bits, no parity, 2 stop bits, 2400 baud + i8251_device &uart2(I8251(config, "uart2")); // 8 data bits, no parity, 2 stop bits, 2400 baud uart2.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); uart2.dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr)); uart2.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/intel/ipds.cpp b/src/mame/intel/ipds.cpp index 0d7c7bdca24..957e76f8963 100644 --- a/src/mame/intel/ipds.cpp +++ b/src/mame/intel/ipds.cpp @@ -154,7 +154,7 @@ void ipds_state::ipds(machine_config &config) m_crtc->set_character_width(6); m_crtc->set_display_callback(FUNC(ipds_state::crtc_display_pixels)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(ipds_state::kbd_put)); } diff --git a/src/mame/intel/isbc.cpp b/src/mame/intel/isbc.cpp index d64c9e5293c..8b2d3024177 100644 --- a/src/mame/intel/isbc.cpp +++ b/src/mame/intel/isbc.cpp @@ -354,10 +354,10 @@ void isbc_state::isbc86(machine_config &config) m_maincpu->set_addrmap(AS_IO, &isbc_state::isbc_io); m_maincpu->set_irq_acknowledge_callback("pic_0", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic_0, 0); + PIC8259(config, m_pic_0); m_pic_0->out_int_callback().set_inputline(m_maincpu, 0); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(XTAL(22'118'400)/18); pit.out_handler<0>().set(m_pic_0, FUNC(pic8259_device::ir0_w)); pit.set_clk<1>(XTAL(22'118'400)/18); @@ -366,7 +366,7 @@ void isbc_state::isbc86(machine_config &config) I8255A(config, "ppi"); - I8251(config, m_uart8251, 0); + I8251(config, m_uart8251); m_uart8251->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_uart8251->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_uart8251->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -388,10 +388,10 @@ void isbc_state::rpc86(machine_config &config) m_maincpu->set_addrmap(AS_IO, &isbc_state::rpc86_io); m_maincpu->set_irq_acknowledge_callback("pic_0", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic_0, 0); + PIC8259(config, m_pic_0); m_pic_0->out_int_callback().set_inputline(m_maincpu, 0); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(XTAL(22'118'400)/18); pit.out_handler<0>().set(m_pic_0, FUNC(pic8259_device::ir2_w)); pit.set_clk<1>(XTAL(22'118'400)/144); @@ -400,7 +400,7 @@ void isbc_state::rpc86(machine_config &config) I8255A(config, "ppi"); - I8251(config, m_uart8251, 0); + I8251(config, m_uart8251); m_uart8251->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_uart8251->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_uart8251->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -414,10 +414,10 @@ void isbc_state::rpc86(machine_config &config) rs232.dsr_handler().set(m_uart8251, FUNC(i8251_device::write_dsr)); rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(isbc286_terminal)); - ISBX_SLOT(config, m_sbx[0], 0, isbx_cards, nullptr); + ISBX_SLOT(config, m_sbx[0], isbx_cards, nullptr); //m_sbx[0]->mintr0().set("pic_0", FUNC(pic8259_device::ir3_w)); //m_sbx[0]->mintr1().set("pic_0", FUNC(pic8259_device::ir4_w)); - ISBX_SLOT(config, m_sbx[1], 0, isbx_cards, nullptr); + ISBX_SLOT(config, m_sbx[1], isbx_cards, nullptr); //m_sbx[1]->mintr0().set("pic_0", FUNC(pic8259_device::ir5_w)); //m_sbx[1]->mintr1().set("pic_0", FUNC(pic8259_device::ir6_w)); } @@ -428,7 +428,7 @@ void isbc_state::isbc8605(machine_config &config) m_maincpu->set_addrmap(AS_IO, &isbc_state::isbc8605_io); - ISBC_208(config, "isbc_208", 0, m_maincpu).irq_callback().set(m_pic_0, FUNC(pic8259_device::ir5_w)); + ISBC_208(config, "isbc_208", m_maincpu).irq_callback().set(m_pic_0, FUNC(pic8259_device::ir5_w)); } void isbc_state::isbc8630(machine_config &config) @@ -437,7 +437,7 @@ void isbc_state::isbc8630(machine_config &config) m_maincpu->set_addrmap(AS_IO, &isbc_state::isbc8630_io); - ISBC_215G(config, "isbc_215g", 0, 0x100, m_maincpu).irq_callback().set(m_pic_0, FUNC(pic8259_device::ir5_w)); + ISBC_215G(config, "isbc_215g", 0x100, m_maincpu).irq_callback().set(m_pic_0, FUNC(pic8259_device::ir5_w)); LS259(config, m_statuslatch); // U14 // m_statuslatch->q_out_cb<0>().set("pit", FUNC(pit8253_device::write_gate0)); @@ -459,16 +459,16 @@ void isbc_state::isbc286(machine_config &config) m_maincpu->set_addrmap(AS_IO, &isbc_state::isbc286_io); m_maincpu->set_irq_acknowledge_callback("pic_0", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic_0, 0); + PIC8259(config, m_pic_0); m_pic_0->out_int_callback().set_inputline(m_maincpu, 0); m_pic_0->in_sp_callback().set_constant(1); m_pic_0->read_slave_ack_callback().set(FUNC(isbc_state::get_slave_ack)); - PIC8259(config, m_pic_1, 0); + PIC8259(config, m_pic_1); m_pic_1->out_int_callback().set(m_pic_0, FUNC(pic8259_device::ir7_w)); m_pic_1->in_sp_callback().set_constant(0); - pit8254_device &pit(PIT8254(config, "pit", 0)); + pit8254_device &pit(PIT8254(config, "pit")); pit.set_clk<0>(XTAL(22'118'400)/18); pit.out_handler<0>().set(m_pic_0, FUNC(pic8259_device::ir0_w)); pit.set_clk<1>(XTAL(22'118'400)/18); @@ -486,7 +486,7 @@ void isbc_state::isbc286(machine_config &config) m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit7)); m_centronics->fault_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit6)); - INPUT_BUFFER(config, m_cent_status_in, 0); + INPUT_BUFFER(config, m_cent_status_in); output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); @@ -523,14 +523,14 @@ void isbc_state::isbc286(machine_config &config) rs232b.cts_handler().set(m_uart8274, FUNC(i8274_device::ctsb_w)); rs232b.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(isbc286_terminal)); - ISBX_SLOT(config, m_sbx[0], 0, isbx_cards, nullptr); + ISBX_SLOT(config, m_sbx[0], isbx_cards, nullptr); m_sbx[0]->mintr0().set("pic_1", FUNC(pic8259_device::ir3_w)); m_sbx[0]->mintr1().set("pic_1", FUNC(pic8259_device::ir4_w)); - ISBX_SLOT(config, m_sbx[1], 0, isbx_cards, nullptr); + ISBX_SLOT(config, m_sbx[1], isbx_cards, nullptr); m_sbx[1]->mintr0().set("pic_1", FUNC(pic8259_device::ir5_w)); m_sbx[1]->mintr1().set("pic_1", FUNC(pic8259_device::ir6_w)); - ISBC_215G(config, "isbc_215g", 0, 0x100, m_maincpu).irq_callback().set(m_pic_0, FUNC(pic8259_device::ir5_w)); + ISBC_215G(config, "isbc_215g", 0x100, m_maincpu).irq_callback().set(m_pic_0, FUNC(pic8259_device::ir5_w)); } void isbc_state::isbc2861(machine_config &config) @@ -547,7 +547,7 @@ void isbc_state::sm1810(machine_config &config) m_maincpu->set_addrmap(AS_IO, &isbc_state::sm1810_io); m_uart8251->dtr_handler().set(m_uart8251, FUNC(i8251_device::write_dsr)); - isbc_215g_device &isbc215(ISBC_215G(config, "isbc_215g", 0, 0xefe0, m_maincpu)); + isbc_215g_device &isbc215(ISBC_215G(config, "isbc_215g", 0xefe0, m_maincpu)); isbc215.irq_callback().set(m_pic_0, FUNC(pic8259_device::ir5_w)); isbc215.subdevice("sbx2")->set_option_machine_config("fdc_218a", cfg_fdc_qd); diff --git a/src/mame/intel/isbc8010.cpp b/src/mame/intel/isbc8010.cpp index c68cb41c9c2..d62e4339fcc 100644 --- a/src/mame/intel/isbc8010.cpp +++ b/src/mame/intel/isbc8010.cpp @@ -177,7 +177,7 @@ void isbc8010_state::isbc8010(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &isbc8010_state::isbc8010_mem); m_maincpu->set_addrmap(AS_IO, &isbc8010_state::isbc8010_io); - I8251(config, m_usart, 0); + I8251(config, m_usart); m_usart->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); m_usart->dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); m_usart->rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); @@ -217,7 +217,7 @@ void isbc8010_state::isbc8010(machine_config &config) // PALETTE(config, "palette", palette_device::MONOCHROME); // Video board UART -// ay31015_device &hd6402(AY31015(config, "hd6402", 0)); +// ay31015_device &hd6402(AY31015(config, "hd6402")); // MCFG_AY31015_TX_CLOCK(( XTAL(16'000'000) / 16 ) / 256) // MCFG_AY31015_RX_CLOCK(( XTAL(16'000'000) / 16 ) / 256) // hd6402.read_si_callback().set(FUNC(sdk80_state::nascom1_hd6402_si)); @@ -228,7 +228,7 @@ void isbc8010_state::isbc8010(machine_config &config) // uart_clock.signal_handler().append("hd6402", FUNC(ay31015_device::write_rcp)); /* Devices */ -// i8279_device &kbdc(I8279(config, "i8279", 3100000)); // based on divider +// i8279_device &kbdc(I8279(config, "i8279", XTAL::u(3100000))); // based on divider // kbdc.out_irq_callback().set_inputline("maincpu", I8085_RST55_LINE); // irq // kbdc.out_sl_callback().set(FUNC(sdk80_state::scanlines_w)); // scan SL lines // kbdc.out_disp_callback().set(FUNC(sdk80_state::digit_w)); // display A&B diff --git a/src/mame/intel/isbc8030.cpp b/src/mame/intel/isbc8030.cpp index b0a7188e509..372c5e404a9 100644 --- a/src/mame/intel/isbc8030.cpp +++ b/src/mame/intel/isbc8030.cpp @@ -92,10 +92,10 @@ void isbc8030_state::isbc8030(machine_config &config) m_maincpu->set_addrmap(AS_IO, &isbc8030_state::isbc8030_io); m_maincpu->in_inta_func().set(m_pic, FUNC(pic8259_device::acknowledge)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(XTAL(22'118'400) / 18); m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir0_w)); m_pit->set_clk<1>(XTAL(22'118'400) / 18); @@ -103,12 +103,12 @@ void isbc8030_state::isbc8030(machine_config &config) m_pit->out_handler<2>().set(m_usart, FUNC(i8251_device::write_rxc)); m_pit->out_handler<2>().append(m_usart, FUNC(i8251_device::write_txc)); - I8251(config, m_usart, 0); + I8251(config, m_usart); m_usart->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_usart->dtr_handler().set(m_rs232, FUNC(rs232_port_device::write_dtr)); m_usart->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts)); - I8255A(config, m_ppi, 0); + I8255A(config, m_ppi); RS232_PORT(config, m_rs232, default_rs232_devices, "terminal"); m_rs232->rxd_handler().set(m_usart, FUNC(i8251_device::write_rxd)); diff --git a/src/mame/intel/isbc_208.cpp b/src/mame/intel/isbc_208.cpp index 38128956d42..8cdf41d6bba 100644 --- a/src/mame/intel/isbc_208.cpp +++ b/src/mame/intel/isbc_208.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(ISBC_208, isbc_208_device, "isbc_208", "ISBC 208 Flexible Disk Driver Controller") -isbc_208_device::isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isbc_208_device::isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISBC_208, tag, owner, clock), m_maincpu(*this, finder_base::DUMMY_TAG), m_dmac(*this, "dmac"), @@ -115,7 +115,7 @@ void isbc_208_device::device_reset() m_seg = 0; // set from jumper all drives must be same type if(m_fdc->subdevice("0")->get_device()->get_form_factor() == floppy_image::FF_8) - m_fdc->set_rate(500000); + m_fdc->set_rate(XTAL::u(500000)); } void isbc_208_device::device_start() diff --git a/src/mame/intel/isbc_208.h b/src/mame/intel/isbc_208.h index 93383fe4ee7..17816c5a0e6 100644 --- a/src/mame/intel/isbc_208.h +++ b/src/mame/intel/isbc_208.h @@ -13,13 +13,13 @@ class isbc_208_device : public device_t { public: template - isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) - : isbc_208_device(mconfig, tag, owner, clock) + isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) + : isbc_208_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); } - isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isbc_208_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); uint8_t stat_r(offs_t offset); diff --git a/src/mame/intel/rex6000.cpp b/src/mame/intel/rex6000.cpp index 510860aa2bb..e262dcde4e5 100644 --- a/src/mame/intel/rex6000.cpp +++ b/src/mame/intel/rex6000.cpp @@ -957,7 +957,7 @@ void rex6000_state::rex6000(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep).add_route(ALL_OUTPUTS, "mono", 1.00); } void oz750_state::oz750(machine_config &config) @@ -1012,7 +1012,7 @@ void oz750_state::oz750(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep).add_route(ALL_OUTPUTS, "mono", 1.00); } /* ROM definition */ diff --git a/src/mame/intel/sdk80.cpp b/src/mame/intel/sdk80.cpp index 02ec7cbabde..06e21cc5a18 100644 --- a/src/mame/intel/sdk80.cpp +++ b/src/mame/intel/sdk80.cpp @@ -127,7 +127,7 @@ void sdk80_state::sdk80(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sdk80_state::sdk80_mem); m_maincpu->set_addrmap(AS_IO, &sdk80_state::sdk80_io); - I8251(config, m_usart, 0); + I8251(config, m_usart); m_usart->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); m_usart->dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); m_usart->rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/intel/sdk86.cpp b/src/mame/intel/sdk86.cpp index 23f538d8fde..5edf8efe7e3 100644 --- a/src/mame/intel/sdk86.cpp +++ b/src/mame/intel/sdk86.cpp @@ -185,7 +185,7 @@ void sdk86_state::sdk86(machine_config &config) config.set_default_layout(layout_sdk86); /* Devices */ - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_uart->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_uart->rts_handler().set(m_uart, FUNC(i8251_device::write_cts)); @@ -200,7 +200,7 @@ void sdk86_state::sdk86(machine_config &config) usart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); usart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); - I8279(config, m_kdc, 2500000); // based on divider + I8279(config, m_kdc, XTAL::u(2500000)); // based on divider m_kdc->out_sl_callback().set(FUNC(sdk86_state::scanlines_w)); // scan SL lines m_kdc->out_disp_callback().set(FUNC(sdk86_state::digit_w)); // display A&B m_kdc->in_rl_callback().set(FUNC(sdk86_state::kbd_r)); // kbd RL lines diff --git a/src/mame/intergraph/interpro.cpp b/src/mame/intergraph/interpro.cpp index 3ca5c542805..745ac8e238a 100644 --- a/src/mame/intergraph/interpro.cpp +++ b/src/mame/intergraph/interpro.cpp @@ -1165,14 +1165,14 @@ void interpro_state::ioga(machine_config &config) void interpro_state::interpro(machine_config &config) { - RAM(config, m_ram, 0); + RAM(config, m_ram); m_ram->set_default_size("16M"); m_ram->set_extra_options("32M,64M,128M,256M"); // memory control gate array // srx gate array - INTERPRO_SGA(config, m_sga, 0); + INTERPRO_SGA(config, m_sga); m_sga->berr_callback().set(m_ioga, FUNC(interpro_ioga_device::bus_error)); // floppy @@ -1185,22 +1185,22 @@ void interpro_state::interpro(machine_config &config) m_rtc->irq().set(m_ioga, FUNC(interpro_ioga_device::ir9_w)); // scsi bus and devices - NSCSI_BUS(config, m_scsibus, 0); + NSCSI_BUS(config, m_scsibus); - nscsi_connector &harddisk(NSCSI_CONNECTOR(config, "scsi:0", 0)); + nscsi_connector &harddisk(NSCSI_CONNECTOR(config, "scsi:0")); interpro_scsi_devices(harddisk); harddisk.set_default_option("harddisk"); - nscsi_connector &cdrom(NSCSI_CONNECTOR(config, "scsi:4", 0)); + nscsi_connector &cdrom(NSCSI_CONNECTOR(config, "scsi:4")); interpro_scsi_devices(cdrom); cdrom.set_default_option("cdrom"); cdrom.set_option_machine_config("cdrom", interpro_cdrom); - interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:1", 0)); - interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:2", 0)); - interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:3", 0)); - interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:5", 0)); - interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:6", 0)); + interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:1")); + interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:2")); + interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:3")); + interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:5")); + interpro_scsi_devices(NSCSI_CONNECTOR(config, "scsi:6")); // ethernet @@ -1223,10 +1223,10 @@ void emerald_state::emerald(machine_config &config) m_maincpu->set_addrmap(2, &emerald_state::interpro_boot_map); m_maincpu->set_irq_acknowledge_callback(m_ioga, FUNC(interpro_ioga_device::acknowledge_interrupt)); - CAMMU_C3(config, m_i_cammu, 0); + CAMMU_C3(config, m_i_cammu); m_i_cammu->exception_callback().set(m_maincpu, FUNC(clipper_device::set_exception)); - CAMMU_C3(config, m_d_cammu, 0); + CAMMU_C3(config, m_d_cammu); m_d_cammu->exception_callback().set(m_maincpu, FUNC(clipper_device::set_exception)); m_d_cammu->add_linked(m_i_cammu); @@ -1234,7 +1234,7 @@ void emerald_state::emerald(machine_config &config) m_ram->set_default_value(0); // memory control gate array - INTERPRO_MCGA(config, m_mcga, 0); + INTERPRO_MCGA(config, m_mcga); // floppy controller I82072(config, m_fdc, 24_MHz_XTAL); @@ -1252,7 +1252,7 @@ void emerald_state::emerald(machine_config &config) interpro_serial(config); // scsi host adapter - nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7", 0)); + nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7")); adapter.option_add_internal("host", NCR53C90A); adapter.set_default_option("host"); adapter.set_fixed(true); @@ -1264,12 +1264,12 @@ void emerald_state::emerald(machine_config &config) m_eth->set_addrmap(0, &emerald_state::interpro_82586_map); // i/o gate array - EMERALD_IOGA(config, m_ioga, 0); + EMERALD_IOGA(config, m_ioga); m_ioga->set_memory(m_maincpu, 0); ioga(config); // srx bus - SRX_BUS(config, m_bus, 0); + SRX_BUS(config, m_bus); m_bus->set_main_space(m_maincpu, 0); m_bus->set_io_space(m_maincpu, 1); @@ -1289,10 +1289,10 @@ void turquoise_state::turquoise(machine_config &config) m_maincpu->set_addrmap(2, &turquoise_state::interpro_boot_map); m_maincpu->set_irq_acknowledge_callback(m_ioga, FUNC(interpro_ioga_device::acknowledge_interrupt)); - CAMMU_C3(config, m_i_cammu, 0); + CAMMU_C3(config, m_i_cammu); m_i_cammu->exception_callback().set(m_maincpu, FUNC(clipper_device::set_exception)); - CAMMU_C3(config, m_d_cammu, 0); + CAMMU_C3(config, m_d_cammu); m_d_cammu->exception_callback().set(m_maincpu, FUNC(clipper_device::set_exception)); m_d_cammu->add_linked(m_i_cammu); @@ -1300,7 +1300,7 @@ void turquoise_state::turquoise(machine_config &config) m_ram->set_default_value(0); // memory control gate array - INTERPRO_MCGA(config, m_mcga, 0); + INTERPRO_MCGA(config, m_mcga); // floppy controller I82072(config, m_fdc, 24_MHz_XTAL); @@ -1326,7 +1326,7 @@ void turquoise_state::turquoise(machine_config &config) m_mse_port->state_func().set(m_ioga, FUNC(interpro_ioga_device::mouse_status_w)); // scsi host adapter - nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7", 0)); + nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7")); adapter.option_add_internal("host", NCR53C90A); adapter.set_default_option("host"); adapter.set_fixed(true); @@ -1338,12 +1338,12 @@ void turquoise_state::turquoise(machine_config &config) m_eth->set_addrmap(0, &turquoise_state::interpro_82586_map); // i/o gate array - TURQUOISE_IOGA(config, m_ioga, 0); + TURQUOISE_IOGA(config, m_ioga); m_ioga->set_memory(m_maincpu, 0); ioga(config); // cbus bus - CBUS_BUS(config, m_bus, 0); + CBUS_BUS(config, m_bus); m_bus->set_main_space(m_maincpu, 0); m_bus->set_io_space(m_maincpu, 1); @@ -1364,11 +1364,11 @@ void sapphire_state::sapphire(machine_config &config) m_maincpu->set_irq_acknowledge_callback(m_ioga, FUNC(interpro_ioga_device::acknowledge_interrupt)); // FIXME: 2400/6400 should be C4T cammu? - CAMMU_C4I(config, m_mmu, 0); + CAMMU_C4I(config, m_mmu); m_mmu->exception_callback().set(m_maincpu, FUNC(clipper_device::set_exception)); // memory control gate array - INTERPRO_FMCC(config, m_mcga, 0); + INTERPRO_FMCC(config, m_mcga); // floppy controller N82077AA(config, m_fdc, 24_MHz_XTAL, n82077aa_device::mode_t::PS2); @@ -1379,7 +1379,7 @@ void sapphire_state::sapphire(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:1", "35hd", FLOPPY_35_HD, true, floppy_image_device::default_mfm_floppy_formats).enable_sound(false); // srx arbiter gate array - INTERPRO_ARBGA(config, m_arbga, 0); + INTERPRO_ARBGA(config, m_arbga); // serial controllers and ports SCC85230(config, m_scc1, 4.9152_MHz_XTAL); @@ -1387,7 +1387,7 @@ void sapphire_state::sapphire(machine_config &config) interpro_serial(config); // scsi host adapter - nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7", 0)); + nscsi_connector &adapter(NSCSI_CONNECTOR(config, "scsi:7")); adapter.option_add_internal("host", NCR53C94); adapter.set_default_option("host"); adapter.set_fixed(true); @@ -1399,7 +1399,7 @@ void sapphire_state::sapphire(machine_config &config) m_eth->set_addrmap(0, &sapphire_state::interpro_82596_map); // i/o gate array - SAPPHIRE_IOGA(config, m_ioga, 0); + SAPPHIRE_IOGA(config, m_ioga); m_ioga->set_memory(m_maincpu, 0); ioga(config); @@ -1416,8 +1416,8 @@ void turquoise_state::ip2000(machine_config &config) m_kbd_port->set_default_option("lle_en_us"); m_mse_port->set_default_option("interpro_mouse"); - CBUS_SLOT(config, "slot:0", 0, m_bus, cbus_cards, "mpcb963", false); - CBUS_SLOT(config, "slot:1", 0, m_bus, cbus_cards, nullptr, false); + CBUS_SLOT(config, "slot:0", m_bus, cbus_cards, "mpcb963", false); + CBUS_SLOT(config, "slot:1", m_bus, cbus_cards, nullptr, false); m_softlist->set_filter("2000"); } @@ -1436,7 +1436,7 @@ void cbus_sapphire_state::cbus_sapphire(machine_config &config) m_mse_port->state_func().set(m_ioga, FUNC(interpro_ioga_device::mouse_status_w)); // cbus bus - CBUS_BUS(config, m_bus, 0); + CBUS_BUS(config, m_bus); m_bus->set_main_space(m_maincpu, 0); m_bus->set_io_space(m_maincpu, 1); @@ -1451,7 +1451,7 @@ void srx_sapphire_state::srx_sapphire(machine_config &config) sapphire(config); // srx bus - SRX_BUS(config, m_bus, 0); + SRX_BUS(config, m_bus); m_bus->set_main_space(m_maincpu, 0); m_bus->set_io_space(m_maincpu, 1); @@ -1472,8 +1472,8 @@ void cbus_sapphire_state::ip2400(machine_config &config) m_kbd_port->set_default_option("lle_en_us"); m_mse_port->set_default_option("interpro_mouse"); - CBUS_SLOT(config, "slot:0", 0, m_bus, cbus_cards, "msmt070", false); - CBUS_SLOT(config, "slot:1", 0, m_bus, cbus_cards, nullptr, false); + CBUS_SLOT(config, "slot:0", m_bus, cbus_cards, "msmt070", false); + CBUS_SLOT(config, "slot:1", m_bus, cbus_cards, nullptr, false); m_softlist->set_filter("2400"); } @@ -1490,8 +1490,8 @@ void cbus_sapphire_state::ip2500(machine_config &config) m_kbd_port->set_default_option("lle_en_us"); m_mse_port->set_default_option("interpro_mouse"); - CBUS_SLOT(config, "slot:0", 0, m_bus, cbus_cards, "msmt070", false); - CBUS_SLOT(config, "slot:1", 0, m_bus, cbus_cards, nullptr, false); + CBUS_SLOT(config, "slot:0", m_bus, cbus_cards, "msmt070", false); + CBUS_SLOT(config, "slot:1", m_bus, cbus_cards, nullptr, false); m_softlist->set_filter("2500"); } @@ -1507,8 +1507,8 @@ void cbus_sapphire_state::ip2700(machine_config &config) m_kbd_port->set_default_option("lle_en_us"); m_mse_port->set_default_option("interpro_mouse"); - CBUS_SLOT(config, "slot:0", 0, m_bus, cbus_cards, "msmt070", false); - CBUS_SLOT(config, "slot:1", 0, m_bus, cbus_cards, nullptr, false); + CBUS_SLOT(config, "slot:0", m_bus, cbus_cards, "msmt070", false); + CBUS_SLOT(config, "slot:1", m_bus, cbus_cards, nullptr, false); m_softlist->set_filter("2700"); } @@ -1525,8 +1525,8 @@ void cbus_sapphire_state::ip2800(machine_config &config) m_kbd_port->set_default_option("lle_en_us"); m_mse_port->set_default_option("interpro_mouse"); - CBUS_SLOT(config, "slot:0", 0, m_bus, cbus_cards, "msmt070", false); - CBUS_SLOT(config, "slot:1", 0, m_bus, cbus_cards, nullptr, false); + CBUS_SLOT(config, "slot:0", m_bus, cbus_cards, "msmt070", false); + CBUS_SLOT(config, "slot:1", m_bus, cbus_cards, nullptr, false); m_softlist->set_filter("2800"); } @@ -1536,10 +1536,10 @@ void emerald_state::ip6000(machine_config &config) emerald(config); // default is 6040 with EDGE-1 graphics - SRX_SLOT(config, "slot:1", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:2", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:3", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:4", 0, m_bus, srx_cards, "mpcb828", false); + SRX_SLOT(config, "slot:1", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:2", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:3", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:4", m_bus, srx_cards, "mpcb828", false); m_softlist->set_filter("6000"); } @@ -1552,14 +1552,14 @@ void srx_sapphire_state::ip6400(machine_config &config) m_mmu->set_cammu_id(cammu_c4i_device::CID_C4IR0); // default is 6450 with GT II graphics - SRX_SLOT(config, "slot:1", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:2", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:3", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:4", 0, m_bus, srx_cards, "mpcbb68", false); + SRX_SLOT(config, "slot:1", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:2", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:3", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:4", m_bus, srx_cards, "mpcbb68", false); // EDGE-2 graphics (6480) - //SRX_SLOT(config, "slot:3", 0, m_bus, srx_cards, "mpcb030", false); - //SRX_SLOT(config, "slot:4", 0, m_bus, srx_cards, "mpcba63", false); + //SRX_SLOT(config, "slot:3", m_bus, srx_cards, "mpcb030", false); + //SRX_SLOT(config, "slot:4", m_bus, srx_cards, "mpcba63", false); m_softlist->set_filter("6400"); } @@ -1573,10 +1573,10 @@ void srx_sapphire_state::ip6700(machine_config &config) m_mmu->set_cammu_id(cammu_c4i_device::CID_C4IR2); // default is 6780 with EDGE-2 Plus graphics - SRX_SLOT(config, "slot:1", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:2", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:3", 0, m_bus, srx_cards, "msmt094", false); - SRX_SLOT(config, "slot:4", 0, m_bus, srx_cards, "mpcb896", false); + SRX_SLOT(config, "slot:1", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:2", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:3", m_bus, srx_cards, "msmt094", false); + SRX_SLOT(config, "slot:4", m_bus, srx_cards, "mpcb896", false); m_softlist->set_filter("6700"); } @@ -1590,10 +1590,10 @@ void srx_sapphire_state::ip6800(machine_config &config) m_mmu->set_cammu_id(cammu_c4i_device::CID_C4IR2); // default is 6880 with EDGE-2 Plus graphics - SRX_SLOT(config, "slot:1", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:2", 0, m_bus, srx_cards, nullptr, false); - SRX_SLOT(config, "slot:3", 0, m_bus, srx_cards, "msmt094", false); - SRX_SLOT(config, "slot:4", 0, m_bus, srx_cards, "mpcb896", false); + SRX_SLOT(config, "slot:1", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:2", m_bus, srx_cards, nullptr, false); + SRX_SLOT(config, "slot:3", m_bus, srx_cards, "msmt094", false); + SRX_SLOT(config, "slot:4", m_bus, srx_cards, "mpcb896", false); m_softlist->set_filter("6800"); } diff --git a/src/mame/intergraph/interpro_arbga.cpp b/src/mame/intergraph/interpro_arbga.cpp index 5c7508182bd..a642d034ad8 100644 --- a/src/mame/intergraph/interpro_arbga.cpp +++ b/src/mame/intergraph/interpro_arbga.cpp @@ -61,7 +61,7 @@ void interpro_arbga_device::map(address_map &map) DEFINE_DEVICE_TYPE(INTERPRO_ARBGA, interpro_arbga_device, "arbga", "SRX Arbiter Gate Array") -interpro_arbga_device::interpro_arbga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +interpro_arbga_device::interpro_arbga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTERPRO_ARBGA, tag, owner, clock) { } diff --git a/src/mame/intergraph/interpro_arbga.h b/src/mame/intergraph/interpro_arbga.h index f5b95fd7704..26efb023db7 100644 --- a/src/mame/intergraph/interpro_arbga.h +++ b/src/mame/intergraph/interpro_arbga.h @@ -9,7 +9,7 @@ class interpro_arbga_device : public device_t { public: - interpro_arbga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + interpro_arbga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map); diff --git a/src/mame/intergraph/interpro_ioga.cpp b/src/mame/intergraph/interpro_ioga.cpp index 22e493c4f93..a59dcaff5e3 100644 --- a/src/mame/intergraph/interpro_ioga.cpp +++ b/src/mame/intergraph/interpro_ioga.cpp @@ -131,7 +131,7 @@ DEFINE_DEVICE_TYPE(EMERALD_IOGA, emerald_ioga_device, "ioga_e", "I/O Gate Array DEFINE_DEVICE_TYPE(TURQUOISE_IOGA, turquoise_ioga_device, "ioga_t", "I/O Gate Array (Turquoise)") DEFINE_DEVICE_TYPE(SAPPHIRE_IOGA, sapphire_ioga_device, "ioga_s", "I/O Gate Array (Sapphire)") -interpro_ioga_device::interpro_ioga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +interpro_ioga_device::interpro_ioga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_memory_space(*this, finder_base::DUMMY_TAG, -1, 32) , m_out_nmi_func(*this) @@ -152,17 +152,17 @@ interpro_ioga_device::interpro_ioga_device(const machine_config &mconfig, device { } -emerald_ioga_device::emerald_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +emerald_ioga_device::emerald_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : interpro_ioga_device(mconfig, EMERALD_IOGA, tag, owner, clock) { } -turquoise_ioga_device::turquoise_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +turquoise_ioga_device::turquoise_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : interpro_ioga_device(mconfig, TURQUOISE_IOGA, tag, owner, clock) { } -sapphire_ioga_device::sapphire_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sapphire_ioga_device::sapphire_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : interpro_ioga_device(mconfig, SAPPHIRE_IOGA, tag, owner, clock) { std::fill(std::begin(m_swicr), std::end(m_swicr), 0); diff --git a/src/mame/intergraph/interpro_ioga.h b/src/mame/intergraph/interpro_ioga.h index 90a63f17013..511f33e334a 100644 --- a/src/mame/intergraph/interpro_ioga.h +++ b/src/mame/intergraph/interpro_ioga.h @@ -9,7 +9,7 @@ class interpro_ioga_device : public device_t { protected: - interpro_ioga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + interpro_ioga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); enum interrupt_type { @@ -377,7 +377,7 @@ private: class emerald_ioga_device : public interpro_ioga_device { public: - emerald_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + emerald_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -419,7 +419,7 @@ private: class turquoise_ioga_device : public interpro_ioga_device { public: - turquoise_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + turquoise_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -461,7 +461,7 @@ private: class sapphire_ioga_device : public interpro_ioga_device { public: - sapphire_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sapphire_ioga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; diff --git a/src/mame/intergraph/interpro_mcga.cpp b/src/mame/intergraph/interpro_mcga.cpp index f50c293821d..3e922ac9591 100644 --- a/src/mame/intergraph/interpro_mcga.cpp +++ b/src/mame/intergraph/interpro_mcga.cpp @@ -50,17 +50,17 @@ void interpro_fmcc_device::map(address_map &map) DEFINE_DEVICE_TYPE(INTERPRO_MCGA, interpro_mcga_device, "mcga", "Memory Controller Gate Array") DEFINE_DEVICE_TYPE(INTERPRO_FMCC, interpro_fmcc_device, "fmcc", "Fast Memory Control Chip") -interpro_mcga_device::interpro_mcga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +interpro_mcga_device::interpro_mcga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } -interpro_mcga_device::interpro_mcga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +interpro_mcga_device::interpro_mcga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : interpro_mcga_device(mconfig, INTERPRO_MCGA, tag, owner, clock) { } -interpro_fmcc_device::interpro_fmcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +interpro_fmcc_device::interpro_fmcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : interpro_mcga_device(mconfig, INTERPRO_FMCC, tag, owner, clock) { } diff --git a/src/mame/intergraph/interpro_mcga.h b/src/mame/intergraph/interpro_mcga.h index 9818d4d81c1..cf06a8e46dd 100644 --- a/src/mame/intergraph/interpro_mcga.h +++ b/src/mame/intergraph/interpro_mcga.h @@ -9,7 +9,7 @@ class interpro_mcga_device : public device_t { public: - interpro_mcga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + interpro_mcga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map); @@ -59,7 +59,7 @@ public: void memsize_w(u16 data) { m_memsize = data; } protected: - interpro_mcga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + interpro_mcga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -76,7 +76,7 @@ private: class interpro_fmcc_device : public interpro_mcga_device { public: - interpro_fmcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + interpro_fmcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; diff --git a/src/mame/intergraph/interpro_sga.cpp b/src/mame/intergraph/interpro_sga.cpp index 6c7eb8f21d7..29e4a319fa1 100644 --- a/src/mame/intergraph/interpro_sga.cpp +++ b/src/mame/intergraph/interpro_sga.cpp @@ -69,7 +69,7 @@ void interpro_sga_device::map(address_map &map) DEFINE_DEVICE_TYPE(INTERPRO_SGA, interpro_sga_device, "sga", "SRX Gate Array") -interpro_sga_device::interpro_sga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +interpro_sga_device::interpro_sga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INTERPRO_SGA, tag, owner, clock) , m_berr_func(*this) { diff --git a/src/mame/intergraph/interpro_sga.h b/src/mame/intergraph/interpro_sga.h index 5813e1f22ba..4e27cb2813e 100644 --- a/src/mame/intergraph/interpro_sga.h +++ b/src/mame/intergraph/interpro_sga.h @@ -9,7 +9,7 @@ class interpro_sga_device : public device_t { public: - interpro_sga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + interpro_sga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto berr_callback() { return m_berr_func.bind(); } diff --git a/src/mame/interton/vc4000.cpp b/src/mame/interton/vc4000.cpp index 4adf96c3718..860f4c289d6 100644 --- a/src/mame/interton/vc4000.cpp +++ b/src/mame/interton/vc4000.cpp @@ -529,8 +529,8 @@ static void vc4000_cart(device_slot_interface &device) void vc4000_state::vc4000(machine_config &config) { /* basic machine hardware */ -// S2650(config, m_maincpu, 865000); /* 3550000/4, 3580000/3, 4430000/3 */ - S2650(config, m_maincpu, 3546875/4); +// S2650(config, m_maincpu, XTAL::u(865000)); /* 3550000/4, 3580000/3, 4430000/3 */ + S2650(config, m_maincpu, XTAL::u(3546875)/4); m_maincpu->set_addrmap(AS_PROGRAM, &vc4000_state::vc4000_mem); m_maincpu->sense_handler().set(FUNC(vc4000_state::vc4000_vsync_r)); m_maincpu->set_periodic_int(FUNC(vc4000_state::vc4000_video_line), attotime::from_hz(312*53)); // GOLF needs this exact value @@ -548,7 +548,7 @@ void vc4000_state::vc4000(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - VC4000_SND(config, m_custom, 0).add_route(ALL_OUTPUTS, "mono", 0.50); + VC4000_SND(config, m_custom).add_route(ALL_OUTPUTS, "mono", 0.50); /* quickload */ QUICKLOAD(config, "quickload", "pgm,tvc").set_load_callback(FUNC(vc4000_state::quickload_cb)); diff --git a/src/mame/interton/vc4000_a.cpp b/src/mame/interton/vc4000_a.cpp index 9004d256635..ef05b108862 100644 --- a/src/mame/interton/vc4000_a.cpp +++ b/src/mame/interton/vc4000_a.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(VC4000_SND, vc4000_sound_device, "vc4000_sound", "Interton Electronic VC 4000 Custom Sound") -vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VC4000_SND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_channel(nullptr) @@ -65,7 +65,7 @@ void vc4000_sound_device::soundport_w(int offset, int data) m_pos = 0; m_level = true; // frequency 7874/(data+1) - m_size = machine().sample_rate() * (data + 1) /7874; + m_size = machine().sample_rate().value() * (data + 1) /7874; break; } } diff --git a/src/mame/interton/vc4000_a.h b/src/mame/interton/vc4000_a.h index 2dad7a87d27..b5eeb39ac37 100644 --- a/src/mame/interton/vc4000_a.h +++ b/src/mame/interton/vc4000_a.h @@ -20,7 +20,7 @@ class vc4000_sound_device : public device_t, public device_sound_interface { public: - vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~vc4000_sound_device() { } protected: diff --git a/src/mame/irem/irem.cpp b/src/mame/irem/irem.cpp index 5d4c27008e2..1fc154c27a0 100644 --- a/src/mame/irem/irem.cpp +++ b/src/mame/irem/irem.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(IREM_M62_AUDIO, m62_audio_device, "m62_audio", DEFINE_DEVICE_TYPE(IREM_M52_SOUNDC_AUDIO, m52_soundc_audio_device, "m52_soundc_audio", "Irem M52 SoundC Audio") DEFINE_DEVICE_TYPE(IREM_M52_LARGE_AUDIO, m52_large_audio_device, "m52_large_audio", "Irem M52 Large Audio") -irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_audio_SINH(*this, "snd_nl:sinh") , m_cpu(*this, "iremsound") @@ -36,17 +36,17 @@ irem_audio_device::irem_audio_device(const machine_config &mconfig, device_type { } -m62_audio_device::m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m62_audio_device::m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : irem_audio_device(mconfig, IREM_M62_AUDIO, tag, owner, clock) { } -m52_soundc_audio_device::m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m52_soundc_audio_device::m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : irem_audio_device(mconfig, IREM_M52_SOUNDC_AUDIO, tag, owner, clock) { } -m52_large_audio_device::m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m52_large_audio_device::m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : irem_audio_device(mconfig, IREM_M52_LARGE_AUDIO, tag, owner, clock) { } @@ -439,7 +439,7 @@ void m62_audio_device::device_add_mconfig(machine_config &config) /* NETLIST configuration using internal AY8910 resistor values */ - NETLIST_SOUND(config, "snd_nl", 48000) + NETLIST_SOUND(config, "snd_nl", XTAL::u(48000)) .set_source(netlist_kidniki) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/irem/irem.h b/src/mame/irem/irem.h index 78e52f0ece7..a3f8884cef5 100644 --- a/src/mame/irem/irem.h +++ b/src/mame/irem/irem.h @@ -26,7 +26,7 @@ public: optional_device m_audio_SINH; protected: - irem_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + irem_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -62,7 +62,7 @@ private: class m62_audio_device : public irem_audio_device { public: - m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m62_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -71,7 +71,7 @@ protected: class m52_soundc_audio_device : public irem_audio_device { public: - m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m52_soundc_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -80,7 +80,7 @@ protected: class m52_large_audio_device : public irem_audio_device { public: - m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m52_large_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/irem/m10.cpp b/src/mame/irem/m10.cpp index 40fd4a0f4e4..7400a66764a 100644 --- a/src/mame/irem/m10.cpp +++ b/src/mame/irem/m10.cpp @@ -854,7 +854,7 @@ void m10_state::m10(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_m10); PALETTE(config, m_palette, FUNC(m10_state::palette), 2 * 8); - TTL74123(config, m_ic8j1, 0); // completely illegible + TTL74123(config, m_ic8j1); // completely illegible m_ic8j1->set_connection_type(TTL74123_NOT_GROUNDED_DIODE); // the hook up type m_ic8j1->set_resistor_value(RES_K(1)); // resistor connected to RCext m_ic8j1->set_capacitor_value(CAP_U(1)); // capacitor connected to Cext and RCext @@ -863,7 +863,7 @@ void m10_state::m10(machine_config &config) m_ic8j1->set_clear_pin_value(1); // Clear pin - pulled high m_ic8j1->out_cb().set(FUNC(m10_state::ic8j1_output_changed)); - TTL74123(config, m_ic8j2, 0); + TTL74123(config, m_ic8j2); m_ic8j2->set_connection_type(TTL74123_NOT_GROUNDED_DIODE); // the hook up type // 10k + 20k variable resistor m_ic8j2->set_resistor_value(RES_K(22)); // resistor connected to RCext @@ -918,7 +918,7 @@ void m15_state::m15(machine_config &config) void m15_state::headoni(machine_config &config) { m15(config); - m_maincpu->set_clock(11730000/16); + m_maincpu->set_clock(XTAL::u(11730000)/16); } diff --git a/src/mame/irem/m10.h b/src/mame/irem/m10.h index 42b863249c5..2b8eae5f12b 100644 --- a/src/mame/irem/m10.h +++ b/src/mame/irem/m10.h @@ -16,7 +16,7 @@ #include "screen.h" #include "tilemap.h" -#define IREMM10_MASTER_CLOCK (12500000) +#define IREMM10_MASTER_CLOCK XTAL::u(12500000) #define IREMM10_CPU_CLOCK (IREMM10_MASTER_CLOCK/16) #define IREMM10_PIXEL_CLOCK (IREMM10_MASTER_CLOCK/2) @@ -27,7 +27,7 @@ #define IREMM10_VBSTART (240) #define IREMM10_VBEND (16) -#define IREMM15_MASTER_CLOCK (11730000) +#define IREMM15_MASTER_CLOCK XTAL::u(11730000) #define IREMM15_CPU_CLOCK (IREMM15_MASTER_CLOCK/10) #define IREMM15_PIXEL_CLOCK (IREMM15_MASTER_CLOCK/2) diff --git a/src/mame/irem/m107.cpp b/src/mame/irem/m107.cpp index 7e05273ba80..5c65d6bf68e 100644 --- a/src/mame/irem/m107.cpp +++ b/src/mame/irem/m107.cpp @@ -747,7 +747,7 @@ void m107_state::firebarr(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &m107_state::sound_map); m_soundcpu->set_decryption_table(rtypeleo_decryption_table); - PIC8259(config, m_upd71059c, 0); + PIC8259(config, m_upd71059c); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); TIMER(config, "scantimer").configure_scanline(FUNC(m107_state::scanline_interrupt), "screen", 0, 1); @@ -791,7 +791,7 @@ void m107_state::dsoccr94(machine_config &config) firebarr(config); /* basic machine hardware */ - m_maincpu->set_clock(20000000/2); /* NEC V33, Could be 28MHz clock? */ + m_maincpu->set_clock(XTAL::u(20000000)/2); /* NEC V33, Could be 28MHz clock? */ m_maincpu->set_addrmap(AS_PROGRAM, &m107_state::dsoccr94_map); m_maincpu->set_addrmap(AS_IO, &m107_state::dsoccr94_io_map); diff --git a/src/mame/irem/m119.cpp b/src/mame/irem/m119.cpp index 209fb0f8ed2..1e191e42b10 100644 --- a/src/mame/irem/m119.cpp +++ b/src/mame/irem/m119.cpp @@ -99,7 +99,7 @@ INPUT_PORTS_END void m119_state::m119(machine_config &config) { // basic machine hardware - SH3LE(config, m_maincpu, 60'000'000); // HD6417708S, according to the datasheet operation frequency is 60 MHz. + SH3LE(config, m_maincpu, XTAL::u(60'000'000)); // HD6417708S, according to the datasheet operation frequency is 60 MHz. m_maincpu->set_addrmap(AS_PROGRAM, &m119_state::program_map); // m_maincpu->set_vblank_int("screen", FUNC(m119_state::irq2_line_hold)); @@ -117,7 +117,7 @@ void m119_state::m119(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 16'934'400)); // internal? + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(16'934'400))); // internal? ymz.add_route(0, "lspeaker", 1.0); ymz.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/irem/m14.cpp b/src/mame/irem/m14.cpp index bdd2165358a..2ba96b9e0c9 100644 --- a/src/mame/irem/m14.cpp +++ b/src/mame/irem/m14.cpp @@ -417,7 +417,7 @@ void m14_state::machine_reset() void m14_state::m14(machine_config &config) { /* basic machine hardware */ - I8085A(config, m_maincpu, 6000000); //guess: 6 Mhz internally divided by 2 + I8085A(config, m_maincpu, XTAL::u(6000000)); //guess: 6 Mhz internally divided by 2 m_maincpu->set_addrmap(AS_PROGRAM, &m14_state::m14_map); m_maincpu->set_addrmap(AS_IO, &m14_state::m14_io_map); m_maincpu->set_vblank_int("screen", FUNC(m14_state::m14_irq)); diff --git a/src/mame/irem/m52.cpp b/src/mame/irem/m52.cpp index 7b37a496edd..addb8092087 100644 --- a/src/mame/irem/m52.cpp +++ b/src/mame/irem/m52.cpp @@ -421,7 +421,7 @@ void m52_state::m52(machine_config &config) m_screen->set_screen_update(FUNC(m52_state::screen_update_m52)); /* sound hardware */ - IREM_M52_SOUNDC_AUDIO(config, "irem_audio", 0); + IREM_M52_SOUNDC_AUDIO(config, "irem_audio"); } diff --git a/src/mame/irem/m57.cpp b/src/mame/irem/m57.cpp index b339c544d6e..9045002444b 100644 --- a/src/mame/irem/m57.cpp +++ b/src/mame/irem/m57.cpp @@ -251,7 +251,7 @@ void m57_state::m57(machine_config &config) PALETTE(config, m_palette, FUNC(m57_state::m57_palette), 32*8+32*8, 256+16); /* sound hardware */ - IREM_M52_SOUNDC_AUDIO(config, "irem_audio", 0); + IREM_M52_SOUNDC_AUDIO(config, "irem_audio"); } diff --git a/src/mame/irem/m58.cpp b/src/mame/irem/m58.cpp index 2d9b02d4789..522a28774fb 100644 --- a/src/mame/irem/m58.cpp +++ b/src/mame/irem/m58.cpp @@ -209,7 +209,7 @@ void m58_state::yard(machine_config &config) m_screen->set_palette(m_palette); /* sound hardware */ - IREM_M52_LARGE_AUDIO(config, "irem_audio", 0); + IREM_M52_LARGE_AUDIO(config, "irem_audio"); } diff --git a/src/mame/irem/m62.cpp b/src/mame/irem/m62.cpp index 9af8d00183e..40d5e733afc 100644 --- a/src/mame/irem/m62.cpp +++ b/src/mame/irem/m62.cpp @@ -948,7 +948,7 @@ void m62_state::ldrun(machine_config &config) PALETTE(config, m_spr_palette, FUNC(m62_state::m62_spr), 256); // sound hardware - IREM_M62_AUDIO(config, m_audio, 0); + IREM_M62_AUDIO(config, m_audio); } diff --git a/src/mame/irem/m72.cpp b/src/mame/irem/m72.cpp index d520de12bbd..decaed0281b 100644 --- a/src/mame/irem/m72.cpp +++ b/src/mame/irem/m72.cpp @@ -1775,7 +1775,7 @@ void m72_state::m72_audio_chips(machine_config &config) soundlatch.data_pending_callback().set("soundirq", FUNC(rst_neg_buffer_device::rst18_w)); soundlatch.set_separate_acknowledge(true); - RST_NEG_BUFFER(config, "soundirq", 0).int_callback().set_inputline(m_soundcpu, 0); + RST_NEG_BUFFER(config, "soundirq").int_callback().set_inputline(m_soundcpu, 0); m_soundcpu->set_irq_acknowledge_callback("soundirq", FUNC(rst_neg_buffer_device::inta_cb)); @@ -1787,7 +1787,7 @@ void m72_state::m72_audio_chips(machine_config &config) ymsnd.irq_handler().set("soundirq", FUNC(rst_neg_buffer_device::rst28_w)); ymsnd.add_route(ALL_OUTPUTS, "speaker", 0.33); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.33); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.33); // unknown DAC } void m72_state::m72_base(machine_config &config) @@ -1802,7 +1802,7 @@ void m72_state::m72_base(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_ram_map); m_soundcpu->set_addrmap(AS_IO, &m72_state::sound_portmap); - PIC8259(config, m_upd71059c, 0); + PIC8259(config, m_upd71059c); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); /* video hardware */ @@ -1964,7 +1964,7 @@ void m72_state::rtype2(machine_config &config) m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); /* verified (https://youtu.be/lUszf9Ong7U) */ /* IRQs are generated by main Z80 and YM2151 */ - PIC8259(config, m_upd71059c, 0); + PIC8259(config, m_upd71059c); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); /* video hardware */ @@ -2076,7 +2076,7 @@ void m72_state::m82(machine_config &config) m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(MASTER_CLOCK/8/512)); /* verified (https://youtu.be/lLQDPe-8Ha0) */ /* IRQs are generated by main Z80 and YM2151 */ - PIC8259(config, m_upd71059c, 0); + PIC8259(config, m_upd71059c); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); /* video hardware */ @@ -2114,7 +2114,7 @@ void m72_state::poundfor(machine_config &config) m_soundcpu->set_periodic_int(FUNC(m72_state::fake_nmi), attotime::from_hz(MASTER_CLOCK/8/512)); /* clocked by V1? (Vigilante) */ /* IRQs are generated by main Z80 and YM2151 */ - PIC8259(config, m_upd71059c, 0); + PIC8259(config, m_upd71059c); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); UPD4701A(config, m_upd4701[0]); diff --git a/src/mame/irem/m72_a.cpp b/src/mame/irem/m72_a.cpp index da8f3bea1df..dc9d8ebc586 100644 --- a/src/mame/irem/m72_a.cpp +++ b/src/mame/irem/m72_a.cpp @@ -49,7 +49,7 @@ Shisensho II 1993 Rev 3.34 M81 Yes DEFINE_DEVICE_TYPE(IREM_M72_AUDIO, m72_audio_device, "m72_audio", "Irem M72 Audio") -m72_audio_device::m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m72_audio_device::m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IREM_M72_AUDIO, tag, owner, clock) , device_rom_interface(mconfig, *this) , m_sample_addr(0) diff --git a/src/mame/irem/m72_a.h b/src/mame/irem/m72_a.h index 688b8a40285..b636712254c 100644 --- a/src/mame/irem/m72_a.h +++ b/src/mame/irem/m72_a.h @@ -18,7 +18,7 @@ class m72_audio_device : public device_t, public device_rom_interface<32> // unknown address bits { public: - m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m72_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ~m72_audio_device() {} template void set_dac_tag(T &&tag) { m_dac.set_tag(std::forward(tag)); } diff --git a/src/mame/irem/m90.cpp b/src/mame/irem/m90.cpp index ed32eeae335..fecae7b4f68 100644 --- a/src/mame/irem/m90.cpp +++ b/src/mame/irem/m90.cpp @@ -789,7 +789,7 @@ void m90_state::m90(machine_config &config) soundlatch.data_pending_callback().set("soundirq", FUNC(rst_neg_buffer_device::rst18_w)); soundlatch.set_separate_acknowledge(true); - RST_NEG_BUFFER(config, "soundirq", 0).int_callback().set_inputline(m_soundcpu, 0); + RST_NEG_BUFFER(config, "soundirq").int_callback().set_inputline(m_soundcpu, 0); IREM_M72_AUDIO(config, m_audio); m_audio->set_dac_tag("dac"); @@ -799,7 +799,7 @@ void m90_state::m90(machine_config &config) ymsnd.add_route(0, "speaker", 0.15); ymsnd.add_route(1, "speaker", 0.15); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC } void m90_state::hasamu(machine_config &config) @@ -856,7 +856,7 @@ void m90_state::bbmanw(machine_config &config) void m90_state::bomblord(machine_config &config) { m90(config); - V30(config.replace(), m_maincpu, 32000000/4); + V30(config.replace(), m_maincpu, XTAL::u(32000000)/4); m_maincpu->set_addrmap(AS_PROGRAM, &m90_state::bomblord_main_cpu_map); m_maincpu->set_addrmap(AS_IO, &m90_state::m90_main_cpu_io_map); @@ -873,7 +873,7 @@ void m90_state::bomblord(machine_config &config) void m90_state::dynablsb(machine_config &config) { m90(config); - V30(config.replace(), m_maincpu, 32000000/4); + V30(config.replace(), m_maincpu, XTAL::u(32000000)/4); m_maincpu->set_addrmap(AS_PROGRAM, &m90_state::dynablsb_main_cpu_map); m_maincpu->set_addrmap(AS_IO, &m90_state::dynablsb_main_cpu_io_map); diff --git a/src/mame/irem/m92.cpp b/src/mame/irem/m92.cpp index de7792d9316..a18cbd20a1b 100644 --- a/src/mame/irem/m92.cpp +++ b/src/mame/irem/m92.cpp @@ -916,7 +916,7 @@ void m92_state::m92(machine_config &config) V35(config, m_soundcpu, XTAL(14'318'181)); m_soundcpu->set_addrmap(AS_PROGRAM, &m92_state::sound_map); - PIC8259(config, m_upd71059c, 0); + PIC8259(config, m_upd71059c); m_upd71059c->out_int_callback().set_inputline(m_maincpu, 0); MCFG_MACHINE_RESET_OVERRIDE(m92_state,m92) @@ -1036,7 +1036,7 @@ void m92_state::ppan(machine_config &config) MCFG_VIDEO_START_OVERRIDE(m92_state,ppan) - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/irem/olibochu.cpp b/src/mame/irem/olibochu.cpp index da2e21a4afc..5c4685bad5f 100644 --- a/src/mame/irem/olibochu.cpp +++ b/src/mame/irem/olibochu.cpp @@ -566,8 +566,8 @@ void olibochu_state::olibochu(machine_config &config) AY8910(config, "aysnd", 18.432_MHz_XTAL / 12).add_route(ALL_OUTPUTS, "mono", 0.5); - HC55516(config, m_cvsd, 0).add_route(ALL_OUTPUTS, "mono", 0.5); - clock_device &cvsd_clock(CLOCK(config, "cvsd_clock", 16000)); + HC55516(config, m_cvsd).add_route(ALL_OUTPUTS, "mono", 0.5); + clock_device &cvsd_clock(CLOCK(config, "cvsd_clock", XTAL::u(16000))); cvsd_clock.signal_handler().set(FUNC(olibochu_state::cvsd_tick)); cvsd_clock.signal_handler().append(m_cvsd, FUNC(hc55516_device::mclock_w)); } diff --git a/src/mame/irem/redalert_a.cpp b/src/mame/irem/redalert_a.cpp index 9d684972cd8..d70fc0d5535 100644 --- a/src/mame/irem/redalert_a.cpp +++ b/src/mame/irem/redalert_a.cpp @@ -42,12 +42,12 @@ DEFINE_DEVICE_TYPE(IREM_M37B_UE17B_AUDIO, irem_m37b_ue17b_audio_device, "irem_m DEFINE_DEVICE_TYPE(DEMONEYE_AUDIO, demoneye_audio_device, "demoneye_audio", "Irem Demoneye-X audio") -irem_m37b_audio_device::irem_m37b_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock) : +irem_m37b_audio_device::irem_m37b_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock) : irem_m37b_audio_device(config, IREM_M37B_AUDIO, tag, owner, clock) { } -irem_m37b_audio_device::irem_m37b_audio_device(const machine_config &config, device_type type, const char *tag, device_t *owner, uint32_t clock) : +irem_m37b_audio_device::irem_m37b_audio_device(const machine_config &config, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(config, type, tag, owner, clock), m_audiocpu(*this, "audiocpu"), m_ay8910(*this, "aysnd"), @@ -56,13 +56,13 @@ irem_m37b_audio_device::irem_m37b_audio_device(const machine_config &config, dev } -panther_audio_device::panther_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock) : +panther_audio_device::panther_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock) : irem_m37b_audio_device(config, PANTHER_AUDIO, tag, owner, clock) { } -irem_m37b_ue17b_audio_device::irem_m37b_ue17b_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock) : +irem_m37b_ue17b_audio_device::irem_m37b_ue17b_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock) : irem_m37b_audio_device(config, IREM_M37B_UE17B_AUDIO, tag, owner, clock), m_voicecpu(*this, "voice"), m_soundlatch2(*this, "soundlatch2") @@ -70,7 +70,7 @@ irem_m37b_ue17b_audio_device::irem_m37b_ue17b_audio_device(const machine_config } -demoneye_audio_device::demoneye_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock) : +demoneye_audio_device::demoneye_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock) : device_t(config, DEMONEYE_AUDIO, tag, owner, clock), m_audiocpu(*this, "audiocpu"), m_ay(*this, "ay%u", 1U), diff --git a/src/mame/irem/redalert_a.h b/src/mame/irem/redalert_a.h index 2d92df74e22..84a39ce333a 100644 --- a/src/mame/irem/redalert_a.h +++ b/src/mame/irem/redalert_a.h @@ -22,14 +22,14 @@ class irem_m37b_audio_device : public device_t public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // missing analog effects - irem_m37b_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock = 0U); + irem_m37b_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_READ_LINE_MEMBER(sound_status_r); void audio_command_w(uint8_t data); protected: - irem_m37b_audio_device(const machine_config &config, device_type type, const char *tag, device_t *owner, uint32_t clock); + irem_m37b_audio_device(const machine_config &config, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -61,7 +61,7 @@ private: class panther_audio_device : public irem_m37b_audio_device { public: - panther_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock = 0U); + panther_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -74,7 +74,7 @@ private: class irem_m37b_ue17b_audio_device : public irem_m37b_audio_device { public: - irem_m37b_ue17b_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock = 0U); + irem_m37b_ue17b_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void voice_command_w(uint8_t data); @@ -94,7 +94,7 @@ class demoneye_audio_device : public device_t public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - demoneye_audio_device(const machine_config &config, const char *tag, device_t *owner, uint32_t clock = 0U); + demoneye_audio_device(const machine_config &config, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void audio_command_w(uint8_t data); diff --git a/src/mame/irem/shisen.cpp b/src/mame/irem/shisen.cpp index 365e26ddf1c..1489f88a5bd 100644 --- a/src/mame/irem/shisen.cpp +++ b/src/mame/irem/shisen.cpp @@ -371,7 +371,7 @@ void shisen_state::shisen(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.5); ymsnd.add_route(1, "rspeaker", 0.5); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "lspeaker", 0.25).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC } diff --git a/src/mame/irem/spartanxtec.cpp b/src/mame/irem/spartanxtec.cpp index 09be88b1ecf..fcfe328b4a3 100644 --- a/src/mame/irem/spartanxtec.cpp +++ b/src/mame/irem/spartanxtec.cpp @@ -363,11 +363,11 @@ void spartanxtec_state::spartanxtec_palette(palette_device &palette) const void spartanxtec_state::spartanxtec(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &spartanxtec_state::spartanxtec_map); m_maincpu->set_vblank_int("screen", FUNC(spartanxtec_state::irq0_line_assert)); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &spartanxtec_state::spartanxtec_sound_map); m_audiocpu->set_addrmap(AS_IO, &spartanxtec_state::spartanxtec_sound_io); m_audiocpu->set_periodic_int(FUNC(spartanxtec_state::irq0_line_assert), attotime::from_hz(1000)); // controls speed of music @@ -393,11 +393,11 @@ void spartanxtec_state::spartanxtec(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - AY8912(config, "ay1", 1000000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8912(config, "ay1", XTAL::u(1000000)).add_route(ALL_OUTPUTS, "mono", 0.25); - AY8912(config, "ay2", 1000000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8912(config, "ay2", XTAL::u(1000000)).add_route(ALL_OUTPUTS, "mono", 0.25); - AY8912(config, "ay3", 1000000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8912(config, "ay3", XTAL::u(1000000)).add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/irem/travrusa.cpp b/src/mame/irem/travrusa.cpp index dd7e83998ce..cb9d62a3c74 100644 --- a/src/mame/irem/travrusa.cpp +++ b/src/mame/irem/travrusa.cpp @@ -296,7 +296,7 @@ void travrusa_state::machine_reset() void travrusa_state::travrusa(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* 4 MHz (?) */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz (?) */ m_maincpu->set_addrmap(AS_PROGRAM, &travrusa_state::main_map); /* video hardware */ @@ -317,7 +317,7 @@ void travrusa_state::travrusa(machine_config &config) /* sound hardware */ //m52_sound_c_audio(config); - IREM_M52_SOUNDC_AUDIO(config, "irem_audio", 0); + IREM_M52_SOUNDC_AUDIO(config, "irem_audio"); } void travrusa_state::shtrider(machine_config &config) diff --git a/src/mame/irem/vigilant.cpp b/src/mame/irem/vigilant.cpp index 8d73df04697..ea96194fffe 100644 --- a/src/mame/irem/vigilant.cpp +++ b/src/mame/irem/vigilant.cpp @@ -655,7 +655,7 @@ void vigilant_state::vigilant(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.28); ymsnd.add_route(1, "rspeaker", 0.28); - dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac", 0)); // unknown DAC + dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac")); // unknown DAC dac.add_route(ALL_OUTPUTS, "lspeaker", 0.5); dac.add_route(ALL_OUTPUTS, "rspeaker", 0.5); } @@ -719,7 +719,7 @@ void vigilant_state::buccanrs(machine_config &config) ym2.add_route(3, "lspeaker", 0.50); ym2.add_route(3, "rspeaker", 0.50); - dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac", 0)); // unknown DAC + dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac")); // unknown DAC dac.add_route(ALL_OUTPUTS, "lspeaker", 0.35); dac.add_route(ALL_OUTPUTS, "rspeaker", 0.35); } @@ -767,7 +767,7 @@ void vigilant_state::kikcubic(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.28); ymsnd.add_route(1, "rspeaker", 0.28); - dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac", 0)); // unknown DAC + dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac")); // unknown DAC dac.add_route(ALL_OUTPUTS, "lspeaker", 0.5); dac.add_route(ALL_OUTPUTS, "rspeaker", 0.5); } @@ -832,7 +832,7 @@ void vigilant_state::bowmen(machine_config &config) ym2.add_route(3, "lspeaker", 0.50); ym2.add_route(3, "rspeaker", 0.50); - dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac", 0)); // unknown DAC + dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac")); // unknown DAC dac.add_route(ALL_OUTPUTS, "lspeaker", 0.35); dac.add_route(ALL_OUTPUTS, "rspeaker", 0.35); } diff --git a/src/mame/itech/capbowl.cpp b/src/mame/itech/capbowl.cpp index ba198ab2ee2..2969db64af3 100644 --- a/src/mame/itech/capbowl.cpp +++ b/src/mame/itech/capbowl.cpp @@ -595,7 +595,7 @@ void capbowl_base_state::base(machine_config &config) m_screen->set_refresh_hz(57); m_screen->set_screen_update(FUNC(capbowl_base_state::screen_update)); - TMS34061(config, m_tms34061, 0); + TMS34061(config, m_tms34061); m_tms34061->set_rowshift(8); // VRAM address is (row << rowshift) | col m_tms34061->set_vram_size(0x10000); m_tms34061->int_callback().set_inputline("maincpu", M6809_FIRQ_LINE); @@ -614,7 +614,7 @@ void capbowl_base_state::base(machine_config &config) ymsnd.add_route(2, "speaker", 0.07); ymsnd.add_route(3, "speaker", 0.75); - DAC0832(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC0832(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); } void capbowl_state::capbowl(machine_config &config) diff --git a/src/mame/itech/iteagle.cpp b/src/mame/itech/iteagle.cpp index efd0a2f2051..0d67bf505fe 100644 --- a/src/mame/itech/iteagle.cpp +++ b/src/mame/itech/iteagle.cpp @@ -168,22 +168,22 @@ void iteagle_state::machine_reset() void iteagle_state::iteagle(machine_config &config) { /* basic machine hardware */ - VR4310LE(config, m_maincpu, 133'333'333); + VR4310LE(config, m_maincpu, XTAL::u(133'333'333)); m_maincpu->set_icache_size(16384); m_maincpu->set_dcache_size(8192); m_maincpu->set_system_clock(66'666'666); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); - vrc4373_device &vrc4373(VRC4373(config, PCI_ID_NILE, 0, m_maincpu)); + vrc4373_device &vrc4373(VRC4373(config, PCI_ID_NILE, m_maincpu)); vrc4373.set_ram_size(0x00800000); vrc4373.set_simm0_size(0x02000000); - ITEAGLE_PERIPH(config, PCI_ID_PERIPH, 0); - IDE_PCI(config, PCI_ID_IDE, 0, 0x1080C693, 0x00, 0x0) + ITEAGLE_PERIPH(config, PCI_ID_PERIPH); + IDE_PCI(config, PCI_ID_IDE, 0x1080C693, 0x00, 0x0) .irq_handler().set_inputline(m_maincpu, MIPS3_IRQ2); - ITEAGLE_FPGA(config, m_fpga, 0, "screen", m_maincpu, MIPS3_IRQ1, MIPS3_IRQ4); + ITEAGLE_FPGA(config, m_fpga, "screen", m_maincpu, MIPS3_IRQ1, MIPS3_IRQ4); m_fpga->in_callback().set_ioport("SW5"); m_fpga->in_callback().set_ioport("IN1"); m_fpga->in_callback().set_ioport("SYSTEM"); @@ -192,16 +192,16 @@ void iteagle_state::iteagle(machine_config &config) m_fpga->gunx_callback().set_ioport("GUNX1"); m_fpga->guny_callback().set_ioport("GUNY1"); - es1373_device &pci_sound(ES1373(config, PCI_ID_SOUND, 0)); + es1373_device &pci_sound(ES1373(config, PCI_ID_SOUND)); pci_sound.add_route(0, PCI_ID_SOUND":lspeaker", 1.0).add_route(1, PCI_ID_SOUND":rspeaker", 1.0); pci_sound.irq_handler().set_inputline(m_maincpu, MIPS3_IRQ3); - voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config, PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config, PCI_ID_VIDEO, m_maincpu, "screen")); voodoo.set_fbmem(16); voodoo.set_status_cycles(1000); // optimization to consume extra cycles when polling status subdevice(PCI_ID_VIDEO":voodoo")->vblank_callback().set(m_fpga, FUNC(iteagle_fpga_device::vblank_update)); - ITEAGLE_EEPROM(config, m_eeprom, 0); + ITEAGLE_EEPROM(config, m_eeprom); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -293,7 +293,7 @@ void iteagle_state::virtpool(machine_config &config) { iteagle(config); - voodoo_1_pci_device &voodoo(VOODOO_1_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo_1_pci_device &voodoo(VOODOO_1_PCI(config.replace(), PCI_ID_VIDEO, m_maincpu, "screen")); voodoo.set_fbmem(4); voodoo.set_tmumem(4, 4); voodoo.set_status_cycles(1000); // optimization to consume extra cycles when polling status diff --git a/src/mame/itech/iteagle_fpga.cpp b/src/mame/itech/iteagle_fpga.cpp index 6b914ea1dd3..f80455951cd 100644 --- a/src/mame/itech/iteagle_fpga.cpp +++ b/src/mame/itech/iteagle_fpga.cpp @@ -33,7 +33,7 @@ void iteagle_fpga_device::ram_map(address_map &map) map(0x10000, 0x1ffff).rw(FUNC(iteagle_fpga_device::e1_ram_r), FUNC(iteagle_fpga_device::e1_ram_w)); } -iteagle_fpga_device::iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +iteagle_fpga_device::iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, ITEAGLE_FPGA, tag, owner, clock), m_rtc(*this, "eagle2_rtc"), m_e1_nvram(*this, "eagle1_bram"), @@ -66,7 +66,7 @@ void iteagle_fpga_device::device_add_mconfig(machine_config &config) // RS232 serial ports SCC85C30(config, m_scc1, 7.3728_MHz_XTAL); - m_scc1->configure_channels((7.3728_MHz_XTAL).value(), 0, (7.3728_MHz_XTAL).value(), 0); + m_scc1->configure_channels((7.3728_MHz_XTAL), XTAL(), 7.3728_MHz_XTAL, XTAL()); m_scc1->out_int_callback().set(FUNC(iteagle_fpga_device::serial_interrupt)); m_scc1->out_txda_callback().set(COM2_TAG, FUNC(rs232_port_device::write_txd)); m_scc1->out_txdb_callback().set(COM1_TAG, FUNC(rs232_port_device::write_txd)); @@ -690,7 +690,7 @@ void iteagle_eeprom_device::device_add_mconfig(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); } -iteagle_eeprom_device::iteagle_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iteagle_eeprom_device::iteagle_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, ITEAGLE_EEPROM, tag, owner, clock) , m_sw_version(0), m_hw_version(0), m_eeprom(*this, "eeprom") { @@ -818,7 +818,7 @@ void iteagle_periph_device::ctrl_map(address_map &map) map(0x000, 0x0cf).rw(FUNC(iteagle_periph_device::ctrl_r), FUNC(iteagle_periph_device::ctrl_w)); } -iteagle_periph_device::iteagle_periph_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iteagle_periph_device::iteagle_periph_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, ITEAGLE_PERIPH, tag, owner, clock) , m_rtc(*this, "eagle1_rtc") { diff --git a/src/mame/itech/iteagle_fpga.h b/src/mame/itech/iteagle_fpga.h index e7d4ead2a82..26658b1742e 100644 --- a/src/mame/itech/iteagle_fpga.h +++ b/src/mame/itech/iteagle_fpga.h @@ -38,13 +38,13 @@ class iteagle_fpga_device : public pci_device { public: template - iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag, U &&cpu_tag, int irq_num, int serial_num) - : iteagle_fpga_device(mconfig, tag, owner, clock) + iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&screen_tag, U &&cpu_tag, int irq_num, int serial_num) + : iteagle_fpga_device(mconfig, tag, owner) { set_screen_tag(std::forward(screen_tag)); set_irq_info(std::forward(cpu_tag), irq_num, serial_num); } - iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iteagle_fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_init_info(int version, int seq_init) {m_version=version; m_seq_init=seq_init;} template void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward(tag)); } @@ -123,7 +123,7 @@ private: class iteagle_eeprom_device : public pci_device { public: - iteagle_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iteagle_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; @@ -152,7 +152,7 @@ private: // Mimic Cypress CY82C693 Peripheral Controller class iteagle_periph_device : public pci_device { public: - iteagle_periph_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iteagle_periph_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/mame/itech/itech8.cpp b/src/mame/itech/itech8.cpp index da0d58984fb..52ffe974b15 100644 --- a/src/mame/itech/itech8.cpp +++ b/src/mame/itech/itech8.cpp @@ -514,8 +514,8 @@ #define FULL_LOGGING 0 -#define CLOCK_8MHz (8000000) -#define CLOCK_12MHz (12000000) +#define CLOCK_8MHz XTAL::u(8000000) +#define CLOCK_12MHz XTAL::u(12000000) @@ -1716,14 +1716,14 @@ void itech8_state::itech8_core_devices(machine_config &config) m_screen->set_size(512, 263); m_screen->screen_vblank().set(FUNC(itech8_state::generate_nmi)); - TMS34061(config, m_tms34061, 0); + TMS34061(config, m_tms34061); m_tms34061->set_rowshift(8); /* VRAM address is (row << rowshift) | col */ m_tms34061->set_vram_size(itech8_state::VRAM_SIZE); m_tms34061->int_callback().set(FUNC(itech8_state::generate_tms34061_interrupt)); /* interrupt gen callback */ SPEAKER(config, "mono").front_center(); - GENERIC_LATCH_8(config, m_soundlatch, 0); + GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, M6809_IRQ_LINE); via6522_device &via(MOS6522(config, "via6522_0", CLOCK_8MHz/4)); @@ -1783,7 +1783,7 @@ void itech8_state::itech8_sound_ym3812(machine_config &config) MC6809(config, m_soundcpu, CLOCK_8MHz); m_soundcpu->set_addrmap(AS_PROGRAM, &itech8_state::sound3812_map); - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.readpb_handler().set("ticket", FUNC(ticket_dispenser_device::line_r)); pia.writepa_handler().set(FUNC(itech8_state::pia_porta_out)); pia.writepb_handler().set(FUNC(itech8_state::pia_portb_out)); diff --git a/src/mame/jaleco/acommand.cpp b/src/mame/jaleco/acommand.cpp index 80d5eeed7d7..cde5bd41e5a 100644 --- a/src/mame/jaleco/acommand.cpp +++ b/src/mame/jaleco/acommand.cpp @@ -462,7 +462,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(acommand_state::acommand_scanline) void acommand_state::acommand(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &acommand_state::acommand_map); TIMER(config, "scantimer").configure_scanline(FUNC(acommand_state::acommand_scanline), "screen", 0, 1); @@ -485,11 +485,11 @@ void acommand_state::acommand(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - OKIM6295(config, m_oki1, 2112000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki1, XTAL::u(2112000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - OKIM6295(config, m_oki2, 2112000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki2, XTAL::u(2112000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } diff --git a/src/mame/jaleco/argus.cpp b/src/mame/jaleco/argus.cpp index 112af86f085..8f8db926992 100644 --- a/src/mame/jaleco/argus.cpp +++ b/src/mame/jaleco/argus.cpp @@ -479,11 +479,11 @@ GFXDECODE_END void argus_state::argus(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5000000); /* 4 MHz */ + Z80(config, m_maincpu, XTAL::u(5000000)); /* 4 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &argus_state::argus_map); TIMER(config, "scantimer").configure_scanline(FUNC(argus_state::scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 5000000); + Z80(config, m_audiocpu, XTAL::u(5000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &argus_state::sound_map_a); m_audiocpu->set_addrmap(AS_IO, &argus_state::sound_portmap_1); @@ -500,14 +500,14 @@ void argus_state::argus(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_argus); PALETTE(config, m_palette).set_entries(896); - JALECO_BLEND(config, m_blend, 0); + JALECO_BLEND(config, m_blend); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch"); - ym2203_device &ym1(YM2203(config, "ym1", 6000000 / 4)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(6000000) / 4)); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(0, "mono", 0.15); ym1.add_route(1, "mono", 0.15); @@ -518,11 +518,11 @@ void argus_state::argus(machine_config &config) void valtric_state::valtric(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5000000); /* 5 MHz */ + Z80(config, m_maincpu, XTAL::u(5000000)); /* 5 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &valtric_state::valtric_map); TIMER(config, "scantimer").configure_scanline(FUNC(valtric_state::scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 5000000); + Z80(config, m_audiocpu, XTAL::u(5000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &valtric_state::sound_map_a); m_audiocpu->set_addrmap(AS_IO, &valtric_state::sound_portmap_2); @@ -539,21 +539,21 @@ void valtric_state::valtric(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_valtric); PALETTE(config, m_palette).set_entries(768); - JALECO_BLEND(config, m_blend, 0); + JALECO_BLEND(config, m_blend); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch"); - ym2203_device &ym1(YM2203(config, "ym1", 6000000 / 4)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(6000000) / 4)); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(0, "mono", 0.15); ym1.add_route(1, "mono", 0.15); ym1.add_route(2, "mono", 0.15); ym1.add_route(3, "mono", 0.50); - ym2203_device &ym2(YM2203(config, "ym2", 6000000 / 4)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(6000000) / 4)); ym2.add_route(0, "mono", 0.15); ym2.add_route(1, "mono", 0.15); ym2.add_route(2, "mono", 0.15); @@ -563,11 +563,11 @@ void valtric_state::valtric(machine_config &config) void butasan_state::butasan(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5000000); /* 5 MHz */ + Z80(config, m_maincpu, XTAL::u(5000000)); /* 5 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &butasan_state::butasan_map); TIMER(config, "scantimer").configure_scanline(FUNC(butasan_state::scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 5000000); + Z80(config, m_audiocpu, XTAL::u(5000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &butasan_state::sound_map_b); m_audiocpu->set_addrmap(AS_IO, &butasan_state::sound_portmap_2); @@ -584,21 +584,21 @@ void butasan_state::butasan(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_butasan); PALETTE(config, m_palette).set_entries(768); - JALECO_BLEND(config, m_blend, 0); + JALECO_BLEND(config, m_blend); /* sound hardware */ SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, "soundlatch"); - ym2203_device &ym1(YM2203(config, "ym1", 6000000 / 4)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(6000000) / 4)); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(0, "mono", 0.30); ym1.add_route(1, "mono", 0.30); ym1.add_route(2, "mono", 0.30); ym1.add_route(3, "mono", 1.0); - ym2203_device &ym2(YM2203(config, "ym2", 6000000 / 4)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(6000000) / 4)); ym2.add_route(0, "mono", 0.30); ym2.add_route(1, "mono", 0.30); ym2.add_route(2, "mono", 0.30); diff --git a/src/mame/jaleco/bestleag.cpp b/src/mame/jaleco/bestleag.cpp index 497571872ed..b7937fddac4 100644 --- a/src/mame/jaleco/bestleag.cpp +++ b/src/mame/jaleco/bestleag.cpp @@ -384,7 +384,7 @@ GFXDECODE_END void bestleag_state::bestleag(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &bestleag_state::bestleag_map); m_maincpu->set_vblank_int("screen", FUNC(bestleag_state::irq6_line_hold)); @@ -402,7 +402,7 @@ void bestleag_state::bestleag(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); /* Hand-tuned */ + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); /* Hand-tuned */ m_oki->add_route(ALL_OUTPUTS, "lspeaker", 1.00); m_oki->add_route(ALL_OUTPUTS, "rspeaker", 1.00); } diff --git a/src/mame/jaleco/bigstrkb.cpp b/src/mame/jaleco/bigstrkb.cpp index 927a9dc06f5..e132b735179 100644 --- a/src/mame/jaleco/bigstrkb.cpp +++ b/src/mame/jaleco/bigstrkb.cpp @@ -384,7 +384,7 @@ GFXDECODE_END void bigstrkb_state::bigstrkb(machine_config &config) { - M68000(config, m_maincpu, 12'000'000); + M68000(config, m_maincpu, XTAL::u(12'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &bigstrkb_state::prg_map); m_maincpu->set_vblank_int("screen", FUNC(bigstrkb_state::irq6_line_hold)); @@ -402,13 +402,13 @@ void bigstrkb_state::bigstrkb(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); -// YM2151(config, "ymsnd", 4'000'000); +// YM2151(config, "ymsnd", XTAL::u(4'000'000)); - okim6295_device &oki1(OKIM6295(config, "oki1", 4'000'000, okim6295_device::PIN7_HIGH)); + okim6295_device &oki1(OKIM6295(config, "oki1", XTAL::u(4'000'000), okim6295_device::PIN7_HIGH)); oki1.add_route(ALL_OUTPUTS, "lspeaker", 0.30); oki1.add_route(ALL_OUTPUTS, "rspeaker", 0.30); - okim6295_device &oki2(OKIM6295(config, "oki2", 4'000'000, okim6295_device::PIN7_HIGH)); + okim6295_device &oki2(OKIM6295(config, "oki2", XTAL::u(4'000'000), okim6295_device::PIN7_HIGH)); oki2.add_route(ALL_OUTPUTS, "lspeaker", 0.30); oki2.add_route(ALL_OUTPUTS, "rspeaker", 0.30); } diff --git a/src/mame/jaleco/cischeat.cpp b/src/mame/jaleco/cischeat.cpp index e21d053efec..11b6e899599 100644 --- a/src/mame/jaleco/cischeat.cpp +++ b/src/mame/jaleco/cischeat.cpp @@ -1960,19 +1960,19 @@ WRITE_LINE_MEMBER(cischeat_state::sound_irq) void cischeat_state::bigrun(machine_config &config) { /* basic machine hardware */ - M68000(config, m_cpu1, 10000000); + M68000(config, m_cpu1, XTAL::u(10000000)); m_cpu1->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_map); TIMER(config, "scantimer").configure_scanline(FUNC(cischeat_state::bigrun_scanline), "screen", 0, 1); - M68000(config, m_cpu2, 10000000); + M68000(config, m_cpu2, XTAL::u(10000000)); m_cpu2->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_map2); m_cpu2->set_vblank_int("screen", FUNC(cischeat_state::irq4_line_hold)); - M68000(config, m_cpu3, 10000000); + M68000(config, m_cpu3, XTAL::u(10000000)); m_cpu3->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_map3); m_cpu3->set_vblank_int("screen", FUNC(cischeat_state::irq4_line_hold)); - M68000(config, m_soundcpu, 6000000); + M68000(config, m_soundcpu, XTAL::u(6000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_sound_map); // timing set by the YM irqhandler // m_soundcpu->set_periodic_int(FUNC(cischeat_state::irq4_line_hold), attotime::from_hz(16*30)); @@ -2005,16 +2005,16 @@ void cischeat_state::bigrun(machine_config &config) GENERIC_LATCH_16(config, m_soundlatch2); // TODO: all sound frequencies unverified (assume same as Mega System 1) - ym2151_device &ymsnd(YM2151(config, "ymsnd", 7000000/2)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(7000000)/2)); ymsnd.irq_handler().set(FUNC(cischeat_state::sound_irq)); ymsnd.add_route(0, "lspeaker", 0.50); ymsnd.add_route(1, "rspeaker", 0.50); - OKIM6295(config, m_oki1, 4000000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki1, XTAL::u(4000000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.25); m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.25); - OKIM6295(config, m_oki2, 4000000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki2, XTAL::u(4000000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.25); m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.25); } @@ -2056,13 +2056,13 @@ void cischeat_state::f1gpstar(machine_config &config) bigrun(config); /* basic machine hardware */ - m_cpu1->set_clock(12000000); + m_cpu1->set_clock(XTAL::u(12000000)); m_cpu1->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_map); - m_cpu2->set_clock(12000000); + m_cpu2->set_clock(XTAL::u(12000000)); m_cpu2->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_map2); - m_cpu3->set_clock(12000000); + m_cpu3->set_clock(XTAL::u(12000000)); m_cpu3->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_map3); m_soundcpu->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_sound_map); @@ -2091,7 +2091,7 @@ void cischeat_state::f1gpstr2(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstr2_sound_map); - M68000(config, m_cpu5, 10000000); + M68000(config, m_cpu5, XTAL::u(10000000)); m_cpu5->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstr2_io_map); config.set_maximum_quantum(attotime::from_hz(12000)); @@ -2133,11 +2133,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::scudhamm_scanline) void cischeat_state::scudhamm(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &cischeat_state::scudhamm_map); TIMER(config, "scantimer").configure_scanline(FUNC(cischeat_state::scudhamm_scanline), "screen", 0, 1); - adc0804_device &adc(ADC0804(config, "adc", 640000)); // unknown clock + adc0804_device &adc(ADC0804(config, "adc", XTAL::u(640000))); // unknown clock adc.vin_callback().set(FUNC(cischeat_state::scudhamm_analog_r)); WATCHDOG_TIMER(config, m_watchdog); @@ -2165,11 +2165,11 @@ void cischeat_state::scudhamm(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - OKIM6295(config, m_oki1, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified + OKIM6295(config, m_oki1, XTAL::u(4000000)/2, okim6295_device::PIN7_HIGH); // pin 7 not verified m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.5); m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.5); - OKIM6295(config, m_oki2, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified + OKIM6295(config, m_oki2, XTAL::u(4000000)/2, okim6295_device::PIN7_HIGH); // pin 7 not verified m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.5); m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.5); } @@ -2269,12 +2269,12 @@ void captflag_state::captflag(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - OKIM6295(config, m_oki1, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified + OKIM6295(config, m_oki1, XTAL::u(4000000)/2, okim6295_device::PIN7_HIGH); // pin 7 not verified m_oki1->set_addrmap(0, &captflag_state::oki1_map); m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.5); m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.5); - OKIM6295(config, m_oki2, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified + OKIM6295(config, m_oki2, XTAL::u(4000000)/2, okim6295_device::PIN7_HIGH); // pin 7 not verified m_oki2->set_addrmap(0, &captflag_state::oki2_map); m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.5); m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.5); diff --git a/src/mame/jaleco/ddayjlc.cpp b/src/mame/jaleco/ddayjlc.cpp index d15f99b9e6a..7cf6d3b7618 100644 --- a/src/mame/jaleco/ddayjlc.cpp +++ b/src/mame/jaleco/ddayjlc.cpp @@ -600,10 +600,10 @@ void ddayjlc_state::ddayjlc_palette(palette_device &palette) const void ddayjlc_state::ddayjlc(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 12000000/3); + Z80(config, m_maincpu, XTAL::u(12000000)/3); m_maincpu->set_addrmap(AS_PROGRAM, &ddayjlc_state::main_map); - Z80(config, m_audiocpu, 12000000/4); + Z80(config, m_audiocpu, XTAL::u(12000000)/4); m_audiocpu->set_addrmap(AS_PROGRAM, &ddayjlc_state::sound_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -625,11 +625,11 @@ void ddayjlc_state::ddayjlc(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ay8910_device &ay1(AY8910(config, "ay1", 12000000/6)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(12000000)/6)); ay1.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); ay1.add_route(ALL_OUTPUTS, "mono", 1.0); - AY8910(config, "ay2", 12000000/6).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8910(config, "ay2", XTAL::u(12000000)/6).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/jaleco/ginganin.cpp b/src/mame/jaleco/ginganin.cpp index fefacb2847d..0d134a45767 100644 --- a/src/mame/jaleco/ginganin.cpp +++ b/src/mame/jaleco/ginganin.cpp @@ -557,7 +557,7 @@ void ginganin_state::ginganin(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &ginganin_state::sound_map); ptm6840_device &ptm(PTM6840(config, "6840ptm", SOUND_CLOCK / 2)); - ptm.set_external_clocks(0, 0, 0); + ptm.set_external_clocks(XTAL(), XTAL(), XTAL()); ptm.o1_callback().set_inputline(m_audiocpu, 0); // video hardware diff --git a/src/mame/jaleco/jalblend.cpp b/src/mame/jaleco/jalblend.cpp index d6eb58728f7..333728df929 100644 --- a/src/mame/jaleco/jalblend.cpp +++ b/src/mame/jaleco/jalblend.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(JALECO_BLEND, jaleco_blend_device, "jaleco_blend", "Jaleco Blending Device") -jaleco_blend_device::jaleco_blend_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +jaleco_blend_device::jaleco_blend_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JALECO_BLEND, tag, owner, clock) { } diff --git a/src/mame/jaleco/jalblend.h b/src/mame/jaleco/jalblend.h index 2b960ff5fab..310c7dfdaad 100644 --- a/src/mame/jaleco/jalblend.h +++ b/src/mame/jaleco/jalblend.h @@ -10,7 +10,7 @@ class jaleco_blend_device : public device_t { public: - jaleco_blend_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + jaleco_blend_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~jaleco_blend_device() {} rgb_t func(rgb_t dest, rgb_t addMe); diff --git a/src/mame/jaleco/jaleco_ms32_sysctrl.cpp b/src/mame/jaleco/jaleco_ms32_sysctrl.cpp index 1ef2c744750..c82c2256446 100644 --- a/src/mame/jaleco/jaleco_ms32_sysctrl.cpp +++ b/src/mame/jaleco/jaleco_ms32_sysctrl.cpp @@ -56,7 +56,7 @@ DEFINE_DEVICE_TYPE(JALECO_MS32_SYSCTRL, jaleco_ms32_sysctrl_device, "jaleco_ms32 // jaleco_ms32_sysctrl_device - constructor //------------------------------------------------- -jaleco_ms32_sysctrl_device::jaleco_ms32_sysctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jaleco_ms32_sysctrl_device::jaleco_ms32_sysctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JALECO_MS32_SYSCTRL, tag, owner, clock) , m_screen(*this, finder_base::DUMMY_TAG) , m_flip_screen_cb(*this) @@ -221,7 +221,7 @@ static constexpr u16 clamp_to_12bits_neg(u16 raw_data) // CRTC // ============================================================================ -inline u32 jaleco_ms32_sysctrl_device::get_dotclock_frequency() +inline XTAL jaleco_ms32_sysctrl_device::get_dotclock_frequency() { const u8 dot_divider = m_dotclock_setting & 1 ? 6 : 8; return clock() / dot_divider; @@ -237,7 +237,7 @@ inline void jaleco_ms32_sysctrl_device::crtc_refresh_screen_params() rectangle visarea; const u16 htotal = m_crtc.horz_blank + m_crtc.horz_display; const u16 vtotal = crtc_vtotal(); - const attoseconds_t refresh = HZ_TO_ATTOSECONDS(get_dotclock_frequency()) * htotal * vtotal; + const attoseconds_t refresh = HZ_TO_ATTOSECONDS(get_dotclock_frequency().value()) * htotal * vtotal; visarea.set(0, m_crtc.horz_display - 1, 0, m_crtc.vert_display - 1); logerror("%s: CRTC setup total: %d x %d display: %d x %d\n", this->tag(), htotal, vtotal, m_crtc.horz_display, m_crtc.vert_display); m_screen->configure(htotal, vtotal, visarea, refresh); diff --git a/src/mame/jaleco/jaleco_ms32_sysctrl.h b/src/mame/jaleco/jaleco_ms32_sysctrl.h index 8a303747ffe..58fc07cb165 100644 --- a/src/mame/jaleco/jaleco_ms32_sysctrl.h +++ b/src/mame/jaleco/jaleco_ms32_sysctrl.h @@ -25,13 +25,13 @@ class jaleco_ms32_sysctrl_device : public device_t public: // construction/destruction template - jaleco_ms32_sysctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&screen_tag) + jaleco_ms32_sysctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : jaleco_ms32_sysctrl_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward(screen_tag)); } - jaleco_ms32_sysctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + jaleco_ms32_sysctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void amap(address_map &map); @@ -81,7 +81,7 @@ private: devcb_write_line m_sound_ack_cb; devcb_write_line m_sound_reset_cb; u8 m_dotclock_setting; - inline u32 get_dotclock_frequency(); + inline XTAL get_dotclock_frequency(); bool m_flip_screen_state; struct { u16 horz_blank, horz_display, vert_blank, vert_display; diff --git a/src/mame/jaleco/jalmah.cpp b/src/mame/jaleco/jalmah.cpp index 282a2dfce20..fe265fa11b6 100644 --- a/src/mame/jaleco/jalmah.cpp +++ b/src/mame/jaleco/jalmah.cpp @@ -1110,7 +1110,7 @@ void urashima_state::machine_reset() void jalmah_state::jalmah(machine_config &config) { - M68000(config, m_maincpu, 12000000/2); // assume same as Mega System 1 + M68000(config, m_maincpu, XTAL::u(12000000)/2); // assume same as Mega System 1 m_maincpu->set_addrmap(AS_PROGRAM, &jalmah_state::jalmah_map); m_maincpu->set_vblank_int("screen", FUNC(jalmah_state::irq2_line_hold)); @@ -1122,7 +1122,7 @@ void jalmah_state::jalmah(machine_config &config) MEGASYS1_TILEMAP(config, m_tmap[3], m_palette, 0x0300); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(12000000/2,406,0,256,263,16,240); // assume same as nmk16 & mega system 1 + screen.set_raw(XTAL::u(12000000)/2,406,0,256,263,16,240); // assume same as nmk16 & mega system 1 screen.set_screen_update(FUNC(jalmah_state::screen_update_jalmah)); screen.set_palette(m_palette); @@ -1131,7 +1131,7 @@ void jalmah_state::jalmah(machine_config &config) TIMER(config, "mcusim").configure_periodic(FUNC(jalmah_state::mcu_sim), attotime::from_hz(10000)); SPEAKER(config, "mono").front_center(); - okim6295_device &oki(OKIM6295(config, "oki", 4000000, okim6295_device::PIN7_LOW)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(4000000), okim6295_device::PIN7_LOW)); oki.set_addrmap(0, &jalmah_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 0.5); } diff --git a/src/mame/jaleco/megasys1.cpp b/src/mame/jaleco/megasys1.cpp index 42573aab64c..d48655df1bc 100644 --- a/src/mame/jaleco/megasys1.cpp +++ b/src/mame/jaleco/megasys1.cpp @@ -1807,12 +1807,12 @@ void megasys1_state::p47b(machine_config &config) GENERIC_LATCH_8(config, "soundlatch3"); // OKI M5205 - MSM5205(config, m_p47b_adpcm[0], 384000); + MSM5205(config, m_p47b_adpcm[0], XTAL::u(384000)); m_p47b_adpcm[0]->set_prescaler_selector(msm5205_device::SEX_4B); m_p47b_adpcm[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_p47b_adpcm[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - MSM5205(config, m_p47b_adpcm[1], 384000); + MSM5205(config, m_p47b_adpcm[1], XTAL::u(384000)); m_p47b_adpcm[1]->set_prescaler_selector(msm5205_device::SEX_4B); m_p47b_adpcm[1]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_p47b_adpcm[1]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); @@ -1881,11 +1881,11 @@ void megasys1_state::system_B_hayaosi1(machine_config &config) /* basic machine hardware */ - OKIM6295(config.replace(), m_oki[0], 2000000, okim6295_device::PIN7_HIGH); /* correct speed, but unknown OSC + divider combo */ + OKIM6295(config.replace(), m_oki[0], XTAL::u(2000000), okim6295_device::PIN7_HIGH); /* correct speed, but unknown OSC + divider combo */ m_oki[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.30); m_oki[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.30); - OKIM6295(config.replace(), m_oki[1], 2000000, okim6295_device::PIN7_HIGH); /* correct speed, but unknown OSC + divider combo */ + OKIM6295(config.replace(), m_oki[1], XTAL::u(2000000), okim6295_device::PIN7_HIGH); /* correct speed, but unknown OSC + divider combo */ m_oki[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.30); m_oki[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.30); } @@ -1969,7 +1969,7 @@ void megasys1_state::system_Z(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &megasys1_state::megasys1Z_map); TIMER(config, m_scantimer).configure_scanline(FUNC(megasys1_state::megasys1A_scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 3000000); /* OSC 12MHz divided by 4 ??? */ + Z80(config, m_audiocpu, XTAL::u(3000000)); /* OSC 12MHz divided by 4 ??? */ m_audiocpu->set_addrmap(AS_PROGRAM, &megasys1_state::z80_sound_map); m_audiocpu->set_addrmap(AS_IO, &megasys1_state::z80_sound_io_map); @@ -1994,7 +1994,7 @@ void megasys1_state::system_Z(machine_config &config) GENERIC_LATCH_16(config, m_soundlatch[0]); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/jaleco/ms1_tmap.cpp b/src/mame/jaleco/ms1_tmap.cpp index 303478ac4c6..5b8661fa40e 100644 --- a/src/mame/jaleco/ms1_tmap.cpp +++ b/src/mame/jaleco/ms1_tmap.cpp @@ -45,7 +45,7 @@ static constexpr int TILES_PER_PAGE = TILES_PER_PAGE_X * TILES_PER_PAGE_Y; DEFINE_DEVICE_TYPE(MEGASYS1_TILEMAP, megasys1_tilemap_device, "ms1_tmap", "Mega System 1 Tilemap") -megasys1_tilemap_device::megasys1_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +megasys1_tilemap_device::megasys1_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MEGASYS1_TILEMAP, tag, owner, clock), device_gfx_interface(mconfig, *this), m_scrollram(*this, DEVICE_SELF), diff --git a/src/mame/jaleco/ms1_tmap.h b/src/mame/jaleco/ms1_tmap.h index e50230674a4..dae9e75b854 100644 --- a/src/mame/jaleco/ms1_tmap.h +++ b/src/mame/jaleco/ms1_tmap.h @@ -28,13 +28,13 @@ public: // construction/destruction template megasys1_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&palette_tag, uint16_t colorbase) - : megasys1_tilemap_device(mconfig, tag, owner, (uint32_t)0) + : megasys1_tilemap_device(mconfig, tag, owner) { set_palette(std::forward(palette_tag)); set_colorbase(colorbase); } - megasys1_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + megasys1_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void set_8x8_scroll_factor(int scroll_factor) { m_8x8_scroll_factor = scroll_factor; } diff --git a/src/mame/jaleco/ms32.cpp b/src/mame/jaleco/ms32.cpp index 0867d269161..7cfc2ea9ade 100644 --- a/src/mame/jaleco/ms32.cpp +++ b/src/mame/jaleco/ms32.cpp @@ -1769,7 +1769,7 @@ void ms32_state::ms32(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &ms32_state::ms32_map); m_maincpu->set_irq_acknowledge_callback(FUNC(ms32_state::irq_callback)); - Z80(config, m_audiocpu, 8000000); // Z0840008PSC, Clock from notes (40MHz / 5 or 48MHz / 6?) + Z80(config, m_audiocpu, XTAL::u(8000000)); // Z0840008PSC, Clock from notes (40MHz / 5 or 48MHz / 6?) m_audiocpu->set_addrmap(AS_PROGRAM, &ms32_state::ms32_sound_map); config.set_maximum_quantum(attotime::from_hz(60000)); diff --git a/src/mame/jaleco/ms32_sprite.cpp b/src/mame/jaleco/ms32_sprite.cpp index 2884c764e5e..42ba495ee1e 100644 --- a/src/mame/jaleco/ms32_sprite.cpp +++ b/src/mame/jaleco/ms32_sprite.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(JALECO_MEGASYSTEM32_SPRITE, ms32_sprite_device, "ms32spr", "Jaleco Megasystem 32 Sprite hardware") -ms32_sprite_device::ms32_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ms32_sprite_device::ms32_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JALECO_MEGASYSTEM32_SPRITE, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , m_color_base(0) diff --git a/src/mame/jaleco/ms32_sprite.h b/src/mame/jaleco/ms32_sprite.h index afd53f70d47..f243622faf2 100644 --- a/src/mame/jaleco/ms32_sprite.h +++ b/src/mame/jaleco/ms32_sprite.h @@ -13,7 +13,7 @@ class ms32_sprite_device : public device_t, public device_gfx_interface { public: // construction - ms32_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ms32_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_color_base(u16 base) { m_color_base = base; } diff --git a/src/mame/jaleco/psychic5.cpp b/src/mame/jaleco/psychic5.cpp index 710fc1edd43..3840baeaa62 100644 --- a/src/mame/jaleco/psychic5.cpp +++ b/src/mame/jaleco/psychic5.cpp @@ -745,7 +745,7 @@ void psychic5_state::psychic5(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_psychic5); PALETTE(config, m_palette).set_entries(768); - JALECO_BLEND(config, m_blend, 0); + JALECO_BLEND(config, m_blend); MCFG_VIDEO_START_OVERRIDE(psychic5_state,psychic5) diff --git a/src/mame/jaleco/pturn.cpp b/src/mame/jaleco/pturn.cpp index 103c57acc85..46da2a22642 100644 --- a/src/mame/jaleco/pturn.cpp +++ b/src/mame/jaleco/pturn.cpp @@ -509,11 +509,11 @@ void pturn_state::machine_reset() void pturn_state::pturn(machine_config &config) { - Z80(config, m_maincpu, 12000000/3); + Z80(config, m_maincpu, XTAL::u(12000000)/3); m_maincpu->set_addrmap(AS_PROGRAM, &pturn_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(pturn_state::main_intgen)); - Z80(config, m_audiocpu, 12000000/3); + Z80(config, m_audiocpu, XTAL::u(12000000)/3); m_audiocpu->set_addrmap(AS_PROGRAM, &pturn_state::sub_map); m_audiocpu->set_periodic_int(FUNC(pturn_state::sub_intgen), attotime::from_hz(3*60)); @@ -543,9 +543,9 @@ void pturn_state::pturn(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "ay1", 2000000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8910(config, "ay1", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.25); - AY8910(config, "ay2", 2000000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8910(config, "ay2", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/jpm/guab.cpp b/src/mame/jpm/guab.cpp index 880f8975ec3..1b7f0959843 100644 --- a/src/mame/jpm/guab.cpp +++ b/src/mame/jpm/guab.cpp @@ -451,7 +451,7 @@ static void guab_floppies(device_slot_interface &device) void guab_state::guab(machine_config &config) { /* TODO: Verify clock */ - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &guab_state::guab_map); /* TODO: Use real video timings */ @@ -468,7 +468,7 @@ void guab_state::guab(machine_config &config) EF9369(config, "ef9369").set_color_update_callback(FUNC(guab_state::ef9369_color_update)); - TMS34061(config, m_tms34061, 0); + TMS34061(config, m_tms34061); m_tms34061->set_rowshift(8); /* VRAM address is (row << rowshift) | col */ m_tms34061->set_vram_size(0x40000); m_tms34061->int_callback().set_inputline("maincpu", 5); @@ -477,11 +477,11 @@ void guab_state::guab(machine_config &config) SPEAKER(config, "mono").front_center(); /* TODO: Verify clock */ - SN76489(config, m_sn, 2000000); + SN76489(config, m_sn, XTAL::u(2000000)); m_sn->add_route(ALL_OUTPUTS, "mono", 0.50); - ptm6840_device &ptm(PTM6840(config, "6840ptm", 1000000)); - ptm.set_external_clocks(0, 0, 0); + ptm6840_device &ptm(PTM6840(config, "6840ptm", XTAL::u(1000000))); + ptm.set_external_clocks(XTAL(), XTAL(), XTAL()); ptm.irq_callback().set_inputline("maincpu", 3); i8255_device &ppi1(I8255(config, "i8255_1")); @@ -506,22 +506,22 @@ void guab_state::guab(machine_config &config) ppi4.in_pc_callback().set(FUNC(guab_state::watchdog_r)); ppi4.out_pc_callback().set(FUNC(guab_state::watchdog_w)); - bacta_datalogger_device &bacta(BACTA_DATALOGGER(config, "bacta", 0)); + bacta_datalogger_device &bacta(BACTA_DATALOGGER(config, "bacta")); - acia6850_device &acia1(ACIA6850(config, "acia6850_1", 0)); + acia6850_device &acia1(ACIA6850(config, "acia6850_1")); acia1.txd_handler().set("bacta", FUNC(bacta_datalogger_device::write_txd)); acia1.irq_handler().set_inputline("maincpu", 4); bacta.rxd_handler().set("acia6850_1", FUNC(acia6850_device::write_rxd)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 19200)); // source? the ptm doesn't seem to output any common baud values + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(19200))); // source? the ptm doesn't seem to output any common baud values acia_clock.signal_handler().set("acia6850_1", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia6850_1", FUNC(acia6850_device::write_rxc)); - ACIA6850(config, "acia6850_2", 0); + ACIA6850(config, "acia6850_2"); // floppy - WD1773(config, m_fdc, 8000000); + WD1773(config, m_fdc, XTAL::u(8000000)); m_fdc->drq_wr_callback().set_inputline(m_maincpu, 6); FLOPPY_CONNECTOR(config, "fdc:0", guab_floppies, "dd", guab_state::floppy_formats).set_fixed(true); diff --git a/src/mame/jpm/jpmimpct.cpp b/src/mame/jpm/jpmimpct.cpp index a804989df9c..db016ba11c3 100644 --- a/src/mame/jpm/jpmimpct.cpp +++ b/src/mame/jpm/jpmimpct.cpp @@ -109,12 +109,12 @@ Thanks to Tony Friery and JPeMU for I/O routines and documentation. DEFINE_DEVICE_TYPE(JPM_TOUCHSCREEN, jpmtouch_device, "jpmtouch", "JPM Touchscreen") -jpmtouch_device::jpmtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +jpmtouch_device::jpmtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jpmtouch_device(mconfig, JPM_TOUCHSCREEN, tag, owner, clock) { } -jpmtouch_device::jpmtouch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +jpmtouch_device::jpmtouch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JPM_TOUCHSCREEN, tag, owner, clock), device_serial_interface(mconfig, *this), m_rxd_handler(*this), @@ -140,8 +140,8 @@ void jpmtouch_device::device_reset() set_data_frame(startbits, databits, parity, stopbits); - set_tra_rate(9600); - set_rcv_rate(9600); + set_tra_rate(XTAL::u(9600)); + set_rcv_rate(XTAL::u(9600)); output_rxd(1); } @@ -152,7 +152,7 @@ void jpmtouch_device::tx_queue() { if (m_sending != -1) { - set_tra_rate(9600); + set_tra_rate(XTAL::u(9600)); uint8_t senddata = m_touch_data[m_sendpos]; transmit_register_setup(senddata); } @@ -202,8 +202,8 @@ void jpmtouch_device::touched(uint8_t x, uint8_t y) * *************************************/ -#define MC68681_1_CLOCK 3686400 -#define MC68681_2_CLOCK 3686400 +#define MC68681_1_CLOCK XTAL::u(3686400) +#define MC68681_2_CLOCK XTAL::u(3686400) /************************************* @@ -1287,7 +1287,7 @@ WRITE_LINE_MEMBER(jpmimpct_state::duart_irq_handler) void jpmimpct_state::base(machine_config &config) { - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); // map set later MC68681(config, m_duart, MC68681_1_CLOCK); @@ -1313,11 +1313,11 @@ void jpmimpct_state::base(machine_config &config) SPEAKER(config, "mono").front_center(); UPD7759(config, m_upd7759).add_route(ALL_OUTPUTS, "mono", 0.50); - METERS(config, m_meters, 0).set_number(5); + METERS(config, m_meters).set_number(5); // TODO: only add this to the sets that need it connected m_duart->a_tx_cb().set(m_datalogger, FUNC(bacta_datalogger_device::write_txd)); - BACTA_DATALOGGER(config, m_datalogger, 0); + BACTA_DATALOGGER(config, m_datalogger); m_datalogger->rxd_handler().set(m_duart, FUNC(mc68681_device::rx_a_w)); } @@ -1393,10 +1393,10 @@ void jpmimpct_video_state::impact_video(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &jpmimpct_video_state::impact_video_map); - TMS34010(config, m_dsp, 40000000); + TMS34010(config, m_dsp, XTAL::u(40000000)); m_dsp->set_addrmap(AS_PROGRAM, &jpmimpct_video_state::tms_program_map); m_dsp->set_halt_on_reset(true); - m_dsp->set_pixel_clock(40000000/16); + m_dsp->set_pixel_clock(XTAL::u(40000000)/16); m_dsp->set_pixels_per_clock(4); m_dsp->set_scanline_rgb32_callback(FUNC(jpmimpct_video_state::scanline_update)); m_dsp->output_int().set(FUNC(jpmimpct_video_state::tms_irq)); @@ -1409,10 +1409,10 @@ void jpmimpct_video_state::impact_video(machine_config &config) config.set_maximum_quantum(attotime::from_hz(30000)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(40000000/4, 156*4, 0, 100*4, 328, 0, 300); + screen.set_raw(XTAL::u(40000000)/4, 156*4, 0, 100*4, 328, 0, 300); screen.set_screen_update("dsp", FUNC(tms34010_device::tms340x0_rgb32)); - BT477(config, m_ramdac, 40000000); // clock unknown + BT477(config, m_ramdac, XTAL::u(40000000)); // clock unknown } void jpmimpct_video_state::impact_video_touch(machine_config &config) diff --git a/src/mame/jpm/jpmimpct.h b/src/mame/jpm/jpmimpct.h index 1d59b2f6c67..db157b7a198 100644 --- a/src/mame/jpm/jpmimpct.h +++ b/src/mame/jpm/jpmimpct.h @@ -31,7 +31,7 @@ class jpmtouch_device : public device_t, public device_serial_interface { public: - jpmtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + jpmtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto rxd_handler() { return m_rxd_handler.bind(); } @@ -40,7 +40,7 @@ public: void touched(uint8_t x, uint8_t y); protected: - jpmtouch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + jpmtouch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/jpm/jpmmps.cpp b/src/mame/jpm/jpmmps.cpp index b1917031766..c204fdc7cd8 100644 --- a/src/mame/jpm/jpmmps.cpp +++ b/src/mame/jpm/jpmmps.cpp @@ -287,7 +287,7 @@ void jpmmps_state::jpmmps(machine_config &config) SN76489(config, m_psg, SOUND_CLOCK); m_psg->add_route(ALL_OUTPUTS, "mono", 1.00); - METERS(config, m_meters, 0).set_number(9); // TODO: meters.cpp sets a max of 8 + METERS(config, m_meters).set_number(9); // TODO: meters.cpp sets a max of 8 config.set_default_layout(layout_jpmmps); } diff --git a/src/mame/jpm/jpmsru.cpp b/src/mame/jpm/jpmsru.cpp index ea0378c7834..970025ab9f8 100644 --- a/src/mame/jpm/jpmsru.cpp +++ b/src/mame/jpm/jpmsru.cpp @@ -1308,7 +1308,7 @@ void jpmsru_state::jpmsru_3k(machine_config &config) SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "nl_audio", 48000) + NETLIST_SOUND(config, "nl_audio", XTAL::u(48000)) .set_source(NETLIST_NAME(jpmsru)) .add_route(ALL_OUTPUTS, "mono", 0.1); @@ -1413,7 +1413,7 @@ void jpmsru_dac_state::lc(machine_config &config) jpmsru_6k(config); m_maincpu->set_addrmap(AS_IO, &jpmsru_dac_state::outputs_lc); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.5); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.5); } void jpmsru_state::lal(machine_config &config) diff --git a/src/mame/jpm/jpmsys5.cpp b/src/mame/jpm/jpmsys5.cpp index e99b7f1e020..3e1c920123c 100644 --- a/src/mame/jpm/jpmsys5.cpp +++ b/src/mame/jpm/jpmsys5.cpp @@ -757,27 +757,27 @@ void jpmsys5_state::jpmsys5_common(machine_config& config) M68000(config, m_maincpu, 8_MHz_XTAL); INPUT_MERGER_ANY_HIGH(config, "acia_irq").output_handler().set_inputline(m_maincpu, INT_6850ACIA); - bacta_datalogger_device &bacta(BACTA_DATALOGGER(config, "bacta", 0)); + bacta_datalogger_device &bacta(BACTA_DATALOGGER(config, "bacta")); - ACIA6850(config, m_acia6850[0], 0); + ACIA6850(config, m_acia6850[0]); m_acia6850[0]->txd_handler().set("bacta", FUNC(bacta_datalogger_device::write_txd)); m_acia6850[0]->irq_handler().set("acia_irq", FUNC(input_merger_device::in_w<0>)); bacta.rxd_handler().set(m_acia6850[0], FUNC(acia6850_device::write_rxd)); - ACIA6850(config, m_acia6850[1], 0); + ACIA6850(config, m_acia6850[1]); m_acia6850[1]->txd_handler().set(FUNC(jpmsys5_state::a1_tx_w)); m_acia6850[1]->irq_handler().set("acia_irq", FUNC(input_merger_device::in_w<1>)); - ACIA6850(config, m_acia6850[2], 0); + ACIA6850(config, m_acia6850[2]); m_acia6850[2]->txd_handler().set(FUNC(jpmsys5_state::a2_tx_w)); m_acia6850[2]->irq_handler().set("acia_irq", FUNC(input_merger_device::in_w<2>)); - clock_device &bacta_clock(CLOCK(config, "bacta_clock", 19200)); // Gives 1200 baud, but real timer is programmable (location?) + clock_device &bacta_clock(CLOCK(config, "bacta_clock", XTAL::u(19200))); // Gives 1200 baud, but real timer is programmable (location?) bacta_clock.signal_handler().set(m_acia6850[0], FUNC(acia6850_device::write_txc)); bacta_clock.signal_handler().append(m_acia6850[0], FUNC(acia6850_device::write_rxc)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 10000)); // What are the correct ACIA clocks ? + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(10000))); // What are the correct ACIA clocks ? acia_clock.signal_handler().append(m_acia6850[1], FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia6850[1], FUNC(acia6850_device::write_rxc)); acia_clock.signal_handler().append(m_acia6850[2], FUNC(acia6850_device::write_txc)); @@ -786,7 +786,7 @@ void jpmsys5_state::jpmsys5_common(machine_config& config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); S16LF01(config, m_vfd); - pia6821_device &pia(PIA6821(config, "6821pia", 0)); + pia6821_device &pia(PIA6821(config, "6821pia")); pia.readpa_handler().set(FUNC(jpmsys5_state::u29_porta_r)); pia.writepb_handler().set(FUNC(jpmsys5_state::u29_portb_w)); pia.ca2_handler().set(FUNC(jpmsys5_state::u29_ca2_w)); @@ -795,8 +795,8 @@ void jpmsys5_state::jpmsys5_common(machine_config& config) pia.irqb_handler().set(FUNC(jpmsys5_state::pia_irq)); /* 6840 PTM */ - ptm6840_device &ptm(PTM6840(config, "6840ptm", 1000000/4)); // with this at 1mhz the non-video games run at a ridiculous speed - ptm.set_external_clocks(0, 0, 0); + ptm6840_device &ptm(PTM6840(config, "6840ptm", XTAL::u(1000000)/4)); // with this at 1mhz the non-video games run at a ridiculous speed + ptm.set_external_clocks(XTAL(), XTAL(), XTAL()); ptm.o1_callback().set(FUNC(jpmsys5_state::u26_o1_callback)); ptm.irq_callback().set(FUNC(jpmsys5_state::ptm_irq)); config.set_default_layout(layout_jpmsys5); @@ -809,7 +809,7 @@ void jpmsys5_state::ymsound(machine_config &config) UPD7759(config, m_upd7759); m_upd7759->add_route(ALL_OUTPUTS, "mono", 0.30); - ym2413_device &ym2413(YM2413(config, "ym2413", 4000000)); /* Unconfirmed */ + ym2413_device &ym2413(YM2413(config, "ym2413", XTAL::u(4000000))); /* Unconfirmed */ ym2413.add_route(ALL_OUTPUTS, "mono", 1.00); } @@ -820,7 +820,7 @@ void jpmsys5_state::saasound(machine_config &config) UPD7759(config, m_upd7759); m_upd7759->add_route(ALL_OUTPUTS, "mono", 0.30); - SAA1099(config, "saa", 4000000 /* guess */).add_route(ALL_OUTPUTS, "mono", 1.0); + SAA1099(config, "saa", XTAL::u(4000000) /* guess */).add_route(ALL_OUTPUTS, "mono", 1.0); } void jpmsys5v_state::tmsvideo(machine_config &config) @@ -829,7 +829,7 @@ void jpmsys5v_state::tmsvideo(machine_config &config) screen.set_raw(XTAL(40'000'000) / 4, 676, 20*4, 147*4, 256, 0, 254); screen.set_screen_update(FUNC(jpmsys5v_state::screen_update_jpmsys5v)); - TMS34061(config, m_tms34061, 0); + TMS34061(config, m_tms34061); m_tms34061->set_rowshift(8); /* VRAM address is (row << rowshift) | col */ m_tms34061->set_vram_size(0x40000); m_tms34061->int_callback().set(FUNC(jpmsys5v_state::generate_tms34061_interrupt)); @@ -874,7 +874,7 @@ void jpmsys5_state::jpmsys5_ym(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &jpmsys5_state::m68000_awp_map); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); ymsound(config); @@ -888,7 +888,7 @@ void jpmsys5_state::jpmsys5(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &jpmsys5_state::m68000_awp_map_saa); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); saasound(config); diff --git a/src/mame/jpm/jpmsys7.cpp b/src/mame/jpm/jpmsys7.cpp index 59429c4396f..a1d38fb15c5 100644 --- a/src/mame/jpm/jpmsys7.cpp +++ b/src/mame/jpm/jpmsys7.cpp @@ -58,9 +58,9 @@ INPUT_PORTS_END void jpmsys7_state::jpmsys7(machine_config &config) { - MCF5206E(config, m_maincpu, 40000000); // seems to be a Coldfire of some kind + MCF5206E(config, m_maincpu, XTAL::u(40000000)); // seems to be a Coldfire of some kind m_maincpu->set_addrmap(AS_PROGRAM, &jpmsys7_state::jpmsys7_map); - MCF5206E_PERIPHERAL(config, "maincpu_onboard", 0, m_maincpu); + MCF5206E_PERIPHERAL(config, "maincpu_onboard", m_maincpu); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/jpm/pluto5.cpp b/src/mame/jpm/pluto5.cpp index c878d697d90..88f0228b9f8 100644 --- a/src/mame/jpm/pluto5.cpp +++ b/src/mame/jpm/pluto5.cpp @@ -265,7 +265,7 @@ void pluto5_state::machine_start() void pluto5_state::pluto5(machine_config &config) { - M68340(config, m_maincpu, 16000000); + M68340(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pluto5_state::pluto5_map); diff --git a/src/mame/kaneko/airbustr.cpp b/src/mame/kaneko/airbustr.cpp index c003c37c8d6..c715e7f9f01 100644 --- a/src/mame/kaneko/airbustr.cpp +++ b/src/mame/kaneko/airbustr.cpp @@ -768,7 +768,7 @@ void airbustr_state::airbustrb(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_airbustr); PALETTE(config, m_palette).set_format(palette_device::xGRB_555, 768); - KANEKO_PANDORA(config, m_pandora, 0); + KANEKO_PANDORA(config, m_pandora); m_pandora->set_gfx_region(1); m_pandora->set_gfxdecode_tag(m_gfxdecode); diff --git a/src/mame/kaneko/djboy.cpp b/src/mame/kaneko/djboy.cpp index 7c925def439..697932e2e8b 100644 --- a/src/mame/kaneko/djboy.cpp +++ b/src/mame/kaneko/djboy.cpp @@ -699,7 +699,7 @@ void djboy_state::djboy(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_djboy); PALETTE(config, m_palette).set_entries(0x200); - KANEKO_PANDORA(config, m_pandora, 0); + KANEKO_PANDORA(config, m_pandora); m_pandora->set_gfxdecode_tag(m_gfxdecode); SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/kaneko/expro02.cpp b/src/mame/kaneko/expro02.cpp index 840ce4017a9..ac012284ac1 100644 --- a/src/mame/kaneko/expro02.cpp +++ b/src/mame/kaneko/expro02.cpp @@ -952,7 +952,7 @@ void expro02_state::expro02(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - okim6295_device &oki(OKIM6295(config, "oki", 12000000/6, okim6295_device::PIN7_LOW)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(12000000)/6, okim6295_device::PIN7_LOW)); oki.set_addrmap(0, &expro02_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -985,7 +985,7 @@ void expro02_state::comad_noview2(machine_config &config) void expro02_state::fantasia(machine_config &config) { comad_noview2(config); - m_maincpu->set_clock(10000000); + m_maincpu->set_clock(XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &expro02_state::comad_map); } @@ -995,7 +995,7 @@ void expro02_state::supmodel(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &expro02_state::supmodel_map); - okim6295_device &oki(OKIM6295(config.replace(), "oki", 1584000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config.replace(), "oki", XTAL::u(1584000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.set_addrmap(0, &expro02_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1027,7 +1027,7 @@ void expro02_state::galhustl(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &expro02_state::galhustl_map); - okim6295_device &oki(OKIM6295(config.replace(), "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config.replace(), "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.set_addrmap(0, &expro02_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); @@ -1041,7 +1041,7 @@ void expro02_state::zipzap(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &expro02_state::zipzap_map); - okim6295_device &oki(OKIM6295(config.replace(), "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config.replace(), "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.set_addrmap(0, &expro02_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/kaneko/galpani3.cpp b/src/mame/kaneko/galpani3.cpp index 3d79147468f..17b03b8d442 100644 --- a/src/mame/kaneko/galpani3.cpp +++ b/src/mame/kaneko/galpani3.cpp @@ -469,13 +469,13 @@ void galpani3_state::galpani3(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xGRB_555, 0x4000); - SKNS_SPRITE(config, m_spritegen, 0); + SKNS_SPRITE(config, m_spritegen); - KANEKO_GRAP2(config, m_grap2[0], 0).set_device_rom_tag("rlebg"); + KANEKO_GRAP2(config, m_grap2[0]).set_device_rom_tag("rlebg"); - KANEKO_GRAP2(config, m_grap2[1], 0).set_device_rom_tag("rlebg"); + KANEKO_GRAP2(config, m_grap2[1]).set_device_rom_tag("rlebg"); - KANEKO_GRAP2(config, m_grap2[2], 0).set_device_rom_tag("rlebg"); + KANEKO_GRAP2(config, m_grap2[2]).set_device_rom_tag("rlebg"); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/kaneko/galpanic.cpp b/src/mame/kaneko/galpanic.cpp index 3d4426dffff..91e0cb38bd4 100644 --- a/src/mame/kaneko/galpanic.cpp +++ b/src/mame/kaneko/galpanic.cpp @@ -354,7 +354,7 @@ void galpanic_state::galpanic(machine_config &config) // fg palette RAM, bit 0 seems to be a transparency flag for the front bitmap PALETTE(config, m_palette, FUNC(galpanic_state::palette)).set_format(palette_device::GRBx_555, 1024 + 32768); - KANEKO_PANDORA(config, m_pandora, 0); + KANEKO_PANDORA(config, m_pandora); m_pandora->set_offsets(0, -16); m_pandora->set_gfxdecode_tag(m_gfxdecode); diff --git a/src/mame/kaneko/hvyunit.cpp b/src/mame/kaneko/hvyunit.cpp index 2e3fcf7db8b..ee43aeaa4f0 100644 --- a/src/mame/kaneko/hvyunit.cpp +++ b/src/mame/kaneko/hvyunit.cpp @@ -651,7 +651,7 @@ void hvyunit_state::hvyunit(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_hvyunit); PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 0x800); - KANEKO_PANDORA(config, m_pandora, 0); + KANEKO_PANDORA(config, m_pandora); m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ diff --git a/src/mame/kaneko/jchan.cpp b/src/mame/kaneko/jchan.cpp index 916b2758e05..a751d2f318f 100644 --- a/src/mame/kaneko/jchan.cpp +++ b/src/mame/kaneko/jchan.cpp @@ -586,11 +586,11 @@ INPUT_PORTS_END void jchan_state::jchan(machine_config &config) { - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &jchan_state::jchan_main); TIMER(config, "scantimer").configure_scanline(FUNC(jchan_state::vblank), "screen", 0, 1); - M68000(config, m_subcpu, 16000000); + M68000(config, m_subcpu, XTAL::u(16000000)); m_subcpu->set_addrmap(AS_PROGRAM, &jchan_state::jchan_sub); WATCHDOG_TIMER(config, "watchdog"); @@ -611,7 +611,7 @@ void jchan_state::jchan(machine_config &config) m_view2->set_palette(m_palette); for (auto &spritegen : m_spritegen) - SKNS_SPRITE(config, spritegen, 0); + SKNS_SPRITE(config, spritegen); KANEKO_TOYBOX(config, "toybox", "eeprom", "DSW1", "mcuram", "mcudata"); @@ -621,7 +621,7 @@ void jchan_state::jchan(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 16000000)); + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(16000000))); ymz.add_route(0, "lspeaker", 1.0); ymz.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/kaneko/kan_pand.cpp b/src/mame/kaneko/kan_pand.cpp index 1359262cfea..a1d8fd2a14d 100644 --- a/src/mame/kaneko/kan_pand.cpp +++ b/src/mame/kaneko/kan_pand.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(KANEKO_PANDORA, kaneko_pandora_device, "kaneko_pandora", "Kaneko PANDORA GFX") -kaneko_pandora_device::kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kaneko_pandora_device::kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KANEKO_PANDORA, tag, owner, clock) , device_video_interface(mconfig, *this) , m_gfx_region(0) diff --git a/src/mame/kaneko/kan_pand.h b/src/mame/kaneko/kan_pand.h index 0ca59e0f6f3..ba99619232b 100644 --- a/src/mame/kaneko/kan_pand.h +++ b/src/mame/kaneko/kan_pand.h @@ -20,7 +20,7 @@ class kaneko_pandora_device : public device_t, public device_video_interface { public: - kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kaneko_pandora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/kaneko/kaneko16.cpp b/src/mame/kaneko/kaneko16.cpp index 84959c03843..0b5388fb427 100644 --- a/src/mame/kaneko/kaneko16.cpp +++ b/src/mame/kaneko/kaneko16.cpp @@ -1691,7 +1691,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(kaneko16_state::interrupt) void kaneko16_berlwall_state::berlwall(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* MC68000P12 */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* MC68000P12 */ m_maincpu->set_addrmap(AS_PROGRAM, &kaneko16_berlwall_state::berlwall_map); TIMER(config, "scantimer").configure_scanline(FUNC(kaneko16_berlwall_state::interrupt), "screen", 0, 1); @@ -1724,15 +1724,15 @@ void kaneko16_berlwall_state::berlwall(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2149(config, m_ym2149[0], 1000000); + YM2149(config, m_ym2149[0], XTAL::u(1000000)); m_ym2149[0]->add_route(ALL_OUTPUTS, "mono", 0.5); m_ym2149[0]->port_a_read_callback().set_ioport("DSW1"); m_ym2149[0]->port_b_read_callback().set_ioport("DSW2"); - YM2149(config, m_ym2149[1], 1000000); + YM2149(config, m_ym2149[1], XTAL::u(1000000)); m_ym2149[1]->add_route(ALL_OUTPUTS, "mono", 0.5); - OKIM6295(config, m_oki[0], 12000000/6, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[0], XTAL::u(12000000)/6, okim6295_device::PIN7_LOW); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -1822,11 +1822,11 @@ void kaneko16_state::bakubrkr(machine_config &config) void kaneko16_state::blazeon(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* TMP68HC000-12 */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* TMP68HC000-12 */ m_maincpu->set_addrmap(AS_PROGRAM, &kaneko16_state::blazeon_map); TIMER(config, "scantimer").configure_scanline(FUNC(kaneko16_state::interrupt), "screen", 0, 1); - Z80(config, m_audiocpu, 4000000); /* D780C-2 (6 MHz) */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* D780C-2 (6 MHz) */ m_audiocpu->set_addrmap(AS_PROGRAM, &kaneko16_state::blazeon_soundmem); m_audiocpu->set_addrmap(AS_IO, &kaneko16_state::blazeon_soundport); @@ -1843,7 +1843,7 @@ void kaneko16_state::blazeon(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xGRB_555, 2048); - KANEKO_TMAP(config, m_view2[0], 0); + KANEKO_TMAP(config, m_view2[0]); m_view2[0]->set_colbase(0x40 * 16); m_view2[0]->set_offset(0x33, 0x8, 320, 240); m_view2[0]->set_palette(m_palette); @@ -1863,7 +1863,7 @@ void kaneko16_state::blazeon(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - YM2151(config, m_ymsnd, 4000000); + YM2151(config, m_ymsnd, XTAL::u(4000000)); m_ymsnd->add_route(0, "lspeaker", 1.0); m_ymsnd->add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/kaneko/kaneko_calc3.cpp b/src/mame/kaneko/kaneko_calc3.cpp index 306e81b190b..7ab518740e3 100644 --- a/src/mame/kaneko/kaneko_calc3.cpp +++ b/src/mame/kaneko/kaneko_calc3.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(KANEKO_CALC3, kaneko_calc3_device, "kaneko_calc3", "Kaneko CALC3 MCU") -kaneko_calc3_device::kaneko_calc3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kaneko_calc3_device::kaneko_calc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KANEKO_CALC3, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_eeprom(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/kaneko/kaneko_calc3.h b/src/mame/kaneko/kaneko_calc3.h index de3d0bf33e8..090fe8f4e04 100644 --- a/src/mame/kaneko/kaneko_calc3.h +++ b/src/mame/kaneko/kaneko_calc3.h @@ -13,14 +13,14 @@ class kaneko_calc3_device : public device_t public: template kaneko_calc3_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&eeprom_tag, V &®ion_tag) - : kaneko_calc3_device(mconfig, tag, owner, (uint32_t)0) + : kaneko_calc3_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); m_eeprom.set_tag(std::forward(eeprom_tag)); m_calc3_region.set_tag(std::forward(region_tag)); } - kaneko_calc3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kaneko_calc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void mcu_com0_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void mcu_com1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/kaneko/kaneko_grap2.cpp b/src/mame/kaneko/kaneko_grap2.cpp index 67e219c8fb8..0cd60d82382 100644 --- a/src/mame/kaneko/kaneko_grap2.cpp +++ b/src/mame/kaneko/kaneko_grap2.cpp @@ -34,7 +34,7 @@ void kaneko_grap2_device::grap2_map(address_map &map) DEFINE_DEVICE_TYPE(KANEKO_GRAP2, kaneko_grap2_device, "kaneko_grap2", "Kaneko GRAP2") -kaneko_grap2_device::kaneko_grap2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kaneko_grap2_device::kaneko_grap2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KANEKO_GRAP2, tag, owner, clock) , device_rom_interface(mconfig, *this) , device_palette_interface(mconfig, *this) diff --git a/src/mame/kaneko/kaneko_grap2.h b/src/mame/kaneko/kaneko_grap2.h index 1fc78a06001..387721530f0 100644 --- a/src/mame/kaneko/kaneko_grap2.h +++ b/src/mame/kaneko/kaneko_grap2.h @@ -14,7 +14,7 @@ class kaneko_grap2_device : public device_t, public device_rom_interface<32>, pu public: static constexpr unsigned PALETTE_SIZE = 256 + 1; // 0x00-0xff is internal palette, 0x100 is background colour - kaneko_grap2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kaneko_grap2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t regs1_r(offs_t offset, uint16_t mem_mask = ~0); void regs1_go_w(uint16_t data); diff --git a/src/mame/kaneko/kaneko_hit.cpp b/src/mame/kaneko/kaneko_hit.cpp index 2b08a42048d..3482d72d5ea 100644 --- a/src/mame/kaneko/kaneko_hit.cpp +++ b/src/mame/kaneko/kaneko_hit.cpp @@ -35,7 +35,7 @@ TODO: DEFINE_DEVICE_TYPE(KANEKO_HIT, kaneko_hit_device, "kaneko_hit", "Kaneko CALC Hitbox") -kaneko_hit_device::kaneko_hit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +kaneko_hit_device::kaneko_hit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KANEKO_HIT, tag, owner, clock), m_watchdog(*this, "^watchdog") { diff --git a/src/mame/kaneko/kaneko_hit.h b/src/mame/kaneko/kaneko_hit.h index ea1b721187a..878c4f11b22 100644 --- a/src/mame/kaneko/kaneko_hit.h +++ b/src/mame/kaneko/kaneko_hit.h @@ -12,12 +12,7 @@ class kaneko_hit_device : public device_t { public: - kaneko_hit_device(const machine_config &mconfig, const char *tag, device_t *owner) - : kaneko_hit_device(mconfig, tag, owner, (uint32_t)0) - { - } - - kaneko_hit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kaneko_hit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_type(int hittype) { m_hittype = hittype; } diff --git a/src/mame/kaneko/kaneko_spr.cpp b/src/mame/kaneko/kaneko_spr.cpp index 80800d4665e..bd2d72cbe1e 100644 --- a/src/mame/kaneko/kaneko_spr.cpp +++ b/src/mame/kaneko/kaneko_spr.cpp @@ -36,7 +36,7 @@ kaneko16_sprite_device::kaneko16_sprite_device( device_type type, const char *tag, device_t *owner, - u32 clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , device_video_interface(mconfig, *this) @@ -589,12 +589,12 @@ void kaneko16_sprite_device::render_sprites(const rectangle &cliprect, u16* spri draw_sprites(cliprect, spriteram16, spriteram16_bytes); } -kaneko_vu002_sprite_device::kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kaneko_vu002_sprite_device::kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kaneko16_sprite_device(mconfig, KANEKO_VU002_SPRITE, tag, owner, clock) { } -kaneko_kc002_sprite_device::kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kaneko_kc002_sprite_device::kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kaneko16_sprite_device(mconfig, KANEKO_KC002_SPRITE, tag, owner, clock) { } diff --git a/src/mame/kaneko/kaneko_spr.h b/src/mame/kaneko/kaneko_spr.h index 342eca6b6bb..e4c2f28e98d 100644 --- a/src/mame/kaneko/kaneko_spr.h +++ b/src/mame/kaneko/kaneko_spr.h @@ -65,7 +65,7 @@ protected: device_type type, const char *tag, device_t *owner, - u32 clock); + const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -117,12 +117,7 @@ private: class kaneko_vu002_sprite_device : public kaneko16_sprite_device { public: - kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner) - : kaneko_vu002_sprite_device(mconfig, tag, owner, (u32)0) - { - } - - kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kaneko_vu002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void get_sprite_attributes(struct tempsprite_t *s, u16 attr) override; int get_sprite_type(void) override{ return 0; } @@ -136,12 +131,7 @@ DECLARE_DEVICE_TYPE(KANEKO_VU002_SPRITE, kaneko_vu002_sprite_device) class kaneko_kc002_sprite_device : public kaneko16_sprite_device { public: - kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner) - : kaneko_kc002_sprite_device(mconfig, tag, owner, (u32)0) - { - } - - kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kaneko_kc002_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void get_sprite_attributes(struct tempsprite_t *s, u16 attr) override; int get_sprite_type(void) override{ return 1; } diff --git a/src/mame/kaneko/kaneko_tmap.cpp b/src/mame/kaneko/kaneko_tmap.cpp index f05bc3af220..87239b0ebcd 100644 --- a/src/mame/kaneko/kaneko_tmap.cpp +++ b/src/mame/kaneko/kaneko_tmap.cpp @@ -104,7 +104,7 @@ void kaneko_view2_tilemap_device::vram_map(address_map &map) DEFINE_DEVICE_TYPE(KANEKO_TMAP, kaneko_view2_tilemap_device, "kaneko_view2", "Kaneko VIEW2 Tilemaps") -kaneko_view2_tilemap_device::kaneko_view2_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +kaneko_view2_tilemap_device::kaneko_view2_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KANEKO_TMAP, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , m_vram(*this, "vram_%u", 0U) diff --git a/src/mame/kaneko/kaneko_tmap.h b/src/mame/kaneko/kaneko_tmap.h index 56ff7ffd9e8..4c5ea1274fa 100644 --- a/src/mame/kaneko/kaneko_tmap.h +++ b/src/mame/kaneko/kaneko_tmap.h @@ -12,12 +12,7 @@ class kaneko_view2_tilemap_device : public device_t, public device_gfx_interface public: typedef device_delegate view2_cb_delegate; - kaneko_view2_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner) - : kaneko_view2_tilemap_device(mconfig, tag, owner, (u32)0) - { - } - - kaneko_view2_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + kaneko_view2_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void set_colbase(u16 base) { m_colbase = base; } diff --git a/src/mame/kaneko/kaneko_toybox.cpp b/src/mame/kaneko/kaneko_toybox.cpp index a092545ac1e..2d2d4155684 100644 --- a/src/mame/kaneko/kaneko_toybox.cpp +++ b/src/mame/kaneko/kaneko_toybox.cpp @@ -373,7 +373,7 @@ static const uint8_t decryption_table_alt[0x100] = { DEFINE_DEVICE_TYPE(KANEKO_TOYBOX, kaneko_toybox_device, "kaneko_toybox", "Kaneko Toybox MCU") -kaneko_toybox_device::kaneko_toybox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kaneko_toybox_device::kaneko_toybox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KANEKO_TOYBOX, tag, owner, clock) , m_eeprom(*this, finder_base::DUMMY_TAG) , m_dsw1(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/kaneko/kaneko_toybox.h b/src/mame/kaneko/kaneko_toybox.h index 64e864d14ac..8001681742f 100644 --- a/src/mame/kaneko/kaneko_toybox.h +++ b/src/mame/kaneko/kaneko_toybox.h @@ -19,7 +19,7 @@ public: template kaneko_toybox_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&eeprom_tag, U &&dsw_tag, V &&mcuram_tag, W &&mcudata_tag) - : kaneko_toybox_device(mconfig, tag, owner, (uint32_t)0) + : kaneko_toybox_device(mconfig, tag, owner) { m_eeprom.set_tag(std::forward(eeprom_tag)); m_dsw1.set_tag(std::forward(dsw_tag)); @@ -27,7 +27,7 @@ public: m_mcudata.set_tag(std::forward(mcudata_tag)); } - kaneko_toybox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kaneko_toybox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_table(int tabletype) { m_tabletype = tabletype; } void set_game_type(int gametype) { m_gametype = gametype; } diff --git a/src/mame/kaneko/sandscrp.cpp b/src/mame/kaneko/sandscrp.cpp index 70a832b3d1a..71b92480e0b 100644 --- a/src/mame/kaneko/sandscrp.cpp +++ b/src/mame/kaneko/sandscrp.cpp @@ -435,7 +435,7 @@ void sandscrp_state::sandscrp(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sandscrp_state::sandscrp_mem); m_maincpu->set_vblank_int("screen", FUNC(sandscrp_state::interrupt)); - Z80(config, m_audiocpu, 4000000); /* Z8400AB1, Reads the DSWs: it can't be disabled */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* Z8400AB1, Reads the DSWs: it can't be disabled */ m_audiocpu->set_addrmap(AS_PROGRAM, &sandscrp_state::sandscrp_soundmem); m_audiocpu->set_addrmap(AS_IO, &sandscrp_state::sandscrp_soundport); @@ -461,7 +461,7 @@ void sandscrp_state::sandscrp(machine_config &config) KANEKO_HIT(config, "calc1_mcu").set_type(0); - KANEKO_PANDORA(config, m_pandora, 0); + KANEKO_PANDORA(config, m_pandora); m_pandora->set_gfxdecode_tag("gfxdecode"); /* sound hardware */ @@ -472,10 +472,10 @@ void sandscrp_state::sandscrp(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch[1]); - OKIM6295(config, "oki", 12000000/6, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); + OKIM6295(config, "oki", XTAL::u(12000000)/6, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); /* YM3014B + YM2203C */ - ym2203_device &ymsnd(YM2203(config, "ymsnd", 4000000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.port_a_read_callback().set_ioport("DSW1"); ymsnd.port_b_read_callback().set_ioport("DSW2"); diff --git a/src/mame/kaneko/sknsspr.cpp b/src/mame/kaneko/sknsspr.cpp index e8106968175..03181c3da21 100644 --- a/src/mame/kaneko/sknsspr.cpp +++ b/src/mame/kaneko/sknsspr.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(SKNS_SPRITE, sknsspr_device, "sknsspr", "SKNS Sprite") -sknsspr_device::sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sknsspr_device::sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SKNS_SPRITE, tag, owner, clock) , device_video_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/mame/kaneko/sknsspr.h b/src/mame/kaneko/sknsspr.h index 20dc8301b2b..ec50c40f578 100644 --- a/src/mame/kaneko/sknsspr.h +++ b/src/mame/kaneko/sknsspr.h @@ -11,7 +11,7 @@ class sknsspr_device : public device_t, public device_video_interface, public device_rom_interface<27> { public: - sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sknsspr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void skns_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, u32* spriteram_source, size_t spriteram_size, u32* sprite_regs); void skns_sprite_kludge(int x, int y); diff --git a/src/mame/kaneko/snowbros.cpp b/src/mame/kaneko/snowbros.cpp index d737d2c0f0c..6c2aa77268d 100644 --- a/src/mame/kaneko/snowbros.cpp +++ b/src/mame/kaneko/snowbros.cpp @@ -1767,7 +1767,7 @@ void snowbros_state::snowbros(machine_config &config) /* basic machine hardware */ M68000(config, m_maincpu, XTAL(16'000'000)/2); /* 8 Mhz - confirmed */ m_maincpu->set_addrmap(AS_PROGRAM, &snowbros_state::snowbros_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); Z80(config, m_soundcpu, XTAL(12'000'000)/2); /* 6 MHz - confirmed */ @@ -1787,7 +1787,7 @@ void snowbros_state::snowbros(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_snowbros); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 256); - KANEKO_PANDORA(config, m_pandora, 0); + KANEKO_PANDORA(config, m_pandora); m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ @@ -1808,7 +1808,7 @@ void snowbros_state::wintbob(machine_config &config) snowbros(config); /* basic machine hardware */ - m_maincpu->set_clock(10000000); /* 10mhz - Confirmed */ + m_maincpu->set_clock(XTAL::u(10000000)); /* 10mhz - Confirmed */ m_maincpu->set_addrmap(AS_PROGRAM, &snowbros_state::wintbob_map); config.device_remove("pandora"); @@ -1872,7 +1872,7 @@ void snowbros_state::honeydol(machine_config &config) /* basic machine hardware */ M68000(config, m_maincpu, XTAL(12'000'000)); /* MC68000P12 @ 12MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &snowbros_state::honeydol_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); Z80(config, m_soundcpu, XTAL(16'000'000)/4); /* 4Mhz (16MHz/4) like SemiCom or 6MHz (12MHz/2) like snowbros??? */ m_soundcpu->set_addrmap(AS_PROGRAM, &snowbros_state::honeydol_sound_map); @@ -1909,7 +1909,7 @@ void snowbros_state::twinadv(machine_config &config) /* basic machine hardware */ M68000(config, m_maincpu, XTAL(12'000'000)); /* 12MHz like Honey Doll ? */ m_maincpu->set_addrmap(AS_PROGRAM, &snowbros_state::twinadv_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); Z80(config, m_soundcpu, XTAL(16'000'000)/4); /* 4Mhz (16MHz/4) like SemiCom or 6MHz (12MHz/2) like snowbros??? */ @@ -1977,7 +1977,7 @@ void snowbros_state::finalttr(machine_config &config) ymsnd.add_route(0, "mono", 0.08); ymsnd.add_route(1, "mono", 0.08); - m_oki->set_clock(999900); + m_oki->set_clock(XTAL::u(999900)); m_oki->reset_routes().add_route(ALL_OUTPUTS, "mono", 0.4); } @@ -1995,7 +1995,7 @@ void snowbros_state::snowbro3(machine_config &config) /* PCB has 16MHz & 12MHz O /* basic machine hardware */ M68000(config, m_maincpu, XTAL(12'000'000)); /* MC68000P10 CPU @ 12mhz or 8MHz (16MHz/2) ? */ m_maincpu->set_addrmap(AS_PROGRAM, &snowbros_state::snowbros3_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(snowbros_state::snowbros3_irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(snowbros_state::snowbros3_irq), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ @@ -2022,7 +2022,7 @@ void snowbros_state::yutnori(machine_config &config) /* basic machine hardware */ M68000(config, m_maincpu, XTAL(16'000'000)/2); m_maincpu->set_addrmap(AS_PROGRAM, &snowbros_state::yutnori_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(snowbros_state::snowbros_irq), "screen", 0, 1); // WATCHDOG_TIMER(config, "watchdog"); // maybe @@ -2039,7 +2039,7 @@ void snowbros_state::yutnori(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_hyperpac); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 256); - KANEKO_PANDORA(config, m_pandora, 0); + KANEKO_PANDORA(config, m_pandora); m_pandora->set_gfxdecode_tag(m_gfxdecode); /* sound hardware */ diff --git a/src/mame/kaneko/suprnova.cpp b/src/mame/kaneko/suprnova.cpp index fecb85ae2da..b84330a77ed 100644 --- a/src/mame/kaneko/suprnova.cpp +++ b/src/mame/kaneko/suprnova.cpp @@ -795,7 +795,7 @@ void skns_state::skns(machine_config &config) PALETTE(config, m_palette).set_entries(32768); GFXDECODE(config, m_gfxdecode, m_palette, skns_bg); - SKNS_SPRITE(config, m_spritegen, 0); + SKNS_SPRITE(config, m_spritegen); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/kawai/acr20.cpp b/src/mame/kawai/acr20.cpp index 2df36272b66..e1e983784de 100644 --- a/src/mame/kawai/acr20.cpp +++ b/src/mame/kawai/acr20.cpp @@ -45,7 +45,7 @@ INPUT_PORTS_END void acr20_state::acr20(machine_config &config) { - TMP96C141(config, m_maincpu, 10'000'000); // clock unknown + TMP96C141(config, m_maincpu, XTAL::u(10'000'000)); // clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &acr20_state::mem_map); } diff --git a/src/mame/kawai/k5.cpp b/src/mame/kawai/k5.cpp index 815ac703fd8..a41621a7e15 100644 --- a/src/mame/kawai/k5.cpp +++ b/src/mame/kawai/k5.cpp @@ -53,10 +53,10 @@ INPUT_PORTS_END void kawai_k5_state::k5(machine_config &config) { - V40(config, m_maincpu, 16'000'000); // XTAL unknown + V40(config, m_maincpu, XTAL::u(16'000'000)); // XTAL unknown m_maincpu->set_addrmap(AS_PROGRAM, &kawai_k5_state::mem_map); - T6963C(config, "lcdc", 0).set_addrmap(0, &kawai_k5_state::lcd_map); + T6963C(config, "lcdc").set_addrmap(0, &kawai_k5_state::lcd_map); } ROM_START(k5) diff --git a/src/mame/kawai/ksp10.cpp b/src/mame/kawai/ksp10.cpp index ce117e7a229..1b0885df12d 100644 --- a/src/mame/kawai/ksp10.cpp +++ b/src/mame/kawai/ksp10.cpp @@ -39,7 +39,7 @@ INPUT_PORTS_END void kawai_ksp10_state::ksp10(machine_config &config) { - TMP96C141(config, m_maincpu, 10'000'000); // clock unknown + TMP96C141(config, m_maincpu, XTAL::u(10'000'000)); // clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &kawai_ksp10_state::mem_map); } diff --git a/src/mame/kawai/mb63h158.cpp b/src/mame/kawai/mb63h158.cpp index 0dfbd7808cf..445d7af4902 100644 --- a/src/mame/kawai/mb63h158.cpp +++ b/src/mame/kawai/mb63h158.cpp @@ -24,7 +24,7 @@ // device type definition DEFINE_DEVICE_TYPE(MB63H158, mb63h158_device, "mb63h158", "Kawai MB63H158 Touch Sensor") -mb63h158_device::mb63h158_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb63h158_device::mb63h158_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB63H158, tag, owner, clock) { } diff --git a/src/mame/kawai/mb63h158.h b/src/mame/kawai/mb63h158.h index 48c1166beef..142e5e472b5 100644 --- a/src/mame/kawai/mb63h158.h +++ b/src/mame/kawai/mb63h158.h @@ -21,7 +21,7 @@ class mb63h158_device : public device_t { public: // device type constructor - mb63h158_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mb63h158_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // CPU read handler u8 read(offs_t offset); diff --git a/src/mame/kawai/r100.cpp b/src/mame/kawai/r100.cpp index 2343a942a2e..80e1c6a24b9 100644 --- a/src/mame/kawai/r100.cpp +++ b/src/mame/kawai/r100.cpp @@ -129,7 +129,7 @@ void kawai_r100_state::r100(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 16); m_lcdc->set_pixel_update_cb(FUNC(kawai_r100_state::pixel_update)); } diff --git a/src/mame/kaypro/kay_kbd.cpp b/src/mame/kaypro/kay_kbd.cpp index 6cf408fb981..cc98dbc44eb 100644 --- a/src/mame/kaypro/kay_kbd.cpp +++ b/src/mame/kaypro/kay_kbd.cpp @@ -332,7 +332,7 @@ kaypro_10_keyboard_device::kaypro_10_keyboard_device( machine_config const &mconfig, char const *tag, device_t *owner, - std::uint32_t clock) + const XTAL &clock) : device_t(mconfig, KAYPRO_10_KEYBOARD, tag, owner, clock) , m_mcu(*this, "mcu") , m_bell(*this, "bell") diff --git a/src/mame/kaypro/kay_kbd.h b/src/mame/kaypro/kay_kbd.h index 6ceea75dce4..870efc90492 100644 --- a/src/mame/kaypro/kay_kbd.h +++ b/src/mame/kaypro/kay_kbd.h @@ -15,7 +15,7 @@ public: machine_config const &mconfig, char const *tag, device_t *owner, - std::uint32_t clock = 0); + const XTAL &clock = XTAL()); auto rxd_cb() { return m_rxd_cb.bind(); } diff --git a/src/mame/kaypro/kaypro.cpp b/src/mame/kaypro/kaypro.cpp index 0b9c6c6c4dd..4b629a1eac7 100644 --- a/src/mame/kaypro/kaypro.cpp +++ b/src/mame/kaypro/kaypro.cpp @@ -229,7 +229,7 @@ void kaypro_state::kayproii(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 950).add_route(ALL_OUTPUTS, "mono", 1.00); /* piezo-device needs to be measured */ + BEEP(config, m_beep, XTAL::u(950)).add_route(ALL_OUTPUTS, "mono", 1.00); /* piezo-device needs to be measured */ /* devices */ QUICKLOAD(config, "quickload", "com,cpm", attotime::from_seconds(3)).set_load_callback(FUNC(kaypro_state::quickload_cb)); @@ -320,10 +320,10 @@ void kaypro_state::kaypro484(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 950).add_route(ALL_OUTPUTS, "mono", 1.00); // piezo-device needs to be measured + BEEP(config, m_beep, XTAL::u(950)).add_route(ALL_OUTPUTS, "mono", 1.00); // piezo-device needs to be measured /* devices */ - MC6845(config, m_crtc, 2000000); // comes out of ULA - needs to be measured + MC6845(config, m_crtc, XTAL::u(2000000)); // comes out of ULA - needs to be measured m_crtc->set_screen(m_screen); m_crtc->set_show_border_area(false); m_crtc->set_char_width(7); @@ -335,7 +335,7 @@ void kaypro_state::kaypro484(machine_config &config) kbd.rxd_cb().set("sio_1", FUNC(z80sio_device::rxb_w)); kbd.rxd_cb().append("sio_1", FUNC(z80sio_device::syncb_w)); - CLOCK(config, "kbdtxrxc", 4800).signal_handler().set("sio_1", FUNC(z80sio_device::rxtxcb_w)); + CLOCK(config, "kbdtxrxc", XTAL::u(4800)).signal_handler().set("sio_1", FUNC(z80sio_device::rxtxcb_w)); CENTRONICS(config, m_centronics, centronics_devices, "printer"); m_centronics->busy_handler().set(FUNC(kaypro_state::write_centronics_busy)); diff --git a/src/mame/kiwako/koikoi.cpp b/src/mame/kiwako/koikoi.cpp index 7782130e292..a0fd5b9f698 100644 --- a/src/mame/kiwako/koikoi.cpp +++ b/src/mame/kiwako/koikoi.cpp @@ -47,7 +47,7 @@ to prevent disabling inputs. #include "speaker.h" #include "tilemap.h" -#define KOIKOI_CRYSTAL 15468000 +#define KOIKOI_CRYSTAL XTAL::u(15468000) static constexpr int input_tab[] = { 0x22, 0x64, 0x44, 0x68, 0x30, 0x50, 0x70, 0x48, 0x28, 0x21, 0x41, 0x82, 0x81, 0x42 }; diff --git a/src/mame/kiwako/mrjong.cpp b/src/mame/kiwako/mrjong.cpp index 4a6ae2be3a9..7da90567fa8 100644 --- a/src/mame/kiwako/mrjong.cpp +++ b/src/mame/kiwako/mrjong.cpp @@ -364,7 +364,7 @@ GFXDECODE_END void mrjong_state::mrjong(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 15'468'000 / 6); // 2.578 MHz + Z80(config, m_maincpu, XTAL::u(15'468'000) / 6); // 2.578 MHz m_maincpu->set_addrmap(AS_PROGRAM, &mrjong_state::program_map); m_maincpu->set_addrmap(AS_IO, &mrjong_state::io_map); @@ -383,8 +383,8 @@ void mrjong_state::mrjong(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76489(config, "sn1", 15'468'000 / 6).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76489(config, "sn2", 15'468'000 / 6).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn1", XTAL::u(15'468'000) / 6).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76489(config, "sn2", XTAL::u(15'468'000) / 6).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/koei/pasogo.cpp b/src/mame/koei/pasogo.cpp index 9ed0c9a1615..7cbd9c05a4a 100644 --- a/src/mame/koei/pasogo.cpp +++ b/src/mame/koei/pasogo.cpp @@ -553,7 +553,7 @@ void pasogo_state::pasogo(machine_config &config) ADDRESS_MAP_BANK(config, "ems").set_map(&pasogo_state::emsbank_map).set_options(ENDIANNESS_LITTLE, 16, 32, 0x4000); - ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0)); + ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb")); mb.set_cputag(m_maincpu); mb.int_callback().set_inputline(m_maincpu, 0); mb.nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); diff --git a/src/mame/konami/3dom2.cpp b/src/mame/konami/3dom2.cpp index 22d6162b4c5..a19dad7db5c 100644 --- a/src/mame/konami/3dom2.cpp +++ b/src/mame/konami/3dom2.cpp @@ -209,7 +209,7 @@ static void write_m2_reg(uint32_t ®, uint32_t data, m2_reg_wmode mode) // m2_bda_device - constructor //------------------------------------------------- -m2_bda_device::m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m2_bda_device::m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_BDA, tag, owner, clock), m_cpu1(*this, finder_base::DUMMY_TAG), m_cpu2(*this, finder_base::DUMMY_TAG), @@ -486,7 +486,7 @@ void m2_bda_device::configure_ppc_address_map(address_space &space) // m2_powerbus_device - constructor //------------------------------------------------- -m2_powerbus_device::m2_powerbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m2_powerbus_device::m2_powerbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_POWERBUS, tag, owner, clock), m_int_handler(*this) { @@ -621,7 +621,7 @@ void m2_powerbus_device::update_interrupts() // m2_memctl_device - constructor //------------------------------------------------- -m2_memctl_device::m2_memctl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m2_memctl_device::m2_memctl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_MEMCTL, tag, owner, clock), m_gpio_in(*this), m_gpio_out(*this) @@ -785,7 +785,7 @@ void m2_memctl_device::write(offs_t offset, uint32_t data, uint32_t mem_mask) // m2_vdu_device - constructor //------------------------------------------------- -m2_vdu_device::m2_vdu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m2_vdu_device::m2_vdu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_VDU, tag, owner, clock), m_screen(*this, finder_base::DUMMY_TAG), m_vint0_int_handler(*this), @@ -1392,7 +1392,7 @@ void m2_vdu_device::set_vint_timer(uint32_t id) // m2_ctrlport_device - constructor //------------------------------------------------- -m2_ctrlport_device::m2_ctrlport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m2_ctrlport_device::m2_ctrlport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_CTRLPORT, tag, owner, clock) { @@ -1474,7 +1474,7 @@ void m2_ctrlport_device::write(offs_t offset, uint32_t data) // m2_cde_device - constructor //------------------------------------------------- -m2_cde_device::m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m2_cde_device::m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_CDE, tag, owner, clock), m_cpu1(*this, finder_base::DUMMY_TAG), m_bda(*this, finder_base::DUMMY_TAG), @@ -1981,7 +1981,7 @@ TIMER_CALLBACK_MEMBER(m2_cde_device::next_dma) // m2_mpeg_device - constructor //------------------------------------------------- -m2_mpeg_device::m2_mpeg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m2_mpeg_device::m2_mpeg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_MPEG, tag, owner, clock) { } diff --git a/src/mame/konami/3dom2.h b/src/mame/konami/3dom2.h index e043cc31db1..98b90bd8179 100644 --- a/src/mame/konami/3dom2.h +++ b/src/mame/konami/3dom2.h @@ -120,14 +120,14 @@ public: }; template - m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu1_tag, U &&cpu2_tag, V &&cde_tag) + m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu1_tag, U &&cpu2_tag, V &&cde_tag) : m2_bda_device(mconfig, tag, owner, clock) { m_cpu1.set_tag(std::forward(cpu1_tag)); m_cpu2.set_tag(std::forward(cpu2_tag)); m_cde.set_tag(std::forward(cde_tag)); } - m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_bda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto videores_in() { return m_videores_in.bind(); } auto ldac_handler() { return m_dac_l.bind(); } @@ -239,7 +239,7 @@ public: // TODO: THIS SHOULD NOT BE PUBLIC class m2_powerbus_device : public device_t { public: - m2_powerbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_powerbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Static configuration helpers auto int_handler() { return m_int_handler.bind(); } @@ -293,7 +293,7 @@ private: class m2_memctl_device : public device_t { public: - m2_memctl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_memctl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto gpio_in_handler() { return m_gpio_in[Line].bind(); } template auto gpio_out_handler() { return m_gpio_out[Line].bind(); } @@ -386,7 +386,7 @@ private: class m2_vdu_device : public device_t { public: - m2_vdu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_vdu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Static configuration helpers auto vint0_int_handler() { return m_vint0_int_handler.bind(); } @@ -449,7 +449,7 @@ private: class m2_ctrlport_device : public device_t { public: - m2_ctrlport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_ctrlport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset); void write(offs_t offset, uint32_t data); @@ -471,7 +471,7 @@ private: class m2_mpeg_device : public device_t { public: - m2_mpeg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_mpeg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset); void write(offs_t offset, uint32_t data); @@ -494,13 +494,13 @@ class m2_cde_device : public device_t { public: template - m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu1_tag, U &&bda_tag) + m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu1_tag, U &&bda_tag) : m2_cde_device(mconfig, tag, owner, clock) { m_cpu1.set_tag(std::forward(cpu1_tag)); m_bda.set_tag(std::forward(bda_tag)); } - m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_cde_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Static configuration helpers auto int_handler() { return m_int_handler.bind(); } diff --git a/src/mame/konami/3dom2_te.cpp b/src/mame/konami/3dom2_te.cpp index 863e6bfd279..d7e429787c7 100644 --- a/src/mame/konami/3dom2_te.cpp +++ b/src/mame/konami/3dom2_te.cpp @@ -692,7 +692,7 @@ static const char *get_reg_name(uint32_t unit, uint32_t reg) // m2_te_device - constructor //------------------------------------------------- -m2_te_device::m2_te_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m2_te_device::m2_te_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2_TE, tag, owner, clock), m_general_int_handler(*this), m_dfinstr_int_handler(*this), diff --git a/src/mame/konami/3dom2_te.h b/src/mame/konami/3dom2_te.h index 4f20d9de67c..a034787e61d 100644 --- a/src/mame/konami/3dom2_te.h +++ b/src/mame/konami/3dom2_te.h @@ -23,7 +23,7 @@ class m2_bda_device; class m2_te_device : public device_t { public: - m2_te_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2_te_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Static configuration helpers auto general_int_handler() { return m_general_int_handler.bind(); } diff --git a/src/mame/konami/88games.cpp b/src/mame/konami/88games.cpp index d77303d508d..7cbac90ba83 100644 --- a/src/mame/konami/88games.cpp +++ b/src/mame/konami/88games.cpp @@ -298,11 +298,11 @@ void _88games_state::machine_reset() void _88games_state::_88games(machine_config &config) { /* basic machine hardware */ - KONAMI(config, m_maincpu, 3000000); /* ? */ + KONAMI(config, m_maincpu, XTAL::u(3000000)); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &_88games_state::main_map); m_maincpu->line().set(FUNC(_88games_state::banking_callback)); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &_88games_state::sound_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -320,18 +320,18 @@ void _88games_state::_88games(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette("palette"); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(_88games_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette("palette"); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(_88games_state::sprite_callback)); - K051316(config, m_k051316, 0); + K051316(config, m_k051316); m_k051316->set_palette("palette"); m_k051316->set_zoom_callback(FUNC(_88games_state::zoom_callback)); @@ -340,7 +340,7 @@ void _88games_state::_88games(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - YM2151(config, "ymsnd", 3579545).add_route(0, "mono", 0.75).add_route(1, "mono", 0.75); + YM2151(config, "ymsnd", XTAL::u(3579545)).add_route(0, "mono", 0.75).add_route(1, "mono", 0.75); UPD7759(config, m_upd7759[0]).add_route(ALL_OUTPUTS, "mono", 0.30); diff --git a/src/mame/konami/ajax.cpp b/src/mame/konami/ajax.cpp index c6cdbe6be66..d667a4773b5 100644 --- a/src/mame/konami/ajax.cpp +++ b/src/mame/konami/ajax.cpp @@ -557,10 +557,10 @@ void ajax_state::ajax(machine_config &config) KONAMI(config, m_maincpu, XTAL(24'000'000) / 2 / 4); // 052001 12/4 MHz m_maincpu->set_addrmap(AS_PROGRAM, &ajax_state::main_map); - HD6309E(config, m_subcpu, 3000000); // ? + HD6309E(config, m_subcpu, XTAL::u(3000000)); // ? m_subcpu->set_addrmap(AS_PROGRAM, &ajax_state::sub_map); - Z80(config, m_audiocpu, 3579545); // 3.58 MHz + Z80(config, m_audiocpu, XTAL::u(3579545)); // 3.58 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &ajax_state::sound_map); config.set_maximum_quantum(attotime::from_hz(600)); @@ -578,19 +578,19 @@ void ajax_state::ajax(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); m_palette->enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(ajax_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_subcpu, M6809_IRQ_LINE); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette("palette"); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(ajax_state::sprite_callback)); m_k051960->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); - K051316(config, m_k051316, 0); + K051316(config, m_k051316); m_k051316->set_palette(m_palette); m_k051316->set_bpp(7); m_k051316->set_zoom_callback(FUNC(ajax_state::zoom_callback)); @@ -601,16 +601,16 @@ void ajax_state::ajax(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); + YM2151(config, "ymsnd", XTAL::u(3579545)).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); - K007232(config, m_k007232[0], 3579545); + K007232(config, m_k007232[0], XTAL::u(3579545)); m_k007232[0]->port_write().set(FUNC(ajax_state::volume_callback0)); m_k007232[0]->add_route(0, "lspeaker", 0.20); m_k007232[0]->add_route(0, "rspeaker", 0.20); m_k007232[0]->add_route(1, "lspeaker", 0.20); m_k007232[0]->add_route(1, "rspeaker", 0.20); - K007232(config, m_k007232[1], 3579545); + K007232(config, m_k007232[1], XTAL::u(3579545)); m_k007232[1]->port_write().set(FUNC(ajax_state::volume_callback1)); m_k007232[1]->add_route(0, "lspeaker", 0.50); m_k007232[1]->add_route(1, "rspeaker", 0.50); diff --git a/src/mame/konami/aliens.cpp b/src/mame/konami/aliens.cpp index 76c5c117761..719d207578c 100644 --- a/src/mame/konami/aliens.cpp +++ b/src/mame/konami/aliens.cpp @@ -315,12 +315,12 @@ void aliens_state::aliens(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 512).enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette("palette"); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(aliens_state::tile_callback)); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette("palette"); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(aliens_state::sprite_callback)); diff --git a/src/mame/konami/asterix.cpp b/src/mame/konami/asterix.cpp index 6b09e82454f..15a53a7a170 100644 --- a/src/mame/konami/asterix.cpp +++ b/src/mame/konami/asterix.cpp @@ -234,17 +234,17 @@ void asterix_state::asterix(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(asterix_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 1); m_k056832->set_palette("palette"); - K053244(config, m_k053244, 0); + K053244(config, m_k053244); m_k053244->set_palette("palette"); m_k053244->set_offsets(-3, -1); m_k053244->set_sprite_callback(FUNC(asterix_state::sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/battlnts.cpp b/src/mame/konami/battlnts.cpp index 9c4eb3d60d8..c9ccf7a9fbc 100644 --- a/src/mame/konami/battlnts.cpp +++ b/src/mame/konami/battlnts.cpp @@ -345,12 +345,12 @@ void battlnts_state::battlnts(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_battlnts); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 128); - K007342(config, m_k007342, 0); + K007342(config, m_k007342); m_k007342->set_gfxnum(0); m_k007342->set_tile_callback(FUNC(battlnts_state::tile_callback)); m_k007342->set_gfxdecode_tag(m_gfxdecode); - K007420(config, m_k007420, 0); + K007420(config, m_k007420); m_k007420->set_bank_limit(0x3ff); m_k007420->set_sprite_callback(FUNC(battlnts_state::sprite_callback)); m_k007420->set_palette_tag("palette"); diff --git a/src/mame/konami/bishi.cpp b/src/mame/konami/bishi.cpp index e2cc16a07e8..f409631a758 100644 --- a/src/mame/konami/bishi.cpp +++ b/src/mame/konami/bishi.cpp @@ -394,15 +394,15 @@ void bishi_state::bishi(machine_config &config) m_palette->enable_shadows(); m_palette->enable_hilights(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(bishi_state::tile_callback)); m_k056832->set_config(K056832_BPP_8, 1, 0); m_k056832->set_palette(m_palette); - K054338(config, m_k054338, 0); + K054338(config, m_k054338); // FP 201404: any reason why this is not connected to the k055555 below? - K055555(config, m_k055555, 0); + K055555(config, m_k055555); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/bladestl.cpp b/src/mame/konami/bladestl.cpp index ebcd86fab08..9d44d748ca4 100644 --- a/src/mame/konami/bladestl.cpp +++ b/src/mame/konami/bladestl.cpp @@ -459,17 +459,17 @@ void bladestl_state::bladestl(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_bladestl); PALETTE(config, "palette", FUNC(bladestl_state::palette)).set_format(palette_device::xBGR_555, 32 + 16*16, 32+16); - K007342(config, m_k007342, 0); + K007342(config, m_k007342); m_k007342->set_gfxnum(0); m_k007342->set_tile_callback(FUNC(bladestl_state::tile_callback)); m_k007342->set_gfxdecode_tag(m_gfxdecode); - K007420(config, m_k007420, 0); + K007420(config, m_k007420); m_k007420->set_bank_limit(0x3ff); m_k007420->set_sprite_callback(FUNC(bladestl_state::sprite_callback)); m_k007420->set_palette_tag("palette"); - K051733(config, "k051733", 0); + K051733(config, "k051733"); // sound hardware /* the initialization order is important, the port callbacks being diff --git a/src/mame/konami/blockhl.cpp b/src/mame/konami/blockhl.cpp index d5ffd15dd02..fd03281debe 100644 --- a/src/mame/konami/blockhl.cpp +++ b/src/mame/konami/blockhl.cpp @@ -303,13 +303,13 @@ void blockhl_state::blockhl(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 1024).enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette("palette"); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(blockhl_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette("palette"); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(blockhl_state::sprite_callback)); diff --git a/src/mame/konami/bottom9.cpp b/src/mame/konami/bottom9.cpp index 6d81e147629..fa9a074d9e6 100644 --- a/src/mame/konami/bottom9.cpp +++ b/src/mame/konami/bottom9.cpp @@ -459,18 +459,18 @@ void bottom9_state::bottom9(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); m_palette->enable_shadows(); - K052109(config, m_k052109, 0); // 051961 on schematics + K052109(config, m_k052109); // 051961 on schematics m_k052109->set_palette(m_palette); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(bottom9_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(bottom9_state::sprite_callback)); - K051316(config, m_k051316, 0); + K051316(config, m_k051316); m_k051316->set_palette(m_palette); m_k051316->set_zoom_callback(FUNC(bottom9_state::zoom_callback)); diff --git a/src/mame/konami/chqflag.cpp b/src/mame/konami/chqflag.cpp index f45e4308abb..0e404633d4a 100644 --- a/src/mame/konami/chqflag.cpp +++ b/src/mame/konami/chqflag.cpp @@ -338,26 +338,26 @@ void chqflag_state::chqflag(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); m_palette->enable_shadows(); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(chqflag_state::sprite_callback)); m_k051960->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); m_k051960->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); - K051316(config, m_k051316[0], 0); + K051316(config, m_k051316[0]); m_k051316[0]->set_palette(m_palette); m_k051316[0]->set_offsets(7, 0); m_k051316[0]->set_zoom_callback(FUNC(chqflag_state::zoom_callback_1)); - K051316(config, m_k051316[1], 0); + K051316(config, m_k051316[1]); m_k051316[1]->set_palette(m_palette); m_k051316[1]->set_bpp(8); m_k051316[1]->set_layermask(0xc0); m_k051316[1]->set_wrap(1); m_k051316[1]->set_zoom_callback(FUNC(chqflag_state::zoom_callback_2)); - K051733(config, "k051733", 0); + K051733(config, "k051733"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/circusc.cpp b/src/mame/konami/circusc.cpp index 2e1b9280703..f2bf0b17066 100644 --- a/src/mame/konami/circusc.cpp +++ b/src/mame/konami/circusc.cpp @@ -586,7 +586,7 @@ WRITE_LINE_MEMBER(circusc_state::vblank_irq) void circusc_state::circusc(machine_config &config) { // basic machine hardware - KONAMI1(config, m_maincpu, 2'048'000); // 2 MHz? + KONAMI1(config, m_maincpu, XTAL::u(2'048'000)); // 2 MHz? m_maincpu->set_addrmap(AS_PROGRAM, &circusc_state::main_map); ls259_device &mainlatch(LS259(config, "mainlatch")); // 2C @@ -624,7 +624,7 @@ void circusc_state::circusc(machine_config &config) SN76496(config, m_sn[1], XTAL(14'318'181) / 8).add_route(0, "fltdisc", 1.0, 1); - DAC_8BIT_R2R(config, "dac", 0).set_output_range(0, 1).add_route(0, "fltdisc", 1.0, 2); // ls374.7g + r44+r45+r47+r48+r50+r56+r57+r58+r59 (20k) + r46+r49+r51+r52+r53+r54+r55 (10k) + upc324.3h + DAC_8BIT_R2R(config, "dac").set_output_range(0, 1).add_route(0, "fltdisc", 1.0, 2); // ls374.7g + r44+r45+r47+r48+r50+r56+r57+r58+r59 (20k) + r46+r49+r51+r52+r53+r54+r55 (10k) + upc324.3h DISCRETE(config, m_discrete, circusc_discrete).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/konami/cobra.cpp b/src/mame/konami/cobra.cpp index 390f8091534..579a2bf2035 100644 --- a/src/mame/konami/cobra.cpp +++ b/src/mame/konami/cobra.cpp @@ -502,14 +502,14 @@ class cobra_jvs : public jvs_device { public: template - cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&jvs_host_tag, bool enable) - : cobra_jvs(mconfig, tag, owner, clock) + cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, T &&jvs_host_tag, bool enable) + : cobra_jvs(mconfig, tag, owner) { host.set_tag(std::forward(jvs_host_tag)); set_main_board(enable); } - cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); //DECLARE_WRITE_LINE_MEMBER(coin_1_w); //DECLARE_WRITE_LINE_MEMBER(coin_2_w); @@ -530,7 +530,7 @@ private: DEFINE_DEVICE_TYPE(COBRA_JVS, cobra_jvs, "cobra_jvs", "JVS (COBRA)") -cobra_jvs::cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cobra_jvs::cobra_jvs(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_device(mconfig, COBRA_JVS, tag, owner, clock), m_test_port(*this, ":TEST"), m_player_ports(*this, {":P1", ":P2"}) @@ -642,7 +642,7 @@ bool cobra_jvs::coin_counters(uint8_t *&buf, uint8_t count) class cobra_jvs_host : public jvs_host { public: - cobra_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cobra_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(uint8_t, const uint8_t *&rec_data, uint32_t &rec_size); private: @@ -652,7 +652,7 @@ private: DEFINE_DEVICE_TYPE(COBRA_JVS_HOST, cobra_jvs_host, "cobra_jvs_host", "JVS-HOST (COBRA)") -cobra_jvs_host::cobra_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cobra_jvs_host::cobra_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_host(mconfig, COBRA_JVS_HOST, tag, owner, clock) { m_send_ptr = 0; @@ -3234,21 +3234,21 @@ void cobra_state::machine_reset() void cobra_state::cobra(machine_config &config) { /* basic machine hardware */ - PPC603(config, m_maincpu, 100000000); /* 603EV, 100? MHz */ + PPC603(config, m_maincpu, XTAL::u(100000000)); /* 603EV, 100? MHz */ m_maincpu->set_bus_frequency(XTAL(66'666'700)); /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &cobra_state::cobra_main_map); m_maincpu->set_vblank_int("screen", FUNC(cobra_state::cobra_vblank)); - PPC403GA(config, m_subcpu, 32000000); /* 403GA, 33? MHz */ + PPC403GA(config, m_subcpu, XTAL::u(32000000)); /* 403GA, 33? MHz */ m_subcpu->set_addrmap(AS_PROGRAM, &cobra_state::cobra_sub_map); - PPC604(config, m_gfxcpu, 100000000); /* 604, 100? MHz */ + PPC604(config, m_gfxcpu, XTAL::u(100000000)); /* 604, 100? MHz */ m_gfxcpu->set_bus_frequency(XTAL(66'666'700)); /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */ m_gfxcpu->set_addrmap(AS_PROGRAM, &cobra_state::cobra_gfx_map); config.set_maximum_quantum(attotime::from_hz(55005)); - PCI_BUS_LEGACY(config, m_legacy_pci, 0, 0); + PCI_BUS_LEGACY(config, m_legacy_pci); m_legacy_pci->set_device(0, FUNC(cobra_state::mpc106_pci_r), FUNC(cobra_state::mpc106_pci_w)); ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, true); @@ -3275,15 +3275,15 @@ void cobra_state::cobra(machine_config &config) DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "rspeaker", 1.0); - M48T58(config, "m48t58", 0); + M48T58(config, "m48t58"); - K001604(config, m_k001604, 0); // on the LAN board in Racing Jam DX + K001604(config, m_k001604); // on the LAN board in Racing Jam DX m_k001604->set_palette(m_palette); - COBRA_JVS_HOST(config, m_jvs_host, 4000000); - COBRA_JVS(config, m_jvs1, 0, m_jvs_host, true); - COBRA_JVS(config, m_jvs2, 0, m_jvs_host, true); - COBRA_JVS(config, m_jvs3, 0, m_jvs_host, true); + COBRA_JVS_HOST(config, m_jvs_host, XTAL::u(4000000)); + COBRA_JVS(config, m_jvs1, m_jvs_host, true); + COBRA_JVS(config, m_jvs2, m_jvs_host, true); + COBRA_JVS(config, m_jvs3, m_jvs_host, true); } void cobra_state::rf5c400_map(address_map& map) diff --git a/src/mame/konami/combatsc.cpp b/src/mame/konami/combatsc.cpp index 1126dcc93c1..5960624a900 100644 --- a/src/mame/konami/combatsc.cpp +++ b/src/mame/konami/combatsc.cpp @@ -679,11 +679,11 @@ void combatscb_state::machine_reset() void combatsc_state::combatsc(machine_config &config) { // basic machine hardware - HD6309(config, m_maincpu, 3000000*4); // 3 MHz? + HD6309(config, m_maincpu, XTAL::u(3000000)*4); // 3 MHz? m_maincpu->set_addrmap(AS_PROGRAM, &combatsc_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(combatsc_state::irq0_line_hold)); - Z80(config, m_audiocpu, 3579545); // 3.579545 MHz + Z80(config, m_audiocpu, XTAL::u(3579545)); // 3.579545 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &combatsc_state::sound_map); config.set_maximum_quantum(attotime::from_hz(1200)); @@ -707,9 +707,9 @@ void combatsc_state::combatsc(machine_config &config) m_palette->set_format(palette_device::xBGR_555, 8 * 16 * 16, 128); m_palette->set_endianness(ENDIANNESS_LITTLE); - K007121(config, m_k007121[0], 0); + K007121(config, m_k007121[0]); m_k007121[0]->set_palette_tag(m_palette); - K007121(config, m_k007121[1], 0); + K007121(config, m_k007121[1]); m_k007121[1]->set_palette_tag(m_palette); // sound hardware @@ -717,7 +717,7 @@ void combatsc_state::combatsc(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 3000000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(3000000))); ymsnd.port_a_write_callback().set(FUNC(combatsc_state::portA_w)); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.20); @@ -729,11 +729,11 @@ void combatsc_state::combatsc(machine_config &config) void combatscb_state::combatscb(machine_config &config) { // basic machine hardware - HD6309(config, m_maincpu, 3000000*4); // 3 MHz? + HD6309(config, m_maincpu, XTAL::u(3000000)*4); // 3 MHz? m_maincpu->set_addrmap(AS_PROGRAM, &combatscb_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(combatsc_state::irq0_line_hold)); - Z80(config, m_audiocpu, 3579545); // 3.579545 MHz + Z80(config, m_audiocpu, XTAL::u(3579545)); // 3.579545 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &combatscb_state::sound_map); config.set_maximum_quantum(attotime::from_hz(1200)); @@ -757,9 +757,9 @@ void combatscb_state::combatscb(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - YM2203(config, "ymsnd", 3000000).add_route(ALL_OUTPUTS, "mono", 0.20); + YM2203(config, "ymsnd", XTAL::u(3000000)).add_route(ALL_OUTPUTS, "mono", 0.20); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_callback().set_inputline("audiocpu", 0, ASSERT_LINE); m_msm->set_prescaler_selector(msm5205_device::S96_4B); m_msm->add_route(ALL_OUTPUTS, "mono", 0.30); diff --git a/src/mame/konami/contra.cpp b/src/mame/konami/contra.cpp index 53d20b28f3c..841bf74ae3b 100644 --- a/src/mame/konami/contra.cpp +++ b/src/mame/konami/contra.cpp @@ -627,9 +627,9 @@ void contra_state::contra(machine_config &config) m_palette->set_indirect_entries(128); m_palette->set_endianness(ENDIANNESS_LITTLE); - K007121(config, m_k007121[0], 0); + K007121(config, m_k007121[0]); m_k007121[0]->set_palette_tag(m_palette); - K007121(config, m_k007121[1], 0); + K007121(config, m_k007121[1]); m_k007121[1]->set_palette_tag(m_palette); // sound hardware diff --git a/src/mame/konami/crimfght.cpp b/src/mame/konami/crimfght.cpp index 91b20a15bbe..f75b922e38a 100644 --- a/src/mame/konami/crimfght.cpp +++ b/src/mame/konami/crimfght.cpp @@ -325,12 +325,12 @@ void crimfght_state::crimfght(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 512); m_palette->enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(crimfght_state::tile_callback)); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(crimfght_state::sprite_callback)); diff --git a/src/mame/konami/dbz.cpp b/src/mame/konami/dbz.cpp index 2f64e7d5883..92d68796296 100644 --- a/src/mame/konami/dbz.cpp +++ b/src/mame/konami/dbz.cpp @@ -328,11 +328,11 @@ void dbz_state::machine_reset() void dbz_state::dbz(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dbz_state::dbz_map); TIMER(config, "scantimer").configure_scanline(FUNC(dbz_state::dbz_scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &dbz_state::dbz_sound_map); m_audiocpu->set_addrmap(AS_IO, &dbz_state::dbz_sound_io_map); @@ -349,27 +349,27 @@ void dbz_state::dbz(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x4000/2).enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(dbz_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 1); m_k056832->set_palette("palette"); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(dbz_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, -87, 32); // or -52, 16? m_k053246->set_palette("palette"); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); - K053936(config, m_k053936_1, 0); + K053936(config, m_k053936_1); m_k053936_1->set_wrap(1); m_k053936_1->set_offsets(-46, -16); - K053936(config, m_k053936_2, 0); + K053936(config, m_k053936_2); m_k053936_2->set_wrap(1); m_k053936_2->set_offsets(-46, -16); - K053252(config, m_k053252, 16000000/2); + K053252(config, m_k053252, XTAL::u(16000000)/2); m_k053252->int1_ack().set(FUNC(dbz_state::dbz_irq2_ack_w)); /* sound hardware */ @@ -378,12 +378,12 @@ void dbz_state::dbz(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 4000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 1.0); ymsnd.add_route(1, "rspeaker", 1.0); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); oki.add_route(ALL_OUTPUTS, "lspeaker", 1.0); oki.add_route(ALL_OUTPUTS, "rspeaker", 1.0); } diff --git a/src/mame/konami/divebomb.cpp b/src/mame/konami/divebomb.cpp index 5acb10759bf..44256616fb6 100644 --- a/src/mame/konami/divebomb.cpp +++ b/src/mame/konami/divebomb.cpp @@ -690,14 +690,14 @@ void divebomb_state::divebomb(machine_config &config) GENERIC_LATCH_8(config, m_roz2fg_latch); m_roz2fg_latch->data_pending_callback().set(m_fgcpu_irq, FUNC(input_merger_any_high_device::in_w<1>)); - K051316(config, m_k051316[0], 0); + K051316(config, m_k051316[0]); m_k051316[0]->set_palette(m_palette); m_k051316[0]->set_bpp(8); m_k051316[0]->set_wrap(0); m_k051316[0]->set_offsets(-88, -16); m_k051316[0]->set_zoom_callback(FUNC(divebomb_state::zoom_callback_1)); - K051316(config, m_k051316[1], 0); + K051316(config, m_k051316[1]); m_k051316[1]->set_palette(m_palette); m_k051316[1]->set_bpp(8); m_k051316[1]->set_wrap(0); diff --git a/src/mame/konami/djmain.cpp b/src/mame/konami/djmain.cpp index a691aeabd19..d2ea411adb7 100644 --- a/src/mame/konami/djmain.cpp +++ b/src/mame/konami/djmain.cpp @@ -1383,8 +1383,8 @@ void djmain_state::djmainj(machine_config &config) { /* basic machine hardware */ // popn3 works 9.6 MHz or slower in some songs */ - //M68EC020(config, m_maincpu, 18432000/2); /* 9.216 MHz!? */ - M68EC020(config, m_maincpu, 32000000/4); /* 8.000 MHz!? */ + //M68EC020(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216 MHz!? */ + M68EC020(config, m_maincpu, XTAL::u(32000000)/4); /* 8.000 MHz!? */ m_maincpu->set_addrmap(AS_PROGRAM, &djmain_state::maincpu_djmainj); m_maincpu->set_vblank_int("screen", FUNC(djmain_state::vb_interrupt)); @@ -1402,12 +1402,12 @@ void djmain_state::djmainj(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 0x4440 / 4); GFXDECODE(config, m_gfxdecode, m_palette, gfx_djmain); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(djmain_state::tile_callback)); m_k056832->set_config(K056832_BPP_4dj, 1, 1); m_k056832->set_palette(m_palette); - K055555(config, m_k055555, 0); + K055555(config, m_k055555); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/fastlane.cpp b/src/mame/konami/fastlane.cpp index b1cd8d08250..9cf48123f6e 100644 --- a/src/mame/konami/fastlane.cpp +++ b/src/mame/konami/fastlane.cpp @@ -388,10 +388,10 @@ void fastlane_state::fastlane(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_fastlane); PALETTE(config, m_palette, FUNC(fastlane_state::palette)).set_format(palette_device::xBGR_555, 1024*16, 0x400); - K007121(config, m_k007121, 0); + K007121(config, m_k007121); m_k007121->set_palette_tag(m_palette); - K051733(config, "k051733", 0); + K051733(config, "k051733"); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/konami/finalizr.cpp b/src/mame/konami/finalizr.cpp index 6d82adc6fc9..7f5306b198f 100644 --- a/src/mame/konami/finalizr.cpp +++ b/src/mame/konami/finalizr.cpp @@ -540,7 +540,7 @@ void finalizr_state::finalizr(machine_config &config) SN76489A(config, "snsnd", 18.432_MHz_XTAL / 12).add_route(ALL_OUTPUTS, "speaker", 0.75); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.325); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.325); // unknown DAC } void finalizr_state::finalizrb(machine_config &config) diff --git a/src/mame/konami/firebeat.cpp b/src/mame/konami/firebeat.cpp index 0bfd15aaa41..22a830ee607 100644 --- a/src/mame/konami/firebeat.cpp +++ b/src/mame/konami/firebeat.cpp @@ -178,7 +178,7 @@ DECLARE_DEVICE_TYPE(KONAMI_FIREBEAT_EXTEND_SPECTRUM_ANALYZER, firebeat_extend_sp class firebeat_extend_spectrum_analyzer_device : public device_t, public device_mixer_interface { public: - firebeat_extend_spectrum_analyzer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + firebeat_extend_spectrum_analyzer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); @@ -210,7 +210,7 @@ private: int m_bars[TOTAL_CHANNELS][TOTAL_BARS]{}; }; -firebeat_extend_spectrum_analyzer_device::firebeat_extend_spectrum_analyzer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +firebeat_extend_spectrum_analyzer_device::firebeat_extend_spectrum_analyzer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_FIREBEAT_EXTEND_SPECTRUM_ANALYZER, tag, owner, clock), device_mixer_interface(mconfig, *this, 2) { @@ -268,7 +268,7 @@ void firebeat_extend_spectrum_analyzer_device::sound_stream_update(sound_stream int cur_notch = 0; for (int i = 0; i <= FFT_LENGTH / 2; i++) { - const double freq = (double)i / FFT_LENGTH * srate; + const double freq = (double)i / FFT_LENGTH * srate.dvalue(); if (freq < NOTCHES[cur_notch]) continue; @@ -732,7 +732,7 @@ void firebeat_state::firebeat(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &firebeat_state::firebeat_map); m_maincpu->set_vblank_int("screen", FUNC(firebeat_state::firebeat_interrupt)); - RTC65271(config, "rtc", 0); + RTC65271(config, "rtc"); FUJITSU_29F016A(config, "flash_main"); FUJITSU_29F016A(config, "flash_snd1"); @@ -750,20 +750,20 @@ void firebeat_state::firebeat(machine_config &config) screen.set_screen_update(FUNC(firebeat_state::screen_update_firebeat_0)); screen.set_palette("palette"); - K057714(config, m_gcu, 0).set_screen("screen"); + K057714(config, m_gcu).set_screen("screen"); m_gcu->irq_callback().set(FUNC(firebeat_state::gcu_interrupt)); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400)); + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(16934400))); ymz.irq_handler().set(FUNC(firebeat_state::sound_irq_callback)); ymz.set_addrmap(0, &firebeat_state::ymz280b_map); ymz.add_route(1, "lspeaker", 1.0); ymz.add_route(0, "rspeaker", 1.0); - PC16552D(config, "duart_com", 0); + PC16552D(config, "duart_com"); NS16550(config, "duart_com:chan0", XTAL(19'660'800)); NS16550(config, "duart_com:chan1", XTAL(19'660'800)); } @@ -1206,7 +1206,7 @@ void firebeat_spu_state::firebeat_spu_base(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &firebeat_spu_state::firebeat_spu_map); - M68000(config, m_audiocpu, 16000000); + M68000(config, m_audiocpu, XTAL::u(16000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &firebeat_spu_state::spu_map); CY7C131(config, m_dpram); @@ -1451,7 +1451,7 @@ void firebeat_bm3_state::firebeat_bm3(machine_config &config) FLOPPY_CONNECTOR(config, m_floppy, pc_hd_floppies, "35hd", floppy_image_device::default_pc_floppy_formats); - PC16552D(config, m_duart_midi, 0); + PC16552D(config, m_duart_midi); NS16550(config, "duart_midi:chan0", XTAL(24'000'000)); NS16550(config, "duart_midi:chan1", XTAL(24'000'000)).out_int_callback().set(FUNC(firebeat_bm3_state::midi_st224_irq_callback)); @@ -1459,7 +1459,7 @@ void firebeat_bm3_state::firebeat_bm3(machine_config &config) m_rf5c400->add_route(2, "lspeaker", 0.5); m_rf5c400->add_route(3, "rspeaker", 0.5); - KONAMI_FIREBEAT_EXTEND_SPECTRUM_ANALYZER(config, m_spectrum_analyzer, 0); + KONAMI_FIREBEAT_EXTEND_SPECTRUM_ANALYZER(config, m_spectrum_analyzer); m_rf5c400->add_route(0, m_spectrum_analyzer, 0.5, AUTO_ALLOC_INPUT, 0); m_rf5c400->add_route(1, m_spectrum_analyzer, 0.5, AUTO_ALLOC_INPUT, 1); m_rf5c400->add_route(2, m_spectrum_analyzer, 0.5, AUTO_ALLOC_INPUT, 0); @@ -1790,7 +1790,7 @@ void firebeat_kbm_state::firebeat_kbm(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &firebeat_kbm_state::firebeat_kbm_map); m_maincpu->set_vblank_int("lscreen", FUNC(firebeat_kbm_state::firebeat_interrupt)); - RTC65271(config, "rtc", 0); + RTC65271(config, "rtc"); FUJITSU_29F016A(config, "flash_main"); FUJITSU_29F016A(config, "flash_snd1"); @@ -1809,7 +1809,7 @@ void firebeat_kbm_state::firebeat_kbm(machine_config &config) lscreen.set_screen_update(FUNC(firebeat_kbm_state::screen_update_firebeat_0)); lscreen.set_palette("palette"); - K057714(config, m_gcu, 0).set_screen("lscreen"); + K057714(config, m_gcu).set_screen("lscreen"); m_gcu->irq_callback().set(FUNC(firebeat_kbm_state::gcu_interrupt)); screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER)); @@ -1817,32 +1817,32 @@ void firebeat_kbm_state::firebeat_kbm(machine_config &config) rscreen.set_screen_update(FUNC(firebeat_kbm_state::screen_update_firebeat_1)); rscreen.set_palette("palette"); - K057714(config, m_gcu_sub, 0).set_screen("rscreen"); + K057714(config, m_gcu_sub).set_screen("rscreen"); m_gcu_sub->irq_callback().set(FUNC(firebeat_kbm_state::gcu_interrupt)); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400)); + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(16934400))); ymz.irq_handler().set(FUNC(firebeat_kbm_state::sound_irq_callback)); ymz.set_addrmap(0, &firebeat_kbm_state::ymz280b_map); ymz.add_route(1, "lspeaker", 1.0); ymz.add_route(0, "rspeaker", 1.0); // On the main PCB - PC16552D(config, "duart_com", 0); + PC16552D(config, "duart_com"); NS16550(config, "duart_com:chan0", XTAL(19'660'800)); NS16550(config, "duart_com:chan1", XTAL(19'660'800)); // On the extend board - PC16552D(config, m_duart_midi, 0); + PC16552D(config, m_duart_midi); auto &midi_chan1(NS16550(config, "duart_midi:chan1", XTAL(24'000'000))); - MIDI_KBD(config, m_kbd[0], 31250).tx_callback().set(midi_chan1, FUNC(ins8250_uart_device::rx_w)); + MIDI_KBD(config, m_kbd[0], XTAL::u(31250)).tx_callback().set(midi_chan1, FUNC(ins8250_uart_device::rx_w)); midi_chan1.out_int_callback().set(FUNC(firebeat_kbm_state::midi_keyboard_left_irq_callback)); auto &midi_chan0(NS16550(config, "duart_midi:chan0", XTAL(24'000'000))); - MIDI_KBD(config, m_kbd[1], 31250).tx_callback().set(midi_chan0, FUNC(ins8250_uart_device::rx_w)); + MIDI_KBD(config, m_kbd[1], XTAL::u(31250)).tx_callback().set(midi_chan0, FUNC(ins8250_uart_device::rx_w)); midi_chan0.out_int_callback().set(FUNC(firebeat_kbm_state::midi_keyboard_right_irq_callback)); // Synth card diff --git a/src/mame/konami/flkatck.cpp b/src/mame/konami/flkatck.cpp index dadfa670a6d..3f7fd58de68 100644 --- a/src/mame/konami/flkatck.cpp +++ b/src/mame/konami/flkatck.cpp @@ -450,7 +450,7 @@ void flkatck_state::flkatck(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_flkatck); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 512).set_endianness(ENDIANNESS_LITTLE); - K007121(config, m_k007121, 0); + K007121(config, m_k007121); m_k007121->set_palette_tag("palette"); // sound hardware diff --git a/src/mame/konami/giclassic.cpp b/src/mame/konami/giclassic.cpp index 4ec9ec38f21..929a050f7fa 100644 --- a/src/mame/konami/giclassic.cpp +++ b/src/mame/konami/giclassic.cpp @@ -314,7 +314,7 @@ void giclassic_state::giclassic(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 256); m_palette->enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(giclassic_state::tile_callback)); m_k056832->set_config(K056832_BPP_4PIRATESH, 1, 0); m_k056832->set_palette(m_palette); @@ -338,12 +338,12 @@ void giclassicsvr_state::giclassvr(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 16384); m_palette->enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(giclassicsvr_state::tile_callback)); m_k056832->set_config(K056832_BPP_4PIRATESH, 0, 0); m_k056832->set_palette(m_palette); - K055673(config, m_k055673, 0); + K055673(config, m_k055673); m_k055673->set_sprite_callback(FUNC(giclassicsvr_state::sprite_callback)); m_k055673->set_config(K055673_LAYOUT_PS, -60, 24); m_k055673->set_palette(m_palette); diff --git a/src/mame/konami/gijoe.cpp b/src/mame/konami/gijoe.cpp index df886dd541d..5b960fbca98 100644 --- a/src/mame/konami/gijoe.cpp +++ b/src/mame/konami/gijoe.cpp @@ -315,17 +315,17 @@ void gijoe_state::gijoe(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(gijoe_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 0); m_k056832->set_palette(m_palette); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(gijoe_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, -37, 20); m_k053246->set_palette(m_palette); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/gradius3.cpp b/src/mame/konami/gradius3.cpp index c31d15937b3..b5f9fbdb4f7 100644 --- a/src/mame/konami/gradius3.cpp +++ b/src/mame/konami/gradius3.cpp @@ -268,7 +268,7 @@ void gradius3_state::gradius3(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(gradius3_state::gradius3_sub_scanline), "screen", 0, 1); /* 4 is triggered by cpu A, the others are unknown but required for the game to run. */ - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &gradius3_state::gradius3_s_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -286,13 +286,13 @@ void gradius3_state::gradius3(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xRGB_555, 2048).enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette("palette"); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(gradius3_state::tile_callback)); m_k052109->set_char_ram(true); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette("palette"); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(gradius3_state::sprite_callback)); @@ -304,9 +304,9 @@ void gradius3_state::gradius3(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(0, "rspeaker", 1.0); + YM2151(config, "ymsnd", XTAL::u(3579545)).add_route(0, "lspeaker", 1.0).add_route(0, "rspeaker", 1.0); - K007232(config, m_k007232, 3579545); + K007232(config, m_k007232, XTAL::u(3579545)); m_k007232->port_write().set(FUNC(gradius3_state::volume_callback)); m_k007232->add_route(0, "lspeaker", 0.20); m_k007232->add_route(0, "rspeaker", 0.20); diff --git a/src/mame/konami/gticlub.cpp b/src/mame/konami/gticlub.cpp index 80496e5d4d9..78268078776 100644 --- a/src/mame/konami/gticlub.cpp +++ b/src/mame/konami/gticlub.cpp @@ -864,7 +864,7 @@ void gticlub_state::gticlub(machine_config &config) EEPROM_93C56_16BIT(config, "eeprom"); - ADC1038(config, m_adc1038, 0); + ADC1038(config, m_adc1038); m_adc1038->set_input_callback(FUNC(gticlub_state::adc1038_input_callback)); m_adc1038->set_gti_club_hack(true); @@ -880,17 +880,17 @@ void gticlub_state::gticlub(machine_config &config) PALETTE(config, m_palette).set_entries(65536); - K001604(config, m_k001604[0], 0); + K001604(config, m_k001604[0]); m_k001604[0]->set_palette(m_palette); - K001005(config, m_k001005, 0, m_k001006[0]); + K001005(config, m_k001005, m_k001006[0]); - K001006(config, m_k001006[0], 0); + K001006(config, m_k001006[0]); m_k001006[0]->set_gfx_region("textures"); // The second K001006 chip connects to the second K001005 chip. // Hook this up when the K001005 separation is understood (seems the load balancing is done on hardware). - K001006(config, m_k001006[1], 0); + K001006(config, m_k001006[1]); m_k001006[1]->set_gfx_region("textures"); K056800(config, m_k056800, XTAL(33'868'800)/2); @@ -903,7 +903,7 @@ void gticlub_state::gticlub(machine_config &config) rfsnd.add_route(0, "lspeaker", 1.0); rfsnd.add_route(1, "rspeaker", 1.0); - KONPPC(config, m_konppc, 0); + KONPPC(config, m_konppc); m_konppc->set_num_boards(1); m_konppc->set_cbboard_type(konppc_device::CGBOARD_TYPE_GTICLUB); } @@ -946,7 +946,7 @@ void gticlub_state::hangplt(machine_config &config) EEPROM_93C56_16BIT(config, "eeprom"); - ADC1038(config, m_adc1038, 0); + ADC1038(config, m_adc1038); m_adc1038->set_input_callback(FUNC(gticlub_state::adc1038_input_callback)); K056230(config, m_k056230); @@ -970,8 +970,8 @@ void gticlub_state::hangplt(machine_config &config) m_voodoo[1]->vblank_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ1); m_voodoo[1]->stall_callback().set(m_dsp[1], FUNC(adsp21062_device::write_stall)); - K033906(config, "k033906_1", 0, m_voodoo[0]); - K033906(config, "k033906_2", 0, m_voodoo[1]); + K033906(config, "k033906_1", m_voodoo[0]); + K033906(config, "k033906_2", m_voodoo[1]); // video hardware PALETTE(config, m_palette).set_entries(65536); @@ -988,10 +988,10 @@ void gticlub_state::hangplt(machine_config &config) rscreen.set_visarea(0, 511, 0, 383); rscreen.set_screen_update(FUNC(gticlub_state::screen_update_two_screens<1>)); - K001604(config, m_k001604[0], 0); + K001604(config, m_k001604[0]); m_k001604[0]->set_palette(m_palette); - K001604(config, m_k001604[1], 0); + K001604(config, m_k001604[1]); m_k001604[1]->set_palette(m_palette); K056800(config, m_k056800, XTAL(33'868'800)/2); @@ -1004,7 +1004,7 @@ void gticlub_state::hangplt(machine_config &config) rfsnd.add_route(0, "lspeaker", 1.0); rfsnd.add_route(1, "rspeaker", 1.0); - KONPPC(config, m_konppc, 0); + KONPPC(config, m_konppc); m_konppc->set_num_boards(2); m_konppc->set_cbboard_type(konppc_device::CGBOARD_TYPE_HANGPLT); } diff --git a/src/mame/konami/hcastle.cpp b/src/mame/konami/hcastle.cpp index a139d061700..969c426be03 100644 --- a/src/mame/konami/hcastle.cpp +++ b/src/mame/konami/hcastle.cpp @@ -448,11 +448,11 @@ void hcastle_state::machine_reset() void hcastle_state::hcastle(machine_config &config) { // basic machine hardware - KONAMI(config, m_maincpu, 3000000); // Derived from 24 MHz clock + KONAMI(config, m_maincpu, XTAL::u(3000000)); // Derived from 24 MHz clock m_maincpu->set_addrmap(AS_PROGRAM, &hcastle_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(hcastle_state::irq0_line_hold)); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &hcastle_state::sound_map); WATCHDOG_TIMER(config, "watchdog"); @@ -472,9 +472,9 @@ void hcastle_state::hcastle(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_hcastle); PALETTE(config, m_palette, FUNC(hcastle_state::palette)).set_format(palette_device::xBGR_555, 2*8*16*16, 128); - K007121(config, m_k007121[0], 0); + K007121(config, m_k007121[0]); m_k007121[0]->set_palette_tag(m_palette); - K007121(config, m_k007121[1], 0); + K007121(config, m_k007121[1]); m_k007121[1]->set_palette_tag(m_palette); // sound hardware @@ -482,16 +482,16 @@ void hcastle_state::hcastle(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - K007232(config, m_k007232, 3579545); + K007232(config, m_k007232, XTAL::u(3579545)); m_k007232->port_write().set(FUNC(hcastle_state::volume_callback)); m_k007232->add_route(0, "mono", 0.44); m_k007232->add_route(1, "mono", 0.50); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 3579545)); + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(3579545))); ymsnd.irq_handler().set_inputline("audiocpu", INPUT_LINE_NMI); // from schematic; NMI handler is just a retn ymsnd.add_route(ALL_OUTPUTS, "mono", 0.70); - K051649(config, "k051649", 3579545).add_route(ALL_OUTPUTS, "mono", 0.45); + K051649(config, "k051649", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 0.45); } /***************************************************************************/ diff --git a/src/mame/konami/hexion.cpp b/src/mame/konami/hexion.cpp index 9b523bea91d..3003a0505db 100644 --- a/src/mame/konami/hexion.cpp +++ b/src/mame/konami/hexion.cpp @@ -507,7 +507,7 @@ void hexion_state::hexion(machine_config &config) SPEAKER(config, "mono").front_center(); // MSM6295GS @ 5E, clock frequency & pin 7 not verified - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); // KONAMI 051649 // 2212P003 // JAPAN 8910EAJ @ 1D, xtal verified, divider not verified K051649(config, "k051649", XTAL(24'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.5); @@ -521,7 +521,7 @@ void hexion_state::hexionb(machine_config &config) config.device_remove("k051649"); // clock frequency & pin 7 not verified; this clock and pin 7 being low makes the pitch match the non-bootleg version, so is probably correct - OKIM6295(config, "oki2", 1056000, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.5); + OKIM6295(config, "oki2", XTAL::u(1056000), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.5); } diff --git a/src/mame/konami/hornet.cpp b/src/mame/konami/hornet.cpp index 3b898cd6ac5..ceb9a70c042 100644 --- a/src/mame/konami/hornet.cpp +++ b/src/mame/konami/hornet.cpp @@ -1130,7 +1130,7 @@ void hornet_state::hornet(machine_config &config) m_voodoo[0]->vblank_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_voodoo[0]->stall_callback().set(m_dsp[0], FUNC(adsp21062_device::write_stall)); - K033906(config, "k033906_1", 0, m_voodoo[0]); + K033906(config, "k033906_1", m_voodoo[0]); // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -1140,7 +1140,7 @@ void hornet_state::hornet(machine_config &config) PALETTE(config, "palette").set_entries(65536); - K037122(config, m_k037122[0], 0); + K037122(config, m_k037122[0]); m_k037122[0]->set_screen("screen"); m_k037122[0]->set_palette("palette"); @@ -1154,12 +1154,12 @@ void hornet_state::hornet(machine_config &config) .add_route(0, "lspeaker", 1.0) .add_route(1, "rspeaker", 1.0); - M48T58(config, "m48t58", 0); + M48T58(config, "m48t58"); - ADC12138(config, m_adc12138, 0); + ADC12138(config, m_adc12138); m_adc12138->set_ipt_convert_callback(FUNC(hornet_state::adc12138_input_callback)); - KONPPC(config, m_konppc, 0); + KONPPC(config, m_konppc); m_konppc->set_num_boards(1); m_konppc->set_cbboard_type(konppc_device::CGBOARD_TYPE_HORNET); } @@ -1170,7 +1170,7 @@ void hornet_state::hornet_lan(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &hornet_state::hornet_lan_map); - KONAMI_GN676_LAN(config, "gn676_lan", 0, m_workram); + KONAMI_GN676_LAN(config, "gn676_lan", m_workram); } void hornet_state::terabrst(machine_config &config) //todo: add K056800 from I/O board @@ -1196,7 +1196,7 @@ void hornet_state::sscope(machine_config &config) m_k037122[0]->set_screen("lscreen"); m_k037122[0]->set_palette("palette"); - K037122(config, m_k037122[1], 0); // unknown input clock + K037122(config, m_k037122[1]); // unknown input clock m_k037122[1]->set_screen("rscreen"); m_k037122[1]->set_palette("palette"); @@ -1211,7 +1211,7 @@ void hornet_state::sscope(machine_config &config) m_voodoo[1]->vblank_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ1); m_voodoo[1]->stall_callback().set(m_dsp[1], FUNC(adsp21062_device::write_stall)); - K033906(config, "k033906_2", 0, m_voodoo[1]); + K033906(config, "k033906_2", m_voodoo[1]); // video hardware config.device_remove("screen"); @@ -1226,7 +1226,7 @@ void hornet_state::sscope(machine_config &config) rscreen.set_raw(XTAL(64'000'000) / 4, 1017, 106, 106 + 768, 262, 17, 17 + 236); rscreen.set_screen_update(FUNC(hornet_state::screen_update<1>)); -/* ADC12138(config, m_adc12138_2, 0); +/* ADC12138(config, m_adc12138_2); m_adc12138->set_ipt_convert_callback(FUNC(hornet_state::sscope_input_callback)); */ m_konppc->set_num_boards(2); diff --git a/src/mame/konami/hyperspt.cpp b/src/mame/konami/hyperspt.cpp index e7915f21491..7834f93efdb 100644 --- a/src/mame/konami/hyperspt.cpp +++ b/src/mame/konami/hyperspt.cpp @@ -658,9 +658,9 @@ void base_state::base(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - TRACKFLD_AUDIO(config, m_soundbrd, 0, m_audiocpu, finder_base::DUMMY_TAG); + TRACKFLD_AUDIO(config, m_soundbrd, m_audiocpu, finder_base::DUMMY_TAG); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC SN76496(config, m_sn, XTAL(14'318'181)/8); // verified on PCB m_sn->add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -673,7 +673,7 @@ void hyperspt_state::hyperspt(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &hyperspt_state::hyperspt_common_main_map); m_audiocpu->set_addrmap(AS_PROGRAM, &hyperspt_state::sound_map); - TRACKFLD_AUDIO(config.replace(), m_soundbrd, 0, m_audiocpu, m_vlm); + TRACKFLD_AUDIO(config.replace(), m_soundbrd, m_audiocpu, m_vlm); VLM5030(config, m_vlm, XTAL(3'579'545)); // verified on PCB m_vlm->add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -691,9 +691,9 @@ void hypersptb_state::hypersptb(machine_config &config) GENERIC_LATCH_8(config, "soundlatch2"); - HYPROLYB_ADPCM(config, "hyprolyb_adpcm", 0); + HYPROLYB_ADPCM(config, "hyprolyb_adpcm"); - msm5205_device &msm(MSM5205(config, "msm", 384'000)); + msm5205_device &msm(MSM5205(config, "msm", XTAL::u(384'000))); msm.vck_legacy_callback().set("hyprolyb_adpcm", FUNC(hyprolyb_adpcm_device::vck_callback)); msm.set_prescaler_selector(msm5205_device::S96_4B); // 4 kHz msm.add_route(ALL_OUTPUTS, "speaker", 0.5); diff --git a/src/mame/konami/hyprolyb.cpp b/src/mame/konami/hyprolyb.cpp index 28ba081806d..279c45d6931 100644 --- a/src/mame/konami/hyprolyb.cpp +++ b/src/mame/konami/hyprolyb.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(HYPROLYB_ADPCM, hyprolyb_adpcm_device, "hyprolyb_adpcm", "Hyper Olympics Audio") -hyprolyb_adpcm_device::hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hyprolyb_adpcm_device::hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HYPROLYB_ADPCM, tag, owner, clock) , m_audiocpu(*this, ":audiocpu") , m_soundlatch2(*this, ":soundlatch2") diff --git a/src/mame/konami/hyprolyb.h b/src/mame/konami/hyprolyb.h index 5d9ce541551..78ff4aa1231 100644 --- a/src/mame/konami/hyprolyb.h +++ b/src/mame/konami/hyprolyb.h @@ -11,7 +11,7 @@ class hyprolyb_adpcm_device : public device_t { public: - hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hyprolyb_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(uint8_t data); uint8_t busy_r(); diff --git a/src/mame/konami/ironhors.cpp b/src/mame/konami/ironhors.cpp index 21604147498..c4a7ab6914b 100644 --- a/src/mame/konami/ironhors.cpp +++ b/src/mame/konami/ironhors.cpp @@ -836,7 +836,7 @@ These clocks make the emulation run too fast. void ironhors_base_state::base(machine_config &config) { // basic machine hardware - MC6809E(config, m_maincpu, 18'432'000 / 6); // 3.072 MHz??? mod by Shingo Suzuki 1999/10/15 + MC6809E(config, m_maincpu, XTAL::u(18'432'000) / 6); // 3.072 MHz??? mod by Shingo Suzuki 1999/10/15 // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -844,7 +844,7 @@ void ironhors_base_state::base(machine_config &config) // m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); // m_screen->set_size(32*8, 32*8); // m_screen->set_visarea(1*8, 31*8-1, 2*8, 30*8-1); - m_screen->set_raw(18'432'000 / 4, 296, 8, 256 - 8, 255, 16, 240); // pixel clock is a guesswork + m_screen->set_raw(XTAL::u(18'432'000) / 4, 296, 8, 256 - 8, 255, 16, 240); // pixel clock is a guesswork m_screen->set_palette(m_palette); PALETTE(config, m_palette, FUNC(ironhors_state::palette), 16*8*16+16*8*16, 256); @@ -854,7 +854,7 @@ void ironhors_base_state::base(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym2203_device &ym2203(YM2203(config, "ym2203", 18'432'000 / 6)); + ym2203_device &ym2203(YM2203(config, "ym2203", XTAL::u(18'432'000) / 6)); ym2203.port_a_write_callback().set(FUNC(ironhors_state::filter_w)); ym2203.add_route(0, "disc_ih", 1.0, 0); ym2203.add_route(1, "disc_ih", 1.0, 1); @@ -871,7 +871,7 @@ void ironhors_state::ironhors(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &ironhors_state::master_map); TIMER(config, "scantimer").configure_scanline(FUNC(ironhors_state::scanline_tick), "screen", 0, 1); - Z80(config, m_soundcpu, 18'432'000 / 6); // 3.072 MHz + Z80(config, m_soundcpu, XTAL::u(18'432'000) / 6); // 3.072 MHz m_soundcpu->set_addrmap(AS_PROGRAM, &ironhors_state::slave_map); m_soundcpu->set_addrmap(AS_IO, &ironhors_state::slave_io_map); @@ -903,7 +903,7 @@ void farwest_state::farwest(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &farwest_state::master_map); TIMER(config, "scantimer").configure_scanline(FUNC(farwest_state::scanline_tick), "screen", 0, 1); - Z80(config, m_soundcpu, 18'432'000 / 6); // 3.072 MHz + Z80(config, m_soundcpu, XTAL::u(18'432'000) / 6); // 3.072 MHz m_soundcpu->set_addrmap(AS_PROGRAM, &farwest_state::slave_map); GFXDECODE(config, m_gfxdecode, m_palette, gfx_farwest); diff --git a/src/mame/konami/junofrst.cpp b/src/mame/konami/junofrst.cpp index 4f9ec9ad1ee..c69403e466d 100644 --- a/src/mame/konami/junofrst.cpp +++ b/src/mame/konami/junofrst.cpp @@ -407,13 +407,13 @@ WRITE_LINE_MEMBER(junofrst_state::_30hz_irq) void junofrst_state::junofrst(machine_config &config) { /* basic machine hardware */ - KONAMI1(config, m_maincpu, 1500000); /* 1.5 MHz ??? */ + KONAMI1(config, m_maincpu, XTAL::u(1500000)); /* 1.5 MHz ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &junofrst_state::main_map); - Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */ + Z80(config, m_audiocpu, XTAL::u(14318000)/8); /* 1.78975 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &junofrst_state::audio_map); - I8039(config, m_i8039, 8000000); /* 8MHz crystal */ + I8039(config, m_i8039, XTAL::u(8000000)); /* 8MHz crystal */ m_i8039->set_addrmap(AS_PROGRAM, &junofrst_state::mcu_map); m_i8039->set_addrmap(AS_IO, &junofrst_state::mcu_io_map); m_i8039->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w)); @@ -444,14 +444,14 @@ void junofrst_state::junofrst(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); GENERIC_LATCH_8(config, "soundlatch2"); - ay8910_device &aysnd(AY8910(config, "aysnd", 14318000/8)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(14318000)/8)); aysnd.port_a_read_callback().set(FUNC(junofrst_state::portA_r)); aysnd.port_b_write_callback().set(FUNC(junofrst_state::portB_w)); aysnd.add_route(0, "filter.0.0", 0.30); aysnd.add_route(1, "filter.0.1", 0.30); aysnd.add_route(2, "filter.0.2", 0.30); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // 100K (R56-63)/200K (R64-71) ladder network + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // 100K (R56-63)/200K (R64-71) ladder network FILTER_RC(config, m_filter_0_0).add_route(ALL_OUTPUTS, "speaker", 1.0); FILTER_RC(config, m_filter_0_1).add_route(ALL_OUTPUTS, "speaker", 1.0); diff --git a/src/mame/konami/k001005.cpp b/src/mame/konami/k001005.cpp index 32a24cb25ca..a079a397564 100644 --- a/src/mame/konami/k001005.cpp +++ b/src/mame/konami/k001005.cpp @@ -694,7 +694,7 @@ void k001005_renderer::draw(bitmap_rgb32 &bitmap, const rectangle &cliprect) DEFINE_DEVICE_TYPE(K001005, k001005_device, "k001005", "K001005 Polygon Renderer") -k001005_device::k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k001005_device::k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K001005, tag, owner, clock) , device_video_interface(mconfig, *this) , m_k001006(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/konami/k001005.h b/src/mame/konami/k001005.h index 1a2e39ea451..d986c405d31 100644 --- a/src/mame/konami/k001005.h +++ b/src/mame/konami/k001005.h @@ -100,10 +100,10 @@ private: class k001005_device : public device_t, public device_video_interface { public: - k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); - template k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&texel_tag) - : k001005_device(mconfig, tag, owner, clock) + template k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&texel_tag) + : k001005_device(mconfig, tag, owner) { set_texel_tag(std::forward(texel_tag)); } diff --git a/src/mame/konami/k001006.cpp b/src/mame/konami/k001006.cpp index f64d82083aa..02819a9d1df 100644 --- a/src/mame/konami/k001006.cpp +++ b/src/mame/konami/k001006.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(K001006, k001006_device, "k001006", "K001006 Texel Unit") -k001006_device::k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k001006_device::k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K001006, tag, owner, clock), m_pal_ram(nullptr), m_unknown_ram(nullptr), diff --git a/src/mame/konami/k001006.h b/src/mame/konami/k001006.h index e74a8350a1a..fe9ce3d8962 100644 --- a/src/mame/konami/k001006.h +++ b/src/mame/konami/k001006.h @@ -10,7 +10,7 @@ class k001006_device : public device_t { public: - k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~k001006_device() {} // configuration diff --git a/src/mame/konami/k001604.cpp b/src/mame/konami/k001604.cpp index 6f90a19087e..ff4ec54e97b 100644 --- a/src/mame/konami/k001604.cpp +++ b/src/mame/konami/k001604.cpp @@ -155,7 +155,7 @@ DEFINE_DEVICE_TYPE(K001604, k001604_device, "k001604_device", "K001604 2D tilemaps + 2x ROZ") -k001604_device::k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k001604_device::k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K001604, tag, owner, clock), device_gfx_interface(mconfig, *this, nullptr), m_tile_ram(nullptr), diff --git a/src/mame/konami/k001604.h b/src/mame/konami/k001604.h index 7f2ee10698f..f78de018a93 100644 --- a/src/mame/konami/k001604.h +++ b/src/mame/konami/k001604.h @@ -11,7 +11,7 @@ class k001604_device : public device_t, public device_gfx_interface { public: - k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k001604_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_irq.bind(); } diff --git a/src/mame/konami/k007121.cpp b/src/mame/konami/k007121.cpp index 4a2875264fd..960f61f1f5a 100644 --- a/src/mame/konami/k007121.cpp +++ b/src/mame/konami/k007121.cpp @@ -123,7 +123,7 @@ control registers DEFINE_DEVICE_TYPE(K007121, k007121_device, "k007121", "K007121 Sprite/Tilemap Controller") -k007121_device::k007121_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k007121_device::k007121_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K007121, tag, owner, clock) , m_flipscreen(0) , m_palette(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/konami/k007121.h b/src/mame/konami/k007121.h index 63bab8d52d8..dd76f882680 100644 --- a/src/mame/konami/k007121.h +++ b/src/mame/konami/k007121.h @@ -11,7 +11,7 @@ class k007121_device : public device_t { public: - k007121_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k007121_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } diff --git a/src/mame/konami/k007342.cpp b/src/mame/konami/k007342.cpp index 6538ad00800..2333a0fdf1d 100644 --- a/src/mame/konami/k007342.cpp +++ b/src/mame/konami/k007342.cpp @@ -38,7 +38,7 @@ control registers DEFINE_DEVICE_TYPE(K007342, k007342_device, "k007342", "K007342 Video Controller") -k007342_device::k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k007342_device::k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K007342, tag, owner, clock), m_ram(nullptr), m_scroll_ram(nullptr), diff --git a/src/mame/konami/k007342.h b/src/mame/konami/k007342.h index e8daa2ced7e..f948a45f356 100644 --- a/src/mame/konami/k007342.h +++ b/src/mame/konami/k007342.h @@ -13,7 +13,7 @@ class k007342_device : public device_t public: using tile_delegate = device_delegate; - k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/konami/k007420.cpp b/src/mame/konami/k007420.cpp index 6e40099c543..ad6641dd00f 100644 --- a/src/mame/konami/k007420.cpp +++ b/src/mame/konami/k007420.cpp @@ -21,7 +21,7 @@ TODO: DEFINE_DEVICE_TYPE(K007420, k007420_device, "k007420", "K007420 Sprite Generator") -k007420_device::k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k007420_device::k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K007420, tag, owner, clock) , m_ram(nullptr) , m_flipscreen(0) diff --git a/src/mame/konami/k007420.h b/src/mame/konami/k007420.h index d9d228bfcec..032c51fd93c 100644 --- a/src/mame/konami/k007420.h +++ b/src/mame/konami/k007420.h @@ -13,7 +13,7 @@ class k007420_device : public device_t public: using sprite_delegate = device_delegate; - k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward(tag)); } void set_bank_limit(int limit) { m_banklimit = limit; } diff --git a/src/mame/konami/k007452.cpp b/src/mame/konami/k007452.cpp index 6644e2aa436..13c5fa913b7 100644 --- a/src/mame/konami/k007452.cpp +++ b/src/mame/konami/k007452.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(KONAMI_007452_MATH, k007452_device, "konami_007452", "Konami // k007452_device - constructor //------------------------------------------------- -k007452_device::k007452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k007452_device::k007452_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_007452_MATH, tag, owner, clock) { } diff --git a/src/mame/konami/k007452.h b/src/mame/konami/k007452.h index b294ee83c4d..67e0f0bdb85 100644 --- a/src/mame/konami/k007452.h +++ b/src/mame/konami/k007452.h @@ -20,7 +20,7 @@ class k007452_device : public device_t { public: // construction/destruction - k007452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + k007452_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // public interface u8 read(offs_t offset); diff --git a/src/mame/konami/k037122.cpp b/src/mame/konami/k037122.cpp index f8a03f95b9d..731e60a272e 100644 --- a/src/mame/konami/k037122.cpp +++ b/src/mame/konami/k037122.cpp @@ -79,7 +79,7 @@ TODO: DEFINE_DEVICE_TYPE(K037122, k037122_device, "k037122", "K037122 2D Tilemap") -k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K037122, tag, owner, clock), device_video_interface(mconfig, *this), device_gfx_interface(mconfig, *this, nullptr), diff --git a/src/mame/konami/k037122.h b/src/mame/konami/k037122.h index ac83989968d..65af28d7746 100644 --- a/src/mame/konami/k037122.h +++ b/src/mame/konami/k037122.h @@ -13,7 +13,7 @@ class k037122_device : public device_t, public: static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } // unimplemented tilemap ROZ, scroll registers - k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_gfx_index(int index) { m_gfx_index = index; } diff --git a/src/mame/konami/k051733.cpp b/src/mame/konami/k051733.cpp index e3a810db594..6070e3d87b8 100644 --- a/src/mame/konami/k051733.cpp +++ b/src/mame/konami/k051733.cpp @@ -65,7 +65,7 @@ reads from 0x0006, and only uses bit 1. DEFINE_DEVICE_TYPE(K051733, k051733_device, "k051733", "K051733 Protection") -k051733_device::k051733_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k051733_device::k051733_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K051733, tag, owner, clock), //m_ram[0x20], m_rng(0) diff --git a/src/mame/konami/k051733.h b/src/mame/konami/k051733.h index cf749d3d93b..6581bc0558a 100644 --- a/src/mame/konami/k051733.h +++ b/src/mame/konami/k051733.h @@ -9,7 +9,7 @@ class k051733_device : public device_t { public: - k051733_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k051733_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); uint8_t read(offs_t offset); diff --git a/src/mame/konami/k051960.cpp b/src/mame/konami/k051960.cpp index 65eef97a7b2..19745cfbf0b 100644 --- a/src/mame/konami/k051960.cpp +++ b/src/mame/konami/k051960.cpp @@ -135,7 +135,7 @@ GFXDECODE_MEMBER( k051960_device::gfxinfo_gradius3 ) GFXDECODE_END -k051960_device::k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k051960_device::k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K051960, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo) , device_video_interface(mconfig, *this) diff --git a/src/mame/konami/k051960.h b/src/mame/konami/k051960.h index 91a4f62ce4b..f4518668fe5 100644 --- a/src/mame/konami/k051960.h +++ b/src/mame/konami/k051960.h @@ -28,7 +28,7 @@ class k051960_device : public device_t, public device_gfx_interface, public devi public: using sprite_delegate = device_delegate; - k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/mame/konami/k052109.cpp b/src/mame/konami/k052109.cpp index de90be17715..3c0597a284a 100644 --- a/src/mame/konami/k052109.cpp +++ b/src/mame/konami/k052109.cpp @@ -164,7 +164,7 @@ GFXDECODE_MEMBER( k052109_device::gfxinfo_ram ) GFXDECODE_END -k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K052109, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), device_video_interface(mconfig, *this, false), diff --git a/src/mame/konami/k052109.h b/src/mame/konami/k052109.h index 0dc28c7651c..1603bdcd752 100644 --- a/src/mame/konami/k052109.h +++ b/src/mame/konami/k052109.h @@ -20,7 +20,7 @@ class k052109_device : public device_t, public device_gfx_interface, public devi public: using tile_delegate = device_delegate; - k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~k052109_device() {} auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/mame/konami/k053244_k053245.cpp b/src/mame/konami/k053244_k053245.cpp index fdd82c3344b..3c5159e4eb6 100644 --- a/src/mame/konami/k053244_k053245.cpp +++ b/src/mame/konami/k053244_k053245.cpp @@ -81,7 +81,7 @@ GFXDECODE_MEMBER( k05324x_device::gfxinfo_6bpp ) GFXDECODE_END -k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053244, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), m_ram(nullptr), diff --git a/src/mame/konami/k053244_k053245.h b/src/mame/konami/k053244_k053245.h index bc534d7a2df..219e8e6c89d 100644 --- a/src/mame/konami/k053244_k053245.h +++ b/src/mame/konami/k053244_k053245.h @@ -19,7 +19,7 @@ class k05324x_device : public device_t, public device_gfx_interface public: using sprite_delegate = device_delegate; - k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_bpp(int bpp); diff --git a/src/mame/konami/k053246_k053247_k055673.cpp b/src/mame/konami/k053246_k053247_k055673.cpp index a6f0d92748e..3d2edcaaddc 100644 --- a/src/mame/konami/k053246_k053247_k055673.cpp +++ b/src/mame/konami/k053246_k053247_k055673.cpp @@ -887,7 +887,7 @@ void k053247_device::zdrawgfxzoom32GP( DEFINE_DEVICE_TYPE(K055673, k055673_device, "k055673", "K055673 Sprite Generator") -k055673_device::k055673_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k055673_device::k055673_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : k053247_device(mconfig, K055673, tag, owner, clock) { } @@ -1046,12 +1046,12 @@ void k055673_device::device_start() DEFINE_DEVICE_TYPE(K053247, k053247_device, "k053247", "K053246/K053247 Sprite Generator") -k053247_device::k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k053247_device::k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : k053247_device(mconfig, K053247, tag, owner, clock) { } -k053247_device::k053247_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +k053247_device::k053247_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , device_gfx_interface(mconfig, *this, nullptr) diff --git a/src/mame/konami/k053246_k053247_k055673.h b/src/mame/konami/k053246_k053247_k055673.h index 242a3907259..00dd1cc96fa 100644 --- a/src/mame/konami/k053246_k053247_k055673.h +++ b/src/mame/konami/k053246_k053247_k055673.h @@ -53,7 +53,7 @@ class k053247_device : public device_t, public: using sprite_delegate = device_delegate; - k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + k053247_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_sprite_callback(T &&... args) { m_k053247_cb.set(std::forward(args)...); } @@ -439,7 +439,7 @@ public: protected: - k053247_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + k053247_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -454,7 +454,7 @@ static auto &K053246 = K053247; class k055673_device : public k053247_device { public: - k055673_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + k055673_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~k055673_device() { } protected: diff --git a/src/mame/konami/k053250.cpp b/src/mame/konami/k053250.cpp index 6022f059d68..3b8f8ba61a1 100644 --- a/src/mame/konami/k053250.cpp +++ b/src/mame/konami/k053250.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(K053250, k053250_device, "k053250", "K053250 LVC") -k053250_device::k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k053250_device::k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053250, tag, owner, clock), device_gfx_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/mame/konami/k053250.h b/src/mame/konami/k053250.h index dbaeb60a125..40aa475bb4d 100644 --- a/src/mame/konami/k053250.h +++ b/src/mame/konami/k053250.h @@ -16,14 +16,14 @@ class k053250_device : public device_t, { public: template - k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&palette_tag, U &&screen_tag, int offx, int offy) - : k053250_device(mconfig, tag, owner, clock) + k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&palette_tag, U &&screen_tag, int offx, int offy) + : k053250_device(mconfig, tag, owner) { set_palette(std::forward(palette_tag)); set_screen(std::forward(screen_tag)); set_offsets(offx, offy); } - k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k053250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_offsets(int offx, int offy) { diff --git a/src/mame/konami/k053250_ps.cpp b/src/mame/konami/k053250_ps.cpp index 071f92564b5..1937db3e0da 100644 --- a/src/mame/konami/k053250_ps.cpp +++ b/src/mame/konami/k053250_ps.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(K053250PS, k053250ps_device, "k053250ps", "K053250PS LVC") -k053250ps_device::k053250ps_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k053250ps_device::k053250ps_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053250PS, tag, owner, clock), device_gfx_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/mame/konami/k053250_ps.h b/src/mame/konami/k053250_ps.h index 10f61e936e7..66b225ee83a 100644 --- a/src/mame/konami/k053250_ps.h +++ b/src/mame/konami/k053250_ps.h @@ -16,7 +16,7 @@ class k053250ps_device : public device_t, { public: template - k053250ps_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&palette_tag, U &&screen_tag, int offx, int offy) + k053250ps_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&palette_tag, U &&screen_tag, int offx, int offy) : k053250ps_device(mconfig, tag, owner, clock) { set_palette(std::forward(palette_tag)); @@ -24,7 +24,7 @@ public: set_offsets(offx, offy); } - k053250ps_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k053250ps_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_offsets(int offx, int offy) { diff --git a/src/mame/konami/k053251.cpp b/src/mame/konami/k053251.cpp index c162e35f06b..3284e8213be 100644 --- a/src/mame/konami/k053251.cpp +++ b/src/mame/konami/k053251.cpp @@ -128,7 +128,7 @@ actually used, since the priority is taken from the external ports. DEFINE_DEVICE_TYPE(K053251, k053251_device, "k053251", "K053251 Priority Encoder") -k053251_device::k053251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k053251_device::k053251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053251, tag, owner, clock), //m_dirty_tmap[5], //m_ram[16], diff --git a/src/mame/konami/k053251.h b/src/mame/konami/k053251.h index 185bbbb1ada..de41081a43f 100644 --- a/src/mame/konami/k053251.h +++ b/src/mame/konami/k053251.h @@ -15,7 +15,7 @@ public: CI4 }; - k053251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k053251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); /* Note: k053251_w() automatically does a ALL_TILEMAPS->mark_all_dirty() diff --git a/src/mame/konami/k054000.cpp b/src/mame/konami/k054000.cpp index 0b101113301..dfb990c5119 100644 --- a/src/mame/konami/k054000.cpp +++ b/src/mame/konami/k054000.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(K054000, k054000_device, "k054000", "K054000 Protection") -k054000_device::k054000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k054000_device::k054000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K054000, tag, owner, clock) { } diff --git a/src/mame/konami/k054000.h b/src/mame/konami/k054000.h index 8f434982783..97e9444f5c5 100644 --- a/src/mame/konami/k054000.h +++ b/src/mame/konami/k054000.h @@ -9,7 +9,7 @@ class k054000_device : public device_t { public: - k054000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k054000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~k054000_device() {} void map(address_map &map); diff --git a/src/mame/konami/k054156_k054157_k056832.cpp b/src/mame/konami/k054156_k054157_k056832.cpp index 7824e3a26a6..62c5d1be5f4 100644 --- a/src/mame/konami/k054156_k054157_k056832.cpp +++ b/src/mame/konami/k054156_k054157_k056832.cpp @@ -184,7 +184,7 @@ ones. The other 7 words are ignored. Global scrollx is ignored. DEFINE_DEVICE_TYPE(K056832, k056832_device, "k056832", "K056832 Tilemap Generator") -k056832_device::k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k056832_device::k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K056832, tag, owner, clock), device_gfx_interface(mconfig, *this), //m_tilemap[K056832_PAGE_COUNT], diff --git a/src/mame/konami/k054156_k054157_k056832.h b/src/mame/konami/k054156_k054157_k056832.h index 8645b6af628..fda14dd2a60 100644 --- a/src/mame/konami/k054156_k054157_k056832.h +++ b/src/mame/konami/k054156_k054157_k056832.h @@ -33,13 +33,13 @@ class k056832_device : public device_t, public device_gfx_interface public: using tile_delegate = device_delegate; - template k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&mixer_tag) + template k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&mixer_tag) : k056832_device(mconfig, tag, owner, clock) { m_k055555.set_tag(std::forward(mixer_tag)); } - k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_tile_callback(T &&... args) { m_k056832_cb.set(std::forward(args)...); } diff --git a/src/mame/konami/k054338.cpp b/src/mame/konami/k054338.cpp index 8e0e61fd5c3..337878faae2 100644 --- a/src/mame/konami/k054338.cpp +++ b/src/mame/konami/k054338.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(K054338, k054338_device, "k054338", "K054338 Mixer") -k054338_device::k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k054338_device::k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K054338, tag, owner, clock), device_video_interface(mconfig, *this), m_alpha_inv(0), diff --git a/src/mame/konami/k054338.h b/src/mame/konami/k054338.h index f9a011eb4e1..aa420437586 100644 --- a/src/mame/konami/k054338.h +++ b/src/mame/konami/k054338.h @@ -27,13 +27,13 @@ class k054338_device : public device_t, public device_video_interface { public: - template k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&mixer_tag) - : k054338_device(mconfig, tag, owner, clock) + template k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&mixer_tag) + : k054338_device(mconfig, tag, owner) { m_k055555.set_tag(std::forward(mixer_tag)); } - k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k054338_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void set_alpha_invert(int alpha_inv) { m_alpha_inv = alpha_inv; } diff --git a/src/mame/konami/k055555.cpp b/src/mame/konami/k055555.cpp index 64c2dcfd33a..f4ba06c3553 100644 --- a/src/mame/konami/k055555.cpp +++ b/src/mame/konami/k055555.cpp @@ -143,7 +143,7 @@ int k055555_device::K055555_get_palette_index(int idx) DEFINE_DEVICE_TYPE(K055555, k055555_device, "k055555", "K055555 Priority Encoder") -k055555_device::k055555_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k055555_device::k055555_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K055555, tag, owner, clock) { } diff --git a/src/mame/konami/k055555.h b/src/mame/konami/k055555.h index 0b94decc061..89461db1962 100644 --- a/src/mame/konami/k055555.h +++ b/src/mame/konami/k055555.h @@ -76,7 +76,7 @@ class k055555_device : public device_t { public: - k055555_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k055555_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~k055555_device() { } void K055555_write_reg(uint8_t regnum, uint8_t regdat); diff --git a/src/mame/konami/k057714.cpp b/src/mame/konami/k057714.cpp index 447f7220510..3031da0b6d4 100644 --- a/src/mame/konami/k057714.cpp +++ b/src/mame/konami/k057714.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(K057714, k057714_device, "k057714", "k057714_device GCU") -k057714_device::k057714_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k057714_device::k057714_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K057714, tag, owner, clock) , device_video_interface(mconfig, *this) , m_irq(*this) diff --git a/src/mame/konami/k057714.h b/src/mame/konami/k057714.h index 5e6565f5ff8..9f41c47119a 100644 --- a/src/mame/konami/k057714.h +++ b/src/mame/konami/k057714.h @@ -10,7 +10,7 @@ class k057714_device : public device_t, public device_video_interface { public: // construction/destruction - k057714_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k057714_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_irq.bind(); } diff --git a/src/mame/konami/k573cass.cpp b/src/mame/konami/k573cass.cpp index 2d1a26d77eb..7e33d9578ff 100644 --- a/src/mame/konami/k573cass.cpp +++ b/src/mame/konami/k573cass.cpp @@ -64,12 +64,12 @@ READ_LINE_MEMBER(konami573_cassette_interface::read_line_adc083x_sars) DEFINE_DEVICE_TYPE(KONAMI573_CASSETTE_X, konami573_cassette_x_device, "k573cassx", "Konami 573 Cassette X") -konami573_cassette_x_device::konami573_cassette_x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_x_device::konami573_cassette_x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : konami573_cassette_x_device(mconfig, KONAMI573_CASSETTE_X, tag, owner, clock) { } -konami573_cassette_x_device::konami573_cassette_x_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_x_device::konami573_cassette_x_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), konami573_cassette_interface(mconfig, *this), m_x76f041(*this, "eeprom") @@ -114,7 +114,7 @@ READ_LINE_MEMBER(konami573_cassette_x_device::read_line_secflash_sda) DEFINE_DEVICE_TYPE(KONAMI573_CASSETTE_XI, konami573_cassette_xi_device, "k573cassxi", "Konami 573 Cassette XI") -konami573_cassette_xi_device::konami573_cassette_xi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_xi_device::konami573_cassette_xi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : konami573_cassette_x_device(mconfig, KONAMI573_CASSETTE_XI, tag, owner, clock), m_ds2401(*this, "id"), m_adc0838(*this, "adc0838") @@ -170,12 +170,12 @@ READ_LINE_MEMBER(konami573_cassette_xi_device::read_line_adc083x_sars) DEFINE_DEVICE_TYPE(KONAMI573_CASSETTE_Y, konami573_cassette_y_device, "k573cassy", "Konami 573 Cassette Y") -konami573_cassette_y_device::konami573_cassette_y_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_y_device::konami573_cassette_y_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : konami573_cassette_y_device(mconfig, KONAMI573_CASSETTE_Y, tag, owner, clock) { } -konami573_cassette_y_device::konami573_cassette_y_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_y_device::konami573_cassette_y_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), konami573_cassette_interface(mconfig, *this), m_x76f100(*this, "eeprom"), @@ -261,7 +261,7 @@ WRITE_LINE_MEMBER(konami573_cassette_y_device::write_line_d7) DEFINE_DEVICE_TYPE(KONAMI573_CASSETTE_YI, konami573_cassette_yi_device, "k573cassyi", "Konami 573 Cassette YI") -konami573_cassette_yi_device::konami573_cassette_yi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_yi_device::konami573_cassette_yi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : konami573_cassette_y_device(mconfig, KONAMI573_CASSETTE_YI, tag, owner, clock), m_ds2401(*this, "id") { @@ -288,7 +288,7 @@ READ_LINE_MEMBER(konami573_cassette_yi_device::read_line_ds2401) DEFINE_DEVICE_TYPE(KONAMI573_CASSETTE_ZI, konami573_cassette_zi_device, "k573casszi", "Konami 573 Cassette ZI") -konami573_cassette_zi_device::konami573_cassette_zi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_zi_device::konami573_cassette_zi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI573_CASSETTE_ZI, tag, owner, clock), konami573_cassette_interface(mconfig, *this), m_zs01(*this,"eeprom"), @@ -345,7 +345,7 @@ READ_LINE_MEMBER(konami573_cassette_zi_device::read_line_secflash_sda) DEFINE_DEVICE_TYPE(KONAMI573_CASSETTE_SLOT, konami573_cassette_slot_device, "k572cassslot", "Konami 573 Cassette Slot") -konami573_cassette_slot_device::konami573_cassette_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +konami573_cassette_slot_device::konami573_cassette_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI573_CASSETTE_SLOT, tag, owner, clock), device_single_card_slot_interface(mconfig, *this), m_dsr_handler(*this) diff --git a/src/mame/konami/k573cass.h b/src/mame/konami/k573cass.h index 1c5285851df..3ace9bf3420 100644 --- a/src/mame/konami/k573cass.h +++ b/src/mame/konami/k573cass.h @@ -26,7 +26,7 @@ class konami573_cassette_slot_device : public device_t, public device_single_car friend class konami573_cassette_interface; public: - konami573_cassette_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto dsr_handler() { return m_dsr_handler.bind(); } @@ -88,7 +88,7 @@ DECLARE_DEVICE_TYPE(KONAMI573_CASSETTE_X, konami573_cassette_x_device) class konami573_cassette_x_device: public device_t, public konami573_cassette_interface { public: - konami573_cassette_x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_READ_LINE_MEMBER(read_line_secflash_sda) override; virtual DECLARE_WRITE_LINE_MEMBER(write_line_d0) override; @@ -97,7 +97,7 @@ public: virtual DECLARE_WRITE_LINE_MEMBER(write_line_d3) override; protected: - konami573_cassette_x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; @@ -111,7 +111,7 @@ DECLARE_DEVICE_TYPE(KONAMI573_CASSETTE_XI, konami573_cassette_xi_device) class konami573_cassette_xi_device: public konami573_cassette_x_device { public: - konami573_cassette_xi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_xi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_READ_LINE_MEMBER(read_line_ds2401) override; virtual DECLARE_WRITE_LINE_MEMBER(write_line_d4) override; @@ -138,7 +138,7 @@ DECLARE_DEVICE_TYPE(KONAMI573_CASSETTE_Y, konami573_cassette_y_device) class konami573_cassette_y_device: public device_t, public konami573_cassette_interface { public: - konami573_cassette_y_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_y_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto d0_handler() { return m_d0_handler.bind(); } @@ -161,7 +161,7 @@ public: virtual DECLARE_WRITE_LINE_MEMBER(write_line_d7) override; protected: - konami573_cassette_y_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_y_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; @@ -185,7 +185,7 @@ DECLARE_DEVICE_TYPE(KONAMI573_CASSETTE_YI, konami573_cassette_yi_device) class konami573_cassette_yi_device: public konami573_cassette_y_device { public: - konami573_cassette_yi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_yi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_READ_LINE_MEMBER(read_line_ds2401) override; virtual DECLARE_WRITE_LINE_MEMBER(write_line_d4) override; @@ -203,7 +203,7 @@ DECLARE_DEVICE_TYPE(KONAMI573_CASSETTE_ZI, konami573_cassette_zi_device) class konami573_cassette_zi_device: public device_t, public konami573_cassette_interface { public: - konami573_cassette_zi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami573_cassette_zi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual DECLARE_READ_LINE_MEMBER(read_line_ds2401) override; virtual DECLARE_READ_LINE_MEMBER(read_line_secflash_sda) override; diff --git a/src/mame/konami/k573dio.cpp b/src/mame/konami/k573dio.cpp index f4c5df42ce0..6e375eb3809 100644 --- a/src/mame/konami/k573dio.cpp +++ b/src/mame/konami/k573dio.cpp @@ -128,7 +128,7 @@ void k573dio_device::amap(address_map &map) map(0xfe, 0xff).w(FUNC(k573dio_device::output_2_w)); } -k573dio_device::k573dio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k573dio_device::k573dio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_573_DIGITAL_IO_BOARD, tag, owner, clock), ram(*this, "ram", 0x2000000, ENDIANNESS_LITTLE), k573fpga(*this, "k573fpga"), diff --git a/src/mame/konami/k573dio.h b/src/mame/konami/k573dio.h index 9b89fe4e708..63ec261895f 100644 --- a/src/mame/konami/k573dio.h +++ b/src/mame/konami/k573dio.h @@ -11,7 +11,7 @@ class k573dio_device : public device_t { public: - k573dio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k573dio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto output_callback() { return output_cb.bind(); } diff --git a/src/mame/konami/k573fpga.cpp b/src/mame/konami/k573fpga.cpp index 4e85563af1f..e0d827f093d 100644 --- a/src/mame/konami/k573fpga.cpp +++ b/src/mame/konami/k573fpga.cpp @@ -11,7 +11,7 @@ #include "logmacro.h" -k573fpga_device::k573fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k573fpga_device::k573fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_573_DIGITAL_FPGA, tag, owner, clock), ram(*this, finder_base::DUMMY_TAG), mas3507d(*this, "mpeg"), diff --git a/src/mame/konami/k573fpga.h b/src/mame/konami/k573fpga.h index 5fe76bb0e44..3c6c78e827e 100644 --- a/src/mame/konami/k573fpga.h +++ b/src/mame/konami/k573fpga.h @@ -14,7 +14,7 @@ DECLARE_DEVICE_TYPE(KONAMI_573_DIGITAL_FPGA, k573fpga_device) class k573fpga_device : public device_t { public: - k573fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + k573fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template void add_route(T &&... args) { subdevice("mpeg")->add_route(std::forward(args)...); } template void set_ram(T &&tag) { ram.set_tag(std::forward(tag)); } diff --git a/src/mame/konami/k573kara.cpp b/src/mame/konami/k573kara.cpp index 6421c85b58b..4a300e5baa6 100644 --- a/src/mame/konami/k573kara.cpp +++ b/src/mame/konami/k573kara.cpp @@ -67,7 +67,7 @@ void k573kara_device::amap(address_map &map) map(0xf8, 0xf9).rw(FUNC(k573kara_device::coin_box_r), FUNC(k573kara_device::coin_box_w)); } -k573kara_device::k573kara_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k573kara_device::k573kara_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_573_KARAOKE_IO_BOARD, tag, owner, clock), digital_id(*this, "digital_id"), m_duart_com(*this, "duart_com"), @@ -99,7 +99,7 @@ void k573kara_device::device_add_mconfig(machine_config &config) DS2401(config, digital_id); // The PC Helper RS232 and the PC16552D are right next to each other but they may possibly be separate. - PC16552D(config, m_duart_com, 0); + PC16552D(config, m_duart_com); auto& duart_chan0(NS16550(config, "duart_com:chan0", clock() / 2)); auto& rs232_chan0(RS232_PORT(config, "rs232_chan0", default_rs232_devices, nullptr)); rs232_chan0.rxd_handler().set("duart_com:chan0", FUNC(ins8250_uart_device::rx_w)); diff --git a/src/mame/konami/k573kara.h b/src/mame/konami/k573kara.h index fb8d3e64865..d10cc04a845 100644 --- a/src/mame/konami/k573kara.h +++ b/src/mame/konami/k573kara.h @@ -11,7 +11,7 @@ class k573kara_device : public device_t { public: - k573kara_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k573kara_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void amap(address_map &map); diff --git a/src/mame/konami/k573mcal.cpp b/src/mame/konami/k573mcal.cpp index 097e80e66fe..9ce73b67688 100644 --- a/src/mame/konami/k573mcal.cpp +++ b/src/mame/konami/k573mcal.cpp @@ -24,7 +24,7 @@ #include "machine/timehelp.h" -k573mcal_device::k573mcal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k573mcal_device::k573mcal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_device(mconfig, KONAMI_573_MASTER_CALENDAR, tag, owner, clock), m_in1(*this, "IN1"), seconds(0), diff --git a/src/mame/konami/k573mcal.h b/src/mame/konami/k573mcal.h index 8400a19038e..7e411d6d790 100644 --- a/src/mame/konami/k573mcal.h +++ b/src/mame/konami/k573mcal.h @@ -16,13 +16,13 @@ class k573mcal_device : public jvs_device { public: template - k573mcal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&jvs_host_tag) + k573mcal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&jvs_host_tag) : k573mcal_device(mconfig, tag, owner, clock) { host.set_tag(std::forward(jvs_host_tag)); } - k573mcal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k573mcal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/konami/k573mcr.cpp b/src/mame/konami/k573mcr.cpp index 8407c6fa8c3..4e5ae0ff93e 100644 --- a/src/mame/konami/k573mcr.cpp +++ b/src/mame/konami/k573mcr.cpp @@ -46,7 +46,7 @@ Notes: #include "emu.h" #include "k573mcr.h" -k573mcr_device::k573mcr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k573mcr_device::k573mcr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_device(mconfig, KONAMI_573_MEMORY_CARD_READER, tag, owner, clock), m_controllers(*this, "controllers"), m_meta(*this, "META") @@ -87,7 +87,7 @@ void k573mcr_device::device_add_mconfig(machine_config &config) // a controller through the slots menu. // The memory card ports are still usable even without a controller // enabled which is the main reason for using the PSX controller ports. - PSXCONTROLLERPORTS(config, m_controllers, 0); + PSXCONTROLLERPORTS(config, m_controllers); m_controllers->rxd().set(FUNC(k573mcr_device::write_rxd)); PSX_CONTROLLER_PORT(config, "port1", psx_controllers, nullptr); PSX_CONTROLLER_PORT(config, "port2", psx_controllers, nullptr); diff --git a/src/mame/konami/k573mcr.h b/src/mame/konami/k573mcr.h index 2dab03d13ea..5c20fb3f86d 100644 --- a/src/mame/konami/k573mcr.h +++ b/src/mame/konami/k573mcr.h @@ -17,13 +17,13 @@ class k573mcr_device : public jvs_device { public: template - k573mcr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&jvs_host_tag) - : k573mcr_device(mconfig, tag, owner, clock) + k573mcr_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&jvs_host_tag) + : k573mcr_device(mconfig, tag, owner) { host.set_tag(std::forward(jvs_host_tag)); } - k573mcr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k573mcr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/konami/k573msu.cpp b/src/mame/konami/k573msu.cpp index 2f04b9672a3..516f72ab71b 100644 --- a/src/mame/konami/k573msu.cpp +++ b/src/mame/konami/k573msu.cpp @@ -72,7 +72,7 @@ */ -k573msu_device::k573msu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k573msu_device::k573msu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_573_MULTI_SESSION_UNIT, tag, owner, clock) { } diff --git a/src/mame/konami/k573msu.h b/src/mame/konami/k573msu.h index e32121a1c14..f9ee9e81186 100644 --- a/src/mame/konami/k573msu.h +++ b/src/mame/konami/k573msu.h @@ -16,7 +16,7 @@ DECLARE_DEVICE_TYPE(KONAMI_573_MULTI_SESSION_UNIT, k573msu_device) class k573msu_device : public device_t { public: - k573msu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k573msu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/mame/konami/k573npu.cpp b/src/mame/konami/k573npu.cpp index 5d06644ae29..b2f530bcb30 100644 --- a/src/mame/konami/k573npu.cpp +++ b/src/mame/konami/k573npu.cpp @@ -72,7 +72,7 @@ */ -k573npu_device::k573npu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k573npu_device::k573npu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_573_NETWORK_PCB_UNIT, tag, owner, clock) { } diff --git a/src/mame/konami/k573npu.h b/src/mame/konami/k573npu.h index c4317f2dc67..b2c48cb27a1 100644 --- a/src/mame/konami/k573npu.h +++ b/src/mame/konami/k573npu.h @@ -16,7 +16,7 @@ DECLARE_DEVICE_TYPE(KONAMI_573_NETWORK_PCB_UNIT, k573npu_device) class k573npu_device : public device_t { public: - k573npu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k573npu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/mame/konami/konami1.cpp b/src/mame/konami/konami1.cpp index 05990da5fa0..2d5be6f17af 100644 --- a/src/mame/konami/konami1.cpp +++ b/src/mame/konami/konami1.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(KONAMI1, konami1_device, "konami1", "KONAMI-1") -konami1_device::konami1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +konami1_device::konami1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6809_base_device(mconfig, tag, owner, clock, KONAMI1, 1) { m_boundary = 0x0000; diff --git a/src/mame/konami/konami1.h b/src/mame/konami/konami1.h index b1f29f8e78e..3dbe21fbfad 100644 --- a/src/mame/konami/konami1.h +++ b/src/mame/konami/konami1.h @@ -11,7 +11,7 @@ class konami1_device : public m6809_base_device { public: - konami1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_encryption_boundary(uint16_t adr); diff --git a/src/mame/konami/konami_gn676_lan.cpp b/src/mame/konami/konami_gn676_lan.cpp index bea557772fa..5e6fb7a6e2f 100644 --- a/src/mame/konami/konami_gn676_lan.cpp +++ b/src/mame/konami/konami_gn676_lan.cpp @@ -67,7 +67,7 @@ TODO: DEFINE_DEVICE_TYPE(KONAMI_GN676_LAN, konami_gn676_lan_device, "konami_gn676_lan", "Konami GN676 Network PCB") -konami_gn676_lan_device::konami_gn676_lan_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +konami_gn676_lan_device::konami_gn676_lan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONAMI_GN676_LAN, tag, owner, clock), m_fpga_uploaded(false), m_lanc2_ram_r(0), diff --git a/src/mame/konami/konami_gn676_lan.h b/src/mame/konami/konami_gn676_lan.h index 604aec9ed24..1ede7563ba4 100644 --- a/src/mame/konami/konami_gn676_lan.h +++ b/src/mame/konami/konami_gn676_lan.h @@ -10,13 +10,13 @@ class konami_gn676_lan_device : public device_t { public: template - konami_gn676_lan_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&work_ram_tag) - : konami_gn676_lan_device(mconfig, tag, owner, clock) + konami_gn676_lan_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&work_ram_tag) + : konami_gn676_lan_device(mconfig, tag, owner) { m_work_ram.set_tag(std::forward(work_ram_tag)); } - konami_gn676_lan_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konami_gn676_lan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t lanc1_r(offs_t offset); void lanc1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/mame/konami/konamigq.cpp b/src/mame/konami/konamigq.cpp index a5625838587..5018d036273 100644 --- a/src/mame/konami/konamigq.cpp +++ b/src/mame/konami/konamigq.cpp @@ -326,14 +326,14 @@ void konamigq_state::konamigq(machine_config &config) m_dasp->set_addrmap(AS_DATA, &konamigq_state::konamigq_dasp_map); m_dasp->set_periodic_int(FUNC(konamigq_state::tms_sync), attotime::from_hz(48000)); - MB89371(config, "mb89371", 0); + MB89371(config, "mb89371"); EEPROM_93C46_16BIT(config, "eeprom").default_data(konamigq_def_eeprom, 128); - scsi_port_device &scsi(SCSI_PORT(config, "scsi", 0)); + scsi_port_device &scsi(SCSI_PORT(config, "scsi")); scsi.set_slot_device(1, "harddisk", SCSIHD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0)); - AM53CF96(config, m_am53cf96, 0); + AM53CF96(config, m_am53cf96); m_am53cf96->set_scsi_port("scsi"); m_am53cf96->irq_handler().set("maincpu:irq", FUNC(psxirq_device::intin10)); diff --git a/src/mame/konami/konamigv.cpp b/src/mame/konami/konamigv.cpp index fb3cac9bb06..5091b7f428e 100644 --- a/src/mame/konami/konamigv.cpp +++ b/src/mame/konami/konamigv.cpp @@ -456,14 +456,14 @@ void konamigv_state::konamigv(machine_config &config) m_maincpu->subdevice("dma")->install_write_handler(5, psxdma_device::write_delegate(&konamigv_state::scsi_dma_write, this)); m_maincpu->subdevice("ram")->set_default_size("2M"); - MB89371(config, "mb89371", 0); + MB89371(config, "mb89371"); EEPROM_93C46_16BIT(config, "eeprom"); - scsi_port_device &scsi(SCSI_PORT(config, "scsi", 0)); + scsi_port_device &scsi(SCSI_PORT(config, "scsi")); scsi.set_slot_device(1, "cdrom", SCSICD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_4)); scsi.slot(1).set_option_machine_config("cdrom", cdrom_config); - AM53CF96(config, m_am53cf96, 0); + AM53CF96(config, m_am53cf96); m_am53cf96->set_scsi_port("scsi"); m_am53cf96->irq_handler().set("maincpu:irq", FUNC(psxirq_device::intin10)); diff --git a/src/mame/konami/konamigx.cpp b/src/mame/konami/konamigx.cpp index 534d02f5445..05ce297eb9c 100644 --- a/src/mame/konami/konamigx.cpp +++ b/src/mame/konami/konamigx.cpp @@ -506,7 +506,7 @@ void konamigx_state::eeprom_w(offs_t offset, uint32_t data, uint32_t mem_mask) void konamigx_state::control_w(offs_t offset, uint32_t data, uint32_t mem_mask) { // TODO: derive from reported PCB XTALs - const uint32_t pixclock[4] = { 6'000'000, 8'000'000, 12'000'000, 16'000'000 }; + const XTAL pixclock[4] = { XTAL::u(6'000'000), XTAL::u(8'000'000), XTAL::u(12'000'000), XTAL::u(16'000'000) }; //logerror("write %x to control register (mask=%x)\n", data, mem_mask); // known controls: @@ -1682,7 +1682,7 @@ void konamigx_state::konamigx(machine_config &config) /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); - m_screen->set_raw(8000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); + m_screen->set_raw(XTAL::u(8000000), 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); /* These parameters are actual value written to the CCU. tbyahhoo attract mode desync is caused by another matter. */ @@ -1696,18 +1696,18 @@ void konamigx_state::konamigx(machine_config &config) m_palette->enable_shadows(); m_palette->enable_hilights(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(konamigx_state::type2_tile_callback)); m_k056832->set_config(K056832_BPP_5, 0, 0); m_k056832->set_palette(m_palette); - K055555(config, m_k055555, 0); + K055555(config, m_k055555); - K054338(config, m_k054338, 0, m_k055555); + K054338(config, m_k054338, m_k055555); m_k054338->set_screen(m_screen); m_k054338->set_alpha_invert(1); - K055673(config, m_k055673, 0); + K055673(config, m_k055673); m_k055673->set_sprite_callback(FUNC(konamigx_state::type2_sprite_callback)); m_k055673->set_config(K055673_LAYOUT_GX, -26, -23); m_k055673->set_screen(m_screen); @@ -1821,7 +1821,7 @@ void konamigx_state::opengolf(machine_config &config) { konamigx(config); - m_screen->set_raw(8000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); + m_screen->set_raw(XTAL::u(8000000), 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); m_screen->set_visarea(40, 40+384-1, 16, 16+224-1); GFXDECODE(config, m_gfxdecode, m_palette, gfx_opengolf); @@ -1839,7 +1839,7 @@ void konamigx_state::opengolf(machine_config &config) void konamigx_state::racinfrc(machine_config &config) { konamigx(config); - //m_screen->set_raw(6000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); + //m_screen->set_raw(XTAL::u(6000000), 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); //m_screen->set_visarea(32, 32+384-1, 16, 16+224-1); GFXDECODE(config, m_gfxdecode, m_palette, gfx_racinfrc); @@ -1854,7 +1854,7 @@ void konamigx_state::racinfrc(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &konamigx_state::racinfrc_map); - adc0834_device &adc(ADC0834(config, "adc0834", 0)); + adc0834_device &adc(ADC0834(config, "adc0834")); adc.set_input_callback(FUNC(konamigx_state::adc0834_callback)); } @@ -1889,7 +1889,7 @@ void konamigx_state::gxtype3(machine_config &config) screen_device &screen2(SCREEN(config, "screen2", SCREEN_TYPE_RASTER)); screen2.set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK | VIDEO_ALWAYS_UPDATE); - screen2.set_raw(6000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); + screen2.set_raw(XTAL::u(6000000), 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); screen2.set_size(1024, 1024); screen2.set_visarea(0, 576-1, 16, 32*8-1-16); screen2.set_screen_update(FUNC(konamigx_state::screen_update_konamigx_right)); @@ -1911,7 +1911,7 @@ void konamigx_state::gxtype4(machine_config &config) screen_device &screen2(SCREEN(config, "screen2", SCREEN_TYPE_RASTER)); screen2.set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK | VIDEO_ALWAYS_UPDATE); - screen2.set_raw(6000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); + screen2.set_raw(XTAL::u(6000000), 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); screen2.set_size(1024, 1024); screen2.set_visarea(0, 384-1, 16, 32*8-1-16); screen2.set_screen_update(FUNC(konamigx_state::screen_update_konamigx_right)); diff --git a/src/mame/konami/konamim2.cpp b/src/mame/konami/konamim2.cpp index 817024f33e7..a07902b6d5f 100644 --- a/src/mame/konami/konamim2.cpp +++ b/src/mame/konami/konamim2.cpp @@ -1136,7 +1136,7 @@ void konamim2_state::konamim2(machine_config &config) // Common devices EEPROM_93C46_16BIT(config, m_eeprom); - ATA_INTERFACE(config, m_ata, 0); + ATA_INTERFACE(config, m_ata); m_ata->irq_handler().set(FUNC(konamim2_state::ata_int)); m_ata->slot(0).option_add("cr589", CR589); @@ -1152,8 +1152,8 @@ void konamim2_state::konamim2(machine_config &config) SPEAKER(config, "rspeaker").front_right(); // TODO! - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -1166,7 +1166,7 @@ void konamim2_state::konamim2(machine_config &config) void konamim2_state::set_ntsc(machine_config &config) { -// m_screen->set_raw(11750000, 766, 126, 126+640, 260, 20, 20+240); // TODO +// m_screen->set_raw(XTAL::u(11750000), 766, 126, 126+640, 260, 20, 20+240); // TODO m_screen->set_refresh_hz(59.360001); m_screen->set_size(768, 262); m_screen->set_visarea(126, 126+640-1, 20, 20+240-1); @@ -1174,7 +1174,7 @@ void konamim2_state::set_ntsc(machine_config &config) void konamim2_state::set_ntsc2(machine_config &config) { - //m_screen->set_raw(11750000, 766, 126, 126+640, 260, 20, 20+240); // TODO + //m_screen->set_raw(XTAL::u(11750000), 766, 126, 126+640, 260, 20, 20+240); // TODO m_screen->set_refresh_hz(59.360001); m_screen->set_size(768, 262*2); // TOTAL VICE ONLY WORKS WITH THIS! m_screen->set_visarea(126, 126+640-1, 20, 20+240-1); @@ -1182,7 +1182,7 @@ void konamim2_state::set_ntsc2(machine_config &config) void konamim2_state::set_arcres(machine_config &config) { - m_screen->set_raw(16934500, 684, 104, 104+512, 416, 26, 26+384); + m_screen->set_raw(XTAL::u(16934500), 684, 104, 104+512, 416, 26, 26+384); } void konamim2_state::add_ymz280b(machine_config &config) diff --git a/src/mame/konami/konblands.cpp b/src/mame/konami/konblands.cpp index 6b5d325585a..a5cec1f52f1 100644 --- a/src/mame/konami/konblands.cpp +++ b/src/mame/konami/konblands.cpp @@ -268,7 +268,7 @@ void konblands_state::konblands(machine_config &config) m_maincpu->set_periodic_int(FUNC(konblands_state::timer_irq), attotime::from_hz(8)); // 8 times per frame /* video hardware */ - PIONEER_LDV1000(config, m_laserdisc, 0); + PIONEER_LDV1000(config, m_laserdisc); m_laserdisc->command_strobe_callback().set(FUNC(konblands_state::ld_command_strobe_cb)); // TODO: might be different m_laserdisc->set_overlay(512, 256, FUNC(konblands_state::screen_update)); diff --git a/src/mame/konami/konendev.cpp b/src/mame/konami/konendev.cpp index a929ddedb3d..30fbe8ce205 100644 --- a/src/mame/konami/konendev.cpp +++ b/src/mame/konami/konendev.cpp @@ -388,11 +388,11 @@ INTERRUPT_GEN_MEMBER(konendev_state::vbl_interrupt) void konendev_state::konendev(machine_config &config) { /* basic machine hardware */ - PPC403GCX(config, m_maincpu, 32000000); // Clock unknown + PPC403GCX(config, m_maincpu, XTAL::u(32000000)); // Clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &konendev_state::konendev_map); m_maincpu->set_vblank_int("screen", FUNC(konendev_state::vbl_interrupt)); - H83007(config, m_ifu, 8000000); // Clock unknown + H83007(config, m_ifu, XTAL::u(8000000)); // Clock unknown m_ifu->set_addrmap(AS_PROGRAM, &konendev_state::ifu_map); /* video hardware */ @@ -403,7 +403,7 @@ void konendev_state::konendev(machine_config &config) screen.set_screen_update(FUNC(konendev_state::screen_update)); screen.set_palette("palette"); - K057714(config, m_gcu, 0).set_screen("screen"); + K057714(config, m_gcu).set_screen("screen"); m_gcu->irq_callback().set(FUNC(konendev_state::gcu_interrupt)); RTC62423(config, m_rtc, XTAL(32'768)); @@ -417,7 +417,7 @@ void konendev_state::konendev(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400)); // Clock unknown + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(16934400))); // Clock unknown ymz.add_route(0, "lspeaker", 1.0); ymz.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/konami/kongs470.cpp b/src/mame/konami/kongs470.cpp index 06f9175ee7e..617eeb17012 100644 --- a/src/mame/konami/kongs470.cpp +++ b/src/mame/konami/kongs470.cpp @@ -72,14 +72,14 @@ void kongs470_state::machine_start() void kongs470_state::kongs470(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10'000'000); // clock unverified + M68000(config, m_maincpu, XTAL::u(10'000'000)); // clock unverified m_maincpu->set_addrmap(AS_PROGRAM, &kongs470_state::main_map); // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - k054539_device &k054539(K054539(config, "k054539", 18'432'000)); // clock unverified + k054539_device &k054539(K054539(config, "k054539", XTAL::u(18'432'000))); // clock unverified k054539.add_route(0, "rspeaker", 0.75); k054539.add_route(1, "lspeaker", 0.75); } diff --git a/src/mame/konami/konmedal.cpp b/src/mame/konami/konmedal.cpp index 3e963834b6b..47282f4080b 100644 --- a/src/mame/konami/konmedal.cpp +++ b/src/mame/konami/konmedal.cpp @@ -832,7 +832,7 @@ void konmedal_state::tsukande(machine_config &config) PALETTE(config, m_palette, FUNC(konmedal_state::konmedal_palette)).set_format(palette_device::xRGB_444, 256); //m_palette->enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(konmedal_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 0); m_k056832->set_palette(m_palette); @@ -875,7 +875,7 @@ void konmedal_state::ddboy(machine_config &config) PALETTE(config, m_palette, FUNC(konmedal_state::konmedal_palette)).set_format(palette_device::xRGB_444, 256); //m_palette->enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(konmedal_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 0); m_k056832->set_palette(m_palette); @@ -1015,7 +1015,7 @@ void konmedal_state::shuriboy(machine_config &config) // m_palette->enable_shadows(); // m_palette->enable_hilights(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(konmedal_state::shuriboy_tile_callback)); diff --git a/src/mame/konami/konmedal020.cpp b/src/mame/konami/konmedal020.cpp index 3c6db27ded4..f3fd1c33ceb 100644 --- a/src/mame/konami/konmedal020.cpp +++ b/src/mame/konami/konmedal020.cpp @@ -103,7 +103,7 @@ void konmedal020_state::gs471(machine_config &config) screen.set_screen_update(m_vga, FUNC(vga_device::screen_update)); screen.screen_vblank().set_inputline(m_maincpu, M68K_IRQ_3); - OTI111(config, m_vga, 0); + OTI111(config, m_vga); m_vga->set_screen("screen"); m_vga->set_vram_size(0x100000); diff --git a/src/mame/konami/konmedal68k.cpp b/src/mame/konami/konmedal68k.cpp index 50bfc1b9ade..34037762cf1 100644 --- a/src/mame/konami/konmedal68k.cpp +++ b/src/mame/konami/konmedal68k.cpp @@ -640,12 +640,12 @@ void konmedal68k_state::kzaurus(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_888, 8192).enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(konmedal68k_state::tile_callback)); m_k056832->set_config(K056832_BPP_4dj, 1, 0); m_k056832->set_palette(m_palette); - K055555(config, m_k055555, 0); + K055555(config, m_k055555); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/konppc.cpp b/src/mame/konami/konppc.cpp index c372c29e856..adeb38b8eaf 100644 --- a/src/mame/konami/konppc.cpp +++ b/src/mame/konami/konppc.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(KONPPC, konppc_device, "konppc", "Konami PowerPC Common Functions") -konppc_device::konppc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +konppc_device::konppc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KONPPC, tag, owner, clock) , m_dsp(*this, {"^dsp", "^dsp2"}) , m_k033906(*this, "^k033906_%u", 1U) diff --git a/src/mame/konami/konppc.h b/src/mame/konami/konppc.h index fb4ce32f023..b08f0e1bff9 100644 --- a/src/mame/konami/konppc.h +++ b/src/mame/konami/konppc.h @@ -21,7 +21,7 @@ public: static constexpr int MAX_CG_BOARDS = 2; // construction/destruction - konppc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konppc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_num_boards(int num) { num_cgboards = num; } void set_cbboard_type(int cgtype) { cgboard_type = cgtype; } diff --git a/src/mame/konami/kpontoon.cpp b/src/mame/konami/kpontoon.cpp index c4cf759ecc5..5a6e01a210b 100644 --- a/src/mame/konami/kpontoon.cpp +++ b/src/mame/konami/kpontoon.cpp @@ -361,14 +361,14 @@ GFXDECODE_END void kpontoon_state::kpontoon(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 21'053'000 / 4); // clock unverified + Z80(config, m_maincpu, XTAL::u(21'053'000) / 4); // clock unverified m_maincpu->set_addrmap(AS_PROGRAM, &kpontoon_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(kpontoon_state::ccu_scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 21'053'000 / 3); // clock unverified + Z80(config, m_audiocpu, XTAL::u(21'053'000) / 3); // clock unverified m_audiocpu->set_addrmap(AS_PROGRAM, &kpontoon_state::sound_map); - K053252(config, m_k053252, 21'053'000 / 8); // clock unverified + K053252(config, m_k053252, XTAL::u(21'053'000) / 8); // clock unverified m_k053252->int1_ack().set(FUNC(kpontoon_state::vbl_ack_w)); m_k053252->int2_ack().set(FUNC(kpontoon_state::nmi_ack_w)); m_k053252->int_time().set(FUNC(kpontoon_state::ccu_int_time_w)); @@ -390,7 +390,7 @@ void kpontoon_state::kpontoon(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); //m_k053246.set_sprite_callback(FUNC(kpontoon_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, 0, 0); // TODO: verify m_k053246->set_palette(m_palette); diff --git a/src/mame/konami/kpython.cpp b/src/mame/konami/kpython.cpp index db6f270ea81..1022cdd5b9a 100644 --- a/src/mame/konami/kpython.cpp +++ b/src/mame/konami/kpython.cpp @@ -218,12 +218,12 @@ INPUT_PORTS_END void kpython_state::kpython(machine_config &config) { - R5000LE(config, m_maincpu, 294000000); // imported from namcops2.c driver + R5000LE(config, m_maincpu, XTAL::u(294000000)); // imported from namcops2.c driver m_maincpu->set_icache_size(16384); m_maincpu->set_dcache_size(16384); m_maincpu->set_addrmap(AS_PROGRAM, &kpython_state::ps2_map); - //H83664(config, m_io_mcu, 14000000); // from filter board + //H83664(config, m_io_mcu, XTAL::u(14000000)); // from filter board //DS2430(config, m_ds2430); M48T58(config, m_m48t58); diff --git a/src/mame/konami/kpython2.cpp b/src/mame/konami/kpython2.cpp index 45812e9eeaa..c06bf0d9f4a 100644 --- a/src/mame/konami/kpython2.cpp +++ b/src/mame/konami/kpython2.cpp @@ -1115,23 +1115,23 @@ INPUT_PORTS_END void kpython2_state::kpython2(machine_config &config) { - R5900LE(config, m_maincpu, 294'912'000, m_vu0); + R5900LE(config, m_maincpu, XTAL::u(294'912'000), m_vu0); m_maincpu->set_force_no_drc(true); m_maincpu->set_icache_size(16384); m_maincpu->set_dcache_size(16384); m_maincpu->set_addrmap(AS_PROGRAM, &kpython2_state::mem_map); - SONYPS2_VU0(config, m_vu0, 294'912'000, m_vu1); - SONYPS2_VU1(config, m_vu1, 294'912'000, m_gs); + SONYPS2_VU0(config, m_vu0, XTAL::u(294'912'000), m_vu1); + SONYPS2_VU1(config, m_vu1, XTAL::u(294'912'000), m_gs); - SONYPS2_TIMER(config, m_timer[0], 294912000/2, true); - SONYPS2_TIMER(config, m_timer[1], 294912000/2, true); - SONYPS2_TIMER(config, m_timer[2], 294912000/2, false); - SONYPS2_TIMER(config, m_timer[3], 294912000/2, false); + SONYPS2_TIMER(config, m_timer[0], XTAL::u(294912000)/2, true); + SONYPS2_TIMER(config, m_timer[1], XTAL::u(294912000)/2, true); + SONYPS2_TIMER(config, m_timer[2], XTAL::u(294912000)/2, false); + SONYPS2_TIMER(config, m_timer[3], XTAL::u(294912000)/2, false); SONYPS2_INTC(config, m_intc, m_maincpu); - SONYPS2_GS(config, m_gs, 294912000/2, m_intc, m_vu1); - SONYPS2_DMAC(config, m_dmac, 294912000/2, m_maincpu, m_ram, m_sif, m_gs, m_vu1); + SONYPS2_GS(config, m_gs, XTAL::u(294912000)/2, m_intc, m_vu1); + SONYPS2_DMAC(config, m_dmac, XTAL::u(294912000)/2, m_maincpu, m_ram, m_sif, m_gs, m_vu1); SONYPS2_SIF(config, m_sif, m_intc); SONYPS2_IOP(config, m_iop, XTAL(67'737'600)/2); diff --git a/src/mame/konami/ksys573.cpp b/src/mame/konami/ksys573.cpp index 42f215c6c93..e79919821ad 100644 --- a/src/mame/konami/ksys573.cpp +++ b/src/mame/konami/ksys573.cpp @@ -454,7 +454,7 @@ class sys573_jvs_host : public jvs_host { public: // construction/destruction - sys573_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sys573_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void send_packet(uint8_t *data, int length); int received_packet(uint8_t *buffer); @@ -466,7 +466,7 @@ private: DEFINE_DEVICE_TYPE(SYS573_JVS_HOST, sys573_jvs_host, "sys573_jvs_host", "JVS Host (System 573)") -sys573_jvs_host::sys573_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sys573_jvs_host::sys573_jvs_host(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_host(mconfig, SYS573_JVS_HOST, tag, owner, clock) { output_buffer_size = 0; @@ -2500,13 +2500,13 @@ void ksys573_state::konami573(machine_config &config) subdevice("maincpu:ram")->set_default_size("4M"); - ATA_INTERFACE(config, m_ata, 0); + ATA_INTERFACE(config, m_ata); m_ata->irq_handler().set(FUNC(ksys573_state::ata_interrupt)); m_ata->slot(0).option_add("cr589", CR589); m_ata->slot(0).set_option_machine_config("cr589", cr589_config); m_ata->slot(0).set_default_option("cr589"); - konami573_cassette_slot_device &cassette(KONAMI573_CASSETTE_SLOT(config, "cassette", 0)); + konami573_cassette_slot_device &cassette(KONAMI573_CASSETTE_SLOT(config, "cassette")); cassette.dsr_handler().set("maincpu:sio1", FUNC(psxsio1_device::write_dsr)); // onboard flash @@ -2519,8 +2519,8 @@ void ksys573_state::konami573(machine_config &config) FUJITSU_29F016A(config, "29f016a.31h"); FUJITSU_29F016A(config, "29f016a.27h"); - PCCARD_SLOT(config, m_pccard1, 0); - PCCARD_SLOT(config, m_pccard2, 0); + PCCARD_SLOT(config, m_pccard1); + PCCARD_SLOT(config, m_pccard2); ADDRESS_MAP_BANK(config, m_flashbank ).set_map( &ksys573_state::flashbank_map ).set_options( ENDIANNESS_LITTLE, 16, 32, 0x400000); @@ -2537,12 +2537,12 @@ void ksys573_state::konami573(machine_config &config) spu.add_route(0, "lspeaker", 1.0); spu.add_route(1, "rspeaker", 1.0); - M48T58(config, "m48t58", 0); + M48T58(config, "m48t58"); adc0834_device &adc(ADC0834(config, "adc0834")); adc.set_input_callback(FUNC(ksys573_state::analogue_inputs_callback)); - SYS573_JVS_HOST(config, m_sys573_jvs_host, 0); + SYS573_JVS_HOST(config, m_sys573_jvs_host); // Uncomment for generating new security cartridges // Warning: Does not play well with memory card reader (JVS chaining issue?) @@ -2676,7 +2676,7 @@ void ddr_state::ddr2mc2(machine_config &config) k573a(config); cassx(config); - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } void ddr_state::ddr2ml(machine_config &config) @@ -2685,7 +2685,7 @@ void ddr_state::ddr2ml(machine_config &config) pccard1_16mb(config); cassx(config); - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } void ddr_state::ddrbocd(machine_config &config) @@ -2703,7 +2703,7 @@ void ddr_state::ddr3m(machine_config &config) pccard2_32mb(config); cassyyi(config); - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } void ddr_state::ddr3mp(machine_config &config) @@ -2714,7 +2714,7 @@ void ddr_state::ddr3mp(machine_config &config) pccard2_32mb(config); cassxzi(config); - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } void ddr_state::ddrusa(machine_config &config) @@ -2733,7 +2733,7 @@ void ddr_state::ddr5m(machine_config &config) pccard2_32mb(config); casszi(config); - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } // Dancing Stage @@ -2820,7 +2820,7 @@ void ksys573_state::ddr4ms(machine_config &config) pccard2_32mb(config); cassxzi(config); - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } // DrumMania @@ -2846,7 +2846,7 @@ void ksys573_state::drmn4m(machine_config &config) casszi(config); - KONAMI_573_MULTI_SESSION_UNIT(config, "k573msu", 0); + KONAMI_573_MULTI_SESSION_UNIT(config, "k573msu"); } void ksys573_state::drmn9m(machine_config &config) @@ -2856,7 +2856,7 @@ void ksys573_state::drmn9m(machine_config &config) casszi(config); - KONAMI_573_MULTI_SESSION_UNIT(config, "k573msu", 0); + KONAMI_573_MULTI_SESSION_UNIT(config, "k573msu"); } void ksys573_state::drmn10m(machine_config &config) @@ -2866,7 +2866,7 @@ void ksys573_state::drmn10m(machine_config &config) casszi(config); - KONAMI_573_MULTI_SESSION_UNIT(config, "k573msu", 0); + KONAMI_573_MULTI_SESSION_UNIT(config, "k573msu"); } // Guitar Freaks @@ -2891,7 +2891,7 @@ void ksys573_state::gtrfrk2ml(machine_config &config) pccard1_32mb(config); // HACK: The installation tries to check and erase 32mb but only flashes 16mb. // For Guitar Freaks 2nd Mix Link Ver 1 (memory cards) and Link Ver 2 (memory cards + controllers) - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } void ksys573_state::gtrfrk3m(machine_config &config) @@ -2900,7 +2900,7 @@ void ksys573_state::gtrfrk3m(machine_config &config) cassxzi(config); pccard1_16mb(config); - KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", 0, m_sys573_jvs_host); + KONAMI_573_MEMORY_CARD_READER(config, "k573mcr", m_sys573_jvs_host); } void ksys573_state::gtrfrk5m(machine_config &config) @@ -2928,7 +2928,7 @@ void ksys573_state::gtfrk10mb(machine_config &config) { gtrfrk7m(config); - KONAMI_573_NETWORK_PCB_UNIT(config, "k573npu", 0); + KONAMI_573_NETWORK_PCB_UNIT(config, "k573npu"); } void ksys573_state::gtfrk11m(machine_config &config) @@ -3002,7 +3002,7 @@ void ksys573_state::salarymc(machine_config &config) void ksys573_state::gbbchmp(machine_config &config) { animechmp(config); - MB89371(config, m_duart, 0); + MB89371(config, m_duart); m_maincpu->set_addrmap(AS_PROGRAM, &ksys573_state::gbbchmp_map); } @@ -3060,7 +3060,7 @@ void ksys573_state::mamboagg(machine_config &config) void ksys573_state::mamboagga(machine_config &config) { mamboagg(config); - KONAMI_573_NETWORK_PCB_UNIT(config, "k573npu", 0); + KONAMI_573_NETWORK_PCB_UNIT(config, "k573npu"); } void ksys573_state::kicknkick(machine_config &config) diff --git a/src/mame/konami/labyrunr.cpp b/src/mame/konami/labyrunr.cpp index 30dcd844b77..6865f4073bf 100644 --- a/src/mame/konami/labyrunr.cpp +++ b/src/mame/konami/labyrunr.cpp @@ -451,7 +451,7 @@ void labyrunr_state::machine_start() void labyrunr_state::labyrunr(machine_config &config) { // basic machine hardware - HD6309(config, m_maincpu, 3000000 * 4); // 24MHz / 8? + HD6309(config, m_maincpu, XTAL::u(3000000) * 4); // 24MHz / 8? m_maincpu->set_addrmap(AS_PROGRAM, &labyrunr_state::prg_map); m_maincpu->set_periodic_int(FUNC(labyrunr_state::timer_interrupt), attotime::from_hz(4 * 60)); @@ -471,15 +471,15 @@ void labyrunr_state::labyrunr(machine_config &config) PALETTE(config, m_palette, FUNC(labyrunr_state::palette)); m_palette->set_format(palette_device::xBGR_555, 2*8*16*16, 128); - K007121(config, m_k007121, 0); + K007121(config, m_k007121); m_k007121->set_palette_tag(m_palette); - K051733(config, "k051733", 0); + K051733(config, "k051733"); // sound hardware SPEAKER(config, "mono").front_center(); - ym2203_device &ym1(YM2203(config, "ym1", 3000000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(3000000))); ym1.port_a_read_callback().set_ioport("DSW1"); ym1.port_b_read_callback().set_ioport("DSW2"); ym1.add_route(0, "mono", 0.40); @@ -487,7 +487,7 @@ void labyrunr_state::labyrunr(machine_config &config) ym1.add_route(2, "mono", 0.40); ym1.add_route(3, "mono", 0.80); - ym2203_device &ym2(YM2203(config, "ym2", 3000000)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(3000000))); ym2.port_b_read_callback().set_ioport("DSW3"); ym2.add_route(0, "mono", 0.40); ym2.add_route(1, "mono", 0.40); diff --git a/src/mame/konami/lethal.cpp b/src/mame/konami/lethal.cpp index 145bc34ac98..43086470075 100644 --- a/src/mame/konami/lethal.cpp +++ b/src/mame/konami/lethal.cpp @@ -515,18 +515,18 @@ void lethal_state::lethalen(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 8192); m_palette->enable_shadows(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(lethal_state::tile_callback)); m_k056832->set_config(K056832_BPP_8LE, 1, 0); m_k056832->set_palette(m_palette); - K053244(config, m_k053244, 0); + K053244(config, m_k053244); m_k053244->set_palette(m_palette); m_k053244->set_bpp(6); m_k053244->set_offsets(95, 0); m_k053244->set_sprite_callback(FUNC(lethal_state::sprite_callback)); - K054000(config, "k054000", 0); + K054000(config, "k054000"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/mainevt.cpp b/src/mame/konami/mainevt.cpp index c2e600b6630..58c3896ae1b 100644 --- a/src/mame/konami/mainevt.cpp +++ b/src/mame/konami/mainevt.cpp @@ -707,7 +707,7 @@ void devstors_state::devstors(machine_config &config) m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(devstors_state::sprite_callback)); - K051733(config, "k051733", 0); + K051733(config, "k051733"); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/konami/megazone.cpp b/src/mame/konami/megazone.cpp index ff1bd66a039..908ef185264 100644 --- a/src/mame/konami/megazone.cpp +++ b/src/mame/konami/megazone.cpp @@ -734,7 +734,7 @@ void megazone_state::megazone(machine_config &config) aysnd.add_route(1, "filter.0.1", 0.30); aysnd.add_route(2, "filter.0.2", 0.30); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // R-2R ladder network + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // R-2R ladder network FILTER_RC(config, m_filter[0]).add_route(ALL_OUTPUTS, "speaker", 1.0); FILTER_RC(config, m_filter[1]).add_route(ALL_OUTPUTS, "speaker", 1.0); diff --git a/src/mame/konami/midikbd.cpp b/src/mame/konami/midikbd.cpp index 67d412b65c5..ae89d0b785a 100644 --- a/src/mame/konami/midikbd.cpp +++ b/src/mame/konami/midikbd.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(MIDI_KBD, midi_keyboard_device, "midi_kbd", "Generic MIDI Keyboard") -midi_keyboard_device::midi_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +midi_keyboard_device::midi_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDI_KBD, tag, owner, clock), device_serial_interface(mconfig, *this), m_out_tx_func(*this), diff --git a/src/mame/konami/midikbd.h b/src/mame/konami/midikbd.h index 9048153f530..1f089d02594 100644 --- a/src/mame/konami/midikbd.h +++ b/src/mame/konami/midikbd.h @@ -11,7 +11,7 @@ class midi_keyboard_device : public device_t, public device_serial_interface { public: - midi_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midi_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ioport_constructor device_input_ports() const override; auto tx_callback() { return m_out_tx_func.bind(); } diff --git a/src/mame/konami/mogura.cpp b/src/mame/konami/mogura.cpp index 42de28168e5..79352377409 100644 --- a/src/mame/konami/mogura.cpp +++ b/src/mame/konami/mogura.cpp @@ -296,8 +296,8 @@ void mogura_state::mogura(machine_config &config) // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_4BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); - DAC_4BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); + DAC_4BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.25); + DAC_4BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.25); } diff --git a/src/mame/konami/moo.cpp b/src/mame/konami/moo.cpp index 84795e75c26..d5a63133493 100644 --- a/src/mame/konami/moo.cpp +++ b/src/mame/konami/moo.cpp @@ -527,19 +527,19 @@ void moo_state::moo(machine_config &config) MCFG_VIDEO_START_OVERRIDE(moo_state,moo) - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(moo_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, -48+1, 23); m_k053246->set_palette("palette"); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(moo_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 0); m_k056832->set_palette("palette"); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); - K054338(config, m_k054338, 0); + K054338(config, m_k054338); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -557,7 +557,7 @@ void moo_state::moo(machine_config &config) void moo_state::moobl(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16100000); + M68000(config, m_maincpu, XTAL::u(16100000)); m_maincpu->set_addrmap(AS_PROGRAM, &moo_state::moobl_map); m_maincpu->set_vblank_int("screen", FUNC(moo_state::moobl_interrupt)); @@ -581,25 +581,25 @@ void moo_state::moobl(machine_config &config) MCFG_VIDEO_START_OVERRIDE(moo_state,moo) - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(moo_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, -48+1, 23); m_k053246->set_palette("palette"); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(moo_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 0); m_k056832->set_palette("palette"); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); - K054338(config, m_k054338, 0); + K054338(config, m_k054338); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -610,7 +610,7 @@ void moo_state::bucky(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &moo_state::bucky_map); - K054000(config, "k054000", 0); + K054000(config, "k054000"); m_k053246->set_config(NORMAL_PLANE_ORDER, -48, 23); diff --git a/src/mame/konami/mystwarr.cpp b/src/mame/konami/mystwarr.cpp index c6a52329a78..4c37f08aa34 100644 --- a/src/mame/konami/mystwarr.cpp +++ b/src/mame/konami/mystwarr.cpp @@ -959,18 +959,18 @@ MACHINE_RESET_MEMBER(mystwarr_state,gaiapols) void mystwarr_state::mystwarr(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz (confirmed) */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz (confirmed) */ m_maincpu->set_addrmap(AS_PROGRAM, &mystwarr_state::mystwarr_map); TIMER(config, "scantimer").configure_scanline(FUNC(mystwarr_state::mystwarr_interrupt), "screen", 0, 1); - Z80(config, m_soundcpu, 8000000); + Z80(config, m_soundcpu, XTAL::u(8000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &mystwarr_state::mystwarr_sound_map); config.set_maximum_quantum(attotime::from_hz(1920)); EEPROM_ER5911_8BIT(config, "eeprom"); - K053252(config, m_k053252, 6000000); // 6 MHz? + K053252(config, m_k053252, XTAL::u(6000000)); // 6 MHz? m_k053252->set_offsets(24, 16); MCFG_MACHINE_START_OVERRIDE(mystwarr_state,mystwarr) @@ -980,7 +980,7 @@ void mystwarr_state::mystwarr(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); // m_screen->set_refresh_hz(60); - m_screen->set_raw(6000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); + m_screen->set_raw(XTAL::u(6000000), 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(600)); m_screen->set_size(64*8, 32*8); m_screen->set_visarea(24, 24+288-1, 16, 16+224-1); @@ -990,19 +990,19 @@ void mystwarr_state::mystwarr(machine_config &config) m_palette->enable_shadows(); m_palette->enable_hilights(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(mystwarr_state::mystwarr_tile_callback)); m_k056832->set_config(K056832_BPP_5, 0, 0); m_k056832->set_palette(m_palette); - K055555(config, m_k055555, 0); + K055555(config, m_k055555); - K055673(config, m_k055673, 0); + K055673(config, m_k055673); m_k055673->set_sprite_callback(FUNC(mystwarr_state::mystwarr_sprite_callback)); m_k055673->set_config(K055673_LAYOUT_GX, -48, -24); m_k055673->set_palette(m_palette); - K054338(config, m_k054338, 0, m_k055555); + K054338(config, m_k054338, m_k055555); m_k054338->set_alpha_invert(1); MCFG_VIDEO_START_OVERRIDE(mystwarr_state, mystwarr) @@ -1031,7 +1031,7 @@ void mystwarr_state::viostorm(machine_config &config) MCFG_MACHINE_RESET_OVERRIDE(mystwarr_state,viostorm) - m_k053252->set_clock(16000000/2); + m_k053252->set_clock(XTAL::u(16000000)/2); m_k053252->set_offsets(40, 16); /* basic machine hardware */ @@ -1067,7 +1067,7 @@ void mystwarr_state::viostormbl(machine_config &config) config.device_remove("k054539_1"); config.device_remove("k054539_2"); - okim6295_device &oki(OKIM6295(config, "oki", 1'056'000, okim6295_device::PIN7_HIGH)); // frequency and pin 7 unverified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1'056'000), okim6295_device::PIN7_HIGH)); // frequency and pin 7 unverified oki.set_addrmap(0, &mystwarr_state::oki_map); oki.add_route(ALL_OUTPUTS, "lspeaker", 1.0); oki.add_route(ALL_OUTPUTS, "rspeaker", 1.0); @@ -1085,7 +1085,7 @@ void mystwarr_state::metamrph(machine_config &config) m_k053252->set_offsets(24, 15); - K053250(config, m_k053250_1, 0, m_palette, m_screen, -7, 0); + K053250(config, m_k053250_1, m_palette, m_screen, -7, 0); /* video hardware */ MCFG_VIDEO_START_OVERRIDE(mystwarr_state, metamrph) @@ -1142,7 +1142,7 @@ void mystwarr_state::gaiapols(machine_config &config) m_k053252->set_offsets(40, 16); - K054000(config, "k054000", 0); + K054000(config, "k054000"); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaiapols); @@ -1150,7 +1150,7 @@ void mystwarr_state::gaiapols(machine_config &config) MCFG_VIDEO_START_OVERRIDE(mystwarr_state, gaiapols) m_screen->set_screen_update(FUNC(mystwarr_state::screen_update_dadandrn)); - m_screen->set_raw(8000000, 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); + m_screen->set_raw(XTAL::u(8000000), 384+24+64+40, 0, 383, 224+16+8+16, 0, 223); m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(600)); m_screen->set_size(64*8, 32*8); m_screen->set_visarea(40, 40+376-1, 16, 16+224-1); @@ -1173,7 +1173,7 @@ void mystwarr_state::martchmp(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &mystwarr_state::martchmp_sound_map); - m_k053252->set_clock(16000000/2); + m_k053252->set_clock(XTAL::u(16000000)/2); m_k053252->set_offsets(32, 24-1); MCFG_VIDEO_START_OVERRIDE(mystwarr_state, martchmp) diff --git a/src/mame/konami/nemesis.cpp b/src/mame/konami/nemesis.cpp index a0e38a4602f..6d2d31005b2 100644 --- a/src/mame/konami/nemesis.cpp +++ b/src/mame/konami/nemesis.cpp @@ -1768,11 +1768,11 @@ void nemesis_state::set_screen_raw_params(machine_config &config) void nemesis_state::nemesis(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216 MHz? */ // 14318180/2, /* From schematics, should be accurate */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::nemesis_map); - Z80(config, m_audiocpu, 14318180/8); /* 1.7897725MHz */ + Z80(config, m_audiocpu, XTAL::u(14318180)/8); /* 1.7897725MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sound_map); /* fixed */ ls259_device &outlatch(LS259(config, "outlatch")); // 13J @@ -1785,7 +1785,7 @@ void nemesis_state::nemesis(machine_config &config) intlatch.q_out_cb<2>().set(FUNC(nemesis_state::gfx_flipx_w)); intlatch.q_out_cb<3>().set(FUNC(nemesis_state::gfx_flipy_w)); - WATCHDOG_TIMER(config, "watchdog", 0); + WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -1802,12 +1802,12 @@ void nemesis_state::nemesis(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ay8910_device &ay1(AY8910(config, "ay1", 14318180/8)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(14318180)/8)); ay1.set_flags(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT); ay1.port_a_read_callback().set(FUNC(nemesis_state::nemesis_portA_r)); ay1.add_route(ALL_OUTPUTS, "filter1", 0.20); - ay8910_device &ay2(AY8910(config, "ay2", 14318180/8)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(14318180)/8)); ay2.port_a_write_callback().set(m_k005289, FUNC(k005289_device::control_A_w)); ay2.port_b_write_callback().set(m_k005289, FUNC(k005289_device::control_B_w)); ay2.add_route(0, "filter2", 1.00); @@ -1823,18 +1823,18 @@ void nemesis_state::nemesis(machine_config &config) FILTER_RC(config, m_filter4); m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0); - K005289(config, m_k005289, 3579545); + K005289(config, m_k005289, XTAL::u(3579545)); m_k005289->add_route(ALL_OUTPUTS, "mono", 0.35); } void nemesis_state::gx400(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_map); TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::gx400_interrupt), "screen", 0, 1); - Z80(config, m_audiocpu, 14318180/8); /* 1.7897725MHz */ + Z80(config, m_audiocpu, XTAL::u(14318180)/8); /* 1.7897725MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_sound_map); ls259_device &outlatch(LS259(config, "outlatch")); @@ -1866,12 +1866,12 @@ void nemesis_state::gx400(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ay8910_device &ay1(AY8910(config, "ay1", 14318180/8)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(14318180)/8)); ay1.set_flags(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT); ay1.port_a_read_callback().set(FUNC(nemesis_state::nemesis_portA_r)); ay1.add_route(ALL_OUTPUTS, "filter1", 0.20); - ay8910_device &ay2(AY8910(config, "ay2", 14318180/8)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(14318180)/8)); ay2.port_a_write_callback().set(m_k005289, FUNC(k005289_device::control_A_w)); ay2.port_b_write_callback().set(m_k005289, FUNC(k005289_device::control_B_w)); ay2.add_route(0, "filter2", 1.00); @@ -1887,10 +1887,10 @@ void nemesis_state::gx400(machine_config &config) FILTER_RC(config, m_filter4); m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0); - K005289(config, m_k005289, 3579545); + K005289(config, m_k005289, XTAL::u(3579545)); m_k005289->add_route(ALL_OUTPUTS, "mono", 0.35); - VLM5030(config, m_vlm, 3579545); + VLM5030(config, m_vlm, XTAL::u(3579545)); m_vlm->set_addrmap(0, &nemesis_state::gx400_vlm_map); m_vlm->add_route(ALL_OUTPUTS, "mono", 0.70); } @@ -1898,11 +1898,11 @@ void nemesis_state::gx400(machine_config &config) void nemesis_state::konamigt(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::konamigt_map); TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::konamigt_interrupt), "screen", 0, 1); - Z80(config, m_audiocpu, 14318180/8); /* 1.7897725MHz */ + Z80(config, m_audiocpu, XTAL::u(14318180)/8); /* 1.7897725MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sound_map); ls259_device &outlatch(LS259(config, "outlatch")); @@ -1932,12 +1932,12 @@ void nemesis_state::konamigt(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ay8910_device &ay1(AY8910(config, "ay1", 14318180/8)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(14318180)/8)); ay1.set_flags(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT); ay1.port_a_read_callback().set(FUNC(nemesis_state::nemesis_portA_r)); ay1.add_route(ALL_OUTPUTS, "filter1", 0.20); - ay8910_device &ay2(AY8910(config, "ay2", 14318180/8)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(14318180)/8)); ay2.port_a_write_callback().set(m_k005289, FUNC(k005289_device::control_A_w)); ay2.port_b_write_callback().set(m_k005289, FUNC(k005289_device::control_B_w)); ay2.add_route(0, "filter2", 1.00); @@ -1953,18 +1953,18 @@ void nemesis_state::konamigt(machine_config &config) FILTER_RC(config, m_filter4); m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0); - K005289(config, m_k005289, 3579545); + K005289(config, m_k005289, XTAL::u(3579545)); m_k005289->add_route(ALL_OUTPUTS, "mono", 0.60); } void nemesis_state::rf2_gx400(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::rf2_gx400_map); TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::gx400_interrupt), "screen", 0, 1); - Z80(config, m_audiocpu, 14318180/8); /* 1.7897725MHz */ + Z80(config, m_audiocpu, XTAL::u(14318180)/8); /* 1.7897725MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_sound_map); ls259_device &outlatch(LS259(config, "outlatch")); @@ -1996,12 +1996,12 @@ void nemesis_state::rf2_gx400(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ay8910_device &ay1(AY8910(config, "ay1", 14318180/8)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(14318180)/8)); ay1.set_flags(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT); ay1.port_a_read_callback().set(FUNC(nemesis_state::nemesis_portA_r)); ay1.add_route(ALL_OUTPUTS, "filter1", 0.20); - ay8910_device &ay2(AY8910(config, "ay2", 14318180/8)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(14318180)/8)); ay2.port_a_write_callback().set(m_k005289, FUNC(k005289_device::control_A_w)); ay2.port_b_write_callback().set(m_k005289, FUNC(k005289_device::control_B_w)); ay2.add_route(0, "filter2", 1.00); @@ -2017,10 +2017,10 @@ void nemesis_state::rf2_gx400(machine_config &config) FILTER_RC(config, m_filter4); m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0); - K005289(config, m_k005289, 3579545); + K005289(config, m_k005289, XTAL::u(3579545)); m_k005289->add_route(ALL_OUTPUTS, "mono", 0.60); - VLM5030(config, m_vlm, 3579545); + VLM5030(config, m_vlm, XTAL::u(3579545)); m_vlm->set_addrmap(0, &nemesis_state::gx400_vlm_map); m_vlm->add_route(ALL_OUTPUTS, "mono", 0.70); } @@ -2028,10 +2028,10 @@ void nemesis_state::rf2_gx400(machine_config &config) void nemesis_state::salamand(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::salamand_map); - Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */ + Z80(config, m_audiocpu, XTAL::u(3579545)); /* 3.579545 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sal_sound_map); WATCHDOG_TIMER(config, "watchdog"); @@ -2053,17 +2053,17 @@ void nemesis_state::salamand(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - VLM5030(config, m_vlm, 3579545); + VLM5030(config, m_vlm, XTAL::u(3579545)); m_vlm->set_addrmap(0, &nemesis_state::salamand_vlm_map); m_vlm->add_route(ALL_OUTPUTS, "lspeaker", 2.50); m_vlm->add_route(ALL_OUTPUTS, "rspeaker", 2.50); - K007232(config, m_k007232, 3579545); + K007232(config, m_k007232, XTAL::u(3579545)); m_k007232->port_write().set(FUNC(nemesis_state::volume_callback)); m_k007232->add_route(ALL_OUTPUTS, "lspeaker", 0.08); m_k007232->add_route(ALL_OUTPUTS, "rspeaker", 0.08); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(3579545))); // ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ... Interrupts _are_ generated, I wonder where they go ymsnd.add_route(0, "rspeaker", 1.2); // reversed according to MT #4565 ymsnd.add_route(1, "lspeaker", 1.2); @@ -2072,10 +2072,10 @@ void nemesis_state::salamand(machine_config &config) void nemesis_state::blkpnthr(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::blkpnthr_map); - Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */ + Z80(config, m_audiocpu, XTAL::u(3579545)); /* 3.579545 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::blkpnthr_sound_map); WATCHDOG_TIMER(config, "watchdog"); @@ -2097,12 +2097,12 @@ void nemesis_state::blkpnthr(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - K007232(config, m_k007232, 3579545); + K007232(config, m_k007232, XTAL::u(3579545)); m_k007232->port_write().set(FUNC(nemesis_state::volume_callback)); m_k007232->add_route(ALL_OUTPUTS, "lspeaker", 0.10); m_k007232->add_route(ALL_OUTPUTS, "rspeaker", 0.10); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(3579545))); // ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ... Interrupts _are_ generated, I wonder where they go ymsnd.add_route(0, "lspeaker", 1.0); ymsnd.add_route(1, "rspeaker", 1.0); @@ -2111,10 +2111,10 @@ void nemesis_state::blkpnthr(machine_config &config) void nemesis_state::citybomb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::citybomb_map); - Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */ + Z80(config, m_audiocpu, XTAL::u(3579545)); /* 3.579545 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::city_sound_map); adc0804_device &adc(ADC0804(config, "adc", RES_K(10), CAP_P(150))); @@ -2138,25 +2138,25 @@ void nemesis_state::citybomb(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - K007232(config, m_k007232, 3579545); + K007232(config, m_k007232, XTAL::u(3579545)); m_k007232->port_write().set(FUNC(nemesis_state::volume_callback)); m_k007232->add_route(ALL_OUTPUTS, "mono", 0.30); - ym3812_device &ym3812(YM3812(config, "ymsnd", 3579545)); + ym3812_device &ym3812(YM3812(config, "ymsnd", XTAL::u(3579545))); // ym3812.irq_handler().set_inputline("audiocpu", 0); ... Interrupts _are_ generated, I wonder where they go ym3812.add_route(ALL_OUTPUTS, "mono", 1.0); - k051649_device &k051649(K051649(config, "k051649", 3579545)); + k051649_device &k051649(K051649(config, "k051649", XTAL::u(3579545))); k051649.add_route(ALL_OUTPUTS, "mono", 0.38); } void nemesis_state::nyanpani(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216 MHz? */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::nyanpani_map); - Z80(config, m_audiocpu, 3579545); /* 3.579545 MHz */ + Z80(config, m_audiocpu, XTAL::u(3579545)); /* 3.579545 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::city_sound_map); WATCHDOG_TIMER(config, "watchdog"); @@ -2177,29 +2177,29 @@ void nemesis_state::nyanpani(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - K007232(config, m_k007232, 3579545); + K007232(config, m_k007232, XTAL::u(3579545)); m_k007232->port_write().set(FUNC(nemesis_state::volume_callback)); m_k007232->add_route(ALL_OUTPUTS, "mono", 0.30); - ym3812_device &ym3812(YM3812(config, "ymsnd", 3579545)); + ym3812_device &ym3812(YM3812(config, "ymsnd", XTAL::u(3579545))); // ym3812.irq_handler().set_inputline("audiocpu", 0); ... Interrupts _are_ generated, I wonder where they go ym3812.add_route(ALL_OUTPUTS, "mono", 1.0); - k051649_device &k051649(K051649(config, "k051649", 3579545)); + k051649_device &k051649(K051649(config, "k051649", XTAL::u(3579545))); k051649.add_route(ALL_OUTPUTS, "mono", 0.38); } void nemesis_state::hcrash(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/3); /* 6.144MHz */ + M68000(config, m_maincpu, XTAL::u(18432000)/3); /* 6.144MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::hcrash_map); TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::hcrash_interrupt), "screen", 0, 1); - Z80(config, m_audiocpu, 14318180/4); /* 3.579545 MHz */ + Z80(config, m_audiocpu, XTAL::u(14318180)/4); /* 3.579545 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::sal_sound_map); - adc0804_device &adc(ADC0804(config, "adc", 640000)); // unknown clock (doesn't seem to be R/C here) + adc0804_device &adc(ADC0804(config, "adc", XTAL::u(640000))); // unknown clock (doesn't seem to be R/C here) adc.vin_callback().set(FUNC(nemesis_state::selected_ip_r)); ls259_device &intlatch(LS259(config, "intlatch")); @@ -2225,17 +2225,17 @@ void nemesis_state::hcrash(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - VLM5030(config, m_vlm, 3579545); + VLM5030(config, m_vlm, XTAL::u(3579545)); m_vlm->set_addrmap(0, &nemesis_state::salamand_vlm_map); m_vlm->add_route(ALL_OUTPUTS, "lspeaker", 2.00); m_vlm->add_route(ALL_OUTPUTS, "rspeaker", 2.00); - K007232(config, m_k007232, 3579545); + K007232(config, m_k007232, XTAL::u(3579545)); m_k007232->port_write().set(FUNC(nemesis_state::volume_callback)); m_k007232->add_route(ALL_OUTPUTS, "lspeaker", 0.10); m_k007232->add_route(ALL_OUTPUTS, "rspeaker", 0.10); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(3579545))); // ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ... Interrupts _are_ generated, I wonder where they go ymsnd.add_route(0, "lspeaker", 0.50); ymsnd.add_route(1, "rspeaker", 0.50); @@ -2949,11 +2949,11 @@ PIN16 VCC void nemesis_state::bubsys(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 18432000/2); /* 9.216MHz */ + M68000(config, m_maincpu, XTAL::u(18432000)/2); /* 9.216MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &nemesis_state::bubsys_map); TIMER(config, "scantimer").configure_scanline(FUNC(nemesis_state::bubsys_interrupt), "screen", 0, 1); - Z80(config, m_audiocpu, 14318180/8); /* 1.7897725MHz */ + Z80(config, m_audiocpu, XTAL::u(14318180)/8); /* 1.7897725MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nemesis_state::gx400_sound_map); ls259_device &outlatch(LS259(config, "outlatch")); @@ -2986,12 +2986,12 @@ void nemesis_state::bubsys(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ay8910_device &ay1(AY8910(config, "ay1", 14318180/8)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(14318180)/8)); ay1.set_flags(AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT); ay1.port_a_read_callback().set(FUNC(nemesis_state::nemesis_portA_r)); ay1.add_route(ALL_OUTPUTS, "filter1", 0.20); - ay8910_device &ay2(AY8910(config, "ay2", 14318180/8)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(14318180)/8)); ay2.port_a_write_callback().set(m_k005289, FUNC(k005289_device::control_A_w)); ay2.port_b_write_callback().set(m_k005289, FUNC(k005289_device::control_B_w)); ay2.add_route(0, "filter2", 1.00); @@ -3007,10 +3007,10 @@ void nemesis_state::bubsys(machine_config &config) FILTER_RC(config, m_filter4); m_filter4->add_route(ALL_OUTPUTS, "mono", 1.0); - K005289(config, m_k005289, 3579545); + K005289(config, m_k005289, XTAL::u(3579545)); m_k005289->add_route(ALL_OUTPUTS, "mono", 0.35); - VLM5030(config, m_vlm, 3579545); + VLM5030(config, m_vlm, XTAL::u(3579545)); m_vlm->set_addrmap(0, &nemesis_state::gx400_vlm_map); m_vlm->add_route(ALL_OUTPUTS, "mono", 0.70); } diff --git a/src/mame/konami/nwk-tr.cpp b/src/mame/konami/nwk-tr.cpp index a23cfd4da9f..c4d21b8945a 100644 --- a/src/mame/konami/nwk-tr.cpp +++ b/src/mame/konami/nwk-tr.cpp @@ -680,13 +680,13 @@ void nwktr_state::nwktr(machine_config &config) config.set_maximum_quantum(attotime::from_hz(9000)); - M48T58(config, "m48t58", 0); + M48T58(config, "m48t58"); - ADC12138(config, m_adc12138, 0); + ADC12138(config, m_adc12138); m_adc12138->set_ipt_convert_callback(FUNC(nwktr_state::adc12138_input_callback)); - K033906(config, "k033906_1", 0, m_voodoo[0]); - K033906(config, "k033906_2", 0, m_voodoo[1]); + K033906(config, "k033906_1", m_voodoo[0]); + K033906(config, "k033906_2", m_voodoo[1]); // video hardware VOODOO_1(config, m_voodoo[0], XTAL(50'000'000)); @@ -714,10 +714,10 @@ void nwktr_state::nwktr(machine_config &config) PALETTE(config, m_palette).set_entries(65536); - K001604(config, m_k001604[0], 0); + K001604(config, m_k001604[0]); m_k001604[0]->set_palette(m_palette); - K001604(config, m_k001604[1], 0); + K001604(config, m_k001604[1]); m_k001604[1]->set_palette(m_palette); SPEAKER(config, "lspeaker").front_left(); @@ -730,11 +730,11 @@ void nwktr_state::nwktr(machine_config &config) rfsnd.add_route(0, "lspeaker", 1.0); rfsnd.add_route(1, "rspeaker", 1.0); - KONPPC(config, m_konppc, 0); + KONPPC(config, m_konppc); m_konppc->set_num_boards(2); m_konppc->set_cbboard_type(konppc_device::CGBOARD_TYPE_NWKTR); - KONAMI_GN676_LAN(config, "gn676_lan", 0, m_work_ram); + KONAMI_GN676_LAN(config, "gn676_lan", m_work_ram); } void nwktr_state::thrilld(machine_config &config) diff --git a/src/mame/konami/otomedius.cpp b/src/mame/konami/otomedius.cpp index df9f03809ee..b753b21b933 100644 --- a/src/mame/konami/otomedius.cpp +++ b/src/mame/konami/otomedius.cpp @@ -70,7 +70,7 @@ void konami_pc_state::machine_reset() void konami_pc_state::konami_pc(machine_config &config) { /* basic machine hardware */ - PENTIUM3(config, m_maincpu, 100000000); // actually Celeron + PENTIUM3(config, m_maincpu, XTAL::u(100000000)); // actually Celeron m_maincpu->set_addrmap(AS_PROGRAM, &konami_pc_state::konami_pc_map); /* video hardware */ diff --git a/src/mame/konami/overdriv.cpp b/src/mame/konami/overdriv.cpp index 9db471482f6..98b6cc4c2cc 100644 --- a/src/mame/konami/overdriv.cpp +++ b/src/mame/konami/overdriv.cpp @@ -471,26 +471,26 @@ void overdriv_state::overdriv(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows(); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(overdriv_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, 77, 22); m_k053246->set_palette("palette"); - K051316(config, m_k051316_1, 0); + K051316(config, m_k051316_1); m_k051316_1->set_palette("palette"); m_k051316_1->set_offsets(14, -1); m_k051316_1->set_wrap(1); m_k051316_1->set_zoom_callback(FUNC(overdriv_state::zoom_callback_1)); - K051316(config, m_k051316_2, 0); + K051316(config, m_k051316_2); m_k051316_2->set_palette("palette"); m_k051316_2->set_offsets(15, 1); m_k051316_2->set_zoom_callback(FUNC(overdriv_state::zoom_callback_2)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); - K053250(config, "k053250_1", 0, "palette", m_screen, 0, 0); - K053250(config, "k053250_2", 0, "palette", m_screen, 0, 0); + K053250(config, "k053250_1", "palette", m_screen, 0, 0); + K053250(config, "k053250_2", "palette", m_screen, 0, 0); K053252(config, m_k053252, XTAL(24'000'000)/4); m_k053252->set_offsets(13*8, 2*8); diff --git a/src/mame/konami/pandoras.cpp b/src/mame/konami/pandoras.cpp index 590b6400892..43197a4da37 100644 --- a/src/mame/konami/pandoras.cpp +++ b/src/mame/konami/pandoras.cpp @@ -588,7 +588,7 @@ void pandoras_state::pandoras(machine_config &config) aysnd.port_b_read_callback().set(FUNC(pandoras_state::portb_r)); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.4); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.12); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.12); // unknown DAC } diff --git a/src/mame/konami/parodius.cpp b/src/mame/konami/parodius.cpp index 55917fcf694..c28615841f9 100644 --- a/src/mame/konami/parodius.cpp +++ b/src/mame/konami/parodius.cpp @@ -355,11 +355,11 @@ void parodius_state::banking_callback(uint8_t data) void parodius_state::parodius(machine_config &config) { // basic machine hardware - KONAMI(config, m_maincpu, 3000000); // 053248 + KONAMI(config, m_maincpu, XTAL::u(3000000)); // 053248 m_maincpu->set_addrmap(AS_PROGRAM, &parodius_state::main_map); m_maincpu->line().set(FUNC(parodius_state::banking_callback)); - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &parodius_state::sound_map); // NMIs are triggered by the 053260 ADDRESS_MAP_BANK(config, "bank0000").set_map(&parodius_state::bank0000_map).set_options(ENDIANNESS_BIG, 8, 13, 0x800); @@ -377,25 +377,25 @@ void parodius_state::parodius(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette("palette"); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(parodius_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette("palette"); m_k053245->set_sprite_callback(FUNC(parodius_state::sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); + YM2151(config, "ymsnd", XTAL::u(3579545)).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); - k053260_device &k053260(K053260(config, "k053260", 3579545)); + k053260_device &k053260(K053260(config, "k053260", XTAL::u(3579545))); k053260.add_route(0, "lspeaker", 0.70); k053260.add_route(1, "rspeaker", 0.70); k053260.sh1_cb().set(FUNC(parodius_state::z80_nmi_w)); diff --git a/src/mame/konami/pingpong.cpp b/src/mame/konami/pingpong.cpp index 78e5cd60afe..87dab8a9dc7 100644 --- a/src/mame/konami/pingpong.cpp +++ b/src/mame/konami/pingpong.cpp @@ -691,7 +691,7 @@ GFXDECODE_END void pingpong_state::pingpong(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu,18'432'000 / 6); // 3.072 MHz (probably) + Z80(config, m_maincpu, XTAL::u(18'432'000) / 6); // 3.072 MHz (probably) m_maincpu->set_addrmap(AS_PROGRAM, &pingpong_state::pingpong_map); TIMER(config, "scantimer").configure_scanline(FUNC(pingpong_state::pingpong_interrupt), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); @@ -711,7 +711,7 @@ void pingpong_state::pingpong(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76496(config, "snsnd", 18'432'000 / 8).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76496(config, "snsnd", XTAL::u(18'432'000) / 8).add_route(ALL_OUTPUTS, "mono", 1.0); } // too fast! diff --git a/src/mame/konami/piratesh.cpp b/src/mame/konami/piratesh.cpp index 7791c1dc05a..855c5218db0 100644 --- a/src/mame/konami/piratesh.cpp +++ b/src/mame/konami/piratesh.cpp @@ -615,7 +615,7 @@ void piratesh_state::piratesh(machine_config &config) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); // screen.set_refresh_hz(60); - screen.set_raw(6000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); // TODO + screen.set_raw(XTAL::u(6000000), 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); // TODO screen.set_vblank_time(ATTOSECONDS_IN_USEC(600)); screen.set_size(64*8, 32*8); screen.set_visarea(24, 24+288-1, 16, 16+224-1); @@ -623,27 +623,27 @@ void piratesh_state::piratesh(machine_config &config) PALETTE(config, "palette").set_format(palette_device::BGRx_888, 2048).enable_shadows().enable_hilights(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(piratesh_state::piratesh_tile_callback)); m_k056832->set_config(K056832_BPP_4PIRATESH, 1, 0); m_k056832->set_palette("palette"); - K055555(config, m_k055555, 0); + K055555(config, m_k055555); - K053250PS(config, m_k053250, 12000000, "palette", "screen", -16, 0); + K053250PS(config, m_k053250, XTAL::u(12000000), "palette", "screen", -16, 0); - K055673(config, m_k055673, 0); + K055673(config, m_k055673); m_k055673->set_sprite_callback(FUNC(piratesh_state::piratesh_sprite_callback)); m_k055673->set_config(K055673_LAYOUT_PS, -60, 24); m_k055673->set_palette("palette"); // ???? - //K053246(config, m_k053246, 0); + //K053246(config, m_k053246); //m_k053246->set_sprite_callback(FUNC(moo_state::sprite_callback)); //m_k053246->set_config("k053246", NORMAL_PLANE_ORDER, -48+1, 23); //m_k053246->set_palette(m_palette); - K054338(config, "k054338", 0, m_k055555).set_alpha_invert(1); + K054338(config, "k054338", m_k055555).set_alpha_invert(1); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/plygonet.cpp b/src/mame/konami/plygonet.cpp index a23c346349e..55fba906118 100644 --- a/src/mame/konami/plygonet.cpp +++ b/src/mame/konami/plygonet.cpp @@ -1037,7 +1037,7 @@ void polygonet_state::plygonet(machine_config &config) m_dsp->set_addrmap(AS_DATA, &polygonet_state::dsp_data_map); m_dsp->portc_cb().set(FUNC(polygonet_state::dsp_portc_write)); - Z80(config, m_audiocpu, 8000000); + Z80(config, m_audiocpu, XTAL::u(8000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &polygonet_state::sound_map); config.set_maximum_quantum(attotime::from_hz(6000)); // occasional lockup in-game otherwise @@ -1062,7 +1062,7 @@ void polygonet_state::plygonet(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 32768); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_wrap(true); // Sound hardware diff --git a/src/mame/konami/qdrmfgp.cpp b/src/mame/konami/qdrmfgp.cpp index 69e14159979..04ab66cc784 100644 --- a/src/mame/konami/qdrmfgp.cpp +++ b/src/mame/konami/qdrmfgp.cpp @@ -550,7 +550,7 @@ void qdrmfgp_state::qdrmfgp(machine_config &config) MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp) - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(qdrmfgp_state::qdrmfgp_tile_callback)); m_k056832->set_config(K056832_BPP_4dj, 1, 0); m_k056832->set_palette(m_palette); @@ -595,7 +595,7 @@ void qdrmfgp_state::qdrmfgp2(machine_config &config) MCFG_VIDEO_START_OVERRIDE(qdrmfgp_state,qdrmfgp2) - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(qdrmfgp_state::qdrmfgp2_tile_callback)); m_k056832->set_config(K056832_BPP_4dj, 1, 0); m_k056832->set_palette(m_palette); diff --git a/src/mame/konami/quickpick5.cpp b/src/mame/konami/quickpick5.cpp index 854059b21de..2eacb6c59eb 100644 --- a/src/mame/konami/quickpick5.cpp +++ b/src/mame/konami/quickpick5.cpp @@ -603,7 +603,7 @@ void quickpick5_state::quickpick5(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); m_palette->enable_shadows(); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_offsets(-(44+80), 20); m_k053245->set_sprite_callback(FUNC(quickpick5_state::sprite_callback)); diff --git a/src/mame/konami/rockrage.cpp b/src/mame/konami/rockrage.cpp index 65176b9d3da..21c7bc5b470 100644 --- a/src/mame/konami/rockrage.cpp +++ b/src/mame/konami/rockrage.cpp @@ -400,12 +400,12 @@ void rockrage_state::rockrage(machine_config &config) screen.set_palette(m_palette); screen.screen_vblank().set(FUNC(rockrage_state::vblank_irq)); - K007342(config, m_k007342, 0); + K007342(config, m_k007342); m_k007342->set_gfxnum(0); m_k007342->set_tile_callback(FUNC(rockrage_state::tile_callback)); m_k007342->set_gfxdecode_tag(m_gfxdecode); - K007420(config, m_k007420, 0); + K007420(config, m_k007420); m_k007420->set_bank_limit(0x3ff); m_k007420->set_sprite_callback(FUNC(rockrage_state::sprite_callback)); m_k007420->set_palette_tag(m_palette); @@ -421,9 +421,9 @@ void rockrage_state::rockrage(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, M6809_IRQ_LINE); - YM2151(config, "ymsnd", 3'579'545).add_route(0, "lspeaker", 0.60).add_route(1, "rspeaker", 0.60); + YM2151(config, "ymsnd", XTAL::u(3'579'545)).add_route(0, "lspeaker", 0.60).add_route(1, "rspeaker", 0.60); - VLM5030(config, m_vlm, 3'579'545); + VLM5030(config, m_vlm, XTAL::u(3'579'545)); m_vlm->set_addrmap(0, &rockrage_state::vlm_map); m_vlm->add_route(ALL_OUTPUTS, "lspeaker", 0.60); m_vlm->add_route(ALL_OUTPUTS, "rspeaker", 0.60); diff --git a/src/mame/konami/rollerg.cpp b/src/mame/konami/rollerg.cpp index d968de66a15..74b6f4aabf1 100644 --- a/src/mame/konami/rollerg.cpp +++ b/src/mame/konami/rollerg.cpp @@ -372,17 +372,17 @@ void rollerg_state::rollerg(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 1024).enable_shadows(); - K053244(config, m_k053244, 0); + K053244(config, m_k053244); m_k053244->set_palette("palette"); m_k053244->set_offsets(-3, -1); m_k053244->set_sprite_callback(FUNC(rollerg_state::sprite_callback)); - K051316(config, m_k051316, 0); + K051316(config, m_k051316); m_k051316->set_palette("palette"); m_k051316->set_offsets(22, 1); m_k051316->set_zoom_callback(FUNC(rollerg_state::zoom_callback)); - k053252_device &k053252(K053252(config, "k053252", 3000000 * 2)); + k053252_device &k053252(K053252(config, "k053252", XTAL::u(3000000) * 2)); k053252.int1_ack().set(FUNC(rollerg_state::irq_ack_w)); k053252.set_offsets(14*8, 2*8); diff --git a/src/mame/konami/rungun.cpp b/src/mame/konami/rungun.cpp index 9e9134e43b2..90dbf8c6170 100644 --- a/src/mame/konami/rungun.cpp +++ b/src/mame/konami/rungun.cpp @@ -377,11 +377,11 @@ void rungun_state::machine_reset() void rungun_state::rng(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &rungun_state::rungun_map); m_maincpu->set_vblank_int("screen", FUNC(rungun_state::rng_interrupt)); - Z80(config, m_soundcpu, 8000000); + Z80(config, m_soundcpu, XTAL::u(8000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &rungun_state::rungun_sound_map); config.set_maximum_quantum(attotime::from_hz(6000)); // higher if sound stutters @@ -405,16 +405,16 @@ void rungun_state::rng(machine_config &config) m_palette->enable_shadows(); m_palette->enable_hilights(); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_offsets(34, 9); - K055673(config, m_k055673, 0); + K055673(config, m_k055673); m_k055673->set_sprite_callback(FUNC(rungun_state::sprite_callback)); m_k055673->set_config(K055673_LAYOUT_RNG, -8, 15); m_k055673->set_palette(m_palette); m_k055673->set_screen(m_screen); - K053252(config, m_k053252, 16000000/2); + K053252(config, m_k053252, XTAL::u(16000000)/2); m_k053252->set_offsets(9*8, 24); m_k053252->set_screen("screen"); diff --git a/src/mame/konami/sbasketb.cpp b/src/mame/konami/sbasketb.cpp index 0f16ff5ea1e..f508c1d82e2 100644 --- a/src/mame/konami/sbasketb.cpp +++ b/src/mame/konami/sbasketb.cpp @@ -412,7 +412,7 @@ WRITE_LINE_MEMBER(sbasketb_state::vblank_irq) void sbasketb_state::sbasketb(machine_config &config) { // basic machine hardware - KONAMI1(config, m_maincpu, 1'400'000); // 1.400 MHz ??? TODO: From a 18.432 MHz XTAL this doesn't seem probable + KONAMI1(config, m_maincpu, XTAL::u(1'400'000)); // 1.400 MHz ??? TODO: From a 18.432 MHz XTAL this doesn't seem probable m_maincpu->set_addrmap(AS_PROGRAM, &sbasketb_state::main_map); Z80(config, m_audiocpu, XTAL(14'318'181) / 4); // 3.5795 MHz @@ -447,9 +447,9 @@ void sbasketb_state::sbasketb(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - TRACKFLD_AUDIO(config, "soundbrd", 0, m_audiocpu, m_vlm); + TRACKFLD_AUDIO(config, "soundbrd", m_audiocpu, m_vlm); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC SN76489(config, m_sn, XTAL(14'318'181) / 8).add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -459,7 +459,7 @@ void sbasketb_state::sbasketb(machine_config &config) void sbasketb_state::sbasketbu(machine_config &config) { sbasketb(config); - MC6809E(config.replace(), m_maincpu, 1'400'000); // 6809E at 1.400 MHz ??? + MC6809E(config.replace(), m_maincpu, XTAL::u(1'400'000)); // 6809E at 1.400 MHz ??? m_maincpu->set_addrmap(AS_PROGRAM, &sbasketb_state::main_map); } diff --git a/src/mame/konami/scotrsht.cpp b/src/mame/konami/scotrsht.cpp index 298b365c5b6..c070f979348 100644 --- a/src/mame/konami/scotrsht.cpp +++ b/src/mame/konami/scotrsht.cpp @@ -374,10 +374,10 @@ GFXDECODE_END void scotrsht_state::scotrsht(machine_config &config) { // basic machine hardware - MC6809E(config, m_maincpu, 18'432'000 / 6); // 3.072 MHz + MC6809E(config, m_maincpu, XTAL::u(18'432'000) / 6); // 3.072 MHz m_maincpu->set_addrmap(AS_PROGRAM, &scotrsht_state::main_map); - Z80(config, m_audiocpu, 18'432'000 / 6); // 3.072 MHz + Z80(config, m_audiocpu, XTAL::u(18'432'000) / 6); // 3.072 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &scotrsht_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &scotrsht_state::sound_portmap); @@ -401,7 +401,7 @@ void scotrsht_state::scotrsht(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0); - YM2203(config, "ymsnd", 18'432'000 / 6).add_route(ALL_OUTPUTS, "mono", 0.40); + YM2203(config, "ymsnd", XTAL::u(18'432'000) / 6).add_route(ALL_OUTPUTS, "mono", 0.40); } diff --git a/src/mame/konami/simpsons.cpp b/src/mame/konami/simpsons.cpp index 3526a23c2ae..d7391d2f553 100644 --- a/src/mame/konami/simpsons.cpp +++ b/src/mame/konami/simpsons.cpp @@ -339,19 +339,19 @@ void simpsons_state::simpsons(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows().enable_hilights(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_xy_offset(-96, -16); m_k052109->set_palette("palette"); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(simpsons_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(simpsons_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, -43, 39); m_k053246->set_palette("palette"); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/spy.cpp b/src/mame/konami/spy.cpp index f5d119bd510..2e4f1909c25 100644 --- a/src/mame/konami/spy.cpp +++ b/src/mame/konami/spy.cpp @@ -511,13 +511,13 @@ void spy_state::spy(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); m_palette->enable_shadows(); - K052109(config, m_k052109, 0); // 051961 on schematics + K052109(config, m_k052109); // 051961 on schematics m_k052109->set_palette(m_palette); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(spy_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(spy_state::sprite_callback)); @@ -527,16 +527,16 @@ void spy_state::spy(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 3579545)); + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(3579545))); ymsnd.irq_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - K007232(config, m_k007232_1, 3579545); + K007232(config, m_k007232_1, XTAL::u(3579545)); m_k007232_1->port_write().set(FUNC(spy_state::volume_callback0)); m_k007232_1->add_route(0, "mono", 0.20); m_k007232_1->add_route(1, "mono", 0.20); - K007232(config, m_k007232_2, 3579545); + K007232(config, m_k007232_2, XTAL::u(3579545)); m_k007232_2->port_write().set(FUNC(spy_state::volume_callback1)); m_k007232_2->add_route(0, "mono", 0.20); m_k007232_2->add_route(1, "mono", 0.20); diff --git a/src/mame/konami/surpratk.cpp b/src/mame/konami/surpratk.cpp index d054322cd9f..ab0300a35f5 100644 --- a/src/mame/konami/surpratk.cpp +++ b/src/mame/konami/surpratk.cpp @@ -320,17 +320,17 @@ void surpratk_state::surpratk(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); m_palette->enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(surpratk_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); - K053244(config, m_k053244, 0); + K053244(config, m_k053244); m_k053244->set_palette(m_palette); m_k053244->set_sprite_callback(FUNC(surpratk_state::sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); // sound hardware SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/tasman.cpp b/src/mame/konami/tasman.cpp index f55f9da7962..75d4aa32cae 100644 --- a/src/mame/konami/tasman.cpp +++ b/src/mame/konami/tasman.cpp @@ -651,15 +651,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(kongambl_state::kongambl_vblank) void kongambl_state::kongambl(machine_config &config) { - M68EC020(config, m_maincpu, 25000000); + M68EC020(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &kongambl_state::kongambl_map); TIMER(config, "scantimer").configure_scanline(FUNC(kongambl_state::kongambl_vblank), "screen", 0, 1); - m68000_device &sndcpu(M68000(config, "sndcpu", 16000000)); + m68000_device &sndcpu(M68000(config, "sndcpu", XTAL::u(16000000))); sndcpu.set_addrmap(AS_PROGRAM, &kongambl_state::kongamaud_map); sndcpu.set_periodic_int(FUNC(kongambl_state::irq2_line_hold), attotime::from_hz(480)); - K053252(config, m_k053252, 25000000); + K053252(config, m_k053252, XTAL::u(25000000)); m_k053252->set_offsets(0, 16); // TBD m_k053252->int1_ack().set(FUNC(kongambl_state::vblank_irq_ack_w)); m_k053252->int2_ack().set(FUNC(kongambl_state::hblank_irq_ack_w)); @@ -668,15 +668,15 @@ void kongambl_state::kongambl(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(25000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); // fake, they'll be changed by CCU anyway, TBD + m_screen->set_raw(XTAL::u(25000000), 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); // fake, they'll be changed by CCU anyway, TBD m_screen->set_screen_update(FUNC(kongambl_state::screen_update_kongambl)); m_screen->set_palette(m_palette); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 32768); - K055555(config, m_k055555, 0); + K055555(config, m_k055555); - K055673(config, m_k055673, 0); + K055673(config, m_k055673); m_k055673->set_sprite_callback(FUNC(kongambl_state::sprite_callback)); m_k055673->set_config(K055673_LAYOUT_LE2, -48+1, -23); m_k055673->set_palette(m_palette); @@ -685,7 +685,7 @@ void kongambl_state::kongambl(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_tasman); #endif - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(kongambl_state::tile_callback)); m_k056832->set_config(K056832_BPP_8TASMAN, 0, 0); m_k056832->set_palette(m_palette); diff --git a/src/mame/konami/thunderx.cpp b/src/mame/konami/thunderx.cpp index b02e756546d..f0cbd7c4181 100644 --- a/src/mame/konami/thunderx.cpp +++ b/src/mame/konami/thunderx.cpp @@ -650,13 +650,13 @@ void thunderx_state::scontra(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); m_palette->enable_shadows(); - K052109(config, m_k052109, 0); // 051961 on Super Contra and Thunder Cross schematics + K052109(config, m_k052109); // 051961 on Super Contra and Thunder Cross schematics m_k052109->set_palette(m_palette); m_k052109->set_screen("screen"); m_k052109->set_tile_callback(FUNC(thunderx_state::tile_callback)); m_k052109->irq_handler().set_inputline(m_maincpu, KONAMI_IRQ_LINE); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(thunderx_state::sprite_callback)); diff --git a/src/mame/konami/tmnt.cpp b/src/mame/konami/tmnt.cpp index 3760477cd44..53e9da3605b 100644 --- a/src/mame/konami/tmnt.cpp +++ b/src/mame/konami/tmnt.cpp @@ -2009,7 +2009,7 @@ MACHINE_RESET_MEMBER(tmnt_state,common) void tmnt_state::cuebrick(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); /* 8 MHz */ + M68000(config, m_maincpu, XTAL::u(8000000)); /* 8 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &tmnt_state::cuebrick_main_map); m_maincpu->set_vblank_int("screen", FUNC(tmnt_state::tmnt_interrupt)); @@ -2036,12 +2036,12 @@ void tmnt_state::cuebrick(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state,cuebrick) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::cuebrick_tile_callback)); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(tmnt_state::mia_sprite_callback)); @@ -2086,12 +2086,12 @@ void tmnt_state::mia(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state,mia) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::mia_tile_callback)); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(tmnt_state::mia_sprite_callback)); @@ -2149,12 +2149,12 @@ void tmnt_state::tmnt(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state,tmnt) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback)); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(tmnt_state::tmnt_sprite_callback)); @@ -2188,7 +2188,7 @@ void tmnt_state::tmntucbl(machine_config &config) M68705R3(config, "mcu", XTAL(4'000'000)).set_disable(); // not dumped - MSM5205(config, "msm", 384'000).add_route(ALL_OUTPUTS, "mono", 0.5); // TODO: hook up, frequency unknown + MSM5205(config, "msm", XTAL::u(384'000)).add_route(ALL_OUTPUTS, "mono", 0.5); // TODO: hook up, frequency unknown config.device_remove("k007232"); } @@ -2222,17 +2222,17 @@ void tmnt_state::punkshot(machine_config &config) m_palette->enable_shadows(); m_palette->enable_hilights(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback)); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(tmnt_state::punkshot_sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -2273,16 +2273,16 @@ void tmnt_state::lgtnfght(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state,lgtnfght) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback)); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_sprite_callback(FUNC(tmnt_state::lgtnfght_sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -2329,17 +2329,17 @@ void tmnt_state::blswhstl(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state, blswhstl) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::blswhstl_tile_callback)); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_sprite_callback(FUNC(tmnt_state::blswhstl_sprite_callback)); - K053251(config, m_k053251, 0); - K054000(config, m_k054000, 0); + K053251(config, m_k053251); + K054000(config, m_k054000); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -2394,20 +2394,20 @@ void glfgreat_state::glfgreat(machine_config &config) MCFG_VIDEO_START_OVERRIDE(glfgreat_state,glfgreat) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(glfgreat_state::tmnt_tile_callback)); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_sprite_callback(FUNC(glfgreat_state::lgtnfght_sprite_callback)); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_wrap(1); m_k053936->set_offsets(85, 0); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -2432,7 +2432,7 @@ void prmrsocr_state::prmrsocr(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &prmrsocr_state::prmrsocr_main_map); m_maincpu->set_vblank_int("screen", FUNC(prmrsocr_state::lgtnfght_interrupt)); - Z80(config, m_audiocpu, 8000000); /* ? */ + Z80(config, m_audiocpu, XTAL::u(8000000)); /* ? */ m_audiocpu->set_addrmap(AS_PROGRAM, &prmrsocr_state::prmrsocr_audio_map); /* NMIs are generated by the 054539 */ @@ -2460,19 +2460,19 @@ void prmrsocr_state::prmrsocr(machine_config &config) MCFG_VIDEO_START_OVERRIDE(prmrsocr_state,prmrsocr) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(prmrsocr_state::tmnt_tile_callback)); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_sprite_callback(FUNC(prmrsocr_state::prmrsocr_sprite_callback)); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_offsets(85, 1); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -2493,7 +2493,7 @@ void tmnt_state::tmnt2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &tmnt_state::tmnt2_main_map); m_maincpu->set_vblank_int("screen", FUNC(tmnt_state::punkshot_interrupt)); - Z80(config, m_audiocpu, 8000000); + Z80(config, m_audiocpu, XTAL::u(8000000)); /* 8 MHz; clock is correct, but there's 1 cycle wait for ROM/RAM access. */ /* Access speed of ROM/RAM used on the machine is 150ns, without the wait, they cannot run on 8MHz. */ /* We are not emulating the wait state, so the ROM test ends at 02 instead of 00. */ @@ -2522,16 +2522,16 @@ void tmnt_state::tmnt2(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state,lgtnfght) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback)); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_sprite_callback(FUNC(tmnt_state::lgtnfght_sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -2551,7 +2551,7 @@ void tmnt_state::ssriders(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &tmnt_state::ssriders_main_map); m_maincpu->set_vblank_int("screen", FUNC(tmnt_state::punkshot_interrupt)); - Z80(config, m_audiocpu, 8000000); + Z80(config, m_audiocpu, XTAL::u(8000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &tmnt_state::ssriders_audio_map); /* NMIs are generated by the 053260 */ @@ -2577,16 +2577,16 @@ void tmnt_state::ssriders(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state,lgtnfght) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback)); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_sprite_callback(FUNC(tmnt_state::lgtnfght_sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -2602,7 +2602,7 @@ void tmnt_state::ssriders(machine_config &config) void tmnt_state::sunsetbl(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &tmnt_state::sunsetbl_main_map); m_maincpu->set_vblank_int("screen", FUNC(tmnt_state::irq4_line_hold)); @@ -2626,22 +2626,22 @@ void tmnt_state::sunsetbl(machine_config &config) MCFG_VIDEO_START_OVERRIDE(tmnt_state,lgtnfght) - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::ssbl_tile_callback)); - K053245(config, m_k053245, 0); + K053245(config, m_k053245); m_k053245->set_palette(m_palette); m_k053245->set_sprite_callback(FUNC(tmnt_state::lgtnfght_sprite_callback)); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 1.0); oki.add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -2649,7 +2649,7 @@ void tmnt_state::sunsetbl(machine_config &config) void tmnt_state::thndrx2(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* 12 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &tmnt_state::thndrx2_main_map); m_maincpu->set_vblank_int("screen", FUNC(tmnt_state::punkshot_interrupt)); @@ -2674,18 +2674,18 @@ void tmnt_state::thndrx2(machine_config &config) m_palette->enable_shadows(); m_palette->enable_hilights(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(tmnt_state::tmnt_tile_callback)); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette(m_palette); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(tmnt_state::thndrx2_sprite_callback)); - K053251(config, m_k053251, 0); - K054000(config, m_k054000, 0); + K053251(config, m_k053251); + K054000(config, m_k054000); /* sound hardware */ // NB: game defaults in mono diff --git a/src/mame/konami/tp84.cpp b/src/mame/konami/tp84.cpp index a17f2a41e9b..047a0baea4d 100644 --- a/src/mame/konami/tp84.cpp +++ b/src/mame/konami/tp84.cpp @@ -614,7 +614,7 @@ void tp84_state::tp84(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); /* 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs */ - ls259_device &mainlatch(LS259(config, "mainlatch", 0)); // 3B + ls259_device &mainlatch(LS259(config, "mainlatch")); // 3B mainlatch.q_out_cb<0>().set(FUNC(tp84_state::irq_enable_w)); mainlatch.q_out_cb<1>().set(FUNC(tp84_state::coin_counter_w<1>)); mainlatch.q_out_cb<2>().set(FUNC(tp84_state::coin_counter_w<0>)); diff --git a/src/mame/konami/trackfld.cpp b/src/mame/konami/trackfld.cpp index a0ae87f77de..1720a502ed7 100644 --- a/src/mame/konami/trackfld.cpp +++ b/src/mame/konami/trackfld.cpp @@ -928,9 +928,9 @@ void trackfld_state::trackfld(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - TRACKFLD_AUDIO(config, m_soundbrd, 0, m_audiocpu, m_vlm); + TRACKFLD_AUDIO(config, m_soundbrd, m_audiocpu, m_vlm); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.4); // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f SN76496(config, m_sn, SOUND_CLOCK/8); m_sn->add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -1000,9 +1000,9 @@ void trackfld_state::yieartf(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - TRACKFLD_AUDIO(config, m_soundbrd, 0, finder_base::DUMMY_TAG, m_vlm); + TRACKFLD_AUDIO(config, m_soundbrd, finder_base::DUMMY_TAG, m_vlm); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.4); // ls374.8e + r34-r47(20k) + r35-r53(10k) + r54(20k) + upc324.8f SN76496(config, m_sn, MASTER_CLOCK/6/2); m_sn->add_route(ALL_OUTPUTS, "speaker", 1.0); @@ -1051,9 +1051,9 @@ void trackfld_state::hyprolyb(machine_config &config) GENERIC_LATCH_8(config, "soundlatch2"); - HYPROLYB_ADPCM(config, "hyprolyb_adpcm", 0); + HYPROLYB_ADPCM(config, "hyprolyb_adpcm"); - msm5205_device &msm(MSM5205(config, "msm", 384000)); + msm5205_device &msm(MSM5205(config, "msm", XTAL::u(384000))); msm.vck_legacy_callback().set("hyprolyb_adpcm", FUNC(hyprolyb_adpcm_device::vck_callback)); msm.set_prescaler_selector(msm5205_device::S96_4B); /* 4 kHz */ msm.add_route(ALL_OUTPUTS, "speaker", 0.5); @@ -1084,7 +1084,7 @@ void trackfld_state::wizzquiz(machine_config &config) /* basic machine hardware */ // right cpu? - M6800(config.replace(), m_maincpu, 2048000); /* 1.400 MHz ??? */ + M6800(config.replace(), m_maincpu, XTAL::u(2048000)); /* 1.400 MHz ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &trackfld_state::wizzquiz_map); m_screen->screen_vblank().set(FUNC(trackfld_state::vblank_nmi)); diff --git a/src/mame/konami/trackfld_a.cpp b/src/mame/konami/trackfld_a.cpp index 8534da5adc2..f063ecb0e35 100644 --- a/src/mame/konami/trackfld_a.cpp +++ b/src/mame/konami/trackfld_a.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(TRACKFLD_AUDIO, trackfld_audio_device, "trackfld_audio", "Track And Field Audio") -trackfld_audio_device::trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +trackfld_audio_device::trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TRACKFLD_AUDIO, tag, owner, clock) , m_audiocpu(*this, finder_base::DUMMY_TAG) , m_vlm(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/konami/trackfld_a.h b/src/mame/konami/trackfld_a.h index 141916cec65..3b5232d2934 100644 --- a/src/mame/konami/trackfld_a.h +++ b/src/mame/konami/trackfld_a.h @@ -12,14 +12,14 @@ class trackfld_audio_device : public device_t { public: template - trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&vlm_tag) - : trackfld_audio_device(mconfig, tag, owner, clock) + trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&vlm_tag) + : trackfld_audio_device(mconfig, tag, owner) { m_audiocpu.set_tag(std::forward(cpu_tag)); m_vlm.set_tag(std::forward(vlm_tag)); } - trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + trackfld_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER(sh_irqtrigger_w); uint8_t trackfld_sh_timer_r(); diff --git a/src/mame/konami/twinkle.cpp b/src/mame/konami/twinkle.cpp index a800174decc..d39f4f931b3 100644 --- a/src/mame/konami/twinkle.cpp +++ b/src/mame/konami/twinkle.cpp @@ -1122,7 +1122,7 @@ void twinkle_state::twinkle(machine_config &config) m_maincpu->subdevice("dma")->install_write_handler(5, psxdma_device::write_delegate(&twinkle_state::scsi_dma_write, this)); m_maincpu->subdevice("ram")->set_default_size("4M"); - M68000(config, m_audiocpu, 32000000/2); /* 16.000 MHz */ + M68000(config, m_audiocpu, XTAL::u(32000000)/2); /* 16.000 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &twinkle_state::sound_map); m_audiocpu->set_periodic_int(FUNC(twinkle_state::irq1_line_assert), attotime::from_hz(60)); @@ -1131,11 +1131,11 @@ void twinkle_state::twinkle(machine_config &config) CY7C131(config, m_dpram); // or IDT7130 at some PCBs m_dpram->intl_callback().set_inputline(m_audiocpu, M68K_IRQ_4); - scsi_port_device &scsi(SCSI_PORT(config, "scsi", 0)); + scsi_port_device &scsi(SCSI_PORT(config, "scsi")); scsi.set_slot_device(1, "cdrom", SCSICD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_4)); scsi.slot(1).set_option_machine_config("cdrom", cdrom_config); - AM53CF96(config, m_am53cf96, 0); + AM53CF96(config, m_am53cf96); m_am53cf96->set_scsi_port("scsi"); m_am53cf96->irq_handler().set("maincpu:irq", FUNC(psxirq_device::intin10)); @@ -1143,7 +1143,7 @@ void twinkle_state::twinkle(machine_config &config) m_ata->irq_handler().set(FUNC(twinkle_state::spu_ata_irq)); m_ata->dmarq_handler().set(FUNC(twinkle_state::spu_ata_dmarq)); - RTC65271(config, "rtc", 0); + RTC65271(config, "rtc"); FDC37C665GT(config, "fdc37c665gt", XTAL(24'000'000)); @@ -1173,7 +1173,7 @@ void twinkle_state::twinkle_dvd_type1(machine_config &config) // All versions before beatmania IIDX 2nd style // - maincpu:sio1 (PSX SIO1) is used for the DVD player // - fdc37c665gt:uart2 is used for network/session play - rs232_port_device &rs232(RS232_PORT(config, "rs232_dvd", 0)); + rs232_port_device &rs232(RS232_PORT(config, "rs232_dvd")); rs232.option_add("xvd701", JVC_XVD701); rs232.set_default_option("xvd701"); @@ -1203,7 +1203,7 @@ void twinkle_state::twinkle_dvd_type2(machine_config &config) // All versions starting from beatmania IIDX 2nd style // - fdc37c665gt:uart2 is used for the DVD player // - maincpu:sio1 (PSX SIO1) is used for network/session play - rs232_port_device &rs232(RS232_PORT(config, "rs232_dvd", 0)); + rs232_port_device &rs232(RS232_PORT(config, "rs232_dvd")); rs232.option_add("xvd701", JVC_XVD701); // rs232.option_add("xvs1100", JVC_XVS1100); // 8th mix only rs232.set_default_option("xvd701"); @@ -1244,7 +1244,7 @@ void twinkle_state::twinklei(machine_config &config) { twinkle(config); twinkle_dvd_type2(config); - I2C_M24C02(config, "security", 0); // M24C02-W + I2C_M24C02(config, "security"); // M24C02-W } static INPUT_PORTS_START( twinkle ) diff --git a/src/mame/konami/ultraman.cpp b/src/mame/konami/ultraman.cpp index 26a9d2631c7..1c8f5f2bf6a 100644 --- a/src/mame/konami/ultraman.cpp +++ b/src/mame/konami/ultraman.cpp @@ -176,11 +176,11 @@ void ultraman_state::machine_reset() void ultraman_state::ultraman(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 24000000/2); /* 12 MHz? */ + M68000(config, m_maincpu, XTAL::u(24000000)/2); /* 12 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &ultraman_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(ultraman_state::irq4_line_hold)); - Z80(config, m_audiocpu, 24000000/6); /* 4 MHz? */ + Z80(config, m_audiocpu, XTAL::u(24000000)/6); /* 4 MHz? */ m_audiocpu->set_addrmap(AS_PROGRAM, &ultraman_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &ultraman_state::sound_io_map); @@ -203,22 +203,22 @@ void ultraman_state::ultraman(machine_config &config) palette.set_format(palette_device::xRGB_555, 8192); palette.enable_shadows(); - K051960(config, m_k051960, 0); + K051960(config, m_k051960); m_k051960->set_palette("palette"); m_k051960->set_screen("screen"); m_k051960->set_sprite_callback(FUNC(ultraman_state::sprite_callback)); - K051316(config, m_k051316[0], 0); + K051316(config, m_k051316[0]); m_k051316[0]->set_palette("palette"); m_k051316[0]->set_offsets(8, 0); m_k051316[0]->set_zoom_callback(FUNC(ultraman_state::zoom_callback_1)); - K051316(config, m_k051316[1], 0); + K051316(config, m_k051316[1]); m_k051316[1]->set_palette("palette"); m_k051316[1]->set_offsets(8, 0); m_k051316[1]->set_zoom_callback(FUNC(ultraman_state::zoom_callback_2)); - K051316(config, m_k051316[2], 0); + K051316(config, m_k051316[2]); m_k051316[2]->set_palette("palette"); m_k051316[2]->set_offsets(8, 0); m_k051316[2]->set_zoom_callback(FUNC(ultraman_state::zoom_callback_3)); @@ -229,9 +229,9 @@ void ultraman_state::ultraman(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM2151(config, "ymsnd", 24000000/6).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); + YM2151(config, "ymsnd", XTAL::u(24000000)/6).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50); } diff --git a/src/mame/konami/ultrsprt.cpp b/src/mame/konami/ultrsprt.cpp index 84a64bd5bb6..789cf8fe24d 100644 --- a/src/mame/konami/ultrsprt.cpp +++ b/src/mame/konami/ultrsprt.cpp @@ -246,11 +246,11 @@ void ultrsprt_state::machine_reset() void ultrsprt_state::ultrsprt(machine_config &config) { // basic machine hardware - PPC403GA(config, m_maincpu, 25000000); + PPC403GA(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ultrsprt_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(ultrsprt_state::irq1_line_assert)); - M68000(config, m_audiocpu, 8000000); // Unconfirmed + M68000(config, m_audiocpu, XTAL::u(8000000)); // Unconfirmed m_audiocpu->set_addrmap(AS_PROGRAM, &ultrsprt_state::sound_map); EEPROM_93C46_16BIT(config, "eeprom"); diff --git a/src/mame/konami/vendetta.cpp b/src/mame/konami/vendetta.cpp index 3da014c22a8..8cfe9ca1d77 100644 --- a/src/mame/konami/vendetta.cpp +++ b/src/mame/konami/vendetta.cpp @@ -619,17 +619,17 @@ void vendetta_state::vendetta(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); m_palette->enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_tile_callback(FUNC(vendetta_state::vendetta_tile_callback)); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(vendetta_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, 53, 6); m_k053246->set_palette(m_palette); - K053251(config, m_k053251, 0); - K054000(config, m_k054000, 0); + K053251(config, m_k053251); + K054000(config, m_k054000); // sound hardware SPEAKER(config, "lspeaker").front_left(); @@ -656,13 +656,13 @@ void vendetta_state::esckids(machine_config &config) config.device_remove("k054000"); config.device_remove("k052109"); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette(m_palette); m_k052109->set_tile_callback(FUNC(vendetta_state::esckids_tile_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, 101, 6); - K053252(config, "k053252", 6000000).set_offsets(12*8, 1*8); + K053252(config, "k053252", XTAL::u(6000000)).set_offsets(12*8, 1*8); } diff --git a/src/mame/konami/viper.cpp b/src/mame/konami/viper.cpp index bcd9ce466be..0b58b022165 100644 --- a/src/mame/konami/viper.cpp +++ b/src/mame/konami/viper.cpp @@ -2672,12 +2672,12 @@ void viper_state::machine_reset() void viper_state::viper(machine_config &config) { /* basic machine hardware */ - MPC8240(config, m_maincpu, 166666666); // Unknown + MPC8240(config, m_maincpu, XTAL::u(166666666)); // Unknown m_maincpu->set_bus_frequency(100000000); m_maincpu->set_addrmap(AS_PROGRAM, &viper_state::viper_map); m_maincpu->set_vblank_int("screen", FUNC(viper_state::viper_vblank)); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device( 0, FUNC(viper_state::mpc8240_pci_r), FUNC(viper_state::mpc8240_pci_w)); pcibus.set_device(12, FUNC(viper_state::voodoo3_pci_r), FUNC(viper_state::voodoo3_pci_w)); @@ -2701,7 +2701,7 @@ void viper_state::viper(machine_config &config) PALETTE(config, "palette").set_entries(65536); - TIMER(config, "ds2430_timer2", 0); + TIMER(config, "ds2430_timer2"); //TIMER(config, "ds2430_timer2").configure_generic(timer_device::expired_delegate()); /* sound hardware */ @@ -2710,7 +2710,7 @@ void viper_state::viper(machine_config &config) DMADAC(config, "dacl").add_route(ALL_OUTPUTS, "lspeaker", 1.0); DMADAC(config, "dacr").add_route(ALL_OUTPUTS, "rspeaker", 1.0); - M48T58(config, "m48t58", 0); + M48T58(config, "m48t58"); // Each IRQ3 will update the data buffers with 256 samples, and the playback rate is always 44100hz. // The frequency is picked such that the DMADAC buffer should never overflow or underflow. @@ -2734,7 +2734,7 @@ void viper_state::viper_omz(machine_config &config) { viper(config); - upd784031_device &omz3dcpu(UPD784031(config, "omz3dcpu", 12000000)); + upd784031_device &omz3dcpu(UPD784031(config, "omz3dcpu", XTAL::u(12000000))); omz3dcpu.set_addrmap(AS_PROGRAM, &viper_state::omz3d_map); } diff --git a/src/mame/konami/wecleman.cpp b/src/mame/konami/wecleman.cpp index 3bf8802e06a..9b7dab0b7e5 100644 --- a/src/mame/konami/wecleman.cpp +++ b/src/mame/konami/wecleman.cpp @@ -1042,20 +1042,20 @@ void wecleman_state::machine_start() void wecleman_state::wecleman(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); /* Schems show 10MHz */ + M68000(config, m_maincpu, XTAL::u(10000000)); /* Schems show 10MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &wecleman_state::wecleman_map); TIMER(config, "scantimer").configure_scanline(FUNC(wecleman_state::wecleman_scanline), "screen", 0, 1); - M68000(config, m_subcpu, 10000000); /* Schems show 10MHz */ + M68000(config, m_subcpu, XTAL::u(10000000)); /* Schems show 10MHz */ m_subcpu->set_addrmap(AS_PROGRAM, &wecleman_state::wecleman_sub_map); /* Schems: can be reset, no nmi, soundlatch, 3.58MHz */ - Z80(config, m_audiocpu, 3579545); + Z80(config, m_audiocpu, XTAL::u(3579545)); m_audiocpu->set_addrmap(AS_PROGRAM, &wecleman_state::wecleman_sound_map); config.set_maximum_quantum(attotime::from_hz(6000)); - adc0804_device &adc(ADC0804(config, "adc", 640000)); // unknown "ADCCLK" (generated on video board?) + adc0804_device &adc(ADC0804(config, "adc", XTAL::u(640000))); // unknown "ADCCLK" (generated on video board?) adc.vin_callback().set(FUNC(wecleman_state::selected_ip_r)); KONAMI_007452_MATH(config, "k007452"); @@ -1078,9 +1078,9 @@ void wecleman_state::wecleman(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - YM2151(config, "ymsnd", 3579545).add_route(0, "lspeaker", 0.85).add_route(1, "rspeaker", 0.85); + YM2151(config, "ymsnd", XTAL::u(3579545)).add_route(0, "lspeaker", 0.85).add_route(1, "rspeaker", 0.85); - K007232(config, m_k007232[0], 3579545); + K007232(config, m_k007232[0], XTAL::u(3579545)); m_k007232[0]->port_write().set(FUNC(wecleman_state::wecleman_volume_callback)); m_k007232[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.20); m_k007232[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.20); @@ -1113,20 +1113,20 @@ void hotchase_state::machine_reset() void hotchase_state::hotchase(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); /* 10 MHz - PCB is drawn in one set's readme */ + M68000(config, m_maincpu, XTAL::u(10000000)); /* 10 MHz - PCB is drawn in one set's readme */ m_maincpu->set_addrmap(AS_PROGRAM, &hotchase_state::hotchase_map); TIMER(config, "scantimer").configure_scanline(FUNC(hotchase_state::hotchase_scanline), "screen", 0, 1); - M68000(config, m_subcpu, 10000000); /* 10 MHz - PCB is drawn in one set's readme */ + M68000(config, m_subcpu, XTAL::u(10000000)); /* 10 MHz - PCB is drawn in one set's readme */ m_subcpu->set_addrmap(AS_PROGRAM, &hotchase_state::hotchase_sub_map); - MC6809E(config, m_audiocpu, 3579545 / 2); /* 3.579/2 MHz - PCB is drawn in one set's readme */ + MC6809E(config, m_audiocpu, XTAL::u(3579545) / 2); /* 3.579/2 MHz - PCB is drawn in one set's readme */ m_audiocpu->set_addrmap(AS_PROGRAM, &hotchase_state::hotchase_sound_map); m_audiocpu->set_periodic_int(FUNC(hotchase_state::hotchase_sound_timer), attotime::from_hz(496)); config.set_maximum_quantum(attotime::from_hz(6000)); - adc0804_device &adc(ADC0804(config, "adc", 640000)); // unknown clock (generated on video board?) + adc0804_device &adc(ADC0804(config, "adc", XTAL::u(640000))); // unknown clock (generated on video board?) adc.vin_callback().set(FUNC(hotchase_state::selected_ip_r)); /* video hardware */ @@ -1141,13 +1141,13 @@ void hotchase_state::hotchase(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_hotchase); PALETTE(config, m_palette).set_entries(8192); - K051316(config, m_k051316[0], 0); + K051316(config, m_k051316[0]); m_k051316[0]->set_palette(m_palette); m_k051316[0]->set_offsets(-0xb0 / 2, -16); m_k051316[0]->set_wrap(1); m_k051316[0]->set_zoom_callback(FUNC(hotchase_state::hotchase_zoom_callback_1)); - K051316(config, m_k051316[1], 0); + K051316(config, m_k051316[1]); m_k051316[1]->set_palette(m_palette); m_k051316[1]->set_offsets(-0xb0 / 2, -16); m_k051316[1]->set_zoom_callback(FUNC(hotchase_state::hotchase_zoom_callback_2)); @@ -1158,17 +1158,17 @@ void hotchase_state::hotchase(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - K007232(config, m_k007232[0], 3579545); + K007232(config, m_k007232[0], XTAL::u(3579545)); // SLEV not used, volume control is elsewhere m_k007232[0]->add_route(0, "lspeaker", 0.20); m_k007232[0]->add_route(1, "rspeaker", 0.20); - K007232(config, m_k007232[1], 3579545); + K007232(config, m_k007232[1], XTAL::u(3579545)); // SLEV not used, volume control is elsewhere m_k007232[1]->add_route(0, "lspeaker", 0.20); m_k007232[1]->add_route(1, "rspeaker", 0.20); - K007232(config, m_k007232[2], 3579545); + K007232(config, m_k007232[2], XTAL::u(3579545)); // SLEV not used, volume control is elsewhere m_k007232[2]->add_route(0, "lspeaker", 0.20); m_k007232[2]->add_route(1, "rspeaker", 0.20); diff --git a/src/mame/konami/xexex.cpp b/src/mame/konami/xexex.cpp index 120e5bd75c4..188b2175d78 100644 --- a/src/mame/konami/xexex.cpp +++ b/src/mame/konami/xexex.cpp @@ -499,23 +499,23 @@ void xexex_state::xexex(machine_config &config) m_palette->enable_shadows(); m_palette->enable_hilights(); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(xexex_state::tile_callback)); m_k056832->set_config(K056832_BPP_4, 1, 0); m_k056832->set_palette(m_palette); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(xexex_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, -48, 32); m_k053246->set_palette(m_palette); - K053250(config, m_k053250, 0, m_palette, m_screen, -5, -16); + K053250(config, m_k053250, m_palette, m_screen, -5, -16); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); K053252(config, m_k053252, XTAL(32'000'000)/4); - K054338(config, m_k054338, 0); + K054338(config, m_k054338); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/konami/xmen.cpp b/src/mame/konami/xmen.cpp index b183fe1edd7..c96207d2427 100644 --- a/src/mame/konami/xmen.cpp +++ b/src/mame/konami/xmen.cpp @@ -663,7 +663,7 @@ void xmen_state::bootleg_sound_hardware(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - okim6295_device &oki(OKIM6295(config, "oki", 1'000'000, okim6295_device::PIN7_HIGH)); // clock and pin7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1'000'000), okim6295_device::PIN7_HIGH)); // clock and pin7 not verified oki.set_addrmap(0, &xmen_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -691,17 +691,17 @@ void xmen_state::base(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048).enable_shadows(); - K052109(config, m_k052109, 0); + K052109(config, m_k052109); m_k052109->set_palette("palette"); m_k052109->set_screen(nullptr); m_k052109->set_tile_callback(FUNC(xmen_state::tile_callback)); - K053246(config, m_k053246, 0); + K053246(config, m_k053246); m_k053246->set_sprite_callback(FUNC(xmen_state::sprite_callback)); m_k053246->set_config(NORMAL_PLANE_ORDER, 53, -2); m_k053246->set_palette("palette"); - K053251(config, m_k053251, 0); + K053251(config, m_k053251); } void xmen_state::xmen(machine_config &config) diff --git a/src/mame/konami/yiear.cpp b/src/mame/konami/yiear.cpp index df2a11270f9..d4297299ab7 100644 --- a/src/mame/konami/yiear.cpp +++ b/src/mame/konami/yiear.cpp @@ -509,7 +509,7 @@ void yiear_state::yiear(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - TRACKFLD_AUDIO(config, m_audio, 0, finder_base::DUMMY_TAG, m_vlm); + TRACKFLD_AUDIO(config, m_audio, finder_base::DUMMY_TAG, m_vlm); SN76489A(config, m_sn, XTAL(18'432'000)/12).add_route(ALL_OUTPUTS, "mono", 1.0); // verified on PCB diff --git a/src/mame/konami/zr107.cpp b/src/mame/konami/zr107.cpp index 4349bbabc1f..50dc1ae32ea 100644 --- a/src/mame/konami/zr107.cpp +++ b/src/mame/konami/zr107.cpp @@ -766,9 +766,9 @@ void zr107_state::zr107(machine_config &config) PALETTE(config, m_palette).set_entries(65536); - K001005(config, m_k001005, 0, m_k001006_1); + K001005(config, m_k001005, m_k001006_1); - K001006(config, m_k001006_1, 0); + K001006(config, m_k001006_1); m_k001006_1->set_gfx_region("textures"); K056800(config, m_k056800, XTAL(18'432'000)); @@ -791,7 +791,7 @@ void zr107_state::zr107(machine_config &config) adc0838_device &adc(ADC0838(config, "adc0838")); adc.set_input_callback(FUNC(zr107_state::adc0838_callback)); - KONPPC(config, m_konppc, 0); + KONPPC(config, m_konppc); m_konppc->set_num_boards(1); m_konppc->set_cbboard_type(konppc_device::CGBOARD_TYPE_ZR107); } @@ -806,7 +806,7 @@ void midnrun_state::midnrun(machine_config &config) // video hardware m_screen->set_screen_update(FUNC(midnrun_state::screen_update)); - K056832(config, m_k056832, 0); + K056832(config, m_k056832); m_k056832->set_tile_callback(FUNC(midnrun_state::tile_callback)); m_k056832->set_config(K056832_BPP_8, 1, 0); m_k056832->set_palette(m_palette); @@ -824,12 +824,12 @@ void jetwave_state::jetwave(machine_config &config) m_screen->set_visarea(40, 511 + 40, 27, 383 + 27); // needs CRTC emulation m_screen->set_screen_update(FUNC(jetwave_state::screen_update)); - K001604(config, m_k001604, 0); + K001604(config, m_k001604); m_k001604->set_palette(m_palette); // The second K001006 chip connects to the second K001005 chip. // Hook this up when the K001005 separation is understood (seems the load balancing is done on hardware). - K001006(config, m_k001006_2, 0); + K001006(config, m_k001006_2); m_k001006_2->set_gfx_region("textures"); m_konppc->set_cbboard_type(konppc_device::CGBOARD_TYPE_GTICLUB); diff --git a/src/mame/konami/zs01.cpp b/src/mame/konami/zs01.cpp index 0f5210d5ef6..03e5b2d7ef7 100644 --- a/src/mame/konami/zs01.cpp +++ b/src/mame/konami/zs01.cpp @@ -34,7 +34,7 @@ inline void ATTR_PRINTF( 3, 4 ) zs01_device::verboselog( int n_level, const char // device type definition DEFINE_DEVICE_TYPE(ZS01, zs01_device, "zs01", "Konami ZS01 PIC") -zs01_device::zs01_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : +zs01_device::zs01_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, ZS01, tag, owner, clock), device_nvram_interface(mconfig, *this), m_ds2401(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/konami/zs01.h b/src/mame/konami/zs01.h index 5c8645d12f3..9f33cd7fd46 100644 --- a/src/mame/konami/zs01.h +++ b/src/mame/konami/zs01.h @@ -19,12 +19,7 @@ class zs01_device : public device_t, { public: // construction/destruction - zs01_device( const machine_config &mconfig, const char *tag, device_t *owner) - : zs01_device(mconfig, tag, owner, uint32_t(0)) - { - } - - zs01_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ); + zs01_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers template void set_ds2401_tag( T &&tag ) { m_ds2401.set_tag(std::forward(tag)); } diff --git a/src/mame/kontron/kdt6.cpp b/src/mame/kontron/kdt6.cpp index 0bb23cb71be..eb5edfd2917 100644 --- a/src/mame/kontron/kdt6.cpp +++ b/src/mame/kontron/kdt6.cpp @@ -579,7 +579,7 @@ void kdt6_state::machine_start() m_cpu->space(AS_PROGRAM).install_read_handler(0x0000, 0x0fff, read8sm_delegate(*this, FUNC(kdt6_state::page0_r))); m_cpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x1fff, read8sm_delegate(*this, FUNC(kdt6_state::page1_r))); - m_fdc->set_rate(250000); + m_fdc->set_rate(XTAL::u(250000)); if (m_floppy[0]->get_device()) m_floppy[0]->get_device()->setup_led_cb(floppy_image_device::led_cb(&kdt6_state::drive0_led_cb, this)); @@ -644,7 +644,7 @@ void kdt6_state::psi98(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1000); // frequency unknown + BEEP(config, m_beeper, XTAL::u(1000)); // frequency unknown m_beeper->add_route(ALL_OUTPUTS, "mono", 0.50); SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); @@ -714,7 +714,7 @@ void kdt6_state::psi98(machine_config &config) UPD1990A(config, m_rtc); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set("ctc1", FUNC(z80ctc_device::trg0)); m_fdc->drq_wr_callback().set(FUNC(kdt6_state::fdc_drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", kdt6_floppies, "fd55f", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/korg/korgds8.cpp b/src/mame/korg/korgds8.cpp index 0bd438ab6cf..480b6e5efc6 100644 --- a/src/mame/korg/korgds8.cpp +++ b/src/mame/korg/korgds8.cpp @@ -227,7 +227,7 @@ void korg_ds8_state::ds8(machine_config &config) PALETTE(config, "palette", FUNC(korg_ds8_state::palette_init_ds8), 2); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(HD44780(config, "lcdc")); lcdc.set_lcd_size(2, 40); lcdc.set_pixel_update_cb(FUNC(korg_ds8_state::lcd_pixel_update)); diff --git a/src/mame/korg/korgdss1.cpp b/src/mame/korg/korgdss1.cpp index 941a9697085..5aa9f23b54f 100644 --- a/src/mame/korg/korgdss1.cpp +++ b/src/mame/korg/korgdss1.cpp @@ -465,7 +465,7 @@ void korg_dss1_state::klm780(machine_config &config) PALETTE(config, "palette", FUNC(korg_dss1_state::palette_init_dss1), 2); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 20); m_lcdc->set_pixel_update_cb(FUNC(korg_dss1_state::lcd_pixel_update)); } diff --git a/src/mame/korg/korgm1.cpp b/src/mame/korg/korgm1.cpp index 554b90e4c1e..46f0c7cd644 100644 --- a/src/mame/korg/korgm1.cpp +++ b/src/mame/korg/korgm1.cpp @@ -220,7 +220,7 @@ void korgm1_state::korgm1(machine_config &config) PALETTE(config, "palette", FUNC(korgm1_state::palette_init_korgm1), 2); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 40); m_lcdc->set_pixel_update_cb(FUNC(korgm1_state::lcd_pixel_update)); diff --git a/src/mame/korg/korgz3.cpp b/src/mame/korg/korgz3.cpp index ed320dd709d..cf6afd9db78 100644 --- a/src/mame/korg/korgz3.cpp +++ b/src/mame/korg/korgz3.cpp @@ -109,7 +109,7 @@ void korgz3_state::korgz3(machine_config &config) { // All clocks unknown - V30(config, m_maincpu, 8'000'000); // D70116C-8 + V30(config, m_maincpu, XTAL::u(8'000'000)); // D70116C-8 m_maincpu->set_addrmap(AS_PROGRAM, &korgz3_state::main_map); m_maincpu->set_addrmap(AS_IO, &korgz3_state::io_map); m_maincpu->set_irq_acknowledge_callback("pic", FUNC(pic8259_device::inta_cb)); @@ -117,7 +117,7 @@ void korgz3_state::korgz3(machine_config &config) pic8259_device &pic(PIC8259(config, "pic")); // not visible on PCB; part of MB603112 ASIC? pic.out_int_callback().set_inputline(m_maincpu, 0); - HD6303Y(config, m_synthcpu, 12'000'000); // HD63C03YP + HD6303Y(config, m_synthcpu, XTAL::u(12'000'000)); // HD63C03YP m_synthcpu->set_addrmap(AS_PROGRAM, &korgz3_state::synth_map); m_synthcpu->out_p5_cb().set(FUNC(korgz3_state::p5_w)); m_synthcpu->in_p6_cb().set(FUNC(korgz3_state::adc_port_r)); @@ -125,12 +125,12 @@ void korgz3_state::korgz3(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // D43256AC-12LL + battery - M58990(config, m_adc, 1'000'000); // M58990P-1 + M58990(config, m_adc, XTAL::u(1'000'000)); // M58990P-1 SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ym2414_device &ymsnd(YM2414(config, "ymsnd", 3'579'545)); // YM2414B + ym2414_device &ymsnd(YM2414(config, "ymsnd", XTAL::u(3'579'545))); // YM2414B ymsnd.add_route(0, "lspeaker", 0.60); ymsnd.add_route(1, "rspeaker", 0.60); } diff --git a/src/mame/kyber/kminus.cpp b/src/mame/kyber/kminus.cpp index e35a261d83d..a1cca844387 100644 --- a/src/mame/kyber/kminus.cpp +++ b/src/mame/kyber/kminus.cpp @@ -299,7 +299,7 @@ void kminus_state::kminus(machine_config &config) rs232_port_device &rs232b(RS232_PORT(config, "serial", default_rs232_devices, nullptr)); rs232b.rxd_handler().set("dart", FUNC(z80dart_device::rxb_w)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(kminus_state::kbd_put)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/leapfrog/leapfrog_iquest.cpp b/src/mame/leapfrog/leapfrog_iquest.cpp index 006b28901e5..5a4979f3ae2 100644 --- a/src/mame/leapfrog/leapfrog_iquest.cpp +++ b/src/mame/leapfrog/leapfrog_iquest.cpp @@ -598,8 +598,8 @@ void leapfrog_iquest_state::port3_w(u8 data) void leapfrog_iquest_state::leapfrog_base(machine_config &config) { // seems to have an IRQ vector at 002b, which would suggest it's an 8052 or similar, rather than plain 8031? - //I8052(config, m_maincpu, 96000000/10); // unknown clock - I8032(config, m_maincpu, 96000000/10); // unknown clock + //I8052(config, m_maincpu, XTAL::u(96000000)/10); // unknown clock + I8032(config, m_maincpu, XTAL::u(96000000)/10); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &leapfrog_iquest_state::prog_map); m_maincpu->set_addrmap(AS_IO, &leapfrog_iquest_state::ext_map); m_maincpu->serial_tx_cb().set(FUNC(leapfrog_iquest_state::tx)); diff --git a/src/mame/leapfrog/leapfrog_leappad.cpp b/src/mame/leapfrog/leapfrog_leappad.cpp index 8ab7a43bfeb..465b2395647 100644 --- a/src/mame/leapfrog/leapfrog_leappad.cpp +++ b/src/mame/leapfrog/leapfrog_leappad.cpp @@ -148,7 +148,7 @@ INPUT_PORTS_END void leapfrog_leappad_state::leapfrog_leappad(machine_config &config) { - I8032(config, m_maincpu, 96000000/10); // LeapPad Leapfrog 05-9-01 FS80A363 (which exact type is it?) + I8032(config, m_maincpu, XTAL::u(96000000)/10); // LeapPad Leapfrog 05-9-01 FS80A363 (which exact type is it?) m_maincpu->set_addrmap(AS_PROGRAM, &leapfrog_leappad_state::prog_map); m_maincpu->set_addrmap(AS_IO, &leapfrog_leappad_state::ext_map); @@ -163,7 +163,7 @@ void leapfrog_leappad_state::leapfrog_leappad(machine_config &config) void leapfrog_leappad_state::leapfrog_mfleappad(machine_config &config) { - I8032(config, m_maincpu, 96000000/10); // LeapPad Leapfrog 05-9-01 FS80A363 (which exact type is it?) + I8032(config, m_maincpu, XTAL::u(96000000)/10); // LeapPad Leapfrog 05-9-01 FS80A363 (which exact type is it?) m_maincpu->set_addrmap(AS_PROGRAM, &leapfrog_leappad_state::prog_map); m_maincpu->set_addrmap(AS_IO, &leapfrog_leappad_state::ext_map); @@ -178,7 +178,7 @@ void leapfrog_leappad_state::leapfrog_mfleappad(machine_config &config) void leapfrog_leappad_state::leapfrog_ltleappad(machine_config &config) { - I8032(config, m_maincpu, 96000000/10); // (which exact type is it?) + I8032(config, m_maincpu, XTAL::u(96000000)/10); // (which exact type is it?) m_maincpu->set_addrmap(AS_PROGRAM, &leapfrog_leappad_state::prog_map); m_maincpu->set_addrmap(AS_IO, &leapfrog_leappad_state::ext_map); diff --git a/src/mame/leapfrog/leapfrog_leapster_explorer.cpp b/src/mame/leapfrog/leapfrog_leapster_explorer.cpp index 774b60a728a..a2a8a4ecf11 100644 --- a/src/mame/leapfrog/leapfrog_leapster_explorer.cpp +++ b/src/mame/leapfrog/leapfrog_leapster_explorer.cpp @@ -81,7 +81,7 @@ INPUT_PORTS_END void leapfrog_leapster_explorer_state::leapfrog_leapster_explorer(machine_config& config) { - ARM9(config, m_maincpu, 393000000); // unknown ARM9 type + ARM9(config, m_maincpu, XTAL::u(393000000)); // unknown ARM9 type SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); diff --git a/src/mame/leapfrog/leapster.cpp b/src/mame/leapfrog/leapster.cpp index 44070693795..8de9a2c6099 100644 --- a/src/mame/leapfrog/leapster.cpp +++ b/src/mame/leapfrog/leapster.cpp @@ -286,7 +286,7 @@ void leapster_state::leapster(machine_config &config) { // Basic machine hardware // CPU is ArcTangent-A5 '5.1' (ARCompact core) - ARCA5(config, m_maincpu, 96000000/10); + ARCA5(config, m_maincpu, XTAL::u(96000000)/10); m_maincpu->set_addrmap(AS_PROGRAM, &leapster_state::leapster_map); m_maincpu->set_addrmap(AS_IO, &leapster_state::leapster_aux); diff --git a/src/mame/lsi/m3.cpp b/src/mame/lsi/m3.cpp index 33f094e80b5..0bf1af94e13 100644 --- a/src/mame/lsi/m3.cpp +++ b/src/mame/lsi/m3.cpp @@ -587,7 +587,7 @@ void m3_state::m3(machine_config &config) m_maincpu->set_addrmap(AS_IO, &m3_state::io_map); m_maincpu->set_daisy_config(daisy_chain); - Z80CTC(config, m_ctc, 0); // unknown clock + Z80CTC(config, m_ctc); // unknown clock m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_ctc->set_clk<0>(4.9152_MHz_XTAL / 4); m_ctc->zc_callback<0>().set("usart", FUNC(i8251_device::write_txc)); @@ -599,7 +599,7 @@ void m3_state::m3(machine_config &config) m_ppi[1]->out_pa_callback().set(FUNC(m3_state::ppi2_pa_w)); m_ppi[1]->in_pb_callback().set(FUNC(m3_state::ppi2_pb_r)); - i8251_device &usart(I8251(config, "usart", 0)); // unknown clock + i8251_device &usart(I8251(config, "usart")); // unknown clock usart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); usart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); usart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); @@ -612,14 +612,14 @@ void m3_state::m3(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER, rgb_t::green())); - screen.set_raw(21'840'000 / 2, 707, 0, 560, 309, 0, 240); // unknown clock, hand-tuned to ~50 fps + screen.set_raw(XTAL::u(21'840'000) / 2, 707, 0, 560, 309, 0, 240); // unknown clock, hand-tuned to ~50 fps screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); GFXDECODE(config, "gfxdecode", m_palette, chars); PALETTE(config, m_palette, palette_device::MONOCHROME); - mc6845_device &crtc(MC6845(config, "crtc", 21'840'000 / 2 / 7)); // unknown clock + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(21'840'000) / 2 / 7)); // unknown clock crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(7); diff --git a/src/mame/lsi/octo_kbd.cpp b/src/mame/lsi/octo_kbd.cpp index 16fed619365..ce70d2fe09f 100644 --- a/src/mame/lsi/octo_kbd.cpp +++ b/src/mame/lsi/octo_kbd.cpp @@ -6,8 +6,8 @@ #include "machine/keyboard.ipp" -octopus_keyboard_device::octopus_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) - : buffered_rs232_device(mconfig, OCTOPUS_KEYBOARD, tag, owner, 0) +octopus_keyboard_device::octopus_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) + : buffered_rs232_device(mconfig, OCTOPUS_KEYBOARD, tag, owner) , device_matrix_keyboard_interface(mconfig, *this, "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8", "LINE9", "LINEA", "LINEB", "LINEC", "LINED", "LINEE", "LINEF") { } @@ -231,8 +231,8 @@ void octopus_keyboard_device::device_reset() buffered_rs232_device::device_reset(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(1200); - set_tra_rate(9600); + set_rcv_rate(XTAL::u(1200)); + set_tra_rate(XTAL::u(9600)); receive_register_reset(); transmit_register_reset(); diff --git a/src/mame/lsi/octo_kbd.h b/src/mame/lsi/octo_kbd.h index 4ae05e47a7a..4307a958def 100644 --- a/src/mame/lsi/octo_kbd.h +++ b/src/mame/lsi/octo_kbd.h @@ -11,7 +11,7 @@ class octopus_keyboard_device : public buffered_rs232_device<16U>, protected device_matrix_keyboard_interface<16U> { public: - octopus_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + octopus_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; protected: diff --git a/src/mame/lsi/octopus.cpp b/src/mame/lsi/octopus.cpp index f4a40f893c2..c47f0858fff 100644 --- a/src/mame/lsi/octopus.cpp +++ b/src/mame/lsi/octopus.cpp @@ -929,17 +929,17 @@ void octopus_state::octopus(machine_config &config) m_dma2->out_dack_callback<2>().set(FUNC(octopus_state::dack6_w)); m_dma2->out_dack_callback<3>().set(FUNC(octopus_state::dack7_w)); - PIC8259(config, m_pic1, 0); + PIC8259(config, m_pic1); m_pic1->out_int_callback().set_inputline(m_maincpu, 0); m_pic1->in_sp_callback().set_constant(1); m_pic1->read_slave_ack_callback().set(FUNC(octopus_state::get_slave_ack)); - PIC8259(config, m_pic2, 0); + PIC8259(config, m_pic2); m_pic2->out_int_callback().set(m_pic1, FUNC(pic8259_device::ir7_w)); m_pic2->in_sp_callback().set_constant(0); // RTC (MC146818 via i8255 PPI) - I8255(config, m_ppi, 0); + I8255(config, m_ppi); m_ppi->in_pa_callback().set(FUNC(octopus_state::rtc_r)); m_ppi->in_pb_callback().set(FUNC(octopus_state::cntl_r)); m_ppi->in_pc_callback().set(FUNC(octopus_state::gpo_r)); @@ -951,15 +951,15 @@ void octopus_state::octopus(machine_config &config) m_rtc->irq().set(m_pic2, FUNC(pic8259_device::ir2_w)); // Keyboard UART - I8251(config, m_kb_uart, 0); + I8251(config, m_kb_uart); m_kb_uart->rxrdy_handler().set("pic_slave", FUNC(pic8259_device::ir4_w)); m_kb_uart->dtr_handler().set(FUNC(octopus_state::spk_w)); m_kb_uart->rts_handler().set(FUNC(octopus_state::beep_w)); rs232_port_device &keyboard_port(RS232_PORT(config, "keyboard_port", keyboard, "octopus")); keyboard_port.rxd_handler().set(m_kb_uart, FUNC(i8251_device::write_rxd)); - clock_device &keyboard_clock_rx(CLOCK(config, "keyboard_clock_rx", 9600 * 64)); + clock_device &keyboard_clock_rx(CLOCK(config, "keyboard_clock_rx", XTAL::u(9600 * 64))); keyboard_clock_rx.signal_handler().set(m_kb_uart, FUNC(i8251_device::write_rxc)); - clock_device &keyboard_clock_tx(CLOCK(config, "keyboard_clock_tx", 1200 * 64)); + clock_device &keyboard_clock_tx(CLOCK(config, "keyboard_clock_tx", XTAL::u(1200 * 64))); keyboard_clock_tx.signal_handler().set(m_kb_uart, FUNC(i8251_device::write_txc)); FD1793(config, m_fdc, 16_MHz_XTAL / 8); @@ -969,7 +969,7 @@ void octopus_state::octopus(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:1", octopus_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); SOFTWARE_LIST(config, "fd_list").set_original("octopus"); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(4.9152_MHz_XTAL / 2); // DART channel A m_pit->out_handler<0>().set(FUNC(octopus_state::serial_clock_w)); // being able to write both Rx and Tx clocks at one time would be nice m_pit->set_clk<1>(4.9152_MHz_XTAL / 2); // DART channel B diff --git a/src/mame/luxor/abc1600.cpp b/src/mame/luxor/abc1600.cpp index dd610fba114..a8b05cd433c 100644 --- a/src/mame/luxor/abc1600.cpp +++ b/src/mame/luxor/abc1600.cpp @@ -860,10 +860,10 @@ void abc1600_state::abc1600(machine_config &config) m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &abc1600_state::cpu_space_map); // video hardware - ABC1600_MOVER(config, ABC1600_MOVER_TAG, 0); + ABC1600_MOVER(config, ABC1600_MOVER_TAG); // devices - ABC1600_MAC(config, m_mac, 0); + ABC1600_MAC(config, m_mac); m_mac->set_addrmap(AS_PROGRAM, &abc1600_state::mac_mem); m_mac->fc_cb().set(m_maincpu, FUNC(m68000_base_device::get_fc)); m_mac->buserr_cb().set(FUNC(abc1600_state::buserr_w)); @@ -949,7 +949,7 @@ void abc1600_state::abc1600(machine_config &config) m_cio->pc_rd_cb().set(FUNC(abc1600_state::cio_pc_r)); m_cio->pc_wr_cb().set(FUNC(abc1600_state::cio_pc_w)); - NMC9306(config, m_nvram, 0); + NMC9306(config, m_nvram); E0516(config, E050_C16PC_TAG, 32.768_kHz_XTAL); diff --git a/src/mame/luxor/abc1600_v.cpp b/src/mame/luxor/abc1600_v.cpp index a3fcef6bba6..4ede0fe346e 100644 --- a/src/mame/luxor/abc1600_v.cpp +++ b/src/mame/luxor/abc1600_v.cpp @@ -223,7 +223,7 @@ void abc1600_mover_device::device_add_mconfig(machine_config &config) // abc1600_mover_device - constructor //------------------------------------------------- -abc1600_mover_device::abc1600_mover_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc1600_mover_device::abc1600_mover_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC1600_MOVER, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("vram", ENDIANNESS_BIG, 16, 18, -1, address_map_constructor(FUNC(abc1600_mover_device::mover_map), this)), diff --git a/src/mame/luxor/abc1600_v.h b/src/mame/luxor/abc1600_v.h index b8d60ba0e53..ab96b4a5b37 100644 --- a/src/mame/luxor/abc1600_v.h +++ b/src/mame/luxor/abc1600_v.h @@ -33,7 +33,7 @@ class abc1600_mover_device : public device_t, { public: // construction/destruction - abc1600_mover_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc1600_mover_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void vram_map(address_map &map); virtual void crtc_map(address_map &map); diff --git a/src/mame/luxor/abc1600mac.cpp b/src/mame/luxor/abc1600mac.cpp index b8c66c271ae..29d54fdabc6 100644 --- a/src/mame/luxor/abc1600mac.cpp +++ b/src/mame/luxor/abc1600mac.cpp @@ -93,7 +93,7 @@ const tiny_rom_entry *abc1600_mac_device::device_rom_region() const // abc1600_mac_device - constructor //------------------------------------------------- -abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +abc1600_mac_device::abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC1600_MAC, tag, owner, clock), device_memory_interface(mconfig, *this), m_program_config("program", ENDIANNESS_BIG, 8, 21, 0, address_map_constructor(FUNC(abc1600_mac_device::program_map), this)), diff --git a/src/mame/luxor/abc1600mac.h b/src/mame/luxor/abc1600mac.h index 73b0695a727..f89ee6d36b6 100644 --- a/src/mame/luxor/abc1600mac.h +++ b/src/mame/luxor/abc1600mac.h @@ -33,7 +33,7 @@ class abc1600_mac_device : public device_t, public device_memory_interface { public: - abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc1600_mac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto fc_cb() { return m_read_fc.bind(); } auto buserr_cb() { return m_write_buserr.bind(); } diff --git a/src/mame/luxor/abc80.cpp b/src/mame/luxor/abc80.cpp index c088ed91434..5f7212405ad 100644 --- a/src/mame/luxor/abc80.cpp +++ b/src/mame/luxor/abc80.cpp @@ -533,13 +533,13 @@ void abc80_state::abc80(machine_config &config) m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); m_cassette->set_interface("abc80_cass"); - ABC80_KEYBOARD(config, m_kb, 0); + ABC80_KEYBOARD(config, m_kb); m_kb->keydown_wr_callback().set(FUNC(abc80_state::keydown_w)); ABCBUS_SLOT(config, m_bus, XTAL(11'980'800)/2/2, abc80_cards, "abcexp"); RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG)); keyboard.set_keyboard_callback(FUNC(abc80_state::kbd_w)); QUICKLOAD(config, "quickload", "bac", attotime::from_seconds(2)).set_load_callback(FUNC(abc80_state::quickload_cb)); diff --git a/src/mame/luxor/abc80kb.cpp b/src/mame/luxor/abc80kb.cpp index 80f1117b651..9eb2341e342 100644 --- a/src/mame/luxor/abc80kb.cpp +++ b/src/mame/luxor/abc80kb.cpp @@ -128,7 +128,7 @@ void abc80_keyboard_device::abc80_keyboard_io(address_map &map) void abc80_keyboard_device::device_add_mconfig(machine_config &config) { - I8048(config, m_maincpu, 4000000); + I8048(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_IO, &abc80_keyboard_device::abc80_keyboard_io); m_maincpu->set_disable(); } @@ -161,7 +161,7 @@ ioport_constructor abc80_keyboard_device::device_input_ports() const // abc80_keyboard_device - constructor //------------------------------------------------- -abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ABC80_KEYBOARD, tag, owner, clock) , m_write_keydown(*this) , m_maincpu(*this, I8048_TAG) diff --git a/src/mame/luxor/abc80kb.h b/src/mame/luxor/abc80kb.h index 6e097f61142..ac002b8ae95 100644 --- a/src/mame/luxor/abc80kb.h +++ b/src/mame/luxor/abc80kb.h @@ -29,7 +29,7 @@ class abc80_keyboard_device : public device_t { public: // construction/destruction - abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto keydown_wr_callback() { return m_write_keydown.bind(); } diff --git a/src/mame/luxor/ds90.cpp b/src/mame/luxor/ds90.cpp index 90389d59314..9181c80ef68 100644 --- a/src/mame/luxor/ds90.cpp +++ b/src/mame/luxor/ds90.cpp @@ -114,23 +114,23 @@ void x37_state::floppy_formats(format_registration &fr) void x37_state::x37(machine_config &config) { // basic machine hardware - M68010(config, m_cpu, 20'000'000/2); + M68010(config, m_cpu, XTAL::u(20'000'000)/2); m_cpu->set_addrmap(AS_PROGRAM, &x37_state::program_map); m_cpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &x37_state::cpu_space_map); - NS32081(config, m_fpu, 20'000'000/2); + NS32081(config, m_fpu, XTAL::u(20'000'000)/2); - HD63450(config, m_dmac, 20'000'000/2, m_cpu); + HD63450(config, m_dmac, XTAL::u(20'000'000)/2, m_cpu); - Z8536(config, m_cio, 6000000); - NMC9306(config, m_nvram, 0); - E0516(config, E050_16_TAG, 32'768); + Z8536(config, m_cio, XTAL::u(6000000)); + NMC9306(config, m_nvram); + E0516(config, E050_16_TAG, XTAL::u(32'768)); - SCC8530N(config, m_scc0, 6000000); - SCC8530N(config, m_scc1, 6000000); - SCC8530N(config, m_scc2, 6000000); + SCC8530N(config, m_scc0, XTAL::u(6000000)); + SCC8530N(config, m_scc1, XTAL::u(6000000)); + SCC8530N(config, m_scc2, XTAL::u(6000000)); - FD1797(config, m_fdc, 16'000'000/16); + FD1797(config, m_fdc, XTAL::u(16'000'000)/16); FLOPPY_CONNECTOR(config, FD1797_TAG":0", x37_floppies, nullptr, x37_state::floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, FD1797_TAG":1", x37_floppies, nullptr, x37_state::floppy_formats).enable_sound(true); @@ -142,7 +142,7 @@ void x37_state::x37(machine_config &config) .option_add_internal("scsicb", NSCSI_CB); // video hardware - ABC1600_MOVER(config, ABC1600_MOVER_TAG, 0); + ABC1600_MOVER(config, ABC1600_MOVER_TAG); // software list SOFTWARE_LIST(config, "flop_list").set_original("x37_flop"); diff --git a/src/mame/makerbot/replicator.cpp b/src/mame/makerbot/replicator.cpp index d6d6128985f..ee025308625 100644 --- a/src/mame/makerbot/replicator.cpp +++ b/src/mame/makerbot/replicator.cpp @@ -49,7 +49,7 @@ #define VERBOSE (0) #include "logmacro.h" -#define MASTER_CLOCK 16000000 +#define MASTER_CLOCK XTAL::u(16000000) //Port A bits: //Bit 0 unused @@ -731,12 +731,12 @@ void replicator_state::replicator(machine_config &config) PALETTE(config, "palette", FUNC(replicator_state::palette_init), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_replicator); - HD44780(config, "hd44780", 0).set_lcd_size(4, 20); + HD44780(config, "hd44780").set_lcd_size(4, 20); /* sound hardware */ /* A piezo is connected to the PORT G bit 5 (OC0B pin driven by Timer/Counter #4) */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(0, "speaker", 0.5); + DAC_1BIT(config, m_dac).add_route(0, "speaker", 0.5); } ROM_START( replica1 ) diff --git a/src/mame/matsushita/duet16.cpp b/src/mame/matsushita/duet16.cpp index 12df48118a9..70bc543e4f6 100644 --- a/src/mame/matsushita/duet16.cpp +++ b/src/mame/matsushita/duet16.cpp @@ -369,7 +369,7 @@ void duet16_state::duet16(machine_config &config) I8741A(config, "i8741", 20_MHz_XTAL / 4); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); AM9517A(config, m_dmac, 20_MHz_XTAL / 4); @@ -380,7 +380,7 @@ void duet16_state::duet16(machine_config &config) m_dmac->out_iow_callback<0>().set(m_fdc, FUNC(upd765a_device::dma_w)); m_dmac->out_eop_callback().set(m_fdc, FUNC(upd765a_device::tc_line_w)); - pit8253_device &bgpit(PIT8253(config, "bgpit", 0)); + pit8253_device &bgpit(PIT8253(config, "bgpit")); bgpit.set_clk<0>(8_MHz_XTAL / 13); bgpit.set_clk<1>(8_MHz_XTAL / 13); bgpit.set_clk<2>(8_MHz_XTAL / 13); @@ -392,7 +392,7 @@ void duet16_state::duet16(machine_config &config) bgpit.out_handler<2>().append("kbusart", FUNC(i8251_device::write_rxc)); ptm6840_device &itm(PTM6840(config, "itm", 8_MHz_XTAL / 8)); - itm.set_external_clocks(0.0, 0.0, (8_MHz_XTAL / 8).dvalue()); // C3 = 1MHz + itm.set_external_clocks(XTAL(), XTAL(), 8_MHz_XTAL / 8); // C3 = 1MHz itm.o3_callback().set("itm", FUNC(ptm6840_device::set_c1)); // C1 = C2 = O3 itm.o3_callback().append("itm", FUNC(ptm6840_device::set_c2)); itm.irq_callback().set(m_tmint, FUNC(input_merger_device::in_w<0>)); @@ -420,7 +420,7 @@ void duet16_state::duet16(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:0", duet16_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats, true); FLOPPY_CONNECTOR(config, "fdc:1", duet16_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats, true); - hd6845s_device &crtc(HD6845S(config, "crtc", 2000000)); // "46505S" on schematics + hd6845s_device &crtc(HD6845S(config, "crtc", XTAL::u(2000000))); // "46505S" on schematics crtc.set_char_width(8); crtc.set_update_row_callback(FUNC(duet16_state::crtc_update_row)); diff --git a/src/mame/matsushita/jr100.cpp b/src/mame/matsushita/jr100.cpp index a19c8fe71ab..401dcfd8611 100644 --- a/src/mame/matsushita/jr100.cpp +++ b/src/mame/matsushita/jr100.cpp @@ -411,7 +411,7 @@ void jr100_state::jr100(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - CASSETTE(config, m_cassette, 0); + CASSETTE(config, m_cassette); m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); diff --git a/src/mame/matsushita/jr200.cpp b/src/mame/matsushita/jr200.cpp index 5a17659fbc9..3d63cb35da0 100644 --- a/src/mame/matsushita/jr200.cpp +++ b/src/mame/matsushita/jr200.cpp @@ -346,7 +346,7 @@ void jr200_state::jr200_beep_freq_w(offs_t offset, uint8_t data) if (beep_freq) m_beeper->set_clock(84000 / beep_freq); else - m_beeper->set_clock(0); + m_beeper->set_clock(XTAL::u(0)); } void jr200_state::jr200_border_col_w(uint8_t data) @@ -622,7 +622,7 @@ void jr200_state::jr200(machine_config &config) // All sounds are produced by the MN1271 - BEEP(config, m_beeper, 0).add_route(ALL_OUTPUTS,"mono",0.50); + BEEP(config, m_beeper).add_route(ALL_OUTPUTS,"mono",0.50); } diff --git a/src/mame/matsushita/myb3k.cpp b/src/mame/matsushita/myb3k.cpp index abe48efca6e..394b58140f3 100644 --- a/src/mame/matsushita/myb3k.cpp +++ b/src/mame/matsushita/myb3k.cpp @@ -983,7 +983,7 @@ void myb3k_state::myb3k(machine_config &config) m_crtc->set_update_row_callback(FUNC(myb3k_state::crtc_update_row)); /* ISA8+ Expansion bus */ - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace("maincpu", AS_PROGRAM); m_isabus->set_iospace("maincpu", AS_IO); m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w)); @@ -997,9 +997,9 @@ void myb3k_state::myb3k(machine_config &config) m_isabus->drq2_callback().set("dma", FUNC(i8257_device::dreq2_w)); m_isabus->drq3_callback().set("dma", FUNC(i8257_device::dreq3_w)); - ISA8_SLOT(config, "isa1", 0, m_isabus, stepone_isa_cards, "myb3k_fdc4711", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, m_isabus, stepone_isa_cards, "myb3k_com", false); - ISA8_SLOT(config, "isa3", 0, m_isabus, stepone_isa_cards, nullptr, false); + ISA8_SLOT(config, "isa1", m_isabus, stepone_isa_cards, "myb3k_fdc4711", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", m_isabus, stepone_isa_cards, "myb3k_com", false); + ISA8_SLOT(config, "isa3", m_isabus, stepone_isa_cards, nullptr, false); /* Centronics */ @@ -1017,7 +1017,7 @@ void myb3k_state::myb3k(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); /* Keyboard */ - MYB3K_KEYBOARD(config, m_kb, 0); + MYB3K_KEYBOARD(config, m_kb); m_kb->set_keyboard_callback(FUNC(myb3k_state::kbd_set_data_and_interrupt)); /* Monitor */ diff --git a/src/mame/mattel/chess.cpp b/src/mame/mattel/chess.cpp index 0a805d0ddf0..bf8163e358a 100644 --- a/src/mame/mattel/chess.cpp +++ b/src/mame/mattel/chess.cpp @@ -200,9 +200,9 @@ void mchess_state::mchess(machine_config &config) m_maincpu->p2_in_cb().set(FUNC(mchess_state::lcd_r)); // video hardware - HLCD0569(config, m_lcd[0], 500); // C=0.01uF + HLCD0569(config, m_lcd[0], XTAL::u(500)); // C=0.01uF m_lcd[0]->write_cols().set(FUNC(mchess_state::lcd_output_w<0>)); - HLCD0569(config, m_lcd[1], 500); // C=0.01uF + HLCD0569(config, m_lcd[1], XTAL::u(500)); // C=0.01uF m_lcd[1]->write_cols().set(FUNC(mchess_state::lcd_output_w<1>)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG)); diff --git a/src/mame/mattel/intv.cpp b/src/mame/mattel/intv.cpp index 4953c6468d8..aa87f043915 100644 --- a/src/mame/mattel/intv.cpp +++ b/src/mame/mattel/intv.cpp @@ -492,7 +492,7 @@ void intv_state::intvoice(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &intv_state::intvoice_mem); config.device_remove("cartslot"); - INTV_ROM_VOICE(config, "voice", 0); + INTV_ROM_VOICE(config, "voice"); } void intv_state::intvecs(machine_config &config) @@ -501,9 +501,9 @@ void intv_state::intvecs(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &intv_state::intvecs_mem); config.device_remove("cartslot"); - INTV_ROM_ECS(config, "ecs", 0); + INTV_ROM_ECS(config, "ecs"); - sp0256_device &speech(SP0256(config, "speech", 3120000)); + sp0256_device &speech(SP0256(config, "speech", XTAL::u(3120000))); /* The Intellivoice uses a speaker with its own volume control so the relative volumes to use are subjective */ speech.add_route(ALL_OUTPUTS, "mono", 1.00); diff --git a/src/mame/mattel/juicebox.cpp b/src/mame/mattel/juicebox.cpp index baf3a86e25e..ab780ed1069 100644 --- a/src/mame/mattel/juicebox.cpp +++ b/src/mame/mattel/juicebox.cpp @@ -320,7 +320,7 @@ void juicebox_state::init_juicebox() void juicebox_state::juicebox(machine_config &config) { - ARM7(config, m_maincpu, 66000000); + ARM7(config, m_maincpu, XTAL::u(66000000)); m_maincpu->set_addrmap(AS_PROGRAM, &juicebox_state::juicebox_map); PALETTE(config, "palette").set_entries(32768); @@ -333,15 +333,15 @@ void juicebox_state::juicebox(machine_config &config) screen.set_screen_update("s3c44b0", FUNC(s3c44b0_device::video_update)); SPEAKER(config, "speaker").front_center(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC - S3C44B0(config, m_s3c44b0, 10000000); + S3C44B0(config, m_s3c44b0, XTAL::u(10000000)); m_s3c44b0->set_cpu("maincpu"); m_s3c44b0->gpio_port_r_cb().set(FUNC(juicebox_state::s3c44b0_gpio_port_r)); m_s3c44b0->gpio_port_w_cb().set(FUNC(juicebox_state::s3c44b0_gpio_port_w)); m_s3c44b0->i2s_data_w_cb().set("dac", FUNC(dac_word_interface::data_w)); - SMARTMEDIA(config, m_smartmedia, 0); + SMARTMEDIA(config, m_smartmedia); /* software lists */ SOFTWARE_LIST(config, "cart_list").set_original("juicebox"); diff --git a/src/mame/mattel/stic.cpp b/src/mame/mattel/stic.cpp index 7beff96da82..724c6b24d9f 100644 --- a/src/mame/mattel/stic.cpp +++ b/src/mame/mattel/stic.cpp @@ -385,7 +385,7 @@ DEFINE_DEVICE_TYPE(STIC, stic_device, "stic", "AY-3-8900-1 STIC"); // stic_device - constructor //------------------------------------------------- -stic_device::stic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +stic_device::stic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, STIC, tag, owner, clock), device_video_interface(mconfig, *this), m_grom(*this, "grom"), diff --git a/src/mame/mattel/stic.h b/src/mame/mattel/stic.h index 92aa74bfa59..933eb77471e 100644 --- a/src/mame/mattel/stic.h +++ b/src/mame/mattel/stic.h @@ -61,7 +61,7 @@ public: static constexpr unsigned SCREEN_HEIGHT = (OVERSCAN_TOP_HEIGHT + (BACKTAB_HEIGHT * CARD_HEIGHT) + OVERSCAN_BOTTOM_HEIGHT) * Y_SCALE; // construction/destruction - stic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + stic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~stic_device(); uint16_t read(offs_t offset); diff --git a/src/mame/maygay/maygay1b.cpp b/src/mame/maygay/maygay1b.cpp index 66e1286aa76..429d2ffd6c8 100644 --- a/src/mame/maygay/maygay1b.cpp +++ b/src/mame/maygay/maygay1b.cpp @@ -717,7 +717,7 @@ void maygay1b_state::maygay_m1(machine_config &config) MC6809(config, m_maincpu, M1_MASTER_CLOCK/2); // claimed to be 4 MHz m_maincpu->set_addrmap(AS_PROGRAM, &maygay1b_state::m1_memmap); - I80C51(config, m_mcu, 2000000); // EP840034.A-P-80C51AVW + I80C51(config, m_mcu, XTAL::u(2000000)); // EP840034.A-P-80C51AVW m_mcu->port_in_cb<0>().set(FUNC(maygay1b_state::mcu_port0_r)); m_mcu->port_out_cb<0>().set(FUNC(maygay1b_state::mcu_port0_w)); m_mcu->port_out_cb<1>().set(FUNC(maygay1b_state::mcu_port1_w)); @@ -729,7 +729,7 @@ void maygay1b_state::maygay_m1(machine_config &config) m_duart68681->irq_cb().set(FUNC(maygay1b_state::duart_irq_handler)); m_duart68681->inport_cb().set(FUNC(maygay1b_state::m1_duart_r)); - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.writepa_handler().set(FUNC(maygay1b_state::m1_pia_porta_w)); pia.writepb_handler().set(FUNC(maygay1b_state::m1_pia_portb_w)); @@ -755,7 +755,7 @@ void maygay1b_state::maygay_m1(machine_config &config) ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 1.0); ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 1.0); - OKIM6376(config, m_msm6376, 102400); //? Seems to work well with samples, but unconfirmed + OKIM6376(config, m_msm6376, XTAL::u(102400)); //? Seems to work well with samples, but unconfirmed m_msm6376->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm6376->add_route(ALL_OUTPUTS, "rspeaker", 1.0); @@ -786,7 +786,7 @@ void maygay1b_state::maygay_m1(machine_config &config) REEL(config, m_reels[5], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4); m_reels[5]->optic_handler().set(FUNC(maygay1b_state::reel_optic_cb<5>)); - METERS(config, m_meters, 0).set_number(8); + METERS(config, m_meters).set_number(8); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/maygay/maygayep.cpp b/src/mame/maygay/maygayep.cpp index 83776d9a690..925783fd876 100644 --- a/src/mame/maygay/maygayep.cpp +++ b/src/mame/maygay/maygayep.cpp @@ -107,12 +107,12 @@ void maygayep_state::init_maygayep() void maygayep_state::maygayep(machine_config &config) { - H83002(config, m_maincpu, 16000000); + H83002(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &maygayep_state::maygayep_map); SPEAKER(config, "mono").front_center(); - YMZ280B(config, "ymz", 10000000).add_route(ALL_OUTPUTS, "mono", 1.0); + YMZ280B(config, "ymz", XTAL::u(10000000)).add_route(ALL_OUTPUTS, "mono", 1.0); } #define MISSING_SOUND \ diff --git a/src/mame/maygay/maygayew.cpp b/src/mame/maygay/maygayew.cpp index 7baf9cdeb13..92904bd3323 100644 --- a/src/mame/maygay/maygayew.cpp +++ b/src/mame/maygay/maygayew.cpp @@ -136,7 +136,7 @@ INPUT_PORTS_END void maygayew_state::maygayew(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); // MC68306FC16 - standard 68000 core + peripherals + M68000(config, m_maincpu, XTAL::u(8000000)); // MC68306FC16 - standard 68000 core + peripherals m_maincpu->set_addrmap(AS_PROGRAM, &maygayew_state::maygayew_map); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/maygay/maygayv1.cpp b/src/mame/maygay/maygayv1.cpp index 95240f3bd6b..2bd32fe72f1 100644 --- a/src/mame/maygay/maygayv1.cpp +++ b/src/mame/maygay/maygayv1.cpp @@ -893,7 +893,7 @@ void maygayv1_state::maygayv1(machine_config &config) m_soundcpu->serial_rx_cb().set(FUNC(maygayv1_state::data_to_i8031)); /* U25 ST 2 9148 EF68B21P */ - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.readpa_handler().set(FUNC(maygayv1_state::b_read)); pia.readpb_handler().set(FUNC(maygayv1_state::b_read)); pia.writepa_handler().set(FUNC(maygayv1_state::b_writ)); diff --git a/src/mame/maygay/mmm.cpp b/src/mame/maygay/mmm.cpp index 67b4ff9b14c..ae214117240 100644 --- a/src/mame/maygay/mmm.cpp +++ b/src/mame/maygay/mmm.cpp @@ -183,17 +183,17 @@ static const z80_daisy_config mmm_daisy_chain[] = void mmm_state::mmm(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(2000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &mmm_state::mem_map); m_maincpu->set_addrmap(AS_IO, &mmm_state::io_map); m_maincpu->set_daisy_config(mmm_daisy_chain); - Z80CTC(config, m_ctc, 2000000); + Z80CTC(config, m_ctc, XTAL::u(2000000)); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device& ay(AY8910(config, "aysnd", 1000000)); + ay8910_device& ay(AY8910(config, "aysnd", XTAL::u(1000000))); ay.port_a_write_callback().set(FUNC(mmm_state::ay_porta_w)); ay.add_route(ALL_OUTPUTS, "mono", 0.30); } diff --git a/src/mame/mchester/ssem.cpp b/src/mame/mchester/ssem.cpp index 189ae8a6d63..cb4eb6b23ed 100644 --- a/src/mame/mchester/ssem.cpp +++ b/src/mame/mchester/ssem.cpp @@ -665,7 +665,7 @@ void ssem_state::machine_reset() void ssem_state::ssem(machine_config &config) { /* basic machine hardware */ - SSEMCPU(config, m_maincpu, 700); + SSEMCPU(config, m_maincpu, XTAL::u(700)); m_maincpu->set_addrmap(AS_PROGRAM, &ssem_state::ssem_map); /* video hardware */ diff --git a/src/mame/meadows/lazercmd.cpp b/src/mame/meadows/lazercmd.cpp index b219642508b..8c3e3834668 100644 --- a/src/mame/meadows/lazercmd.cpp +++ b/src/mame/meadows/lazercmd.cpp @@ -651,10 +651,10 @@ void lazercmd_state::lazercmd(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac0, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); - DAC_1BIT(config, m_dac1, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); - DAC_1BIT(config, m_dac2, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); - DAC_1BIT(config, m_dac3, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac1).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac2).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac3).add_route(ALL_OUTPUTS, "speaker", 0.99); } @@ -684,8 +684,8 @@ void lazercmd_state::medlanes(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac2, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); - DAC_1BIT(config, m_dac3, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac2).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac3).add_route(ALL_OUTPUTS, "speaker", 0.99); } @@ -715,8 +715,8 @@ void lazercmd_state::bbonk(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac2, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); - DAC_1BIT(config, m_dac3, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac2).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac3).add_route(ALL_OUTPUTS, "speaker", 0.99); } /*************************************************************************** diff --git a/src/mame/meadows/meadows.cpp b/src/mame/meadows/meadows.cpp index 02fa351a546..6325d152a5e 100644 --- a/src/mame/meadows/meadows.cpp +++ b/src/mame/meadows/meadows.cpp @@ -645,7 +645,7 @@ void meadows_state::meadows(machine_config &config) /* audio hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC SAMPLES(config, m_samples); m_samples->set_channels(2); @@ -703,7 +703,7 @@ void meadows_state::bowl3d(machine_config &config) /* audio hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC SAMPLES(config, m_samples); m_samples->set_channels(2); diff --git a/src/mame/meadows/meadwttl.cpp b/src/mame/meadows/meadwttl.cpp index 8cbac779c3c..c8969e6dbd4 100644 --- a/src/mame/meadows/meadwttl.cpp +++ b/src/mame/meadows/meadwttl.cpp @@ -25,7 +25,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -94,7 +94,7 @@ void meadwttl_state::video_start() void meadwttl_state::meadows(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_meadows); + NETLIST_CPU(config, m_maincpu).set_source(netlist_meadows); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/mera/ec7915.cpp b/src/mame/mera/ec7915.cpp index e2e8de9a3fb..67440cfd3cf 100644 --- a/src/mame/mera/ec7915.cpp +++ b/src/mame/mera/ec7915.cpp @@ -59,15 +59,15 @@ INPUT_PORTS_END void ec7915_state::ec7915(machine_config &config) { - I8080A(config, m_maincpu, 2000000); // КР580ВМ80А (not Z80) + SAB8224P clock generator + I8080A(config, m_maincpu, XTAL::u(2000000)); // КР580ВМ80А (not Z80) + SAB8224P clock generator m_maincpu->set_addrmap(AS_PROGRAM, &ec7915_state::mem_map); m_maincpu->set_addrmap(AS_IO, &ec7915_state::io_map); - //I8214(config, "picu", 2000000); // CEMI UCY74S414 + //I8214(config, "picu", XTAL::u(2000000)); // CEMI UCY74S414 - PIT8253(config, "pit", 0); // КР580ВИ53 + PIT8253(config, "pit"); // КР580ВИ53 - I8251(config, "usart", 2000000); // КР580ВВ51А + I8251(config, "usart", XTAL::u(2000000)); // КР580ВВ51А // 8251 usage appears to prefer synchronous communications // 2x NEC D8255AC-2 on main board + КР580ВВ55А on display board diff --git a/src/mame/mera/konin.cpp b/src/mame/mera/konin.cpp index 37a82cebfd7..a1106f3caed 100644 --- a/src/mame/mera/konin.cpp +++ b/src/mame/mera/konin.cpp @@ -102,7 +102,7 @@ void konin_state::konin(machine_config &config) maincpu.out_inte_func().set(m_picu, FUNC(i8214_device::inte_w)); maincpu.set_irq_acknowledge_callback("intlatch", FUNC(i8212_device::inta_cb)); - i8212_device &intlatch(I8212(config, "intlatch", 0)); + i8212_device &intlatch(I8212(config, "intlatch")); intlatch.md_rd_callback().set_constant(0); intlatch.di_rd_callback().set(m_picu, FUNC(i8214_device::vector_r)); intlatch.int_wr_callback().set_inputline("maincpu", I8085_INTR_LINE); @@ -110,19 +110,19 @@ void konin_state::konin(machine_config &config) I8214(config, m_picu, XTAL(4'000'000)); m_picu->int_wr_callback().set("intlatch", FUNC(i8212_device::stb_w)); - pit8253_device &mainpit(PIT8253(config, "mainpit", 0)); + pit8253_device &mainpit(PIT8253(config, "mainpit")); // wild guess at UART clock and source mainpit.set_clk<0>(1536000); mainpit.out_handler<0>().set("uart", FUNC(i8251_device::write_txc)); mainpit.out_handler<0>().append("uart", FUNC(i8251_device::write_rxc)); - I8255(config, "mainppi", 0); + I8255(config, "mainppi"); - PIT8253(config, m_iopit, 0); + PIT8253(config, m_iopit); - I8255(config, m_ioppi, 0); + I8255(config, m_ioppi); - i8251_device &uart(I8251(config, "uart", 0)); + i8251_device &uart(I8251(config, "uart")); uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/mera/m79152pc.cpp b/src/mame/mera/m79152pc.cpp index bdd535b525e..6e2570b24a1 100644 --- a/src/mame/mera/m79152pc.cpp +++ b/src/mame/mera/m79152pc.cpp @@ -267,12 +267,12 @@ static const z80_daisy_config daisy_chain[] = void m79152pc_state::m79152pc(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4'000'000); // UA880D + Z80(config, m_maincpu, XTAL::u(4'000'000)); // UA880D m_maincpu->set_addrmap(AS_PROGRAM, &m79152pc_state::mem_map); m_maincpu->set_addrmap(AS_IO, &m79152pc_state::io_map); m_maincpu->set_daisy_config(daisy_chain); - I8035(config, m_mcu, 6'000'000); // NEC D8035HLC + I8035(config, m_mcu, XTAL::u(6'000'000)); // NEC D8035HLC m_mcu->set_addrmap(AS_PROGRAM, &m79152pc_state::mcu_map); m_mcu->set_addrmap(AS_IO, &m79152pc_state::mcu_io_map); m_mcu->t0_in_cb().set(FUNC(m79152pc_state::mcu_t0_r)); @@ -291,7 +291,7 @@ void m79152pc_state::m79152pc(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_m79152pc); PALETTE(config, "palette", palette_device::MONOCHROME); - pit8253_device &pit(PIT8253(config, "pit", 0)); // КР580ВИ53 + pit8253_device &pit(PIT8253(config, "pit")); // КР580ВИ53 pit.set_clk<1>(921600); pit.set_clk<2>(921600); pit.out_handler<1>().set(m_uart, FUNC(z80sio_device::txcb_w)); @@ -316,7 +316,7 @@ void m79152pc_state::m79152pc(machine_config &config) centronics_device &printer(CENTRONICS(config, "printer", centronics_devices, nullptr)); printer.ack_handler().set("ppi", FUNC(i8255_device::pc2_w)); - z80ctc_device &ctc(Z80CTC(config, "ctc", 4'000'000)); + z80ctc_device &ctc(Z80CTC(config, "ctc", XTAL::u(4'000'000))); ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); ctc.set_clk<2>(921600); ctc.zc_callback<2>().set(m_uart, FUNC(z80sio_device::txca_w)); @@ -324,7 +324,7 @@ void m79152pc_state::m79152pc(machine_config &config) // FIXME: Channel A should be the modem channel. Channel B should be a PC keyboard // that outputs XT scancodes, which are then rebroadcast through channel A! - Z80SIO(config, m_uart, 4'000'000); // UB8560D + Z80SIO(config, m_uart, XTAL::u(4'000'000)); // UB8560D m_uart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_uart->out_txda_callback().set("keyboard", FUNC(rs232_port_device::write_txd)); m_uart->out_dtra_callback().set("keyboard", FUNC(rs232_port_device::write_dtr)); @@ -341,7 +341,7 @@ void m79152pc_state::m79152pc(machine_config &config) //modem.cts_handler().set(m_uart, FUNC(z80sio_device::ctsb_w)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 1000); + BEEP(config, m_beep, XTAL::u(1000)); m_beep->add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/mera/vdm7932x.cpp b/src/mame/mera/vdm7932x.cpp index 4ced0d44493..1c273ba68c1 100644 --- a/src/mame/mera/vdm7932x.cpp +++ b/src/mame/mera/vdm7932x.cpp @@ -117,7 +117,7 @@ void vdm7932x_state::vdm7932x(machine_config &config) // all clocks unverified m_subcpu->set_addrmap(AS_PROGRAM, &vdm7932x_state::sub_map); m_subcpu->set_addrmap(AS_IO, &vdm7932x_state::subx_map); - PIT8253(config, "pit", 0); // UM8253-5 + PIT8253(config, "pit"); // UM8253-5 z80ctc_device &ctc(Z80CTC(config, "ctc", 24.0734_MHz_XTAL / 8)); // UA857D ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); diff --git a/src/mame/merit/merit.cpp b/src/mame/merit/merit.cpp index af2c8a456c4..f92d8ebc24c 100644 --- a/src/mame/merit/merit.cpp +++ b/src/mame/merit/merit.cpp @@ -1528,7 +1528,7 @@ void merit_state::mosdraw(machine_config &config) dodge(config); // TODO: hook up RTC and printer - MM58274C(config, "rtc", 0); // actually an MM58174AN, but should be compatible according to other drivers + MM58274C(config, "rtc"); // actually an MM58174AN, but should be compatible according to other drivers } void merit_state::tictac(machine_config &config) diff --git a/src/mame/merit/meritm.cpp b/src/mame/merit/meritm.cpp index 95d1fa3d60a..016992ba4e4 100644 --- a/src/mame/merit/meritm.cpp +++ b/src/mame/merit/meritm.cpp @@ -1129,8 +1129,8 @@ void meritm_state::crt250(machine_config &config) m_v9938[1]->set_vram_size(0x20000); //m_v9938[1]->int_cb().set(FUNC(meritm_state::vdp1_interrupt)); - TIMER(config, "vblank_start", 0).configure_scanline(FUNC(meritm_state::vblank_start_tick), "screen", 259, 262); - TIMER(config, "vblank_end", 0).configure_scanline(FUNC(meritm_state::vblank_end_tick), "screen", 262, 262); + TIMER(config, "vblank_start").configure_scanline(FUNC(meritm_state::vblank_start_tick), "screen", 259, 262); + TIMER(config, "vblank_end").configure_scanline(FUNC(meritm_state::vblank_end_tick), "screen", 262, 262); SCREEN(config, "screen", SCREEN_TYPE_RASTER).set_screen_update(FUNC(meritm_state::screen_update)); @@ -1162,7 +1162,7 @@ void meritm_state::crt250_crt252_crt258(machine_config &config) NS16550(config, m_uart, UART_CLK); m_uart->out_tx_callback().set(m_microtouch, FUNC(microtouch_device::rx)); - MICROTOUCH(config, m_microtouch, 9600).stx().set(m_uart, FUNC(ins8250_uart_device::rx_w)); + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(m_uart, FUNC(ins8250_uart_device::rx_w)); m_microtouch->set_touch_callback(FUNC(meritm_state::touch_coord_transform)); } @@ -1181,7 +1181,7 @@ void meritm_state::crt260(machine_config &config) NS16550(config, m_uart, UART_CLK); m_uart->out_tx_callback().set(m_microtouch, FUNC(microtouch_device::rx)); - MICROTOUCH(config, m_microtouch, 9600).stx().set(m_uart, FUNC(ins8250_uart_device::rx_w)); + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(m_uart, FUNC(ins8250_uart_device::rx_w)); m_microtouch->set_touch_callback(FUNC(meritm_state::touch_coord_transform)); } diff --git a/src/mame/merit/mtouchxl.cpp b/src/mame/merit/mtouchxl.cpp index 7a155c77c51..f359868c9bc 100644 --- a/src/mame/merit/mtouchxl.cpp +++ b/src/mame/merit/mtouchxl.cpp @@ -228,7 +228,7 @@ void mtxl_state::hdd(device_t *device) void mtxl_state::at486(machine_config &config) { - I486DX4(config, m_maincpu, 33000000); + I486DX4(config, m_maincpu, XTAL::u(33000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mtxl_state::at32_map); m_maincpu->set_addrmap(AS_IO, &mtxl_state::at32_io); #ifndef REAL_PCI_CHIPSET @@ -238,16 +238,16 @@ void mtxl_state::at486(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // on board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "ide", true).set_option_machine_config("ide", cdrom); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_dm", true); // original is a gd-5440 + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "ide", true).set_option_machine_config("ide", cdrom); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "svga_dm", true); // original is a gd-5440 ns16550_device &uart(NS16550(config, "ns16550", XTAL(1'843'200))); uart.out_tx_callback().set("microtouch", FUNC(microtouch_device::rx)); uart.out_int_callback().set("mb:pic8259_master", FUNC(pic8259_device::ir4_w)); - MICROTOUCH(config, "microtouch", 9600).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); + MICROTOUCH(config, "microtouch", XTAL::u(9600)).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); - ad1848_device &cs4231(AD1848(config, "cs4231", 0)); + ad1848_device &cs4231(AD1848(config, "cs4231")); cs4231.irq().set("mb:pic8259_master", FUNC(pic8259_device::ir5_w)); cs4231.drq().set("mb:dma8237_1", FUNC(am9517a_device::dreq1_w)); @@ -287,7 +287,7 @@ void mtxl_state::at486(machine_config &config) void mtxl_state::at486hd(machine_config &config) { - I486DX4(config, m_maincpu, 33000000); + I486DX4(config, m_maincpu, XTAL::u(33000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mtxl_state::at32_map); m_maincpu->set_addrmap(AS_IO, &mtxl_state::at32_io); #ifndef REAL_PCI_CHIPSET @@ -297,16 +297,16 @@ void mtxl_state::at486hd(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // on board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "ide", true).set_option_machine_config("ide", hdd); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_dm", true); // original is a gd-5440 + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "ide", true).set_option_machine_config("ide", hdd); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "svga_dm", true); // original is a gd-5440 ns16550_device &uart(NS16550(config, "ns16550", XTAL(1'843'200))); uart.out_tx_callback().set("microtouch", FUNC(microtouch_device::rx)); uart.out_int_callback().set("mb:pic8259_master", FUNC(pic8259_device::ir4_w)); - MICROTOUCH(config, "microtouch", 9600).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); + MICROTOUCH(config, "microtouch", XTAL::u(9600)).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); - ad1848_device &cs4231(AD1848(config, "cs4231", 0)); + ad1848_device &cs4231(AD1848(config, "cs4231")); cs4231.irq().set("mb:pic8259_master", FUNC(pic8259_device::ir5_w)); cs4231.drq().set("mb:dma8237_1", FUNC(am9517a_device::dreq1_w)); diff --git a/src/mame/merit/pubtimed.cpp b/src/mame/merit/pubtimed.cpp index 9b30bf4540b..7c3ad9a0d72 100644 --- a/src/mame/merit/pubtimed.cpp +++ b/src/mame/merit/pubtimed.cpp @@ -48,11 +48,11 @@ INPUT_PORTS_END void pubtimed_state::pubtimed(machine_config &config) { - M6802(config, m_maincpu, 4'000'000); // clock unknown + M6802(config, m_maincpu, XTAL::u(4'000'000)); // clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &pubtimed_state::mem_map); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/metro/hyprduel.cpp b/src/mame/metro/hyprduel.cpp index 7cde490f9ff..d1f4f51b74b 100644 --- a/src/mame/metro/hyprduel.cpp +++ b/src/mame/metro/hyprduel.cpp @@ -436,7 +436,7 @@ void hyprduel_state::hyprduel(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 4000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set_inputline(m_subcpu, 1); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.80); @@ -462,7 +462,7 @@ void hyprduel_state::magerror(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ymsnd", 3579545).add_route(ALL_OUTPUTS, "mono", 1.00); + YM2413(config, "ymsnd", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 1.00); OKIM6295(config, "oki", 4000000/16/16*132, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.57); // clock frequency & pin 7 not verified } diff --git a/src/mame/metro/metro.cpp b/src/mame/metro/metro.cpp index b37dff9c4b0..3de88cd9db3 100644 --- a/src/mame/metro/metro.cpp +++ b/src/mame/metro/metro.cpp @@ -2989,7 +2989,7 @@ void metro_state::daitorid(machine_config &config) ymsnd.irq_handler().set_inputline(m_audiocpu, UPD7810_INTF2); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.80); - OKIM6295(config, m_oki, 1200000, okim6295_device::PIN7_HIGH); // sample rate = M6295 clock / 132 + OKIM6295(config, m_oki, XTAL::u(1200000), okim6295_device::PIN7_HIGH); // sample rate = M6295 clock / 132 m_oki->add_route(ALL_OUTPUTS, "mono", 0.40); } @@ -3154,7 +3154,7 @@ void metro_state::dokyusei(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 0.25); ym2413_device &ymsnd(YM2413(config, m_ymsnd, 3.579545_MHz_XTAL)); @@ -3182,7 +3182,7 @@ void metro_state::dokyusp(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 2112000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(2112000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 0.25); ym2413_device &ymsnd(YM2413(config, m_ymsnd, 3.579545_MHz_XTAL)); @@ -3210,7 +3210,7 @@ void metro_state::gakusai(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 2112000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(2112000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 0.25); ym2413_device &ymsnd(YM2413(config, m_ymsnd, 3.579545_MHz_XTAL)); @@ -3404,7 +3404,7 @@ void metro_state::vmetal(machine_config &config) OKIM6295(config, m_oki, 1_MHz_XTAL, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); - ES8712(config, m_essnd, 0); + ES8712(config, m_essnd); m_essnd->reset_handler().set(FUNC(metro_state::vmetal_es8712_irq)); m_essnd->msm_write_handler().set("msm", FUNC(msm6585_device::data_w)); m_essnd->set_msm_tag("msm"); @@ -3446,7 +3446,7 @@ void metro_state::blzntrnd(machine_config &config) GFXDECODE(config, m_gfxdecode, "vdp2:palette", gfx_blzntrnd); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_offsets(-77, -21); /* sound hardware */ diff --git a/src/mame/metro/tmmjprd.cpp b/src/mame/metro/tmmjprd.cpp index a92250d51cc..c3bde0c3106 100644 --- a/src/mame/metro/tmmjprd.cpp +++ b/src/mame/metro/tmmjprd.cpp @@ -736,7 +736,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(tmmjprd_state::scanline) void tmmjprd_state::tmpdoki(machine_config &config) { - M68EC020(config, m_maincpu, 24000000); /* 24 MHz */ + M68EC020(config, m_maincpu, XTAL::u(24000000)); /* 24 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &tmmjprd_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(tmmjprd_state::scanline), "lscreen", 0, 1); diff --git a/src/mame/microkey/primo.cpp b/src/mame/microkey/primo.cpp index 95bfcc12fe0..365329bc780 100644 --- a/src/mame/microkey/primo.cpp +++ b/src/mame/microkey/primo.cpp @@ -253,7 +253,7 @@ static const cassette_image::Options primo_cassette_options = { void primo_state::primoa32(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); + Z80(config, m_maincpu, XTAL::u(2500000)); m_maincpu->set_addrmap(AS_PROGRAM, &primo_state::primo32_mem); m_maincpu->set_addrmap(AS_IO, &primo_state::primoa_io); diff --git a/src/mame/microsoft/jazz.cpp b/src/mame/microsoft/jazz.cpp index b8afc332667..618a6102527 100644 --- a/src/mame/microsoft/jazz.cpp +++ b/src/mame/microsoft/jazz.cpp @@ -295,7 +295,7 @@ void jazz_state::jazz(machine_config &config) m_vram->set_default_value(0); // local bus dma, timer and interrupt controller - MCT_ADR(config, m_mct_adr, 0); + MCT_ADR(config, m_mct_adr); m_mct_adr->set_addrmap(0, &jazz_state::mct_map); m_mct_adr->out_int_dma_cb().set_inputline(m_cpu, INPUT_LINE_IRQ0); m_mct_adr->out_int_device_cb().set_inputline(m_cpu, INPUT_LINE_IRQ1); @@ -362,7 +362,7 @@ void jazz_state::jazz(machine_config &config) m_kbdc->aux_irq().set(m_mct_adr, FUNC(mct_adr_device::irq<7>)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(78643200, 1280, 0, 1280, 1024, 0, 1024); + m_screen->set_raw(XTAL::u(78643200), 1280, 0, 1280, 1024, 0, 1024); m_screen->set_screen_update(m_cvc, FUNC(g364_device::screen_update)); m_screen->screen_vblank().set(m_mct_adr, FUNC(mct_adr_device::irq<3>)); // maybe? @@ -371,7 +371,7 @@ void jazz_state::jazz(machine_config &config) m_cvc->set_vram(m_vram); // WD16C552 (two 16550 + pc_lpt) - NS16550(config, m_ace[0], 4233600); + NS16550(config, m_ace[0], XTAL::u(4233600)); rs232_port_device &serial0(RS232_PORT(config, "serial0", default_rs232_devices, nullptr)); m_ace[0]->out_dtr_callback().set(serial0, FUNC(rs232_port_device::write_dtr)); @@ -399,7 +399,7 @@ void jazz_state::jazz(machine_config &config) serial1.ri_handler().set(m_ace[1], FUNC(ns16550_device::ri_w)); serial1.rxd_handler().set(m_ace[1], FUNC(ns16550_device::rx_w)); - PC_LPT(config, m_lpt, 0); + PC_LPT(config, m_lpt); m_lpt->irq_handler().set(m_mct_adr, FUNC(mct_adr_device::irq<0>)); // TODO: sound, interrupt 2, drq 2(l) & 3(r) diff --git a/src/mame/microsoft/mct_adr.cpp b/src/mame/microsoft/mct_adr.cpp index 943f512931c..77bc88267cd 100644 --- a/src/mame/microsoft/mct_adr.cpp +++ b/src/mame/microsoft/mct_adr.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(MCT_ADR, mct_adr_device, "mct_adr", "MCT-ADR Address Path Controller") -mct_adr_device::mct_adr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mct_adr_device::mct_adr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MCT_ADR, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_io_config("io", ENDIANNESS_LITTLE, 32, 32, 0) diff --git a/src/mame/microsoft/mct_adr.h b/src/mame/microsoft/mct_adr.h index 4034414a8f7..cb7ac707a41 100644 --- a/src/mame/microsoft/mct_adr.h +++ b/src/mame/microsoft/mct_adr.h @@ -11,7 +11,7 @@ class mct_adr_device , public device_memory_interface { public: - mct_adr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mct_adr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto out_int_dma_cb() { return m_out_int_dma.bind(); } diff --git a/src/mame/microsoft/xbox.cpp b/src/mame/microsoft/xbox.cpp index 68bb27b9b50..330220da36d 100644 --- a/src/mame/microsoft/xbox.cpp +++ b/src/mame/microsoft/xbox.cpp @@ -174,7 +174,7 @@ void xbox_state::xbox(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OHCI_GAME_CONTROLLER(config, "ohci_gamepad", 0); + OHCI_GAME_CONTROLLER(config, "ohci_gamepad"); } diff --git a/src/mame/microterm/ergo201.cpp b/src/mame/microterm/ergo201.cpp index dfe9fe5cb18..26b439dd538 100644 --- a/src/mame/microterm/ergo201.cpp +++ b/src/mame/microterm/ergo201.cpp @@ -153,7 +153,7 @@ void ergo201_state::ergo201(machine_config &config) AY31015(config, m_kbuart); // GI AY-3-1015D m_kbuart->set_auto_rdav(true); - clock_device &kbclock(CLOCK(config, "kbclock", 10000)); + clock_device &kbclock(CLOCK(config, "kbclock", XTAL::u(10000))); kbclock.signal_handler().set(m_kbuart, FUNC(ay31015_device::write_rcp)); kbclock.signal_handler().append(m_kbuart, FUNC(ay31015_device::write_tcp)); diff --git a/src/mame/microterm/microterm_f8.cpp b/src/mame/microterm/microterm_f8.cpp index 42c358703d6..881cb7bfaf9 100644 --- a/src/mame/microterm/microterm_f8.cpp +++ b/src/mame/microterm/microterm_f8.cpp @@ -553,7 +553,7 @@ void microterm_f8_state::act5a(machine_config &config) RIPPLE_COUNTER(config, m_blinkcount).set_stages(6); SPEAKER(config, "mono").front_center(); - BEEP(config, m_bell, 1760); + BEEP(config, m_bell, XTAL::u(1760)); m_bell->add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/microterm/mt420.cpp b/src/mame/microterm/mt420.cpp index 2f98b73a870..2caae706d94 100644 --- a/src/mame/microterm/mt420.cpp +++ b/src/mame/microterm/mt420.cpp @@ -123,7 +123,7 @@ INPUT_PORTS_END void mt420_state::mt420(machine_config &config) { - Z80(config, m_maincpu, 4'000'000); + Z80(config, m_maincpu, XTAL::u(4'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &mt420_state::mem_map); m_maincpu->set_addrmap(AS_IO, &mt420_state::io_map); diff --git a/src/mame/midcoin/24cdjuke.cpp b/src/mame/midcoin/24cdjuke.cpp index 66d93739cb2..d8bb572262c 100644 --- a/src/mame/midcoin/24cdjuke.cpp +++ b/src/mame/midcoin/24cdjuke.cpp @@ -288,7 +288,7 @@ void midcoin24cdjuke_state::machine_reset() void midcoin24cdjuke_state::midcoin24cdjuke(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 6000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(6000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &midcoin24cdjuke_state::midcoin24cdjuke_map); m_maincpu->set_addrmap(AS_IO, &midcoin24cdjuke_state::midcoin24cdjuke_io); m_maincpu->set_periodic_int(FUNC(midcoin24cdjuke_state::irq0_line_hold), attotime::from_hz(500)); @@ -305,7 +305,7 @@ void midcoin24cdjuke_state::midcoin24cdjuke(machine_config &config) ic25.in_pc_callback().set(FUNC(midcoin24cdjuke_state::kb_row_r)); ic25.out_pc_callback().set(FUNC(midcoin24cdjuke_state::kb_col_w)); - i8255_device &ic31(I8255A(config, "ic31", 0)); + i8255_device &ic31(I8255A(config, "ic31")); ic31.out_pb_callback().set_log("PPI8255 - unmapped write port B"); ic31.in_pc_callback().set_ioport("MD4"); } diff --git a/src/mame/midcoin/wallc.cpp b/src/mame/midcoin/wallc.cpp index c02556bd9e5..8ddd9deb7b1 100644 --- a/src/mame/midcoin/wallc.cpp +++ b/src/mame/midcoin/wallc.cpp @@ -544,7 +544,7 @@ void wallc_state::wallc(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &wallc_state::wallc_map); m_maincpu->set_vblank_int("screen", FUNC(wallc_state::irq0_line_hold)); - ADC0804(config, "adc", 640000).vin_callback().set_ioport("DIAL"); // clock not verified + ADC0804(config, "adc", XTAL::u(640000)).vin_callback().set_ioport("DIAL"); // clock not verified /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/midw8080/8080bw_a.cpp b/src/mame/midw8080/8080bw_a.cpp index 686463ef631..bd1aa666136 100644 --- a/src/mame/midw8080/8080bw_a.cpp +++ b/src/mame/midw8080/8080bw_a.cpp @@ -1513,7 +1513,7 @@ static INPUT_PORTS_START( cane_audio ) PORT_ADJUSTER( 70, "VR3 - Shoot SFX from 555" ) INPUT_PORTS_END -cane_audio_device::cane_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +cane_audio_device::cane_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CANE_AUDIO, tag, owner, clock), m_vco_timer(*this, "vco_timer"), m_sn(*this, "snsnd"), diff --git a/src/mame/midw8080/8080bw_a.h b/src/mame/midw8080/8080bw_a.h index 170c8a8aceb..77a16fe4712 100644 --- a/src/mame/midw8080/8080bw_a.h +++ b/src/mame/midw8080/8080bw_a.h @@ -18,7 +18,7 @@ class cane_audio_device : public device_t { public: - cane_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + cane_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void sh_port_1_w(u8 data); void music_w(u8 data); diff --git a/src/mame/midw8080/mw8080bw.h b/src/mame/midw8080/mw8080bw.h index 91de08037c5..deae4d09e2f 100644 --- a/src/mame/midw8080/mw8080bw.h +++ b/src/mame/midw8080/mw8080bw.h @@ -20,7 +20,7 @@ #include "screen.h" -#define MW8080BW_MASTER_CLOCK (19968000.0) +#define MW8080BW_MASTER_CLOCK XTAL::u((19968000) #define MW8080BW_CPU_CLOCK (MW8080BW_MASTER_CLOCK / 10) #define MW8080BW_PIXEL_CLOCK (MW8080BW_MASTER_CLOCK / 4) #define MW8080BW_HTOTAL (0x140) diff --git a/src/mame/midw8080/mw8080bw_a.cpp b/src/mame/midw8080/mw8080bw_a.cpp index 5760efbf8a7..0694e82127d 100644 --- a/src/mame/midw8080/mw8080bw_a.cpp +++ b/src/mame/midw8080/mw8080bw_a.cpp @@ -630,7 +630,7 @@ static discrete_op_amp_tvca_info const midway_music_tvca_info = DISC_OP_AMP_TRIGGER_FUNCTION_NONE }; -midway_tone_generator_device_base::midway_tone_generator_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) : +midway_tone_generator_device_base::midway_tone_generator_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_discrete(*this, "discrete") { @@ -660,7 +660,7 @@ void midway_tone_generator_device_base::tone_generator_hi_w(u8 data) * *************************************/ -seawolf_audio_device::seawolf_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +seawolf_audio_device::seawolf_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEAWOLF_AUDIO, tag, owner, clock), m_samples(*this, "samples"), m_prev(0U) @@ -734,7 +734,7 @@ static INPUT_PORTS_START(gunfight_audio) PORT_ADJUSTER( 50, "Pot: Right Hit Volume" ) NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_right_hit_vol") INPUT_PORTS_END -gunfight_audio_device::gunfight_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +gunfight_audio_device::gunfight_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GUNFIGHT_AUDIO, tag, owner, clock), m_left_shot(*this, "sound_nl:left_shot"), m_right_shot(*this, "sound_nl:right_shot"), @@ -779,7 +779,7 @@ void gunfight_audio_device::device_add_mconfig(machine_config &config) SPEAKER(config, "rspeaker").front_right(); netlist_mame_sound_device &nl_sound = - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(gunfight)); nl_sound.add_route(0, "lspeaker", 0.5); nl_sound.add_route(1, "rspeaker", 0.5); @@ -1036,7 +1036,7 @@ static INPUT_PORTS_START(boothill_audio) PORT_ADJUSTER( 35, "Music Volume" ) INPUT_PORTS_END -boothill_audio_device::boothill_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +boothill_audio_device::boothill_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : midway_tone_generator_device_base(mconfig, BOOTHILL_AUDIO, tag, owner, clock) { } @@ -1268,7 +1268,7 @@ INPUT_PORTS_START(desertgu_audio) PORT_ADJUSTER( 60, "Music Volume" ) INPUT_PORTS_END -desertgu_audio_device::desertgu_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +desertgu_audio_device::desertgu_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : midway_tone_generator_device_base(mconfig, DESERTGU_AUDIO, tag, owner, clock), m_ctrl_sel_out(*this), m_recoil(*this, "Player1_Gun_Recoil"), @@ -1547,7 +1547,7 @@ static INPUT_PORTS_START(dplay_audio) PORT_ADJUSTER( 60, "Music Volume" ) INPUT_PORTS_END -dplay_audio_device::dplay_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +dplay_audio_device::dplay_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : midway_tone_generator_device_base(mconfig, DPLAY_AUDIO, tag, owner, clock) { } @@ -1593,7 +1593,7 @@ void dplay_audio_device::device_start() * *************************************/ -gmissile_audio_device::gmissile_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +gmissile_audio_device::gmissile_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GMISSILE_AUDIO, tag, owner, clock), m_samples(*this, "samples%u", 1U), m_l_exp(*this, "L_EXP_LIGHT"), @@ -1693,7 +1693,7 @@ void gmissile_audio_device::device_start() // Noise clock was breadboarded and measured at 3760Hz -m4_audio_device::m4_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +m4_audio_device::m4_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M4_AUDIO, tag, owner, clock), m_samples(*this, "samples%u", 1U), m_p1(0U), @@ -1947,7 +1947,7 @@ static INPUT_PORTS_START(clowns_audio) PORT_ADJUSTER( 40, "R507 - Music Volume" ) INPUT_PORTS_END -clowns_audio_device::clowns_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +clowns_audio_device::clowns_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : midway_tone_generator_device_base(mconfig, CLOWNS_AUDIO, tag, owner, clock), m_samples(*this, "samples"), m_ctrl_sel_out(*this), @@ -2349,7 +2349,7 @@ static INPUT_PORTS_START(spacwalk_audio) PORT_ADJUSTER( 40, "R507 - Music Volume" ) INPUT_PORTS_END -spacwalk_audio_device::spacwalk_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +spacwalk_audio_device::spacwalk_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : midway_tone_generator_device_base(mconfig, SPACWALK_AUDIO, tag, owner, clock), m_ctrl_sel_out(*this), m_p1(0U) @@ -2539,7 +2539,7 @@ static DISCRETE_SOUND_START(dogpatch_discrete) DISCRETE_OUTPUT(NODE_92, 32760.0 / 5.8) DISCRETE_SOUND_END -dogpatch_audio_device::dogpatch_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +dogpatch_audio_device::dogpatch_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : midway_tone_generator_device_base(mconfig, DOGPATCH_AUDIO, tag, owner, clock) { } @@ -3030,7 +3030,7 @@ static DISCRETE_SOUND_START(spcenctr_discrete) DISCRETE_OUTPUT(NODE_91, 20000) DISCRETE_SOUND_END -spcenctr_audio_device::spcenctr_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +spcenctr_audio_device::spcenctr_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPCENCTR_AUDIO, tag, owner, clock), m_sn(*this, "snsnd"), m_discrete(*this, "discrete"), @@ -3136,7 +3136,7 @@ TIMER_CALLBACK_MEMBER(spcenctr_audio_device::strobe_callback) * *************************************/ -phantom2_audio_device::phantom2_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +phantom2_audio_device::phantom2_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PHANTOM2_AUDIO, tag, owner, clock), m_samples(*this, "samples"), m_exp(*this, "EXPLAMP"), @@ -3259,7 +3259,7 @@ static DISCRETE_SOUND_START(invaders_discrete) INVADERS_MIXER(1, invaders) DISCRETE_SOUND_END -invaders_audio_device::invaders_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +invaders_audio_device::invaders_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INVADERS_AUDIO, tag, owner, clock), m_sn(*this, "snsnd"), m_discrete(*this, "discrete"), @@ -3457,7 +3457,7 @@ static DISCRETE_SOUND_START(invad2ct_discrete) INVADERS_MIXER(2, invaders) DISCRETE_SOUND_END -invad2ct_audio_device::invad2ct_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +invad2ct_audio_device::invad2ct_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INVAD2CT_AUDIO, tag, owner, clock), m_discrete(*this, "discrete"), m_sn(*this, "sn%u", 1U) @@ -3656,7 +3656,7 @@ static INPUT_PORTS_START(zzzap_audio) PORT_ADJUSTER( 50, "Pot: Master Volume" ) NETLIST_ANALOG_PORT_CHANGED("sound_nl", "pot_master_vol") INPUT_PORTS_END -zzzap_common_audio_device::zzzap_common_audio_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, void (*netlist)(netlist::nlparse_t &)) : +zzzap_common_audio_device::zzzap_common_audio_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, void (*netlist)(netlist::nlparse_t &)) : device_t(mconfig, type, tag, owner, clock), m_netlist(netlist), m_pedal_bit0(*this, "sound_nl:pedal_bit0"), @@ -3734,7 +3734,7 @@ void zzzap_common_audio_device::device_add_mconfig(machine_config &config) if (m_netlist != nullptr) { - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(m_netlist) .add_route(ALL_OUTPUTS, "mono", 1.0); @@ -3787,13 +3787,13 @@ void zzzap_common_audio_device::device_start() } -zzzap_audio_device::zzzap_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +zzzap_audio_device::zzzap_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : zzzap_common_audio_device(mconfig, ZZZAP_AUDIO, tag, owner, clock, NETLIST_NAME(280zzzap)) { } -lagunar_audio_device::lagunar_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +lagunar_audio_device::lagunar_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : zzzap_common_audio_device(mconfig, LAGUNAR_AUDIO, tag, owner, clock, NETLIST_NAME(lagunar)) { } diff --git a/src/mame/midw8080/mw8080bw_a.h b/src/mame/midw8080/mw8080bw_a.h index 371781db4ca..0efa33b1cfe 100644 --- a/src/mame/midw8080/mw8080bw_a.h +++ b/src/mame/midw8080/mw8080bw_a.h @@ -24,7 +24,7 @@ public: void tone_generator_hi_w(u8 data); protected: - midway_tone_generator_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + midway_tone_generator_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); required_device m_discrete; }; @@ -33,7 +33,7 @@ protected: class seawolf_audio_device : public device_t { public: - seawolf_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + seawolf_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void write(u8 data); @@ -50,7 +50,7 @@ private: class gunfight_audio_device : public device_t { public: - gunfight_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + gunfight_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void write(u8 data); @@ -70,7 +70,7 @@ private: class boothill_audio_device : public midway_tone_generator_device_base { public: - boothill_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + boothill_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void write(u8 data); @@ -86,7 +86,7 @@ class desertgu_audio_device : public midway_tone_generator_device_base public: auto ctrl_sel_out() { return m_ctrl_sel_out.bind(); } - desertgu_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + desertgu_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -106,7 +106,7 @@ private: class dplay_audio_device : public midway_tone_generator_device_base { public: - dplay_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + dplay_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void write(u8 data); @@ -120,7 +120,7 @@ protected: class gmissile_audio_device : public device_t { public: - gmissile_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + gmissile_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -141,7 +141,7 @@ private: class m4_audio_device : public device_t { public: - m4_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + m4_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -162,7 +162,7 @@ class clowns_audio_device : public midway_tone_generator_device_base public: auto ctrl_sel_out() { return m_ctrl_sel_out.bind(); } - clowns_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + clowns_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -185,7 +185,7 @@ class spacwalk_audio_device : public midway_tone_generator_device_base public: auto ctrl_sel_out() { return m_ctrl_sel_out.bind(); } - spacwalk_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + spacwalk_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -204,7 +204,7 @@ private: class dogpatch_audio_device : public midway_tone_generator_device_base { public: - dogpatch_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + dogpatch_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void write(u8 data); @@ -217,7 +217,7 @@ protected: class spcenctr_audio_device : public device_t { public: - spcenctr_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + spcenctr_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -242,7 +242,7 @@ private: class phantom2_audio_device : public device_t { public: - phantom2_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + phantom2_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -264,7 +264,7 @@ class invaders_audio_device : public device_t public: auto flip_screen_out() { return m_flip_screen_out.bind(); } - invaders_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + invaders_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -284,7 +284,7 @@ private: class invad2ct_audio_device : public device_t { public: - invad2ct_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + invad2ct_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); void p1_w(u8 data); void p2_w(u8 data); @@ -308,7 +308,7 @@ public: void p2_w(u8 data); protected: - zzzap_common_audio_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, void (*netlist)(netlist::nlparse_t &)); + zzzap_common_audio_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, void (*netlist)(netlist::nlparse_t &)); virtual void device_add_mconfig(machine_config &config) override; virtual ioport_constructor device_input_ports() const override; @@ -332,14 +332,14 @@ private: class zzzap_audio_device : public zzzap_common_audio_device { public: - zzzap_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + zzzap_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); }; class lagunar_audio_device : public zzzap_common_audio_device { public: - lagunar_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + lagunar_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/mame/midw8080/rotaryf.cpp b/src/mame/midw8080/rotaryf.cpp index 9b2786e42a8..073819c44bd 100644 --- a/src/mame/midw8080/rotaryf.cpp +++ b/src/mame/midw8080/rotaryf.cpp @@ -259,7 +259,7 @@ INPUT_PORTS_END void rotaryf_state::rotaryf(machine_config &config) { /* basic machine hardware */ - I8085A(config, m_maincpu, 4000000); /* ?? MHz */ + I8085A(config, m_maincpu, XTAL::u(4000000)); /* ?? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &rotaryf_state::rotaryf_map); m_maincpu->set_addrmap(AS_IO, &rotaryf_state::rotaryf_io_map); TIMER(config, "scantimer").configure_scanline(FUNC(rotaryf_state::rotaryf_interrupt), "screen", 0, 1); diff --git a/src/mame/midway/astrocde.cpp b/src/mame/midway/astrocde.cpp index 2aa3ad1f421..98b0f0c6d36 100644 --- a/src/mame/midway/astrocde.cpp +++ b/src/mame/midway/astrocde.cpp @@ -1324,7 +1324,7 @@ void astrocde_state::spacezap(machine_config &config) m_astrocade_sound1->so_cb<0>().set("watchdog", FUNC(watchdog_timer_device::reset_w)); m_astrocade_sound1->so_cb<3>().set("outlatch", FUNC(output_latch_device::write)); - output_latch_device &outlatch(OUTPUT_LATCH(config, "outlatch", 0)); // MC14174B on game board at U16 + output_latch_device &outlatch(OUTPUT_LATCH(config, "outlatch")); // MC14174B on game board at U16 outlatch.bit_handler<0>().set(FUNC(astrocde_state::coin_counter_w<0>)); outlatch.bit_handler<1>().set(FUNC(astrocde_state::coin_counter_w<1>)); @@ -1365,7 +1365,7 @@ void astrocde_state::wow(machine_config &config) m_astrocade_sound2->reset_routes(); m_astrocade_sound2->add_route(ALL_OUTPUTS, "lspeaker", 0.35); - VOTRAX_SC01(config, m_votrax, 756000); + VOTRAX_SC01(config, m_votrax, XTAL::u(756000)); m_votrax->add_route(0, "f1", 0.65); FILTER_RC(config, "f1").set_lowpass(110e3, 560e-12).add_route(0, "f2", 1.00); @@ -1421,7 +1421,7 @@ void astrocde_state::gorf(machine_config &config) ASTROCADE_IO(config, m_astrocade_sound2, ASTROCADE_CLOCK/4).add_route(ALL_OUTPUTS, "lower", 0.45); - VOTRAX_SC01(config, m_votrax, 756000); + VOTRAX_SC01(config, m_votrax, XTAL::u(756000)); m_votrax->add_route(ALL_OUTPUTS, "upper", 0.55); } @@ -1458,13 +1458,13 @@ void astrocde_state::profpac(machine_config &config) m_bank4000->set_map(&astrocde_state::profpac_bank4000_map); m_bank4000->set_addr_width(20); - output_latch_device &outlatch(OUTPUT_LATCH(config, "outlatch", 0)); // 74LS174 on game board at U6 + output_latch_device &outlatch(OUTPUT_LATCH(config, "outlatch")); // 74LS174 on game board at U6 outlatch.bit_handler<0>().set(FUNC(astrocde_state::coin_counter_w<0>)); outlatch.bit_handler<1>().set(FUNC(astrocde_state::coin_counter_w<1>)); outlatch.bit_handler<2>().set_output("led0"); outlatch.bit_handler<3>().set_output("led1"); - output_latch_device &lamplatch(OUTPUT_LATCH(config, "lamplatch", 0)); // 74LS174 on game board at U7 + output_latch_device &lamplatch(OUTPUT_LATCH(config, "lamplatch")); // 74LS174 on game board at U7 lamplatch.bit_handler<0>().set_output("lamp0"); // left lamp A lamplatch.bit_handler<1>().set_output("lamp1"); // left lamp B lamplatch.bit_handler<2>().set_output("lamp2"); // left lamp C @@ -1485,7 +1485,7 @@ void demndrgn_state::demndrgn(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &demndrgn_state::demndrgn_map); m_maincpu->set_addrmap(AS_IO, &demndrgn_state::port_map_16col_pattern_demndrgn); - output_latch_device &outlatch(OUTPUT_LATCH(config, "outlatch", 0)); + output_latch_device &outlatch(OUTPUT_LATCH(config, "outlatch")); outlatch.bit_handler<0>().set(FUNC(astrocde_state::coin_counter_w<0>)); outlatch.bit_handler<1>().set(FUNC(astrocde_state::coin_counter_w<1>)); outlatch.bit_handler<2>().set_output("led0"); diff --git a/src/mame/midway/atlantis.cpp b/src/mame/midway/atlantis.cpp index d6540a46df7..8812927c291 100644 --- a/src/mame/midway/atlantis.cpp +++ b/src/mame/midway/atlantis.cpp @@ -814,17 +814,17 @@ DEVICE_INPUT_DEFAULTS_END void atlantis_state::mwskins(machine_config &config) { /* basic machine hardware */ - VR4310LE(config, m_maincpu, 166666666); + VR4310LE(config, m_maincpu, XTAL::u(166666666)); m_maincpu->set_icache_size(16384); m_maincpu->set_dcache_size(16384); m_maincpu->set_system_clock(66666666); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); vrc4373_device &vrc4373(VRC4373(config, PCI_ID_NILE, 0, m_maincpu)); vrc4373.set_ram_size(0x00800000); - pci9050_device &pci9050(PCI9050(config, PCI_ID_9050, 0)); + pci9050_device &pci9050(PCI9050(config, PCI_ID_9050)); pci9050.set_map(0, address_map_constructor(&atlantis_state::map0, "map0", this), this); pci9050.set_map(1, address_map_constructor(&atlantis_state::map1, "map1", this), this); pci9050.set_map(2, address_map_constructor(&atlantis_state::map2, "map2", this), this); @@ -836,7 +836,7 @@ void atlantis_state::mwskins(machine_config &config) m_rtc->reset_cb().set(FUNC(atlantis_state::watchdog_reset)); m_rtc->irq_cb().set(FUNC(atlantis_state::watchdog_irq)); - IDE_PCI(config, m_ide, 0, 0x10950646, 0x07, 0x0, PCI_ID_NILE, AS_DATA).irq_handler().set(FUNC(atlantis_state::ide_irq)); + IDE_PCI(config, m_ide, 0x10950646, 0x07, 0x0, PCI_ID_NILE, AS_DATA).irq_handler().set(FUNC(atlantis_state::ide_irq)); /* video hardware */ ZEUS2(config, m_zeus, ZEUS2_VIDEO_CLOCK); @@ -850,11 +850,11 @@ void atlantis_state::mwskins(machine_config &config) m_screen->set_screen_update("zeus2", FUNC(zeus2_device::screen_update)); /* sound hardware */ - DCS2_AUDIO_DENVER_2CH(config, m_dcs, 0); + DCS2_AUDIO_DENVER_2CH(config, m_dcs); m_dcs->set_dram_in_mb(4); m_dcs->set_polling_offset(0xe33); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_yearoffs(80); m_ioasic->set_upper(342); // 325 @@ -862,7 +862,7 @@ void atlantis_state::mwskins(machine_config &config) m_ioasic->set_auto_ack(1); if DEBUG_CONSOLE { m_ioasic->serial_tx_handler().set(m_uart0, FUNC(generic_terminal_device::write)); - GENERIC_TERMINAL(config, m_uart0, 0); + GENERIC_TERMINAL(config, m_uart0); m_uart0->set_keyboard_callback("ioasic", FUNC(midway_ioasic_device::serial_rx_w)); } diff --git a/src/mame/midway/balsente.cpp b/src/mame/midway/balsente.cpp index cd64200dc40..2a9e31a6018 100644 --- a/src/mame/midway/balsente.cpp +++ b/src/mame/midway/balsente.cpp @@ -1341,7 +1341,7 @@ void balsente_state::balsente(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &balsente_state::cpu1_map); m_maincpu->set_vblank_int("screen", FUNC(balsente_state::update_analog_inputs)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("audio6vb", FUNC(sente6vb_device::rec_w)); m_acia->irq_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE); @@ -1350,7 +1350,7 @@ void balsente_state::balsente(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); - TIMER(config, m_scanline_timer, 0).configure_generic(FUNC(balsente_state::interrupt_timer)); + TIMER(config, m_scanline_timer).configure_generic(FUNC(balsente_state::interrupt_timer)); LS259(config, m_outlatch); // U9H // these outputs are generally used to control the various lamps @@ -1415,7 +1415,7 @@ void balsente_state::shrike(machine_config &config) balsente(config); m_maincpu->set_addrmap(AS_PROGRAM, &balsente_state::cpu1_shrike_map); - M68000(config, m_68k, 8000000); + M68000(config, m_68k, XTAL::u(8000000)); m_68k->set_addrmap(AS_PROGRAM, &balsente_state::shrike68k_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -1474,7 +1474,7 @@ void balsente_state::triviamb(machine_config &config) AY8910(config, "ay1", 8_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.90); AY8910(config, "ay2", 8_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.90); - MSM5205(config, "msm", 384000).add_route(ALL_OUTPUTS, "mono", 0.90); + MSM5205(config, "msm", XTAL::u(384000)).add_route(ALL_OUTPUTS, "mono", 0.90); } /************************************* diff --git a/src/mame/midway/balsente.h b/src/mame/midway/balsente.h index 4831bb0a196..9a11286f30b 100644 --- a/src/mame/midway/balsente.h +++ b/src/mame/midway/balsente.h @@ -19,7 +19,7 @@ #include "emupal.h" #include "screen.h" -#define BALSENTE_MASTER_CLOCK (20000000) +#define BALSENTE_MASTER_CLOCK XTAL::u(20000000) #define BALSENTE_CPU_CLOCK (BALSENTE_MASTER_CLOCK / 16) #define BALSENTE_PIXEL_CLOCK (BALSENTE_MASTER_CLOCK / 4) #define BALSENTE_HTOTAL (0x140) diff --git a/src/mame/midway/csd.cpp b/src/mame/midway/csd.cpp index 0a606908672..5bda8b63a10 100644 --- a/src/mame/midway/csd.cpp +++ b/src/mame/midway/csd.cpp @@ -40,13 +40,13 @@ void midway_cheap_squeak_deluxe_device::device_add_mconfig(machine_config &confi M68000(config, m_cpu, DERIVED_CLOCK(1, 2)); m_cpu->set_addrmap(AS_PROGRAM, &midway_cheap_squeak_deluxe_device::csdeluxe_map); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(midway_cheap_squeak_deluxe_device::porta_w)); m_pia->writepb_handler().set(FUNC(midway_cheap_squeak_deluxe_device::portb_w)); m_pia->irqa_handler().set(FUNC(midway_cheap_squeak_deluxe_device::irq_w)); m_pia->irqb_handler().set(FUNC(midway_cheap_squeak_deluxe_device::irq_w)); - AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 1.0); + AD7533(config, m_dac).add_route(ALL_OUTPUTS, *this, 1.0); } //------------------------------------------------- @@ -67,7 +67,7 @@ const tiny_rom_entry *midway_cheap_squeak_deluxe_device::device_rom_region() con // midway_cheap_squeak_deluxe_device - constructor //------------------------------------------------- -midway_cheap_squeak_deluxe_device::midway_cheap_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +midway_cheap_squeak_deluxe_device::midway_cheap_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDWAY_CHEAP_SQUEAK_DELUXE, tag, owner, clock), device_mixer_interface(mconfig, *this), m_cpu(*this, "cpu"), diff --git a/src/mame/midway/csd.h b/src/mame/midway/csd.h index 4b5952b5369..22b77de2963 100644 --- a/src/mame/midway/csd.h +++ b/src/mame/midway/csd.h @@ -26,7 +26,7 @@ class midway_cheap_squeak_deluxe_device : public device_t, public device_mixer_i { public: // construction/destruction - midway_cheap_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16'000'000); + midway_cheap_squeak_deluxe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 16'000'000); // helpers void suspend_cpu(); diff --git a/src/mame/midway/gridlee.cpp b/src/mame/midway/gridlee.cpp index fd2a9f9ffbe..df1804fd727 100644 --- a/src/mame/midway/gridlee.cpp +++ b/src/mame/midway/gridlee.cpp @@ -421,7 +421,7 @@ void gridlee_state::gridlee(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - GRIDLEE(config, "gridlee", 0).add_route(ALL_OUTPUTS, "mono", 1.0); + GRIDLEE(config, "gridlee").add_route(ALL_OUTPUTS, "mono", 1.0); SAMPLES(config, m_samples); m_samples->set_channels(8); diff --git a/src/mame/midway/gridlee.h b/src/mame/midway/gridlee.h index 7467067d7b6..19f3bc52a6f 100644 --- a/src/mame/midway/gridlee.h +++ b/src/mame/midway/gridlee.h @@ -18,7 +18,7 @@ #include "screen.h" -#define GRIDLEE_MASTER_CLOCK (20000000) +#define GRIDLEE_MASTER_CLOCK XTAL::u(20000000) #define GRIDLEE_CPU_CLOCK (GRIDLEE_MASTER_CLOCK / 16) #define GRIDLEE_PIXEL_CLOCK (GRIDLEE_MASTER_CLOCK / 4) #define GRIDLEE_HTOTAL (0x140) @@ -93,7 +93,7 @@ private: class gridlee_sound_device : public device_t, public device_sound_interface { public: - gridlee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gridlee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~gridlee_sound_device() { } protected: diff --git a/src/mame/midway/gridlee_a.cpp b/src/mame/midway/gridlee_a.cpp index e9f38afd7d4..efd3b6ee973 100644 --- a/src/mame/midway/gridlee_a.cpp +++ b/src/mame/midway/gridlee_a.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(GRIDLEE, gridlee_sound_device, "gridlee_sound", "Gridlee Cust // gridlee_sound_device - constructor //------------------------------------------------- -gridlee_sound_device::gridlee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gridlee_sound_device::gridlee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GRIDLEE, tag, owner, clock), device_sound_interface(mconfig, *this), m_tone_step(0), diff --git a/src/mame/midway/mcr.cpp b/src/mame/midway/mcr.cpp index 90fbd581086..b71b6f4c94d 100644 --- a/src/mame/midway/mcr.cpp +++ b/src/mame/midway/mcr.cpp @@ -1870,7 +1870,7 @@ void mcr_state::mcr_91490(machine_config & config) mcr_90010(config); /* basic machine hardware */ - m_maincpu->set_clock(5000000); + m_maincpu->set_clock(XTAL::u(5000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mcr_state::cpu_91490_map); m_maincpu->set_addrmap(AS_IO, &mcr_state::cpu_91490_portmap); diff --git a/src/mame/midway/mcr68.cpp b/src/mame/midway/mcr68.cpp index 11c615adfd4..21a1248b82d 100644 --- a/src/mame/midway/mcr68.cpp +++ b/src/mame/midway/mcr68.cpp @@ -914,7 +914,7 @@ GFXDECODE_END void mcr68_state::mcr68(machine_config &config) { // Basic machine hardware - M68000(config, m_maincpu, 7723800); + M68000(config, m_maincpu, XTAL::u(7723800)); m_maincpu->set_addrmap(AS_PROGRAM, &mcr68_state::mcr68_map); WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); diff --git a/src/mame/midway/midqslvr.cpp b/src/mame/midway/midqslvr.cpp index c36ede52222..c347f7a4deb 100644 --- a/src/mame/midway/midqslvr.cpp +++ b/src/mame/midway/midqslvr.cpp @@ -649,14 +649,14 @@ void midqslvr_state::machine_reset() void midqslvr_state::midqslvr(machine_config &config) { - PENTIUM2(config, m_maincpu, 333000000); //Verified this Celeron to be Pentium II based. + PENTIUM2(config, m_maincpu, XTAL::u(333000000)); //Verified this Celeron to be Pentium II based. m_maincpu->set_addrmap(AS_PROGRAM, &midqslvr_state::midqslvr_map); m_maincpu->set_addrmap(AS_IO, &midqslvr_state::midqslvr_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); pcat_common(config); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device( 0, FUNC(midqslvr_state::intel82439tx_pci_r), FUNC(midqslvr_state::intel82439tx_pci_w)); pcibus.set_device(31, FUNC(midqslvr_state::intel82371ab_pci_r), FUNC(midqslvr_state::intel82371ab_pci_w)); @@ -669,14 +669,14 @@ void midqslvr_state::midqslvr(machine_config &config) void midqslvr_state::graphite(machine_config &config) //Todo: The entire Pro133A chipset :). { - PENTIUM3(config, m_maincpu, 733000000); //Verified + PENTIUM3(config, m_maincpu, XTAL::u(733000000)); //Verified m_maincpu->set_addrmap(AS_PROGRAM, &midqslvr_state::midqslvr_map); m_maincpu->set_addrmap(AS_IO, &midqslvr_state::midqslvr_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); pcat_common(config); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device( 0, FUNC(midqslvr_state::intel82439tx_pci_r), FUNC(midqslvr_state::intel82439tx_pci_w)); pcibus.set_device(31, FUNC(midqslvr_state::intel82371ab_pci_r), FUNC(midqslvr_state::intel82371ab_pci_w)); diff --git a/src/mame/midway/midtunit.cpp b/src/mame/midway/midtunit.cpp index 0240f940271..6bce39a7c86 100644 --- a/src/mame/midway/midtunit.cpp +++ b/src/mame/midway/midtunit.cpp @@ -626,7 +626,7 @@ void midtunit_state::tunit_adpcm(machine_config &config) /* basic machine hardware */ SPEAKER(config, "speaker").front_center(); - WILLIAMS_ADPCM_SOUND(config, m_adpcm_sound, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + WILLIAMS_ADPCM_SOUND(config, m_adpcm_sound).add_route(ALL_OUTPUTS, "speaker", 1.0); } @@ -635,7 +635,7 @@ void midtunit_state::tunit_dcs(machine_config &config) tunit_core(config); /* basic machine hardware */ - DCS_AUDIO_2K(config, m_dcs, 0); + DCS_AUDIO_2K(config, m_dcs); } diff --git a/src/mame/midway/midtunit_v.cpp b/src/mame/midway/midtunit_v.cpp index 8347c6787dc..026cd9bd375 100644 --- a/src/mame/midway/midtunit_v.cpp +++ b/src/mame/midway/midtunit_v.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(MIDXUNIT_VIDEO, midxunit_video_device, "xunitvid", "Midway X- /* compile-time options */ #define LOG_DMA 0 /* DMAs are logged if the 'L' key is pressed */ -midtunit_video_device::midtunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +midtunit_video_device::midtunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_palette(*this, finder_base::DUMMY_TAG) @@ -41,22 +41,22 @@ midtunit_video_device::midtunit_video_device(const machine_config &mconfig, devi { } -midtunit_video_device::midtunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midtunit_video_device::midtunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : midtunit_video_device(mconfig, MIDTUNIT_VIDEO, tag, owner, clock) { } -midwunit_video_device::midwunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +midwunit_video_device::midwunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : midtunit_video_device(mconfig, type, tag, owner, clock) { } -midwunit_video_device::midwunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midwunit_video_device::midwunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : midtunit_video_device(mconfig, MIDWUNIT_VIDEO, tag, owner, clock) { } -midxunit_video_device::midxunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midxunit_video_device::midxunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : midwunit_video_device(mconfig, MIDXUNIT_VIDEO, tag, owner, clock) { } diff --git a/src/mame/midway/midtunit_v.h b/src/mame/midway/midtunit_v.h index b37cb56253e..258163bd3c0 100644 --- a/src/mame/midway/midtunit_v.h +++ b/src/mame/midway/midtunit_v.h @@ -24,14 +24,14 @@ public: // construction/destruction template midtunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&palette_tag, V &&gfxrom_tag) - : midtunit_video_device(mconfig, tag, owner, (uint32_t)0) + : midtunit_video_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); m_palette.set_tag(std::forward(palette_tag)); m_gfxrom.set_tag(std::forward(gfxrom_tag)); } - midtunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + midtunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg); TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg); @@ -61,7 +61,7 @@ public: protected: // construction/destruction - midtunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + midtunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void device_start() override; @@ -184,13 +184,13 @@ public: // construction/destruction template midwunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&palette_tag, V &&gfxrom_tag) - : midwunit_video_device(mconfig, tag, owner, (uint32_t)0) + : midwunit_video_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); m_palette.set_tag(std::forward(palette_tag)); m_gfxrom.set_tag(std::forward(gfxrom_tag)); } - midwunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + midwunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint16_t midwunit_gfxrom_r(offs_t offset); @@ -198,7 +198,7 @@ public: uint16_t midwunit_control_r(); protected: - midwunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + midwunit_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void device_start() override; #if DEBUG_MIDTUNIT_BLITTER @@ -212,14 +212,14 @@ public: // construction/destruction template midxunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&palette_tag, V &&gfxrom_tag) - : midwunit_video_device(mconfig, tag, owner, (uint32_t)0) + : midwunit_video_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); m_palette.set_tag(std::forward(palette_tag)); m_gfxrom.set_tag(std::forward(gfxrom_tag)); } - midxunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + midxunit_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void midxunit_paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint16_t midxunit_paletteram_r(offs_t offset); diff --git a/src/mame/midway/midtview.ipp b/src/mame/midway/midtview.ipp index f59a101be40..b62601480c2 100644 --- a/src/mame/midway/midtview.ipp +++ b/src/mame/midway/midtview.ipp @@ -51,7 +51,7 @@ void midtunit_video_device::device_add_mconfig(machine_config &config) void midwunit_video_device::device_add_mconfig(machine_config &config) { screen_device &debugscreen(SCREEN(config, "debugscreen", SCREEN_TYPE_RASTER)); - debugscreen.set_raw(8000000, 506, 101, 501, 289, 20, 274); + debugscreen.set_raw(XTAL::u(8000000), 506, 101, 501, 289, 20, 274); debugscreen.set_screen_update(FUNC(midwunit_video_device::debug_screen_update)); PALETTE(config, m_debug_palette).set_format(palette_device::xRGB_555, 32768); diff --git a/src/mame/midway/midvunit.cpp b/src/mame/midway/midvunit.cpp index 55e3c803213..0453d4b96f4 100644 --- a/src/mame/midway/midvunit.cpp +++ b/src/mame/midway/midvunit.cpp @@ -1108,7 +1108,7 @@ void midvunit_state::midvunit(machine_config &config) m_adc->ch3_callback().set_ioport("BRAKE"); /* sound hardware */ - DCS_AUDIO_2K(config, "dcs", 0); + DCS_AUDIO_2K(config, "dcs"); } @@ -1116,7 +1116,7 @@ void midvunit_state::crusnwld(machine_config &config) { midvunit(config); /* valid values are 450 or 460 */ - MIDWAY_SERIAL_PIC2(config, m_midway_serial_pic2, 0); + MIDWAY_SERIAL_PIC2(config, m_midway_serial_pic2); m_midway_serial_pic2->set_upper(450); m_midway_serial_pic2->set_yearoffs(94); } @@ -1125,7 +1125,7 @@ void midvunit_state::offroadc(machine_config &config) { midvunit(config); /* valid values are 230 or 234 */ - MIDWAY_SERIAL_PIC2(config, m_midway_serial_pic2, 0); + MIDWAY_SERIAL_PIC2(config, m_midway_serial_pic2); m_midway_serial_pic2->set_upper(230); m_midway_serial_pic2->set_yearoffs(94); } @@ -1143,13 +1143,13 @@ void midvunit_state::midvplus(machine_config &config) ATA_INTERFACE(config, m_ata).options(ata_devices, "hdd", nullptr, true); - MIDWAY_IOASIC(config, m_midway_ioasic, 0); + MIDWAY_IOASIC(config, m_midway_ioasic); m_midway_ioasic->set_shuffle(0); m_midway_ioasic->set_upper(452); /* no alternates */ m_midway_ioasic->set_yearoffs(94); /* sound hardware */ - DCS2_AUDIO_2115(config, m_dcs, 0); + DCS2_AUDIO_2115(config, m_dcs); m_dcs->set_dram_in_mb(2); m_dcs->set_polling_offset(0x3839); } diff --git a/src/mame/midway/midway.cpp b/src/mame/midway/midway.cpp index 9100860ebeb..517a6aa3465 100644 --- a/src/mame/midway/midway.cpp +++ b/src/mame/midway/midway.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(MIDWAY_TURBO_CHEAP_SQUEAK, midway_turbo_cheap_squeak_device, // midway_ssio_device - constructor //------------------------------------------------- -midway_ssio_device::midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midway_ssio_device::midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDWAY_SSIO, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , m_cpu(*this, "cpu") @@ -479,7 +479,7 @@ TIMER_CALLBACK_MEMBER(midway_ssio_device::synced_write) // midway_sounds_good_device - constructor //------------------------------------------------- -midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midway_sounds_good_device::midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDWAY_SOUNDS_GOOD, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -608,13 +608,13 @@ void midway_sounds_good_device::device_add_mconfig(machine_config &config) M68000(config, m_cpu, DERIVED_CLOCK(1, 2)); m_cpu->set_addrmap(AS_PROGRAM, &midway_sounds_good_device::soundsgood_map); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(midway_sounds_good_device::porta_w)); m_pia->writepb_handler().set(FUNC(midway_sounds_good_device::portb_w)); m_pia->irqa_handler().set(FUNC(midway_sounds_good_device::irq_w)); m_pia->irqb_handler().set(FUNC(midway_sounds_good_device::irq_w)); - AD7533(config, m_dac, 0); /// ad7533jn.u10 + AD7533(config, m_dac); /// ad7533jn.u10 // The DAC filters here are identical to those on the "Turbo Cheap Squeak" and "Cheap Squeak Deluxe" boards. //LM359 @U2.2, 2nd order MFB low-pass (fc = 5404.717733, Q = 0.625210, gain = -1.000000) @@ -674,7 +674,7 @@ TIMER_CALLBACK_MEMBER(midway_sounds_good_device::synced_write) // midway_turbo_cheap_squeak_device - constructor //------------------------------------------------- -midway_turbo_cheap_squeak_device::midway_turbo_cheap_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +midway_turbo_cheap_squeak_device::midway_turbo_cheap_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDWAY_TURBO_CHEAP_SQUEAK, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -775,13 +775,13 @@ void midway_turbo_cheap_squeak_device::device_add_mconfig(machine_config &config MC6809E(config, m_cpu, DERIVED_CLOCK(1, 4)); m_cpu->set_addrmap(AS_PROGRAM, &midway_turbo_cheap_squeak_device::turbocs_map); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(midway_turbo_cheap_squeak_device::porta_w)); m_pia->writepb_handler().set(FUNC(midway_turbo_cheap_squeak_device::portb_w)); m_pia->irqa_handler().set(FUNC(midway_turbo_cheap_squeak_device::irq_w)); m_pia->irqb_handler().set(FUNC(midway_turbo_cheap_squeak_device::irq_w)); - AD7533(config, m_dac, 0); /// ad7533jn.u11 + AD7533(config, m_dac); /// ad7533jn.u11 // The DAC filters here are identical to those on the "Sounds Good" and "Cheap Squeak Deluxe" boards. //LM359 @U14.2, 2nd order MFB low-pass (fc = 5404.717733, Q = 0.625210, gain = -1.000000) diff --git a/src/mame/midway/midway.h b/src/mame/midway/midway.h index 26cb92cde25..87ebccaf19c 100644 --- a/src/mame/midway/midway.h +++ b/src/mame/midway/midway.h @@ -46,7 +46,7 @@ class midway_ssio_device : public device_t, { public: // construction/destruction - midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16'000'000); + midway_ssio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 16'000'000); // helpers void suspend_cpu(); @@ -131,7 +131,7 @@ class midway_sounds_good_device : public device_t, { public: // construction/destruction - midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16'000'000); + midway_sounds_good_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 16'000'000); // read/write uint8_t read(); @@ -172,7 +172,7 @@ class midway_turbo_cheap_squeak_device : public device_t, { public: // construction/destruction - midway_turbo_cheap_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 8'000'000); + midway_turbo_cheap_squeak_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 8'000'000); // read/write uint8_t read(); diff --git a/src/mame/midway/midwayic.cpp b/src/mame/midway/midwayic.cpp index eae2ab7d165..e43067eedd5 100644 --- a/src/mame/midway/midwayic.cpp +++ b/src/mame/midway/midwayic.cpp @@ -145,12 +145,12 @@ DEFINE_DEVICE_TYPE(MIDWAY_SERIAL_PIC, midway_serial_pic_device, "midway_serial_p // midway_serial_pic_device - constructor //------------------------------------------------- -midway_serial_pic_device::midway_serial_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +midway_serial_pic_device::midway_serial_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : midway_serial_pic_device(mconfig, MIDWAY_SERIAL_PIC, tag, owner, clock) { } -midway_serial_pic_device::midway_serial_pic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +midway_serial_pic_device::midway_serial_pic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_io_serial_digit(*this, "SERIAL_DIGIT"), m_upper(0), @@ -246,7 +246,7 @@ DEFINE_DEVICE_TYPE(MIDWAY_SERIAL_PIC_EMU, midway_serial_pic_emu_device, "midway_ // midway_serial_pic_emu_device - constructor //------------------------------------------------- -midway_serial_pic_emu_device::midway_serial_pic_emu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +midway_serial_pic_emu_device::midway_serial_pic_emu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIDWAY_SERIAL_PIC_EMU, tag, owner, clock) , m_pic(*this, "pic") { @@ -309,7 +309,7 @@ void midway_serial_pic_emu_device::write_c(u8 data) void midway_serial_pic_emu_device::device_add_mconfig(machine_config &config) { - PIC16C57(config, m_pic, 4000000); /* ? Mhz */ + PIC16C57(config, m_pic, XTAL::u(4000000)); /* ? Mhz */ m_pic->read_a().set([this]() { return m_command; }); m_pic->write_b().set([this](u8 data) { m_data_out = data; }); m_pic->read_c().set(FUNC(midway_serial_pic_emu_device::read_c)); @@ -338,12 +338,12 @@ DEFINE_DEVICE_TYPE(MIDWAY_SERIAL_PIC2, midway_serial_pic2_device, "midway_serial // midway_serial_pic2_device - constructor //------------------------------------------------- -midway_serial_pic2_device::midway_serial_pic2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +midway_serial_pic2_device::midway_serial_pic2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : midway_serial_pic2_device(mconfig, MIDWAY_SERIAL_PIC2, tag, owner, clock) { } -midway_serial_pic2_device::midway_serial_pic2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +midway_serial_pic2_device::midway_serial_pic2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : midway_serial_pic_device(mconfig, type, tag, owner, clock), device_nvram_interface(mconfig, *this), m_latch(0), @@ -701,7 +701,7 @@ DEFINE_DEVICE_TYPE(MIDWAY_IOASIC, midway_ioasic_device, "midway_ioasic", "Midway // midway_serial_pic2_device - constructor //------------------------------------------------- -midway_ioasic_device::midway_ioasic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +midway_ioasic_device::midway_ioasic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : midway_serial_pic2_device(mconfig, MIDWAY_IOASIC, tag, owner, clock), m_io_dips(*this, ":DIPS"), m_io_system(*this, ":SYSTEM"), diff --git a/src/mame/midway/midwayic.h b/src/mame/midway/midwayic.h index 499bfa9c72b..26541faf48a 100644 --- a/src/mame/midway/midwayic.h +++ b/src/mame/midway/midwayic.h @@ -23,7 +23,7 @@ class midway_serial_pic_device : public device_t { public: // construction/destruction - midway_serial_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midway_serial_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_upper(int upper) { m_upper = upper; } @@ -33,7 +33,7 @@ public: DECLARE_WRITE_LINE_MEMBER( reset_w ); protected: - midway_serial_pic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + midway_serial_pic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -65,7 +65,7 @@ class midway_serial_pic_emu_device : public device_t { public: // construction/destruction - midway_serial_pic_emu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midway_serial_pic_emu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(); void write(u8 data); @@ -73,7 +73,7 @@ public: DECLARE_WRITE_LINE_MEMBER(reset_w); protected: - midway_serial_pic_emu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + midway_serial_pic_emu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -105,7 +105,7 @@ class midway_serial_pic2_device : public midway_serial_pic_device, public device { public: // construction/destruction - midway_serial_pic2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midway_serial_pic2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_yearoffs(int yearoffs) { m_yearoffs = yearoffs; } @@ -116,7 +116,7 @@ public: void set_default_nvram(const uint8_t *nvram); protected: - midway_serial_pic2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + midway_serial_pic2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -159,7 +159,7 @@ class midway_ioasic_device : public midway_serial_pic2_device { public: // construction/destruction - midway_ioasic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + midway_ioasic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_shuffle(uint8_t shuffle) { m_shuffle_type = shuffle; } void set_shuffle_default(uint8_t shuffle) { m_shuffle_default = shuffle; } diff --git a/src/mame/midway/midwunit.cpp b/src/mame/midway/midwunit.cpp index 76309e9bd41..ff5817fe0fb 100644 --- a/src/mame/midway/midwunit.cpp +++ b/src/mame/midway/midwunit.cpp @@ -627,7 +627,7 @@ void midwunit_state::wunit(machine_config &config) { MIDWUNIT_VIDEO(config, m_video, m_maincpu, m_palette, m_gfxrom); - TMS34010(config, m_maincpu, 50000000); + TMS34010(config, m_maincpu, XTAL::u(50000000)); m_maincpu->set_addrmap(AS_PROGRAM, &midwunit_state::main_map); m_maincpu->set_halt_on_reset(false); /* halt on reset */ m_maincpu->set_pixel_clock(PIXEL_CLOCK); /* pixel clock */ @@ -649,20 +649,20 @@ void midwunit_state::wunit(machine_config &config) screen.set_palette(m_palette); /* sound hardware */ - DCS_AUDIO_8K(config, m_dcs, 0); + DCS_AUDIO_8K(config, m_dcs); } void midwunit_state::wunit_picsim(machine_config &config) { wunit(config); - MIDWAY_SERIAL_PIC(config, m_midway_serial_pic, 0); + MIDWAY_SERIAL_PIC(config, m_midway_serial_pic); m_midway_serial_pic->set_upper(528); // this is actually development PIC code, all games check for in addition to their own game specific code! } void midwunit_state::wunit_picemu(machine_config &config) { wunit(config); - MIDWAY_SERIAL_PIC_EMU(config, m_midway_serial_pic_emu, 0); + MIDWAY_SERIAL_PIC_EMU(config, m_midway_serial_pic_emu); } diff --git a/src/mame/midway/midxunit.cpp b/src/mame/midway/midxunit.cpp index 6369f266cf8..5e07529110c 100644 --- a/src/mame/midway/midxunit.cpp +++ b/src/mame/midway/midxunit.cpp @@ -271,7 +271,7 @@ void midxunit_state::midxunit(machine_config &config) MIDXUNIT_VIDEO(config, m_video, m_maincpu, m_palette, m_gfxrom); /* basic machine hardware */ - TMS34020(config, m_maincpu, 40000000); + TMS34020(config, m_maincpu, XTAL::u(40000000)); m_maincpu->set_addrmap(AS_PROGRAM, &midxunit_state::main_map); m_maincpu->set_halt_on_reset(false); /* halt on reset */ m_maincpu->set_pixel_clock(PIXEL_CLOCK); /* pixel clock */ @@ -291,7 +291,7 @@ void midxunit_state::midxunit(machine_config &config) screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_ind16)); screen.set_palette(m_palette); - PIC16C57(config, m_pic, 625000); // need to be verified + PIC16C57(config, m_pic, XTAL::u(625000)); // need to be verified m_pic->read_a().set([this]() { return m_pic_command; }); m_pic->write_b().set([this](u8 data) { m_pic_data = data; }); m_pic->read_c().set([this]() { return m_pic_clk ^ 1; }); @@ -308,7 +308,7 @@ void midxunit_state::midxunit(machine_config &config) adc.ch6_callback().set_ioport("AN5"); /* sound hardware */ - DCS_AUDIO_2K_UART(config, m_dcs, 0); + DCS_AUDIO_2K_UART(config, m_dcs); } diff --git a/src/mame/midway/midzeus.cpp b/src/mame/midway/midzeus.cpp index 969e16115b0..07fc33e56ba 100644 --- a/src/mame/midway/midzeus.cpp +++ b/src/mame/midway/midzeus.cpp @@ -1278,9 +1278,9 @@ void midzeus_state::midzeus(machine_config &config) m_screen->set_palette("palette"); /* sound hardware */ - DCS2_AUDIO_2104(config, "dcs", 0); + DCS2_AUDIO_2104(config, "dcs"); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_yearoffs(94); } @@ -1295,7 +1295,7 @@ void midzeus_state::mk4(machine_config &config) void midzeus_state::invasn(machine_config &config) { midzeus(config); - PIC16C57(config, "pic", 8000000); /* ? */ + PIC16C57(config, "pic", XTAL::u(8000000)); /* ? */ m_ioasic->set_upper(468/* or 488 */); } @@ -1317,20 +1317,20 @@ void midzeus2_state::midzeus2(machine_config &config) m_zeus->irq_callback().set(FUNC(midzeus2_state::zeus_irq)); /* sound hardware */ - DCS2_AUDIO_2104(config, "dcs", 0); + DCS2_AUDIO_2104(config, "dcs"); - M48T35(config, m_m48t35, 0); + M48T35(config, m_m48t35); /* I/O hardware */ - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_yearoffs(99); m_ioasic->set_upper(474); - IBM21S851(config, m_fw_phy, 0); + IBM21S851(config, m_fw_phy); m_fw_phy->reset_cb().set(m_fw_link, FUNC(tsb12lv01a_device::phy_reset_w)); - TSB12LV01A(config, m_fw_link, 0); + TSB12LV01A(config, m_fw_link); m_fw_link->int_cb().set(FUNC(midzeus2_state::firewire_irq)); m_fw_link->phy_read().set(m_fw_phy, FUNC(ibm21s851_device::read)); m_fw_link->phy_write().set(m_fw_phy, FUNC(ibm21s851_device::write)); @@ -1345,7 +1345,7 @@ void midzeus2_state::crusnexo(machine_config &config) void midzeus2_state::thegrid(machine_config &config) { midzeus2(config); - PIC16C57(config, "pic", 8000000).set_disable(); // unverified clock, not hooked up + PIC16C57(config, "pic", XTAL::u(8000000)).set_disable(); // unverified clock, not hooked up m_ioasic->set_upper(474/* or 491 */); } diff --git a/src/mame/midway/omegrace.cpp b/src/mame/midway/omegrace.cpp index 717eabbf8f1..d7e06c9f3d1 100644 --- a/src/mame/midway/omegrace.cpp +++ b/src/mame/midway/omegrace.cpp @@ -561,14 +561,14 @@ void omegrace_state::omegrace(machine_config &config) WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_hz(12_MHz_XTAL/16/256/256)); /* video hardware */ - VECTOR(config, "vector", 0); + VECTOR(config, "vector"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR)); screen.set_refresh_hz(40); screen.set_size(400, 300); screen.set_visarea(522, 1566, 522, 1566); screen.set_screen_update("vector", FUNC(vector_device::screen_update)); - DVG(config, m_dvg, 0); + DVG(config, m_dvg); m_dvg->set_vector("vector"); m_dvg->set_memory(m_maincpu, AS_PROGRAM, 0x8000); diff --git a/src/mame/midway/pinball2k.cpp b/src/mame/midway/pinball2k.cpp index 8309ae69b1f..a5d3e04059a 100644 --- a/src/mame/midway/pinball2k.cpp +++ b/src/mame/midway/pinball2k.cpp @@ -616,20 +616,20 @@ void pinball2k_state::ramdac_map(address_map &map) void pinball2k_state::mediagx(machine_config &config) { /* basic machine hardware */ - MEDIAGX(config, m_maincpu, 166000000); + MEDIAGX(config, m_maincpu, XTAL::u(166000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pinball2k_state::mediagx_map); m_maincpu->set_addrmap(AS_IO, &pinball2k_state::mediagx_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); pcat_common(config); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(18, FUNC(pinball2k_state::cx5510_pci_r), FUNC(pinball2k_state::cx5510_pci_w)); ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); - RAMDAC(config, m_ramdac, 0, m_palette); + RAMDAC(config, m_ramdac, m_palette); m_ramdac->set_addrmap(0, &pinball2k_state::ramdac_map); /* video hardware */ diff --git a/src/mame/midway/seattle.cpp b/src/mame/midway/seattle.cpp index 381ed7a6060..b3d506b62fe 100644 --- a/src/mame/midway/seattle.cpp +++ b/src/mame/midway/seattle.cpp @@ -228,7 +228,7 @@ namespace { * *************************************/ -#define SYSTEM_CLOCK 50000000 +#define SYSTEM_CLOCK XTAL::u(50000000) #define PCI_ID_GALILEO "pci:00.0" #define PCI_ID_VIDEO "pci:08.0" @@ -2018,7 +2018,7 @@ void seattle_state::seattle_common(machine_config &config) m_maincpu->set_system_clock(SYSTEM_CLOCK); // PCI Bus Devices - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); GT64010(config, m_galileo, SYSTEM_CLOCK, m_maincpu, GALILEO_IRQ_NUM); m_galileo->set_map(0, address_map_constructor(&seattle_state::seattle_cs0_map, "seattle_cs0_map", this), this); @@ -2033,7 +2033,7 @@ void seattle_state::seattle_common(machine_config &config) ide.subdevice("ide")->slot(0).set_option_machine_config("hdd", hdd_config); // video hardware - VOODOO_1_PCI(config, m_voodoo, 0, m_maincpu, m_screen); + VOODOO_1_PCI(config, m_voodoo, m_maincpu, m_screen); m_voodoo->set_fbmem(2); m_voodoo->set_tmumem(4, 0); m_voodoo->set_status_cycles(1000); // optimization to consume extra cycles when polling status @@ -2087,7 +2087,7 @@ void seattle_state::seattle150_widget(machine_config &config) m_galileo->set_map(3, address_map_constructor(&seattle_state::widget_cs3_map, "widget_cs3_map", this), this); - SMC91C94(config, m_ethernet, 0); + SMC91C94(config, m_ethernet); m_ethernet->irq_handler().set(FUNC(seattle_state::ethernet_interrupt)); } @@ -2105,7 +2105,7 @@ void seattle_state::seattle200_widget(machine_config &config) m_galileo->set_map(3, address_map_constructor(&seattle_state::widget_cs3_map, "widget_cs3_map", this), this); - SMC91C94(config, m_ethernet, 0); + SMC91C94(config, m_ethernet); m_ethernet->irq_handler().set(FUNC(seattle_state::ethernet_interrupt)); } @@ -2115,7 +2115,7 @@ void seattle_state::flagstaff(machine_config &config) m_galileo->set_map(3, address_map_constructor(&seattle_state::flagstaff_cs3_map, "flagstaff_cs3_map", this), this); - SMC91C94(config, m_ethernet, 0); + SMC91C94(config, m_ethernet); m_ethernet->irq_handler().set(FUNC(seattle_state::ethernet_interrupt)); m_voodoo->set_fbmem(2); @@ -2128,11 +2128,11 @@ void seattle_state::flagstaff(machine_config &config) void seattle_state::wg3dh(machine_config &config) { phoenix(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x3839); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_upper(310); // no alternates m_ioasic->set_yearoffs(80); @@ -2142,11 +2142,11 @@ void seattle_state::wg3dh(machine_config &config) void seattle_state::mace(machine_config &config) { seattle150(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x3839); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_MACE); m_ioasic->set_upper(319); // or 314 m_ioasic->set_yearoffs(80); @@ -2163,7 +2163,7 @@ void seattle_state::sfrush(machine_config &config) SPEAKER(config, "rrspeaker").headrest_right(); //SPEAKER(config, "subwoofer").seat(); Not implemented, Quad Amp PCB output; - atari_cage_seattle_device &cage(ATARI_CAGE_SEATTLE(config, "cage", 0)); + atari_cage_seattle_device &cage(ATARI_CAGE_SEATTLE(config, "cage")); cage.set_speedup(0x5236); cage.irq_handler().set(m_ioasic, FUNC(midway_ioasic_device::cage_irq_handler)); // TODO: copied from atarigt.cpp; Same configurations as T-Mek? @@ -2172,7 +2172,7 @@ void seattle_state::sfrush(machine_config &config) cage.add_route(2, "flspeaker", 1.0); // Foward Left cage.add_route(3, "rrspeaker", 1.0); // Back Right - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_upper(315); // no alternates m_ioasic->set_yearoffs(100); @@ -2190,7 +2190,7 @@ void seattle_state::sfrushrk(machine_config &config) SPEAKER(config, "rrspeaker").headrest_right(); //SPEAKER(config, "subwoofer").seat(); Not implemented, Quad Amp PCB output; - atari_cage_seattle_device &cage(ATARI_CAGE_SEATTLE(config, "cage", 0)); + atari_cage_seattle_device &cage(ATARI_CAGE_SEATTLE(config, "cage")); cage.set_speedup(0x5329); cage.irq_handler().set(m_ioasic, FUNC(midway_ioasic_device::cage_irq_handler)); // TODO: copied from atarigt.cpp; Same configurations as T-Mek? @@ -2200,7 +2200,7 @@ void seattle_state::sfrushrk(machine_config &config) cage.add_route(3, "rrspeaker", 1.0); // Back Right - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_SFRUSHRK); m_ioasic->set_upper(331); // no alternates m_ioasic->set_yearoffs(100); @@ -2217,11 +2217,11 @@ void seattle_state::sfrushrkw(machine_config &config) void seattle_state::calspeed(machine_config &config) { seattle150_widget(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x39c0); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_CALSPEED); m_ioasic->set_upper(328); // 328 = 27"; may or may not have a 31" ID m_ioasic->set_yearoffs(100); @@ -2232,11 +2232,11 @@ void seattle_state::calspeed(machine_config &config) void seattle_state::vaportrx(machine_config &config) { seattle200_widget(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x39c2); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_VAPORTRX); m_ioasic->set_upper(324); // or 334 m_ioasic->set_yearoffs(100); @@ -2246,11 +2246,11 @@ void seattle_state::vaportrx(machine_config &config) void seattle_state::biofreak(machine_config &config) { seattle150(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x3835); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_upper(231); // no alternates m_ioasic->set_yearoffs(80); @@ -2260,11 +2260,11 @@ void seattle_state::biofreak(machine_config &config) void seattle_state::blitz(machine_config &config) { seattle150(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x39c2); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); m_ioasic->set_upper(444); // or 528 m_ioasic->set_yearoffs(80); @@ -2275,11 +2275,11 @@ void seattle_state::blitz(machine_config &config) void seattle_state::blitz99(machine_config &config) { seattle150(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x0afb); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); m_ioasic->set_upper(481); // or 484 or 520 m_ioasic->set_yearoffs(80); @@ -2290,11 +2290,11 @@ void seattle_state::blitz99(machine_config &config) void seattle_state::blitz2k(machine_config &config) { seattle150(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); m_ioasic->set_upper(494); // or 498 m_ioasic->set_yearoffs(80); @@ -2307,11 +2307,11 @@ void seattle_state::carnevil(machine_config &config) seattle150(config); m_galileo->set_map(3, address_map_constructor(&seattle_state::carnevil_cs3_map, "carnevil_cs3_map", this), this); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x0af7); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_CARNEVIL); m_ioasic->set_upper(469); // 469 = 25"; 486 = 39"; m_ioasic->set_yearoffs(80); @@ -2321,11 +2321,11 @@ void seattle_state::carnevil(machine_config &config) void seattle_state::hyprdriv(machine_config &config) { seattle200_widget(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(2); dcs.set_polling_offset(0x0af7); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_HYPRDRIV); m_ioasic->set_upper(471); // 471 = 25"; 479 = 31" m_ioasic->set_yearoffs(80); diff --git a/src/mame/midway/sente6vb.cpp b/src/mame/midway/sente6vb.cpp index dab50609128..792659ef0eb 100644 --- a/src/mame/midway/sente6vb.cpp +++ b/src/mame/midway/sente6vb.cpp @@ -107,7 +107,7 @@ void sente6vb_device::device_add_mconfig(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &sente6vb_device::mem_map); m_audiocpu->set_addrmap(AS_IO, &sente6vb_device::io_map); - ACIA6850(config, m_uart, 0); + ACIA6850(config, m_uart); m_uart->txd_handler().set([this] (int state) { m_send_cb(state); }); m_uart->irq_handler().set([this] (int state) { m_uint = bool(state); }); @@ -116,9 +116,9 @@ void sente6vb_device::device_add_mconfig(machine_config &config) uartclock.signal_handler().append(m_uart, FUNC(acia6850_device::write_txc)); uartclock.signal_handler().append(m_uart, FUNC(acia6850_device::write_rxc)); - TIMER(config, m_counter_0_timer, 0).configure_generic(FUNC(sente6vb_device::clock_counter_0_ff)); + TIMER(config, m_counter_0_timer).configure_generic(FUNC(sente6vb_device::clock_counter_0_ff)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->out_handler<0>().set(FUNC(sente6vb_device::counter_0_set_out)); m_pit->out_handler<2>().set_inputline(m_audiocpu, INPUT_LINE_IRQ0); m_pit->set_clk<1>(8_MHz_XTAL / 4); @@ -126,13 +126,13 @@ void sente6vb_device::device_add_mconfig(machine_config &config) SPEAKER(config, "mono").front_center(); - mm5837_stream_device &noise(MM5837_STREAM(config, "noise", 0)); + mm5837_stream_device &noise(MM5837_STREAM(config, "noise")); // noise.set_vdd(-6.5); // seems too low -- possible the mapping in mm5837 is wrong noise.set_vdd(-8.0); for (auto &cem_device : m_cem_device) { - CEM3394(config, cem_device, 0); + CEM3394(config, cem_device); cem_device->set_vco_zero_freq(431.894); cem_device->set_filter_zero_freq(1300.0); cem_device->add_route(ALL_OUTPUTS, "mono", 0.90); @@ -165,7 +165,7 @@ const tiny_rom_entry *sente6vb_device::device_rom_region() const * *************************************/ -sente6vb_device::sente6vb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sente6vb_device::sente6vb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SENTE6VB, tag, owner, clock), m_pit(*this, "pit"), m_counter_0_timer(*this, "8253_0_timer"), diff --git a/src/mame/midway/sente6vb.h b/src/mame/midway/sente6vb.h index ee199817360..a47a0f1c372 100644 --- a/src/mame/midway/sente6vb.h +++ b/src/mame/midway/sente6vb.h @@ -26,7 +26,7 @@ class sente6vb_device : public device_t static constexpr uint32_t POLY17_ADD = 0x18000; public: - sente6vb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sente6vb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto send_cb() { return m_send_cb.bind(); } auto clock_out_cb() { return m_clock_out_cb.bind(); } diff --git a/src/mame/midway/spyhuntertec.cpp b/src/mame/midway/spyhuntertec.cpp index a8da13b7afc..71880f6182f 100644 --- a/src/mame/midway/spyhuntertec.cpp +++ b/src/mame/midway/spyhuntertec.cpp @@ -677,7 +677,7 @@ void spyhuntertec_state::spyhuntertec(machine_config &config) // 2 XTALs: one 20MHz, other one near maincpu ?MHz /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); // NEC D780C-2 (rated 6MHz) + Z80(config, m_maincpu, XTAL::u(4000000)); // NEC D780C-2 (rated 6MHz) m_maincpu->set_addrmap(AS_PROGRAM, &spyhuntertec_state::spyhuntertec_map); m_maincpu->set_addrmap(AS_IO, &spyhuntertec_state::spyhuntertec_portmap); m_maincpu->set_vblank_int("screen", FUNC(spyhuntertec_state::irq0_line_hold)); @@ -696,7 +696,7 @@ void spyhuntertec_state::spyhuntertec(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_spyhuntertec); PALETTE(config, m_palette).set_entries(64+4); // FUNC(spyhuntertec_state::spyhunt) - Z80(config, m_audiocpu, 4000000); // SGS Z8400B1 (rated 2.5MHz?) + Z80(config, m_audiocpu, XTAL::u(4000000)); // SGS Z8400B1 (rated 2.5MHz?) m_audiocpu->set_addrmap(AS_PROGRAM, &spyhuntertec_state::spyhuntertec_sound_map); m_audiocpu->set_addrmap(AS_IO, &spyhuntertec_state::spyhuntertec_sound_portmap); m_audiocpu->set_periodic_int(FUNC(spyhuntertec_state::irq0_line_assert), attotime::from_hz(1000)); diff --git a/src/mame/midway/sspeedr.cpp b/src/mame/midway/sspeedr.cpp index 219e20b2918..81fbda4769f 100644 --- a/src/mame/midway/sspeedr.cpp +++ b/src/mame/midway/sspeedr.cpp @@ -269,7 +269,7 @@ void sspeedr_state::sspeedr(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(sspeedr)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/midway/tmaster.cpp b/src/mame/midway/tmaster.cpp index 3cadd56147d..6e57f26e521 100644 --- a/src/mame/midway/tmaster.cpp +++ b/src/mame/midway/tmaster.cpp @@ -384,7 +384,7 @@ void tmaster_state::tm(machine_config &config) m_duart->irq_cb().set(FUNC(tmaster_state::duart_irq_handler)); m_duart->a_tx_cb().set(m_microtouch, FUNC(microtouch_device::rx)); - MICROTOUCH(config, m_microtouch, 9600).stx().set(m_duart, FUNC(mc68681_device::rx_a_w)); + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(m_duart, FUNC(mc68681_device::rx_a_w)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -412,7 +412,7 @@ void tmaster_state::tm(machine_config &config) void tmaster_state::tmds1204(machine_config &config) { tm(config); - DS1204(config, "ds1204", 0); + DS1204(config, "ds1204"); } /*************************************************************************** diff --git a/src/mame/midway/vegas.cpp b/src/mame/midway/vegas.cpp index 14cfd262fe3..019b527e3d1 100644 --- a/src/mame/midway/vegas.cpp +++ b/src/mame/midway/vegas.cpp @@ -1912,7 +1912,7 @@ void vegas_state::vegascore(machine_config &config) m_maincpu->set_system_clock(vegas_state::SYSTEM_CLOCK); // PCI Bus Devices - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); VRC5074(config, m_nile, 100000000, m_maincpu); m_nile->set_sdram_size(0, 0x00800000); @@ -1923,13 +1923,13 @@ void vegas_state::vegascore(machine_config &config) m_nile->set_map(6, address_map_constructor(&vegas_state::vegas_cs6_map, "vegas_cs6_map", this), this); m_nile->set_map(7, address_map_constructor(&vegas_state::vegas_cs7_map, "vegas_cs7_map", this), this); - ide_pci_device &ide(IDE_PCI(config, PCI_ID_IDE, 0, 0x10950646, 0x05, 0x0)); + ide_pci_device &ide(IDE_PCI(config, PCI_ID_IDE, 0x10950646, 0x05, 0x0)); ide.irq_handler().set(PCI_ID_NILE, FUNC(vrc5074_device::pci_intr_d)); //ide.set_pif(0x8f); ide.subdevice("ide")->slot(0).set_option_machine_config("hdd", hdd_config); // video hardware - voodoo_2_pci_device &voodoo(VOODOO_2_PCI(config, PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo_2_pci_device &voodoo(VOODOO_2_PCI(config, PCI_ID_VIDEO, m_maincpu, "screen")); voodoo.set_fbmem(2); voodoo.set_tmumem(4, 4); voodoo.set_status_cycles(1000); // optimization to consume extra cycles when polling status @@ -1939,7 +1939,7 @@ void vegas_state::vegascore(machine_config &config) m_timekeeper->reset_cb().set(FUNC(vegas_state::watchdog_reset)); m_timekeeper->irq_cb().set(FUNC(vegas_state::watchdog_irq)); - SMC91C94(config, m_ethernet, 0); + SMC91C94(config, m_ethernet); m_ethernet->irq_handler().set(FUNC(vegas_state::ethernet_interrupt)); // screen @@ -1985,7 +1985,7 @@ void vegas_state::vegas32m(machine_config &config) void vegas_state::vegasban(machine_config &config) { vegas32m(config); - voodoo_banshee_pci_device &voodoo(VOODOO_BANSHEE_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo_banshee_pci_device &voodoo(VOODOO_BANSHEE_PCI(config.replace(), PCI_ID_VIDEO, m_maincpu, "screen")); voodoo.set_fbmem(16); voodoo.set_status_cycles(1000); // optimization to consume extra cycles when polling status subdevice(PCI_ID_VIDEO":voodoo")->vblank_callback().set(FUNC(vegas_state::vblank_assert)); @@ -2000,7 +2000,7 @@ void vegas_state::vegasv3(machine_config &config) m_maincpu->set_dcache_size(16384); m_maincpu->set_system_clock(vegas_state::SYSTEM_CLOCK); - voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, m_maincpu, "screen")); voodoo.set_fbmem(16); voodoo.set_status_cycles(1000); // optimization to consume extra cycles when polling status subdevice(PCI_ID_VIDEO":voodoo")->vblank_callback().set(FUNC(vegas_state::vblank_assert)); @@ -2018,7 +2018,7 @@ void vegas_state::denver(machine_config &config) m_nile->set_sdram_size(0, 0x02000000); m_nile->set_map(8, address_map_constructor(&vegas_state::vegas_cs8_map, "vegas_cs8_map", this), this); - voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, 0, m_maincpu, "screen")); + voodoo_3_pci_device &voodoo(VOODOO_3_PCI(config.replace(), PCI_ID_VIDEO, m_maincpu, "screen")); voodoo.set_fbmem(16); voodoo.set_status_cycles(1000); // optimization to consume extra cycles when polling status subdevice(PCI_ID_VIDEO":voodoo")->vblank_callback().set(FUNC(vegas_state::vblank_assert)); @@ -2061,11 +2061,11 @@ void vegas_state::gauntleg(machine_config &config) // Needs 250MHz MIPS or screen tearing occurs (See MT8064) // Firmware frequency detection seems to have a bug, console reports 220MHz for a 200MHz cpu and 260MHz for a 250MHz cpu vegas250(config); - dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_CALSPEED); m_ioasic->set_upper(340); // 340=39", 322=27" others? m_ioasic->set_yearoffs(80); @@ -2077,11 +2077,11 @@ void vegas_state::gauntdl(machine_config &config) { // Needs 250MHz MIPS or screen tearing occurs (See MT8064) vegas250(config); - dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_GAUNTDL); m_ioasic->set_upper(346); // others? m_ioasic->set_yearoffs(80); @@ -2092,11 +2092,11 @@ void vegas_state::gauntdl(machine_config &config) void vegas_state::warfa(machine_config &config) { vegas250(config); - dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_MACE); m_ioasic->set_upper(337); // others? m_ioasic->set_yearoffs(80); @@ -2107,11 +2107,11 @@ void vegas_state::warfa(machine_config &config) void vegas_state::tenthdeg(machine_config &config) { vegas(config); - dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs", 0)); + dcs2_audio_2115_device &dcs(DCS2_AUDIO_2115(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0afb); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_GAUNTDL); m_ioasic->set_upper(330); // others? m_ioasic->set_yearoffs(80); @@ -2122,11 +2122,11 @@ void vegas_state::tenthdeg(machine_config &config) void vegas_state::roadburn(machine_config &config) { vegas32m(config); - dcs2_audio_dsio_device &dcs(DCS2_AUDIO_DSIO(config, "dcs", 0)); + dcs2_audio_dsio_device &dcs(DCS2_AUDIO_DSIO(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0ddd); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_upper(325); // others? m_ioasic->set_yearoffs(80); @@ -2137,11 +2137,11 @@ void vegas_state::roadburn(machine_config &config) void vegas_state::nbashowt(machine_config &config) { vegasban(config); - dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_MACE); // 528 494 478 development pic, 487 NBA m_ioasic->set_upper(487); // or 478 or 487 @@ -2154,11 +2154,11 @@ void vegas_state::nbashowt(machine_config &config) void vegas_state::nbanfl(machine_config &config) { vegasban(config); - dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_BLITZ99); m_ioasic->set_upper(498); // or 478 or 487 m_ioasic->set_yearoffs(80); @@ -2175,11 +2175,11 @@ void vegas_state::nbagold(machine_config &config) m_maincpu->set_dcache_size(32768); m_maincpu->set_system_clock(vegas_state::SYSTEM_CLOCK); m_nile->set_sdram_size(0, 0x00800000); - dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_GAUNTDL); m_ioasic->set_upper(109); // 494 109 ??? m_ioasic->set_yearoffs(80); @@ -2191,11 +2191,11 @@ void vegas_state::nbagold(machine_config &config) void vegas_state::sf2049(machine_config &config) { denver(config); - dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs", 0)); + dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs")); dcs.set_dram_in_mb(8); dcs.set_polling_offset(0x872); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD); m_ioasic->set_upper(336); // others? m_ioasic->set_yearoffs(80); @@ -2207,11 +2207,11 @@ void vegas_state::sf2049(machine_config &config) void vegas_state::sf2049se(machine_config &config) { denver(config); - dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs", 0)); + dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs")); dcs.set_dram_in_mb(8); dcs.set_polling_offset(0x872); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_SFRUSHRK); m_ioasic->set_upper(352); // 352 336 others? m_ioasic->set_yearoffs(80); @@ -2223,11 +2223,11 @@ void vegas_state::sf2049se(machine_config &config) void vegas_state::sf2049te(machine_config &config) { denver(config); - dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs", 0)); + dcs2_audio_denver_5ch_device &dcs(DCS2_AUDIO_DENVER_5CH(config, "dcs")); dcs.set_dram_in_mb(8); dcs.set_polling_offset(0x872); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_SFRUSHRK); m_ioasic->set_upper(348); // others? m_ioasic->set_yearoffs(80); @@ -2239,11 +2239,11 @@ void vegas_state::sf2049te(machine_config &config) void vegas_state::cartfury(machine_config &config) { vegasv3(config); - dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs", 0)); + dcs2_audio_2104_device &dcs(DCS2_AUDIO_2104(config, "dcs")); dcs.set_dram_in_mb(4); dcs.set_polling_offset(0x0b5d); - MIDWAY_IOASIC(config, m_ioasic, 0); + MIDWAY_IOASIC(config, m_ioasic); m_ioasic->set_shuffle(MIDWAY_IOASIC_CARNEVIL); // 433, 495, 490 Development PIC m_ioasic->set_upper(495/*433, 495 others? */); diff --git a/src/mame/midway/williams.cpp b/src/mame/midway/williams.cpp index d1f0aaeb70c..c1b68a558a3 100644 --- a/src/mame/midway/williams.cpp +++ b/src/mame/midway/williams.cpp @@ -1565,24 +1565,24 @@ void williams_state::williams_base(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // mc1408.ic6 + MC1408(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // mc1408.ic6 // pia INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, "soundirq").output_handler().set_inputline(m_soundcpu, M6808_IRQ_LINE); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set_ioport("IN0"); m_pia[0]->readpb_handler().set_ioport("IN1"); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set_ioport("IN2"); m_pia[1]->writepb_handler().set(FUNC(williams_state::snd_cmd_w)); m_pia[1]->irqa_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<0>)); m_pia[1]->irqb_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<1>)); - PIA6821(config, m_pia[2], 0); + PIA6821(config, m_pia[2]); m_pia[2]->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia[2]->irqa_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<0>)); m_pia[2]->irqb_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<1>)); @@ -1637,11 +1637,11 @@ void wms_muxed_state::williams_muxed(machine_config &config) m_pia[0]->cb2_handler().set("mux_0", FUNC(ls157_device::select_w)); m_pia[0]->cb2_handler().append("mux_1", FUNC(ls157_device::select_w)); - LS157(config, m_mux0, 0); // IC3 on interface board (actually LS257 with OC tied low) + LS157(config, m_mux0); // IC3 on interface board (actually LS257 with OC tied low) m_mux0->a_in_callback().set_ioport("INP2"); m_mux0->b_in_callback().set_ioport("INP1"); - LS157(config, m_mux1, 0); // IC4 on interface board (actually LS257 with OC tied low) + LS157(config, m_mux1); // IC4 on interface board (actually LS257 with OC tied low) m_mux1->a_in_callback().set_ioport("INP2A"); m_mux1->b_in_callback().set_ioport("INP1A"); } @@ -1664,7 +1664,7 @@ void spdball_state::spdball(machine_config &config) williams_b1(config); // pia - PIA6821(config, m_pia[3], 0); + PIA6821(config, m_pia[3]); m_pia[3]->readpa_handler().set_ioport("IN3"); m_pia[3]->readpb_handler().set_ioport("IN4"); } @@ -1692,7 +1692,7 @@ void sinistar_state::sinistar(machine_config &config) m_pia[2]->cb2_handler().set("cvsd", FUNC(hc55516_device::clock_w)); // sound hardware - HC55516(config, "cvsd", 0).add_route(ALL_OUTPUTS, "speaker", 0.8); + HC55516(config, "cvsd").add_route(ALL_OUTPUTS, "speaker", 0.8); } void playball_state::playball(machine_config &config) @@ -1703,7 +1703,7 @@ void playball_state::playball(machine_config &config) m_screen->set_visarea(6, 298-1, 8, 240-1); // sound hardware - HC55516(config, "cvsd", 0).add_route(ALL_OUTPUTS, "speaker", 0.8); + HC55516(config, "cvsd").add_route(ALL_OUTPUTS, "speaker", 0.8); // pia m_pia[2]->ca2_handler().set("cvsd", FUNC(hc55516_device::digit_w)); @@ -1724,7 +1724,7 @@ void blaster_state::blastkit(machine_config &config) m_pia[0]->cb2_handler().set("mux_a", FUNC(ls157_x2_device::select_w)); // All multiplexers on Blaster interface board are really LS257 with OC tied to GND (which is equivalent to LS157) - LS157_X2(config, m_muxa, 0); + LS157_X2(config, m_muxa); m_muxa->a_in_callback().set_ioport("IN3"); m_muxa->b_in_callback().set(FUNC(williams_state::port_0_49way_r)); } @@ -1747,7 +1747,7 @@ void blaster_state::blaster(machine_config &config) m_muxa->a_in_callback().set(FUNC(williams_state::port_0_49way_r)); m_muxa->b_in_callback().set_ioport("IN3"); - LS157(config, m_muxb, 0); // IC3 + LS157(config, m_muxb); // IC3 m_muxb->a_in_callback().set_ioport("INP1"); m_muxb->b_in_callback().set_ioport("INP2"); @@ -1756,7 +1756,7 @@ void blaster_state::blaster(machine_config &config) m_pia[1]->writepb_handler().set(FUNC(blaster_state::blaster_snd_cmd_w)); m_pia[2]->writepa_handler().set("ldac", FUNC(dac_byte_interface::data_w)); - PIA6821(config, m_pia[3], 0); + PIA6821(config, m_pia[3]); m_pia[3]->writepa_handler().set("rdac", FUNC(dac_byte_interface::data_w)); m_pia[3]->irqa_handler().set("soundirq_b", FUNC(input_merger_any_high_device::in_w<0>)); m_pia[3]->irqb_handler().set("soundirq_b", FUNC(input_merger_any_high_device::in_w<1>)); @@ -1767,8 +1767,8 @@ void blaster_state::blaster(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MC1408(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC - MC1408(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + MC1408(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC + MC1408(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC } @@ -1803,24 +1803,24 @@ void williams2_state::williams2_base(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + MC1408(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, "soundirq").output_handler().set_inputline(m_soundcpu, M6808_IRQ_LINE); // pia - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set_ioport("IN0"); m_pia[0]->readpb_handler().set_ioport("IN1"); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set_ioport("IN2"); m_pia[1]->writepb_handler().set(FUNC(williams2_state::snd_cmd_w)); m_pia[1]->cb2_handler().set(m_pia[2], FUNC(pia6821_device::ca1_w)); m_pia[1]->irqa_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<0>)); m_pia[1]->irqb_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<1>)); - PIA6821(config, m_pia[2], 0); + PIA6821(config, m_pia[2]); m_pia[2]->writepa_handler().set(m_pia[1], FUNC(pia6821_device::portb_w)); m_pia[2]->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia[2]->ca2_handler().set(m_pia[1], FUNC(pia6821_device::cb1_w)); @@ -1843,7 +1843,7 @@ void inferno_state::inferno(machine_config &config) m_pia[2]->set_port_a_input_overrides_output_mask(0xff); - LS157_X2(config, m_mux, 0); // IC45 (for PA4-PA7) + IC46 (for PA0-PA3) on CPU board + LS157_X2(config, m_mux); // IC45 (for PA4-PA7) + IC46 (for PA0-PA3) on CPU board m_mux->a_in_callback().set_ioport("INP1"); m_mux->b_in_callback().set_ioport("INP2"); } @@ -1883,7 +1883,7 @@ void tshoot_state::tshoot(machine_config &config) m_pia[2]->cb2_handler().set(FUNC(tshoot_state::maxvol_w)); - LS157_X2(config, m_mux, 0); // U2 + U3 on interface board + LS157_X2(config, m_mux); // U2 + U3 on interface board m_mux->a_in_callback().set_ioport("INP1"); m_mux->b_in_callback().set_ioport("INP2"); } @@ -1915,7 +1915,7 @@ void joust2_state::joust2(machine_config &config) m_bg->cb2_cb().set(m_pia[2], FUNC(pia6821_device::cb1_w)); m_pia[2]->cb2_handler().set(m_bg, FUNC(s11_obg_device::resetq_w)); // inverted? - LS157(config, m_mux, 0); + LS157(config, m_mux); m_mux->a_in_callback().set_ioport("INP1"); m_mux->b_in_callback().set_ioport("INP2"); } diff --git a/src/mame/midway/wmg.cpp b/src/mame/midway/wmg.cpp index dfe2a74c48b..bdb4419ac3d 100644 --- a/src/mame/midway/wmg.cpp +++ b/src/mame/midway/wmg.cpp @@ -530,25 +530,25 @@ void wmg_state::wmg(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + MC1408(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC /* pia */ INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, "soundirq").output_handler().set_inputline(m_soundcpu, M6808_IRQ_LINE); - pia6821_device &pia0(PIA6821(config, "pia_0", 0)); + pia6821_device &pia0(PIA6821(config, "pia_0")); pia0.readpa_handler().set_ioport("IN0"); pia0.readpb_handler().set_ioport("IN1"); pia0.cb2_handler().set(FUNC(wmg_state::wmg_port_select_w)); - pia6821_device &pia1(PIA6821(config, "pia_1", 0)); + pia6821_device &pia1(PIA6821(config, "pia_1")); pia1.readpa_handler().set_ioport("IN2"); pia1.writepb_handler().set(FUNC(wmg_state::snd_cmd_w)); pia1.irqa_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<0>)); pia1.irqb_handler().set("mainirq", FUNC(input_merger_any_high_device::in_w<1>)); - pia6821_device &pia2(PIA6821(config, "pia_2", 0)); + pia6821_device &pia2(PIA6821(config, "pia_2")); pia2.writepa_handler().set("dac", FUNC(dac_byte_interface::data_w)); pia2.irqa_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<0>)); pia2.irqb_handler().set("soundirq", FUNC(input_merger_any_high_device::in_w<1>)); diff --git a/src/mame/midway/zwackery.cpp b/src/mame/midway/zwackery.cpp index ec194c18532..2e3fde9eadd 100644 --- a/src/mame/midway/zwackery.cpp +++ b/src/mame/midway/zwackery.cpp @@ -482,7 +482,7 @@ void zwackery_state::machine_start() void zwackery_state::zwackery(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 7652400); // based on counter usage, should be XTAL(16'000'000)/2 + M68000(config, m_maincpu, XTAL::u(7652400)); // based on counter usage, should be XTAL(16'000'000)/2 m_maincpu->set_addrmap(AS_PROGRAM, &zwackery_state::zwackery_map); WATCHDOG_TIMER(config, m_watchdog); @@ -490,19 +490,19 @@ void zwackery_state::zwackery(machine_config &config) PTM6840(config, m_ptm, 7652400 / 10); m_ptm->irq_callback().set_inputline("maincpu", 6); - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpb_handler().set_ioport("IN0"); m_pia0->writepa_handler().set(FUNC(zwackery_state::pia0_porta_w)); m_pia0->irqa_handler().set(FUNC(zwackery_state::pia0_irq_w)); m_pia0->irqb_handler().set(FUNC(zwackery_state::pia0_irq_w)); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set_ioport("IN1"); m_pia1->writepa_handler().set(FUNC(zwackery_state::pia1_porta_w)); m_pia1->readpb_handler().set(FUNC(zwackery_state::pia1_portb_r)); m_pia1->ca2_handler().set(m_cheap_squeak_deluxe, FUNC(midway_cheap_squeak_deluxe_device::sirq_w)); - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); m_pia2->readpa_handler().set_ioport("IN3"); m_pia2->readpb_handler().set_ioport("DSW"); diff --git a/src/mame/miltonbradley/microvsn.cpp b/src/mame/miltonbradley/microvsn.cpp index 37228530692..f61e144689b 100644 --- a/src/mame/miltonbradley/microvsn.cpp +++ b/src/mame/miltonbradley/microvsn.cpp @@ -445,14 +445,14 @@ INPUT_PORTS_END void microvision_state::microvision(machine_config &config) { /* basic machine hardware */ - TMS1100(config, m_tms1100, 0); + TMS1100(config, m_tms1100); m_tms1100->set_output_pla(microvision_output_pla[0]); m_tms1100->set_decode_micro().set(FUNC(microvision_state::tms1100_decode_micro)); m_tms1100->read_k().set(FUNC(microvision_state::tms1100_k_r)); m_tms1100->write_o().set(FUNC(microvision_state::tms1100_o_w)); m_tms1100->write_r().set(FUNC(microvision_state::tms1100_r_w)); - I8021(config, m_i8021, 0); + I8021(config, m_i8021); m_i8021->bus_in_cb().set(FUNC(microvision_state::i8021_p0_r)); m_i8021->bus_out_cb().set(FUNC(microvision_state::i8021_p0_w)); m_i8021->p1_out_cb().set(FUNC(microvision_state::i8021_p1_w)); @@ -478,7 +478,7 @@ void microvision_state::microvision(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_2BIT_ONES_COMPLEMENT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_2BIT_ONES_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); /* cartridge */ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "microvision_cart"); diff --git a/src/mame/miltonbradley/milton6805.cpp b/src/mame/miltonbradley/milton6805.cpp index 914a230763d..7e24711cce8 100644 --- a/src/mame/miltonbradley/milton6805.cpp +++ b/src/mame/miltonbradley/milton6805.cpp @@ -82,7 +82,7 @@ void milton_state::machine_start() class milton_filter_device : public device_t, public device_sound_interface { public: - milton_filter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + milton_filter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; @@ -96,7 +96,7 @@ private: DEFINE_DEVICE_TYPE(MILTON_LED_FILTER, milton_filter_device, "milton_led_filter", "Milton LED Filter") -milton_filter_device::milton_filter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +milton_filter_device::milton_filter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MILTON_LED_FILTER, tag, owner, clock), device_sound_interface(mconfig, *this), m_led_out(*this, "led") diff --git a/src/mame/miltonbradley/vectrex.cpp b/src/mame/miltonbradley/vectrex.cpp index 80a1b1de1b9..531e1531752 100644 --- a/src/mame/miltonbradley/vectrex.cpp +++ b/src/mame/miltonbradley/vectrex.cpp @@ -102,7 +102,7 @@ void vectrex_base_state::vectrex_base(machine_config &config) MC6809(config, m_maincpu, 6_MHz_XTAL); // 68A09 /* video hardware */ - VECTOR(config, m_vector, 0); + VECTOR(config, m_vector); SCREEN(config, m_screen, SCREEN_TYPE_VECTOR); m_screen->set_refresh_hz(60); m_screen->set_size(400, 300); @@ -111,7 +111,7 @@ void vectrex_base_state::vectrex_base(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - MC1408(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // mc1408.ic301 (also used for vector generation) + MC1408(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); // mc1408.ic301 (also used for vector generation) AY8912(config, m_ay8912, 6_MHz_XTAL / 4); m_ay8912->port_a_read_callback().set_ioport("BUTTONS"); @@ -135,7 +135,7 @@ void vectrex_state::vectrex(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &vectrex_state::vectrex_map); - vectrex_cart_slot_device &slot(VECTREX_CART_SLOT(config, "cartslot", 0)); + vectrex_cart_slot_device &slot(VECTREX_CART_SLOT(config, "cartslot")); vectrex_cart(slot); /* software lists */ diff --git a/src/mame/mips/mips.cpp b/src/mame/mips/mips.cpp index 99fb749196b..a36ce2e5d9c 100644 --- a/src/mame/mips/mips.cpp +++ b/src/mame/mips/mips.cpp @@ -775,7 +775,7 @@ void rx2030_state::rx2030(machine_config &config) MC146818(config, m_rtc, 32.768_kHz_XTAL); // parallel port - Z8038(config, m_fio, 0); + Z8038(config, m_fio); m_fio->out_int_cb<1>().set_inputline(m_iop, INPUT_LINE_IRQ4); // keyboard connector diff --git a/src/mame/mips/mips_rambo.cpp b/src/mame/mips/mips_rambo.cpp index 892575ced58..3b61cf4b8d0 100644 --- a/src/mame/mips/mips_rambo.cpp +++ b/src/mame/mips/mips_rambo.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(MIPS_RAMBO, mips_rambo_device, "mips_rambo", "MIPS RAMBO") -mips_rambo_device::mips_rambo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mips_rambo_device::mips_rambo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MIPS_RAMBO, tag, owner, clock) , m_ram(*this, finder_base::DUMMY_TAG) , m_irq_out_cb(*this) diff --git a/src/mame/mips/mips_rambo.h b/src/mame/mips/mips_rambo.h index 540b5d80391..14520222a6e 100644 --- a/src/mame/mips/mips_rambo.h +++ b/src/mame/mips/mips_rambo.h @@ -12,7 +12,7 @@ class mips_rambo_device : public device_t { public: - mips_rambo_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mips_rambo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto irq_out() { return m_irq_out_cb.bind(); } diff --git a/src/mame/misc/39in1.cpp b/src/mame/misc/39in1.cpp index 874d1763514..2a3c62e018a 100644 --- a/src/mame/misc/39in1.cpp +++ b/src/mame/misc/39in1.cpp @@ -350,12 +350,12 @@ void _39in1_state::init_pokrwild() { decrypt(0x20, 0x00, 0x00, 0x40, 0x08, 0x00 void _39in1_state::base(machine_config &config) { - PXA255(config, m_maincpu, 200'000'000); + PXA255(config, m_maincpu, XTAL::u(200'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &_39in1_state::base_map); EEPROM_93C66_16BIT(config, "eeprom"); - PXA255_PERIPHERALS(config, m_pxa_periphs, 200'000'000, m_maincpu); + PXA255_PERIPHERALS(config, m_pxa_periphs, XTAL::u(200'000'000), m_maincpu); m_pxa_periphs->gpio0_write().set(FUNC(_39in1_state::eeprom_w)); m_pxa_periphs->gpio0_read().set(FUNC(_39in1_state::eeprom_r)); m_pxa_periphs->gpio1_read().set_ioport("DSW").lshift(21); diff --git a/src/mame/misc/4enlinea.cpp b/src/mame/misc/4enlinea.cpp index ce5085e0302..b74b1860ac8 100644 --- a/src/mame/misc/4enlinea.cpp +++ b/src/mame/misc/4enlinea.cpp @@ -278,7 +278,7 @@ class isa8_cga_4enlinea_device : public isa8_cga_device { public: // construction/destruction - isa8_cga_4enlinea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_4enlinea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t _4enlinea_io_read (offs_t offset); void _4enlinea_mode_control_w(uint8_t data); @@ -295,7 +295,7 @@ const tiny_rom_entry *isa8_cga_4enlinea_device::device_rom_region() const DEFINE_DEVICE_TYPE(ISA8_CGA_4ENLINEA, isa8_cga_4enlinea_device, "4enlinea_cga", "ISA8 CGA - 4enlinea") -isa8_cga_4enlinea_device::isa8_cga_4enlinea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_4enlinea_device::isa8_cga_4enlinea_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device( mconfig, ISA8_CGA_4ENLINEA, tag, owner, clock) { } @@ -613,11 +613,11 @@ void _4enlinea_state::_4enlinea(machine_config &config) I2C_24C16(config, m_eeprom); // X24C16P // FIXME: determine ISA bus clock - isa8_device &isa(ISA8(config, "isa", 0)); + isa8_device &isa(ISA8(config, "isa")); isa.set_memspace("maincpu", AS_PROGRAM); isa.set_iospace("maincpu", AS_IO); - ISA8_SLOT(config, "isa1", 0, "isa", _4enlinea_isa8_cards, "4enlinea", true); + ISA8_SLOT(config, "isa1", "isa", _4enlinea_isa8_cards, "4enlinea", true); /* 6845 clock is a guess, since it's a UM6845R embedded in the UM487F. @@ -648,11 +648,11 @@ void _4enlinea_state::k7_olym(machine_config &config) I2C_24C16(config, m_eeprom); // X24C16P - isa8_device &isa(ISA8(config, "isa", 0)); + isa8_device &isa(ISA8(config, "isa")); isa.set_memspace("maincpu", AS_PROGRAM); isa.set_iospace("maincpu", AS_IO); - ISA8_SLOT(config, "isa1", 0, "isa", _4enlinea_isa8_cards, "4enlinea", true); // UM487F + ISA8_SLOT(config, "isa1", "isa", _4enlinea_isa8_cards, "4enlinea", true); // UM487F SPEAKER(config, "mono").front_center(); AY8910(config, m_ay, 14.318181_MHz_XTAL / 8); // Winbond WF19054 diff --git a/src/mame/misc/5clown.cpp b/src/mame/misc/5clown.cpp index e0bb680ea8c..532e29e51b8 100644 --- a/src/mame/misc/5clown.cpp +++ b/src/mame/misc/5clown.cpp @@ -1028,12 +1028,12 @@ void _5clown_state::fclown(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - pia6821_device &pia0(PIA6821(config, "pia0", 0)); + pia6821_device &pia0(PIA6821(config, "pia0")); pia0.readpa_handler().set(FUNC(_5clown_state::mux_port_r)); pia0.readpb_handler().set(FUNC(_5clown_state::pia0_b_r)); pia0.writepb_handler().set(FUNC(_5clown_state::counters_w)); - pia6821_device &pia1(PIA6821(config, "pia1", 0)); + pia6821_device &pia1(PIA6821(config, "pia1")); pia1.readpa_handler().set_ioport("SW4"); pia1.readpb_handler().set(FUNC(_5clown_state::pia1_b_r)); pia1.writepa_handler().set(FUNC(_5clown_state::trigsnd_w)); diff --git a/src/mame/misc/ace_sp_reelctrl.cpp b/src/mame/misc/ace_sp_reelctrl.cpp index dbec9211045..ab18fb35df5 100644 --- a/src/mame/misc/ace_sp_reelctrl.cpp +++ b/src/mame/misc/ace_sp_reelctrl.cpp @@ -11,18 +11,18 @@ DEFINE_DEVICE_TYPE(ACE_SP_REELCTRL, ace_sp_reelctrl_device, "ace_sp_reelctrl", "ACE sp.ACE Reel Controller PCB") DEFINE_DEVICE_TYPE(ACE_SP_REELCTRL_PCP, ace_sp_reelctrl_pcp_device, "ace_sp_reelctrl_pcp", "ACE sp.ACE Reel Controller PCB (PCP clone)") -ace_sp_reelctrl_base_device::ace_sp_reelctrl_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +ace_sp_reelctrl_base_device::ace_sp_reelctrl_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_mcu(*this, "mcu") { } -ace_sp_reelctrl_device::ace_sp_reelctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ace_sp_reelctrl_device::ace_sp_reelctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ace_sp_reelctrl_base_device(mconfig, ACE_SP_REELCTRL, tag, owner, clock) { } -ace_sp_reelctrl_pcp_device::ace_sp_reelctrl_pcp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ace_sp_reelctrl_pcp_device::ace_sp_reelctrl_pcp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ace_sp_reelctrl_base_device(mconfig, ACE_SP_REELCTRL_PCP, tag, owner, clock) { } diff --git a/src/mame/misc/ace_sp_reelctrl.h b/src/mame/misc/ace_sp_reelctrl.h index 949e4755382..230394e58a8 100644 --- a/src/mame/misc/ace_sp_reelctrl.h +++ b/src/mame/misc/ace_sp_reelctrl.h @@ -12,7 +12,7 @@ class ace_sp_reelctrl_base_device : public device_t { public: protected: - ace_sp_reelctrl_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + ace_sp_reelctrl_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -27,7 +27,7 @@ private: class ace_sp_reelctrl_device : public ace_sp_reelctrl_base_device { public: - ace_sp_reelctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ace_sp_reelctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; @@ -38,7 +38,7 @@ private: class ace_sp_reelctrl_pcp_device : public ace_sp_reelctrl_base_device { public: - ace_sp_reelctrl_pcp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ace_sp_reelctrl_pcp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/mame/misc/acefruit.cpp b/src/mame/misc/acefruit.cpp index a7a9829d3d1..1a96d656f86 100644 --- a/src/mame/misc/acefruit.cpp +++ b/src/mame/misc/acefruit.cpp @@ -584,7 +584,7 @@ GFXDECODE_END void acefruit_state::acefruit(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); /* 2.5MHz */ + Z80(config, m_maincpu, XTAL::u(2500000)); /* 2.5MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &acefruit_state::main_map); m_maincpu->set_addrmap(AS_IO, &acefruit_state::main_io); m_maincpu->set_vblank_int("screen", FUNC(acefruit_state::vblank)); diff --git a/src/mame/misc/acesp.cpp b/src/mame/misc/acesp.cpp index 8bf5efec72c..b5c615da4e8 100644 --- a/src/mame/misc/acesp.cpp +++ b/src/mame/misc/acesp.cpp @@ -162,15 +162,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(ace_sp_state::gen_fixfreq) void ace_sp_state::ace_sp(machine_config &config) { - HD6303Y(config, m_maincpu, 2000000); // unknown clock + HD6303Y(config, m_maincpu, XTAL::u(2000000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &ace_sp_state::ace_sp_map); - PIA6821(config, "pia0", 0); + PIA6821(config, "pia0"); // unknown frequency TIMER(config, "fixedfreq").configure_periodic(FUNC(ace_sp_state::gen_fixfreq), attotime::from_hz(50)); - ACE_SP_REELCTRL(config, m_reelctrl, 2000000); // unknown clock + ACE_SP_REELCTRL(config, m_reelctrl, XTAL::u(2000000)); // unknown clock config.set_default_layout(layout_ace_sp_dmd); } diff --git a/src/mame/misc/alinvade.cpp b/src/mame/misc/alinvade.cpp index 2a5fee7bdad..c470e3d4f60 100644 --- a/src/mame/misc/alinvade.cpp +++ b/src/mame/misc/alinvade.cpp @@ -206,7 +206,7 @@ void alinvade_state::vblank_irq(int state) void alinvade_state::alinvade(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 2000000); /* ? MHz */ + M6502(config, m_maincpu, XTAL::u(2000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &alinvade_state::alinvade_map); /* video hardware */ diff --git a/src/mame/misc/amspdwy.cpp b/src/mame/misc/amspdwy.cpp index bac1b27a4d2..b1dcb84cca8 100644 --- a/src/mame/misc/amspdwy.cpp +++ b/src/mame/misc/amspdwy.cpp @@ -442,12 +442,12 @@ void amspdwy_state::machine_reset() void amspdwy_state::amspdwy(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3000000); + Z80(config, m_maincpu, XTAL::u(3000000)); m_maincpu->set_addrmap(AS_PROGRAM, &amspdwy_state::amspdwy_map); m_maincpu->set_addrmap(AS_IO, &amspdwy_state::amspdwy_portmap); m_maincpu->set_vblank_int("screen", FUNC(amspdwy_state::irq0_line_hold)); /* IRQ: 60Hz, NMI: retn */ - Z80(config, m_audiocpu, 3000000); + Z80(config, m_audiocpu, XTAL::u(3000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &amspdwy_state::amspdwy_sound_map); config.set_perfect_quantum(m_maincpu); @@ -471,7 +471,7 @@ void amspdwy_state::amspdwy(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - YM2151(config, m_ym2151, 3000000); + YM2151(config, m_ym2151, XTAL::u(3000000)); m_ym2151->irq_handler().set_inputline(m_audiocpu, 0); m_ym2151->add_route(0, "lspeaker", 1.0); m_ym2151->add_route(1, "rspeaker", 1.0); diff --git a/src/mame/misc/amusco.cpp b/src/mame/misc/amusco.cpp index 2b6ac3d2cf1..90074b229a1 100644 --- a/src/mame/misc/amusco.cpp +++ b/src/mame/misc/amusco.cpp @@ -541,10 +541,10 @@ void amusco_state::amusco(machine_config &config) m_maincpu->set_addrmap(AS_IO, &amusco_state::io_map); m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(PIT_CLOCK0); m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir0_w)); m_pit->set_clk<1>(PIT_CLOCK1); @@ -560,14 +560,14 @@ void amusco_state::amusco(machine_config &config) ppi_inputs.in_pb_callback().set_ioport("IN1"); ppi_inputs.in_pc_callback().set_ioport("IN2"); - i8155_device &i8155a(I8155(config, "lpt_interface", 0)); + i8155_device &i8155a(I8155(config, "lpt_interface")); i8155a.out_pa_callback().set(FUNC(amusco_state::lpt_data_w)); i8155a.in_pb_callback().set(FUNC(amusco_state::lpt_status_r)); // Port C uses ALT 3 mode, which MAME does not currently emulate MSM5832(config, m_rtc, 32.768_kHz_XTAL); - i8155_device &i8155b(I8155(config, "rtc_interface", 0)); + i8155_device &i8155b(I8155(config, "rtc_interface")); i8155b.out_pa_callback().set(FUNC(amusco_state::rtc_control_w)); i8155b.in_pc_callback().set(m_rtc, FUNC(msm5832_device::data_r)); i8155b.out_pc_callback().set(m_rtc, FUNC(msm5832_device::data_w)); diff --git a/src/mame/misc/arachnid.cpp b/src/mame/misc/arachnid.cpp index f2b65143876..b4b578948c5 100644 --- a/src/mame/misc/arachnid.cpp +++ b/src/mame/misc/arachnid.cpp @@ -499,7 +499,7 @@ void arachnid_state::arachnid(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // MK48Z02 (or DS1220Y) // devices - PIA6821(config, m_pia_u4, 0); + PIA6821(config, m_pia_u4); m_pia_u4->readpa_handler().set(FUNC(arachnid_state::pia_u4_pa_r)); m_pia_u4->readpb_handler().set(FUNC(arachnid_state::pia_u4_pb_r)); m_pia_u4->readca1_handler().set(FUNC(arachnid_state::pia_u4_pca_r)); @@ -509,7 +509,7 @@ void arachnid_state::arachnid(machine_config &config) m_pia_u4->ca2_handler().set(FUNC(arachnid_state::pia_u4_pca_w)); m_pia_u4->cb2_handler().set(FUNC(arachnid_state::pia_u4_pcb_w)); - PIA6821(config, m_pia_u17, 0); + PIA6821(config, m_pia_u17); m_pia_u17->readpa_handler().set(FUNC(arachnid_state::pia_u17_pa_r)); m_pia_u17->ca1_w(1); // CA1 - 1000 HZ Input m_pia_u17->writepb_handler().set(FUNC(arachnid_state::pia_u17_pb_w)); @@ -527,7 +527,7 @@ void arachnid_state::arachnid(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.0); ptm6840_device &ptm(PTM6840(config, PTM6840_TAG, 10.738635_MHz_XTAL / 3 / 4)); - ptm.set_external_clocks(0, 0, 0); + ptm.set_external_clocks(XTAL(), XTAL(), XTAL()); ptm.o1_callback().set(FUNC(arachnid_state::ptm_o1_callback)); } diff --git a/src/mame/misc/artmagic.cpp b/src/mame/misc/artmagic.cpp index 575980ad06c..01d5fc1646c 100644 --- a/src/mame/misc/artmagic.cpp +++ b/src/mame/misc/artmagic.cpp @@ -858,18 +858,18 @@ void artmagic_state::shtstar(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &artmagic_state::shtstar_map); - MC68681(config, "mainduart", 3686400); + MC68681(config, "mainduart", XTAL::u(3686400)); /* sub cpu*/ m68000_device &subcpu(M68000(config, "subcpu", MASTER_CLOCK_25MHz/2)); subcpu.set_addrmap(AS_PROGRAM, &artmagic_state::shtstar_subcpu_map); - MC68681(config, "subduart", 3686400); + MC68681(config, "subduart", XTAL::u(3686400)); YM2149(config, "aysnd", 3686400/2).add_route(ALL_OUTPUTS, "mono", 0.10); /*gun board cpu*/ - i80c31_device &guncpu(I80C31(config, "guncpu", 6000000)); + i80c31_device &guncpu(I80C31(config, "guncpu", XTAL::u(6000000))); guncpu.set_addrmap(AS_PROGRAM, &artmagic_state::shtstar_guncpu_map); guncpu.set_addrmap(AS_IO, &artmagic_state::shtstar_guncpu_io_map); guncpu.port_in_cb<1>().set_constant(0); // ? diff --git a/src/mame/misc/astrafr.cpp b/src/mame/misc/astrafr.cpp index e170feac5f3..90ee97e0d0f 100644 --- a/src/mame/misc/astrafr.cpp +++ b/src/mame/misc/astrafr.cpp @@ -309,10 +309,10 @@ MACHINE_START_MEMBER(astrafr_state,astra_2e) void astrafr_state::astrafr_dual(machine_config &config) { - M68340(config, m_maincpu, 16000000); + M68340(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &astrafr_state::astrafr_master_map); - M68340(config, m_slavecpu, 16000000); + M68340(config, m_slavecpu, XTAL::u(16000000)); m_slavecpu->set_addrmap(AS_PROGRAM, &astrafr_state::astrafr_slave_map); MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_common ) @@ -332,10 +332,10 @@ void astrafr_state::astrafr_dual_37(machine_config &config) void astrafr_state::astrafr_dual_alt(machine_config &config) { - M68340(config, m_maincpu, 16000000); + M68340(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &astrafr_state::astrafr_master_alt_map); - M68340(config, m_slavecpu, 16000000); + M68340(config, m_slavecpu, XTAL::u(16000000)); m_slavecpu->set_addrmap(AS_PROGRAM, &astrafr_state::astrafr_slave_map); } @@ -349,7 +349,7 @@ void astrafr_state::astrafr_dual_alt_37(machine_config &config) void astrafr_state::astra_single(machine_config &config) { - M68340(config, m_maincpu, 16000000); + M68340(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &astrafr_state::astra_map); MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_common ) } @@ -377,7 +377,7 @@ MACHINE_START_MEMBER(astrafr_state,astra_57) void astrafr_state::astra_single_alt(machine_config &config) { - M68340(config, m_maincpu, 16000000); + M68340(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &astrafr_state::astra_map); MCFG_MACHINE_START_OVERRIDE(astrafr_state, astra_common ) } diff --git a/src/mame/misc/astrcorp.cpp b/src/mame/misc/astrcorp.cpp index c4a004a6936..34c449a7725 100644 --- a/src/mame/misc/astrcorp.cpp +++ b/src/mame/misc/astrcorp.cpp @@ -1288,7 +1288,7 @@ void astoneag_state::astoneag(machine_config &config) // Adds RAMDAC PALETTE(config.replace(), m_palette).set_entries(256); - RAMDAC(config, m_ramdac, 0, m_palette); + RAMDAC(config, m_ramdac, m_palette); m_ramdac->set_addrmap(0, &astoneag_state::ramdac_map); // Tiles are double size vertically diff --git a/src/mame/misc/astropc.cpp b/src/mame/misc/astropc.cpp index 252333f2169..e20f0dfc268 100644 --- a/src/mame/misc/astropc.cpp +++ b/src/mame/misc/astropc.cpp @@ -70,7 +70,7 @@ INPUT_PORTS_END void astropc_state::astropc(machine_config &config) { /* basic machine hardware */ - I486(config, m_maincpu, 40000000 ); // ?? + I486(config, m_maincpu, XTAL::u(40000000) ); // ?? m_maincpu->set_addrmap(AS_PROGRAM, &astropc_state::astropc_map); m_maincpu->set_addrmap(AS_IO, &astropc_state::astropc_io); } diff --git a/src/mame/misc/atronic.cpp b/src/mame/misc/atronic.cpp index 19fe4c15a7e..b372f8c4c36 100644 --- a/src/mame/misc/atronic.cpp +++ b/src/mame/misc/atronic.cpp @@ -473,18 +473,18 @@ void atronic_state::atronic(machine_config &config) m_maincpu->set_addrmap(AS_IO, &atronic_state::atronic_portmap); m_maincpu->set_vblank_int("screen", FUNC(atronic_state::irq0_line_hold)); - DS1386_32K(config, "timekpr", 32768); + DS1386_32K(config, "timekpr", XTAL::u(32768)); - PCF8584(config, "i2cbc", 3000000); + PCF8584(config, "i2cbc", XTAL::u(3000000)); - SCC85C30(config, "scc", 5000000); + SCC85C30(config, "scc", XTAL::u(5000000)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(VIDEO_CLOCK/2, 640, 0, 512, 257, 0, 224); // ?? m_screen->set_screen_update("tms", FUNC(tms34020_device::tms340x0_rgb32)); PALETTE(config, "palette").set_entries(256); - RAMDAC(config, m_ramdac, 0, m_palette); + RAMDAC(config, m_ramdac, m_palette); m_ramdac->set_addrmap(0, &atronic_state::ramdac_map); TMS34020(config, m_videocpu, VIDEO_CLOCK); diff --git a/src/mame/misc/attckufo.cpp b/src/mame/misc/attckufo.cpp index 5874906e2f7..b32d97fba4c 100644 --- a/src/mame/misc/attckufo.cpp +++ b/src/mame/misc/attckufo.cpp @@ -124,7 +124,7 @@ void attckufo_state::attckufo(machine_config &config) M6502(config, m_maincpu, XTAL(14'318'181) / 14); m_maincpu->set_addrmap(AS_PROGRAM, &attckufo_state::cpu_map); - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.readpa_handler().set_ioport("DSW"); pia.readpb_handler().set_ioport("INPUT"); diff --git a/src/mame/misc/aztarac.cpp b/src/mame/misc/aztarac.cpp index 32ed301aeb4..cbc6f7ba318 100644 --- a/src/mame/misc/aztarac.cpp +++ b/src/mame/misc/aztarac.cpp @@ -368,7 +368,7 @@ void aztarac_state::aztarac(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); // video hardware - VECTOR(config, m_vector, 0); + VECTOR(config, m_vector); SCREEN(config, m_screen, SCREEN_TYPE_VECTOR); m_screen->set_refresh_hz(40); m_screen->set_size(400, 300); diff --git a/src/mame/misc/bailey.cpp b/src/mame/misc/bailey.cpp index cfde4b01ef9..032dcbfa50e 100644 --- a/src/mame/misc/bailey.cpp +++ b/src/mame/misc/bailey.cpp @@ -20,7 +20,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -92,7 +92,7 @@ void bailey_state::video_start() void bailey_state::bailey(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_bailey); + NETLIST_CPU(config, m_maincpu).set_source(netlist_bailey); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/misc/beaminv.cpp b/src/mame/misc/beaminv.cpp index 3ff0fbf0dec..412052c5912 100644 --- a/src/mame/misc/beaminv.cpp +++ b/src/mame/misc/beaminv.cpp @@ -375,7 +375,7 @@ INPUT_PORTS_END void beaminv_state::beaminv(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2000000); /* 2 MHz ? */ + Z80(config, m_maincpu, XTAL::u(2000000)); /* 2 MHz ? */ m_maincpu->set_addrmap(AS_PROGRAM, &beaminv_state::main_map); m_maincpu->set_addrmap(AS_IO, &beaminv_state::main_io_map); diff --git a/src/mame/misc/beezer.cpp b/src/mame/misc/beezer.cpp index 8b282da9d29..29afa5cf605 100644 --- a/src/mame/misc/beezer.cpp +++ b/src/mame/misc/beezer.cpp @@ -524,7 +524,7 @@ void beezer_state::beezer(machine_config &config) noise.output_callback().set(FUNC(beezer_state::noise_w)); SPEAKER(config, "speaker").front_center(); - DAC76(config, m_dac, 0); + DAC76(config, m_dac); m_dac->add_route(ALL_OUTPUTS, "speaker", 1.0); } diff --git a/src/mame/misc/belatra.cpp b/src/mame/misc/belatra.cpp index 39b3855f32c..2d76ebde936 100644 --- a/src/mame/misc/belatra.cpp +++ b/src/mame/misc/belatra.cpp @@ -72,7 +72,7 @@ INPUT_PORTS_END void belatra_state::belatra(machine_config &config) { - ARM7(config, m_maincpu, 54000000); // guess... + ARM7(config, m_maincpu, XTAL::u(54000000)); // guess... m_maincpu->set_addrmap(AS_PROGRAM, &belatra_state::belatra_map); SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/misc/bgt.cpp b/src/mame/misc/bgt.cpp index dc81209526c..fe53f9cc054 100644 --- a/src/mame/misc/bgt.cpp +++ b/src/mame/misc/bgt.cpp @@ -50,7 +50,7 @@ INPUT_PORTS_END void bgt_state::bgt(machine_config &config) { - I80186(config, m_maincpu, 12000000); // ? + I80186(config, m_maincpu, XTAL::u(12000000)); // ? m_maincpu->set_addrmap(AS_PROGRAM, &bgt_state::bgt_map); m_maincpu->set_addrmap(AS_IO, &bgt_state::bgt_io); } diff --git a/src/mame/misc/bingor.cpp b/src/mame/misc/bingor.cpp index 1d20658a6e3..b78845aa623 100644 --- a/src/mame/misc/bingor.cpp +++ b/src/mame/misc/bingor.cpp @@ -697,7 +697,7 @@ void bingor_state::bingor(machine_config &config) m_maincpu->set_periodic_int(FUNC(bingor_state::nmi_line_pulse), attotime::from_hz(30)); // Other interrupts generated by internal timers - PIC16C57(config, "pic", 12000000); //?? Mhz + PIC16C57(config, "pic", XTAL::u(12000000)); //?? Mhz GFXDECODE(config, "gfxdecode", m_palette, gfx_bingor); // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -712,7 +712,7 @@ void bingor_state::bingor(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::RGBI_4444, 0x10); SPEAKER(config, "mono").front_center(); - SAA1099(config, "saa", 6000000).add_route(ALL_OUTPUTS, "mono", 0.50); + SAA1099(config, "saa", XTAL::u(6000000)).add_route(ALL_OUTPUTS, "mono", 0.50); } void bingor_state::bingor2(machine_config &config) @@ -787,7 +787,7 @@ void bingor_state::vip2000(machine_config &config) GENERIC_LATCH_8(config, "toslave"); GENERIC_LATCH_8(config, "fromslave"); - ymz284_device &ymz(YMZ284(config, "ymz", 1250000)); // probably clocked by square wave output of 80186 timer 0 + ymz284_device &ymz(YMZ284(config, "ymz", XTAL::u(1250000))); // probably clocked by square wave output of 80186 timer 0 ymz.add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/misc/blitz68k.cpp b/src/mame/misc/blitz68k.cpp index ae3d4307de0..8700eb2b674 100644 --- a/src/mame/misc/blitz68k.cpp +++ b/src/mame/misc/blitz68k.cpp @@ -1793,13 +1793,13 @@ void blitz68k_state::ramdac_map(address_map &map) void blitz68k_state::ramdac_config(machine_config &config) { PALETTE(config, m_palette).set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &blitz68k_state::ramdac_map); } void blitz68k_state::ilpag(machine_config &config) { - M68000(config, m_maincpu, 11059200 ); // ? + M68000(config, m_maincpu, XTAL::u(11059200) ); // ? m_maincpu->set_addrmap(AS_PROGRAM, &blitz68k_state::ilpag_map); m_maincpu->set_vblank_int("screen", FUNC(blitz68k_state::irq4_line_hold)); //3 & 6 used, mcu comms? diff --git a/src/mame/misc/bntyhunt.cpp b/src/mame/misc/bntyhunt.cpp index d77a0ee1e28..d85d179337f 100644 --- a/src/mame/misc/bntyhunt.cpp +++ b/src/mame/misc/bntyhunt.cpp @@ -56,7 +56,7 @@ INPUT_PORTS_END void bntyhunt_state::bntyhunt(machine_config &config) { /* basic machine hardware */ - PENTIUM(config, m_maincpu, 200000000); /* Probably a Pentium or higher .. ?? Mhz*/ + PENTIUM(config, m_maincpu, XTAL::u(200000000)); /* Probably a Pentium or higher .. ?? Mhz*/ m_maincpu->set_addrmap(AS_PROGRAM, &bntyhunt_state::bntyhunt_map); /* video hardware */ diff --git a/src/mame/misc/calomega.cpp b/src/mame/misc/calomega.cpp index c62546de6a3..6bd08a6da62 100644 --- a/src/mame/misc/calomega.cpp +++ b/src/mame/misc/calomega.cpp @@ -4590,7 +4590,7 @@ void calomega_state::sys903(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set(FUNC(calomega_state::s903_mux_port_r)); m_pia[0]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: some dipsw maybe??? m_pia[0]->writepa_handler().set(FUNC(calomega_state::dummy_pia_w)); // Debug: to assign lamps/counters/solenids/hopper???? @@ -4600,7 +4600,7 @@ void calomega_state::sys903(machine_config &config) m_pia[0]->irqa_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU) m_pia[0]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU) - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set_ioport("SW1"); m_pia[1]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: unknown reads. m_pia[1]->writepa_handler().set(FUNC(calomega_state::lamps_903b_w)); @@ -4635,7 +4635,7 @@ void calomega_state::sys903(machine_config &config) ay8912.add_route(ALL_OUTPUTS, "mono", 0.75); // acia 0 - ACIA6850(config, m_acia6850[0], 0); + ACIA6850(config, m_acia6850[0]); m_acia6850[0]->irq_handler().set_inputline("maincpu", M6502_IRQ_LINE); clock_device &aciabaud(CLOCK(config, "aciabaud", UART_CLOCK)); @@ -4663,7 +4663,7 @@ void calomega_state::sys903kb(machine_config &config) m_kstec->t0_in_cb().set("uart", FUNC(i8251_device::txrdy_r)); // uart tx handshake m_kstec->t1_in_cb().set([this] () { return calomega_state::m_rxrdy; }); // uart rx handshake - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set(FUNC(calomega_state::s903_mux_port_r)); m_pia[0]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: some dipsw maybe??? m_pia[0]->writepa_handler().set(FUNC(calomega_state::dummy_pia_w)); // Debug: to assign lamps/counters/solenids/hopper???? @@ -4673,7 +4673,7 @@ void calomega_state::sys903kb(machine_config &config) m_pia[0]->irqa_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU) m_pia[0]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU) - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set_ioport("SW1"); m_pia[1]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: unknown reads. m_pia[1]->writepa_handler().set(FUNC(calomega_state::lamps_903b_w)); @@ -4708,11 +4708,11 @@ void calomega_state::sys903kb(machine_config &config) ay8912.add_route(ALL_OUTPUTS, "mono", 0.75); // acia 0 - ACIA6850(config, m_acia6850[0], 0); + ACIA6850(config, m_acia6850[0]); m_acia6850[0]->txd_handler().set("uart", FUNC(i8251_device::write_rxd)); m_acia6850[0]->irq_handler().set_inputline("maincpu", M6502_IRQ_LINE); - I8251(config, m_uart, 5'185'000); + I8251(config, m_uart, XTAL::u(5'185'000)); m_uart->txd_handler().set("acia6850_0", FUNC(acia6850_device::write_rxd)); m_uart->rxrdy_handler().set([this] (int state) { calomega_state::m_rxrdy = state;}); diff --git a/src/mame/misc/cardline.cpp b/src/mame/misc/cardline.cpp index ad413e02609..382b0539706 100644 --- a/src/mame/misc/cardline.cpp +++ b/src/mame/misc/cardline.cpp @@ -353,7 +353,7 @@ void cardline_state::cardline(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 1.0); oki.add_route(ALL_OUTPUTS, "rspeaker", 1.0); } diff --git a/src/mame/misc/castle.cpp b/src/mame/misc/castle.cpp index 7a10dfd8331..e4a04471b61 100644 --- a/src/mame/misc/castle.cpp +++ b/src/mame/misc/castle.cpp @@ -86,10 +86,10 @@ INPUT_PORTS_END void castle_state::castle_V1rvE(machine_config &config) { - HD6303Y(config, m_maincpu, 1000000); + HD6303Y(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &castle_state::V1rvE_mastermap); - hd6303y_cpu_device &slavecpu(HD6303Y(config, "slavecpu", 1000000)); + hd6303y_cpu_device &slavecpu(HD6303Y(config, "slavecpu", XTAL::u(1000000))); slavecpu.set_addrmap(AS_PROGRAM, &castle_state::V1rvE_slavemap); } @@ -105,7 +105,7 @@ void castle_state::V2rvA_map(address_map &map) void castle_state::castle_V2rvA(machine_config &config) { - HD6303Y(config, m_maincpu, 1000000); + HD6303Y(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &castle_state::V2rvA_map); PIA6821(config, "pia"); diff --git a/src/mame/misc/cave.cpp b/src/mame/misc/cave.cpp index 21ae337a543..2ac3418bdb6 100644 --- a/src/mame/misc/cave.cpp +++ b/src/mame/misc/cave.cpp @@ -2174,7 +2174,7 @@ void cave_state::donpachi(machine_config &config) OKIM6295(config, m_oki[1], 4.224_MHz_XTAL/2, okim6295_device::PIN7_HIGH); // pin 7 not verified m_oki[1]->add_route(ALL_OUTPUTS, "mono", 1.0); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); nmk112.set_page_mask(1 << 0); // chip #0 (music) is not paged @@ -2604,7 +2604,7 @@ void cave_state::pwrinst2(machine_config &config) OKIM6295(config, m_oki[1], 3_MHz_XTAL, okim6295_device::PIN7_LOW); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 1.00); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); } @@ -2666,11 +2666,11 @@ void cave_state::sailormn(machine_config &config) ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.30); - OKIM6295(config, m_oki[0], 2112000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki[0], XTAL::u(2112000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki[0]->set_addrmap(0, &cave_state::oki_map); - OKIM6295(config, m_oki[1], 2112000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki[1], XTAL::u(2112000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki[1]->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki[1]->set_addrmap(0, &cave_state::oki2_map); diff --git a/src/mame/misc/cavepc.cpp b/src/mame/misc/cavepc.cpp index 56455c256db..e75f75ef242 100644 --- a/src/mame/misc/cavepc.cpp +++ b/src/mame/misc/cavepc.cpp @@ -115,7 +115,7 @@ void cavepc_state::machine_reset() void cavepc_state::cavepc(machine_config &config) { /* basic machine hardware */ - PENTIUM3(config, m_maincpu, 200000000); /* AMD Athlon 64 X2 5050e Brisbane 2.60GHz, 1024KB L2 Cache ! */ + PENTIUM3(config, m_maincpu, XTAL::u(200000000)); /* AMD Athlon 64 X2 5050e Brisbane 2.60GHz, 1024KB L2 Cache ! */ m_maincpu->set_addrmap(AS_PROGRAM, &cavepc_state::cavepc_map); m_maincpu->set_addrmap(AS_IO, &cavepc_state::cavepc_io); diff --git a/src/mame/misc/cb2001.cpp b/src/mame/misc/cb2001.cpp index f512925b11a..3d1a3ccaa73 100644 --- a/src/mame/misc/cb2001.cpp +++ b/src/mame/misc/cb2001.cpp @@ -826,7 +826,7 @@ void cb2001_state::cb2001_palette(palette_device &palette) const void cb2001_state::cb2001(machine_config &config) { - V35(config, m_maincpu, 20000000); // CPU91A-011-0016JK004; encrypted cpu like nec v25/35 used in some irem game + V35(config, m_maincpu, XTAL::u(20000000)); // CPU91A-011-0016JK004; encrypted cpu like nec v25/35 used in some irem game m_maincpu->set_decryption_table(cb2001_decryption_table); m_maincpu->set_addrmap(AS_PROGRAM, &cb2001_state::cb2001_map); m_maincpu->set_addrmap(AS_IO, &cb2001_state::cb2001_io); @@ -855,7 +855,7 @@ void cb2001_state::cb2001(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1500000)); // wrong + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1500000))); // wrong aysnd.port_a_read_callback().set_ioport("DSW4"); aysnd.port_b_read_callback().set_ioport("DSW5"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/misc/chameleonrx1.cpp b/src/mame/misc/chameleonrx1.cpp index 29a27908b1b..eea0e5cb391 100644 --- a/src/mame/misc/chameleonrx1.cpp +++ b/src/mame/misc/chameleonrx1.cpp @@ -67,7 +67,7 @@ void chameleonrx1_state::machine_reset() void chameleonrx1_state::chameleonrx1(machine_config &config) { /* basic machine hardware */ - PENTIUM4(config, m_maincpu, 100000000); // actually 2.66 GHz + PENTIUM4(config, m_maincpu, XTAL::u(100000000)); // actually 2.66 GHz m_maincpu->set_addrmap(AS_PROGRAM, &chameleonrx1_state::chameleonrx1_map); /* video hardware */ diff --git a/src/mame/misc/chicago.cpp b/src/mame/misc/chicago.cpp index 4982583cfec..82b02ced59d 100644 --- a/src/mame/misc/chicago.cpp +++ b/src/mame/misc/chicago.cpp @@ -26,7 +26,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -98,7 +98,7 @@ void chicago_state::video_start() void chicago_state::chicago(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_chicago); + NETLIST_CPU(config, m_maincpu).set_source(netlist_chicago); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/misc/chsuper.cpp b/src/mame/misc/chsuper.cpp index 5ebe8cef7bc..1b1891bd5b0 100644 --- a/src/mame/misc/chsuper.cpp +++ b/src/mame/misc/chsuper.cpp @@ -385,13 +385,13 @@ void chsuper_state::chsuper(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_chsuper); PALETTE(config, m_palette).set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // ADV476KP50 + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // ADV476KP50 ramdac.set_addrmap(0, &chsuper_state::ramdac_map); /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // 74HC273 latch + R2R network (unknown values) + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // 74HC273 latch + R2R network (unknown values) } diff --git a/src/mame/misc/clowndwn.cpp b/src/mame/misc/clowndwn.cpp index 1112277744c..c8df73e9c3a 100644 --- a/src/mame/misc/clowndwn.cpp +++ b/src/mame/misc/clowndwn.cpp @@ -59,14 +59,14 @@ void clowndwn_state::machine_reset() void clowndwn_state::clowndwn(machine_config &config) { /* basic machine hardware */ - M6808(config, m_maincpu, 8000000); // unknown type and clock + M6808(config, m_maincpu, XTAL::u(8000000)); // unknown type and clock m_maincpu->set_addrmap(AS_PROGRAM, &clowndwn_state::clowndwn_map); - PIA6821(config, "pia0", 0); - PIA6821(config, "pia1", 0); - PIA6821(config, "pia2", 0); - PIA6821(config, "pia3", 0); - PIA6821(config, "pia4", 0); + PIA6821(config, "pia0"); + PIA6821(config, "pia1"); + PIA6821(config, "pia2"); + PIA6821(config, "pia3"); + PIA6821(config, "pia4"); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/misc/clpoker.cpp b/src/mame/misc/clpoker.cpp index d3ff1a63ad3..ad98f6bb08f 100644 --- a/src/mame/misc/clpoker.cpp +++ b/src/mame/misc/clpoker.cpp @@ -278,7 +278,7 @@ void clpoker_state::clpoker(machine_config &config) screen.screen_vblank().set(FUNC(clpoker_state::vblank_w)); PALETTE(config, "palette").set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); // HM86171 + ramdac_device &ramdac(RAMDAC(config, "ramdac", "palette")); // HM86171 ramdac.set_addrmap(0, &clpoker_state::ramdac_map); GFXDECODE(config, m_gfxdecode, "palette", gfx_clpoker); diff --git a/src/mame/misc/cocoloco.cpp b/src/mame/misc/cocoloco.cpp index f549e0f9cb2..739880e7e2e 100644 --- a/src/mame/misc/cocoloco.cpp +++ b/src/mame/misc/cocoloco.cpp @@ -495,7 +495,7 @@ void cocoloco_state::cocoloco(machine_config &config) /* NETLIST configuration using internal AY8910 resistor values */ - NETLIST_SOUND(config, "snd_nl", 48000) + NETLIST_SOUND(config, "snd_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(cocoloco)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/misc/coinmstr.cpp b/src/mame/misc/coinmstr.cpp index f5128bab565..f3c2fd2ada8 100644 --- a/src/mame/misc/coinmstr.cpp +++ b/src/mame/misc/coinmstr.cpp @@ -1285,16 +1285,16 @@ void coinmstr_state::coinmstr(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &coinmstr_state::coinmstr_map); m_maincpu->set_vblank_int("screen", FUNC(coinmstr_state::irq0_line_hold)); - pia6821_device &pia0(PIA6821(config, "pia0", 0)); + pia6821_device &pia0(PIA6821(config, "pia0")); pia0.readpa_handler().set_ioport("PIA0.A"); pia0.readpb_handler().set_ioport("PIA0.B"); - pia6821_device &pia1(PIA6821(config, "pia1", 0)); + pia6821_device &pia1(PIA6821(config, "pia1")); pia1.readpa_handler().set_ioport("PIA1.A"); pia1.set_port_a_input_overrides_output_mask(0xff); pia1.readpb_handler().set_ioport("PIA1.B"); - pia6821_device &pia2(PIA6821(config, "pia2", 0)); + pia6821_device &pia2(PIA6821(config, "pia2")); pia2.readpa_handler().set_ioport("PIA2.A"); pia2.readpb_handler().set_ioport("PIA2.B"); diff --git a/src/mame/misc/coinmvga.cpp b/src/mame/misc/coinmvga.cpp index d30e64d7e43..5d165499eb7 100644 --- a/src/mame/misc/coinmvga.cpp +++ b/src/mame/misc/coinmvga.cpp @@ -659,11 +659,11 @@ void coinmvga_state::coinmvga(machine_config &config) GFXDECODE(config, "gfxdecode2", m_palette2, gfx_coinmvga2); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &coinmvga_state::ramdac_map); PALETTE(config, m_palette2).set_entries(16); - ramdac_device &ramdac2(RAMDAC(config, "ramdac2", 0, m_palette2)); + ramdac_device &ramdac2(RAMDAC(config, "ramdac2", m_palette2)); ramdac2.set_addrmap(0, &coinmvga_state::ramdac2_map); /* sound hardware */ diff --git a/src/mame/misc/coolpool.cpp b/src/mame/misc/coolpool.cpp index ae18ae08e16..1253a099ad3 100644 --- a/src/mame/misc/coolpool.cpp +++ b/src/mame/misc/coolpool.cpp @@ -743,7 +743,7 @@ void coolpool_state::amerdart(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - MP1210(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + MP1210(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); } @@ -788,7 +788,7 @@ void coolpool_state::coolpool(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - MP1210(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + MP1210(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); } diff --git a/src/mame/misc/cowtipping.cpp b/src/mame/misc/cowtipping.cpp index 211f6fc680b..73426549525 100644 --- a/src/mame/misc/cowtipping.cpp +++ b/src/mame/misc/cowtipping.cpp @@ -75,7 +75,7 @@ void cowtipping_state::cowtipping(machine_config &config) MC68328(config, m_maincpu, 32.768_kHz_XTAL * 506); // 16.580608 MHz, multiplier unknown, to be adjusted m_maincpu->set_addrmap(AS_PROGRAM, &cowtipping_state::main_map); - PIC16C56(config, "pic", 4000000); // Actually PIC12C508/P, clock not verified + PIC16C56(config, "pic", XTAL::u(4000000)); // Actually PIC12C508/P, clock not verified screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // wrong screen.set_refresh_hz(60); diff --git a/src/mame/misc/crazybal.cpp b/src/mame/misc/crazybal.cpp index 4cb286f4cf3..f0fde07301e 100644 --- a/src/mame/misc/crazybal.cpp +++ b/src/mame/misc/crazybal.cpp @@ -25,7 +25,7 @@ A PCB set is available for tracing. // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -93,7 +93,7 @@ void crazybal_state::video_start() void crazybal_state::crazybal(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_crazybal); + NETLIST_CPU(config, m_maincpu).set_source(netlist_crazybal); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/misc/crospuzl.cpp b/src/mame/misc/crospuzl.cpp index 7a1419ce329..a745af26f07 100644 --- a/src/mame/misc/crospuzl.cpp +++ b/src/mame/misc/crospuzl.cpp @@ -367,7 +367,7 @@ void crospuzl_state::crospuzl(machine_config &config) // ROM strings have references to a K9FXX08 device // TODO: use this device, in machine/smartmed.h (has issues with is_busy() emulation) -// NAND(config, m_nand, 0); +// NAND(config, m_nand); // m_nand->set_nand_type(nand_device::chip::K9F1G08U0B); // TODO: exact flavor PCF8583(config, m_rtc, 32.768_kHz_XTAL); diff --git a/src/mame/misc/cubeqst.cpp b/src/mame/misc/cubeqst.cpp index 495d96e640b..b83ec791e3d 100644 --- a/src/mame/misc/cubeqst.cpp +++ b/src/mame/misc/cubeqst.cpp @@ -540,7 +540,7 @@ void cubeqst_state::cubeqst(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - SIMUTREK_SPECIAL(config, m_laserdisc, 0); + SIMUTREK_SPECIAL(config, m_laserdisc); m_laserdisc->set_overlay(CUBEQST_HBLANK, CUBEQST_VCOUNT, FUNC(cubeqst_state::screen_update_cubeqst)); m_laserdisc->set_overlay_clip(0, 320-1, 0, 256-8); m_laserdisc->set_overlay_position(0.002f, -0.018f); @@ -562,10 +562,10 @@ void cubeqst_state::cubeqst(machine_config &config) for (int i = 0; i < 8; i++) { // ad7521jn.2d (59) + cd4051be.1d (24) + 1500pf.c22 (34) + tl074cn.1b (53) + r10k.rn1 (30) - AD7521(config, m_dacs[i*2+0], 0).add_route(0, "rspeaker", 0.125); + AD7521(config, m_dacs[i*2+0]).add_route(0, "rspeaker", 0.125); // ad7521jn.2d (59) + cd4051be.3d (24) + 1500pf.c13 (34) + tl074cn.3b (53) + r10k.rn3 (30) - AD7521(config, m_dacs[i*2+1], 0).add_route(0, "lspeaker", 0.125); + AD7521(config, m_dacs[i*2+1]).add_route(0, "lspeaker", 0.125); } } diff --git a/src/mame/misc/cupidon.cpp b/src/mame/misc/cupidon.cpp index 4981a566d3b..2fb8e9969d3 100644 --- a/src/mame/misc/cupidon.cpp +++ b/src/mame/misc/cupidon.cpp @@ -99,7 +99,7 @@ INPUT_PORTS_END void cupidon_state::cupidon(machine_config &config) { - M68340(config, m_maincpu, 16000000); // The access to 3FF00 at the start would suggest this is a 68340 so probably 16 or 25 mhz? + M68340(config, m_maincpu, XTAL::u(16000000)); // The access to 3FF00 at the start would suggest this is a 68340 so probably 16 or 25 mhz? m_maincpu->set_addrmap(AS_PROGRAM, &cupidon_state::cupidon_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/misc/cv1k.cpp b/src/mame/misc/cv1k.cpp index e0cc8f2cc56..5fbaf241eba 100644 --- a/src/mame/misc/cv1k.cpp +++ b/src/mame/misc/cv1k.cpp @@ -490,7 +490,7 @@ void cv1k_state::cv1k(machine_config &config) m_maincpu->set_vblank_int("screen", FUNC(cv1k_state::irq2_line_hold)); // irq2 actually asserted at V-sync pulse, not at V-blank RTC9701(config, m_eeprom); - SERFLASH(config, m_serflash, 0); + SERFLASH(config, m_serflash); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -505,7 +505,7 @@ void cv1k_state::cv1k(machine_config &config) SPEAKER(config, "mono").front_center(); YMZ770(config, "ymz770", 16.384_MHz_XTAL).add_route(1, "mono", 1.0); // only Right output used, Left is not connected - EPIC12(config, m_blitter, 0); + EPIC12(config, m_blitter); m_blitter->set_cpu(m_maincpu); m_blitter->port_r_callback().set_ioport("DSW"); m_blitter->set_mainramsize(0x800000); diff --git a/src/mame/misc/diamondking.cpp b/src/mame/misc/diamondking.cpp index 230e4aba584..45aab469437 100644 --- a/src/mame/misc/diamondking.cpp +++ b/src/mame/misc/diamondking.cpp @@ -198,13 +198,13 @@ void diamondking_state::diamondking(machine_config &config) SPEAKER(config, "mono").front_center(); - ay8910_device &ay8910(AY8910(config, "ay8910", 2'000'000)); // Frequency unknown + ay8910_device &ay8910(AY8910(config, "ay8910", XTAL::u(2'000'000))); // Frequency unknown ay8910.port_a_read_callback().set_ioport("DSW1"); ay8910.add_route(ALL_OUTPUTS, "mono", 1.0); // Guess - M68340(config, m_iocpu, 16'000'000); // Frequency unknown + M68340(config, m_iocpu, XTAL::u(16'000'000)); // Frequency unknown - msm6585_device &msm6585(MSM6585(config, "msm6585", 640'000)); // Frequency unknown + msm6585_device &msm6585(MSM6585(config, "msm6585", XTAL::u(640'000))); // Frequency unknown msm6585.add_route(ALL_OUTPUTS, "mono", 1.0); // Guess // OkiM6376 diff --git a/src/mame/misc/discoboy.cpp b/src/mame/misc/discoboy.cpp index 58a04782acd..1545a071cc3 100644 --- a/src/mame/misc/discoboy.cpp +++ b/src/mame/misc/discoboy.cpp @@ -459,7 +459,7 @@ void discoboy_state::discoboy(machine_config &config) ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 0.6); ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 0.6); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); MSM5205(config, m_msm, XTAL(400'000)); diff --git a/src/mame/misc/dorachan.cpp b/src/mame/misc/dorachan.cpp index fca600c29e4..58434fde12b 100644 --- a/src/mame/misc/dorachan.cpp +++ b/src/mame/misc/dorachan.cpp @@ -228,7 +228,7 @@ void dorachan_state::machine_reset() void dorachan_state::dorachan(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2000000); + Z80(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dorachan_state::dorachan_map); m_maincpu->set_addrmap(AS_IO, &dorachan_state::dorachan_io_map); m_maincpu->set_periodic_int(FUNC(dorachan_state::irq0_line_hold), attotime::from_hz(2*60)); diff --git a/src/mame/misc/dwarfd.cpp b/src/mame/misc/dwarfd.cpp index 4e040d7581b..0471dd4e393 100644 --- a/src/mame/misc/dwarfd.cpp +++ b/src/mame/misc/dwarfd.cpp @@ -757,7 +757,7 @@ void dwarfd_state::dwarfd(machine_config &config) PALETTE(config, m_palette, FUNC(dwarfd_state::dwarfd_palette), 32); SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1500000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1500000))); aysnd.port_a_read_callback().set_ioport("IN2"); aysnd.port_b_read_callback().set_ioport("IN1"); aysnd.add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/misc/dynadice.cpp b/src/mame/misc/dynadice.cpp index b2daa99a8bd..906bbf8fa68 100644 --- a/src/mame/misc/dynadice.cpp +++ b/src/mame/misc/dynadice.cpp @@ -280,7 +280,7 @@ void dynadice_state::dynadice(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - AY8910(config, m_ay8910, 2000000).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8910(config, m_ay8910, XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 1.0); } ROM_START( dynadice ) diff --git a/src/mame/misc/dynamoah.cpp b/src/mame/misc/dynamoah.cpp index 4aa2f1c99b2..48ae0a4885e 100644 --- a/src/mame/misc/dynamoah.cpp +++ b/src/mame/misc/dynamoah.cpp @@ -75,7 +75,7 @@ void dynamoah_state::i8031_ext_mem(address_map &map) void dynamoah_state::dynamoah(machine_config &config) { - i80c31_device &maincpu(I80C31(config, "maincpu", 6'144'000)); // SC80C31BCCN40 + i80c31_device &maincpu(I80C31(config, "maincpu", XTAL::u(6'144'000))); // SC80C31BCCN40 // clock needs verification, being the XTAL value from a different board maincpu.set_addrmap(AS_PROGRAM, &dynamoah_state::i8031_mem); maincpu.set_addrmap(AS_IO, &dynamoah_state::i8031_ext_mem); diff --git a/src/mame/misc/ecoinf1.cpp b/src/mame/misc/ecoinf1.cpp index f0853e9542c..09a679d4658 100644 --- a/src/mame/misc/ecoinf1.cpp +++ b/src/mame/misc/ecoinf1.cpp @@ -256,7 +256,7 @@ INPUT_PORTS_END void ecoinf1_state::ecoinf1_older(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ecoinf1_state::older_memmap); m_maincpu->set_addrmap(AS_IO, &ecoinf1_state::older_portmap); } diff --git a/src/mame/misc/ecoinf2.cpp b/src/mame/misc/ecoinf2.cpp index 87978623ab9..a152194819f 100644 --- a/src/mame/misc/ecoinf2.cpp +++ b/src/mame/misc/ecoinf2.cpp @@ -506,7 +506,7 @@ INPUT_PORTS_END void ecoinf2_state::ecoinf2_oxo(machine_config &config) { /* basic machine hardware */ - Z80180(config, m_maincpu, 4000000); // some of these hit invalid opcodes with a plain z80, some don't? + Z80180(config, m_maincpu, XTAL::u(4000000)); // some of these hit invalid opcodes with a plain z80, some don't? m_maincpu->set_addrmap(AS_PROGRAM, &ecoinf2_state::oxo_memmap); m_maincpu->set_addrmap(AS_IO, &ecoinf2_state::oxo_portmap); @@ -547,10 +547,10 @@ void ecoinf2_state::ecoinf2_oxo(machine_config &config) REEL(config, m_reels[3], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2); m_reels[3]->optic_handler().set(FUNC(ecoinf2_state::reel_optic_cb<3>)); - METERS(config, m_meters, 0); + METERS(config, m_meters); m_meters->set_number(8); -// I8255(config, "ic25_dips", 0); +// I8255(config, "ic25_dips"); } diff --git a/src/mame/misc/ecoinf3.cpp b/src/mame/misc/ecoinf3.cpp index 399de71eb8d..e047346b685 100644 --- a/src/mame/misc/ecoinf3.cpp +++ b/src/mame/misc/ecoinf3.cpp @@ -665,7 +665,7 @@ INPUT_PORTS_END void ecoinf3_state::ecoinf3_pyramid(machine_config &config) { /* basic machine hardware */ - Z80180(config, m_maincpu, 8000000); // certainly not a plain z80 at least, invalid opcodes for that + Z80180(config, m_maincpu, XTAL::u(8000000)); // certainly not a plain z80 at least, invalid opcodes for that m_maincpu->set_addrmap(AS_PROGRAM, &ecoinf3_state::pyramid_memmap); m_maincpu->set_addrmap(AS_IO, &ecoinf3_state::pyramid_portmap); @@ -673,7 +673,7 @@ void ecoinf3_state::ecoinf3_pyramid(machine_config &config) SPEAKER(config, "mono").front_center(); - SN76489(config, "sn1", 4000000).add_route(ALL_OUTPUTS, "mono", 0.30); // no idea what the sound chip is, this sounds terrible + SN76489(config, "sn1", XTAL::u(4000000)).add_route(ALL_OUTPUTS, "mono", 0.30); // no idea what the sound chip is, this sounds terrible i8255_device &ppia(I8255(config, "ppi8255_a")); ppia.in_pa_callback().set(FUNC(ecoinf3_state::ppi8255_intf_a_read_a)); diff --git a/src/mame/misc/ecoinfr.cpp b/src/mame/misc/ecoinfr.cpp index 72dd16155a4..3a6620cce69 100644 --- a/src/mame/misc/ecoinfr.cpp +++ b/src/mame/misc/ecoinfr.cpp @@ -778,14 +778,14 @@ void ecoinfr_state::machine_reset() void ecoinfr_state::ecoinfr(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ecoinfr_state::memmap); m_maincpu->set_addrmap(AS_IO, &ecoinfr_state::portmap); TIMER(config , "ectimer" , 0).configure_periodic(FUNC(ecoinfr_state::ecoinfr_irq_timer), attotime::from_hz(250)); config.set_default_layout(layout_ecoinfr); - I8251(config, UPD8251_TAG, 0); + I8251(config, UPD8251_TAG); REEL(config, m_reel[0], ECOIN_200STEP_REEL, 12, 24, 0x09, 7, 200*2); m_reel[0]->optic_handler().set(FUNC(ecoinfr_state::reel_optic_cb<0>)); diff --git a/src/mame/misc/electra.cpp b/src/mame/misc/electra.cpp index f93be802ea7..dd622bf53b7 100644 --- a/src/mame/misc/electra.cpp +++ b/src/mame/misc/electra.cpp @@ -29,7 +29,7 @@ Wings / Wings Cocktail (1976) EG-1040 YES // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -98,7 +98,7 @@ void electra_state::video_start() void electra_state::electra(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_electra); + NETLIST_CPU(config, m_maincpu).set_source(netlist_electra); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/misc/esd16.cpp b/src/mame/misc/esd16.cpp index d41e83badee..6381ab487de 100644 --- a/src/mame/misc/esd16.cpp +++ b/src/mame/misc/esd16.cpp @@ -718,7 +718,7 @@ void esd16_state::esd16_nosound(machine_config &config) screen.set_screen_update(FUNC(esd16_state::screen_update)); screen.set_palette("palette"); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(0); m_sprgen->set_is_bootleg(true); m_sprgen->set_pri_callback(FUNC(esd16_state::pri_callback)); diff --git a/src/mame/misc/esh.cpp b/src/mame/misc/esh.cpp index 5677a091818..25ed64fab20 100644 --- a/src/mame/misc/esh.cpp +++ b/src/mame/misc/esh.cpp @@ -351,7 +351,7 @@ void esh_state::esh(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - PIONEER_LDV1000(config, m_laserdisc, 0); + PIONEER_LDV1000(config, m_laserdisc); m_laserdisc->command_strobe_callback().set(FUNC(esh_state::ld_command_strobe_cb)); m_laserdisc->set_overlay(256, 256, FUNC(esh_state::screen_update_esh)); m_laserdisc->add_route(0, "lspeaker", 1.0); @@ -368,7 +368,7 @@ void esh_state::esh(machine_config &config) SPEAKER(config, "rspeaker").front_right(); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 2000).add_route(ALL_OUTPUTS, "mono", 0.25); + BEEP(config, m_beep, XTAL::u(2000)).add_route(ALL_OUTPUTS, "mono", 0.25); } // we just disable even lines so we can simulate line blinking diff --git a/src/mame/misc/esripsys.cpp b/src/mame/misc/esripsys.cpp index fd81f5addce..d7a2bf4ee73 100644 --- a/src/mame/misc/esripsys.cpp +++ b/src/mame/misc/esripsys.cpp @@ -701,15 +701,15 @@ void esripsys_state::esripsys(machine_config &config) /* Sound hardware */ SPEAKER(config, "speaker").front_center(); - MC3410(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC - mc3408_device &dacvol(MC3408(config, "dacvol", 0)); + MC3410(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + mc3408_device &dacvol(MC3408(config, "dacvol")); dacvol.set_output_range(0, 1).add_route(0, m_dac, 1.0, DAC_INPUT_RANGE_HI).add_route(0, m_dac, -1.0, DAC_INPUT_RANGE_LO); // unknown DAC - TMS5220(config, m_tms, 640000).add_route(ALL_OUTPUTS, "speaker", 1.0); + TMS5220(config, m_tms, XTAL::u(640000)).add_route(ALL_OUTPUTS, "speaker", 1.0); /* 6840 PTM */ ptm6840_device &ptm(PTM6840(config, "6840ptm", XTAL(8'000'000) / 4)); - ptm.set_external_clocks(0, 0, 0); + ptm.set_external_clocks(XTAL(), XTAL(), XTAL()); ptm.irq_callback().set(FUNC(esripsys_state::ptm_irq)); } diff --git a/src/mame/misc/ettrivia.cpp b/src/mame/misc/ettrivia.cpp index 1550f4ef5da..86c79136fcd 100644 --- a/src/mame/misc/ettrivia.cpp +++ b/src/mame/misc/ettrivia.cpp @@ -322,13 +322,13 @@ void ettrivia_state::ettrivia(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8912(config, m_ay[0], 1500000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8912(config, m_ay[0], XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.25); - AY8912(config, m_ay[1], 1500000); + AY8912(config, m_ay[1], XTAL::u(1500000)); m_ay[1]->port_a_read_callback().set_ioport("IN1"); m_ay[1]->add_route(ALL_OUTPUTS, "mono", 0.25); - AY8912(config, m_ay[2], 1500000); + AY8912(config, m_ay[2], XTAL::u(1500000)); m_ay[2]->port_a_read_callback().set_ioport("IN0"); m_ay[2]->add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/misc/extrema.cpp b/src/mame/misc/extrema.cpp index 25a868dbd9e..ea2f8f9b893 100644 --- a/src/mame/misc/extrema.cpp +++ b/src/mame/misc/extrema.cpp @@ -77,7 +77,7 @@ INPUT_PORTS_END void extrema_state::extrema(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 6000000); // guessed clock + Z80(config, m_maincpu, XTAL::u(6000000)); // guessed clock m_maincpu->set_addrmap(AS_PROGRAM, &extrema_state::extrema_map); m_maincpu->set_addrmap(AS_IO, &extrema_state::extrema_portmap); } diff --git a/src/mame/misc/ez2d.cpp b/src/mame/misc/ez2d.cpp index 9e8fcb043d5..001c0662e66 100644 --- a/src/mame/misc/ez2d.cpp +++ b/src/mame/misc/ez2d.cpp @@ -90,7 +90,7 @@ void ez2d_state::machine_reset() void ez2d_state::ez2d(machine_config &config) { /* basic machine hardware */ - PENTIUM3(config, m_maincpu, 100000000); // actually a Celeron at 533 MHz + PENTIUM3(config, m_maincpu, XTAL::u(100000000)); // actually a Celeron at 533 MHz m_maincpu->set_addrmap(AS_PROGRAM, &ez2d_state::ez2d_map); /* video hardware */ diff --git a/src/mame/misc/fastinvaders.cpp b/src/mame/misc/fastinvaders.cpp index beb8ec699f9..d8e432cf475 100644 --- a/src/mame/misc/fastinvaders.cpp +++ b/src/mame/misc/fastinvaders.cpp @@ -638,10 +638,10 @@ void fastinvaders_state::fastinvaders(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(fastinvaders_state::scanline_timer), "screen", 0, 1); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); - I8257(config, m_dma8257, 6144100); + I8257(config, m_dma8257, XTAL::u(6144100)); m_dma8257->in_memr_cb().set(FUNC(fastinvaders_state::memory_read_byte)); m_dma8257->out_memw_cb().set(FUNC(fastinvaders_state::memory_write_byte)); m_dma8257->out_dack_cb<1>().set(FUNC(fastinvaders_state::dark_1_clr)); @@ -669,7 +669,7 @@ void fastinvaders_state::fastinvaders_8275(machine_config &config) fastinvaders(config); m_maincpu->set_addrmap(AS_IO, &fastinvaders_state::fastinvaders_8275_io); - I8275(config, m_crtc8275, 10000000); /* guess */ // does not configure a very useful resolution(!) + I8275(config, m_crtc8275, XTAL::u(10000000)); /* guess */ // does not configure a very useful resolution(!) m_crtc8275->set_character_width(16); // m_crtc8275->set_display_callback(FUNC(apogee_state::display_pixels)); // m_crtc8275->drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w)); diff --git a/src/mame/misc/fireball.cpp b/src/mame/misc/fireball.cpp index 7c8b47d1ddb..6c838469297 100644 --- a/src/mame/misc/fireball.cpp +++ b/src/mame/misc/fireball.cpp @@ -504,7 +504,7 @@ void fireball_state::fireball(machine_config &config) m_maincpu->port_out_cb<3>().set(FUNC(fireball_state::p3_w)); //9ms from scope reading 111Hz take care of this in the handler - TIMER(config, "int_0", 0).configure_periodic(FUNC(fireball_state::int_0), attotime::from_hz(555)); + TIMER(config, "int_0").configure_periodic(FUNC(fireball_state::int_0), attotime::from_hz(555)); EEPROM_X24C44_16BIT(config, "eeprom"); diff --git a/src/mame/misc/flower.cpp b/src/mame/misc/flower.cpp index 40b4c454bdd..f8eaf6568e1 100644 --- a/src/mame/misc/flower.cpp +++ b/src/mame/misc/flower.cpp @@ -530,7 +530,7 @@ void flower_state::flower(machine_config &config) SPEAKER(config, "mono").front_center(); - FLOWER_CUSTOM(config, "flower", 96000).add_route(ALL_OUTPUTS, "mono", 1.0); + FLOWER_CUSTOM(config, "flower", XTAL::u(96000)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/misc/flower_a.cpp b/src/mame/misc/flower_a.cpp index 563abf22f11..c957675b15f 100644 --- a/src/mame/misc/flower_a.cpp +++ b/src/mame/misc/flower_a.cpp @@ -44,7 +44,7 @@ void flower_sound_device::regs_map(address_map &map) // flower_sound_device - constructor //------------------------------------------------- -flower_sound_device::flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +flower_sound_device::flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FLOWER_CUSTOM, tag, owner, clock), device_sound_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/mame/misc/flower_a.h b/src/mame/misc/flower_a.h index 5b97e1e35cd..d90cb5eeba4 100644 --- a/src/mame/misc/flower_a.h +++ b/src/mame/misc/flower_a.h @@ -23,7 +23,7 @@ class flower_sound_device : public device_t, { public: // construction/destruction - flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + flower_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void lower_write(offs_t offset, u8 data); diff --git a/src/mame/misc/fresh.cpp b/src/mame/misc/fresh.cpp index b7c1d9c6fda..5e61a69a007 100644 --- a/src/mame/misc/fresh.cpp +++ b/src/mame/misc/fresh.cpp @@ -607,7 +607,7 @@ void fresh_state::fresh(machine_config &config) /* sound hw? */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ymsnd", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); // actual clock and type unknown + YM2413(config, "ymsnd", XTAL::u(4000000)).add_route(ALL_OUTPUTS, "mono", 1.0); // actual clock and type unknown } diff --git a/src/mame/misc/fungames.cpp b/src/mame/misc/fungames.cpp index 2bed7fea948..f065462cd0e 100644 --- a/src/mame/misc/fungames.cpp +++ b/src/mame/misc/fungames.cpp @@ -26,7 +26,7 @@ namespace { // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -95,7 +95,7 @@ void fungames_state::video_start() void fungames_state::fungames(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_fungames); + NETLIST_CPU(config, m_maincpu).set_source(netlist_fungames); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/misc/funkball.cpp b/src/mame/misc/funkball.cpp index 7cc0fc200e6..450ab694acd 100644 --- a/src/mame/misc/funkball.cpp +++ b/src/mame/misc/funkball.cpp @@ -744,14 +744,14 @@ DEVICE_INPUT_DEFAULTS_END void funkball_state::funkball(machine_config &config) { - MEDIAGX(config, m_maincpu, 66666666*3.5); // 66,6 MHz x 3.5 + MEDIAGX(config, m_maincpu, XTAL::u(66666666)*7/2); // 66,6 MHz x 3.5 m_maincpu->set_addrmap(AS_PROGRAM, &funkball_state::funkball_map); m_maincpu->set_addrmap(AS_IO, &funkball_state::funkball_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); pcat_common(config); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(7, FUNC(funkball_state::voodoo_0_pci_r), FUNC(funkball_state::voodoo_0_pci_w)); pcibus.set_device(18, FUNC(funkball_state::cx5510_pci_r), FUNC(funkball_state::cx5510_pci_w)); @@ -775,7 +775,7 @@ void funkball_state::funkball(machine_config &config) screen.set_size(1024, 1024); screen.set_visarea(0, 511, 16, 447); - ns16550_device &uart(NS16550(config, "uart", 1843200)); // exact type unknown + ns16550_device &uart(NS16550(config, "uart", XTAL::u(1843200))); // exact type unknown uart.out_tx_callback().set("rs232", FUNC(rs232_port_device::write_txd)); uart.out_dtr_callback().set("rs232", FUNC(rs232_port_device::write_dtr)); uart.out_rts_callback().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/misc/galgame.cpp b/src/mame/misc/galgame.cpp index 2cb0a664bef..c312a836115 100644 --- a/src/mame/misc/galgame.cpp +++ b/src/mame/misc/galgame.cpp @@ -330,7 +330,7 @@ void galaxygame_state::machine_reset() void galaxygame_state::galaxygame(machine_config &config) { - T11(config, m_maincpu, 3000000); + T11(config, m_maincpu, XTAL::u(3000000)); m_maincpu->set_addrmap(AS_PROGRAM, &galaxygame_state::galaxygame_map); m_maincpu->set_initial_mode(5 << 13); m_maincpu->in_iack().set(FUNC(galaxygame_state::galaxygame_irq_callback)); diff --git a/src/mame/misc/gambl186.cpp b/src/mame/misc/gambl186.cpp index e8817604696..aca929b34cb 100644 --- a/src/mame/misc/gambl186.cpp +++ b/src/mame/misc/gambl186.cpp @@ -513,7 +513,7 @@ void gambl186_state::gambl186(machine_config &config) screen.set_raw(XTAL(25'174'800),900,0,640,526,0,480); screen.set_screen_update("vga", FUNC(cirrus_gd5428_device::screen_update)); - cirrus_gd5428_device &vga(CIRRUS_GD5428(config, "vga", 0)); + cirrus_gd5428_device &vga(CIRRUS_GD5428(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x200000); diff --git a/src/mame/misc/gammagic.cpp b/src/mame/misc/gammagic.cpp index 5048b79f26c..7612d1430e8 100644 --- a/src/mame/misc/gammagic.cpp +++ b/src/mame/misc/gammagic.cpp @@ -111,14 +111,14 @@ void gammagic_state::machine_start() void gammagic_state::gammagic(machine_config &config) { // TODO: convert to a m55hipl state machine derivative - PENTIUM(config, m_maincpu, 133000000); // Intel Pentium 133 + PENTIUM(config, m_maincpu, XTAL::u(133000000)); // Intel Pentium 133 m_maincpu->set_addrmap(AS_PROGRAM, &gammagic_state::gammagic_map); m_maincpu->set_addrmap(AS_IO, &gammagic_state::gammagic_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); pcat_common(config); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); // ... /* video hardware */ diff --git a/src/mame/misc/gamtor.cpp b/src/mame/misc/gamtor.cpp index 45822e65730..3a5c8bdbb07 100644 --- a/src/mame/misc/gamtor.cpp +++ b/src/mame/misc/gamtor.cpp @@ -87,16 +87,16 @@ INPUT_PORTS_END void gaminator_state::gaminator(machine_config &config) { - MCF5206E(config, m_maincpu, 40000000); /* definitely Coldfire, model / clock uncertain */ + MCF5206E(config, m_maincpu, XTAL::u(40000000)); /* definitely Coldfire, model / clock uncertain */ m_maincpu->set_addrmap(AS_PROGRAM, &gaminator_state::gaminator_map); m_maincpu->set_vblank_int("screen", FUNC(gaminator_state::irq6_line_hold)); // irq6 seems to be needed to get past the ROM checking - MCF5206E_PERIPHERAL(config, "maincpu_onboard", 0, m_maincpu); + MCF5206E_PERIPHERAL(config, "maincpu_onboard", m_maincpu); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(XTAL(25'174'800),900,0,640,526,0,480); screen.set_screen_update("vga", FUNC(gamtor_vga_device::screen_update)); - gamtor_vga_device &vga(GAMTOR_VGA(config, "vga", 0)); + gamtor_vga_device &vga(GAMTOR_VGA(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x100000); diff --git a/src/mame/misc/gei.cpp b/src/mame/misc/gei.cpp index 156477aa834..509fbbe42b6 100644 --- a/src/mame/misc/gei.cpp +++ b/src/mame/misc/gei.cpp @@ -1027,7 +1027,7 @@ INTERRUPT_GEN_MEMBER(gei_state::vblank_irq) void gei_state::getrivia(machine_config &config) { - Z80(config, m_maincpu, 4000000); /* 4 MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &gei_state::getrivia_map); m_maincpu->set_vblank_int("screen", FUNC(gei_state::vblank_irq)); @@ -1058,7 +1058,7 @@ void gei_state::getrivia(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.99); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.99); } void gei_state::findout(machine_config &config) diff --git a/src/mame/misc/gfamily.cpp b/src/mame/misc/gfamily.cpp index 5b04a611696..3f5865ced42 100644 --- a/src/mame/misc/gfamily.cpp +++ b/src/mame/misc/gfamily.cpp @@ -75,7 +75,7 @@ void gfamily_state::machine_reset() void gfamily_state::gfamily(machine_config &config) { // Basic machine hardware - PENTIUM4(config, m_maincpu, 1'700'000'000); // Actually an Intel Celeron SL6SC 1.7GHz (with the config found with the default BIOS) + PENTIUM4(config, m_maincpu, XTAL::u(1'700'000'000)); // Actually an Intel Celeron SL6SC 1.7GHz (with the config found with the default BIOS) m_maincpu->set_addrmap(AS_PROGRAM, &gfamily_state::gfamily_map); // Video hardware diff --git a/src/mame/misc/globalfr.cpp b/src/mame/misc/globalfr.cpp index f9425d22175..e5ce2c68983 100644 --- a/src/mame/misc/globalfr.cpp +++ b/src/mame/misc/globalfr.cpp @@ -71,7 +71,7 @@ INPUT_PORTS_END void globalfr_state::globalfr(machine_config &config) { /* basic machine hardware */ - M37702S1(config, m_maincpu, 4000000); + M37702S1(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &globalfr_state::globalfr_map); S16LF01(config, m_vfd); config.set_default_layout(layout_globalfr); diff --git a/src/mame/misc/globalvr.cpp b/src/mame/misc/globalvr.cpp index 0e969bcd8b5..fef13552cb1 100644 --- a/src/mame/misc/globalvr.cpp +++ b/src/mame/misc/globalvr.cpp @@ -90,7 +90,7 @@ INPUT_PORTS_END void globalvr_state::globalvr(machine_config &config) { /* basic machine hardware */ - PENTIUM(config, m_maincpu, 100000000); /* ? MHz */ + PENTIUM(config, m_maincpu, XTAL::u(100000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &globalvr_state::globalvr_map); } diff --git a/src/mame/misc/goldngam.cpp b/src/mame/misc/goldngam.cpp index 27c0b483c20..ef853a1ad60 100644 --- a/src/mame/misc/goldngam.cpp +++ b/src/mame/misc/goldngam.cpp @@ -596,7 +596,7 @@ void goldngam_state::base(machine_config &config) M68000(config, m_maincpu, MASTER_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &goldngam_state::swisspkr_map); - PTM6840(config, m_ptm, 2'000'000); + PTM6840(config, m_ptm, XTAL::u(2'000'000)); m_ptm->irq_callback().set_inputline("maincpu", M68K_IRQ_2); /* video hardware */ @@ -620,7 +620,7 @@ void goldngam_state::swisspkr(machine_config &config) { base(config); - ACIA6850(config, "acia", 0).irq_handler().set_inputline("maincpu", M68K_IRQ_4); + ACIA6850(config, "acia").irq_handler().set_inputline("maincpu", M68K_IRQ_4); AY8912(config, "aysnd", MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); } @@ -634,10 +634,10 @@ void goldngam_state::moviecrd(machine_config &config) m_ptm->irq_callback().set_inputline("maincpu", M68K_IRQ_1); - MC68681(config, m_duart[0], 3'686'400); + MC68681(config, m_duart[0], XTAL::u(3'686'400)); m_duart[0]->irq_cb().set_inputline("maincpu", MOVIECRD_DUART1_IRQ); - MC68681(config, m_duart[1], 3'686'400); + MC68681(config, m_duart[1], XTAL::u(3'686'400)); m_duart[1]->irq_cb().set_inputline("maincpu", MOVIECRD_DUART2_IRQ); YM2149(config, "aysnd", MASTER_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 1.00); diff --git a/src/mame/misc/goldnpkr.cpp b/src/mame/misc/goldnpkr.cpp index a8c6dcb2b88..b591939d454 100644 --- a/src/mame/misc/goldnpkr.cpp +++ b/src/mame/misc/goldnpkr.cpp @@ -4455,11 +4455,11 @@ void goldnpkr_state::goldnpkr_base(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::goldnpkr_mux_port_r)); m_pia[0]->writepb_handler().set(FUNC(goldnpkr_state::lamps_a_w)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set_ioport("SW1"); m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::sound_w)); m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::mux_w)); @@ -4902,13 +4902,13 @@ void blitz_state::megadpkr(machine_config &config) m_mcu->portb_w().set(FUNC(blitz_state::mcu_portb_w)); m_mcu->portc_w().set(FUNC(blitz_state::mcu_portc_w)); - M48T02(config, "timekpr", 0); + M48T02(config, "timekpr"); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); m_pia[0]->writepb_handler().set(FUNC(goldnpkr_state::lamps_a_w)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set_ioport("SW1"); m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::sound_w)); m_pia[1]->writepb_handler().set(FUNC(goldnpkr_state::mux_w)); diff --git a/src/mame/misc/good.cpp b/src/mame/misc/good.cpp index 72b1786ba64..e3a39ac6e33 100644 --- a/src/mame/misc/good.cpp +++ b/src/mame/misc/good.cpp @@ -314,7 +314,7 @@ void good_state::good(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 0.47); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.47); } diff --git a/src/mame/misc/gotcha.cpp b/src/mame/misc/gotcha.cpp index 93b3a68ac6a..94e7d3c591e 100644 --- a/src/mame/misc/gotcha.cpp +++ b/src/mame/misc/gotcha.cpp @@ -279,7 +279,7 @@ void gotcha_state::gotcha(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_gotcha); PALETTE(config, "palette").set_format(palette_device::xRGB_555, 768); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(1); m_sprgen->set_is_bootleg(true); m_sprgen->set_offsets(5, -1); // aligned to 2nd instruction screen in attract diff --git a/src/mame/misc/gsspade.cpp b/src/mame/misc/gsspade.cpp index d0c47cc48b7..62d937726dc 100644 --- a/src/mame/misc/gsspade.cpp +++ b/src/mame/misc/gsspade.cpp @@ -70,11 +70,11 @@ void gsspade_state::gsspade(machine_config &config) m_soundcpu->set_addrmap(AS_IO, &gsspade_state::ext_map); m_soundcpu->port_in_cb<1>().set_ioport("P1"); - I8279(config, "kdc", 1'789'772); // ? + I8279(config, "kdc", XTAL::u(1'789'772)); // ? SPEAKER(config, "speaker").front_center(); - ay8910_device &psg(AY8910(config, "psg", 1'789'772)); // File KC89C72 (clock guessed) + ay8910_device &psg(AY8910(config, "psg", XTAL::u(1'789'772))); // File KC89C72 (clock guessed) psg.add_route(ALL_OUTPUTS, "speaker", 0.65); ym2413_device &m3567(YM2413(config, "m3567", 3.579545_MHz_XTAL)); // M3567 diff --git a/src/mame/misc/hapyfish.cpp b/src/mame/misc/hapyfish.cpp index 00518350289..a37daed7c5a 100644 --- a/src/mame/misc/hapyfish.cpp +++ b/src/mame/misc/hapyfish.cpp @@ -513,7 +513,7 @@ void hapyfish_state::init_mini2440() void hapyfish_state::hapyfish(machine_config &config) { - ARM920T(config, m_maincpu, 100000000); + ARM920T(config, m_maincpu, XTAL::u(100000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hapyfish_state::hapyfish_map); PALETTE(config, "palette").set_entries(32768); @@ -527,10 +527,10 @@ void hapyfish_state::hapyfish(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - UDA1341TS(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // uda1341ts.u12 - UDA1341TS(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // uda1341ts.u12 + UDA1341TS(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // uda1341ts.u12 + UDA1341TS(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // uda1341ts.u12 - S3C2440(config, m_s3c2440, 12000000); + S3C2440(config, m_s3c2440, XTAL::u(12000000)); m_s3c2440->set_palette_tag("palette"); m_s3c2440->set_screen_tag("screen"); m_s3c2440->core_pin_r_callback().set(FUNC(hapyfish_state::s3c2440_core_pin_r)); @@ -543,11 +543,11 @@ void hapyfish_state::hapyfish(machine_config &config) m_s3c2440->nand_data_r_callback().set(FUNC(hapyfish_state::s3c2440_nand_data_r)); m_s3c2440->nand_data_w_callback().set(FUNC(hapyfish_state::s3c2440_nand_data_w)); - NAND(config, m_nand, 0); + NAND(config, m_nand); m_nand->set_nand_type(nand_device::chip::K9LAG08U0M); m_nand->rnb_wr_callback().set(m_s3c2440, FUNC(s3c2440_device::frnb_w)); - NAND(config, m_nand2, 0); + NAND(config, m_nand2); m_nand2->set_nand_type(nand_device::chip::K9LAG08U0M); m_nand2->rnb_wr_callback().set(m_s3c2440, FUNC(s3c2440_device::frnb_w)); } diff --git a/src/mame/misc/hazelgr.cpp b/src/mame/misc/hazelgr.cpp index 419fb7b355c..fec8468af5d 100644 --- a/src/mame/misc/hazelgr.cpp +++ b/src/mame/misc/hazelgr.cpp @@ -75,12 +75,12 @@ static const z80_daisy_config daisy_chain[] = void haze_state::haze(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(2000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &haze_state::mem_map); m_maincpu->set_addrmap(AS_IO, &haze_state::io_map); m_maincpu->set_daisy_config(daisy_chain); - clock_device &ctc_clock(CLOCK(config, "ctc_clock", 1'000'000)); + clock_device &ctc_clock(CLOCK(config, "ctc_clock", XTAL::u(1'000'000))); ctc_clock.signal_handler().set("ctc1", FUNC(z80ctc_device::trg3)); ctc_clock.signal_handler().append("ctc2", FUNC(z80ctc_device::trg0)); ctc_clock.signal_handler().append("ctc2", FUNC(z80ctc_device::trg1)); @@ -89,24 +89,24 @@ void haze_state::haze(machine_config &config) ctc_clock.signal_handler().append("ctc3", FUNC(z80ctc_device::trg0)); ctc_clock.signal_handler().append("ctc3", FUNC(z80ctc_device::trg1)); - z80ctc_device& ctc1(Z80CTC(config, "ctc1", 1'000'000)); + z80ctc_device& ctc1(Z80CTC(config, "ctc1", XTAL::u(1'000'000))); ctc1.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - z80ctc_device& ctc2(Z80CTC(config, "ctc2", 1'000'000)); + z80ctc_device& ctc2(Z80CTC(config, "ctc2", XTAL::u(1'000'000))); ctc2.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - z80ctc_device& ctc3(Z80CTC(config, "ctc3", 1'000'000)); + z80ctc_device& ctc3(Z80CTC(config, "ctc3", XTAL::u(1'000'000))); ctc3.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - z80pio_device& pio1(Z80PIO(config, "pio1", 1'000'000)); + z80pio_device& pio1(Z80PIO(config, "pio1", XTAL::u(1'000'000))); pio1.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); pio1.in_pa_callback().set_ioport("TEST"); - Z80PIO(config, "pio2", 1'000'000); + Z80PIO(config, "pio2", XTAL::u(1'000'000)); - Z80PIO(config, "pio3", 1'000'000); + Z80PIO(config, "pio3", XTAL::u(1'000'000)); - Z80PIO(config, "pio4", 1'000'000); + Z80PIO(config, "pio4", XTAL::u(1'000'000)); } ROM_START( hg_frd ) diff --git a/src/mame/misc/highvdeo.cpp b/src/mame/misc/highvdeo.cpp index 23ec6cd36e6..54dc85a4b26 100644 --- a/src/mame/misc/highvdeo.cpp +++ b/src/mame/misc/highvdeo.cpp @@ -1237,7 +1237,7 @@ void highvdeo_state::tv_vcf(machine_config &config) screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); PALETTE(config, m_palette).set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &highvdeo_state::ramdac_map); /* sound hardware */ @@ -1303,7 +1303,7 @@ void highvdeo_state::ciclone(machine_config &config) void highvdeo_state::brasil(machine_config &config) { - I80186(config, m_maincpu, 20000000); // fashion doesn't like 20/2 Mhz + I80186(config, m_maincpu, XTAL::u(20000000)); // fashion doesn't like 20/2 Mhz m_maincpu->set_addrmap(AS_PROGRAM, &highvdeo_state::brasil_map); m_maincpu->set_addrmap(AS_IO, &highvdeo_state::brasil_io); @@ -1334,7 +1334,7 @@ void highvdeo_state::fashion(machine_config &config) void highvdeo_state::grancapi(machine_config &config) { - I80186(config, m_maincpu, 20000000); + I80186(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &highvdeo_state::brasil_map); m_maincpu->set_addrmap(AS_IO, &highvdeo_state::grancapi_io); @@ -1373,7 +1373,7 @@ void highvdeo_state::zoomania(machine_config &config) void highvdeo_state::magicbom(machine_config &config) { - I80186(config, m_maincpu, 20000000); + I80186(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &highvdeo_state::tv_tcf_map); m_maincpu->set_addrmap(AS_IO, &highvdeo_state::magicbom_io); diff --git a/src/mame/misc/hitpoker.cpp b/src/mame/misc/hitpoker.cpp index ee9061d6e08..0b85786adbc 100644 --- a/src/mame/misc/hitpoker.cpp +++ b/src/mame/misc/hitpoker.cpp @@ -337,13 +337,13 @@ GFXDECODE_END void hitpoker_state::hitpoker(machine_config &config) { - MC68HC11A1(config, m_maincpu, 8'000'000); + MC68HC11A1(config, m_maincpu, XTAL::u(8'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &hitpoker_state::hitpoker_map); m_maincpu->in_pa_callback().set(FUNC(hitpoker_state::hitpoker_pic_r)); m_maincpu->out_pa_callback().set(FUNC(hitpoker_state::hitpoker_pic_w)); m_maincpu->in_pe_callback().set_constant(0); - ds17x85_device &rtc(DS17487(config, "rtc", 32768)); + ds17x85_device &rtc(DS17487(config, "rtc", XTAL::u(32768))); rtc.irq().set_inputline(m_maincpu, MC68HC11_IRQ_LINE); /* video hardware */ @@ -365,7 +365,7 @@ void hitpoker_state::hitpoker(machine_config &config) SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", 1500000)); + ym2149_device &aysnd(YM2149(config, "aysnd", XTAL::u(1500000))); aysnd.port_a_read_callback().set_ioport("DSW1"); aysnd.port_b_read_callback().set_ioport("DSW2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/misc/hobbyplay.cpp b/src/mame/misc/hobbyplay.cpp index 32bc805ae33..f09969c580c 100644 --- a/src/mame/misc/hobbyplay.cpp +++ b/src/mame/misc/hobbyplay.cpp @@ -79,7 +79,7 @@ INPUT_PORTS_END void hobbyplay_state::hobbyplay(machine_config &config) { - Z80(config, m_maincpu, 4'433'618); + Z80(config, m_maincpu, XTAL::u(4'433'618)); m_maincpu->set_addrmap(AS_PROGRAM, &hobbyplay_state::prg_map); i8255_device &ppi0(I8255(config, "ppi0")); diff --git a/src/mame/misc/homedata.cpp b/src/mame/misc/homedata.cpp index 1da074c5c08..c41e19e5830 100644 --- a/src/mame/misc/homedata.cpp +++ b/src/mame/misc/homedata.cpp @@ -1286,7 +1286,7 @@ void homedata_state::mrokumei(machine_config &config) SN76489A(config, m_sn, 16000000/4); // SN76489AN actually m_sn->add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC } @@ -1341,7 +1341,7 @@ void homedata_state::reikaids(machine_config &config) m_ymsnd->add_route(2, "speaker", 0.25); m_ymsnd->add_route(3, "speaker", 1.0); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC } @@ -1354,7 +1354,7 @@ void homedata_state::pteacher(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &homedata_state::pteacher_map); m_maincpu->set_vblank_int("screen", FUNC(homedata_state::homedata_irq)); /* also triggered by the blitter */ - upd7807_device &audiocpu(UPD7807(config, m_audiocpu, 9000000)); /* 9MHz ? */ + upd7807_device &audiocpu(UPD7807(config, m_audiocpu, XTAL::u(9000000))); /* 9MHz ? */ audiocpu.set_addrmap(AS_PROGRAM, &homedata_state::pteacher_upd7807_map); audiocpu.pa_in_cb().set(FUNC(homedata_state::pteacher_upd7807_porta_r)); audiocpu.pa_out_cb().set(FUNC(homedata_state::pteacher_upd7807_porta_w)); @@ -1394,7 +1394,7 @@ void homedata_state::pteacher(machine_config &config) SN76489A(config, m_sn, 16000000/4); // SN76489AN actually m_sn->add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC } void homedata_state::jogakuen(machine_config &config) @@ -1408,7 +1408,7 @@ void homedata_state::mjkinjas(machine_config &config) { pteacher(config); - m_audiocpu->set_clock(11000000); /* 11MHz ? */ + m_audiocpu->set_clock(XTAL::u(11000000)); /* 11MHz ? */ } void homedata_state::lemnangl(machine_config &config) @@ -1563,7 +1563,7 @@ void homedata_state::mirderby(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - YM2203(config, m_ymsnd, 2000000); + YM2203(config, m_ymsnd, XTAL::u(2000000)); m_ymsnd->add_route(0, "speaker", 0.25); m_ymsnd->add_route(1, "speaker", 0.25); m_ymsnd->add_route(2, "speaker", 0.25); diff --git a/src/mame/misc/hotblock.cpp b/src/mame/misc/hotblock.cpp index 5d94af556f1..c1ee71a2c34 100644 --- a/src/mame/misc/hotblock.cpp +++ b/src/mame/misc/hotblock.cpp @@ -195,7 +195,7 @@ void hotblock_state::hotblock(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &hotblock_state::hotblock_map); m_maincpu->set_addrmap(AS_IO, &hotblock_state::hotblock_io); - I2C_24C02(config, "i2cmem", 0); // 24C02B1 // Some boards may use a 24C04, but using just half its capacity + I2C_24C02(config, "i2cmem"); // 24C02B1 // Some boards may use a 24C04, but using just half its capacity ADDRESS_MAP_BANK(config, m_video_bank).set_map(&hotblock_state::banked_video_map).set_options(ENDIANNESS_LITTLE, 8, 24, 0x10000); diff --git a/src/mame/misc/hotchili.cpp b/src/mame/misc/hotchili.cpp index f291bb5f87f..11b937d4db8 100644 --- a/src/mame/misc/hotchili.cpp +++ b/src/mame/misc/hotchili.cpp @@ -563,7 +563,7 @@ void hotchili_state::hotchili(machine_config &config) m_screen->screen_vblank().set_inputline(m_maincpu, 0, HOLD_LINE); m_screen->set_palette(m_palette); - X1_001(config, m_spritegen, 16'000'000, m_palette, gfx_hotchili); + X1_001(config, m_spritegen, XTAL::u(16'000'000), m_palette, gfx_hotchili); m_spritegen->set_fg_yoffsets( -0x12, 0x0e ); m_spritegen->set_bg_yoffsets( 0x1, -0x1 ); diff --git a/src/mame/misc/hotstuff.cpp b/src/mame/misc/hotstuff.cpp index 05c1b1ffb77..f755dd1671f 100644 --- a/src/mame/misc/hotstuff.cpp +++ b/src/mame/misc/hotstuff.cpp @@ -97,7 +97,7 @@ INPUT_PORTS_END void hotstuff_state::hotstuff(machine_config &config) { - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &hotstuff_state::hotstuff_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -109,10 +109,10 @@ void hotstuff_state::hotstuff(machine_config &config) PALETTE(config, "palette").set_entries(0x200); - scc8530_device& scc1(SCC8530N(config, "scc1", 4915200)); + scc8530_device& scc1(SCC8530N(config, "scc1", XTAL::u(4915200))); scc1.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_4); - scc8530_device& scc2(SCC8530N(config, "scc2", 4915200)); + scc8530_device& scc2(SCC8530N(config, "scc2", XTAL::u(4915200))); scc2.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_5); MC146818(config, m_rtc, XTAL(32'768)); diff --git a/src/mame/misc/imolagp.cpp b/src/mame/misc/imolagp.cpp index d1be2a24cc1..bf5bf88e48b 100644 --- a/src/mame/misc/imolagp.cpp +++ b/src/mame/misc/imolagp.cpp @@ -538,18 +538,18 @@ void imolagp_state::machine_reset() void imolagp_state::imolagp(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3000000); // ? (assume slower than slave) + Z80(config, m_maincpu, XTAL::u(3000000)); // ? (assume slower than slave) m_maincpu->set_addrmap(AS_PROGRAM, &imolagp_state::imolagp_master_map); m_maincpu->set_addrmap(AS_IO, &imolagp_state::imolagp_master_io); TIMER(config, m_steer_pot_timer).configure_generic(FUNC(imolagp_state::imolagp_pot_callback)); // maincpu nmi - Z80(config, m_slavecpu, 4000000); // ? + Z80(config, m_slavecpu, XTAL::u(4000000)); // ? m_slavecpu->set_addrmap(AS_PROGRAM, &imolagp_state::imolagp_slave_map); m_slavecpu->set_addrmap(AS_IO, &imolagp_state::imolagp_slave_io); config.set_perfect_quantum(m_maincpu); - i8255_device &ppi(I8255A(config, "ppi8255", 0)); + i8255_device &ppi(I8255A(config, "ppi8255")); // mode $91 - ports A & C-lower as input, ports B & C-upper as output ppi.in_pa_callback().set_ioport("IN0"); ppi.in_pb_callback().set_log("PPI8255 - unmapped read port B"); @@ -574,7 +574,7 @@ void imolagp_state::imolagp(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, "aysnd", 2000000).add_route(ALL_OUTPUTS, "mono", 0.5); // ? + AY8910(config, "aysnd", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.5); // ? } diff --git a/src/mame/misc/inder_sb.cpp b/src/mame/misc/inder_sb.cpp index 33de7c663ac..7efada0128a 100644 --- a/src/mame/misc/inder_sb.cpp +++ b/src/mame/misc/inder_sb.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(INDER_AUDIO, inder_sb_device, "indersb", "Inder 4xDAC Sound Board") -inder_sb_device::inder_sb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +inder_sb_device::inder_sb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INDER_AUDIO, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , m_audiocpu(*this, "audiocpu") @@ -151,24 +151,24 @@ void inder_sb_device::sound_io(address_map &map) void inder_sb_device::device_add_mconfig(machine_config &config) { - Z80(config, m_audiocpu, 8000000); // unk freq + Z80(config, m_audiocpu, XTAL::u(8000000)); // unk freq m_audiocpu->set_daisy_config(daisy_chain); m_audiocpu->set_addrmap(AS_PROGRAM, &inder_sb_device::sound_map); m_audiocpu->set_addrmap(AS_IO, &inder_sb_device::sound_io); - Z80CTC(config, m_ctc, 4000000); // unk freq + Z80CTC(config, m_ctc, XTAL::u(4000000)); // unk freq // runs in IM2 , vector set to 0x20 , values there are 0xCC, 0x02, 0xE6, 0x02, 0x09, 0x03, 0x23, 0x03 (so 02cc, 02e6, 0309, 0323, all of which are valid irq handlers) m_ctc->intr_callback().set_inputline(m_audiocpu, 0); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac0", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac3", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC - DAC_8BIT_R2R(config, "dac0vol", 0).set_output_range(0, 1).add_route(0, "dac0", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac0", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC - DAC_8BIT_R2R(config, "dac1vol", 0).set_output_range(0, 1).add_route(0, "dac1", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac1", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC - DAC_8BIT_R2R(config, "dac2vol", 0).set_output_range(0, 1).add_route(0, "dac2", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac2", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC - DAC_8BIT_R2R(config, "dac3vol", 0).set_output_range(0, 1).add_route(0, "dac3", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac3", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac0").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, "dac3").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac0vol").set_output_range(0, 1).add_route(0, "dac0", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac0", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC + DAC_8BIT_R2R(config, "dac1vol").set_output_range(0, 1).add_route(0, "dac1", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac1", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC + DAC_8BIT_R2R(config, "dac2vol").set_output_range(0, 1).add_route(0, "dac2", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac2", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC + DAC_8BIT_R2R(config, "dac3vol").set_output_range(0, 1).add_route(0, "dac3", 1.0, DAC_INPUT_RANGE_HI).add_route(0, "dac3", -1.0, DAC_INPUT_RANGE_LO); // unknown DAC } diff --git a/src/mame/misc/inder_sb.h b/src/mame/misc/inder_sb.h index 0dcd608bdeb..526d5cecca4 100644 --- a/src/mame/misc/inder_sb.h +++ b/src/mame/misc/inder_sb.h @@ -22,7 +22,7 @@ class inder_sb_device : public device_t, { public: // construction/destruction - inder_sb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + inder_sb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t megaphx_sound_sent_r(); uint8_t megaphx_sound_cmd_r(); diff --git a/src/mame/misc/intrscti.cpp b/src/mame/misc/intrscti.cpp index 4d2c2e89b10..66dfb988c11 100644 --- a/src/mame/misc/intrscti.cpp +++ b/src/mame/misc/intrscti.cpp @@ -192,12 +192,12 @@ GFXDECODE_END void intrscti_state::intrscti(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &intrscti_state::intrscti_map); m_maincpu->set_addrmap(AS_IO, &intrscti_state::intrscti_io_map); m_maincpu->set_vblank_int("screen", FUNC(intrscti_state::irq0_line_hold)); - Z80(config, m_subcpu, 4000000); /* ? MHz */ + Z80(config, m_subcpu, XTAL::u(4000000)); /* ? MHz */ m_subcpu->set_addrmap(AS_PROGRAM, &intrscti_state::intrscti_sub_map); m_subcpu->set_addrmap(AS_IO, &intrscti_state::intrscti_sub_io_map); diff --git a/src/mame/misc/istellar.cpp b/src/mame/misc/istellar.cpp index dad61328c0f..465a5fb9dab 100644 --- a/src/mame/misc/istellar.cpp +++ b/src/mame/misc/istellar.cpp @@ -309,7 +309,7 @@ void istellar_state::istellar(machine_config &config) latch2.data_pending_callback().set_inputline(m_subcpu, INPUT_LINE_NMI); latch2.set_separate_acknowledge(true); - PIONEER_LDV1000(config, m_laserdisc, 0); + PIONEER_LDV1000(config, m_laserdisc); m_laserdisc->set_overlay(256, 256, FUNC(istellar_state::screen_update)); m_laserdisc->add_route(0, "lspeaker", 1.0); m_laserdisc->add_route(1, "rspeaker", 1.0); diff --git a/src/mame/misc/jackpool.cpp b/src/mame/misc/jackpool.cpp index a7d1b23f1dc..0dbbb0068ae 100644 --- a/src/mame/misc/jackpool.cpp +++ b/src/mame/misc/jackpool.cpp @@ -235,7 +235,7 @@ INTERRUPT_GEN_MEMBER(jackpool_state::jackpool_interrupt) void jackpool_state::jackpool(machine_config &config) { - M68000(config, m_maincpu, 12000000); // ? + M68000(config, m_maincpu, XTAL::u(12000000)); // ? m_maincpu->set_addrmap(AS_PROGRAM, &jackpool_state::jackpool_mem); m_maincpu->set_vblank_int("screen", FUNC(jackpool_state::jackpool_interrupt)); // ? @@ -272,13 +272,13 @@ void jackpool_state::jackpool(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - NS16550(config, "uart", 1843200); // exact type and clock unknown + NS16550(config, "uart", XTAL::u(1843200)); // exact type and clock unknown PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x200); SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } diff --git a/src/mame/misc/jankenmn.cpp b/src/mame/misc/jankenmn.cpp index 4ce86c50ef8..25a87aad1c8 100644 --- a/src/mame/misc/jankenmn.cpp +++ b/src/mame/misc/jankenmn.cpp @@ -410,7 +410,7 @@ void jankenmn_state::jankenmn(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - AD7523(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + AD7523(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); } diff --git a/src/mame/misc/jokrwild.cpp b/src/mame/misc/jokrwild.cpp index 89756db60f0..8c04301edbe 100644 --- a/src/mame/misc/jokrwild.cpp +++ b/src/mame/misc/jokrwild.cpp @@ -422,13 +422,13 @@ void jokrwild_state::jokrwild(machine_config &config) // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - pia6821_device &pia0(PIA6821(config, "pia0", 0)); + pia6821_device &pia0(PIA6821(config, "pia0")); pia0.readpa_handler().set_ioport("IN0"); pia0.readpb_handler().set_ioport("IN1"); pia0.writepa_handler().set(FUNC(jokrwild_state::testa_w)); pia0.writepb_handler().set(FUNC(jokrwild_state::testb_w)); - pia6821_device &pia1(PIA6821(config, "pia1", 0)); + pia6821_device &pia1(PIA6821(config, "pia1")); pia1.readpa_handler().set_ioport("IN2"); pia1.readpb_handler().set_ioport("IN3"); diff --git a/src/mame/misc/krokha.cpp b/src/mame/misc/krokha.cpp index 93a1fbf8f62..973ed7a87dc 100644 --- a/src/mame/misc/krokha.cpp +++ b/src/mame/misc/krokha.cpp @@ -134,7 +134,7 @@ uint32_t krokha_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap void krokha_state::krokha(machine_config &config) { - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &krokha_state::krokha_mem); m_maincpu->out_status_func().set(FUNC(krokha_state::status_callback)); diff --git a/src/mame/misc/kurukuru.cpp b/src/mame/misc/kurukuru.cpp index 5f40df35c4e..e384d13d8b6 100644 --- a/src/mame/misc/kurukuru.cpp +++ b/src/mame/misc/kurukuru.cpp @@ -875,7 +875,7 @@ void kurukuru_state::kurukuru(machine_config &config) // latch irq vector is $ef (rst $28) // timer irq vector is $f7 (rst $30) // if both are asserted, the vector becomes $f7 AND $ef = $e7 (rst $20) - RST_NEG_BUFFER(config, m_soundirq, 0).int_callback().set_inputline(m_audiocpu, 0); + RST_NEG_BUFFER(config, m_soundirq).int_callback().set_inputline(m_audiocpu, 0); ym2149_device &ym2149(YM2149(config, "ym2149", YM2149_CLOCK)); ym2149.port_b_read_callback().set_ioport("DSW2"); diff --git a/src/mame/misc/ladyfrog.cpp b/src/mame/misc/ladyfrog.cpp index d8feeb4b3ca..65546baff05 100644 --- a/src/mame/misc/ladyfrog.cpp +++ b/src/mame/misc/ladyfrog.cpp @@ -337,7 +337,7 @@ void ladyfrog_state::ladyfrog(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.25); // unknown DAC } void ladyfrog_state::toucheme(machine_config &config) diff --git a/src/mame/misc/laserbas.cpp b/src/mame/misc/laserbas.cpp index 9590a07af8b..e28e8082324 100644 --- a/src/mame/misc/laserbas.cpp +++ b/src/mame/misc/laserbas.cpp @@ -400,7 +400,7 @@ void laserbas_state::laserbas(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(laserbas_state::laserbas_scanline), "screen", 0, 1); /* TODO: clocks aren't known */ - pit8253_device &pit0(PIT8253(config, "pit0", 0)); + pit8253_device &pit0(PIT8253(config, "pit0")); pit0.set_clk<0>(PIT_CLOCK); pit0.set_clk<1>(PIT_CLOCK); pit0.set_clk<2>(PIT_CLOCK); @@ -408,7 +408,7 @@ void laserbas_state::laserbas(machine_config &config) pit0.out_handler<1>().set(FUNC(laserbas_state::pit_out_w<1>)); pit0.out_handler<2>().set(FUNC(laserbas_state::pit_out_w<2>)); - pit8253_device &pit1(PIT8253(config, "pit1", 0)); + pit8253_device &pit1(PIT8253(config, "pit1")); pit1.set_clk<0>(PIT_CLOCK); pit1.set_clk<1>(PIT_CLOCK); pit1.set_clk<2>(PIT_CLOCK); @@ -417,7 +417,7 @@ void laserbas_state::laserbas(machine_config &config) pit1.out_handler<2>().set(FUNC(laserbas_state::pit_out_w<5>)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(6000000, 360, 0, 256, 274, 0, 224); + screen.set_raw(XTAL::u(6000000), 360, 0, 256, 274, 0, 224); screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); mc6845_device &crtc(MC6845(config, "crtc", 3000000/4)); /* unknown clock, hand tuned to get ~60 fps */ @@ -431,7 +431,7 @@ void laserbas_state::laserbas(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); for (auto &dac : m_dac) - DAC_4BIT_R2R(config, dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.16); + DAC_4BIT_R2R(config, dac).add_route(ALL_OUTPUTS, "speaker", 0.16); } /* diff --git a/src/mame/misc/lependu.cpp b/src/mame/misc/lependu.cpp index 8d15ca1be0c..bfc2b7e20d0 100644 --- a/src/mame/misc/lependu.cpp +++ b/src/mame/misc/lependu.cpp @@ -544,11 +544,11 @@ void lependu_state::lependu(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set(FUNC(lependu_state::lependu_mux_port_r)); m_pia[0]->writepb_handler().set(FUNC(lependu_state::lamps_w)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set_ioport("SW1"); m_pia[1]->readpb_handler().set_ioport("SW2"); m_pia[1]->writepa_handler().set(FUNC(lependu_state::sound_w)); diff --git a/src/mame/misc/limenko.cpp b/src/mame/misc/limenko.cpp index a9d3272cda2..7dec27e8228 100644 --- a/src/mame/misc/limenko.cpp +++ b/src/mame/misc/limenko.cpp @@ -729,12 +729,12 @@ void limenko_state::limenko(machine_config &config) void limenko_state::spotty(machine_config &config) { - GMS30C2232(config, m_maincpu, 20000000); /* 20 MHz, no internal multiplier */ + GMS30C2232(config, m_maincpu, XTAL::u(20000000)); /* 20 MHz, no internal multiplier */ m_maincpu->set_addrmap(AS_PROGRAM, &limenko_state::spotty_map); m_maincpu->set_addrmap(AS_IO, &limenko_state::spotty_io_map); m_maincpu->set_vblank_int("screen", FUNC(limenko_state::irq0_line_hold)); - at89c4051_device &audiocpu(AT89C4051(config, "audiocpu", 4000000)); + at89c4051_device &audiocpu(AT89C4051(config, "audiocpu", XTAL::u(4000000))); audiocpu.port_in_cb<1>().set(FUNC(limenko_state::audiocpu_p1_r)); audiocpu.port_out_cb<1>().set(FUNC(limenko_state::audiocpu_p1_w)); audiocpu.port_in_cb<3>().set(FUNC(limenko_state::audiocpu_p3_r)); diff --git a/src/mame/misc/luckybal.cpp b/src/mame/misc/luckybal.cpp index fc16f3fe452..3f49ecc80ac 100644 --- a/src/mame/misc/luckybal.cpp +++ b/src/mame/misc/luckybal.cpp @@ -588,11 +588,11 @@ void luckybal_state::luckybal(machine_config &config) m_ppi->in_pc_callback().set(FUNC(luckybal_state::input_port_c_r)); m_ppi->out_pc_callback().set(FUNC(luckybal_state::output_port_c_w)); - CD4099(config, "latch1", 0); + CD4099(config, "latch1"); - CD4099(config, "latch2", 0); + CD4099(config, "latch2"); - CD4099(config, "latch3", 0); + CD4099(config, "latch3"); // nvram NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -606,7 +606,7 @@ void luckybal_state::luckybal(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - DAC08(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC08(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); } diff --git a/src/mame/misc/magic10.cpp b/src/mame/misc/magic10.cpp index 9f7483c93d2..64c06fac7b1 100644 --- a/src/mame/misc/magic10.cpp +++ b/src/mame/misc/magic10.cpp @@ -793,7 +793,7 @@ void magic10_base_state::base(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } diff --git a/src/mame/misc/magicard.cpp b/src/mame/misc/magicard.cpp index 5aa81cb8367..d3ff0e0a213 100644 --- a/src/mame/misc/magicard.cpp +++ b/src/mame/misc/magicard.cpp @@ -855,7 +855,7 @@ void magicard_base_state::magicard_base(machine_config &config) m_scc66470->irq().set(FUNC(magicard_base_state::scc66470_irq)); PALETTE(config, m_palette).set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &magicard_state::ramdac_map); SPEAKER(config, "mono").front_center(); @@ -882,7 +882,7 @@ void magicard_state::magicard_pic54(machine_config &config) { magicard(config); - pic16c54_device &pic(PIC16C54(config, "pic16c54", 3686400)); // correct? + pic16c54_device &pic(PIC16C54(config, "pic16c54", XTAL::u(3686400))); // correct? pic.read_b().set(FUNC(magicard_state::pic_portb_r)); pic.write_b().set(FUNC(magicard_state::pic_portb_w)); } @@ -891,7 +891,7 @@ void magicard_state::magicard_pic56(machine_config &config) { magicard(config); - pic16c56_device &pic(PIC16C56(config, "pic16c56", 3686400)); // correct? + pic16c56_device &pic(PIC16C56(config, "pic16c56", XTAL::u(3686400))); // correct? pic.read_b().set(FUNC(magicard_state::pic_portb_r)); pic.write_b().set(FUNC(magicard_state::pic_portb_w)); } @@ -913,7 +913,7 @@ void hotslots_state::hotslots_base(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &hotslots_state::hotslots_map); - YMZ284(config, "ssg", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0); + YMZ284(config, "ssg", XTAL::u(4000000)).add_route(ALL_OUTPUTS, "mono", 1.0); RTC72421(config, m_rtc, XTAL(32'768)).out_int_handler().set(FUNC(hotslots_state::cpu_int1)); @@ -933,7 +933,7 @@ void hotslots_state::hotslots_pic54(machine_config &config) { hotslots(config); - pic16c54_device &pic(PIC16C54(config, "pic16c54", 3686400)); // correct? + pic16c54_device &pic(PIC16C54(config, "pic16c54", XTAL::u(3686400))); // correct? pic.read_b().set(FUNC(hotslots_state::pic_portb_r)); pic.write_b().set(FUNC(hotslots_state::pic_portb_w)); } @@ -951,7 +951,7 @@ void hotslots_state::puzzleme(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &hotslots_state::puzzleme_map); - pic16c54_device &pic(PIC16C54(config, "pic16c54", 3686400)); // correct? + pic16c54_device &pic(PIC16C54(config, "pic16c54", XTAL::u(3686400))); // correct? pic.read_b().set(FUNC(hotslots_state::pic_portb_r)); pic.write_b().set(FUNC(hotslots_state::pic_portb_w)); diff --git a/src/mame/misc/magicfly.cpp b/src/mame/misc/magicfly.cpp index 6263ca976a8..e555e4f7b9a 100644 --- a/src/mame/misc/magicfly.cpp +++ b/src/mame/misc/magicfly.cpp @@ -971,7 +971,7 @@ void magicfly_state::magicfly(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); } diff --git a/src/mame/misc/magictg.cpp b/src/mame/misc/magictg.cpp index 64cb652ec87..195671508bd 100644 --- a/src/mame/misc/magictg.cpp +++ b/src/mame/misc/magictg.cpp @@ -915,12 +915,12 @@ INPUT_PORTS_END void magictg_state::magictg(machine_config &config) { - R5000BE(config, m_mips, 200000000); // exact model 79RV5000-200BS272 rated for 200MHz, clock not measured + R5000BE(config, m_mips, XTAL::u(200000000)); // exact model 79RV5000-200BS272 rated for 200MHz, clock not measured //m_mips->set_icache_size(16384); /* TODO: Unknown */ //m_mips->set_dcache_size(16384); /* TODO: Unknown */ m_mips->set_addrmap(AS_PROGRAM, &magictg_state::magictg_map); - ADSP2181(config, m_adsp, 16000000); + ADSP2181(config, m_adsp, XTAL::u(16000000)); m_adsp->set_addrmap(AS_PROGRAM, &magictg_state::adsp_program_map); m_adsp->set_addrmap(AS_DATA, &magictg_state::adsp_data_map); m_adsp->set_addrmap(AS_IO, &magictg_state::adsp_io_map); @@ -931,7 +931,7 @@ void magictg_state::magictg(machine_config &config) DMADAC(config, "dac1").add_route(ALL_OUTPUTS, "rspeaker", 1.0); DMADAC(config, "dac2").add_route(ALL_OUTPUTS, "lspeaker", 1.0); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(0, FUNC(magictg_state::pci_dev0_r), FUNC(magictg_state::pci_dev0_w)); pcibus.set_device(7, FUNC(magictg_state::voodoo_0_pci_r), FUNC(magictg_state::voodoo_0_pci_w)); diff --git a/src/mame/misc/magtouch.cpp b/src/mame/misc/magtouch.cpp index b27750ed40e..78859911330 100644 --- a/src/mame/misc/magtouch.cpp +++ b/src/mame/misc/magtouch.cpp @@ -225,13 +225,13 @@ void magtouch_state::magtouch(machine_config &config) uart.out_tx_callback().set("microtouch", FUNC(microtouch_device::rx)); uart.out_int_callback().set("pic8259_1", FUNC(pic8259_device::ir4_w)); - MICROTOUCH(config, "microtouch", 9600).stx().set("ns16450_0", FUNC(ins8250_uart_device::rx_w)); + MICROTOUCH(config, "microtouch", XTAL::u(9600)).stx().set("ns16450_0", FUNC(ins8250_uart_device::rx_w)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); m_dma8237_1->out_iow_callback<1>().set(FUNC(magtouch_state::dma8237_1_dack_w)); - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace("maincpu", AS_PROGRAM); m_isabus->set_iospace("maincpu", AS_IO); m_isabus->irq2_callback().set("pic8259_2", FUNC(pic8259_device::ir1_w)); @@ -245,7 +245,7 @@ void magtouch_state::magtouch(machine_config &config) m_isabus->drq3_callback().set("dma8237_1", FUNC(am9517a_device::dreq3_w)); // FIXME: determine ISA bus clock - isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", 0, m_isabus, magtouch_isa8_cards, "sb15", true)); + isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", m_isabus, magtouch_isa8_cards, "sb15", true)); isa1.set_option_device_input_defaults("sb15", DEVICE_INPUT_DEFAULTS_NAME(magtouch_sb_def)); isa1.set_option_machine_config("sb15", magtouch_sb_conf); } diff --git a/src/mame/misc/malzak.cpp b/src/mame/misc/malzak.cpp index cf2dab1dfd7..c92d27d3939 100644 --- a/src/mame/misc/malzak.cpp +++ b/src/mame/misc/malzak.cpp @@ -306,15 +306,15 @@ void malzak_state::malzak(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_malzak); PALETTE(config, m_palette, FUNC(malzak_state::palette_init), 128); - S2636(config, m_s2636[0], 0); + S2636(config, m_s2636[0]); m_s2636[0]->set_offsets(0, -16); // -8, -16 m_s2636[0]->add_route(ALL_OUTPUTS, "mono", 0.25); - S2636(config, m_s2636[1], 0); + S2636(config, m_s2636[1]); m_s2636[1]->set_offsets(0, -16); // -9, -16 m_s2636[1]->add_route(ALL_OUTPUTS, "mono", 0.25); - SAA5050(config, m_trom, 6000000); + SAA5050(config, m_trom, XTAL::u(6000000)); m_trom->d_cb().set(FUNC(malzak_state::videoram_r)); m_trom->set_screen_size(42, 24, 64); diff --git a/src/mame/misc/matrix.cpp b/src/mame/misc/matrix.cpp index b52c599783b..72756d54900 100644 --- a/src/mame/misc/matrix.cpp +++ b/src/mame/misc/matrix.cpp @@ -55,7 +55,7 @@ INPUT_PORTS_END void matrix_state::matrix(machine_config &config) { // basic machine hardware - MEDIAGX(config, m_maincpu, 233'000'000); // Cyrix MediaGX GXm-266GP + MEDIAGX(config, m_maincpu, XTAL::u(233'000'000)); // Cyrix MediaGX GXm-266GP m_maincpu->set_addrmap(AS_PROGRAM, &matrix_state::main_map); // video hardware, all TBD diff --git a/src/mame/misc/megaphx.cpp b/src/mame/misc/megaphx.cpp index 4570f22a31a..0650dad3d3d 100644 --- a/src/mame/misc/megaphx.cpp +++ b/src/mame/misc/megaphx.cpp @@ -411,9 +411,9 @@ void megaphx_state::megaphx(machine_config &config) m_ppi->in_pc_callback().set(FUNC(megaphx_state::ppi_portc_r)); m_ppi->out_pc_callback().set(FUNC(megaphx_state::ppi_portc_w)); - INDER_VIDEO(config, m_indervid, 0); + INDER_VIDEO(config, m_indervid); - INDER_AUDIO(config, "inder_sb", 0); + INDER_AUDIO(config, "inder_sb"); } ROM_START( megaphx ) diff --git a/src/mame/misc/meyc8080.cpp b/src/mame/misc/meyc8080.cpp index 66cb57c71c0..e8e3ff95b3c 100644 --- a/src/mame/misc/meyc8080.cpp +++ b/src/mame/misc/meyc8080.cpp @@ -601,7 +601,7 @@ void meyc8080_state::meyc8080(machine_config &config) /* audio hardware */ SPEAKER(config, "speaker").front_center(); - DAC_2BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.66); // unknown DAC + DAC_2BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.66); // unknown DAC } diff --git a/src/mame/misc/meyc8088.cpp b/src/mame/misc/meyc8088.cpp index 47cc00bd80d..4dcfd58dad7 100644 --- a/src/mame/misc/meyc8088.cpp +++ b/src/mame/misc/meyc8088.cpp @@ -399,7 +399,7 @@ void meyc8088_state::meyc8088(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); } diff --git a/src/mame/misc/micro3d.cpp b/src/mame/misc/micro3d.cpp index fed0a54691d..cd32105061e 100644 --- a/src/mame/misc/micro3d.cpp +++ b/src/mame/misc/micro3d.cpp @@ -344,7 +344,7 @@ void micro3d_state::micro3d(machine_config &config) m_duart->inport_cb().set(FUNC(micro3d_state::duart_input_r)); m_duart->outport_cb().set(FUNC(micro3d_state::duart_output_w)); - mc68901_device &mfp(MC68901(config, "mfp", 4000000)); + mc68901_device &mfp(MC68901(config, "mfp", XTAL::u(4000000))); mfp.set_timer_clock(4000000); mfp.out_irq_cb().set_inputline("maincpu", M68K_IRQ_4); mfp.out_tao_cb().set("mfp", FUNC(mc68901_device::rc_w)); diff --git a/src/mame/misc/micro3d_a.cpp b/src/mame/misc/micro3d_a.cpp index e21e588935a..9f02d8602e4 100644 --- a/src/mame/misc/micro3d_a.cpp +++ b/src/mame/misc/micro3d_a.cpp @@ -162,7 +162,7 @@ void micro3d_sound_device::noise_sh_w(u8 data) DEFINE_DEVICE_TYPE(MICRO3D_SOUND, micro3d_sound_device, "micro3d_sound", "Microprose Custom Sound") -micro3d_sound_device::micro3d_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +micro3d_sound_device::micro3d_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MICRO3D_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), m_gain(0), diff --git a/src/mame/misc/micro3d_a.h b/src/mame/misc/micro3d_a.h index ca54dff85bb..473d26b29fe 100644 --- a/src/mame/misc/micro3d_a.h +++ b/src/mame/misc/micro3d_a.h @@ -13,7 +13,7 @@ class micro3d_sound_device : public device_t, public device_sound_interface { public: - micro3d_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + micro3d_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void dac_w(u8 data) { m_dac_data = data; } void noise_sh_w(u8 data); diff --git a/src/mame/misc/microdar.cpp b/src/mame/misc/microdar.cpp index cfff2aa9da2..bc6fb952a04 100644 --- a/src/mame/misc/microdar.cpp +++ b/src/mame/misc/microdar.cpp @@ -145,7 +145,7 @@ void microdar_state::microdv5(machine_config &config) void microdar_state::covidarts(machine_config &config) { - I80C31(config, m_maincpu, 16'000'000); // Philips PCB80C31BH-3-16P (Internal MCU osc.) + I80C31(config, m_maincpu, XTAL::u(16'000'000)); // Philips PCB80C31BH-3-16P (Internal MCU osc.) //NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // HM6264ALP-12 + battery I2C_24C04(config, m_eeprom); // Microchip 24LC04B diff --git a/src/mame/misc/mil4000.cpp b/src/mame/misc/mil4000.cpp index 09a9a8b46b2..f565cfec733 100644 --- a/src/mame/misc/mil4000.cpp +++ b/src/mame/misc/mil4000.cpp @@ -588,7 +588,7 @@ void mil4000_state::mil4000(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_mil4000); SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // frequency from 1000 kHz resonator. pin 7 high not verified. + OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // frequency from 1000 kHz resonator. pin 7 high not verified. } diff --git a/src/mame/misc/miniboy7.cpp b/src/mame/misc/miniboy7.cpp index 9423a10432d..244ac5352e9 100644 --- a/src/mame/misc/miniboy7.cpp +++ b/src/mame/misc/miniboy7.cpp @@ -659,7 +659,7 @@ void miniboy7_state::miniboy7(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - pia6821_device &pia(PIA6821(config, "pia0", 0)); + pia6821_device &pia(PIA6821(config, "pia0")); pia.readpa_handler().set_ioport("INPUT1"); pia.readpb_handler().set(FUNC(miniboy7_state::pia_pb_r)); pia.ca2_handler().set(FUNC(miniboy7_state::pia_ca2_w)); diff --git a/src/mame/misc/mjsenpu.cpp b/src/mame/misc/mjsenpu.cpp index d699314e5bc..bacca287387 100644 --- a/src/mame/misc/mjsenpu.cpp +++ b/src/mame/misc/mjsenpu.cpp @@ -483,7 +483,7 @@ void mjsenpu_state::mjsenpu(machine_config &config) SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ } diff --git a/src/mame/misc/mole.cpp b/src/mame/misc/mole.cpp index c3a42fdb32f..da5aaf49f6d 100644 --- a/src/mame/misc/mole.cpp +++ b/src/mame/misc/mole.cpp @@ -327,7 +327,7 @@ void mole_state::machine_reset() void mole_state::mole(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 4000000); // ??? + M6502(config, m_maincpu, XTAL::u(4000000)); // ??? m_maincpu->set_addrmap(AS_PROGRAM, &mole_state::mole_map); m_maincpu->set_vblank_int("screen", FUNC(mole_state::irq0_line_assert)); @@ -346,7 +346,7 @@ void mole_state::mole(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, "aysnd", 2000000).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8910(config, "aysnd", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/misc/multfish.cpp b/src/mame/misc/multfish.cpp index 11a39c5f46b..6730ca29d72 100644 --- a/src/mame/misc/multfish.cpp +++ b/src/mame/misc/multfish.cpp @@ -1079,7 +1079,7 @@ void igrosoft_gamble_state::igrosoft_gamble(machine_config &config) SPEAKER(config, "mono").front_center(); AY8910(config, "aysnd", 6000000/4).add_route(ALL_OUTPUTS, "mono", 0.30); - M48T35(config, m_m48t35, 0); + M48T35(config, m_m48t35); HOPPER(config, m_hopper, attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH); } diff --git a/src/mame/misc/murogem.cpp b/src/mame/misc/murogem.cpp index 5acf37d4b63..cbbe92be917 100644 --- a/src/mame/misc/murogem.cpp +++ b/src/mame/misc/murogem.cpp @@ -250,7 +250,7 @@ uint32_t murogem_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma void murogem_state::murogem(machine_config &config) { /* basic machine hardware */ - M6802(config, m_maincpu, 8000000); /* ? MHz */ + M6802(config, m_maincpu, XTAL::u(8000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &murogem_state::murogem_map); m_maincpu->set_vblank_int("screen", FUNC(murogem_state::irq0_line_hold)); @@ -265,14 +265,14 @@ void murogem_state::murogem(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_murogem); PALETTE(config, m_palette, FUNC(murogem_state::murogem_palette), 0x100); - mc6845_device &crtc(MC6845(config, "crtc", 750000)); /* ? MHz */ + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(750000))); /* ? MHz */ crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.375); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.375); } diff --git a/src/mame/misc/murogmbl.cpp b/src/mame/misc/murogmbl.cpp index fb1329eaf7a..d2c2026a5a5 100644 --- a/src/mame/misc/murogmbl.cpp +++ b/src/mame/misc/murogmbl.cpp @@ -350,7 +350,7 @@ GFXDECODE_END void murogmbl_state::murogmbl(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 1000000); /* Z80? */ + Z80(config, m_maincpu, XTAL::u(1000000)); /* Z80? */ m_maincpu->set_addrmap(AS_PROGRAM, &murogmbl_state::murogmbl_map); GFXDECODE(config, m_gfxdecode, m_palette, gfx_murogmbl); @@ -367,13 +367,13 @@ void murogmbl_state::murogmbl(machine_config &config) PALETTE(config, m_palette, FUNC(murogmbl_state::murogmbl_palette), 0x100); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void slotunbl_state::slotunbl(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 1000000); /* Z80? */ + Z80(config, m_maincpu, XTAL::u(1000000)); /* Z80? */ m_maincpu->set_addrmap(AS_PROGRAM, &slotunbl_state::slotunbl_map); GFXDECODE(config, m_gfxdecode, m_palette, gfx_slotunbl); @@ -390,7 +390,7 @@ void slotunbl_state::slotunbl(machine_config &config) PALETTE(config, m_palette, FUNC(slotunbl_state::slotunbl_palette), 0x100); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } ROM_START(murogmbl) diff --git a/src/mame/misc/neomania.cpp b/src/mame/misc/neomania.cpp index e6acf712c71..8cfe2b85da8 100644 --- a/src/mame/misc/neomania.cpp +++ b/src/mame/misc/neomania.cpp @@ -74,7 +74,7 @@ void neomania_state::machine_reset() void neomania_state::neomania(machine_config &config) { // Basic machine hardware - PENTIUM3(config, m_maincpu, 600'000'000); // Exact hardware not specified + PENTIUM3(config, m_maincpu, XTAL::u(600'000'000)); // Exact hardware not specified m_maincpu->set_addrmap(AS_PROGRAM, &neomania_state::neomania_map); // Video hardware diff --git a/src/mame/misc/neoprint.cpp b/src/mame/misc/neoprint.cpp index 27eec4dd9c0..4d98474986d 100644 --- a/src/mame/misc/neoprint.cpp +++ b/src/mame/misc/neoprint.cpp @@ -512,12 +512,12 @@ void neoprint_state::machine_start() void neoprint_state::neoprint(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &neoprint_state::neoprint_map); m_maincpu->set_periodic_int(FUNC(neoprint_state::irq3_line_hold), attotime::from_hz(45)); /* camera / printer irq, unknown timing */ m_maincpu->set_vblank_int("screen", FUNC(neoprint_state::irq2_line_hold)); // lv1,2,3 valid? - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &neoprint_state::audio_map); m_audiocpu->set_addrmap(AS_IO, &neoprint_state::audio_io_map); @@ -556,12 +556,12 @@ MACHINE_RESET_MEMBER(neoprint_state,nprsp) void neoprint_state::nprsp(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &neoprint_state::nprsp_map); m_maincpu->set_periodic_int(FUNC(neoprint_state::irq3_line_hold), attotime::from_hz(45)); /* camera / printer irq, unknown timing */ m_maincpu->set_vblank_int("screen", FUNC(neoprint_state::irq2_line_hold)); // lv1,2,3 valid? - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &neoprint_state::audio_map); m_audiocpu->set_addrmap(AS_IO, &neoprint_state::audio_io_map); diff --git a/src/mame/misc/news.cpp b/src/mame/misc/news.cpp index f5d59990834..4b6bed640f6 100644 --- a/src/mame/misc/news.cpp +++ b/src/mame/misc/news.cpp @@ -238,7 +238,7 @@ void news_state::machine_reset() void news_state::news(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 8'000'000); // ? MHz + Z80(config, m_maincpu, XTAL::u(8'000'000)); // ? MHz m_maincpu->set_addrmap(AS_PROGRAM, &news_state::prg_map); m_maincpu->set_vblank_int("screen", FUNC(news_state::irq0_line_hold)); @@ -258,7 +258,7 @@ void news_state::news(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1'056'000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1'056'000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } diff --git a/src/mame/misc/nexus3d.cpp b/src/mame/misc/nexus3d.cpp index 0868d5eb465..326b8fe2c0e 100644 --- a/src/mame/misc/nexus3d.cpp +++ b/src/mame/misc/nexus3d.cpp @@ -314,7 +314,7 @@ WRITE_LINE_MEMBER(nexus3d_state::screen_vblank) void nexus3d_state::nexus3d(machine_config &config) { /* basic machine hardware */ - ARM920T(config, m_maincpu, 200000000); + ARM920T(config, m_maincpu, XTAL::u(200000000)); m_maincpu->set_addrmap(AS_PROGRAM, &nexus3d_state::nexus3d_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -325,7 +325,7 @@ void nexus3d_state::nexus3d(machine_config &config) PALETTE(config, "palette", palette_device::RGB_565); - SERFLASH(config, m_serflash, 0); + SERFLASH(config, m_serflash); } diff --git a/src/mame/misc/nibble.cpp b/src/mame/misc/nibble.cpp index 0680bb01500..2197e0819b1 100644 --- a/src/mame/misc/nibble.cpp +++ b/src/mame/misc/nibble.cpp @@ -350,11 +350,11 @@ void nibble_state::nibble(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_nibble); - ramdac_device &ramdac1(RAMDAC(config, "ramdac1", 0, "palette")); + ramdac_device &ramdac1(RAMDAC(config, "ramdac1", "palette")); ramdac1.set_addrmap(0, &nibble_state::ramdac1_map); ramdac1.set_color_base(0); - ramdac_device &ramdac2(RAMDAC(config, "ramdac2", 0, "palette")); + ramdac_device &ramdac2(RAMDAC(config, "ramdac2", "palette")); ramdac2.set_addrmap(0, &nibble_state::ramdac2_map); ramdac2.set_color_base(0x100); diff --git a/src/mame/misc/norautp.cpp b/src/mame/misc/norautp.cpp index 1f0d339fd9a..5db9dd0ef27 100644 --- a/src/mame/misc/norautp.cpp +++ b/src/mame/misc/norautp.cpp @@ -1323,19 +1323,19 @@ void norautp_state::noraut_base(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* doesn't work if placed at derivative drivers */ - I8255(config, m_ppi8255[0], 0); + I8255(config, m_ppi8255[0]); /* (60-63) Mode 0 - Port A set as input */ m_ppi8255[0]->in_pa_callback().set_ioport("DSW1"); m_ppi8255[0]->out_pb_callback().set(FUNC(norautp_state::mainlamps_w)); m_ppi8255[0]->out_pc_callback().set(FUNC(norautp_state::counterlamps_w)); - I8255(config, m_ppi8255[1], 0); + I8255(config, m_ppi8255[1]); /* (a0-a3) Mode 0 - Ports A & B set as input */ m_ppi8255[1]->in_pa_callback().set_ioport("IN0"); m_ppi8255[1]->in_pb_callback().set_ioport("IN1"); m_ppi8255[1]->out_pc_callback().set(FUNC(norautp_state::soundlamps_w)); - I8255(config, m_ppi8255[2], 0); + I8255(config, m_ppi8255[2]); /* (c0-c3) Group A Mode 2 (5-lines handshacked bidirectional port) Group B Mode 0, output; (see below for lines PC0-PC2) */ m_ppi8255[2]->in_pc_callback().set_ioport("IN2"); diff --git a/src/mame/misc/nsg6809.cpp b/src/mame/misc/nsg6809.cpp index 77dfe7166f1..637a4e67ed1 100644 --- a/src/mame/misc/nsg6809.cpp +++ b/src/mame/misc/nsg6809.cpp @@ -79,11 +79,11 @@ void nsg6809_state::pitchhit(machine_config &config) via6522_device &via(MOS6522(config, "via", XTAL(4'000'000) / 4)); via.irq_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); - mos6551_device &acia(MOS6551(config, "acia", 0)); + mos6551_device &acia(MOS6551(config, "acia")); acia.set_xtal(XTAL(1'843'200)); acia.irq_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); - WATCHDOG_TIMER(config, "deadman", 0); + WATCHDOG_TIMER(config, "deadman"); input_merger_device &merger(INPUT_MERGER_ANY_HIGH(config, "mainirq")); merger.output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); diff --git a/src/mame/misc/odyssey.cpp b/src/mame/misc/odyssey.cpp index 312bd67e69c..c0de88f531e 100644 --- a/src/mame/misc/odyssey.cpp +++ b/src/mame/misc/odyssey.cpp @@ -136,7 +136,7 @@ void odyssey_state::machine_reset() void odyssey_state::odyssey(machine_config &config) { /* basic machine hardware */ - PENTIUM(config, m_maincpu, 133000000); // a Celeron at 1.70 GHz on the MB I checked. + PENTIUM(config, m_maincpu, XTAL::u(133000000)); // a Celeron at 1.70 GHz on the MB I checked. m_maincpu->set_addrmap(AS_PROGRAM, &odyssey_state::odyssey_map); /* video hardware */ diff --git a/src/mame/misc/othello.cpp b/src/mame/misc/othello.cpp index 518190accb0..1f6607dd742 100644 --- a/src/mame/misc/othello.cpp +++ b/src/mame/misc/othello.cpp @@ -423,8 +423,8 @@ void othello_state::othello(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, m_ay[0], 2000000).add_route(ALL_OUTPUTS, "speaker", 0.25); - AY8910(config, m_ay[1], 2000000).add_route(ALL_OUTPUTS, "speaker", 0.25); + AY8910(config, m_ay[0], XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 0.25); + AY8910(config, m_ay[1], XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 0.25); DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/misc/pass.cpp b/src/mame/misc/pass.cpp index 0d55bf608fc..7d421ed751c 100644 --- a/src/mame/misc/pass.cpp +++ b/src/mame/misc/pass.cpp @@ -359,9 +359,9 @@ void pass_state::pass(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - YM2203(config, "ymsnd", 14'318'180 / 4).add_route(ALL_OUTPUTS, "mono", 0.60); + YM2203(config, "ymsnd", XTAL::u(14'318'180) / 4).add_route(ALL_OUTPUTS, "mono", 0.60); - OKIM6295(config, "oki", 792'000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(792'000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60); // clock frequency & pin 7 not verified } diff --git a/src/mame/misc/photon.cpp b/src/mame/misc/photon.cpp index dbb4eccfe11..0e21dcb1250 100644 --- a/src/mame/misc/photon.cpp +++ b/src/mame/misc/photon.cpp @@ -211,7 +211,7 @@ uint32_t photon_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap void photon_state::photon(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 1780000); + I8080(config, m_maincpu, XTAL::u(1780000)); m_maincpu->set_addrmap(AS_PROGRAM, &photon_state::pk8000_mem); m_maincpu->set_addrmap(AS_IO, &photon_state::pk8000_io); m_maincpu->set_vblank_int("screen", FUNC(photon_state::interrupt)); diff --git a/src/mame/misc/photon2.cpp b/src/mame/misc/photon2.cpp index 22124872757..1769f7fe004 100644 --- a/src/mame/misc/photon2.cpp +++ b/src/mame/misc/photon2.cpp @@ -362,13 +362,13 @@ void photon2_state::machine_start() void photon2_state::photon2(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3500000); /* 3.5 MHz */ + Z80(config, m_maincpu, XTAL::u(3500000)); /* 3.5 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &photon2_state::spectrum_mem); m_maincpu->set_addrmap(AS_IO, &photon2_state::spectrum_io); TIMER(config, "scantimer").configure_scanline(FUNC(photon2_state::spec_interrupt_hack), "screen", 0, 1); - I8255(config, m_ppi, 0); + I8255(config, m_ppi); m_ppi->in_pa_callback().set_ioport("JOY"); m_ppi->in_pc_callback().set_ioport("COIN"); m_ppi->out_pc_callback().set(FUNC(photon2_state::misc_w)); diff --git a/src/mame/misc/pkscram.cpp b/src/mame/misc/pkscram.cpp index 5da4aca8ec7..005c3094186 100644 --- a/src/mame/misc/pkscram.cpp +++ b/src/mame/misc/pkscram.cpp @@ -317,7 +317,7 @@ void pkscram_state::machine_reset() void pkscram_state::pkscramble(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pkscram_state::pkscramble_map); //m_maincpu->set_vblank_int("screen", FUNC(pkscram_state::irq1_line_hold)); /* only valid irq */ diff --git a/src/mame/misc/playcenter.cpp b/src/mame/misc/playcenter.cpp index 48796382572..7b4039b2503 100644 --- a/src/mame/misc/playcenter.cpp +++ b/src/mame/misc/playcenter.cpp @@ -64,7 +64,7 @@ INPUT_PORTS_END void playcenter_state::playcenter(machine_config &config) { - PENTIUM(config, m_maincpu, 166'000'000); // Actually an AMD K6, frequency unknown + PENTIUM(config, m_maincpu, XTAL::u(166'000'000)); // Actually an AMD K6, frequency unknown m_maincpu->set_addrmap(AS_PROGRAM, &playcenter_state::mem_map); m_maincpu->set_addrmap(AS_IO, &playcenter_state::io_map); } diff --git a/src/mame/misc/pntnpuzl.cpp b/src/mame/misc/pntnpuzl.cpp index 038e8b012f5..1a414a811df 100644 --- a/src/mame/misc/pntnpuzl.cpp +++ b/src/mame/misc/pntnpuzl.cpp @@ -383,7 +383,7 @@ void pntnpuzl_state::pntnpuzl(machine_config &config) screen.set_raw(XTAL(25'174'800),900,0,640,526,0,480); screen.set_screen_update("vga", FUNC(vga_device::screen_update)); - vga_device &vga(VGA(config, "vga", 0)); + vga_device &vga(VGA(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x100000); } diff --git a/src/mame/misc/poker72.cpp b/src/mame/misc/poker72.cpp index 6897d31494c..55810e79269 100644 --- a/src/mame/misc/poker72.cpp +++ b/src/mame/misc/poker72.cpp @@ -369,11 +369,11 @@ void poker72_state::machine_reset() void poker72_state::poker72(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 8000000); // ? MHz + Z80(config, m_maincpu, XTAL::u(8000000)); // ? MHz m_maincpu->set_addrmap(AS_PROGRAM, &poker72_state::prg_map); m_maincpu->set_vblank_int("screen", FUNC(poker72_state::irq0_line_hold)); - I80C51(config, "subcpu", 8000000); // actually 89C51, ? MHz + I80C51(config, "subcpu", XTAL::u(8000000)); // actually 89C51, ? MHz // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/misc/policetr.cpp b/src/mame/misc/policetr.cpp index 7de898f7279..9cafe3e3f09 100644 --- a/src/mame/misc/policetr.cpp +++ b/src/mame/misc/policetr.cpp @@ -100,7 +100,7 @@ PC5380-9651 5380-JY3306A 5380-N1045503A /* constants */ -#define MASTER_CLOCK 48000000 +#define MASTER_CLOCK XTAL::u(48000000) /************************************* @@ -454,7 +454,7 @@ void policetr_state::policetr(machine_config &config) PALETTE(config, m_palette).set_entries(256); - RAMDAC(config, m_ramdac, 0, m_palette); // BT481A Palette RAMDAC + RAMDAC(config, m_ramdac, m_palette); // BT481A Palette RAMDAC m_ramdac->set_addrmap(0, &policetr_state::ramdac_map); /* sound hardware */ diff --git a/src/mame/misc/proconn.cpp b/src/mame/misc/proconn.cpp index c8716f13d67..3b1d2dd4c40 100644 --- a/src/mame/misc/proconn.cpp +++ b/src/mame/misc/proconn.cpp @@ -266,14 +266,14 @@ void proconn_state::machine_reset() void proconn_state::proconn(machine_config &config) { - Z80(config, m_maincpu, 4000000); /* ?? Mhz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ?? Mhz */ m_maincpu->set_daisy_config(z80_daisy_chain); m_maincpu->set_addrmap(AS_PROGRAM, &proconn_state::proconn_map); m_maincpu->set_addrmap(AS_IO, &proconn_state::proconn_portmap); S16LF01(config, m_vfd); - Z80PIO(config, m_z80pio[0], 4000000); /* ?? Mhz */ + Z80PIO(config, m_z80pio[0], XTAL::u(4000000)); /* ?? Mhz */ m_z80pio[0]->out_int_callback().set(FUNC(proconn_state::pio_1_m_out_int_w)); m_z80pio[0]->in_pa_callback().set(FUNC(proconn_state::pio_1_m_in_pa_r)); m_z80pio[0]->out_pa_callback().set(FUNC(proconn_state::pio_1_m_out_pa_w)); @@ -282,7 +282,7 @@ void proconn_state::proconn(machine_config &config) m_z80pio[0]->out_pb_callback().set(FUNC(proconn_state::pio_1_m_out_pb_w)); m_z80pio[0]->out_brdy_callback().set(FUNC(proconn_state::pio_1_m_out_brdy_w)); - Z80PIO(config, m_z80pio[1], 4000000); /* ?? Mhz */ + Z80PIO(config, m_z80pio[1], XTAL::u(4000000)); /* ?? Mhz */ m_z80pio[1]->out_int_callback().set(FUNC(proconn_state::pio_2_m_out_int_w)); m_z80pio[1]->in_pa_callback().set(FUNC(proconn_state::pio_2_m_in_pa_r)); m_z80pio[1]->out_pa_callback().set(FUNC(proconn_state::pio_2_m_out_pa_w)); @@ -291,7 +291,7 @@ void proconn_state::proconn(machine_config &config) m_z80pio[1]->out_pb_callback().set(FUNC(proconn_state::pio_2_m_out_pb_w)); m_z80pio[1]->out_brdy_callback().set(FUNC(proconn_state::pio_2_m_out_brdy_w)); - Z80PIO(config, m_z80pio[2], 4000000); /* ?? Mhz */ + Z80PIO(config, m_z80pio[2], XTAL::u(4000000)); /* ?? Mhz */ m_z80pio[2]->out_int_callback().set(FUNC(proconn_state::pio_3_m_out_int_w)); m_z80pio[2]->in_pa_callback().set(FUNC(proconn_state::pio_3_m_in_pa_r)); m_z80pio[2]->out_pa_callback().set(FUNC(proconn_state::pio_3_m_out_pa_w)); @@ -300,7 +300,7 @@ void proconn_state::proconn(machine_config &config) m_z80pio[2]->out_pb_callback().set(FUNC(proconn_state::pio_3_m_out_pb_w)); m_z80pio[2]->out_brdy_callback().set(FUNC(proconn_state::pio_3_m_out_brdy_w)); - Z80PIO(config, m_z80pio[3], 4000000); /* ?? Mhz */ + Z80PIO(config, m_z80pio[3], XTAL::u(4000000)); /* ?? Mhz */ m_z80pio[3]->out_int_callback().set(FUNC(proconn_state::pio_4_m_out_int_w)); m_z80pio[3]->in_pa_callback().set(FUNC(proconn_state::pio_4_m_in_pa_r)); m_z80pio[3]->out_pa_callback().set(FUNC(proconn_state::pio_4_m_out_pa_w)); @@ -309,7 +309,7 @@ void proconn_state::proconn(machine_config &config) m_z80pio[3]->out_pb_callback().set(FUNC(proconn_state::pio_4_m_out_pb_w)); m_z80pio[3]->out_brdy_callback().set(FUNC(proconn_state::pio_4_m_out_brdy_w)); - Z80PIO(config, m_z80pio[4], 4000000); /* ?? Mhz */ + Z80PIO(config, m_z80pio[4], XTAL::u(4000000)); /* ?? Mhz */ m_z80pio[4]->out_int_callback().set(FUNC(proconn_state::pio_5_m_out_int_w)); m_z80pio[4]->in_pa_callback().set(FUNC(proconn_state::pio_5_m_in_pa_r)); m_z80pio[4]->out_pa_callback().set(FUNC(proconn_state::pio_5_m_out_pa_w)); @@ -318,10 +318,10 @@ void proconn_state::proconn(machine_config &config) m_z80pio[4]->out_pb_callback().set(FUNC(proconn_state::pio_5_m_out_pb_w)); m_z80pio[4]->out_brdy_callback().set(FUNC(proconn_state::pio_5_m_out_brdy_w)); - Z80CTC(config, m_z80ctc, 4000000); + Z80CTC(config, m_z80ctc, XTAL::u(4000000)); m_z80ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - Z80SIO(config, m_z80sio, 4000000); /* ?? Mhz */ + Z80SIO(config, m_z80sio, XTAL::u(4000000)); /* ?? Mhz */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -329,11 +329,11 @@ void proconn_state::proconn(machine_config &config) config.set_default_layout(layout_proconn); - AY8910(config, m_ay, 1000000); /* ?? Mhz */ // YM2149F on PC92? + AY8910(config, m_ay, XTAL::u(1000000)); /* ?? Mhz */ // YM2149F on PC92? m_ay->port_b_write_callback().set(FUNC(proconn_state::meter_w)); m_ay->add_route(ALL_OUTPUTS, "rspeaker", 0.33); - METERS(config, m_meters, 0); + METERS(config, m_meters); m_meters->set_number(8); } diff --git a/src/mame/misc/pse.cpp b/src/mame/misc/pse.cpp index c8d01c92a89..6a134e47d9f 100644 --- a/src/mame/misc/pse.cpp +++ b/src/mame/misc/pse.cpp @@ -32,7 +32,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -104,7 +104,7 @@ void pse_state::video_start() void pse_state::pse(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_pse); + NETLIST_CPU(config, m_maincpu).set_source(netlist_pse); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/misc/radikaldarts.cpp b/src/mame/misc/radikaldarts.cpp index 07bdf8a760d..186100c7814 100644 --- a/src/mame/misc/radikaldarts.cpp +++ b/src/mame/misc/radikaldarts.cpp @@ -71,7 +71,7 @@ void radikaldarts_state::machine_reset() void radikaldarts_state::radikaldarts(machine_config &config) { // Basic machine hardware - PENTIUM3(config, m_maincpu, 120000000); // Celeron SL6C8 1.2 GHz + PENTIUM3(config, m_maincpu, XTAL::u(120000000)); // Celeron SL6C8 1.2 GHz m_maincpu->set_addrmap(AS_PROGRAM, &radikaldarts_state::radikaldarts_map); // Video hardware diff --git a/src/mame/misc/rawthrillspc.cpp b/src/mame/misc/rawthrillspc.cpp index 136dc1dc781..49a082369a9 100644 --- a/src/mame/misc/rawthrillspc.cpp +++ b/src/mame/misc/rawthrillspc.cpp @@ -74,7 +74,7 @@ void rawthrillspc_state::machine_reset() void rawthrillspc_state::rawthrillspc(machine_config &config) { // Basic machine hardware - PENTIUM4(config, m_maincpu, 120000000); // Actually an Athlon 64 X2 + PENTIUM4(config, m_maincpu, XTAL::u(120000000)); // Actually an Athlon 64 X2 m_maincpu->set_addrmap(AS_PROGRAM, &rawthrillspc_state::rawthrillspc_map); // Video hardware diff --git a/src/mame/misc/rcorsair.cpp b/src/mame/misc/rcorsair.cpp index cff08bd03b0..9b9f13a6505 100644 --- a/src/mame/misc/rcorsair.cpp +++ b/src/mame/misc/rcorsair.cpp @@ -161,11 +161,11 @@ void rcorsair_state::rcorsair(machine_config &config) /* Main CPU is probably inside Custom Block with program code, unknown type */ - Z80(config, m_maincpu, 8000000); + Z80(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &rcorsair_state::rcorsair_main_map); //m_maincpu->set_vblank_int("screen", FUNC(rcorsair_state::irq0_line_hold)); - I8035(config, m_subcpu, 8000000); + I8035(config, m_subcpu, XTAL::u(8000000)); m_subcpu->set_addrmap(AS_PROGRAM, &rcorsair_state::rcorsair_sub_map); m_subcpu->set_addrmap(AS_IO, &rcorsair_state::rcorsair_sub_io_map); diff --git a/src/mame/misc/rfslots8085.cpp b/src/mame/misc/rfslots8085.cpp index ba971e9c5b1..9596ccac477 100644 --- a/src/mame/misc/rfslots8085.cpp +++ b/src/mame/misc/rfslots8085.cpp @@ -110,13 +110,13 @@ void rfslots8085_state::unkrfslt(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &rfslots8085_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &rfslots8085_state::sound_io_map); - I8155(config, "i8155", 0); + I8155(config, "i8155"); I8255(config, "i8255"); I8212(config, "i8212"); - I8279(config, "i8279", 0); + I8279(config, "i8279"); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/misc/rfslotspcpent.cpp b/src/mame/misc/rfslotspcpent.cpp index 1d7bf6445de..600932def55 100644 --- a/src/mame/misc/rfslotspcpent.cpp +++ b/src/mame/misc/rfslotspcpent.cpp @@ -229,7 +229,7 @@ void rfslotspcpent_state::machine_reset() void rfslotspcpent_state::rfslotspcpent(machine_config &config) { // Basic machine hardware - PENTIUM4(config, m_maincpu, 100000000); // Actually an Intel Celeron 575 1M cache, 2,00 GHz + PENTIUM4(config, m_maincpu, XTAL::u(100000000)); // Actually an Intel Celeron 575 1M cache, 2,00 GHz m_maincpu->set_addrmap(AS_PROGRAM, &rfslotspcpent_state::rfslotspcpent_map); // Video hardware diff --git a/src/mame/misc/roul.cpp b/src/mame/misc/roul.cpp index 6685e731076..a9dfe6d41b3 100644 --- a/src/mame/misc/roul.cpp +++ b/src/mame/misc/roul.cpp @@ -314,11 +314,11 @@ INPUT_PORTS_END void roul_state::roul(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &roul_state::roul_map); m_maincpu->set_addrmap(AS_IO, &roul_state::roul_cpu_io_map); - Z80(config, m_soundcpu, 4000000); + Z80(config, m_soundcpu, XTAL::u(4000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &roul_state::sound_map); m_soundcpu->set_addrmap(AS_IO, &roul_state::sound_cpu_io_map); @@ -340,7 +340,7 @@ void roul_state::roul(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "aysnd", 1000000).add_route(ALL_OUTPUTS, "mono", 1.0); + AY8910(config, "aysnd", XTAL::u(1000000)).add_route(ALL_OUTPUTS, "mono", 1.0); } ROM_START(roul) diff --git a/src/mame/misc/sanremmg.cpp b/src/mame/misc/sanremmg.cpp index 68278f6de4c..7e179b0dac3 100644 --- a/src/mame/misc/sanremmg.cpp +++ b/src/mame/misc/sanremmg.cpp @@ -83,7 +83,7 @@ INPUT_PORTS_END void sanremmg_state::sanremmg(machine_config &config) { /* basic machine hardware */ - ARM7(config, m_maincpu, 50000000); // wrong, this is an M30624FG (M16C/62A family) with 256K internal ROM, no CPU core available + ARM7(config, m_maincpu, XTAL::u(50000000)); // wrong, this is an M30624FG (M16C/62A family) with 256K internal ROM, no CPU core available m_maincpu->set_addrmap(AS_PROGRAM, &sanremmg_state::sanremmg_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/misc/savquest.cpp b/src/mame/misc/savquest.cpp index 322db20263d..b39c6167b43 100644 --- a/src/mame/misc/savquest.cpp +++ b/src/mame/misc/savquest.cpp @@ -844,7 +844,7 @@ void savquest_isa16_cards(device_slot_interface &device) void savquest_state::savquest(machine_config &config) { - PENTIUM2(config, m_maincpu, 450000000); // actually Pentium II 450 + PENTIUM2(config, m_maincpu, XTAL::u(450000000)); // actually Pentium II 450 m_maincpu->set_addrmap(AS_PROGRAM, &savquest_state::savquest_map); m_maincpu->set_addrmap(AS_IO, &savquest_state::savquest_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -852,7 +852,7 @@ void savquest_state::savquest(machine_config &config) pcat_common(config); DS12885(config.replace(), "rtc"); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device( 0, FUNC(savquest_state::intel82439tx_pci_r), FUNC(savquest_state::intel82439tx_pci_w)); pcibus.set_device( 7, FUNC(savquest_state::intel82371ab_pci_r), FUNC(savquest_state::intel82371ab_pci_w)); pcibus.set_device(13, FUNC(savquest_state::pci_3dfx_r), FUNC(savquest_state::pci_3dfx_w)); @@ -865,10 +865,10 @@ void savquest_state::savquest(machine_config &config) /* sound hardware */ - isa16_device &isa(ISA16(config, "isa", 0)); // FIXME: determine ISA bus clock + isa16_device &isa(ISA16(config, "isa")); // FIXME: determine ISA bus clock isa.set_memspace("maincpu", AS_PROGRAM); isa.set_iospace("maincpu", AS_IO); - ISA16_SLOT(config, "isa1", 0, "isa", savquest_isa16_cards, "sb16", false); + ISA16_SLOT(config, "isa1", "isa", savquest_isa16_cards, "sb16", false); /* video hardware */ pcvideo_s3_vga(config); diff --git a/src/mame/misc/scm_500.cpp b/src/mame/misc/scm_500.cpp index 535644f35b0..43c4e47888b 100644 --- a/src/mame/misc/scm_500.cpp +++ b/src/mame/misc/scm_500.cpp @@ -52,7 +52,7 @@ void scm_500_state::machine_reset() void scm_500_state::scm_500(machine_config &config) { - I80C51GB(config, m_maincpu, 12'000'000); // unknown clock + I80C51GB(config, m_maincpu, XTAL::u(12'000'000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &scm_500_state::prog_map); } diff --git a/src/mame/misc/sfbonus.cpp b/src/mame/misc/sfbonus.cpp index eecf2bb6550..ca036574d6c 100644 --- a/src/mame/misc/sfbonus.cpp +++ b/src/mame/misc/sfbonus.cpp @@ -1286,7 +1286,7 @@ void sfbonus_state::ramdac_map(address_map &map) void sfbonus_state::sfbonus(machine_config &config) { - Z80(config, m_maincpu, 6000000); // custom packaged z80 CPU ?? Mhz + Z80(config, m_maincpu, XTAL::u(6000000)); // custom packaged z80 CPU ?? Mhz m_maincpu->set_addrmap(AS_PROGRAM, &sfbonus_state::sfbonus_map); m_maincpu->set_addrmap(AS_IO, &sfbonus_state::sfbonus_io); m_maincpu->set_vblank_int("screen", FUNC(sfbonus_state::irq0_line_hold)); @@ -1307,13 +1307,13 @@ void sfbonus_state::sfbonus(machine_config &config) PALETTE(config, m_palette).set_entries(0x100*2); // *2 for priority workaround / custom drawing - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &sfbonus_state::ramdac_map); /* Parrot 3 seems fine at 1 Mhz, but Double Challenge isn't? */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); // clock frequency & pin 7 not verified } /* Super Ball */ diff --git a/src/mame/misc/shangkid.cpp b/src/mame/misc/shangkid.cpp index b22c9736696..607e5f444dd 100644 --- a/src/mame/misc/shangkid.cpp +++ b/src/mame/misc/shangkid.cpp @@ -407,7 +407,7 @@ void chinhero_state::chinhero(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC AY8910(config, m_aysnd, XTAL(18'432'000) / 12); // verified on pcb m_aysnd->port_a_write_callback().set(FUNC(chinhero_state::ay8910_porta_w)); @@ -464,7 +464,7 @@ void dynamski_state::portmap(address_map &map) void dynamski_state::dynamski(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 3000000); // ? + Z80(config, m_maincpu, XTAL::u(3000000)); // ? m_maincpu->set_addrmap(AS_PROGRAM, &dynamski_state::prgmap); m_maincpu->set_addrmap(AS_IO, &dynamski_state::portmap); @@ -489,7 +489,7 @@ void dynamski_state::dynamski(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - AY8910(config, "aysnd", 2000000).add_route(ALL_OUTPUTS, "speaker", 0.1); + AY8910(config, "aysnd", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 0.1); } /***************************************************************************************/ diff --git a/src/mame/misc/silverball.cpp b/src/mame/misc/silverball.cpp index 5cf87bcd029..4eb685a56a5 100644 --- a/src/mame/misc/silverball.cpp +++ b/src/mame/misc/silverball.cpp @@ -61,7 +61,7 @@ INPUT_PORTS_END void silverball_state::silverball(machine_config &config) { - PENTIUM(config, m_maincpu, 133'000'000); + PENTIUM(config, m_maincpu, XTAL::u(133'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &silverball_state::mem_map); m_maincpu->set_addrmap(AS_IO, &silverball_state::io_map); } diff --git a/src/mame/misc/skeetsht.cpp b/src/mame/misc/skeetsht.cpp index 25da1912e19..431c7ec2a43 100644 --- a/src/mame/misc/skeetsht.cpp +++ b/src/mame/misc/skeetsht.cpp @@ -223,11 +223,11 @@ INPUT_PORTS_END void skeetsht_state::skeetsht(machine_config &config) { - MC68HC11A1(config, m_68hc11, 8000000); // ? + MC68HC11A1(config, m_68hc11, XTAL::u(8000000)); // ? m_68hc11->set_addrmap(AS_PROGRAM, &skeetsht_state::hc11_pgm_map); m_68hc11->out_pa_callback().set(FUNC(skeetsht_state::hc11_porta_w)); - TMS34010(config, m_tms, 48000000); + TMS34010(config, m_tms, XTAL::u(48000000)); m_tms->set_addrmap(AS_PROGRAM, &skeetsht_state::tms_program_map); m_tms->set_halt_on_reset(true); m_tms->set_pixel_clock(48000000 / 8); @@ -235,7 +235,7 @@ void skeetsht_state::skeetsht(machine_config &config) m_tms->set_scanline_rgb32_callback(FUNC(skeetsht_state::scanline_update)); m_tms->output_int().set(FUNC(skeetsht_state::tms_irq)); - TLC34076(config, m_tlc34076, 0); + TLC34076(config, m_tlc34076); m_tlc34076->set_bits(tlc34076_device::TLC34076_6_BIT); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -244,7 +244,7 @@ void skeetsht_state::skeetsht(machine_config &config) SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay, 2000000).add_route(ALL_OUTPUTS, "mono", 0.50); // ? + AY8910(config, m_ay, XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.50); // ? } diff --git a/src/mame/misc/skopro.cpp b/src/mame/misc/skopro.cpp index e7f883296d6..4459f3a594f 100644 --- a/src/mame/misc/skopro.cpp +++ b/src/mame/misc/skopro.cpp @@ -75,7 +75,7 @@ void skopro_state::machine_reset() void skopro_state::skopro(machine_config &config) { /* basic machine hardware */ - PENTIUM4(config, m_maincpu, 100000000); // actually a Pentium E2160 at 1.80 GHz + PENTIUM4(config, m_maincpu, XTAL::u(100000000)); // actually a Pentium E2160 at 1.80 GHz m_maincpu->set_addrmap(AS_PROGRAM, &skopro_state::skopro_map); /* video hardware */ diff --git a/src/mame/misc/skyarmy.cpp b/src/mame/misc/skyarmy.cpp index 12b810b78b8..71fde23e8a3 100644 --- a/src/mame/misc/skyarmy.cpp +++ b/src/mame/misc/skyarmy.cpp @@ -323,7 +323,7 @@ GFXDECODE_END void skyarmy_state::skyarmy(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &skyarmy_state::skyarmy_map); m_maincpu->set_addrmap(AS_IO, &skyarmy_state::skyarmy_io_map); m_maincpu->set_vblank_int("screen", FUNC(skyarmy_state::irq0_line_hold)); @@ -350,8 +350,8 @@ void skyarmy_state::skyarmy(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, "ay0", 2500000).add_route(ALL_OUTPUTS, "mono", 0.15); - AY8910(config, "ay1", 2500000).add_route(ALL_OUTPUTS, "mono", 0.15); + AY8910(config, "ay0", XTAL::u(2500000)).add_route(ALL_OUTPUTS, "mono", 0.15); + AY8910(config, "ay1", XTAL::u(2500000)).add_route(ALL_OUTPUTS, "mono", 0.15); } diff --git a/src/mame/misc/skylncr.cpp b/src/mame/misc/skylncr.cpp index 39bf6c1ba75..361eada5ebe 100644 --- a/src/mame/misc/skylncr.cpp +++ b/src/mame/misc/skylncr.cpp @@ -1701,11 +1701,11 @@ void skylncr_state::skylncr(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_skylncr); PALETTE(config, m_palette).set_entries(0x200); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &skylncr_state::ramdac_map); ramdac.set_color_base(0); - ramdac_device &ramdac2(RAMDAC(config, "ramdac2", 0, m_palette)); + ramdac_device &ramdac2(RAMDAC(config, "ramdac2", m_palette)); ramdac2.set_addrmap(0, &skylncr_state::ramdac2_map); ramdac2.set_color_base(0x100); diff --git a/src/mame/misc/sliver.cpp b/src/mame/misc/sliver.cpp index e3b1b2afab2..f5fdb75295e 100644 --- a/src/mame/misc/sliver.cpp +++ b/src/mame/misc/sliver.cpp @@ -520,14 +520,14 @@ TIMER_DEVICE_CALLBACK_MEMBER ( sliver_state::obj_irq_cb ) void sliver_state::sliver(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sliver_state::sliver_map); m_maincpu->set_vblank_int("screen", FUNC(sliver_state::irq4_line_hold)); TIMER(config, "obj_actel").configure_periodic(FUNC(sliver_state::obj_irq_cb), attotime::from_hz(60)); /* unknown clock, causes "obj actel ready error" without this */ // irq 2 valid but not used? - I8051(config, m_audiocpu, 8000000); + I8051(config, m_audiocpu, XTAL::u(8000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &sliver_state::soundmem_prg); m_audiocpu->set_addrmap(AS_IO, &sliver_state::soundmem_io); m_audiocpu->port_out_cb<1>().set(FUNC(sliver_state::oki_setbank)); @@ -540,7 +540,7 @@ void sliver_state::sliver(machine_config &config) m_screen->set_screen_update(FUNC(sliver_state::screen_update)); PALETTE(config, "palette").set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); + ramdac_device &ramdac(RAMDAC(config, "ramdac", "palette")); ramdac.set_addrmap(0, &sliver_state::ramdac_map); SPEAKER(config, "lspeaker").front_left(); @@ -548,7 +548,7 @@ void sliver_state::sliver(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH)); oki.set_addrmap(0, &sliver_state::oki_map); oki.add_route(ALL_OUTPUTS, "lspeaker", 0.6); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.6); diff --git a/src/mame/misc/spool99.cpp b/src/mame/misc/spool99.cpp index 0f2f62540e1..3f42d4e80b2 100644 --- a/src/mame/misc/spool99.cpp +++ b/src/mame/misc/spool99.cpp @@ -392,7 +392,7 @@ void spool99_state::spool99(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.47); m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.47); } diff --git a/src/mame/misc/ssingles.cpp b/src/mame/misc/ssingles.cpp index 298bd908811..9dc146de971 100644 --- a/src/mame/misc/ssingles.cpp +++ b/src/mame/misc/ssingles.cpp @@ -551,12 +551,12 @@ GFXDECODE_END void ssingles_state::ssingles(machine_config &config) { - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &ssingles_state::ssingles_map); m_maincpu->set_addrmap(AS_IO, &ssingles_state::ssingles_io_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(4000000, 256, 0, 256, 256, 0, 256); /* temporary, CRTC will configure screen */ + screen.set_raw(XTAL::u(4000000), 256, 0, 256, 256, 0, 256); /* temporary, CRTC will configure screen */ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); PALETTE(config, "palette").set_entries(4); //guess @@ -573,9 +573,9 @@ void ssingles_state::ssingles(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.5); /* ? MHz */ + AY8910(config, "ay1", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.5); /* ? MHz */ - AY8910(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.5); /* ? MHz */ + AY8910(config, "ay2", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.5); /* ? MHz */ } WRITE_LINE_MEMBER(ssingles_state::atamanot_irq) diff --git a/src/mame/misc/startouch.cpp b/src/mame/misc/startouch.cpp index f03d5391795..bba81854ef1 100644 --- a/src/mame/misc/startouch.cpp +++ b/src/mame/misc/startouch.cpp @@ -63,7 +63,7 @@ INPUT_PORTS_END void startouch_state::europl01(machine_config &config) { - PENTIUM_MMX(config, m_maincpu, 233'000'000); + PENTIUM_MMX(config, m_maincpu, XTAL::u(233'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &startouch_state::mem_map); m_maincpu->set_addrmap(AS_IO, &startouch_state::io_map); } diff --git a/src/mame/misc/statriv2.cpp b/src/mame/misc/statriv2.cpp index fa81b8e14a0..276d86ab6b2 100644 --- a/src/mame/misc/statriv2.cpp +++ b/src/mame/misc/statriv2.cpp @@ -143,7 +143,7 @@ private: }; -#define MASTER_CLOCK 12440000 +#define MASTER_CLOCK XTAL::u(12440000) /************************************* diff --git a/src/mame/misc/strkzn.cpp b/src/mame/misc/strkzn.cpp index c8cc13becbe..aaafa52917d 100644 --- a/src/mame/misc/strkzn.cpp +++ b/src/mame/misc/strkzn.cpp @@ -58,11 +58,11 @@ void strkzn_state::light_io(address_map &map) void strkzn_state::strkzn(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &strkzn_state::main_mem); m_maincpu->set_addrmap(AS_IO, &strkzn_state::main_io); - I80188(config, m_lightcpu, 10000000); + I80188(config, m_lightcpu, XTAL::u(10000000)); m_lightcpu->set_addrmap(AS_PROGRAM, &strkzn_state::light_mem); m_lightcpu->set_addrmap(AS_IO, &strkzn_state::light_io); } diff --git a/src/mame/misc/summit.cpp b/src/mame/misc/summit.cpp index 9d7d50f208a..fa911b1dfb1 100644 --- a/src/mame/misc/summit.cpp +++ b/src/mame/misc/summit.cpp @@ -390,7 +390,7 @@ void summit_state::machine_start() void summit_state::summit(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &summit_state::mainmap); m_maincpu->set_vblank_int("screen", FUNC(summit_state::irq0_line_hold)); diff --git a/src/mame/misc/sumt8035.cpp b/src/mame/misc/sumt8035.cpp index d1e67fd4e00..45be947d099 100644 --- a/src/mame/misc/sumt8035.cpp +++ b/src/mame/misc/sumt8035.cpp @@ -242,7 +242,7 @@ INPUT_PORTS_END void sumt8035_state::summit(machine_config &config) { /* basic machine hardware */ - I8035(config, m_maincpu, 5000000); + I8035(config, m_maincpu, XTAL::u(5000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sumt8035_state::sumt_map); m_maincpu->set_addrmap(AS_IO, &sumt8035_state::sumt_portmap); } diff --git a/src/mame/misc/supertnk.cpp b/src/mame/misc/supertnk.cpp index 164feaf2988..1769665a67b 100644 --- a/src/mame/misc/supertnk.cpp +++ b/src/mame/misc/supertnk.cpp @@ -454,7 +454,7 @@ void supertnk_state::supertnk(machine_config &config) // audio hardware SPEAKER(config, "mono").front_center(); - AY8910(config, "aysnd", 2000000).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8910(config, "aysnd", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/misc/taxidriv.cpp b/src/mame/misc/taxidriv.cpp index bb5297f847a..1af4ab35780 100644 --- a/src/mame/misc/taxidriv.cpp +++ b/src/mame/misc/taxidriv.cpp @@ -508,15 +508,15 @@ void taxidriv_state::taxidriv_palette(palette_device &palette) const void taxidriv_state::taxidriv(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* 4 MHz ??? */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &taxidriv_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(taxidriv_state::irq0_line_hold)); - z80_device &subcpu(Z80(config, "sub", 4000000)); /* 4 MHz ??? */ + z80_device &subcpu(Z80(config, "sub", XTAL::u(4000000))); /* 4 MHz ??? */ subcpu.set_addrmap(AS_PROGRAM, &taxidriv_state::cpu2_map); subcpu.set_vblank_int("screen", FUNC(taxidriv_state::irq0_line_hold)); /* ??? */ - z80_device &audiocpu(Z80(config, "audiocpu", 4000000)); /* 4 MHz ??? */ + z80_device &audiocpu(Z80(config, "audiocpu", XTAL::u(4000000))); /* 4 MHz ??? */ audiocpu.set_addrmap(AS_PROGRAM, &taxidriv_state::cpu3_map); audiocpu.set_addrmap(AS_IO, &taxidriv_state::cpu3_port_map); audiocpu.set_vblank_int("screen", FUNC(taxidriv_state::irq0_line_hold)); /* ??? */ @@ -566,12 +566,12 @@ void taxidriv_state::taxidriv(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &ay1(AY8910(config, "ay1", 1250000)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(1250000))); ay1.port_a_read_callback().set(FUNC(taxidriv_state::p8910_0a_r)); ay1.port_b_write_callback().set(FUNC(taxidriv_state::p8910_0b_w)); ay1.add_route(ALL_OUTPUTS, "mono", 0.25); - ay8910_device &ay2(AY8910(config, "ay2", 1250000)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(1250000))); ay2.port_a_read_callback().set(FUNC(taxidriv_state::p8910_1a_r)); ay2.add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/misc/thayers.cpp b/src/mame/misc/thayers.cpp index 5b5ce89b9cf..9da48db6ec2 100644 --- a/src/mame/misc/thayers.cpp +++ b/src/mame/misc/thayers.cpp @@ -817,7 +817,7 @@ void thayers_state::thayers(machine_config &config) mcu.write_so().set(FUNC(thayers_state::kbclk_w)); /* video hardware */ - PIONEER_PR7820(config, m_pr7820, 0); + PIONEER_PR7820(config, m_pr7820); m_pr7820->set_screen("screen"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/misc/triviaquiz.cpp b/src/mame/misc/triviaquiz.cpp index a19b0eb88a4..d5cb006df6e 100644 --- a/src/mame/misc/triviaquiz.cpp +++ b/src/mame/misc/triviaquiz.cpp @@ -150,7 +150,7 @@ void triviaquiz_state::triviaquiz(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &triviaquiz_state::prg_map); m_maincpu->set_addrmap(AS_IO, &triviaquiz_state::io_map); - ADDRESS_MAP_BANK(config, m_bankdev, 0); + ADDRESS_MAP_BANK(config, m_bankdev); m_bankdev->set_addrmap(AS_PROGRAM, &triviaquiz_state::romboard_map); m_bankdev->set_data_width(8); m_bankdev->set_addr_width(20); diff --git a/src/mame/misc/trivrus.cpp b/src/mame/misc/trivrus.cpp index e41a8d92948..4c64cfdc870 100644 --- a/src/mame/misc/trivrus.cpp +++ b/src/mame/misc/trivrus.cpp @@ -306,7 +306,7 @@ void trivrus_state::trivrus(machine_config &config) m_vr0soc->tx_callback<0>().set(m_microtouch, FUNC(microtouch_device::rx)); // TODO: 3M from service mode, most likely wrong? - MICROTOUCH(config, m_microtouch, 9600).stx().set(m_vr0soc, FUNC(vrender0soc_device::rx_w<0>)); + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(m_vr0soc, FUNC(vrender0soc_device::rx_w<0>)); } ROM_START( trivrus ) diff --git a/src/mame/misc/truco.cpp b/src/mame/misc/truco.cpp index 9d47320cec8..49b7b4d8fe9 100644 --- a/src/mame/misc/truco.cpp +++ b/src/mame/misc/truco.cpp @@ -398,7 +398,7 @@ void truco_state::truco(machine_config &config) WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(1600)); // 1.6 seconds - pia6821_device &pia(PIA6821(config, "pia0", 0)); + pia6821_device &pia(PIA6821(config, "pia0")); pia.readpa_handler().set_ioport("P1"); pia.readpb_handler().set_ioport("JMPRS"); pia.writepa_handler().set(FUNC(truco_state::porta_w)); @@ -424,7 +424,7 @@ void truco_state::truco(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.4); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.4); } diff --git a/src/mame/misc/trucocl.cpp b/src/mame/misc/trucocl.cpp index cef9666705d..dc99bca7869 100644 --- a/src/mame/misc/trucocl.cpp +++ b/src/mame/misc/trucocl.cpp @@ -204,7 +204,7 @@ void trucocl_state::trucocl(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } /*************************************************************************** diff --git a/src/mame/misc/trvmadns.cpp b/src/mame/misc/trvmadns.cpp index 831e139e962..d15307270f2 100644 --- a/src/mame/misc/trvmadns.cpp +++ b/src/mame/misc/trvmadns.cpp @@ -317,7 +317,7 @@ void trvmadns_state::trvmadns(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &trvmadns_state::cpu_map); m_maincpu->set_addrmap(AS_IO, &trvmadns_state::io_map); - ADDRESS_MAP_BANK(config, m_bankdev, 0); + ADDRESS_MAP_BANK(config, m_bankdev); m_bankdev->set_addrmap(AS_PROGRAM, &trvmadns_state::romboard_map); m_bankdev->set_data_width(8); m_bankdev->set_addr_width(21); diff --git a/src/mame/misc/ttchamp.cpp b/src/mame/misc/ttchamp.cpp index db8268c0b13..39556eabda8 100644 --- a/src/mame/misc/ttchamp.cpp +++ b/src/mame/misc/ttchamp.cpp @@ -646,7 +646,7 @@ INTERRUPT_GEN_MEMBER(ttchamp_state::irq)/* right? */ void ttchamp_state::ttchamp(machine_config &config) { /* basic machine hardware */ - V30(config, m_maincpu, 8000000); + V30(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ttchamp_state::ttchamp_map); m_maincpu->set_addrmap(AS_IO, &ttchamp_state::ttchamp_io); m_maincpu->set_vblank_int("screen", FUNC(ttchamp_state::irq)); diff --git a/src/mame/misc/tugboat.cpp b/src/mame/misc/tugboat.cpp index 516ad959c4c..ecc36911cb0 100644 --- a/src/mame/misc/tugboat.cpp +++ b/src/mame/misc/tugboat.cpp @@ -327,13 +327,13 @@ GFXDECODE_END void tugboat_state::tugboat(machine_config &config) { - M6502(config, m_maincpu, 2000000); /* 2 MHz ???? */ + M6502(config, m_maincpu, XTAL::u(2000000)); /* 2 MHz ???? */ m_maincpu->set_addrmap(AS_PROGRAM, &tugboat_state::main_map); - pia6821_device &pia0(PIA6821(config, "pia0", 0)); + pia6821_device &pia0(PIA6821(config, "pia0")); pia0.readpa_handler().set(FUNC(tugboat_state::input_r)); - pia6821_device &pia1(PIA6821(config, "pia1", 0)); + pia6821_device &pia1(PIA6821(config, "pia1")); pia1.readpa_handler().set_ioport("DSW"); pia1.writepb_handler().set(FUNC(tugboat_state::ctrl_w)); diff --git a/src/mame/misc/unkpoker.cpp b/src/mame/misc/unkpoker.cpp index 0d248b3c1ee..0b302f7cf15 100644 --- a/src/mame/misc/unkpoker.cpp +++ b/src/mame/misc/unkpoker.cpp @@ -146,7 +146,7 @@ GFXDECODE_END void unkpoker_state::unkpoker(machine_config &config) { /* basic machine hardware */ - I8080A(config, m_maincpu, 2000000); // guessed + I8080A(config, m_maincpu, XTAL::u(2000000)); // guessed m_maincpu->set_addrmap(AS_PROGRAM, &unkpoker_state::mem_map); m_maincpu->set_addrmap(AS_IO, &unkpoker_state::io_map); diff --git a/src/mame/misc/usbilliards.cpp b/src/mame/misc/usbilliards.cpp index 23d1aa3aad7..d56c29465a1 100644 --- a/src/mame/misc/usbilliards.cpp +++ b/src/mame/misc/usbilliards.cpp @@ -24,7 +24,7 @@ // copied from Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -93,7 +93,7 @@ void usbilliards_state::video_start() void usbilliards_state::usbilliards(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_usbilliards); + NETLIST_CPU(config, m_maincpu).set_source(netlist_usbilliards); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/misc/usgames.cpp b/src/mame/misc/usgames.cpp index aaeed59413b..6896415eb5b 100644 --- a/src/mame/misc/usgames.cpp +++ b/src/mame/misc/usgames.cpp @@ -334,7 +334,7 @@ void usgames_state::usg32(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - AY8912(config, "aysnd", 2000000).add_route(ALL_OUTPUTS, "mono", 0.30); + AY8912(config, "aysnd", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.30); } void usgames_state::usg185(machine_config &config) diff --git a/src/mame/misc/vamphalf.cpp b/src/mame/misc/vamphalf.cpp index 0f492353561..b0e4a147cc4 100644 --- a/src/mame/misc/vamphalf.cpp +++ b/src/mame/misc/vamphalf.cpp @@ -1141,7 +1141,7 @@ GFXDECODE_END void vamphalf_state::common(machine_config &config) { - E116T(config, m_maincpu, 50000000); /* 50 MHz */ + E116T(config, m_maincpu, XTAL::u(50000000)); /* 50 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &vamphalf_state::common_map); m_maincpu->set_vblank_int("screen", FUNC(vamphalf_state::irq1_line_hold)); diff --git a/src/mame/misc/vcombat.cpp b/src/mame/misc/vcombat.cpp index ddb2e29853c..f698e1316b7 100644 --- a/src/mame/misc/vcombat.cpp +++ b/src/mame/misc/vcombat.cpp @@ -727,7 +727,7 @@ void vcombat_state::vcombat(machine_config &config) aux.set_screen_update(FUNC(vcombat_state::screen_update_vcombat_aux)); SPEAKER(config, "speaker").front_center(); - DAC_10BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_10BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC } @@ -760,7 +760,7 @@ void vcombat_state::shadfgtr(machine_config &config) screen.set_screen_update(FUNC(vcombat_state::screen_update_vcombat_main)); SPEAKER(config, "speaker").front_center(); - DAC_10BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_10BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC } diff --git a/src/mame/misc/video21.cpp b/src/mame/misc/video21.cpp index f9d1cf15def..0f4bd61ab53 100644 --- a/src/mame/misc/video21.cpp +++ b/src/mame/misc/video21.cpp @@ -277,7 +277,7 @@ void video21_state::video21(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + BEEP(config, m_beeper).add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/misc/vlc.cpp b/src/mame/misc/vlc.cpp index 7a8dd6abdd1..1e8289f6ca1 100644 --- a/src/mame/misc/vlc.cpp +++ b/src/mame/misc/vlc.cpp @@ -616,7 +616,7 @@ void nevada_state::nevada(machine_config &config) m_duart[2]->a_tx_cb().set(m_microtouch, FUNC(microtouch_device::rx)); m_duart[2]->inport_cb().set_ioport("DSW3"); - MICROTOUCH(config, m_microtouch, 9600).stx().set(m_duart[1], FUNC(mc68681_device::rx_a_w)); + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(m_duart[1], FUNC(mc68681_device::rx_a_w)); /* devices */ MSM6242(config, m_rtc, XTAL(32'768)); diff --git a/src/mame/misc/vlc34010.cpp b/src/mame/misc/vlc34010.cpp index 037c98b00dd..2a7c5682258 100644 --- a/src/mame/misc/vlc34010.cpp +++ b/src/mame/misc/vlc34010.cpp @@ -174,7 +174,7 @@ void vlc34010_state::base(machine_config &config) screen.set_visarea(0*8, 31*8-1, 0*8, 31*8-1); screen.set_screen_update(m_tms, FUNC(tms34010_device::tms340x0_rgb32)); - BT471(config, "ramdac", 0); // type not correct + BT471(config, "ramdac"); // type not correct MC68681(config, "duart0", 3.6864_MHz_XTAL); diff --git a/src/mame/misc/voyager.cpp b/src/mame/misc/voyager.cpp index 7bf5b880d51..a375815e14d 100644 --- a/src/mame/misc/voyager.cpp +++ b/src/mame/misc/voyager.cpp @@ -483,7 +483,7 @@ void voyager_state::machine_reset() void voyager_state::voyager(machine_config &config) { - PENTIUM3(config, m_maincpu, 133000000); // actually AMD Duron CPU of unknown clock + PENTIUM3(config, m_maincpu, XTAL::u(133000000)); // actually AMD Duron CPU of unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &voyager_state::voyager_map); m_maincpu->set_addrmap(AS_IO, &voyager_state::voyager_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -493,7 +493,7 @@ void voyager_state::voyager(machine_config &config) ide_controller_device &ide(IDE_CONTROLLER(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(0, FUNC(voyager_state::intel82439tx_pci_r), FUNC(voyager_state::intel82439tx_pci_w)); pcibus.set_device(7, FUNC(voyager_state::intel82371ab_pci_r), FUNC(voyager_state::intel82371ab_pci_w)); diff --git a/src/mame/misc/vpoker.cpp b/src/mame/misc/vpoker.cpp index 1a1adfd8c61..d9db407c306 100644 --- a/src/mame/misc/vpoker.cpp +++ b/src/mame/misc/vpoker.cpp @@ -662,7 +662,7 @@ void vpoker_state::vpoker(machine_config &config) /* 6840 PTM */ ptm6840_device &ptm(PTM6840(config, "6840ptm", XTAL(4'000'000) / 4)); - ptm.set_external_clocks(0, 0, 0); + ptm.set_external_clocks(XTAL(), XTAL(), XTAL()); ptm.irq_callback().set(FUNC(vpoker_state::ptm_irq)); /* sound hardware */ diff --git a/src/mame/misc/vroulet.cpp b/src/mame/misc/vroulet.cpp index 1ca848fce68..b00feadde0a 100644 --- a/src/mame/misc/vroulet.cpp +++ b/src/mame/misc/vroulet.cpp @@ -283,7 +283,7 @@ void vroulet_state::ppi8255_c_w(uint8_t data) {} void vroulet_state::vroulet(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 4000000); //??? + Z80(config, m_maincpu, XTAL::u(4000000)); //??? m_maincpu->set_addrmap(AS_PROGRAM, &vroulet_state::vroulet_map); m_maincpu->set_addrmap(AS_IO, &vroulet_state::vroulet_io_map); m_maincpu->set_vblank_int("screen", FUNC(vroulet_state::irq0_line_hold)); @@ -315,7 +315,7 @@ void vroulet_state::vroulet(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", 2000000)); + ym2149_device &aysnd(YM2149(config, "aysnd", XTAL::u(2000000))); aysnd.port_a_read_callback().set_ioport("DSWA"); aysnd.port_b_read_callback().set_ioport("DSWB"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.25); diff --git a/src/mame/misc/wildpkr.cpp b/src/mame/misc/wildpkr.cpp index cda282aea22..edeb0339647 100644 --- a/src/mame/misc/wildpkr.cpp +++ b/src/mame/misc/wildpkr.cpp @@ -486,9 +486,9 @@ void wildpkr_state::wildpkr(machine_config &config) screen.set_screen_update("acrtc", FUNC(hd63484_device::update_screen)); screen.set_palette("palette"); - HD63484(config, "acrtc", 0).set_addrmap(0, &wildpkr_state::hd63484_map); + HD63484(config, "acrtc").set_addrmap(0, &wildpkr_state::hd63484_map); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); + ramdac_device &ramdac(RAMDAC(config, "ramdac", "palette")); ramdac.set_addrmap(0, &wildpkr_state::ramdac_map); PALETTE(config, "palette", FUNC(wildpkr_state::wildpkr_palette), 256); @@ -509,12 +509,12 @@ void wildpkr_state::tabpkr(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); // DS1220Y - MC68681(config, m_duart, 3686400); + MC68681(config, m_duart, XTAL::u(3686400)); m_duart->irq_cb().set_inputline(m_maincpu, M68K_IRQ_2, ASSERT_LINE); - DS2401(config, m_id, 0); + DS2401(config, m_id); - CLOCK(config, m_dac_clock, 1500000); // base rate derived from program code + CLOCK(config, m_dac_clock, XTAL::u(1500000)); // base rate derived from program code m_dac_clock->signal_handler().set_inputline(m_maincpu, M68K_IRQ_5, ASSERT_LINE); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -526,16 +526,16 @@ void wildpkr_state::tabpkr(machine_config &config) screen.set_palette("palette"); screen.screen_vblank().set_inputline(m_maincpu, M68K_IRQ_4, ASSERT_LINE); - HD63484(config, "acrtc", 0).set_addrmap(0, &wildpkr_state::hd63484_map); + HD63484(config, "acrtc").set_addrmap(0, &wildpkr_state::hd63484_map); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); + ramdac_device &ramdac(RAMDAC(config, "ramdac", "palette")); ramdac.set_addrmap(0, &wildpkr_state::ramdac_map); PALETTE(config, "palette", FUNC(wildpkr_state::wildpkr_palette), 256); /* sound hardware */ SPEAKER(config, "mono").front_center(); - AD557(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.50); + AD557(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/misc/xtom3d.cpp b/src/mame/misc/xtom3d.cpp index ad59221db67..e109f65ecd6 100644 --- a/src/mame/misc/xtom3d.cpp +++ b/src/mame/misc/xtom3d.cpp @@ -430,7 +430,7 @@ void xtom3d_state::xtom3d(machine_config &config) pcat_common(config); - PCI_BUS_LEGACY(config, m_pcibus, 0, 0); + PCI_BUS_LEGACY(config, m_pcibus); m_pcibus->set_device(0, FUNC(xtom3d_state::intel82439tx_pci_r), FUNC(xtom3d_state::intel82439tx_pci_w)); m_pcibus->set_device(7, FUNC(xtom3d_state::intel82371ab_pci_r), FUNC(xtom3d_state::intel82371ab_pci_w)); diff --git a/src/mame/misc/yuvomz80.cpp b/src/mame/misc/yuvomz80.cpp index c07855ee1b1..ad721112de2 100644 --- a/src/mame/misc/yuvomz80.cpp +++ b/src/mame/misc/yuvomz80.cpp @@ -107,7 +107,7 @@ void yuvomz80_state::hexaprs(machine_config &config) audiocpu.set_addrmap(AS_IO, &yuvomz80_state::audio_io_map); SPEAKER(config, "mono").front_center(); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); // type guessed + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); // type guessed ymsnd.irq_handler().set_inputline("audiocpu", 0); ymsnd.add_route(0, "mono", 0.25); ymsnd.add_route(1, "mono", 1.0); @@ -124,10 +124,10 @@ void yuvomz80_state::hexaprsz(machine_config &config) audiocpu.set_addrmap(AS_PROGRAM, &yuvomz80_state::audio_mem_map); audiocpu.set_addrmap(AS_IO, &yuvomz80_state::hexaprsz_audio_io_map); - I8255A(config, "ppi0", 0); - I8255A(config, "ppi1", 0); - I8255A(config, "ppi2", 0); - I8255A(config, "ppi3", 0); + I8255A(config, "ppi0"); + I8255A(config, "ppi1"); + I8255A(config, "ppi2"); + I8255A(config, "ppi3"); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/misc/z80ne.cpp b/src/mame/misc/z80ne.cpp index 0dfe79334aa..7084b0b48f6 100644 --- a/src/mame/misc/z80ne.cpp +++ b/src/mame/misc/z80ne.cpp @@ -1368,7 +1368,7 @@ void z80ne_state::z80ne(machine_config &config) AY31015(config, m_uart); - CLOCK(config, m_uart_clock, 4800); + CLOCK(config, m_uart_clock, XTAL::u(4800)); m_uart_clock->signal_handler().set(FUNC(z80ne_state::lx385_uart_tx_clock_w)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp)); @@ -1392,7 +1392,7 @@ void z80ne_state::z80ne(machine_config &config) void z80net_state::lx387(machine_config &config) { - KR2376_ST(config, m_lx387_kr2376, 50000); + KR2376_ST(config, m_lx387_kr2376, XTAL::u(50000)); m_lx387_kr2376->x<0>().set_ioport("X0"); m_lx387_kr2376->x<1>().set_ioport("X1"); m_lx387_kr2376->x<2>().set_ioport("X2"); @@ -1437,7 +1437,7 @@ void z80netb_state::z80netb(machine_config &config) AY31015(config, m_uart); - CLOCK(config, m_uart_clock, 4800); + CLOCK(config, m_uart_clock, XTAL::u(4800)); m_uart_clock->signal_handler().set(FUNC(z80netb_state::lx385_uart_tx_clock_w)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp)); @@ -1479,7 +1479,7 @@ void z80netf_state::z80netf(machine_config &config) AY31015(config, m_uart); - CLOCK(config, m_uart_clock, 4800); + CLOCK(config, m_uart_clock, XTAL::u(4800)); m_uart_clock->signal_handler().set(FUNC(z80netf_state::lx385_uart_tx_clock_w)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp)); diff --git a/src/mame/mit/tx0.cpp b/src/mame/mit/tx0.cpp index 89362ffbea7..86e78461967 100644 --- a/src/mame/mit/tx0.cpp +++ b/src/mame/mit/tx0.cpp @@ -364,7 +364,7 @@ class tx0_readtape_image_device : public paper_tape_reader_device { public: // construction/destruction - tx0_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tx0_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual const char *file_extensions() const noexcept override { return "tap,rim"; } @@ -383,7 +383,7 @@ private: DEFINE_DEVICE_TYPE(TX0_READTAPE, tx0_readtape_image_device, "tx0_readtape_image", "TX0 Tape Reader") -tx0_readtape_image_device::tx0_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx0_readtape_image_device::tx0_readtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_reader_device(mconfig, TX0_READTAPE, tag, owner, clock) , m_tx0(*this, DEVICE_SELF_OWNER) { @@ -393,7 +393,7 @@ class tx0_punchtape_image_device : public paper_tape_punch_device { public: // construction/destruction - tx0_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tx0_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual const char *file_extensions() const noexcept override { return "tap,rim"; } @@ -412,7 +412,7 @@ private: DEFINE_DEVICE_TYPE(TX0_PUNCHTAPE, tx0_punchtape_image_device, "tx0_punchtape_image", "TX0 Tape Puncher") -tx0_punchtape_image_device::tx0_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx0_punchtape_image_device::tx0_punchtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : paper_tape_punch_device(mconfig, TX0_PUNCHTAPE, tag, owner, clock) , m_tx0(*this, DEVICE_SELF_OWNER) { @@ -424,7 +424,7 @@ class tx0_printer_image_device : public device_t, { public: // construction/destruction - tx0_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tx0_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual bool is_readable() const noexcept override { return false; } @@ -449,7 +449,7 @@ private: DEFINE_DEVICE_TYPE(TX0_PRINTER, tx0_printer_image_device, "tx0_printer_image", "TX0 Typewriter") -tx0_printer_image_device::tx0_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx0_printer_image_device::tx0_printer_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TX0_PRINTER, tag, owner, clock) , device_image_interface(mconfig, *this) , m_tx0(*this, DEVICE_SELF_OWNER) @@ -460,7 +460,7 @@ class tx0_magtape_image_device : public magtape_image_device { public: // construction/destruction - tx0_magtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tx0_magtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual const char *file_extensions() const noexcept override { return "tap"; } @@ -478,7 +478,7 @@ private: DEFINE_DEVICE_TYPE(TX0_MAGTAPE, tx0_magtape_image_device, "tx0_magtape_image", "TX0 Magnetic Tape") -tx0_magtape_image_device::tx0_magtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx0_magtape_image_device::tx0_magtape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : magtape_image_device(mconfig, TX0_MAGTAPE, tag, owner, clock) , m_tx0(*this, DEVICE_SELF_OWNER) { @@ -1544,7 +1544,7 @@ void tx0_state::tx0_64kw(machine_config &config) { /* basic machine hardware */ /* TX0 CPU @ approx. 167 kHz (no master clock, but the memory cycle time is approximately 6usec) */ - TX0_64KW(config, m_maincpu, 166667); + TX0_64KW(config, m_maincpu, XTAL::u(166667)); m_maincpu->cpy().set(FUNC(tx0_state::tx0_io_cpy)); m_maincpu->r1l().set(FUNC(tx0_state::tx0_io_r1l)); m_maincpu->dis().set(FUNC(tx0_state::tx0_io_dis)); @@ -1569,15 +1569,15 @@ void tx0_state::tx0_64kw(machine_config &config) screen.screen_vblank().set(FUNC(tx0_state::screen_vblank_tx0)); screen.set_palette(m_palette); - CRT(config, m_crt, 0); + CRT(config, m_crt); m_crt->set_num_levels(pen_crt_num_levels); m_crt->set_offsets(crt_window_offset_x, crt_window_offset_y); m_crt->set_size(crt_window_width, crt_window_height); - TX0_READTAPE(config, "readt", 0); - TX0_PUNCHTAPE(config, "punch", 0); - TX0_PRINTER(config, "typewriter", 0); - TX0_MAGTAPE(config, "magtape", 0); + TX0_READTAPE(config, "readt"); + TX0_PUNCHTAPE(config, "punch"); + TX0_PRINTER(config, "typewriter"); + TX0_MAGTAPE(config, "magtape"); GFXDECODE(config, m_gfxdecode, m_palette, gfx_tx0); PALETTE(config, m_palette, FUNC(tx0_state::tx0_palette), total_colors_needed + sizeof(tx0_pens), total_colors_needed); diff --git a/src/mame/mits/altair.cpp b/src/mame/mits/altair.cpp index 4254598a72a..e17d09875a7 100644 --- a/src/mame/mits/altair.cpp +++ b/src/mame/mits/altair.cpp @@ -122,7 +122,7 @@ void altair_state::altair(machine_config &config) m_maincpu->set_addrmap(AS_IO, &altair_state::io_map); /* video hardware */ - acia6850_device &acia(ACIA6850(config, "acia", 0)); + acia6850_device &acia(ACIA6850(config, "acia")); acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); acia.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/mitsubishi/multi16.cpp b/src/mame/mitsubishi/multi16.cpp index 057afc35418..4f3b71c6a35 100644 --- a/src/mame/mitsubishi/multi16.cpp +++ b/src/mame/mitsubishi/multi16.cpp @@ -152,7 +152,7 @@ static void multi16_floppies(device_slot_interface &device) void multi16_state::multi16(machine_config &config) { - I8086(config, m_maincpu, 8000000); + I8086(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &multi16_state::multi16_map); m_maincpu->set_addrmap(AS_IO, &multi16_state::multi16_io); m_maincpu->set_irq_acknowledge_callback("pic", FUNC(pic8259_device::inta_cb)); @@ -164,19 +164,19 @@ void multi16_state::multi16(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(16000000, 848, 0, 640, 518, 0, 400); // unknown clock + screen.set_raw(XTAL::u(16000000), 848, 0, 640, 518, 0, 400); // unknown clock screen.set_screen_update("crtc", FUNC(hd6845s_device::screen_update)); PALETTE(config, m_palette, palette_device::RGB_3BIT); - HD6845S(config, m_crtc, 2000000); // unknown clock + HD6845S(config, m_crtc, XTAL::u(2000000)); // unknown clock m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); m_crtc->set_update_row_callback(FUNC(multi16_state::crtc_update_row)); // floppy - MB8866(config, m_fdc, 2000000); + MB8866(config, m_fdc, XTAL::u(2000000)); FLOPPY_CONNECTOR(config, m_floppy[0], multi16_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, m_floppy[1], multi16_floppies, nullptr, floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/mitsubishi/multi8.cpp b/src/mame/mitsubishi/multi8.cpp index 8386c98fce1..d3d565609fc 100644 --- a/src/mame/mitsubishi/multi8.cpp +++ b/src/mame/mitsubishi/multi8.cpp @@ -634,10 +634,10 @@ void multi8_state::multi8(machine_config &config) /* Audio */ SPEAKER(config, "mono").front_center(); - AY8912(config, m_aysnd, 1500000); //unknown clock / divider + AY8912(config, m_aysnd, XTAL::u(1500000)); //unknown clock / divider m_aysnd->port_a_write_callback().set(FUNC(multi8_state::ym2203_porta_w)); m_aysnd->add_route(ALL_OUTPUTS, "mono", 0.50); - BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS,"mono",0.50); // guesswork + BEEP(config, m_beeper, XTAL::u(1200)).add_route(ALL_OUTPUTS,"mono",0.50); // guesswork /* devices */ TIMER(config, "keyboard_timer").configure_periodic(FUNC(multi8_state::keyboard_callback), attotime::from_hz(240/32)); @@ -653,7 +653,7 @@ void multi8_state::multi8(machine_config &config) m_ppi->out_pb_callback().set(FUNC(multi8_state::portb_w)); m_ppi->out_pc_callback().set(FUNC(multi8_state::portc_w)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 19200)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(19200))); uart_clock.signal_handler().set(FUNC(multi8_state::kansas_w)); TIMER(config, "kansas_r").configure_periodic(FUNC(multi8_state::kansas_r), attotime::from_hz(40000)); @@ -661,11 +661,11 @@ void multi8_state::multi8(machine_config &config) m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); - I8251(config, m_uart, 0); // for cassette + I8251(config, m_uart); // for cassette m_uart->txd_handler().set([this] (bool state) { m_cassbit = state; }); - PIT8253(config, "pit", 0); - PIC8259(config, "pic", 0); + PIT8253(config, "pit"); + PIC8259(config, "pic"); //UPD765A(config, "fdc", false, true); //FLOPPY_CONNECTOR(config, "fdc:0", multi8_floppies, "525hd", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/mizar/mzr8105.cpp b/src/mame/mizar/mzr8105.cpp index 8487468ffb2..ac8837df046 100644 --- a/src/mame/mizar/mzr8105.cpp +++ b/src/mame/mizar/mzr8105.cpp @@ -212,7 +212,7 @@ void mzr8105_state::mzr8105(machine_config &config) { M68000(config, m_maincpu, XTAL(10'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &mzr8105_state::mzr8105_mem); - VME(config, "vme", 0).use_owner_spaces(); + VME(config, "vme").use_owner_spaces(); VME_SLOT(config, "slot1", mzr8105_vme_cards, "mzr8300", 1, "vme"); } diff --git a/src/mame/motorola/ampscarp.cpp b/src/mame/motorola/ampscarp.cpp index 8da8d3c86c5..ee3b69229af 100644 --- a/src/mame/motorola/ampscarp.cpp +++ b/src/mame/motorola/ampscarp.cpp @@ -39,7 +39,7 @@ INPUT_PORTS_END void ampscarp_state::ampscarp(machine_config &config) { - MC68HC11A1(config, m_maincpu, 8'000'000); // type and clock unknown + MC68HC11A1(config, m_maincpu, XTAL::u(8'000'000)); // type and clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &scarp_state::mem_map); } diff --git a/src/mame/motorola/exorciser.cpp b/src/mame/motorola/exorciser.cpp index 11e3abd59b7..4ca58428887 100644 --- a/src/mame/motorola/exorciser.cpp +++ b/src/mame/motorola/exorciser.cpp @@ -652,10 +652,10 @@ void exorciser_state::exorciser_rs232_devices(device_slot_interface &device) void exorciser_state::exorciser(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 10000000); + M6800(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &exorciser_state::dbg_map); - ADDRESS_MAP_BANK(config, m_bankdev, 0); + ADDRESS_MAP_BANK(config, m_bankdev); m_bankdev->set_endianness(ENDIANNESS_BIG); m_bankdev->set_data_width(8); m_bankdev->set_addr_width(16); @@ -672,7 +672,7 @@ void exorciser_state::exorciser(machine_config &config) m_brg->out_f<9>().set(FUNC(exorciser_state::write_f9_clock)); m_brg->out_f<13>().set(FUNC(exorciser_state::write_f13_clock)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -680,7 +680,7 @@ void exorciser_state::exorciser(machine_config &config) rs232.rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd)); rs232.set_option_device_input_defaults("exorterm155", DEVICE_INPUT_DEFAULTS_NAME(exorterm)); - PIA6821(config, m_pia_dbg, 0); + PIA6821(config, m_pia_dbg); m_pia_dbg->writepa_handler().set(FUNC(exorciser_state::pia_dbg_pa_w)); m_pia_dbg->readca1_handler().set(FUNC(exorciser_state::pia_dbg_ca1_r)); m_pia_dbg->writepb_handler().set(FUNC(exorciser_state::pia_dbg_pb_w)); @@ -688,23 +688,23 @@ void exorciser_state::exorciser(machine_config &config) m_pia_dbg->cb2_handler().set(FUNC(exorciser_state::pia_dbg_cb2_w)); // MEX68PI Parallel printer port - PIA6821(config, m_pia_lpt, 0); + PIA6821(config, m_pia_lpt); m_pia_lpt->writepa_handler().set(FUNC(exorciser_state::pia_lpt_pa_w)); m_pia_lpt->ca1_w(0); // External parallel printer busy input. m_pia_lpt->ca2_handler().set(FUNC(exorciser_state::pia_lpt_ca2_w)); m_pia_lpt->readpb_handler().set(FUNC(exorciser_state::pia_lpt_pb_r)); - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); // MEX6850? Serial printer port - ACIA6850(config, m_acia_prn, 0); + ACIA6850(config, m_acia_prn); m_acia_prn->txd_handler().set("rs232_prn", FUNC(rs232_port_device::write_txd)); rs232_port_device &rs232_prn(RS232_PORT(config, "rs232_prn", default_rs232_devices, "printer")); rs232_prn.rxd_handler().set(m_acia_prn, FUNC(acia6850_device::write_rxd)); rs232_prn.set_option_device_input_defaults("printer", DEVICE_INPUT_DEFAULTS_NAME(printer)); - M68SFDC(config, m_fdc, 0); + M68SFDC(config, m_fdc); m_fdc->irq_handler().set(m_mainirq, FUNC(input_merger_device::in_w<0>)); m_fdc->nmi_handler().set(m_mainnmi, FUNC(input_merger_device::in_w<3>)); diff --git a/src/mame/motorola/exorterm.cpp b/src/mame/motorola/exorterm.cpp index 6762bb90afe..b1ed596a1de 100644 --- a/src/mame/motorola/exorterm.cpp +++ b/src/mame/motorola/exorterm.cpp @@ -32,7 +32,7 @@ private: void exorterm155_state::exorterm155(machine_config &config) { - EXORTERM155(config, m_exorterm155, 0); + EXORTERM155(config, m_exorterm155); RS232_PORT(config, m_host, default_rs232_devices, nullptr); m_host->dcd_handler().set(m_exorterm155, FUNC(exorterm155_device::rs232_conn_dcd_w)); diff --git a/src/mame/motorola/mekd1.cpp b/src/mame/motorola/mekd1.cpp index 594eb7b1cee..52ef5f8fea7 100644 --- a/src/mame/motorola/mekd1.cpp +++ b/src/mame/motorola/mekd1.cpp @@ -416,7 +416,7 @@ void mekd1_state::mekd1(machine_config &config) // PB7 input from the bit rate timer that goes high after the timer period elapses. // CB2 "reader control" output // IRQA and IRQB are NC. - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpa_handler().set(FUNC(mekd1_state::pia0_pa_r)); m_pia0->readpb_handler().set(FUNC(mekd1_state::pia0_pb_r)); m_pia0->writepa_handler().set(FUNC(mekd1_state::pia0_pa_w)); @@ -424,14 +424,14 @@ void mekd1_state::mekd1(machine_config &config) m_pia0->cb2_handler().set(FUNC(mekd1_state::pia0_cb2_w)); // User PIA. All the I/O lines are available at P2. - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_pia1->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); // User ACIA. Available at P2. // /CTS is pulled low, but may be driven. // /DCD is pulled low, but may be driven. - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); // Off-board clock for the on-board MC6850. diff --git a/src/mame/motorola/mekd2.cpp b/src/mame/motorola/mekd2.cpp index 71e0994bc20..5188d95e70f 100644 --- a/src/mame/motorola/mekd2.cpp +++ b/src/mame/motorola/mekd2.cpp @@ -372,7 +372,7 @@ void mekd2_state::mekd2(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); /* Devices */ - PIA6821(config, m_pia_s, 0); + PIA6821(config, m_pia_s); m_pia_s->readpa_handler().set(FUNC(mekd2_state::key_r)); m_pia_s->readcb1_handler().set(FUNC(mekd2_state::key40_r)); m_pia_s->writepa_handler().set(FUNC(mekd2_state::segment_w)); @@ -381,17 +381,17 @@ void mekd2_state::mekd2(machine_config &config) m_pia_s->irqa_handler().set_inputline("maincpu", INPUT_LINE_NMI); m_pia_s->irqb_handler().set_inputline("maincpu", INPUT_LINE_NMI); - PIA6821(config, m_pia_u, 0); + PIA6821(config, m_pia_u); m_pia_u->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE); m_pia_u->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set([this] (bool state) { m_cassbit = state; }); clock_device &acia_tx_clock(CLOCK(config, "acia_tx_clock", XTAL_MEKD2 / 256)); // 4800Hz acia_tx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); - clock_device &acia_rx_clock(CLOCK(config, "acia_rx_clock", 300)); // toggled by cassette circuit + clock_device &acia_rx_clock(CLOCK(config, "acia_rx_clock", XTAL::u(300))); // toggled by cassette circuit acia_rx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_rxc)); TIMER(config, "kansas_w").configure_periodic(FUNC(mekd2_state::kansas_w), attotime::from_hz(4800)); diff --git a/src/mame/motorola/mekd3.cpp b/src/mame/motorola/mekd3.cpp index 753345c1932..9eab8c81d86 100644 --- a/src/mame/motorola/mekd3.cpp +++ b/src/mame/motorola/mekd3.cpp @@ -950,7 +950,7 @@ void mekd3_state::mekd3(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); // Keypad and display PIA. CA2 and CB2 are NC. - PIA6821(config, m_kpd_pia, 0); + PIA6821(config, m_kpd_pia); m_kpd_pia->readpa_handler().set(FUNC(mekd3_state::keypad_key_r)); m_kpd_pia->readcb1_handler().set(FUNC(mekd3_state::keypad_cb1_r)); m_kpd_pia->writepa_handler().set(FUNC(mekd3_state::led_segment_w)); @@ -968,7 +968,7 @@ void mekd3_state::mekd3(machine_config &config) // MEK68IO // A 'user' PIA, I/O available at SK6. - PIA6821(config, m_pia_io1, 0); + PIA6821(config, m_pia_io1); m_pia_io1->irqa_handler().set(m_mainnmi, FUNC(input_merger_device::in_w<2>)); m_pia_io1->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<1>)); @@ -976,14 +976,14 @@ void mekd3_state::mekd3(machine_config &config) // PA0 can optionally be an audio bit input, at TP1. // PA1 is a jumper mode input, and low by default. // PA2 can optionally be an audio bit output, at TP2. - PIA6821(config, m_pia_io2, 0); + PIA6821(config, m_pia_io2); m_pia_io2->readpa_handler().set(FUNC(mekd3_state::pia_io2a_r)); m_pia_io2->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<2>)); m_pia_io2->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<3>)); // RS232 ACIA // /RTS, /CTS and /DCD are available at SK3. - ACIA6850(config, m_acia_io1, 0); + ACIA6850(config, m_acia_io1); m_acia_io1->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia_io1->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); m_acia_io1->irq_handler().set(m_mainirq, FUNC(input_merger_device::in_w<4>)); @@ -1006,7 +1006,7 @@ void mekd3_state::mekd3(machine_config &config) // /RTS is available at SK2. // /CTS and /DCD are available at SK2, or can be jumpered low. - ACIA6850(config, m_acia_cas, 0); + ACIA6850(config, m_acia_cas); m_acia_cas->txd_handler().set([this] (bool state) { m_cass_txbit = state; }); m_acia_cas->irq_handler().set(m_mainirq, FUNC(input_merger_device::in_w<5>)); @@ -1037,13 +1037,13 @@ void mekd3_state::mekd3(machine_config &config) // CA2 light pen input. // PB0 is mode flags and light pen control. // CB1 is VSYNC, and CB2 is HSYNC. - PIA6821(config, m_r2_pia, 0); + PIA6821(config, m_r2_pia); m_r2_pia->readpa_handler().set(FUNC(mekd3_state::r2_pia_pa_r)); m_r2_pia->readpb_handler().set(FUNC(mekd3_state::r2_pia_pb_r)); m_r2_pia->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<6>)); m_r2_pia->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<7>)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(mekd3_state::kbd_put)); } diff --git a/src/mame/motorola/mekd4.cpp b/src/mame/motorola/mekd4.cpp index f34127eccc5..eece4e5bbd4 100644 --- a/src/mame/motorola/mekd4.cpp +++ b/src/mame/motorola/mekd4.cpp @@ -958,7 +958,7 @@ void mekd4_state::mekd4(machine_config &config) MC6809(config, m_maincpu, 3.579545_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &mekd4_state::mekd4_stop_mem); - ADDRESS_MAP_BANK(config, m_bankdev, 0); + ADDRESS_MAP_BANK(config, m_bankdev); m_bankdev->set_endianness(ENDIANNESS_BIG); m_bankdev->set_data_width(8); m_bankdev->set_addr_width(20); @@ -980,7 +980,7 @@ void mekd4_state::mekd4(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); // IRQ is not connected. RTS, CTS, and DCD are available. - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -999,7 +999,7 @@ void mekd4_state::mekd4(machine_config &config) rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); // Stop PIA. IRQB is NC. - PIA6821(config, m_stop_pia, 0); + PIA6821(config, m_stop_pia); m_stop_pia->writepa_handler().set(FUNC(mekd4_state::stop_pia_pa_w)); m_stop_pia->writepb_handler().set(FUNC(mekd4_state::stop_pia_pb_w)); m_stop_pia->ca2_w(1); // Connected to 'abort' TP2. Can be toggled low to and abort user code. @@ -1008,7 +1008,7 @@ void mekd4_state::mekd4(machine_config &config) m_stop_pia->irqa_handler().set("mainnmi", FUNC(input_merger_device::in_w<0>)); // Keypad and display PIA. CA1, CA2, IRQA are NC. CB2 is pulled high. - PIA6821(config, m_kpd_pia, 0); + PIA6821(config, m_kpd_pia); m_kpd_pia->readpa_handler().set(FUNC(mekd4_state::keypad_key_r)); m_kpd_pia->readcb1_handler().set(FUNC(mekd4_state::keypad_cb1_r)); m_kpd_pia->writepa_handler().set(FUNC(mekd4_state::led_segment_w)); @@ -1016,7 +1016,7 @@ void mekd4_state::mekd4(machine_config &config) m_kpd_pia->irqb_handler().set("mainnmi", FUNC(input_merger_device::in_w<1>)); // Keypad and display board User PIA. - PIA6821(config, m_user_pia, 0); + PIA6821(config, m_user_pia); m_user_pia->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_user_pia->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); @@ -1044,13 +1044,13 @@ void mekd4_state::mekd4(machine_config &config) // CA2 light pen input. // PB0 is mode flags and light pen control. // CB1 is VSYNC, and CB2 is HSYNC. - PIA6821(config, m_r2_pia, 0); + PIA6821(config, m_r2_pia); m_r2_pia->readpa_handler().set(FUNC(mekd4_state::r2_pia_pa_r)); m_r2_pia->readpb_handler().set(FUNC(mekd4_state::r2_pia_pb_r)); m_r2_pia->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); m_r2_pia->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<3>)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(mekd4_state::kbd_put)); } diff --git a/src/mame/motorola/mekd5.cpp b/src/mame/motorola/mekd5.cpp index 17d9f8e8068..2d36eaacc6a 100644 --- a/src/mame/motorola/mekd5.cpp +++ b/src/mame/motorola/mekd5.cpp @@ -465,7 +465,7 @@ void mekd5_state::mekd5(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); // Keypad and display PIA (U23). IRQA is NC. CB2 is trace timer input. - PIA6821(config, m_kpd_pia, 0); + PIA6821(config, m_kpd_pia); m_kpd_pia->readpa_handler().set(FUNC(mekd5_state::keypad_key_r)); m_kpd_pia->writepa_handler().set(FUNC(mekd5_state::led_segment_w)); m_kpd_pia->writepb_handler().set(FUNC(mekd5_state::led_digit_w)); @@ -477,11 +477,11 @@ void mekd5_state::mekd5(machine_config &config) // User PIA (U9). // IRQA and IRQB can be independently jumpered to IRQ or NMI via J1. // All the I/O lines are available at the User I/O connector. - PIA6821(config, m_user_pia, 0); + PIA6821(config, m_user_pia); // IRQ is NC. RX and TX clk are wired together. RTS is available. // /DCD and /CTS and wired low. - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); MC14411(config, m_brg, XTAL(1'843'200)); diff --git a/src/mame/motorola/mvme147.cpp b/src/mame/motorola/mvme147.cpp index 575557cfaf8..b01bdf4c3fa 100644 --- a/src/mame/motorola/mvme147.cpp +++ b/src/mame/motorola/mvme147.cpp @@ -654,10 +654,10 @@ void mvme147_state::mvme147(machine_config &config) M68030(config, m_maincpu, 16_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &mvme147_state::mvme147_mem); - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", mvme147_vme_cards, nullptr, 1, "vme"); - M48T02(config, "m48t18", 0); /* t08 differs only in accepted voltage levels compared to t18 */ + M48T02(config, "m48t18"); /* t08 differs only in accepted voltage levels compared to t18 */ /* Terminal Port config */ SCC85C30(config, m_sccterm, SCC_CLOCK); diff --git a/src/mame/motorola/mvme162.cpp b/src/mame/motorola/mvme162.cpp index cfe4a9a4128..2ab3dd52a2e 100644 --- a/src/mame/motorola/mvme162.cpp +++ b/src/mame/motorola/mvme162.cpp @@ -297,7 +297,7 @@ void mvme162_state::mvme162(machine_config &config) M68040(config, m_maincpu, 25_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &mvme162_state::mvme162_mem); - M48T02(config, "m48t18", 0); /* t08 differs only in accepted voltage levels compared to t18 */ + M48T02(config, "m48t18"); /* t08 differs only in accepted voltage levels compared to t18 */ /* Terminal Port config */ SCC85230(config, m_sccterm, SCC_CLOCK); diff --git a/src/mame/motorola/powerstack.cpp b/src/mame/motorola/powerstack.cpp index d5444770d65..e7a9166bc81 100644 --- a/src/mame/motorola/powerstack.cpp +++ b/src/mame/motorola/powerstack.cpp @@ -29,7 +29,7 @@ INPUT_PORTS_END void powerstack_state::powerstack(machine_config &config) { -// ppc604_device &maincpu(PPC604(config, "maincpu", 300'000'000)); // PPC604E @ 300MHz +// ppc604_device &maincpu(PPC604(config, "maincpu", XTAL::u(300'000'000))); // PPC604E @ 300MHz // maincpu.set_addrmap(AS_PROGRAM, &powerstack_state::mem_map); } diff --git a/src/mame/motorola/sys1121.cpp b/src/mame/motorola/sys1121.cpp index 398ce67cdd9..553e8521206 100644 --- a/src/mame/motorola/sys1121.cpp +++ b/src/mame/motorola/sys1121.cpp @@ -41,7 +41,7 @@ namespace void sys1121_state::sys1121(machine_config &config) { - VME(config, "vme", 0); + VME(config, "vme"); VME_SLOT(config, "slot1", sys1121_vme_cards, "mvme120", 1, "vme"); VME_SLOT(config, "slot2", sys1121_vme_cards, nullptr, 2, "vme"); VME_SLOT(config, "slot3", sys1121_vme_cards, nullptr, 3, "vme"); diff --git a/src/mame/motorola/uchroma68.cpp b/src/mame/motorola/uchroma68.cpp index e45e2fcb59e..6035b06e238 100644 --- a/src/mame/motorola/uchroma68.cpp +++ b/src/mame/motorola/uchroma68.cpp @@ -454,19 +454,19 @@ void uchroma68_state::uchroma68(machine_config &config) m_mc6847->set_screen(m_screen); m_mc6847->input_callback().set(FUNC(uchroma68_state::mc6847_videoram_r)); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(uchroma68_state::pia_pa_r)); m_pia->readpb_handler().set(FUNC(uchroma68_state::pia_pb_r)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set([this] (bool state) { m_cass_txbit = state; }); - CLOCK(config, m_acia_tx_clock, 4800); + CLOCK(config, m_acia_tx_clock, XTAL::u(4800)); m_acia_tx_clock->signal_handler().set(FUNC(uchroma68_state::kansas_w)); TIMER(config, "kansas_r").configure_periodic(FUNC(uchroma68_state::kansas_r), attotime::from_hz(40000)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(uchroma68_state::kbd_put)); } diff --git a/src/mame/msx/msx.cpp b/src/mame/msx/msx.cpp index f189b4255a2..92abd8a887a 100644 --- a/src/mame/msx/msx.cpp +++ b/src/mame/msx/msx.cpp @@ -2292,7 +2292,7 @@ void msx_state::msx_mb8877a(machine_config & config) void msx_state::msx_tc8566af(machine_config &config) { - TC8566AF(config, "fdc", 16'000'000); + TC8566AF(config, "fdc", XTAL::u(16'000'000)); } void msx_state::msx_microsol(machine_config &config) @@ -4143,7 +4143,7 @@ void msx_state::hb10(machine_config &config) add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 3, 1); /* 16KB? RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX - Sony HB-10P */ @@ -5424,7 +5424,7 @@ void msx2_state::canonv25(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); // EXT add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx2_64kb_vram(config); } @@ -5453,7 +5453,7 @@ void msx2_state::canonv30(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); // DISK add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB?? Mapper RAM - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_2_35_dd_drive(config); @@ -5484,7 +5484,7 @@ void msx2_state::canonv30f(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); // DISK add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_2_35_dd_drive(config); @@ -5515,7 +5515,7 @@ void msx2_state::cpc300(machine_config &config) add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Daewoo CPC-300E */ @@ -5571,7 +5571,7 @@ void msx2_state::cpc330k(machine_config &config) add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Daewoo CPC-400 */ @@ -5636,7 +5636,7 @@ void msx2_state::cpc400s(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 2, 0, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_mb8877a(config); msx_1_35_dd_drive(config); @@ -5671,7 +5671,7 @@ void msx2_state::cpc61(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0x8000); add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Daewoo Zemmix CPG-120 Normal */ @@ -5706,7 +5706,7 @@ void msx2_state::cpg120(machine_config &config) add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 2, 0, 1, 1, "maincpu", 0x10000).set_ym2413_tag("ym2413"); add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_ym2413(config); } @@ -5803,7 +5803,7 @@ void msx2_state::mbh70(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_1_35_dd_drive(config); @@ -5839,7 +5839,7 @@ void msx2_state::kmc5000(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_tc8566af(config); msx_1_35_dd_drive(config); @@ -5870,7 +5870,7 @@ void msx2_state::mlg1(machine_config &config) add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 64KB or 128KB Mapper RAM ? add_internal_slot(config, MSX_SLOT_ROM, "paint", 3, 3, 0, 2, "maincpu", 0xc000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Mitsubishi ML-G3 */ @@ -5899,7 +5899,7 @@ void msx2_state::mlg3(machine_config &config) add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 64KB or 128KB Mapper RAM? //add_internal_slot(config, MSX_SLOT_ROM, "rs232c", 3, 3, 1, 1, "maincpu", 0x10000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_1_35_dd_drive(config); @@ -5931,7 +5931,7 @@ void msx2_state::mlg10(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 64KB or 128KB Mapper RAM? - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Mitsubishi ML-G30 Model 1/Model 2 */ @@ -6009,9 +6009,9 @@ void msx2_state::fs4500(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "kdr2", 3, 1, 3, 1, "maincpu", 0x3c000); add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); - MSX_MATSUSHITA(config, "matsushita", 0); + MSX_MATSUSHITA(config, "matsushita"); } /* MSX2 - National FS-4600 */ @@ -6053,7 +6053,7 @@ void msx2_state::fs4600(machine_config &config) add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_mb8877a(config); msx_1_35_dd_drive(config); @@ -6106,9 +6106,9 @@ void msx2_state::fs4700(machine_config &config) add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); - MSX_MATSUSHITA(config, "matsushita", 0); + MSX_MATSUSHITA(config, "matsushita"); msx_mb8877a(config); msx_1_35_dd_drive(config); @@ -6150,7 +6150,7 @@ void msx2_state::fs5000(machine_config &config) add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793_force_ready(config); msx_2_35_dd_drive(config); @@ -6196,9 +6196,9 @@ void msx2_state::fs5500f1(machine_config &config) add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); - MSX_MATSUSHITA(config, "matsushita", 0); + MSX_MATSUSHITA(config, "matsushita"); msx_mb8877a(config); msx_1_35_dd_drive(config); @@ -6244,9 +6244,9 @@ void msx2_state::fs5500f2(machine_config &config) add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); - MSX_MATSUSHITA(config, "matsushita", 0); + MSX_MATSUSHITA(config, "matsushita"); msx_mb8877a(config); msx_2_35_dd_drive(config); @@ -7061,7 +7061,7 @@ void msx2_state::phc23(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Sanyo Wavy PHC-55FD2 */ @@ -7088,7 +7088,7 @@ void msx2_state::phc55fd2(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793_force_ready(config); msx_2_35_dd_drive(config); @@ -7125,7 +7125,7 @@ void msx2_state::phc77(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_ROM, "write", 3, 3, 1, 2, "maincpu", 0x10000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793_force_ready(config); msx_1_35_dd_drive(config); @@ -7242,7 +7242,7 @@ void msx2_state::hbf1xd(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_1_35_dd_drive(config); @@ -7415,7 +7415,7 @@ void msx2_state::hbf700d(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_1_35_dd_drive(config); @@ -7472,7 +7472,7 @@ void msx2_state::hbf700p(machine_config &config) add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793_force_ready(config); msx_1_35_dd_drive(config); @@ -7596,7 +7596,7 @@ void msx2_state::hbf9p(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "firm2", 3, 1, 1, 2, "maincpu", 0x10000); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Sony HB-F9P Russian */ @@ -7621,7 +7621,7 @@ void msx2_state::hbf9pr(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); /* 128KB Mapper RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Sony HB-F9S */ @@ -7648,7 +7648,7 @@ void msx2_state::hbf9s(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "firm2", 3, 1, 1, 2, "maincpu", 0x10000); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Sony HB-G900AP */ @@ -7747,7 +7747,7 @@ void msx2_state::tpc310(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "acc", 3, 1, 1, 2, "maincpu", 0x14000); add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_mb8877a(config); msx_1_35_dd_drive(config); @@ -7885,7 +7885,7 @@ void msx2_state::hx23i(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0xc000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX@ - Toshiba HX-33 */ @@ -7916,7 +7916,7 @@ void msx2_state::hx33(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 2, 1, 2, "maincpu", 0xc000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx2_64kb_vram(config); } @@ -7952,7 +7952,7 @@ void msx2_state::hx34(machine_config &config) add_internal_slot(config, MSX_SLOT_DISK6, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 1, 2, "maincpu", 0x10000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_1_35_dd_drive(config); @@ -7987,7 +7987,7 @@ void msx2_state::hx34i(machine_config &config) add_internal_slot(config, MSX_SLOT_DISK6, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 1, 2, "maincpu", 0x10000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793(config); msx_1_35_dd_drive(config); @@ -8020,7 +8020,7 @@ void msx2_state::fstm1(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "desk1", 3, 2, 1, 2, "maincpu", 0xc000); add_internal_slot(config, MSX_SLOT_ROM, "desk2", 3, 3, 1, 2, "maincpu", 0x14000); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); } /* MSX2 - Victor HC-90 */ @@ -8053,7 +8053,7 @@ void msx2_state::victhc90(machine_config &config) add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793_force_ready(config); msx_1_35_dd_drive(config); @@ -8090,7 +8090,7 @@ void msx2_state::victhc95(machine_config &config) add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793_force_ready(config); msx_2_35_dd_drive(config); @@ -8128,7 +8128,7 @@ void msx2_state::victhc95a(machine_config &config) add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_wd2793_force_ready(config); msx_2_35_dd_drive(config); @@ -8607,7 +8607,7 @@ void msx2_state::fsa1fx(machine_config &config) add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_ROM, "cock", 3, 3, 1, 2, "maincpu", 0x18000); - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); + msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita")); matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); @@ -8651,7 +8651,7 @@ void msx2_state::fsa1wsx(machine_config &config) add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_PANASONIC08, "firm", 3, 3, 0, 4, "maincpu", 0x1c000); - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); + msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita")); matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); @@ -8697,7 +8697,7 @@ void msx2_state::fsa1wx(machine_config &config) add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_PANASONIC08, "firm", 3, 3, 0, 4, "maincpu", 0x1c000); - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); + msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita")); matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); @@ -8741,7 +8741,7 @@ void msx2_state::fsa1wxa(machine_config &config) add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); add_internal_slot(config, MSX_SLOT_PANASONIC08, "firm", 3, 3, 0, 4, "maincpu", 0x1c000); - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); + msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita")); matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); @@ -8901,7 +8901,7 @@ void msx2_state::hbf1xdj(machine_config &config) MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_ym2413(config); @@ -8946,7 +8946,7 @@ void msx2_state::hbf1xv(machine_config &config) MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); - MSX_S1985(config, "s1985", 0); + MSX_S1985(config, "s1985"); msx_ym2413(config); diff --git a/src/mame/msx/msx_matsushita.cpp b/src/mame/msx/msx_matsushita.cpp index 1153b3c21b3..2f151ec9b18 100644 --- a/src/mame/msx/msx_matsushita.cpp +++ b/src/mame/msx/msx_matsushita.cpp @@ -7,7 +7,7 @@ const uint8_t manufacturer_id = 0x08; DEFINE_DEVICE_TYPE(MSX_MATSUSHITA, msx_matsushita_device, "msx_matsushita", "Matsushita switched device") -msx_matsushita_device::msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_matsushita_device::msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_MATSUSHITA, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_io_config(*this, "CONFIG") diff --git a/src/mame/msx/msx_matsushita.h b/src/mame/msx/msx_matsushita.h index f03a2d9a866..6faeb2b5ee3 100644 --- a/src/mame/msx/msx_matsushita.h +++ b/src/mame/msx/msx_matsushita.h @@ -15,7 +15,7 @@ class msx_matsushita_device : public device_t, public device_nvram_interface { public: - msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto turbo_callback() { return m_turbo_out_cb.bind(); } diff --git a/src/mame/msx/msx_s1985.cpp b/src/mame/msx/msx_s1985.cpp index fddbd56315e..6b60988557a 100644 --- a/src/mame/msx/msx_s1985.cpp +++ b/src/mame/msx/msx_s1985.cpp @@ -7,7 +7,7 @@ const uint8_t manufacturer_id = 0xfe; DEFINE_DEVICE_TYPE(MSX_S1985, msx_s1985_device, "msx_s1985", "MSX-Engine S1985") -msx_s1985_device::msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_s1985_device::msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_S1985, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_selected(false) diff --git a/src/mame/msx/msx_s1985.h b/src/mame/msx/msx_s1985.h index edf463c69ee..baf63372b20 100644 --- a/src/mame/msx/msx_s1985.h +++ b/src/mame/msx/msx_s1985.h @@ -15,7 +15,7 @@ class msx_s1985_device : public device_t, public device_nvram_interface { public: - msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // msx_switched_interface overrides virtual uint8_t switched_read(offs_t offset) override; diff --git a/src/mame/msx/msx_systemflags.cpp b/src/mame/msx/msx_systemflags.cpp index 06f59d6e5bd..ddc8f70873e 100644 --- a/src/mame/msx/msx_systemflags.cpp +++ b/src/mame/msx/msx_systemflags.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_SYSTEMFLAGS, msx_systemflags_device, "msx_systemflags", "MSX System Flags") -msx_systemflags_device::msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_systemflags_device::msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSX_SYSTEMFLAGS, tag, owner, clock) , m_initial_value(0xff) , m_system_flags(0xff) diff --git a/src/mame/msx/msx_systemflags.h b/src/mame/msx/msx_systemflags.h index 33616ac5860..49d5ef74700 100644 --- a/src/mame/msx/msx_systemflags.h +++ b/src/mame/msx/msx_systemflags.h @@ -16,13 +16,13 @@ class msx_systemflags_device : public device_t public: template msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&maincpu_tag, uint8_t initial_value) - : msx_systemflags_device(mconfig, tag, owner, 0) + : msx_systemflags_device(mconfig, tag, owner) { set_maincpu_tag(std::forward(maincpu_tag)); set_initial_value(initial_value); } - msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template void set_maincpu_tag(T &&maincpu_tag) { m_maincpu.set_tag(std::forward(maincpu_tag)); } diff --git a/src/mame/multitech/mkit09.cpp b/src/mame/multitech/mkit09.cpp index 2f9bac8f65a..e1d382495f6 100644 --- a/src/mame/multitech/mkit09.cpp +++ b/src/mame/multitech/mkit09.cpp @@ -295,7 +295,7 @@ void mkit09_state::mkit09(machine_config &config) SPEAKER(config, "mono").front_center(); /* Devices */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(mkit09_state::pa_r)); m_pia->readpb_handler().set(FUNC(mkit09_state::pb_r)); m_pia->writepa_handler().set(FUNC(mkit09_state::pa_w)); @@ -323,7 +323,7 @@ void mkit09a_state::mkit09a(machine_config &config) SPEAKER(config, "mono").front_center(); /* Devices */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(mkit09a_state::pa_r)); m_pia->readpb_handler().set(FUNC(mkit09a_state::pb_r)); m_pia->writepa_handler().set(FUNC(mkit09a_state::pa_w)); diff --git a/src/mame/multitech/mpf1.cpp b/src/mame/multitech/mpf1.cpp index 4c689a84eab..52ff3716447 100644 --- a/src/mame/multitech/mpf1.cpp +++ b/src/mame/multitech/mpf1.cpp @@ -428,7 +428,7 @@ void mpf1_state::mpf1b(machine_config &config) void mpf1_state::mpf1p(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); + Z80(config, m_maincpu, XTAL::u(2500000)); m_maincpu->set_addrmap(AS_PROGRAM, &mpf1_state::mpf1p_map); m_maincpu->set_addrmap(AS_OPCODES, &mpf1_state::mpf1_step); m_maincpu->set_addrmap(AS_IO, &mpf1_state::mpf1p_io_map); @@ -438,10 +438,10 @@ void mpf1_state::mpf1p(machine_config &config) config.set_default_layout(layout_mpf1p); /* devices */ - z80pio_device& pio(Z80PIO(config, Z80PIO_TAG, 2500000)); + z80pio_device& pio(Z80PIO(config, Z80PIO_TAG, XTAL::u(2500000))); pio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - Z80CTC(config, m_ctc, 2500000); + Z80CTC(config, m_ctc, XTAL::u(2500000)); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); i8255_device &ppi(I8255A(config, I8255A_TAG)); diff --git a/src/mame/mupid/mupid2.cpp b/src/mame/mupid/mupid2.cpp index 7dbcff55c32..8ab3d9b9c12 100644 --- a/src/mame/mupid/mupid2.cpp +++ b/src/mame/mupid/mupid2.cpp @@ -227,7 +227,7 @@ void mupid2_state::port_c0_w(uint8_t data) void mupid2_state::c2a2(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mupid2_state::maincpu_mem); m_maincpu->set_addrmap(AS_IO, &mupid2_state::maincpu_io); @@ -236,16 +236,16 @@ void mupid2_state::c2a2(machine_config &config) // timing unknown TIMER(config, "nmi_timer").configure_periodic(FUNC(mupid2_state::nmi), attotime::from_hz(5000)); - Z80SIO(config, "sio", 4000000); + Z80SIO(config, "sio", XTAL::u(4000000)); - I8035(config, m_kbdcpu, 4000000); + I8035(config, m_kbdcpu, XTAL::u(4000000)); m_kbdcpu->set_addrmap(AS_PROGRAM, &mupid2_state::kbdcpu_mem); m_kbdcpu->bus_in_cb().set(FUNC(mupid2_state::kbd_bus_r)); m_kbdcpu->p1_in_cb().set(FUNC(mupid2_state::kbd_p1_r)); m_kbdcpu->p1_out_cb().set(FUNC(mupid2_state::kbd_p1_w)); m_kbdcpu->p2_out_cb().set(FUNC(mupid2_state::kbd_p2_w)); - M58990(config, "adc", 1000000); + M58990(config, "adc", XTAL::u(1000000)); PALETTE(config, m_palette, FUNC(mupid2_state::palette_init), 32); } diff --git a/src/mame/namco/20pacgal.cpp b/src/mame/namco/20pacgal.cpp index 5c0e5a8f4e2..bddc0c9786d 100644 --- a/src/mame/namco/20pacgal.cpp +++ b/src/mame/namco/20pacgal.cpp @@ -431,7 +431,7 @@ void _20pacgal_state::_20pacgal(machine_config &config) namco.set_voices(3); namco.add_route(ALL_OUTPUTS, "speaker", 1.0); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC } static DEVICE_INPUT_DEFAULTS_START( null_modem_57600 ) diff --git a/src/mame/namco/c117.cpp b/src/mame/namco/c117.cpp index 87621321507..3cece566724 100644 --- a/src/mame/namco/c117.cpp +++ b/src/mame/namco/c117.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(NAMCO_C117, namco_c117_device, "namco_c117", "Namco C117 MMU" // namco_c117_device - constructor //------------------------------------------------- -namco_c117_device::namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_c117_device::namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_C117, tag, owner, clock), device_memory_interface(mconfig, *this), m_subres_cb(*this), diff --git a/src/mame/namco/c117.h b/src/mame/namco/c117.h index d41ee5fde5b..88c162ab50d 100644 --- a/src/mame/namco/c117.h +++ b/src/mame/namco/c117.h @@ -19,7 +19,7 @@ class namco_c117_device : { public: //construction/destruction - namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c117_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_cpu_tags(T &&maintag, U &&subtag) diff --git a/src/mame/namco/cgang.cpp b/src/mame/namco/cgang.cpp index ea0f38afac3..7260adf0f2b 100644 --- a/src/mame/namco/cgang.cpp +++ b/src/mame/namco/cgang.cpp @@ -745,7 +745,7 @@ void cgang_state::cgang(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &cgang_state::sound_map); m_audiocpu->set_periodic_int(FUNC(cgang_state::nmi_line_pulse), attotime::from_hz(8_MHz_XTAL/4 / 0x1000)); - PIT8253(config, m_pit[0], 0); + PIT8253(config, m_pit[0]); m_pit[0]->set_clk<0>(4_MHz_XTAL/4); m_pit[0]->set_clk<1>(4_MHz_XTAL/4); m_pit[0]->set_clk<2>(4_MHz_XTAL/4); @@ -753,7 +753,7 @@ void cgang_state::cgang(machine_config &config) m_pit[0]->out_handler<1>().set(FUNC(cgang_state::motor_clock_w<1>)); m_pit[0]->out_handler<2>().set(FUNC(cgang_state::motor_clock_w<2>)); - PIT8253(config, m_pit[1], 0); + PIT8253(config, m_pit[1]); m_pit[1]->set_clk<0>(4_MHz_XTAL/4); m_pit[1]->set_clk<1>(4_MHz_XTAL/4); m_pit[1]->set_clk<2>(4_MHz_XTAL/4); diff --git a/src/mame/namco/dkmb.cpp b/src/mame/namco/dkmb.cpp index 715c0c03bbb..0ad4a861566 100644 --- a/src/mame/namco/dkmb.cpp +++ b/src/mame/namco/dkmb.cpp @@ -121,10 +121,10 @@ INPUT_PORTS_END void dkmb_state::dkmb(machine_config &config) { - PPC603R(config, m_maincpu, 75'000'000); // Actually MPC603RRX266LC + PPC603R(config, m_maincpu, XTAL::u(75'000'000)); // Actually MPC603RRX266LC m_maincpu->set_addrmap(AS_PROGRAM, &dkmb_state::main_map); - PIC16C56(config, "pic", 4'000'000); // Actually PIC12C508, clock not verified + PIC16C56(config, "pic", XTAL::u(4'000'000)); // Actually PIC12C508, clock not verified screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // wrong screen.set_refresh_hz(60); diff --git a/src/mame/namco/gal3.cpp b/src/mame/namco/gal3.cpp index 4c6f43151ac..922e29f5cc8 100644 --- a/src/mame/namco/gal3.cpp +++ b/src/mame/namco/gal3.cpp @@ -604,13 +604,13 @@ void gal3_state::gal3(machine_config &config) m68000_device &sound_cpu(M68000(config, "sound_cpu", 49152000/4)); // ?? sound_cpu.set_addrmap(AS_PROGRAM, &gal3_state::sound_cpu_map); - m68000_device &psn_b1_cpu(M68000(config, "psn_b1_cpu", 12000000)); // ?? + m68000_device &psn_b1_cpu(M68000(config, "psn_b1_cpu", XTAL::u(12000000))); // ?? psn_b1_cpu.set_addrmap(AS_PROGRAM, &gal3_state::psn_b1_cpu_map); /* - m68000_device &psn_b2_cpu(M68000(config, "psn_b2_cpu", 12000000)); // ?? + m68000_device &psn_b2_cpu(M68000(config, "psn_b2_cpu", XTAL::u(12000000))); // ?? psn_b2_cpu.set_addrmap(AS_PROGRAM, &gal3_state::psn_b1_cpu_map); - m68000_device &psn_b3_cpu(M68000(config, "psn_b3_cpu", 12000000)); // ?? + m68000_device &psn_b3_cpu(M68000(config, "psn_b3_cpu", XTAL::u(12000000))); // ?? psn_b3_cpu.set_addrmap(AS_PROGRAM, &gal3_state::psn_b1_cpu_map); */ config.set_maximum_quantum(attotime::from_hz(60*8000)); /* 8000 CPU slices per frame */ @@ -630,7 +630,7 @@ void gal3_state::gal3(machine_config &config) PALETTE(config, m_palette[0]).set_format(palette_device::xBRG_888, 0x10000/2); m_palette[0]->set_membits(16); - NAMCO_C355SPR(config, m_c355spr[0], 0); + NAMCO_C355SPR(config, m_c355spr[0]); m_c355spr[0]->set_screen("lscreen"); m_c355spr[0]->set_palette(m_palette[0]); m_c355spr[0]->set_scroll_offsets(0x26, 0x19); @@ -639,12 +639,12 @@ void gal3_state::gal3(machine_config &config) m_c355spr[0]->set_color_base(0x1000); // TODO : verify palette offset m_c355spr[0]->set_external_prifill(true); - NAMCOS21_3D(config, m_namcos21_3d[0], 0); + NAMCOS21_3D(config, m_namcos21_3d[0]); m_namcos21_3d[0]->set_zz_shift_mult(11, 0x200); m_namcos21_3d[0]->set_depth_reverse(false); m_namcos21_3d[0]->set_framebuffer_size(496,480); - NAMCOS21_DSP_C67(config, m_namcos21_dsp_c67[0], 0); + NAMCOS21_DSP_C67(config, m_namcos21_dsp_c67[0]); m_namcos21_dsp_c67[0]->set_renderer_tag("namcos21_3d_1"); // video chain 2 @@ -660,7 +660,7 @@ void gal3_state::gal3(machine_config &config) PALETTE(config, m_palette[1]).set_format(palette_device::xBRG_888, 0x10000/2); m_palette[1]->set_membits(16); - NAMCO_C355SPR(config, m_c355spr[1], 0); + NAMCO_C355SPR(config, m_c355spr[1]); m_c355spr[1]->set_screen("rscreen"); m_c355spr[1]->set_palette(m_palette[1]); m_c355spr[1]->set_scroll_offsets(0x26, 0x19); @@ -669,12 +669,12 @@ void gal3_state::gal3(machine_config &config) m_c355spr[1]->set_color_base(0x1000); // TODO : verify palette offset m_c355spr[1]->set_external_prifill(true); - NAMCOS21_3D(config, m_namcos21_3d[1], 0); + NAMCOS21_3D(config, m_namcos21_3d[1]); m_namcos21_3d[1]->set_zz_shift_mult(11, 0x200); m_namcos21_3d[1]->set_depth_reverse(false); m_namcos21_3d[1]->set_framebuffer_size(496,480); - NAMCOS21_DSP_C67(config, m_namcos21_dsp_c67[1], 0); + NAMCOS21_DSP_C67(config, m_namcos21_dsp_c67[1]); m_namcos21_dsp_c67[1]->set_renderer_tag("namcos21_3d_2"); diff --git a/src/mame/namco/galaga.cpp b/src/mame/namco/galaga.cpp index 33956e29d09..74ddcff9992 100644 --- a/src/mame/namco/galaga.cpp +++ b/src/mame/namco/galaga.cpp @@ -1643,7 +1643,7 @@ void bosco_state::bosco(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_bosco); PALETTE(config, m_palette, FUNC(bosco_state::bosco_palette), 64*4 + 64*4 + 4 + 64, 32+64); - STARFIELD_05XX(config, m_starfield, 0); + STARFIELD_05XX(config, m_starfield); m_starfield->set_starfield_config(0, STARFIELD_Y_OFFSET_BOSCO, STARFIELD_X_LIMIT_BOSCO); /* sound hardware */ @@ -1720,7 +1720,7 @@ void galaga_state::galaga(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_galaga); PALETTE(config, m_palette, FUNC(galaga_state::galaga_palette), 64*4 + 64*4 + 4 + 64, 32+64); - STARFIELD_05XX(config, m_starfield, 0); + STARFIELD_05XX(config, m_starfield); m_starfield->set_starfield_config(STARFIELD_X_OFFSET_GALAGA, 0, STARFIELD_X_LIMIT_GALAGA); /* sound hardware */ diff --git a/src/mame/namco/gaplus.cpp b/src/mame/namco/gaplus.cpp index 4648c02d0a4..0faa77e9aa2 100644 --- a/src/mame/namco/gaplus.cpp +++ b/src/mame/namco/gaplus.cpp @@ -554,7 +554,7 @@ void gaplus_state::gaplus(machine_config &config) { gaplus_base(config); - NAMCO_56XX(config, m_namco56xx, 0); + NAMCO_56XX(config, m_namco56xx); m_namco56xx->in_callback<0>().set_ioport("COINS"); m_namco56xx->in_callback<1>().set_ioport("P1"); m_namco56xx->in_callback<2>().set_ioport("P2"); @@ -562,7 +562,7 @@ void gaplus_state::gaplus(machine_config &config) m_namco56xx->out_callback<0>().set(FUNC(gaplus_state::out_lamps0)); m_namco56xx->out_callback<1>().set(FUNC(gaplus_state::out_lamps1)); - NAMCO_58XX(config, m_namco58xx, 0); + NAMCO_58XX(config, m_namco58xx); m_namco58xx->in_callback<0>().set_ioport("DSWA_HIGH"); m_namco58xx->in_callback<1>().set_ioport("DSWB_LOW"); m_namco58xx->in_callback<2>().set_ioport("DSWB_HIGH"); @@ -573,13 +573,13 @@ void gaplusd_state::gaplusd(machine_config &config) { gaplus_base(config); - NAMCO_58XX(config, m_namco58xx, 0); + NAMCO_58XX(config, m_namco58xx); m_namco58xx->in_callback<0>().set_ioport("COINS"); m_namco58xx->in_callback<1>().set_ioport("P1"); m_namco58xx->in_callback<2>().set_ioport("P2"); m_namco58xx->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_56XX(config, m_namco56xx, 0); + NAMCO_56XX(config, m_namco56xx); m_namco56xx->in_callback<0>().set_ioport("DSWA_HIGH"); m_namco56xx->in_callback<1>().set_ioport("DSWB_LOW"); m_namco56xx->in_callback<2>().set_ioport("DSWB_HIGH"); @@ -594,13 +594,13 @@ void gapluso_state::gapluso(machine_config &config) m_screen->screen_vblank().set(FUNC(gaplus_base_state::screen_vblank)); m_screen->screen_vblank().append(FUNC(gapluso_state::vblank_irq)); - NAMCO_56XX(config, m_namco56xx, 0); + NAMCO_56XX(config, m_namco56xx); m_namco56xx->in_callback<0>().set_ioport("COINS"); m_namco56xx->in_callback<1>().set_ioport("P1"); m_namco56xx->in_callback<2>().set_ioport("P2"); m_namco56xx->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_58XX(config, m_namco58xx, 0); + NAMCO_58XX(config, m_namco58xx); m_namco58xx->in_callback<0>().set_ioport("DSWA_HIGH"); m_namco58xx->in_callback<1>().set_ioport("DSWB_LOW"); m_namco58xx->in_callback<2>().set_ioport("DSWB_HIGH"); diff --git a/src/mame/namco/geebee.cpp b/src/mame/namco/geebee.cpp index 6a259eb7354..af575931b3d 100644 --- a/src/mame/namco/geebee.cpp +++ b/src/mame/namco/geebee.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(GEEBEE_SOUND, geebee_sound_device, "geebee_sound", "Gee Bee Custom Sound") -geebee_sound_device::geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +geebee_sound_device::geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GEEBEE_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), m_decay(nullptr), diff --git a/src/mame/namco/geebee.h b/src/mame/namco/geebee.h index a0aab1ef412..5505a23c115 100644 --- a/src/mame/namco/geebee.h +++ b/src/mame/namco/geebee.h @@ -8,7 +8,7 @@ class geebee_sound_device : public device_t, public device_sound_interface { public: - geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(u8 data); diff --git a/src/mame/namco/kungfur.cpp b/src/mame/namco/kungfur.cpp index cd396109f0e..85fd0cfe7f5 100644 --- a/src/mame/namco/kungfur.cpp +++ b/src/mame/namco/kungfur.cpp @@ -276,7 +276,7 @@ INPUT_PORTS_END void kungfur_state::kungfur(machine_config &config) { /* basic machine hardware */ - MC6809(config, m_maincpu, 4000000); // 4MHz? + MC6809(config, m_maincpu, XTAL::u(4000000)); // 4MHz? m_maincpu->set_addrmap(AS_PROGRAM, &kungfur_state::main_map); const attotime irq_period = attotime::from_hz(4000000 / 0x1000); // = 976.5Hz, accurate diff --git a/src/mame/namco/mappy.cpp b/src/mame/namco/mappy.cpp index fc59e5949b3..b5f354c6489 100644 --- a/src/mame/namco/mappy.cpp +++ b/src/mame/namco/mappy.cpp @@ -1365,13 +1365,13 @@ void mappy_state::superpac(machine_config &config) { superpac_common(config); - NAMCO_56XX(config, m_namcoio[0], 0); + NAMCO_56XX(config, m_namcoio[0]); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); m_namcoio[0]->in_callback<2>().set_ioport("P2"); m_namcoio[0]->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_56XX(config, m_namcoio[1], 0); + NAMCO_56XX(config, m_namcoio[1]); m_namcoio[1]->in_callback<0>().set("dipmux", FUNC(ls157_device::output_r)); m_namcoio[1]->in_callback<1>().set_ioport("DSW1"); m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); @@ -1383,14 +1383,14 @@ void mappy_state::pacnpal(machine_config &config) { superpac_common(config); - NAMCO_56XX(config, m_namcoio[0], 0); + NAMCO_56XX(config, m_namcoio[0]); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); m_namcoio[0]->in_callback<2>().set_ioport("P2"); m_namcoio[0]->in_callback<3>().set_ioport("BUTTONS"); m_namcoio[0]->out_callback<0>().set(FUNC(mappy_state::out_lamps)); - NAMCO_59XX(config, m_namcoio[1], 0); + NAMCO_59XX(config, m_namcoio[1]); m_namcoio[1]->in_callback<0>().set("dipmux", FUNC(ls157_device::output_r)); m_namcoio[1]->in_callback<1>().set_ioport("DSW1"); m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); @@ -1402,13 +1402,13 @@ void mappy_state::grobda(machine_config &config) { superpac_common(config); - NAMCO_58XX(config, m_namcoio[0], 0); + NAMCO_58XX(config, m_namcoio[0]); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); m_namcoio[0]->in_callback<2>().set_ioport("P2"); m_namcoio[0]->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_56XX(config, m_namcoio[1], 0); + NAMCO_56XX(config, m_namcoio[1]); m_namcoio[1]->in_callback<0>().set("dipmux", FUNC(ls157_device::output_r)); m_namcoio[1]->in_callback<1>().set_ioport("DSW1"); m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); @@ -1442,13 +1442,13 @@ void mappy_state::phozon(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs - NAMCO_58XX(config, m_namcoio[0], 0); + NAMCO_58XX(config, m_namcoio[0]); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); m_namcoio[0]->in_callback<2>().set_ioport("P2"); m_namcoio[0]->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_56XX(config, m_namcoio[1], 0); + NAMCO_56XX(config, m_namcoio[1]); m_namcoio[1]->in_callback<0>().set("dipmux", FUNC(ls157_device::output_r)); m_namcoio[1]->in_callback<1>().set_ioport("DSW1"); m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); @@ -1529,13 +1529,13 @@ void mappy_state::mappy(machine_config &config) { mappy_common(config); - NAMCO_58XX(config, m_namcoio[0], 0); + NAMCO_58XX(config, m_namcoio[0]); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); m_namcoio[0]->in_callback<2>().set_ioport("P2"); m_namcoio[0]->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_58XX(config, m_namcoio[1], 0); + NAMCO_58XX(config, m_namcoio[1]); m_namcoio[1]->in_callback<0>().set("dipmux", FUNC(ls157_device::output_r)); m_namcoio[1]->in_callback<1>().set_ioport("DSW1"); m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); @@ -1549,13 +1549,13 @@ void mappy_state::digdug2(machine_config &config) subdevice("watchdog")->set_vblank_count("screen", 0); - NAMCO_58XX(config, m_namcoio[0], 0); + NAMCO_58XX(config, m_namcoio[0]); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); m_namcoio[0]->in_callback<2>().set_ioport("P2"); m_namcoio[0]->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_56XX(config, m_namcoio[1], 0); + NAMCO_56XX(config, m_namcoio[1]); m_namcoio[1]->in_callback<0>().set("dipmux", FUNC(ls157_device::output_r)); m_namcoio[1]->in_callback<1>().set_ioport("DSW1"); m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); @@ -1576,14 +1576,14 @@ void mappy_state::motos(machine_config &config) { mappy_common(config); - NAMCO_56XX(config, m_namcoio[0], 0); + NAMCO_56XX(config, m_namcoio[0]); m_namcoio[0]->in_callback<0>().set_ioport("COINS"); m_namcoio[0]->in_callback<1>().set_ioport("P1"); m_namcoio[0]->in_callback<2>().set_ioport("P2"); m_namcoio[0]->in_callback<3>().set_ioport("BUTTONS"); m_namcoio[0]->out_callback<0>().set(FUNC(mappy_state::out_lamps)); - NAMCO_56XX(config, m_namcoio[1], 0); + NAMCO_56XX(config, m_namcoio[1]); m_namcoio[1]->in_callback<0>().set("dipmux", FUNC(ls157_device::output_r)); m_namcoio[1]->in_callback<1>().set_ioport("DSW1"); m_namcoio[1]->in_callback<2>().set_ioport("DSW1").rshift(4); diff --git a/src/mame/namco/namco06.cpp b/src/mame/namco/namco06.cpp index 9f37fafa94a..72dcc1e4390 100644 --- a/src/mame/namco/namco06.cpp +++ b/src/mame/namco/namco06.cpp @@ -243,7 +243,7 @@ void namco_06xx_device::set_nmi(int state) DEFINE_DEVICE_TYPE(NAMCO_06XX, namco_06xx_device, "namco06", "Namco 06xx") -namco_06xx_device::namco_06xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_06xx_device::namco_06xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_06XX, tag, owner, clock) , m_control(0) , m_next_timer_state(false) diff --git a/src/mame/namco/namco06.h b/src/mame/namco/namco06.h index 30a76e9af2e..b5561f26d32 100644 --- a/src/mame/namco/namco06.h +++ b/src/mame/namco/namco06.h @@ -10,7 +10,7 @@ class namco_06xx_device : public device_t { public: - namco_06xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_06xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_maincpu(T &&tag) { m_nmicpu.set_tag(std::forward(tag)); } diff --git a/src/mame/namco/namco50.cpp b/src/mame/namco/namco50.cpp index 8baf8cb4bd5..b40ec2f1e4d 100644 --- a/src/mame/namco/namco50.cpp +++ b/src/mame/namco/namco50.cpp @@ -214,7 +214,7 @@ ROM_END DEFINE_DEVICE_TYPE(NAMCO_50XX, namco_50xx_device, "namco50", "Namco 50xx") -namco_50xx_device::namco_50xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_50xx_device::namco_50xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_50XX, tag, owner, clock), m_cpu(*this, "mcu"), m_rw(0), diff --git a/src/mame/namco/namco50.h b/src/mame/namco/namco50.h index d24a52b8f35..8135237ac70 100644 --- a/src/mame/namco/namco50.h +++ b/src/mame/namco/namco50.h @@ -11,7 +11,7 @@ class namco_50xx_device : public device_t { public: - namco_50xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_50xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); WRITE_LINE_MEMBER( reset ); WRITE_LINE_MEMBER( chip_select ); diff --git a/src/mame/namco/namco51.cpp b/src/mame/namco/namco51.cpp index 1e574993a89..7e8f8d5dbbd 100644 --- a/src/mame/namco/namco51.cpp +++ b/src/mame/namco/namco51.cpp @@ -158,7 +158,7 @@ ROM_END DEFINE_DEVICE_TYPE(NAMCO_51XX, namco_51xx_device, "namco51", "Namco 51xx") -namco_51xx_device::namco_51xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_51xx_device::namco_51xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_51XX, tag, owner, clock) , m_cpu(*this, "mcu") , m_portO(0) diff --git a/src/mame/namco/namco51.h b/src/mame/namco/namco51.h index 35cec6458f2..c4c905678e0 100644 --- a/src/mame/namco/namco51.h +++ b/src/mame/namco/namco51.h @@ -11,7 +11,7 @@ class namco_51xx_device : public device_t { public: - namco_51xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_51xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto input_callback() { return m_in[N].bind(); } auto output_callback() { return m_out.bind(); } diff --git a/src/mame/namco/namco52.cpp b/src/mame/namco/namco52.cpp index 564b25cd82c..0924dd71c01 100644 --- a/src/mame/namco/namco52.cpp +++ b/src/mame/namco/namco52.cpp @@ -135,7 +135,7 @@ ROM_END DEFINE_DEVICE_TYPE(NAMCO_52XX, namco_52xx_device, "namco52", "Namco 52xx") -namco_52xx_device::namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_52xx_device::namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_52XX, tag, owner, clock), m_cpu(*this, "mcu"), m_discrete(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/namco/namco52.h b/src/mame/namco/namco52.h index a775921b6a7..dfb1eafec93 100644 --- a/src/mame/namco/namco52.h +++ b/src/mame/namco/namco52.h @@ -9,7 +9,7 @@ class namco_52xx_device : public device_t { public: - namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_52xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_discrete(T &&tag) { m_discrete.set_tag(std::forward(tag)); } void set_basenote(int node) { m_basenode = node; } diff --git a/src/mame/namco/namco53.cpp b/src/mame/namco/namco53.cpp index 7a6a8ea9181..54e0b674ced 100644 --- a/src/mame/namco/namco53.cpp +++ b/src/mame/namco/namco53.cpp @@ -127,7 +127,7 @@ ROM_END DEFINE_DEVICE_TYPE(NAMCO_53XX, namco_53xx_device, "namco53", "Namco 53xx") -namco_53xx_device::namco_53xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_53xx_device::namco_53xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_53XX, tag, owner, clock), m_cpu(*this, "mcu"), m_portO(0), diff --git a/src/mame/namco/namco53.h b/src/mame/namco/namco53.h index 2cd473b3c05..f339642fe90 100644 --- a/src/mame/namco/namco53.h +++ b/src/mame/namco/namco53.h @@ -10,7 +10,7 @@ class namco_53xx_device : public device_t { public: - namco_53xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_53xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto input_callback() { return m_in[N].bind(); } diff --git a/src/mame/namco/namco54.cpp b/src/mame/namco/namco54.cpp index 891cb957d0c..a4a6c3d44c0 100644 --- a/src/mame/namco/namco54.cpp +++ b/src/mame/namco/namco54.cpp @@ -114,7 +114,7 @@ ROM_END DEFINE_DEVICE_TYPE(NAMCO_54XX, namco_54xx_device, "namco54", "Namco 54xx") -namco_54xx_device::namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_54xx_device::namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_54XX, tag, owner, clock), m_cpu(*this, "mcu"), m_discrete(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/namco/namco54.h b/src/mame/namco/namco54.h index 6bb0264820f..687932a7d17 100644 --- a/src/mame/namco/namco54.h +++ b/src/mame/namco/namco54.h @@ -10,7 +10,7 @@ class namco_54xx_device : public device_t { public: - namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_54xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_discrete(T &&tag) { m_discrete.set_tag(std::forward(tag)); } void set_basenote(int node) { m_basenode = node; } diff --git a/src/mame/namco/namco62.cpp b/src/mame/namco/namco62.cpp index 8a7fc1e88ed..d0fcf2ec4d6 100644 --- a/src/mame/namco/namco62.cpp +++ b/src/mame/namco/namco62.cpp @@ -30,7 +30,7 @@ ROM_END DEFINE_DEVICE_TYPE(NAMCO_62XX, namco_62xx_device, "namco62", "Namco 62xx") -namco_62xx_device::namco_62xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_62xx_device::namco_62xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_62XX, tag, owner, clock), m_cpu(*this, "mcu"), m_in(*this), diff --git a/src/mame/namco/namco62.h b/src/mame/namco/namco62.h index a18c1b948cd..19b543c386e 100644 --- a/src/mame/namco/namco62.h +++ b/src/mame/namco/namco62.h @@ -8,7 +8,7 @@ class namco_62xx_device : public device_t { public: - namco_62xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_62xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto input_callback() { return m_in[N].bind(); } diff --git a/src/mame/namco/namco65.cpp b/src/mame/namco/namco65.cpp index 725e6741473..1f8d99ceba4 100644 --- a/src/mame/namco/namco65.cpp +++ b/src/mame/namco/namco65.cpp @@ -13,7 +13,7 @@ some of this can likely be moved into the actual MCU core too DEFINE_DEVICE_TYPE(NAMCOC65, namcoc65_device, "namcoc65", "Namco C65 I/O") -namcoc65_device::namcoc65_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namcoc65_device::namcoc65_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCOC65, tag, owner, clock), m_mcu(*this, "mcu"), m_in_pb_cb(*this), diff --git a/src/mame/namco/namco65.h b/src/mame/namco/namco65.h index ec814a8bbf3..c113a0043e0 100644 --- a/src/mame/namco/namco65.h +++ b/src/mame/namco/namco65.h @@ -15,7 +15,7 @@ class namcoc65_device : public device_t { public: // construction/destruction - namcoc65_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namcoc65_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pb_callback() { return m_in_pb_cb.bind(); } auto in_pc_callback() { return m_in_pc_cb.bind(); } diff --git a/src/mame/namco/namco68.cpp b/src/mame/namco/namco68.cpp index c345638c2d6..a598189dcb3 100644 --- a/src/mame/namco/namco68.cpp +++ b/src/mame/namco/namco68.cpp @@ -13,7 +13,7 @@ output support DEFINE_DEVICE_TYPE(NAMCOC68, namcoc68_device, "namcoc68", "Namco C68 I/O") -namcoc68_device::namcoc68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namcoc68_device::namcoc68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCOC68, tag, owner, clock), m_mcu(*this, "mcu"), m_in_pb_cb(*this), diff --git a/src/mame/namco/namco68.h b/src/mame/namco/namco68.h index f078a2263b5..269fa95a2e5 100644 --- a/src/mame/namco/namco68.h +++ b/src/mame/namco/namco68.h @@ -15,7 +15,7 @@ class namcoc68_device : public device_t { public: // construction/destruction - namcoc68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namcoc68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pb_callback() { return m_in_pb_cb.bind(); } diff --git a/src/mame/namco/namco_c116.cpp b/src/mame/namco/namco_c116.cpp index 4702e137f60..ca64e687edf 100644 --- a/src/mame/namco/namco_c116.cpp +++ b/src/mame/namco/namco_c116.cpp @@ -76,7 +76,7 @@ DEFINE_DEVICE_TYPE(NAMCO_C116, namco_c116_device, "namco_c116", "Namco C116 Vide // namco_c116_device -- constructor //------------------------------------------------- -namco_c116_device::namco_c116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_c116_device::namco_c116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_C116, tag, owner, clock) , device_palette_interface(mconfig, *this) , device_video_interface(mconfig, *this) diff --git a/src/mame/namco/namco_c116.h b/src/mame/namco/namco_c116.h index 1fed49db5f4..8debb568801 100644 --- a/src/mame/namco/namco_c116.h +++ b/src/mame/namco/namco_c116.h @@ -17,7 +17,7 @@ class namco_c116_device : { public: //construction/destruction - namco_c116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + namco_c116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void enable_shadows() { m_enable_shadows = true; } diff --git a/src/mame/namco/namco_c123tmap.cpp b/src/mame/namco/namco_c123tmap.cpp index 4537e2be3f1..bbe5d979aa2 100644 --- a/src/mame/namco/namco_c123tmap.cpp +++ b/src/mame/namco/namco_c123tmap.cpp @@ -30,7 +30,7 @@ GFXDECODE_END DEFINE_DEVICE_TYPE(NAMCO_C123TMAP, namco_c123tmap_device, "namco_c123tmap", "Namco C123 (4x + 2x Tilemaps)") -namco_c123tmap_device::namco_c123tmap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +namco_c123tmap_device::namco_c123tmap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_C123TMAP, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), m_color_base(0), diff --git a/src/mame/namco/namco_c123tmap.h b/src/mame/namco/namco_c123tmap.h index 3ae46b869b0..c502bf38fc2 100644 --- a/src/mame/namco/namco_c123tmap.h +++ b/src/mame/namco/namco_c123tmap.h @@ -13,7 +13,7 @@ class namco_c123tmap_device : public device_t, public device_gfx_interface { public: // construction/destruction - namco_c123tmap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + namco_c123tmap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_color_base(int color) { m_color_base = color; } void set_offset(int xoffs, int yoffs) diff --git a/src/mame/namco/namco_c139.cpp b/src/mame/namco/namco_c139.cpp index 882b1fb3bc3..43d697ce1dc 100644 --- a/src/mame/namco/namco_c139.cpp +++ b/src/mame/namco/namco_c139.cpp @@ -47,7 +47,7 @@ void namco_c139_device::regs_map(address_map &map) // namco_c139_device - constructor //------------------------------------------------- -namco_c139_device::namco_c139_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_c139_device::namco_c139_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_C139, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("data", ENDIANNESS_BIG, 16, 14, 0, address_map_constructor(FUNC(namco_c139_device::data_map), this)) diff --git a/src/mame/namco/namco_c139.h b/src/mame/namco/namco_c139.h index 53c16499624..c414354e177 100644 --- a/src/mame/namco/namco_c139.h +++ b/src/mame/namco/namco_c139.h @@ -28,7 +28,7 @@ class namco_c139_device : public device_t, { public: // construction/destruction - namco_c139_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c139_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void regs_map(address_map &map); diff --git a/src/mame/namco/namco_c148.cpp b/src/mame/namco/namco_c148.cpp index 047dd52a975..6af5811af47 100644 --- a/src/mame/namco/namco_c148.cpp +++ b/src/mame/namco/namco_c148.cpp @@ -65,7 +65,7 @@ DEFINE_DEVICE_TYPE(NAMCO_C148, namco_c148_device, "namco_c148", "Namco C148 Inte // namco_c148_device - constructor //------------------------------------------------- -namco_c148_device::namco_c148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_c148_device::namco_c148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_C148, tag, owner, clock), m_out_ext1_cb(*this), m_out_ext2_cb(*this), diff --git a/src/mame/namco/namco_c148.h b/src/mame/namco/namco_c148.h index 0cd79c3e08e..de07b9a7e46 100644 --- a/src/mame/namco/namco_c148.h +++ b/src/mame/namco/namco_c148.h @@ -22,12 +22,12 @@ class namco_c148_device : public device_t public: // construction/destruction template - namco_c148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&hostcpu, bool is_master) + namco_c148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&hostcpu, bool is_master) : namco_c148_device(mconfig, tag, owner, clock) { set_hostcpu(std::forward(hostcpu), is_master); } - namco_c148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); diff --git a/src/mame/namco/namco_c169roz.cpp b/src/mame/namco/namco_c169roz.cpp index 4672121dbfd..48537610e0e 100644 --- a/src/mame/namco/namco_c169roz.cpp +++ b/src/mame/namco/namco_c169roz.cpp @@ -36,7 +36,7 @@ GFXDECODE_END DEFINE_DEVICE_TYPE(NAMCO_C169ROZ, namco_c169roz_device, "namco_c169roz", "Namco C169 (ROZ)") -namco_c169roz_device::namco_c169roz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +namco_c169roz_device::namco_c169roz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_C169ROZ, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), m_color_base(0), diff --git a/src/mame/namco/namco_c169roz.h b/src/mame/namco/namco_c169roz.h index 60786c0d159..848ffc040d5 100644 --- a/src/mame/namco/namco_c169roz.h +++ b/src/mame/namco/namco_c169roz.h @@ -13,7 +13,7 @@ class namco_c169roz_device : public device_t, public device_gfx_interface { public: // construction/destruction - namco_c169roz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + namco_c169roz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_is_namcofl(bool state) { m_is_namcofl = state; } void set_ram_words(uint32_t size) { m_ramsize = size; } diff --git a/src/mame/namco/namco_c45road.cpp b/src/mame/namco/namco_c45road.cpp index 91053377e36..1cb146b359e 100644 --- a/src/mame/namco/namco_c45road.cpp +++ b/src/mame/namco/namco_c45road.cpp @@ -77,7 +77,7 @@ void namco_c45_road_device::map(address_map &map) // namco_c45_road_device -- constructor //------------------------------------------------- -namco_c45_road_device::namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_c45_road_device::namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_C45_ROAD, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), device_memory_interface(mconfig, *this), diff --git a/src/mame/namco/namco_c45road.h b/src/mame/namco/namco_c45road.h index 04f7e6d0880..28cc51bf783 100644 --- a/src/mame/namco/namco_c45road.h +++ b/src/mame/namco/namco_c45road.h @@ -19,7 +19,7 @@ class namco_c45_road_device : public device_t, public device_gfx_interface, publ { public: // construction/destruction - namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); diff --git a/src/mame/namco/namco_c67.cpp b/src/mame/namco/namco_c67.cpp index 509fd21dc00..d69f3323b67 100644 --- a/src/mame/namco/namco_c67.cpp +++ b/src/mame/namco/namco_c67.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(NAMCO_C67, namco_c67_device, "namcoc67", "Namco C67 (TMS320C25)") -namco_c67_device::namco_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_c67_device::namco_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms32025_device(mconfig, NAMCO_C67, tag, owner, clock) { set_mp_mc(false); diff --git a/src/mame/namco/namco_c67.h b/src/mame/namco/namco_c67.h index 9aa54dac090..4789459eee1 100644 --- a/src/mame/namco/namco_c67.h +++ b/src/mame/namco/namco_c67.h @@ -11,7 +11,7 @@ class namco_c67_device : public tms32025_device { public: - namco_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/mame/namco/namco_settings.cpp b/src/mame/namco/namco_settings.cpp index 1df580b9574..e112df27b3c 100644 --- a/src/mame/namco/namco_settings.cpp +++ b/src/mame/namco/namco_settings.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(NAMCO_SETTINGS, namco_settings_device, "namco_settings", "Namco Settings") -namco_settings_device::namco_settings_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_settings_device::namco_settings_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_SETTINGS, tag, owner, clock) { } diff --git a/src/mame/namco/namco_settings.h b/src/mame/namco/namco_settings.h index fe5a7f1f0c1..2212919aa2a 100644 --- a/src/mame/namco/namco_settings.h +++ b/src/mame/namco/namco_settings.h @@ -10,7 +10,7 @@ class namco_settings_device : public device_t { public: - namco_settings_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_settings_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( clk_w ); diff --git a/src/mame/namco/namcofl.cpp b/src/mame/namco/namcofl.cpp index 031ca6f25fd..afccd106a2c 100644 --- a/src/mame/namco/namcofl.cpp +++ b/src/mame/namco/namcofl.cpp @@ -687,14 +687,14 @@ void namcofl_state::namcofl(machine_config &config) m_screen->screen_vblank().set(m_c355spr, FUNC(namco_c355spr_device::vblank)); m_screen->set_palette(m_c116); - NAMCO_C169ROZ(config, m_c169roz, 0); + NAMCO_C169ROZ(config, m_c169roz); m_c169roz->set_palette(m_c116); m_c169roz->set_is_namcofl(true); m_c169roz->set_ram_words(0x20000 / 2); m_c169roz->set_tile_callback(namco_c169roz_device::c169_tilemap_delegate(&namcofl_state::roz_cb, this)); m_c169roz->set_color_base(0x1800); - NAMCO_C355SPR(config, m_c355spr, 0); + NAMCO_C355SPR(config, m_c355spr); m_c355spr->set_screen(m_screen); m_c355spr->set_palette(m_c116); m_c355spr->set_scroll_offsets(0, 0); @@ -703,12 +703,12 @@ void namcofl_state::namcofl(machine_config &config) m_c355spr->set_color_base(0); m_c355spr->set_buffer(1); - NAMCO_C123TMAP(config, m_c123tmap, 0); + NAMCO_C123TMAP(config, m_c123tmap); m_c123tmap->set_palette(m_c116); m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namcofl_state::tilemap_cb, this)); m_c123tmap->set_color_base(0x1000); - NAMCO_C116(config, m_c116, 0); + NAMCO_C116(config, m_c116); m_c116->enable_shadows(); SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/namco/namcoio.cpp b/src/mame/namco/namcoio.cpp index a7efb5164ff..dd0b0d804f4 100644 --- a/src/mame/namco/namcoio.cpp +++ b/src/mame/namco/namcoio.cpp @@ -122,7 +122,7 @@ DEFINE_DEVICE_TYPE(NAMCO_56XX, namco56xx_device, "namco56", "Namco 56xx I/O") DEFINE_DEVICE_TYPE(NAMCO_58XX, namco58xx_device, "namco58", "Namco 58xx I/O") DEFINE_DEVICE_TYPE(NAMCO_59XX, namco59xx_device, "namco59", "Namco 59xx I/O") -namcoio_device::namcoio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int device_type) +namcoio_device::namcoio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int device_type) : device_t(mconfig, type, tag, owner, clock) , m_in_cb(*this) , m_out_cb(*this) @@ -130,17 +130,17 @@ namcoio_device::namcoio_device(const machine_config &mconfig, device_type type, { } -namco56xx_device::namco56xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco56xx_device::namco56xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namcoio_device(mconfig, NAMCO_56XX, tag, owner, clock, TYPE_NAMCO56XX) { } -namco58xx_device::namco58xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco58xx_device::namco58xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namcoio_device(mconfig, NAMCO_58XX, tag, owner, clock, TYPE_NAMCO58XX) { } -namco59xx_device::namco59xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco59xx_device::namco59xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namcoio_device(mconfig, NAMCO_59XX, tag, owner, clock, TYPE_NAMCO59XX) { } diff --git a/src/mame/namco/namcoio.h b/src/mame/namco/namcoio.h index f444e77f076..a590b887395 100644 --- a/src/mame/namco/namcoio.h +++ b/src/mame/namco/namcoio.h @@ -23,7 +23,7 @@ public: virtual void customio_run() = 0; protected: - namcoio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int device_type); + namcoio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int device_type); // device-level overrides virtual void device_start() override; @@ -58,7 +58,7 @@ private: class namco56xx_device : public namcoio_device { public: - namco56xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco56xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; @@ -68,7 +68,7 @@ public: class namco58xx_device : public namcoio_device { public: - namco58xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco58xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; @@ -78,7 +78,7 @@ public: class namco59xx_device : public namcoio_device { public: - namco59xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco59xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/mame/namco/namcoio_gearbox.cpp b/src/mame/namco/namcoio_gearbox.cpp index 995129dbb86..3c193b81a76 100644 --- a/src/mame/namco/namcoio_gearbox.cpp +++ b/src/mame/namco/namcoio_gearbox.cpp @@ -50,7 +50,7 @@ DEFINE_DEVICE_TYPE(NAMCOIO_GEARBOX, namcoio_gearbox_device, "namcoio_gearbox", " // namcoio_gearbox_device - constructor //------------------------------------------------- -namcoio_gearbox_device::namcoio_gearbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namcoio_gearbox_device::namcoio_gearbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCOIO_GEARBOX, tag, owner, clock) { } diff --git a/src/mame/namco/namcoio_gearbox.h b/src/mame/namco/namcoio_gearbox.h index f234a4fb160..04bfd500e28 100644 --- a/src/mame/namco/namcoio_gearbox.h +++ b/src/mame/namco/namcoio_gearbox.h @@ -21,7 +21,7 @@ class namcoio_gearbox_device : public device_t { public: // construction/destruction - namcoio_gearbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namcoio_gearbox_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations DECLARE_CUSTOM_INPUT_MEMBER( in_r ); diff --git a/src/mame/namco/namcomcu.cpp b/src/mame/namco/namcomcu.cpp index eb23789f6cb..60bc7737ee0 100644 --- a/src/mame/namco/namcomcu.cpp +++ b/src/mame/namco/namcomcu.cpp @@ -53,27 +53,27 @@ ROM_START( c76 ) ROM_END -namco_c69_device::namco_c69_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_c69_device::namco_c69_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37702m2_device(mconfig, NAMCO_C69, tag, owner, clock) { } -namco_c70_device::namco_c70_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_c70_device::namco_c70_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37702m2_device(mconfig, NAMCO_C70, tag, owner, clock) { } -namco_c74_device::namco_c74_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_c74_device::namco_c74_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37702m2_device(mconfig, NAMCO_C74, tag, owner, clock) { } -namco_c75_device::namco_c75_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_c75_device::namco_c75_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37702m2_device(mconfig, NAMCO_C75, tag, owner, clock) { } -namco_c76_device::namco_c76_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +namco_c76_device::namco_c76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37702m2_device(mconfig, NAMCO_C76, tag, owner, clock) { } diff --git a/src/mame/namco/namcomcu.h b/src/mame/namco/namcomcu.h index c7332e2faeb..c972be1f689 100644 --- a/src/mame/namco/namcomcu.h +++ b/src/mame/namco/namcomcu.h @@ -11,7 +11,7 @@ class namco_c69_device : public m37702m2_device { public: - namco_c69_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c69_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -20,7 +20,7 @@ protected: class namco_c70_device : public m37702m2_device { public: - namco_c70_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c70_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -29,7 +29,7 @@ protected: class namco_c74_device : public m37702m2_device { public: - namco_c74_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c74_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -38,7 +38,7 @@ protected: class namco_c75_device : public m37702m2_device { public: - namco_c75_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c75_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -47,7 +47,7 @@ protected: class namco_c76_device : public m37702m2_device { public: - namco_c76_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; }; diff --git a/src/mame/namco/namcona1.cpp b/src/mame/namco/namcona1.cpp index 3ba9d393def..f1efbd457ac 100644 --- a/src/mame/namco/namcona1.cpp +++ b/src/mame/namco/namcona1.cpp @@ -1067,7 +1067,7 @@ void namcona1_state::namcona_base(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - C219(config, m_c219, 44100); + C219(config, m_c219, XTAL::u(44100)); m_c219->set_addrmap(0, &namcona1_state::namcona1_c219_map); m_c219->add_route(0, "rspeaker", 1.00); m_c219->add_route(1, "lspeaker", 1.00); diff --git a/src/mame/namco/namcond1.cpp b/src/mame/namco/namcond1.cpp index f8720214d48..6f4494fdb83 100644 --- a/src/mame/namco/namcond1.cpp +++ b/src/mame/namco/namcond1.cpp @@ -509,7 +509,7 @@ void namcond1_state::namcond1(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); - YGV608(config, m_ygv608, 0); + YGV608(config, m_ygv608); m_ygv608->vblank_callback().set_inputline(m_maincpu, 1); m_ygv608->raster_callback().set_inputline(m_maincpu, 2); m_ygv608->set_screen("screen"); @@ -534,7 +534,7 @@ void namcond1_state::namcond1(machine_config &config) //c352.add_route(2, "lspeaker", 1.00); // Second DAC not present. //c352.add_route(3, "rspeaker", 1.00); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); } void namcond1_state::abcheck(machine_config &config) diff --git a/src/mame/namco/namcops2.cpp b/src/mame/namco/namcops2.cpp index 721b8d65e7d..fadddfc47bc 100644 --- a/src/mame/namco/namcops2.cpp +++ b/src/mame/namco/namcops2.cpp @@ -921,7 +921,7 @@ INPUT_PORTS_END void namcops2_state::system246(machine_config &config) { - R5000LE(config, m_maincpu, 294000000); // actually R5900 @ 294 MHz + R5000LE(config, m_maincpu, XTAL::u(294000000)); // actually R5900 @ 294 MHz m_maincpu->set_icache_size(16384); m_maincpu->set_dcache_size(16384); m_maincpu->set_addrmap(AS_PROGRAM, &namcops2_state::ps2_map); diff --git a/src/mame/namco/namcos1.cpp b/src/mame/namco/namcos1.cpp index f7c0f7bb3ef..e600f529604 100644 --- a/src/mame/namco/namcos1.cpp +++ b/src/mame/namco/namcos1.cpp @@ -1024,7 +1024,7 @@ void namcos1_state::ns1(machine_config &config) m_mcu->out_p1_cb().set(FUNC(namcos1_state::coin_w)); m_mcu->out_p2_cb().set(FUNC(namcos1_state::dac_gain_w)); - NAMCO_C117(config, m_c117, 0); + NAMCO_C117(config, m_c117); m_c117->set_addrmap(AS_PROGRAM, &namcos1_state::virtual_map); m_c117->set_cpu_tags("maincpu", "subcpu"); m_c117->subres_cb().set(FUNC(namcos1_state::subres_w)); @@ -1034,7 +1034,7 @@ void namcos1_state::ns1(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - LS157(config, m_dsw_sel, 0); // LS257 'A3' + LS157(config, m_dsw_sel); // LS257 'A3' /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -1045,10 +1045,10 @@ void namcos1_state::ns1(machine_config &config) GFXDECODE(config, m_gfxdecode, m_c116, gfx_namcos1); - NAMCO_C116(config, m_c116, 0); + NAMCO_C116(config, m_c116); m_c116->enable_shadows(); - NAMCO_C123TMAP(config, m_c123tmap, 0); + NAMCO_C123TMAP(config, m_c123tmap); m_c123tmap->set_palette(m_c116); m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namcos1_state::TilemapCB, this)); m_c123tmap->set_color_base(0x0800); @@ -1070,11 +1070,11 @@ void namcos1_state::ns1(machine_config &config) cus30.add_route(0, "lspeaker", 0.50); cus30.add_route(1, "rspeaker", 0.50); - DAC_8BIT_R2R(config, m_dac[0], 0); // 10-pin 1Kx8R SIP with HC374 latch + DAC_8BIT_R2R(config, m_dac[0]); // 10-pin 1Kx8R SIP with HC374 latch m_dac[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.5); m_dac[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.5); - DAC_8BIT_R2R(config, m_dac[1], 0); // 10-pin 1Kx8R SIP with HC374 latch + DAC_8BIT_R2R(config, m_dac[1]); // 10-pin 1Kx8R SIP with HC374 latch m_dac[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.5); m_dac[1]->add_route(ALL_OUTPUTS, "rspeaker", 0.5); } diff --git a/src/mame/namco/namcos10.cpp b/src/mame/namco/namcos10.cpp index 6986db45c96..75c1580e108 100644 --- a/src/mame/namco/namcos10.cpp +++ b/src/mame/namco/namcos10.cpp @@ -1008,56 +1008,56 @@ void namcos10_state::ns10_mrdrilr2(machine_config &config) { namcos10_memm(config); /* decrypter device (CPLD in hardware?) */ - MRDRILR2_DECRYPTER(config, "decrypter", 0); + MRDRILR2_DECRYPTER(config, "decrypter"); } void namcos10_state::ns10_chocovdr(machine_config &config) { namcos10_memn(config); /* decrypter device (CPLD in hardware?) */ - CHOCOVDR_DECRYPTER(config, "decrypter", 0); + CHOCOVDR_DECRYPTER(config, "decrypter"); } void namcos10_state::ns10_gamshara(machine_config &config) { namcos10_memn(config); /* decrypter device (CPLD in hardware?) */ - GAMSHARA_DECRYPTER(config, "decrypter", 0); + GAMSHARA_DECRYPTER(config, "decrypter"); } void namcos10_state::ns10_gjspace(machine_config &config) { namcos10_memn(config); /* decrypter device (CPLD in hardware?) */ - GJSPACE_DECRYPTER(config, "decrypter", 0); + GJSPACE_DECRYPTER(config, "decrypter"); } void namcos10_state::ns10_knpuzzle(machine_config &config) { namcos10_memn(config); /* decrypter device (CPLD in hardware?) */ - KNPUZZLE_DECRYPTER(config, "decrypter", 0); + KNPUZZLE_DECRYPTER(config, "decrypter"); } void namcos10_state::ns10_konotako(machine_config &config) { namcos10_memn(config); /* decrypter device (CPLD in hardware?) */ - KONOTAKO_DECRYPTER(config, "decrypter", 0); + KONOTAKO_DECRYPTER(config, "decrypter"); } void namcos10_state::ns10_nflclsfb(machine_config &config) { namcos10_memn(config); /* decrypter device (CPLD in hardware?) */ - NFLCLSFB_DECRYPTER(config, "decrypter", 0); + NFLCLSFB_DECRYPTER(config, "decrypter"); } void namcos10_state::ns10_startrgn(machine_config &config) { namcos10_memn(config); /* decrypter device (CPLD in hardware?) */ - STARTRGN_DECRYPTER(config, "decrypter", 0); + STARTRGN_DECRYPTER(config, "decrypter"); } static INPUT_PORTS_START( namcos10 ) diff --git a/src/mame/namco/namcos11.cpp b/src/mame/namco/namcos11.cpp index efe3af41903..197c326bd32 100644 --- a/src/mame/namco/namcos11.cpp +++ b/src/mame/namco/namcos11.cpp @@ -613,7 +613,7 @@ void namcos11_state::coh110(machine_config &config) m_maincpu->subdevice("ram")->set_default_size("4M"); /* basic machine hardware */ - NAMCO_C76(config, m_mcu, 16934400); + NAMCO_C76(config, m_mcu, XTAL::u(16934400)); m_mcu->set_addrmap(AS_PROGRAM, &namcos11_state::c76_map); m_mcu->an0_cb().set_ioport("ADC0"); m_mcu->an1_cb().set_ioport("ADC1"); @@ -641,7 +641,7 @@ void namcos11_state::coh110(machine_config &config) //c352.add_route(2, "lspeaker", 1.00); // Second DAC not present. //c352.add_route(3, "rspeaker", 1.00); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); } void namcos11_state::coh100(machine_config &config) @@ -659,83 +659,83 @@ void namcos11_state::tekken(machine_config &config) coh100(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); // TODO: either allow optional devices in memory maps, add another memory map without keycus or add a dummy keycus for tekken - KEYCUS_C406(config, "keycus", 0); + KEYCUS_C406(config, "keycus"); } void namcos11_state::tekken2o(machine_config &config) { coh100(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C406(config, "keycus", 0); + KEYCUS_C406(config, "keycus"); } void namcos11_state::tekken2(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C406(config, "keycus", 0); + KEYCUS_C406(config, "keycus"); } void namcos11_state::souledge(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C409(config, "keycus", 0); + KEYCUS_C409(config, "keycus"); } void namcos11_state::dunkmnia(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C410(config, "keycus", 0); + KEYCUS_C410(config, "keycus"); } void namcos11_state::primglex(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C411(config, "keycus", 0); + KEYCUS_C411(config, "keycus"); } void namcos11_state::xevi3dg(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C430(config, "keycus", 0); + KEYCUS_C430(config, "keycus"); } void namcos11_state::danceyes(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C431(config, "keycus", 0); + KEYCUS_C431(config, "keycus"); } void namcos11_state::pocketrc(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_map); - KEYCUS_C432(config, "keycus", 0); + KEYCUS_C432(config, "keycus"); } void namcos11_state::starswep(machine_config &config) { coh110(config); - KEYCUS_C442(config, "keycus", 0); + KEYCUS_C442(config, "keycus"); } void namcos11_state::myangel3(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::rom8_64_map); - KEYCUS_C443(config, "keycus", 0); + KEYCUS_C443(config, "keycus"); } void namcos11_state::ptblank2ua(machine_config &config) { coh110(config); m_maincpu->set_addrmap(AS_PROGRAM, &namcos11_state::ptblank2ua_map); - KEYCUS_C443(config, "keycus", 0); + KEYCUS_C443(config, "keycus"); } static INPUT_PORTS_START( namcos11 ) diff --git a/src/mame/namco/namcos12.cpp b/src/mame/namco/namcos12.cpp index a3e798b9721..475b4032553 100644 --- a/src/mame/namco/namcos12.cpp +++ b/src/mame/namco/namcos12.cpp @@ -1746,11 +1746,11 @@ void namcos12_state::init_golgo13() void namcos12_state::namcos12_mobo(machine_config &config) { /* basic machine hardware */ - H83002(config, m_sub, 16934400); // frequency based on research (superctr) + H83002(config, m_sub, XTAL::u(16934400)); // frequency based on research (superctr) m_sub->set_addrmap(AS_PROGRAM, &namcos12_state::s12h8rwmap); m_sub->set_addrmap(AS_IO, &namcos12_state::s12h8iomap); - NAMCO_SETTINGS(config, m_settings, 0); + NAMCO_SETTINGS(config, m_settings); RTC4543(config, m_rtc, XTAL(32'768)); m_rtc->data_cb().set("sub:sci1", FUNC(h8_sci_device::rx_w)); @@ -1761,7 +1761,7 @@ void namcos12_state::namcos12_mobo(machine_config &config) sub_sci1.clk_handler().set(m_rtc, FUNC(rtc4543_device::clk_w)).invert(); sub_sci1.clk_handler().append(m_settings, FUNC(namco_settings_device::clk_w)); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/namco/namcos2.cpp b/src/mame/namco/namcos2.cpp index 0e9b3323752..36c89d6d173 100644 --- a/src/mame/namco/namcos2.cpp +++ b/src/mame/namco/namcos2.cpp @@ -1710,7 +1710,7 @@ void namcos2_state::configure_common_standard(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - NAMCO_C139(config, m_sci, 0); + NAMCO_C139(config, m_sci); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8); @@ -1792,14 +1792,14 @@ void namcos2_state::configure_c45road_standard(machine_config &config) void namcos2_state::configure_namcos2_sprite_standard(machine_config &config) { - NAMCOS2_SPRITE(config, m_ns2sprite, 0); + NAMCOS2_SPRITE(config, m_ns2sprite); m_ns2sprite->set_gfxdecode_tag("gfxdecode"); m_ns2sprite->set_spriteram_tag("spriteram"); } void namcos2_state::configure_namcos2_roz_standard(machine_config &config) { - NAMCOS2_ROZ(config, m_ns2roz, 0); + NAMCOS2_ROZ(config, m_ns2roz); m_ns2roz->set_palette(m_c116); m_ns2roz->set_rozram_tag("rozram"); m_ns2roz->set_rozctrl_tag("rozctrl"); @@ -2064,7 +2064,7 @@ void namcos2_state::metlhawk(machine_config &config) GFXDECODE(config, m_gfxdecode, m_c116, gfx_metlhawk); - NAMCOS2_SPRITE_METALHAWK(config, m_ns2sprite, 0); + NAMCOS2_SPRITE_METALHAWK(config, m_ns2sprite); m_ns2sprite->set_gfxdecode_tag("gfxdecode"); m_ns2sprite->set_spriteram_tag("spriteram"); diff --git a/src/mame/namco/namcos21.cpp b/src/mame/namco/namcos21.cpp index fca06602484..65169b20850 100644 --- a/src/mame/namco/namcos21.cpp +++ b/src/mame/namco/namcos21.cpp @@ -630,7 +630,7 @@ void namcos21_state::c140_map(address_map &map) void namcos21_state::configure_c65_namcos21(machine_config &config) { - NAMCOC65(config, m_c65, 2048000); + NAMCOC65(config, m_c65, XTAL::u(2048000)); m_c65->in_pb_callback().set_ioport("MCUB"); m_c65->in_pc_callback().set_ioport("MCUC"); m_c65->in_ph_callback().set_ioport("MCUH"); @@ -895,7 +895,7 @@ void namcos21_state::winrun(machine_config &config) configure_c65_namcos21(config); - NAMCOS21_DSP(config, m_namcos21_dsp, 0); + NAMCOS21_DSP(config, m_namcos21_dsp); m_namcos21_dsp->set_renderer_tag("namcos21_3d"); m68000_device &gpu(M68000(config, "gpu", 49.152_MHz_XTAL / 4)); /* graphics coprocessor */ @@ -903,7 +903,7 @@ void namcos21_state::winrun(machine_config &config) configure_c148_standard(config); NAMCO_C148(config, m_gpu_intc, 0, "gpu", false); - NAMCO_C139(config, m_sci, 0); + NAMCO_C139(config, m_sci); config.set_maximum_quantum(attotime::from_hz(6000)); /* 100 CPU slices per frame */ @@ -917,7 +917,7 @@ void namcos21_state::winrun(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBRG_888, 0x10000/2); - NAMCOS21_3D(config, m_namcos21_3d, 0); + NAMCOS21_3D(config, m_namcos21_3d); m_namcos21_3d->set_fixed_palbase(0x4000); m_namcos21_3d->set_zz_shift_mult(10, 0x100); m_namcos21_3d->set_depth_reverse(true); diff --git a/src/mame/namco/namcos21_3d.cpp b/src/mame/namco/namcos21_3d.cpp index 7e0d17dcc94..23fe7280f14 100644 --- a/src/mame/namco/namcos21_3d.cpp +++ b/src/mame/namco/namcos21_3d.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(NAMCOS21_3D, namcos21_3d_device, "namcos21_3d", "Namco System 21 3D Rasterizer") -namcos21_3d_device::namcos21_3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namcos21_3d_device::namcos21_3d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCOS21_3D, tag, owner, clock), m_fixed_palbase(-1), m_zz_shift(10), diff --git a/src/mame/namco/namcos21_3d.h b/src/mame/namco/namcos21_3d.h index 2973e0a6df2..2a98c5cd272 100644 --- a/src/mame/namco/namcos21_3d.h +++ b/src/mame/namco/namcos21_3d.h @@ -8,7 +8,7 @@ class namcos21_3d_device : public device_t { public: - namcos21_3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namcos21_3d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // config void set_fixed_palbase(int base) { m_fixed_palbase = base; } diff --git a/src/mame/namco/namcos21_c67.cpp b/src/mame/namco/namcos21_c67.cpp index 0cd87c0611d..589055c14a0 100644 --- a/src/mame/namco/namcos21_c67.cpp +++ b/src/mame/namco/namcos21_c67.cpp @@ -510,7 +510,7 @@ void namcos21_c67_state::c140_map(address_map &map) void namcos21_c67_state::configure_c68_namcos21(machine_config &config) { - NAMCOC68(config, m_c68, 8000000); + NAMCOC68(config, m_c68, XTAL::u(8000000)); m_c68->in_pb_callback().set_ioport("MCUB"); m_c68->in_pc_callback().set_ioport("MCUC"); m_c68->in_ph_callback().set_ioport("MCUH"); @@ -805,7 +805,7 @@ void namcos21_c67_state::namcos21(machine_config &config) configure_c68_namcos21(config); - NAMCOS21_DSP_C67(config, m_namcos21_dsp_c67, 0); + NAMCOS21_DSP_C67(config, m_namcos21_dsp_c67); m_namcos21_dsp_c67->set_renderer_tag("namcos21_3d"); config.set_maximum_quantum(attotime::from_hz(12000)); @@ -818,17 +818,17 @@ void namcos21_c67_state::namcos21(machine_config &config) m_screen->set_screen_update(FUNC(namcos21_c67_state::screen_update)); m_screen->set_palette(m_palette); - NAMCOS21_3D(config, m_namcos21_3d, 0); + NAMCOS21_3D(config, m_namcos21_3d); m_namcos21_3d->set_zz_shift_mult(11, 0x200); m_namcos21_3d->set_depth_reverse(false); m_namcos21_3d->set_framebuffer_size(496,480); configure_c148_standard(config); - NAMCO_C139(config, m_sci, 0); + NAMCO_C139(config, m_sci); PALETTE(config, m_palette).set_format(palette_device::xBRG_888, 0x10000/2); - NAMCO_C355SPR(config, m_c355spr, 0); + NAMCO_C355SPR(config, m_c355spr); m_c355spr->set_screen(m_screen); m_c355spr->set_palette(m_palette); m_c355spr->set_scroll_offsets(0x26, 0x19); diff --git a/src/mame/namco/namcos21_de.cpp b/src/mame/namco/namcos21_de.cpp index 1df18f70736..bd20ad053c4 100644 --- a/src/mame/namco/namcos21_de.cpp +++ b/src/mame/namco/namcos21_de.cpp @@ -58,7 +58,7 @@ class namco_de_pcbstack_device : public device_t { public: // construction/destruction - namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void configure_c148_standard(machine_config &config); @@ -128,7 +128,7 @@ private: DEFINE_DEVICE_TYPE(NAMCO_DE_PCB, namco_de_pcbstack_device, "namco_de_pcb", "Namco Driver's Eyes PCB stack") -namco_de_pcbstack_device::namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namco_de_pcbstack_device::namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCO_DE_PCB, tag, owner, clock), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), @@ -162,13 +162,13 @@ void namco_de_pcbstack_device::device_add_mconfig(machine_config &config) M68000(config, m_slave, 49.152_MHz_XTAL / 4); /* Slave */ m_slave->set_addrmap(AS_PROGRAM, &namco_de_pcbstack_device::driveyes_slave_map); - MC6809E(config, m_audiocpu, 3072000); /* Sound */ + MC6809E(config, m_audiocpu, XTAL::u(3072000)); /* Sound */ m_audiocpu->set_addrmap(AS_PROGRAM, &namco_de_pcbstack_device::sound_map); m_audiocpu->set_periodic_int(FUNC(namco_de_pcbstack_device::irq0_line_hold), attotime::from_hz(2*60)); configure_c68_namcos21(config); - NAMCOS21_DSP(config, m_namcos21_dsp, 0); + NAMCOS21_DSP(config, m_namcos21_dsp); m_namcos21_dsp->set_renderer_tag("namcos21_3d"); config.set_maximum_quantum(attotime::from_hz(6000)); /* 100 CPU slices per frame */ @@ -176,7 +176,7 @@ void namco_de_pcbstack_device::device_add_mconfig(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); configure_c148_standard(config); - NAMCO_C139(config, m_sci, 0); + NAMCO_C139(config, m_sci); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // TODO: basic parameters to get 60.606060 Hz, x2 is for interlace @@ -186,13 +186,13 @@ void namco_de_pcbstack_device::device_add_mconfig(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBRG_888, 0x10000/2); - NAMCOS21_3D(config, m_namcos21_3d, 0); + NAMCOS21_3D(config, m_namcos21_3d); m_namcos21_3d->set_fixed_palbase(0x3f00); m_namcos21_3d->set_zz_shift_mult(10, 0x100); m_namcos21_3d->set_depth_reverse(false); m_namcos21_3d->set_framebuffer_size(496,480); - NAMCO_C355SPR(config, m_c355spr, 0); + NAMCO_C355SPR(config, m_c355spr); m_c355spr->set_screen(m_screen); m_c355spr->set_palette(m_palette); m_c355spr->set_scroll_offsets(0x26, 0x19); @@ -318,7 +318,7 @@ void namco_de_pcbstack_device::c140_map(address_map &map) void namco_de_pcbstack_device::configure_c68_namcos21(machine_config &config) { - NAMCOC68(config, m_c68, 8000000); + NAMCOC68(config, m_c68, XTAL::u(8000000)); m_c68->in_pb_callback().set_ioport("MCUB"); m_c68->in_pc_callback().set_ioport("MCUC"); m_c68->in_ph_callback().set_ioport("MCUH"); @@ -495,11 +495,11 @@ private: // driveyes only void namcos21_de_state::driveyes(machine_config &config) { - NAMCO_DE_PCB(config, m_pcb[0], 0); - NAMCO_DE_PCB(config, m_pcb[1], 0); - NAMCO_DE_PCB(config, m_pcb[2], 0); + NAMCO_DE_PCB(config, m_pcb[0]); + NAMCO_DE_PCB(config, m_pcb[1]); + NAMCO_DE_PCB(config, m_pcb[2]); - NAMCOIO_GEARBOX(config, m_io_gearbox, 0); + NAMCOIO_GEARBOX(config, m_io_gearbox); } // stacks with the DSWs set to left or right screen will show 'receive error' because they want comms from the main screen diff --git a/src/mame/namco/namcos21_dsp.cpp b/src/mame/namco/namcos21_dsp.cpp index 49ee6e38777..49cdb597da7 100644 --- a/src/mame/namco/namcos21_dsp.cpp +++ b/src/mame/namco/namcos21_dsp.cpp @@ -16,7 +16,7 @@ TODO: handle protection properly and with callbacks DEFINE_DEVICE_TYPE(NAMCOS21_DSP, namcos21_dsp_device, "namcos21_dsp_device", "Namco System 21 DSP Setup (1x TMS320C25 type)") -namcos21_dsp_device::namcos21_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namcos21_dsp_device::namcos21_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCOS21_DSP, tag, owner, clock), m_dsp(*this, "dsp"), m_winrun_dspbios(*this,"winrun_dspbios"), diff --git a/src/mame/namco/namcos21_dsp.h b/src/mame/namco/namcos21_dsp.h index fb01c650277..69a2deed9ee 100644 --- a/src/mame/namco/namcos21_dsp.h +++ b/src/mame/namco/namcos21_dsp.h @@ -15,7 +15,7 @@ class namcos21_dsp_device : public device_t { public: - namcos21_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namcos21_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // config template void set_renderer_tag(T &&tag) { m_renderer.set_tag(std::forward(tag)); } diff --git a/src/mame/namco/namcos21_dsp_c67.cpp b/src/mame/namco/namcos21_dsp_c67.cpp index cf540ebce60..3ed7164d955 100644 --- a/src/mame/namco/namcos21_dsp_c67.cpp +++ b/src/mame/namco/namcos21_dsp_c67.cpp @@ -19,7 +19,7 @@ TODO: handle protection properly and with callbacks DEFINE_DEVICE_TYPE(NAMCOS21_DSP_C67, namcos21_dsp_c67_device, "namcos21_dsp_c67_device", "Namco System 21 DSP Setup (5x C67 type)") -namcos21_dsp_c67_device::namcos21_dsp_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +namcos21_dsp_c67_device::namcos21_dsp_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCOS21_DSP_C67, tag, owner, clock), m_renderer(*this, finder_base::DUMMY_TAG), m_c67master(*this, "dspmaster"), @@ -126,7 +126,7 @@ void namcos21_dsp_c67_device::reset_kickstart() void namcos21_dsp_c67_device::device_add_mconfig(machine_config &config) { - namco_c67_device& dspmaster(NAMCO_C67(config, m_c67master, 24000000)); /* 24 MHz? overclocked */ + namco_c67_device& dspmaster(NAMCO_C67(config, m_c67master, XTAL::u(24000000))); /* 24 MHz? overclocked */ dspmaster.set_addrmap(AS_PROGRAM, &namcos21_dsp_c67_device::master_dsp_program); dspmaster.set_addrmap(AS_DATA, &namcos21_dsp_c67_device::master_dsp_data); dspmaster.set_addrmap(AS_IO, &namcos21_dsp_c67_device::master_dsp_io); @@ -136,7 +136,7 @@ void namcos21_dsp_c67_device::device_add_mconfig(machine_config &config) for (int i = 0; i < 4; i++) { - namco_c67_device& dspslave(NAMCO_C67(config, m_c67slave[i], 24000000)); /* 24 MHz? overclocked */ + namco_c67_device& dspslave(NAMCO_C67(config, m_c67slave[i], XTAL::u(24000000))); /* 24 MHz? overclocked */ dspslave.set_addrmap(AS_PROGRAM, &namcos21_dsp_c67_device::slave_dsp_program); dspslave.set_addrmap(AS_DATA, &namcos21_dsp_c67_device::slave_dsp_data); dspslave.set_addrmap(AS_IO, &namcos21_dsp_c67_device::slave_dsp_io); diff --git a/src/mame/namco/namcos21_dsp_c67.h b/src/mame/namco/namcos21_dsp_c67.h index bbacaa4f337..0245a3a4e73 100644 --- a/src/mame/namco/namcos21_dsp_c67.h +++ b/src/mame/namco/namcos21_dsp_c67.h @@ -27,7 +27,7 @@ public: NAMCOS21_SOLVALOU, }; - namcos21_dsp_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namcos21_dsp_c67_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // config template void set_renderer_tag(T &&tag) { m_renderer.set_tag(std::forward(tag)); } diff --git a/src/mame/namco/namcos23.cpp b/src/mame/namco/namcos23.cpp index 17ff8eb79da..c27263403a5 100644 --- a/src/mame/namco/namcos23.cpp +++ b/src/mame/namco/namcos23.cpp @@ -3716,7 +3716,7 @@ void namcos23_state::gorgon(machine_config &config) config.set_maximum_quantum(attotime::from_hz(2*115200)); - NAMCO_SETTINGS(config, m_settings, 0); + NAMCO_SETTINGS(config, m_settings); RTC4543(config, m_rtc, XTAL(32'768)); m_rtc->data_cb().set("subcpu:sci1", FUNC(h8_sci_device::rx_w)); @@ -3778,7 +3778,7 @@ void namcos23_state::s23(machine_config &config) config.set_maximum_quantum(attotime::from_hz(2*115200)); - NAMCO_SETTINGS(config, m_settings, 0); + NAMCO_SETTINGS(config, m_settings); RTC4543(config, m_rtc, XTAL(32'768)); m_rtc->data_cb().set("subcpu:sci1", FUNC(h8_sci_device::rx_w)); diff --git a/src/mame/namco/namcos2_roz.cpp b/src/mame/namco/namcos2_roz.cpp index 88ba624009f..ab914131432 100644 --- a/src/mame/namco/namcos2_roz.cpp +++ b/src/mame/namco/namcos2_roz.cpp @@ -34,7 +34,7 @@ GFXDECODE_END DEFINE_DEVICE_TYPE(NAMCOS2_ROZ, namcos2_roz_device, "namcos2_roz", "Namco System 2 ROZ (C102)") -namcos2_roz_device::namcos2_roz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +namcos2_roz_device::namcos2_roz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NAMCOS2_ROZ, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), m_rozram(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/namco/namcos2_roz.h b/src/mame/namco/namcos2_roz.h index d08225ad4f4..251727a0119 100644 --- a/src/mame/namco/namcos2_roz.h +++ b/src/mame/namco/namcos2_roz.h @@ -14,7 +14,7 @@ class namcos2_roz_device : public device_t, public device_gfx_interface { public: // construction/destruction - namcos2_roz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namcos2_roz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_rozram_tag(T &&tag) { m_rozram.set_tag(std::forward(tag)); } template void set_rozctrl_tag(T &&tag) { m_roz_ctrl.set_tag(std::forward(tag)); } diff --git a/src/mame/namco/namcos2_sprite.cpp b/src/mame/namco/namcos2_sprite.cpp index d1a475eb940..50be4e93bd8 100644 --- a/src/mame/namco/namcos2_sprite.cpp +++ b/src/mame/namco/namcos2_sprite.cpp @@ -29,12 +29,12 @@ DEFINE_DEVICE_TYPE(NAMCOS2_SPRITE, namcos2_sprite_device, "namcos2_sprite", "Nam DEFINE_DEVICE_TYPE(NAMCOS2_SPRITE_FINALLAP, namcos2_sprite_finallap_device, "namcos2_sprite_finallap", "Namco System 2 Sprites (C106,C134,C135,C146) (Final Lap)") DEFINE_DEVICE_TYPE(NAMCOS2_SPRITE_METALHAWK, namcos2_sprite_metalhawk_device, "namcos2_sprite_metalhawk", "Namco System 2 Sprites (C106,C134,C135,C146) (Metal Hawk)") -namcos2_sprite_device::namcos2_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +namcos2_sprite_device::namcos2_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namcos2_sprite_device(mconfig, NAMCOS2_SPRITE, tag, owner, clock) { } -namcos2_sprite_device::namcos2_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +namcos2_sprite_device::namcos2_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_gfxdecode(*this, finder_base::DUMMY_TAG), m_spriteram(*this, finder_base::DUMMY_TAG) @@ -42,12 +42,12 @@ namcos2_sprite_device::namcos2_sprite_device(const machine_config &mconfig, devi } -namcos2_sprite_metalhawk_device::namcos2_sprite_metalhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +namcos2_sprite_metalhawk_device::namcos2_sprite_metalhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namcos2_sprite_device(mconfig, NAMCOS2_SPRITE_METALHAWK, tag, owner, clock) { } -namcos2_sprite_finallap_device::namcos2_sprite_finallap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +namcos2_sprite_finallap_device::namcos2_sprite_finallap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namcos2_sprite_device(mconfig, NAMCOS2_SPRITE_FINALLAP, tag, owner, clock) { } diff --git a/src/mame/namco/namcos2_sprite.h b/src/mame/namco/namcos2_sprite.h index 4b9e4a03040..4e4c52ab3e6 100644 --- a/src/mame/namco/namcos2_sprite.h +++ b/src/mame/namco/namcos2_sprite.h @@ -13,7 +13,7 @@ class namcos2_sprite_device : public device_t { public: // construction/destruction - namcos2_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namcos2_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } template void set_spriteram_tag(T &&tag) { m_spriteram.set_tag(std::forward(tag)); } @@ -21,7 +21,7 @@ public: virtual void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int control ); protected: - namcos2_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + namcos2_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -41,7 +41,7 @@ class namcos2_sprite_finallap_device : public namcos2_sprite_device { public: // construction/destruction - namcos2_sprite_finallap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namcos2_sprite_finallap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void get_tilenum_and_size(const u16 word0, const u16 word1, u32& sprn, bool& is_32) override; @@ -52,7 +52,7 @@ class namcos2_sprite_metalhawk_device : public namcos2_sprite_device { public: // construction/destruction - namcos2_sprite_metalhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namcos2_sprite_metalhawk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int control ) override; }; diff --git a/src/mame/namco/namcos86.cpp b/src/mame/namco/namcos86.cpp index 2f057f23422..1fbde950e4e 100644 --- a/src/mame/namco/namcos86.cpp +++ b/src/mame/namco/namcos86.cpp @@ -1071,7 +1071,7 @@ void namcos86_state::hopmappy(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2151(config, "ymsnd", 3579580).add_route(0, "mono", 0.0).add_route(1, "mono", 0.60); /* only right channel is connected */ + YM2151(config, "ymsnd", XTAL::u(3579580)).add_route(0, "mono", 0.0).add_route(1, "mono", 0.60); /* only right channel is connected */ NAMCO_CUS30(config, m_cus30, XTAL(49'152'000)/2048); m_cus30->set_voices(8); @@ -1096,7 +1096,7 @@ void namcos86_state::genpeitd(machine_config &config) m_mcu->set_addrmap(AS_PROGRAM, &namcos86_state::genpeitd_mcu_map); /* sound hardware */ - NAMCO_63701X(config, m_63701x, 6000000); + NAMCO_63701X(config, m_63701x, XTAL::u(6000000)); m_63701x->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1109,7 +1109,7 @@ void namcos86_state::rthunder(machine_config &config) m_mcu->set_addrmap(AS_PROGRAM, &namcos86_state::rthunder_mcu_map); /* sound hardware */ - NAMCO_63701X(config, m_63701x, 6000000); + NAMCO_63701X(config, m_63701x, XTAL::u(6000000)); m_63701x->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1122,7 +1122,7 @@ void namcos86_state::wndrmomo(machine_config &config) m_mcu->set_addrmap(AS_PROGRAM, &namcos86_state::wndrmomo_mcu_map); /* sound hardware */ - NAMCO_63701X(config, m_63701x, 6000000); + NAMCO_63701X(config, m_63701x, XTAL::u(6000000)); m_63701x->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/namco/ns10crypt.cpp b/src/mame/namco/ns10crypt.cpp index b542476eaf2..6890fda920b 100644 --- a/src/mame/namco/ns10crypt.cpp +++ b/src/mame/namco/ns10crypt.cpp @@ -129,7 +129,7 @@ DEFINE_DEVICE_TYPE(STARTRGN_DECRYPTER, startrgn_decrypter_device, "startrgn_decr // base class -ns10_decrypter_device::ns10_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ns10_decrypter_device::ns10_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { m_active = false; @@ -163,7 +163,7 @@ constexpr int U {UNKNOWN}; // this could perfectly be part of the per-game logic but, with only one known type-1 game, we cannot say anything definitive const int ns10_type1_decrypter_device::initSbox[16] {U,U,U,0,4,9,U,U,U,8,U,1,U,9,U,5}; -ns10_type1_decrypter_device::ns10_type1_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ns10_type1_decrypter_device::ns10_type1_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ns10_decrypter_device(mconfig, type, tag, owner, clock) { } @@ -213,7 +213,7 @@ void ns10_type1_decrypter_device::device_start() // this could perfectly be part of the per-game logic; by now, only gamshara seems to use it, so we keep it global const int ns10_type2_decrypter_device::initSbox[16] {0,12,13,6,2,4,9,8,11,1,7,15,10,5,14,3}; -ns10_type2_decrypter_device::ns10_type2_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const ns10_type2_decrypter_device::ns10_crypto_logic &logic) +ns10_type2_decrypter_device::ns10_type2_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const ns10_type2_decrypter_device::ns10_crypto_logic &logic) : ns10_decrypter_device(mconfig, type, tag, owner, clock) , m_logic(logic) { @@ -454,42 +454,42 @@ const ns10_type2_decrypter_device::ns10_crypto_logic startrgn_decrypter_device:: // game-specific devices -mrdrilr2_decrypter_device::mrdrilr2_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mrdrilr2_decrypter_device::mrdrilr2_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type1_decrypter_device(mconfig, MRDRILR2_DECRYPTER, tag, owner, clock) { } -chocovdr_decrypter_device::chocovdr_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +chocovdr_decrypter_device::chocovdr_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type2_decrypter_device(mconfig, CHOCOVDR_DECRYPTER, tag, owner, clock, crypto_logic) { } -gamshara_decrypter_device::gamshara_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gamshara_decrypter_device::gamshara_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type2_decrypter_device(mconfig, GAMSHARA_DECRYPTER, tag, owner, clock, crypto_logic) { } -gjspace_decrypter_device::gjspace_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gjspace_decrypter_device::gjspace_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type2_decrypter_device(mconfig, GJSPACE_DECRYPTER, tag, owner, clock, crypto_logic) { } -knpuzzle_decrypter_device::knpuzzle_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +knpuzzle_decrypter_device::knpuzzle_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type2_decrypter_device(mconfig, KNPUZZLE_DECRYPTER, tag, owner, clock, crypto_logic) { } -konotako_decrypter_device::konotako_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +konotako_decrypter_device::konotako_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type2_decrypter_device(mconfig, KONOTAKO_DECRYPTER, tag, owner, clock, crypto_logic) { } -nflclsfb_decrypter_device::nflclsfb_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nflclsfb_decrypter_device::nflclsfb_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type2_decrypter_device(mconfig, NFLCLSFB_DECRYPTER, tag, owner, clock, crypto_logic) { } -startrgn_decrypter_device::startrgn_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +startrgn_decrypter_device::startrgn_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns10_type2_decrypter_device(mconfig, STARTRGN_DECRYPTER, tag, owner, clock, crypto_logic) { } diff --git a/src/mame/namco/ns10crypt.h b/src/mame/namco/ns10crypt.h index 56e12062d2d..c6fe3eb8446 100644 --- a/src/mame/namco/ns10crypt.h +++ b/src/mame/namco/ns10crypt.h @@ -17,7 +17,7 @@ public: virtual ~ns10_decrypter_device(); protected: - ns10_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ns10_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void init(int iv)=0; virtual void device_start()override=0; @@ -33,7 +33,7 @@ public: uint16_t decrypt(uint16_t cipherword)override; protected: - ns10_type1_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ns10_type1_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: uint16_t m_mask = 0; @@ -70,7 +70,7 @@ protected: uint16_t(*nonlinear_calculation)(uint64_t, uint64_t, const gf2_reducer&); // preliminary encoding; need research }; - ns10_type2_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const ns10_crypto_logic &logic); + ns10_type2_decrypter_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const ns10_crypto_logic &logic); private: uint16_t m_mask = 0; @@ -91,13 +91,13 @@ private: class mrdrilr2_decrypter_device : public ns10_type1_decrypter_device { public: - mrdrilr2_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mrdrilr2_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class chocovdr_decrypter_device : public ns10_type2_decrypter_device { public: - chocovdr_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + chocovdr_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint16_t nonlinear_calc(uint64_t previous_cipherwords, uint64_t previous_plainwords, const gf2_reducer &reducer); static const ns10_crypto_logic crypto_logic; @@ -106,7 +106,7 @@ private: class gamshara_decrypter_device : public ns10_type2_decrypter_device { public: - gamshara_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gamshara_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint16_t nonlinear_calc(uint64_t previous_cipherwords, uint64_t previous_plainwords, const gf2_reducer &reducer); static const ns10_crypto_logic crypto_logic; @@ -115,7 +115,7 @@ private: class gjspace_decrypter_device : public ns10_type2_decrypter_device { public: - gjspace_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gjspace_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint16_t nonlinear_calc(uint64_t previous_cipherwords, uint64_t previous_plainwords, const gf2_reducer &reducer); static const ns10_crypto_logic crypto_logic; @@ -124,7 +124,7 @@ private: class knpuzzle_decrypter_device : public ns10_type2_decrypter_device { public: - knpuzzle_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + knpuzzle_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint16_t nonlinear_calc(uint64_t previous_cipherwords, uint64_t previous_plainwords, const gf2_reducer &reducer); static const ns10_crypto_logic crypto_logic; @@ -133,7 +133,7 @@ private: class konotako_decrypter_device : public ns10_type2_decrypter_device { public: - konotako_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + konotako_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint16_t nonlinear_calc(uint64_t previous_cipherwords, uint64_t previous_plainwords, const gf2_reducer &reducer); static const ns10_crypto_logic crypto_logic; @@ -142,7 +142,7 @@ private: class nflclsfb_decrypter_device : public ns10_type2_decrypter_device { public: - nflclsfb_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nflclsfb_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint16_t nonlinear_calc(uint64_t previous_cipherwords, uint64_t previous_plainwords, const gf2_reducer &reducer); static const ns10_crypto_logic crypto_logic; @@ -151,7 +151,7 @@ private: class startrgn_decrypter_device : public ns10_type2_decrypter_device { public: - startrgn_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + startrgn_decrypter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static uint16_t nonlinear_calc(uint64_t previous_cipherwords, uint64_t previous_plainwords, const gf2_reducer &reducer); static const ns10_crypto_logic crypto_logic; diff --git a/src/mame/namco/ns11prot.cpp b/src/mame/namco/ns11prot.cpp index b39e0dd98ee..2faf7e6e160 100644 --- a/src/mame/namco/ns11prot.cpp +++ b/src/mame/namco/ns11prot.cpp @@ -9,7 +9,7 @@ #include "emu.h" #include "ns11prot.h" -ns11_keycus_device::ns11_keycus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ns11_keycus_device::ns11_keycus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { } @@ -30,7 +30,7 @@ void ns11_keycus_device::device_reset() /* tekken 2 */ -keycus_c406_device::keycus_c406_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c406_device::keycus_c406_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C406, tag, owner, clock) { } @@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C406, keycus_c406_device, "keycus_c406", "Namco C406 K /* soul edge */ -keycus_c409_device::keycus_c409_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c409_device::keycus_c409_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C409, tag, owner, clock) { } @@ -115,7 +115,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C409, keycus_c409_device, "keycus_c409", "Namco C409 K /* dunk mania */ -keycus_c410_device::keycus_c410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c410_device::keycus_c410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C410, tag, owner, clock) { } @@ -169,7 +169,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C410, keycus_c410_device, "keycus_c410", "Namco C410 K /* prime goal ex */ -keycus_c411_device::keycus_c411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c411_device::keycus_c411_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C411, tag, owner, clock) { } @@ -225,7 +225,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C411, keycus_c411_device, "keycus_c411", "Namco C411 K /* xevious 3d/g */ -keycus_c430_device::keycus_c430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c430_device::keycus_c430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C430, tag, owner, clock) { } @@ -284,7 +284,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C430, keycus_c430_device, "keycus_c430", "Namco C430 K /* dancing eyes */ -keycus_c431_device::keycus_c431_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c431_device::keycus_c431_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C431, tag, owner, clock) { } @@ -342,7 +342,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C431, keycus_c431_device, "keycus_c431", "Namco C431 K /* pocket racer */ -keycus_c432_device::keycus_c432_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c432_device::keycus_c432_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C432, tag, owner, clock) { } @@ -402,7 +402,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C432, keycus_c432_device, "keycus_c432", "Namco C432 K /* star sweep */ -keycus_c442_device::keycus_c442_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c442_device::keycus_c442_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C442, tag, owner, clock) { } @@ -450,7 +450,7 @@ DEFINE_DEVICE_TYPE(KEYCUS_C442, keycus_c442_device, "keycus_c442", "Namco C442 K /* kosodate quiz my angel 3 / point blank 2 */ -keycus_c443_device::keycus_c443_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +keycus_c443_device::keycus_c443_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ns11_keycus_device(mconfig, KEYCUS_C443, tag, owner, clock) { } diff --git a/src/mame/namco/ns11prot.h b/src/mame/namco/ns11prot.h index 279835ea44f..41efb2f3392 100644 --- a/src/mame/namco/ns11prot.h +++ b/src/mame/namco/ns11prot.h @@ -13,7 +13,7 @@ class ns11_keycus_device : public device_t { protected: - ns11_keycus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ns11_keycus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -32,7 +32,7 @@ public: class keycus_c406_device : public ns11_keycus_device { public: - keycus_c406_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c406_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -45,7 +45,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C406, keycus_c406_device) class keycus_c409_device : public ns11_keycus_device { public: - keycus_c409_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c409_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -58,7 +58,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C409, keycus_c409_device) class keycus_c410_device : public ns11_keycus_device { public: - keycus_c410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -71,7 +71,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C410, keycus_c410_device) class keycus_c411_device : public ns11_keycus_device { public: - keycus_c411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c411_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -84,7 +84,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C411, keycus_c411_device) class keycus_c430_device : public ns11_keycus_device { public: - keycus_c430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -97,7 +97,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C430, keycus_c430_device) class keycus_c431_device : public ns11_keycus_device { public: - keycus_c431_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c431_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -110,7 +110,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C431, keycus_c431_device) class keycus_c432_device : public ns11_keycus_device { public: - keycus_c432_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c432_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -123,7 +123,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C432, keycus_c432_device) class keycus_c442_device : public ns11_keycus_device { public: - keycus_c442_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c442_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; @@ -136,7 +136,7 @@ DECLARE_DEVICE_TYPE(KEYCUS_C442, keycus_c442_device) class keycus_c443_device : public ns11_keycus_device { public: - keycus_c443_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + keycus_c443_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read(offs_t offset) override; virtual void write(offs_t offset, uint16_t data) override; diff --git a/src/mame/namco/polepos.cpp b/src/mame/namco/polepos.cpp index 1a3594e1f79..e7420f63a4b 100644 --- a/src/mame/namco/polepos.cpp +++ b/src/mame/namco/polepos.cpp @@ -1050,11 +1050,11 @@ void polepos_state::topracern(machine_config &config) m_namco_sound->add_route(1, "rspeaker", 0.80); /* engine sound */ - polepos_sound_device &polepos(POLEPOS_SOUND(config, "polepos", 0)); + polepos_sound_device &polepos(POLEPOS_SOUND(config, "polepos")); polepos.add_route(ALL_OUTPUTS, "lspeaker", 0.90 * 0.77); polepos.add_route(ALL_OUTPUTS, "rspeaker", 0.90 * 0.77); - dac_4bit_r2r_device &dac(DAC_4BIT_R2R(config, "dac", 0)); // unknown resistor configuration + dac_4bit_r2r_device &dac(DAC_4BIT_R2R(config, "dac")); // unknown resistor configuration dac.add_route(ALL_OUTPUTS, "lspeaker", 0.12); dac.add_route(ALL_OUTPUTS, "rspeaker", 0.12); } @@ -1071,7 +1071,7 @@ void polepos_state::polepos2bi(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_sound_z80, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - TMS5220(config, "tms", 600000) /* ? Mhz */ + TMS5220(config, "tms", XTAL::u(600000)) /* ? Mhz */ .add_route(ALL_OUTPUTS, "lspeaker", 0.80) .add_route(ALL_OUTPUTS, "rspeaker", 0.80); } diff --git a/src/mame/namco/polepos_a.cpp b/src/mame/namco/polepos_a.cpp index 46fc1ca16b0..1c42701222a 100644 --- a/src/mame/namco/polepos_a.cpp +++ b/src/mame/namco/polepos_a.cpp @@ -207,7 +207,7 @@ DEFINE_DEVICE_TYPE(POLEPOS_SOUND, polepos_sound_device, "polepos_sound", "Pole P // polepos_sound_device - constructor //------------------------------------------------- -polepos_sound_device::polepos_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +polepos_sound_device::polepos_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, POLEPOS_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), m_current_position(0), diff --git a/src/mame/namco/polepos_a.h b/src/mame/namco/polepos_a.h index b8611218284..1c0b95196d4 100644 --- a/src/mame/namco/polepos_a.h +++ b/src/mame/namco/polepos_a.h @@ -10,7 +10,7 @@ class polepos_sound_device : public device_t, public device_sound_interface { public: - polepos_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + polepos_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~polepos_sound_device() { } protected: diff --git a/src/mame/namco/rbowlorama.cpp b/src/mame/namco/rbowlorama.cpp index 5469ac61f59..b7c7863e3f2 100644 --- a/src/mame/namco/rbowlorama.cpp +++ b/src/mame/namco/rbowlorama.cpp @@ -89,7 +89,7 @@ void rbowlorama_state::machine_reset() void rbowlorama_state::rbowlorama(machine_config &config) { // Basic machine hardware - PENTIUM4(config, m_maincpu, 120000000); // Celeron, socket 478, 800/533MHz + PENTIUM4(config, m_maincpu, XTAL::u(120000000)); // Celeron, socket 478, 800/533MHz m_maincpu->set_addrmap(AS_PROGRAM, &rbowlorama_state::rbowlorama_map); // Video hardware diff --git a/src/mame/namco/starfield_05xx.cpp b/src/mame/namco/starfield_05xx.cpp index cdba1b1c7ba..0aa2c196eb6 100644 --- a/src/mame/namco/starfield_05xx.cpp +++ b/src/mame/namco/starfield_05xx.cpp @@ -531,7 +531,7 @@ static const int post_vis_cycle_count_values[] = -starfield_05xx_device::starfield_05xx_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +starfield_05xx_device::starfield_05xx_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, STARFIELD_05XX, tag, owner, clock) , m_enable(0) , m_lfsr(LFSR_SEED) diff --git a/src/mame/namco/starfield_05xx.h b/src/mame/namco/starfield_05xx.h index 2597166f95c..aa823d09df4 100644 --- a/src/mame/namco/starfield_05xx.h +++ b/src/mame/namco/starfield_05xx.h @@ -7,7 +7,7 @@ class starfield_05xx_device : public device_t { public: - starfield_05xx_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + starfield_05xx_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); void enable_starfield(uint8_t on); void set_scroll_speed(uint8_t index_x, uint8_t index_y); diff --git a/src/mame/namco/tankbatt.cpp b/src/mame/namco/tankbatt.cpp index 37f0925c0d3..95ee65a96d9 100644 --- a/src/mame/namco/tankbatt.cpp +++ b/src/mame/namco/tankbatt.cpp @@ -396,7 +396,7 @@ void tankbatt_state::tankbatt(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(tankbatt)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/namco/tceptor.cpp b/src/mame/namco/tceptor.cpp index ca9c83aeef9..882988c5966 100644 --- a/src/mame/namco/tceptor.cpp +++ b/src/mame/namco/tceptor.cpp @@ -333,7 +333,7 @@ void tceptor_state::tceptor(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1); - adc0809_device &adc(ADC0809(config, "adc", 1000000)); // unknown clock (needs to >640khz or the wait loop is too fast) + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(1000000))); // unknown clock (needs to >640khz or the wait loop is too fast) adc.in_callback<0>().set_constant(0); // unknown adc.in_callback<1>().set_ioport("PEDAL"); adc.in_callback<2>().set_ioport("STICKX"); @@ -368,7 +368,7 @@ void tceptor_state::tceptor(machine_config &config) m_cus30->add_route(0, "lspeaker", 0.40); m_cus30->add_route(1, "rspeaker", 0.40); - dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac", 0)); // unknown DAC + dac_8bit_r2r_device &dac(DAC_8BIT_R2R(config, "dac")); // unknown DAC dac.add_route(ALL_OUTPUTS, "lspeaker", 0.4); dac.add_route(ALL_OUTPUTS, "rspeaker", 0.4); } diff --git a/src/mame/namco/toypop.cpp b/src/mame/namco/toypop.cpp index b86cf71fa6d..3aa73003f24 100644 --- a/src/mame/namco/toypop.cpp +++ b/src/mame/namco/toypop.cpp @@ -707,20 +707,20 @@ void namcos16_state::liblrabl(machine_config &config) m_sound_cpu->set_addrmap(AS_PROGRAM, &namcos16_state::sound_map); m_sound_cpu->set_periodic_int(FUNC(namcos16_state::irq0_line_hold), attotime::from_hz(60)); - NAMCO_58XX(config, m_namco58xx, 0); + NAMCO_58XX(config, m_namco58xx); m_namco58xx->in_callback<0>().set_ioport("COINS"); m_namco58xx->in_callback<1>().set_ioport("P1_RIGHT"); m_namco58xx->in_callback<2>().set_ioport("P2_RIGHT"); m_namco58xx->in_callback<3>().set_ioport("BUTTONS"); - NAMCO_56XX(config, m_namco56xx_1, 0); + NAMCO_56XX(config, m_namco56xx_1); m_namco56xx_1->in_callback<0>().set(FUNC(namcos16_state::dipA_h)); m_namco56xx_1->in_callback<1>().set(FUNC(namcos16_state::dipB_l)); m_namco56xx_1->in_callback<2>().set(FUNC(namcos16_state::dipB_h)); m_namco56xx_1->in_callback<3>().set(FUNC(namcos16_state::dipA_l)); m_namco56xx_1->out_callback<0>().set(FUNC(namcos16_state::flip)); - NAMCO_56XX(config, m_namco56xx_2, 0); + NAMCO_56XX(config, m_namco56xx_2); m_namco56xx_2->in_callback<1>().set_ioport("P1_LEFT"); m_namco56xx_2->in_callback<2>().set_ioport("P2_LEFT"); m_namco56xx_2->in_callback<3>().set_ioport("SERVICE"); @@ -736,7 +736,7 @@ void namcos16_state::liblrabl(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - NAMCO_15XX(config, m_namco15xx, 24000); + NAMCO_15XX(config, m_namco15xx, XTAL::u(24000)); m_namco15xx->set_voices(8); m_namco15xx->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/namco/turrett.cpp b/src/mame/namco/turrett.cpp index d2acf8ea5e4..4eaa3523f49 100644 --- a/src/mame/namco/turrett.cpp +++ b/src/mame/namco/turrett.cpp @@ -321,7 +321,7 @@ DECLARE_DEVICE_TYPE(TURRETT_HARDDISK, turrett_hdd) class turrett_hdd : public ide_hdd_device { public: - turrett_hdd(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + turrett_hdd(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_hdd_device(mconfig, TURRETT_HARDDISK, tag, owner, clock) { } @@ -365,7 +365,7 @@ void turrett_state::turrett(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // TODO: Likely not correct. Refresh rate empirically determined // to ensure in-sync streaming sound - m_screen->set_raw(4000000, 512, 0, 336, 259, 0, 244); + m_screen->set_raw(XTAL::u(4000000), 512, 0, 336, 259, 0, 244); m_screen->set_screen_update(FUNC(turrett_state::screen_update)); m_screen->set_palette("palette"); diff --git a/src/mame/namco/turrett.h b/src/mame/namco/turrett.h index cd3ef6b3968..ce54a7a3f4e 100644 --- a/src/mame/namco/turrett.h +++ b/src/mame/namco/turrett.h @@ -110,7 +110,7 @@ class turrett_device : public device_t, public: // construction/destruction - turrett_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + turrett_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset); void write(offs_t offset, uint32_t data); diff --git a/src/mame/namco/turrett_a.cpp b/src/mame/namco/turrett_a.cpp index 72d0d61e35d..cf12eb9cdc7 100644 --- a/src/mame/namco/turrett_a.cpp +++ b/src/mame/namco/turrett_a.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(TURRETT, turrett_device, "ttsnd", "Turret Tower Sound") // turrett_device - constructor //------------------------------------------------- -turrett_device::turrett_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +turrett_device::turrett_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TURRETT, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_memory_interface(mconfig, *this) diff --git a/src/mame/namco/wacky_gator.cpp b/src/mame/namco/wacky_gator.cpp index 1dfbcf2a069..ffab6096bff 100644 --- a/src/mame/namco/wacky_gator.cpp +++ b/src/mame/namco/wacky_gator.cpp @@ -318,7 +318,7 @@ void wackygtr_state::wackygtr(machine_config &config) ppi2.in_pb_callback().set_ioport("IN1"); ppi2.in_pc_callback().set_ioport("IN2"); - PIT8253(config, m_pit8253[0], 0); + PIT8253(config, m_pit8253[0]); m_pit8253[0]->set_clk<0>(XTAL(3'579'545)/16); // this is a guess m_pit8253[0]->out_handler<0>().set(FUNC(wackygtr_state::alligator_ck<0>)); m_pit8253[0]->set_clk<1>(XTAL(3'579'545)/16); // this is a guess @@ -326,7 +326,7 @@ void wackygtr_state::wackygtr(machine_config &config) m_pit8253[0]->set_clk<2>(XTAL(3'579'545)/16); // this is a guess m_pit8253[0]->out_handler<2>().set(FUNC(wackygtr_state::alligator_ck<2>)); - PIT8253(config, m_pit8253[1], 0); + PIT8253(config, m_pit8253[1]); m_pit8253[1]->set_clk<0>(XTAL(3'579'545)/16); // this is a guess m_pit8253[1]->out_handler<0>().set_inputline(m_maincpu, M6809_FIRQ_LINE); m_pit8253[1]->set_clk<1>(XTAL(3'579'545)/16); // this is a guess diff --git a/src/mame/namco/warpwarp_a.cpp b/src/mame/namco/warpwarp_a.cpp index 4be2c5d7f77..2fe3538b7cc 100644 --- a/src/mame/namco/warpwarp_a.cpp +++ b/src/mame/namco/warpwarp_a.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(WARPWARP_SOUND, warpwarp_sound_device, "warpwarp_sound", "Warp Warp Custom Sound") -warpwarp_sound_device::warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +warpwarp_sound_device::warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WARPWARP_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), m_decay(nullptr), diff --git a/src/mame/namco/warpwarp_a.h b/src/mame/namco/warpwarp_a.h index 41f369ca2c7..212dad12050 100644 --- a/src/mame/namco/warpwarp_a.h +++ b/src/mame/namco/warpwarp_a.h @@ -9,7 +9,7 @@ class warpwarp_sound_device : public device_t, public device_sound_interface { public: - warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(u8 data); void music1_w(u8 data); diff --git a/src/mame/namco/ygv608.cpp b/src/mame/namco/ygv608.cpp index 371d7068e9e..118cb2b21c3 100644 --- a/src/mame/namco/ygv608.cpp +++ b/src/mame/namco/ygv608.cpp @@ -315,7 +315,7 @@ void ygv608_device::port_map(address_map &map) // ygv608_device - constructor //------------------------------------------------- -ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, YGV608, tag, owner, clock), device_gfx_interface(mconfig, *this, gfx_ygv608, DEVICE_SELF), device_memory_interface(mconfig, *this), diff --git a/src/mame/namco/ygv608.h b/src/mame/namco/ygv608.h index 0e96f289c1f..aa058b4ae9e 100644 --- a/src/mame/namco/ygv608.h +++ b/src/mame/namco/ygv608.h @@ -21,7 +21,7 @@ class ygv608_device : public device_t, { public: // construction/destruction - ygv608_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ygv608_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void port_map(address_map &map); diff --git a/src/mame/nasco/crgolf.cpp b/src/mame/nasco/crgolf.cpp index 9e762c05d95..8fe5f705010 100644 --- a/src/mame/nasco/crgolf.cpp +++ b/src/mame/nasco/crgolf.cpp @@ -755,7 +755,7 @@ void crgolfhi_state::crgolfhi(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &crgolfhi_state::sound_map); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(crgolfhi_state::vck_callback)); m_msm->set_prescaler_selector(msm5205_device::S64_4B); m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/ncd/bert_m.cpp b/src/mame/ncd/bert_m.cpp index f23e82baec2..78449c6228f 100644 --- a/src/mame/ncd/bert_m.cpp +++ b/src/mame/ncd/bert_m.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(BERT, bert_device, "ncd_bert_asic", "NCD BERT ASIC") -bert_device::bert_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +bert_device::bert_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BERT, tag, owner, clock) , m_memory_space(*this, finder_base::DUMMY_TAG, 24, 16) { diff --git a/src/mame/ncd/bert_m.h b/src/mame/ncd/bert_m.h index 410fbcf61c1..740448529c2 100644 --- a/src/mame/ncd/bert_m.h +++ b/src/mame/ncd/bert_m.h @@ -12,7 +12,7 @@ public: // configuration template void set_memory(T &&tag, int spacenum) { m_memory_space.set_tag(std::forward(tag), spacenum); } - bert_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + bert_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); void set_qlc_mode(bool state); diff --git a/src/mame/ncd/ncd68k.cpp b/src/mame/ncd/ncd68k.cpp index 51489a7d1d6..0094527574a 100644 --- a/src/mame/ncd/ncd68k.cpp +++ b/src/mame/ncd/ncd68k.cpp @@ -488,7 +488,7 @@ void ncd16_state::configure(machine_config &config) m_duart->irq_cb().set_inputline(m_maincpu, M68K_IRQ_4); // keyboard controller - M68705P3(config, m_mcu, 3'750'000); + M68705P3(config, m_mcu, XTAL::u(3'750'000)); // ethernet AM7990(config, m_lance); @@ -502,7 +502,7 @@ void ncd16_state::configure(machine_config &config) m_screen->set_screen_update(FUNC(ncd16_state::screen_update)); m_screen->screen_vblank().set_inputline(m_maincpu, M68K_IRQ_5, HOLD_LINE); - BERT(config, m_bert, 0).set_memory(m_maincpu, AS_PROGRAM); + BERT(config, m_bert).set_memory(m_maincpu, AS_PROGRAM); common(config); @@ -524,7 +524,7 @@ void ncd16_state::configure(machine_config &config) void ncd17c_state::configure(machine_config &config) { // basic machine hardware - M68020(config, m_maincpu, 20000000); + M68020(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ncd17c_state::map); RAM(config, m_ram).set_default_size("32M"); @@ -537,7 +537,7 @@ void ncd17c_state::configure(machine_config &config) m_duart->irq_cb().set_inputline(m_maincpu, M68K_IRQ_4); // keyboard controller - M6805P2(config, m_mcu, 3'750'000); + M6805P2(config, m_mcu, XTAL::u(3'750'000)); // ethernet AM7990(config, m_lance); diff --git a/src/mame/ncd/ncd88k.cpp b/src/mame/ncd/ncd88k.cpp index 11716f6c30f..741fd4360ed 100644 --- a/src/mame/ncd/ncd88k.cpp +++ b/src/mame/ncd/ncd88k.cpp @@ -106,16 +106,16 @@ INPUT_PORTS_END void ncd88k_state::ncd19c(machine_config &config) { - MC88100(config, m_maincpu, 15'000'000); + MC88100(config, m_maincpu, XTAL::u(15'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &ncd88k_state::code_map); m_maincpu->set_addrmap(AS_DATA, &ncd88k_state::data_map); - SCN2681(config, "duart", 3'686'400); + SCN2681(config, "duart", XTAL::u(3'686'400)); - BT458(config, m_ramdac, 0); + BT458(config, m_ramdac); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(125'000'000, 1680, 0, 1280, 1063, 0, 1024); // 74.4 kHz horizontal, 70 Hz vertical + m_screen->set_raw(XTAL::u(125'000'000), 1680, 0, 1280, 1063, 0, 1024); // 74.4 kHz horizontal, 70 Hz vertical m_screen->set_screen_update(FUNC(ncd88k_state::screen_update)); } @@ -196,13 +196,13 @@ void ncdmcx_state::ncdmcx(machine_config &config) // 4100004 AM79C90(config, m_lance, 20_MHz_XTAL); - SCN2681(config, m_duart, 3'686'400); + SCN2681(config, m_duart, XTAL::u(3'686'400)); // ATT20C497-11 - BT477(config, m_ramdac, 125'000'000); + BT477(config, m_ramdac, XTAL::u(125'000'000)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(125'000'000, 1680, 0, 1280, 1063, 0, 1024); // 74.4 kHz horizontal, 70 Hz vertical + m_screen->set_raw(XTAL::u(125'000'000), 1680, 0, 1280, 1063, 0, 1024); // 74.4 kHz horizontal, 70 Hz vertical m_screen->set_screen_update(FUNC(ncdmcx_state::screen_update)); } diff --git a/src/mame/ncd/ncdmips.cpp b/src/mame/ncd/ncdmips.cpp index aaff9ea3951..d63e4bd3388 100644 --- a/src/mame/ncd/ncdmips.cpp +++ b/src/mame/ncd/ncdmips.cpp @@ -104,7 +104,7 @@ WRITE_LINE_MEMBER(ncd_mips_state::duart_irq_handler) void ncd_mips_state::hmxpro(machine_config &config) { /* basic machine hardware */ - R4600BE(config, m_maincpu, 50000000); + R4600BE(config, m_maincpu, XTAL::u(50000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ncd_mips_state::hmxpro_map); m_maincpu->set_periodic_int(FUNC(ncd_mips_state::vblank), attotime::from_hz(70.06)); diff --git a/src/mame/ncd/ncdppc.cpp b/src/mame/ncd/ncdppc.cpp index 18fc94387f8..1365266425c 100644 --- a/src/mame/ncd/ncdppc.cpp +++ b/src/mame/ncd/ncdppc.cpp @@ -79,7 +79,7 @@ void ncd_ppc_state::explorapro_map(address_map &map) void ncd_ppc_state::explorapro(machine_config &config) { /* basic machine hardware */ - PPC403GA(config, m_maincpu, 50000000); + PPC403GA(config, m_maincpu, XTAL::u(50000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ncd_ppc_state::explorapro_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/nec/apc.cpp b/src/mame/nec/apc.cpp index d4d4240bdfe..5fc814d2085 100644 --- a/src/mame/nec/apc.cpp +++ b/src/mame/nec/apc.cpp @@ -749,7 +749,7 @@ INPUT_PORTS_END void apc_state::machine_start() { - m_fdc->set_rate(500000); + m_fdc->set_rate(XTAL::u(500000)); m_rtc->cs_w(1); // m_rtc->oe_w(1); @@ -913,18 +913,18 @@ void apc_state::apc(machine_config &config) m_maincpu->set_addrmap(AS_IO, &apc_state::apc_io); m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(MAIN_CLOCK); // heartbeat IRQ m_pit->out_handler<0>().set(m_i8259_m, FUNC(pic8259_device::ir3_w)); m_pit->set_clk<1>(MAIN_CLOCK); // Memory Refresh m_pit->set_clk<2>(MAIN_CLOCK); // RS-232c - PIC8259(config, m_i8259_m, 0); + PIC8259(config, m_i8259_m); m_i8259_m->out_int_callback().set_inputline(m_maincpu, 0); m_i8259_m->in_sp_callback().set_constant(1); m_i8259_m->read_slave_ack_callback().set(FUNC(apc_state::get_slave_ack)); - PIC8259(config, m_i8259_s, 0); + PIC8259(config, m_i8259_s); m_i8259_s->out_int_callback().set(m_i8259_m, FUNC(pic8259_device::ir7_w)); // TODO: check ir7_w m_i8259_s->in_sp_callback().set_constant(0); @@ -943,7 +943,7 @@ void apc_state::apc(machine_config &config) NVRAM(config, m_cmos, nvram_device::DEFAULT_ALL_1); UPD1990A(config, m_rtc); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set(m_i8259_s, FUNC(pic8259_device::ir4_w)); m_fdc->drq_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq1_w)); FLOPPY_CONNECTOR(config, m_fdc_connector[0], apc_floppies, "8", floppy_image_device::default_fm_floppy_formats, "8"); @@ -962,11 +962,11 @@ void apc_state::apc(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_apc); - UPD7220(config, m_hgdc1, 3579545); // unk clock + UPD7220(config, m_hgdc1, XTAL::u(3579545)); // unk clock m_hgdc1->set_addrmap(0, &apc_state::upd7220_1_map); m_hgdc1->set_draw_text(FUNC(apc_state::hgdc_draw_text)); - UPD7220(config, m_hgdc2, 3579545); // unk clock + UPD7220(config, m_hgdc2, XTAL::u(3579545)); // unk clock m_hgdc2->set_addrmap(0, &apc_state::upd7220_2_map); m_hgdc2->set_display_pixels(FUNC(apc_state::hgdc_display_pixels)); diff --git a/src/mame/nec/pc100.cpp b/src/mame/nec/pc100.cpp index 6bbdb60cffa..5d609760db3 100644 --- a/src/mame/nec/pc100.cpp +++ b/src/mame/nec/pc100.cpp @@ -626,7 +626,7 @@ static void pc100_floppies(device_slot_interface &device) device.option_add("525dd", FLOPPY_525_DD); } -#define MASTER_CLOCK 6988800 +#define MASTER_CLOCK XTAL::u(6988800) void pc100_state::pc100(machine_config &config) { @@ -652,17 +652,17 @@ void pc100_state::pc100(machine_config &config) ppi2.out_pb_callback().set(FUNC(pc100_state::upper_mask_w)); ppi2.out_pc_callback().set(FUNC(pc100_state::crtc_bank_w)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); m_pic->in_sp_callback().set_constant(0); // ??? - i8251_device &i8251(I8251(config, "uart8251", 0)); + i8251_device &i8251(I8251(config, "uart8251")); //i8251.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); //i8251.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); //i8251.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); i8251.rxrdy_handler().set(m_pic, FUNC(pic8259_device::ir1_w)); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set(FUNC(pc100_state::irqnmi_w)); m_fdc->drq_wr_callback().set(FUNC(pc100_state::drqnmi_w)); @@ -687,7 +687,7 @@ void pc100_state::pc100(machine_config &config) SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2400).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beeper, XTAL::u(2400)).add_route(ALL_OUTPUTS, "mono", 0.50); } /* ROM definition */ diff --git a/src/mame/nec/pc6001.cpp b/src/mame/nec/pc6001.cpp index 09ea78eea55..ec10c368b3c 100644 --- a/src/mame/nec/pc6001.cpp +++ b/src/mame/nec/pc6001.cpp @@ -1598,7 +1598,7 @@ void pc6601_state::machine_start() { pc6001mk2_state::machine_start(); - m_fdc->set_rate(250000); + m_fdc->set_rate(XTAL::u(250000)); m_floppy->get_device()->set_rpm(300); } @@ -1690,7 +1690,7 @@ void pc6001_state::pc6001(machine_config &config) // m_maincpu->set_vblank_int("screen", FUNC(pc6001_state::vrtc_irq)); m_maincpu->set_irq_acknowledge_callback(FUNC(pc6001_state::irq_callback)); -// I8049(config, "subcpu", 7987200); +// I8049(config, "subcpu", XTAL::u(7987200)); GFXDECODE(config, "gfxdecode", m_palette, gfx_pc6001m2); @@ -1713,7 +1713,7 @@ void pc6001_state::pc6001(machine_config &config) m_ppi->out_pc_callback().set(FUNC(pc6001_state::ppi_portc_w)); /* uart */ - I8251(config, "uart", 0); + I8251(config, "uart"); GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "pc6001_cart"); SOFTWARE_LIST(config, "cart_list_pc6001").set_original("pc6001_cart"); @@ -1772,7 +1772,7 @@ static void pc6601_floppies(device_slot_interface &device) void pc6601_state::pc6601_fdc_config(machine_config &config) { - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); FLOPPY_CONNECTOR(config, m_floppy, pc6601_floppies, "35ssdd", pc6601_state::floppy_formats).enable_sound(true); // TODO: slotify external I/F diff --git a/src/mame/nec/pc8001.cpp b/src/mame/nec/pc8001.cpp index 6c9a8c7aefb..63c4d09b42a 100644 --- a/src/mame/nec/pc8001.cpp +++ b/src/mame/nec/pc8001.cpp @@ -775,7 +775,7 @@ void pc8001_state::pc8001(machine_config &config) m_dma->out_iow_cb<2>().set(m_crtc, FUNC(upd3301_device::dack_w)); /* devices */ - I8251(config, I8251_TAG, 0); + I8251(config, I8251_TAG); UPD1990A(config, m_rtc); @@ -797,7 +797,7 @@ void pc8001_state::pc8001(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); // TODO: unknown clock, is it really a beeper? - BEEP(config, m_beep, 2400).add_route(ALL_OUTPUTS, "mono", 0.25); + BEEP(config, m_beep, XTAL::u(2400)).add_route(ALL_OUTPUTS, "mono", 0.25); } void pc8001mk2_state::pc8001mk2(machine_config &config) diff --git a/src/mame/nec/pc80s31k.cpp b/src/mame/nec/pc80s31k.cpp index 1b85cff8daa..f7369f3710b 100644 --- a/src/mame/nec/pc80s31k.cpp +++ b/src/mame/nec/pc80s31k.cpp @@ -177,7 +177,7 @@ DEFINE_DEVICE_TYPE(PC80S31K, pc80s31k_device, "pc80s31k", "NEC PC-80S31K Mini Di //------------------------------------------------- -pc80s31_device::pc80s31_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pc80s31_device::pc80s31_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_fdc(*this, "fdc") , m_floppy(*this, "fdc:%u", 0U) @@ -190,7 +190,7 @@ pc80s31_device::pc80s31_device(const machine_config &mconfig, device_type type, } -pc80s31_device::pc80s31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc80s31_device::pc80s31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc80s31_device(mconfig, PC80S31, tag, owner, clock) { @@ -338,7 +338,7 @@ void pc80s31_device::device_reset() { m_floppy[0]->get_device()->set_rpm(300); m_floppy[1]->get_device()->set_rpm(300); - m_fdc->set_rate(250000); + m_fdc->set_rate(XTAL::u(250000)); // TODO: doesn't seem to work for devices? m_fdc_cpu->set_input_line_vector(0, 0); @@ -416,7 +416,7 @@ void pc80s31_device::motor_control_w(uint8_t data) // //************************************************************************** -pc80s31k_device::pc80s31k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc80s31k_device::pc80s31k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc80s31_device(mconfig, PC80S31K, tag, owner, clock) { diff --git a/src/mame/nec/pc80s31k.h b/src/mame/nec/pc80s31k.h index f54d0d511bb..6239127afe0 100644 --- a/src/mame/nec/pc80s31k.h +++ b/src/mame/nec/pc80s31k.h @@ -25,12 +25,12 @@ class pc80s31_device : public device_t { public: // construction/destruction - pc80s31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc80s31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void host_map(address_map &map); protected: - pc80s31_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc80s31_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides //virtual void device_validity_check(validity_checker &valid) const override; @@ -70,7 +70,7 @@ private: class pc80s31k_device : public pc80s31_device { public: - pc80s31k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc80s31k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/mame/nec/pc8401a.cpp b/src/mame/nec/pc8401a.cpp index c7cb1c4ea27..c9e62916c4d 100644 --- a/src/mame/nec/pc8401a.cpp +++ b/src/mame/nec/pc8401a.cpp @@ -585,7 +585,7 @@ void pc8401a_state::pc8401a(machine_config &config) ppi.in_pc_callback().set(FUNC(pc8401a_state::ppi_pc_r)); ppi.out_pc_callback().set(FUNC(pc8401a_state::ppi_pc_w)); - i8251_device &uart(I8251(config, I8251_TAG, 0)); + i8251_device &uart(I8251(config, I8251_TAG)); uart.txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); @@ -610,7 +610,7 @@ void pc8401a_state::pc8401a(machine_config &config) void pc8500_state::pc8500(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); // NEC uPD70008C + Z80(config, m_maincpu, XTAL::u(4000000)); // NEC uPD70008C m_maincpu->set_addrmap(AS_PROGRAM, &pc8500_state::pc8401a_mem); m_maincpu->set_addrmap(AS_IO, &pc8500_state::pc8500_io); @@ -624,7 +624,7 @@ void pc8500_state::pc8500(machine_config &config) ppi.in_pc_callback().set(FUNC(pc8401a_state::ppi_pc_r)); ppi.out_pc_callback().set(FUNC(pc8401a_state::ppi_pc_w)); - i8251_device &uart(I8251(config, I8251_TAG, 0)); + i8251_device &uart(I8251(config, I8251_TAG)); uart.txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/nec/pc8401a_v.cpp b/src/mame/nec/pc8401a_v.cpp index 1880f2b7724..d830965686f 100644 --- a/src/mame/nec/pc8401a_v.cpp +++ b/src/mame/nec/pc8401a_v.cpp @@ -91,7 +91,7 @@ void pc8500_state::pc8500_video(machine_config &config) m_screen_lcd->set_visarea(0, 480-1, 0, 200-1); m_screen_lcd->set_palette("palette"); - SED1330(config, m_lcdc, 8000000); + SED1330(config, m_lcdc, XTAL::u(8000000)); m_lcdc->set_screen(SCREEN_TAG); m_lcdc->set_addrmap(0, &pc8500_state::pc8500_lcdc); @@ -104,7 +104,7 @@ void pc8500_state::pc8500_video(machine_config &config) screen.set_refresh_hz(50); screen.set_palette("palette"); - MC6845(config, m_crtc, 400000); + MC6845(config, m_crtc, XTAL::u(400000)); m_crtc->set_screen(CRT_SCREEN_TAG); m_crtc->set_show_border_area(false); m_crtc->set_char_width(6); diff --git a/src/mame/nec/pc8801.cpp b/src/mame/nec/pc8801.cpp index 44e73160b56..d6d9d21b8f9 100644 --- a/src/mame/nec/pc8801.cpp +++ b/src/mame/nec/pc8801.cpp @@ -1735,7 +1735,7 @@ void pc8801_state::pc8801(machine_config &config) SOFTWARE_LIST(config, "tape_list").set_original("pc8801_cass"); // TODO: clock, receiver handler, DCD? - I8251(config, m_usart, 0); + I8251(config, m_usart); m_usart->txd_handler().set(FUNC(pc8801_state::txdata_callback)); m_usart->rxrdy_handler().set(FUNC(pc8801_state::rxrdy_irq_w)); @@ -1851,7 +1851,7 @@ void pc8801mc_state::pc8801mc(machine_config &config) { pc8801ma(config); - PC8801_31(config, m_cdrom_if, 0); + PC8801_31(config, m_cdrom_if); m_cdrom_if->rom_bank_cb().set([this](bool state) { m_cdrom_bank = state; }); } diff --git a/src/mame/nec/pc88va.cpp b/src/mame/nec/pc88va.cpp index 68671bc1560..f70e9ff3aa5 100644 --- a/src/mame/nec/pc88va.cpp +++ b/src/mame/nec/pc88va.cpp @@ -1440,7 +1440,7 @@ void pc88va_state::machine_start() m_fdd[0]->get_device()->set_rpm(300); m_fdd[1]->get_device()->set_rpm(300); - m_fdc->set_rate(250000); + m_fdc->set_rate(XTAL::u(250000)); } @@ -1573,7 +1573,7 @@ void pc88va_state::pc88va(machine_config &config) m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); #if TEST_SUBFDC - z80_device &fdccpu(Z80(config, "fdccpu", 8000000)); /* 8 MHz */ + z80_device &fdccpu(Z80(config, "fdccpu", XTAL::u(8000000))); /* 8 MHz */ fdccpu.set_addrmap(AS_PROGRAM, &pc88va_state::pc88va_z80_map); fdccpu.set_addrmap(AS_IO, &pc88va_state::pc88va_z80_io_map); @@ -1610,12 +1610,12 @@ void pc88va_state::pc88va(machine_config &config) d8255_2s.in_pc_callback().set(FUNC(pc88va_state::fdc_8255_c_r)); d8255_2s.out_pc_callback().set(FUNC(pc88va_state::fdc_8255_c_w)); - PIC8259(config, m_pic1, 0); + PIC8259(config, m_pic1); m_pic1->out_int_callback().set_inputline(m_maincpu, 0); m_pic1->in_sp_callback().set_constant(1); m_pic1->read_slave_ack_callback().set(FUNC(pc88va_state::get_slave_ack)); - PIC8259(config, m_pic2, 0); + PIC8259(config, m_pic2); m_pic2->out_int_callback().set(m_pic1, FUNC(pic8259_device::ir7_w)); m_pic2->in_sp_callback().set_constant(0); @@ -1634,7 +1634,7 @@ void pc88va_state::pc88va(machine_config &config) FLOPPY_CONNECTOR(config, m_fdd[1], pc88va_floppies, "525hd", pc88va_state::floppy_formats); SOFTWARE_LIST(config, "disk_list").set_original("pc88va"); - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); + pit8253_device &pit8253(PIT8253(config, "pit8253")); pit8253.set_clk<0>(MASTER_CLOCK); /* general purpose timer 1 */ pit8253.out_handler<0>().set(FUNC(pc88va_state::pc88va_pit_out0_changed)); pit8253.set_clk<1>(MASTER_CLOCK); /* BEEP frequency setting */ diff --git a/src/mame/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp index c38a39da8b9..253044c3693 100644 --- a/src/mame/nec/pc9801.cpp +++ b/src/mame/nec/pc9801.cpp @@ -1905,8 +1905,8 @@ MACHINE_START_MEMBER(pc9801_state,pc9801f) { MACHINE_START_CALL_MEMBER(pc9801_common); - m_fdc_2hd->set_rate(500000); - m_fdc_2dd->set_rate(250000); + m_fdc_2hd->set_rate(XTAL::u(500000)); + m_fdc_2dd->set_rate(XTAL::u(250000)); // TODO: set_rpm for m_fdc_2dd? m_sys_type = 0x00 >> 6; } @@ -2064,7 +2064,7 @@ void pc9801_atapi_devices(device_slot_interface &device) void pc9801_state::pc9801_keyboard(machine_config &config) { - PC9801_KBD(config, m_keyb, 53); + PC9801_KBD(config, m_keyb, XTAL::u(53)); m_keyb->irq_wr_callback().set(m_pic1, FUNC(pic8259_device::ir1_w)); } @@ -2128,7 +2128,7 @@ void pc9801_state::pc9801_cbus(machine_config &config) void pc9801_state::pc9801_sasi(machine_config &config) { - SCSI_PORT(config, m_sasibus, 0); + SCSI_PORT(config, m_sasibus); m_sasibus->set_data_input_buffer("sasi_data_in"); m_sasibus->io_handler().set(FUNC(pc9801_state::write_sasi_io)); // bit2 m_sasibus->cd_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit3)); @@ -2171,7 +2171,7 @@ void pc9801vm_state::pc9801_ide(machine_config &config) void pc9801_state::pc9801_common(machine_config &config) { - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(MAIN_CLOCK_X1); // heartbeat IRQ m_pit->out_handler<0>().set(m_pic1, FUNC(pic8259_device::ir0_w)); m_pit->set_clk<1>(MAIN_CLOCK_X1); // Memory Refresh @@ -2179,7 +2179,7 @@ void pc9801_state::pc9801_common(machine_config &config) m_pit->out_handler<2>().set(m_sio, FUNC(i8251_device::write_txc)); m_pit->out_handler<2>().append(m_sio, FUNC(i8251_device::write_rxc)); - AM9517A(config, m_dmac, 5000000); // unknown clock, TODO: check channels 0 - 1 + AM9517A(config, m_dmac, XTAL::u(5000000)); // unknown clock, TODO: check channels 0 - 1 m_dmac->dreq_active_low(); m_dmac->out_hreq_callback().set(FUNC(pc9801_state::dma_hrq_changed)); m_dmac->out_eop_callback().set(FUNC(pc9801_state::tc_w)); @@ -2192,22 +2192,22 @@ void pc9801_state::pc9801_common(machine_config &config) m_dmac->out_dack_callback<2>().set(FUNC(pc9801_state::dack2_w)); m_dmac->out_dack_callback<3>().set(FUNC(pc9801_state::dack3_w)); - PIC8259(config, m_pic1, 0); + PIC8259(config, m_pic1); m_pic1->out_int_callback().set_inputline(m_maincpu, 0); m_pic1->in_sp_callback().set_constant(1); m_pic1->read_slave_ack_callback().set(FUNC(pc9801_state::get_slave_ack)); - PIC8259(config, m_pic2, 0); + PIC8259(config, m_pic2); m_pic2->out_int_callback().set(m_pic1, FUNC(pic8259_device::ir7_w)); // TODO: Check ir7_w m_pic2->in_sp_callback().set_constant(0); - I8255(config, m_ppi_sys, 0); + I8255(config, m_ppi_sys); m_ppi_sys->in_pa_callback().set_ioport("DSW2"); m_ppi_sys->in_pb_callback().set(FUNC(pc9801_state::ppi_sys_portb_r)); m_ppi_sys->in_pc_callback().set_constant(0xa0); // 0x80 cpu triple fault reset flag? // m_ppi_sys->out_pc_callback().set(FUNC(pc9801_state::ppi_sys_portc_w)); - I8255(config, m_ppi_prn, 0); + I8255(config, m_ppi_prn); // TODO: other ports m_ppi_prn->in_pb_callback().set(FUNC(pc9801_state::ppi_prn_portb_r)); @@ -2215,11 +2215,11 @@ void pc9801_state::pc9801_common(machine_config &config) pc9801_mouse(config); pc9801_cbus(config); - I8251(config, m_sio, 0); + I8251(config, m_sio); - PC9801_MEMSW(config, m_memsw, 0); + PC9801_MEMSW(config, m_memsw); - UPD765A(config, m_fdc_2hd, 8'000'000, true, true); + UPD765A(config, m_fdc_2hd, XTAL::u(8'000'000), true, true); m_fdc_2hd->intrq_wr_callback().set(m_pic2, FUNC(pic8259_device::ir3_w)); m_fdc_2hd->drq_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq2_w)).invert(); FLOPPY_CONNECTOR(config, "upd765_2hd:0", pc9801_floppies, "525hd", pc9801_state::floppy_formats);//.enable_sound(true); @@ -2267,7 +2267,7 @@ void pc9801_state::config_floppy_35hd(machine_config &config) void pc9801_state::pc9801(machine_config &config) { - I8086(config, m_maincpu, 5000000); // 5 MHz for vanilla, 8 MHz for direct children + I8086(config, m_maincpu, XTAL::u(5000000)); // 5 MHz for vanilla, 8 MHz for direct children m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9801_map); m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9801_io); m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -2281,7 +2281,7 @@ void pc9801_state::pc9801(machine_config &config) // TODO: maybe force dips to avoid beep error RAM(config, m_ram).set_default_size("640K").set_extra_options("128K,256K,384K,512K"); - UPD765A(config, m_fdc_2dd, 8'000'000, false, true); + UPD765A(config, m_fdc_2dd, XTAL::u(8'000'000), false, true); m_fdc_2dd->intrq_wr_callback().set(FUNC(pc9801_state::fdc_2dd_irq)); m_fdc_2dd->drq_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq3_w)).invert(); FLOPPY_CONNECTOR(config, "upd765_2dd:0", pc9801_floppies, "525dd", pc9801_state::floppy_formats); @@ -2293,7 +2293,7 @@ void pc9801_state::pc9801(machine_config &config) m_dmac->in_ior_callback<3>().set(m_fdc_2dd, FUNC(upd765a_device::dma_r)); m_dmac->out_iow_callback<3>().set(m_fdc_2dd, FUNC(upd765a_device::dma_w)); - BEEP(config, m_beeper, 2400).add_route(ALL_OUTPUTS, "mono", 0.15); + BEEP(config, m_beeper, XTAL::u(2400)).add_route(ALL_OUTPUTS, "mono", 0.15); PALETTE(config, m_palette, FUNC(pc9801_state::pc9801_palette), 16); } @@ -2329,7 +2329,7 @@ void pc9801vm_state::pc9801rs(machine_config &config) m_hgdc[1]->set_addrmap(0, &pc9801vm_state::upd7220_grcg_2_map); -// DAC_1BIT(config, m_dac1bit, 0).set_output_range(-1, 1).add_route(ALL_OUTPUTS, "mono", 0.15); +// DAC_1BIT(config, m_dac1bit).set_output_range(-1, 1).add_route(ALL_OUTPUTS, "mono", 0.15); SPEAKER_SOUND(config, m_dac1bit).add_route(ALL_OUTPUTS, "mono", 0.40); PALETTE(config, m_palette, FUNC(pc9801vm_state::pc9801_palette), 16 + 16); } @@ -2358,7 +2358,7 @@ void pc9801vm_state::pc9801ux(machine_config &config) maincpu.set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); config_floppy_35hd(config); -// AM9157A(config, "i8237", 10000000); // unknown clock +// AM9157A(config, "i8237", XTAL::u(10000000)); // unknown clock } void pc9801vm_state::pc9801dx(machine_config &config) diff --git a/src/mame/nec/pc9801_cd.cpp b/src/mame/nec/pc9801_cd.cpp index 46368ddfcc9..a9bee6083b0 100644 --- a/src/mame/nec/pc9801_cd.cpp +++ b/src/mame/nec/pc9801_cd.cpp @@ -6,7 +6,7 @@ // device type definition DEFINE_DEVICE_TYPE(PC9801_CD, pc9801_cd_device, "pc9801_cd", "PC9801 CD-ROM Drive") -pc9801_cd_device::pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc9801_cd_device::pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atapi_cdrom_device(mconfig, PC9801_CD, tag, owner, clock) { } diff --git a/src/mame/nec/pc9801_cd.h b/src/mame/nec/pc9801_cd.h index 69f7e00241f..c9528138191 100644 --- a/src/mame/nec/pc9801_cd.h +++ b/src/mame/nec/pc9801_cd.h @@ -9,7 +9,7 @@ class pc9801_cd_device : public atapi_cdrom_device { public: - pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void fill_buffer() override; diff --git a/src/mame/nec/pc9801_kbd.cpp b/src/mame/nec/pc9801_kbd.cpp index f3785c204ba..6d8f3937426 100644 --- a/src/mame/nec/pc9801_kbd.cpp +++ b/src/mame/nec/pc9801_kbd.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(PC9801_KBD, pc9801_kbd_device, "pc9801_kbd", "PC-9801 Keyboar // pc9801_kbd_device - constructor //------------------------------------------------- -pc9801_kbd_device::pc9801_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc9801_kbd_device::pc9801_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC9801_KBD, tag, owner, clock), m_write_irq(*this) { diff --git a/src/mame/nec/pc9801_kbd.h b/src/mame/nec/pc9801_kbd.h index b9c0aaa9523..19eebc21a2b 100644 --- a/src/mame/nec/pc9801_kbd.h +++ b/src/mame/nec/pc9801_kbd.h @@ -21,7 +21,7 @@ class pc9801_kbd_device : public device_t { public: // construction/destruction - pc9801_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_wr_callback() { return m_write_irq.bind(); } diff --git a/src/mame/nec/pc9801_memsw.cpp b/src/mame/nec/pc9801_memsw.cpp index 5efcd07b9d9..752ed37c1eb 100644 --- a/src/mame/nec/pc9801_memsw.cpp +++ b/src/mame/nec/pc9801_memsw.cpp @@ -97,7 +97,7 @@ DEFINE_DEVICE_TYPE(PC9801_MEMSW, pc9801_memsw_device, "pc9801_memsw", "NEC PC-98 // pc9801_memsw_device - constructor //------------------------------------------------- -pc9801_memsw_device::pc9801_memsw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc9801_memsw_device::pc9801_memsw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC9801_MEMSW, tag, owner, clock), device_nvram_interface(mconfig, *this) { diff --git a/src/mame/nec/pc9801_memsw.h b/src/mame/nec/pc9801_memsw.h index 4c0bf46d080..0fee13c9e2a 100644 --- a/src/mame/nec/pc9801_memsw.h +++ b/src/mame/nec/pc9801_memsw.h @@ -31,7 +31,7 @@ class pc9801_memsw_device : public device_t, { public: // construction/destruction - pc9801_memsw_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc9801_memsw_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(uint8_t offset); void write(uint8_t offset, uint8_t data); diff --git a/src/mame/nec/pc98ha.cpp b/src/mame/nec/pc98ha.cpp index 85dd3354c5c..7d040510bf8 100644 --- a/src/mame/nec/pc98ha.cpp +++ b/src/mame/nec/pc98ha.cpp @@ -433,22 +433,22 @@ void pc98lt_state::lt_config(machine_config &config) // m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); - PC9801_KBD(config, m_keyb, 53); + PC9801_KBD(config, m_keyb, XTAL::u(53)); m_keyb->irq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ1); - I8255(config, m_ppi_sys, 0); + I8255(config, m_ppi_sys); // PC98LT/HA has no dips, port A acts as a RAM storage m_ppi_sys->in_pa_callback().set(m_ppi_sys, FUNC(i8255_device::pa_r)); m_ppi_sys->in_pb_callback().set_ioport("SYSB"); // m_ppi_sys->in_pc_callback().set_constant(0xa0); // 0x80 cpu triple fault reset flag? m_ppi_sys->out_pc_callback().set(FUNC(pc98lt_state::ppi_sys_beep_portc_w)); - I8255(config, m_ppi_prn, 0); + I8255(config, m_ppi_prn); m_ppi_prn->in_pb_callback().set_ioport("PRNB"); UPD1990A(config, m_rtc); - UPD765A(config, m_fdc, 8'000'000, false, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, true); m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ6); m_fdc->drq_wr_callback().set(m_maincpu, FUNC(v50_device::dreq_w<2>)).invert(); // m_fdc->drq_wr_callback().set(m_maincpu, FUNC(v50_device::dreq_w<3>)).invert(); // 2dd @@ -466,7 +466,7 @@ void pc98lt_state::lt_config(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pc98lt); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2400).add_route(ALL_OUTPUTS, "mono", 0.05); + BEEP(config, m_beeper, XTAL::u(2400)).add_route(ALL_OUTPUTS, "mono", 0.05); } void pc98ha_state::ha_config(machine_config &config) @@ -480,7 +480,7 @@ void pc98ha_state::ha_config(machine_config &config) // m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); config.device_remove("rtc"); - UPD4991A(config, m_rtc_pio, 32'768); + UPD4991A(config, m_rtc_pio, XTAL::u(32'768)); } // all ROMs in both sets needs at least chip renaming, and I haven't seen a single PCB pic from the net. diff --git a/src/mame/nec/pce.cpp b/src/mame/nec/pce.cpp index bb828805cab..e9d9d284b02 100644 --- a/src/mame/nec/pce.cpp +++ b/src/mame/nec/pce.cpp @@ -166,7 +166,7 @@ void pce_state::pce_common(machine_config &config) m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed)); m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed)); - huc6270_device &huc6270(HUC6270(config, "huc6270", 0)); + huc6270_device &huc6270(HUC6270(config, "huc6270")); huc6270.set_vram_size(0x10000); huc6270.irq().set_inputline(m_maincpu, 0); @@ -176,7 +176,7 @@ void pce_state::pce_common(machine_config &config) PCE_CONTROL_PORT(config, m_port_ctrl, pce_control_port_devices, "joypad2"); // TODO: expansion port not emulated - PCE_CD(config, m_cd, 0); + PCE_CD(config, m_cd); SOFTWARE_LIST(config, "cd_list").set_original("pcecd"); } @@ -228,15 +228,15 @@ void pce_state::sgx(machine_config &config) m_huc6260->vsync_changed().set("huc6202", FUNC(huc6202_device::vsync_changed)); m_huc6260->hsync_changed().set("huc6202", FUNC(huc6202_device::hsync_changed)); - huc6270_device &huc6270_0(HUC6270(config, "huc6270_0", 0)); + huc6270_device &huc6270_0(HUC6270(config, "huc6270_0")); huc6270_0.set_vram_size(0x10000); huc6270_0.irq().set_inputline(m_maincpu, 0); // needs input merger? - huc6270_device &huc6270_1(HUC6270(config, "huc6270_1", 0)); + huc6270_device &huc6270_1(HUC6270(config, "huc6270_1")); huc6270_1.set_vram_size(0x10000); huc6270_1.irq().set_inputline(m_maincpu, 0); // needs input merger? - huc6202_device &huc6202(HUC6202(config, "huc6202", 0 )); + huc6202_device &huc6202(HUC6202(config, "huc6202")); huc6202.next_pixel_0_callback().set("huc6270_0", FUNC(huc6270_device::next_pixel)); huc6202.time_til_next_event_0_callback().set("huc6270_0", FUNC(huc6270_device::time_until_next_event)); huc6202.vsync_changed_0_callback().set("huc6270_0", FUNC(huc6270_device::vsync_changed)); @@ -261,7 +261,7 @@ void pce_state::sgx(machine_config &config) SOFTWARE_LIST(config, "pce_list").set_compatible("pce"); // TODO: expansion port not emulated - PCE_CD(config, m_cd, 0); + PCE_CD(config, m_cd); SOFTWARE_LIST(config, "cd_list").set_original("pcecd"); } diff --git a/src/mame/nec/pce_cd.cpp b/src/mame/nec/pce_cd.cpp index 7870295ecc8..6744f27114f 100644 --- a/src/mame/nec/pce_cd.cpp +++ b/src/mame/nec/pce_cd.cpp @@ -99,7 +99,7 @@ void pce_cd_device::regs_map(address_map &map) map(0x0f, 0x0f).w(FUNC(pce_cd_device::fade_register_w)); } -pce_cd_device::pce_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pce_cd_device::pce_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCE_CD, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("io", ENDIANNESS_LITTLE, 8, 4, 0, address_map_constructor(FUNC(pce_cd_device::regs_map), this)) diff --git a/src/mame/nec/pce_cd.h b/src/mame/nec/pce_cd.h index 30882f1d099..99747bbdbae 100644 --- a/src/mame/nec/pce_cd.h +++ b/src/mame/nec/pce_cd.h @@ -45,7 +45,7 @@ class pce_cd_device : public device_t, { public: // construction/destruction - pce_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void update(); diff --git a/src/mame/nec/pcfx.cpp b/src/mame/nec/pcfx.cpp index c7a2c8e044d..2908c573c5a 100644 --- a/src/mame/nec/pcfx.cpp +++ b/src/mame/nec/pcfx.cpp @@ -429,11 +429,11 @@ void pcfx_state::pcfx(machine_config &config) screen.set_screen_update(FUNC(pcfx_state::screen_update)); screen.set_raw(XTAL(21'477'272), huc6261_device::WPF, 64, 64 + 1024 + 64, huc6261_device::LPF, 18, 18 + 242); - huc6270_device &huc6270_a(HUC6270(config, "huc6270_a", 0)); + huc6270_device &huc6270_a(HUC6270(config, "huc6270_a")); huc6270_a.set_vram_size(0x20000); huc6270_a.irq().set(FUNC(pcfx_state::irq12_w)); - huc6270_device &huc6270_b(HUC6270(config, "huc6270_b", 0)); + huc6270_device &huc6270_b(HUC6270(config, "huc6270_b")); huc6270_b.set_vram_size(0x20000); huc6270_b.irq().set(FUNC(pcfx_state::irq14_w)); diff --git a/src/mame/nec/tk80bs.cpp b/src/mame/nec/tk80bs.cpp index f8c8174d82d..d5364e8f43b 100644 --- a/src/mame/nec/tk80bs.cpp +++ b/src/mame/nec/tk80bs.cpp @@ -204,7 +204,7 @@ void tk80bs_state::tk80bs(machine_config &config) m_ppi->in_pa_callback().set(FUNC(tk80bs_state::port_a_r)); m_ppi->in_pb_callback().set(FUNC(tk80bs_state::port_b_r)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(tk80bs_state::kbd_put)); } diff --git a/src/mame/neogeo/midas.cpp b/src/mame/neogeo/midas.cpp index 3419f0acd82..fe1023ff207 100644 --- a/src/mame/neogeo/midas.cpp +++ b/src/mame/neogeo/midas.cpp @@ -644,7 +644,7 @@ void midas_state::livequiz(machine_config &config) m_screen->set_screen_update(FUNC(midas_state::screen_update)); m_screen->screen_vblank().set(FUNC(midas_state::screen_vblank)); - NEOGEO_SPRITE_MIDAS(config, m_sprgen, 0).set_screen(m_screen); + NEOGEO_SPRITE_MIDAS(config, m_sprgen).set_screen(m_screen); GFXDECODE(config, m_gfxdecode, m_palette, gfx_midas); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 0x10000); @@ -670,15 +670,15 @@ void midas_state::hammer(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); - TICKET_DISPENSER(config, m_prize[0], 0); + TICKET_DISPENSER(config, m_prize[0]); m_prize[0]->set_period(attotime::from_msec(1000*5)); m_prize[0]->set_senses(TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW, false); - TICKET_DISPENSER(config, m_prize[1], 0); + TICKET_DISPENSER(config, m_prize[1]); m_prize[1]->set_period(attotime::from_msec(1000*5)); m_prize[1]->set_senses(TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW, false); - TICKET_DISPENSER(config, m_ticket, 0); + TICKET_DISPENSER(config, m_ticket); m_ticket->set_period(attotime::from_msec(200)); m_ticket->set_senses(TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW, false); @@ -688,7 +688,7 @@ void midas_state::hammer(machine_config &config) m_screen->set_screen_update(FUNC(midas_state::screen_update)); m_screen->screen_vblank().set(FUNC(midas_state::screen_vblank)); - NEOGEO_SPRITE_MIDAS(config, m_sprgen, 0).set_screen(m_screen); + NEOGEO_SPRITE_MIDAS(config, m_sprgen).set_screen(m_screen); GFXDECODE(config, m_gfxdecode, m_palette, gfx_midas); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 0x10000); diff --git a/src/mame/neogeo/neogeo.cpp b/src/mame/neogeo/neogeo.cpp index 8a382eb14e2..305e7f5a481 100644 --- a/src/mame/neogeo/neogeo.cpp +++ b/src/mame/neogeo/neogeo.cpp @@ -1945,7 +1945,7 @@ void neogeo_base_state::neogeo_base(machine_config &config) /* 4096 colors * two banks * normal and shadow */ PALETTE(config, m_palette, palette_device::BLACK, 4096*2*2); - NEOGEO_SPRITE_OPTIMZIED(config, m_sprgen, 0).set_screen(m_screen); + NEOGEO_SPRITE_OPTIMZIED(config, m_sprgen).set_screen(m_screen); /* audio hardware */ INPUT_MERGER_ALL_HIGH(config, m_audionmi); @@ -2012,7 +2012,7 @@ void mvs_led_state::mv1(machine_config &config) neogeo_arcade(config); neogeo_stereo(config); - NG_MEMCARD(config, m_memcard, 0); + NG_MEMCARD(config, m_memcard); NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge, "joy", false); @@ -2056,7 +2056,7 @@ void mvs_led_el_state::mv2f(machine_config &config) neogeo_arcade(config); neogeo_stereo(config); - NG_MEMCARD(config, m_memcard, 0); + NG_MEMCARD(config, m_memcard); NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge, "joy", false); @@ -2073,7 +2073,7 @@ void mvs_led_el_state::mv4f(machine_config &config) neogeo_arcade(config); neogeo_stereo(config); - NG_MEMCARD(config, m_memcard, 0); + NG_MEMCARD(config, m_memcard); NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge, "joy", false); @@ -2090,7 +2090,7 @@ void mvs_led_el_state::mv6f(machine_config &config) neogeo_arcade(config); neogeo_stereo(config); - NG_MEMCARD(config, m_memcard, 0); + NG_MEMCARD(config, m_memcard); NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge, "joy", false); @@ -2107,7 +2107,7 @@ void mvs_led_state::mv1_fixed(machine_config &config) neogeo_arcade(config); neogeo_stereo(config); - NG_MEMCARD(config, m_memcard, 0); + NG_MEMCARD(config, m_memcard); NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge, "joy", true); @@ -2151,7 +2151,7 @@ void aes_state::aes_ntsc(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &aes_state::aes_main_map); - NG_MEMCARD(config, m_memcard, 0); + NG_MEMCARD(config, m_memcard); NEOGEO_CART_SLOT(config, m_slots[0], neogeo_cart, nullptr); diff --git a/src/mame/neogeo/neogeo_spr.cpp b/src/mame/neogeo/neogeo_spr.cpp index f3c3472112d..160c077449d 100644 --- a/src/mame/neogeo/neogeo_spr.cpp +++ b/src/mame/neogeo/neogeo_spr.cpp @@ -615,7 +615,7 @@ void neosprite_base_device::set_pens(const pen_t* pens) DEFINE_DEVICE_TYPE(NEOGEO_SPRITE_REGULAR, neosprite_regular_device, "neosprite_reg", "Neo-Geo Sprites (regular)") -neosprite_regular_device::neosprite_regular_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +neosprite_regular_device::neosprite_regular_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neosprite_base_device(mconfig, NEOGEO_SPRITE_REGULAR, tag, owner, clock) { } @@ -663,7 +663,7 @@ inline void neosprite_regular_device::draw_pixel(int romaddr, uint32_t* dst, con DEFINE_DEVICE_TYPE(NEOGEO_SPRITE_OPTIMZIED, neosprite_optimized_device, "neosprite_opt", "Neo-Geo Sprites (optimized)") -neosprite_optimized_device::neosprite_optimized_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +neosprite_optimized_device::neosprite_optimized_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neosprite_base_device(mconfig, NEOGEO_SPRITE_OPTIMZIED, tag, owner, clock) , m_spritegfx8(nullptr) { @@ -740,7 +740,7 @@ inline void neosprite_optimized_device::draw_pixel(int romaddr, uint32_t* dst, c DEFINE_DEVICE_TYPE(NEOGEO_SPRITE_MIDAS, neosprite_midas_device, "midassprite", "MIDAS Sprites") -neosprite_midas_device::neosprite_midas_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +neosprite_midas_device::neosprite_midas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : neosprite_base_device(mconfig, NEOGEO_SPRITE_MIDAS, tag, owner, clock) { m_bppshift = 8; diff --git a/src/mame/neogeo/neogeo_spr.h b/src/mame/neogeo/neogeo_spr.h index bc546b8a44a..60437299009 100644 --- a/src/mame/neogeo/neogeo_spr.h +++ b/src/mame/neogeo/neogeo_spr.h @@ -7,7 +7,7 @@ #pragma once // todo, move these back, currently the sprite code needs some of the values tho -#define NEOGEO_MASTER_CLOCK (24000000) +#define NEOGEO_MASTER_CLOCK XTAL::u(24000000) #define NEOGEO_MAIN_CPU_CLOCK (NEOGEO_MASTER_CLOCK / 2) #define NEOGEO_AUDIO_CPU_CLOCK (NEOGEO_MASTER_CLOCK / 6) #define NEOGEO_YM2610_CLOCK (NEOGEO_MASTER_CLOCK / 3) @@ -98,7 +98,7 @@ protected: class neosprite_regular_device : public neosprite_base_device { public: - neosprite_regular_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neosprite_regular_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void draw_pixel(int romaddr, uint32_t* dst, const pen_t *line_pens) override; virtual void set_sprite_region(uint8_t* region_sprites, uint32_t region_sprites_size) override; @@ -110,7 +110,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SPRITE_REGULAR, neosprite_regular_device) class neosprite_optimized_device : public neosprite_base_device { public: - neosprite_optimized_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neosprite_optimized_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void optimize_sprite_data() override; virtual void set_optimized_sprite_data(uint8_t* sprdata, uint32_t mask) override; virtual void draw_pixel(int romaddr, uint32_t* dst, const pen_t *line_pens) override; @@ -127,7 +127,7 @@ DECLARE_DEVICE_TYPE(NEOGEO_SPRITE_OPTIMZIED, neosprite_optimized_device) class neosprite_midas_device : public neosprite_base_device { public: - neosprite_midas_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + neosprite_midas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void draw_pixel(int romaddr, uint32_t* dst, const pen_t *line_pens) override; diff --git a/src/mame/neogeo/neogeocd.cpp b/src/mame/neogeo/neogeocd.cpp index 6b4a8166abe..bc14e4a7853 100644 --- a/src/mame/neogeo/neogeocd.cpp +++ b/src/mame/neogeo/neogeocd.cpp @@ -1052,7 +1052,7 @@ void ngcd_state::neocd_ntsc(machine_config &config) m_screen->set_screen_update(FUNC(ngcd_state::screen_update)); // temporary until things are cleaned up - LC89510_TEMP(config, m_tempcdc, 0); // cd controller + LC89510_TEMP(config, m_tempcdc); // cd controller m_tempcdc->set_cdrom_tag("cdrom"); m_tempcdc->set_is_neoCD(true); m_tempcdc->set_type1_interrupt_callback(FUNC(ngcd_state::interrupt_callback_type1)); diff --git a/src/mame/neogeo/neopcb.cpp b/src/mame/neogeo/neopcb.cpp index 88ce619d7fb..a673509c179 100644 --- a/src/mame/neogeo/neopcb.cpp +++ b/src/mame/neogeo/neopcb.cpp @@ -80,9 +80,9 @@ void neopcb_state::neopcb(machine_config &config) NEOGEO_CTRL_EDGE_CONNECTOR(config, m_edge, neogeo_arc_edge, "joy", true); - NG_CMC_PROT(config, "cmc50", 0); - NG_PCM2_PROT(config, "pcm2", 0); - NG_PVC_PROT(config, "pvc", 0); + NG_CMC_PROT(config, "cmc50"); + NG_PCM2_PROT(config, "pcm2"); + NG_PVC_PROT(config, "pvc"); } diff --git a/src/mame/neogeo/ng_memcard.cpp b/src/mame/neogeo/ng_memcard.cpp index c82549cba7c..ad6fa499fa1 100644 --- a/src/mame/neogeo/ng_memcard.cpp +++ b/src/mame/neogeo/ng_memcard.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(NG_MEMCARD, ng_memcard_device, "ng_memcard", "NeoGeo Memory C // ng_memcard_device - constructor //------------------------------------------------- -ng_memcard_device::ng_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ng_memcard_device::ng_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NG_MEMCARD, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/mame/neogeo/ng_memcard.h b/src/mame/neogeo/ng_memcard.h index 186a998cc17..a27301a3924 100644 --- a/src/mame/neogeo/ng_memcard.h +++ b/src/mame/neogeo/ng_memcard.h @@ -21,7 +21,7 @@ class ng_memcard_device : public device_t, public device_memcard_image_interface { public: // construction/destruction - ng_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ng_memcard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_image_interface implementation virtual bool is_reset_on_load() const noexcept override { return false; } diff --git a/src/mame/netronics/elf.cpp b/src/mame/netronics/elf.cpp index dad9f1667f6..c30a8857374 100644 --- a/src/mame/netronics/elf.cpp +++ b/src/mame/netronics/elf.cpp @@ -259,7 +259,7 @@ void elf2_state::elf2(machine_config &config) SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER); /* devices */ - MM74C923(config, m_kb, 0); + MM74C923(config, m_kb); m_kb->set_cap_osc(CAP_U(0.15)); m_kb->set_cap_debounce(CAP_U(1)); m_kb->da_wr_callback().set(FUNC(elf2_state::da_w)); @@ -268,8 +268,8 @@ void elf2_state::elf2(machine_config &config) m_kb->x3_rd_callback().set_ioport("X3"); m_kb->x4_rd_callback().set_ioport("X4"); - DM9368(config, m_led_h, 0).update_cb().set(FUNC(elf2_state::digit_w<0>)); - DM9368(config, m_led_l, 0).update_cb().set(FUNC(elf2_state::digit_w<1>)); + DM9368(config, m_led_h).update_cb().set(FUNC(elf2_state::digit_w<0>)); + DM9368(config, m_led_l).update_cb().set(FUNC(elf2_state::digit_w<1>)); SPEAKER(config, "mono").front_center(); diff --git a/src/mame/next/next.cpp b/src/mame/next/next.cpp index 9b862594bb9..7eb366ba0af 100644 --- a/src/mame/next/next.cpp +++ b/src/mame/next/next.cpp @@ -1022,7 +1022,7 @@ void next_state::ncr5390(device_t *device) { ncr5390_device &adapter = downcast(*device); - adapter.set_clock(10000000); + adapter.set_clock(XTAL::u(10000000)); adapter.irq_handler_cb().set(*this, FUNC(next_state::scsi_irq)); adapter.drq_handler_cb().set(*this, FUNC(next_state::scsi_drq)); } @@ -1046,7 +1046,7 @@ void next_state::next_base(machine_config &config) SCC8530(config, scc, XTAL(25'000'000)); scc->intrq_callback().set(FUNC(next_state::scc_irq)); - NEXTKBD(config, keyboard, 0); + NEXTKBD(config, keyboard); keyboard->int_change_wr_callback().set(FUNC(next_state::keyboard_irq)); keyboard->int_power_wr_callback().set(FUNC(next_state::power_irq)); keyboard->int_nmi_wr_callback().set(FUNC(next_state::nmi_irq)); @@ -1060,7 +1060,7 @@ void next_state::next_base(machine_config &config) NSCSI_CONNECTOR(config, "scsibus:6", next_scsi_devices, nullptr); NSCSI_CONNECTOR(config, "scsibus:7", next_scsi_devices, "ncr5390", true).set_option_machine_config("ncr5390", [this] (device_t *device) { ncr5390(device); }); - MB8795(config, net, 0); + MB8795(config, net); net->tx_irq().set(FUNC(next_state::net_tx_irq)); net->rx_irq().set(FUNC(next_state::net_rx_irq)); net->tx_drq().set(FUNC(next_state::net_tx_drq)); @@ -1072,14 +1072,14 @@ void next_state::next_base(machine_config &config) void next_state::next_mo_config(machine_config &config) { - NEXTMO(config, mo, 0); + NEXTMO(config, mo); mo->irq_wr_callback().set(FUNC(next_state::mo_irq)); mo->drq_wr_callback().set(FUNC(next_state::mo_drq)); } void next_state::next_fdc_config(machine_config &config) { - N82077AA(config, fdc, 24'000'000, n82077aa_device::mode_t::PS2); + N82077AA(config, fdc, XTAL::u(24'000'000), n82077aa_device::mode_t::PS2); fdc->intrq_wr_callback().set(FUNC(next_state::fdc_irq)); fdc->drq_wr_callback().set(FUNC(next_state::fdc_drq)); FLOPPY_CONNECTOR(config, "fdc:0", next_floppies, "35ed", floppy_image_device::default_pc_floppy_formats); diff --git a/src/mame/next/nextkbd.cpp b/src/mame/next/nextkbd.cpp index deb6036f76c..621fa6bbf68 100644 --- a/src/mame/next/nextkbd.cpp +++ b/src/mame/next/nextkbd.cpp @@ -16,7 +16,7 @@ void nextkbd_device::amap(address_map &map) map(0x8, 0xb).rw(FUNC(nextkbd_device::kmdata_r), FUNC(nextkbd_device::kmdata_w)); } -nextkbd_device::nextkbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nextkbd_device::nextkbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEXTKBD, tag, owner, clock), int_change_cb(*this), int_power_cb(*this), diff --git a/src/mame/next/nextkbd.h b/src/mame/next/nextkbd.h index f07afaf405a..0fc72d3f72d 100644 --- a/src/mame/next/nextkbd.h +++ b/src/mame/next/nextkbd.h @@ -8,7 +8,7 @@ class nextkbd_device : public device_t { public: - nextkbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nextkbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_change_wr_callback() { return int_change_cb.bind(); } auto int_power_wr_callback() { return int_power_cb.bind(); } diff --git a/src/mame/next/nextmo.cpp b/src/mame/next/nextmo.cpp index 8c9b3f3e8d8..58c2b0a5605 100644 --- a/src/mame/next/nextmo.cpp +++ b/src/mame/next/nextmo.cpp @@ -19,7 +19,7 @@ void nextmo_device::map(address_map &map) map(0x10, 0x17).rw(FUNC(nextmo_device::r10_r), FUNC(nextmo_device::r10_w)); } -nextmo_device::nextmo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nextmo_device::nextmo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEXTMO, tag, owner, clock), r4(0), irq_cb(*this), diff --git a/src/mame/next/nextmo.h b/src/mame/next/nextmo.h index a73380d9cef..df02d9d9608 100644 --- a/src/mame/next/nextmo.h +++ b/src/mame/next/nextmo.h @@ -9,7 +9,7 @@ class nextmo_device : public device_t { public: - nextmo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nextmo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_wr_callback() { return irq_cb.bind(); } auto drq_wr_callback() { return drq_cb.bind(); } diff --git a/src/mame/nichibutsu/armedf.cpp b/src/mame/nichibutsu/armedf.cpp index 758a0c26aa2..5bd2663e8d3 100644 --- a/src/mame/nichibutsu/armedf.cpp +++ b/src/mame/nichibutsu/armedf.cpp @@ -1141,8 +1141,8 @@ void armedf_state::sound_config_common(machine_config &config) // common amongst FILTER_BIQUAD(config, m_dacfilter2).opamp_sk_lowpass_setup(RES_K(10), RES_K(10), RES_M(999.99), RES_R(0.001), CAP_N(10), CAP_N(4.7)); // R13, R9, nothing(infinite resistance), wire(short), C66, C61 m_dacfilter2->add_route(ALL_OUTPUTS, "speaker", 1.0); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, m_dacfilter1, 0.4); // SIP R2R DAC @ G11-1 with 74HC374P latch - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, m_dacfilter2, 0.4); // SIP R2R DAC @ G11-2 with 74HC374P latch + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, m_dacfilter1, 0.4); // SIP R2R DAC @ G11-1 with 74HC374P latch + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, m_dacfilter2, 0.4); // SIP R2R DAC @ G11-2 with 74HC374P latch } void armedf_state::sound_config(machine_config &config) // 3526, used on almost all non-bootlegs @@ -1188,7 +1188,7 @@ void armedf_state::terraf(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &armedf_state::terraf_map); m_maincpu->set_vblank_int("screen", FUNC(armedf_state::irq1_line_assert)); - NB1414M4(config, m_nb1414m4, 0); + NB1414M4(config, m_nb1414m4); video_config(config, 12, 8, 248); MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) @@ -1227,7 +1227,7 @@ void armedf_state::kozure(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &armedf_state::kozure_map); m_maincpu->set_vblank_int("screen", FUNC(armedf_state::irq1_line_assert)); - NB1414M4(config, m_nb1414m4, 0); + NB1414M4(config, m_nb1414m4); /* video hardware */ video_config(config, 12, 8, 248); @@ -1256,7 +1256,7 @@ void armedf_state::cclimbr2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &armedf_state::cclimbr2_map); m_maincpu->set_vblank_int("screen", FUNC(armedf_state::irq2_line_assert)); - NB1414M4(config, m_nb1414m4, 0); + NB1414M4(config, m_nb1414m4); video_config(config, 14, 16, 240); MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) @@ -1280,7 +1280,7 @@ void armedf_state::legion(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &armedf_state::legion_map); - NB1414M4(config, m_nb1414m4, 0); + NB1414M4(config, m_nb1414m4); /* sound hardware */ sound_config_legion(config); diff --git a/src/mame/nichibutsu/cclimber.cpp b/src/mame/nichibutsu/cclimber.cpp index e54fb833b03..810c26e51d4 100644 --- a/src/mame/nichibutsu/cclimber.cpp +++ b/src/mame/nichibutsu/cclimber.cpp @@ -1141,7 +1141,7 @@ void cclimber_state::root(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &cclimber_state::cclimber_map); m_maincpu->set_addrmap(AS_IO, &cclimber_state::cclimber_portmap); - LS259(config, m_mainlatch, 0); + LS259(config, m_mainlatch); m_mainlatch->q_out_cb<0>().set(FUNC(cclimber_state::nmi_mask_w)); m_mainlatch->q_out_cb<1>().set(FUNC(cclimber_state::flip_screen_x_w)); m_mainlatch->q_out_cb<2>().set(FUNC(cclimber_state::flip_screen_y_w)); @@ -1239,7 +1239,7 @@ void cclimber_state::yamato(machine_config &config) maincpu.set_addrmap(AS_OPCODES, &cclimber_state::yamato_decrypted_opcodes_map); maincpu.set_decrypted_tag(":decrypted_opcodes"); - Z80(config, m_audiocpu, 3072000); /* 3.072 MHz ? */ + Z80(config, m_audiocpu, XTAL::u(3072000)); /* 3.072 MHz ? */ m_audiocpu->set_addrmap(AS_PROGRAM, &cclimber_state::yamato_audio_map); m_audiocpu->set_addrmap(AS_IO, &cclimber_state::yamato_audio_portmap); @@ -1291,7 +1291,7 @@ void cclimber_state::swimmer(machine_config &config) Z80(config, m_maincpu, XTAL(18'432'000)/6); /* verified on pcb */ m_maincpu->set_addrmap(AS_PROGRAM, &cclimber_state::swimmer_map); - LS259(config, m_mainlatch, 0); + LS259(config, m_mainlatch); m_mainlatch->q_out_cb<0>().set(FUNC(cclimber_state::nmi_mask_w)); m_mainlatch->q_out_cb<1>().set(FUNC(cclimber_state::flip_screen_x_w)); m_mainlatch->q_out_cb<2>().set(FUNC(cclimber_state::flip_screen_y_w)); diff --git a/src/mame/nichibutsu/cop01.cpp b/src/mame/nichibutsu/cop01.cpp index c9eb144993e..109134d7bfe 100644 --- a/src/mame/nichibutsu/cop01.cpp +++ b/src/mame/nichibutsu/cop01.cpp @@ -456,9 +456,9 @@ void cop01_state::cop01(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "ay1", 1250000).add_route(ALL_OUTPUTS, "mono", 0.50); // unknown clock / divider, hand-tuned to match audio reference - AY8910(config, "ay2", 1250000).add_route(ALL_OUTPUTS, "mono", 0.25); // " - AY8910(config, "ay3", 1250000).add_route(ALL_OUTPUTS, "mono", 0.25); // " + AY8910(config, "ay1", XTAL::u(1250000)).add_route(ALL_OUTPUTS, "mono", 0.50); // unknown clock / divider, hand-tuned to match audio reference + AY8910(config, "ay2", XTAL::u(1250000)).add_route(ALL_OUTPUTS, "mono", 0.25); // " + AY8910(config, "ay3", XTAL::u(1250000)).add_route(ALL_OUTPUTS, "mono", 0.25); // " } void mightguy_state::mightguy(machine_config &config) @@ -495,7 +495,7 @@ void mightguy_state::mightguy(machine_config &config) YM3526(config, "ymsnd", AUDIOCPU_CLOCK/2).add_route(ALL_OUTPUTS, "mono", 1.0); // unknown divider - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.5); // unknown DAC } diff --git a/src/mame/nichibutsu/csplayh5.cpp b/src/mame/nichibutsu/csplayh5.cpp index f9730e6aac1..6c205349650 100644 --- a/src/mame/nichibutsu/csplayh5.cpp +++ b/src/mame/nichibutsu/csplayh5.cpp @@ -357,11 +357,11 @@ void csplayh5_state::tmp68301_parallel_port_w(uint16_t data) void csplayh5_state::csplayh5(machine_config &config) { /* basic machine hardware */ - TMP68301(config, m_maincpu, 16000000); /* TMP68301-16 */ + TMP68301(config, m_maincpu, XTAL::u(16000000)); /* TMP68301-16 */ m_maincpu->set_addrmap(AS_PROGRAM, &csplayh5_state::csplayh5_map); m_maincpu->out_parallel_callback().set(FUNC(csplayh5_state::tmp68301_parallel_port_w)); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(csplayh5_state::csplayh5_irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(csplayh5_state::csplayh5_irq), "screen", 0, 1); #if USE_H8 h830002_device &subcpu(H83002(config, "subcpu", DVD_CLOCK/2)); /* unknown divider */ @@ -382,7 +382,7 @@ void csplayh5_state::csplayh5(machine_config &config) SCREEN(config, "screen", SCREEN_TYPE_RASTER); /* sound hardware */ - NICHISND(config, m_nichisnd, 0); + NICHISND(config, m_nichisnd); } /*************************************************************************** diff --git a/src/mame/nichibutsu/galivan.cpp b/src/mame/nichibutsu/galivan.cpp index 551c60e535e..d5b2ada9639 100644 --- a/src/mame/nichibutsu/galivan.cpp +++ b/src/mame/nichibutsu/galivan.cpp @@ -575,8 +575,8 @@ void galivan_state::galivan_common(machine_config &config) YM3526(config, "ymsnd", XTAL(8'000'000)/2).add_route(ALL_OUTPUTS, m_ymfilter, 0.4922); // note the two dac channel volume mix values might be backwards, we need a pcb reference recording! - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, m_dacfilter1, 0.2095); // SIP R2R DAC @ RA1 with 74HC374P latch - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, m_dacfilter2, 0.2983); // SIP R2R DAC @ RA2 with 74HC374P latch + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, m_dacfilter1, 0.2095); // SIP R2R DAC @ RA1 with 74HC374P latch + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, m_dacfilter2, 0.2983); // SIP R2R DAC @ RA2 with 74HC374P latch } void galivan_state::galivan(machine_config &config) @@ -616,7 +616,7 @@ void galivan_state::ninjemak(machine_config &config) MCFG_MACHINE_START_OVERRIDE(galivan_state,ninjemak) MCFG_MACHINE_RESET_OVERRIDE(galivan_state,ninjemak) - NB1414M4(config, m_nb1414m4, 0); + NB1414M4(config, m_nb1414m4); /* video hardware */ MCFG_VIDEO_START_OVERRIDE(galivan_state,ninjemak) diff --git a/src/mame/nichibutsu/gomoku_a.cpp b/src/mame/nichibutsu/gomoku_a.cpp index 633799d39d0..0d34e8a9187 100644 --- a/src/mame/nichibutsu/gomoku_a.cpp +++ b/src/mame/nichibutsu/gomoku_a.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(GOMOKU_SOUND, gomoku_sound_device, "gomoku_sound", "Gomoku Na // gomoku_sound_device - constructor //------------------------------------------------- -gomoku_sound_device::gomoku_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gomoku_sound_device::gomoku_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GOMOKU_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_sound_rom(*this, DEVICE_SELF) diff --git a/src/mame/nichibutsu/gomoku_a.h b/src/mame/nichibutsu/gomoku_a.h index 0c077de96bd..484a042309f 100644 --- a/src/mame/nichibutsu/gomoku_a.h +++ b/src/mame/nichibutsu/gomoku_a.h @@ -13,7 +13,7 @@ class gomoku_sound_device : public device_t, public device_sound_interface { public: - gomoku_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 48'000); + gomoku_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 48'000); void sound1_w(offs_t offset, uint8_t data); void sound2_w(offs_t offset, uint8_t data); diff --git a/src/mame/nichibutsu/hyhoo.cpp b/src/mame/nichibutsu/hyhoo.cpp index 33ac6fe7bfa..4de6da36c6d 100644 --- a/src/mame/nichibutsu/hyhoo.cpp +++ b/src/mame/nichibutsu/hyhoo.cpp @@ -223,7 +223,7 @@ INPUT_PORTS_END void hyhoo_state::hyhoo(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5000000); /* 5.00 MHz ?? */ + Z80(config, m_maincpu, XTAL::u(5000000)); /* 5.00 MHz ?? */ m_maincpu->set_addrmap(AS_PROGRAM, &hyhoo_state::hyhoo_map); m_maincpu->set_addrmap(AS_IO, &hyhoo_state::hyhoo_io_map); m_maincpu->set_vblank_int("screen", FUNC(hyhoo_state::irq0_line_hold)); @@ -243,12 +243,12 @@ void hyhoo_state::hyhoo(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1250000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1250000))); aysnd.port_a_read_callback().set_ioport("DSWA"); aysnd.port_b_read_callback().set_ioport("DSWB"); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.35); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/nichibutsu/nb1412m2.cpp b/src/mame/nichibutsu/nb1412m2.cpp index 9dbe7fbe5ad..9e3fbe6e970 100644 --- a/src/mame/nichibutsu/nb1412m2.cpp +++ b/src/mame/nichibutsu/nb1412m2.cpp @@ -121,7 +121,7 @@ void nb1412m2_device::nb1412m2_map(address_map &map) // nb1412m2_device - constructor //------------------------------------------------- -nb1412m2_device::nb1412m2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nb1412m2_device::nb1412m2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NB1412M2, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(nb1412m2_device::nb1412m2_map), this)) diff --git a/src/mame/nichibutsu/nb1412m2.h b/src/mame/nichibutsu/nb1412m2.h index f91b3110767..70d48219937 100644 --- a/src/mame/nichibutsu/nb1412m2.h +++ b/src/mame/nichibutsu/nb1412m2.h @@ -22,7 +22,7 @@ class nb1412m2_device : public device_t, public device_memory_interface { public: // construction/destruction - nb1412m2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nb1412m2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void command_w(uint8_t data); diff --git a/src/mame/nichibutsu/nb1413m3.cpp b/src/mame/nichibutsu/nb1413m3.cpp index d237d690aab..8088fde4a60 100644 --- a/src/mame/nichibutsu/nb1413m3.cpp +++ b/src/mame/nichibutsu/nb1413m3.cpp @@ -24,7 +24,7 @@ Memo: The NB1413M3 is a Fujitsu ULA DEFINE_DEVICE_TYPE(NB1413M3, nb1413m3_device, "nb1413m3", "NB1413 Mahjong Custom") -nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NB1413M3, tag, owner, clock), m_maincpu(*this, "^maincpu"), m_sndromrgntag("voice"), diff --git a/src/mame/nichibutsu/nb1413m3.h b/src/mame/nichibutsu/nb1413m3.h index baa1d51b660..3573a9753f8 100644 --- a/src/mame/nichibutsu/nb1413m3.h +++ b/src/mame/nichibutsu/nb1413m3.h @@ -127,13 +127,13 @@ enum { class nb1413m3_device : public device_t { public: - nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int type) : + nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int type) : nb1413m3_device(mconfig, tag, owner, clock) { set_type(type); } - nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nb1413m3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~nb1413m3_device() {} // configuration helpers diff --git a/src/mame/nichibutsu/nb1414m4.cpp b/src/mame/nichibutsu/nb1414m4.cpp index 142919791ef..1d8ffcf06ef 100644 --- a/src/mame/nichibutsu/nb1414m4.cpp +++ b/src/mame/nichibutsu/nb1414m4.cpp @@ -33,7 +33,7 @@ Notes: DEFINE_DEVICE_TYPE(NB1414M4, nb1414m4_device, "nb1414m4", "NB1414M4 Custom") -nb1414m4_device::nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nb1414m4_device::nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NB1414M4, tag, owner, clock) , device_video_interface(mconfig, *this) , m_data(*this, DEVICE_SELF) diff --git a/src/mame/nichibutsu/nb1414m4.h b/src/mame/nichibutsu/nb1414m4.h index 8ee764d3978..8f477e81417 100644 --- a/src/mame/nichibutsu/nb1414m4.h +++ b/src/mame/nichibutsu/nb1414m4.h @@ -10,7 +10,7 @@ class nb1414m4_device : public device_t, public device_video_interface { public: - nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void exec(uint16_t mcu_cmd, uint8_t *vram, uint16_t &scrollx, uint16_t &scrolly, tilemap_t *tilemap); void vblank_trigger(); diff --git a/src/mame/nichibutsu/nbmj8688.cpp b/src/mame/nichibutsu/nbmj8688.cpp index d22d9b62cd9..af68146dd4e 100644 --- a/src/mame/nichibutsu/nbmj8688.cpp +++ b/src/mame/nichibutsu/nbmj8688.cpp @@ -2549,10 +2549,10 @@ INPUT_PORTS_END void nbmj8688_state::NBMJDRV_4096(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5000000); /* 5.00 MHz */ + Z80(config, m_maincpu, XTAL::u(5000000)); /* 5.00 MHz */ m_maincpu->set_vblank_int("screen", FUNC(nbmj8688_state::irq0_line_hold)); - NB1413M3(config, m_nb1413m3, 0); + NB1413M3(config, m_nb1413m3); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ @@ -2571,12 +2571,12 @@ void nbmj8688_state::NBMJDRV_4096(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - ay8910_device &psg(AY8910(config, "psg", 1250000)); + ay8910_device &psg(AY8910(config, "psg", XTAL::u(1250000))); psg.port_a_read_callback().set(m_nb1413m3, FUNC(nb1413m3_device::dipsw1_r)); // DIPSW-A read psg.port_b_read_callback().set(m_nb1413m3, FUNC(nb1413m3_device::dipsw2_r)); // DIPSW-B read psg.add_route(ALL_OUTPUTS, "speaker", 0.35); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void nbmj8688_state::NBMJDRV_256(machine_config &config) @@ -2704,12 +2704,12 @@ void nbmj8688_state::mbmj_p16bit(machine_config &config) void nbmj8688_state::mbmj_p16bit_LCD(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5000000); /* 5.00 MHz */ + Z80(config, m_maincpu, XTAL::u(5000000)); /* 5.00 MHz */ m_maincpu->set_vblank_int("screen", FUNC(nbmj8688_state::irq0_line_hold)); m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map); m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::p16bit_LCD_io_map); - NB1413M3(config, m_nb1413m3, 0); + NB1413M3(config, m_nb1413m3); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ @@ -2755,12 +2755,12 @@ void nbmj8688_state::mbmj_p16bit_LCD(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - ay8910_device &psg(AY8910(config, "psg", 1250000)); + ay8910_device &psg(AY8910(config, "psg", XTAL::u(1250000))); psg.port_a_read_callback().set(m_nb1413m3, FUNC(nb1413m3_device::dipsw1_r)); // DIPSW-A read psg.port_b_read_callback().set(m_nb1413m3, FUNC(nb1413m3_device::dipsw2_r)); // DIPSW-B read psg.add_route(ALL_OUTPUTS, "speaker", 0.35); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void nbmj8688_state::bijokkoy(machine_config &config) diff --git a/src/mame/nichibutsu/nbmj8891.cpp b/src/mame/nichibutsu/nbmj8891.cpp index 9de6bdf5cf5..e17b194106a 100644 --- a/src/mame/nichibutsu/nbmj8891.cpp +++ b/src/mame/nichibutsu/nbmj8891.cpp @@ -2208,9 +2208,9 @@ void nbmj8891_state::gionbana(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - YM3812(config, "fmsnd", 2500000).add_route(ALL_OUTPUTS, "speaker", 0.5); + YM3812(config, "fmsnd", XTAL::u(2500000)).add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC } void nbmj8891_state::mgion(machine_config &config) diff --git a/src/mame/nichibutsu/nbmj8900.cpp b/src/mame/nichibutsu/nbmj8900.cpp index 1657b885e78..647f301c82b 100644 --- a/src/mame/nichibutsu/nbmj8900.cpp +++ b/src/mame/nichibutsu/nbmj8900.cpp @@ -328,9 +328,9 @@ void nbmj8900_state::ohpaipee(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - YM3812(config, "ymsnd", 2500000).add_route(ALL_OUTPUTS, "speaker", 0.7); + YM3812(config, "ymsnd", XTAL::u(2500000)).add_route(ALL_OUTPUTS, "speaker", 0.7); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.42); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.42); // unknown DAC } void nbmj8900_state::togenkyo(machine_config &config) diff --git a/src/mame/nichibutsu/nbmj8991.cpp b/src/mame/nichibutsu/nbmj8991.cpp index 5dc57934d6a..335597390f1 100644 --- a/src/mame/nichibutsu/nbmj8991.cpp +++ b/src/mame/nichibutsu/nbmj8991.cpp @@ -1325,7 +1325,7 @@ void nbmj8991_state::nbmjdrv1(machine_config &config) // galkoku m_maincpu->set_addrmap(AS_IO, &nbmj8991_state::galkoku_io_map); m_maincpu->set_vblank_int("screen", FUNC(nbmj8991_state::irq0_line_hold)); - NB1413M3(config, m_nb1413m3, 0); + NB1413M3(config, m_nb1413m3); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -1342,7 +1342,7 @@ void nbmj8991_state::nbmjdrv1(machine_config &config) // galkoku SPEAKER(config, "speaker").front_center(); YM3812(config, "fmsnd", 25000000/10).add_route(ALL_OUTPUTS, "speaker", 0.7); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } @@ -1354,9 +1354,9 @@ void nbmj8991_state::nbmjdrv2(machine_config &config) // pstadium m_maincpu->set_addrmap(AS_IO, &nbmj8991_state::pstadium_io_map); m_maincpu->set_vblank_int("screen", FUNC(nbmj8991_state::irq0_line_hold)); - NB1413M3(config, m_nb1413m3, 0); + NB1413M3(config, m_nb1413m3); - Z80(config, m_audiocpu, 4000000); /* 4.00 MHz */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* 4.00 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::nbmj8991_sound_map); m_audiocpu->set_addrmap(AS_IO, &nbmj8991_state::nbmj8991_sound_io_map); m_audiocpu->set_periodic_int(FUNC(nbmj8991_state::irq0_line_hold), attotime::from_hz(128*60)); // ? @@ -1379,8 +1379,8 @@ void nbmj8991_state::nbmjdrv2(machine_config &config) // pstadium YM3812(config, "fmsnd", 25000000/6.25).add_route(ALL_OUTPUTS, "speaker", 0.7); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/nichibutsu/nbmj9195.cpp b/src/mame/nichibutsu/nbmj9195.cpp index db8685bc8cb..720fbeb88f4 100644 --- a/src/mame/nichibutsu/nbmj9195.cpp +++ b/src/mame/nichibutsu/nbmj9195.cpp @@ -2514,7 +2514,7 @@ void nbmj9195_state::NBMJDRV1_base(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &nbmj9195_state::sailorws_map); m_maincpu->set_addrmap(AS_IO, &nbmj9195_state::sailorws_io_map); - tmpz84c011_device& audiocpu(TMPZ84C011(config, "audiocpu", 8000000)); /* TMPZ84C011, 8.00 MHz */ + tmpz84c011_device& audiocpu(TMPZ84C011(config, "audiocpu", XTAL::u(8000000))); /* TMPZ84C011, 8.00 MHz */ audiocpu.set_daisy_config(daisy_chain_sound); audiocpu.set_addrmap(AS_PROGRAM, &nbmj9195_state::sailorws_sound_map); audiocpu.set_addrmap(AS_IO, &nbmj9195_state::sailorws_sound_io_map); @@ -2542,10 +2542,10 @@ void nbmj9195_state::NBMJDRV1_base(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM3812(config, "ymsnd", 4000000).add_route(ALL_OUTPUTS, "speaker", 0.7); + YM3812(config, "ymsnd", XTAL::u(4000000)).add_route(ALL_OUTPUTS, "speaker", 0.7); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } void nbmj9195_state::NBMJDRV1(machine_config &config) diff --git a/src/mame/nichibutsu/nichisnd.cpp b/src/mame/nichibutsu/nichisnd.cpp index 85f25bde76a..98ea73d8712 100644 --- a/src/mame/nichibutsu/nichisnd.cpp +++ b/src/mame/nichibutsu/nichisnd.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(NICHISND, nichisnd_device, "nichisnd", "Nichibutsu Sound Devi // nichisnd_device - constructor //------------------------------------------------- -nichisnd_device::nichisnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nichisnd_device::nichisnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NICHISND, tag, owner, clock), m_soundlatch(*this, "soundlatch"), m_sound_rom(*this, "audiorom"), @@ -81,7 +81,7 @@ static const z80_daisy_config daisy_chain[] = void nichisnd_device::device_add_mconfig(machine_config &config) { - tmpz84c011_device& audiocpu(TMPZ84C011(config, "audiocpu", 8000000)); /* TMPZ84C011, 8.00 MHz */ + tmpz84c011_device& audiocpu(TMPZ84C011(config, "audiocpu", XTAL::u(8000000))); /* TMPZ84C011, 8.00 MHz */ audiocpu.set_daisy_config(daisy_chain); audiocpu.set_addrmap(AS_PROGRAM, &nichisnd_device::nichisnd_map); audiocpu.set_addrmap(AS_IO, &nichisnd_device::nichisnd_io_map); @@ -97,10 +97,10 @@ void nichisnd_device::device_add_mconfig(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM3812(config, "ymsnd", 4000000).add_route(ALL_OUTPUTS, "speaker", 1.0); + YM3812(config, "ymsnd", XTAL::u(4000000)).add_route(ALL_OUTPUTS, "speaker", 1.0); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.37); // unknown DAC } diff --git a/src/mame/nichibutsu/nichisnd.h b/src/mame/nichibutsu/nichisnd.h index 30ddda36f7b..72e723cd4d6 100644 --- a/src/mame/nichibutsu/nichisnd.h +++ b/src/mame/nichibutsu/nichisnd.h @@ -28,7 +28,7 @@ class nichisnd_device : public device_t { public: // construction/destruction - nichisnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nichisnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void sound_host_command_w(uint8_t data); diff --git a/src/mame/nichibutsu/nightgal.cpp b/src/mame/nichibutsu/nightgal.cpp index fd42c7219e3..3b6268a44e4 100644 --- a/src/mame/nichibutsu/nightgal.cpp +++ b/src/mame/nichibutsu/nightgal.cpp @@ -829,10 +829,10 @@ void nightgal_state::sexygal(machine_config &config) NSC8105(config, m_audiocpu, MASTER_CLOCK / 8); m_audiocpu->set_addrmap(AS_PROGRAM, &nightgal_state::sexygal_audio_map); - clock_device &sampleclk(CLOCK(config, "sampleclk", 6000)); // quite a wild guess + clock_device &sampleclk(CLOCK(config, "sampleclk", XTAL::u(6000))); // quite a wild guess sampleclk.signal_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.25); // unknown DAC config.device_remove("aysnd"); diff --git a/src/mame/nichibutsu/niyanpai.cpp b/src/mame/nichibutsu/niyanpai.cpp index 0802bb10493..22553a28052 100644 --- a/src/mame/nichibutsu/niyanpai.cpp +++ b/src/mame/nichibutsu/niyanpai.cpp @@ -705,7 +705,7 @@ void niyanpai_state::niyanpai(machine_config &config) PALETTE(config, m_palette).set_entries(256*3); /* sound hardware */ - NICHISND(config, "nichisnd", 0); + NICHISND(config, "nichisnd"); } void niyanpai_state::musobana(machine_config &config) diff --git a/src/mame/nichibutsu/pastelg.cpp b/src/mame/nichibutsu/pastelg.cpp index 1259a2a383a..44b8242df06 100644 --- a/src/mame/nichibutsu/pastelg.cpp +++ b/src/mame/nichibutsu/pastelg.cpp @@ -382,12 +382,12 @@ void pastelg_state::pastelg(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1250000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1250000))); aysnd.port_a_read_callback().set_ioport("DSWA"); aysnd.port_b_read_callback().set_ioport("DSWB"); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.35); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } /* @@ -421,7 +421,7 @@ void threeds_state::threeds(machine_config &config) m_maincpu->set_addrmap(AS_IO, &threeds_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(threeds_state::irq0_line_assert)); - NB1413M3(config, m_nb1413m3, 0); + NB1413M3(config, m_nb1413m3); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ @@ -438,12 +438,12 @@ void threeds_state::threeds(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1250000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1250000))); aysnd.port_a_read_callback().set_ioport("DSWB"); aysnd.port_b_read_callback().set_ioport("DSWA"); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.35); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/nichibutsu/seicross.cpp b/src/mame/nichibutsu/seicross.cpp index 302b309cec0..7c3c8b0d795 100644 --- a/src/mame/nichibutsu/seicross.cpp +++ b/src/mame/nichibutsu/seicross.cpp @@ -413,7 +413,7 @@ void seicross_state::no_nvram(machine_config &config) aysnd.port_b_write_callback().set(FUNC(seicross_state::portB_w)); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_4BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.12); // unknown DAC + DAC_4BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.12); // unknown DAC } diff --git a/src/mame/nichibutsu/tubep.cpp b/src/mame/nichibutsu/tubep.cpp index 853669537bc..33c904e076f 100644 --- a/src/mame/nichibutsu/tubep.cpp +++ b/src/mame/nichibutsu/tubep.cpp @@ -795,7 +795,7 @@ void tubep_state::tubep(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &tubep_state::tubep_sound_map); m_soundcpu->set_addrmap(AS_IO, &tubep_state::tubep_sound_portmap); - NSC8105(config, m_mcu, 6000000); /* 6 MHz Xtal - divided internally ??? */ + NSC8105(config, m_mcu, XTAL::u(6000000)); /* 6 MHz Xtal - divided internally ??? */ m_mcu->set_ram_enable(false); m_mcu->set_addrmap(AS_PROGRAM, &tubep_state::nsc_map); diff --git a/src/mame/nichibutsu/wiping_a.cpp b/src/mame/nichibutsu/wiping_a.cpp index 8d43425f7d3..c22f51306d4 100644 --- a/src/mame/nichibutsu/wiping_a.cpp +++ b/src/mame/nichibutsu/wiping_a.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(WIPING_CUSTOM, wiping_sound_device, "wiping_sound", "Wiping Custom Sound") -wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WIPING_CUSTOM, tag, owner, clock), device_sound_interface(mconfig, *this), m_last_channel(nullptr), diff --git a/src/mame/nichibutsu/wiping_a.h b/src/mame/nichibutsu/wiping_a.h index 6a5ca1c1de5..e8dd1ef2f5e 100644 --- a/src/mame/nichibutsu/wiping_a.h +++ b/src/mame/nichibutsu/wiping_a.h @@ -8,7 +8,7 @@ class wiping_sound_device : public device_t, public device_sound_interface { public: - wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(offs_t offset, uint8_t data); diff --git a/src/mame/nintendo/aleck64.cpp b/src/mame/nintendo/aleck64.cpp index 7f14ecaa007..5bc046da566 100644 --- a/src/mame/nintendo/aleck64.cpp +++ b/src/mame/nintendo/aleck64.cpp @@ -1036,14 +1036,14 @@ INPUT_PORTS_END void aleck64_state::aleck64(machine_config &config) { /* basic machine hardware */ - VR4300BE(config, m_vr4300, 93750000); + VR4300BE(config, m_vr4300, XTAL::u(93750000)); m_vr4300->set_icache_size(16384); m_vr4300->set_dcache_size(8192); m_vr4300->set_system_clock(62500000); m_vr4300->set_addrmap(AS_PROGRAM, &aleck64_state::n64_map); m_vr4300->set_force_no_drc(true); - RSP(config, m_rsp, 62500000); + RSP(config, m_rsp, XTAL::u(62500000)); m_rsp->dp_reg_r().set(m_rcp_periphs, FUNC(n64_periphs::dp_reg_r)); m_rsp->dp_reg_w().set(m_rcp_periphs, FUNC(n64_periphs::dp_reg_w)); m_rsp->sp_reg_r().set(m_rcp_periphs, FUNC(n64_periphs::sp_reg_r)); @@ -1068,7 +1068,7 @@ void aleck64_state::aleck64(machine_config &config) DMADAC(config, "dac1").add_route(ALL_OUTPUTS, "lspeaker", 1.0); DMADAC(config, "dac2").add_route(ALL_OUTPUTS, "rspeaker", 1.0); - N64PERIPH(config, m_rcp_periphs, 0); + N64PERIPH(config, m_rcp_periphs); } uint32_t aleck64_state::screen_update_e90(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) diff --git a/src/mame/nintendo/dkong_a.cpp b/src/mame/nintendo/dkong_a.cpp index 1d8dfa93e58..dcb7482b415 100644 --- a/src/mame/nintendo/dkong_a.cpp +++ b/src/mame/nintendo/dkong_a.cpp @@ -1376,7 +1376,7 @@ void dkong_state::radarscp1_audio(machine_config &config) vp1.read_cb<6>().set("tms", FUNC(m58817_device::status_r)); /* tms memory controller */ - M58819(config, "m58819", 0); + M58819(config, "m58819"); M58817(config, m_m58817, XTAL(640'000)); m_m58817->m0().set("m58819", FUNC(tms6100_device::m0_w)); diff --git a/src/mame/nintendo/gamecube.cpp b/src/mame/nintendo/gamecube.cpp index 3917e09d375..7b6e4e29691 100644 --- a/src/mame/nintendo/gamecube.cpp +++ b/src/mame/nintendo/gamecube.cpp @@ -144,7 +144,7 @@ void gamecube_state::machine_reset() void gamecube_state::gc(machine_config &config) { - PPC603(config, m_cpu, 485000000 / 100); // 485 MHz IBM "Gekko" (750CXe/750FX based) + PPC603(config, m_cpu, XTAL::u(485000000) / 100); // 485 MHz IBM "Gekko" (750CXe/750FX based) m_cpu->set_addrmap(AS_PROGRAM, &gamecube_state::ppc_mem); } diff --git a/src/mame/nintendo/gb.cpp b/src/mame/nintendo/gb.cpp index 704df9789ad..f7720124390 100644 --- a/src/mame/nintendo/gb.cpp +++ b/src/mame/nintendo/gb.cpp @@ -1077,7 +1077,7 @@ void gb_state::gameboy(machine_config &config) void sgb_state::supergb(machine_config &config) { // basic machine hardware - LR35902(config, m_maincpu, 4'295'454); // derived from SNES xtal + LR35902(config, m_maincpu, XTAL::u(4'295'454)); // derived from SNES xtal m_maincpu->set_addrmap(AS_PROGRAM, &sgb_state::sgb_map); m_maincpu->timer_cb().set(FUNC(sgb_state::gb_timer_callback)); m_maincpu->set_halt_bug(true); @@ -1101,7 +1101,7 @@ void sgb_state::supergb(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DMG_APU(config, m_apu, 4'295'454); + DMG_APU(config, m_apu, XTAL::u(4'295'454)); m_apu->add_route(0, "lspeaker", 0.50); m_apu->add_route(1, "rspeaker", 0.50); diff --git a/src/mame/nintendo/gba.cpp b/src/mame/nintendo/gba.cpp index 83d88df5237..3223f25002e 100644 --- a/src/mame/nintendo/gba.cpp +++ b/src/mame/nintendo/gba.cpp @@ -1456,7 +1456,7 @@ void gba_state::gbadv(machine_config &config) ARM7(config, m_maincpu, XTAL(16'777'216)); m_maincpu->set_addrmap(AS_PROGRAM, &gba_state::gba_map); - gba_lcd_device &lcd(GBA_LCD(config, "lcd", 0)); + gba_lcd_device &lcd(GBA_LCD(config, "lcd")); lcd.int_hblank_callback().set(FUNC(gba_state::int_hblank_callback)); lcd.int_vblank_callback().set(FUNC(gba_state::int_vblank_callback)); lcd.int_vcount_callback().set(FUNC(gba_state::int_vcount_callback)); @@ -1469,10 +1469,10 @@ void gba_state::gbadv(machine_config &config) m_gbsound->add_route(0, "lspeaker", 0.5); m_gbsound->add_route(1, "rspeaker", 0.5); - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_ldaca, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_rdaca, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_ldacb, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_rdacb, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_ldaca).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_rdaca).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_ldacb).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_rdacb).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC } diff --git a/src/mame/nintendo/m6502_swap_op_d2_d7.cpp b/src/mame/nintendo/m6502_swap_op_d2_d7.cpp index fa58c4e834d..7663aad9335 100644 --- a/src/mame/nintendo/m6502_swap_op_d2_d7.cpp +++ b/src/mame/nintendo/m6502_swap_op_d2_d7.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(M6502_SWAP_OP_D2_D7, m6502_swap_op_d2_d7, "m6502_swap_op_d2_d7", "M6502 swapped D2/D7") -m6502_swap_op_d2_d7::m6502_swap_op_d2_d7(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6502_swap_op_d2_d7::m6502_swap_op_d2_d7(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6502_SWAP_OP_D2_D7, tag, owner, clock) { } diff --git a/src/mame/nintendo/m6502_swap_op_d2_d7.h b/src/mame/nintendo/m6502_swap_op_d2_d7.h index 7521ae8fff7..d2ac80d0e2c 100644 --- a/src/mame/nintendo/m6502_swap_op_d2_d7.h +++ b/src/mame/nintendo/m6502_swap_op_d2_d7.h @@ -18,7 +18,7 @@ class m6502_swap_op_d2_d7 : public m6502_device { public: - m6502_swap_op_d2_d7(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6502_swap_op_d2_d7(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: class mi_decrypt : public mi_default { diff --git a/src/mame/nintendo/m6502_swap_op_d5_d6.cpp b/src/mame/nintendo/m6502_swap_op_d5_d6.cpp index 90616b79396..97776b65031 100644 --- a/src/mame/nintendo/m6502_swap_op_d5_d6.cpp +++ b/src/mame/nintendo/m6502_swap_op_d5_d6.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(M6502_SWAP_OP_D5_D6, m6502_swap_op_d5_d6, "m6502_swap_op_d5_d6", "M6502 swapped D5/D6") DEFINE_DEVICE_TYPE(RP2A03_CORE_SWAP_OP_D5_D6, rp2a03_core_swap_op_d5_d6, "rp2a03_core_swap_op_d5_d6", "RP2A03 core with swapped D5/D6") -m6502_swap_op_d5_d6::m6502_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6502_swap_op_d5_d6::m6502_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6502_SWAP_OP_D5_D6, tag, owner, clock) { } @@ -82,7 +82,7 @@ u8 m6502_swap_op_d5_d6::disassembler::decrypt8(u8 value, offs_t pc, bool opcode) -rp2a03_core_swap_op_d5_d6::rp2a03_core_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +rp2a03_core_swap_op_d5_d6::rp2a03_core_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_core_device(mconfig, RP2A03_CORE_SWAP_OP_D5_D6, tag, owner, clock) { } diff --git a/src/mame/nintendo/m6502_swap_op_d5_d6.h b/src/mame/nintendo/m6502_swap_op_d5_d6.h index 92061680950..70b30e24faa 100644 --- a/src/mame/nintendo/m6502_swap_op_d5_d6.h +++ b/src/mame/nintendo/m6502_swap_op_d5_d6.h @@ -18,7 +18,7 @@ class m6502_swap_op_d5_d6 : public m6502_device { public: - m6502_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6502_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_encryption_state(bool state); protected: @@ -50,7 +50,7 @@ protected: class rp2a03_core_swap_op_d5_d6 : public rp2a03_core_device { public: - rp2a03_core_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp2a03_core_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_encryption_state(bool state); protected: diff --git a/src/mame/nintendo/m6502_vtscr.cpp b/src/mame/nintendo/m6502_vtscr.cpp index 5cb7decf55f..c1521338e3c 100644 --- a/src/mame/nintendo/m6502_vtscr.cpp +++ b/src/mame/nintendo/m6502_vtscr.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(M6502_VTSCR, m6502_vtscr, "m6502_vtscr", "M6502 with VTxx scrambling") -m6502_vtscr::m6502_vtscr(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6502_vtscr::m6502_vtscr(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6502_VTSCR, tag, owner, clock) { } diff --git a/src/mame/nintendo/m6502_vtscr.h b/src/mame/nintendo/m6502_vtscr.h index 4dd76ccb0d9..04c068acad1 100644 --- a/src/mame/nintendo/m6502_vtscr.h +++ b/src/mame/nintendo/m6502_vtscr.h @@ -18,7 +18,7 @@ class m6502_vtscr : public m6502_device { public: - m6502_vtscr(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6502_vtscr(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_next_scramble(bool scr); void set_scramble(bool scr); diff --git a/src/mame/nintendo/mario.cpp b/src/mame/nintendo/mario.cpp index 4e932e3e3a9..e12e65b3ef2 100644 --- a/src/mame/nintendo/mario.cpp +++ b/src/mame/nintendo/mario.cpp @@ -378,7 +378,7 @@ void mario_state::mario(machine_config &config) void mario_state::masao(machine_config &config) { mario_base(config); - m_maincpu->set_clock(4000000); /* 4.000 MHz (?) */ + m_maincpu->set_clock(XTAL::u(4000000)); /* 4.000 MHz (?) */ m_maincpu->set_addrmap(AS_PROGRAM, &mario_state::masao_map); /* sound hardware */ diff --git a/src/mame/nintendo/mario_a.cpp b/src/mame/nintendo/mario_a.cpp index fca0c8ba98b..572e524f26e 100644 --- a/src/mame/nintendo/mario_a.cpp +++ b/src/mame/nintendo/mario_a.cpp @@ -661,7 +661,7 @@ void mario_state::mario_audio(machine_config &config) m_discrete->set_intf(mario_discrete); m_discrete->add_route(ALL_OUTPUTS, "mono", 1); #else - NETLIST_SOUND(config, "snd_nl", 48000) + NETLIST_SOUND(config, "snd_nl", XTAL::u(48000)) .set_source(netlist_mario) .add_route(ALL_OUTPUTS, "mono", 0.5); @@ -676,14 +676,14 @@ void mario_state::mario_audio(machine_config &config) void mario_state::masao_audio(machine_config &config) { - Z80(config, m_audiocpu, 24576000/16); /* ???? */ + Z80(config, m_audiocpu, XTAL::u(24576000)/16); /* ???? */ m_audiocpu->set_addrmap(AS_PROGRAM, &mario_state::masao_sound_map); SPEAKER(config, "mono").front_center(); GENERIC_LATCH_8(config, m_soundlatch); - ay8910_device &aysnd(AY8910(config, "aysnd", 14318000/6)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(14318000)/6)); aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/nintendo/n64.cpp b/src/mame/nintendo/n64.cpp index 08d8ff090a7..1d104a38ef3 100644 --- a/src/mame/nintendo/n64.cpp +++ b/src/mame/nintendo/n64.cpp @@ -433,7 +433,7 @@ INTERRUPT_GEN_MEMBER(n64_mess_state::n64_reset_poll) void n64_mess_state::n64(machine_config &config) { /* basic machine hardware */ - VR4300BE(config, m_vr4300, 93750000); + VR4300BE(config, m_vr4300, XTAL::u(93750000)); m_vr4300->set_force_no_drc(true); //m_vr4300->set_icache_size(16384); //m_vr4300->set_dcache_size(8192); @@ -441,7 +441,7 @@ void n64_mess_state::n64(machine_config &config) m_vr4300->set_addrmap(AS_PROGRAM, &n64_mess_state::n64_map); m_vr4300->set_vblank_int("screen", FUNC(n64_mess_state::n64_reset_poll)); - RSP(config, m_rsp, 62500000); + RSP(config, m_rsp, XTAL::u(62500000)); m_rsp->set_force_no_drc(true); m_rsp->dp_reg_r().set(m_rcp_periphs, FUNC(n64_periphs::dp_reg_r)); m_rsp->dp_reg_w().set(m_rcp_periphs, FUNC(n64_periphs::dp_reg_w)); @@ -468,7 +468,7 @@ void n64_mess_state::n64(machine_config &config) DMADAC(config, "dac2").add_route(ALL_OUTPUTS, "lspeaker", 1.0); DMADAC(config, "dac1").add_route(ALL_OUTPUTS, "rspeaker", 1.0); - N64PERIPH(config, m_rcp_periphs, 0); + N64PERIPH(config, m_rcp_periphs); /* cartridge */ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "n64_cart", "v64,z64,rom,n64,bin")); diff --git a/src/mame/nintendo/n64.h b/src/mame/nintendo/n64.h index e43c6cfa333..69a09c1ce18 100644 --- a/src/mame/nintendo/n64.h +++ b/src/mame/nintendo/n64.h @@ -82,7 +82,7 @@ private: public: // construction/destruction - n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t is64_r(offs_t offset); void is64_w(offs_t offset, uint32_t data); @@ -316,9 +316,9 @@ DECLARE_DEVICE_TYPE(N64PERIPH, n64_periphs) /*----------- defined in video/n64.c -----------*/ -#define DACRATE_NTSC (48681812) -#define DACRATE_PAL (49656530) -#define DACRATE_MPAL (48628316) +#define DACRATE_NTSC XTAL::u(48681812) +#define DACRATE_PAL XTAL::u(49656530) +#define DACRATE_MPAL XTAL::u(48628316) /*----------- defined in machine/n64.c -----------*/ diff --git a/src/mame/nintendo/n64_m.cpp b/src/mame/nintendo/n64_m.cpp index fcecb3c1e5f..33e40ac08a0 100644 --- a/src/mame/nintendo/n64_m.cpp +++ b/src/mame/nintendo/n64_m.cpp @@ -16,7 +16,7 @@ // device type definition DEFINE_DEVICE_TYPE(N64PERIPH, n64_periphs, "n64_periphs", "N64 Peripheral Chips") -n64_periphs::n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +n64_periphs::n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, N64PERIPH, tag, owner, clock) , device_video_interface(mconfig, *this) , m_nvram_image(nullptr) @@ -1018,7 +1018,7 @@ void n64_periphs::vi_recalculate_resolution() rectangle visarea = screen().visible_area(); // DACRATE is the quarter pixel clock and period will be for a field, not a frame - attoseconds_t period = (vi_hsync & 0xfff) * (vi_vsync & 0xfff) * HZ_TO_ATTOSECONDS(DACRATE_NTSC) / 2; + attoseconds_t period = (vi_hsync & 0xfff) * (vi_vsync & 0xfff) * HZ_TO_ATTOSECONDS(DACRATE_NTSC.value()) / 2; if (width <= 0 || height <= 0 || (vi_control & 3) == 0) { @@ -1294,7 +1294,7 @@ void n64_periphs::ai_dma() ai_status |= 0x40000000; // adjust the timer - period = attotime::from_hz(DACRATE_NTSC) * (ai_dacrate + 1) * (current->length / 4); + period = attotime::from_hz(DACRATE_NTSC.value()) * (ai_dacrate + 1) * (current->length / 4); ai_timer->adjust(period); if (((current->address + current->length) & 0x1FFF) == 0) @@ -1334,7 +1334,7 @@ uint32_t n64_periphs::ai_reg_r(offs_t offset, uint32_t mem_mask) { if (ai_status & 0x40000000) { - ret = 4 * (uint32_t)(ai_timer->remaining().as_double() * (double)DACRATE_NTSC / (double)(ai_dacrate + 1)); + ret = 4 * (uint32_t)(ai_timer->remaining().as_double() * DACRATE_NTSC.dvalue() / (double)(ai_dacrate + 1)); } else if (ai_status & 0x80000001) { @@ -1385,7 +1385,7 @@ void n64_periphs::ai_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) case 0x10/4: // AI_DACRATE_REG { ai_dacrate = data & 0x3fff; - const double frequency = (double)DACRATE_NTSC / (double)(ai_dacrate+1); + const double frequency = DACRATE_NTSC.dvalue() / (double)(ai_dacrate+1); ai_dac[0]->set_frequency(frequency); ai_dac[0]->enable(1); diff --git a/src/mame/nintendo/n8080_a.cpp b/src/mame/nintendo/n8080_a.cpp index cb9b9b5ae4d..cfc9ce84850 100644 --- a/src/mame/nintendo/n8080_a.cpp +++ b/src/mame/nintendo/n8080_a.cpp @@ -472,7 +472,7 @@ void spacefev_state::spacefev_sound(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_n8080_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); + DAC_1BIT(config, m_n8080_dac).add_route(ALL_OUTPUTS, "speaker", 0.15); SN76477(config, m_sn); m_sn->set_noise_params(RES_K(36), RES_K(150), CAP_N(1)); @@ -504,7 +504,7 @@ void sheriff_state::sheriff_sound(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_n8080_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); + DAC_1BIT(config, m_n8080_dac).add_route(ALL_OUTPUTS, "speaker", 0.15); SN76477(config, m_sn); m_sn->set_noise_params(RES_K(36), RES_K(100), CAP_N(1)); @@ -539,5 +539,5 @@ void helifire_state::helifire_sound(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // unknown DAC + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.15); // unknown DAC } diff --git a/src/mame/nintendo/nds.cpp b/src/mame/nintendo/nds.cpp index 84bf61c3e4f..e4e553249f1 100644 --- a/src/mame/nintendo/nds.cpp +++ b/src/mame/nintendo/nds.cpp @@ -22,7 +22,7 @@ #define VERBOSE_LEVEL (0) // Measured value from GBATEK. Actual crystal unknown. -#define MASTER_CLOCK (33513982) +#define MASTER_CLOCK XTAL::u(33513982) #define INT_VBL 0x00000001 #define INT_HBL 0x00000002 @@ -57,7 +57,7 @@ #define INT_NEWDMA2 0x40000000 // DSi only #define INT_NEWDMA3 0x80000000 // DSi only -static const uint32_t timer_clks[4] = { MASTER_CLOCK, MASTER_CLOCK / 64, MASTER_CLOCK / 256, MASTER_CLOCK / 1024 }; +static const XTAL timer_clks[4] = { MASTER_CLOCK, MASTER_CLOCK / 64, MASTER_CLOCK / 256, MASTER_CLOCK / 1024 }; static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, const char *s_fmt, ...) { @@ -104,7 +104,7 @@ uint32_t nds_state::arm7_io_r(offs_t offset, uint32_t mem_mask) // printf("time %f ticks %f 1/hz %f\n", time, ticks, 1.0 / m_timer_hz[timer]); time *= ticks; - time /= (1.0 / m_timer_hz[timer]); + time /= (1.0 / m_timer_hz[timer].dvalue()); elapsed = (uint32_t)time; } @@ -206,12 +206,9 @@ void nds_state::arm7_io_w(offs_t offset, uint32_t data, uint32_t mem_mask) case TIMER_OFFSET+2: case TIMER_OFFSET+3: { - double rate, clocksel; - uint32_t old_timer_regs; - int timer = (offset - TIMER_OFFSET)+4; - old_timer_regs = m_timer_regs[timer]; + uint32_t old_timer_regs = m_timer_regs[timer]; m_timer_regs[timer] = (m_timer_regs[timer] & ~(mem_mask & 0xFFFF0000)) | (data & (mem_mask & 0xFFFF0000)); @@ -226,29 +223,28 @@ void nds_state::arm7_io_w(offs_t offset, uint32_t data, uint32_t mem_mask) // enabling this timer? if ((ACCESSING_BITS_16_31) && (data & 0x800000)) { - double final; if ((old_timer_regs & 0x00800000) == 0) // start bit 0 -> 1 { m_timer_regs[timer] = (m_timer_regs[timer] & 0xFFFF0000) | (m_timer_reload[timer] & 0x0000FFFF); } - rate = 0x10000 - (m_timer_regs[timer] & 0xffff); + int rate = 0x10000 - (m_timer_regs[timer] & 0xffff); - clocksel = timer_clks[(m_timer_regs[timer] >> 16) & 3]; + XTAL clocksel = timer_clks[(m_timer_regs[timer] >> 16) & 3]; - final = clocksel / rate; + XTAL final = clocksel / rate; m_timer_hz[timer] = final; m_timer_recalc[timer] = 0; - printf("Enabling timer %d @ %f Hz regs %08x\n", timer, final, m_timer_regs[timer]); + printf("Enabling timer %d @ %f Hz regs %08x\n", timer, final.dvalue(), m_timer_regs[timer]); // enable the timer if( !(data & 0x40000) ) // if we're not in Count-Up mode { - attotime time = attotime::from_hz(final); + attotime time = attotime::from_hz(final.dvalue()); m_tmr_timer[timer]->adjust(time, timer, time); } } @@ -391,7 +387,7 @@ uint32_t nds_state::arm9_io_r(offs_t offset, uint32_t mem_mask) // printf("time %f ticks %f 1/hz %f\n", time, ticks, 1.0 / m_timer_hz[timer]); time *= ticks; - time /= (1.0 / m_timer_hz[timer]); + time /= (1.0 / m_timer_hz[timer].dvalue()); elapsed = (uint32_t)time; } @@ -443,12 +439,9 @@ void nds_state::arm9_io_w(offs_t offset, uint32_t data, uint32_t mem_mask) case TIMER_OFFSET+2: case TIMER_OFFSET+3: { - double rate, clocksel; - uint32_t old_timer_regs; - int timer = (offset - TIMER_OFFSET)+4; - old_timer_regs = m_timer_regs[timer]; + uint32_t old_timer_regs = m_timer_regs[timer]; m_timer_regs[timer] = (m_timer_regs[timer] & ~(mem_mask & 0xFFFF0000)) | (data & (mem_mask & 0xFFFF0000)); @@ -463,29 +456,27 @@ void nds_state::arm9_io_w(offs_t offset, uint32_t data, uint32_t mem_mask) // enabling this timer? if ((ACCESSING_BITS_16_31) && (data & 0x800000)) { - double final; - if ((old_timer_regs & 0x00800000) == 0) // start bit 0 -> 1 { m_timer_regs[timer] = (m_timer_regs[timer] & 0xFFFF0000) | (m_timer_reload[timer] & 0x0000FFFF); } - rate = 0x10000 - (m_timer_regs[timer] & 0xffff); + int rate = 0x10000 - (m_timer_regs[timer] & 0xffff); - clocksel = timer_clks[(m_timer_regs[timer] >> 16) & 3]; + XTAL clocksel = timer_clks[(m_timer_regs[timer] >> 16) & 3]; - final = clocksel / rate; + XTAL final = clocksel / rate; m_timer_hz[timer] = final; m_timer_recalc[timer] = 0; - printf("Enabling timer %d @ %f Hz\n", timer, final); + printf("Enabling timer %d @ %f Hz\n", timer, final.dvalue()); // enable the timer if( !(data & 0x40000) ) // if we're not in Count-Up mode { - attotime time = attotime::from_hz(final); + attotime time = attotime::from_hz(final.dvalue()); m_tmr_timer[timer]->adjust(time, timer, time); } } @@ -870,15 +861,13 @@ TIMER_CALLBACK_MEMBER(nds_state::timer_expire) // "or when the timer start bit becomes changed from 0 to 1." if (m_timer_recalc[tmr] != 0) { - double rate, clocksel, final; - attotime time; m_timer_recalc[tmr] = 0; m_timer_regs[tmr] = (m_timer_regs[tmr] & 0xFFFF0000) | (m_timer_reload[tmr] & 0x0000FFFF); - rate = 0x10000 - (m_timer_regs[tmr] & 0xffff); - clocksel = timer_clks[(m_timer_regs[tmr] >> 16) & 3]; - final = clocksel / rate; + int rate = 0x10000 - (m_timer_regs[tmr] & 0xffff); + XTAL clocksel = timer_clks[(m_timer_regs[tmr] >> 16) & 3]; + XTAL final = clocksel / rate; m_timer_hz[tmr] = final; - time = attotime::from_hz(final); + attotime time = attotime::from_hz(final); m_tmr_timer[tmr]->adjust(time, tmr, time); } diff --git a/src/mame/nintendo/nds.h b/src/mame/nintendo/nds.h index 3d94c0cfbf7..ca4297179ad 100644 --- a/src/mame/nintendo/nds.h +++ b/src/mame/nintendo/nds.h @@ -102,7 +102,7 @@ private: uint32_t m_timer_regs[8]{}; uint16_t m_timer_reload[8]{}; int m_timer_recalc[8]{}; - double m_timer_hz[8]{}; + XTAL m_timer_hz[8]; emu_timer *m_tmr_timer[8]{}, *m_irq_timer = nullptr; diff --git a/src/mame/nintendo/nes_vt09_soc.cpp b/src/mame/nintendo/nes_vt09_soc.cpp index 2daac2744b8..5f9daff1fd5 100644 --- a/src/mame/nintendo/nes_vt09_soc.cpp +++ b/src/mame/nintendo/nes_vt09_soc.cpp @@ -7,12 +7,12 @@ DEFINE_DEVICE_TYPE(NES_VT09_SOC, nes_vt09_soc_device, "nes_vt09_soc", "VT09 series System on a Chip (NTSC)") -nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt09_soc_device(mconfig, NES_VT09_SOC, tag, owner, clock) { } -nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : nes_vt02_vt03_soc_device(mconfig, type, tag, owner, clock), m_upper_write_412c_callback(*this), m_upper_read_412c_callback(*this), diff --git a/src/mame/nintendo/nes_vt09_soc.h b/src/mame/nintendo/nes_vt09_soc.h index a26cc233d7b..142a0c40b63 100644 --- a/src/mame/nintendo/nes_vt09_soc.h +++ b/src/mame/nintendo/nes_vt09_soc.h @@ -17,7 +17,7 @@ class nes_vt09_soc_device : public nes_vt02_vt03_soc_device { public: - nes_vt09_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt09_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); // are these even part of vt09, or should they be moved out of here rather than this being treated as a base class for them? auto upper_read_412c_callback() { return m_upper_read_412c_callback.bind(); } @@ -27,7 +27,7 @@ public: protected: - nes_vt09_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + nes_vt09_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); void device_start() override; virtual void device_add_mconfig(machine_config& config) override; diff --git a/src/mame/nintendo/nes_vt32_soc.cpp b/src/mame/nintendo/nes_vt32_soc.cpp index f56dbfac07b..16865ffeab9 100644 --- a/src/mame/nintendo/nes_vt32_soc.cpp +++ b/src/mame/nintendo/nes_vt32_soc.cpp @@ -10,17 +10,17 @@ DEFINE_DEVICE_TYPE(NES_VT32_SOC, nes_vt32_soc_device, "nes_vt32_soc", "VT32 series System on a Chip (FP) (NTSC)") DEFINE_DEVICE_TYPE(NES_VT32_SOC_PAL, nes_vt32_soc_pal_device, "nes_vt32_soc_pal", "VT32 series System on a Chip (FP) (PAL)") -nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : nes_vt09_soc_device(mconfig, type, tag, owner, clock) { } -nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt32_soc_device(mconfig, NES_VT32_SOC, tag, owner, clock) { } -nes_vt32_soc_pal_device::nes_vt32_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt32_soc_pal_device::nes_vt32_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt32_soc_device(mconfig, NES_VT32_SOC_PAL, tag, owner, clock) { } diff --git a/src/mame/nintendo/nes_vt32_soc.h b/src/mame/nintendo/nes_vt32_soc.h index 9a08171d04b..042c5999448 100644 --- a/src/mame/nintendo/nes_vt32_soc.h +++ b/src/mame/nintendo/nes_vt32_soc.h @@ -17,10 +17,10 @@ class nes_vt32_soc_device : public nes_vt09_soc_device { public: - nes_vt32_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt32_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: - nes_vt32_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + nes_vt32_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); virtual void device_add_mconfig(machine_config& config) override; @@ -39,7 +39,7 @@ protected: class nes_vt32_soc_pal_device : public nes_vt32_soc_device { public: - nes_vt32_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt32_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config& config) override; diff --git a/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp b/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp index 9c4d851473f..8b84681f837 100644 --- a/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp +++ b/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp @@ -17,46 +17,46 @@ DEFINE_DEVICE_TYPE(NES_VTUNKNOWN_SOC_DG, nes_vtunknown_soc_dg_device, "nes_vtunk DEFINE_DEVICE_TYPE(NES_VTUNKNOWN_SOC_FA, nes_vtunknown_soc_fa_device, "nes_vtunknown_soc_fa", "VTxx series System on a Chip (Family Pocket)") -nes_vt369_soc_device::nes_vt369_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt369_soc_device::nes_vt369_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt09_soc_device(mconfig, NES_VTUNKNOWN_SOC_CY, tag, owner, clock), m_alu(*this, "alu"), m_soundcpu(*this, "soundcpu") { } -nes_vtunknown_soc_bt_device::nes_vtunknown_soc_bt_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vtunknown_soc_bt_device::nes_vtunknown_soc_bt_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt09_soc_device(mconfig, NES_VTUNKNOWN_SOC_BT, tag, owner, clock) { } -nes_vt369_alt_soc_device::nes_vt369_alt_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +nes_vt369_alt_soc_device::nes_vt369_alt_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : nes_vt09_soc_device(mconfig, type, tag, owner, clock) { } -nes_vt369_alt_soc_device::nes_vt369_alt_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt369_alt_soc_device::nes_vt369_alt_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt369_alt_soc_device(mconfig, NES_VT369_SOC, tag, owner, clock) { } -nes_vt369_alt_swap_d5_d6_soc_device::nes_vt369_alt_swap_d5_d6_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt369_alt_swap_d5_d6_soc_device::nes_vt369_alt_swap_d5_d6_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt369_alt_soc_device(mconfig, NES_VT369_SOC_SWAP, tag, owner, clock) { } -nes_vtunknown_soc_dg_device::nes_vtunknown_soc_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +nes_vtunknown_soc_dg_device::nes_vtunknown_soc_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : nes_vt09_soc_device(mconfig, type, tag, owner, clock) { } -nes_vtunknown_soc_dg_device::nes_vtunknown_soc_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vtunknown_soc_dg_device::nes_vtunknown_soc_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vtunknown_soc_dg_device(mconfig, NES_VTUNKNOWN_SOC_DG, tag, owner, clock) { } -nes_vtunknown_soc_fa_device::nes_vtunknown_soc_fa_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vtunknown_soc_fa_device::nes_vtunknown_soc_fa_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vtunknown_soc_dg_device(mconfig, NES_VTUNKNOWN_SOC_FA, tag, owner, clock) { } @@ -70,7 +70,7 @@ void nes_vt369_soc_device::device_add_mconfig(machine_config& config) nes_vt02_vt03_soc_device::device_add_mconfig(config); m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt369_soc_device::nes_vt369_map); - VT_VT1682_ALU(config, m_alu, 0); + VT_VT1682_ALU(config, m_alu); M6502(config, m_soundcpu, RP2A03_NTSC_XTAL); m_soundcpu->set_addrmap(AS_PROGRAM, &nes_vt369_soc_device::vt369_sound_map); diff --git a/src/mame/nintendo/nes_vt369_vtunknown_soc.h b/src/mame/nintendo/nes_vt369_vtunknown_soc.h index 89c5bddbbc8..aff861b6ff7 100644 --- a/src/mame/nintendo/nes_vt369_vtunknown_soc.h +++ b/src/mame/nintendo/nes_vt369_vtunknown_soc.h @@ -18,7 +18,7 @@ class nes_vt369_soc_device : public nes_vt09_soc_device { public: - nes_vt369_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt369_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config& config) override; @@ -58,7 +58,7 @@ private: class nes_vtunknown_soc_bt_device : public nes_vt09_soc_device { public: - nes_vtunknown_soc_bt_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vtunknown_soc_bt_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config& config) override; @@ -71,10 +71,10 @@ protected: class nes_vt369_alt_soc_device : public nes_vt09_soc_device { public: - nes_vt369_alt_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt369_alt_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: - nes_vt369_alt_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + nes_vt369_alt_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); virtual void device_add_mconfig(machine_config& config) override; @@ -88,7 +88,7 @@ protected: class nes_vt369_alt_swap_d5_d6_soc_device : public nes_vt369_alt_soc_device { public: - nes_vt369_alt_swap_d5_d6_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt369_alt_swap_d5_d6_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); virtual void device_add_mconfig(machine_config& config) override; @@ -101,10 +101,10 @@ private: class nes_vtunknown_soc_dg_device : public nes_vt09_soc_device { public: - nes_vtunknown_soc_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vtunknown_soc_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: - nes_vtunknown_soc_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock); + nes_vtunknown_soc_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock); virtual void device_add_mconfig(machine_config& config) override; @@ -116,7 +116,7 @@ protected: class nes_vtunknown_soc_fa_device : public nes_vtunknown_soc_dg_device { public: - nes_vtunknown_soc_fa_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vtunknown_soc_fa_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: diff --git a/src/mame/nintendo/nes_vt_soc.cpp b/src/mame/nintendo/nes_vt_soc.cpp index 66e4668f824..3bec4264ead 100644 --- a/src/mame/nintendo/nes_vt_soc.cpp +++ b/src/mame/nintendo/nes_vt_soc.cpp @@ -65,7 +65,7 @@ void nes_vt02_vt03_soc_device::program_map(address_map &map) { } -nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : +nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_memory_interface(mconfig, *this), m_maincpu(*this, "maincpu"), @@ -111,18 +111,18 @@ nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig m_use_raster_timing_hack = false; } -nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC, tag, owner, clock) { } -nes_vt02_vt03_soc_pal_device::nes_vt02_vt03_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt02_vt03_soc_pal_device::nes_vt02_vt03_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC_PAL, tag, owner, clock) { } -nes_vt02_vt03_soc_scramble_device::nes_vt02_vt03_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +nes_vt02_vt03_soc_scramble_device::nes_vt02_vt03_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC_SCRAMBLE, tag, owner, clock) { } diff --git a/src/mame/nintendo/nes_vt_soc.h b/src/mame/nintendo/nes_vt_soc.h index 69281e7e46a..86ab604f1b4 100644 --- a/src/mame/nintendo/nes_vt_soc.h +++ b/src/mame/nintendo/nes_vt_soc.h @@ -16,7 +16,7 @@ class nes_vt02_vt03_soc_device : public device_t, public device_memory_interface { public: - nes_vt02_vt03_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_vt02_vt03_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void program_map(address_map &map); @@ -56,7 +56,7 @@ public: void set_default_palette_mode(vtxx_pal_mode pmode) { m_default_palette_mode = pmode; } protected: - nes_vt02_vt03_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nes_vt02_vt03_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -166,7 +166,7 @@ private: class nes_vt02_vt03_soc_pal_device : public nes_vt02_vt03_soc_device { public: - nes_vt02_vt03_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt02_vt03_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config& config) override; @@ -175,7 +175,7 @@ protected: class nes_vt02_vt03_soc_scramble_device : public nes_vt02_vt03_soc_device { public: - nes_vt02_vt03_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + nes_vt02_vt03_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config& config) override; diff --git a/src/mame/nintendo/nss.cpp b/src/mame/nintendo/nss.cpp index d9de8256fca..46f2f10b8c2 100644 --- a/src/mame/nintendo/nss.cpp +++ b/src/mame/nintendo/nss.cpp @@ -847,13 +847,13 @@ void nss_state::nss(machine_config &config) config.set_perfect_quantum(m_maincpu); /* nss hardware */ - Z80(config, m_bioscpu, 4000000); + Z80(config, m_bioscpu, XTAL::u(4000000)); m_bioscpu->set_addrmap(AS_PROGRAM, &nss_state::bios_map); m_bioscpu->set_addrmap(AS_IO, &nss_state::bios_io_map); M50458(config, m_m50458, 4000000, "osd"); /* TODO: correct clock */ S3520CF(config, m_s3520cf); /* RTC */ - RP5H01(config, m_rp5h01, 0); + RP5H01(config, m_rp5h01); M6M80011AP(config, "m6m80011ap"); /* sound hardware */ diff --git a/src/mame/nintendo/playch10.cpp b/src/mame/nintendo/playch10.cpp index adeb926e868..62fe1bd4845 100644 --- a/src/mame/nintendo/playch10.cpp +++ b/src/mame/nintendo/playch10.cpp @@ -1942,19 +1942,19 @@ void playch10_state::playch10(machine_config &config) top.set_screen_update(FUNC(playch10_state::screen_update_playch10_top)); top.screen_vblank().set(FUNC(playch10_state::vblank_irq)); - PPU_2C03B(config, m_ppu, 0); + PPU_2C03B(config, m_ppu); m_ppu->set_addrmap(0, &playch10_state::ppu_map); m_ppu->set_screen("bottom"); m_ppu->set_cpu_tag("cart"); m_ppu->int_callback().set_inputline(m_cartcpu, INPUT_LINE_NMI); m_ppu->int_callback().append(FUNC(playch10_state::int_detect_w)); - NES_ZAPPER_SENSOR(config, m_sensor, 0).set_screen_tag("bottom"); + NES_ZAPPER_SENSOR(config, m_sensor).set_screen_tag("bottom"); SPEAKER(config, "mono").front_center(); m_cartcpu->add_route(ALL_OUTPUTS, "mono", 0.50); - RP5H01(config, m_rp5h01, 0); + RP5H01(config, m_rp5h01); } void playch10_state::playch10_a(machine_config &config) diff --git a/src/mame/nintendo/pokemini.cpp b/src/mame/nintendo/pokemini.cpp index 7eccbea2e1d..ac19f5a8096 100644 --- a/src/mame/nintendo/pokemini.cpp +++ b/src/mame/nintendo/pokemini.cpp @@ -1698,12 +1698,12 @@ uint32_t pokemini_state::screen_update(screen_device &screen, bitmap_ind16 &bitm void pokemini_state::pokemini(machine_config &config) { /* basic machine hardware */ - MINX(config, m_maincpu, 4000000); + MINX(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pokemini_state::pokemini_mem_map); config.set_maximum_quantum(attotime::from_hz(60)); - I2C_24C64(config, m_i2cmem, 0); // ? + I2C_24C64(config, m_i2cmem); // ? /* This still needs to be improved to actually match the hardware */ SCREEN(config, m_screen, SCREEN_TYPE_LCD); diff --git a/src/mame/nintendo/popeye.cpp b/src/mame/nintendo/popeye.cpp index f5b78979447..aac9199f967 100644 --- a/src/mame/nintendo/popeye.cpp +++ b/src/mame/nintendo/popeye.cpp @@ -573,7 +573,7 @@ void tpp2_state::config(machine_config &config) /* NETLIST configuration using internal AY8910 resistor values */ - NETLIST_SOUND(config, "snd_nl", 48000) + NETLIST_SOUND(config, "snd_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(popeye)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/nintendo/punchout.cpp b/src/mame/nintendo/punchout.cpp index e25267a3631..730c5f39f37 100644 --- a/src/mame/nintendo/punchout.cpp +++ b/src/mame/nintendo/punchout.cpp @@ -671,9 +671,9 @@ void punchout_state::spnchout(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_IO, &punchout_state::spnchout_io_map); - RP5C01(config, m_rtc, 0); // OSCIN -> Vcc + RP5C01(config, m_rtc); // OSCIN -> Vcc m_rtc->remove_battery(); - RP5H01(config, m_rp5h01, 0); + RP5H01(config, m_rp5h01); MCFG_MACHINE_RESET_OVERRIDE(punchout_state, spnchout) } diff --git a/src/mame/nintendo/vsnes.cpp b/src/mame/nintendo/vsnes.cpp index 7044c909e7c..432d025e821 100644 --- a/src/mame/nintendo/vsnes.cpp +++ b/src/mame/nintendo/vsnes.cpp @@ -2421,7 +2421,7 @@ void vs_uni_state::vsnes(machine_config &config) m_ppu1->set_cpu_tag(m_maincpu); m_ppu1->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); - NES_ZAPPER_SENSOR(config, m_sensor, 0).set_screen_tag("screen1"); + NES_ZAPPER_SENSOR(config, m_sensor).set_screen_tag("screen1"); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/nintendo/vt1682.cpp b/src/mame/nintendo/vt1682.cpp index 7053ada918a..f0180f867f7 100644 --- a/src/mame/nintendo/vt1682.cpp +++ b/src/mame/nintendo/vt1682.cpp @@ -5510,8 +5510,8 @@ void vt_vt1682_state::vt_vt1682_common(machine_config& config) TIMER(config, "scantimer").configure_scanline(FUNC(vt_vt1682_state::scanline), "screen", 0, 1); TIMER(config, m_render_timer).configure_generic(FUNC(vt_vt1682_state::line_render_start)); - VT_VT1682_ALU(config, m_maincpu_alu, 0); - VT_VT1682_ALU(config, m_soundcpu_alu, 0); + VT_VT1682_ALU(config, m_maincpu_alu); + VT_VT1682_ALU(config, m_soundcpu_alu); m_soundcpu_alu->set_sound_alu(); // different logging conditions config.set_maximum_quantum(attotime::from_hz(6000)); @@ -5525,14 +5525,14 @@ void vt_vt1682_state::vt_vt1682_common(machine_config& config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_test); - VT_VT1682_IO(config, m_io, 0); - VT_VT1682_UIO(config, m_uio, 0); + VT_VT1682_IO(config, m_io); + VT_VT1682_UIO(config, m_uio); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_12BIT_R2R(config, m_leftdac, 0).add_route(0, "lspeaker", 0.5); // unknown 12-bit DAC - DAC_12BIT_R2R(config, m_rightdac, 0).add_route(0, "rspeaker", 0.5); // unknown 12-bit DAC + DAC_12BIT_R2R(config, m_leftdac).add_route(0, "lspeaker", 0.5); // unknown 12-bit DAC + DAC_12BIT_R2R(config, m_rightdac).add_route(0, "rspeaker", 0.5); // unknown 12-bit DAC } diff --git a/src/mame/nintendo/vt1682_alu.cpp b/src/mame/nintendo/vt1682_alu.cpp index 0114c56aab5..f34f45de4fd 100644 --- a/src/mame/nintendo/vt1682_alu.cpp +++ b/src/mame/nintendo/vt1682_alu.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(VT_VT1682_ALU, vrt_vt1682_alu_device, "vt1682alu", "VRT VT1682 ALU") -vrt_vt1682_alu_device::vrt_vt1682_alu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrt_vt1682_alu_device::vrt_vt1682_alu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VT_VT1682_ALU, tag, owner, clock) { } diff --git a/src/mame/nintendo/vt1682_alu.h b/src/mame/nintendo/vt1682_alu.h index c506af9b6d6..5ce75373d65 100644 --- a/src/mame/nintendo/vt1682_alu.h +++ b/src/mame/nintendo/vt1682_alu.h @@ -12,7 +12,7 @@ class vrt_vt1682_alu_device : public device_t { public: // construction/destruction - vrt_vt1682_alu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrt_vt1682_alu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // so that we can filter logging, sound ALU gets used hundreds of times a frame, so logging it is unwise void set_sound_alu() { m_is_sound_alu = true; } diff --git a/src/mame/nintendo/vt1682_io.cpp b/src/mame/nintendo/vt1682_io.cpp index aaa4f0bbf14..02014708e45 100644 --- a/src/mame/nintendo/vt1682_io.cpp +++ b/src/mame/nintendo/vt1682_io.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(VT_VT1682_IO, vrt_vt1682_io_device, "vt1682io", "VRT VT1682 I/O") -vrt_vt1682_io_device::vrt_vt1682_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrt_vt1682_io_device::vrt_vt1682_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VT_VT1682_IO, tag, owner, clock), m_porta_out(*this), m_portb_out(*this), diff --git a/src/mame/nintendo/vt1682_io.h b/src/mame/nintendo/vt1682_io.h index 678124cb627..dc9ef499d0b 100644 --- a/src/mame/nintendo/vt1682_io.h +++ b/src/mame/nintendo/vt1682_io.h @@ -12,7 +12,7 @@ class vrt_vt1682_io_device : public device_t { public: // construction/destruction - vrt_vt1682_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrt_vt1682_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto porta_out() { return m_porta_out.bind(); } auto portb_out() { return m_portb_out.bind(); } diff --git a/src/mame/nintendo/vt1682_timer.cpp b/src/mame/nintendo/vt1682_timer.cpp index 57a0421bcf6..6ad847bfaf0 100644 --- a/src/mame/nintendo/vt1682_timer.cpp +++ b/src/mame/nintendo/vt1682_timer.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(VT_VT1682_TIMER, vrt_vt1682_timer_device, "vt1682timer", "VRT VT1682 Timer") -vrt_vt1682_timer_device::vrt_vt1682_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrt_vt1682_timer_device::vrt_vt1682_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VT_VT1682_TIMER, tag, owner, clock), m_timer(*this, "snd_timera"), m_irq_cb(*this) diff --git a/src/mame/nintendo/vt1682_timer.h b/src/mame/nintendo/vt1682_timer.h index d2e35280a33..fb8b1d53391 100644 --- a/src/mame/nintendo/vt1682_timer.h +++ b/src/mame/nintendo/vt1682_timer.h @@ -14,7 +14,7 @@ class vrt_vt1682_timer_device : public device_t { public: // construction/destruction - vrt_vt1682_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrt_vt1682_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto write_irq_callback() { return m_irq_cb.bind(); } diff --git a/src/mame/nintendo/vt1682_uio.cpp b/src/mame/nintendo/vt1682_uio.cpp index 000ec8acbfe..59845209dfe 100644 --- a/src/mame/nintendo/vt1682_uio.cpp +++ b/src/mame/nintendo/vt1682_uio.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(VT_VT1682_UIO, vrt_vt1682_uio_device, "vt1682uio", "VRT VT1682 UIO") -vrt_vt1682_uio_device::vrt_vt1682_uio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrt_vt1682_uio_device::vrt_vt1682_uio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VT_VT1682_UIO, tag, owner, clock), m_porta_out(*this), m_porta_in(*this), diff --git a/src/mame/nintendo/vt1682_uio.h b/src/mame/nintendo/vt1682_uio.h index ef86aaaa2f2..ad1b41a0e78 100644 --- a/src/mame/nintendo/vt1682_uio.h +++ b/src/mame/nintendo/vt1682_uio.h @@ -12,7 +12,7 @@ class vrt_vt1682_uio_device : public device_t { public: // construction/destruction - vrt_vt1682_uio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrt_vt1682_uio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto porta_out() { return m_porta_out.bind(); } auto porta_in() { return m_porta_in.bind(); } diff --git a/src/mame/nintendo/vt_unknown.cpp b/src/mame/nintendo/vt_unknown.cpp index 63c45fa8fb0..e6872e44949 100644 --- a/src/mame/nintendo/vt_unknown.cpp +++ b/src/mame/nintendo/vt_unknown.cpp @@ -79,7 +79,7 @@ GFXDECODE_END void vt_unknown_state::vt_unknown(machine_config &config) { - M6502(config, m_maincpu, 8000000); // unknown, assumed to be a 6502 based CPU as it has NES games, but could be emulating them (like the S+Core units, assuming this isn't one) + M6502(config, m_maincpu, XTAL::u(8000000)); // unknown, assumed to be a 6502 based CPU as it has NES games, but could be emulating them (like the S+Core units, assuming this isn't one) m_maincpu->set_addrmap(AS_PROGRAM, &vt_unknown_state::vt_unknown_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/nix/fitfight.cpp b/src/mame/nix/fitfight.cpp index 240e76b964d..24fe9647e42 100644 --- a/src/mame/nix/fitfight.cpp +++ b/src/mame/nix/fitfight.cpp @@ -721,11 +721,11 @@ void fitfight_state::machine_reset() void fitfight_state::fitfight(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fitfight_state::fitfight_main_map); m_maincpu->set_vblank_int("screen", FUNC(fitfight_state::irq2_line_hold)); - upd78c10_device &audiocpu(UPD78C10(config, m_audiocpu, 12000000)); + upd78c10_device &audiocpu(UPD78C10(config, m_audiocpu, XTAL::u(12000000))); audiocpu.set_addrmap(AS_PROGRAM, &fitfight_state::snd_mem); audiocpu.pa_in_cb().set(FUNC(fitfight_state::snd_porta_r)); audiocpu.pa_out_cb().set(FUNC(fitfight_state::snd_porta_w)); @@ -749,12 +749,12 @@ void fitfight_state::fitfight(machine_config &config) SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1333333, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0); // ~8080Hz ??? TODO: find out the real frequency + OKIM6295(config, "oki", XTAL::u(1333333), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0); // ~8080Hz ??? TODO: find out the real frequency } void fitfight_state::bbprot(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &fitfight_state::bbprot_main_map); m_maincpu->set_vblank_int("screen", FUNC(fitfight_state::irq2_line_hold)); @@ -772,7 +772,7 @@ void fitfight_state::bbprot(machine_config &config) SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1333333, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0); // ~8080Hz ??? TODO: find out the real frequency + OKIM6295(config, "oki", XTAL::u(1333333), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0); // ~8080Hz ??? TODO: find out the real frequency } /*** diff --git a/src/mame/nmk/nmk004.cpp b/src/mame/nmk/nmk004.cpp index c60cd43a337..95ca3a9e58d 100644 --- a/src/mame/nmk/nmk004.cpp +++ b/src/mame/nmk/nmk004.cpp @@ -86,7 +86,7 @@ ROM_END DEFINE_DEVICE_TYPE(NMK004, nmk004_device, "nmk004", "NMK004") -nmk004_device::nmk004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nmk004_device::nmk004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NMK004, tag, owner, clock), m_cpu(*this, "mcu"), m_reset_cb(*this), diff --git a/src/mame/nmk/nmk004.h b/src/mame/nmk/nmk004.h index f5045de324f..e29f0f10a61 100644 --- a/src/mame/nmk/nmk004.h +++ b/src/mame/nmk/nmk004.h @@ -16,7 +16,7 @@ class nmk004_device : public device_t { public: - nmk004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nmk004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto reset_cb() { return m_reset_cb.bind(); } diff --git a/src/mame/nmk/nmk16.cpp b/src/mame/nmk/nmk16.cpp index 62fa8cfa75b..c1bfd37204d 100644 --- a/src/mame/nmk/nmk16.cpp +++ b/src/mame/nmk/nmk16.cpp @@ -4337,7 +4337,7 @@ void nmk16_state::tharrier(machine_config &config) void nmk16_state::mustang(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); // 10 MHz ? + M68000(config, m_maincpu, XTAL::u(10000000)); // 10 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::mustang_map); set_hacky_interrupt_timing(config); @@ -4353,10 +4353,10 @@ void nmk16_state::mustang(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NMK004(config, m_nmk004, 8000000); + NMK004(config, m_nmk004, XTAL::u(8000000)); m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); @@ -4375,11 +4375,11 @@ void nmk16_state::mustang(machine_config &config) void nmk16_state::mustangb(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); // 10 MHz ? + M68000(config, m_maincpu, XTAL::u(10000000)); // 10 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::mustangb_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 14318180/4); + Z80(config, m_audiocpu, XTAL::u(14318180)/4); m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::seibu_sound_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); @@ -4395,13 +4395,13 @@ void nmk16_state::mustangb(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 14318180/4)); + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(14318180)/4)); ymsnd.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler)); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - OKIM6295(config, "oki", 1320000, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); + OKIM6295(config, "oki", XTAL::u(1320000), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); - seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound", 0)); + seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound")); seibu_sound.int_callback().set_inputline(m_audiocpu, 0); seibu_sound.set_rom_tag("audiocpu"); seibu_sound.set_rombank_tag("seibu_bank1"); @@ -4412,11 +4412,11 @@ void nmk16_state::mustangb(machine_config &config) void nmk16_state::mustangb3(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); // 10 MHz ? + M68000(config, m_maincpu, XTAL::u(10000000)); // 10 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::mustangb3_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 14318180/4); + Z80(config, m_audiocpu, XTAL::u(14318180)/4); m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::mustangb3_sound_map); m_audiocpu->set_addrmap(AS_IO, &nmk16_state::tharrier_sound_io_map); @@ -4435,7 +4435,7 @@ void nmk16_state::mustangb3(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set_inputline("audiocpu", 0); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); @@ -4506,7 +4506,7 @@ void nmk16_state::vandyke(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NMK004(config, m_nmk004, 8000000); + NMK004(config, m_nmk004, XTAL::u(8000000)); m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB @@ -4528,11 +4528,11 @@ void nmk16_state::vandyke(machine_config &config) void nmk16_state::vandykeb(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); // 10 MHz ? + M68000(config, m_maincpu, XTAL::u(10000000)); // 10 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::vandykeb_map); set_hacky_interrupt_timing(config); - PIC16C57(config, "mcu", 12000000).set_disable(); // 3MHz + PIC16C57(config, "mcu", XTAL::u(12000000)).set_disable(); // 3MHz // video hardware set_hacky_screen_lowres(config); @@ -4546,7 +4546,7 @@ void nmk16_state::vandykeb(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki[0], 16000000/16, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[0], XTAL::u(16000000)/16, okim6295_device::PIN7_LOW); m_oki[0]->set_addrmap(0, &nmk16_state::oki1_map); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.20); } @@ -4620,7 +4620,7 @@ void nmk16_state::acrobatmbl(machine_config &config) OKIM6295(config, "oki", 8_MHz_XTAL / 8, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); // divider not verified - seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound", 0)); + seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound")); seibu_sound.int_callback().set_inputline(m_audiocpu, 0); seibu_sound.set_rom_tag("audiocpu"); seibu_sound.set_rombank_tag("seibu_bank1"); @@ -4631,11 +4631,11 @@ void nmk16_state::acrobatmbl(machine_config &config) void nmk16_state::tdragonb(machine_config &config) // bootleg using Raiden sound hardware { // basic machine hardware - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::tdragonb_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 14318180/4); + Z80(config, m_audiocpu, XTAL::u(14318180)/4); m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::seibu_sound_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); @@ -4651,13 +4651,13 @@ void nmk16_state::tdragonb(machine_config &config) // bootleg using Raiden so // sound hardware SPEAKER(config, "mono").front_center(); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 14318180/4)); + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(14318180)/4)); ymsnd.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler)); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - OKIM6295(config, "oki", 1320000, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); + OKIM6295(config, "oki", XTAL::u(1320000), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); - seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound", 0)); + seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound")); seibu_sound.int_callback().set_inputline(m_audiocpu, 0); seibu_sound.set_rom_tag("audiocpu"); seibu_sound.set_rombank_tag("seibu_bank1"); @@ -4675,7 +4675,7 @@ void nmk16_state::tdragonb3(machine_config &config) void nmk16_state::tdragonb2(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::tdragonb2_map); set_hacky_interrupt_timing(config); @@ -4691,7 +4691,7 @@ void nmk16_state::tdragonb2(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1320000, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); + OKIM6295(config, "oki", XTAL::u(1320000), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); } void nmk16_state::tdragon(machine_config &config) @@ -4713,7 +4713,7 @@ void nmk16_state::tdragon(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NMK004(config, m_nmk004, 8000000); + NMK004(config, m_nmk004, XTAL::u(8000000)); m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB @@ -4741,11 +4741,11 @@ void nmk16_state::tdragon_prot(machine_config &config) void nmk16_state::ssmissin(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 8000000); // 8 Mhz + M68000(config, m_maincpu, XTAL::u(8000000)); // 8 Mhz m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::ssmissin_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 8000000/2); // 4 Mhz + Z80(config, m_audiocpu, XTAL::u(8000000)/2); // 4 Mhz m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::ssmissin_sound_map); // video hardware @@ -4763,7 +4763,7 @@ void nmk16_state::ssmissin(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); - OKIM6295(config, m_oki[0], 8000000/8, okim6295_device::PIN7_HIGH); // 1 Mhz, pin 7 high + OKIM6295(config, m_oki[0], XTAL::u(8000000)/8, okim6295_device::PIN7_HIGH); // 1 Mhz, pin 7 high m_oki[0]->set_addrmap(0, &nmk16_state::oki1_map); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -4771,7 +4771,7 @@ void nmk16_state::ssmissin(machine_config &config) void nmk16_state::strahl(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 12000000); // 12 MHz ? + M68000(config, m_maincpu, XTAL::u(12000000)); // 12 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::strahl_map); set_hacky_interrupt_timing(config); @@ -4787,21 +4787,21 @@ void nmk16_state::strahl(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NMK004(config, m_nmk004, 8000000); + NMK004(config, m_nmk004, XTAL::u(8000000)); m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); ymsnd.add_route(2, "mono", 0.50); ymsnd.add_route(3, "mono", 1.20); - OKIM6295(config, m_oki[0], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[0], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[0]->set_addrmap(0, &nmk16_state::oki1_map); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.10); - OKIM6295(config, m_oki[1], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[1], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[1]->set_addrmap(0, &nmk16_state::oki2_map); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10); } @@ -4832,7 +4832,7 @@ void nmk16_state::strahljbl(machine_config &config) OKIM6295(config, "oki", 12_MHz_XTAL / 12, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40); // XTAL confirmed, divisor not - seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound", 0)); + seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound")); seibu_sound.int_callback().set_inputline(m_audiocpu, 0); seibu_sound.set_rom_tag("audiocpu"); seibu_sound.set_rombank_tag("seibu_bank1"); @@ -4843,7 +4843,7 @@ void nmk16_state::strahljbl(machine_config &config) void nmk16_state::hachamf(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); // 10 MHz ? + M68000(config, m_maincpu, XTAL::u(10000000)); // 10 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::hachamf_map); set_hacky_interrupt_timing(config); @@ -4859,21 +4859,21 @@ void nmk16_state::hachamf(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NMK004(config, m_nmk004, 8000000); + NMK004(config, m_nmk004, XTAL::u(8000000)); m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); ymsnd.add_route(2, "mono", 0.50); ymsnd.add_route(3, "mono", 1.20); - OKIM6295(config, m_oki[0], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[0], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[0]->set_addrmap(0, &nmk16_state::oki1_map); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.10); - OKIM6295(config, m_oki[1], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[1], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[1]->set_addrmap(0, &nmk16_state::oki2_map); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10); } @@ -4888,7 +4888,7 @@ void nmk16_state::hachamf_prot(machine_config &config) void nmk16_state::macross(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); // 10 MHz ? + M68000(config, m_maincpu, XTAL::u(10000000)); // 10 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::macross_map); set_hacky_interrupt_timing(config); @@ -4904,21 +4904,21 @@ void nmk16_state::macross(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NMK004(config, m_nmk004, 8000000); + NMK004(config, m_nmk004, XTAL::u(8000000)); m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); ymsnd.add_route(2, "mono", 0.50); ymsnd.add_route(3, "mono", 1.20); - OKIM6295(config, m_oki[0], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[0], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[0]->set_addrmap(0, &nmk16_state::oki1_map); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.10); - OKIM6295(config, m_oki[1], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[1], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[1]->set_addrmap(0, &nmk16_state::oki2_map); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10); } @@ -4942,7 +4942,7 @@ void nmk16_state::blkheart(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - NMK004(config, m_nmk004, 8000000); + NMK004(config, m_nmk004, XTAL::u(8000000)); m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB @@ -5005,7 +5005,7 @@ void nmk16_state::gunnailb(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::gunnailb_map); - Z80(config, m_audiocpu, 6000000); // 6 MHz ? + Z80(config, m_audiocpu, XTAL::u(6000000)); // 6 MHz ? m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::gunnailb_sound_map); m_audiocpu->set_addrmap(AS_IO, &nmk16_state::gunnailb_sound_io_map); @@ -5016,7 +5016,7 @@ void nmk16_state::gunnailb(machine_config &config) subdevice("ymsnd")->irq_handler().set_inputline(m_audiocpu, INPUT_LINE_IRQ0); - OKIM6295(config.replace(), m_oki[0], 12000000 / 4, okim6295_device::PIN7_LOW); // no OKI banking + OKIM6295(config.replace(), m_oki[0], XTAL::u(12000000) / 4, okim6295_device::PIN7_LOW); // no OKI banking m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.80); config.device_remove("nmk004"); @@ -5030,7 +5030,7 @@ void nmk16_state::macross2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::macross2_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 4000000); // Z8400B PS 4 MHz ? + Z80(config, m_audiocpu, XTAL::u(4000000)); // Z8400B PS 4 MHz ? m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::macross2_sound_map); m_audiocpu->set_addrmap(AS_IO, &nmk16_state::macross2_sound_io_map); @@ -5062,7 +5062,7 @@ void nmk16_state::macross2(machine_config &config) OKIM6295(config, m_oki[1], XTAL(16'000'000) / 4, okim6295_device::PIN7_LOW); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); } @@ -5074,7 +5074,7 @@ void nmk16_state::tdragon2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::tdragon2_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 4000000); // Z0840006PSC 4? MHz + Z80(config, m_audiocpu, XTAL::u(4000000)); // Z0840006PSC 4? MHz m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::macross2_sound_map); m_audiocpu->set_addrmap(AS_IO, &nmk16_state::macross2_sound_io_map); @@ -5106,7 +5106,7 @@ void nmk16_state::tdragon2(machine_config &config) OKIM6295(config, m_oki[1], XTAL(16'000'000) / 4, okim6295_device::PIN7_LOW); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); } @@ -5167,7 +5167,7 @@ void nmk16_state::raphero(machine_config &config) OKIM6295(config, m_oki[1], XTAL(16'000'000) / 4, okim6295_device::PIN7_LOW); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); } @@ -5197,7 +5197,7 @@ void nmk16_state::bjtwin(machine_config &config) OKIM6295(config, m_oki[1], XTAL(16'000'000)/4, okim6295_device::PIN7_LOW); // verified on PCB m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.20); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); } @@ -5223,12 +5223,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::manybloc_scanline) void nmk16_state::manybloc(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); // 10? MHz - check + M68000(config, m_maincpu, XTAL::u(10000000)); // 10? MHz - check m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::manybloc_map); m_maincpu->set_periodic_int(FUNC(nmk16_state::irq1_line_hold), attotime::from_hz(56)); // this needs to equal the framerate on this, rather than being double it... TIMER(config, "scantimer").configure_scanline(FUNC(nmk16_state::manybloc_scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 3000000); + Z80(config, m_audiocpu, XTAL::u(3000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::tharrier_sound_map); m_audiocpu->set_addrmap(AS_IO, &nmk16_state::tharrier_sound_io_map); @@ -5257,18 +5257,18 @@ void nmk16_state::manybloc(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); GENERIC_LATCH_8(config, "soundlatch2"); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(1500000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); ymsnd.add_route(2, "mono", 0.50); ymsnd.add_route(3, "mono", 1.20); - OKIM6295(config, m_oki[0], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[0], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[0]->set_addrmap(0, &nmk16_state::oki1_map); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.10); - OKIM6295(config, m_oki[1], 16000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[1], XTAL::u(16000000)/4, okim6295_device::PIN7_LOW); m_oki[1]->set_addrmap(0, &nmk16_state::oki2_map); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 0.10); } @@ -5278,11 +5278,11 @@ void nmk16_state::manybloc(machine_config &config) void nmk16_tomagic_state::tomagic(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 12000000); // 12? MHz + M68000(config, m_maincpu, XTAL::u(12000000)); // 12? MHz m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_tomagic_state::tomagic_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 12000000/4); // 3 Mhz? + Z80(config, m_audiocpu, XTAL::u(12000000)/4); // 3 Mhz? m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_tomagic_state::tomagic_sound_map); m_audiocpu->set_addrmap(AS_IO, &nmk16_tomagic_state::tomagic_sound_io_map); @@ -5301,11 +5301,11 @@ void nmk16_tomagic_state::tomagic(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 12000000/4)); // K-666 (YM3812) 3Mhz? */ + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(12000000)/4)); // K-666 (YM3812) 3Mhz? */ ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.50); - OKIM6295(config, m_oki[0], 12000000/4, okim6295_device::PIN7_LOW); + OKIM6295(config, m_oki[0], XTAL::u(12000000)/4, okim6295_device::PIN7_LOW); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.50); } @@ -5846,11 +5846,11 @@ void afega_state::popspops(machine_config &config) void afega_state::firehawk(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &afega_state::firehawk_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &afega_state::firehawk_sound_cpu); // video hardware @@ -5869,10 +5869,10 @@ void afega_state::firehawk(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); - OKIM6295(config, m_oki[0], 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[0], XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0); - OKIM6295(config, m_oki[1], 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[1], XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki[1]->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -5886,11 +5886,11 @@ void afega_state::spec2k(machine_config &config) void nmk16_state::twinactn(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::twinactn_map); set_hacky_interrupt_timing(config); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::ssmissin_sound_map); // video hardware @@ -5908,7 +5908,7 @@ void nmk16_state::twinactn(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); - OKIM6295(config, m_oki[0], 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki[0], XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki[0]->set_addrmap(0, &nmk16_state::oki1_map); m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/nmk/nmk16spr.cpp b/src/mame/nmk/nmk16spr.cpp index 6a6036b09a3..f7c7b118189 100644 --- a/src/mame/nmk/nmk16spr.cpp +++ b/src/mame/nmk/nmk16spr.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(NMK_16BIT_SPRITE, nmk_16bit_sprite_device, "nmk16spr", "NMK 16 bit Sprite hardware") -nmk_16bit_sprite_device::nmk_16bit_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nmk_16bit_sprite_device::nmk_16bit_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NMK_16BIT_SPRITE, tag, owner, clock) , m_colpri_cb(*this) , m_ext_cb(*this) diff --git a/src/mame/nmk/nmk16spr.h b/src/mame/nmk/nmk16spr.h index 192fbe8409a..61f3ef2ea6c 100644 --- a/src/mame/nmk/nmk16spr.h +++ b/src/mame/nmk/nmk16spr.h @@ -14,7 +14,7 @@ public: typedef device_delegate colpri_cb_delegate; typedef device_delegate ext_cb_delegate; - nmk_16bit_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nmk_16bit_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_colpri_callback(T &&... args) { m_colpri_cb.set(std::forward(args)...); } diff --git a/src/mame/nmk/powerins.cpp b/src/mame/nmk/powerins.cpp index 34ec1b7aa02..ff0dd774dc3 100644 --- a/src/mame/nmk/powerins.cpp +++ b/src/mame/nmk/powerins.cpp @@ -292,7 +292,7 @@ void powerins_state::powerins(machine_config &config) OKIM6295(config, m_oki[1], XTAL(16'000'000) / 4, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.15); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki1"); nmk112.set_rom1_tag("oki2"); } @@ -312,7 +312,7 @@ void powerins_state::powerinsa(machine_config &config) MCFG_MACHINE_START_OVERRIDE(powerins_state, powerinsa) - m_oki[0]->set_clock(990000); // pin7 not verified + m_oki[0]->set_clock(XTAL::u(990000)); // pin7 not verified m_oki[0]->set_addrmap(0, &powerins_state::powerinsa_oki_map); config.device_remove("oki2"); diff --git a/src/mame/nmk/quizpani.cpp b/src/mame/nmk/quizpani.cpp index 64f24d4f3a2..034d36073dd 100644 --- a/src/mame/nmk/quizpani.cpp +++ b/src/mame/nmk/quizpani.cpp @@ -184,7 +184,7 @@ GFXDECODE_END void quizpani_state::quizpani(machine_config &config) { - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &quizpani_state::quizpani_map); m_maincpu->set_vblank_int("screen", FUNC(quizpani_state::irq4_line_hold)); m_maincpu->set_periodic_int(FUNC(quizpani_state::irq1_line_hold), attotime::from_hz(164)); // music tempo @@ -204,7 +204,7 @@ void quizpani_state::quizpani(machine_config &config) OKIM6295(config, "oki", 16000000/4, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 1.0); - nmk112_device &nmk112(NMK112(config, "nmk112", 0)); + nmk112_device &nmk112(NMK112(config, "nmk112")); nmk112.set_rom0_tag("oki"); } diff --git a/src/mame/nokia/dbox.cpp b/src/mame/nokia/dbox.cpp index a7ebe8e6507..91992ede4d3 100644 --- a/src/mame/nokia/dbox.cpp +++ b/src/mame/nokia/dbox.cpp @@ -608,7 +608,7 @@ INPUT_PORTS_END void dbox_state::dbox(machine_config &config) { - M68340(config, m_maincpu, 0); // The 68340 has an internal VCO as clock source, hence need no CPU clock + M68340(config, m_maincpu); // The 68340 has an internal VCO as clock source, hence need no CPU clock m_maincpu->set_crystal(XTAL(32'768)); // The dbox uses the VCO and has a crystal as VCO reference and to synthesize internal clocks from m_maincpu->set_addrmap(AS_PROGRAM, &dbox_state::dbox_map); m_maincpu->pa_out_callback().set(FUNC(dbox_state::write_pa)); @@ -630,7 +630,7 @@ void dbox_state::dbox(machine_config &config) AMD_29F800B_16BIT(config, "flash1"); /* LED Matrix Display */ - SDA5708(config, m_display, 0); + SDA5708(config, m_display); config.set_default_layout(layout_sda5708); /* IP16 74256 8 bit latch */ diff --git a/src/mame/nokia/mikromik.cpp b/src/mame/nokia/mikromik.cpp index 4f5f848025c..06982d074b2 100644 --- a/src/mame/nokia/mikromik.cpp +++ b/src/mame/nokia/mikromik.cpp @@ -445,7 +445,7 @@ void mm1_state::mm1(machine_config &config) m_io->set_data_width(8); m_io->set_addr_width(7); - I8212(config, m_iop, 0); + I8212(config, m_iop); m_iop->int_wr_callback().set_inputline(m_maincpu, I8085_RST65_LINE); m_iop->di_rd_callback().set(KB_TAG, FUNC(mm1_keyboard_device::read)); @@ -471,7 +471,7 @@ void mm1_state::mm1(machine_config &config) m_dmac->out_iow_callback<3>().set(m_fdc, FUNC(upd765_family_device::dma_w)); m_dmac->out_dack_callback<3>().set(FUNC(mm1_state::dack3_w)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(6.144_MHz_XTAL/2/2); m_pit->out_handler<0>().set(FUNC(mm1_state::itxc_w)); m_pit->set_clk<1>(6.144_MHz_XTAL/2/2); @@ -498,7 +498,7 @@ void mm1_state::mm1(machine_config &config) RS232_PORT(config, m_rs232c, default_rs232_devices, nullptr); m_rs232c->cts_handler().set(m_mpsc, FUNC(upd7201_device::ctsb_w)); - mm1_keyboard_device &kb(MM1_KEYBOARD(config, KB_TAG, 2500)); // actual KBCLK is 6.144_MHz_XTAL/2/16 + mm1_keyboard_device &kb(MM1_KEYBOARD(config, KB_TAG, XTAL::u(2500))); // actual KBCLK is 6.144_MHz_XTAL/2/16 kb.kbst_wr_callback().set(m_iop, FUNC(i8212_device::stb_w)); // internal ram diff --git a/src/mame/nokia/mm1kb.cpp b/src/mame/nokia/mm1kb.cpp index 0f08c79ffa2..9afe3064142 100644 --- a/src/mame/nokia/mm1kb.cpp +++ b/src/mame/nokia/mm1kb.cpp @@ -199,7 +199,7 @@ ioport_constructor mm1_keyboard_device::device_input_ports() const // mm1_keyboard_device - constructor //------------------------------------------------- -mm1_keyboard_device::mm1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm1_keyboard_device::mm1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM1_KEYBOARD, tag, owner, clock), m_write_kbst(*this), m_samples(*this, "keyboard_and_chassis_sounds"), diff --git a/src/mame/nokia/mm1kb.h b/src/mame/nokia/mm1kb.h index 3a38b086a0a..20cf3fbb541 100644 --- a/src/mame/nokia/mm1kb.h +++ b/src/mame/nokia/mm1kb.h @@ -24,7 +24,7 @@ class mm1_keyboard_device : public device_t { public: // construction/destruction - mm1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto kbst_wr_callback() { return m_write_kbst.bind(); } diff --git a/src/mame/nokia/nokia_3310.cpp b/src/mame/nokia/nokia_3310.cpp index 9bd90f2c260..867b6270bd6 100644 --- a/src/mame/nokia/nokia_3310.cpp +++ b/src/mame/nokia/nokia_3310.cpp @@ -717,7 +717,7 @@ void noki3310_state::noki3310(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED); - PCD8544(config, m_pcd8544, 0); + PCD8544(config, m_pcd8544); m_pcd8544->set_screen_update_cb(FUNC(noki3310_state::pcd8544_screen_update)); INTEL_TE28F160(config, "flash"); diff --git a/src/mame/northstar/horizon.cpp b/src/mame/northstar/horizon.cpp index 8fad5d37200..7281d3c4f3c 100644 --- a/src/mame/northstar/horizon.cpp +++ b/src/mame/northstar/horizon.cpp @@ -191,7 +191,7 @@ void horizon_state::horizon(machine_config &config) m_maincpu->set_addrmap(AS_IO, &horizon_state::horizon_io); // devices - I8251(config, m_usart_l, 0); + I8251(config, m_usart_l); m_usart_l->txd_handler().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd)); m_usart_l->dtr_handler().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr)); m_usart_l->rts_handler().set(RS232_A_TAG, FUNC(rs232_port_device::write_rts)); @@ -201,7 +201,7 @@ void horizon_state::horizon(machine_config &config) rs232a.dsr_handler().set(m_usart_l, FUNC(i8251_device::write_dsr)); rs232a.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); - I8251(config, m_usart_r, 0); + I8251(config, m_usart_r); m_usart_r->txd_handler().set(RS232_B_TAG, FUNC(rs232_port_device::write_txd)); m_usart_r->dtr_handler().set(RS232_B_TAG, FUNC(rs232_port_device::write_dtr)); m_usart_r->rts_handler().set(RS232_B_TAG, FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/novag/cexpert.cpp b/src/mame/novag/cexpert.cpp index 6aea37cbe00..26eb9a2eeb7 100644 --- a/src/mame/novag/cexpert.cpp +++ b/src/mame/novag/cexpert.cpp @@ -225,7 +225,7 @@ void cexpert_state::cexpert(machine_config &config) R65C02(config, m_maincpu, 10_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &cexpert_state::main_map); - auto &irq_clock(CLOCK(config, "irq_clock", 15440 / 32)); // 555 timer (measured), to 4020 + auto &irq_clock(CLOCK(config, "irq_clock", XTAL::u(15440) / 32)); // 555 timer (measured), to 4020 irq_clock.set_pulse_width(attotime::from_nsec(15200)); // active for 15.2us irq_clock.signal_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); diff --git a/src/mame/novag/diablo.cpp b/src/mame/novag/diablo.cpp index 4e641d3d89b..49ee9b04c4d 100644 --- a/src/mame/novag/diablo.cpp +++ b/src/mame/novag/diablo.cpp @@ -301,7 +301,7 @@ void diablo_state::diablo68k(machine_config &config) PALETTE(config, "palette", FUNC(diablo_state::lcd_palette), 3); - HD44780(config, m_lcd, 0); + HD44780(config, m_lcd); m_lcd->set_lcd_size(2, 8); m_lcd->set_pixel_update_cb(FUNC(diablo_state::lcd_pixel_update)); diff --git a/src/mame/novag/sexpert.cpp b/src/mame/novag/sexpert.cpp index b795f690611..1e66cdcfe8c 100644 --- a/src/mame/novag/sexpert.cpp +++ b/src/mame/novag/sexpert.cpp @@ -445,7 +445,7 @@ void sexpert_state::sexpert(machine_config &config) PALETTE(config, "palette", FUNC(sexpert_state::lcd_palette), 3); - HD44780(config, m_lcd, 0); + HD44780(config, m_lcd); m_lcd->set_lcd_size(2, 8); m_lcd->set_pixel_update_cb(FUNC(sexpert_state::lcd_pixel_update)); diff --git a/src/mame/novation/basssta.cpp b/src/mame/novation/basssta.cpp index 0ccac7b2462..e1c9fbfbd81 100644 --- a/src/mame/novation/basssta.cpp +++ b/src/mame/novation/basssta.cpp @@ -79,7 +79,7 @@ INPUT_PORTS_END void basssta_state::bassstr(machine_config &config) { - MN1880(config, m_maincpu, 8000000); // type and clock unknown (custom silkscreen; might be MN18P83220) + MN1880(config, m_maincpu, XTAL::u(8000000)); // type and clock unknown (custom silkscreen; might be MN18P83220) m_maincpu->set_addrmap(AS_PROGRAM, &basssta_state::bassstr_prog); m_maincpu->set_addrmap(AS_DATA, &basssta_state::bassstr_data); @@ -88,7 +88,7 @@ void basssta_state::bassstr(machine_config &config) void basssta_state::sbasssta(machine_config &config) { - MN1880(config, m_maincpu, 8000000); // type and clock unknown (custom silkscreen) + MN1880(config, m_maincpu, XTAL::u(8000000)); // type and clock unknown (custom silkscreen) m_maincpu->set_addrmap(AS_PROGRAM, &basssta_state::sbasssta_prog); m_maincpu->set_addrmap(AS_DATA, &basssta_state::sbasssta_data); diff --git a/src/mame/novation/drumsta.cpp b/src/mame/novation/drumsta.cpp index b231ce73d1d..8d145b0dde3 100644 --- a/src/mame/novation/drumsta.cpp +++ b/src/mame/novation/drumsta.cpp @@ -52,11 +52,11 @@ INPUT_PORTS_END void drumsta_state::drumsta(machine_config &config) { - MN1880(config, m_maincpu, 8000000); // type and clock unknown (custom silkscreen) + MN1880(config, m_maincpu, XTAL::u(8000000)); // type and clock unknown (custom silkscreen) m_maincpu->set_addrmap(AS_PROGRAM, &drumsta_state::drumsta_prog); m_maincpu->set_addrmap(AS_DATA, &drumsta_state::drumsta_data); - ADSP2181(config, m_dsp, 16000000).set_disable(); // clock unknown + ADSP2181(config, m_dsp, XTAL::u(16000000)).set_disable(); // clock unknown EEPROM_2864(config, "eeprom"); // Atmel AT28C64 } diff --git a/src/mame/olivetti/m20.cpp b/src/mame/olivetti/m20.cpp index f423f57c9cf..05628ecb399 100644 --- a/src/mame/olivetti/m20.cpp +++ b/src/mame/olivetti/m20.cpp @@ -768,7 +768,7 @@ void m20_state::m20(machine_config &config) PALETTE(config, m_palette, palette_device::MONOCHROME); /* Devices */ - FD1797(config, m_fd1797, 1000000); + FD1797(config, m_fd1797, XTAL::u(1000000)); m_fd1797->intrq_wr_callback().set(m_i8259, FUNC(pic8259_device::ir0_w)); FLOPPY_CONNECTOR(config, "fd1797:0", m20_floppies, "5dd", m20_state::floppy_formats); FLOPPY_CONNECTOR(config, "fd1797:1", m20_floppies, "5dd", m20_state::floppy_formats); @@ -779,18 +779,18 @@ void m20_state::m20(machine_config &config) crtc.set_char_width(16); crtc.set_update_row_callback(FUNC(m20_state::update_row)); - I8255A(config, m_i8255, 0); + I8255A(config, m_i8255); - I8251(config, m_kbdi8251, 0); + I8251(config, m_kbdi8251); m_kbdi8251->txd_handler().set("kbd", FUNC(rs232_port_device::write_txd)); m_kbdi8251->rxrdy_handler().set(m_i8259, FUNC(pic8259_device::ir4_w)); - I8251(config, m_ttyi8251, 0); + I8251(config, m_ttyi8251); m_ttyi8251->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_ttyi8251->rxrdy_handler().set(m_i8259, FUNC(pic8259_device::ir3_w)); m_ttyi8251->txrdy_handler().set(m_i8259, FUNC(pic8259_device::ir5_w)); - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); + pit8253_device &pit8253(PIT8253(config, "pit8253")); pit8253.set_clk<0>(1230782); pit8253.out_handler<0>().set(FUNC(m20_state::tty_clock_tick_w)); pit8253.set_clk<1>(1230782); @@ -798,7 +798,7 @@ void m20_state::m20(machine_config &config) pit8253.set_clk<2>(1230782); pit8253.out_handler<2>().set(FUNC(m20_state::timer_tick_w)); - PIC8259(config, m_i8259, 0); + PIC8259(config, m_i8259); m_i8259->out_int_callback().set(FUNC(m20_state::int_w)); rs232_port_device &kbd(RS232_PORT(config, "kbd", keyboard, "m20")); diff --git a/src/mame/olivetti/m20_8086.cpp b/src/mame/olivetti/m20_8086.cpp index f197b12e620..21b42850484 100644 --- a/src/mame/olivetti/m20_8086.cpp +++ b/src/mame/olivetti/m20_8086.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(M20_8086, m20_8086_device, "m20_8086", "Olivetti M20 8086 Adapter") -m20_8086_device::m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m20_8086_device::m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M20_8086, tag, owner, clock), m_8086(*this, "8086"), m_maincpu(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/olivetti/m20_8086.h b/src/mame/olivetti/m20_8086.h index 98b561328c8..ec343735b86 100644 --- a/src/mame/olivetti/m20_8086.h +++ b/src/mame/olivetti/m20_8086.h @@ -12,14 +12,14 @@ class m20_8086_device : public device_t public: template m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&maincpu_tag, U &&pic_tag, V &&ram_tag) - : m20_8086_device(mconfig, tag, owner, (uint32_t)0) + : m20_8086_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(maincpu_tag)); m_pic.set_tag(std::forward(pic_tag)); m_ram.set_tag(std::forward(ram_tag)); } - m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m20_8086_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t z8000_io_r(offs_t offset, uint16_t mem_mask = ~0); void z8000_io_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/olivetti/m20_kbd.cpp b/src/mame/olivetti/m20_kbd.cpp index 47e1de9685b..dc94b93d9ca 100644 --- a/src/mame/olivetti/m20_kbd.cpp +++ b/src/mame/olivetti/m20_kbd.cpp @@ -154,8 +154,8 @@ INPUT_PORTS_END } // anonymous namespace -m20_keyboard_device::m20_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) - : buffered_rs232_device(mconfig, M20_KEYBOARD, tag, owner, 0) +m20_keyboard_device::m20_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) + : buffered_rs232_device(mconfig, M20_KEYBOARD, tag, owner) , device_matrix_keyboard_interface(mconfig, *this, "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8") , m_modifiers(*this, "MODIFIERS") { diff --git a/src/mame/olivetti/m20_kbd.h b/src/mame/olivetti/m20_kbd.h index 79cd9ef8151..d8a7493c339 100644 --- a/src/mame/olivetti/m20_kbd.h +++ b/src/mame/olivetti/m20_kbd.h @@ -9,7 +9,7 @@ class m20_keyboard_device : public buffered_rs232_device<16U>, protected device_matrix_keyboard_interface<9U> { public: - m20_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m20_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; protected: diff --git a/src/mame/olivetti/m24.cpp b/src/mame/olivetti/m24.cpp index feb3ff6eb70..eb893442370 100644 --- a/src/mame/olivetti/m24.cpp +++ b/src/mame/olivetti/m24.cpp @@ -592,14 +592,14 @@ void m24_state::olivetti(machine_config &config) m_isabus->drq3_callback().set(m_dmac, FUNC(am9517a_device::dreq3_w)); m_isabus->iochck_callback().set(FUNC(m24_state::chck_w)); - ISA8_SLOT(config, "mb1", 0, m_isabus, pc_isa8_cards, "cga_m24", true); - ISA8_SLOT(config, "mb2", 0, m_isabus, pc_isa8_cards, "fdc_xt", true).set_option_machine_config("fdc_xt", cfg_m20_format); - ISA8_SLOT(config, "mb3", 0, m_isabus, pc_isa8_cards, "lpt", true); - ISA8_SLOT(config, "mb4", 0, m_isabus, pc_isa8_cards, "com", true); + ISA8_SLOT(config, "mb1", m_isabus, pc_isa8_cards, "cga_m24", true); + ISA8_SLOT(config, "mb2", m_isabus, pc_isa8_cards, "fdc_xt", true).set_option_machine_config("fdc_xt", cfg_m20_format); + ISA8_SLOT(config, "mb3", m_isabus, pc_isa8_cards, "lpt", true); + ISA8_SLOT(config, "mb4", m_isabus, pc_isa8_cards, "com", true); - ISA8_SLOT(config, "isa1", 0, m_isabus, pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa2", 0, m_isabus, pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, m_isabus, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", m_isabus, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa2", m_isabus, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", m_isabus, pc_isa8_cards, nullptr, false); // 2 banks of 16 64Kx1 or 256Kx1 DRAMs on motherboard RAM(config, m_ram).set_default_size("640K").set_extra_options("128K, 256K, 512K"); @@ -609,12 +609,12 @@ void m24_state::olivetti(machine_config &config) m_kbc->in_porta().set(FUNC(m24_state::pa_r)); m_kbc->out_portb().set(FUNC(m24_state::pb_w)); - M24_KEYBOARD(config, m_keyboard, 0); + M24_KEYBOARD(config, m_keyboard); m_keyboard->out_data_handler().set(FUNC(m24_state::kbcin_w)); MM58174(config, "mm58174an", 32.768_kHz_XTAL); - M24_Z8000(config, m_z8000_apb, 0); // TODO: make this a slot device (uses custom bus connector) + M24_Z8000(config, m_z8000_apb); // TODO: make this a slot device (uses custom bus connector) m_z8000_apb->halt_callback().set(FUNC(m24_state::halt_i86_w)); /* software lists */ diff --git a/src/mame/olivetti/m24_kbd.cpp b/src/mame/olivetti/m24_kbd.cpp index dc45fec3c3c..ab245dbb82e 100644 --- a/src/mame/olivetti/m24_kbd.cpp +++ b/src/mame/olivetti/m24_kbd.cpp @@ -204,7 +204,7 @@ ioport_constructor m24_keyboard_device::device_input_ports() const return INPUT_PORTS_NAME( m24_keyboard ); } -m24_keyboard_device::m24_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m24_keyboard_device::m24_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M24_KEYBOARD, tag, owner, clock) , m_rows(*this, "ROW.%u", 0) , m_mousebtn(*this, "MOUSEBTN") diff --git a/src/mame/olivetti/m24_kbd.h b/src/mame/olivetti/m24_kbd.h index 3e6d44dd540..c14b8aac044 100644 --- a/src/mame/olivetti/m24_kbd.h +++ b/src/mame/olivetti/m24_kbd.h @@ -11,7 +11,7 @@ class m24_keyboard_device : public device_t { public: - m24_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m24_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_data_handler() { return m_out_data.bind(); } diff --git a/src/mame/olivetti/m24_z8000.cpp b/src/mame/olivetti/m24_z8000.cpp index 82b62bb5104..c661d51fc15 100644 --- a/src/mame/olivetti/m24_z8000.cpp +++ b/src/mame/olivetti/m24_z8000.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(M24_Z8000, m24_z8000_device, "m24_z8000", "Olivetti M24 Z8000 Adapter") -m24_z8000_device::m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m24_z8000_device::m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M24_Z8000, tag, owner, clock), m_z8000(*this, "z8000"), m_maincpu(*this, ":maincpu"), @@ -80,7 +80,7 @@ void m24_z8000_device::device_add_mconfig(machine_config &config) m_z8000->viack().set(FUNC(m24_z8000_device::viack_r)); m_z8000->mo().set(FUNC(m24_z8000_device::mo_w)); - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); + pit8253_device &pit8253(PIT8253(config, "pit8253")); pit8253.set_clk<0>(19660000/15); //8251 pit8253.out_handler<0>().set_nop(); pit8253.set_clk<1>(19660000/15); @@ -88,7 +88,7 @@ void m24_z8000_device::device_add_mconfig(machine_config &config) pit8253.set_clk<2>(19660000/15); pit8253.out_handler<2>().set(FUNC(m24_z8000_device::timer_irq_w)); - I8251(config, "i8251", 0); + I8251(config, "i8251"); } const uint8_t m24_z8000_device::pmem_table[16][4] = diff --git a/src/mame/olivetti/m24_z8000.h b/src/mame/olivetti/m24_z8000.h index e6d7283d82f..ec65748854c 100644 --- a/src/mame/olivetti/m24_z8000.h +++ b/src/mame/olivetti/m24_z8000.h @@ -14,7 +14,7 @@ class m24_z8000_device : public device_t { public: - m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto halt_callback() { return m_halt_out.bind(); } diff --git a/src/mame/olivetti/olivpc1.cpp b/src/mame/olivetti/olivpc1.cpp index f84f47b8a13..4780c456cc9 100644 --- a/src/mame/olivetti/olivpc1.cpp +++ b/src/mame/olivetti/olivpc1.cpp @@ -178,7 +178,7 @@ void olivpc1_state::olivpc1(machine_config &config) PC_KEYB(config, m_keyboard); m_keyboard->keypress().set([this](int state) { m_obf = state; m_maincpu->set_input_line(INPUT_LINE_IRQ1, state); }); - isa8_device &isa(ISA8(config, "isa", 0)); + isa8_device &isa(ISA8(config, "isa")); isa.set_memspace("maincpu", AS_PROGRAM); isa.set_iospace("maincpu", AS_IO); isa.drq1_callback().set(m_maincpu, FUNC(v40_device::dreq_w<0>)); @@ -189,8 +189,8 @@ void olivpc1_state::olivpc1(machine_config &config) isa.irq5_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ5); isa.iochck_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); - ISA8_SLOT(config, "intcga", 0, isa, pc_isa8_cards, "cga", true); - ISA8_SLOT(config, "isa1", 0, isa, pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "intcga", isa, pc_isa8_cards, "cga", true); + ISA8_SLOT(config, "isa1", isa, pc_isa8_cards, nullptr, false); RAM(config, RAM_TAG).set_default_size("512K").set_extra_options("128K, 256K, 384K"); SOFTWARE_LIST(config, "pc_list").set_compatible("ibm5150"); diff --git a/src/mame/olympia/dday.cpp b/src/mame/olympia/dday.cpp index eabb34a8e7d..d163c765834 100644 --- a/src/mame/olympia/dday.cpp +++ b/src/mame/olympia/dday.cpp @@ -257,7 +257,7 @@ void dday_state::machine_reset() void dday_state::dday(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2000000); /* 2 MHz ? */ + Z80(config, m_maincpu, XTAL::u(2000000)); /* 2 MHz ? */ m_maincpu->set_addrmap(AS_PROGRAM, &dday_state::dday_map); @@ -277,8 +277,8 @@ void dday_state::dday(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8912(config, m_ay1, 1000000).add_route(ALL_OUTPUTS, "mono", 0.25); - AY8912(config, "ay2", 1000000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8912(config, m_ay1, XTAL::u(1000000)).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8912(config, "ay2", XTAL::u(1000000)).add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/olympia/monzagp.cpp b/src/mame/olympia/monzagp.cpp index 5ef342070a1..3167c5762ee 100644 --- a/src/mame/olympia/monzagp.cpp +++ b/src/mame/olympia/monzagp.cpp @@ -515,11 +515,11 @@ void monzagp_state::monzagp(machine_config &config) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(10920000, 700, 0, 560, 312, 11, 240); // 11-line offset makes attract mode look symmetric + screen.set_raw(XTAL::u(10920000), 700, 0, 560, 312, 11, 240); // 11-line offset makes attract mode look symmetric screen.set_screen_update(FUNC(monzagp_state::screen_update)); screen.set_palette(m_palette); - DP8350(config, m_crtc, 10920000); // pins 21/22 connected to XTAL, 3 to GND, 5 to +5 + DP8350(config, m_crtc, XTAL::u(10920000)); // pins 21/22 connected to XTAL, 3 to GND, 5 to +5 m_crtc->set_screen("screen"); m_crtc->refresh_control(0); m_crtc->vsync_callback().set_inputline(m_maincpu, MCS48_INPUT_IRQ).invert(); // active low; no inverter should be needed diff --git a/src/mame/olympia/portrait.cpp b/src/mame/olympia/portrait.cpp index 7c4dc7390d6..08187a35e1e 100644 --- a/src/mame/olympia/portrait.cpp +++ b/src/mame/olympia/portrait.cpp @@ -256,11 +256,11 @@ GFXDECODE_END void portrait_state::portrait(machine_config &config) { - Z80(config, m_maincpu, 4000000); /* 4 MHz ? */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz ? */ m_maincpu->set_addrmap(AS_PROGRAM, &portrait_state::portrait_map); m_maincpu->set_vblank_int("screen", FUNC(portrait_state::irq0_line_hold)); - i8039_device &audiocpu(I8039(config, "audiocpu", 3120000)); /* ? */ + i8039_device &audiocpu(I8039(config, "audiocpu", XTAL::u(3120000))); /* ? */ audiocpu.set_addrmap(AS_PROGRAM, &portrait_state::portrait_sound_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -281,7 +281,7 @@ void portrait_state::portrait(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - TMS5200(config, m_tms, 640000).add_route(ALL_OUTPUTS, "mono", 1.0); + TMS5200(config, m_tms, XTAL::u(640000)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/olympia/vega.cpp b/src/mame/olympia/vega.cpp index 5b9251df65b..66327bf303b 100644 --- a/src/mame/olympia/vega.cpp +++ b/src/mame/olympia/vega.cpp @@ -790,7 +790,7 @@ void vega_state::machine_start() void vega_state::vega(machine_config &config) { - I8035(config, m_maincpu, 4000000); + I8035(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &vega_state::vega_map); m_maincpu->set_addrmap(AS_IO, &vega_state::vega_io_map); m_maincpu->p1_in_cb().set_ioport("DSW"); @@ -819,7 +819,7 @@ void vega_state::vega(machine_config &config) screen.set_screen_update(FUNC(vega_state::screen_update)); screen.set_palette(m_palette); - DP8350(config, m_crtc, 10920000); // pins 21/22 connected to XTAL, 3 to GND + DP8350(config, m_crtc, XTAL::u(10920000)); // pins 21/22 connected to XTAL, 3 to GND m_crtc->set_screen("screen"); m_crtc->refresh_control(0); m_crtc->vblank_callback().set_inputline(m_maincpu, MCS48_INPUT_IRQ); // inverse of pin 2? @@ -830,7 +830,7 @@ void vega_state::vega(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay8910, 1500000); + AY8910(config, m_ay8910, XTAL::u(1500000)); m_ay8910->port_a_read_callback().set(FUNC(vega_state::ay8910_pa_r)); m_ay8910->port_b_read_callback().set(FUNC(vega_state::ay8910_pb_r)); m_ay8910->port_a_write_callback().set(FUNC(vega_state::ay8910_pa_w)); diff --git a/src/mame/olympiaint/olyboss.cpp b/src/mame/olympiaint/olyboss.cpp index 5b547312b24..4dc1cd3230c 100644 --- a/src/mame/olympiaint/olyboss.cpp +++ b/src/mame/olympiaint/olyboss.cpp @@ -438,10 +438,10 @@ void olyboss_state::olybossd(machine_config &config) /* devices */ - AM9519(config, m_uic, 0); + AM9519(config, m_uic); m_uic->out_int_callback().set_inputline("maincpu", 0); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set(m_uic, FUNC(am9519_device::ireq2_w)).invert(); m_fdc->drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq0_w)); FLOPPY_CONNECTOR(config, m_fdd0, bosscd_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); @@ -469,7 +469,7 @@ void olyboss_state::olybossd(machine_config &config) m_ppi->out_pc_callback().set(FUNC(olyboss_state::ppic_w)); /* keyboard */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(olyboss_state::keyboard_put)); } @@ -505,10 +505,10 @@ void olyboss_state::bossb85(machine_config &config) /* devices */ - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set_inputline(m_maincpu, I8085_RST65_LINE); m_fdc->drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq0_w)); FLOPPY_CONNECTOR(config, "fdc:0", bossb_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); @@ -532,7 +532,7 @@ void olyboss_state::bossb85(machine_config &config) m_crtc->set_screen(SCREEN_TAG); /* keyboard */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(olyboss_state::keyboard85_put)); } diff --git a/src/mame/olympiaint/olytext.cpp b/src/mame/olympiaint/olytext.cpp index 8eab41a390a..cb2c4c9e5cd 100644 --- a/src/mame/olympiaint/olytext.cpp +++ b/src/mame/olympiaint/olytext.cpp @@ -169,7 +169,7 @@ void olytext_state::olytext(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:1", olytext_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); /* keyboard */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(olytext_state::keyboard_put)); } diff --git a/src/mame/olympiaint/peoplepc.cpp b/src/mame/olympiaint/peoplepc.cpp index 39f39878d99..93b5e4a083f 100644 --- a/src/mame/olympiaint/peoplepc.cpp +++ b/src/mame/olympiaint/peoplepc.cpp @@ -331,7 +331,7 @@ void peoplepc_state::olypeopl(machine_config &config) kbd.rxd_handler().set(m_8251key, FUNC(i8251_device::write_rxd)); kbd.set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(keyboard)); - I8048(config, "kbdmcu", 4'608'000).set_disable(); // XTAL unknown + I8048(config, "kbdmcu", XTAL::u(4'608'000)).set_disable(); // XTAL unknown I8251(config, m_8251ser, XTAL(14'745'600)/6); m_8251ser->rxrdy_handler().set("pic8259_0", FUNC(pic8259_device::ir5_w)); diff --git a/src/mame/omnibyte/ob68k1a.cpp b/src/mame/omnibyte/ob68k1a.cpp index 6ad34e6505f..fe9b99e02e3 100644 --- a/src/mame/omnibyte/ob68k1a.cpp +++ b/src/mame/omnibyte/ob68k1a.cpp @@ -187,11 +187,11 @@ void ob68k1a_state::ob68k1a(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &ob68k1a_state::ob68k1a_mem); // devices - PIA6821(config, m_pia0, 0); - PIA6821(config, m_pia1, 0); - PTM6840(config, MC6840_TAG, 10_MHz_XTAL/10).set_external_clocks(0, 0, 0); + PIA6821(config, m_pia0); + PIA6821(config, m_pia1); + PTM6840(config, MC6840_TAG, 10_MHz_XTAL/10).set_external_clocks(XTAL(), XTAL(), XTAL()); - ACIA6850(config, m_acia0, 0); + ACIA6850(config, m_acia0); m_acia0->txd_handler().set(m_rs232a, FUNC(rs232_port_device::write_txd)); m_acia0->rts_handler().set(m_rs232a, FUNC(rs232_port_device::write_rts)); @@ -200,7 +200,7 @@ void ob68k1a_state::ob68k1a(machine_config &config) m_rs232a->dcd_handler().set(m_acia0, FUNC(acia6850_device::write_dcd)); m_rs232a->cts_handler().set(m_acia0, FUNC(acia6850_device::write_cts)); - ACIA6850(config, m_acia1, 0); + ACIA6850(config, m_acia1); m_acia1->txd_handler().set(m_rs232b, FUNC(rs232_port_device::write_txd)); m_acia1->rts_handler().set(m_rs232b, FUNC(rs232_port_device::write_rts)); @@ -216,7 +216,7 @@ void ob68k1a_state::ob68k1a(machine_config &config) m_dbrg->ft_handler().append(m_acia1, FUNC(acia6850_device::write_rxc)); // internal ram - RAM(config, m_ram, 0); + RAM(config, m_ram); m_ram->set_default_size("32K"); m_ram->set_extra_options("128K"); } diff --git a/src/mame/omori/spaceg.cpp b/src/mame/omori/spaceg.cpp index 128022f6b77..850e0258b9c 100644 --- a/src/mame/omori/spaceg.cpp +++ b/src/mame/omori/spaceg.cpp @@ -507,7 +507,7 @@ INPUT_PORTS_END void spaceg_state::spaceg(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); /* 2.5 MHz */ + Z80(config, m_maincpu, XTAL::u(2500000)); /* 2.5 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &spaceg_state::spaceg_map); /* video hardware */ diff --git a/src/mame/omron/luna_68k.cpp b/src/mame/omron/luna_68k.cpp index 0d1c432bfaa..cb30b288785 100644 --- a/src/mame/omron/luna_68k.cpp +++ b/src/mame/omron/luna_68k.cpp @@ -150,9 +150,9 @@ void luna_68k_state::luna(machine_config &config) RAM(config, m_ram); m_ram->set_default_size("16M"); - DS1287(config, m_rtc, 32'768); + DS1287(config, m_rtc, XTAL::u(32'768)); - UPD7201(config, m_sio, 9'830'000); // D9.83B0 + UPD7201(config, m_sio, XTAL::u(9'830'000)); // D9.83B0 // console RS232_PORT(config, m_serial[0], default_rs232_devices, "terminal"); @@ -171,7 +171,7 @@ void luna_68k_state::luna(machine_config &config) m_serial[1]->rxd_handler().set(m_sio, FUNC(upd7201_device::rxb_w)); m_serial[1]->cts_handler().set(m_sio, FUNC(upd7201_device::ctsb_w)); - AM9513(config, m_stc, 9'830'000); // FIXME: clock? sources? + AM9513(config, m_stc, XTAL::u(9'830'000)); // FIXME: clock? sources? m_stc->fout_cb().set(m_stc, FUNC(am9513_device::gate1_w)); // assumption based on a common configuration m_stc->out4_cb().set(m_sio, FUNC(upd7201_device::rxca_w)); m_stc->out4_cb().append(m_sio, FUNC(upd7201_device::txca_w)); diff --git a/src/mame/orca/espial.cpp b/src/mame/orca/espial.cpp index fa048ba346a..de69c53b176 100644 --- a/src/mame/orca/espial.cpp +++ b/src/mame/orca/espial.cpp @@ -620,11 +620,11 @@ GFXDECODE_END void espial_state::espial(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 3'072'000); // 3.072 MHz + Z80(config, m_maincpu, XTAL::u(3'072'000)); // 3.072 MHz m_maincpu->set_addrmap(AS_PROGRAM, &espial_state::main_map); TIMER(config, "scantimer").configure_scanline(FUNC(espial_state::scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 3'072'000); // 2 MHz?????? + Z80(config, m_audiocpu, XTAL::u(3'072'000)); // 2 MHz?????? m_audiocpu->set_addrmap(AS_PROGRAM, &espial_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &espial_state::sound_io_map); m_audiocpu->set_periodic_int(FUNC(espial_state::sound_nmi_gen), attotime::from_hz(4 * 60)); @@ -649,7 +649,7 @@ void espial_state::espial(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); GENERIC_LATCH_8(config, "soundlatch2"); - AY8910(config, "aysnd", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8910(config, "aysnd", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "mono", 0.50); } void netwars_state::netwars(machine_config &config) diff --git a/src/mame/orca/funkybee.cpp b/src/mame/orca/funkybee.cpp index 4ff953cc40c..226f6fe40a0 100644 --- a/src/mame/orca/funkybee.cpp +++ b/src/mame/orca/funkybee.cpp @@ -489,7 +489,7 @@ void funkybee_state::machine_start() void funkybee_state::funkybee(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 3'072'000); // 3.072 MHz + Z80(config, m_maincpu, XTAL::u(3'072'000)); // 3.072 MHz m_maincpu->set_addrmap(AS_PROGRAM, &funkybee_state::prg_map); m_maincpu->set_addrmap(AS_IO, &funkybee_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(funkybee_state::irq0_line_hold)); @@ -517,7 +517,7 @@ void funkybee_state::funkybee(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ay8912_device &ay8912(AY8912(config, "aysnd", 1'500'000)); // AY-3-8912 verified for Sky Lancer + ay8912_device &ay8912(AY8912(config, "aysnd", XTAL::u(1'500'000))); // AY-3-8912 verified for Sky Lancer ay8912.port_a_read_callback().set_ioport("DSW"); ay8912.add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/orca/orca40c.cpp b/src/mame/orca/orca40c.cpp index 80a8ac941a7..9b181a90877 100644 --- a/src/mame/orca/orca40c.cpp +++ b/src/mame/orca/orca40c.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(ORCA_OVG_40C, orca_ovg_40c_device, "orca_ovg_40c", "Orca OVG 40c video PCB") -orca_ovg_40c_device::orca_ovg_40c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +orca_ovg_40c_device::orca_ovg_40c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ORCA_OVG_40C, tag, owner, clock), device_gfx_interface(mconfig, *this, nullptr, "palette"), device_video_interface(mconfig, *this), diff --git a/src/mame/orca/orca40c.h b/src/mame/orca/orca40c.h index 66e8a0af537..19fe6a136d0 100644 --- a/src/mame/orca/orca40c.h +++ b/src/mame/orca/orca40c.h @@ -26,7 +26,7 @@ class orca_ovg_40c_device : public device_t, public device_gfx_interface, public { public: // construction/destruction - orca_ovg_40c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + orca_ovg_40c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_percuss_hardware(bool percuss_hardware) { m_percuss_hardware = percuss_hardware; } diff --git a/src/mame/orca/vastar.cpp b/src/mame/orca/vastar.cpp index 33e5ca5df3e..13557dd8502 100644 --- a/src/mame/orca/vastar.cpp +++ b/src/mame/orca/vastar.cpp @@ -776,7 +776,7 @@ void dogfightp_state::dogfightp(machine_config &config) SCREEN(config, "screen", SCREEN_TYPE_RASTER); - orca_ovg_40c_device& videopcb(ORCA_OVG_40C(config, "videopcb", 0)); + orca_ovg_40c_device& videopcb(ORCA_OVG_40C(config, "videopcb")); videopcb.set_screen("screen"); videopcb.set_percuss_hardware(true); } diff --git a/src/mame/orca/zodiack.cpp b/src/mame/orca/zodiack.cpp index 33fd1fb8b08..7fdad4dff49 100644 --- a/src/mame/orca/zodiack.cpp +++ b/src/mame/orca/zodiack.cpp @@ -566,7 +566,7 @@ void zodiack_state::zodiack(machine_config &config) SCREEN(config, "screen", SCREEN_TYPE_RASTER).screen_vblank().set(FUNC(zodiack_state::vblank_main_nmi_w)); - orca_ovg_40c_device &videopcb(ORCA_OVG_40C(config, "videopcb", 0)); + orca_ovg_40c_device &videopcb(ORCA_OVG_40C(config, "videopcb")); videopcb.set_screen("screen"); // sound hardware diff --git a/src/mame/osborne/osbexec.cpp b/src/mame/osborne/osbexec.cpp index 8e77b14843e..6fd855f359e 100644 --- a/src/mame/osborne/osbexec.cpp +++ b/src/mame/osborne/osbexec.cpp @@ -548,7 +548,7 @@ void osbexec_state::osbexec(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set(FUNC(osbexec_state::osbexec_pia0_a_r)); m_pia[0]->readpb_handler().set(FUNC(osbexec_state::osbexec_pia0_b_r)); m_pia[0]->writepa_handler().set(FUNC(osbexec_state::osbexec_pia0_a_w)); @@ -558,7 +558,7 @@ void osbexec_state::osbexec(machine_config &config) m_pia[0]->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_pia[0]->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); m_pia[1]->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<3>)); @@ -576,7 +576,7 @@ void osbexec_state::osbexec(machine_config &config) m_sio->out_rtsb_callback().set(PRINTER_PORT_TAG, FUNC(rs232_port_device::write_rts)); m_sio->out_int_callback().set("mainirq", FUNC(input_merger_device::in_w<4>)); - pit8253_device &ctc(PIT8253(config, "ctc", 0)); + pit8253_device &ctc(PIT8253(config, "ctc")); ctc.set_clk<0>(MAIN_CLOCK / 13); // divided by 74S161 @ UC25 ctc.set_clk<1>(MAIN_CLOCK / 13); // divided by 74S161 @ UC25 ctc.set_clk<2>(MAIN_CLOCK / 12); diff --git a/src/mame/osborne/osborne1.cpp b/src/mame/osborne/osborne1.cpp index beb077055b2..49218e8e153 100644 --- a/src/mame/osborne/osborne1.cpp +++ b/src/mame/osborne/osborne1.cpp @@ -307,7 +307,7 @@ void osborne1_state::osborne1_base(machine_config &config) m_pia0->cb2_handler().set(m_ieee, FUNC(ieee488_device::host_ren_w)); m_pia0->irqa_handler().set(FUNC(osborne1_state::ieee_pia_irq_a_func)); - IEEE488(config, m_ieee, 0); + IEEE488(config, m_ieee); m_ieee->srq_callback().set(m_pia0, FUNC(pia6821_device::ca2_w)); PIA6821(config, m_pia1); diff --git a/src/mame/osborne/vixen.cpp b/src/mame/osborne/vixen.cpp index 96b04d48b01..dcd468232a3 100644 --- a/src/mame/osborne/vixen.cpp +++ b/src/mame/osborne/vixen.cpp @@ -848,7 +848,7 @@ void vixen_state::vixen(machine_config &config) m_io_i8155->out_pc_callback().set(FUNC(vixen_state::io_i8155_pc_w)); m_io_i8155->out_to_callback().set(FUNC(vixen_state::io_i8155_to_w)); - I8251(config, m_usart, 0); + I8251(config, m_usart); m_usart->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_usart->dtr_handler().set(m_rs232, FUNC(rs232_port_device::write_dtr)); m_usart->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/osi/osi.cpp b/src/mame/osi/osi.cpp index 81d691b02a0..3a3ea935efb 100644 --- a/src/mame/osi/osi.cpp +++ b/src/mame/osi/osi.cpp @@ -759,10 +759,10 @@ void sb2m600_state::osi600(machine_config &config) m_discrete->add_route(ALL_OUTPUTS, "mono", 0.50); /* cassette ACIA */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set([this] (bool state) { m_cassbit = state; }); - clock_device &acia_clock(CLOCK(config, "acia_clock", 4'800)); // 300 baud x 16(divider) = 4800 + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(4'800))); // 300 baud x 16(divider) = 4800 acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); @@ -792,10 +792,10 @@ void uk101_state::uk101(machine_config &config) SPEAKER(config, "mono").front_center(); /* cassette ACIA */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set([this] (bool state) { m_cassbit = state; }); - clock_device &acia_clock(CLOCK(config, "acia_clock", 4'800)); // 300 baud x 16(divider) = 4800 + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(4'800))); // 300 baud x 16(divider) = 4800 acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); @@ -826,18 +826,18 @@ void c1p_state::c1p(machine_config &config) DISCRETE(config, m_discrete); m_discrete->set_intf(osi600c_discrete_interface); m_discrete->add_route(ALL_OUTPUTS, "mono", 0.50); - BEEP(config, "beeper", 300).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper", XTAL::u(300)).add_route(ALL_OUTPUTS, "mono", 0.50); TIMER(config, m_beep_timer).configure_generic(FUNC(c1p_state::beep_timer)); - PIA6821(config, "pia_1", 0); - PIA6821(config, "pia_2", 0); - PIA6821(config, "pia_3", 0); + PIA6821(config, "pia_1"); + PIA6821(config, "pia_2"); + PIA6821(config, "pia_3"); /* cassette ACIA */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set([this] (bool state) { m_cassbit = state; }); - clock_device &acia_clock(CLOCK(config, "acia_clock", 4'800)); // 300 baud x 16(divider) = 4800 + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(4'800))); // 300 baud x 16(divider) = 4800 acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); @@ -858,14 +858,14 @@ void c1pmf_state::c1pmf(machine_config &config) c1p(config); m_maincpu->set_addrmap(AS_PROGRAM, &c1pmf_state::c1pmf_mem); - pia6821_device &pia0(PIA6821(config, "pia_0", 0)); + pia6821_device &pia0(PIA6821(config, "pia_0")); pia0.readpa_handler().set(FUNC(c1pmf_state::osi470_pia_pa_r)); pia0.writepa_handler().set(FUNC(c1pmf_state::osi470_pia_pa_w)); pia0.writepb_handler().set(FUNC(c1pmf_state::osi470_pia_pb_w)); pia0.cb2_handler().set(FUNC(c1pmf_state::osi470_pia_cb2_w)); /* floppy ACIA */ - ACIA6850(config, "acia_1", 0); + ACIA6850(config, "acia_1"); CLOCK(config, "floppy_clock", XTAL(4'000'000)/8).signal_handler().set("acia_1", FUNC(acia6850_device::write_txc)); // 250 kHz @@ -926,7 +926,7 @@ ROM_END TIMER_DEVICE_CALLBACK_MEMBER(c1p_state::beep_timer) { m_beeper->set_state(0); - m_beeper->set_clock(300); + m_beeper->set_clock(XTAL::u(300)); } void c1p_state::init_c1p() diff --git a/src/mame/pacific/mrflea.cpp b/src/mame/pacific/mrflea.cpp index 0937a92a819..dc1e86e3d43 100644 --- a/src/mame/pacific/mrflea.cpp +++ b/src/mame/pacific/mrflea.cpp @@ -418,30 +418,30 @@ void mrflea_state::machine_reset() void mrflea_state::mrflea(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 4'000'000); // 4 MHz? + Z80(config, m_maincpu, XTAL::u(4'000'000)); // 4 MHz? m_maincpu->set_addrmap(AS_PROGRAM, &mrflea_state::master_map); m_maincpu->set_addrmap(AS_IO, &mrflea_state::master_io_map); m_maincpu->set_vblank_int("screen", FUNC(mrflea_state::irq0_line_hold)); // NMI resets the game - Z80(config, m_subcpu, 6'000'000); // runs in IM 1, so doesn't use 8259 INTA + Z80(config, m_subcpu, XTAL::u(6'000'000)); // runs in IM 1, so doesn't use 8259 INTA m_subcpu->set_addrmap(AS_PROGRAM, &mrflea_state::slave_map); m_subcpu->set_addrmap(AS_IO, &mrflea_state::slave_io_map); TIMER(config, "scantimer").configure_scanline(FUNC(mrflea_state::slave_interrupt), "screen", 0, 1); config.set_maximum_quantum(attotime::from_hz(6000)); - i8255_device &mainppi(I8255(config, "mainppi", 0)); + i8255_device &mainppi(I8255(config, "mainppi")); mainppi.in_pb_callback().set("subppi", FUNC(i8255_device::pb_r)); mainppi.out_pc_callback().set("subppi", FUNC(i8255_device::pc4_w)).bit(7); // OBFA -> STBA mainppi.out_pc_callback().append("subppi", FUNC(i8255_device::pc2_w)).bit(1); // IBFB -> ACKB - i8255_device &subppi(I8255(config, "subppi", 0)); + i8255_device &subppi(I8255(config, "subppi")); subppi.in_pa_callback().set("mainppi", FUNC(i8255_device::pa_r)); subppi.out_pc_callback().set("mainppi", FUNC(i8255_device::pc6_w)).bit(5); // IBFA -> ACKA subppi.out_pc_callback().append(m_pic, FUNC(pic8259_device::ir0_w)).bit(3); // INTRA subppi.out_pc_callback().append("mainppi", FUNC(i8255_device::pc2_w)).bit(1); // OBFB -> STBB - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_subcpu, 0); // video hardware @@ -459,19 +459,19 @@ void mrflea_state::mrflea(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ay8910_device &ay1(AY8910(config, "ay1", 2'000'000)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(2'000'000))); ay1.port_a_read_callback().set_ioport("IN1"); ay1.port_b_read_callback().set_ioport("IN0"); ay1.add_route(ALL_OUTPUTS, "mono", 0.25); - AY8910(config, "ay2", 2'000'000).add_route(ALL_OUTPUTS, "mono", 0.25); // not used for sound? + AY8910(config, "ay2", XTAL::u(2'000'000)).add_route(ALL_OUTPUTS, "mono", 0.25); // not used for sound? ay8910_device &ay3(AY8910(config, "ay3", 2'000'000)); ay3.port_a_read_callback().set_ioport("DSW2"); ay3.port_b_read_callback().set_ioport("DSW1"); ay3.add_route(ALL_OUTPUTS, "mono", 0.25); - ay8910_device &ay4(AY8910(config, "ay4", 2'000'000)); + ay8910_device &ay4(AY8910(config, "ay4", XTAL::u(2'000'000))); ay4.port_a_read_callback().set_ioport("UNKNOWN"); ay4.port_b_write_callback().set(FUNC(mrflea_state::data1_w)); ay4.add_route(ALL_OUTPUTS, "mono", 0.25); diff --git a/src/mame/pacman/pacman.cpp b/src/mame/pacman/pacman.cpp index d25daabdb93..9ff96e892c4 100644 --- a/src/mame/pacman/pacman.cpp +++ b/src/mame/pacman/pacman.cpp @@ -3874,9 +3874,9 @@ void pacman_state::vanvan(machine_config &config) // Sound hardware config.device_remove("namco"); - SN76496(config, "sn1", 1789750).add_route(ALL_OUTPUTS, "mono", 0.75); + SN76496(config, "sn1", XTAL::u(1789750)).add_route(ALL_OUTPUTS, "mono", 0.75); - SN76496(config, "sn2", 1789750).add_route(ALL_OUTPUTS, "mono", 0.75); + SN76496(config, "sn2", XTAL::u(1789750)).add_route(ALL_OUTPUTS, "mono", 0.75); m_mainlatch->q_out_cb<0>().set(FUNC(pacman_state::nmi_mask_w)); m_mainlatch->q_out_cb<1>().set_nop(); @@ -4032,7 +4032,7 @@ void pacman_state::crushs(machine_config &config) m_maincpu->remove_irq_acknowledge_callback(); // Sound hardware - ay8912_device &ay8912(AY8912(config, "ay8912", 1789750)); + ay8912_device &ay8912(AY8912(config, "ay8912", XTAL::u(1789750))); ay8912.port_a_read_callback().set_ioport("DSW2"); ay8912.add_route(ALL_OUTPUTS, "mono", 0.75); } diff --git a/src/mame/pacman/pengo.cpp b/src/mame/pacman/pengo.cpp index fdf27ed3a3a..dac9bf3c703 100644 --- a/src/mame/pacman/pengo.cpp +++ b/src/mame/pacman/pengo.cpp @@ -115,7 +115,7 @@ private: * *************************************/ -#define MASTER_CLOCK (18432000) +#define MASTER_CLOCK XTAL::u(18432000) #define PIXEL_CLOCK (MASTER_CLOCK/3) diff --git a/src/mame/pacman/schick.cpp b/src/mame/pacman/schick.cpp index 08ea82c7a80..e0db16d3804 100644 --- a/src/mame/pacman/schick.cpp +++ b/src/mame/pacman/schick.cpp @@ -120,7 +120,7 @@ private: uint8_t m_extrabank = 0; }; -#define MASTER_CLOCK (18432000) +#define MASTER_CLOCK XTAL::u(18432000) #define PIXEL_CLOCK (MASTER_CLOCK/3) diff --git a/src/mame/palm/palm.cpp b/src/mame/palm/palm.cpp index f15cd7bf424..4a221b481a8 100644 --- a/src/mame/palm/palm.cpp +++ b/src/mame/palm/palm.cpp @@ -202,7 +202,7 @@ void palm_state::palm(machine_config &config) /* audio hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); } static INPUT_PORTS_START( palm ) diff --git a/src/mame/palm/palmz22.cpp b/src/mame/palm/palmz22.cpp index 5478fcd5807..4dee45f5a74 100644 --- a/src/mame/palm/palmz22.cpp +++ b/src/mame/palm/palmz22.cpp @@ -292,7 +292,7 @@ void palmz22_state::init_palmz22() void palmz22_state::palmz22(machine_config &config) { - ARM920T(config, m_maincpu, 266000000); + ARM920T(config, m_maincpu, XTAL::u(266000000)); m_maincpu->set_addrmap(AS_PROGRAM, &palmz22_state::map); PALETTE(config, "palette").set_entries(32768); @@ -304,7 +304,7 @@ void palmz22_state::palmz22(machine_config &config) screen.set_visarea(0, 160 - 1, 0, 160 - 1); screen.set_screen_update("s3c2410", FUNC(s3c2410_device::screen_update)); - S3C2410(config, m_s3c2410, 12000000); + S3C2410(config, m_s3c2410, XTAL::u(12000000)); m_s3c2410->set_palette_tag("palette"); m_s3c2410->set_screen_tag("screen"); m_s3c2410->core_pin_r_callback().set(FUNC(palmz22_state::s3c2410_core_pin_r)); @@ -316,7 +316,7 @@ void palmz22_state::palmz22(machine_config &config) m_s3c2410->nand_data_r_callback().set(FUNC(palmz22_state::s3c2410_nand_data_r)); m_s3c2410->nand_data_w_callback().set(FUNC(palmz22_state::s3c2410_nand_data_w)); - NAND(config, m_nand, 0); + NAND(config, m_nand); m_nand->set_nand_type(nand_device::chip::K9F5608U0D_J); m_nand->rnb_wr_callback().set(m_s3c2410, FUNC(s3c2410_device::frnb_w)); } diff --git a/src/mame/pc/asst128.cpp b/src/mame/pc/asst128.cpp index 0f5f9e7a466..f879d0bc3f1 100644 --- a/src/mame/pc/asst128.cpp +++ b/src/mame/pc/asst128.cpp @@ -20,7 +20,7 @@ class asst128_mb_device : public ibm5150_mb_device { public: // construction/destruction - asst128_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) + asst128_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : ibm5150_mb_device(mconfig, ASST128_MOTHERBOARD, tag, owner, clock) { } @@ -107,7 +107,7 @@ DEVICE_INPUT_DEFAULTS_END void asst128_state::asst128(machine_config &config) { - I8086(config, m_maincpu, 4772720); + I8086(config, m_maincpu, XTAL::u(4772720)); m_maincpu->set_addrmap(AS_PROGRAM, &asst128_state::asst128_map); m_maincpu->set_addrmap(AS_IO, &asst128_state::asst128_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -123,14 +123,14 @@ void asst128_state::asst128(machine_config &config) subdevice("mb:cassette")->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "board0", 0, "mb:isa", pc_isa8_cards, "cga_mc1502", true); - ISA8_SLOT(config, "board1", 0, "mb:isa", pc_isa8_cards, "lpt", true); + ISA8_SLOT(config, "board0", "mb:isa", pc_isa8_cards, "cga_mc1502", true); + ISA8_SLOT(config, "board1", "mb:isa", pc_isa8_cards, "lpt", true); pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); kbd.out_clock_cb().set("mb", FUNC(asst128_mb_device::keyboard_clock_w)); kbd.out_data_cb().set("mb", FUNC(asst128_mb_device::keyboard_data_w)); - PC_FDC_XT(config, m_fdc, 0); + PC_FDC_XT(config, m_fdc); m_fdc->intrq_wr_callback().set("mb:pic8259", FUNC(pic8259_device::ir6_w)); FLOPPY_CONNECTOR(config, "fdc:0", asst128_floppies, "525ssqd", asst128_state::asst128_formats); FLOPPY_CONNECTOR(config, "fdc:1", asst128_floppies, "525ssqd", asst128_state::asst128_formats); diff --git a/src/mame/pc/at.cpp b/src/mame/pc/at.cpp index 03d09ddd580..39d16de34d0 100644 --- a/src/mame/pc/at.cpp +++ b/src/mame/pc/at.cpp @@ -510,10 +510,10 @@ void at_state::ibm5170(machine_config &config) m_mb->kbd_data().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "ega", false); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, "fdc", false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, "comat", false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, "ide", false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "ega", false); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, "fdc", false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, "comat", false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, "ide", false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_84)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -544,13 +544,13 @@ void at_state::ews286(machine_config &config) void at_state::ec1842(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(12'000'000); + m_maincpu->set_clock(XTAL::u(12'000'000)); } void at_state::ibm5162(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(6'000'000); + m_maincpu->set_clock(XTAL::u(6'000'000)); subdevice("isa1")->set_default_option("cga"); } @@ -570,10 +570,10 @@ void at_vrom_fix_state::ibmps1(machine_config &config) void at_state::atturbo(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(12'000'000); + m_maincpu->set_clock(XTAL::u(12'000'000)); subdevice("isa1")->set_default_option("svga_et4k"); subdevice("kbd")->set_default_option(STR_KBD_MICROSOFT_NATURAL); - ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "isa5", "mb:isabus", pc_isa16_cards, nullptr, false); // FIXME: determine ISA bus clock } void at_state::neat(machine_config &config) @@ -585,28 +585,28 @@ void at_state::neat(machine_config &config) rtc.irq().set("mb:pic8259_slave", FUNC(pic8259_device::ir0_w)); // this is in :mb rtc.set_century_index(0x32); - CS8221(config, "cs8221", 0, "maincpu", "mb:isa", "bios"); + CS8221(config, "cs8221", "maincpu", "mb:isa", "bios"); } void at_state::xb42639(machine_config &config) { atturbo(config); - m_maincpu->set_clock(12'500'000); + m_maincpu->set_clock(XTAL::u(12'500'000)); } void at_state::k286i(machine_config &config) { ibm5162(config); subdevice("kbd")->set_default_option(STR_KBD_MICROSOFT_NATURAL); - ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa6", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa7", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa8", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "mb:isabus", pc_isa16_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "isa6", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa7", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa8", "mb:isabus", pc_isa16_cards, nullptr, false); } void at_state::at386(machine_config &config) { - i386_device &maincpu(I386(config, m_maincpu, 12'000'000)); + i386_device &maincpu(I386(config, m_maincpu, XTAL::u(12'000'000))); maincpu.set_addrmap(AS_PROGRAM, &at_state::at32_map); maincpu.set_addrmap(AS_IO, &at_state::at32_io); maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -620,16 +620,16 @@ void at_state::at386(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // on-board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: deteremine ISA bus clock - ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "ide", true); - ISA16_SLOT(config, "board4", 0, "mb:isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: deteremine ISA bus clock + ISA16_SLOT(config, "board2", "mb:isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "mb:isabus", pc_isa16_cards, "ide", true); + ISA16_SLOT(config, "board4", "mb:isabus", pc_isa16_cards, "lpt", true); // ISA cards - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "mb:isabus", pc_isa16_cards, nullptr, false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -647,7 +647,7 @@ void at_state::at386l(machine_config &config) void at_state::at486(machine_config &config) { - i486_device &maincpu(I486(config, m_maincpu, 25'000'000)); + i486_device &maincpu(I486(config, m_maincpu, XTAL::u(25'000'000))); maincpu.set_addrmap(AS_PROGRAM, &at_state::at32_map); maincpu.set_addrmap(AS_IO, &at_state::at32_io); maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -661,16 +661,16 @@ void at_state::at486(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // on-board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: deteremine ISA bus clock - ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "ide", true); - ISA16_SLOT(config, "board4", 0, "mb:isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: deteremine ISA bus clock + ISA16_SLOT(config, "board2", "mb:isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "mb:isabus", pc_isa16_cards, "ide", true); + ISA16_SLOT(config, "board4", "mb:isabus", pc_isa16_cards, "lpt", true); // ISA cards - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "mb:isabus", pc_isa16_cards, nullptr, false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -689,7 +689,7 @@ void at_state::at486l(machine_config &config) void at_state::at386sx(machine_config &config) { atturbo(config); - i386sx_device &maincpu(I386SX(config.replace(), m_maincpu, 16'000'000)); /* 386SX */ + i386sx_device &maincpu(I386SX(config.replace(), m_maincpu, XTAL::u(16'000'000))); /* 386SX */ maincpu.set_addrmap(AS_PROGRAM, &at_state::at16_map); maincpu.set_addrmap(AS_IO, &at_state::at16_io); maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -699,14 +699,14 @@ void at_state::ct386sx(machine_config &config) { at386sx(config); m_maincpu->set_addrmap(AS_IO, &at_state::neat_io); - CS8221(config, "cs8221", 0, "maincpu", "mb:isa", "maincpu"); + CS8221(config, "cs8221", "maincpu", "mb:isa", "maincpu"); } // Commodore PC 30-III void at_state::pc30iii(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(6'000'000); // should be 24_MHz_XTAL / 2, but doesn't post with that setting + m_maincpu->set_clock(XTAL::u(6'000'000)); // should be 24_MHz_XTAL / 2, but doesn't post with that setting subdevice("isa1")->set_default_option("vga"); // should be ATI EGA Wonder 800+ } @@ -714,7 +714,7 @@ void at_state::pc30iii(machine_config &config) void at_state::pc40iii(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(6'000'000); // should be 24_MHz_XTAL / 2, but doesn't post with that setting + m_maincpu->set_clock(XTAL::u(6'000'000)); // should be 24_MHz_XTAL / 2, but doesn't post with that setting subdevice("isa1")->set_default_option("vga"); // should be onboard Paradise VGA, see ROM declarations } @@ -744,7 +744,7 @@ void megapc_state::megapc(machine_config &config) m_wd7600->spkr_callback().set(FUNC(megapc_state::wd7600_spkr)); // on board devices - ISA16(config, m_isabus, 0); + ISA16(config, m_isabus); m_isabus->set_memspace(m_maincpu, AS_PROGRAM); m_isabus->set_iospace(m_maincpu, AS_IO); m_isabus->iochck_callback().set(m_wd7600, FUNC(wd7600_device::iochck_w)); @@ -767,13 +767,13 @@ void megapc_state::megapc(machine_config &config) m_isabus->drq6_callback().set(m_wd7600, FUNC(wd7600_device::dreq6_w)); m_isabus->drq7_callback().set(m_wd7600, FUNC(wd7600_device::dreq7_w)); - ISA16_SLOT(config, "board1", 0, "isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "board2", 0, "isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "isabus", pc_isa16_cards, "ide", true); - ISA16_SLOT(config, "board4", 0, "isabus", pc_isa16_cards, "lpt", true); - ISA16_SLOT(config, "board5", 0, "isabus", pc_isa16_cards, "vga", true); + ISA16_SLOT(config, "board1", "isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "board2", "isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "isabus", pc_isa16_cards, "ide", true); + ISA16_SLOT(config, "board4", "isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "board5", "isabus", pc_isa16_cards, "vga", true); // ISA cards - ISA16_SLOT(config, "isa1", 0, "isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "isabus", pc_isa16_cards, nullptr, false); at_keyboard_controller_device &keybc(AT_KEYBOARD_CONTROLLER(config, "keybc", 12_MHz_XTAL)); keybc.hot_res().set("wd7600", FUNC(wd7600_device::kbrst_w)); @@ -803,7 +803,7 @@ void megapc_state::megapc(machine_config &config) void megapc_state::megapcpl(machine_config &config) { megapc(config); - i486_device &maincpu(I486(config.replace(), m_maincpu, 66'000'000 / 2)); + i486_device &maincpu(I486(config.replace(), m_maincpu, XTAL::u(66'000'000) / 2)); maincpu.set_addrmap(AS_PROGRAM, &megapc_state::megapcpl_map); maincpu.set_addrmap(AS_IO, &megapc_state::megapcpl_io); maincpu.set_irq_acknowledge_callback("wd7600", FUNC(wd7600_device::intack_cb)); @@ -811,7 +811,7 @@ void megapc_state::megapcpl(machine_config &config) void at_vrom_fix_state::megapcpla(machine_config &config) { - i486_device &maincpu(I486(config, m_maincpu, 66'000'000 / 2)); // 486SLC + i486_device &maincpu(I486(config, m_maincpu, XTAL::u(66'000'000) / 2)); // 486SLC maincpu.set_addrmap(AS_PROGRAM, &at_vrom_fix_state::at32l_map); maincpu.set_addrmap(AS_IO, &at_vrom_fix_state::at32_io); maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -825,16 +825,16 @@ void at_vrom_fix_state::megapcpla(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // on board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "ide", true); - ISA16_SLOT(config, "board4", 0, "mb:isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "board2", "mb:isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "mb:isabus", pc_isa16_cards, "ide", true); + ISA16_SLOT(config, "board4", "mb:isabus", pc_isa16_cards, "lpt", true); // ISA cards - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_dm", false); // closest to the CL-GD5420 - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "svga_dm", false); // closest to the CL-GD5420 + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "mb:isabus", pc_isa16_cards, nullptr, false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -849,7 +849,7 @@ void at_vrom_fix_state::megapcpla(machine_config &config) void at_state::ficpio2(machine_config &config) { - i486_device &maincpu(I486(config, m_maincpu, 25'000'000)); + i486_device &maincpu(I486(config, m_maincpu, XTAL::u(25'000'000))); maincpu.set_addrmap(AS_PROGRAM, &at_state::ficpio_map); maincpu.set_addrmap(AS_IO, &at_state::ficpio_io); maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -867,21 +867,21 @@ void at_state::ficpio2(machine_config &config) RAM(config, m_ram).set_default_size("4M").set_extra_options("1M,2M,8M,16M,32M,64M,128M"); // on board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "board2", "mb:isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "mb:isabus", pc_isa16_cards, "lpt", true); ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("mb:pic8259_slave", FUNC(pic8259_device::ir6_w)); ide_controller_32_device &ide2(IDE_CONTROLLER_32(config, "ide2").options(ata_devices, "cdrom", nullptr, true)); ide2.irq_handler().set("mb:pic8259_slave", FUNC(pic8259_device::ir7_w)); - PCI_BUS(config, "pcibus", 0).set_busnum(0); + PCI_BUS(config, "pcibus").set_busnum(0); PCI_CONNECTOR(config, "pcibus:0", pci_devices, "vt82c505", true); - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, nullptr, false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -910,12 +910,12 @@ void at_state::comportiii(machine_config &config) m_mb->kbd_data().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdc", true).set_option_machine_config("fdc", cfg_single_1200K); - ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "hdc", true); - ISA16_SLOT(config, "board4", 0, "mb:isabus", pc_isa16_cards, "cga_cportiii", true); - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "fdc", true).set_option_machine_config("fdc", cfg_single_1200K); + ISA16_SLOT(config, "board2", "mb:isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "mb:isabus", pc_isa16_cards, "hdc", true); + ISA16_SLOT(config, "board4", "mb:isabus", pc_isa16_cards, "cga_cportiii", true); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, nullptr, false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_84)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -939,7 +939,7 @@ void at_state::comportii(machine_config &config) void at_state::n8810m15(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(6'000'000); + m_maincpu->set_clock(XTAL::u(6'000'000)); subdevice("isa1")->set_default_option("cga"); } @@ -947,7 +947,7 @@ void at_state::n8810m15(machine_config &config) void at_state::n8810m55(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(6'000'000); + m_maincpu->set_clock(XTAL::u(6'000'000)); subdevice("isa1")->set_default_option("ega"); } @@ -955,7 +955,7 @@ void at_state::n8810m55(machine_config &config) void at_state::olyport40(machine_config &config) { neat(config); - m_maincpu->set_clock(12'000'000); + m_maincpu->set_clock(XTAL::u(12'000'000)); subdevice("isa1")->set_default_option("cga"); } @@ -963,7 +963,7 @@ void at_state::olyport40(machine_config &config) void at_state::micral45(machine_config &config) { atturbo(config); - m_maincpu->set_clock(12'000'000); + m_maincpu->set_clock(XTAL::u(12'000'000)); subdevice("isa1")->set_default_option("ega"); } @@ -980,7 +980,7 @@ void at_state::euroat(machine_config &config) // Siemens PG 750 void at_state::pg750(machine_config &config) { - i386_device &maincpu(I386(config, m_maincpu, 12'000'000)); + i386_device &maincpu(I386(config, m_maincpu, XTAL::u(12'000'000))); maincpu.set_addrmap(AS_PROGRAM, &at_state::at32_map); maincpu.set_addrmap(AS_IO, &at_state::at32_io); maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -998,15 +998,15 @@ void at_state::pg750(machine_config &config) rtc.set_century_index(0x32); // on-board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdc", true).set_option_machine_config("fdc", cfg_dual_1440K); // FIXME: deteremine ISA bus clock - ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "fdc", true).set_option_machine_config("fdc", cfg_dual_1440K); // FIXME: deteremine ISA bus clock + ISA16_SLOT(config, "board2", "mb:isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "mb:isabus", pc_isa16_cards, "lpt", true); // ISA cards - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "ega", false); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, "hdc", false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "ega", false); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, "hdc", false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "mb:isabus", pc_isa16_cards, nullptr, false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); diff --git a/src/mame/pc/atpci.cpp b/src/mame/pc/atpci.cpp index b879844dd7b..e5712e621ca 100644 --- a/src/mame/pc/atpci.cpp +++ b/src/mame/pc/atpci.cpp @@ -109,30 +109,30 @@ void at586_state::at_softlists(machine_config &config) void at586_state::at586(machine_config &config) { - pentium_device &maincpu(PENTIUM(config, m_maincpu, 60000000)); + pentium_device &maincpu(PENTIUM(config, m_maincpu, XTAL::u(60000000))); maincpu.set_addrmap(AS_PROGRAM, &at586_state::at586_map); maincpu.set_addrmap(AS_IO, &at586_state::at586_io); maincpu.set_irq_acknowledge_callback("pcibus:1:i82371ab:pic8259_master", FUNC(pic8259_device::inta_cb)); RAM(config, RAM_TAG).set_default_size("4M").set_extra_options("1M,2M,8M,16M,32M,64M,128M,256M"); - PCI_BUS(config, "pcibus", 0).set_busnum(0); + PCI_BUS(config, "pcibus").set_busnum(0); PCI_CONNECTOR(config, "pcibus:0", pci_devices, "i82439tx", true).set_option_machine_config("i82439tx", [this](device_t *device) { tx_config(device); }); PCI_CONNECTOR(config, "pcibus:1", pci_devices, "i82371ab", true); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa1", 0, "pcibus:1:i82371ab:isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "pcibus:1:i82371ab:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "pcibus:1:i82371ab:isabus", pc_isa16_cards, nullptr, false); at_softlists(config); } void at586_state::at586x3(machine_config &config) { - pentium_device &maincpu(PENTIUM(config, m_maincpu, 60000000)); + pentium_device &maincpu(PENTIUM(config, m_maincpu, XTAL::u(60000000))); maincpu.set_addrmap(AS_PROGRAM, &at586_state::at586_map); maincpu.set_addrmap(AS_IO, &at586_state::at586_io); maincpu.smiact().set("pcibus:0:i82439tx", FUNC(i82439tx_device::smi_act_w)); @@ -140,16 +140,16 @@ void at586_state::at586x3(machine_config &config) RAM(config, RAM_TAG).set_default_size("4M").set_extra_options("1M,2M,8M,16M,32M,64M,128M,256M"); - PCI_BUS(config, "pcibus", 0).set_busnum(0); + PCI_BUS(config, "pcibus").set_busnum(0); PCI_CONNECTOR(config, "pcibus:0", pci_devices, "i82439tx", true).set_option_machine_config("i82439tx", [this](device_t *device) { tx_config(device); }); PCI_CONNECTOR(config, "pcibus:1", pci_devices, "i82371sb", true).set_option_machine_config("i82371sb", [this](device_t *device) { sb_config(device); }); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa1", 0, "pcibus:1:i82371sb:isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "pcibus:1:i82371sb:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "pcibus:1:i82371sb:isabus", pc_isa16_cards, nullptr, false); at_softlists(config); } @@ -159,7 +159,7 @@ INPUT_PORTS_END void at586_state::at586m55(machine_config &config) { - pentium_device &pentium(PENTIUM(config, m_maincpu, 60000000)); + pentium_device &pentium(PENTIUM(config, m_maincpu, XTAL::u(60000000))); pentium.set_addrmap(AS_PROGRAM, &at586_state::at586_map); pentium.set_addrmap(AS_IO, &at586_state::at586_io); pentium.smiact().set("pcibus:0:i82439tx", FUNC(i82439tx_device::smi_act_w)); @@ -167,16 +167,16 @@ void at586_state::at586m55(machine_config &config) RAM(config, RAM_TAG).set_default_size("4M").set_extra_options("1M,2M,8M,16M,32M,64M,128M,256M"); - PCI_BUS(config, "pcibus", 0).set_busnum(0); + PCI_BUS(config, "pcibus").set_busnum(0); PCI_CONNECTOR(config, "pcibus:0", pci_devices, "i82439tx", true).set_option_machine_config("i82439tx", [this](device_t *device) { tx_config(device); }); PCI_CONNECTOR(config, "pcibus:7", pci_devices, "i82371sb", true).set_option_machine_config("i82371sb", [this](device_t *device) { sb_config(device); }); - ISA16_SLOT(config, "board4", 0, "pcibus:7:i82371sb:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", [this](device_t *device) { superio_config(device); }); - ISA16_SLOT(config, "isa1", 0, "pcibus:7:i82371sb:isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "board4", "pcibus:7:i82371sb:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", [this](device_t *device) { superio_config(device); }); + ISA16_SLOT(config, "isa1", "pcibus:7:i82371sb:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "pcibus:7:i82371sb:isabus", pc_isa16_cards, nullptr, false); at_softlists(config); } diff --git a/src/mame/pc/calchase.cpp b/src/mame/pc/calchase.cpp index 5a68b845335..ee9d2eb13b3 100644 --- a/src/mame/pc/calchase.cpp +++ b/src/mame/pc/calchase.cpp @@ -621,7 +621,7 @@ void calchase_state::machine_reset() void calchase_state::calchase(machine_config &config) { - PENTIUM(config, m_maincpu, 133000000); // Cyrix 686MX-PR200 CPU + PENTIUM(config, m_maincpu, XTAL::u(133000000)); // Cyrix 686MX-PR200 CPU m_maincpu->set_addrmap(AS_PROGRAM, &calchase_state::calchase_map); m_maincpu->set_addrmap(AS_IO, &calchase_state::calchase_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -631,7 +631,7 @@ void calchase_state::calchase(machine_config &config) ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "hdd", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(0, FUNC(calchase_state::intel82439tx_pci_r), FUNC(calchase_state::intel82439tx_pci_w)); pcibus.set_device(7, FUNC(calchase_state::intel82371ab_pci_r), FUNC(calchase_state::intel82371ab_pci_w)); @@ -647,13 +647,13 @@ void calchase_state::calchase(machine_config &config) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_12BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC - DAC_12BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + DAC_12BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC + DAC_12BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC } void calchase_state::hostinv(machine_config &config) { - PENTIUM(config, m_maincpu, 133000000); // Cyrix 686MX-PR200 CPU + PENTIUM(config, m_maincpu, XTAL::u(133000000)); // Cyrix 686MX-PR200 CPU m_maincpu->set_addrmap(AS_PROGRAM, &calchase_state::calchase_map); m_maincpu->set_addrmap(AS_IO, &calchase_state::calchase_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -663,7 +663,7 @@ void calchase_state::hostinv(machine_config &config) ide_controller_32_device &ide(IDE_CONTROLLER_32(config, "ide").options(ata_devices, "cdrom", nullptr, true)); ide.irq_handler().set("pic8259_2", FUNC(pic8259_device::ir6_w)); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(0, FUNC(calchase_state::intel82439tx_pci_r), FUNC(calchase_state::intel82439tx_pci_w)); pcibus.set_device(7, FUNC(calchase_state::intel82371ab_pci_r), FUNC(calchase_state::intel82371ab_pci_w)); @@ -675,8 +675,8 @@ void calchase_state::hostinv(machine_config &config) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_12BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC - DAC_12BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + DAC_12BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC + DAC_12BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC } diff --git a/src/mame/pc/compc.cpp b/src/mame/pc/compc.cpp index 8f0f43ae3af..e1a4b24187d 100644 --- a/src/mame/pc/compc.cpp +++ b/src/mame/pc/compc.cpp @@ -172,13 +172,13 @@ void compc_state::compc(machine_config &config) m_maincpu->set_addrmap(AS_IO, &compc_state::compc_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + PCNOPPI_MOTHERBOARD(config, m_mb).set_cputag(m_maincpu); m_mb->int_callback().set_inputline(m_maincpu, 0); m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); m_mb->kbdclk_callback().set("keyboard", FUNC(pc_kbdc_device::clock_write_from_mb)); m_mb->kbddata_callback().set("keyboard", FUNC(pc_kbdc_device::data_write_from_mb)); config.device_remove("mb:pit8253"); - fe2010_pit_device &pit(FE2010_PIT(config, "mb:pit8253", 0)); + fe2010_pit_device &pit(FE2010_PIT(config, "mb:pit8253")); pit.set_clk<0>(XTAL(14'318'181)/12.0); /* heartbeat IRQ */ pit.out_handler<0>().set("mb:pic8259", FUNC(pic8259_device::ir0_w)); pit.set_clk<1>(XTAL(14'318'181)/12.0); /* dram refresh */ @@ -187,10 +187,10 @@ void compc_state::compc(machine_config &config) pit.out_handler<2>().set(m_mb, FUNC(ibm5160_mb_device::pc_pit8253_out2_changed)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "mda", false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "mda", false); + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "fdc_xt", false); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "keyboard", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); pc_kbdc.out_clock_cb().set(m_mb, FUNC(pc_noppi_mb_device::keyboard_clock_w)); diff --git a/src/mame/pc/ct486.cpp b/src/mame/pc/ct486.cpp index 23a4b1dc811..6703f5be275 100644 --- a/src/mame/pc/ct486.cpp +++ b/src/mame/pc/ct486.cpp @@ -144,7 +144,7 @@ void ct486_state::ct486(machine_config &config) pc_kbdc.out_clock_cb().set(keybc, FUNC(at_kbc_device_base::kbd_clk_w)); pc_kbdc.out_data_cb().set(keybc, FUNC(at_kbc_device_base::kbd_data_w)); - ISA16(config, m_isabus, 0); + ISA16(config, m_isabus); m_isabus->set_memspace(m_maincpu, AS_PROGRAM); m_isabus->set_iospace(m_maincpu, AS_IO); m_isabus->iochck_callback().set(m_cs4031, FUNC(cs4031_device::iochck_w)); @@ -166,15 +166,15 @@ void ct486_state::ct486(machine_config &config) m_isabus->drq5_callback().set(m_cs4031, FUNC(cs4031_device::dreq5_w)); m_isabus->drq6_callback().set(m_cs4031, FUNC(cs4031_device::dreq6_w)); m_isabus->drq7_callback().set(m_cs4031, FUNC(cs4031_device::dreq7_w)); - ISA16_SLOT(config, "board1", 0, "isabus", pc_isa16_cards, "fdcsmc", true); - ISA16_SLOT(config, "board2", 0, "isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "isabus", pc_isa16_cards, "ide", true); - ISA16_SLOT(config, "board4", 0, "isabus", pc_isa16_cards, "lpt", true); - ISA16_SLOT(config, "isa1", 0, "isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "board1", "isabus", pc_isa16_cards, "fdcsmc", true); + ISA16_SLOT(config, "board2", "isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "isabus", pc_isa16_cards, "ide", true); + ISA16_SLOT(config, "board4", "isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "isa1", "isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "isabus", pc_isa16_cards, nullptr, false); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/pc/ec184x.cpp b/src/mame/pc/ec184x.cpp index f5f03e39670..766c039ca70 100644 --- a/src/mame/pc/ec184x.cpp +++ b/src/mame/pc/ec184x.cpp @@ -214,7 +214,7 @@ void ec184x_state::ec1841_io(address_map &map) void ec184x_state::ec1840(machine_config &config) { - I8086(config, m_maincpu, 4096000); + I8086(config, m_maincpu, XTAL::u(4096000)); m_maincpu->set_addrmap(AS_PROGRAM, &ec184x_state::ec1840_map); m_maincpu->set_addrmap(AS_IO, &ec184x_state::ec1840_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -228,11 +228,11 @@ void ec184x_state::ec1840(machine_config &config) // FIXME: determine ISA bus clock // 7-slot backplane, at least two slots are always taken by CPU and memory cards - ISA8_SLOT(config, "isa1", 0, "mb:isa", ec184x_isa8_cards, "ec1840.0002", false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", ec184x_isa8_cards, "ec1840.0003", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", ec184x_isa8_cards, "ec1840.0004", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", ec184x_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", ec184x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", ec184x_isa8_cards, "ec1840.0002", false); + ISA8_SLOT(config, "isa2", "mb:isa", ec184x_isa8_cards, "ec1840.0003", false); + ISA8_SLOT(config, "isa3", "mb:isa", ec184x_isa8_cards, "ec1840.0004", false); + ISA8_SLOT(config, "isa4", "mb:isa", ec184x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa5", "mb:isa", ec184x_isa8_cards, nullptr, false); SOFTWARE_LIST(config, "flop_list").set_original("ec1841"); @@ -260,12 +260,12 @@ void ec184x_state::ec1841(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", ec184x_isa8_cards, "ec1841.0002", false); // cga - ISA8_SLOT(config, "isa2", 0, "mb:isa", ec184x_isa8_cards, "ec1841.0003", false); // fdc (IRQ6) + mouse port (IRQ2..5) - ISA8_SLOT(config, "isa3", 0, "mb:isa", ec184x_isa8_cards, "ec1840.0004", false); // lpt (IRQ7||5) [+ serial (IRQx)] - ISA8_SLOT(config, "isa4", 0, "mb:isa", ec184x_isa8_cards, "hdc", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", ec184x_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa6", 0, "mb:isa", ec184x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", ec184x_isa8_cards, "ec1841.0002", false); // cga + ISA8_SLOT(config, "isa2", "mb:isa", ec184x_isa8_cards, "ec1841.0003", false); // fdc (IRQ6) + mouse port (IRQ2..5) + ISA8_SLOT(config, "isa3", "mb:isa", ec184x_isa8_cards, "ec1840.0004", false); // lpt (IRQ7||5) [+ serial (IRQx)] + ISA8_SLOT(config, "isa4", "mb:isa", ec184x_isa8_cards, "hdc", false); + ISA8_SLOT(config, "isa5", "mb:isa", ec184x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", "mb:isa", ec184x_isa8_cards, nullptr, false); SOFTWARE_LIST(config, "flop_list").set_original("ec1841"); diff --git a/src/mame/pc/europc.cpp b/src/mame/pc/europc.cpp index 8ec829e5f6b..8b0a5e7c829 100644 --- a/src/mame/pc/europc.cpp +++ b/src/mame/pc/europc.cpp @@ -360,7 +360,7 @@ void europc_pc_state::europc_io(address_map &map) class europc_fdc_device : public isa8_fdc_device { public: - europc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + europc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -372,7 +372,7 @@ private: DEFINE_DEVICE_TYPE(EUROPC_FDC, europc_fdc_device, "europc_fdc", "EURO PC FDC hookup") -europc_fdc_device::europc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +europc_fdc_device::europc_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_fdc_device(mconfig, EUROPC_FDC, tag, owner, clock) { } @@ -420,7 +420,7 @@ void europc_pc_state::europc(machine_config &config) m_maincpu->set_addrmap(AS_IO, &europc_pc_state::europc_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + PCNOPPI_MOTHERBOARD(config, m_mb).set_cputag(m_maincpu); m_mb->int_callback().set_inputline(m_maincpu, 0); m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); m_mb->kbddata_callback().set("kbd", FUNC(europc_keyboard_device::kbdata_w)); @@ -431,10 +431,10 @@ void europc_pc_state::europc(machine_config &config) kbd.kbclk_callback().set(m_mb, FUNC(pc_noppi_mb_device::keyboard_clock_w)); kbd.reset_callback().set(FUNC(europc_pc_state::reset_in_w)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "aga", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "lpt", true); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "com", true); - ISA8_SLOT(config, "isa4", 0, "mb:isa", europc_fdc, "fdc", true); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "aga", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "lpt", true); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "com", true); + ISA8_SLOT(config, "isa4", "mb:isa", europc_fdc, "fdc", true); M3002(config, m_rtc, 32.768_kHz_XTAL); @@ -469,8 +469,8 @@ void europc_pc_state::euroxt(machine_config &config) m_ram->set_default_size("768K"); subdevice("isa2")->set_default_option(nullptr); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "xtide", true); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, "lpt", true); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, "xtide", true); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa6", "mb:isa", pc_isa8_cards, "lpt", true); } ROM_START( europc ) diff --git a/src/mame/pc/europc_kbd.cpp b/src/mame/pc/europc_kbd.cpp index c76a97dfccf..7d190500682 100644 --- a/src/mame/pc/europc_kbd.cpp +++ b/src/mame/pc/europc_kbd.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(EUROPC_KEYBOARD, europc_keyboard_device, "europc_kbd", "EURO PC Keyboard") -europc_keyboard_device::europc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +europc_keyboard_device::europc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, EUROPC_KEYBOARD, tag, owner, clock) , m_mcu(*this, "mcu") , m_keys(*this, "COLUMN%d", 1U) diff --git a/src/mame/pc/europc_kbd.h b/src/mame/pc/europc_kbd.h index 3570db338e0..70ecfb1bb6b 100644 --- a/src/mame/pc/europc_kbd.h +++ b/src/mame/pc/europc_kbd.h @@ -17,7 +17,7 @@ class europc_keyboard_device : public device_t { public: // device type constructor - europc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + europc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto kbdata_callback() { return m_kbdata_callback.bind(); } diff --git a/src/mame/pc/fruitpc.cpp b/src/mame/pc/fruitpc.cpp index b8fd10fdef2..36a67cff32a 100644 --- a/src/mame/pc/fruitpc.cpp +++ b/src/mame/pc/fruitpc.cpp @@ -129,7 +129,7 @@ void fruitpc_state::fruitpc_sb_conf(device_t *device) void fruitpc_state::fruitpc(machine_config &config) { - I486(config, m_maincpu, 66000000); // ST STPCD0166BTC3 66 MHz 486 CPU + I486(config, m_maincpu, XTAL::u(66000000)); // ST STPCD0166BTC3 66 MHz 486 CPU m_maincpu->set_addrmap(AS_PROGRAM, &fruitpc_state::fruitpc_map); m_maincpu->set_addrmap(AS_IO, &fruitpc_state::fruitpc_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -144,10 +144,10 @@ void fruitpc_state::fruitpc(machine_config &config) m_dma8237_1->out_iow_callback<1>().set(FUNC(fruitpc_state::dma8237_1_dack_w)); - PCI_ROOT(config, m_pciroot, 0); + PCI_ROOT(config, m_pciroot); // TODO: STPCD0166BTC3 host PCI - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace("maincpu", AS_PROGRAM); m_isabus->set_iospace("maincpu", AS_IO); m_isabus->irq2_callback().set("pic8259_2", FUNC(pic8259_device::ir1_w)); @@ -161,7 +161,7 @@ void fruitpc_state::fruitpc(machine_config &config) m_isabus->drq3_callback().set("dma8237_1", FUNC(am9517a_device::dreq3_w)); // FIXME: determine ISA bus clock - isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", 0, "isa", fruitpc_isa8_cards, "sb15", true)); + isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", "isa", fruitpc_isa8_cards, "sb15", true)); isa1.set_option_device_input_defaults("sb15", DEVICE_INPUT_DEFAULTS_NAME(fruitpc_sb_def)); isa1.set_option_machine_config("sb15", fruitpc_sb_conf); } diff --git a/src/mame/pc/genpc.cpp b/src/mame/pc/genpc.cpp index 3549b275d3b..dfecc98225b 100644 --- a/src/mame/pc/genpc.cpp +++ b/src/mame/pc/genpc.cpp @@ -59,7 +59,7 @@ DEVICE_INPUT_DEFAULTS_END void genpc_state::pcmda(machine_config &config) { /* basic machine hardware */ - I8088(config, m_maincpu, 4772720); + I8088(config, m_maincpu, XTAL::u(4772720)); m_maincpu->set_addrmap(AS_PROGRAM, &genpc_state::pc8_map); m_maincpu->set_addrmap(AS_IO, &genpc_state::pc8_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -71,12 +71,12 @@ void genpc_state::pcmda(machine_config &config) mb.kbdclk_callback().set("kbd", FUNC(pc_kbdc_device::clock_write_from_mb)); mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "mda", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "hdc", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "adlib", false); - ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "mda", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "hdc", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, "adlib", false); + ISA8_SLOT(config, "isa6", "mb:isa", pc_isa8_cards, nullptr, false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); diff --git a/src/mame/pc/ibmpc.cpp b/src/mame/pc/ibmpc.cpp index 64e677dd6da..5c841874c66 100644 --- a/src/mame/pc/ibmpc.cpp +++ b/src/mame/pc/ibmpc.cpp @@ -312,11 +312,11 @@ void ibmpc_state::ibm5150(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(cga)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "hdc", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "hdc", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, nullptr, false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)); @@ -357,14 +357,14 @@ void ibmpc_state::ibm5160(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(cga)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "hdc", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa7", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa8", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "hdc", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa7", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa8", "mb:isa", pc_isa8_cards, nullptr, false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -587,7 +587,7 @@ ROM_END ***************************************************************************/ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1981, ibm5150, 0, 0, ibm5150, 0, ibmpc_state, empty_init, "International Business Machines", "IBM PC 5150", 0 ) +COMP( 1981, ibm5150, 0, 0, ibm5150, 0, ibmpc_state, empty_init, "International Business Machines", "IBM PC 5150", 0 ) COMP( 1982, ibm5155, ibm5150, 0, ibm5150, 0, ibmpc_state, empty_init, "International Business Machines", "IBM PC 5155", 0 ) COMP( 1985, ibm5140, ibm5150, 0, ibm5140, 0, ibmpc_state, empty_init, "International Business Machines", "IBM PC 5140 Convertible", MACHINE_NOT_WORKING ) COMP( 1982, ibm5160, ibm5150, 0, ibm5160, 0, ibmpc_state, empty_init, "International Business Machines", "IBM XT 5160", 0 ) diff --git a/src/mame/pc/ibmpcjr.cpp b/src/mame/pc/ibmpcjr.cpp index 6a693f1bae5..45a55e482d5 100644 --- a/src/mame/pc/ibmpcjr.cpp +++ b/src/mame/pc/ibmpcjr.cpp @@ -603,14 +603,14 @@ void pcjr_state::ibmpcjr(machine_config &config) based on bit 4(/5?) written to output port A0h. This is not supported yet. */ - PIT8253(config, m_pit8253, 0); + PIT8253(config, m_pit8253); m_pit8253->set_clk<0>(XTAL(14'318'181)/12); m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w)); m_pit8253->set_clk<1>(XTAL(14'318'181)/12); m_pit8253->set_clk<2>(XTAL(14'318'181)/12); m_pit8253->out_handler<2>().set(FUNC(pcjr_state::out2_changed)); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set(FUNC(pcjr_state::pic8259_set_int_line)); i8255_device &ppi(I8255(config, "ppi8255")); @@ -632,7 +632,7 @@ void pcjr_state::ibmpcjr(machine_config &config) serport.cts_handler().set("ins8250", FUNC(ins8250_uart_device::cts_w)); /* video hardware */ - PCVIDEO_PCJR(config, "pcvideo_pcjr", 0).set_screen("pcvideo_pcjr:screen"); + PCVIDEO_PCJR(config, "pcvideo_pcjr").set_screen("pcvideo_pcjr:screen"); GFXDECODE(config, "gfxdecode", "pcvideo_pcjr:palette", gfx_pcjr); @@ -652,7 +652,7 @@ void pcjr_state::ibmpcjr(machine_config &config) m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); - UPD765A(config, m_fdc, 8'000'000, false, false); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, false); FLOPPY_CONNECTOR(config, "fdc:0", pcjr_floppies, "525dd", isa8_fdc_device::floppy_formats, true); diff --git a/src/mame/pc/igspc.cpp b/src/mame/pc/igspc.cpp index 0384a918fa4..0d2e5fd6395 100644 --- a/src/mame/pc/igspc.cpp +++ b/src/mame/pc/igspc.cpp @@ -85,7 +85,7 @@ INPUT_PORTS_END void speeddrv_state::speeddrv(machine_config &config) { /* basic machine hardware */ - I486(config, m_maincpu, 40000000); // ?? at least a pentium + I486(config, m_maincpu, XTAL::u(40000000)); // ?? at least a pentium m_maincpu->set_addrmap(AS_PROGRAM, &speeddrv_state::speeddrv_map); m_maincpu->set_addrmap(AS_IO, &speeddrv_state::speeddrv_io); } diff --git a/src/mame/pc/iskr103x.cpp b/src/mame/pc/iskr103x.cpp index 694ac815ce2..1c6fb944d87 100644 --- a/src/mame/pc/iskr103x.cpp +++ b/src/mame/pc/iskr103x.cpp @@ -74,7 +74,7 @@ DEVICE_INPUT_DEFAULTS_END void iskr103x_state::iskr1030m(machine_config &config) { /* basic machine hardware */ - I8086(config, m_maincpu, 4772720); + I8086(config, m_maincpu, XTAL::u(4772720)); m_maincpu->set_addrmap(AS_PROGRAM, &iskr103x_state::iskr1031_map); m_maincpu->set_addrmap(AS_IO, &iskr103x_state::iskr1031_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -87,12 +87,12 @@ void iskr103x_state::iskr1030m(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(iskr1030m)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", iskr103x_isa8_cards, "cga_iskr1030m", false); // FIXME: determine IS bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", iskr103x_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", iskr103x_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", iskr103x_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", iskr103x_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa6", 0, "mb:isa", iskr103x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", iskr103x_isa8_cards, "cga_iskr1030m", false); // FIXME: determine IS bus clock + ISA8_SLOT(config, "isa2", "mb:isa", iskr103x_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", iskr103x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", "mb:isa", iskr103x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa5", "mb:isa", iskr103x_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", "mb:isa", iskr103x_isa8_cards, nullptr, false); pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_EC_1841)); // pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030)); diff --git a/src/mame/pc/mc1502.cpp b/src/mame/pc/mc1502.cpp index bc55bc7d8a9..bac75ba5690 100644 --- a/src/mame/pc/mc1502.cpp +++ b/src/mame/pc/mc1502.cpp @@ -348,7 +348,7 @@ void mc1502_state::mc1502(machine_config &config) m_ppi8255n2->in_pc_callback().set("cent_status_in", FUNC(input_buffer_device::read)); m_ppi8255n2->out_pc_callback().set(FUNC(mc1502_state::mc1502_kppi_portc_w)); - I8251(config, m_upd8251, 0); + I8251(config, m_upd8251); m_upd8251->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_upd8251->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_upd8251->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -361,7 +361,7 @@ void mc1502_state::mc1502(machine_config &config) rs232.dsr_handler().set(m_upd8251, FUNC(i8251_device::write_dsr)); rs232.cts_handler().set(m_upd8251, FUNC(i8251_device::write_cts)); - isa8_device &isa(ISA8(config, "isa", 0)); + isa8_device &isa(ISA8(config, "isa")); isa.set_memspace("maincpu", AS_PROGRAM); isa.set_iospace("maincpu", AS_IO); isa.irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w)); @@ -372,9 +372,9 @@ void mc1502_state::mc1502(machine_config &config) isa.irq7_callback().set(m_pic8259, FUNC(pic8259_device::ir7_w)); isa.iochrdy_callback().set_inputline(m_maincpu, INPUT_LINE_HALT); - ISA8_SLOT(config, "board0", 0, "isa", mc1502_isa8_cards, "cga_mc1502", true); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "isa", mc1502_isa8_cards, "fdc", false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); - ISA8_SLOT(config, "isa2", 0, "isa", mc1502_isa8_cards, "rom", false).set_option_machine_config("fdc", [this](device_t* device) { fdc_config(device); }); + ISA8_SLOT(config, "board0", "isa", mc1502_isa8_cards, "cga_mc1502", true); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa1", "isa", mc1502_isa8_cards, "fdc", false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); + ISA8_SLOT(config, "isa2", "isa", mc1502_isa8_cards, "rom", false).set_option_machine_config("fdc", [this](device_t* device) { fdc_config(device); }); SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.80); @@ -482,5 +482,5 @@ ROM_END ***************************************************************************/ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP ( 1989, mc1502, 0, 0, mc1502, mc1502, mc1502_state, init_mc1502, "NPO Microprocessor", "Elektronika MS 1502", MACHINE_IMPERFECT_GRAPHICS ) +COMP ( 1989, mc1502, 0, mc1502, mc1502, mc1502_state, init_mc1502, "NPO Microprocessor", "Elektronika MS 1502", MACHINE_IMPERFECT_GRAPHICS ) COMP ( 1988, pk88, 0, 0, mc1502, mc1502, mc1502_state, init_mc1502, "NPO Microprocessor", "Elektronika PK-88", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/pc/nforcepc.cpp b/src/mame/pc/nforcepc.cpp index 04f94c4fd28..de7f0569ec6 100644 --- a/src/mame/pc/nforcepc.cpp +++ b/src/mame/pc/nforcepc.cpp @@ -81,7 +81,7 @@ uint8_t crush11_host_device::header_type_r() return 0x80; // from lspci dump } -crush11_host_device::crush11_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crush11_host_device::crush11_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, CRUSH11, tag, owner, clock) , cpu(*this, finder_base::DUMMY_TAG) , biosrom(*this, finder_base::DUMMY_TAG) @@ -172,14 +172,14 @@ void crush11_memory_device::config_map(address_map &map) map(0xc8, 0xcb).nopr(); } -crush11_memory_device::crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id, int ram_size) +crush11_memory_device::crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id, int ram_size) : crush11_memory_device(mconfig, tag, owner, clock) { set_ids(0x10de01ac, 0xb2, 0x050000, subsystem_id); set_ram_size(ram_size); } -crush11_memory_device::crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crush11_memory_device::crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, CRUSH11_MEMORY, tag, owner, clock) { } @@ -224,7 +224,7 @@ void crush11_memory_device::map_extra(uint64_t memory_window_start, uint64_t mem DEFINE_DEVICE_TYPE(SMBUS_LOGGER, smbus_logger_device, "smbus_logger", "SMBUS LOGGER") -smbus_logger_device::smbus_logger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smbus_logger_device::smbus_logger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMBUS_LOGGER, tag, owner, clock) { } @@ -254,12 +254,12 @@ void smbus_logger_device::device_reset() DEFINE_DEVICE_TYPE(SMBUS_ROM, smbus_rom_device, "smbus_rom", "SMBUS ROM") -smbus_rom_device::smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +smbus_rom_device::smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMBUS_ROM, tag, owner, clock) { } -smbus_rom_device::smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const uint8_t *data, int size) : +smbus_rom_device::smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *data, int size) : smbus_rom_device(mconfig, tag, owner, clock) { buffer = data; @@ -288,7 +288,7 @@ void smbus_rom_device::device_reset() DEFINE_DEVICE_TYPE(AS99127F, as99127f_device, "as99127f", "Asus AS99127F") -as99127f_device::as99127f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +as99127f_device::as99127f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AS99127F, tag, owner, clock) { } @@ -317,7 +317,7 @@ void as99127f_device::device_start() DEFINE_DEVICE_TYPE(AS99127F_SENSOR2, as99127f_sensor2_device, "as99127f_sensor2", "Asus AS99127F temperature sensor 2") -as99127f_sensor2_device::as99127f_sensor2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +as99127f_sensor2_device::as99127f_sensor2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AS99127F_SENSOR2, tag, owner, clock) { } @@ -341,7 +341,7 @@ void as99127f_sensor2_device::device_start() DEFINE_DEVICE_TYPE(AS99127F_SENSOR3, as99127f_sensor3_device, "as99127f_sensor3", "Asus AS99127F temperature sensor 3") -as99127f_sensor3_device::as99127f_sensor3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +as99127f_sensor3_device::as99127f_sensor3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AS99127F_SENSOR3, tag, owner, clock) { } @@ -367,7 +367,7 @@ void as99127f_sensor3_device::device_start() DEFINE_DEVICE_TYPE(IT8703F, it8703f_device, "it8703f_device", "ITE IT8703F-A SuperIO") -it8703f_device::it8703f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +it8703f_device::it8703f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IT8703F, tag, owner, clock) , mode(OperatingMode::Run) , config_key_step(0) @@ -437,7 +437,7 @@ uint16_t it8703f_device::get_base_address(int logical, int index) void it8703f_device::device_add_mconfig(machine_config &config) { // floppy disc controller - smc37c78_device& fdcdev(SMC37C78(config, floppy_controller_fdcdev, 24'000'000)); + smc37c78_device& fdcdev(SMC37C78(config, floppy_controller_fdcdev, XTAL::u(24'000'000))); fdcdev.intrq_wr_callback().set(FUNC(it8703f_device::irq_floppy_w)); fdcdev.drq_wr_callback().set(FUNC(it8703f_device::drq_floppy_w)); @@ -1156,13 +1156,13 @@ static void floppy_formats(format_registration &fr) void nforcepc_state::nforcepc(machine_config &config) { - athlonxp_device &maincpu(ATHLONXP(config, "maincpu", 90000000)); + athlonxp_device &maincpu(ATHLONXP(config, "maincpu", XTAL::u(90000000))); maincpu.set_addrmap(AS_PROGRAM, &nforcepc_state::nforce_map); maincpu.set_addrmap(AS_IO, &nforcepc_state::nforce_map_io); maincpu.set_irq_acknowledge_callback(FUNC(nforcepc_state::irq_callback)); //maincpu.smiact().set("pci:01.0", FUNC(???_host_device::smi_act_w)); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); CRUSH11(config, "pci:00.0", 0, "maincpu", "bios"); // 10de:01a4 NVIDIA Corporation nForce CPU bridge CRUSH11_MEMORY(config, "pci:00.1", 0, 0x10430c11, 2); // 10de:01ac NVIDIA Corporation nForce 220/420 Memory Controller // 10de:01ad NVIDIA Corporation nForce 220/420 Memory Controller @@ -1171,7 +1171,7 @@ void nforcepc_state::nforcepc(machine_config &config) isa.smi().set_inputline(":maincpu", INPUT_LINE_SMI); isa.boot_state_hook().set(FUNC(nforcepc_state::boot_state_award_w)); isa.interrupt_output().set(FUNC(nforcepc_state::maincpu_interrupt)); - it8703f_device &ite(IT8703F(config, "pci:01.0:0", 0)); + it8703f_device &ite(IT8703F(config, "pci:01.0:0")); ite.pin_reset().set_inputline("maincpu", INPUT_LINE_RESET); ite.pin_gatea20().set_inputline("maincpu", INPUT_LINE_A20); ite.txd1().set("serport0", FUNC(rs232_port_device::write_txd)); @@ -1182,16 +1182,16 @@ void nforcepc_state::nforcepc(machine_config &config) ite.nrts2().set("serport1", FUNC(rs232_port_device::write_rts)); MCPX_SMBUS(config, "pci:01.1", 0, 0x10430c11); // 10de:01b4 NVIDIA Corporation nForce PCI System Management (SMBus) SMBUS_ROM(config, "pci:01.1:050", 0, test_spd_data, sizeof(test_spd_data)); // these 3 are on smbus number 0 - SMBUS_LOGGER(config, "pci:01.1:051", 0); - SMBUS_LOGGER(config, "pci:01.1:052", 0); - SMBUS_LOGGER(config, "pci:01.1:108", 0); // these 4 are on smbus number 1 - AS99127F(config, "pci:01.1:12d", 0); - AS99127F_SENSOR2(config, "pci:01.1:148", 0); - AS99127F_SENSOR3(config, "pci:01.1:149", 0); + SMBUS_LOGGER(config, "pci:01.1:051"); + SMBUS_LOGGER(config, "pci:01.1:052"); + SMBUS_LOGGER(config, "pci:01.1:108"); // these 4 are on smbus number 1 + AS99127F(config, "pci:01.1:12d"); + AS99127F_SENSOR2(config, "pci:01.1:148"); + AS99127F_SENSOR3(config, "pci:01.1:149"); mcpx_ohci_device &ohci(MCPX_OHCI(config, "pci:02.0", 0, 0x10430c11)); // 10de:01c2 NVIDIA Corporation nForce USB Controller ohci.interrupt_handler().set("pci:01.0", FUNC(mcpx_isalpc_device::irq1)); MCPX_OHCI(config, "pci:03.0", 0, 0x10430c11); // 10de:01c2 NVIDIA Corporation nForce USB Controller - MCPX_ETH(config, "pci:04.0", 0); // 10de:01c3 NVIDIA Corporation nForce Ethernet Controller + MCPX_ETH(config, "pci:04.0"); // 10de:01c3 NVIDIA Corporation nForce Ethernet Controller MCPX_APU(config, "pci:05.0", 0, 0x10430c11, m_maincpu); // 10de:01b0 NVIDIA Corporation nForce Audio Processing Unit MCPX_AC97_AUDIO(config, "pci:06.0", 0, 0x10438384); // 10de:01b1 NVIDIA Corporation nForce AC'97 Audio Controller PCI_BRIDGE(config, "pci:08.0", 0, 0x10de01b8, 0xc2); // 10de:01b8 NVIDIA Corporation nForce PCI-to-PCI bridge @@ -1202,8 +1202,8 @@ void nforcepc_state::nforcepc(machine_config &config) ide.subdevice("ide1")->options(ata_devices, "hdd", nullptr, true); ide.subdevice("ide2")->options(ata_devices, "cdrom", nullptr, true); NV2A_AGP(config, "pci:1e.0", 0, 0x10de01b7, 0xb2); // 10de:01b7 NVIDIA Corporation nForce AGP to PCI Bridge - VIRGEDX_PCI(config, "pci:0a.0", 0); - SST_49LF020(config, "bios", 0); + VIRGEDX_PCI(config, "pci:0a.0"); + SST_49LF020(config, "bios"); FLOPPY_CONNECTOR(config, "pci:01.0:0:fdc:0", pc_hd_floppies, "35hd", floppy_formats); FLOPPY_CONNECTOR(config, "pci:01.0:0:fdc:1", pc_hd_floppies, "35hd", floppy_formats); diff --git a/src/mame/pc/nforcepc.h b/src/mame/pc/nforcepc.h index 7dee2c67dc1..4abddb1a3e8 100644 --- a/src/mame/pc/nforcepc.h +++ b/src/mame/pc/nforcepc.h @@ -24,14 +24,14 @@ class crush11_host_device : public pci_host_device { public: template - crush11_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, const char *bios_device_tag) + crush11_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, const char *bios_device_tag) : crush11_host_device(mconfig, tag, owner, clock) { set_ids_host(0x10de01a4, 0xb2, 0); set_cpu_tag(std::forward(cpu_tag)); biosrom.set_tag(bios_device_tag); } - crush11_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crush11_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&tag) { cpu.set_tag(std::forward(tag)); } const char *get_cpu_tag() { return cpu.finder_tag(); } @@ -70,8 +70,8 @@ DECLARE_DEVICE_TYPE(CRUSH11, crush11_host_device) class crush11_memory_device : public pci_device { public: - crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id, int ram_size); - crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id, int ram_size); + crush11_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_ram_size(int ram_size); @@ -98,7 +98,7 @@ DECLARE_DEVICE_TYPE(CRUSH11_MEMORY, crush11_memory_device) class smbus_logger_device : public device_t, public smbus_interface { public: - smbus_logger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smbus_logger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; uint8_t *get_buffer() { return buffer; } @@ -117,8 +117,8 @@ DECLARE_DEVICE_TYPE(SMBUS_LOGGER, smbus_logger_device) class smbus_rom_device : public device_t, public smbus_interface { public: - smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const uint8_t *data, int size); - smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *data, int size); + smbus_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; protected: @@ -138,7 +138,7 @@ DECLARE_DEVICE_TYPE(SMBUS_ROM, smbus_rom_device) class as99127f_device : public device_t, public smbus_interface { public: - as99127f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + as99127f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; uint8_t *get_buffer() { return buffer; } @@ -154,7 +154,7 @@ DECLARE_DEVICE_TYPE(AS99127F, as99127f_device) class as99127f_sensor2_device : public device_t, public smbus_interface { public: - as99127f_sensor2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + as99127f_sensor2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; uint8_t *get_buffer() { return buffer; } @@ -170,7 +170,7 @@ DECLARE_DEVICE_TYPE(AS99127F_SENSOR2, as99127f_sensor2_device) class as99127f_sensor3_device : public device_t, public smbus_interface { public: - as99127f_sensor3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + as99127f_sensor3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; uint8_t *get_buffer() { return buffer; } @@ -188,7 +188,7 @@ DECLARE_DEVICE_TYPE(AS99127F_SENSOR3, as99127f_sensor3_device) class it8703f_device : public device_t, public lpcbus_device_interface { public: - it8703f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + it8703f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_extra(address_space *memory_space, address_space *io_space) override; virtual void set_host(int index, lpcbus_host_interface *host) override; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/pc/paokaipc.cpp b/src/mame/pc/paokaipc.cpp index ca24b71fd75..907c1d3ba94 100644 --- a/src/mame/pc/paokaipc.cpp +++ b/src/mame/pc/paokaipc.cpp @@ -83,7 +83,7 @@ INPUT_PORTS_END void paokaipc_state::paokaipc(machine_config &config) { // TODO: everything inherited from fruitpc.cpp, needs proper identification of motherboard. - PENTIUM(config, m_maincpu, 66000000); // unknown CPU, at least Pentium according to logs + PENTIUM(config, m_maincpu, XTAL::u(66000000)); // unknown CPU, at least Pentium according to logs m_maincpu->set_addrmap(AS_PROGRAM, &paokaipc_state::main_map); m_maincpu->set_addrmap(AS_IO, &paokaipc_state::main_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -95,10 +95,10 @@ void paokaipc_state::paokaipc(machine_config &config) pcvideo_vga(config); - PCI_ROOT(config, m_pciroot, 0); + PCI_ROOT(config, m_pciroot); // ... - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace("maincpu", AS_PROGRAM); m_isabus->set_iospace("maincpu", AS_IO); m_isabus->irq2_callback().set("pic8259_2", FUNC(pic8259_device::ir2_w)); @@ -112,7 +112,7 @@ void paokaipc_state::paokaipc(machine_config &config) m_isabus->drq3_callback().set("dma8237_1", FUNC(am9517a_device::dreq3_w)); // FIXME: determine ISA bus clock -// isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", 0, "isa", fruitpc_isa8_cards, "sb15", true)); +// isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", "isa", fruitpc_isa8_cards, "sb15", true)); // isa1.set_option_device_input_defaults("sb15", DEVICE_INPUT_DEFAULTS_NAME(fruitpc_sb_def)); // isa1.set_option_machine_config("sb15", fruitpc_sb_conf); } diff --git a/src/mame/pc/pc.cpp b/src/mame/pc/pc.cpp index 91dfce7cef0..74b4afe978d 100644 --- a/src/mame/pc/pc.cpp +++ b/src/mame/pc/pc.cpp @@ -220,11 +220,11 @@ void pc_state::pccga(machine_config &config) mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, nullptr, false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -415,9 +415,9 @@ enter the system bootstrap sequence detailed below. void pc_state::mpc1600(machine_config &config) { pccga(config); - ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa7", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa8", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa7", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa8", "mb:isa", pc_isa8_cards, nullptr, false); subdevice(RAM_TAG)->set_default_size("128K").set_extra_options("256K, 512K, 640K"); } @@ -697,7 +697,7 @@ void pc_state::ibm5550_io(address_map &map) void pc_state::ibm5550(machine_config &config) { /* basic machine hardware */ - i8086_cpu_device &maincpu(I8086(config, "maincpu", 8000000)); + i8086_cpu_device &maincpu(I8086(config, "maincpu", XTAL::u(8000000))); maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map); maincpu.set_addrmap(AS_IO, &pc_state::ibm5550_io); maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -711,10 +711,10 @@ void pc_state::ibm5550(machine_config &config) mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -907,8 +907,8 @@ DIP settings: Sw.1 Sw.2 Sw.3 Sw.4 Sw.5 Sw.6 Sw.7 Sw.8 effect void pc_state::ncrpc4i(machine_config & config) { pccga(config); - ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa7", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa7", "mb:isa", pc_isa8_cards, nullptr, false); subdevice(RAM_TAG)->set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K"); } @@ -1006,7 +1006,7 @@ ROM_END void pc_state::poisk2(machine_config &config) { /* basic machine hardware */ - i8086_cpu_device &maincpu(I8086(config, "maincpu", 4772720)); + i8086_cpu_device &maincpu(I8086(config, "maincpu", XTAL::u(4772720))); maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map); maincpu.set_addrmap(AS_IO, &pc_state::pc16_io); maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -1019,10 +1019,10 @@ void pc_state::poisk2(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga_poisk2", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga_poisk2", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -1108,7 +1108,7 @@ DEVICE_INPUT_DEFAULTS_END void pc_state::iskr3104(machine_config &config) { /* basic machine hardware */ - i8086_cpu_device &maincpu(I8086(config, "maincpu", 4772720)); + i8086_cpu_device &maincpu(I8086(config, "maincpu", XTAL::u(4772720))); maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map); maincpu.set_addrmap(AS_IO, &pc_state::pc16_io); maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -1121,10 +1121,10 @@ void pc_state::iskr3104(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(iskr3104)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "ega", false).set_option_default_bios("ega", "iskr3104"); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "ega", false).set_option_default_bios("ega", "iskr3104"); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -1211,12 +1211,12 @@ void pc_state::siemens(machine_config &config) mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(siemens)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "hercules", false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "hdc", false); - ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "hercules", false); + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, "hdc", false); + ISA8_SLOT(config, "isa6", "mb:isa", pc_isa8_cards, nullptr, false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -1386,10 +1386,10 @@ void pc_state::zenith(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false).set_option_machine_config("fdc_xt", cfg_dual_720K); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false).set_option_machine_config("fdc_xt", cfg_dual_720K); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -1572,7 +1572,7 @@ SWA: SW1 SW2 SW3 SW4 SW5 SW6 SW7 SW8 effect void pc_state::juko16(machine_config &config) { /* basic machine hardware */ - v30_device &maincpu(V30(config, "maincpu", 4772720)); + v30_device &maincpu(V30(config, "maincpu", XTAL::u(4772720))); maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map); maincpu.set_addrmap(AS_IO, &pc_state::pc16_io); maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -1585,10 +1585,10 @@ void pc_state::juko16(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "ega", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "ega", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -1950,11 +1950,11 @@ void pc_state::alphatp50(machine_config &config) mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, nullptr, false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -2115,7 +2115,7 @@ void pc_state::pc8_flash_map(address_map &map) void pc_state::modernxt(machine_config &config) // this is just to load the ROMs properly, the XT/AT hardware combination resp. the FE2010A (see notes) needs to be set up { /* basic machine hardware */ - v20_device &maincpu(V20(config, "maincpu", 8000000)); + v20_device &maincpu(V20(config, "maincpu", XTAL::u(8000000))); maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_flash_map); maincpu.set_addrmap(AS_IO, &pc_state::pc8_io); maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -2128,11 +2128,11 @@ void pc_state::modernxt(machine_config &config) // this is just to load the ROMs mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "vga", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_at", false); // bios supports HD floppies - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, "xtide", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "vga", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_at", false); // bios supports HD floppies + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, "xtide", false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)); @@ -2217,7 +2217,7 @@ Mass storage: No internal mass storage possible, boot via Arcnet or a project li void pc_state::earthst(machine_config &config) { /* basic machine hardware */ - v20_device &maincpu(V20(config, "maincpu", 8000000)); + v20_device &maincpu(V20(config, "maincpu", XTAL::u(8000000))); maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_map); maincpu.set_addrmap(AS_IO, &pc_state::pc8_io); maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -2230,9 +2230,9 @@ void pc_state::earthst(machine_config &config) mb.kbddata_callback().set("kbd", FUNC(pc_kbdc_device::data_write_from_mb)); mb.set_input_default(DEVICE_INPUT_DEFAULTS_NAME(pccga)); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "com", false); /* keyboard */ pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)); diff --git a/src/mame/pc/pc_t1t.cpp b/src/mame/pc/pc_t1t.cpp index f4785b0ed0b..fd79fb74d60 100644 --- a/src/mame/pc/pc_t1t.cpp +++ b/src/mame/pc/pc_t1t.cpp @@ -33,7 +33,7 @@ enum DEFINE_DEVICE_TYPE(PCVIDEO_T1000, pcvideo_t1000_device, "tandy_1000_graphics", "Tandy 1000 Graphics Adapter") DEFINE_DEVICE_TYPE(PCVIDEO_PCJR, pcvideo_pcjr_device, "pcjr_graphics", "PC Jr Graphics Adapter") -pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_video_interface(mconfig, *this), m_mc6845(*this, T1000_MC6845_NAME), @@ -57,12 +57,12 @@ pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, co { } -pcvideo_t1000_device::pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcvideo_t1000_device::pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_t1t_device(mconfig, PCVIDEO_T1000, tag, owner, clock) { } -pcvideo_pcjr_device::pcvideo_pcjr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcvideo_pcjr_device::pcvideo_pcjr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_t1t_device(mconfig, PCVIDEO_PCJR, tag, owner, clock), m_pic8259(*this, ":pic8259"), m_jxkanji(nullptr) diff --git a/src/mame/pc/pc_t1t.h b/src/mame/pc/pc_t1t.h index 39f5fe1e1b3..0b1e1a9021f 100644 --- a/src/mame/pc/pc_t1t.h +++ b/src/mame/pc/pc_t1t.h @@ -53,7 +53,7 @@ protected: }; // construction/destruction - pc_t1t_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc_t1t_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device m_mc6845; uint8_t m_mode_control, m_color_select; @@ -98,7 +98,7 @@ class pcvideo_t1000_device : public pc_t1t_device { public: // construction/destruction - pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER( disable_w ); @@ -123,7 +123,7 @@ class pcvideo_pcjr_device : public pc_t1t_device { public: // construction/destruction - pcvideo_pcjr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcvideo_pcjr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data); diff --git a/src/mame/pc/pcat_dyn.cpp b/src/mame/pc/pcat_dyn.cpp index f8b9f702a47..911ae094d03 100644 --- a/src/mame/pc/pcat_dyn.cpp +++ b/src/mame/pc/pcat_dyn.cpp @@ -167,7 +167,7 @@ void pcat_dyn_state::pcat_dyn_sb_conf(device_t *device) void pcat_dyn_state::pcat_dyn(machine_config &config) { /* basic machine hardware */ - I486(config, m_maincpu, 40000000); /* Am486 DX-40 */ + I486(config, m_maincpu, XTAL::u(40000000)); /* Am486 DX-40 */ m_maincpu->set_addrmap(AS_PROGRAM, &pcat_dyn_state::pcat_map); m_maincpu->set_addrmap(AS_IO, &pcat_dyn_state::pcat_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); @@ -185,7 +185,7 @@ void pcat_dyn_state::pcat_dyn(machine_config &config) m_mc146818->irq().set("pic8259_2", FUNC(pic8259_device::ir0_w)); m_mc146818->set_century_index(0x32); - ad1848_device &ad1848(AD1848(config, "ad1848", 0)); + ad1848_device &ad1848(AD1848(config, "ad1848")); ad1848.irq().set("pic8259_1", FUNC(pic8259_device::ir5_w)); ad1848.drq().set("dma8237_1", FUNC(am9517a_device::dreq0_w)); @@ -208,7 +208,7 @@ void pcat_dyn_state::pcat_dyn(machine_config &config) serport.ri_handler().set("ns16550", FUNC(ins8250_uart_device::ri_w)); serport.cts_handler().set("ns16550", FUNC(ins8250_uart_device::cts_w)); - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace("maincpu", AS_PROGRAM); m_isabus->set_iospace("maincpu", AS_IO); m_isabus->irq2_callback().set("pic8259_2", FUNC(pic8259_device::ir1_w)); @@ -222,7 +222,7 @@ void pcat_dyn_state::pcat_dyn(machine_config &config) m_isabus->drq3_callback().set("dma8237_1", FUNC(am9517a_device::dreq3_w)); // FIXME: determine ISA bus clock - isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", 0, "isa", pcat_dyn_isa8_cards, "sb15", true)); + isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", "isa", pcat_dyn_isa8_cards, "sb15", true)); isa1.set_option_device_input_defaults("sb15", DEVICE_INPUT_DEFAULTS_NAME(pcat_dyn_sb_def)); isa1.set_option_machine_config("sb15", pcat_dyn_sb_conf); } @@ -250,7 +250,7 @@ ROM_START(toursol) ROM_FILL(0x51bd2, 2, 0x90) // opl2 probe expects timer expiration too quickly ROM_REGION(0x2000, "nvram", 0) - ROM_LOAD("sol.u28", 0, 0x2000, CRC(c9374d50) SHA1(49173bc69f70bb2a7e8af9d03e2538b34aa881d8)) + ROM_LOAD("sol.u28", 0x2000, CRC(c9374d50) SHA1(49173bc69f70bb2a7e8af9d03e2538b34aa881d8)) ROM_REGION(128, "rtc", 0) ROM_LOAD("rtc", 0, 128, BAD_DUMP CRC(732f64c8) SHA1(5386eac3afef9b16af8dd7766e577f7ac700d9cc)) @@ -273,7 +273,7 @@ ROM_START(toursol1) ROM_FILL(0x334f6, 1, 0xeb) // skip prot(?) check ROM_REGION(0x2000, "nvram", 0) - ROM_LOAD("prom.7", 0, 0x2000, CRC(154c8092) SHA1(4439ee82f36d5d5c334494ba7bb4848e839213a7)) + ROM_LOAD("prom.7", 0x2000, CRC(154c8092) SHA1(4439ee82f36d5d5c334494ba7bb4848e839213a7)) ROM_REGION(128, "rtc", 0) ROM_LOAD("rtc", 0, 128, BAD_DUMP CRC(732f64c8) SHA1(5386eac3afef9b16af8dd7766e577f7ac700d9cc)) diff --git a/src/mame/pc/pcat_nit.cpp b/src/mame/pc/pcat_nit.cpp index 3191f6ced78..383cda4036d 100644 --- a/src/mame/pc/pcat_nit.cpp +++ b/src/mame/pc/pcat_nit.cpp @@ -263,7 +263,7 @@ void pcat_nit_state::pcat_nit(machine_config &config) uart.out_tx_callback().set("microtouch", FUNC(microtouch_device::rx)); uart.out_int_callback().set("pic8259_1", FUNC(pic8259_device::ir4_w)); - MICROTOUCH(config, m_microtouch, 9600).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); // rate? + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); // rate? NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); } @@ -284,7 +284,7 @@ void pcat_nit_state::bonanza(machine_config &config) uart.out_tx_callback().set("microtouch", FUNC(microtouch_device::rx)); uart.out_int_callback().set("pic8259_1", FUNC(pic8259_device::ir4_w)); - MICROTOUCH(config, m_microtouch, 9600).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); // rate? + MICROTOUCH(config, m_microtouch, XTAL::u(9600)).stx().set(uart, FUNC(ins8250_uart_device::rx_w)); // rate? NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); } diff --git a/src/mame/pc/pcipc.cpp b/src/mame/pc/pcipc.cpp index 0fbe5cd0fea..eb480cb3112 100644 --- a/src/mame/pc/pcipc.cpp +++ b/src/mame/pc/pcipc.cpp @@ -521,31 +521,31 @@ void pcipc_state::pcipc_map_io(address_map &map) void pcipc_state::pcipc(machine_config &config) { - pentium_device &maincpu(PENTIUM(config, "maincpu", 90000000)); + pentium_device &maincpu(PENTIUM(config, "maincpu", XTAL::u(90000000))); maincpu.set_addrmap(AS_PROGRAM, &pcipc_state::pcipc_map); maincpu.set_addrmap(AS_IO, &pcipc_state::pcipc_map_io); maincpu.set_irq_acknowledge_callback("pci:07.0:pic8259_master", FUNC(pic8259_device::inta_cb)); maincpu.smiact().set("pci:00.0", FUNC(i82439hx_host_device::smi_act_w)); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); I82439HX(config, "pci:00.0", 0, "maincpu", 256*1024*1024); - i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0", 0)); + i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0")); isa.boot_state_hook().set(FUNC(pcipc_state::boot_state_phoenix_ver40_rev6_w)); isa.smi().set_inputline("maincpu", INPUT_LINE_SMI); - i82371sb_ide_device &ide(I82371SB_IDE(config, "pci:07.1", 0)); + i82371sb_ide_device &ide(I82371SB_IDE(config, "pci:07.1")); ide.irq_pri().set("pci:07.0", FUNC(i82371sb_isa_device::pc_irq14_w)); ide.irq_sec().set("pci:07.0", FUNC(i82371sb_isa_device::pc_mirq0_w)); -// MGA2064W(config, "pci:12.0", 0); - VIRGE_PCI(config, "pci:12.0", 0); // use VIRGEDX_PCI for its VESA 2.0 BIOS +// MGA2064W(config, "pci:12.0"); + VIRGE_PCI(config, "pci:12.0"); // use VIRGEDX_PCI for its VESA 2.0 BIOS - ISA16_SLOT(config, "board4", 0, "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", superio_config); - ISA16_SLOT(config, "isa1", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa2", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "board4", "pci:07.0:isabus", isa_internal_devices, "fdc37c93x", true).set_option_machine_config("fdc37c93x", superio_config); + ISA16_SLOT(config, "isa1", "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa2", "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "pci:07.0:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "pci:07.0:isabus", pc_isa16_cards, nullptr, false); rs232_port_device& serport0(RS232_PORT(config, "serport0", isa_com, nullptr)); // "microsoft_mouse")); serport0.rxd_handler().set("board4:fdc37c93x", FUNC(fdc37c93x_device::rxd1_w)); @@ -564,16 +564,16 @@ void pcipc_state::pcipc(machine_config &config) void pcipc_state::pcipctx(machine_config &config) { - pentium_device &maincpu(PENTIUM(config, "maincpu", 60000000)); + pentium_device &maincpu(PENTIUM(config, "maincpu", XTAL::u(60000000))); maincpu.set_irq_acknowledge_callback("pci:07.0:pic8259_master", FUNC(pic8259_device::inta_cb)); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); I82439TX(config, "pci:00.0", 0, "maincpu", 256*1024*1024); - i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0", 0)); + i82371sb_isa_device &isa(I82371SB_ISA(config, "pci:07.0")); isa.boot_state_hook().set(FUNC(pcipc_state::boot_state_award_w)); -// IDE_PCI(config, "pci:07.1", 0, 0x80867010, 0x03, 0x00000000); - MGA2064W(config, "pci:12.0", 0); +// IDE_PCI(config, "pci:07.1", 0x80867010, 0x03, 0x00000000); + MGA2064W(config, "pci:12.0"); } ROM_START(pcipc) diff --git a/src/mame/pc/pcxt.cpp b/src/mame/pc/pcxt.cpp index 06e288bfb56..f6aa99b401e 100644 --- a/src/mame/pc/pcxt.cpp +++ b/src/mame/pc/pcxt.cpp @@ -125,7 +125,7 @@ class isa8_cga_filetto_device : public isa8_cga_device { public: // construction/destruction - isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -136,7 +136,7 @@ DEFINE_DEVICE_TYPE(ISA8_CGA_FILETTO, isa8_cga_filetto_device, "filetto_cga", "IS // isa8_cga_filetto_device - constructor //------------------------------------------------- -isa8_cga_filetto_device::isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_filetto_device::isa8_cga_filetto_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_device(mconfig, ISA8_CGA_FILETTO, tag, owner, clock) { } @@ -157,7 +157,7 @@ class isa8_cga_tetriskr_device : public isa8_cga_superimpose_device { public: // construction/destruction - isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; virtual void device_start() override; @@ -178,7 +178,7 @@ DEFINE_DEVICE_TYPE(ISA8_CGA_TETRISKR, isa8_cga_tetriskr_device, "tetriskr_cga", // isa8_cga_tetriskr_device - constructor //------------------------------------------------- -isa8_cga_tetriskr_device::isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isa8_cga_tetriskr_device::isa8_cga_tetriskr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : isa8_cga_superimpose_device(mconfig, ISA8_CGA_TETRISKR, tag, owner, clock), m_bg(*this, "gfx2") { @@ -553,13 +553,13 @@ void pcxt_state::filetto(machine_config &config) m_maincpu->set_addrmap(AS_IO, &pcxt_state::filetto_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + PCNOPPI_MOTHERBOARD(config, m_mb).set_cputag(m_maincpu); m_mb->int_callback().set_inputline(m_maincpu, 0); m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); - ISA8_SLOT(config, "isa1", 0, "mb:isa", filetto_isa8_cards, "filetto", true); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa1", "mb:isa", filetto_isa8_cards, "filetto", true); // FIXME: determine ISA bus clock - HC55516(config, m_cvsd, 0).add_route(ALL_OUTPUTS, "mb:mono", 0.60); //8923S-UM5100 is a HC55536 with ROM hook-up + HC55516(config, m_cvsd).add_route(ALL_OUTPUTS, "mb:mono", 0.60); //8923S-UM5100 is a HC55536 with ROM hook-up RAM(config, RAM_TAG).set_default_size("640K"); @@ -573,11 +573,11 @@ void pcxt_state::tetriskr(machine_config &config) m_maincpu->set_addrmap(AS_IO, &pcxt_state::tetriskr_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); - PCNOPPI_MOTHERBOARD(config, m_mb, 0).set_cputag(m_maincpu); + PCNOPPI_MOTHERBOARD(config, m_mb).set_cputag(m_maincpu); m_mb->int_callback().set_inputline(m_maincpu, 0); m_mb->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); - ISA8_SLOT(config, "isa1", 0, "mb:isa", filetto_isa8_cards, "tetriskr", true); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa1", "mb:isa", filetto_isa8_cards, "tetriskr", true); // FIXME: determine ISA bus clock RAM(config, RAM_TAG).set_default_size("64K"); } diff --git a/src/mame/pc/poisk1.cpp b/src/mame/pc/poisk1.cpp index cf76b136200..b97b616b893 100644 --- a/src/mame/pc/poisk1.cpp +++ b/src/mame/pc/poisk1.cpp @@ -656,7 +656,7 @@ INPUT_PORTS_END void p1_state::poisk1(machine_config &config) { /* basic machine hardware */ - I8088(config, m_maincpu, 5000000); + I8088(config, m_maincpu, XTAL::u(5000000)); m_maincpu->set_addrmap(AS_PROGRAM, &p1_state::poisk1_map); m_maincpu->set_addrmap(AS_IO, &p1_state::poisk1_io); m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb)); @@ -683,7 +683,7 @@ void p1_state::poisk1(machine_config &config) m_ppi8255n2->out_pb_callback().set(FUNC(p1_state::p1_ppi2_portb_w)); // 61h m_ppi8255n2->in_pc_callback().set(FUNC(p1_state::p1_ppi2_portc_r)); // 62h and 3DAh - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace("maincpu", AS_PROGRAM); m_isabus->set_iospace("maincpu", AS_IO); m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w)); @@ -694,16 +694,16 @@ void p1_state::poisk1(machine_config &config) m_isabus->iochrdy_callback().set_inputline(m_maincpu, INPUT_LINE_HALT); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, m_isabus, p1_isa8_cards, "fdc", false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); - ISA8_SLOT(config, "isa2", 0, m_isabus, p1_isa8_cards, nullptr, false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); - ISA8_SLOT(config, "isa3", 0, m_isabus, p1_isa8_cards, nullptr, false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); - ISA8_SLOT(config, "isa4", 0, m_isabus, p1_isa8_cards, nullptr, false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); + ISA8_SLOT(config, "isa1", m_isabus, p1_isa8_cards, "fdc", false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); + ISA8_SLOT(config, "isa2", m_isabus, p1_isa8_cards, nullptr, false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); + ISA8_SLOT(config, "isa3", m_isabus, p1_isa8_cards, nullptr, false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); + ISA8_SLOT(config, "isa4", m_isabus, p1_isa8_cards, nullptr, false).set_option_machine_config("fdc", [this](device_t *device) { fdc_config(device); }); SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); // fake hsync - TIMER(config, "scantimer").configure_scanline(FUNC(p1_state::hsync_changed), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(p1_state::hsync_changed), "screen", 1); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(XTAL(15'000'000), 912,0,640, 262,0,200); diff --git a/src/mame/pc/ps2.cpp b/src/mame/pc/ps2.cpp index fa5696aacb1..558147083f2 100644 --- a/src/mame/pc/ps2.cpp +++ b/src/mame/pc/ps2.cpp @@ -94,7 +94,7 @@ void ps2_state::machine_start() void ps2_state::ps2m30286(machine_config &config) { /* basic machine hardware */ - i80286_cpu_device &maincpu(I80286(config, m_maincpu, 10000000)); + i80286_cpu_device &maincpu(I80286(config, m_maincpu, XTAL::u(10000000))); maincpu.set_addrmap(AS_PROGRAM, &ps2_state::ps2_16_map); maincpu.set_addrmap(AS_IO, &ps2_state::ps2_16_io); maincpu.set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -109,10 +109,10 @@ void ps2_state::ps2m30286(machine_config &config) at_softlists(config); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "vga", true); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, "fdc", false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, "ide", false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, "comat", false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "vga", true); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, "fdc", false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, "ide", false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, "comat", false); pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_84)); kbd.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -124,7 +124,7 @@ void ps2_state::ps2m30286(machine_config &config) void ps2_state::ps2386(machine_config &config) { - I386(config, m_maincpu, 12000000); + I386(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ps2_state::ps2_32_map); m_maincpu->set_addrmap(AS_IO, &ps2_state::ps2_32_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); @@ -137,16 +137,16 @@ void ps2_state::ps2386(machine_config &config) at_softlists(config); // on board devices - ISA16_SLOT(config, "board1", 0, "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "board2", 0, "mb:isabus", pc_isa16_cards, "comat", true); - ISA16_SLOT(config, "board3", 0, "mb:isabus", pc_isa16_cards, "ide", true); - ISA16_SLOT(config, "board4", 0, "mb:isabus", pc_isa16_cards, "lpt", true); + ISA16_SLOT(config, "board1", "mb:isabus", pc_isa16_cards, "fdcsmc", true); // FIXME: determine ISA bus clock + ISA16_SLOT(config, "board2", "mb:isabus", pc_isa16_cards, "comat", true); + ISA16_SLOT(config, "board3", "mb:isabus", pc_isa16_cards, "ide", true); + ISA16_SLOT(config, "board4", "mb:isabus", pc_isa16_cards, "lpt", true); // ISA cards - ISA16_SLOT(config, "isa1", 0, "mb:isabus", pc_isa16_cards, "svga_et4k", false); - ISA16_SLOT(config, "isa2", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa3", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa4", 0, "mb:isabus", pc_isa16_cards, nullptr, false); - ISA16_SLOT(config, "isa5", 0, "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa1", "mb:isabus", pc_isa16_cards, "svga_et4k", false); + ISA16_SLOT(config, "isa2", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa3", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa4", "mb:isabus", pc_isa16_cards, nullptr, false); + ISA16_SLOT(config, "isa5", "mb:isabus", pc_isa16_cards, nullptr, false); pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)); kbd.out_clock_cb().set(m_mb, FUNC(at_mb_device::kbd_clk_w)); @@ -159,7 +159,7 @@ void ps2_state::ps2386(machine_config &config) void ps2_state::ps2386sx(machine_config &config) { ps2386(config); - I386SX(config.replace(), m_maincpu, 12000000); + I386SX(config.replace(), m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ps2_state::ps2_16_map); m_maincpu->set_addrmap(AS_IO, &ps2_state::ps2_16_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259_master", FUNC(pic8259_device::inta_cb)); diff --git a/src/mame/pc/quakeat.cpp b/src/mame/pc/quakeat.cpp index 5fc80a67b48..31f20237680 100644 --- a/src/mame/pc/quakeat.cpp +++ b/src/mame/pc/quakeat.cpp @@ -152,7 +152,7 @@ void quakeat_state::machine_start() void quakeat_state::quake(machine_config &config) { /* basic machine hardware */ - PENTIUM2(config, m_maincpu, 233000000); /* Pentium II, 233MHz */ + PENTIUM2(config, m_maincpu, XTAL::u(233000000)); /* Pentium II, 233MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &quakeat_state::quake_map); m_maincpu->set_addrmap(AS_IO, &quakeat_state::quake_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); diff --git a/src/mame/pc/queen.cpp b/src/mame/pc/queen.cpp index 70791d7c10c..8ef4bf1407a 100644 --- a/src/mame/pc/queen.cpp +++ b/src/mame/pc/queen.cpp @@ -290,7 +290,7 @@ void queen_state::queen(machine_config &config) pcat_common(config); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(0, FUNC(queen_state::intel82439tx_pci_r), FUNC(queen_state::intel82439tx_pci_w)); pcibus.set_device(7, FUNC(queen_state::intel82371ab_pci_r), FUNC(queen_state::intel82371ab_pci_w)); diff --git a/src/mame/pc/sis630.cpp b/src/mame/pc/sis630.cpp index 1a452974a86..6214c055e30 100644 --- a/src/mame/pc/sis630.cpp +++ b/src/mame/pc/sis630.cpp @@ -193,7 +193,7 @@ void sis630_state::sis630(machine_config &config) { // Slot 1/Socket 370, Coppermine FC-PGA @ 500~850+/100 MHz or Celeron PPGA 300~600+ MHz // TODO: lowered rate for debugging aid, needs a slot option anyway - PENTIUM3(config, m_maincpu, 100'000'000); + PENTIUM3(config, m_maincpu, XTAL::u(100'000'000)); // m_maincpu->set_addrmap(AS_PROGRAM, &sis630_state::main_map); // m_maincpu->set_addrmap(AS_IO, &sis630_state::main_io); m_maincpu->set_irq_acknowledge_callback("pci:01.0:pic_master", FUNC(pic8259_device::inta_cb)); @@ -203,7 +203,7 @@ void sis630_state::sis630(machine_config &config) // Needs a $80000 sized ROM AMD_29F400T(config, "flash"); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); // up to 512MB, 2 x DIMM sockets SIS630_HOST(config, "pci:00.0", 0, "maincpu", 256*1024*1024); SIS5513_IDE(config, m_ide_00_1, 0, "maincpu"); @@ -218,14 +218,14 @@ void sis630_state::sis630(machine_config &config) if (state) machine().schedule_soft_reset(); }); - LPC_ACPI (config, "pci:01.0:acpi", 0); - SIS950_SMBUS(config, "pci:01.0:smbus", 0); + LPC_ACPI (config, "pci:01.0:acpi"); + SIS950_SMBUS(config, "pci:01.0:smbus"); - SIS900_ETH(config, "pci:01.1", 0); + SIS900_ETH(config, "pci:01.1"); // USB config: 2 on back, 3 on front. Front is fn 2 SIS7001_USB(config, "pci:01.2", 0, 3); SIS7001_USB(config, "pci:01.3", 0, 2); - SIS7018_AUDIO(config, "pci:01.4", 0); + SIS7018_AUDIO(config, "pci:01.4"); // documentation doesn't mention modem part #, derived from Shuttle MS11 MB manual // SIS7013_MODEM_AC97(config, "pci:01.6" @@ -233,7 +233,7 @@ void sis630_state::sis630(machine_config &config) SIS630_BRIDGE(config, "pci:02.0", 0, "pci:02.0:00.0"); // GUI must go under the virtual bridge // This will be correctly identified as bus #1-dev #0-func #0 by the Award BIOS - SIS630_GUI(config, "pci:02.0:00.0", 0); + SIS630_GUI(config, "pci:02.0:00.0"); // optional stuff (according to Kontron 786LCD manual) // "pci:08.0" SCSI controller (vendor=1000 NCR / LSI Logic / Symbios Logic device=0012 53C895A) @@ -248,8 +248,8 @@ void sis630_state::sis630(machine_config &config) // TODO: 1 game port ('7018?) // TODO: AMR (Audio/modem riser) + UPT (Panel Link-TV out), assume [E]ISA complaint, needs specific slot options -// ISA16_SLOT(config, "isa1", 0, "pci:01.0:isabus", pc_isa16_cards, nullptr, false); -// ISA16_SLOT(config, "isa2", 0, "pci:01.0:isabus", pc_isa16_cards, nullptr, false); +// ISA16_SLOT(config, "isa1", "pci:01.0:isabus", pc_isa16_cards, nullptr, false); +// ISA16_SLOT(config, "isa2", "pci:01.0:isabus", pc_isa16_cards, nullptr, false); } // Kontron 786LCD/3.5 based diff --git a/src/mame/pc/tandy1t.cpp b/src/mame/pc/tandy1t.cpp index 85db48e1a43..0941d29f7a4 100644 --- a/src/mame/pc/tandy1t.cpp +++ b/src/mame/pc/tandy1t.cpp @@ -60,7 +60,7 @@ class t1000_mb_device : public pc_noppi_mb_device { public: // construction/destruction - t1000_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + t1000_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_noppi_mb_device(mconfig, T1000_MOTHERBOARD, tag, owner, clock) { } protected: @@ -136,7 +136,7 @@ private: } m_eeprom_ee[0x40]; /* only 0 to 4 used in hx, addressing seems to allow this */ int m_eeprom_state = 0; - int m_eeprom_clock = 0; + int m_eeprom_clock = XTAL(); uint8_t m_eeprom_oper = 0; uint16_t m_eeprom_data = 0; @@ -560,7 +560,7 @@ INPUT_PORTS_END class t1000_keyboard_device : public pc_keyboard_device { public: - t1000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + t1000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual ioport_constructor device_input_ports() const override; @@ -568,7 +568,7 @@ protected: DEFINE_DEVICE_TYPE(T1000_KEYB, t1000_keyboard_device, "t1000_keyb", "Tandy 1000 Keyboard") -t1000_keyboard_device::t1000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +t1000_keyboard_device::t1000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_keyboard_device(mconfig, T1000_KEYB, tag, owner, clock) { m_type = KEYBOARD_TYPE::PC; @@ -681,13 +681,13 @@ GFXDECODE_END void tandy1000_state::tandy1000_common(machine_config &config) { - T1000_MOTHERBOARD(config, m_mb, 0); + T1000_MOTHERBOARD(config, m_mb); m_mb->set_cputag("maincpu"); m_mb->int_callback().set_inputline("maincpu", 0); m_mb->nmi_callback().set_inputline("maincpu", INPUT_LINE_NMI); /* video hardware */ - PCVIDEO_T1000(config, m_video, 0); + PCVIDEO_T1000(config, m_video); m_video->set_screen("pcvideo_t1000:screen"); GFXDECODE(config, "gfxdecode", "pcvideo_t1000:palette", gfx_t1000); @@ -696,11 +696,11 @@ void tandy1000_state::tandy1000_common(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - isa8_slot_device &isa_fdc(ISA8_SLOT(config, "isa_fdc", 0, "mb:isa", pc_isa8_cards, "fdc_xt", true)); // FIXME: determine ISA bus clock + isa8_slot_device &isa_fdc(ISA8_SLOT(config, "isa_fdc", "mb:isa", pc_isa8_cards, "fdc_xt", true)); // FIXME: determine ISA bus clock isa_fdc.set_option_machine_config("fdc_xt", cfg_fdc_35); - ISA8_SLOT(config, "isa_lpt", 0, "mb:isa", pc_isa8_cards, "lpt", true); - ISA8_SLOT(config, "isa_com", 0, "mb:isa", pc_isa8_cards, "com", true); + ISA8_SLOT(config, "isa_lpt", "mb:isa", pc_isa8_cards, "lpt", true); + ISA8_SLOT(config, "isa_com", "mb:isa", pc_isa8_cards, "com", true); PC_JOY(config, "pc_joy"); @@ -725,7 +725,7 @@ void tandy1000_state::tandy1000_101key(machine_config &config) void tandy1000_state::t1000hx(machine_config &config) { - I8088(config, m_maincpu, 8000000); + I8088(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &tandy1000_state::tandy1000_map); m_maincpu->set_addrmap(AS_IO, &tandy1000_state::tandy1000_io); m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb)); @@ -735,7 +735,7 @@ void tandy1000_state::t1000hx(machine_config &config) tandy1000_90key(config); // plus cards are isa with a nonstandard conntector - ISA8_SLOT(config, "plus1", 0, "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "plus1", "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock m_ram->set_extra_options("256K, 384K"); } @@ -745,10 +745,10 @@ void tandy1000_state::t1000sx(machine_config &config) t1000hx(config); subdevice("isa_fdc")->set_option_machine_config("fdc_xt", cfg_fdc_525); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, nullptr, false); m_ram->set_extra_options("384K"); } @@ -776,10 +776,10 @@ void tandy1000_state::t1000sl2(machine_config &config) t1000rl(config); m_maincpu->set_clock(XTAL(24'000'000) / 3); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, nullptr, false); } void tandy1000_state::t1000tl(machine_config &config) @@ -793,11 +793,11 @@ void tandy1000_state::t1000tl(machine_config &config) tandy1000_101key(config); - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, nullptr, false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, nullptr, false); } void tandy1000_state::t1000tx(machine_config &config) diff --git a/src/mame/pc/tosh1000.cpp b/src/mame/pc/tosh1000.cpp index fe60b1fe8e6..f3f9a165702 100644 --- a/src/mame/pc/tosh1000.cpp +++ b/src/mame/pc/tosh1000.cpp @@ -278,12 +278,12 @@ void tosh1000_state::tosh1000(machine_config &config) TC8521(config, "rtc", XTAL(32'768)); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false); - ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false).set_option_machine_config("fdc_xt", cfg_fdc_35); - ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false); - ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false); - ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa1", "mb:isa", pc_isa8_cards, "cga", false); + ISA8_SLOT(config, "isa2", "mb:isa", pc_isa8_cards, "fdc_xt", false).set_option_machine_config("fdc_xt", cfg_fdc_35); + ISA8_SLOT(config, "isa3", "mb:isa", pc_isa8_cards, "lpt", false); + ISA8_SLOT(config, "isa4", "mb:isa", pc_isa8_cards, "com", false); + ISA8_SLOT(config, "isa5", "mb:isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", "mb:isa", pc_isa8_cards, nullptr, false); // SOFTWARE_LIST(config, "flop_list").set_original("tosh1000"); @@ -294,7 +294,7 @@ void tosh1000_state::tosh1000(machine_config &config) RAM(config, RAM_TAG).set_default_size("512K"); - TOSH1000_BRAM(config, m_bram, 0); + TOSH1000_BRAM(config, m_bram); } diff --git a/src/mame/pc/tosh1000_bram.cpp b/src/mame/pc/tosh1000_bram.cpp index 6dce3a8ad78..1487d7fe169 100644 --- a/src/mame/pc/tosh1000_bram.cpp +++ b/src/mame/pc/tosh1000_bram.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(TOSH1000_BRAM, tosh1000_bram_device, "tosh1000_bram", "Toshib // ctor //------------------------------------------------- -tosh1000_bram_device::tosh1000_bram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tosh1000_bram_device::tosh1000_bram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TOSH1000_BRAM, tag, owner, clock) , device_nvram_interface(mconfig, *this) { diff --git a/src/mame/pc/tosh1000_bram.h b/src/mame/pc/tosh1000_bram.h index e4a4d6c4180..217b31ee0f6 100644 --- a/src/mame/pc/tosh1000_bram.h +++ b/src/mame/pc/tosh1000_bram.h @@ -20,7 +20,7 @@ class tosh1000_bram_device : public device_t, public device_nvram_interface { public: // construction/destruction - tosh1000_bram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tosh1000_bram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/mame/pce/ggconnie.cpp b/src/mame/pce/ggconnie.cpp index 03cd5ed1cc4..3acd8529649 100644 --- a/src/mame/pce/ggconnie.cpp +++ b/src/mame/pce/ggconnie.cpp @@ -329,15 +329,15 @@ void ggconnie_state::ggconnie(machine_config &config) m_huc6260->vsync_changed().set("huc6202", FUNC(huc6202_device::vsync_changed)); m_huc6260->hsync_changed().set("huc6202", FUNC(huc6202_device::hsync_changed)); - huc6270_device &huc6270_0(HUC6270(config, "huc6270_0", 0)); + huc6270_device &huc6270_0(HUC6270(config, "huc6270_0")); huc6270_0.set_vram_size(0x10000); huc6270_0.irq().set_inputline(m_maincpu, 0); // needs input merger? - huc6270_device &huc6270_1(HUC6270(config, "huc6270_1", 0)); + huc6270_device &huc6270_1(HUC6270(config, "huc6270_1")); huc6270_1.set_vram_size(0x10000); huc6270_1.irq().set_inputline(m_maincpu, 0); // needs input merger? - huc6202_device &huc6202(HUC6202(config, "huc6202", 0 )); + huc6202_device &huc6202(HUC6202(config, "huc6202")); huc6202.next_pixel_0_callback().set("huc6270_0", FUNC(huc6270_device::next_pixel)); huc6202.time_til_next_event_0_callback().set("huc6270_0", FUNC(huc6270_device::time_until_next_event)); huc6202.vsync_changed_0_callback().set("huc6270_0", FUNC(huc6270_device::vsync_changed)); diff --git a/src/mame/pce/paranoia.cpp b/src/mame/pce/paranoia.cpp index 53b3e9633ce..52d271b37b8 100644 --- a/src/mame/pce/paranoia.cpp +++ b/src/mame/pce/paranoia.cpp @@ -204,7 +204,7 @@ void paranoia_state::paranoia(machine_config &config) m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed)); m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed)); - huc6270_device &huc6270(HUC6270(config, "huc6270", 0)); + huc6270_device &huc6270(HUC6270(config, "huc6270")); huc6270.set_vram_size(0x10000); huc6270.irq().set_inputline(m_maincpu, 0); diff --git a/src/mame/pce/tourvis.cpp b/src/mame/pce/tourvis.cpp index c7f8793c74e..dfab705c676 100644 --- a/src/mame/pce/tourvis.cpp +++ b/src/mame/pce/tourvis.cpp @@ -421,7 +421,7 @@ void tourvision_state::tourvision(machine_config &config) m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed)); m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed)); - huc6270_device &huc6270(HUC6270(config, "huc6270", 0)); + huc6270_device &huc6270(HUC6270(config, "huc6270")); huc6270.set_vram_size(0x10000); huc6270.irq().set_inputline(m_maincpu, 0); diff --git a/src/mame/pce/uapce.cpp b/src/mame/pce/uapce.cpp index b2bdc4f7e6f..26ba56c0a51 100644 --- a/src/mame/pce/uapce.cpp +++ b/src/mame/pce/uapce.cpp @@ -332,7 +332,7 @@ void uapce_state::uapce(machine_config &config) m_maincpu->add_route(0, "lspeaker", 0.5); m_maincpu->add_route(1, "rspeaker", 0.5); - z80_device &sub(Z80(config, "sub", 1400000)); + z80_device &sub(Z80(config, "sub", XTAL::u(1400000))); sub.set_addrmap(AS_PROGRAM, &uapce_state::z80_map); config.set_maximum_quantum(attotime::from_hz(60)); @@ -349,7 +349,7 @@ void uapce_state::uapce(machine_config &config) m_huc6260->vsync_changed().set("huc6270", FUNC(huc6270_device::vsync_changed)); m_huc6260->hsync_changed().set("huc6270", FUNC(huc6270_device::hsync_changed)); - huc6270_device &huc6270(HUC6270(config, "huc6270", 0)); + huc6270_device &huc6270(HUC6270(config, "huc6270")); huc6270.set_vram_size(0x10000); huc6270.irq().set_inputline(m_maincpu, 0); diff --git a/src/mame/philips/cdi.cpp b/src/mame/philips/cdi.cpp index 88114bf707a..d6fb8a7d383 100644 --- a/src/mame/philips/cdi.cpp +++ b/src/mame/philips/cdi.cpp @@ -426,7 +426,7 @@ void cdi_state::cdimono1_base(machine_config &config) m_mcd212->int_callback().set(m_maincpu, FUNC(scc68070_device::int1_w)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(14976000, 960, 0, 768, 312, 32, 312); + screen.set_raw(XTAL::u(14976000), 960, 0, 768, 312, 32, 312); screen.set_video_attributes(VIDEO_UPDATE_SCANLINE); screen.set_screen_update(m_mcd212, FUNC(mcd212_device::screen_update)); @@ -447,7 +447,7 @@ void cdi_state::cdimono1_base(machine_config &config) m_cdic->set_clock2(45.1584_MHz_XTAL * 3 / 7); // generated by PLL circuit incorporating 19.3575 MHz XTAL m_cdic->intreq_callback().set(m_maincpu, FUNC(scc68070_device::in4_w)); - CDI_SLAVE_HLE(config, m_slave_hle, 0); + CDI_SLAVE_HLE(config, m_slave_hle); m_slave_hle->int_callback().set(m_maincpu, FUNC(scc68070_device::in2_w)); /* sound hardware */ @@ -474,7 +474,7 @@ void cdi_state::cdimono2(machine_config &config) m_mcd212->int_callback().set(m_maincpu, FUNC(scc68070_device::int1_w)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(14976000, 960, 0, 768, 312, 32, 312); + screen.set_raw(XTAL::u(14976000), 960, 0, 768, 312, 32, 312); screen.set_video_attributes(VIDEO_UPDATE_SCANLINE); screen.set_screen_update(m_mcd212, FUNC(mcd212_device::screen_update)); @@ -518,7 +518,7 @@ void cdi_state::cdi910(machine_config &config) m_mcd212->int_callback().set(m_maincpu, FUNC(scc68070_device::int1_w)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(14976000, 960, 0, 768, 312, 32, 312); + screen.set_raw(XTAL::u(14976000), 960, 0, 768, 312, 32, 312); screen.set_video_attributes(VIDEO_UPDATE_SCANLINE); screen.set_screen_update(m_mcd212, FUNC(mcd212_device::screen_update)); @@ -568,7 +568,7 @@ void quizard_state::quizard(machine_config &config) m_maincpu->uart_rtsn_callback().set(FUNC(quizard_state::mcu_rtsn_from_cpu)); m_maincpu->uart_tx_callback().set(FUNC(quizard_state::mcu_rx_from_cpu)); - I8751(config, m_mcu, 8000000); + I8751(config, m_mcu, XTAL::u(8000000)); m_mcu->port_in_cb<0>().set(FUNC(quizard_state::mcu_p0_r)); m_mcu->port_in_cb<1>().set(FUNC(quizard_state::mcu_p1_r)); m_mcu->port_in_cb<2>().set(FUNC(quizard_state::mcu_p2_r)); diff --git a/src/mame/philips/cdicdic.cpp b/src/mame/philips/cdicdic.cpp index 5094d971780..4a23b849c30 100644 --- a/src/mame/philips/cdicdic.cpp +++ b/src/mame/philips/cdicdic.cpp @@ -1467,7 +1467,7 @@ uint32_t cdicdic_device::lba_from_time() // cdicdic_device - constructor //------------------------------------------------- -cdicdic_device::cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdicdic_device::cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDI_CDIC, tag, owner, clock) , m_intreq_callback(*this) , m_memory_space(*this, ":maincpu", AS_PROGRAM) diff --git a/src/mame/philips/cdicdic.h b/src/mame/philips/cdicdic.h index 9075b77cb0d..f60e08fb888 100644 --- a/src/mame/philips/cdicdic.h +++ b/src/mame/philips/cdicdic.h @@ -42,7 +42,7 @@ class cdicdic_device : public device_t { public: // construction/destruction - cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdicdic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_clock2(uint32_t clock) { m_clock2 = clock; } void set_clock2(const XTAL &xtal) { set_clock2(xtal.value()); } diff --git a/src/mame/philips/cdislavehle.cpp b/src/mame/philips/cdislavehle.cpp index 33d4705087d..7ec71a65c8d 100644 --- a/src/mame/philips/cdislavehle.cpp +++ b/src/mame/philips/cdislavehle.cpp @@ -399,7 +399,7 @@ void cdislave_hle_device::slave_w(offs_t offset, uint16_t data) // cdislave_hle_device - constructor //------------------------------------------------- -cdislave_hle_device::cdislave_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdislave_hle_device::cdislave_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDI_SLAVE_HLE, tag, owner, clock) , m_int_callback(*this) , m_dmadac(*this, ":dac%u", 1U) diff --git a/src/mame/philips/cdislavehle.h b/src/mame/philips/cdislavehle.h index f4e31d7d117..7649d214db9 100644 --- a/src/mame/philips/cdislavehle.h +++ b/src/mame/philips/cdislavehle.h @@ -32,7 +32,7 @@ class cdislave_hle_device : public device_t { public: // construction/destruction - cdislave_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdislave_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_callback() { return m_int_callback.bind(); } diff --git a/src/mame/philips/mcd212.cpp b/src/mame/philips/mcd212.cpp index 3aa73d199b0..3398a8e071b 100644 --- a/src/mame/philips/mcd212.cpp +++ b/src/mame/philips/mcd212.cpp @@ -1411,7 +1411,7 @@ void mcd212_device::device_reset() // mcd212_device - constructor //------------------------------------------------- -mcd212_device::mcd212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcd212_device::mcd212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MCD212, tag, owner, clock) , device_video_interface(mconfig, *this) , m_int_callback(*this) diff --git a/src/mame/philips/mcd212.h b/src/mame/philips/mcd212.h index 8b1e7c0ee5a..ed304009050 100644 --- a/src/mame/philips/mcd212.h +++ b/src/mame/philips/mcd212.h @@ -36,14 +36,14 @@ class mcd212_device : public device_t, { public: template - mcd212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&plane_a_tag, U &&plane_b_tag) + mcd212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&plane_a_tag, U &&plane_b_tag) : mcd212_device(mconfig, tag, owner, clock) { m_planea.set_tag(std::forward(plane_a_tag)); m_planeb.set_tag(std::forward(plane_b_tag)); } - mcd212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcd212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_callback() { return m_int_callback.bind(); } diff --git a/src/mame/philips/minitel_2_rpic.cpp b/src/mame/philips/minitel_2_rpic.cpp index e58059cfa3d..112ffcb3471 100644 --- a/src/mame/philips/minitel_2_rpic.cpp +++ b/src/mame/philips/minitel_2_rpic.cpp @@ -522,10 +522,10 @@ void minitel_state::minitel2(machine_config &config) I2C_24C02(config, m_i2cmem); - TS9347(config, m_ts9347, 0); + TS9347(config, m_ts9347); m_ts9347->set_palette_tag(m_palette); - TIMER(config, "minitel_sl", 0).configure_scanline(FUNC(minitel_state::minitel_scanline), "screen", 0, 10); + TIMER(config, "minitel_sl").configure_scanline(FUNC(minitel_state::minitel_scanline), "screen", 0, 10); RS232_PORT(config, m_modem, default_rs232_devices, nullptr); m_modem->rxd_handler().set_inputline(m_maincpu, MCS51_INT1_LINE).invert(); @@ -547,7 +547,7 @@ void minitel_state::minitel2(machine_config &config) PALETTE(config, m_palette).set_entries(8+1); // Send a fake 1300 Hz carrier (emulate the modem ZCO output) - auto &fake_1300hz_clock(CLOCK(config, "fake_1300hz_clock", 1300)); + auto &fake_1300hz_clock(CLOCK(config, "fake_1300hz_clock", XTAL::u(1300))); fake_1300hz_clock.set_pulse_width(attotime::from_usec(384)); fake_1300hz_clock.signal_handler().set_inputline(m_maincpu, MCS51_INT0_LINE); } diff --git a/src/mame/philips/p2000t.cpp b/src/mame/philips/p2000t.cpp index fe313f33eec..6b467cb89d9 100644 --- a/src/mame/philips/p2000t.cpp +++ b/src/mame/philips/p2000t.cpp @@ -225,7 +225,7 @@ uint8_t p2000t_state::videoram_r(offs_t offset) void p2000t_state::p2000t(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); + Z80(config, m_maincpu, XTAL::u(2500000)); m_maincpu->set_addrmap(AS_PROGRAM, &p2000t_state::p2000t_mem); m_maincpu->set_addrmap(AS_IO, &p2000t_state::p2000t_io); m_maincpu->set_vblank_int("screen", FUNC(p2000t_state::p2000_interrupt)); @@ -238,7 +238,7 @@ void p2000t_state::p2000t(machine_config &config) screen.set_visarea(0, 40 * 12 - 1, 0, 24 * 20 - 1); screen.set_screen_update("saa5050", FUNC(saa5050_device::screen_update)); - saa5050_device &saa5050(SAA5050(config, "saa5050", 6000000)); + saa5050_device &saa5050(SAA5050(config, "saa5050", XTAL::u(6000000))); saa5050.d_cb().set(FUNC(p2000t_state::videoram_r)); saa5050.set_screen_size(40, 24, 80); @@ -247,7 +247,7 @@ void p2000t_state::p2000t(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); /* the mini cassette driver */ - MDCR(config, m_mdcr, 0); + MDCR(config, m_mdcr); /* internal ram */ RAM(config, m_ram).set_default_size("16K").set_extra_options("16K,32K,48K,64K,80K,102K"); @@ -258,7 +258,7 @@ void p2000t_state::p2000t(machine_config &config) void p2000m_state::p2000m(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2500000); + Z80(config, m_maincpu, XTAL::u(2500000)); m_maincpu->set_addrmap(AS_PROGRAM, &p2000m_state::p2000m_mem); m_maincpu->set_addrmap(AS_IO, &p2000m_state::p2000t_io); m_maincpu->set_vblank_int("screen", FUNC(p2000m_state::p2000_interrupt)); @@ -281,7 +281,7 @@ void p2000m_state::p2000m(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); /* the mini cassette driver */ - MDCR(config, m_mdcr, 0); + MDCR(config, m_mdcr); /* internal ram */ RAM(config, m_ram).set_default_size("16K").set_extra_options("16K,32K,48K,64K,80K,102K"); } diff --git a/src/mame/philips/p2000t_mdcr.cpp b/src/mame/philips/p2000t_mdcr.cpp index c9559ab50ed..9dd4569608b 100644 --- a/src/mame/philips/p2000t_mdcr.cpp +++ b/src/mame/philips/p2000t_mdcr.cpp @@ -92,7 +92,7 @@ void mdcr_device::device_add_mconfig(machine_config &config) m_cassette->set_formats(p2000t_cassette_formats); } -mdcr_device::mdcr_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +mdcr_device::mdcr_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MDCR, tag, owner, clock) , m_cassette(*this, "cassette") , m_read_timer(nullptr) diff --git a/src/mame/philips/p2000t_mdcr.h b/src/mame/philips/p2000t_mdcr.h index 4c5ebce9d39..ba7ae46d9f5 100644 --- a/src/mame/philips/p2000t_mdcr.h +++ b/src/mame/philips/p2000t_mdcr.h @@ -34,7 +34,7 @@ class mdcr_device : public device_t { public: - mdcr_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock); + mdcr_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); /// \brief The read clock, switches state when a bit is available. /// diff --git a/src/mame/philips/vg5k.cpp b/src/mame/philips/vg5k.cpp index 315b0c6da98..4dead4a8d09 100644 --- a/src/mame/philips/vg5k.cpp +++ b/src/mame/philips/vg5k.cpp @@ -422,7 +422,7 @@ void vg5k_state::vg5k(machine_config &config) TIMER(config, "irq_timer").configure_periodic(FUNC(vg5k_state::z80_irq), attotime::from_msec(20)); - EF9345(config, m_ef9345, 0); + EF9345(config, m_ef9345); m_ef9345->set_palette_tag("palette"); /* video hardware */ @@ -438,7 +438,7 @@ void vg5k_state::vg5k(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.125); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.125); /* cassette */ CASSETTE(config, m_cassette); @@ -448,7 +448,7 @@ void vg5k_state::vg5k(machine_config &config) m_cassette->set_interface("vg5k_cass"); /* printer */ - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); /* internal ram */ RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("32K,48K"); diff --git a/src/mame/phoenix/naughtyb.cpp b/src/mame/phoenix/naughtyb.cpp index 7f7299cd531..fd1a725ea14 100644 --- a/src/mame/phoenix/naughtyb.cpp +++ b/src/mame/phoenix/naughtyb.cpp @@ -428,7 +428,7 @@ void naughtyb_state::naughtyb_base(machine_config &config) /* uses the TMS3615NS for sound */ SPEAKER(config, "mono").front_center(); - tms36xx_device &tms(TMS36XX(config, "tms", 350)); + tms36xx_device &tms(TMS36XX(config, "tms", XTAL::u(350))); tms.set_subtype(tms36xx_device::subtype::TMS3615); tms.set_decays(0.15, 0.20, 0, 0, 0, 0); // NOTE: it's unknown if the TMS3615 mixes more than one voice internally. diff --git a/src/mame/phoenix/phoenix.cpp b/src/mame/phoenix/phoenix.cpp index 7225b0e3d3d..366cff0e63d 100644 --- a/src/mame/phoenix/phoenix.cpp +++ b/src/mame/phoenix/phoenix.cpp @@ -466,7 +466,7 @@ void phoenix_state::phoenix(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - tms36xx_device &tms(TMS36XX(config, "tms", 372)); + tms36xx_device &tms(TMS36XX(config, "tms", XTAL::u(372))); tms.set_subtype(tms36xx_device::subtype::MM6221AA); tms.set_decays(0.50, 0, 0, 1.05, 0, 0); tms.set_tune_speed(0.21); diff --git a/src/mame/phoenix/phoenix_a.cpp b/src/mame/phoenix/phoenix_a.cpp index 1008a61539c..7b4bd852ef2 100644 --- a/src/mame/phoenix/phoenix_a.cpp +++ b/src/mame/phoenix/phoenix_a.cpp @@ -50,7 +50,7 @@ DEFINE_DEVICE_TYPE(PHOENIX_SOUND, phoenix_sound_device, "phoenix_sound", "Phoenix Custom Sound") -phoenix_sound_device::phoenix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +phoenix_sound_device::phoenix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PHOENIX_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_discrete(*this, ":discrete") diff --git a/src/mame/phoenix/phoenix_a.h b/src/mame/phoenix/phoenix_a.h index 8e915e47e89..7ce0120ebdd 100644 --- a/src/mame/phoenix/phoenix_a.h +++ b/src/mame/phoenix/phoenix_a.h @@ -12,7 +12,7 @@ class phoenix_sound_device : public device_t, public device_sound_interface { public: - phoenix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + phoenix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void control_a_w(uint8_t data); void control_b_w(uint8_t data); diff --git a/src/mame/phoenix/pleiads.cpp b/src/mame/phoenix/pleiads.cpp index 5fa717c7a57..0c1cd01f46a 100644 --- a/src/mame/phoenix/pleiads.cpp +++ b/src/mame/phoenix/pleiads.cpp @@ -23,12 +23,12 @@ DEFINE_DEVICE_TYPE(PLEIADS_SOUND, pleiads_sound_device, "pleiads_sound", "Pleiads Custom Sound") -pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pleiads_sound_device(mconfig, PLEIADS_SOUND, tag, owner, clock) { } -pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), m_tms(*this, ":tms"), @@ -112,7 +112,7 @@ void pleiads_sound_device::device_start() DEFINE_DEVICE_TYPE(NAUGHTYB_SOUND, naughtyb_sound_device, "naughtyb_sound", "Naughty Boy Custom Sound") -naughtyb_sound_device::naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +naughtyb_sound_device::naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pleiads_sound_device(mconfig, NAUGHTYB_SOUND, tag, owner, clock) { } @@ -180,7 +180,7 @@ void naughtyb_sound_device::device_start() DEFINE_DEVICE_TYPE(POPFLAME_SOUND, popflame_sound_device, "popflame_sound", "Pop Flamer Custom Sound") -popflame_sound_device::popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +popflame_sound_device::popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pleiads_sound_device(mconfig, POPFLAME_SOUND, tag, owner, clock) { } diff --git a/src/mame/phoenix/pleiads.h b/src/mame/phoenix/pleiads.h index 9dd77f6e857..eb595f32fe9 100644 --- a/src/mame/phoenix/pleiads.h +++ b/src/mame/phoenix/pleiads.h @@ -10,7 +10,7 @@ class pleiads_sound_device : public device_t, public device_sound_interface { public: - pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void control_a_w(uint8_t data); void control_b_w(uint8_t data); @@ -45,7 +45,7 @@ protected: int freq = 0; }; - pleiads_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pleiads_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -98,7 +98,7 @@ protected: class naughtyb_sound_device : public pleiads_sound_device { public: - naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -112,7 +112,7 @@ protected: class popflame_sound_device : public pleiads_sound_device { public: - popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/mame/pinball/allied.cpp b/src/mame/pinball/allied.cpp index e9ae733556f..a08f5e12883 100644 --- a/src/mame/pinball/allied.cpp +++ b/src/mame/pinball/allied.cpp @@ -674,7 +674,7 @@ void allied_state::allied(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_ic1, 0); + PIA6821(config, m_ic1); m_ic1->readpa_handler().set(FUNC(allied_state::ic1_a_r)); //m_ic1->writepa_handler().set(FUNC(allied_state::ic1_a_w)); //m_ic1->readpb_handler().set(FUNC(allied_state::ic1_b_r)); @@ -684,7 +684,7 @@ void allied_state::allied(machine_config &config) m_ic1->irqa_handler().set_inputline("maincpu", M6504_IRQ_LINE); m_ic1->irqb_handler().set_inputline("maincpu", M6504_IRQ_LINE); - PIA6821(config, m_ic2, 0); + PIA6821(config, m_ic2); m_ic2->readpa_handler().set(FUNC(allied_state::ic2_a_r)); //m_ic2->writepa_handler().set(FUNC(allied_state::ic2_a_w)); //m_ic2->readpb_handler().set(FUNC(allied_state::ic2_b_r)); @@ -694,7 +694,7 @@ void allied_state::allied(machine_config &config) m_ic2->irqa_handler().set_inputline("maincpu", M6504_IRQ_LINE); m_ic2->irqb_handler().set_inputline("maincpu", M6504_IRQ_LINE); - PIA6821(config, m_ic4, 0); + PIA6821(config, m_ic4); m_ic4->readpa_handler().set(FUNC(allied_state::ic4_a_r)); //m_ic4->writepa_handler().set(FUNC(allied_state::ic4_a_w)); //m_ic4->readpb_handler().set(FUNC(allied_state::ic4_b_r)); @@ -704,7 +704,7 @@ void allied_state::allied(machine_config &config) m_ic4->irqa_handler().set_inputline("maincpu", M6504_IRQ_LINE); m_ic4->irqb_handler().set_inputline("maincpu", M6504_IRQ_LINE); - PIA6821(config, m_ic7, 0); + PIA6821(config, m_ic7); m_ic7->readpa_handler().set(FUNC(allied_state::ic7_a_r)); //m_ic7->writepa_handler().set(FUNC(allied_state::ic7_a_w)); //m_ic7->readpb_handler().set(FUNC(allied_state::ic7_b_r)); @@ -714,7 +714,7 @@ void allied_state::allied(machine_config &config) m_ic7->irqa_handler().set_inputline("maincpu", M6504_IRQ_LINE); m_ic7->irqb_handler().set_inputline("maincpu", M6504_IRQ_LINE); - PIA6821(config, m_ic8, 0); + PIA6821(config, m_ic8); //m_ic8->readpa_handler().set(FUNC(allied_state::ic8_a_r)); m_ic8->writepa_handler().set(FUNC(allied_state::ic8_a_w)); //m_ic8->readpb_handler().set(FUNC(allied_state::ic8_b_r)); diff --git a/src/mame/pinball/alvg.cpp b/src/mame/pinball/alvg.cpp index 4f27edbf249..394e56c4c56 100644 --- a/src/mame/pinball/alvg.cpp +++ b/src/mame/pinball/alvg.cpp @@ -567,7 +567,7 @@ void alvg_state::pca008(machine_config &config) m_bsmt->add_route(0, "lspeaker", 1.2); m_bsmt->add_route(1, "rspeaker", 1.2); - CLOCK(config, "fclock", 2'000'000 / 4096).signal_handler().set_inputline(m_audiocpu, 1); + CLOCK(config, "fclock", XTAL::u(2'000'000) / 4096).signal_handler().set_inputline(m_audiocpu, 1); } void alvg_state::pca020(machine_config &config) @@ -590,7 +590,7 @@ void alvg_state::pca020(machine_config &config) screen.set_palette("palette"); PALETTE(config, "palette", palette_device::MONOCHROME); - CLOCK(config, "dclock", 100).signal_handler().set_inputline(m_dmdcpu, MCS51_INT1_LINE); // unknown frequency, need to be measured. + CLOCK(config, "dclock", XTAL::u(100)).signal_handler().set_inputline(m_dmdcpu, MCS51_INT1_LINE); // unknown frequency, need to be measured. } void alvg_state::alvg(machine_config &config) diff --git a/src/mame/pinball/atari_4x4.cpp b/src/mame/pinball/atari_4x4.cpp index 698c269f071..a563522e6b8 100644 --- a/src/mame/pinball/atari_4x4.cpp +++ b/src/mame/pinball/atari_4x4.cpp @@ -87,7 +87,7 @@ void atari_4x4_state::machine_reset() void atari_4x4_state::fourx4(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1'000'000); // guess + M6502(config, m_maincpu, XTAL::u(1'000'000)); // guess m_maincpu->set_addrmap(AS_PROGRAM, &atari_4x4_state::mem_map); /* Video */ @@ -96,8 +96,8 @@ void atari_4x4_state::fourx4(machine_config &config) /* Sound */ genpin_audio(config); //SPEAKER(config, "speaker").front_center(); - //DAC_4BIT_BINARY_WEIGHTED(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // r23-r26 (68k,33k,18k,8.2k) - //DAC_3BIT_BINARY_WEIGHTED(config, m_dac1, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // r18-r20 (100k,47k,100k) + //DAC_4BIT_BINARY_WEIGHTED(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.15); // r23-r26 (68k,33k,18k,8.2k) + //DAC_3BIT_BINARY_WEIGHTED(config, m_dac1).add_route(ALL_OUTPUTS, "speaker", 0.15); // r18-r20 (100k,47k,100k) //TIMER(config, "timer_s").configure_periodic(FUNC(atari_s2_state::timer_s), attotime::from_hz(150000)); } diff --git a/src/mame/pinball/atari_s1.cpp b/src/mame/pinball/atari_s1.cpp index 58fb15850b7..e8a4dc69096 100644 --- a/src/mame/pinball/atari_s1.cpp +++ b/src/mame/pinball/atari_s1.cpp @@ -517,7 +517,7 @@ void atari_s1_state::atari_s1(machine_config &config) genpin_audio(config); SPEAKER(config, "speaker").front_center(); - DAC_4BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC + DAC_4BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC /* Video */ config.set_default_layout(layout_atari_s1); diff --git a/src/mame/pinball/atari_s2.cpp b/src/mame/pinball/atari_s2.cpp index 4b4d82f0059..92ec32d4b8f 100644 --- a/src/mame/pinball/atari_s2.cpp +++ b/src/mame/pinball/atari_s2.cpp @@ -523,8 +523,8 @@ void atari_s2_state::atari_s2(machine_config &config) genpin_audio(config); SPEAKER(config, "speaker").front_center(); - DAC_4BIT_BINARY_WEIGHTED(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // r23-r26 (68k,33k,18k,8.2k) - DAC_3BIT_BINARY_WEIGHTED(config, m_dac1, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // r18-r20 (100k,47k,100k) + DAC_4BIT_BINARY_WEIGHTED(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.15); // r23-r26 (68k,33k,18k,8.2k) + DAC_3BIT_BINARY_WEIGHTED(config, m_dac1).add_route(ALL_OUTPUTS, "speaker", 0.15); // r18-r20 (100k,47k,100k) /* Video */ config.set_default_layout(layout_atari_s2); diff --git a/src/mame/pinball/barni.cpp b/src/mame/pinball/barni.cpp index f1cc344f793..b0fdba0a5c2 100644 --- a/src/mame/pinball/barni.cpp +++ b/src/mame/pinball/barni.cpp @@ -227,17 +227,17 @@ void barni_state::barni(machine_config &config) /* video hardware */ config.set_default_layout(layout_barni); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); // m_pia1->writepa_handler().set(FUNC(barni_state::pia1_pa_w)); // m_pia1->writepb_handler().set(FUNC(barni_state::pia1_pb_w)); // m_pia1->readpa_handler().set(FUNC(barni_state::pia1_pa_r)); - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); // m_pia2->writepa_handler().set(FUNC(barni_state::pia2_pa_w)); // m_pia2->writepb_handler().set(FUNC(barni_state::pia2_pb_w)); // m_pia2->readpa_handler().set(FUNC(barni_state::pia2_pa_r)); - MOS6522(config, m_via, 4'000'000 / 4); // to check + MOS6522(config, m_via, XTAL::u(4'000'000) / 4); // to check m_via->irq_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); m_via->writepa_handler().set(FUNC(barni_state::via_pa_w)); m_via->writepb_handler().set(FUNC(barni_state::via_pb_w)); @@ -245,28 +245,28 @@ void barni_state::barni(machine_config &config) // m_via->cb2_handler().set(FUNC(barni_state::via_cb2_w)); // SOUND BOARD - M6802(config, m_audiocpu, 4000000); // guess - crystal value not shown + M6802(config, m_audiocpu, XTAL::u(4000000)); // guess - crystal value not shown m_audiocpu->set_addrmap(AS_PROGRAM, &barni_state::audiocpu_map); - PIA6821(config, m_pias1, 0); // U12 + PIA6821(config, m_pias1); // U12 m_pias1->writepa_handler().set(m_speech, FUNC(tms5220_device::data_w)); m_pias1->writepb_handler().set(FUNC(barni_state::pias1_pb_w)); m_pias1->irqa_handler().set_inputline(m_maincpu, M6802_IRQ_LINE); m_pias1->irqb_handler().set_inputline(m_maincpu, M6802_IRQ_LINE); - PIA6821(config, m_pias2, 0); // U17 + PIA6821(config, m_pias2); // U17 m_pias2->writepb_handler().set(FUNC(barni_state::pias2_pb_w)); m_pias2->irqa_handler().set_inputline(m_maincpu, M6802_IRQ_LINE); m_pias2->irqb_handler().set_inputline(m_maincpu, M6802_IRQ_LINE); SPEAKER(config, "mono").front_center(); - TMS5220C(config, m_speech, 640000); // unknown clock + TMS5220C(config, m_speech, XTAL::u(640000)); // unknown clock m_speech->irq_cb().set(m_pias1, FUNC(pia6821_device::cb1_w)); m_speech->ready_cb().set(m_pias1, FUNC(pia6821_device::ca2_w)); m_speech->add_route(ALL_OUTPUTS, "mono", 1.0); //dac - MC1408(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.275); - DAC_4BIT_R2R(config, m_dac2, 0).add_route(ALL_OUTPUTS, "mono", 0.5); // discrete parts + MC1408(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.275); + DAC_4BIT_R2R(config, m_dac2).add_route(ALL_OUTPUTS, "mono", 0.5); // discrete parts genpin_audio(config); } diff --git a/src/mame/pinball/bingo.cpp b/src/mame/pinball/bingo.cpp index b00b4794f7b..446ecf15c80 100644 --- a/src/mame/pinball/bingo.cpp +++ b/src/mame/pinball/bingo.cpp @@ -49,7 +49,7 @@ void bingo_state::init_bingo() void bingo_state::bingo(machine_config &config) { /* basic machine hardware */ - S2650(config, m_maincpu, 1000000); + S2650(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &bingo_state::bingo_map); } @@ -93,7 +93,7 @@ void seeben_state::init_seeben() void seeben_state::seeben(machine_config &config) { /* basic machine hardware */ - I8085A(config, m_maincpu, 1000000); + I8085A(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &seeben_state::seeben_map); } @@ -139,7 +139,7 @@ void splin_state::init_splin() void splin_state::splin(machine_config &config) { /* basic machine hardware */ - I80186(config, m_maincpu, 16000000); + I80186(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &splin_state::splin_map); } diff --git a/src/mame/pinball/by17.cpp b/src/mame/pinball/by17.cpp index 5a4f3917a2f..43439545828 100644 --- a/src/mame/pinball/by17.cpp +++ b/src/mame/pinball/by17.cpp @@ -994,7 +994,7 @@ void by17_state::machine_reset() void by17_state::by17(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 530000); // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz + M6800(config, m_maincpu, XTAL::u(530000)); // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz m_maincpu->set_addrmap(AS_PROGRAM, &by17_state::by17_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // 'F' filled causes Credit Display to be blank on first startup @@ -1006,7 +1006,7 @@ void by17_state::by17(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia_u10, 0); + PIA6821(config, m_pia_u10); m_pia_u10->readpa_handler().set(FUNC(by17_state::u10_a_r)); m_pia_u10->writepa_handler().set(FUNC(by17_state::u10_a_w)); m_pia_u10->readpb_handler().set(FUNC(by17_state::u10_b_r)); @@ -1020,7 +1020,7 @@ void by17_state::by17(machine_config &config) TIMER(config, "timer_z_freq").configure_periodic(FUNC(by17_state::timer_z_freq), attotime::from_hz(100)); // Mains Line Frequency * 2 TIMER(config, m_zero_crossing_active_timer).configure_generic(FUNC(by17_state::timer_z_pulse)); // Active pulse length from Zero Crossing detector - PIA6821(config, m_pia_u11, 0); + PIA6821(config, m_pia_u11); m_pia_u11->readpa_handler().set(FUNC(by17_state::u11_a_r)); m_pia_u11->writepa_handler().set(FUNC(by17_state::u11_a_w)); m_pia_u11->writepb_handler().set(FUNC(by17_state::u11_b_w)); diff --git a/src/mame/pinball/by35.cpp b/src/mame/pinball/by35.cpp index 805a08890af..9a0771c51b7 100644 --- a/src/mame/pinball/by35.cpp +++ b/src/mame/pinball/by35.cpp @@ -1494,7 +1494,7 @@ void by35_state::machine_reset() void by35_state::by35(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 530000); // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz + M6800(config, m_maincpu, XTAL::u(530000)); // No xtal, just 2 chips forming a multivibrator oscillator around 530KHz m_maincpu->set_addrmap(AS_PROGRAM, &by35_state::by35_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // 'F' filled causes Credit Display to be blank on first startup @@ -1506,7 +1506,7 @@ void by35_state::by35(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia_u10, 0); + PIA6821(config, m_pia_u10); m_pia_u10->readpa_handler().set(FUNC(by35_state::u10_a_r)); m_pia_u10->writepa_handler().set(FUNC(by35_state::u10_a_w)); m_pia_u10->readpb_handler().set(FUNC(by35_state::u10_b_r)); @@ -1520,7 +1520,7 @@ void by35_state::by35(machine_config &config) TIMER(config, "timer_z_freq").configure_periodic(FUNC(by35_state::timer_z_freq), attotime::from_hz(100)); // Mains Line Frequency * 2 TIMER(config, m_zero_crossing_active_timer).configure_generic(FUNC(by35_state::timer_z_pulse)); // Active pulse length from Zero Crossing detector - PIA6821(config, m_pia_u11, 0); + PIA6821(config, m_pia_u11); m_pia_u11->readpa_handler().set(FUNC(by35_state::u11_a_r)); m_pia_u11->writepa_handler().set(FUNC(by35_state::u11_a_w)); m_pia_u11->writepb_handler().set(FUNC(by35_state::u11_b_w)); diff --git a/src/mame/pinball/by6803.cpp b/src/mame/pinball/by6803.cpp index 02730b52ab3..151ce0a9ece 100644 --- a/src/mame/pinball/by6803.cpp +++ b/src/mame/pinball/by6803.cpp @@ -504,7 +504,7 @@ void by6803_state::by6803(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpa_handler().set(FUNC(by6803_state::pia0a_r)); m_pia0->writepa_handler().set(FUNC(by6803_state::pia0a_w)); m_pia0->readpb_handler().set(FUNC(by6803_state::pia0b_r)); @@ -515,7 +515,7 @@ void by6803_state::by6803(machine_config &config) m_pia0->irqb_handler().set_inputline("maincpu", M6803_IRQ_LINE); TIMER(config, "timer_z").configure_periodic(FUNC(by6803_state::pia0_timer), attotime::from_hz(120)); // mains freq*2 - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set(FUNC(by6803_state::pia1a_r)); m_pia1->writepa_handler().set(FUNC(by6803_state::pia1a_w)); m_pia1->writepb_handler().set(FUNC(by6803_state::pia1b_w)); @@ -528,7 +528,7 @@ void by6803_state::by6803(machine_config &config) void by6803_state::s11(machine_config &config) { by6803(config); - //WILLIAMS_S11B_SOUND(config, m_s11sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + //WILLIAMS_S11B_SOUND(config, m_s11sound).add_route(ALL_OUTPUTS, "mono", 1.0); } void by6803_state::gen1(machine_config &config) diff --git a/src/mame/pinball/byvid.cpp b/src/mame/pinball/byvid.cpp index 0c4e6295bb2..d6d71e8173d 100644 --- a/src/mame/pinball/byvid.cpp +++ b/src/mame/pinball/byvid.cpp @@ -576,7 +576,7 @@ WRITE_LINE_MEMBER( by133_state::u11_ca2_w ) WRITE_LINE_MEMBER( by133_state::u7_cb2_w ) { // red led - m_beep->set_clock(950); + m_beep->set_clock(XTAL::u(950)); m_beep->set_state(state); m_sound_int_handler(state); } @@ -795,7 +795,7 @@ void by133_state::by133(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - PIA6821(config, m_pia_u7, 0); + PIA6821(config, m_pia_u7); m_pia_u7->readpa_handler().set(FUNC(by133_state::u7_a_r)); m_pia_u7->writepa_handler().set(FUNC(by133_state::u7_a_w)); m_pia_u7->readpb_handler().set(FUNC(by133_state::u7_b_r)); @@ -805,7 +805,7 @@ void by133_state::by133(machine_config &config) m_pia_u7->irqa_handler().set_inputline("videocpu", M6809_FIRQ_LINE); m_pia_u7->irqa_handler().set_inputline("videocpu", M6809_FIRQ_LINE); - PIA6821(config, m_pia_u10, 0); + PIA6821(config, m_pia_u10); m_pia_u10->readpa_handler().set(FUNC(by133_state::u10_a_r)); m_pia_u10->writepa_handler().set(FUNC(by133_state::u10_a_w)); m_pia_u10->readpb_handler().set(FUNC(by133_state::u10_b_r)); @@ -816,7 +816,7 @@ void by133_state::by133(machine_config &config) m_pia_u10->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE); TIMER(config, "babypac1").configure_periodic(FUNC(by133_state::u10_timer), attotime::from_hz(120)); // mains freq*2 - PIA6821(config, m_pia_u11, 0); + PIA6821(config, m_pia_u11); m_pia_u11->readpa_handler().set(FUNC(by133_state::u11_a_r)); m_pia_u11->writepa_handler().set(FUNC(by133_state::u11_a_w)); m_pia_u11->readpb_handler().set(FUNC(by133_state::u11_b_r)); @@ -844,7 +844,7 @@ void by133_state::by133(machine_config &config) m_cheap_squeak->sound_ack_w_handler().set(m_pia_u11, FUNC(pia6821_device::cb2_w)); SPEAKER(config, "beee").front_center(); - BEEP(config, m_beep, 600).add_route(ALL_OUTPUTS, "beee", 0.10); + BEEP(config, m_beep, XTAL::u(600)).add_route(ALL_OUTPUTS, "beee", 0.10); } void by133_state::granny(machine_config &config) diff --git a/src/mame/pinball/capcom.cpp b/src/mame/pinball/capcom.cpp index dbccebb1a2a..701605f86dc 100644 --- a/src/mame/pinball/capcom.cpp +++ b/src/mame/pinball/capcom.cpp @@ -85,7 +85,7 @@ void capcom_state::machine_reset() void capcom_state::capcom(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16670000); // M68306 + M68000(config, m_maincpu, XTAL::u(16670000)); // M68306 m_maincpu->set_addrmap(AS_PROGRAM, &capcom_state::capcom_map); } diff --git a/src/mame/pinball/de_3.cpp b/src/mame/pinball/de_3.cpp index cacbbe01f55..ab62abb5137 100644 --- a/src/mame/pinball/de_3.cpp +++ b/src/mame/pinball/de_3.cpp @@ -526,14 +526,14 @@ void de_3_state::de_3_dmd2(machine_config &config) { de_3(config); DECODMD2(config, m_dmdtype2, 0, "dmdcpu"); - DECOBSMT(config, m_decobsmt, 0); + DECOBSMT(config, m_decobsmt); } void de_3_state::de_3_dmd1(machine_config &config) { de_3(config); DECODMD1(config, m_dmdtype1, 0, "dmdcpu"); - DECOBSMT(config, m_decobsmt, 0); + DECOBSMT(config, m_decobsmt); } void de_3_state::de_3_dmdo(machine_config &config) @@ -561,7 +561,7 @@ void de_3_state::de_3b(machine_config &config) DECODMD3(config, m_dmdtype3, 0, "dmdcpu"); /* sound hardware */ - DECOBSMT(config, m_decobsmt, 0); + DECOBSMT(config, m_decobsmt); } void de_3_state::detest(machine_config &config) diff --git a/src/mame/pinball/decodmd1.cpp b/src/mame/pinball/decodmd1.cpp index 8e325355c75..6845559f4c0 100644 --- a/src/mame/pinball/decodmd1.cpp +++ b/src/mame/pinball/decodmd1.cpp @@ -222,7 +222,7 @@ void decodmd_type1_device::device_add_mconfig(machine_config &config) } -decodmd_type1_device::decodmd_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decodmd_type1_device::decodmd_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECODMD1, tag, owner, clock) , m_cpu(*this, "dmdcpu") , m_rombank1(*this, "dmdbank1") diff --git a/src/mame/pinball/decodmd1.h b/src/mame/pinball/decodmd1.h index 9f885f3ec24..ec8da604fa9 100644 --- a/src/mame/pinball/decodmd1.h +++ b/src/mame/pinball/decodmd1.h @@ -19,13 +19,13 @@ class decodmd_type1_device : public device_t { public: template - decodmd_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gfxregion_tag) + decodmd_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gfxregion_tag) : decodmd_type1_device(mconfig, tag, owner, clock) { set_gfxregion(std::forward(gfxregion_tag)); } - decodmd_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decodmd_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t latch_r(); void data_w(uint8_t data); diff --git a/src/mame/pinball/decodmd2.cpp b/src/mame/pinball/decodmd2.cpp index 2495db21bc1..1e2db07e8df 100644 --- a/src/mame/pinball/decodmd2.cpp +++ b/src/mame/pinball/decodmd2.cpp @@ -134,7 +134,7 @@ void decodmd_type2_device::device_add_mconfig(machine_config &config) config.set_maximum_quantum(attotime::from_hz(60)); - TIMER(config, "firq_timer", 0).configure_periodic(FUNC(decodmd_type2_device::dmd_firq), attotime::from_hz(80)); + TIMER(config, "firq_timer").configure_periodic(FUNC(decodmd_type2_device::dmd_firq), attotime::from_hz(80)); MC6845(config, m_mc6845, XTAL(8'000'000) / 8); // TODO: confirm clock speed m_mc6845->set_screen(nullptr); @@ -151,7 +151,7 @@ void decodmd_type2_device::device_add_mconfig(machine_config &config) } -decodmd_type2_device::decodmd_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decodmd_type2_device::decodmd_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECODMD2, tag, owner, clock) , m_cpu(*this, "dmdcpu") , m_mc6845(*this, "dmd6845") diff --git a/src/mame/pinball/decodmd2.h b/src/mame/pinball/decodmd2.h index 443355d77a2..bd458b10891 100644 --- a/src/mame/pinball/decodmd2.h +++ b/src/mame/pinball/decodmd2.h @@ -19,13 +19,13 @@ class decodmd_type2_device : public device_t { public: template - decodmd_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gfxregion_tag) + decodmd_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gfxregion_tag) : decodmd_type2_device(mconfig, tag, owner, clock) { set_gfxregion(std::forward(gfxregion_tag)); } - decodmd_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decodmd_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void bank_w(uint8_t data); void crtc_address_w(uint8_t data); diff --git a/src/mame/pinball/decodmd3.cpp b/src/mame/pinball/decodmd3.cpp index 98b9a9492fd..97f4e9d0ed6 100644 --- a/src/mame/pinball/decodmd3.cpp +++ b/src/mame/pinball/decodmd3.cpp @@ -135,7 +135,7 @@ void decodmd_type3_device::device_add_mconfig(machine_config &config) config.set_maximum_quantum(attotime::from_hz(60)); - TIMER(config, "irq_timer", 0).configure_periodic(FUNC(decodmd_type3_device::dmd_irq), attotime::from_hz(150)); + TIMER(config, "irq_timer").configure_periodic(FUNC(decodmd_type3_device::dmd_irq), attotime::from_hz(150)); MC6845(config, m_mc6845, XTAL(12'000'000) / 4); // TODO: confirm clock speed m_mc6845->set_screen(nullptr); @@ -152,7 +152,7 @@ void decodmd_type3_device::device_add_mconfig(machine_config &config) } -decodmd_type3_device::decodmd_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decodmd_type3_device::decodmd_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECODMD3, tag, owner, clock) , m_cpu(*this,"dmdcpu") , m_mc6845(*this,"dmd6845") diff --git a/src/mame/pinball/decodmd3.h b/src/mame/pinball/decodmd3.h index 950490055e8..8417cfbd306 100644 --- a/src/mame/pinball/decodmd3.h +++ b/src/mame/pinball/decodmd3.h @@ -19,13 +19,13 @@ class decodmd_type3_device : public device_t { public: template - decodmd_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gfxregion_tag) + decodmd_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gfxregion_tag) : decodmd_type3_device(mconfig, tag, owner, clock) { set_gfxregion(std::forward(gfxregion_tag)); } - decodmd_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decodmd_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_gfxregion(T &&tag) { m_rom.set_tag(std::forward(tag)); } diff --git a/src/mame/pinball/decopincpu.cpp b/src/mame/pinball/decopincpu.cpp index ee86912bc33..ae1395cc60a 100644 --- a/src/mame/pinball/decopincpu.cpp +++ b/src/mame/pinball/decopincpu.cpp @@ -198,13 +198,13 @@ void decocpu_type1_device::device_add_mconfig(machine_config &config) m_cpu->set_addrmap(AS_PROGRAM, &decocpu_type1_device::decocpu1_map); /* Devices */ - PIA6821(config, m_pia21, 0); // 5F - PIA at 0x2100 + PIA6821(config, m_pia21); // 5F - PIA at 0x2100 m_pia21->writepb_handler().set(FUNC(decocpu_type1_device::solenoid1_w)); m_pia21->cb2_handler().set(FUNC(decocpu_type1_device::pia21_cb2_w)); m_pia21->irqa_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); m_pia21->irqb_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); - PIA6821(config, m_pia24, 0); // 11D - PIA at 0x2400 + PIA6821(config, m_pia24); // 11D - PIA at 0x2400 m_pia24->writepa_handler().set(FUNC(decocpu_type1_device::lamp0_w)); m_pia24->writepb_handler().set(FUNC(decocpu_type1_device::lamp1_w)); m_pia24->ca2_handler().set(FUNC(decocpu_type1_device::pia24_ca2_w)); @@ -212,14 +212,14 @@ void decocpu_type1_device::device_add_mconfig(machine_config &config) m_pia24->irqa_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); m_pia24->irqb_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); - PIA6821(config, m_pia28, 0); // 11B - PIA at 0x2800 + PIA6821(config, m_pia28); // 11B - PIA at 0x2800 m_pia28->readpa_handler().set(FUNC(decocpu_type1_device::display_strobe_r)); m_pia28->writepa_handler().set(FUNC(decocpu_type1_device::display_strobe_w)); m_pia28->writepb_handler().set(FUNC(decocpu_type1_device::display_out1_w)); m_pia28->irqa_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); m_pia28->irqb_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); - PIA6821(config, m_pia2c, 0); // 9B - PIA at 0x2c00 + PIA6821(config, m_pia2c); // 9B - PIA at 0x2c00 m_pia2c->readpb_handler().set(FUNC(decocpu_type1_device::display_in3_r)); m_pia2c->writepa_handler().set(FUNC(decocpu_type1_device::display_out2_w)); m_pia2c->writepb_handler().set(FUNC(decocpu_type1_device::display_out3_w)); @@ -228,7 +228,7 @@ void decocpu_type1_device::device_add_mconfig(machine_config &config) m_pia2c->irqa_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); m_pia2c->irqb_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); - PIA6821(config, m_pia30, 0); // 8H - PIA at 0x3000 + PIA6821(config, m_pia30); // 8H - PIA at 0x3000 m_pia30->readpa_handler().set(FUNC(decocpu_type1_device::switch_r)); m_pia30->writepb_handler().set(FUNC(decocpu_type1_device::switch_w)); m_pia30->ca2_handler().set(FUNC(decocpu_type1_device::pia30_ca2_w)); @@ -236,7 +236,7 @@ void decocpu_type1_device::device_add_mconfig(machine_config &config) m_pia30->irqa_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); m_pia30->irqb_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq)); - PIA6821(config, m_pia34, 0); // 7B - PIA at 0x3400 + PIA6821(config, m_pia34); // 7B - PIA at 0x3400 m_pia34->readpa_handler().set(FUNC(decocpu_type1_device::dmdstatus_r)); m_pia34->writepa_handler().set(FUNC(decocpu_type1_device::display_out4_w)); m_pia34->writepb_handler().set(FUNC(decocpu_type1_device::sound_w)); @@ -252,12 +252,12 @@ ioport_constructor decocpu_type1_device::device_input_ports() const return INPUT_PORTS_NAME( decocpu1 ); } -decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : decocpu_type1_device(mconfig, DECOCPU1, tag, owner, clock) { } -decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_cpu(*this,"maincpu") , m_pia21(*this, "pia21") @@ -302,12 +302,12 @@ void decocpu_type1_device::device_start() save_item(NAME(m_lamp_data)); } -decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : decocpu_type2_device(mconfig, DECOCPU2, tag, owner, clock) { } -decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : decocpu_type1_device(mconfig, type, tag, owner, clock) { } @@ -325,12 +325,12 @@ void decocpu_type2_device::device_start() decocpu_type1_device::device_start(); } -decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : decocpu_type3_device(mconfig, DECOCPU3, tag, owner, clock) { } -decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +decocpu_type3_device::decocpu_type3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : decocpu_type2_device(mconfig, type, tag, owner, clock) { } @@ -340,7 +340,7 @@ void decocpu_type3_device::device_start() decocpu_type1_device::device_start(); } -decocpu_type3b_device::decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +decocpu_type3b_device::decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : decocpu_type3_device(mconfig, DECOCPU3B, tag, owner, clock) { } diff --git a/src/mame/pinball/decopincpu.h b/src/mame/pinball/decopincpu.h index e74a0fe06a2..634eb149b56 100644 --- a/src/mame/pinball/decopincpu.h +++ b/src/mame/pinball/decopincpu.h @@ -29,13 +29,13 @@ class decocpu_type1_device : public device_t { public: template - decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpuregion_tag) + decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpuregion_tag) : decocpu_type1_device(mconfig, tag, owner, clock) { set_cpuregion(std::forward(cpuregion_tag)); } - decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + decocpu_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto display_read_callback() { return m_read_display.bind(); } @@ -54,7 +54,7 @@ public: protected: void solenoid0_w(u8 data); - decocpu_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + decocpu_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // overrides virtual void device_add_mconfig(machine_config &config) override; @@ -119,17 +119,17 @@ class decocpu_type2_device : public decocpu_type1_device { public: template - decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpuregion_tag) + decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpuregion_tag) : decocpu_type2_device(mconfig, tag, owner, clock) { set_cpuregion(std::forward(cpuregion_tag)); } - decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void decocpu2_map(address_map &map); protected: - decocpu_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + decocpu_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // overrides virtual void device_add_mconfig(machine_config &config) override; @@ -140,16 +140,16 @@ class decocpu_type3_device : public decocpu_type2_device { public: template - decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpuregion_tag) + decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpuregion_tag) : decocpu_type3_device(mconfig, tag, owner, clock) { set_cpuregion(std::forward(cpuregion_tag)); } - decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + decocpu_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - decocpu_type3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + decocpu_type3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // overrides virtual void device_start() override; @@ -159,13 +159,13 @@ class decocpu_type3b_device : public decocpu_type3_device { public: template - decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpuregion_tag) + decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpuregion_tag) : decocpu_type3b_device(mconfig, tag, owner, clock) { set_cpuregion(std::forward(cpuregion_tag)); } - decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + decocpu_type3b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // overrides diff --git a/src/mame/pinball/gp_1.cpp b/src/mame/pinball/gp_1.cpp index 289d5a26436..9a69dfda99b 100644 --- a/src/mame/pinball/gp_1.cpp +++ b/src/mame/pinball/gp_1.cpp @@ -462,7 +462,7 @@ static const z80_daisy_config daisy_chain[] = void gp_1_state::gp_1(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2457600); + Z80(config, m_maincpu, XTAL::u(2457600)); m_maincpu->set_addrmap(AS_PROGRAM, &gp_1_state::mem_map); m_maincpu->set_addrmap(AS_IO, &gp_1_state::io_map); m_maincpu->set_daisy_config(daisy_chain); @@ -481,10 +481,10 @@ void gp_1_state::gp_1(machine_config &config) m_ppi->in_pb_callback().set(FUNC(gp_1_state::portb_r)); m_ppi->out_pc_callback().set(FUNC(gp_1_state::portc_w)); - Z80CTC(config, m_ctc, 2457600); + Z80CTC(config, m_ctc, XTAL::u(2457600)); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); // Todo: absence of ints will cause a watchdog reset - clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", 120)); // crosspoint detector + clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", XTAL::u(120))); // crosspoint detector cpoint_clock.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg2)); } diff --git a/src/mame/pinball/gp_2.cpp b/src/mame/pinball/gp_2.cpp index e505906f721..92cc847ca0f 100644 --- a/src/mame/pinball/gp_2.cpp +++ b/src/mame/pinball/gp_2.cpp @@ -559,7 +559,7 @@ static const z80_daisy_config daisy_chain[] = void gp_2_state::gp_2(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2457600); + Z80(config, m_maincpu, XTAL::u(2457600)); m_maincpu->set_addrmap(AS_PROGRAM, &gp_2_state::mem_map); m_maincpu->set_addrmap(AS_IO, &gp_2_state::io_map); m_maincpu->set_daisy_config(daisy_chain); @@ -578,10 +578,10 @@ void gp_2_state::gp_2(machine_config &config) m_ppi->in_pb_callback().set(FUNC(gp_2_state::portb_r)); m_ppi->out_pc_callback().set(FUNC(gp_2_state::portc_w)); - Z80CTC(config, m_ctc, 2457600); + Z80CTC(config, m_ctc, XTAL::u(2457600)); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); // Todo: absence of ints will cause a watchdog reset - clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", 120)); // crosspoint detector + clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", XTAL::u(120))); // crosspoint detector cpoint_clock.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg2)); } diff --git a/src/mame/pinball/gts1.cpp b/src/mame/pinball/gts1.cpp index a5834c86dbe..44da9d89d82 100644 --- a/src/mame/pinball/gts1.cpp +++ b/src/mame/pinball/gts1.cpp @@ -442,7 +442,7 @@ void gts1_state::gts1_solenoid_w(offs_t offset, u8 data) case 2: // tens chime if (m_p1_sound) { - m_p1_sound->set_clock(593); + m_p1_sound->set_clock(XTAL::u(593)); m_p1_sound->set_state(data); } else @@ -455,7 +455,7 @@ void gts1_state::gts1_solenoid_w(offs_t offset, u8 data) case 3: // hundreds chime if (m_p1_sound) { - m_p1_sound->set_clock(265); + m_p1_sound->set_clock(XTAL::u(265)); m_p1_sound->set_state(data); } else @@ -468,7 +468,7 @@ void gts1_state::gts1_solenoid_w(offs_t offset, u8 data) case 4: // thousands chime if (m_p1_sound) { - m_p1_sound->set_clock(153); + m_p1_sound->set_clock(XTAL::u(153)); m_p1_sound->set_state(data); } else @@ -751,24 +751,24 @@ void gts1_state::p0(machine_config & config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* A1753CE 2048 x 8 ROM (000-7ff), 128 x 4 RAM (00-7f) and 16 I/O lines (20 ... 2f) */ - ra17xx_device &u5(RA17XX(config, "u5", 0)); + ra17xx_device &u5(RA17XX(config, "u5")); u5.iord_cb().set(FUNC(gts1_state::gts1_switches_r)); u5.iowr_cb().set(FUNC(gts1_state::gts1_switches_w)); u5.set_cpu_tag(m_maincpu); /* A1752CF 2048 x 8 ROM (800-fff), 128 x 4 RAM (80-ff) and 16 I/O lines (40 ... 4f) */ - ra17xx_device &u4(RA17XX(config, "u4", 0)); + ra17xx_device &u4(RA17XX(config, "u4")); u4.iord_cb().set(FUNC(gts1_state::gts1_solenoid_r)); u4.iowr_cb().set(FUNC(gts1_state::gts1_solenoid_w)); u4.set_cpu_tag(m_maincpu); /* 10696 General Purpose Input/Output */ - r10696_device &u2(R10696(config, "u2", 0)); + r10696_device &u2(R10696(config, "u2")); u2.iord_cb().set(FUNC(gts1_state::gts1_nvram_r)); u2.iowr_cb().set(FUNC(gts1_state::gts1_nvram_w)); /* 10696 General Purpose Input/Output */ - r10696_device &u3(R10696(config, "u3", 0)); + r10696_device &u3(R10696(config, "u3")); u3.iord_cb().set(FUNC(gts1_state::gts1_lamp_apm_r)); u3.iowr_cb().set(FUNC(gts1_state::gts1_lamp_apm_w)); @@ -787,14 +787,14 @@ void gts1_state::p1(machine_config &config) { p0(config); SPEAKER(config, "mono").front_center(); - BEEP(config, m_p1_sound, 387).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_p1_sound, XTAL::u(387)).add_route(ALL_OUTPUTS, "mono", 0.50); } void gts1_state::p2(machine_config &config) { p0(config); SPEAKER(config, "mono").front_center(); - GOTTLIEB_SOUND_PIN2(config, m_p2_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + GOTTLIEB_SOUND_PIN2(config, m_p2_sound).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/pinball/gts3.cpp b/src/mame/pinball/gts3.cpp index e37fdcc61e2..983c0c9eb96 100644 --- a/src/mame/pinball/gts3.cpp +++ b/src/mame/pinball/gts3.cpp @@ -378,13 +378,13 @@ void gts3_state::p0(machine_config &config) void gts3_state::p5(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN5(config, m_p5_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_PIN5(config, m_p5_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } void gts3_state::p7(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN7(config, m_p7_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_PIN7(config, m_p7_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } diff --git a/src/mame/pinball/gts3a.cpp b/src/mame/pinball/gts3a.cpp index 224bec81a13..2a5cd53ccd3 100644 --- a/src/mame/pinball/gts3a.cpp +++ b/src/mame/pinball/gts3a.cpp @@ -480,7 +480,7 @@ void gts3a_state::p0(machine_config &config) void gts3a_state::p7(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN7(config, m_p7_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_PIN7(config, m_p7_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } diff --git a/src/mame/pinball/gts80.cpp b/src/mame/pinball/gts80.cpp index 4beb35466df..4eba7b7c5d6 100644 --- a/src/mame/pinball/gts80.cpp +++ b/src/mame/pinball/gts80.cpp @@ -537,19 +537,19 @@ void gts80_state::p0(machine_config &config) void gts80_state::p2(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN2(config, m_p2_sound, 0).add_route(ALL_OUTPUTS, "mono", 0.75); + GOTTLIEB_SOUND_PIN2(config, m_p2_sound).add_route(ALL_OUTPUTS, "mono", 0.75); } void gts80_state::r1(machine_config &config) { p0(config); - GOTTLIEB_SOUND_REV1(config, m_r1_sound, 0).add_route(ALL_OUTPUTS, "mono", 0.75); + GOTTLIEB_SOUND_REV1(config, m_r1_sound).add_route(ALL_OUTPUTS, "mono", 0.75); } void gts80_state::r1v(machine_config &config) { p0(config); - GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound, 0).add_route(ALL_OUTPUTS, "mono", 0.75); + GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound).add_route(ALL_OUTPUTS, "mono", 0.75); } /* SYSTEM-80 ALTERNATE ROMS ======================================================================= diff --git a/src/mame/pinball/gts80a.cpp b/src/mame/pinball/gts80a.cpp index c0e8ce0ee16..9b0ac374862 100644 --- a/src/mame/pinball/gts80a.cpp +++ b/src/mame/pinball/gts80a.cpp @@ -558,25 +558,25 @@ void gts80a_state::p0(machine_config &config) void gts80a_state::p2(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN2(config, m_p2_sound, 0).add_route(ALL_OUTPUTS, "mono", 0.75); + GOTTLIEB_SOUND_PIN2(config, m_p2_sound).add_route(ALL_OUTPUTS, "mono", 0.75); } void gts80a_state::p3(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN3(config, m_p3_sound, 0).add_route(ALL_OUTPUTS, "mono", 0.75); + GOTTLIEB_SOUND_PIN3(config, m_p3_sound).add_route(ALL_OUTPUTS, "mono", 0.75); } void gts80a_state::r1(machine_config &config) { p0(config); - GOTTLIEB_SOUND_REV1(config, m_r1_sound, 0).add_route(ALL_OUTPUTS, "mono", 0.75); + GOTTLIEB_SOUND_REV1(config, m_r1_sound).add_route(ALL_OUTPUTS, "mono", 0.75); } void gts80a_state::r1v(machine_config &config) { p0(config); - GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound, 0).add_route(ALL_OUTPUTS, "mono", 0.75); + GOTTLIEB_SOUND_REV1_VOTRAX(config, m_r1_sound).add_route(ALL_OUTPUTS, "mono", 0.75); } //******************* CAVEMAN **************************************************************** @@ -645,7 +645,7 @@ void caveman_state::video_io_map(address_map &map) void caveman_state::caveman(machine_config &config) { r1v(config); - I8088(config, m_videocpu, 5000000); + I8088(config, m_videocpu, XTAL::u(5000000)); m_videocpu->set_addrmap(AS_PROGRAM, &caveman_state::video_map); m_videocpu->set_addrmap(AS_IO, &caveman_state::video_io_map); diff --git a/src/mame/pinball/gts80b.cpp b/src/mame/pinball/gts80b.cpp index f8e11ea5230..2cc0d4a7162 100644 --- a/src/mame/pinball/gts80b.cpp +++ b/src/mame/pinball/gts80b.cpp @@ -638,31 +638,31 @@ void gts80b_state::p0(machine_config &config) void gts80b_state::p3(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN3(config, m_p3_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_PIN3(config, m_p3_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } void gts80b_state::p4(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN4(config, m_p4_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_PIN4(config, m_p4_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } void gts80b_state::p5(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN5(config, m_p5_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_PIN5(config, m_p5_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } void gts80b_state::p6(machine_config &config) { p0(config); - GOTTLIEB_SOUND_PIN6(config, m_p6_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_PIN6(config, m_p6_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } void gts80b_state::r2(machine_config &config) { p0(config); - GOTTLIEB_SOUND_REV2(config, m_r2_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + GOTTLIEB_SOUND_REV2(config, m_r2_sound).add_route(ALL_OUTPUTS, "mono", 1.00); } void gts80b_state::master(machine_config &config) diff --git a/src/mame/pinball/hankin.cpp b/src/mame/pinball/hankin.cpp index dcb68d89718..f37e621dbb9 100644 --- a/src/mame/pinball/hankin.cpp +++ b/src/mame/pinball/hankin.cpp @@ -519,10 +519,10 @@ WRITE_LINE_MEMBER( hankin_state::ic2_cb2_w ) void hankin_state::hankin(machine_config &config) { /* basic machine hardware */ - M6802(config, m_maincpu, 3276800); + M6802(config, m_maincpu, XTAL::u(3276800)); m_maincpu->set_addrmap(AS_PROGRAM, &hankin_state::main_map); - M6802(config, m_audiocpu, 3276800); // guess, xtal value not shown + M6802(config, m_audiocpu, XTAL::u(3276800)); // guess, xtal value not shown m_audiocpu->set_addrmap(AS_PROGRAM, &hankin_state::audio_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -534,10 +534,10 @@ void hankin_state::hankin(machine_config &config) genpin_audio(config); SPEAKER(config, "speaker").front_center(); - DAC_4BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_4BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC /* Devices */ - PIA6821(config, m_ic10, 0); + PIA6821(config, m_ic10); //m_ic10->readpa_handler().set(FUNC(hankin_state::ic10_a_r)); m_ic10->writepa_handler().set(FUNC(hankin_state::ic10_a_w)); //m_ic10->readpb_handler().set(FUNC(hankin_state::ic10_b_r)); @@ -547,7 +547,7 @@ void hankin_state::hankin(machine_config &config) m_ic10->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_ic10->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_ic11, 0); + PIA6821(config, m_ic11); //m_ic11->readpa_handler().set(FUNC(hankin_state::ic11_a_r)); m_ic11->writepa_handler().set(FUNC(hankin_state::ic11_a_w)); m_ic11->readpb_handler().set(FUNC(hankin_state::ic11_b_r)); @@ -557,7 +557,7 @@ void hankin_state::hankin(machine_config &config) m_ic11->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); m_ic11->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<3>)); - PIA6821(config, m_ic2, 0); + PIA6821(config, m_ic2); m_ic2->readpa_handler().set(FUNC(hankin_state::ic2_a_r)); m_ic2->writepa_handler().set(FUNC(hankin_state::ic2_a_w)); //m_ic2->readpb_handler().set(FUNC(hankin_state::ic2_b_r)); @@ -567,7 +567,7 @@ void hankin_state::hankin(machine_config &config) m_ic2->irqa_handler().set("audioirq", FUNC(input_merger_device::in_w<0>)); m_ic2->irqb_handler().set("audioirq", FUNC(input_merger_device::in_w<1>)); - clock_device &irqclock(CLOCK(config, "irqclock", 100)); + clock_device &irqclock(CLOCK(config, "irqclock", XTAL::u(100))); irqclock.signal_handler().set(FUNC(hankin_state::clock_w)); TIMER(config, "timer_s").configure_periodic(FUNC(hankin_state::timer_s), attotime::from_hz(94000)); // 555 on sound board*2 diff --git a/src/mame/pinball/icecold.cpp b/src/mame/pinball/icecold.cpp index a2913d1056a..16c04179736 100644 --- a/src/mame/pinball/icecold.cpp +++ b/src/mame/pinball/icecold.cpp @@ -379,20 +379,20 @@ void icecold_state::icecold(machine_config &config) MC6809E(config, m_maincpu, XTAL(6'000'000)/4); // 68A09E m_maincpu->set_addrmap(AS_PROGRAM, &icecold_state::icecold_map); - pia6821_device &pia0(PIA6821(config, "pia0", 0)); + pia6821_device &pia0(PIA6821(config, "pia0")); pia0.readpa_handler().set_ioport("JOY"); pia0.readpb_handler().set_ioport("DSW3"); pia0.irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); pia0.irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set(FUNC(icecold_state::ay_r)); m_pia1->writepa_handler().set(FUNC(icecold_state::ay_w)); m_pia1->writepb_handler().set(FUNC(icecold_state::snd_ctrl_w)); m_pia1->irqa_handler().set_inputline("maincpu", M6809_FIRQ_LINE); m_pia1->irqb_handler().set_inputline("maincpu", M6809_FIRQ_LINE); - pia6821_device &pia2(PIA6821(config, "pia2", 0)); + pia6821_device &pia2(PIA6821(config, "pia2")); pia2.irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); pia2.irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); @@ -403,10 +403,10 @@ void icecold_state::icecold(machine_config &config) kbdc.in_rl_callback().set(FUNC(icecold_state::kbd_r)); // kbd RL lines // 30Hz signal from CH-C of ay0 - TIMER(config, "sint_timer", 0).configure_periodic(FUNC(icecold_state::icecold_sint_timer), attotime::from_hz(30)); + TIMER(config, "sint_timer").configure_periodic(FUNC(icecold_state::icecold_sint_timer), attotime::from_hz(30)); // for update motors position - TIMER(config, "motors_timer", 0).configure_periodic(FUNC(icecold_state::icecold_motors_timer), attotime::from_msec(50)); + TIMER(config, "motors_timer").configure_periodic(FUNC(icecold_state::icecold_motors_timer), attotime::from_msec(50)); // video hardware config.set_default_layout(layout_icecold); diff --git a/src/mame/pinball/idsa.cpp b/src/mame/pinball/idsa.cpp index 675a23c30db..3415730d943 100644 --- a/src/mame/pinball/idsa.cpp +++ b/src/mame/pinball/idsa.cpp @@ -358,15 +358,15 @@ void idsa_state::idsa(machine_config &config) genpin_audio(config); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - SP0256(config, m_speech, 3120000); // unknown variant + SP0256(config, m_speech, XTAL::u(3120000)); // unknown variant m_speech->add_route(ALL_OUTPUTS, "lspeaker", 1.5); - ay8910_device &aysnd1(AY8910(config, "aysnd1", 2000000)); // 2Mhz according to pinmame, schematic omits the clock line + ay8910_device &aysnd1(AY8910(config, "aysnd1", XTAL::u(2000000))); // 2Mhz according to pinmame, schematic omits the clock line aysnd1.port_a_write_callback().set(FUNC(idsa_state::ay1_a_w)); aysnd1.port_b_write_callback().set(FUNC(idsa_state::ay1_b_w)); aysnd1.add_route(ALL_OUTPUTS, "lspeaker", 0.75); - ay8910_device &aysnd2(AY8910(config, "aysnd2", 2000000)); + ay8910_device &aysnd2(AY8910(config, "aysnd2", XTAL::u(2000000))); aysnd2.port_a_write_callback().set(FUNC(idsa_state::ay2_a_w)); aysnd2.port_b_write_callback().set(FUNC(idsa_state::ay2_b_w)); aysnd2.add_route(ALL_OUTPUTS, "rspeaker", 0.75); diff --git a/src/mame/pinball/inder.cpp b/src/mame/pinball/inder.cpp index d812b190222..75a297fdbe3 100644 --- a/src/mame/pinball/inder.cpp +++ b/src/mame/pinball/inder.cpp @@ -1495,16 +1495,16 @@ void inder_state::inder(machine_config &config) ppi.in_pc_callback().set(FUNC(inder_state::ppic_r)); ppi.out_pc_callback().set(FUNC(inder_state::ppic_w)); - TTL7474(config, m_7a, 0); + TTL7474(config, m_7a); m_7a->comp_output_cb().set(FUNC(inder_state::qc7a_w)); - TTL7474(config, m_9a, 0); // HCT74 + TTL7474(config, m_9a); // HCT74 m_9a->output_cb().set(FUNC(inder_state::q9a_w)); - TTL7474(config, m_9b, 0); // HCT74 + TTL7474(config, m_9b); // HCT74 m_9b->comp_output_cb().set(FUNC(inder_state::qc9b_w)); - HCT157(config, m_13, 0); + HCT157(config, m_13); m_13->out_callback().set("msm", FUNC(msm5205_device::data_w)); } diff --git a/src/mame/pinball/inderp.cpp b/src/mame/pinball/inderp.cpp index cb2238360d1..b8275466214 100644 --- a/src/mame/pinball/inderp.cpp +++ b/src/mame/pinball/inderp.cpp @@ -336,10 +336,10 @@ void inderp_state::init_1player() void inderp_state::inderp(machine_config &config) { /* basic machine hardware */ - M6504(config, m_maincpu, 2000000); // need to be measured + M6504(config, m_maincpu, XTAL::u(2000000)); // need to be measured m_maincpu->set_addrmap(AS_PROGRAM, &inderp_state::mem_map); - clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", 200)); // crosspoint detector + clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", XTAL::u(200))); // crosspoint detector cpoint_clock.signal_handler().set(FUNC(inderp_state::clock_tick)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/pinball/jeutel.cpp b/src/mame/pinball/jeutel.cpp index de7894fdfc8..6b076586634 100644 --- a/src/mame/pinball/jeutel.cpp +++ b/src/mame/pinball/jeutel.cpp @@ -468,13 +468,13 @@ void jeutel_state::jeutel(machine_config &config) aysnd.port_b_read_callback().set(FUNC(jeutel_state::portb_r)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.8); - TMS5110A(config, m_tms, 640000); + TMS5110A(config, m_tms, XTAL::u(640000)); m_tms->m0().set(FUNC(jeutel_state::tminc_w)); m_tms->data().set(FUNC(jeutel_state::tmdata_r)); //m_tms->irq().set_inputline(m_audiocpu, INPUT_LINE_IRQ0); // emulation doesn't support INT pin m_tms->add_route(ALL_OUTPUTS, "mono", 1.0); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.5); // NE5018 + MC1408(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.5); // NE5018 /* Devices */ I8255A(config, m_ppi[0]); // IC31 @@ -501,7 +501,7 @@ void jeutel_state::jeutel(machine_config &config) //m_ppi[2]->in_pc_callback().set(FUNC(jeutel_state::ppi2c_r)); m_ppi[2]->out_pc_callback().set(FUNC(jeutel_state::ppi2c_w)); - CLOCK(config, "rclock", 2000).signal_handler().set(FUNC(jeutel_state::clock_w)); + CLOCK(config, "rclock", XTAL::u(2000)).signal_handler().set(FUNC(jeutel_state::clock_w)); } } // Anonymous namespace diff --git a/src/mame/pinball/joctronic.cpp b/src/mame/pinball/joctronic.cpp index 617a9a87f85..b43090686a7 100644 --- a/src/mame/pinball/joctronic.cpp +++ b/src/mame/pinball/joctronic.cpp @@ -370,10 +370,10 @@ void joctronic_state::joctronic(machine_config &config) ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); ctc.zc_callback<0>().set_inputline(m_soundcpu, INPUT_LINE_IRQ0, ASSERT_LINE); //SINT - LS259(config, "drivers1", 0); // IC4 - LS259(config, "drivers2", 0); // IC3 - LS259(config, "drivers3", 0); // IC2 - LS259(config, "drivers4", 0); // IC1 + LS259(config, "drivers1"); // IC4 + LS259(config, "drivers2"); // IC3 + LS259(config, "drivers3"); // IC2 + LS259(config, "drivers4"); // IC1 // Sound hardware SPEAKER(config, "mono").front_center(); @@ -386,8 +386,8 @@ void joctronic_state::joctronic(machine_config &config) AY8910(config, "aysnd2", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.40); // 1.5 MHz - DAC_8BIT_R2R(config, "r2r1", 0).add_route(ALL_OUTPUTS, "mono", 0.30); - DAC_8BIT_R2R(config, "r2r2", 0).add_route(ALL_OUTPUTS, "mono", 0.30); + DAC_8BIT_R2R(config, "r2r1").add_route(ALL_OUTPUTS, "mono", 0.30); + DAC_8BIT_R2R(config, "r2r2").add_route(ALL_OUTPUTS, "mono", 0.30); } void joctronic_state::slalom03(machine_config &config) @@ -413,12 +413,12 @@ void joctronic_state::slalom03(machine_config &config) ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); //ctc.zc_callback<0>().set_inputline(m_soundcpu, INPUT_LINE_IRQ0, ASSERT_LINE); //SINT - HC259(config, "drivers1", 0); // IC1 - HC259(config, "drivers2", 0); // IC2 - HC259(config, "drivers3", 0); // IC3 - HC259(config, "drivers4", 0); // IC4 - HC259(config, "drivers5", 0); // IC5 - HC259(config, "drivers6", 0); // IC6 + HC259(config, "drivers1"); // IC1 + HC259(config, "drivers2"); // IC2 + HC259(config, "drivers3"); // IC3 + HC259(config, "drivers4"); // IC4 + HC259(config, "drivers5"); // IC5 + HC259(config, "drivers6"); // IC6 // Sound hardware SPEAKER(config, "mono").front_center(); @@ -432,9 +432,9 @@ void joctronic_state::slalom03(machine_config &config) aysnd2.port_a_write_callback().set("r2r", FUNC(dac_8bit_r2r_device::data_w)); aysnd2.add_route(ALL_OUTPUTS, "mono", 0.40); - DAC_8BIT_R2R(config, "r2r", 0).add_route(ALL_OUTPUTS, "mono", 0.30); + DAC_8BIT_R2R(config, "r2r").add_route(ALL_OUTPUTS, "mono", 0.30); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("oki", FUNC(msm5205_device::data_w)); MSM5205(config, m_oki, XTAL(12'000'000)/2/16); // 375 kHz diff --git a/src/mame/pinball/jp.cpp b/src/mame/pinball/jp.cpp index 75ba745abe8..d26154475a9 100644 --- a/src/mame/pinball/jp.cpp +++ b/src/mame/pinball/jp.cpp @@ -485,11 +485,11 @@ void jp_state::jps(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &jp_state::audio_map); m_audiocpu->set_irq_acknowledge_callback(FUNC(jp_state::sound_int_cb)); - LS157(config, m_adpcm_select, 0); // not labeled in manual; might even be a CD4019 + LS157(config, m_adpcm_select); // not labeled in manual; might even be a CD4019 m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); SPEAKER(config, "msmvol").front_center(); - MSM5205(config, m_msm, 384'000); // not labeled in manual; clock unknown + MSM5205(config, m_msm, XTAL::u(384'000)); // not labeled in manual; clock unknown m_msm->vck_callback().set(FUNC(jp_state::vck_w)); m_msm->set_prescaler_selector(msm5205_device::S48_4B); // unknown m_msm->add_route(ALL_OUTPUTS, "msmvol", 1.0); diff --git a/src/mame/pinball/jvh.cpp b/src/mame/pinball/jvh.cpp index 5b0e3f31a89..2520d961910 100644 --- a/src/mame/pinball/jvh.cpp +++ b/src/mame/pinball/jvh.cpp @@ -150,7 +150,7 @@ void jvh_state::machine_reset() void jvh_state::common(machine_config &config) { // CPU TMS9980A; no line connections - TMS9980A(config, m_maincpu, 10000000); + TMS9980A(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &jvh_state::main_map); m6802_cpu_device &audiocpu(M6802(config, "audiocpu", XTAL(4'000'000))); @@ -180,11 +180,11 @@ void jvh_state::jvh2(machine_config &config) void jvh_state::jvh3(machine_config &config) { - TMS9995(config, m_maincpu, 12000000); + TMS9995(config, m_maincpu, XTAL::u(12000000)); - M6809(config, "audiocpu", 2000000); + M6809(config, "audiocpu", XTAL::u(2000000)); - M6809(config, "audiocpu2", 2000000); + M6809(config, "audiocpu2", XTAL::u(2000000)); // YM2203, YM3812, DAC diff --git a/src/mame/pinball/kissproto.cpp b/src/mame/pinball/kissproto.cpp index 4046383b6fc..c4910eb7583 100644 --- a/src/mame/pinball/kissproto.cpp +++ b/src/mame/pinball/kissproto.cpp @@ -58,7 +58,7 @@ void kissp_state::init_kissp() void kissp_state::kissp(machine_config &config) { /* basic machine hardware */ - I8035(config, m_maincpu, 6000000); + I8035(config, m_maincpu, XTAL::u(6000000)); m_maincpu->set_addrmap(AS_PROGRAM, &kissp_state::mem_map); m_maincpu->set_addrmap(AS_IO, &kissp_state::io_map); } diff --git a/src/mame/pinball/lancelot.cpp b/src/mame/pinball/lancelot.cpp index 64a5239497c..32b762b7eea 100644 --- a/src/mame/pinball/lancelot.cpp +++ b/src/mame/pinball/lancelot.cpp @@ -185,7 +185,7 @@ void lancelot_state::lancelot(machine_config &config) SPEAKER(config, "lspeaker").front_left(); // YAC512 left SPEAKER(config, "rspeaker").front_right(); // YAC512 right - ymf262_device &ymf(YMF262(config, "ymf", 14'318'180)); + ymf262_device &ymf(YMF262(config, "ymf", XTAL::u(14'318'180))); ymf.irq_handler().set_inputline("audiocpu", 2); // to P82/INT2 of the audio cpu ymf.add_route(0, "lspeaker", 0.50); ymf.add_route(1, "rspeaker", 0.50); diff --git a/src/mame/pinball/lckydraw.cpp b/src/mame/pinball/lckydraw.cpp index 2b7de735c3f..c1ab5426d6f 100644 --- a/src/mame/pinball/lckydraw.cpp +++ b/src/mame/pinball/lckydraw.cpp @@ -393,7 +393,7 @@ void lckydraw_state::machine_reset() void lckydraw_state::lckydraw(machine_config &config) { /* basic machine hardware */ - I8035(config, m_maincpu, 6000000); + I8035(config, m_maincpu, XTAL::u(6000000)); m_maincpu->set_addrmap(AS_PROGRAM, &lckydraw_state::mem_map); m_maincpu->set_addrmap(AS_IO, &lckydraw_state::io_map); m_maincpu->p1_out_cb().set(FUNC(lckydraw_state::p1_w)); diff --git a/src/mame/pinball/ltd.cpp b/src/mame/pinball/ltd.cpp index 8c96347dc2f..5a7a137ead5 100644 --- a/src/mame/pinball/ltd.cpp +++ b/src/mame/pinball/ltd.cpp @@ -561,7 +561,7 @@ void ltd3_state::ltd3(machine_config &config) genpin_audio(config); SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); - CLOCK(config, m_monotone, 0); + CLOCK(config, m_monotone); m_monotone->signal_handler().set("snd", FUNC(input_merger_device::in_w<0>)); AY8910(config, "ay0", XTAL(3'579'545)/2).add_route(ALL_OUTPUTS, "mono", 0.75); /* guess */ AY8910(config, "ay1", XTAL(3'579'545)/2).add_route(ALL_OUTPUTS, "mono", 0.75); /* guess */ @@ -574,7 +574,7 @@ void ltd3_state::ltd3(machine_config &config) m_snd_pulse->set_clear_pin_value(1); // nc m_snd_pulse->out_cb().set("snd", FUNC(input_merger_device::in_w<1>)); - clock_device &irq_clock(CLOCK(config, "irq_clock", 1765)); // 680 ohm, 1uF, U117 + clock_device &irq_clock(CLOCK(config, "irq_clock", XTAL::u(1765))); // 680 ohm, 1uF, U117 irq_clock.signal_handler().set(m_irq_pulse, FUNC(ttl74123_device::a_w)); INPUT_MERGER_ALL_HIGH(config, "snd").output_handler().set("speaker", FUNC(speaker_sound_device::level_w)); diff --git a/src/mame/pinball/macp.cpp b/src/mame/pinball/macp.cpp index 696aea46ed6..e7b1cf803ef 100644 --- a/src/mame/pinball/macp.cpp +++ b/src/mame/pinball/macp.cpp @@ -340,11 +340,11 @@ void macp_state::machine_reset() void macp_state::mac16k(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3'800'000); + Z80(config, m_maincpu, XTAL::u(3'800'000)); m_maincpu->set_addrmap(AS_PROGRAM, &macp_state::mem16k_map); m_maincpu->set_addrmap(AS_IO, &macp_state::io16k_map); - clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", 50)); // crosspoint detector + clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", XTAL::u(50))); // crosspoint detector cpoint_clock.signal_handler().set(FUNC(macp_state::clock_tick)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -353,7 +353,7 @@ void macp_state::mac16k(machine_config &config) config.set_default_layout(layout_macp); //I8279 - i8279_device &kbdc(I8279(config, "i8279", 3'800'000)); // based on divider + i8279_device &kbdc(I8279(config, "i8279", XTAL::u(3'800'000))); // based on divider kbdc.out_sl_callback().set(FUNC(macp_state::scanlines_w)); // scan SL lines kbdc.out_disp_callback().set(FUNC(macp_state::digit_w)); // display A&B kbdc.in_rl_callback().set(FUNC(macp_state::kbd_r)); // kbd RL lines diff --git a/src/mame/pinball/mephistp.cpp b/src/mame/pinball/mephistp.cpp index 68041ae03d4..73f7e867a82 100644 --- a/src/mame/pinball/mephistp.cpp +++ b/src/mame/pinball/mephistp.cpp @@ -247,7 +247,7 @@ void mephisto_state::mephisto(machine_config &config) m_aysnd->port_b_read_callback().set(FUNC(mephisto_state::ay8910_inputs_r)); m_aysnd->add_route(ALL_OUTPUTS, "mono", 0.5); - DAC08(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.5); + DAC08(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.5); } diff --git a/src/mame/pinball/micropin.cpp b/src/mame/pinball/micropin.cpp index a14b38208b8..a7262778209 100644 --- a/src/mame/pinball/micropin.cpp +++ b/src/mame/pinball/micropin.cpp @@ -489,15 +489,15 @@ void pent6800_state::pent6800(machine_config &config) /* Sound */ genpin_audio(config); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 387).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beep, XTAL::u(387)).add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - pia6821_device &pia50(PIA6821(config, "pia50", 0)); + pia6821_device &pia50(PIA6821(config, "pia50")); pia50.writepa_handler().set(FUNC(pent6800_state::p50a_w)); pia50.writepb_handler().set(FUNC(pent6800_state::p50b_w)); pia50.ca2_handler().set(FUNC(pent6800_state::p50ca2_w)); - PIA6821(config, m_pia51, 0); + PIA6821(config, m_pia51); m_pia51->writepa_handler().set(FUNC(pent6800_state::p51a_w)); m_pia51->readpb_handler().set(FUNC(pent6800_state::p51b_r)); m_pia51->writepb_handler().set(FUNC(pent6800_state::p51b_w)); @@ -510,11 +510,11 @@ void pent6800_state::pent6800(machine_config &config) void pent8085_state::pent8085(machine_config &config) { /* basic machine hardware */ - I8085A(config, m_v2cpu, 2000000); + I8085A(config, m_v2cpu, XTAL::u(2000000)); m_v2cpu->set_addrmap(AS_PROGRAM, &pent8085_state::mem_map); m_v2cpu->set_addrmap(AS_IO, &pent8085_state::io_map); - clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", 50)); // crosspoint detector + clock_device &cpoint_clock(CLOCK(config, "cpoint_clock", XTAL::u(50))); // crosspoint detector cpoint_clock.signal_handler().set(FUNC(pent8085_state::clock_w)); config.set_default_layout(layout_micropin); // wrong layout diff --git a/src/mame/pinball/missamer.cpp b/src/mame/pinball/missamer.cpp index 73c04ef3464..51a7fec57e9 100644 --- a/src/mame/pinball/missamer.cpp +++ b/src/mame/pinball/missamer.cpp @@ -513,24 +513,24 @@ void missamer_state::missamer(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &missamer_state::mem_map); m_maincpu->set_clk_out(m_ramio[1], FUNC(i8155_device::set_unscaled_clock_int)); - clock_device &vco_clock(CLOCK(config, "vco_clock", 500)); // 74LS124 + clock_device &vco_clock(CLOCK(config, "vco_clock", XTAL::u(500))); // 74LS124 vco_clock.signal_handler().set_inputline(m_maincpu, I8085_RST75_LINE); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - I8155(config, m_ramio[0], 500); // VCO (470nf) + I8155(config, m_ramio[0], XTAL::u(500)); // VCO (470nf) m_ramio[0]->out_to_callback().set_inputline(m_maincpu, I8085_RST65_LINE); m_ramio[0]->out_pa_callback().set(FUNC(missamer_state::ramio0_pa_w)); m_ramio[0]->out_pb_callback().set(FUNC(missamer_state::ramio0_pb_w)); m_ramio[0]->out_pc_callback().set(FUNC(missamer_state::ramio0_pc_w)); - I8155(config, m_ramio[1], 0); // CLK from 8085 + I8155(config, m_ramio[1]); // CLK from 8085 // timer output: UART m_ramio[1]->in_pa_callback().set(FUNC(missamer_state::ramio1_pa_r)); m_ramio[1]->in_pb_callback().set(FUNC(missamer_state::ramio1_pb_r)); m_ramio[1]->out_pc_callback().set(FUNC(missamer_state::ramio1_pc_w)); - I8155(config, m_ramio[2], 235000); // VCO (100pf) + I8155(config, m_ramio[2], XTAL::u(235000)); // VCO (100pf) m_ramio[2]->out_pb_callback().set(FUNC(missamer_state::ramio2_pb_w)); m_ramio[2]->out_pc_callback().set(FUNC(missamer_state::ramio2_pc_w)); diff --git a/src/mame/pinball/mrgame.cpp b/src/mame/pinball/mrgame.cpp index 7dd4db6dd1c..e310df03e2b 100644 --- a/src/mame/pinball/mrgame.cpp +++ b/src/mame/pinball/mrgame.cpp @@ -717,17 +717,17 @@ void mrgame_state::mrgame(machine_config &config) genpin_audio(config); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_8BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC - DAC_8BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC - dac_8bit_r2r_device &dacvol(DAC_8BIT_R2R(config, "dacvol", 0)); + dac_8bit_r2r_device &dacvol(DAC_8BIT_R2R(config, "dacvol")); dacvol.set_output_range(0, 1); // unknown DAC dacvol.add_route(0, "ldac", 1.0, DAC_INPUT_RANGE_HI); dacvol.add_route(0, "ldac", -1.0, DAC_INPUT_RANGE_LO); dacvol.add_route(0, "rdac", 1.0, DAC_INPUT_RANGE_HI); dacvol.add_route(0, "rdac", -1.0, DAC_INPUT_RANGE_LO); - tms5220_device &tms(TMS5220(config, "tms", 672000)); // uses a RC combination. 672k copied from jedi.h + tms5220_device &tms(TMS5220(config, "tms", XTAL::u(672000))); // uses a RC combination. 672k copied from jedi.h tms.ready_cb().set_inputline("audiocpu2", Z80_INPUT_LINE_BOGUSWAIT); tms.add_route(ALL_OUTPUTS, "lspeaker", 1.0); tms.add_route(ALL_OUTPUTS, "rspeaker", 1.0); diff --git a/src/mame/pinball/nsm.cpp b/src/mame/pinball/nsm.cpp index dff985c9655..24422514840 100644 --- a/src/mame/pinball/nsm.cpp +++ b/src/mame/pinball/nsm.cpp @@ -420,7 +420,7 @@ void nsm_state::machine_reset() void nsm_state::nsm(machine_config &config) { // CPU TMS9995, standard variant; no line connection - TMS9995(config, m_maincpu, 11052000); + TMS9995(config, m_maincpu, XTAL::u(11052000)); m_maincpu->set_addrmap(AS_PROGRAM, &nsm_state::mem_map); m_maincpu->set_addrmap(AS_IO, &nsm_state::io_map); diff --git a/src/mame/pinball/peyper.cpp b/src/mame/pinball/peyper.cpp index 3d58c686f61..90dd81bd8e2 100644 --- a/src/mame/pinball/peyper.cpp +++ b/src/mame/pinball/peyper.cpp @@ -656,7 +656,7 @@ void peyper_state::machine_reset() void peyper_state::peyper(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2'500'000); + Z80(config, m_maincpu, XTAL::u(2'500'000)); m_maincpu->set_addrmap(AS_PROGRAM, &peyper_state::mem_map); m_maincpu->set_addrmap(AS_IO, &peyper_state::io_map); m_maincpu->set_periodic_int(FUNC(peyper_state::irq0_line_hold), attotime::from_hz(1250)); @@ -668,17 +668,17 @@ void peyper_state::peyper(machine_config &config) /* Sound */ genpin_audio(config); SPEAKER(config, "ayvol").front_center(); - ay8910_device &ay1(AY8910(config, "ay1", 2500000)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(2500000))); ay1.port_a_write_callback().set(FUNC(peyper_state::p1a_w)); ay1.port_b_write_callback().set(FUNC(peyper_state::p1b_w)); ay1.add_route(ALL_OUTPUTS, "ayvol", 1.0); - ay8910_device &ay2(AY8910(config, "ay2", 2500000)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(2500000))); ay2.port_a_write_callback().set(FUNC(peyper_state::p2a_w)); ay2.port_b_write_callback().set(FUNC(peyper_state::p2b_w)); ay2.add_route(ALL_OUTPUTS, "ayvol", 1.0); /* Devices */ - i8279_device &kbdc(I8279(config, "i8279", 2500000)); + i8279_device &kbdc(I8279(config, "i8279", XTAL::u(2500000))); kbdc.out_sl_callback().set(FUNC(peyper_state::col_w)); // scan SL lines kbdc.out_disp_callback().set(FUNC(peyper_state::disp_w)); // display A&B kbdc.in_rl_callback().set(FUNC(peyper_state::sw_r)); // kbd RL lines @@ -697,7 +697,7 @@ void peyper_state::petaco(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); //I8279 - i8279_device &kbdc(I8279(config, "i8279", 2500000)); + i8279_device &kbdc(I8279(config, "i8279", XTAL::u(2500000))); kbdc.out_sl_callback().set(FUNC(peyper_state::col_w)); // scan SL lines kbdc.out_disp_callback().set(FUNC(peyper_state::disp_w)); // display A&B kbdc.in_rl_callback().set(FUNC(peyper_state::sw_r)); // kbd RL lines diff --git a/src/mame/pinball/pinsnd88.cpp b/src/mame/pinball/pinsnd88.cpp index c556353844c..88e38b5c96c 100644 --- a/src/mame/pinball/pinsnd88.cpp +++ b/src/mame/pinball/pinsnd88.cpp @@ -110,7 +110,7 @@ DEFINE_DEVICE_TYPE(PINSND88, pinsnd88_device, "pinsnd88", "Williams Pin Sound '88 Audio Board") -pinsnd88_device::pinsnd88_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pinsnd88_device::pinsnd88_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig,PINSND88,tag,owner,clock) , device_mixer_interface(mconfig, *this, 2) // 2 channels , m_cpu(*this, "cpu") @@ -207,7 +207,7 @@ void pinsnd88_device::device_add_mconfig(machine_config &config) config.set_maximum_quantum(attotime::from_hz(50)); // TODO: analog filters and "volume" controls for the two channels - AD7224(config, m_dac, 0); + AD7224(config, m_dac); m_dac->add_route(ALL_OUTPUTS, *this, 0.41/2.0, AUTO_ALLOC_INPUT, 0); // 470K m_dac->add_route(ALL_OUTPUTS, *this, 0.5/2.0, AUTO_ALLOC_INPUT, 1); // 330K diff --git a/src/mame/pinball/pinsnd88.h b/src/mame/pinball/pinsnd88.h index f73eac1e73c..6f2b1e0e93e 100644 --- a/src/mame/pinball/pinsnd88.h +++ b/src/mame/pinball/pinsnd88.h @@ -20,7 +20,7 @@ class pinsnd88_device : public device_t, public device_mixer_interface { public: // construction/destruction - pinsnd88_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pinsnd88_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // overrides virtual void device_reset() override; // power up reset @@ -38,7 +38,7 @@ public: protected: // constructor with overridable type for subclass, in case we want to put NARC's sound board in here eventually - //pinsnd88_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + //pinsnd88_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // overrides virtual void device_start() override; diff --git a/src/mame/pinball/play_1.cpp b/src/mame/pinball/play_1.cpp index 542a0754c48..8e041e0f034 100644 --- a/src/mame/pinball/play_1.cpp +++ b/src/mame/pinball/play_1.cpp @@ -566,7 +566,7 @@ WRITE_LINE_MEMBER( play_1_state::clock_w ) void play_1_state::play_1(machine_config &config) { /* basic machine hardware */ - CDP1802(config, m_maincpu, 400000); // 2 gates, 1 cap, 1 resistor oscillating somewhere between 350 to 450 kHz + CDP1802(config, m_maincpu, XTAL::u(400000)); // 2 gates, 1 cap, 1 resistor oscillating somewhere between 350 to 450 kHz m_maincpu->set_addrmap(AS_PROGRAM, &play_1_state::mem_map); m_maincpu->set_addrmap(AS_IO, &play_1_state::io_map); m_maincpu->wait_cb().set(FUNC(play_1_state::wait_r)); @@ -580,14 +580,14 @@ void play_1_state::play_1(machine_config &config) /* Video */ config.set_default_layout(layout_play_1); - clock_device &xpoint(CLOCK(config, "xpoint", 100)); // crossing-point detector + clock_device &xpoint(CLOCK(config, "xpoint", XTAL::u(100))); // crossing-point detector xpoint.signal_handler().set(FUNC(play_1_state::clock_w)); /* Sound */ genpin_audio(config); SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); - CLOCK(config, m_monotone, 0); // sound device + CLOCK(config, m_monotone); // sound device m_monotone->signal_handler().set("speaker", FUNC(speaker_sound_device::level_w)); } diff --git a/src/mame/pinball/play_2.cpp b/src/mame/pinball/play_2.cpp index 9fd443f25ed..a8c98b5d643 100644 --- a/src/mame/pinball/play_2.cpp +++ b/src/mame/pinball/play_2.cpp @@ -451,14 +451,14 @@ void play_2_state::play_2(machine_config &config) /* Video */ config.set_default_layout(layout_play_2); - CLOCK(config, "xpoint", 60).signal_handler().set(FUNC(play_2_state::clock2_w)); // crossing-point detector + CLOCK(config, "xpoint", XTAL::u(60)).signal_handler().set(FUNC(play_2_state::clock2_w)); // crossing-point detector // This is actually a 4013 chip (has 2 RS flipflops) - TTL7474(config, m_4013a, 0); + TTL7474(config, m_4013a); m_4013a->comp_output_cb().set(m_4013a, FUNC(ttl7474_device::d_w)); m_4013a->output_cb().set(m_4020, FUNC(ripple_counter_device::reset_w)); // TODO: also CKD for display - TTL7474(config, m_4013b, 0); + TTL7474(config, m_4013b); m_4013b->output_cb().set(m_maincpu, FUNC(cosmac_device::ef2_w)); m_4013b->comp_output_cb().set(m_maincpu, FUNC(cosmac_device::int_w)).invert(); // int is reversed in mame @@ -470,7 +470,7 @@ void play_2_state::play_2(machine_config &config) genpin_audio(config); SPEAKER(config, "mono").front_center(); - CDP1863(config, m_1863, 0); + CDP1863(config, m_1863); m_1863->set_clock2(2.95_MHz_XTAL / 8); m_1863->add_route(ALL_OUTPUTS, "mono", 0.75); TIMER(config, m_snd_off).configure_generic(FUNC(play_2_state::snd_off_callback)); diff --git a/src/mame/pinball/play_3.cpp b/src/mame/pinball/play_3.cpp index e2f3537fad9..2b272b4b669 100644 --- a/src/mame/pinball/play_3.cpp +++ b/src/mame/pinball/play_3.cpp @@ -538,15 +538,15 @@ void play_3_state::play_3(machine_config &config) config.set_default_layout(layout_play_3); // Devices - clock_device &xpoint(CLOCK(config, "xpoint", 60)); // crossing-point detector + clock_device &xpoint(CLOCK(config, "xpoint", XTAL::u(60))); // crossing-point detector xpoint.signal_handler().set(FUNC(play_3_state::clock2_w)); // This is actually a 4013 chip (has 2 RS flipflops) - TTL7474(config, m_4013a, 0); + TTL7474(config, m_4013a); m_4013a->comp_output_cb().set(m_4013a, FUNC(ttl7474_device::d_w)); m_4013a->output_cb().set(m_4020, FUNC(ripple_counter_device::reset_w)); - TTL7474(config, m_4013b, 0); + TTL7474(config, m_4013b); m_4013b->output_cb().set(m_maincpu, FUNC(cosmac_device::ef2_w)).invert(); // inverted m_4013b->comp_output_cb().set(m_maincpu, FUNC(cosmac_device::int_w)).invert(); // inverted diff --git a/src/mame/pinball/recel.cpp b/src/mame/pinball/recel.cpp index c1b91370055..4db19f8d32c 100644 --- a/src/mame/pinball/recel.cpp +++ b/src/mame/pinball/recel.cpp @@ -359,17 +359,17 @@ void recel_state::recel(machine_config & config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - ra17xx_device &u5(RA17XX(config, "b2", 0)); + ra17xx_device &u5(RA17XX(config, "b2")); u5.iord_cb().set(FUNC(recel_state::nvram_r)); u5.iowr_cb().set(FUNC(recel_state::nvram_w)); // control nvram, printer u5.set_cpu_tag(m_maincpu); - ra17xx_device &u4(RA17XX(config, "b1", 0)); + ra17xx_device &u4(RA17XX(config, "b1")); u4.iord_cb().set(FUNC(recel_state::lamps_r)); u4.iowr_cb().set(FUNC(recel_state::lamps_w)); // control lamps u4.set_cpu_tag(m_maincpu); - r10696_device &u3(R10696(config, "b3", 0)); + r10696_device &u3(R10696(config, "b3")); u3.iord_cb().set(FUNC(recel_state::solenoids_r)); u3.iowr_cb().set(FUNC(recel_state::solenoids_w)); // to sound,solenoids,lamps diff --git a/src/mame/pinball/rowamet.cpp b/src/mame/pinball/rowamet.cpp index 0865c22331b..43561283aa2 100644 --- a/src/mame/pinball/rowamet.cpp +++ b/src/mame/pinball/rowamet.cpp @@ -286,10 +286,10 @@ void rowamet_state::machine_reset() void rowamet_state::rowamet(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 1888888); + Z80(config, m_maincpu, XTAL::u(1888888)); m_maincpu->set_addrmap(AS_PROGRAM, &rowamet_state::main_mem_map); - Z80(config, m_audiocpu, 1888888); + Z80(config, m_audiocpu, XTAL::u(1888888)); m_audiocpu->set_addrmap(AS_PROGRAM, &rowamet_state::audio_mem_map); m_audiocpu->set_addrmap(AS_IO, &rowamet_state::audio_io_map); @@ -299,7 +299,7 @@ void rowamet_state::rowamet(machine_config &config) /* Sound */ genpin_audio(config); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.75); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.75); // unknown DAC } /*------------------------------------------------------------------- diff --git a/src/mame/pinball/s11.cpp b/src/mame/pinball/s11.cpp index 8cb18decb89..f21c528f6dd 100644 --- a/src/mame/pinball/s11.cpp +++ b/src/mame/pinball/s11.cpp @@ -441,7 +441,7 @@ void s11_state::s11(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->readpa_handler().set(FUNC(s11_state::sound_r)); m_pia21->set_port_a_input_overrides_output_mask(0xff); m_pia21->writepa_handler().set(FUNC(s11_state::sound_w)); @@ -451,14 +451,14 @@ void s11_state::s11(machine_config &config) m_pia21->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<1>)); m_pia21->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s11_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s11_state::lamp1_w)); m_pia24->cb2_handler().set(FUNC(s11_state::pia24_cb2_w)); m_pia24->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<3>)); m_pia24->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<4>)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s11_state::pia28_w7_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->writepa_handler().set(FUNC(s11_state::dig0_w)); @@ -468,7 +468,7 @@ void s11_state::s11(machine_config &config) m_pia28->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<5>)); m_pia28->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<6>)); - PIA6821(config, m_pia2c, 0); + PIA6821(config, m_pia2c); m_pia2c->writepa_handler().set(FUNC(s11_state::pia2c_pa_w)); m_pia2c->writepb_handler().set(FUNC(s11_state::pia2c_pb_w)); m_pia2c->ca2_handler().set(FUNC(s11_state::pia2c_ca2_w)); @@ -476,7 +476,7 @@ void s11_state::s11(machine_config &config) m_pia2c->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<7>)); m_pia2c->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<8>)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s11_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s11_state::switch_w)); @@ -485,7 +485,7 @@ void s11_state::s11(machine_config &config) m_pia30->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<9>)); m_pia30->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<10>)); - PIA6821(config, m_pia34, 0); + PIA6821(config, m_pia34); m_pia34->writepa_handler().set(FUNC(s11_state::pia34_pa_w)); m_pia34->writepb_handler().set(FUNC(s11_state::pia34_pb_w)); m_pia34->ca2_handler().set_nop(); @@ -500,7 +500,7 @@ void s11_state::s11(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &s11_state::s11_audio_map); INPUT_MERGER_ANY_HIGH(config, m_audioirq).output_handler().set_inputline(m_audiocpu, M6808_IRQ_LINE); - MC1408(config, m_dac, 0); + MC1408(config, m_dac); // common CVSD filter for system 11 and 11a, this is also the same filter circuit as Sinistar/System 6 uses, and is ALMOST the same filter from the s11 bg sound boards, see /mame/audio/s11c_bg.cpp // The CVSD filter has a large gain, about 4.6x @@ -514,9 +514,9 @@ void s11_state::s11(machine_config &config) FILTER_BIQUAD(config, m_cvsd_filter2).opamp_mfb_lowpass_setup(RES_K(27), RES_K(15), RES_K(27), CAP_P(4700), CAP_P(1200)); FILTER_BIQUAD(config, m_cvsd_filter).opamp_mfb_lowpass_setup(RES_K(43), RES_K(36), RES_K(180), CAP_P(1800), CAP_P(180)); m_cvsd_filter->add_route(ALL_OUTPUTS, m_cvsd_filter2, 1.0); - HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0); + HC55516(config, m_hc55516).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0); - PIA6821(config, m_pias, 0); + PIA6821(config, m_pias); m_pias->readpa_handler().set(FUNC(s11_state::sound_r)); m_pias->set_port_a_input_overrides_output_mask(0xff); m_pias->writepa_handler().set(FUNC(s11_state::sound_w)); diff --git a/src/mame/pinball/s11a.cpp b/src/mame/pinball/s11a.cpp index 38035941444..620a445b9b6 100644 --- a/src/mame/pinball/s11a.cpp +++ b/src/mame/pinball/s11a.cpp @@ -170,7 +170,7 @@ void s11a_state::s11a_base(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->readpa_handler().set(FUNC(s11a_state::sound_r)); m_pia21->set_port_a_input_overrides_output_mask(0xff); m_pia21->writepa_handler().set(FUNC(s11a_state::sound_w)); @@ -180,14 +180,14 @@ void s11a_state::s11a_base(machine_config &config) m_pia21->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<1>)); m_pia21->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s11a_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s11a_state::lamp1_w)); m_pia24->cb2_handler().set(FUNC(s11a_state::pia24_cb2_w)); m_pia24->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<3>)); m_pia24->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<4>)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s11a_state::pia28_w7_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->writepa_handler().set(FUNC(s11a_state::s11a_dig0_w)); @@ -197,7 +197,7 @@ void s11a_state::s11a_base(machine_config &config) m_pia28->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<5>)); m_pia28->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<6>)); - PIA6821(config, m_pia2c, 0); + PIA6821(config, m_pia2c); m_pia2c->writepa_handler().set(FUNC(s11a_state::pia2c_pa_w)); m_pia2c->writepb_handler().set(FUNC(s11a_state::pia2c_pb_w)); m_pia2c->ca2_handler().set(FUNC(s11a_state::pia2c_ca2_w)); @@ -205,7 +205,7 @@ void s11a_state::s11a_base(machine_config &config) m_pia2c->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<7>)); m_pia2c->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<8>)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s11a_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s11a_state::switch_w)); @@ -214,7 +214,7 @@ void s11a_state::s11a_base(machine_config &config) m_pia30->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<9>)); m_pia30->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<10>)); - PIA6821(config, m_pia34, 0); + PIA6821(config, m_pia34); m_pia34->writepa_handler().set(FUNC(s11a_state::pia34_pa_w)); m_pia34->writepb_handler().set(FUNC(s11a_state::pia34_pb_w)); m_pia34->ca2_handler().set_nop(); @@ -230,7 +230,7 @@ void s11a_state::s11a_base(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &s11a_state::s11_audio_map); INPUT_MERGER_ANY_HIGH(config, m_audioirq).output_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE); - MC1408(config, m_dac, 0); + MC1408(config, m_dac); // common CVSD filter for system 11 and 11a, this is also the same filter circuit as Sinistar/System 6 uses, // and is ALMOST the same filter from the s11 bg sound boards, see /mame/audio/s11c_bg.cpp @@ -245,9 +245,9 @@ void s11a_state::s11a_base(machine_config &config) FILTER_BIQUAD(config, m_cvsd_filter2).opamp_mfb_lowpass_setup(RES_K(27), RES_K(15), RES_K(27), CAP_P(4700), CAP_P(1200)); FILTER_BIQUAD(config, m_cvsd_filter).opamp_mfb_lowpass_setup(RES_K(43), RES_K(36), RES_K(180), CAP_P(1800), CAP_P(180)); m_cvsd_filter->add_route(ALL_OUTPUTS, m_cvsd_filter2, 1.0); - HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0); + HC55516(config, m_hc55516).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0); - PIA6821(config, m_pias, 0); + PIA6821(config, m_pias); m_pias->readpa_handler().set(FUNC(s11a_state::sound_r)); m_pias->set_port_a_input_overrides_output_mask(0xff); m_pias->writepa_handler().set(FUNC(s11a_state::sound_w)); diff --git a/src/mame/pinball/s11b.cpp b/src/mame/pinball/s11b.cpp index 28bbd42f35b..dda004a74d7 100644 --- a/src/mame/pinball/s11b.cpp +++ b/src/mame/pinball/s11b.cpp @@ -279,7 +279,7 @@ void s11b_state::s11b_base(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->readpa_handler().set(FUNC(s11b_state::sound_r)); m_pia21->set_port_a_input_overrides_output_mask(0xff); m_pia21->writepa_handler().set(FUNC(s11b_state::sound_w)); @@ -289,14 +289,14 @@ void s11b_state::s11b_base(machine_config &config) m_pia21->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<1>)); m_pia21->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s11b_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s11b_state::lamp1_w)); m_pia24->cb2_handler().set(FUNC(s11b_state::pia24_cb2_w)); m_pia24->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<3>)); m_pia24->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<4>)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s11b_state::pia28_w7_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->writepa_handler().set(FUNC(s11b_state::s11a_dig0_w)); @@ -306,7 +306,7 @@ void s11b_state::s11b_base(machine_config &config) m_pia28->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<5>)); m_pia28->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<6>)); - PIA6821(config, m_pia2c, 0); + PIA6821(config, m_pia2c); m_pia2c->writepa_handler().set(FUNC(s11b_state::s11b_pia2c_pa_w)); m_pia2c->writepb_handler().set(FUNC(s11b_state::s11b_pia2c_pb_w)); m_pia2c->ca2_handler().set(FUNC(s11b_state::pia2c_ca2_w)); @@ -314,7 +314,7 @@ void s11b_state::s11b_base(machine_config &config) m_pia2c->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<7>)); m_pia2c->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<8>)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s11b_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s11b_state::switch_w)); @@ -323,7 +323,7 @@ void s11b_state::s11b_base(machine_config &config) m_pia30->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<9>)); m_pia30->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<10>)); - PIA6821(config, m_pia34, 0); + PIA6821(config, m_pia34); m_pia34->writepa_handler().set(FUNC(s11b_state::s11b_pia34_pa_w)); m_pia34->writepb_handler().set(FUNC(s11b_state::pia34_pb_w)); m_pia34->ca2_handler().set_nop(); @@ -339,7 +339,7 @@ void s11b_state::s11b_base(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &s11b_state::s11_audio_map); INPUT_MERGER_ANY_HIGH(config, m_audioirq).output_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE); - MC1408(config, m_dac, 0); + MC1408(config, m_dac); // this CVSD filter differs from the one on system 11 and 11a, possibly simplified so it uses more of the same components, or so it has a different // shape/cutoff than the filter on the bg music/speech board, on purpose. @@ -354,9 +354,9 @@ void s11b_state::s11b_base(machine_config &config) FILTER_BIQUAD(config, m_cvsd_filter2).opamp_mfb_lowpass_setup(RES_K(12), RES_K(12), RES_K(56), CAP_P(4700), CAP_P(470)); FILTER_BIQUAD(config, m_cvsd_filter).opamp_mfb_lowpass_setup(RES_K(180), RES_K(180), RES_K(180), CAP_P(470), CAP_P(100)); m_cvsd_filter->add_route(ALL_OUTPUTS, m_cvsd_filter2, 1.0); - HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0/4.0); // to prevent massive clipping issues, we divide the signal by 4 here before going into the filters, then multiply it by 4 after it comes out the other end + HC55516(config, m_hc55516).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0/4.0); // to prevent massive clipping issues, we divide the signal by 4 here before going into the filters, then multiply it by 4 after it comes out the other end - PIA6821(config, m_pias, 0); + PIA6821(config, m_pias); m_pias->readpa_handler().set(FUNC(s11b_state::sound_r)); m_pias->set_port_a_input_overrides_output_mask(0xff); m_pias->writepa_handler().set(FUNC(s11b_state::sound_w)); diff --git a/src/mame/pinball/s11c.cpp b/src/mame/pinball/s11c.cpp index 1b14c92c6f5..faec389944a 100644 --- a/src/mame/pinball/s11c.cpp +++ b/src/mame/pinball/s11c.cpp @@ -169,7 +169,7 @@ void s11c_state::s11c(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->readpa_handler().set(FUNC(s11c_state::sound_r)); m_pia21->set_port_a_input_overrides_output_mask(0xff); m_pia21->writepa_handler().set(FUNC(s11c_state::sound_w)); @@ -179,14 +179,14 @@ void s11c_state::s11c(machine_config &config) m_pia21->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<1>)); m_pia21->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s11c_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s11c_state::lamp1_w)); m_pia24->cb2_handler().set(FUNC(s11c_state::pia24_cb2_w)); m_pia24->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<3>)); m_pia24->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<4>)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s11c_state::pia28_w7_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->writepa_handler().set(FUNC(s11c_state::s11a_dig0_w)); @@ -196,7 +196,7 @@ void s11c_state::s11c(machine_config &config) m_pia28->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<5>)); m_pia28->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<6>)); - PIA6821(config, m_pia2c, 0); + PIA6821(config, m_pia2c); m_pia2c->writepa_handler().set(FUNC(s11c_state::s11b_pia2c_pa_w)); m_pia2c->writepb_handler().set(FUNC(s11c_state::s11b_pia2c_pb_w)); m_pia2c->ca2_handler().set(FUNC(s11c_state::pia2c_ca2_w)); @@ -204,7 +204,7 @@ void s11c_state::s11c(machine_config &config) m_pia2c->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<7>)); m_pia2c->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<8>)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s11c_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s11c_state::switch_w)); @@ -213,7 +213,7 @@ void s11c_state::s11c(machine_config &config) m_pia30->irqa_handler().set(m_piairq, FUNC(input_merger_device::in_w<9>)); m_pia30->irqb_handler().set(m_piairq, FUNC(input_merger_device::in_w<10>)); - PIA6821(config, m_pia34, 0); + PIA6821(config, m_pia34); m_pia34->writepa_handler().set(FUNC(s11c_state::s11b_pia34_pa_w)); m_pia34->writepb_handler().set(FUNC(s11c_state::pia34_pb_w)); m_pia34->ca2_handler().set_nop(); diff --git a/src/mame/pinball/s3.cpp b/src/mame/pinball/s3.cpp index d6f766f704f..d070da63a07 100644 --- a/src/mame/pinball/s3.cpp +++ b/src/mame/pinball/s3.cpp @@ -574,7 +574,7 @@ void s3_state::s3(machine_config &config) genpin_audio(config); // Devices - PIA6821(config, m_pia22, 0); + PIA6821(config, m_pia22); m_pia22->writepa_handler().set(FUNC(s3_state::sol0_w)); m_pia22->writepb_handler().set(FUNC(s3_state::sol1_w)); m_pia22->ca2_handler().set(FUNC(s3_state::pia22_ca2_w)); @@ -582,7 +582,7 @@ void s3_state::s3(machine_config &config) m_pia22->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<1>)); m_pia22->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s3_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s3_state::lamp1_w)); m_pia24->ca2_handler().set(FUNC(s3_state::pia24_ca2_w)); @@ -590,7 +590,7 @@ void s3_state::s3(machine_config &config) m_pia24->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<3>)); m_pia24->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<4>)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s3_state::dips_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->readca1_handler().set_ioport("DIAGS").bit(2); // advance button @@ -602,7 +602,7 @@ void s3_state::s3(machine_config &config) m_pia28->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<5>)); m_pia28->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<6>)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s3_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s3_state::switch_w)); @@ -625,7 +625,7 @@ void s3a_state::s3a(machine_config &config) // Add the soundcard SPEAKER(config, "mono").front_center(); - WILLIAMS_S4_SOUND(config, m_s4sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S4_SOUND(config, m_s4sound).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/pinball/s4.cpp b/src/mame/pinball/s4.cpp index 1c94132ae43..2ba55e54490 100644 --- a/src/mame/pinball/s4.cpp +++ b/src/mame/pinball/s4.cpp @@ -428,7 +428,7 @@ WRITE_LINE_MEMBER( s4_state::irq_w ) void s4_state::s4(machine_config &config) { // basic machine hardware - M6802(config, m_maincpu, 3580000); // Divided by 4 internally + M6802(config, m_maincpu, XTAL::u(3580000)); // Divided by 4 internally m_maincpu->set_addrmap(AS_PROGRAM, &s4_state::main_map); // Video @@ -438,7 +438,7 @@ void s4_state::s4(machine_config &config) genpin_audio(config); // Devices - PIA6821(config, m_pia22, 0); + PIA6821(config, m_pia22); m_pia22->writepa_handler().set(FUNC(s4_state::sol0_w)); m_pia22->writepb_handler().set(FUNC(s4_state::sol1_w)); m_pia22->ca2_handler().set(FUNC(s4_state::pia22_ca2_w)); @@ -446,7 +446,7 @@ void s4_state::s4(machine_config &config) m_pia22->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<1>)); m_pia22->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s4_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s4_state::lamp1_w)); m_pia24->ca2_handler().set(FUNC(s4_state::pia24_ca2_w)); @@ -454,7 +454,7 @@ void s4_state::s4(machine_config &config) m_pia24->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<3>)); m_pia24->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<4>)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s4_state::dips_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->readca1_handler().set_ioport("DIAGS").bit(2); // advance button @@ -466,7 +466,7 @@ void s4_state::s4(machine_config &config) m_pia28->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<5>)); m_pia28->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<6>)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s4_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s4_state::switch_w)); @@ -483,11 +483,11 @@ void s4_state::s4(machine_config &config) m_4020->set_stages(14); // Using Q5,Q8,Q9 m_4020->count_out_cb().set(FUNC(s4_state::clockcnt_w)); - CLOCK(config, "rclock", 3580000/4).signal_handler().set(m_4020, FUNC(ripple_counter_device::clock_w)); + CLOCK(config, "rclock", XTAL::u(3580000)/4).signal_handler().set(m_4020, FUNC(ripple_counter_device::clock_w)); // Add the soundcard SPEAKER(config, "mono").front_center(); - WILLIAMS_S4_SOUND(config, m_s4sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S4_SOUND(config, m_s4sound).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/pinball/s6.cpp b/src/mame/pinball/s6.cpp index 441e3c31972..7d2d9df94bd 100644 --- a/src/mame/pinball/s6.cpp +++ b/src/mame/pinball/s6.cpp @@ -474,7 +474,7 @@ TIMER_CALLBACK_MEMBER(s6_state::irq_timer) void s6_state::s6(machine_config &config) { /* basic machine hardware */ - M6808(config, m_maincpu, 3580000); // 6802 or 6808 could be used here + M6808(config, m_maincpu, XTAL::u(3580000)); // 6802 or 6808 could be used here m_maincpu->set_addrmap(AS_PROGRAM, &s6_state::main_map); /* Video */ @@ -484,7 +484,7 @@ void s6_state::s6(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia22, 0); + PIA6821(config, m_pia22); m_pia22->writepa_handler().set(FUNC(s6_state::sol0_w)); m_pia22->writepb_handler().set(FUNC(s6_state::sol1_w)); m_pia22->ca2_handler().set(FUNC(s6_state::pia22_ca2_w)); @@ -492,7 +492,7 @@ void s6_state::s6(machine_config &config) m_pia22->irqa_handler().set(FUNC(s6_state::pia_irq)); m_pia22->irqb_handler().set(FUNC(s6_state::pia_irq)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s6_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s6_state::lamp1_w)); m_pia24->ca2_handler().set(FUNC(s6_state::pia24_ca2_w)); @@ -500,7 +500,7 @@ void s6_state::s6(machine_config &config) m_pia24->irqa_handler().set(FUNC(s6_state::pia_irq)); m_pia24->irqb_handler().set(FUNC(s6_state::pia_irq)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s6_state::dips_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->writepa_handler().set(FUNC(s6_state::dig0_w)); @@ -510,7 +510,7 @@ void s6_state::s6(machine_config &config) m_pia28->irqa_handler().set(FUNC(s6_state::pia_irq)); m_pia28->irqb_handler().set(FUNC(s6_state::pia_irq)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s6_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s6_state::switch_w)); @@ -523,7 +523,7 @@ void s6_state::s6(machine_config &config) /* Add the soundcard */ SPEAKER(config, "mono").front_center(); - WILLIAMS_S6_SOUND(config, m_s6sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S6_SOUND(config, m_s6sound).add_route(ALL_OUTPUTS, "mono", 1.0); } void s6_state::s6a(machine_config &config) diff --git a/src/mame/pinball/s7.cpp b/src/mame/pinball/s7.cpp index 7e8148f3e07..91351dc9a3e 100644 --- a/src/mame/pinball/s7.cpp +++ b/src/mame/pinball/s7.cpp @@ -676,7 +676,7 @@ void s7_state::machine_reset() void s7_state::s7(machine_config &config) { /* basic machine hardware */ - M6808(config, m_maincpu, 3580000); + M6808(config, m_maincpu, XTAL::u(3580000)); m_maincpu->set_addrmap(AS_PROGRAM, &s7_state::main_map); /* Video */ @@ -686,7 +686,7 @@ void s7_state::s7(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->readpa_handler().set_constant(0xff); // PA7 unknown input m_pia21->readpb_handler().set_constant(0x3f); // PB0-4 unknown inputs m_pia21->writepa_handler().set(FUNC(s7_state::sound_w)); @@ -696,7 +696,7 @@ void s7_state::s7(machine_config &config) m_pia21->irqa_handler().set(FUNC(s7_state::pia_irq)); m_pia21->irqb_handler().set(FUNC(s7_state::pia_irq)); - PIA6821(config, m_pia22, 0); + PIA6821(config, m_pia22); m_pia22->writepa_handler().set(FUNC(s7_state::sol0_w)); m_pia22->writepb_handler().set(FUNC(s7_state::sol1_w)); m_pia22->ca2_handler().set(FUNC(s7_state::pia22_ca2_w)); @@ -704,7 +704,7 @@ void s7_state::s7(machine_config &config) m_pia22->irqa_handler().set(FUNC(s7_state::pia_irq)); m_pia22->irqb_handler().set(FUNC(s7_state::pia_irq)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s7_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s7_state::lamp1_w)); m_pia24->ca2_handler().set(FUNC(s7_state::pia24_ca2_w)); @@ -712,7 +712,7 @@ void s7_state::s7(machine_config &config) m_pia24->irqa_handler().set(FUNC(s7_state::pia_irq)); m_pia24->irqb_handler().set(FUNC(s7_state::pia_irq)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(s7_state::dips_r)); m_pia28->set_port_a_input_overrides_output_mask(0xff); m_pia28->writepa_handler().set(FUNC(s7_state::dig0_w)); @@ -722,7 +722,7 @@ void s7_state::s7(machine_config &config) m_pia28->irqa_handler().set(FUNC(s7_state::pia_irq)); m_pia28->irqb_handler().set(FUNC(s7_state::pia_irq)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s7_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s7_state::switch_w)); @@ -735,7 +735,7 @@ void s7_state::s7(machine_config &config) /* Add the soundcard */ SPEAKER(config, "mono").front_center(); - WILLIAMS_S6_SOUND(config, m_s6sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S6_SOUND(config, m_s6sound).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/pinball/s8.cpp b/src/mame/pinball/s8.cpp index bade50e2bf8..a2d5e255507 100644 --- a/src/mame/pinball/s8.cpp +++ b/src/mame/pinball/s8.cpp @@ -572,9 +572,9 @@ void s8_state::psound(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &s8_state::audio_map); SPEAKER(config, "speaker").front_center(); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + MC1408(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); - PIA6821(config, m_pias, 0); + PIA6821(config, m_pias); m_pias->readpa_handler().set(FUNC(s8_state::sound_r)); m_pias->set_port_a_input_overrides_output_mask(0xff); m_pias->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w)); @@ -593,7 +593,7 @@ void s8_state::s8(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->readpa_handler().set(FUNC(s8_state::sound_r)); m_pia21->set_port_a_input_overrides_output_mask(0xff); m_pia21->ca1_w(1); // sound busy @@ -604,14 +604,14 @@ void s8_state::s8(machine_config &config) m_pia21->irqa_handler().set(FUNC(s8_state::pia_irq)); m_pia21->irqb_handler().set(FUNC(s8_state::pia_irq)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s8_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s8_state::lamp1_w)); m_pia24->cb2_handler().set(FUNC(s8_state::pia24_cb2_w)); m_pia24->irqa_handler().set(FUNC(s8_state::pia_irq)); m_pia24->irqb_handler().set(FUNC(s8_state::pia_irq)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->writepa_handler().set(FUNC(s8_state::dig0_w)); m_pia28->writepb_handler().set(FUNC(s8_state::dig1_w)); m_pia28->ca2_handler().set(FUNC(s8_state::pia28_ca2_w)); @@ -619,7 +619,7 @@ void s8_state::s8(machine_config &config) m_pia28->irqa_handler().set(FUNC(s8_state::pia_irq)); m_pia28->irqb_handler().set(FUNC(s8_state::pia_irq)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s8_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s8_state::switch_w)); @@ -653,7 +653,7 @@ void s8_state::scrzy(machine_config &config) /* Add the soundcard */ SPEAKER(config, "mono").front_center(); - WILLIAMS_S9_SOUND(config, m_s9sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S9_SOUND(config, m_s9sound).add_route(ALL_OUTPUTS, "mono", 1.0); } void s8_state::ratrc(machine_config &config) diff --git a/src/mame/pinball/s9.cpp b/src/mame/pinball/s9.cpp index 0da72ce3c1f..83af6e6e2be 100644 --- a/src/mame/pinball/s9.cpp +++ b/src/mame/pinball/s9.cpp @@ -365,7 +365,7 @@ void s9_state::s9(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->set_port_a_input_overrides_output_mask(0xff); m_pia21->ca1_w(1); // sound busy m_pia21->writepa_handler().set("s9sound", FUNC(williams_s9_sound_device::write)); @@ -375,14 +375,14 @@ void s9_state::s9(machine_config &config) m_pia21->irqa_handler().set(FUNC(s9_state::pia_irq)); m_pia21->irqb_handler().set(FUNC(s9_state::pia_irq)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(s9_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(s9_state::lamp1_w)); m_pia24->cb2_handler().set(FUNC(s9_state::pia24_cb2_w)); m_pia24->irqa_handler().set(FUNC(s9_state::pia_irq)); m_pia24->irqb_handler().set(FUNC(s9_state::pia_irq)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->writepa_handler().set(FUNC(s9_state::dig0_w)); m_pia28->writepb_handler().set(FUNC(s9_state::dig1_w)); m_pia28->ca2_handler().set(FUNC(s9_state::pia28_ca2_w)); @@ -390,7 +390,7 @@ void s9_state::s9(machine_config &config) m_pia28->irqa_handler().set(FUNC(s9_state::pia_irq)); m_pia28->irqb_handler().set(FUNC(s9_state::pia_irq)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(s9_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(s9_state::switch_w)); @@ -401,7 +401,7 @@ void s9_state::s9(machine_config &config) /* Add the soundcard */ SPEAKER(config, "mono").front_center(); - WILLIAMS_S9_SOUND(config, m_s9sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S9_SOUND(config, m_s9sound).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/pinball/sleic.cpp b/src/mame/pinball/sleic.cpp index 14238137c78..5183ebb434e 100644 --- a/src/mame/pinball/sleic.cpp +++ b/src/mame/pinball/sleic.cpp @@ -273,7 +273,7 @@ void sleic_state::sleic(machine_config &config) RIPPLE_COUNTER(config, m_4020); m_4020->set_stages(11); // Using Q1-11 m_4020->count_out_cb().set(FUNC(sleic_state::clockcnt_w)); - CLOCK(config, "rclock", 8'000'000/4).signal_handler().set(m_4020, FUNC(ripple_counter_device::clock_w)); + CLOCK(config, "rclock", XTAL::u(8'000'000)/4).signal_handler().set(m_4020, FUNC(ripple_counter_device::clock_w)); /* video hardware */ //dmd; @@ -282,10 +282,10 @@ void sleic_state::sleic(machine_config &config) genpin_audio(config); SPEAKER(config, "mono").front_center(); - OKIM6376(config, m_oki, 128'000); // xtal value not shown, guessing + OKIM6376(config, m_oki, XTAL::u(128'000)); // xtal value not shown, guessing m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); - //ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL(4'000'000))); // no idea.. ic type not shown, source of clock not evident + //ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL:u(4'000'000))); // no idea.. ic type not shown, source of clock not evident //ymsnd.irq_handler().set_inputline(m_audiocpu, 0); //ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/pinball/spinb.cpp b/src/mame/pinball/spinb.cpp index ed7df7e4eb3..0358202eb28 100644 --- a/src/mame/pinball/spinb.cpp +++ b/src/mame/pinball/spinb.cpp @@ -1049,16 +1049,16 @@ void spinb_state::msm5205(machine_config &config) ppim.in_pc_callback().set(FUNC(spinb_state::ppim_c_r)); ppim.out_pc_callback().set(FUNC(spinb_state::ppim_c_w)); - TTL7474(config, m_ic5a, 0); + TTL7474(config, m_ic5a); m_ic5a->comp_output_cb().set(FUNC(spinb_state::ic5a_w)); - HC157(config, m_ic14a, 0); // IC15 on Jolly Park + HC157(config, m_ic14a); // IC15 on Jolly Park m_ic14a->out_callback().set("5205a", FUNC(msm5205_device::data_w)); - TTL7474(config, m_ic5m, 0); + TTL7474(config, m_ic5m); m_ic5m->comp_output_cb().set(FUNC(spinb_state::ic5m_w)); - HC157(config, m_ic14m, 0); // IC15 on Jolly Park + HC157(config, m_ic14m); // IC15 on Jolly Park m_ic14m->out_callback().set("5205m", FUNC(msm5205_device::data_w)); } @@ -1092,16 +1092,16 @@ void spinb_state::msm6585(machine_config &config) ppim.in_pc_callback().set(FUNC(spinb_state::ppim_c_r)); ppim.out_pc_callback().set(FUNC(spinb_state::ppim_c_w)); - TTL7474(config, m_ic5a, 0); + TTL7474(config, m_ic5a); m_ic5a->comp_output_cb().set(FUNC(spinb_state::ic5a_w)); - HC157(config, m_ic14a, 0); // IC15 on Jolly Park + HC157(config, m_ic14a); // IC15 on Jolly Park m_ic14a->out_callback().set("6585a", FUNC(msm5205_device::data_w)); - TTL7474(config, m_ic5m, 0); + TTL7474(config, m_ic5m); m_ic5m->comp_output_cb().set(FUNC(spinb_state::ic5m_w)); - HC157(config, m_ic14m, 0); // IC15 on Jolly Park + HC157(config, m_ic14m); // IC15 on Jolly Park m_ic14m->out_callback().set("6585m", FUNC(msm5205_device::data_w)); } diff --git a/src/mame/pinball/spirit76.cpp b/src/mame/pinball/spirit76.cpp index 0c52f5a19be..9390f16ed8f 100644 --- a/src/mame/pinball/spirit76.cpp +++ b/src/mame/pinball/spirit76.cpp @@ -349,7 +349,7 @@ void spirit76_state::machine_reset() void spirit76_state::spirit76(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 500000); + M6800(config, m_maincpu, XTAL::u(500000)); m_maincpu->set_addrmap(AS_PROGRAM, &spirit76_state::maincpu_map); TIMER(config, "irq").configure_periodic(FUNC(spirit76_state::irq), attotime::from_hz(1200)); @@ -358,7 +358,7 @@ void spirit76_state::spirit76(machine_config &config) config.set_default_layout(layout_spirit76); //6821pia - pia6821_device &pia(PIA6821(config, "pia", 0)); + pia6821_device &pia(PIA6821(config, "pia")); pia.writepa_handler().set(FUNC(spirit76_state::porta_w)); pia.writepb_handler().set(FUNC(spirit76_state::portb_w)); pia.readpa_handler().set(FUNC(spirit76_state::porta_r)); diff --git a/src/mame/pinball/st_mp100.cpp b/src/mame/pinball/st_mp100.cpp index 203f5fb1a74..92c6608dc11 100644 --- a/src/mame/pinball/st_mp100.cpp +++ b/src/mame/pinball/st_mp100.cpp @@ -755,7 +755,7 @@ void st_mp100_state::machine_reset() void st_mp100_state::st_mp100(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 1000000); // no xtal, just 2 chips forming a random oscillator + M6800(config, m_maincpu, XTAL::u(1000000)); // no xtal, just 2 chips forming a random oscillator m_maincpu->set_addrmap(AS_PROGRAM, &st_mp100_state::mem_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -767,7 +767,7 @@ void st_mp100_state::st_mp100(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia_u10, 0); + PIA6821(config, m_pia_u10); m_pia_u10->readpa_handler().set(FUNC(st_mp100_state::u10_a_r)); m_pia_u10->writepa_handler().set(FUNC(st_mp100_state::u10_a_w)); m_pia_u10->readpb_handler().set(FUNC(st_mp100_state::u10_b_r)); @@ -777,10 +777,10 @@ void st_mp100_state::st_mp100(machine_config &config) m_pia_u10->irqa_handler().set("irq", FUNC(input_merger_device::in_w<0>)); m_pia_u10->irqb_handler().set("irq", FUNC(input_merger_device::in_w<1>)); - clock_device &u10_clock(CLOCK(config, "u10_clock", 120)); // crosspoint detector + clock_device &u10_clock(CLOCK(config, "u10_clock", XTAL::u(120))); // crosspoint detector u10_clock.signal_handler().set(m_pia_u10, FUNC(pia6821_device::cb1_w)); - PIA6821(config, m_pia_u11, 0); + PIA6821(config, m_pia_u11); m_pia_u11->readpa_handler().set(FUNC(st_mp100_state::u11_a_r)); m_pia_u11->writepa_handler().set(FUNC(st_mp100_state::u11_a_w)); m_pia_u11->writepb_handler().set(FUNC(st_mp100_state::u11_b_w)); @@ -789,7 +789,7 @@ void st_mp100_state::st_mp100(machine_config &config) m_pia_u11->irqa_handler().set("irq", FUNC(input_merger_device::in_w<2>)); m_pia_u11->irqb_handler().set("irq", FUNC(input_merger_device::in_w<3>)); - clock_device &u11_clock(CLOCK(config, "u11_clock", 634)); // NE555 astable + clock_device &u11_clock(CLOCK(config, "u11_clock", XTAL::u(634))); // NE555 astable u11_clock.signal_handler().set(m_pia_u11, FUNC(pia6821_device::ca1_w)); INPUT_MERGER_ANY_HIGH(config, "irq").output_handler().set_inputline(m_maincpu, M6800_IRQ_LINE); diff --git a/src/mame/pinball/st_mp200.cpp b/src/mame/pinball/st_mp200.cpp index 822e3f75320..5de22b10ea9 100644 --- a/src/mame/pinball/st_mp200.cpp +++ b/src/mame/pinball/st_mp200.cpp @@ -632,7 +632,7 @@ void st_mp200_state::init_st_mp202() void st_mp200_state::st_mp200(machine_config &config) { /* basic machine hardware */ - M6800(config, m_maincpu, 1000000); // no xtal, just 2 chips forming a random oscillator + M6800(config, m_maincpu, XTAL::u(1000000)); // no xtal, just 2 chips forming a random oscillator m_maincpu->set_addrmap(AS_PROGRAM, &st_mp200_state::mem_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -644,7 +644,7 @@ void st_mp200_state::st_mp200(machine_config &config) genpin_audio(config); /* Devices */ - PIA6821(config, m_pia_u10, 0); + PIA6821(config, m_pia_u10); m_pia_u10->readpa_handler().set(FUNC(st_mp200_state::u10_a_r)); m_pia_u10->writepa_handler().set(FUNC(st_mp200_state::u10_a_w)); m_pia_u10->readpb_handler().set(FUNC(st_mp200_state::u10_b_r)); @@ -654,10 +654,10 @@ void st_mp200_state::st_mp200(machine_config &config) m_pia_u10->irqa_handler().set("irq", FUNC(input_merger_device::in_w<0>)); m_pia_u10->irqb_handler().set("irq", FUNC(input_merger_device::in_w<1>)); - clock_device &u10_clock(CLOCK(config, "u10_clock", 120)); // crosspoint detector + clock_device &u10_clock(CLOCK(config, "u10_clock", XTAL::u(120))); // crosspoint detector u10_clock.signal_handler().set(m_pia_u10, FUNC(pia6821_device::cb1_w)); - PIA6821(config, m_pia_u11, 0); + PIA6821(config, m_pia_u11); m_pia_u11->readpa_handler().set(FUNC(st_mp200_state::u11_a_r)); m_pia_u11->writepa_handler().set(FUNC(st_mp200_state::u11_a_w)); m_pia_u11->writepb_handler().set(FUNC(st_mp200_state::u11_b_w)); @@ -666,7 +666,7 @@ void st_mp200_state::st_mp200(machine_config &config) m_pia_u11->irqa_handler().set("irq", FUNC(input_merger_device::in_w<2>)); m_pia_u11->irqb_handler().set("irq", FUNC(input_merger_device::in_w<3>)); - clock_device &u11_clock(CLOCK(config, "u11_clock", 634)); // NE555 astable + clock_device &u11_clock(CLOCK(config, "u11_clock", XTAL::u(634))); // NE555 astable u11_clock.signal_handler().set(m_pia_u11, FUNC(pia6821_device::ca1_w)); INPUT_MERGER_ANY_HIGH(config, "irq").output_handler().set_inputline(m_maincpu, M6800_IRQ_LINE); @@ -685,13 +685,13 @@ void st_mp200_state::st_sam4(machine_config &config) st_mp200(config); m_maincpu->set_addrmap(AS_PROGRAM, &st_mp200_state::sam4_map); config.device_remove("nvram"); - PIA6821(config, "sam4_pia0", 0); - PIA6821(config, "sam4_pia1", 0); - PIA6821(config, "sam4_pia2", 0); - pia6821_device &pia3(PIA6821(config, "sam4_pia3", 0)); + PIA6821(config, "sam4_pia0"); + PIA6821(config, "sam4_pia1"); + PIA6821(config, "sam4_pia2"); + pia6821_device &pia3(PIA6821(config, "sam4_pia3")); pia3.writepa_handler().set_nop(); pia3.writepb_handler().set_nop(); - PIA6821(config, "sam4_pia4", 0); + PIA6821(config, "sam4_pia4"); } /* ========== ALTERNATE ROMS ======================================================================= diff --git a/src/mame/pinball/stargame.cpp b/src/mame/pinball/stargame.cpp index 51d964e65bc..f234268adb3 100644 --- a/src/mame/pinball/stargame.cpp +++ b/src/mame/pinball/stargame.cpp @@ -415,7 +415,7 @@ void stargame_state::stargame(machine_config &config) /* video hardware */ config.set_default_layout(layout_stargame); - clock_device &ctc_clock(CLOCK(config, "ctc_clock", 50)); + clock_device &ctc_clock(CLOCK(config, "ctc_clock", XTAL::u(50))); ctc_clock.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg2)); ctc_clock.signal_handler().append(m_ctc, FUNC(z80ctc_device::trg3)).invert(); @@ -432,7 +432,7 @@ void stargame_state::stargame(machine_config &config) ay0.add_route(ALL_OUTPUTS, "aysnd", 1.5); ay0.set_resistors_load(20000, 20000, 20000); ay0.port_a_write_callback().set("dac", FUNC(dac_byte_interface::write)); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "aysnd", 0.5); // bunch of resistors + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "aysnd", 0.5); // bunch of resistors ls259_device &mainlatch(LS259(config, "mainlatch")); // ic=6A mainlatch.q_out_cb<0>().set_nop(); // DADIS, handled by 0x68 @@ -444,7 +444,7 @@ void stargame_state::stargame(machine_config &config) mainlatch.q_out_cb<6>().set(FUNC(stargame_state::reset2_w)); // SRESET mainlatch.q_out_cb<7>().set_nop(); // MAKRES - TTL7474(config, m_7a, 0); + TTL7474(config, m_7a); m_7a->comp_output_cb().set_inputline(m_audiocpu, INPUT_LINE_IRQ0).invert(); GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); diff --git a/src/mame/pinball/taito.cpp b/src/mame/pinball/taito.cpp index 1229ac570df..20036f504a9 100644 --- a/src/mame/pinball/taito.cpp +++ b/src/mame/pinball/taito.cpp @@ -515,7 +515,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( mrblkz80_state::timer_z ) void taito_state::taito_common(machine_config &config) { /* basic machine hardware */ - M6802(config, m_audiocpu, 1000000); // cpu & clock are a guess + M6802(config, m_audiocpu, XTAL::u(1000000)); // cpu & clock are a guess m_audiocpu->set_addrmap(AS_PROGRAM, &taito_state::audio_map); /* Video */ @@ -525,7 +525,7 @@ void taito_state::taito_common(machine_config &config) genpin_audio(config); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.475); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.475); // unknown DAC PIA6821(config, m_pia); //m_pia->readpa_handler().set(FUNC(taito_state::pia_pa_r)); @@ -564,7 +564,7 @@ void taito_8080::taito4(machine_config &config) taito(config); SPEAKER(config, "voxsnd").front_center(); - VOTRAX_SC01(config, m_votrax, 720000); // guess + VOTRAX_SC01(config, m_votrax, XTAL::u(720000)); // guess m_votrax->ar_callback().set(FUNC(taito_8080::votrax_request)); m_votrax->add_route(ALL_OUTPUTS, "voxsnd", 2.0); @@ -599,7 +599,7 @@ void mrblkz80_state::taitoz(machine_config &config) { taito_common(config); taito_ay_audio(config); - Z80(config, m_z80cpu, 3'800'000); // guess + Z80(config, m_z80cpu, XTAL::u(3'800'000)); // guess m_z80cpu->set_addrmap(AS_PROGRAM, &mrblkz80_state::mrblkz80_mem_map); m_z80cpu->set_addrmap(AS_IO, &mrblkz80_state::mrblkz80_io_map); TIMER(config, "timer_z").configure_periodic(FUNC(mrblkz80_state::timer_z), attotime::from_hz(200)); diff --git a/src/mame/pinball/techno.cpp b/src/mame/pinball/techno.cpp index 9c05f686f9b..26549316ad5 100644 --- a/src/mame/pinball/techno.cpp +++ b/src/mame/pinball/techno.cpp @@ -403,8 +403,8 @@ void techno_state::techno(machine_config &config) genpin_audio(config); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // DAC0808 - Y8950(config, "ym1", 3580000).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // TKY2016 - no crystal, just a random oscillator, sch says 3.58MHz + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // DAC0808 + Y8950(config, "ym1", XTAL::u(3580000)).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // TKY2016 - no crystal, just a random oscillator, sch says 3.58MHz } ROM_START(xforce) diff --git a/src/mame/pinball/vd.cpp b/src/mame/pinball/vd.cpp index e82fdfae845..4425eb71f34 100644 --- a/src/mame/pinball/vd.cpp +++ b/src/mame/pinball/vd.cpp @@ -306,7 +306,7 @@ void vd_state::machine_reset() void vd_state::vd(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &vd_state::mem_map); m_maincpu->set_addrmap(AS_IO, &vd_state::io_map); TIMER(config, "irq").configure_periodic(FUNC(vd_state::irq), attotime::from_hz(300)); @@ -317,11 +317,11 @@ void vd_state::vd(machine_config &config) genpin_audio(config); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ay8910_device &ay1(AY8910(config, "ay1", 2000000)); //? + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(2000000))); //? ay1.add_route(ALL_OUTPUTS, "lspeaker", 0.5); ay1.port_a_read_callback().set_ioport("DSW2"); ay1.port_b_read_callback().set_ioport("DSW1"); - ay8910_device &ay2(AY8910(config, "ay2", 2000000)); //? + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(2000000))); //? ay2.add_route(ALL_OUTPUTS, "rspeaker", 0.5); ay2.port_b_read_callback().set_ioport("DSW3"); diff --git a/src/mame/pinball/whitestar.cpp b/src/mame/pinball/whitestar.cpp index 7030a35194c..ac2c5ade513 100644 --- a/src/mame/pinball/whitestar.cpp +++ b/src/mame/pinball/whitestar.cpp @@ -317,7 +317,7 @@ INTERRUPT_GEN_MEMBER(whitestar_state::whitestar_firq_interrupt) void whitestar_state::whitestar(machine_config &config) { // basic machine hardware - MC6809E(config, m_maincpu, 2000000); + MC6809E(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &whitestar_state::whitestar_map); m_maincpu->set_periodic_int(FUNC(whitestar_state::whitestar_firq_interrupt), attotime::from_hz(976)); // value taken from PinMAME @@ -326,7 +326,7 @@ void whitestar_state::whitestar(machine_config &config) // sound hardware genpin_audio(config); - DECOBSMT(config, m_decobsmt, 0); + DECOBSMT(config, m_decobsmt); DECODMD2(config, m_decodmd, 0, "dmdcpu"); } diff --git a/src/mame/pinball/wms_shuffle.cpp b/src/mame/pinball/wms_shuffle.cpp index 0f34c2ec4f5..b28224b3fce 100644 --- a/src/mame/pinball/wms_shuffle.cpp +++ b/src/mame/pinball/wms_shuffle.cpp @@ -457,7 +457,7 @@ void shuffle_state::machine_reset() void shuffle_state::s4(machine_config &config) { // basic machine hardware - M6802(config, m_maincpu, 3580000); // Divided by 4 internally + M6802(config, m_maincpu, XTAL::u(3580000)); // Divided by 4 internally m_maincpu->set_addrmap(AS_PROGRAM, &shuffle_state::s4_map); // Video @@ -467,7 +467,7 @@ void shuffle_state::s4(machine_config &config) genpin_audio(config); // Devices - PIA6821(config, m_pia22, 0); + PIA6821(config, m_pia22); m_pia22->writepa_handler().set(FUNC(shuffle_state::sol0_w)); m_pia22->writepb_handler().set(FUNC(shuffle_state::sol1_w)); m_pia22->ca2_handler().set(FUNC(shuffle_state::pia22_ca2_w)); @@ -475,7 +475,7 @@ void shuffle_state::s4(machine_config &config) m_pia22->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<1>)); m_pia22->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia24, 0); + PIA6821(config, m_pia24); m_pia24->writepa_handler().set(FUNC(shuffle_state::lamp0_w)); m_pia24->writepb_handler().set(FUNC(shuffle_state::lamp1_w)); m_pia24->ca2_handler().set(FUNC(shuffle_state::pia24_ca2_w)); @@ -483,7 +483,7 @@ void shuffle_state::s4(machine_config &config) m_pia24->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<3>)); m_pia24->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<4>)); - PIA6821(config, m_pia28, 0); + PIA6821(config, m_pia28); m_pia28->readpa_handler().set(FUNC(shuffle_state::dips_r)); m_pia28->readca1_handler().set_ioport("DIAGS").bit(2); // advance button m_pia28->readcb1_handler().set_ioport("DIAGS").bit(3); // auto/manual switch @@ -494,7 +494,7 @@ void shuffle_state::s4(machine_config &config) m_pia28->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<5>)); m_pia28->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<6>)); - PIA6821(config, m_pia30, 0); + PIA6821(config, m_pia30); m_pia30->readpa_handler().set(FUNC(shuffle_state::switch_r)); m_pia30->set_port_a_input_overrides_output_mask(0xff); m_pia30->writepb_handler().set(FUNC(shuffle_state::switch_w)); @@ -511,11 +511,11 @@ void shuffle_state::s4(machine_config &config) m_4020->set_stages(14); // Using Q5,Q8,Q9 m_4020->count_out_cb().set(FUNC(shuffle_state::clockcnt_w)); - CLOCK(config, "rclock", 3580000/4).signal_handler().set(m_4020, FUNC(ripple_counter_device::clock_w)); + CLOCK(config, "rclock", XTAL::u(3580000)/4).signal_handler().set(m_4020, FUNC(ripple_counter_device::clock_w)); // Add the soundcard SPEAKER(config, "mono").front_center(); - WILLIAMS_S4_SOUND(config, m_s4sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S4_SOUND(config, m_s4sound).add_route(ALL_OUTPUTS, "mono", 1.0); } void shuffle_state::s9(machine_config &config) @@ -529,7 +529,7 @@ void shuffle_state::s9(machine_config &config) config.set_default_layout(layout_shuffle9); - PIA6821(config, m_pia21, 0); + PIA6821(config, m_pia21); m_pia21->writepa_handler().set("s9sound", FUNC(williams_s9_sound_device::write)); m_pia21->writepb_handler().set(FUNC(shuffle_state::sol2_w)); m_pia21->ca2_handler().set("s9sound", FUNC(williams_s9_sound_device::strobe)); @@ -537,7 +537,7 @@ void shuffle_state::s9(machine_config &config) m_pia21->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<9>)); m_pia21->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<10>)); - WILLIAMS_S9_SOUND(config, m_s9sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S9_SOUND(config, m_s9sound).add_route(ALL_OUTPUTS, "mono", 1.0); } void shuffle_state::s11(machine_config &config) @@ -551,20 +551,20 @@ void shuffle_state::s11(machine_config &config) config.set_default_layout(layout_shuffle11); - PIA6821(config, m_pia2c, 0); + PIA6821(config, m_pia2c); m_pia2c->writepa_handler().set(FUNC(shuffle_state::pia2c_pa_w)); m_pia2c->writepb_handler().set(FUNC(shuffle_state::pia2c_pb_w)); m_pia2c->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<11>)); m_pia2c->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<12>)); - PIA6821(config, m_pia34, 0); + PIA6821(config, m_pia34); m_pia34->writepa_handler().set(FUNC(shuffle_state::pia34_pa_w)); m_pia34->writepb_handler().set(FUNC(shuffle_state::pia34_pb_w)); //m_pia34->cb2_handler().set(FUNC(shuffle_state::pia34_cb2_w)); m_pia34->irqa_handler().set(m_mainirq, FUNC(input_merger_device::in_w<13>)); m_pia34->irqb_handler().set(m_mainirq, FUNC(input_merger_device::in_w<14>)); - WILLIAMS_S11_SOUND(config, m_s11sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + WILLIAMS_S11_SOUND(config, m_s11sound).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/pinball/wpc.cpp b/src/mame/pinball/wpc.cpp index 9647a526192..1737af09775 100644 --- a/src/mame/pinball/wpc.cpp +++ b/src/mame/pinball/wpc.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(WPCASIC, wpc_device, "wpc", "Williams WPC ASIC") -wpc_device::wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wpc_device::wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WPCASIC, tag, owner, clock), m_dmd_visiblepage(0), m_irq_cb(*this), diff --git a/src/mame/pinball/wpc.h b/src/mame/pinball/wpc.h index 014dbb19f9c..d8d31f0a629 100644 --- a/src/mame/pinball/wpc.h +++ b/src/mame/pinball/wpc.h @@ -78,7 +78,7 @@ class wpc_device : public device_t { public: - wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/mame/pinball/wpc_95.cpp b/src/mame/pinball/wpc_95.cpp index b6c5598821a..1d065394553 100644 --- a/src/mame/pinball/wpc_95.cpp +++ b/src/mame/pinball/wpc_95.cpp @@ -2305,14 +2305,14 @@ void wpc_95_state::wpc_95(machine_config &config) TIMER(config, "zero_crossing").configure_periodic(FUNC(wpc_95_state::zc_timer), attotime::from_hz(120)); // Mains power zero crossing - WPC_PIC(config, m_pic, 0); - WPC_LAMP(config, m_lamp, 0); + WPC_PIC(config, m_pic); + WPC_LAMP(config, m_lamp); WPC_OUT(config, m_out, 0, 3); - WPC_SHIFT(config, "shift", 0); - WPC_DMD(config, "dmd", 0).scanline_callback().set(FUNC(wpc_95_state::scanline_irq)); + WPC_SHIFT(config, "shift"); + WPC_DMD(config, "dmd").scanline_callback().set(FUNC(wpc_95_state::scanline_irq)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - DCS_AUDIO_WPC(config, m_dcs, 0); + DCS_AUDIO_WPC(config, m_dcs); } /*------------------------- diff --git a/src/mame/pinball/wpc_an.cpp b/src/mame/pinball/wpc_an.cpp index 7dfb7aeabe2..ef3e5280d29 100644 --- a/src/mame/pinball/wpc_an.cpp +++ b/src/mame/pinball/wpc_an.cpp @@ -424,7 +424,7 @@ void wpc_an_state::wpc_an_base(machine_config &config) MC6809E(config, m_maincpu, XTAL(8'000'000) / 4); // 68B09E m_maincpu->set_addrmap(AS_PROGRAM, &wpc_an_state::wpc_an_map); - WPCASIC(config, m_wpc, 0); + WPCASIC(config, m_wpc); m_wpc->irq_callback().set(FUNC(wpc_an_state::irq_w)); m_wpc->firq_callback().set(FUNC(wpc_an_state::firq_w)); m_wpc->bank_write().set(FUNC(wpc_an_state::rombank_w)); diff --git a/src/mame/pinball/wpc_dcs.cpp b/src/mame/pinball/wpc_dcs.cpp index cf2a326ac55..fad58b30150 100644 --- a/src/mame/pinball/wpc_dcs.cpp +++ b/src/mame/pinball/wpc_dcs.cpp @@ -466,13 +466,13 @@ void wpc_dcs_state::wpc_dcs(machine_config &config) TIMER(config, "zero_crossing").configure_periodic(FUNC(wpc_dcs_state::zc_timer), attotime::from_hz(120)); // Mains power zero crossing - WPC_LAMP(config, m_lamp, 0); + WPC_LAMP(config, m_lamp); WPC_OUT(config, m_out, 0, 3); - WPC_SHIFT(config, "shift", 0); - WPC_DMD(config, "dmd", 0).scanline_callback().set(FUNC(wpc_dcs_state::scanline_irq)); + WPC_SHIFT(config, "shift"); + WPC_DMD(config, "dmd").scanline_callback().set(FUNC(wpc_dcs_state::scanline_irq)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - DCS_AUDIO_8K(config, m_dcs, 0); + DCS_AUDIO_8K(config, m_dcs); } /*---------------------- diff --git a/src/mame/pinball/wpc_dmd.cpp b/src/mame/pinball/wpc_dmd.cpp index ce304b8629e..9fcb9c3a35a 100644 --- a/src/mame/pinball/wpc_dmd.cpp +++ b/src/mame/pinball/wpc_dmd.cpp @@ -19,7 +19,7 @@ void wpc_dmd_device::registers(address_map &map) } -wpc_dmd_device::wpc_dmd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wpc_dmd_device::wpc_dmd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WPC_DMD, tag, owner, clock), scanline_cb(*this), dmd0(*this, ":dmd0"), diff --git a/src/mame/pinball/wpc_dmd.h b/src/mame/pinball/wpc_dmd.h index a36b1192ae8..5d4a9d8d98e 100644 --- a/src/mame/pinball/wpc_dmd.h +++ b/src/mame/pinball/wpc_dmd.h @@ -13,7 +13,7 @@ class wpc_dmd_device : public device_t { public: - wpc_dmd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wpc_dmd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~wpc_dmd_device(); void registers(address_map &map); diff --git a/src/mame/pinball/wpc_dot.cpp b/src/mame/pinball/wpc_dot.cpp index 35747e3284d..d7f6e1296c1 100644 --- a/src/mame/pinball/wpc_dot.cpp +++ b/src/mame/pinball/wpc_dot.cpp @@ -312,10 +312,10 @@ uint32_t wpc_dot_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma void wpc_dot_state::wpc_dot(machine_config &config) { /* basic machine hardware */ - M6809(config, m_maincpu, 2000000); + M6809(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &wpc_dot_state::wpc_dot_map); - WPCASIC(config, m_wpc, 0); + WPCASIC(config, m_wpc); m_wpc->irq_callback().set(FUNC(wpc_dot_state::irq_w)); m_wpc->firq_callback().set(FUNC(wpc_dot_state::firq_w)); m_wpc->bank_write().set(FUNC(wpc_dot_state::rombank_w)); diff --git a/src/mame/pinball/wpc_flip1.cpp b/src/mame/pinball/wpc_flip1.cpp index 2e00aa8baf6..708996606b9 100644 --- a/src/mame/pinball/wpc_flip1.cpp +++ b/src/mame/pinball/wpc_flip1.cpp @@ -180,10 +180,10 @@ void wpc_flip1_state::init_wpc_flip1() void wpc_flip1_state::wpc_flip1(machine_config &config) { /* basic machine hardware */ - M6809(config, m_maincpu, 2000000); + M6809(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &wpc_flip1_state::wpc_flip1_map); - WPCASIC(config, m_wpc, 0); + WPCASIC(config, m_wpc); m_wpc->irq_callback().set(FUNC(wpc_flip1_state::irq_w)); m_wpc->firq_callback().set(FUNC(wpc_flip1_state::firq_w)); m_wpc->bank_write().set(FUNC(wpc_flip1_state::rombank_w)); diff --git a/src/mame/pinball/wpc_flip2.cpp b/src/mame/pinball/wpc_flip2.cpp index 35d7f271053..5650eeb1ce0 100644 --- a/src/mame/pinball/wpc_flip2.cpp +++ b/src/mame/pinball/wpc_flip2.cpp @@ -222,10 +222,10 @@ void wpc_flip2_state::init_wpc_flip2() void wpc_flip2_state::wpc_flip2(machine_config &config) { /* basic machine hardware */ - M6809(config, m_maincpu, 2000000); + M6809(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &wpc_flip2_state::wpc_flip2_map); - WPCASIC(config, m_wpc, 0); + WPCASIC(config, m_wpc); m_wpc->irq_callback().set(FUNC(wpc_flip2_state::irq_w)); m_wpc->firq_callback().set(FUNC(wpc_flip2_state::firq_w)); m_wpc->bank_write().set(FUNC(wpc_flip2_state::rombank_w)); diff --git a/src/mame/pinball/wpc_lamp.cpp b/src/mame/pinball/wpc_lamp.cpp index 1222d98c24c..a245a791a24 100644 --- a/src/mame/pinball/wpc_lamp.cpp +++ b/src/mame/pinball/wpc_lamp.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(WPC_LAMP, wpc_lamp_device, "wpc_lamp", "Williams Pinball Controller Lamp Control") -wpc_lamp_device::wpc_lamp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wpc_lamp_device::wpc_lamp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WPC_LAMP, tag, owner, clock) { names = nullptr; diff --git a/src/mame/pinball/wpc_lamp.h b/src/mame/pinball/wpc_lamp.h index 1e32196e44d..2d7c8b89b1d 100644 --- a/src/mame/pinball/wpc_lamp.h +++ b/src/mame/pinball/wpc_lamp.h @@ -11,7 +11,7 @@ class wpc_lamp_device : public device_t { public: - wpc_lamp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wpc_lamp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~wpc_lamp_device(); void row_w(uint8_t data); diff --git a/src/mame/pinball/wpc_out.cpp b/src/mame/pinball/wpc_out.cpp index 3f0ceef78ac..dc33c65e4fb 100644 --- a/src/mame/pinball/wpc_out.cpp +++ b/src/mame/pinball/wpc_out.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(WPC_OUT, wpc_out_device, "wpc_out", "Williams Pinball Controller Output Control") -wpc_out_device::wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wpc_out_device::wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WPC_OUT, tag, owner, clock) { names = nullptr; diff --git a/src/mame/pinball/wpc_out.h b/src/mame/pinball/wpc_out.h index e51a9722161..dc850a85007 100644 --- a/src/mame/pinball/wpc_out.h +++ b/src/mame/pinball/wpc_out.h @@ -13,13 +13,13 @@ class wpc_out_device : public device_t public: typedef delegate handler_t; - wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int gi_count) + wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int gi_count) : wpc_out_device(mconfig, tag, owner, clock) { set_gi_count(gi_count); } - wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~wpc_out_device(); void out_w(offs_t offset, uint8_t data); diff --git a/src/mame/pinball/wpc_pic.cpp b/src/mame/pinball/wpc_pic.cpp index 9bafede8489..5b235a4c2e0 100644 --- a/src/mame/pinball/wpc_pic.cpp +++ b/src/mame/pinball/wpc_pic.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(WPC_PIC, wpc_pic_device, "wpc_pic", "Williams Pinball Controller PIC Security") -wpc_pic_device::wpc_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wpc_pic_device::wpc_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WPC_PIC, tag, owner, clock), swarray(*this, ":X%u", 0) { diff --git a/src/mame/pinball/wpc_pic.h b/src/mame/pinball/wpc_pic.h index 2f72c7da044..1266b59a520 100644 --- a/src/mame/pinball/wpc_pic.h +++ b/src/mame/pinball/wpc_pic.h @@ -11,7 +11,7 @@ class wpc_pic_device : public device_t { public: - wpc_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wpc_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~wpc_pic_device(); uint8_t read(); diff --git a/src/mame/pinball/wpc_s.cpp b/src/mame/pinball/wpc_s.cpp index e21c6119e04..287d8ed5b6b 100644 --- a/src/mame/pinball/wpc_s.cpp +++ b/src/mame/pinball/wpc_s.cpp @@ -2050,14 +2050,14 @@ void wpc_s_state::wpc_s(machine_config &config) TIMER(config, "zero_crossing").configure_periodic(FUNC(wpc_s_state::zc_timer), attotime::from_hz(120)); // Mains power zero crossing - WPC_SHIFT(config, "shift", 0); - WPC_PIC(config, m_pic, 0); - WPC_LAMP(config, m_lamp, 0); + WPC_SHIFT(config, "shift"); + WPC_PIC(config, m_pic); + WPC_LAMP(config, m_lamp); WPC_OUT(config, m_out, 0, 5); - WPC_DMD(config, "dmd", 0).scanline_callback().set(FUNC(wpc_s_state::scanline_irq)); + WPC_DMD(config, "dmd").scanline_callback().set(FUNC(wpc_s_state::scanline_irq)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - DCS_AUDIO_8K(config, m_dcs, 0); + DCS_AUDIO_8K(config, m_dcs); } /*----------------- diff --git a/src/mame/pinball/wpc_shift.cpp b/src/mame/pinball/wpc_shift.cpp index 676436ae15e..a3a28b43e5d 100644 --- a/src/mame/pinball/wpc_shift.cpp +++ b/src/mame/pinball/wpc_shift.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(WPC_SHIFT, wpc_shift_device, "wpc_shift", "Williams Pinball Controller Shifter") -wpc_shift_device::wpc_shift_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wpc_shift_device::wpc_shift_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WPC_SHIFT, tag, owner, clock) { } diff --git a/src/mame/pinball/wpc_shift.h b/src/mame/pinball/wpc_shift.h index 1708ca2e466..c758e9ee5af 100644 --- a/src/mame/pinball/wpc_shift.h +++ b/src/mame/pinball/wpc_shift.h @@ -9,7 +9,7 @@ class wpc_shift_device : public device_t { public: - wpc_shift_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wpc_shift_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~wpc_shift_device(); void registers(address_map &map); diff --git a/src/mame/pinball/wpcsnd.cpp b/src/mame/pinball/wpcsnd.cpp index d8fee1b5138..86be318328c 100644 --- a/src/mame/pinball/wpcsnd.cpp +++ b/src/mame/pinball/wpcsnd.cpp @@ -50,7 +50,7 @@ DEFINE_DEVICE_TYPE(WPCSND, wpcsnd_device, "wpcsnd", "Williams WPC Sound") -wpcsnd_device::wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wpcsnd_device::wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WPCSND, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "bgcpu") @@ -107,13 +107,13 @@ void wpcsnd_device::device_add_mconfig(machine_config &config) m_cpu->set_addrmap(AS_PROGRAM, &wpcsnd_device::wpcsnd_map); config.set_maximum_quantum(attotime::from_hz(50)); - YM2151(config, m_ym2151, 3580000); + YM2151(config, m_ym2151, XTAL::u(3580000)); m_ym2151->irq_handler().set(FUNC(wpcsnd_device::ym2151_irq_w)); m_ym2151->add_route(ALL_OUTPUTS, *this, 0.25); - AD7524(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); + AD7524(config, "dac").add_route(ALL_OUTPUTS, *this, 0.25); - HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.5); + HC55516(config, m_hc55516).add_route(ALL_OUTPUTS, *this, 0.5); } diff --git a/src/mame/pinball/wpcsnd.h b/src/mame/pinball/wpcsnd.h index 8ca0bd55a25..3339dcffce1 100644 --- a/src/mame/pinball/wpcsnd.h +++ b/src/mame/pinball/wpcsnd.h @@ -20,7 +20,7 @@ class wpcsnd_device : public device_t, public device_mixer_interface { public: // construction/destruction - wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + wpcsnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); required_device m_cpu; required_device m_ym2151; diff --git a/src/mame/pinball/zac_1.cpp b/src/mame/pinball/zac_1.cpp index a85457e2c79..fe16f5c4f9c 100644 --- a/src/mame/pinball/zac_1.cpp +++ b/src/mame/pinball/zac_1.cpp @@ -660,7 +660,7 @@ void zac_1_state::zac1(machine_config &config) { config_base(config); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - CLOCK(config, m_monotone, 0); // basic audio + CLOCK(config, m_monotone); // basic audio m_monotone->signal_handler().set(m_speaker, FUNC(speaker_sound_device::level_w)); } @@ -673,7 +673,7 @@ void zac_1_state::zac2(machine_config &config) m_audiocpu->set_addrmap(AS_IO, &zac_1_state::audio_io); m_audiocpu->t1_in_cb().set(FUNC(zac_1_state::audio_t1_r)); m_audiocpu->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w)); - MC1408(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.275); + MC1408(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.275); GENERIC_LATCH_8(config, m_soundlatch); } @@ -760,7 +760,7 @@ void zac_1_state::locomotp(machine_config &config) noise.output_callback().set(FUNC(zac_1_state::noise_w)); // 555 timer, 1277 Hz, merges with noise to make a steam whistle - CLOCK(config, m_astable, 0); + CLOCK(config, m_astable); m_astable->signal_handler().set(FUNC(zac_1_state::clock_w)); } diff --git a/src/mame/playmark/playmark.cpp b/src/mame/playmark/playmark.cpp index 7452cadcbc6..badea846754 100644 --- a/src/mame/playmark/playmark.cpp +++ b/src/mame/playmark/playmark.cpp @@ -1082,11 +1082,11 @@ void playmark_state::machine_reset() void playmark_state::bigtwin(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 12000000); // 12 MHz + M68000(config, m_maincpu, XTAL::u(12000000)); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::bigtwin_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq2_line_hold)); - PIC16C57(config, m_audio_pic, 12000000); + PIC16C57(config, m_audio_pic, XTAL::u(12000000)); m_audio_pic->write_a().set(FUNC(playmark_state::playmark_oki_banking_w)); m_audio_pic->read_b().set(FUNC(playmark_state::playmark_snd_command_r)); m_audio_pic->write_b().set(FUNC(playmark_state::playmark_oki_w)); @@ -1110,7 +1110,7 @@ void playmark_state::bigtwin(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &playmark_state::oki_map); } @@ -1146,7 +1146,7 @@ void playmark_state::bigtwinb(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &playmark_state::oki_map); } @@ -1154,7 +1154,7 @@ void playmark_state::bigtwinb(machine_config &config) void playmark_state::wbeachvl_base(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 12000000); // 12 MHz + M68000(config, m_maincpu, XTAL::u(12000000)); // 12 MHz m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::wbeachvl_main_map); m_maincpu->set_vblank_int("screen", FUNC(playmark_state::irq2_line_hold)); @@ -1177,7 +1177,7 @@ void playmark_state::wbeachvl_base(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &playmark_state::oki_map); } @@ -1207,7 +1207,7 @@ void playmark_state::wbeachvl_mcs(machine_config &config) m_audio_mcs->port_in_cb<3>().set(FUNC(playmark_state::wbeachvla_snd_command_r)); m_audio_mcs->port_out_cb<3>().set(FUNC(playmark_state::playmark_oki_w)); - I87C51(config, "extracpu", 12'000'000); // actually S87C751, clock unverified, on a sub PCB near a 12 MHz XTAL + I87C51(config, "extracpu", XTAL::u(12'000'000)); // actually S87C751, clock unverified, on a sub PCB near a 12 MHz XTAL GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audio_mcs, MCS51_INT1_LINE, HOLD_LINE); diff --git a/src/mame/playmark/sderby.cpp b/src/mame/playmark/sderby.cpp index ab4678d478e..709cfd9cb7a 100644 --- a/src/mame/playmark/sderby.cpp +++ b/src/mame/playmark/sderby.cpp @@ -807,7 +807,7 @@ GFXDECODE_END void sderby_state::sderby(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::sderby_map); m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold)); @@ -825,12 +825,12 @@ void sderby_state::sderby(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000); SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } void sderby_state::sderbya(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::sderbya_map); m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold)); @@ -848,12 +848,12 @@ void sderby_state::sderbya(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000); SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } void sderby_state::luckboom(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::luckboom_map); m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq4_line_hold)); @@ -871,12 +871,12 @@ void sderby_state::luckboom(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000); SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } void sderby_state::spacewin(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::spacewin_map); m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold)); @@ -894,7 +894,7 @@ void sderby_state::spacewin(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000); SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } void sderby_state::shinygld(machine_config &config) @@ -922,7 +922,7 @@ void sderby_state::shinygld(machine_config &config) void sderby_state::pmroulet(machine_config &config) { - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::roulette_map); m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold)); @@ -940,7 +940,7 @@ void sderby_state::pmroulet(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000); SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } void sderby_state::magictch(machine_config &config) diff --git a/src/mame/playmark/sslam.cpp b/src/mame/playmark/sslam.cpp index 0e9f57ffcee..c8d071f4818 100644 --- a/src/mame/playmark/sslam.cpp +++ b/src/mame/playmark/sslam.cpp @@ -719,11 +719,11 @@ void powerbls_state::machine_start() void sslam_state::sslam(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* 12 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &sslam_state::sslam_program_map); m_maincpu->set_vblank_int("screen", FUNC(sslam_state::irq2_line_hold)); - I8051(config, m_audiocpu, 12000000); + I8051(config, m_audiocpu, XTAL::u(12000000)); m_audiocpu->set_disable(); /* Internal code is not dumped - 2 boards were protected */ /* video hardware */ @@ -741,18 +741,18 @@ void sslam_state::sslam(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 0.80); } void powerbls_state::powerbls(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* 12 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &powerbls_state::powerbls_map); m_maincpu->set_vblank_int("screen", FUNC(sslam_state::irq2_line_hold)); - I80C51(config, m_audiocpu, 12000000); /* 83C751 */ + I80C51(config, m_audiocpu, XTAL::u(12000000)); /* 83C751 */ m_audiocpu->port_out_cb<1>().set(FUNC(powerbls_state::playmark_snd_control_w)); m_audiocpu->port_in_cb<3>().set(FUNC(powerbls_state::playmark_snd_command_r)); m_audiocpu->port_out_cb<3>().set(FUNC(powerbls_state::playmark_oki_w)); @@ -774,7 +774,7 @@ void powerbls_state::powerbls(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); /* verified on original PCB */ + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); /* verified on original PCB */ m_oki->add_route(ALL_OUTPUTS, "mono", 0.80); } diff --git a/src/mame/positron/positron.cpp b/src/mame/positron/positron.cpp index 5342979ee2c..e2d7fe0cc46 100644 --- a/src/mame/positron/positron.cpp +++ b/src/mame/positron/positron.cpp @@ -867,7 +867,7 @@ void positron_state::positron(machine_config &config) acia1.rts_handler().set("serial1", FUNC(rs232_port_device::write_rts)); acia1.irq_handler().set("irqs", FUNC(input_merger_device::in_w<1>)); - clock_device &acia1_clock(CLOCK(config, "acia1_clock", 4800)); + clock_device &acia1_clock(CLOCK(config, "acia1_clock", XTAL::u(4800))); acia1_clock.signal_handler().set("acia1", FUNC(acia6850_device::write_txc)); acia1_clock.signal_handler().append("acia1", FUNC(acia6850_device::write_rxc)); @@ -880,7 +880,7 @@ void positron_state::positron(machine_config &config) acia2.rts_handler().set("serial2", FUNC(rs232_port_device::write_rts)); acia2.irq_handler().set("irqs", FUNC(input_merger_device::in_w<2>)); - clock_device &acia2_clock(CLOCK(config, "acia2_clock", 4800)); + clock_device &acia2_clock(CLOCK(config, "acia2_clock", XTAL::u(4800))); acia2_clock.signal_handler().set("acia2", FUNC(acia6850_device::write_txc)); acia2_clock.signal_handler().append("acia2", FUNC(acia6850_device::write_rxc)); @@ -893,7 +893,7 @@ void positron_state::positron(machine_config &config) acia3.rts_handler().set("serial3", FUNC(rs232_port_device::write_rts)); acia3.irq_handler().set("irqs", FUNC(input_merger_device::in_w<3>)); - clock_device &acia3_clock(CLOCK(config, "acia3_clock", 4800)); + clock_device &acia3_clock(CLOCK(config, "acia3_clock", XTAL::u(4800))); acia3_clock.signal_handler().set("acia3", FUNC(acia6850_device::write_txc)); acia3_clock.signal_handler().append("acia3", FUNC(acia6850_device::write_rxc)); @@ -906,7 +906,7 @@ void positron_state::positron(machine_config &config) acia4.rts_handler().set("serial4", FUNC(rs232_port_device::write_rts)); acia4.irq_handler().set("irqs", FUNC(input_merger_device::in_w<4>)); - clock_device &acia4_clock(CLOCK(config, "acia4_clock", 4800)); + clock_device &acia4_clock(CLOCK(config, "acia4_clock", XTAL::u(4800))); acia4_clock.signal_handler().set("acia4", FUNC(acia6850_device::write_txc)); acia4_clock.signal_handler().append("acia4", FUNC(acia6850_device::write_rxc)); @@ -927,7 +927,7 @@ void positron_state::positron(machine_config &config) hpib.atn_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_atn_w)); hpib.ren_write_cb().set(IEEE488_TAG, FUNC(ieee488_device::host_ren_w)); - //DS75160A(config, m_ieee1, 0); + //DS75160A(config, m_ieee1); //m_ieee1->read_callback().set(IEEE488_TAG, FUNC(ieee488_device::dio_r)); //m_ieee1->write_callback().set(IEEE488_TAG, FUNC(ieee488_device::host_dio_w)); diff --git a/src/mame/promat/gstream.cpp b/src/mame/promat/gstream.cpp index ec37ec2c80e..51432e92365 100644 --- a/src/mame/promat/gstream.cpp +++ b/src/mame/promat/gstream.cpp @@ -855,9 +855,9 @@ void gstream_state::gstream(machine_config &config) SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki[0], 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ + OKIM6295(config, m_oki[0], XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ - OKIM6295(config, m_oki[1], 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ + OKIM6295(config, m_oki[1], XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ } void gstream_state::x2222(machine_config &config) @@ -886,7 +886,7 @@ void gstream_state::x2222(machine_config &config) SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki[0], 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ + OKIM6295(config, m_oki[0], XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */ } diff --git a/src/mame/psikyo/psikyo.cpp b/src/mame/psikyo/psikyo.cpp index 332450299f9..9843a9f5c1d 100644 --- a/src/mame/psikyo/psikyo.cpp +++ b/src/mame/psikyo/psikyo.cpp @@ -1123,7 +1123,7 @@ void psikyo_state::s1945n(machine_config &config) void psikyo_state::s1945bl(machine_config &config) /* Bootleg hardware based on the unprotected Japanese Strikers 1945 set */ { /* basic machine hardware */ - M68EC020(config, m_maincpu, 16000000); + M68EC020(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &psikyo_state::psikyo_bootleg_map); m_maincpu->set_vblank_int("screen", FUNC(psikyo_state::irq1_line_hold)); diff --git a/src/mame/psikyo/psikyosh.h b/src/mame/psikyo/psikyosh.h index 12bc214486b..6c7d04c86c8 100644 --- a/src/mame/psikyo/psikyosh.h +++ b/src/mame/psikyo/psikyosh.h @@ -11,7 +11,7 @@ #include "screen.h" -#define MASTER_CLOCK 57272700 // main oscillator frequency +#define MASTER_CLOCK XTAL::u(57272700) // main oscillator frequency /* Psikyo PS6406B */ diff --git a/src/mame/psion/etna.cpp b/src/mame/psion/etna.cpp index fbdadf10347..1edd1df4d55 100644 --- a/src/mame/psion/etna.cpp +++ b/src/mame/psion/etna.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(ETNA, etna_device, "etna", "Psion 5mx ETNA") -etna_device::etna_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +etna_device::etna_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ETNA, tag, owner, clock) , m_eeprom_data_out(*this) { diff --git a/src/mame/psion/etna.h b/src/mame/psion/etna.h index bf332d7eb54..41a9cfb38b8 100644 --- a/src/mame/psion/etna.h +++ b/src/mame/psion/etna.h @@ -18,7 +18,7 @@ class etna_device : public device_t { public: - etna_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + etna_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void regs_w(offs_t offset, uint8_t data); uint8_t regs_r(offs_t offset); diff --git a/src/mame/psion/psion.cpp b/src/mame/psion/psion.cpp index 037d61095f2..2130ade781a 100644 --- a/src/mame/psion/psion.cpp +++ b/src/mame/psion/psion.cpp @@ -572,12 +572,12 @@ void psion_state::psion_2lines(machine_config &config) PALETTE(config, "palette", FUNC(psion_state::psion_palette), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_psion); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 16); /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 1.00); NVRAM(config, "nvram1").set_custom_handler(FUNC(psion_state::nvram_init)); // sys_regs NVRAM(config, "nvram2", nvram_device::DEFAULT_ALL_0); // RAM @@ -585,8 +585,8 @@ void psion_state::psion_2lines(machine_config &config) TIMER(config, "nmi_timer").configure_periodic(FUNC(psion_state::nmi_timer), attotime::from_seconds(1)); /* Datapack */ - PSION_DATAPACK(config, m_pack1, 0); - PSION_DATAPACK(config, m_pack2, 0); + PSION_DATAPACK(config, m_pack1); + PSION_DATAPACK(config, m_pack2); /* Software lists */ SOFTWARE_LIST(config, "pack_list").set_original("psion2"); diff --git a/src/mame/psion/psion5.cpp b/src/mame/psion/psion5.cpp index bb99adbc767..d4f8af62fb7 100644 --- a/src/mame/psion/psion5.cpp +++ b/src/mame/psion/psion5.cpp @@ -942,7 +942,7 @@ INPUT_PORTS_END void psion5mx_state::psion5mx(machine_config &config) { /* basic machine hardware */ - ARM710T(config, m_maincpu, 36000000); // 36MHz, per wikipedia + ARM710T(config, m_maincpu, XTAL::u(36000000)); // 36MHz, per wikipedia m_maincpu->set_addrmap(AS_PROGRAM, &psion5mx_state::main_map); ETNA(config, m_etna); diff --git a/src/mame/psion/psion_pack.cpp b/src/mame/psion/psion_pack.cpp index 104da5ceae9..d9eda25df13 100644 --- a/src/mame/psion/psion_pack.cpp +++ b/src/mame/psion/psion_pack.cpp @@ -64,7 +64,7 @@ DEFINE_DEVICE_TYPE(PSION_DATAPACK, datapack_device, "datapack", "Psion Datapack" // datapack_device - constructor //------------------------------------------------- -datapack_device::datapack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +datapack_device::datapack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PSION_DATAPACK, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/mame/psion/psion_pack.h b/src/mame/psion/psion_pack.h index 81677afc06c..c1b357dc721 100644 --- a/src/mame/psion/psion_pack.h +++ b/src/mame/psion/psion_pack.h @@ -23,7 +23,7 @@ class datapack_device : public device_t, { public: // construction/destruction - datapack_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + datapack_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~datapack_device(); // image-level overrides diff --git a/src/mame/quantel/dpb7000.cpp b/src/mame/quantel/dpb7000.cpp index 718d6b21dac..512a3310153 100644 --- a/src/mame/quantel/dpb7000.cpp +++ b/src/mame/quantel/dpb7000.cpp @@ -3714,16 +3714,16 @@ void dpb7000_state::dpb7000(machine_config &config) INPUT_MERGER_ANY_HIGH(config, m_p_int).output_handler().set_inputline(m_maincpu, 3); - ACIA6850(config, m_acia[0], 0); + ACIA6850(config, m_acia[0]); m_acia[0]->txd_handler().set(m_rs232[0], FUNC(rs232_port_device::write_txd)); m_acia[0]->rts_handler().set(m_rs232[0], FUNC(rs232_port_device::write_rts)); m_acia[0]->irq_handler().set_inputline(m_maincpu, 6); - ACIA6850(config, m_acia[1], 0); + ACIA6850(config, m_acia[1]); m_acia[1]->txd_handler().set(m_tds_duart, FUNC(scn2681_device::rx_a_w)); m_acia[1]->irq_handler().set(m_p_int, FUNC(input_merger_device::in_w<0>)); - ACIA6850(config, m_acia[2], 0); + ACIA6850(config, m_acia[2]); m_acia[2]->txd_handler().set(m_rs232[1], FUNC(rs232_port_device::write_txd)); m_acia[2]->rts_handler().set(m_rs232[1], FUNC(rs232_port_device::write_rts)); m_acia[2]->irq_handler().set(m_p_int, FUNC(input_merger_device::in_w<1>)); diff --git a/src/mame/qume/qvt102.cpp b/src/mame/qume/qvt102.cpp index b8f89f2a6cc..aa339234861 100644 --- a/src/mame/qume/qvt102.cpp +++ b/src/mame/qume/qvt102.cpp @@ -660,7 +660,7 @@ void qvt102_state::qvt102(machine_config &config) m_crtc->set_update_row_callback(FUNC(qvt102_state::crtc_update_row)); m_crtc->out_vsync_callback().set(FUNC(qvt102_state::vsync_w)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set(FUNC(qvt102_state::acia_txd_w)); m_acia->rts_handler().set(FUNC(qvt102_state::acia_rts_w)); m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); diff --git a/src/mame/qume/qvt190.cpp b/src/mame/qume/qvt190.cpp index 03cbf1316f5..3bc870df2ec 100644 --- a/src/mame/qume/qvt190.cpp +++ b/src/mame/qume/qvt190.cpp @@ -120,9 +120,9 @@ void qvt190_state::qvt190(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // V61C16P55L + battery - ACIA6850(config, "acia1", 0); + ACIA6850(config, "acia1"); - ACIA6850(config, "acia2", 0); + ACIA6850(config, "acia2"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(16.6698_MHz_XTAL, 882, 18, 738, 315, 0, 300); diff --git a/src/mame/qume/qvt70.cpp b/src/mame/qume/qvt70.cpp index 36a3f6468f3..7a6410f8eed 100644 --- a/src/mame/qume/qvt70.cpp +++ b/src/mame/qume/qvt70.cpp @@ -384,7 +384,7 @@ void qvt70_state::machine_reset() void qvt70_state::qvt70(machine_config &config) { - Z80(config, m_maincpu, 8'000'000); + Z80(config, m_maincpu, XTAL::u(8'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &qvt70_state::mem_map); m_maincpu->set_addrmap(AS_IO, &qvt70_state::io_map); @@ -400,7 +400,7 @@ void qvt70_state::qvt70(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", chars); - Z80DART(config, "dart", 4'000'000); + Z80DART(config, "dart", XTAL::u(4'000'000)); // dart irq connected to maincpu int // 25-pin (dcd, rxd, txd, dtr, dsr, rts, cts and current loop) diff --git a/src/mame/ramtek/ramtek.cpp b/src/mame/ramtek/ramtek.cpp index b8dfe300fd2..65846afed3b 100644 --- a/src/mame/ramtek/ramtek.cpp +++ b/src/mame/ramtek/ramtek.cpp @@ -45,7 +45,7 @@ // copied from Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -114,7 +114,7 @@ void ramtek_state::video_start() void ramtek_state::ramtek(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_ramtek); + NETLIST_CPU(config, m_maincpu).set_source(netlist_ramtek); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/ramtek/starcrus.cpp b/src/mame/ramtek/starcrus.cpp index f0935f5928d..00d4c152868 100644 --- a/src/mame/ramtek/starcrus.cpp +++ b/src/mame/ramtek/starcrus.cpp @@ -159,7 +159,7 @@ void starcrus_state::starcrus(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(starcrus)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/rare/kinst.cpp b/src/mame/rare/kinst.cpp index fd77e00a27f..8d5fc6be7c4 100644 --- a/src/mame/rare/kinst.cpp +++ b/src/mame/rare/kinst.cpp @@ -703,14 +703,14 @@ void kinst_state::kinst(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(6000000, 390, 0, 320, 261, 0, 240); // preliminary + screen.set_raw(XTAL::u(6000000), 390, 0, 320, 261, 0, 240); // preliminary screen.screen_vblank().set_inputline(m_maincpu, 0); screen.set_screen_update(FUNC(kinst_state::screen_update)); PALETTE(config, m_palette, palette_device::BGR_555); // sound hardware - DCS_AUDIO_2K(config, m_dcs, 0); + DCS_AUDIO_2K(config, m_dcs); } diff --git a/src/mame/rare/xtheball.cpp b/src/mame/rare/xtheball.cpp index 9941a10517e..6dfb6799c67 100644 --- a/src/mame/rare/xtheball.cpp +++ b/src/mame/rare/xtheball.cpp @@ -291,7 +291,7 @@ INPUT_PORTS_END void xtheball_state::xtheball(machine_config &config) { - TMS34010(config, m_maincpu, 40000000); + TMS34010(config, m_maincpu, XTAL::u(40000000)); m_maincpu->set_addrmap(AS_PROGRAM, &xtheball_state::main_map); m_maincpu->set_halt_on_reset(false); m_maincpu->set_pixel_clock(10000000); @@ -323,13 +323,13 @@ void xtheball_state::xtheball(machine_config &config) TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(10000000, 640, 114, 626, 257, 24, 248); + screen.set_raw(XTAL::u(10000000), 640, 114, 626, 257, 24, 248); screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_rgb32)); /* sound hardware */ SPEAKER(config, "speaker").front_center(); - ZN428E(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + ZN428E(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); } diff --git a/src/mame/rca/studio2.cpp b/src/mame/rca/studio2.cpp index e8f73f478b3..eeccf88fcc2 100644 --- a/src/mame/rca/studio2.cpp +++ b/src/mame/rca/studio2.cpp @@ -692,7 +692,7 @@ void studio2_state::studio2_cartslot(machine_config &config) void studio2_state::studio2(machine_config &config) { /* basic machine hardware */ - CDP1802(config, m_maincpu, 1760000); /* the real clock is derived from an oscillator circuit */ + CDP1802(config, m_maincpu, XTAL::u(1760000)); /* the real clock is derived from an oscillator circuit */ m_maincpu->set_addrmap(AS_PROGRAM, &studio2_state::studio2_map); m_maincpu->set_addrmap(AS_IO, &studio2_state::studio2_io_map); m_maincpu->wait_cb().set_constant(1); @@ -704,14 +704,14 @@ void studio2_state::studio2(machine_config &config) /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - CDP1861(config, m_vdc, 1760000).set_screen(m_screen); + CDP1861(config, m_vdc, XTAL::u(1760000)).set_screen(m_screen); m_vdc->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT); m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT); m_vdc->efx_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF1); /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(300)).add_route(ALL_OUTPUTS, "mono", 1.00); studio2_cartslot(config); } @@ -740,7 +740,7 @@ void visicom_state::visicom(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(300)).add_route(ALL_OUTPUTS, "mono", 1.00); GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "visicom_cart", "bin,rom"); @@ -763,7 +763,7 @@ void mpt02_state::mpt02(machine_config &config) /* video/sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 300).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(300)).add_route(ALL_OUTPUTS, "mono", 1.00); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); CDP1864(config, m_cti, 1.75_MHz_XTAL).set_screen(m_screen); diff --git a/src/mame/regnecentralen/rc702.cpp b/src/mame/regnecentralen/rc702.cpp index 7542810fadb..cc1c16b166e 100644 --- a/src/mame/regnecentralen/rc702.cpp +++ b/src/mame/regnecentralen/rc702.cpp @@ -347,7 +347,7 @@ void rc702_state::rc702(machine_config &config) m_maincpu->set_addrmap(AS_IO, &rc702_state::io_map); m_maincpu->set_daisy_config(daisy_chain_intf); - CLOCK(config, "ctc_clock", 614000).signal_handler().set(FUNC(rc702_state::clock_w)); + CLOCK(config, "ctc_clock", XTAL::u(614000)).signal_handler().set(FUNC(rc702_state::clock_w)); Z80CTC(config, m_ctc1, 8_MHz_XTAL / 2); m_ctc1->zc_callback<0>().set("sio1", FUNC(z80dart_device::txca_w)); @@ -379,10 +379,10 @@ void rc702_state::rc702(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:0", floppies, "525qd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); /* Keyboard */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(rc702_state::kbd_put)); - TTL7474(config, m_7474, 0); + TTL7474(config, m_7474); m_7474->output_cb().set(FUNC(rc702_state::q_w)); m_7474->comp_output_cb().set(FUNC(rc702_state::qbar_w)); @@ -404,7 +404,7 @@ void rc702_state::rc702(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 1000).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beep, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/regnecentralen/rc759.cpp b/src/mame/regnecentralen/rc759.cpp index 44de63834be..007768c913f 100644 --- a/src/mame/regnecentralen/rc759.cpp +++ b/src/mame/regnecentralen/rc759.cpp @@ -586,7 +586,7 @@ static void rc759_floppies(device_slot_interface &device) void rc759_state::rc759(machine_config &config) { - I80186(config, m_maincpu, 6000000); + I80186(config, m_maincpu, XTAL::u(6000000)); m_maincpu->set_addrmap(AS_PROGRAM, &rc759_state::rc759_map); m_maincpu->set_addrmap(AS_IO, &rc759_state::rc759_io); m_maincpu->read_slave_ack_callback().set(FUNC(rc759_state::irq_callback)); @@ -635,13 +635,13 @@ void rc759_state::rc759(machine_config &config) m_cas->add_route(ALL_OUTPUTS, "mono", 0.05); // expansion slot - ISBX_SLOT(config, m_isbx, 0, isbx_cards, nullptr); + ISBX_SLOT(config, m_isbx, isbx_cards, nullptr); m_isbx->mintr0().set("maincpu", FUNC(i80186_cpu_device::int1_w)); m_isbx->mintr1().set("maincpu", FUNC(i80186_cpu_device::int3_w)); m_isbx->mdrqt().set("maincpu", FUNC(i80186_cpu_device::drq0_w)); // floppy - WD2797(config, m_fdc, 2000000); + WD2797(config, m_fdc, XTAL::u(2000000)); m_fdc->intrq_wr_callback().set(m_pic, FUNC(pic8259_device::ir0_w)); m_fdc->drq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::drq0_w)); diff --git a/src/mame/regnecentralen/rc759_kbd.cpp b/src/mame/regnecentralen/rc759_kbd.cpp index 4eb5b44e037..89d5313b542 100644 --- a/src/mame/regnecentralen/rc759_kbd.cpp +++ b/src/mame/regnecentralen/rc759_kbd.cpp @@ -151,7 +151,7 @@ ioport_constructor rc759_kbd_hle_device::device_input_ports() const // rc759_kbd_hle_device - constructor //------------------------------------------------- -rc759_kbd_hle_device::rc759_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +rc759_kbd_hle_device::rc759_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RC759_KBD_HLE, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6"), m_int_handler(*this) diff --git a/src/mame/regnecentralen/rc759_kbd.h b/src/mame/regnecentralen/rc759_kbd.h index 2689afc8a8f..02d22166d43 100644 --- a/src/mame/regnecentralen/rc759_kbd.h +++ b/src/mame/regnecentralen/rc759_kbd.h @@ -24,7 +24,7 @@ class rc759_kbd_hle_device : public device_t, protected device_matrix_keyboard_i { public: // construction/destruction - rc759_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + rc759_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/mame/rm/rm380z.cpp b/src/mame/rm/rm380z.cpp index e7a8dcf8e8e..4850cf788ff 100644 --- a/src/mame/rm/rm380z.cpp +++ b/src/mame/rm/rm380z.cpp @@ -273,7 +273,7 @@ void rm380z_state::rm380z(machine_config &config) FLOPPY_CONNECTOR(config, "wd1771:1", rm380z_floppies, "sssd", floppy_image_device::default_mfm_floppy_formats); /* keyboard */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(rm380z_state::keyboard_put)); } @@ -297,7 +297,7 @@ void rm380z_state::rm480z(machine_config &config) // PALETTE(config, "palette", palette_device::MONOCHROME); /* keyboard */ -// generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); +// generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); // keyboard.set_keyboard_callback(FUNC(rm380z_state::keyboard_put)); } diff --git a/src/mame/rm/rmnimbus.cpp b/src/mame/rm/rmnimbus.cpp index e9f915e9753..931592012f8 100644 --- a/src/mame/rm/rmnimbus.cpp +++ b/src/mame/rm/rmnimbus.cpp @@ -108,14 +108,14 @@ void rmnimbus_state::nimbus_iocpu_io(address_map &map) void rmnimbus_state::nimbus(machine_config &config) { /* basic machine hardware */ - I80186(config, m_maincpu, 16000000); // the cpu is a 10Mhz part but the serial clocks are wrong unless it runs at 8Mhz + I80186(config, m_maincpu, XTAL::u(16000000)); // the cpu is a 10Mhz part but the serial clocks are wrong unless it runs at 8Mhz m_maincpu->set_addrmap(AS_PROGRAM, &rmnimbus_state::nimbus_mem); m_maincpu->set_addrmap(AS_IO, &rmnimbus_state::nimbus_io); m_maincpu->read_slave_ack_callback().set(FUNC(rmnimbus_state::cascade_callback)); m_maincpu->tmrout0_handler().set(m_z80sio, FUNC(z80sio_device::rxca_w)); m_maincpu->tmrout1_handler().set(m_z80sio, FUNC(z80sio_device::rxtxcb_w)); - I8031(config, m_iocpu, 11059200); + I8031(config, m_iocpu, XTAL::u(11059200)); m_iocpu->set_addrmap(AS_PROGRAM, &rmnimbus_state::nimbus_iocpu_mem); m_iocpu->set_addrmap(AS_IO, &rmnimbus_state::nimbus_iocpu_io); m_iocpu->port_in_cb<1>().set(FUNC(rmnimbus_state::nimbus_pc8031_port1_r)); @@ -133,7 +133,7 @@ void rmnimbus_state::nimbus(machine_config &config) PALETTE(config, m_palette).set_entries(16); /* Backing storage */ - WD2793(config, m_fdc, 2000000); + WD2793(config, m_fdc, XTAL::u(2000000)); m_fdc->set_force_ready(true); m_fdc->intrq_wr_callback().set(FUNC(rmnimbus_state::nimbus_fdc_intrq_w)); m_fdc->drq_wr_callback().set(FUNC(rmnimbus_state::nimbus_fdc_drq_w)); @@ -169,7 +169,7 @@ void rmnimbus_state::nimbus(machine_config &config) m_ram->set_extra_options("128K,256K,384K,512K,640K,1024K"); /* Peripheral chips */ - Z80SIO(config, m_z80sio, 4000000); // Z0844006PSC (SIO/0) + Z80SIO(config, m_z80sio, XTAL::u(4000000)); // Z0844006PSC (SIO/0) m_z80sio->out_txdb_callback().set("rs232b", FUNC(rs232_port_device::write_txd)); m_z80sio->out_dtrb_callback().set("rs232b", FUNC(rs232_port_device::write_dtr)); m_z80sio->out_rtsb_callback().set("rs232b", FUNC(rs232_port_device::write_rts)); @@ -186,7 +186,7 @@ void rmnimbus_state::nimbus(machine_config &config) EEPROM_93C06_16BIT(config, m_eeprom); - MOS6522(config, m_via, 1000000); + MOS6522(config, m_via, XTAL::u(1000000)); m_via->writepa_handler().set("cent_data_out", FUNC(output_latch_device::write)); m_via->writepb_handler().set(FUNC(rmnimbus_state::nimbus_via_write_portb)); m_via->ca2_handler().set(m_centronics, FUNC(centronics_device::write_strobe)); @@ -200,12 +200,12 @@ void rmnimbus_state::nimbus(machine_config &config) /* sound hardware */ SPEAKER(config, MONO_TAG).front_center(); - ay8910_device &ay8910(AY8910(config, AY8910_TAG, 2000000)); + ay8910_device &ay8910(AY8910(config, AY8910_TAG, XTAL::u(2000000))); ay8910.port_a_write_callback().set(FUNC(rmnimbus_state::nimbus_sound_ay8910_porta_w)); ay8910.port_b_write_callback().set(FUNC(rmnimbus_state::nimbus_sound_ay8910_portb_w)); ay8910.add_route(ALL_OUTPUTS, MONO_TAG, 0.75); - msm5205_device &msm5205(MSM5205(config, MSM5205_TAG, 384000)); + msm5205_device &msm5205(MSM5205(config, MSM5205_TAG, XTAL::u(384000))); msm5205.vck_callback().set(FUNC(rmnimbus_state::nimbus_msm5205_vck)); /* VCK function */ msm5205.set_prescaler_selector(msm5205_device::S48_4B); /* 8 kHz */ msm5205.add_route(ALL_OUTPUTS, MONO_TAG, 0.75); diff --git a/src/mame/rm/rmnkbd.cpp b/src/mame/rm/rmnkbd.cpp index 7316ce28dff..8d1d7da7b76 100644 --- a/src/mame/rm/rmnkbd.cpp +++ b/src/mame/rm/rmnkbd.cpp @@ -119,7 +119,7 @@ INPUT_PORTS_END } // anonymous namespace -rmnimbus_keyboard_device::rmnimbus_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +rmnimbus_keyboard_device::rmnimbus_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : buffered_rs232_device(mconfig, RMNIMBUS_KEYBOARD, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8", "LINE9", "LINEA") { diff --git a/src/mame/rm/rmnkbd.h b/src/mame/rm/rmnkbd.h index 28b6d729120..f7c7ba1695a 100644 --- a/src/mame/rm/rmnkbd.h +++ b/src/mame/rm/rmnkbd.h @@ -9,7 +9,7 @@ class rmnimbus_keyboard_device : public buffered_rs232_device<16U>, protected device_matrix_keyboard_interface<11U> { public: - rmnimbus_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rmnimbus_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; protected: diff --git a/src/mame/robotron/a5105.cpp b/src/mame/robotron/a5105.cpp index 686bfc88113..676ed7cb6e0 100644 --- a/src/mame/robotron/a5105.cpp +++ b/src/mame/robotron/a5105.cpp @@ -608,7 +608,7 @@ void a5105_state::a5105(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 500).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper", XTAL::u(500)).add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ UPD7220(config, m_hgdc, XTAL(15'000'000) / 16); // unk clock @@ -629,7 +629,7 @@ void a5105_state::a5105(machine_config &config) m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); FLOPPY_CONNECTOR(config, "upd765a:0", a5105_floppies, "525qd", a5105_state::floppy_formats); FLOPPY_CONNECTOR(config, "upd765a:1", a5105_floppies, "525qd", a5105_state::floppy_formats); FLOPPY_CONNECTOR(config, "upd765a:2", a5105_floppies, "525qd", a5105_state::floppy_formats); diff --git a/src/mame/robotron/a7150.cpp b/src/mame/robotron/a7150.cpp index c1ed7d1093d..17fe76f2582 100644 --- a/src/mame/robotron/a7150.cpp +++ b/src/mame/robotron/a7150.cpp @@ -486,7 +486,7 @@ void a7150_state::a7150(machine_config &config) i8087.irq().set(m_pic8259, FUNC(pic8259_device::ir0_w)); i8087.busy().set_inputline("maincpu", INPUT_LINE_TEST); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); // IFSP port on processor card @@ -495,7 +495,7 @@ void a7150_state::a7150(machine_config &config) // ppi.out_pb_callback().set("cent_data_out", output_latch_device::write)); ppi.out_pc_callback().set(FUNC(a7150_state::ppi_c_w)); - PIT8253(config, m_pit8253, 0); + PIT8253(config, m_pit8253); m_pit8253->set_clk<0>(14.7456_MHz_XTAL / 4); m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir2_w)); m_pit8253->set_clk<1>(14.7456_MHz_XTAL / 4); @@ -504,7 +504,7 @@ void a7150_state::a7150(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "uart_irq").output_handler().set(m_pic8259, FUNC(pic8259_device::ir4_w)); - I8251(config, m_uart8251, 0); + I8251(config, m_uart8251); m_uart8251->txd_handler().set(FUNC(a7150_state::ifss_write_txd)); m_uart8251->dtr_handler().set(FUNC(a7150_state::ifss_write_dtr)); m_uart8251->rts_handler().set(FUNC(a7150_state::ifss_loopback_w)); @@ -518,7 +518,7 @@ void a7150_state::a7150(machine_config &config) m_rs232->dsr_handler().set(m_uart8251, FUNC(i8251_device::write_dsr)); m_rs232->set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(kbd_rs232_defaults)); - ISBC_215G(config, "isbc_215g", 0, 0x4a, m_maincpu).irq_callback().set(m_pic8259, FUNC(pic8259_device::ir5_w)); + ISBC_215G(config, "isbc_215g", 0x4a, m_maincpu).irq_callback().set(m_pic8259, FUNC(pic8259_device::ir5_w)); // KGS K7070 graphics terminal controlling ABG K7072 framebuffer Z80(config, m_gfxcpu, XTAL(16'000'000) / 4); @@ -526,7 +526,7 @@ void a7150_state::a7150(machine_config &config) m_gfxcpu->set_addrmap(AS_IO, &a7150_state::k7070_cpu_io); m_gfxcpu->set_daisy_config(k7070_daisy_chain); - ADDRESS_MAP_BANK(config, m_video_bankdev, 0); + ADDRESS_MAP_BANK(config, m_video_bankdev); m_video_bankdev->set_map(&a7150_state::k7070_cpu_banked); m_video_bankdev->set_endianness(ENDIANNESS_BIG); m_video_bankdev->set_addr_width(18); diff --git a/src/mame/robotron/k1003.cpp b/src/mame/robotron/k1003.cpp index 861e4880cf3..350842f58d7 100644 --- a/src/mame/robotron/k1003.cpp +++ b/src/mame/robotron/k1003.cpp @@ -235,7 +235,7 @@ void k1003_state::machine_start() void k1003_state::k1003(machine_config &config) { /* basic machine hardware */ - I8008(config, m_maincpu, 800000); + I8008(config, m_maincpu, XTAL::u(800000)); m_maincpu->set_addrmap(AS_PROGRAM, &k1003_state::mem_map); m_maincpu->set_addrmap(AS_IO, &k1003_state::io_map); diff --git a/src/mame/robotron/rt1715.cpp b/src/mame/robotron/rt1715.cpp index ccb00d23fab..192d802852b 100644 --- a/src/mame/robotron/rt1715.cpp +++ b/src/mame/robotron/rt1715.cpp @@ -737,7 +737,7 @@ void rt1715_state::rt1715(machine_config &config) MCFG_MACHINE_RESET_OVERRIDE(rt1715_state, rt1715) /* keyboard */ - z80_device &keyboard(Z80(config, "keyboard", 683000)); + z80_device &keyboard(Z80(config, "keyboard", XTAL::u(683000))); keyboard.set_addrmap(AS_PROGRAM, &rt1715_state::k7658_mem); keyboard.set_addrmap(AS_IO, &rt1715_state::k7658_io); @@ -801,7 +801,7 @@ void rt1715_state::rt1715w(machine_config &config) m_crtc->drq_wr_callback().set(FUNC(rt1715_state::crtc_drq_w)); // operates in polled mode - I8272A(config, m_fdc, 8'000'000 / 4, false); + I8272A(config, m_fdc, XTAL::u(8'000'000) / 4, false); m_fdc->drq_wr_callback().set(m_dma, FUNC(z80dma_device::rdy_w)).invert(); FLOPPY_CONNECTOR(config, "i8272:0", rt1715w_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, "i8272:1", rt1715w_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/robotron/z9001.cpp b/src/mame/robotron/z9001.cpp index 382b750684e..ae067247569 100644 --- a/src/mame/robotron/z9001.cpp +++ b/src/mame/robotron/z9001.cpp @@ -265,10 +265,10 @@ void z9001_state::z9001(machine_config &config) /* Sound */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 800).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper", XTAL::u(800)).add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(z9001_state::kbd_put)); TIMER(config, "z9001_timer").configure_periodic(FUNC(z9001_state::timer_callback), attotime::from_msec(10)); diff --git a/src/mame/rockwell/aim65.cpp b/src/mame/rockwell/aim65.cpp index b3f158e8a1f..1e00601a5e7 100644 --- a/src/mame/rockwell/aim65.cpp +++ b/src/mame/rockwell/aim65.cpp @@ -268,7 +268,7 @@ void aim65_state::aim65(machine_config &config) MOS6522(config, m_via1, AIM65_CLOCK); m_via1->irq_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set([this] (u8 data) { aim65_state::u1_pa_w(data); }); m_pia->writepb_handler().set([this] (u8 data) { aim65_state::u1_pb_w(data); }); diff --git a/src/mame/rockwell/aim65_40.cpp b/src/mame/rockwell/aim65_40.cpp index ccb2f04d9b5..f8e3ae78e2e 100644 --- a/src/mame/rockwell/aim65_40.cpp +++ b/src/mame/rockwell/aim65_40.cpp @@ -126,7 +126,7 @@ INPUT_PORTS_END void aim65_40_state::aim65_40(machine_config &config) { /* basic machine hardware */ - m6502_device &cpu(M6502(config, M6502_TAG, 1000000)); + m6502_device &cpu(M6502(config, M6502_TAG, XTAL::u(1000000))); cpu.set_addrmap(AS_PROGRAM, &aim65_40_state::mem_map); /* video hardware */ @@ -135,11 +135,11 @@ void aim65_40_state::aim65_40(machine_config &config) /* sound hardware */ /* devices */ - MOS6522(config, M6522_0_TAG, 1000000); - MOS6522(config, M6522_1_TAG, 1000000); - MOS6522(config, M6522_2_TAG, 1000000); + MOS6522(config, M6522_0_TAG, XTAL::u(1000000)); + MOS6522(config, M6522_1_TAG, XTAL::u(1000000)); + MOS6522(config, M6522_2_TAG, XTAL::u(1000000)); - mos6551_device &acia(MOS6551(config, M6551_TAG, 0)); + mos6551_device &acia(MOS6551(config, M6551_TAG)); acia.set_xtal(1.8432_MHz_XTAL); acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); acia.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/roland/alphajuno.cpp b/src/mame/roland/alphajuno.cpp index 6de2cfe79cc..d47f16c6951 100644 --- a/src/mame/roland/alphajuno.cpp +++ b/src/mame/roland/alphajuno.cpp @@ -139,7 +139,7 @@ void alphajuno_state::ajuno1(machine_config &config) PALETTE(config, "palette", FUNC(alphajuno_state::palette_init), 2); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 8); m_lcdc->set_pixel_update_cb(FUNC(alphajuno_state::lcd_pixel_update)); m_lcdc->set_busy_factor(0.005f); @@ -178,7 +178,7 @@ void alphajuno_state::mks50(machine_config &config) PALETTE(config, "palette", FUNC(alphajuno_state::palette_init), 2); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 8); m_lcdc->set_pixel_update_cb(FUNC(alphajuno_state::lcd_pixel_update)); m_lcdc->set_busy_factor(0.05f); diff --git a/src/mame/roland/bu3905.cpp b/src/mame/roland/bu3905.cpp index 2f893fad8bc..602bd74b584 100644 --- a/src/mame/roland/bu3905.cpp +++ b/src/mame/roland/bu3905.cpp @@ -16,7 +16,7 @@ // device type definition DEFINE_DEVICE_TYPE(BU3905, bu3905_device, "bu3905", "Roland BU3905S R11-0006 Output Assigner") -bu3905_device::bu3905_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +bu3905_device::bu3905_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BU3905, tag, owner, clock) { } diff --git a/src/mame/roland/bu3905.h b/src/mame/roland/bu3905.h index b1c70f95721..d45633e0f4c 100644 --- a/src/mame/roland/bu3905.h +++ b/src/mame/roland/bu3905.h @@ -41,7 +41,7 @@ class bu3905_device : public device_t { public: // construction/destruction - bu3905_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + bu3905_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void write(offs_t offset, u8 data); diff --git a/src/mame/roland/jx8p_synth.cpp b/src/mame/roland/jx8p_synth.cpp index 3a2513715f6..516f055dc80 100644 --- a/src/mame/roland/jx8p_synth.cpp +++ b/src/mame/roland/jx8p_synth.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(JX8P_SYNTH, jx8p_synth_device, "jx8p_synth", "Roland JX-8P Sy DEFINE_DEVICE_TYPE(SUPERJX_SYNTH, superjx_synth_device, "superjx_synth", "Roland Super JX Synthesizer Board") -jx8p_synth_device::jx8p_synth_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +jx8p_synth_device::jx8p_synth_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_synthcpu(*this, "synthcpu") , m_ramio(*this, "ramio") @@ -21,12 +21,12 @@ jx8p_synth_device::jx8p_synth_device(const machine_config &mconfig, device_type { } -jx8p_synth_device::jx8p_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +jx8p_synth_device::jx8p_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jx8p_synth_device(mconfig, JX8P_SYNTH, tag, owner, clock) { } -superjx_synth_device::superjx_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +superjx_synth_device::superjx_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jx8p_synth_device(mconfig, SUPERJX_SYNTH, tag, owner, clock) { } @@ -77,7 +77,7 @@ void jx8p_synth_device::device_add_mconfig(machine_config &config) m_synthcpu->set_addrmap(AS_PROGRAM, &jx8p_synth_device::prog_map); m_synthcpu->set_addrmap(AS_IO, &jx8p_synth_device::ext_map); - I8155(config, m_ramio, 0); // µPD8155HC + I8155(config, m_ramio); // µPD8155HC m_ramio->out_pa_callback().set(FUNC(jx8p_synth_device::prescale_w)); for (auto &pit : m_pit) @@ -90,7 +90,7 @@ void superjx_synth_device::device_add_mconfig(machine_config &config) m_synthcpu->set_addrmap(AS_PROGRAM, &superjx_synth_device::prog_map); m_synthcpu->set_addrmap(AS_IO, &superjx_synth_device::ext_map); - I8155(config, m_ramio, 0); // µPD8155HC-2 + I8155(config, m_ramio); // µPD8155HC-2 m_ramio->out_pa_callback().set(FUNC(superjx_synth_device::prescale_w)); for (auto &pit : m_pit) diff --git a/src/mame/roland/jx8p_synth.h b/src/mame/roland/jx8p_synth.h index ddb1b9405ef..f7ba71be0c7 100644 --- a/src/mame/roland/jx8p_synth.h +++ b/src/mame/roland/jx8p_synth.h @@ -14,10 +14,10 @@ class jx8p_synth_device : public device_t { public: - jx8p_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + jx8p_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - jx8p_synth_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + jx8p_synth_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; @@ -36,7 +36,7 @@ protected: class superjx_synth_device : public jx8p_synth_device { public: - superjx_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + superjx_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/roland/mb62h195.cpp b/src/mame/roland/mb62h195.cpp index 7e8a0671c34..908a64780b0 100644 --- a/src/mame/roland/mb62h195.cpp +++ b/src/mame/roland/mb62h195.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(MB62H195, mb62h195_device, "mb62h195", "Roland MB62H195 I/O") // mb62h195_device - constructor //------------------------------------------------- -mb62h195_device::mb62h195_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb62h195_device::mb62h195_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB62H195, tag, owner, clock) , m_lc_callback(*this) , m_r_callback(*this) diff --git a/src/mame/roland/mb62h195.h b/src/mame/roland/mb62h195.h index 4ceb81f4533..8cc4e000b83 100644 --- a/src/mame/roland/mb62h195.h +++ b/src/mame/roland/mb62h195.h @@ -21,7 +21,7 @@ class mb62h195_device : public device_t { public: // device type constructor - mb62h195_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mb62h195_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto lc_callback() { return m_lc_callback.bind(); } diff --git a/src/mame/roland/mb63h114.cpp b/src/mame/roland/mb63h114.cpp index 6a22b28c2ea..156ccd53c9e 100644 --- a/src/mame/roland/mb63h114.cpp +++ b/src/mame/roland/mb63h114.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(MB63H114, mb63h114_device, "mb63h114", "Roland MB63H114 Multi // mb63h114_device - constructor //------------------------------------------------- -mb63h114_device::mb63h114_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb63h114_device::mb63h114_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB63H114, tag, owner, clock) { } diff --git a/src/mame/roland/mb63h114.h b/src/mame/roland/mb63h114.h index 10e96585b85..4367e181591 100644 --- a/src/mame/roland/mb63h114.h +++ b/src/mame/roland/mb63h114.h @@ -21,7 +21,7 @@ class mb63h114_device : public device_t { public: // device type constructor - mb63h114_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mb63h114_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // CPU write handler void xst_w(u8 data); diff --git a/src/mame/roland/mb63h149.cpp b/src/mame/roland/mb63h149.cpp index b1091768c13..374bc517622 100644 --- a/src/mame/roland/mb63h149.cpp +++ b/src/mame/roland/mb63h149.cpp @@ -35,13 +35,13 @@ DEFINE_DEVICE_TYPE(MB63H130, mb63h130_device, "mb63h130", "Roland MB63H130 Key A // mb63h149_device - constructor //------------------------------------------------- -mb63h149_device::mb63h149_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +mb63h149_device::mb63h149_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_int_callback(*this) { } -mb63h149_device::mb63h149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb63h149_device::mb63h149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb63h149_device(mconfig, MB63H149, tag, owner, clock) { } @@ -51,7 +51,7 @@ mb63h149_device::mb63h149_device(const machine_config &mconfig, const char *tag, // mb63h130_device - constructor //------------------------------------------------- -mb63h130_device::mb63h130_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb63h130_device::mb63h130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb63h149_device(mconfig, MB63H130, tag, owner, clock) { } diff --git a/src/mame/roland/mb63h149.h b/src/mame/roland/mb63h149.h index 7122e402984..18df75d8e0a 100644 --- a/src/mame/roland/mb63h149.h +++ b/src/mame/roland/mb63h149.h @@ -21,7 +21,7 @@ class mb63h149_device : public device_t { public: // device type constructor - mb63h149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mb63h149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto int_callback() { return m_int_callback.bind(); } @@ -31,7 +31,7 @@ public: void write(offs_t offset, u8 data); protected: - mb63h149_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + mb63h149_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-specific overrides virtual void device_resolve_objects() override; @@ -49,7 +49,7 @@ class mb63h130_device : public mb63h149_device { public: // device type constructor - mb63h130_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mb63h130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/mame/roland/mb87013.cpp b/src/mame/roland/mb87013.cpp index 2ba29e35fe3..f373c044390 100644 --- a/src/mame/roland/mb87013.cpp +++ b/src/mame/roland/mb87013.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(MB87013, mb87013_device, "mb87013", "Roland MB87013 QDC") // mb87013_device - constructor //------------------------------------------------- -mb87013_device::mb87013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb87013_device::mb87013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB87013, tag, owner, clock) , m_sio_rd_callback(*this) , m_sio_wr_callback(*this) diff --git a/src/mame/roland/mb87013.h b/src/mame/roland/mb87013.h index 065efeec909..e9630a17100 100644 --- a/src/mame/roland/mb87013.h +++ b/src/mame/roland/mb87013.h @@ -44,7 +44,7 @@ class mb87013_device : public device_t { public: // device type constructor - mb87013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mb87013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::DISK; } diff --git a/src/mame/roland/pg200.cpp b/src/mame/roland/pg200.cpp index ce8954b6b0e..5872c8737a6 100644 --- a/src/mame/roland/pg200.cpp +++ b/src/mame/roland/pg200.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(PG200, pg200_device, "pg200", "Roland PG-200 Programmer") -pg200_device::pg200_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pg200_device::pg200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PG200, tag, owner, clock) , m_pgcpu(*this, "pgcpu") { diff --git a/src/mame/roland/pg200.h b/src/mame/roland/pg200.h index 5e2cdb62627..d1e168f6abb 100644 --- a/src/mame/roland/pg200.h +++ b/src/mame/roland/pg200.h @@ -10,7 +10,7 @@ class pg200_device : public device_t { public: - pg200_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + pg200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; diff --git a/src/mame/roland/roland_cm32p.cpp b/src/mame/roland/roland_cm32p.cpp index 5561ccb3490..ba1f971a83e 100644 --- a/src/mame/roland/roland_cm32p.cpp +++ b/src/mame/roland/roland_cm32p.cpp @@ -649,7 +649,7 @@ void cm32p_state::cm32p(machine_config &config) screen.set_visarea(0, 16*6-2, 0, (16*6-1)*3/4-1); screen.set_palette("palette"); PALETTE(config, "palette", FUNC(cm32p_state::mt32_palette), 2); - MSM6222B_01(config, lcd, 0); + MSM6222B_01(config, lcd); generic_cartslot_device &cardslot(GENERIC_CARTSLOT(config, "cardslot", generic_romram_plain_slot, "u110_card", "bin")); cardslot.set_device_load(FUNC(cm32p_state::card_load)); diff --git a/src/mame/roland/roland_d10.cpp b/src/mame/roland/roland_d10.cpp index 29c05b79c1d..18f0239d0e0 100644 --- a/src/mame/roland/roland_d10.cpp +++ b/src/mame/roland/roland_d10.cpp @@ -304,7 +304,7 @@ void roland_d10_state::d10(machine_config &config) PALETTE(config, "palette", FUNC(roland_d10_state::d10_palette), 2); - MSM6222B_01(config, m_lcd, 0); + MSM6222B_01(config, m_lcd); TIMER(config, m_midi_timer).configure_generic(FUNC(roland_d10_state::midi_timer_cb)); diff --git a/src/mame/roland/roland_mt32.cpp b/src/mame/roland/roland_mt32.cpp index e08e7e94f03..497e51a5d4b 100644 --- a/src/mame/roland/roland_mt32.cpp +++ b/src/mame/roland/roland_mt32.cpp @@ -369,7 +369,7 @@ void mt32_state::mt32(machine_config &config) PALETTE(config, "palette", FUNC(mt32_state::mt32_palette), 2); - SED1200D0A(config, lcd, 0); + SED1200D0A(config, lcd); TIMER(config, midi_timer).configure_generic(FUNC(mt32_state::midi_timer_cb)); diff --git a/src/mame/roland/roland_ra30.cpp b/src/mame/roland/roland_ra30.cpp index ad0615b9a34..56968b7ac9f 100644 --- a/src/mame/roland/roland_ra30.cpp +++ b/src/mame/roland/roland_ra30.cpp @@ -37,7 +37,7 @@ INPUT_PORTS_END void roland_ra30_state::ra30(machine_config &config) { - HD6415108(config, m_maincpu, 20'000'000); + HD6415108(config, m_maincpu, XTAL::u(20'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &roland_ra30_state::mem_map); } diff --git a/src/mame/roland/roland_s10.cpp b/src/mame/roland/roland_s10.cpp index 08adeb1c537..fa849dc025a 100644 --- a/src/mame/roland/roland_s10.cpp +++ b/src/mame/roland/roland_s10.cpp @@ -235,7 +235,7 @@ void roland_s10_state::s10(machine_config &config) PALETTE(config, "palette", FUNC(roland_s10_state::palette_init), 2); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 8); m_lcdc->set_pixel_update_cb(FUNC(roland_s10_state::lcd_pixel_update)); m_lcdc->set_busy_factor(0.005f); diff --git a/src/mame/roland/roland_tb303.cpp b/src/mame/roland/roland_tb303.cpp index 007e3ad723e..a7c9c458b5c 100644 --- a/src/mame/roland/roland_tb303.cpp +++ b/src/mame/roland/roland_tb303.cpp @@ -274,7 +274,7 @@ INPUT_PORTS_END void tb303_state::tb303(machine_config &config) { // basic machine hardware - NEC_D650(config, m_maincpu, 454545); // LC circuit(TI S74230), 2.2us + NEC_D650(config, m_maincpu, XTAL::u(454545)); // LC circuit(TI S74230), 2.2us m_maincpu->read_a().set(FUNC(tb303_state::input_r)); m_maincpu->read_b().set(FUNC(tb303_state::input_r)); m_maincpu->read_c().set(FUNC(tb303_state::ram_data_r)); diff --git a/src/mame/roland/roland_tr606.cpp b/src/mame/roland/roland_tr606.cpp index 2bafa9f973d..545f7829212 100644 --- a/src/mame/roland/roland_tr606.cpp +++ b/src/mame/roland/roland_tr606.cpp @@ -61,7 +61,7 @@ INPUT_PORTS_END void tr606_state::tr606(machine_config &config) { // basic machine hardware - NEC_D650(config, m_maincpu, 454545); // LC circuit(TI S74230), 2.2us + NEC_D650(config, m_maincpu, XTAL::u(454545)); // LC circuit(TI S74230), 2.2us auto &irq_clock(CLOCK(config, "irq_clock")); irq_clock.set_period(attotime::from_usec(1800)); // clock rate 1.8ms (same as tb303) diff --git a/src/mame/roland/roland_tr808.cpp b/src/mame/roland/roland_tr808.cpp index b69e89af80a..1a4a523f105 100644 --- a/src/mame/roland/roland_tr808.cpp +++ b/src/mame/roland/roland_tr808.cpp @@ -61,7 +61,7 @@ INPUT_PORTS_END void tr808_state::tr808(machine_config &config) { // basic machine hardware - NEC_D650(config, m_maincpu, 500000); // 2us according to schematics + NEC_D650(config, m_maincpu, XTAL::u(500000)); // 2us according to schematics auto &irq_clock(CLOCK(config, "irq_clock")); irq_clock.set_period(attotime::from_usec(1900)); // clock rate 1.9ms diff --git a/src/mame/roland/sa16.cpp b/src/mame/roland/sa16.cpp index 11e428b4b90..e331586e687 100644 --- a/src/mame/roland/sa16.cpp +++ b/src/mame/roland/sa16.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(SA16, sa16_device, "sa16", "Roland SA-16 Sampler") // sa16_base_device - constructor //------------------------------------------------- -sa16_base_device::sa16_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +sa16_base_device::sa16_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_int_callback(*this) , m_sh_callback(*this) @@ -47,7 +47,7 @@ sa16_base_device::sa16_base_device(const machine_config &mconfig, device_type ty // rf5c36_device - constructor //------------------------------------------------- -rf5c36_device::rf5c36_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rf5c36_device::rf5c36_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sa16_base_device(mconfig, RF5C36, tag, owner, clock) { } @@ -57,7 +57,7 @@ rf5c36_device::rf5c36_device(const machine_config &mconfig, const char *tag, dev // sa16_device - constructor //------------------------------------------------- -sa16_device::sa16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sa16_device::sa16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sa16_base_device(mconfig, SA16, tag, owner, clock) { } diff --git a/src/mame/roland/sa16.h b/src/mame/roland/sa16.h index 6c1ea1d75d2..9b48652d6c5 100644 --- a/src/mame/roland/sa16.h +++ b/src/mame/roland/sa16.h @@ -30,7 +30,7 @@ public: protected: // base type constructor - sa16_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + sa16_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-specific overrides virtual void device_resolve_objects() override; @@ -51,7 +51,7 @@ class rf5c36_device : public sa16_base_device { public: // device type constructor - rf5c36_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rf5c36_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> sa16_device @@ -60,7 +60,7 @@ class sa16_device : public sa16_base_device { public: // device type constructor - sa16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sa16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/mame/rolm/r9751.cpp b/src/mame/rolm/r9751.cpp index c54b58ecf3b..ff6178558c7 100644 --- a/src/mame/rolm/r9751.cpp +++ b/src/mame/rolm/r9751.cpp @@ -968,7 +968,7 @@ void r9751_state::scsi_devices(device_slot_interface &device) void r9751_state::wd33c93(device_t *device) { - device->set_clock(10000000); + device->set_clock(XTAL::u(10000000)); // downcast(device)->irq_cb().set(*this, FUNC(r9751_state::scsi_irq_w)); // downcast(device)->drq_cb().set(*this, FUNC(r9751_state::scsi_drq_w)); } @@ -976,21 +976,21 @@ void r9751_state::wd33c93(device_t *device) void r9751_state::r9751(machine_config &config) { /* basic machine hardware */ - M68030(config, m_maincpu, 20000000); + M68030(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &r9751_state::r9751_mem); config.set_maximum_quantum(attotime::from_hz(1000)); /* i/o hardware */ - SMIOC(config, m_smioc, 0); + SMIOC(config, m_smioc); m_smioc->m68k_r_callback().set(FUNC(r9751_state::smioc_dma_r)); m_smioc->m68k_w_callback().set(FUNC(r9751_state::smioc_dma_w)); /* disk hardware */ - PDC(config, m_pdc, 0); + PDC(config, m_pdc); m_pdc->m68k_r_callback().set(FUNC(r9751_state::pdc_dma_r)); m_pdc->m68k_w_callback().set(FUNC(r9751_state::pdc_dma_w)); - NSCSI_BUS(config, "scsi", 0); + NSCSI_BUS(config, "scsi"); NSCSI_CONNECTOR(config, "scsi:0", scsi_devices, nullptr, false); NSCSI_CONNECTOR(config, "scsi:1", scsi_devices, "harddisk", false); NSCSI_CONNECTOR(config, "scsi:3", scsi_devices, nullptr, false); diff --git a/src/mame/sage/sage2.cpp b/src/mame/sage/sage2.cpp index f3c5cd285b0..6461dfa7e93 100644 --- a/src/mame/sage/sage2.cpp +++ b/src/mame/sage/sage2.cpp @@ -413,7 +413,7 @@ void sage2_state::sage2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sage2_state::sage2_mem); // devices - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, M68K_IRQ_1); i8255_device &ppi0(I8255A(config, I8255A_0_TAG)); @@ -426,7 +426,7 @@ void sage2_state::sage2(machine_config &config) ppi1.in_pb_callback().set(FUNC(sage2_state::ppi1_pb_r)); ppi1.out_pc_callback().set(FUNC(sage2_state::ppi1_pc_w)); - pit8253_device &i8253_0(PIT8253(config, I8253_0_TAG, 0)); + pit8253_device &i8253_0(PIT8253(config, I8253_0_TAG)); i8253_0.set_clk<0>(0); // from U75 OUT0 i8253_0.out_handler<0>().set(m_pic, FUNC(pic8259_device::ir6_w)); i8253_0.set_clk<1>(XTAL(16'000'000)/2/125); @@ -434,7 +434,7 @@ void sage2_state::sage2(machine_config &config) i8253_0.set_clk<2>(0); // from OUT2 i8253_0.out_handler<2>().set(m_pic, FUNC(pic8259_device::ir0_w)); - pit8253_device &i8253_1(PIT8253(config, I8253_1_TAG, 0)); + pit8253_device &i8253_1(PIT8253(config, I8253_1_TAG)); i8253_1.set_clk<0>(XTAL(16'000'000)/2/125); i8253_1.out_handler<0>().set(I8253_0_TAG, FUNC(pit8253_device::write_clk0)); i8253_1.set_clk<1>(XTAL(16'000'000)/2/13); @@ -442,7 +442,7 @@ void sage2_state::sage2(machine_config &config) i8253_1.set_clk<2>(XTAL(16'000'000)/2/13); i8253_1.out_handler<2>().set(FUNC(sage2_state::br2_w)); - I8251(config, m_usart0, 0); + I8251(config, m_usart0); m_usart0->txd_handler().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd)); m_usart0->dtr_handler().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr)); m_usart0->rts_handler().set(RS232_A_TAG, FUNC(rs232_port_device::write_rts)); @@ -455,7 +455,7 @@ void sage2_state::sage2(machine_config &config) rs232a.cts_handler().set(m_usart0, FUNC(i8251_device::write_cts)); rs232a.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); - I8251(config, m_usart1, 0); + I8251(config, m_usart1); m_usart1->txd_handler().set(RS232_B_TAG, FUNC(rs232_port_device::write_txd)); m_usart1->dtr_handler().set(RS232_B_TAG, FUNC(rs232_port_device::write_dtr)); m_usart1->rts_handler().set(RS232_B_TAG, FUNC(rs232_port_device::write_rts)); @@ -466,7 +466,7 @@ void sage2_state::sage2(machine_config &config) rs232b.rxd_handler().set(m_usart1, FUNC(i8251_device::write_rxd)); rs232b.dsr_handler().set(m_usart1, FUNC(i8251_device::write_dsr)); - UPD765A(config, m_fdc, 8'000'000, false, false); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, false); m_fdc->intrq_wr_callback().set(FUNC(sage2_state::fdc_irq)); CENTRONICS(config, m_centronics, centronics_devices, "printer"); diff --git a/src/mame/saitek/ccompan.cpp b/src/mame/saitek/ccompan.cpp index 679dce3c18a..867a2706d6b 100644 --- a/src/mame/saitek/ccompan.cpp +++ b/src/mame/saitek/ccompan.cpp @@ -189,10 +189,10 @@ INPUT_PORTS_END void ccompan_state::ccompan(machine_config &config) { /* basic machine hardware */ - M6504(config, m_maincpu, 1000000); // approximation, no XTAL + M6504(config, m_maincpu, XTAL::u(1000000)); // approximation, no XTAL m_maincpu->set_addrmap(AS_PROGRAM, &ccompan_state::main_map); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(ccompan_state::input_r)); m_pia->writepb_handler().set(FUNC(ccompan_state::control_w)); m_pia->ca2_handler().set(FUNC(ccompan_state::sled_w)); diff --git a/src/mame/saitek/cp2000.cpp b/src/mame/saitek/cp2000.cpp index 234679e9886..b6d98bf1cb4 100644 --- a/src/mame/saitek/cp2000.cpp +++ b/src/mame/saitek/cp2000.cpp @@ -216,12 +216,12 @@ INPUT_PORTS_END void cp2000_state::cp2000(machine_config &config) { // basic machine hardware - F8(config, m_maincpu, 2750000); // see driver notes + F8(config, m_maincpu, XTAL::u(2750000)); // see driver notes m_maincpu->set_addrmap(AS_PROGRAM, &cp2000_state::main_map); m_maincpu->set_addrmap(AS_IO, &cp2000_state::main_io); m_maincpu->set_irq_acknowledge_callback("f3853", FUNC(f3853_device::int_acknowledge)); - f3853_device &f3853(F3853(config, "f3853", 2750000)); + f3853_device &f3853(F3853(config, "f3853", XTAL::u(2750000))); f3853.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ); SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); diff --git a/src/mame/saitek/delta1.cpp b/src/mame/saitek/delta1.cpp index f855fd19dc7..554e681ea1f 100644 --- a/src/mame/saitek/delta1.cpp +++ b/src/mame/saitek/delta1.cpp @@ -217,12 +217,12 @@ INPUT_PORTS_END void delta1_state::delta1(machine_config &config) { /* basic machine hardware */ - F8(config, m_maincpu, 2000000); // LC circuit, measured 2MHz + F8(config, m_maincpu, XTAL::u(2000000)); // LC circuit, measured 2MHz m_maincpu->set_addrmap(AS_PROGRAM, &delta1_state::main_map); m_maincpu->set_addrmap(AS_IO, &delta1_state::main_io); m_maincpu->set_irq_acknowledge_callback("f3853", FUNC(f3853_device::int_acknowledge)); - f3853_device &f3853(F3853(config, "f3853", 2000000)); + f3853_device &f3853(F3853(config, "f3853", XTAL::u(2000000))); f3853.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ); /* video hardware */ diff --git a/src/mame/saitek/exchess.cpp b/src/mame/saitek/exchess.cpp index ec47eb3f388..2d104a1f5b5 100644 --- a/src/mame/saitek/exchess.cpp +++ b/src/mame/saitek/exchess.cpp @@ -227,11 +227,11 @@ void exchess_state::exchess(machine_config &config) psu.read_b().set_ioport("IN.1"); /* video hardware */ - HLCD0538(config, m_lcd1, 310); // measured + HLCD0538(config, m_lcd1, XTAL::u(310)); // measured m_lcd1->write_cols().set(FUNC(exchess_state::lcd_output_w<0>)); m_lcd1->write_interrupt().set(m_lcd2, FUNC(hlcd0539_device::lcd_w)); - HLCD0539(config, m_lcd2, 0); + HLCD0539(config, m_lcd2); m_lcd2->write_cols().set(FUNC(exchess_state::lcd_output_w<1>)); m_lcd2->write_interrupt().set("psu", FUNC(f38t56_device::ext_int_w)).invert(); diff --git a/src/mame/saitek/intchess.cpp b/src/mame/saitek/intchess.cpp index 8dc81a91213..0489553e1d7 100644 --- a/src/mame/saitek/intchess.cpp +++ b/src/mame/saitek/intchess.cpp @@ -286,7 +286,7 @@ void intchess_state::intchess(machine_config &config) m_via->readpb_handler().set(FUNC(intchess_state::control_r)); m_via->irq_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); - MM74C923(config, m_encoder, 0); // timing parameters unknown + MM74C923(config, m_encoder); // timing parameters unknown m_encoder->da_wr_callback().set(m_via, FUNC(via6522_device::write_ca2)); m_encoder->x1_rd_callback().set_ioport("X1"); m_encoder->x2_rd_callback().set_ioport("X2"); diff --git a/src/mame/saitek/minichess.cpp b/src/mame/saitek/minichess.cpp index 9642b5d212c..bdd25da4bdf 100644 --- a/src/mame/saitek/minichess.cpp +++ b/src/mame/saitek/minichess.cpp @@ -179,7 +179,7 @@ INPUT_PORTS_END void mini_state::smchess(machine_config &config) { /* basic machine hardware */ - HD44801(config, m_maincpu, 400000); + HD44801(config, m_maincpu, XTAL::u(400000)); m_maincpu->write_r<2>().set(FUNC(mini_state::seg_w<0>)); m_maincpu->write_r<3>().set(FUNC(mini_state::seg_w<1>)); m_maincpu->write_d().set(FUNC(mini_state::mux_w)); diff --git a/src/mame/saitek/prschess.cpp b/src/mame/saitek/prschess.cpp index bbbf299030d..e00056ed951 100644 --- a/src/mame/saitek/prschess.cpp +++ b/src/mame/saitek/prschess.cpp @@ -187,7 +187,7 @@ INPUT_PORTS_END void prschess_state::prschess(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 2000000); + M6502(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &prschess_state::main_map); m_maincpu->set_periodic_int(FUNC(prschess_state::nmi_line_pulse), attotime::from_hz(100)); // guessed diff --git a/src/mame/saitek/renaissance.cpp b/src/mame/saitek/renaissance.cpp index 27de3f4b10d..6052a74a2f0 100644 --- a/src/mame/saitek/renaissance.cpp +++ b/src/mame/saitek/renaissance.cpp @@ -381,7 +381,7 @@ void ren_state::ren(machine_config &config) m_board->set_delay(attotime::from_msec(150)); // video hardware - SED1502(config, m_lcd, 32768).write_segs().set(FUNC(ren_state::lcd_output_w)); + SED1502(config, m_lcd, XTAL::u(32768)).write_segs().set(FUNC(ren_state::lcd_output_w)); PWM_DISPLAY(config, m_lcd_pwm).set_size(16, 34); m_lcd_pwm->set_refresh(attotime::from_hz(30)); m_lcd_pwm->output_x().set(FUNC(ren_state::lcd_pwm_w)); diff --git a/src/mame/saitek/schess.cpp b/src/mame/saitek/schess.cpp index 12311f8f61f..fd75fa4188e 100644 --- a/src/mame/saitek/schess.cpp +++ b/src/mame/saitek/schess.cpp @@ -212,7 +212,7 @@ INPUT_PORTS_END void schess_state::schess(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 2000000); // approximation, no XTAL + M6502(config, m_maincpu, XTAL::u(2000000)); // approximation, no XTAL m_maincpu->set_addrmap(AS_PROGRAM, &schess_state::main_map); SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); diff --git a/src/mame/saitek/simultano.cpp b/src/mame/saitek/simultano.cpp index c084fa8eefa..a74e8637a90 100644 --- a/src/mame/saitek/simultano.cpp +++ b/src/mame/saitek/simultano.cpp @@ -331,7 +331,7 @@ void simultano_state::cc2150(machine_config &config) m_board->set_nvram_enable(true); /* video hardware */ - SED1502(config, m_lcd, 32768).write_segs().set(FUNC(simultano_state::lcd_output_w)); + SED1502(config, m_lcd, XTAL::u(32768)).write_segs().set(FUNC(simultano_state::lcd_output_w)); PWM_DISPLAY(config, m_lcd_pwm).set_size(16, 34); m_lcd_pwm->set_refresh(attotime::from_hz(30)); m_lcd_pwm->output_x().set(FUNC(simultano_state::lcd_pwm_w)); diff --git a/src/mame/saitek/ssystem3.cpp b/src/mame/saitek/ssystem3.cpp index c06b6de1405..243dd0f9d19 100644 --- a/src/mame/saitek/ssystem3.cpp +++ b/src/mame/saitek/ssystem3.cpp @@ -492,12 +492,12 @@ void ssystem3_state::ssystem3(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &ssystem3_state::ssystem3_map); - M6808(config, m_subcpu, 6800000); // LC circuit, measured + M6808(config, m_subcpu, XTAL::u(6800000)); // LC circuit, measured m_subcpu->set_addrmap(AS_PROGRAM, &ssystem3_state::chessunit_map); config.set_perfect_quantum(m_maincpu); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->irqa_handler().set_inputline(m_subcpu, INPUT_LINE_NMI); m_pia->writepa_handler().set(FUNC(ssystem3_state::cu_pia_a_w)); m_pia->readpa_handler().set(FUNC(ssystem3_state::cu_pia_a_r)); @@ -509,11 +509,11 @@ void ssystem3_state::ssystem3(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* video hardware */ - HLCD0438(config, m_lcd2[0], 0); + HLCD0438(config, m_lcd2[0]); m_lcd2[0]->write_segs().set(FUNC(ssystem3_state::lcd2_output_w<0>)); m_lcd2[0]->write_data().set(m_lcd2[1], FUNC(hlcd0438_device::data_w)); - HLCD0438(config, m_lcd2[1], 0); + HLCD0438(config, m_lcd2[1]); m_lcd2[1]->write_segs().set(FUNC(ssystem3_state::lcd2_output_w<1>)); screen_device &screen(SCREEN(config, "chessunit", SCREEN_TYPE_SVG)); diff --git a/src/mame/saitek/superstar.cpp b/src/mame/saitek/superstar.cpp index c72a19c5b48..5b01c27c62f 100644 --- a/src/mame/saitek/superstar.cpp +++ b/src/mame/saitek/superstar.cpp @@ -196,7 +196,7 @@ INPUT_PORTS_END void star_state::sstar28k(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 2000000); // no XTAL + M6502(config, m_maincpu, XTAL::u(2000000)); // no XTAL m_maincpu->set_addrmap(AS_PROGRAM, &star_state::sstar28k_map); const attotime nmi_period = attotime::from_hz(2000000 / 0x2000); // 4020 Q13 diff --git a/src/mame/sanritsu/appoooh.cpp b/src/mame/sanritsu/appoooh.cpp index fb584be033b..b578776b9ed 100644 --- a/src/mame/sanritsu/appoooh.cpp +++ b/src/mame/sanritsu/appoooh.cpp @@ -720,7 +720,7 @@ void base_state::common(machine_config &config) SN76489(config, "sn2", 18.432_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.30); // divider unknown SN76489(config, "sn3", 18.432_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.30); // divider unknown - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_callback().set(FUNC(base_state::adpcm_int)); m_msm->set_prescaler_selector(msm5205_device::S64_4B); // 6KHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/sanritsu/mermaid.cpp b/src/mame/sanritsu/mermaid.cpp index 756a2254bc2..21e60018c34 100644 --- a/src/mame/sanritsu/mermaid.cpp +++ b/src/mame/sanritsu/mermaid.cpp @@ -466,8 +466,8 @@ void mermaid_state::mermaid(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay8910[0], 1500000).add_route(ALL_OUTPUTS, "mono", 0.25); - AY8910(config, m_ay8910[1], 1500000).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8910(config, m_ay8910[0], XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.25); + AY8910(config, m_ay8910[1], XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.25); } void mermaid_state::rougien(machine_config &config) @@ -484,7 +484,7 @@ void mermaid_state::rougien(machine_config &config) m_palette->set_init(FUNC(mermaid_state::rougien_palette)); - MSM5205(config, m_adpcm, 384000); + MSM5205(config, m_adpcm, XTAL::u(384000)); m_adpcm->vck_callback().set(FUNC(mermaid_state::rougien_adpcm_int)); m_adpcm->set_prescaler_selector(msm5205_device::S96_4B); m_adpcm->add_route(ALL_OUTPUTS, "mono", 1.00); diff --git a/src/mame/sanritsu/mjkjidai.cpp b/src/mame/sanritsu/mjkjidai.cpp index 26def0d109c..498bf3b3e47 100644 --- a/src/mame/sanritsu/mjkjidai.cpp +++ b/src/mame/sanritsu/mjkjidai.cpp @@ -539,7 +539,7 @@ void mjkjidai_state::mjkjidai(machine_config &config) SN76489(config, "sn1", 10_MHz_XTAL / 4).add_route(ALL_OUTPUTS, "mono", 0.50); SN76489(config, "sn2", 10_MHz_XTAL / 4).add_route(ALL_OUTPUTS, "mono", 0.50); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(mjkjidai_state::adpcm_int)); m_msm->set_prescaler_selector(msm5205_device::S64_4B); // 6kHz m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/sanritsu/ron.cpp b/src/mame/sanritsu/ron.cpp index 8c0e39341b2..4b451c71a2c 100644 --- a/src/mame/sanritsu/ron.cpp +++ b/src/mame/sanritsu/ron.cpp @@ -505,7 +505,7 @@ void ron_state::ron(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay, 0); // T0 CLK from I8035 (not verified) + AY8910(config, m_ay); // T0 CLK from I8035 (not verified) m_ay->add_route(ALL_OUTPUTS, "mono", 0.30); m_ay->port_a_write_callback().set(FUNC(ron_state::ay_pa_w)); } diff --git a/src/mame/sanyo/mbc200.cpp b/src/mame/sanyo/mbc200.cpp index ea3d61cdbdc..6e4e90d539d 100644 --- a/src/mame/sanyo/mbc200.cpp +++ b/src/mame/sanyo/mbc200.cpp @@ -338,7 +338,7 @@ void mbc200_state::mbc200(machine_config &config) // sound SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 1000).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown + BEEP(config, m_beep, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); I8255(config, "ppi_1").out_pc_callback().set(FUNC(mbc200_state::p1_portc_w)); @@ -348,16 +348,16 @@ void mbc200_state::mbc200(machine_config &config) m_ppi_m->out_pa_callback().set(FUNC(mbc200_state::pm_porta_w)); m_ppi_m->out_pb_callback().set(FUNC(mbc200_state::pm_portb_w)); - I8251(config, "uart1", 0); // INS8251N + I8251(config, "uart1"); // INS8251N - I8251(config, "uart2", 0); // INS8251A + I8251(config, "uart2"); // INS8251A MB8876(config, m_fdc, 8_MHz_XTAL / 8); // guess FLOPPY_CONNECTOR(config, "fdc:0", mbc200_floppies, "qd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", mbc200_floppies, "qd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); /* Keyboard */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(mbc200_state::kbd_put)); /* software lists */ diff --git a/src/mame/sanyo/mbc55x.cpp b/src/mame/sanyo/mbc55x.cpp index 731a7c1136c..7c92a387225 100644 --- a/src/mame/sanyo/mbc55x.cpp +++ b/src/mame/sanyo/mbc55x.cpp @@ -274,7 +274,7 @@ void mbc55x_state::mbc55x(machine_config &config) /* video hardware */ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER)); - screen.set_raw(14.318181_MHz_XTAL, 896, 0, 640, 262, 0, 200); + screen.set_raw(14.318181_MHz_XTAL, 896, 640, 262, 0, 200); screen.set_screen_update(VID_MC6845_NAME, FUNC(mc6845_device::screen_update)); PALETTE(config, m_palette, FUNC(mbc55x_state::mbc55x_palette), SCREEN_NO_COLOURS * 3); @@ -340,7 +340,7 @@ void mbc55x_state::mbc55x(machine_config &config) isa.irq7_callback().set(m_pic, FUNC(pic8259_device::ir7_w)); // all other IRQ and DRQ lines are NC isa.iochck_callback().set_inputline(m_maincpu, INPUT_LINE_NMI).invert(); - ISA8_SLOT(config, "external", 0, "isa", pc_isa8_cards, nullptr, false); + ISA8_SLOT(config, "external", "isa", pc_isa8_cards, nullptr, false); i8251_device &sio(I8251(config, "sio", 14.318181_MHz_XTAL / 8)); // on separate board, through 20-pin header sio.dtr_handler().set("line", FUNC(rs232_port_device::write_dtr)); @@ -375,4 +375,4 @@ ROM_START( mbc55x ) ROM_END // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1983, mbc55x, 0, 0, mbc55x, mbc55x, mbc55x_state, empty_init, "Sanyo", "MBC-55x", 0 ) +COMP( 1983, mbc55x, 0, 0, mbc55x, mbc55x, mbc55x_state, empty_init, "Sanyo", "MBC-55x", 0 ) diff --git a/src/mame/sanyo/mbc55x_kbd.cpp b/src/mame/sanyo/mbc55x_kbd.cpp index a3c56f46417..207ba1e18c7 100644 --- a/src/mame/sanyo/mbc55x_kbd.cpp +++ b/src/mame/sanyo/mbc55x_kbd.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(MBC55X_KEYBOARD, mbc55x_keyboard_device, "mbc55x_kbd", "MBC-55x Keyboard") -mbc55x_keyboard_device::mbc55x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mbc55x_keyboard_device::mbc55x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MBC55X_KEYBOARD, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7", "Y8", "Y9", "Y10", "Y11") , device_serial_interface(mconfig, *this) @@ -183,7 +183,7 @@ void mbc55x_keyboard_device::device_resolve_objects() void mbc55x_keyboard_device::device_start() { - set_tra_rate(1230); // more or less + set_tra_rate(XTAL::u(1230)); // more or less } void mbc55x_keyboard_device::device_reset() diff --git a/src/mame/sanyo/mbc55x_kbd.h b/src/mame/sanyo/mbc55x_kbd.h index 9096e9afd0b..c7438e08879 100644 --- a/src/mame/sanyo/mbc55x_kbd.h +++ b/src/mame/sanyo/mbc55x_kbd.h @@ -25,7 +25,7 @@ class mbc55x_keyboard_device : public device_t, public device_matrix_keyboard_in public: // construction/destruction - mbc55x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mbc55x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto txd_callback() { return m_txd_callback.bind(); } diff --git a/src/mame/sanyo/phc25.cpp b/src/mame/sanyo/phc25.cpp index 1fa46b65554..1a6af82a20f 100644 --- a/src/mame/sanyo/phc25.cpp +++ b/src/mame/sanyo/phc25.cpp @@ -328,7 +328,7 @@ void phc25_state::phc25(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ay8910_device &psg(AY8910(config, AY8910_TAG, 1'000'000)); + ay8910_device &psg(AY8910(config, AY8910_TAG, XTAL::u(1'000'000))); psg.port_a_read_callback().set_ioport("JOY0"); psg.port_b_read_callback().set_ioport("JOY1"); psg.add_route(ALL_OUTPUTS, "mono", 2.00); diff --git a/src/mame/saturn/st17xx.cpp b/src/mame/saturn/st17xx.cpp index 72bb94eae28..817c25eaba3 100644 --- a/src/mame/saturn/st17xx.cpp +++ b/src/mame/saturn/st17xx.cpp @@ -94,7 +94,7 @@ void st17xx_state::machine_start() void st17xx_state::st17xx(machine_config &config) { /* basic machine hardware */ - arm7_cpu_device &maincpu(ARM7(config, "maincpu", 50000000)); /* speed unknown */ + arm7_cpu_device &maincpu(ARM7(config, "maincpu", XTAL::u(50000000))); /* speed unknown */ maincpu.set_addrmap(AS_PROGRAM, &st17xx_state::cpu_map); /* video hardware */ diff --git a/src/mame/sega/315-5838_317-0229_comp.cpp b/src/mame/sega/315-5838_317-0229_comp.cpp index c3bafb36005..666c911f4cf 100644 --- a/src/mame/sega/315-5838_317-0229_comp.cpp +++ b/src/mame/sega/315-5838_317-0229_comp.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(SEGA315_5838_COMP, sega_315_5838_comp_device, "sega315_5838", "Sega 315-5838 / 317-0229 Compression and Encryption") -sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA315_5838_COMP, tag, owner, clock), device_rom_interface(mconfig, *this), m_hackmode(0) diff --git a/src/mame/sega/315-5838_317-0229_comp.h b/src/mame/sega/315-5838_317-0229_comp.h index 9910ff63bf4..6e18237cb0c 100644 --- a/src/mame/sega/315-5838_317-0229_comp.h +++ b/src/mame/sega/315-5838_317-0229_comp.h @@ -16,7 +16,7 @@ class sega_315_5838_comp_device : public device_t, { public: // construction/destruction - sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_315_5838_comp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t data_r(); diff --git a/src/mame/sega/315-5881_crypt.cpp b/src/mame/sega/315-5881_crypt.cpp index aa6378320d1..e61b55bcae3 100644 --- a/src/mame/sega/315-5881_crypt.cpp +++ b/src/mame/sega/315-5881_crypt.cpp @@ -43,7 +43,7 @@ void sega_315_5881_crypt_device::iomap_le(address_map &map) map(0x000e, 0x000f).r(FUNC(sega_315_5881_crypt_device::decrypt_le_r)); } -sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_315_5881_crypt_device::sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA315_5881_CRYPT, tag, owner, clock) , m_read(*this) { diff --git a/src/mame/sega/315-5881_crypt.h b/src/mame/sega/315-5881_crypt.h index 9b2e8c6a6c4..034cac77b0e 100644 --- a/src/mame/sega/315-5881_crypt.h +++ b/src/mame/sega/315-5881_crypt.h @@ -15,7 +15,7 @@ class sega_315_5881_crypt_device : public device_t { public: // construction/destruction - sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_315_5881_crypt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t ready_r(); void subkey_le_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/sega/315-6154.cpp b/src/mame/sega/315-6154.cpp index 633a88de447..c1a2718ebfb 100644 --- a/src/mame/sega/315-6154.cpp +++ b/src/mame/sega/315-6154.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(SEGA315_6154, sega_315_6154_device, "sega315_6154", "Sega 315-6154 Northbridge") -sega_315_6154_device::sega_315_6154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_315_6154_device::sega_315_6154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, SEGA315_6154, tag, owner, clock), m_configuration_config("configuration_space", ENDIANNESS_LITTLE, 32, 20), m_memory_config("memory_space", ENDIANNESS_LITTLE, 32, 32) diff --git a/src/mame/sega/315-6154.h b/src/mame/sega/315-6154.h index 70f1de2e9a4..d6728db8e18 100644 --- a/src/mame/sega/315-6154.h +++ b/src/mame/sega/315-6154.h @@ -13,7 +13,7 @@ class sega_315_6154_device : public pci_host_device { public: // construction/destruction - sega_315_6154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_315_6154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); address_space *memory() { return memory_space; } u32 registers_r(offs_t offset); diff --git a/src/mame/sega/315_5195.cpp b/src/mame/sega/315_5195.cpp index 21778a618ef..a171561d53a 100644 --- a/src/mame/sega/315_5195.cpp +++ b/src/mame/sega/315_5195.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5195_MEM_MAPPER, sega_315_5195_mapper_device, "sega_ // sega_315_5195_mapper_device - constructor //------------------------------------------------- -sega_315_5195_mapper_device::sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega_315_5195_mapper_device::sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_315_5195_MEM_MAPPER, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG) , m_cpuregion(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/sega/315_5195.h b/src/mame/sega/315_5195.h index 143248a7614..9e4e22d605b 100644 --- a/src/mame/sega/315_5195.h +++ b/src/mame/sega/315_5195.h @@ -30,14 +30,14 @@ public: // construction/destruction template - sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&cpu_tag) + sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : sega_315_5195_mapper_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); m_cpuregion.set_tag(std::forward(cpu_tag)); } - sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers template void set_mapper(T &&... args) { m_mapper.set(std::forward(args)...); } diff --git a/src/mame/sega/315_5296.cpp b/src/mame/sega/315_5296.cpp index 99d28a3b6fd..abfcadafdfa 100644 --- a/src/mame/sega/315_5296.cpp +++ b/src/mame/sega/315_5296.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5296, sega_315_5296_device, "315_5296", "Sega 315-52 // sega_315_5296_device - constructor //------------------------------------------------- -sega_315_5296_device::sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5296_device::sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_315_5296, tag, owner, clock), m_in_port_cb(*this), m_out_port_cb(*this), diff --git a/src/mame/sega/315_5296.h b/src/mame/sega/315_5296.h index c191399cc88..6b78633139f 100644 --- a/src/mame/sega/315_5296.h +++ b/src/mame/sega/315_5296.h @@ -22,7 +22,7 @@ class sega_315_5296_device : public device_t { public: - sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_315_5296_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto in_pa_callback() { return m_in_port_cb[0].bind(); } diff --git a/src/mame/sega/315_5338a.cpp b/src/mame/sega/315_5338a.cpp index 7a70f19b29e..5a50433e80e 100644 --- a/src/mame/sega/315_5338a.cpp +++ b/src/mame/sega/315_5338a.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5338A, sega_315_5338a_device, "315_5338a", "Sega 315 // sega_315_5338a_device - constructor //------------------------------------------------- -sega_315_5338a_device::sega_315_5338a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5338a_device::sega_315_5338a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_315_5338A, tag, owner, clock), m_read_cb(*this), m_write_cb(*this), m_in_port_cb(*this), diff --git a/src/mame/sega/315_5338a.h b/src/mame/sega/315_5338a.h index 5ec91528a05..e9a702d016c 100644 --- a/src/mame/sega/315_5338a.h +++ b/src/mame/sega/315_5338a.h @@ -32,7 +32,7 @@ class sega_315_5338a_device : public device_t { public: // construction/destruction - sega_315_5338a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_315_5338a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto read_callback() { return m_read_cb.bind(); } diff --git a/src/mame/sega/315_5649.cpp b/src/mame/sega/315_5649.cpp index 42331720431..d7af6e69bd7 100644 --- a/src/mame/sega/315_5649.cpp +++ b/src/mame/sega/315_5649.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5649, sega_315_5649_device, "315_5649", "Sega 315-56 // sega_315_5649_device - constructor //------------------------------------------------- -sega_315_5649_device::sega_315_5649_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5649_device::sega_315_5649_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_315_5649, tag, owner, clock), m_in_port_cb(*this), m_out_port_cb(*this), diff --git a/src/mame/sega/315_5649.h b/src/mame/sega/315_5649.h index 9eaae8cb95f..bc76ef30d1a 100644 --- a/src/mame/sega/315_5649.h +++ b/src/mame/sega/315_5649.h @@ -22,7 +22,7 @@ class sega_315_5649_device : public device_t { public: // construction/destruction - sega_315_5649_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_315_5649_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto in_pa_callback() { return m_in_port_cb[0].bind(); } diff --git a/src/mame/sega/awboard.cpp b/src/mame/sega/awboard.cpp index bc2146640e2..5c405dd132b 100644 --- a/src/mame/sega/awboard.cpp +++ b/src/mame/sega/awboard.cpp @@ -171,7 +171,7 @@ void aw_rom_board::submap(address_map &map) map(0x40, 0x41).rw(FUNC(aw_rom_board::pio_r), FUNC(aw_rom_board::pio_w)); } -aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : naomi_g1_device(mconfig, AW_ROM_BOARD, tag, owner, clock) , m_region(*this, DEVICE_SELF) { diff --git a/src/mame/sega/awboard.h b/src/mame/sega/awboard.h index 274b1d364cd..b5141022017 100644 --- a/src/mame/sega/awboard.h +++ b/src/mame/sega/awboard.h @@ -11,7 +11,7 @@ class aw_rom_board : public naomi_g1_device { public: - aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void submap(address_map &map) override; diff --git a/src/mame/sega/bingoc.cpp b/src/mame/sega/bingoc.cpp index e42518ced26..ef4b78ed1bd 100644 --- a/src/mame/sega/bingoc.cpp +++ b/src/mame/sega/bingoc.cpp @@ -183,27 +183,27 @@ INPUT_PORTS_END void bingoc_state::bingoc(machine_config &config) { - M68000(config, m_maincpu, 8000000); /* ? MHz */ + M68000(config, m_maincpu, XTAL::u(8000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &bingoc_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(bingoc_state::irq2_line_hold)); - Z80(config, m_soundcpu, 4000000); /* ? MHz */ + Z80(config, m_soundcpu, XTAL::u(4000000)); /* ? MHz */ m_soundcpu->set_addrmap(AS_PROGRAM, &bingoc_state::sound_map); m_soundcpu->set_addrmap(AS_IO, &bingoc_state::sound_io); #if SOUND_TEST m_soundcpu->set_vblank_int("screen", FUNC(bingoc_state::nmi_line_pulse)); #endif - I8251(config, "uart1", 4000000); // unknown - I8251(config, "uart2", 4000000); // unknown - I8251(config, "uart3", 4000000); // unknown - I8251(config, "uart4", 4000000); // unknown - I8251(config, "uart5", 4000000); // unknown - I8251(config, "uart6", 4000000); // unknown - I8251(config, "uart7", 4000000); // unknown - I8251(config, "uart8", 4000000); // unknown + I8251(config, "uart1", XTAL::u(4000000)); // unknown + I8251(config, "uart2", XTAL::u(4000000)); // unknown + I8251(config, "uart3", XTAL::u(4000000)); // unknown + I8251(config, "uart4", XTAL::u(4000000)); // unknown + I8251(config, "uart5", XTAL::u(4000000)); // unknown + I8251(config, "uart6", XTAL::u(4000000)); // unknown + I8251(config, "uart7", XTAL::u(4000000)); // unknown + I8251(config, "uart8", XTAL::u(4000000)); // unknown - SEGA_315_5338A(config, "io", 0); // ? + SEGA_315_5338A(config, "io"); // ? /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/sega/bingoct.cpp b/src/mame/sega/bingoct.cpp index 224c0dbd110..4cd2919d13f 100644 --- a/src/mame/sega/bingoct.cpp +++ b/src/mame/sega/bingoct.cpp @@ -256,7 +256,7 @@ void bingoct_device::device_add_mconfig(machine_config &config) // bingoct_device - constructor //------------------------------------------------- -bingoct_device::bingoct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bingoct_device::bingoct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BINGOCT, tag, owner, clock), m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), diff --git a/src/mame/sega/bingoct.h b/src/mame/sega/bingoct.h index 5fef7eb6bb9..fe682e32b9c 100644 --- a/src/mame/sega/bingoct.h +++ b/src/mame/sega/bingoct.h @@ -28,7 +28,7 @@ class bingoct_device : public device_t { public: // construction/destruction - bingoct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bingoct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/mame/sega/calorie.cpp b/src/mame/sega/calorie.cpp index 734defb6bce..d3c5b515d63 100644 --- a/src/mame/sega/calorie.cpp +++ b/src/mame/sega/calorie.cpp @@ -468,12 +468,12 @@ void calorie_state::machine_reset() void calorie_state::calorie(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* 4 MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &calorie_state::calorie_map); m_maincpu->set_addrmap(AS_OPCODES, &calorie_state::decrypted_opcodes_map); m_maincpu->set_vblank_int("screen", FUNC(calorie_state::irq0_line_hold)); - z80_device &audiocpu(Z80(config, "audiocpu", 3000000)); /* 3 MHz */ + z80_device &audiocpu(Z80(config, "audiocpu", XTAL::u(3000000))); /* 3 MHz */ audiocpu.set_addrmap(AS_PROGRAM, &calorie_state::calorie_sound_map); audiocpu.set_addrmap(AS_IO, &calorie_state::calorie_sound_io_map); audiocpu.set_periodic_int(FUNC(calorie_state::irq0_line_hold), attotime::from_hz(64)); @@ -496,11 +496,11 @@ void calorie_state::calorie(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM2149(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8); + YM2149(config, "ay1", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.8); - YM2149(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8); + YM2149(config, "ay2", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.8); - YM2149(config, "ay3", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8); + YM2149(config, "ay3", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.8); } void calorie_state::caloriee(machine_config &config) diff --git a/src/mame/sega/chihiro.cpp b/src/mame/sega/chihiro.cpp index 7061536c62b..f6832abb09f 100644 --- a/src/mame/sega/chihiro.cpp +++ b/src/mame/sega/chihiro.cpp @@ -461,7 +461,7 @@ class jvs_master : public jvs_host { public: // construction/destruction - jvs_master(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jvs_master(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); int get_sense_line(); void send_packet(int destination, int length, uint8_t *data); int received_packet(uint8_t *buffer); @@ -469,7 +469,7 @@ public: DEFINE_DEVICE_TYPE(JVS_MASTER, jvs_master, "jvs_master", "JVS MASTER") -jvs_master::jvs_master(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jvs_master::jvs_master(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_host(mconfig, JVS_MASTER, tag, owner, clock) { } @@ -517,7 +517,7 @@ DECLARE_DEVICE_TYPE(OHCI_HLEAN2131QC, ohci_hlean2131qc_device) class ohci_hlean2131qc_device : public device_t, public device_usb_ohci_function_interface { public: - ohci_hlean2131qc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ohci_hlean2131qc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void initialize() override; int handle_nonstandard_request(int endpoint, USBSetupPacket *setup) override; int handle_bulk_pid(int endpoint, int pid, uint8_t *buffer, int size) override; @@ -575,7 +575,7 @@ DECLARE_DEVICE_TYPE(OHCI_HLEAN2131SC, ohci_hlean2131sc_device) class ohci_hlean2131sc_device : public device_t, public device_usb_ohci_function_interface { public: - ohci_hlean2131sc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ohci_hlean2131sc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void initialize() override; int handle_nonstandard_request(int endpoint, USBSetupPacket *setup) override; int handle_bulk_pid(int endpoint, int pid, uint8_t *buffer, int size) override; @@ -876,7 +876,7 @@ const uint8_t ohci_hlean2131qc_device::strdesc0[] = { 0x04,0x03,0x00,0x00 }; const uint8_t ohci_hlean2131qc_device::strdesc1[] = { 0x0A,0x03,0x53,0x00,0x45,0x00,0x47,0x00,0x41,0x00 }; const uint8_t ohci_hlean2131qc_device::strdesc2[] = { 0x0E,0x03,0x42,0x00,0x41,0x00,0x53,0x00,0x45,0x00,0x42,0x03,0xFF,0x0B }; -ohci_hlean2131qc_device::ohci_hlean2131qc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ohci_hlean2131qc_device::ohci_hlean2131qc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OHCI_HLEAN2131QC, tag, owner, clock) , device_usb_ohci_function_interface(mconfig, *this) , m_jvs_master(*this, "^^^^jvs_master") @@ -1204,7 +1204,7 @@ const uint8_t ohci_hlean2131sc_device::strdesc0[] = { 0x04,0x03,0x00,0x00 }; const uint8_t ohci_hlean2131sc_device::strdesc1[] = { 0x0A,0x03,0x53,0x00,0x45,0x00,0x47,0x00,0x41,0x00 }; const uint8_t ohci_hlean2131sc_device::strdesc2[] = { 0x0E,0x03,0x42,0x00,0x41,0x00,0x53,0x00,0x45,0x00,0x42,0x00,0x44,0x00 }; -ohci_hlean2131sc_device::ohci_hlean2131sc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ohci_hlean2131sc_device::ohci_hlean2131sc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OHCI_HLEAN2131SC, tag, owner, clock) , device_usb_ohci_function_interface(mconfig, *this) { @@ -1527,7 +1527,7 @@ class ide_baseboard_device : public ata_mass_storage_device { public: // construction/destruction - ide_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ide_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int read_sector(uint32_t lba, void *buffer) override; virtual int write_sector(uint32_t lba, const void *buffer) override; @@ -1552,7 +1552,7 @@ DEFINE_DEVICE_TYPE(IDE_BASEBOARD, ide_baseboard_device, "ide_baseboard", "IDE Ba // ide_baseboard_device - constructor //------------------------------------------------- -ide_baseboard_device::ide_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ide_baseboard_device::ide_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_mass_storage_device(mconfig, IDE_BASEBOARD, tag, owner, clock) { } @@ -1856,7 +1856,7 @@ void chihiro_state::machine_start() class sega_network_board : public device_t { public: - sega_network_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_network_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; @@ -1866,7 +1866,7 @@ protected: DEFINE_DEVICE_TYPE(SEGA_NETWORK_BOARD, sega_network_board, "seganetw", "Sega Network Board") -sega_network_board::sega_network_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_network_board::sega_network_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_NETWORK_BOARD, tag, owner, clock) { } @@ -1920,7 +1920,7 @@ void chihiro_state::chihiro_base(machine_config &config) OHCI_USB_CONNECTOR(config, "pci:02.0:port3", usb_baseboard, nullptr, false); OHCI_USB_CONNECTOR(config, "pci:02.0:port4", usb_baseboard, nullptr, false); - JVS_MASTER(config, "jvs_master", 0); + JVS_MASTER(config, "jvs_master"); sega_837_13551_device &sega837(SEGA_837_13551(config, "837_13551", 0, "jvs_master")); sega837.set_port_tag<0>("TILT"); sega837.set_port_tag<1>("P1"); @@ -1941,7 +1941,7 @@ void chihiro_state::chihirogd(machine_config &config) chihiro_base(config); NAOMI_GDROM_BOARD(config, m_dimmboard, 0, ":gdrom", "pic"); m_dimmboard->irq_callback().set_nop(); - SEGA_NETWORK_BOARD(config, "network", 0); + SEGA_NETWORK_BOARD(config, "network"); } #define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \ diff --git a/src/mame/sega/coolridr.cpp b/src/mame/sega/coolridr.cpp index 8c624c88a0b..e107adc8250 100644 --- a/src/mame/sega/coolridr.cpp +++ b/src/mame/sega/coolridr.cpp @@ -3241,7 +3241,7 @@ void coolridr_state::coolridr(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - sega_315_5649_device &io(SEGA_315_5649(config, "io", 0)); + sega_315_5649_device &io(SEGA_315_5649(config, "io")); io.out_pb_callback().set(FUNC(coolridr_state::lamps_w)); io.in_pc_callback().set_ioport("IN0"); io.in_pd_callback().set_ioport("P1"); diff --git a/src/mame/sega/dc-ctrl.cpp b/src/mame/sega/dc-ctrl.cpp index fe2925fcf0b..d63a1189ea6 100644 --- a/src/mame/sega/dc-ctrl.cpp +++ b/src/mame/sega/dc-ctrl.cpp @@ -9,7 +9,7 @@ * ******************************/ -dc_common_device::dc_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dc_common_device::dc_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : maple_device(mconfig, type, tag, owner, clock) , port(*this, {finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG}) { @@ -59,7 +59,7 @@ void dc_common_device::maple_w(const uint32_t *data, uint32_t in_size) DEFINE_DEVICE_TYPE(DC_CONTROLLER, dc_controller_device, "dcctrl", "Dreamcast Controller") -dc_controller_device::dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dc_controller_device::dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dc_common_device(mconfig, DC_CONTROLLER, tag, owner, clock) { model = "Dreamcast Controller"; @@ -118,7 +118,7 @@ void dc_controller_device::read(uint32_t *dest) DEFINE_DEVICE_TYPE(DC_KEYBOARD, dc_keyboard_device, "dckb", "Dreamcast Keyboard") -dc_keyboard_device::dc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dc_keyboard_device::dc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dc_common_device(mconfig, DC_KEYBOARD, tag, owner, clock) { model = "92key Keyboard for JPN"; diff --git a/src/mame/sega/dc-ctrl.h b/src/mame/sega/dc-ctrl.h index 4fd4cd65131..2129b5b4b66 100644 --- a/src/mame/sega/dc-ctrl.h +++ b/src/mame/sega/dc-ctrl.h @@ -12,7 +12,7 @@ class dc_common_device : public maple_device { public: // construction/destruction - dc_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dc_common_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template void set_port_tag(T &&port_tag) { port[Which].set_tag(std::forward(port_tag)); } @@ -53,14 +53,14 @@ class dc_controller_device : public dc_common_device public: // construction/destruction template - dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&host_tag, int host_port) + dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&host_tag, int host_port) : dc_controller_device(mconfig, tag, owner, clock) { host.set_tag(std::forward(host_tag)); set_host_port(host_port); } - dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dc_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: void fixed_status(uint32_t *dest) override; @@ -74,14 +74,14 @@ class dc_keyboard_device : public dc_common_device public: // construction/destruction template - dc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&host_tag, int host_port) + dc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&host_tag, int host_port) : dc_keyboard_device(mconfig, tag, owner, clock) { host.set_tag(std::forward(host_tag)); set_host_port(host_port); } - dc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); //protected: diff --git a/src/mame/sega/dc_atomiswave.cpp b/src/mame/sega/dc_atomiswave.cpp index 8d37c3a03c1..3db4cde0f2e 100644 --- a/src/mame/sega/dc_atomiswave.cpp +++ b/src/mame/sega/dc_atomiswave.cpp @@ -805,7 +805,7 @@ void atomiswave_state::aw_base(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &atomiswave_state::aw_map); m_maincpu->set_addrmap(AS_IO, &atomiswave_state::aw_port); MACRONIX_29L001MC(config, "awflash"); - aw_rom_board &rom_board(AW_ROM_BOARD(config, "rom_board", 0)); + aw_rom_board &rom_board(AW_ROM_BOARD(config, "rom_board")); rom_board.irq_callback().set(FUNC(dc_state::g1_irq)); MCFG_MACHINE_RESET_OVERRIDE(dc_state,dc_console) diff --git a/src/mame/sega/dc_g2if.cpp b/src/mame/sega/dc_g2if.cpp index 9929a2844fc..35065fabcb5 100644 --- a/src/mame/sega/dc_g2if.cpp +++ b/src/mame/sega/dc_g2if.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(DC_G2IF, dc_g2if_device, "dc_g2if", "Sega Dreamcast G2 I/F Sy //------------------------------------------------- -dc_g2if_device::dc_g2if_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dc_g2if_device::dc_g2if_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DC_G2IF, tag, owner, clock) , m_host_space(*this, finder_base::DUMMY_TAG, -1) , m_int_w(*this) diff --git a/src/mame/sega/dc_g2if.h b/src/mame/sega/dc_g2if.h index c598307b441..f807c89624e 100644 --- a/src/mame/sega/dc_g2if.h +++ b/src/mame/sega/dc_g2if.h @@ -19,7 +19,7 @@ class dc_g2if_device : public device_t { public: // construction/destruction - dc_g2if_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dc_g2if_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_host_space(T &&tag, int index) { m_host_space.set_tag(std::forward(tag), index); } auto int_cb() { return m_int_w.bind(); } auto error_ia_cb() { return m_error_ia_w.bind(); } diff --git a/src/mame/sega/dccons.cpp b/src/mame/sega/dccons.cpp index 3535c08dd09..7698745491f 100644 --- a/src/mame/sega/dccons.cpp +++ b/src/mame/sega/dccons.cpp @@ -410,7 +410,7 @@ void dc_cons_state::dc_base(machine_config &config) screen.set_raw(13458568*2, 857, 0, 640, 524, 0, 480); screen.set_screen_update("powervr2", FUNC(powervr2_device::screen_update)); - POWERVR2(config, m_powervr2, 0); + POWERVR2(config, m_powervr2); m_powervr2->irq_callback().set(FUNC(dc_state::pvr_irq)); SPEAKER(config, "lspeaker").front_left(); @@ -425,7 +425,7 @@ void dc_cons_state::dc_base(machine_config &config) AICARTC(config, "aicartc", XTAL(32'768)); - ATA_INTERFACE(config, m_ata, 0); + ATA_INTERFACE(config, m_ata); m_ata->irq_handler().set(FUNC(dc_cons_state::ata_interrupt)); ata_slot_device &ata_0(*subdevice("ata:0")); diff --git a/src/mame/sega/dsbz80.cpp b/src/mame/sega/dsbz80.cpp index 85c4e8ce2cc..7c0d5ccf32e 100644 --- a/src/mame/sega/dsbz80.cpp +++ b/src/mame/sega/dsbz80.cpp @@ -46,15 +46,15 @@ DEFINE_DEVICE_TYPE(DSBZ80, dsbz80_device, "dsbz80_device", "Sega Z80-based Digit void dsbz80_device::device_add_mconfig(machine_config &config) { - Z80(config, m_ourcpu, 4000000); // unknown clock, but probably pretty slow considering the z80 does like nothing + Z80(config, m_ourcpu, XTAL::u(4000000)); // unknown clock, but probably pretty slow considering the z80 does like nothing m_ourcpu->set_addrmap(AS_PROGRAM, &dsbz80_device::dsbz80_map); m_ourcpu->set_addrmap(AS_IO, &dsbz80_device::dsbz80io_map); - I8251(config, m_uart, 4000000); + I8251(config, m_uart, XTAL::u(4000000)); m_uart->rxrdy_handler().set_inputline(m_ourcpu, INPUT_LINE_IRQ0); m_uart->txd_handler().set(FUNC(dsbz80_device::output_txd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(500000))); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) uart_clock.signal_handler().set("uart", FUNC(i8251_device::write_rxc)); uart_clock.signal_handler().append("uart", FUNC(i8251_device::write_txc)); } @@ -67,7 +67,7 @@ void dsbz80_device::device_add_mconfig(machine_config &config) // dsbz80_device - constructor //------------------------------------------------- -dsbz80_device::dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dsbz80_device::dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DSBZ80, tag, owner, clock), device_sound_interface(mconfig, *this), m_ourcpu(*this, Z80_TAG), diff --git a/src/mame/sega/dsbz80.h b/src/mame/sega/dsbz80.h index 6f135454524..46b1c62f16c 100644 --- a/src/mame/sega/dsbz80.h +++ b/src/mame/sega/dsbz80.h @@ -19,7 +19,7 @@ class dsbz80_device : public device_t, public device_sound_interface { public: // construction/destruction - dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto rxd_handler() { return m_rxd_handler.bind(); } diff --git a/src/mame/sega/fd1089.cpp b/src/mame/sega/fd1089.cpp index 755f57addca..173edc85ed0 100644 --- a/src/mame/sega/fd1089.cpp +++ b/src/mame/sega/fd1089.cpp @@ -222,7 +222,7 @@ void fd1089_base_device::decrypted_opcodes_map(address_map &map) // fd1089_base_device - constructor //------------------------------------------------- -fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, type, tag, owner, clock), m_region(*this, DEVICE_SELF), m_key(*this, "key"), @@ -232,12 +232,12 @@ fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_typ set_addrmap(AS_OPCODES, address_map_constructor(FUNC(fd1089_base_device::decrypted_opcodes_map), this)); } -fd1089a_device::fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fd1089a_device::fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fd1089_base_device(mconfig, FD1089A, tag, owner, clock) { } -fd1089b_device::fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fd1089b_device::fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fd1089_base_device(mconfig, FD1089B, tag, owner, clock) { } diff --git a/src/mame/sega/fd1089.h b/src/mame/sega/fd1089.h index 156f6452109..bf5990441b6 100644 --- a/src/mame/sega/fd1089.h +++ b/src/mame/sega/fd1089.h @@ -47,7 +47,7 @@ public: protected: // construction/destruction - fd1089_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + fd1089_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device overrides virtual void device_start() override; @@ -85,7 +85,7 @@ class fd1089a_device : public fd1089_base_device { public: // construction/destruction - fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t decode(uint8_t val, uint8_t key, bool opcode) override; @@ -99,7 +99,7 @@ class fd1089b_device : public fd1089_base_device { public: // construction/destruction - fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1089b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t decode(uint8_t val, uint8_t key, bool opcode) override; diff --git a/src/mame/sega/fd1094.cpp b/src/mame/sega/fd1094.cpp index 4d11af76d92..d99c7c725e1 100644 --- a/src/mame/sega/fd1094.cpp +++ b/src/mame/sega/fd1094.cpp @@ -552,7 +552,7 @@ uint16_t *fd1094_decryption_cache::decrypted_opcodes(uint8_t state) //------------------------------------------------- -fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, FD1094, tag, owner, clock) , m_decrypted_opcodes_bank(*this, "^fd1094_decrypted_opcodes") , m_state(0x00) diff --git a/src/mame/sega/fd1094.h b/src/mame/sega/fd1094.h index 614a6eb4145..659a2cc9e67 100644 --- a/src/mame/sega/fd1094.h +++ b/src/mame/sega/fd1094.h @@ -68,7 +68,7 @@ public: typedef delegate state_change_delegate; // construction/destruction - fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1094_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // explicit decryption helpers void decrypt(offs_t baseaddr, uint32_t size, offs_t regionoffs, uint16_t *opcodesptr, uint8_t state) { decrypt(baseaddr, size, &m_srcbase[regionoffs/2], opcodesptr, state); } diff --git a/src/mame/sega/flashbeats.cpp b/src/mame/sega/flashbeats.cpp index 8a34b2fdbe3..1c54140b334 100644 --- a/src/mame/sega/flashbeats.cpp +++ b/src/mame/sega/flashbeats.cpp @@ -127,7 +127,7 @@ void flashbeats_state::flashbeats(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &flashbeats_state::flashbeats_map); m_maincpu->set_addrmap(AS_IO, &flashbeats_state::flashbeats_io_map); - M68000(config, m_scspcpu, 11289600); + M68000(config, m_scspcpu, XTAL::u(11289600)); m_scspcpu->set_addrmap(AS_PROGRAM, &flashbeats_state::main_scsp_map); EEPROM_93C46_16BIT(config, "eeprom"); @@ -148,7 +148,7 @@ void flashbeats_state::flashbeats(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - SCSP(config, m_scsp, 22579200); // TODO : Unknown clock, divider + SCSP(config, m_scsp, XTAL::u(22579200)); // TODO : Unknown clock, divider m_scsp->set_addrmap(0, &flashbeats_state::scsp_mem); m_scsp->irq_cb().set(FUNC(flashbeats_state::scsp_irq)); m_scsp->add_route(0, "lspeaker", 1.0); diff --git a/src/mame/sega/gpworld.cpp b/src/mame/sega/gpworld.cpp index 50de06cfef8..bf0bf938a3f 100644 --- a/src/mame/sega/gpworld.cpp +++ b/src/mame/sega/gpworld.cpp @@ -491,7 +491,7 @@ void gpworld_state::gpworld(machine_config &config) m_maincpu->set_vblank_int("screen", FUNC(gpworld_state::vblank_callback)); - PIONEER_LDV1000(config, m_laserdisc, 0); + PIONEER_LDV1000(config, m_laserdisc); m_laserdisc->set_overlay(512, 256, FUNC(gpworld_state::screen_update)); m_laserdisc->add_route(0, "lspeaker", 1.0); m_laserdisc->add_route(1, "rspeaker", 1.0); diff --git a/src/mame/sega/gunsense.cpp b/src/mame/sega/gunsense.cpp index 5bd2c2c79d3..e5b6f646f41 100644 --- a/src/mame/sega/gunsense.cpp +++ b/src/mame/sega/gunsense.cpp @@ -9,7 +9,7 @@ // device type definition DEFINE_DEVICE_TYPE(SEGA_GUNSENSE, sega_gunsense_board_device, "gunsense", "Sega 838-13143 Gun Sense Board") -sega_gunsense_board_device::sega_gunsense_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega_gunsense_board_device::sega_gunsense_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_GUNSENSE, tag, owner, clock) { } @@ -27,7 +27,7 @@ void sega_gunsense_board_device::mem_map(address_map &map) void sega_gunsense_board_device::device_add_mconfig(machine_config &config) { - upd78213_device &mcu(UPD78213(config, "gunmcu", 12'000'000)); // clock unknown + upd78213_device &mcu(UPD78213(config, "gunmcu", XTAL::u(12'000'000))); // clock unknown mcu.set_addrmap(AS_PROGRAM, &sega_gunsense_board_device::mem_map); } diff --git a/src/mame/sega/gunsense.h b/src/mame/sega/gunsense.h index 82c77f8127f..9036af3981d 100644 --- a/src/mame/sega/gunsense.h +++ b/src/mame/sega/gunsense.h @@ -7,7 +7,7 @@ class sega_gunsense_board_device : public device_t { public: - sega_gunsense_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + sega_gunsense_board_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_start() override; diff --git a/src/mame/sega/hshavoc.cpp b/src/mame/sega/hshavoc.cpp index 28a572a803c..c8ef9f7bcf9 100644 --- a/src/mame/sega/hshavoc.cpp +++ b/src/mame/sega/hshavoc.cpp @@ -121,7 +121,7 @@ void hshavoc_state::hshavoc(machine_config &config) { md_bootleg(config); - PIC16C55(config, "pic", 4'000'000); // clock unknown + PIC16C55(config, "pic", XTAL::u(4'000'000)); // clock unknown } diff --git a/src/mame/sega/jvs13551.cpp b/src/mame/sega/jvs13551.cpp index e76875b499d..ed953e9589e 100644 --- a/src/mame/sega/jvs13551.cpp +++ b/src/mame/sega/jvs13551.cpp @@ -47,7 +47,7 @@ const tiny_rom_entry *sega_837_13551_device::device_rom_region() const void sega_837_13551_device::device_add_mconfig(machine_config &config) { - TMP90PH44(config, "iomcu", 10000000); // unknown clock + TMP90PH44(config, "iomcu", XTAL::u(10000000)); // unknown clock } ioport_constructor sega_837_13551_device::device_input_ports() const @@ -55,7 +55,7 @@ ioport_constructor sega_837_13551_device::device_input_ports() const return INPUT_PORTS_NAME(sega_837_13551_coins); } -sega_837_13551_device::sega_837_13551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : jvs_device(mconfig, SEGA_837_13551, tag, owner, clock) +sega_837_13551_device::sega_837_13551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_device(mconfig, SEGA_837_13551, tag, owner, clock) , port(*this, {finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG}) { } diff --git a/src/mame/sega/jvs13551.h b/src/mame/sega/jvs13551.h index ca04f387476..d1ce0f34165 100644 --- a/src/mame/sega/jvs13551.h +++ b/src/mame/sega/jvs13551.h @@ -14,13 +14,13 @@ class sega_837_13551_device : public jvs_device { public: template - sega_837_13551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&jvs_host_tag) + sega_837_13551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&jvs_host_tag) : sega_837_13551_device(mconfig, tag, owner, clock) { host.set_tag(std::forward(jvs_host_tag)); } - sega_837_13551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_837_13551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_port_tag(T &&port_tag) { port[Which].set_tag(std::forward(port_tag)); } diff --git a/src/mame/sega/kopunch.cpp b/src/mame/sega/kopunch.cpp index f966346fb2b..ed585913c76 100644 --- a/src/mame/sega/kopunch.cpp +++ b/src/mame/sega/kopunch.cpp @@ -417,7 +417,7 @@ void kopunch_state::machine_start() void kopunch_state::kopunch(machine_config &config) { // basic machine hardware - I8085A(config, m_maincpu, 4'000'000); // 4 MHz? + I8085A(config, m_maincpu, XTAL::u(4'000'000)); // 4 MHz? m_maincpu->set_addrmap(AS_PROGRAM, &kopunch_state::prg_map); m_maincpu->set_addrmap(AS_IO, &kopunch_state::io_map); diff --git a/src/mame/sega/lindbergh.cpp b/src/mame/sega/lindbergh.cpp index f03601227dd..67ad38d9fdc 100644 --- a/src/mame/sega/lindbergh.cpp +++ b/src/mame/sega/lindbergh.cpp @@ -397,28 +397,28 @@ void lindbergh_state::lindbergh(machine_config &config) { PENTIUM4(config, "maincpu", 28000000U*5); /* Actually Celeron D at 2,8 GHz */ - PCI_ROOT (config, "pci", 0); - I82875P_HOST (config, "pci:00.0", 0, 0x103382c0, "maincpu", 512*1024*1024); - I82875P_AGP (config, "pci:01.0", 0); - GEFORCE_7600GS (config, "pci:01.0:00.0", 0, 0x10de02e1); - I82875P_OVERFLOW (config, "pci:06.0", 0, 0x103382c0); - PCI_BRIDGE (config, "pci:1c.0", 0, 0x808625ae, 0x02); - I82541 (config, "pci:1c.0:00.0", 0, 0x103382c0); - USB_UHCI (config, "pci:1d.0", 0, 0x808625a9, 0x02, 0x103382c0); - USB_UHCI (config, "pci:1d.1", 0, 0x808625aa, 0x02, 0x103382c0); - I6300ESB_WATCHDOG (config, "pci:1d.4", 0, 0x103382c0); - APIC (config, "pci:1d.5", 0, 0x808625ac, 0x02, 0x103382c0); - USB_EHCI (config, "pci:1d.7", 0, 0x808625ad, 0x02, 0x103382c0); - PCI_BRIDGE (config, "pci:1e.0", 0, 0x8086244e, 0x0a); - SB0400 (config, "pci:1e.0:02.0", 0, 0x11021101); - SEGA_LINDBERGH_BASEBOARD(config, "pci:1e.0:03.0", 0); - I6300ESB_LPC (config, "pci:1f.0", 0); - LPC_ACPI (config, "pci:1f.0:acpi", 0); - LPC_RTC (config, "pci:1f.0:rtc", 0); - LPC_PIT (config, "pci:1f.0:pit", 0); - SATA (config, "pci:1f.2", 0, 0x808625a3, 0x02, 0x103382c0); - SMBUS (config, "pci:1f.3", 0, 0x808625a4, 0x02, 0x103382c0); - AC97 (config, "pci:1f.5", 0, 0x808625a6, 0x02, 0x103382c0); + PCI_ROOT (config, "pci"); + I82875P_HOST (config, "pci:00.0" 0x103382c0, "maincpu", 512*1024*1024); + I82875P_AGP (config, "pci:01.0"); + GEFORCE_7600GS (config, "pci:01.0:00.0", 0x10de02e1); + I82875P_OVERFLOW (config, "pci:06.0", 0x103382c0); + PCI_BRIDGE (config, "pci:1c.0", 0x808625ae, 0x02); + I82541 (config, "pci:1c.0:00.0", 0x103382c0); + USB_UHCI (config, "pci:1d.0", 0x808625a9, 0x02, 0x103382c0); + USB_UHCI (config, "pci:1d.1", 0x808625aa, 0x02, 0x103382c0); + I6300ESB_WATCHDOG (config, "pci:1d.4", 0x103382c0); + APIC (config, "pci:1d.5", 0x808625ac, 0x02, 0x103382c0); + USB_EHCI (config, "pci:1d.7", 0x808625ad, 0x02, 0x103382c0); + PCI_BRIDGE (config, "pci:1e.0", 0x8086244e, 0x0a); + SB0400 (config, "pci:1e.0:02.0", 0x11021101); + SEGA_LINDBERGH_BASEBOARD(config, "pci:1e.0:03.0"); + I6300ESB_LPC (config, "pci:1f.0"); + LPC_ACPI (config, "pci:1f.0:acpi"); + LPC_RTC (config, "pci:1f.0:rtc"); + LPC_PIT (config, "pci:1f.0:pit"); + SATA (config, "pci:1f.2", 0x808625a3, 0x02, 0x103382c0); + SMBUS (config, "pci:1f.3", 0x808625a4, 0x02, 0x103382c0); + AC97 (config, "pci:1f.5", 0x808625a6, 0x02, 0x103382c0); } #define LINDBERGH_BIOS \ diff --git a/src/mame/sega/m1comm.cpp b/src/mame/sega/m1comm.cpp index 6771229dc92..f19d47dc578 100644 --- a/src/mame/sega/m1comm.cpp +++ b/src/mame/sega/m1comm.cpp @@ -104,11 +104,11 @@ DEFINE_DEVICE_TYPE(M1COMM, m1comm_device, "m1comm", "Model-1 Communication Board void m1comm_device::device_add_mconfig(machine_config &config) { - Z80(config, m_cpu, 8000000); // 32 MHz / 4 + Z80(config, m_cpu, XTAL::u(8000000)); // 32 MHz / 4 m_cpu->set_memory_map(&m1comm_device::m1comm_mem); m_cpu->set_io_map(&m1comm_device::m1comm_io); - AM9517A(config, m_dma, 8000000); // 32 MHz / 4 + AM9517A(config, m_dma, XTAL::u(8000000)); // 32 MHz / 4 m_dma->out_hreq_callback().set(FUNC(m1comm_device::dma_hreq_w)); m_dma->in_memr_callback().set(FUNC(m1comm_device::dma_mem_r)); m_dma->out_memw_callback().set(FUNC(m1comm_device::dma_mem_w)); @@ -118,7 +118,7 @@ void m1comm_device::device_add_mconfig(machine_config &config) m_dma->in_ior_callback<2>().set(m_dlc, FUNC(mb89374_device::dma_r)); m_dma->out_iow_callback<3>().set(m_dlc, FUNC(mb89374_device::dma_w)); - MB89374(config, m_dlc, 8000000); // 32 MHz / 4 + MB89374(config, m_dlc, XTAL::u(8000000)); // 32 MHz / 4 m_dlc->out_po_callback<2>().set(m_dma, FUNC(am9517a_device::dreq3_w)); m_dlc->out_po_callback<3>().set(m_dma, FUNC(am9517a_device::dreq2_w)); m_dlc->out_irq_callback().set(FUNC(m1comm_device::dlc_int7_w)); @@ -140,7 +140,7 @@ const tiny_rom_entry *m1comm_device::device_rom_region() const // m1comm_device - constructor //------------------------------------------------- -m1comm_device::m1comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m1comm_device::m1comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M1COMM, tag, owner, clock), m_cpu(*this, Z80_TAG), m_dma(*this, "commdma"), diff --git a/src/mame/sega/m1comm.h b/src/mame/sega/m1comm.h index 6f7190c894f..a75d7634043 100644 --- a/src/mame/sega/m1comm.h +++ b/src/mame/sega/m1comm.h @@ -21,7 +21,7 @@ class m1comm_device : public device_t { public: // construction/destruction - m1comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m1comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public API - stuff that gets called from the model1 // shared memory 4k diff --git a/src/mame/sega/m2comm.cpp b/src/mame/sega/m2comm.cpp index f590e0d3edb..eb64a90884e 100644 --- a/src/mame/sega/m2comm.cpp +++ b/src/mame/sega/m2comm.cpp @@ -194,7 +194,7 @@ void m2comm_device::device_add_mconfig(machine_config &config) // m2comm_device - constructor //------------------------------------------------- -m2comm_device::m2comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m2comm_device::m2comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M2COMM, tag, owner, clock) { // prepare localhost "filename" diff --git a/src/mame/sega/m2comm.h b/src/mame/sega/m2comm.h index 83821ba961a..a3e8e2dc47c 100644 --- a/src/mame/sega/m2comm.h +++ b/src/mame/sega/m2comm.h @@ -17,7 +17,7 @@ class m2comm_device : public device_t { public: // construction/destruction - m2comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m2comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // single bit registers (74LS74) uint8_t zfg_r(offs_t offset); diff --git a/src/mame/sega/m3comm.cpp b/src/mame/sega/m3comm.cpp index f52cd7c2e38..b4cc0290917 100644 --- a/src/mame/sega/m3comm.cpp +++ b/src/mame/sega/m3comm.cpp @@ -120,7 +120,7 @@ DEFINE_DEVICE_TYPE(M3COMM, m3comm_device, "m3comm", "Model 3 Communication Board void m3comm_device::device_add_mconfig(machine_config &config) { - M68000(config, m_commcpu, 10000000); // random + M68000(config, m_commcpu, XTAL::u(10000000)); // random m_commcpu->set_addrmap(AS_PROGRAM, &m3comm_device::m3comm_mem); RAM(config, RAM_TAG).set_default_size("128K"); @@ -134,7 +134,7 @@ void m3comm_device::device_add_mconfig(machine_config &config) // m3comm_device - constructor //------------------------------------------------- -m3comm_device::m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m3comm_device::m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M3COMM, tag, owner, clock), m_line_rx(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE ), m_line_tx(OPEN_FLAG_READ), diff --git a/src/mame/sega/m3comm.h b/src/mame/sega/m3comm.h index db1684bdcae..8c7c5caa85d 100644 --- a/src/mame/sega/m3comm.h +++ b/src/mame/sega/m3comm.h @@ -19,7 +19,7 @@ class m3comm_device : public device_t { public: // construction/destruction - m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m3comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void m3_map(address_map &map); diff --git a/src/mame/sega/maple-dc.cpp b/src/mame/sega/maple-dc.cpp index 47e44386efd..43e8d7ffe7a 100644 --- a/src/mame/sega/maple-dc.cpp +++ b/src/mame/sega/maple-dc.cpp @@ -17,7 +17,7 @@ void maple_dc_device::amap(address_map &map) map(0x8c, 0x8f).w(FUNC(maple_dc_device::sb_mdapro_w)); } -maple_dc_device::maple_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +maple_dc_device::maple_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MAPLE_DC, tag, owner, clock), cpu(*this, finder_base::DUMMY_TAG), irq_cb(*this) diff --git a/src/mame/sega/maple-dc.h b/src/mame/sega/maple-dc.h index 45d2efbbec1..37e27980c04 100644 --- a/src/mame/sega/maple-dc.h +++ b/src/mame/sega/maple-dc.h @@ -17,13 +17,13 @@ public: }; template - maple_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + maple_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : maple_dc_device(mconfig, tag, owner, clock) { set_maincpu_tag(std::forward(cpu_tag)); } - maple_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + maple_dc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_maincpu_tag(T &&cpu_tag) { cpu.set_tag(std::forward(cpu_tag)); } auto irq_callback() { return irq_cb.bind(); } diff --git a/src/mame/sega/mapledev.cpp b/src/mame/sega/mapledev.cpp index ee4340ee56f..d38caa22563 100644 --- a/src/mame/sega/mapledev.cpp +++ b/src/mame/sega/mapledev.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "mapledev.h" -maple_device::maple_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock) +maple_device::maple_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , host(*this, finder_base::DUMMY_TAG) { host_port = 0; diff --git a/src/mame/sega/mapledev.h b/src/mame/sega/mapledev.h index 2bc3f6d4676..9552b994c98 100644 --- a/src/mame/sega/mapledev.h +++ b/src/mame/sega/mapledev.h @@ -16,7 +16,7 @@ public: virtual void maple_reset(); protected: - maple_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + maple_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint32_t reply_size = 0; bool reply_partial = false; diff --git a/src/mame/sega/mdconsole.cpp b/src/mame/sega/mdconsole.cpp index 0021f421f11..153bde9bc90 100644 --- a/src/mame/sega/mdconsole.cpp +++ b/src/mame/sega/mdconsole.cpp @@ -778,7 +778,7 @@ void md_cons_cd_state::genesis_scd(machine_config &config) subdevice("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console)); - SEGA_SEGACD_US(config, m_segacd, 0); + SEGA_SEGACD_US(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -796,7 +796,7 @@ void md_cons_cd_state::genesis2_scd(machine_config &config) subdevice("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console)); - SEGA_SEGACD_US(config, m_segacd, 0); + SEGA_SEGACD_US(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -814,7 +814,7 @@ void md_cons_cd_state::md_scd(machine_config &config) subdevice("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console)); - SEGA_SEGACD_EUROPE(config, m_segacd, 0); + SEGA_SEGACD_EUROPE(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -832,7 +832,7 @@ void md_cons_cd_state::md2_scd(machine_config &config) subdevice("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console)); - SEGA_SEGACD_EUROPE(config, m_segacd, 0); + SEGA_SEGACD_EUROPE(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -850,7 +850,7 @@ void md_cons_cd_state::mdj_scd(machine_config &config) subdevice("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console)); - SEGA_SEGACD_JAPAN(config, m_segacd, 0); + SEGA_SEGACD_JAPAN(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -868,7 +868,7 @@ void md_cons_cd_state::md2j_scd(machine_config &config) subdevice("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console)); - SEGA_SEGACD_JAPAN(config, m_segacd, 0); + SEGA_SEGACD_JAPAN(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -886,7 +886,7 @@ void md_cons_cd_state::genesis_32x_scd(machine_config &config) { genesis_32x(config); - SEGA_SEGACD_US(config, m_segacd, 0); + SEGA_SEGACD_US(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -906,7 +906,7 @@ void md_cons_cd_state::md_32x_scd(machine_config &config) { md_32x(config); - SEGA_SEGACD_EUROPE(config, m_segacd, 0); + SEGA_SEGACD_EUROPE(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); @@ -926,7 +926,7 @@ void md_cons_cd_state::mdj_32x_scd(machine_config &config) { mdj_32x(config); - SEGA_SEGACD_JAPAN(config, m_segacd, 0); + SEGA_SEGACD_JAPAN(config, m_segacd); m_segacd->set_palette("gen_vdp:gfx_palette"); m_segacd->set_hostcpu(m_maincpu); m_segacd->set_screen("megadriv"); diff --git a/src/mame/sega/megacd.cpp b/src/mame/sega/megacd.cpp index c8d0d0f4ff7..8270468c0a6 100644 --- a/src/mame/sega/megacd.cpp +++ b/src/mame/sega/megacd.cpp @@ -280,10 +280,10 @@ void sega_segacd_device::device_add_mconfig(machine_config &config) m_scdcpu->set_addrmap(AS_PROGRAM, &sega_segacd_device::segacd_map); m_scdcpu->set_irq_acknowledge_callback(FUNC(sega_segacd_device::segacd_sub_int_callback)); - LC89510(config, "cdc", 0); // cd controller + LC89510(config, "cdc"); // cd controller // temporary until things are cleaned up - LC89510_TEMP(config, m_lc89510_temp, 0); // cd controller + LC89510_TEMP(config, m_lc89510_temp); // cd controller m_lc89510_temp->set_cdc_do_dma_callback(FUNC(sega_segacd_device::SegaCD_CDC_Do_DMA)); // hack m_lc89510_temp->set_cdrom_tag("^cdrom"); m_lc89510_temp->set_68k_tag(m_scdcpu); @@ -304,7 +304,7 @@ void sega_segacd_device::device_add_mconfig(machine_config &config) } -sega_segacd_device::sega_segacd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sega_segacd_device::sega_segacd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfx_segacd) , device_video_interface(mconfig, *this, false) @@ -324,17 +324,17 @@ sega_segacd_device::sega_segacd_device(const machine_config &mconfig, device_typ { } -sega_segacd_us_device::sega_segacd_us_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_segacd_us_device::sega_segacd_us_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_segacd_device(mconfig, SEGA_SEGACD_US, tag, owner, clock) { } -sega_segacd_japan_device::sega_segacd_japan_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_segacd_japan_device::sega_segacd_japan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_segacd_device(mconfig, SEGA_SEGACD_JAPAN, tag, owner, clock) { } -sega_segacd_europe_device::sega_segacd_europe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_segacd_europe_device::sega_segacd_europe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_segacd_device(mconfig, SEGA_SEGACD_EUROPE, tag, owner, clock) { } diff --git a/src/mame/sega/megacd.h b/src/mame/sega/megacd.h index 13bcb2579da..1f9599eb974 100644 --- a/src/mame/sega/megacd.h +++ b/src/mame/sega/megacd.h @@ -104,7 +104,7 @@ public: void segacd_map(address_map &map); void segacd_pcm_map(address_map &map); protected: - sega_segacd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega_segacd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -206,19 +206,19 @@ protected: class sega_segacd_us_device : public sega_segacd_device { public: - sega_segacd_us_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_segacd_us_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sega_segacd_japan_device : public sega_segacd_device { public: - sega_segacd_japan_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_segacd_japan_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sega_segacd_europe_device : public sega_segacd_device { public: - sega_segacd_europe_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_segacd_europe_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/mame/sega/megadriv.h b/src/mame/sega/megadriv.h index eb95bc8eedc..b66c0112af9 100644 --- a/src/mame/sega/megadriv.h +++ b/src/mame/sega/megadriv.h @@ -11,8 +11,8 @@ #include "sound/ymopn.h" #include "video/315_5313.h" -#define MASTER_CLOCK_NTSC 53693175 -#define MASTER_CLOCK_PAL 53203424 +#define MASTER_CLOCK_NTSC XTAL::u(53693175) +#define MASTER_CLOCK_PAL XTAL::u(53203424) #define MD_CPU_REGION_SIZE 0x800000 diff --git a/src/mame/sega/megaplay.cpp b/src/mame/sega/megaplay.cpp index 6a435523093..dab21e16144 100644 --- a/src/mame/sega/megaplay.cpp +++ b/src/mame/sega/megaplay.cpp @@ -36,7 +36,7 @@ this reason. #include "megadriv.h" -#define MASTER_CLOCK 53693100 +#define MASTER_CLOCK XTAL::u(53693100) #define MP_ROM 1 #define MP_GAME 0 diff --git a/src/mame/sega/megatech.cpp b/src/mame/sega/megatech.cpp index 8590c6dd289..d40a0ccf297 100644 --- a/src/mame/sega/megatech.cpp +++ b/src/mame/sega/megatech.cpp @@ -87,7 +87,7 @@ Sonic Hedgehog 2 171-6215A 837-6963-62 610-0239-62 MPR #include "layout/generic.h" -#define MASTER_CLOCK 53693100 +#define MASTER_CLOCK XTAL::u(53693100) diff --git a/src/mame/sega/mie.cpp b/src/mame/sega/mie.cpp index 77639bd5ea8..a1c9c697632 100644 --- a/src/mame/sega/mie.cpp +++ b/src/mame/sega/mie.cpp @@ -73,12 +73,12 @@ void mie_device::device_add_mconfig(machine_config &config) cpu->set_irq_acknowledge_callback(FUNC(mie_device::irq_callback)); } -mie_jvs_device::mie_jvs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mie_jvs_device::mie_jvs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : jvs_host(mconfig, MIE_JVS, tag, owner, clock) { } -mie_device::mie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mie_device::mie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : maple_device(mconfig, MIE, tag, owner, clock) , cpu(*this, "mie") , jvs(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/sega/mie.h b/src/mame/sega/mie.h index 57792269ec0..3004906b037 100644 --- a/src/mame/sega/mie.h +++ b/src/mame/sega/mie.h @@ -20,7 +20,7 @@ class mie_device : public maple_device { public: template - mie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&host_tag, int host_port, U &&jvs_tag) + mie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&host_tag, int host_port, U &&jvs_tag) : mie_device(mconfig, tag, owner, clock) { host.set_tag(std::forward(host_tag)); @@ -28,7 +28,7 @@ public: jvs.set_tag(std::forward(jvs_tag)); } - mie_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mie_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_gpio_name(T &&gpio_port_tag) { gpio_port[Which].set_tag(std::forward(gpio_port_tag)); } @@ -131,7 +131,7 @@ public: friend class mie_device; // construction/destruction - mie_jvs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mie_jvs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/mame/sega/model1.cpp b/src/mame/sega/model1.cpp index 61da3ea21d9..60382c48b83 100644 --- a/src/mame/sega/model1.cpp +++ b/src/mame/sega/model1.cpp @@ -1709,19 +1709,19 @@ ROM_END void model1_state::model1(machine_config &config) { - V60(config, m_maincpu, 16000000); + V60(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &model1_state::model1_mem); m_maincpu->set_addrmap(AS_IO, &model1_state::model1_io); m_maincpu->set_irq_acknowledge_callback(FUNC(model1_state::irq_callback)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // 2x MB84256A-70LL + battery - GENERIC_FIFO_U32(config, "copro_fifo_in", 0); - GENERIC_FIFO_U32(config, "copro_fifo_out", 0); + GENERIC_FIFO_U32(config, "copro_fifo_in"); + GENERIC_FIFO_U32(config, "copro_fifo_out"); TIMER(config, "scantimer").configure_scanline(FUNC(model1_state::model1_interrupt), "screen", 0, 1); - MB86233(config, m_tgp_copro, 16000000); + MB86233(config, m_tgp_copro, XTAL::u(16000000)); m_tgp_copro->set_addrmap(AS_PROGRAM, &model1_state::copro_prog_map); m_tgp_copro->set_addrmap(AS_DATA, &model1_state::copro_data_map); m_tgp_copro->set_addrmap(AS_IO, &model1_state::copro_io_map); @@ -1738,21 +1738,21 @@ void model1_state::model1(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 8192); // create SEGA_MODEL1IO device *after* SCREEN device - model1io_device &ioboard(SEGA_MODEL1IO(config, "ioboard", 0)); + model1io_device &ioboard(SEGA_MODEL1IO(config, "ioboard")); ioboard.read_callback().set(m_dpram, FUNC(mb8421_device::left_r)); ioboard.write_callback().set(m_dpram, FUNC(mb8421_device::left_w)); ioboard.in_callback<0>().set_ioport("IN.0"); ioboard.in_callback<1>().set_ioport("IN.1"); - MB8421(config, m_dpram, 0); + MB8421(config, m_dpram); - SEGAM1AUDIO(config, m_m1audio, 0); + SEGAM1AUDIO(config, m_m1audio); m_m1audio->rxd_handler().set(m_m1uart, FUNC(i8251_device::write_rxd)); - I8251(config, m_m1uart, 8000000); // uPD71051C, clock unknown + I8251(config, m_m1uart, XTAL::u(8000000)); // uPD71051C, clock unknown m_m1uart->txd_handler().set(m_m1audio, FUNC(segam1audio_device::write_txd)); - clock_device &m1uart_clock(CLOCK(config, "m1uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &m1uart_clock(CLOCK(config, "m1uart_clock", XTAL::u(500000))); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) m1uart_clock.signal_handler().set(m_m1uart, FUNC(i8251_device::write_txc)); m1uart_clock.signal_handler().append(m_m1uart, FUNC(i8251_device::write_rxc)); } @@ -1782,7 +1782,7 @@ void model1_state::vr(machine_config &config) ioboard.output_callback().set(FUNC(model1_state::vr_outputs_w)); ioboard.output_callback().append(FUNC(model1_state::gen_outputs_w)); - M1COMM(config, "m1comm", 0).set_default_bios_tag("epr15112"); + M1COMM(config, "m1comm").set_default_bios_tag("epr15112"); } void model1_state::vformula(machine_config &config) @@ -1799,7 +1799,7 @@ void model1_state::vformula(machine_config &config) ioboard.output_callback().set(FUNC(model1_state::vr_outputs_w)); ioboard.output_callback().append(FUNC(model1_state::gen_outputs_w)); - M1COMM(config, "m1comm", 0).set_default_bios_tag("epr15624"); + M1COMM(config, "m1comm").set_default_bios_tag("epr15624"); } void model1_state::swa(machine_config &config) @@ -1818,7 +1818,7 @@ void model1_state::swa(machine_config &config) SPEAKER(config, "dleft").front_left(); SPEAKER(config, "dright").front_right(); - DSBZ80(config, m_dsbz80, 0); + DSBZ80(config, m_dsbz80); m_dsbz80->add_route(0, "dleft", 1.0); m_dsbz80->add_route(1, "dright", 1.0); @@ -1846,7 +1846,7 @@ void model1_state::wingwar(machine_config &config) config.set_default_layout(layout_model1io2); - M1COMM(config, "m1comm", 0).set_default_bios_tag("epr15112"); + M1COMM(config, "m1comm").set_default_bios_tag("epr15112"); } void model1_state::wingwar360(machine_config &config) @@ -1873,7 +1873,7 @@ void model1_state::polhemus_map(address_map &map) void model1_state::netmerc(machine_config &config) { model1(config); - i386sx_device &polhemus(I386SX(config, "polhemus", 16000000)); + i386sx_device &polhemus(I386SX(config, "polhemus", XTAL::u(16000000))); polhemus.set_addrmap(AS_PROGRAM, &model1_state::polhemus_map); model1io2_device &ioboard(SEGA_MODEL1IO2(config.replace(), "ioboard", 0)); diff --git a/src/mame/sega/model1io.cpp b/src/mame/sega/model1io.cpp index 731f31b0df9..05c61d4b1f8 100644 --- a/src/mame/sega/model1io.cpp +++ b/src/mame/sega/model1io.cpp @@ -147,7 +147,7 @@ void model1io_device::device_add_mconfig(machine_config &config) io.out_pf_callback().set(FUNC(model1io_device::io_pf_w)); io.in_pg_callback().set(FUNC(model1io_device::io_pg_r)); - msm6253_device &adc(MSM6253(config, "adc", 0)); + msm6253_device &adc(MSM6253(config, "adc")); adc.set_input_cb<0>(FUNC(model1io_device::analog0_r)); adc.set_input_cb<1>(FUNC(model1io_device::analog1_r)); adc.set_input_cb<2>(FUNC(model1io_device::analog2_r)); @@ -163,7 +163,7 @@ void model1io_device::device_add_mconfig(machine_config &config) // model1io_device - constructor //------------------------------------------------- -model1io_device::model1io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +model1io_device::model1io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_MODEL1IO, tag, owner, clock), m_eeprom(*this, "eeprom"), m_buttons(*this, "buttons"), diff --git a/src/mame/sega/model1io.h b/src/mame/sega/model1io.h index 58e105fa384..8a74ee4ab03 100644 --- a/src/mame/sega/model1io.h +++ b/src/mame/sega/model1io.h @@ -26,7 +26,7 @@ class model1io_device : public device_t { public: // construction/destruction - model1io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + model1io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto read_callback() { return m_read_cb.bind(); } diff --git a/src/mame/sega/model1io2.cpp b/src/mame/sega/model1io2.cpp index 334c27c5f79..b138a7697f6 100644 --- a/src/mame/sega/model1io2.cpp +++ b/src/mame/sega/model1io2.cpp @@ -180,7 +180,7 @@ void model1io2_device::device_add_mconfig(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); // 93C45 - MB3773(config, m_watchdog, 0); + MB3773(config, m_watchdog); msm6253_device &adc(MSM6253(config, "adc", 32_MHz_XTAL / 16 / 4)); adc.set_input_cb<0>(FUNC(model1io2_device::analog0_r)); @@ -199,7 +199,7 @@ void model1io2_device::device_add_mconfig(machine_config &config) PALETTE(config, "palette", FUNC(model1io2_device::lcd_palette), 3); - HD44780(config, m_lcd, 0); + HD44780(config, m_lcd); m_lcd->set_lcd_size(2, 20); m_lcd->set_pixel_update_cb(FUNC(model1io2_device::lcd_pixel_update)); } @@ -213,7 +213,7 @@ void model1io2_device::device_add_mconfig(machine_config &config) // model1io2_device - constructor //------------------------------------------------- -model1io2_device::model1io2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +model1io2_device::model1io2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_MODEL1IO2, tag, owner, clock), m_eeprom(*this, "eeprom"), m_watchdog(*this, "watchdog"), diff --git a/src/mame/sega/model1io2.h b/src/mame/sega/model1io2.h index 1f685571830..c978e07b7b7 100644 --- a/src/mame/sega/model1io2.h +++ b/src/mame/sega/model1io2.h @@ -25,7 +25,7 @@ class model1io2_device : public device_t { public: // construction/destruction - model1io2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + model1io2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto read_callback() { return m_read_cb.bind(); } diff --git a/src/mame/sega/model2.cpp b/src/mame/sega/model2.cpp index 4c9daac0853..1935d46d2bc 100644 --- a/src/mame/sega/model2.cpp +++ b/src/mame/sega/model2.cpp @@ -2497,11 +2497,11 @@ void model2_state::model2_scsp(machine_config &config) m_scsp->add_route(0, "lspeaker", 1.0); m_scsp->add_route(1, "rspeaker", 1.0); - I8251(config, m_uart, 8000000); // uPD71051C, clock unknown + I8251(config, m_uart, XTAL::u(8000000)); // uPD71051C, clock unknown // m_uart->rxrdy_handler().set(FUNC(model2_state::sound_ready_w)); // m_uart->txrdy_handler().set(FUNC(model2_state::sound_ready_w)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(500000))); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); } @@ -2509,18 +2509,18 @@ void model2_state::model2_scsp(machine_config &config) /* original Model 2 */ void model2o_state::model2o(machine_config &config) { - I960(config, m_maincpu, 25000000); + I960(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &model2o_state::model2o_mem); TIMER(config, "scantimer").configure_scanline(FUNC(model2_state::model2_interrupt), "screen", 0, 1); - MB86234(config, m_copro_tgp, 16000000); + MB86234(config, m_copro_tgp, XTAL::u(16000000)); m_copro_tgp->set_addrmap(AS_PROGRAM, &model2o_state::copro_tgp_prog_map); m_copro_tgp->set_addrmap(AS_DATA, &model2o_state::copro_tgp_data_map); m_copro_tgp->set_addrmap(AS_IO, &model2o_state::copro_tgp_io_map); m_copro_tgp->set_addrmap(mb86233_device::AS_RF, &model2o_state::copro_tgp_rf_map); - ADDRESS_MAP_BANK(config, m_copro_tgp_bank, 0); + ADDRESS_MAP_BANK(config, m_copro_tgp_bank); m_copro_tgp_bank->set_addrmap(0, &model2o_state::copro_tgp_bank_map); m_copro_tgp_bank->set_endianness(ENDIANNESS_LITTLE); m_copro_tgp_bank->set_data_width(32); @@ -2528,8 +2528,8 @@ void model2o_state::model2o(machine_config &config) m_copro_tgp_bank->set_shift(-2); m_copro_tgp_bank->set_stride(0x10000); - GENERIC_FIFO_U32(config, m_copro_fifo_in, 0); - GENERIC_FIFO_U32(config, m_copro_fifo_out, 0); + GENERIC_FIFO_U32(config, m_copro_fifo_in); + GENERIC_FIFO_U32(config, m_copro_fifo_out); NVRAM(config, "backup1", nvram_device::DEFAULT_ALL_1); @@ -2537,26 +2537,26 @@ void model2o_state::model2o(machine_config &config) model2_screen(config); // create SEGA_MODEL1IO device *after* SCREEN device - model1io_device &ioboard(SEGA_MODEL1IO(config, "ioboard", 0)); + model1io_device &ioboard(SEGA_MODEL1IO(config, "ioboard")); ioboard.set_default_bios_tag("epr14869c"); ioboard.read_callback().set("dpram", FUNC(mb8421_device::left_r)); ioboard.write_callback().set("dpram", FUNC(mb8421_device::left_w)); ioboard.in_callback<0>().set_ioport("IN0"); ioboard.in_callback<1>().set_ioport("IN1"); - MB8421(config, "dpram", 0); + MB8421(config, "dpram"); - SEGAM1AUDIO(config, m_m1audio, 0); + SEGAM1AUDIO(config, m_m1audio); m_m1audio->rxd_handler().set(m_uart, FUNC(i8251_device::write_rxd)); - I8251(config, m_uart, 8000000); // uPD71051C, clock unknown + I8251(config, m_uart, XTAL::u(8000000)); // uPD71051C, clock unknown m_uart->txd_handler().set(m_m1audio, FUNC(segam1audio_device::write_txd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(500000))); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); - M2COMM(config, "m2comm", 0); + M2COMM(config, "m2comm"); } u8 model2_state::driveio_portg_r() @@ -2597,14 +2597,14 @@ void model2_state::sj25_0207_01(machine_config &config) m_drivecpu->set_addrmap(AS_IO, &model2_state::drive_io_map); m_drivecpu->set_vblank_int("screen", FUNC(model2_state::irq0_line_hold)); - sega_315_5296_device &driveio1(SEGA_315_5296(config, "driveio1", 0)); // unknown clock + sega_315_5296_device &driveio1(SEGA_315_5296(config, "driveio1")); // unknown clock driveio1.out_pd_callback().set(FUNC(model2_state::driveio_port_w)); driveio1.in_pg_callback().set(FUNC(model2_state::driveio_portg_r)); driveio1.in_ph_callback().set(FUNC(model2_state::driveio_porth_r)); - SEGA_315_5296(config, "driveio2", 0); // unknown clock + SEGA_315_5296(config, "driveio2"); // unknown clock - MSM6253(config, "driveadc", 0); + MSM6253(config, "driveadc"); } void model2o_state::daytona(machine_config &config) @@ -2668,17 +2668,17 @@ void model2o_state::vcop(machine_config &config) /* 2A-CRX */ void model2a_state::model2a(machine_config &config) { - I960(config, m_maincpu, 25000000); + I960(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &model2a_state::model2a_crx_mem); TIMER(config, "scantimer").configure_scanline(FUNC(model2_state::model2_interrupt), "screen", 0, 1); - MB86234(config, m_copro_tgp, 16000000); + MB86234(config, m_copro_tgp, XTAL::u(16000000)); m_copro_tgp->set_addrmap(AS_PROGRAM, &model2a_state::copro_tgp_prog_map); m_copro_tgp->set_addrmap(AS_DATA, &model2a_state::copro_tgp_data_map); m_copro_tgp->set_addrmap(AS_IO, &model2a_state::copro_tgp_io_map); m_copro_tgp->set_addrmap(mb86233_device::AS_RF, &model2a_state::copro_tgp_rf_map); - ADDRESS_MAP_BANK(config, m_copro_tgp_bank, 0); + ADDRESS_MAP_BANK(config, m_copro_tgp_bank); m_copro_tgp_bank->set_addrmap(0, &model2a_state::copro_tgp_bank_map); m_copro_tgp_bank->set_endianness(ENDIANNESS_LITTLE); m_copro_tgp_bank->set_data_width(32); @@ -2686,13 +2686,13 @@ void model2a_state::model2a(machine_config &config) m_copro_tgp_bank->set_shift(-2); m_copro_tgp_bank->set_stride(0x10000); - GENERIC_FIFO_U32(config, m_copro_fifo_in, 0); - GENERIC_FIFO_U32(config, m_copro_fifo_out, 0); + GENERIC_FIFO_U32(config, m_copro_fifo_in); + GENERIC_FIFO_U32(config, m_copro_fifo_out); EEPROM_93C46_16BIT(config, "eeprom"); NVRAM(config, "backup1", nvram_device::DEFAULT_ALL_1); - sega_315_5649_device &io(SEGA_315_5649(config, "io", 0)); + sega_315_5649_device &io(SEGA_315_5649(config, "io")); io.out_pa_callback().set(FUNC(model2a_state::eeprom_w)); io.in_pb_callback().set(FUNC(model2a_state::in0_r)); io.in_pc_callback().set_ioport("IN1"); @@ -2704,9 +2704,9 @@ void model2a_state::model2a(machine_config &config) model2_screen(config); model2_scsp(config); - M2COMM(config, "m2comm", 0); + M2COMM(config, "m2comm"); - SEGA_BILLBOARD(config, m_billboard, 0); + SEGA_BILLBOARD(config, m_billboard); config.set_default_layout(layout_segabill); } @@ -2726,7 +2726,7 @@ void model2a_state::manxttdx(machine_config &config) { manxtt(config); - SEGAM1AUDIO(config, m_m1audio, 0); + SEGAM1AUDIO(config, m_m1audio); m_m1audio->rxd_handler().set(m_uart, FUNC(i8251_device::write_rxd)); m_uart->txd_handler().set(m_m1audio, FUNC(segam1audio_device::write_txd)); @@ -2774,7 +2774,7 @@ void model2a_state::model2a_5881(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &model2a_state::model2a_5881_mem); - SEGA315_5881_CRYPT(config, m_cryptdevice, 0); + SEGA315_5881_CRYPT(config, m_cryptdevice); m_cryptdevice->set_read_cb(FUNC(model2a_state::crypt_read_callback)); } @@ -2784,7 +2784,7 @@ void model2a_state::model2a_0229(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &model2a_state::model2a_0229_mem); - SEGA315_5838_COMP(config, m_0229crypt, 0); + SEGA315_5838_COMP(config, m_0229crypt); m_0229crypt->set_addrmap(0, &model2a_state::sega_0229_map); } @@ -2796,28 +2796,28 @@ void model2a_state::zeroguna(machine_config &config) /* 2B-CRX */ void model2b_state::model2b(machine_config &config) { - I960(config, m_maincpu, 25000000); + I960(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &model2b_state::model2b_crx_mem); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(model2_state::model2_interrupt), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(model2_state::model2_interrupt), "screen", 0, 1); - ADSP21062(config, m_copro_adsp, 40000000); + ADSP21062(config, m_copro_adsp, XTAL::u(40000000)); m_copro_adsp->set_boot_mode(adsp21062_device::BOOT_MODE_HOST); m_copro_adsp->set_addrmap(AS_DATA, &model2b_state::copro_sharc_map); - //ADSP21062(config, m_dsp2, 40000000); + //ADSP21062(config, m_dsp2, XTAL::u(40000000)); //m_dsp2->set_boot_mode(adsp21062_device::BOOT_MODE_HOST); //m_dsp2->set_addrmap(AS_DATA, &model2b_state::geo_sharc_map); config.set_maximum_quantum(attotime::from_hz(18000)); - GENERIC_FIFO_U32(config, m_copro_fifo_in, 0); - GENERIC_FIFO_U32(config, m_copro_fifo_out, 0); + GENERIC_FIFO_U32(config, m_copro_fifo_in); + GENERIC_FIFO_U32(config, m_copro_fifo_out); EEPROM_93C46_16BIT(config, "eeprom"); NVRAM(config, "backup1", nvram_device::DEFAULT_ALL_1); - sega_315_5649_device &io(SEGA_315_5649(config, "io", 0)); + sega_315_5649_device &io(SEGA_315_5649(config, "io")); io.out_pa_callback().set(FUNC(model2b_state::eeprom_w)); io.in_pb_callback().set(FUNC(model2b_state::in0_r)); io.in_pc_callback().set_ioport("IN1"); @@ -2829,9 +2829,9 @@ void model2b_state::model2b(machine_config &config) model2_screen(config); model2_scsp(config); - M2COMM(config, "m2comm", 0); + M2COMM(config, "m2comm"); - SEGA_BILLBOARD(config, m_billboard, 0); + SEGA_BILLBOARD(config, m_billboard); config.set_default_layout(layout_segabill); } @@ -2842,7 +2842,7 @@ void model2b_state::model2b_5881(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &model2b_state::model2b_5881_mem); - SEGA315_5881_CRYPT(config, m_cryptdevice, 0); + SEGA315_5881_CRYPT(config, m_cryptdevice); m_cryptdevice->set_read_cb(FUNC(model2b_state::crypt_read_callback)); } @@ -2852,7 +2852,7 @@ void model2b_state::model2b_0229(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &model2b_state::model2b_0229_mem); - SEGA315_5838_COMP(config, m_0229crypt, 0); + SEGA315_5838_COMP(config, m_0229crypt); m_0229crypt->set_addrmap(0, &model2b_state::sega_0229_map); } @@ -2908,7 +2908,7 @@ void model2b_state::rchase2(machine_config &config) { model2b(config); - z80_device &iocpu(Z80(config, "iocpu", 4000000)); + z80_device &iocpu(Z80(config, "iocpu", XTAL::u(4000000))); iocpu.set_addrmap(AS_PROGRAM, &model2b_state::rchase2_iocpu_map); iocpu.set_addrmap(AS_IO, &model2b_state::rchase2_ioport_map); @@ -2951,23 +2951,23 @@ void model2b_state::zerogun(machine_config &config) /* 2C-CRX */ void model2c_state::model2c(machine_config &config) { - I960(config, m_maincpu, 25000000); + I960(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &model2c_state::model2c_crx_mem); TIMER(config, "scantimer").configure_scanline(FUNC(model2c_state::model2c_interrupt), "screen", 0, 1); - MB86235(config, m_copro_tgpx4, 40000000); + MB86235(config, m_copro_tgpx4, XTAL::u(40000000)); m_copro_tgpx4->set_addrmap(AS_PROGRAM, &model2c_state::copro_tgpx4_map); m_copro_tgpx4->set_addrmap(AS_DATA, &model2c_state::copro_tgpx4_data_map); m_copro_tgpx4->set_fifoin_tag(m_copro_fifo_in); m_copro_tgpx4->set_fifoout0_tag(m_copro_fifo_out); - GENERIC_FIFO_U32(config, m_copro_fifo_in, 0); - GENERIC_FIFO_U32(config, m_copro_fifo_out, 0); + GENERIC_FIFO_U32(config, m_copro_fifo_in); + GENERIC_FIFO_U32(config, m_copro_fifo_out); EEPROM_93C46_16BIT(config, "eeprom"); NVRAM(config, "backup1", nvram_device::DEFAULT_ALL_1); - sega_315_5649_device &io(SEGA_315_5649(config, "io", 0)); + sega_315_5649_device &io(SEGA_315_5649(config, "io")); io.out_pa_callback().set(FUNC(model2c_state::eeprom_w)); io.in_pb_callback().set(FUNC(model2c_state::in0_r)); io.in_pc_callback().set_ioport("IN1"); @@ -2978,7 +2978,7 @@ void model2c_state::model2c(machine_config &config) model2_screen(config); model2_scsp(config); - M2COMM(config, "m2comm", 0); + M2COMM(config, "m2comm"); } void model2c_state::skisuprg(machine_config &config) @@ -2999,7 +2999,7 @@ void model2c_state::stcc(machine_config &config) io.an_port_callback<1>().set_ioport("ACCEL"); io.an_port_callback<2>().set_ioport("BRAKE"); - DSBZ80(config, m_dsbz80, 0); + DSBZ80(config, m_dsbz80); m_dsbz80->add_route(0, "lspeaker", 1.0); m_dsbz80->add_route(1, "rspeaker", 1.0); @@ -3043,7 +3043,7 @@ void model2c_state::model2c_5881(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &model2c_state::model2c_5881_mem); - SEGA315_5881_CRYPT(config, m_cryptdevice, 0); + SEGA315_5881_CRYPT(config, m_cryptdevice); m_cryptdevice->set_read_cb(FUNC(model2c_state::crypt_read_callback)); } diff --git a/src/mame/sega/model3.cpp b/src/mame/sega/model3.cpp index b7bd2e03078..dc7738506fe 100644 --- a/src/mame/sega/model3.cpp +++ b/src/mame/sega/model3.cpp @@ -6167,21 +6167,21 @@ void model3_state::scsp_irq(offs_t offset, uint8_t data) void model3_state::add_cpu_66mhz(machine_config &config) { - PPC603E(config, m_maincpu, 66000000); + PPC603E(config, m_maincpu, XTAL::u(66000000)); m_maincpu->set_bus_frequency(66000000); /* Multiplier 1, Bus = 66MHz, Core = 66MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &model3_state::model3_10_mem); } void model3_state::add_cpu_100mhz(machine_config &config) { - PPC603E(config, m_maincpu, 100000000); + PPC603E(config, m_maincpu, XTAL::u(100000000)); m_maincpu->set_bus_frequency(66000000); /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &model3_state::model3_mem); } void model3_state::add_cpu_166mhz(machine_config &config) { - PPC603R(config, m_maincpu, 166000000); + PPC603R(config, m_maincpu, XTAL::u(166000000)); m_maincpu->set_bus_frequency(66000000); /* Multiplier 2.5, Bus = 66MHz, Core = 166MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &model3_state::model3_mem); } @@ -6197,7 +6197,7 @@ void model3_state::add_base_devices(machine_config &config) NVRAM(config, "backup", nvram_device::DEFAULT_ALL_1); RTC72421(config, m_rtc, XTAL(32'768)); // internal oscillator - SEGA_315_5649(config, m_io, 0); + SEGA_315_5649(config, m_io); m_io->out_pa_callback().set(FUNC(model3_state::eeprom_w)); m_io->in_pb_callback().set(FUNC(model3_state::input_r)); m_io->in_pc_callback().set_ioport("IN2"); @@ -6236,16 +6236,16 @@ void model3_state::add_base_devices(machine_config &config) scsp2.add_route(0, "lspeaker", 1.0); scsp2.add_route(1, "rspeaker", 1.0); - SEGA_BILLBOARD(config, m_billboard, 0); + SEGA_BILLBOARD(config, m_billboard); config.set_default_layout(layout_segabill); } void model3_state::add_scsi_devices(machine_config &config) { - SCSI_PORT(config, "scsi", 0); + SCSI_PORT(config, "scsi"); - LSI53C810(config, m_lsi53c810, 0); + LSI53C810(config, m_lsi53c810); m_lsi53c810->set_irq_callback(FUNC(model3_state::scsi_irq_callback)); m_lsi53c810->set_dma_callback(FUNC(model3_state::real3d_dma_callback)); m_lsi53c810->set_fetch_callback(FUNC(model3_state::scsi_fetch)); @@ -6256,7 +6256,7 @@ void model3_state::add_crypt_devices(machine_config &config) { m_maincpu->set_addrmap(AS_PROGRAM, &model3_state::model3_5881_mem); - SEGA315_5881_CRYPT(config, m_cryptdevice, 0); + SEGA315_5881_CRYPT(config, m_cryptdevice); m_cryptdevice->set_read_cb(FUNC(model3_state::crypt_read_callback)); } @@ -6299,7 +6299,7 @@ void model3_state::getbass(machine_config &config) iocpu.out_p2_callback().set("ioeeprom", FUNC(eeprom_serial_93cxx_device::cs_write)).bit(6); SEGA_315_5296(config, "io60", 32_MHz_XTAL); - SEGA_315_5649(config, "io70", 0); + SEGA_315_5649(config, "io70"); EEPROM_93C46_16BIT(config, "ioeeprom"); // AK93C45 @@ -6315,21 +6315,21 @@ void model3_state::model3_15(machine_config &config) MCFG_MACHINE_START_OVERRIDE(model3_state,model3_15) MCFG_MACHINE_RESET_OVERRIDE(model3_state,model3_15) - M3COMM(config, "comm_board", 0); + M3COMM(config, "comm_board"); } void model3_state::scud(machine_config &config) { model3_15(config); - DSBZ80(config, m_dsbz80, 0); + DSBZ80(config, m_dsbz80); m_dsbz80->add_route(0, "lspeaker", 1.0); m_dsbz80->add_route(1, "rspeaker", 1.0); - I8251(config, m_uart, 8000000); // uPD71051 + I8251(config, m_uart, XTAL::u(8000000)); // uPD71051 m_uart->txd_handler().set(m_dsbz80, FUNC(dsbz80_device::write_txd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(500000))); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); } @@ -6352,7 +6352,7 @@ void model3_state::model3_20(machine_config &config) MCFG_MACHINE_START_OVERRIDE(model3_state, model3_20) MCFG_MACHINE_RESET_OVERRIDE(model3_state, model3_20) - M3COMM(config, "comm_board", 0); + M3COMM(config, "comm_board"); } void model3_state::model3_20_5881(machine_config &config) @@ -6369,7 +6369,7 @@ void model3_state::model3_21(machine_config &config) MCFG_MACHINE_START_OVERRIDE(model3_state, model3_21) MCFG_MACHINE_RESET_OVERRIDE(model3_state, model3_21) - M3COMM(config, "comm_board", 0); + M3COMM(config, "comm_board"); } void model3_state::model3_21_5881(machine_config &config) diff --git a/src/mame/sega/monacogp.cpp b/src/mame/sega/monacogp.cpp index d6e4d57bc4c..31b6f853dce 100644 --- a/src/mame/sega/monacogp.cpp +++ b/src/mame/sega/monacogp.cpp @@ -118,7 +118,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -187,7 +187,7 @@ void monacogp_state::video_start() void monacogp_state::monacogp(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_monacogp); + NETLIST_CPU(config, m_maincpu).set_source(netlist_monacogp); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/sega/naomi.cpp b/src/mame/sega/naomi.cpp index 34b0fcfd568..600699b08ca 100644 --- a/src/mame/sega/naomi.cpp +++ b/src/mame/sega/naomi.cpp @@ -2434,7 +2434,7 @@ void dc_state::naomi_aw_base(machine_config &config) screen.set_raw(13458568*2, 820, 0, 640, 532, 0, 480); screen.set_screen_update("powervr2", FUNC(powervr2_device::screen_update)); - POWERVR2(config, m_powervr2, 0); + POWERVR2(config, m_powervr2); m_powervr2->irq_callback().set(FUNC(dc_state::pvr_irq)); SPEAKER(config, "lspeaker").front_left(); @@ -2468,7 +2468,7 @@ void naomi_state::naomi_base(machine_config &config) mie_device &mie(MIE(config, "mie" "_maple", 16000000, m_maple, 0, "mie")); mie.set_gpio_name<3>("MIE.3"); mie.set_gpio_name<5>("MIE.5"); - MIE_JVS(config, "mie", 16000000); + MIE_JVS(config, "mie", XTAL::u(16000000)); sega_837_13551_device &sega837(SEGA_837_13551(config, "837_13551", 0, "mie")); sega837.set_port_tags("TILT", "P1", "P2", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "OUTPUT"); @@ -2476,7 +2476,7 @@ void naomi_state::naomi_base(machine_config &config) EEPROM_93C46_8BIT(config, "mie_eeprom"); X76F100(config, "naomibd_eeprom"); - M3COMM(config, "comm_board", 0); + M3COMM(config, "comm_board"); MCFG_MACHINE_RESET_OVERRIDE(naomi_state,naomi) NVRAM(config, "sram", nvram_device::DEFAULT_ALL_0); } @@ -2547,7 +2547,7 @@ void naomi_state::naomim4(machine_config &config) void naomi_state::naomim1_hop(machine_config &config) { naomim1(config); - SEGA837_14438(config, "hopperbd", 0); + SEGA837_14438(config, "hopperbd"); } /* @@ -2603,7 +2603,7 @@ void naomi2_state::naomi2(machine_config &config) void naomi2_state::naomi2_base(machine_config &config) { - POWERVR2(config, m_powervr2_slave, 0); + POWERVR2(config, m_powervr2_slave); m_powervr2_slave->irq_callback().set(FUNC(dc_state::pvr_irq)); // TODO: ELAN device diff --git a/src/mame/sega/naomibd.cpp b/src/mame/sega/naomibd.cpp index 3dd0c7307b3..a0a3e28c92e 100644 --- a/src/mame/sega/naomibd.cpp +++ b/src/mame/sega/naomibd.cpp @@ -74,7 +74,7 @@ void naomi_board::submap(address_map &map) map(0x3e, 0x3f).r(FUNC(naomi_board::boardid_r)); } -naomi_board::naomi_board(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +naomi_board::naomi_board(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : naomi_g1_device(mconfig, type, tag, owner, clock), eeprom(*this, finder_base::DUMMY_TAG) { diff --git a/src/mame/sega/naomibd.h b/src/mame/sega/naomibd.h index 9498d62c9bb..c91a1458266 100644 --- a/src/mame/sega/naomibd.h +++ b/src/mame/sega/naomibd.h @@ -28,7 +28,7 @@ public: uint16_t default_r(offs_t offset); protected: - naomi_board(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + naomi_board(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/sega/naomig1.cpp b/src/mame/sega/naomig1.cpp index 059339e08ed..7fd70cd10fd 100644 --- a/src/mame/sega/naomig1.cpp +++ b/src/mame/sega/naomig1.cpp @@ -26,7 +26,7 @@ void naomi_g1_device::amap(address_map &map) map(0xf8, 0xfb).r(FUNC(naomi_g1_device::sb_gdlend_r)); } -naomi_g1_device::naomi_g1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +naomi_g1_device::naomi_g1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , irq_cb(*this) , ext_irq_cb(*this) diff --git a/src/mame/sega/naomig1.h b/src/mame/sega/naomig1.h index 924c3712aa5..a5f91433685 100644 --- a/src/mame/sega/naomig1.h +++ b/src/mame/sega/naomig1.h @@ -51,7 +51,7 @@ public: uint32_t sb_gdlend_r(offs_t offset, uint32_t mem_mask = ~0); // 5f74f8 protected: - naomi_g1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + naomi_g1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/sega/naomigd.cpp b/src/mame/sega/naomigd.cpp index 67b7ef82101..29b457789d1 100644 --- a/src/mame/sega/naomigd.cpp +++ b/src/mame/sega/naomigd.cpp @@ -392,14 +392,14 @@ void naomi_gdrom_board::write_from_qword(uint8_t *region, uint64_t qword) DEFINE_DEVICE_TYPE(IDE_GDROM, idegdrom_device, "ide_gdrom", "ide gdrom controller") -idegdrom_device::idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const char *image_tag, const char *space_tag, int space_id) +idegdrom_device::idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const char *image_tag, const char *space_tag, int space_id) : idegdrom_device(mconfig, tag, owner, clock) { space_owner_tag = space_tag; space_owner_id = space_id; } -idegdrom_device::idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +idegdrom_device::idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, IDE_GDROM, tag, owner, clock), m_ide(*this, "ide"), irq_cb(*this) @@ -509,7 +509,7 @@ static INPUT_PORTS_START(gdrom_board_ioports) PORT_CONFSETTING(0x00, "No") INPUT_PORTS_END -naomi_gdrom_board::naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +naomi_gdrom_board::naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : naomi_board(mconfig, NAOMI_GDROM_BOARD, tag, owner, clock), work_mode(0), m_maincpu(*this, "dimmcpu"), @@ -1122,21 +1122,21 @@ void naomi_gdrom_board::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &naomi_gdrom_board::sh4_map); m_maincpu->set_addrmap(AS_IO, &naomi_gdrom_board::sh4_io_map); - PCI_ROOT(config, "pci", 0); - SEGA315_6154(config, m_315_6154, 0); + PCI_ROOT(config, "pci"); + SEGA315_6154(config, m_315_6154); m_315_6154->set_addrmap(sega_315_6154_device::AS_PCI_MEMORY, &naomi_gdrom_board::pci_map); IDE_GDROM(config, m_idegdrom, 0, image_tag, m_315_6154->tag(), sega_315_6154_device::AS_PCI_MEMORY); m_idegdrom->irq_callback().set_inputline(m_maincpu, SH4_IRL2); PIC16C622(config, m_securitycpu, PIC_CLOCK); m_securitycpu->set_addrmap(AS_IO, &naomi_gdrom_board::pic_map); m_securitycpu->set_config(0x3fff - 0x04); - I2C_24C01(config, m_i2c0, 0); + I2C_24C01(config, m_i2c0); m_i2c0->set_e0(0); m_i2c0->set_wc(1); - I2C_24C01(config, m_i2c1, 0); + I2C_24C01(config, m_i2c1); m_i2c1->set_e0(1); m_i2c1->set_wc(1); - EEPROM_93C46_8BIT(config, m_eeprom, 0); + EEPROM_93C46_8BIT(config, m_eeprom); } // DIMM firmwares: diff --git a/src/mame/sega/naomigd.h b/src/mame/sega/naomigd.h index c302361ff37..497e0a8b98e 100644 --- a/src/mame/sega/naomigd.h +++ b/src/mame/sega/naomigd.h @@ -16,8 +16,8 @@ class idegdrom_device : public pci_device { public: - idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const char *image_tag, const char *space_tag, int space_id); - idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const char *image_tag, const char *space_tag, int space_id); + idegdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return irq_cb.bind(); } @@ -53,7 +53,7 @@ class naomi_gdrom_board : public naomi_board { public: template - naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&eeprom_tag, const char *_image_tag, U &&picregion_tag) + naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&eeprom_tag, const char *_image_tag, U &&picregion_tag) : naomi_gdrom_board(mconfig, tag, owner, clock) { eeprom.set_tag(std::forward(eeprom_tag)); @@ -62,14 +62,14 @@ public: } template - naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const char *_image_tag, T &&picregion_tag) + naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const char *_image_tag, T &&picregion_tag) : naomi_gdrom_board(mconfig, tag, owner, clock) { picdata.set_tag(std::forward(picregion_tag)); set_image_tag(_image_tag); } - naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void submap(address_map &map) override; diff --git a/src/mame/sega/naomim1.cpp b/src/mame/sega/naomim1.cpp index fd4e26b88a4..20b4f054159 100644 --- a/src/mame/sega/naomim1.cpp +++ b/src/mame/sega/naomim1.cpp @@ -12,7 +12,7 @@ void naomi_m1_board::submap(address_map &map) map(0x0a, 0x0b).r(FUNC(naomi_m1_board::actel_id_r)); } -naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : naomi_board(mconfig, NAOMI_M1_BOARD, tag, owner, clock) , m_region(*this, DEVICE_SELF) { diff --git a/src/mame/sega/naomim1.h b/src/mame/sega/naomim1.h index 4e062e1fd03..39bea27ff63 100644 --- a/src/mame/sega/naomim1.h +++ b/src/mame/sega/naomim1.h @@ -12,13 +12,13 @@ class naomi_m1_board : public naomi_board { public: template - naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&eeprom_tag) + naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&eeprom_tag) : naomi_m1_board(mconfig, tag, owner, clock) { eeprom.set_tag(std::forward(eeprom_tag)); } - naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void submap(address_map &map) override; diff --git a/src/mame/sega/naomim2.cpp b/src/mame/sega/naomim2.cpp index 16368a77467..e0631faf3c8 100644 --- a/src/mame/sega/naomim2.cpp +++ b/src/mame/sega/naomim2.cpp @@ -111,7 +111,7 @@ note: if ROM is not mounted its area readed as 0xFF DEFINE_DEVICE_TYPE(NAOMI_M2_BOARD, naomi_m2_board, "naomi_m2_board", "Sega NAOMI M2 Board") -naomi_m2_board::naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +naomi_m2_board::naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : naomi_board(mconfig, NAOMI_M2_BOARD, tag, owner, clock) , m_cryptdevice(*this, "segam2crypt") , m_region(*this, DEVICE_SELF) @@ -202,6 +202,6 @@ uint16_t naomi_m2_board::read_callback(uint32_t addr) void naomi_m2_board::device_add_mconfig(machine_config &config) { - SEGA315_5881_CRYPT(config, m_cryptdevice, 0); + SEGA315_5881_CRYPT(config, m_cryptdevice); m_cryptdevice->set_read_cb(FUNC(naomi_m2_board::read_callback)); } diff --git a/src/mame/sega/naomim2.h b/src/mame/sega/naomim2.h index e94a5c26c8c..73af01b7c15 100644 --- a/src/mame/sega/naomim2.h +++ b/src/mame/sega/naomim2.h @@ -13,13 +13,13 @@ class naomi_m2_board : public naomi_board { public: template - naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&eeprom_tag) + naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&eeprom_tag) : naomi_m2_board(mconfig, tag, owner, clock) { eeprom.set_tag(std::forward(eeprom_tag)); } - naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + naomi_m2_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t rom_cur_address; static const int RAM_SIZE = 65536; std::unique_ptr ram; diff --git a/src/mame/sega/naomim4.cpp b/src/mame/sega/naomim4.cpp index 1e39a54879e..7d021bba532 100644 --- a/src/mame/sega/naomim4.cpp +++ b/src/mame/sega/naomim4.cpp @@ -46,7 +46,7 @@ void naomi_m4_board::submap(address_map &map) map(0x1a, 0x1b).r(FUNC(naomi_m4_board::m4_id_r)); // Read: bits 8-15 - 0x55, bit 7 - 1 if IC7 EPR rom enabled; Write: bit 0 - master/slave board selection. } -naomi_m4_board::naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +naomi_m4_board::naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : naomi_board(mconfig, NAOMI_M4_BOARD, tag, owner, clock) , m_region(*this, DEVICE_SELF) , m_key_data(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/sega/naomim4.h b/src/mame/sega/naomim4.h index 78fdbbafde7..ed22a482746 100644 --- a/src/mame/sega/naomim4.h +++ b/src/mame/sega/naomim4.h @@ -10,14 +10,14 @@ class naomi_m4_board : public naomi_board { public: template - naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&eeprom_tag, U &&keyregion_tag) + naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&eeprom_tag, U &&keyregion_tag) : naomi_m4_board(mconfig, tag, owner, clock) { eeprom.set_tag(std::forward(eeprom_tag)); m_key_data.set_tag(std::forward(keyregion_tag)); } - naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void submap(address_map &map) override; diff --git a/src/mame/sega/naomirom.cpp b/src/mame/sega/naomirom.cpp index ddb8bcc4c7f..f780b5a2481 100644 --- a/src/mame/sega/naomirom.cpp +++ b/src/mame/sega/naomirom.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(NAOMI_ROM_BOARD, naomi_rom_board, "naomi_rom_board", "Sega NAOMI ROM Board") -naomi_rom_board::naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +naomi_rom_board::naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : naomi_board(mconfig, NAOMI_ROM_BOARD, tag, owner, clock) , m_region(*this, DEVICE_SELF) { diff --git a/src/mame/sega/naomirom.h b/src/mame/sega/naomirom.h index 76dad495ba9..88c09d1cae8 100644 --- a/src/mame/sega/naomirom.h +++ b/src/mame/sega/naomirom.h @@ -9,13 +9,13 @@ class naomi_rom_board : public naomi_board { public: template - naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&eeprom_tag) + naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&eeprom_tag) : naomi_rom_board(mconfig, tag, owner, clock) { eeprom.set_tag(std::forward(eeprom_tag)); } - naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + naomi_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/mame/sega/powervr2.cpp b/src/mame/sega/powervr2.cpp index 476965b84f4..d2069ecae75 100644 --- a/src/mame/sega/powervr2.cpp +++ b/src/mame/sega/powervr2.cpp @@ -3897,7 +3897,7 @@ ioport_constructor powervr2_device::device_input_ports() const return INPUT_PORTS_NAME( powervr2 ); } -powervr2_device::powervr2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +powervr2_device::powervr2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, POWERVR2, tag, owner, clock) , device_video_interface(mconfig, *this) , irq_cb(*this) diff --git a/src/mame/sega/powervr2.h b/src/mame/sega/powervr2.h index a5457206c03..3ece15a3c73 100644 --- a/src/mame/sega/powervr2.h +++ b/src/mame/sega/powervr2.h @@ -9,7 +9,7 @@ class powervr2_device : public device_t, public device_video_interface { public: - powervr2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + powervr2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return irq_cb.bind(); } static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } diff --git a/src/mame/sega/s32comm.cpp b/src/mame/sega/s32comm.cpp index 667b6c50541..ef67ded84c8 100644 --- a/src/mame/sega/s32comm.cpp +++ b/src/mame/sega/s32comm.cpp @@ -96,7 +96,7 @@ void s32comm_device::device_add_mconfig(machine_config &config) // s32comm_device - constructor //------------------------------------------------- -s32comm_device::s32comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s32comm_device::s32comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S32COMM, tag, owner, clock) { std::fill(std::begin(m_shared), std::end(m_shared), 0); diff --git a/src/mame/sega/s32comm.h b/src/mame/sega/s32comm.h index d833d5349ac..fe8f81131d9 100644 --- a/src/mame/sega/s32comm.h +++ b/src/mame/sega/s32comm.h @@ -18,7 +18,7 @@ class s32comm_device : public device_t { public: // construction/destruction - s32comm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s32comm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // single bit registers (74LS74) uint8_t zfg_r(offs_t offset); diff --git a/src/mame/sega/saturn.cpp b/src/mame/sega/saturn.cpp index 20a9711813a..a4c38e5b2d9 100644 --- a/src/mame/sega/saturn.cpp +++ b/src/mame/sega/saturn.cpp @@ -825,10 +825,10 @@ void sat_console_state::saturn(machine_config &config) m_slave->set_is_slave(1); TIMER(config, "slave_scantimer").configure_scanline(FUNC(sat_console_state::saturn_slave_scanline), "screen", 0, 1); - M68000(config, m_audiocpu, 11289600); //256 x 44100 Hz = 11.2896 MHz + M68000(config, m_audiocpu, XTAL::u(11289600)); //256 x 44100 Hz = 11.2896 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &sat_console_state::sound_mem); - SEGA_SCU(config, m_scu, 0); + SEGA_SCU(config, m_scu); m_scu->set_hostcpu(m_maincpu); // SH-1 @@ -876,7 +876,7 @@ void sat_console_state::saturn(machine_config &config) m_scsp->add_route(0, "lspeaker", 1.0); m_scsp->add_route(1, "rspeaker", 1.0); - stvcd_device &stvcd(STVCD(config, "stvcd", 0)); + stvcd_device &stvcd(STVCD(config, "stvcd")); stvcd.add_route(0, "scsp", 1.0, 0); stvcd.add_route(1, "scsp", 1.0, 1); @@ -899,7 +899,7 @@ static void saturn_cart(device_slot_interface &device) void sat_console_state::saturnus(machine_config &config) { saturn(config); - SATURN_CDB(config, "saturn_cdb", 16000000); + SATURN_CDB(config, "saturn_cdb", XTAL::u(16000000)); SOFTWARE_LIST(config, "cd_list").set_original("saturn").set_filter("NTSC-U"); @@ -912,7 +912,7 @@ void sat_console_state::saturnus(machine_config &config) void sat_console_state::saturneu(machine_config &config) { saturn(config); - SATURN_CDB(config, "saturn_cdb", 16000000); + SATURN_CDB(config, "saturn_cdb", XTAL::u(16000000)); SOFTWARE_LIST(config, "cd_list").set_original("saturn").set_filter("PAL"); @@ -925,7 +925,7 @@ void sat_console_state::saturneu(machine_config &config) void sat_console_state::saturnjp(machine_config &config) { saturn(config); - SATURN_CDB(config, "saturn_cdb", 16000000); + SATURN_CDB(config, "saturn_cdb", XTAL::u(16000000)); SOFTWARE_LIST(config, "cd_list").set_original("saturn").set_filter("NTSC-J"); @@ -938,7 +938,7 @@ void sat_console_state::saturnjp(machine_config &config) void sat_console_state::saturnkr(machine_config &config) { saturn(config); - SATURN_CDB(config, "saturn_cdb", 16000000); + SATURN_CDB(config, "saturn_cdb", XTAL::u(16000000)); SOFTWARE_LIST(config, "cd_list").set_original("saturn").set_filter("NTSC-K"); diff --git a/src/mame/sega/saturn_cdb.cpp b/src/mame/sega/saturn_cdb.cpp index 4163e36d78f..f14f079ce4d 100644 --- a/src/mame/sega/saturn_cdb.cpp +++ b/src/mame/sega/saturn_cdb.cpp @@ -14,7 +14,7 @@ YGR019B - Hitachi YGR019B CD-Subsystem LSI. Earlier revision is YGR019A. Later r DEFINE_DEVICE_TYPE(SATURN_CDB, saturn_cdb_device, "satcdb", "Saturn CDB (CD Block)") -saturn_cdb_device::saturn_cdb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saturn_cdb_device::saturn_cdb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATURN_CDB, tag, owner, clock) { } diff --git a/src/mame/sega/saturn_cdb.h b/src/mame/sega/saturn_cdb.h index 7a6f19b43dc..aa89ed12ad2 100644 --- a/src/mame/sega/saturn_cdb.h +++ b/src/mame/sega/saturn_cdb.h @@ -14,7 +14,7 @@ class saturn_cdb_device : public device_t { public: // construction/destruction - saturn_cdb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saturn_cdb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void saturn_cdb_map(address_map &map); protected: diff --git a/src/mame/sega/sega16sp.cpp b/src/mame/sega/sega16sp.cpp index 7be766369ec..c068c32bf49 100644 --- a/src/mame/sega/sega16sp.cpp +++ b/src/mame/sega/sega16sp.cpp @@ -94,7 +94,7 @@ void sega_16bit_sprite_device::draw_write(uint16_t data) // sega_hangon_sprite_device -- constructor //------------------------------------------------- -sega_hangon_sprite_device::sega_hangon_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_hangon_sprite_device::sega_hangon_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_16bit_sprite_device(mconfig, SEGA_HANGON_SPRITES, tag, owner) , m_sprite_region_ptr(*this, DEVICE_SELF) { @@ -271,7 +271,7 @@ void sega_hangon_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip // sega_sharrier_sprite_device -- constructor //------------------------------------------------- -sega_sharrier_sprite_device::sega_sharrier_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_sharrier_sprite_device::sega_sharrier_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_16bit_sprite_device(mconfig, SEGA_SHARRIER_SPRITES, tag, owner) , m_sprite_region_ptr(*this, DEVICE_SELF) { @@ -459,7 +459,7 @@ void sega_sharrier_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &cl // sega_sys16a_sprite_device -- constructor //------------------------------------------------- -sega_sys16a_sprite_device::sega_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_sys16a_sprite_device::sega_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_16bit_sprite_device(mconfig, SEGA_SYS16A_SPRITES, tag, owner) , m_sprite_region_ptr(*this, DEVICE_SELF) { @@ -639,7 +639,7 @@ void sega_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip // bootleg_sys16a_sprite_device -- constructor //------------------------------------------------- -bootleg_sys16a_sprite_device::bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bootleg_sys16a_sprite_device::bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_16bit_sprite_device(mconfig, BOOTLEG_SYS16A_SPRITES, tag, owner) , m_sprite_region_ptr(*this, DEVICE_SELF) { @@ -827,7 +827,7 @@ void bootleg_sys16a_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &c // sega_sys16b_sprite_device -- constructor //------------------------------------------------- -sega_sys16b_sprite_device::sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_sys16b_sprite_device::sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_16bit_sprite_device(mconfig, SEGA_SYS16B_SPRITES, tag, owner) , m_sprite_region_ptr(*this, DEVICE_SELF) { @@ -1023,12 +1023,12 @@ void sega_sys16b_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip // sega_outrun_sprite_device -- constructor //------------------------------------------------- -sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_outrun_sprite_device(mconfig, SEGA_OUTRUN_SPRITES, tag, owner, clock, false) { } -sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool xboard_variant) +sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool xboard_variant) : sega_16bit_sprite_device(mconfig, type, tag, owner) , m_is_xboard(xboard_variant) , m_sprite_region_ptr(*this, DEVICE_SELF) @@ -1041,7 +1041,7 @@ sega_outrun_sprite_device::sega_outrun_sprite_device(const machine_config &mconf // sega_xboard_sprite_device -- constructor //------------------------------------------------- -sega_xboard_sprite_device::sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_xboard_sprite_device::sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_outrun_sprite_device(mconfig, SEGA_XBOARD_SPRITES, tag, owner, clock, true) { } @@ -1226,7 +1226,7 @@ void sega_outrun_sprite_device::draw(bitmap_ind16 &bitmap, const rectangle &clip // sega_yboard_sprite_device -- constructor //------------------------------------------------- -sega_yboard_sprite_device::sega_yboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_yboard_sprite_device::sega_yboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_16bit_sprite_device(mconfig, SEGA_YBOARD_SPRITES, tag, owner) , m_sprite_region_ptr(*this, DEVICE_SELF) { diff --git a/src/mame/sega/sega16sp.h b/src/mame/sega/sega16sp.h index e3d4a24d8ed..57a65a9de74 100644 --- a/src/mame/sega/sega16sp.h +++ b/src/mame/sega/sega16sp.h @@ -82,7 +82,7 @@ class sega_hangon_sprite_device : public sega_16bit_sprite_device { public: // construction/destruction - sega_hangon_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_hangon_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // subclass overrides @@ -99,7 +99,7 @@ class sega_sharrier_sprite_device : public sega_16bit_sprite_device { public: // construction/destruction - sega_sharrier_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_sharrier_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // subclass overrides @@ -116,9 +116,9 @@ class sega_outrun_sprite_device : public sega_16bit_sprite_device { public: // construction/destruction - sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_outrun_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sega_outrun_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool xboard_variant); + sega_outrun_sprite_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool xboard_variant); protected: // subclass overrides @@ -133,7 +133,7 @@ class sega_xboard_sprite_device : public sega_outrun_sprite_device { public: // construction/destruction - sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_xboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -143,7 +143,7 @@ class sega_sys16a_sprite_device : public sega_16bit_sprite_device { public: // construction/destruction - sega_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // subclass overrides @@ -160,7 +160,7 @@ class bootleg_sys16a_sprite_device : public sega_16bit_sprite_device { public: // construction/destruction - bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int originx, + bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int originx, uint8_t offs0, uint8_t offs1, uint8_t offs2, uint8_t offs3, uint8_t offs4, uint8_t offs5, uint8_t offs6, uint8_t offs7) : bootleg_sys16a_sprite_device(mconfig, tag, owner, clock) { @@ -168,7 +168,7 @@ public: set_remap(offs0, offs1, offs2, offs3, offs4, offs5, offs6, offs7); } - bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bootleg_sys16a_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_remap(uint8_t offs0, uint8_t offs1, uint8_t offs2, uint8_t offs3, uint8_t offs4, uint8_t offs5, uint8_t offs6, uint8_t offs7); @@ -191,7 +191,7 @@ class sega_sys16b_sprite_device : public sega_16bit_sprite_device { public: // construction/destruction - sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_sys16b_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // subclass overrides @@ -210,7 +210,7 @@ public: typedef segaic16_video_device::rotate_info rotate_info; // construction/destruction - sega_yboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_yboard_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_rotate_ptr(rotate_info* segaic16_rotate) { m_segaic16_rotate = segaic16_rotate; } protected: diff --git a/src/mame/sega/sega_beena.cpp b/src/mame/sega/sega_beena.cpp index 02cef4abd52..294b08edd59 100644 --- a/src/mame/sega/sega_beena.cpp +++ b/src/mame/sega/sega_beena.cpp @@ -167,7 +167,7 @@ uint32_t sega_beena_state::screen_update(screen_device &screen, bitmap_rgb32 &bi void sega_beena_state::sega_beena(machine_config &config) { - ARM7_BE(config, m_maincpu, 81'000'000); + ARM7_BE(config, m_maincpu, XTAL::u(81'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &sega_beena_state::beena_arm7_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/sega/sega_sawatte.cpp b/src/mame/sega/sega_sawatte.cpp index 9e6cde13b8c..d5b3fe0eb43 100644 --- a/src/mame/sega/sega_sawatte.cpp +++ b/src/mame/sega/sega_sawatte.cpp @@ -236,7 +236,7 @@ INPUT_PORTS_END void sawatte_state::sawatte(machine_config &config) { - M6502(config, m_maincpu, 4'000'000); // could be some stock SoC, type and clock unknown + M6502(config, m_maincpu, XTAL::u(4'000'000)); // could be some stock SoC, type and clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &sawatte_state::mem_map); GENERIC_CARTSLOT(config, m_cartslot, generic_plain_slot, "sawatte_cart"); diff --git a/src/mame/sega/segabb.cpp b/src/mame/sega/segabb.cpp index 679896abb75..74266469d9a 100644 --- a/src/mame/sega/segabb.cpp +++ b/src/mame/sega/segabb.cpp @@ -17,7 +17,7 @@ void sega_lindbergh_baseboard_device::map3(address_map &map) { } -sega_lindbergh_baseboard_device::sega_lindbergh_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_lindbergh_baseboard_device::sega_lindbergh_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SEGA_LINDBERGH_BASEBOARD, tag, owner, clock) { set_ids(0x105718c1, 0x10, 0x068000, 0x11db067b); diff --git a/src/mame/sega/segabb.h b/src/mame/sega/segabb.h index 5c42c21d084..b4d38461749 100644 --- a/src/mame/sega/segabb.h +++ b/src/mame/sega/segabb.h @@ -11,7 +11,7 @@ class sega_lindbergh_baseboard_device : public pci_device { public: - sega_lindbergh_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_lindbergh_baseboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/mame/sega/segabill.cpp b/src/mame/sega/segabill.cpp index 554c35965e3..6b78641abf9 100644 --- a/src/mame/sega/segabill.cpp +++ b/src/mame/sega/segabill.cpp @@ -172,7 +172,7 @@ void sega_billboard_device::device_add_mconfig(machine_config &config) // sega_billboard_device - constructor //------------------------------------------------- -sega_billboard_device::sega_billboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_billboard_device::sega_billboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_BILLBOARD, tag, owner, clock), m_billcpu(*this, "billcpu"), m_io(*this, "io"), diff --git a/src/mame/sega/segabill.h b/src/mame/sega/segabill.h index 4fdc839cfa0..0a3836aa4d9 100644 --- a/src/mame/sega/segabill.h +++ b/src/mame/sega/segabill.h @@ -22,7 +22,7 @@ class sega_billboard_device : public device_t { public: // construction/destruction - sega_billboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_billboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mem_map(address_map &map); void io_map(address_map &map); diff --git a/src/mame/sega/segacoin.cpp b/src/mame/sega/segacoin.cpp index 9d4ad828c66..a331899f60c 100644 --- a/src/mame/sega/segacoin.cpp +++ b/src/mame/sega/segacoin.cpp @@ -127,16 +127,16 @@ INPUT_PORTS_END void segacoin_state::westdrm(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 8000000); // clock frequency unknown + Z80(config, m_maincpu, XTAL::u(8000000)); // clock frequency unknown m_maincpu->set_addrmap(AS_PROGRAM, &segacoin_state::main_map); m_maincpu->set_addrmap(AS_IO, &segacoin_state::main_portmap); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<2>(1000000); // clock frequency unknown - SEGA_315_5338A(config, "io", 0); + SEGA_315_5338A(config, "io"); - Z80(config, m_audiocpu, 8000000); // clock frequency unknown + Z80(config, m_audiocpu, XTAL::u(8000000)); // clock frequency unknown m_audiocpu->set_addrmap(AS_PROGRAM, &segacoin_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &segacoin_state::sound_portmap); @@ -145,15 +145,15 @@ void segacoin_state::westdrm(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym3438_device &ym0(YM3438(config, "ym0", 8000000)); // clock frequency unknown + ym3438_device &ym0(YM3438(config, "ym0", XTAL::u(8000000))); // clock frequency unknown ym0.add_route(0, "mono", 0.40); ym0.add_route(1, "mono", 0.40); - ym3438_device &ym1(YM3438(config, "ym1", 8000000)); // clock frequency unknown + ym3438_device &ym1(YM3438(config, "ym1", XTAL::u(8000000))); // clock frequency unknown ym1.add_route(0, "mono", 0.40); ym1.add_route(1, "mono", 0.40); - ym3438_device &ym2(YM3438(config, "ym2", 8000000)); // clock frequency unknown + ym3438_device &ym2(YM3438(config, "ym2", XTAL::u(8000000))); // clock frequency unknown ym2.add_route(0, "mono", 0.40); ym2.add_route(1, "mono", 0.40); } diff --git a/src/mame/sega/segafruit.cpp b/src/mame/sega/segafruit.cpp index 6428b4dcaf6..440532adc5a 100644 --- a/src/mame/sega/segafruit.cpp +++ b/src/mame/sega/segafruit.cpp @@ -198,7 +198,7 @@ void segafruit_state::decrypt_m4001() void segafruit_state::segafruit(machine_config & config) { - Z80(config, m_maincpu, 4'000'000); + Z80(config, m_maincpu, XTAL::u(4'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &segafruit_state::mem_map); m_maincpu->set_addrmap(AS_IO, &segafruit_state::io_map); diff --git a/src/mame/sega/segag80.cpp b/src/mame/sega/segag80.cpp index 8f78dd70f3a..322856606cf 100644 --- a/src/mame/sega/segag80.cpp +++ b/src/mame/sega/segag80.cpp @@ -25,7 +25,7 @@ * *************************************/ -segag80_audio_device_base::segag80_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 lomask, u8 himask, bool haspsg, netlist_ptr netlist, double output_scale) : +segag80_audio_device_base::segag80_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 lomask, u8 himask, bool haspsg, netlist_ptr netlist, double output_scale) : device_t(mconfig, type, tag, owner, clock), device_mixer_interface(mconfig, *this), m_lo_input(*this, "sound_nl:lo_%u", 0), @@ -41,7 +41,7 @@ segag80_audio_device_base::segag80_audio_device_base(const machine_config &mconf void segag80_audio_device_base::device_add_mconfig(machine_config &config) { - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(m_netlist) .add_route(ALL_OUTPUTS, *this, 1.0); @@ -128,7 +128,7 @@ void segag80_audio_device_base::write_ay(offs_t addr, uint8_t data) DEFINE_DEVICE_TYPE(ELIMINATOR_AUDIO, elim_audio_device, "elim_audio", "Eliminator Sound Board") -elim_audio_device::elim_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +elim_audio_device::elim_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segag80_audio_device_base(mconfig, ELIMINATOR_AUDIO, tag, owner, clock, 0xfe, 0xff, false, NETLIST_NAME(elim), 0.15) { } @@ -143,7 +143,7 @@ elim_audio_device::elim_audio_device(const machine_config &mconfig, const char * DEFINE_DEVICE_TYPE(ZEKTOR_AUDIO, zektor_audio_device, "zektor_audio", "Zektor Sound Board") -zektor_audio_device::zektor_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +zektor_audio_device::zektor_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segag80_audio_device_base(mconfig, ZEKTOR_AUDIO, tag, owner, clock, 0xfe, 0xff, true, NETLIST_NAME(zektor), 0.15) { } @@ -158,7 +158,7 @@ zektor_audio_device::zektor_audio_device(const machine_config &mconfig, const ch DEFINE_DEVICE_TYPE(SPACE_FURY_AUDIO, spacfury_audio_device, "spcfury_audio", "Space Fury Sound Board") -spacfury_audio_device::spacfury_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +spacfury_audio_device::spacfury_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segag80_audio_device_base(mconfig, SPACE_FURY_AUDIO, tag, owner, clock, 0xc7, 0x3f, false, NETLIST_NAME(spacfury), 2.0) { } @@ -173,7 +173,7 @@ spacfury_audio_device::spacfury_audio_device(const machine_config &mconfig, cons DEFINE_DEVICE_TYPE(ASTRO_BLASTER_AUDIO, astrob_audio_device, "astrob_audio", "Astro Blaster Sound Board") -astrob_audio_device::astrob_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +astrob_audio_device::astrob_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segag80_audio_device_base(mconfig, ASTRO_BLASTER_AUDIO, tag, owner, clock, 0xff, 0xff, false, NETLIST_NAME(astrob), 1.0) { } diff --git a/src/mame/sega/segag80.h b/src/mame/sega/segag80.h index c850d1e0190..b1d3801e8d1 100644 --- a/src/mame/sega/segag80.h +++ b/src/mame/sega/segag80.h @@ -19,7 +19,7 @@ public: void write_ay(offs_t addr, uint8_t data); protected: - segag80_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 lomask, u8 himask, bool haspsg, netlist_ptr netlist, double output_scale); + segag80_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 lomask, u8 himask, bool haspsg, netlist_ptr netlist, double output_scale); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -40,28 +40,28 @@ private: class elim_audio_device : public segag80_audio_device_base { public: - elim_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + elim_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class zektor_audio_device : public segag80_audio_device_base { public: - zektor_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + zektor_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class spacfury_audio_device : public segag80_audio_device_base { public: - spacfury_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + spacfury_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class astrob_audio_device : public segag80_audio_device_base { public: - astrob_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + astrob_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/mame/sega/segag80r.cpp b/src/mame/sega/segag80r.cpp index 13a2197bbbc..fab909c890d 100644 --- a/src/mame/sega/segag80r.cpp +++ b/src/mame/sega/segag80r.cpp @@ -861,8 +861,8 @@ void segag80r_state::astrob(machine_config &config) SPEAKER(config, "speaker").front_center(); /* sound boards */ - ASTRO_BLASTER_AUDIO(config, m_g80_audio, 0).add_route(ALL_OUTPUTS, "speech", 1.0); - SEGA_SPEECH_BOARD(config, "speech", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + ASTRO_BLASTER_AUDIO(config, m_g80_audio).add_route(ALL_OUTPUTS, "speech", 1.0); + SEGA_SPEECH_BOARD(config, "speech").add_route(ALL_OUTPUTS, "speaker", 0.5); } @@ -916,7 +916,7 @@ void segag80r_state::monsterb(machine_config &config) m_palette->set_entries(64 + 64); /* sound boards */ - MONSTERB_SOUND(config, m_soundbrd, 0); + MONSTERB_SOUND(config, m_soundbrd); } void segag80r_state::monster2(machine_config &config) diff --git a/src/mame/sega/segag80r.h b/src/mame/sega/segag80r.h index a5988521f30..2a7a0e2da8a 100644 --- a/src/mame/sega/segag80r.h +++ b/src/mame/sega/segag80r.h @@ -198,7 +198,7 @@ class sega005_sound_device : public device_t, public device_sound_interface { public: - sega005_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega005_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); emu_timer *m_sega005_sound_timer; sound_stream *m_sega005_stream; diff --git a/src/mame/sega/segag80r_a.cpp b/src/mame/sega/segag80r_a.cpp index 45ad74a915d..f332b7d2d4c 100644 --- a/src/mame/sega/segag80r_a.cpp +++ b/src/mame/sega/segag80r_a.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(SEGA005, sega005_sound_device, "sega005_sound", "Sega 005 Custom Sound") -sega005_sound_device::sega005_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega005_sound_device::sega005_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA005, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_sega005_sound_timer(nullptr) @@ -173,7 +173,7 @@ void segag80r_state::sega005_sound_board(machine_config &config) m_samples->set_samples_names(sega005_sample_names); m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); - SEGA005(config, "005", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + SEGA005(config, "005").add_route(ALL_OUTPUTS, "speaker", 0.25); } @@ -413,7 +413,7 @@ static const char *const monsterb_sample_names[] = nullptr }; -monsterb_sound_device::monsterb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +monsterb_sound_device::monsterb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MONSTERB_SOUND, tag, owner, clock) , m_audiocpu(*this, "audiocpu") , m_audiocpu_region(*this, "n7751") @@ -557,7 +557,7 @@ void monsterb_sound_device::n7751_p2_w(uint8_t data) void monsterb_sound_device::device_add_mconfig(machine_config &config) { /* basic machine hardware */ - N7751(config, m_audiocpu, 6000000); + N7751(config, m_audiocpu, XTAL::u(6000000)); m_audiocpu->t1_in_cb().set_constant(0); // labelled as "TEST", connected to ground m_audiocpu->p2_in_cb().set(FUNC(monsterb_sound_device::n7751_command_r)); m_audiocpu->bus_in_cb().set(FUNC(monsterb_sound_device::n7751_rom_r)); @@ -576,12 +576,12 @@ void monsterb_sound_device::device_add_mconfig(machine_config &config) m_samples->set_samples_names(monsterb_sample_names); m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); - TMS36XX(config, m_music, 247); + TMS36XX(config, m_music, XTAL::u(247)); m_music->set_subtype(tms36xx_device::subtype::TMS3617); m_music->set_decays(0.5, 0.5, 0.5, 0.5, 0.5, 0.5); m_music->add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // 50K (R91-97)/100K (R98-106) ladder network + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // 50K (R91-97)/100K (R98-106) ladder network SPEAKER(config, "speaker").front_center(); } diff --git a/src/mame/sega/segag80r_a.h b/src/mame/sega/segag80r_a.h index a1915aa44f3..d58c3f979cc 100644 --- a/src/mame/sega/segag80r_a.h +++ b/src/mame/sega/segag80r_a.h @@ -23,13 +23,13 @@ class monsterb_sound_device : public device_t { public: - template monsterb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &®ion_tag) + template monsterb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &®ion_tag) : monsterb_sound_device(mconfig, tag, owner, clock) { m_audiocpu_region.set_tag(std::forward(region_tag)); } - monsterb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + monsterb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t n7751_status_r(); void n7751_command_w(uint8_t data); diff --git a/src/mame/sega/segag80v.cpp b/src/mame/sega/segag80v.cpp index a611333b976..af5d068ea9c 100644 --- a/src/mame/sega/segag80v.cpp +++ b/src/mame/sega/segag80v.cpp @@ -932,34 +932,34 @@ void segag80v_state::g80v_base(machine_config &config) void segag80v_state::elim2(machine_config &config) { g80v_base(config); - ELIMINATOR_AUDIO(config, m_g80_audio, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + ELIMINATOR_AUDIO(config, m_g80_audio).add_route(ALL_OUTPUTS, "speaker", 1.0); } void segag80v_state::spacfury(machine_config &config) { g80v_base(config); - SPACE_FURY_AUDIO(config, m_g80_audio, 0).add_route(ALL_OUTPUTS, "speech", 1.0); - SEGA_SPEECH_BOARD(config, "speech", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + SPACE_FURY_AUDIO(config, m_g80_audio).add_route(ALL_OUTPUTS, "speech", 1.0); + SEGA_SPEECH_BOARD(config, "speech").add_route(ALL_OUTPUTS, "speaker", 1.0); } void segag80v_state::spacfurybl(machine_config &config) { g80v_base(config); - z80_device &speechcpu(Z80(config, "speechcpu", 4000000)); // clock not verified + z80_device &speechcpu(Z80(config, "speechcpu", XTAL::u(4000000))); // clock not verified speechcpu.set_addrmap(AS_PROGRAM, &segag80v_state::spacfurybl_speech_prg_map); speechcpu.set_addrmap(AS_IO, &segag80v_state::spacfurybl_speech_io_map); - TMS5100(config, "tms5100", 640000).add_route(ALL_OUTPUTS, "speaker", 0.5); // clock not verified TODO: hook up + TMS5100(config, "tms5100", XTAL::u(640000)).add_route(ALL_OUTPUTS, "speaker", 0.5); // clock not verified TODO: hook up - SPACE_FURY_AUDIO(config, m_g80_audio, 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + SPACE_FURY_AUDIO(config, m_g80_audio).add_route(ALL_OUTPUTS, "speaker", 1.0); } void segag80v_state::zektor(machine_config &config) { g80v_base(config); - ZEKTOR_AUDIO(config, m_g80_audio, 0).add_route(ALL_OUTPUTS, "speech", 0.7); - SEGA_SPEECH_BOARD(config, "speech", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + ZEKTOR_AUDIO(config, m_g80_audio).add_route(ALL_OUTPUTS, "speech", 0.7); + SEGA_SPEECH_BOARD(config, "speech").add_route(ALL_OUTPUTS, "speaker", 1.0); } void segag80v_state::tacscan(machine_config &config) @@ -972,7 +972,7 @@ void segag80v_state::startrek(machine_config &config) { g80v_base(config); SEGAUSB(config, m_usb, 0, m_maincpu).add_route(ALL_OUTPUTS, "speech", 1.0); - SEGA_SPEECH_BOARD(config, "speech", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + SEGA_SPEECH_BOARD(config, "speech").add_route(ALL_OUTPUTS, "speaker", 1.0); } diff --git a/src/mame/sega/segahang.cpp b/src/mame/sega/segahang.cpp index 62b8b978d10..0e8673a5598 100644 --- a/src/mame/sega/segahang.cpp +++ b/src/mame/sega/segahang.cpp @@ -750,7 +750,7 @@ void segahang_state::shared_base(machine_config &config) m_adc->vin_callback().set(FUNC(segahang_state::analog_r)); SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); - SEGAIC16_ROAD(config, m_segaic16road, 0); + SEGAIC16_ROAD(config, m_segaic16road); // video hardware GFXDECODE(config, "gfxdecode", m_palette, gfx_segahang); @@ -768,7 +768,7 @@ void segahang_state::hangon_base(machine_config &config) { shared_base(config); // video hardware - SEGA_HANGON_SPRITES(config, m_sprites, 0); + SEGA_HANGON_SPRITES(config, m_sprites); } void segahang_state::sharrier_base(machine_config &config) @@ -782,7 +782,7 @@ void segahang_state::sharrier_base(machine_config &config) m_subcpu->set_clock(MASTER_CLOCK_10MHz); // video hardware - SEGA_SHARRIER_SPRITES(config, m_sprites, 0); + SEGA_SHARRIER_SPRITES(config, m_sprites); m_palette->set_entries(2048*2); } @@ -911,8 +911,8 @@ void segahang_state::shangupb(machine_config &config) sound_board_2151(config); // not sure about these speeds, but at 6MHz, the road is not updated fast enough - m_maincpu->set_clock(10000000); - m_subcpu->set_clock(10000000); + m_maincpu->set_clock(XTAL::u(10000000)); + m_subcpu->set_clock(XTAL::u(10000000)); } void segahang_state::shangonro(machine_config &config) @@ -930,7 +930,7 @@ void segahang_state::sharrier(machine_config &config) m_maincpu->remove_vblank_int(); - I8751(config, m_mcu, 8000000); + I8751(config, m_mcu, XTAL::u(8000000)); m_mcu->set_addrmap(AS_IO, &segahang_state::mcu_io_map); m_mcu->port_out_cb<1>().set(FUNC(segahang_state::i8751_p1_w)); diff --git a/src/mame/sega/segaic16.cpp b/src/mame/sega/segaic16.cpp index 5039ff145dd..d41331dce57 100644 --- a/src/mame/sega/segaic16.cpp +++ b/src/mame/sega/segaic16.cpp @@ -530,7 +530,7 @@ void sega_16bit_common_base::philko_paletteram_w(offs_t offset, uint16_t data, u DEFINE_DEVICE_TYPE(SEGAIC16VID, segaic16_video_device, "segaic16_video", "Sega 16-bit Video") -segaic16_video_device::segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaic16_video_device::segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGAIC16VID, tag, owner, clock) , device_video_interface(mconfig, *this) , m_display_enable(0) diff --git a/src/mame/sega/segaic16.h b/src/mame/sega/segaic16.h index 5022f3efe02..d75af776edf 100644 --- a/src/mame/sega/segaic16.h +++ b/src/mame/sega/segaic16.h @@ -120,13 +120,13 @@ public: std::unique_ptr buffer; /* buffered data */ }; - template segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&decode_tag) + template segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&decode_tag) : segaic16_video_device(mconfig, tag, owner, clock) { m_gfxdecode.set_tag(std::forward(decode_tag)); } - segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_pagelatch_cb(T &&... args) { m_pagelatch_cb.set(std::forward(args)...); } diff --git a/src/mame/sega/segaic16_m.cpp b/src/mame/sega/segaic16_m.cpp index 080386e1f86..722597eb7db 100644 --- a/src/mame/sega/segaic16_m.cpp +++ b/src/mame/sega/segaic16_m.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5250_COMPARE_TIMER, sega_315_5250_compare_timer_devi // sega_315_5248_multiplier_device - constructor //------------------------------------------------- -sega_315_5248_multiplier_device::sega_315_5248_multiplier_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega_315_5248_multiplier_device::sega_315_5248_multiplier_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_315_5248_MULTIPLIER, tag, owner, clock) { } @@ -107,7 +107,7 @@ void sega_315_5248_multiplier_device::device_reset() // sega_315_5249_divider_device - constructor //------------------------------------------------- -sega_315_5249_divider_device::sega_315_5249_divider_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega_315_5249_divider_device::sega_315_5249_divider_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_315_5249_DIVIDER, tag, owner, clock) { } @@ -252,7 +252,7 @@ void sega_315_5249_divider_device::execute(int mode) // constructor //------------------------------------------------- -sega_315_5250_compare_timer_device::sega_315_5250_compare_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +sega_315_5250_compare_timer_device::sega_315_5250_compare_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_315_5250_COMPARE_TIMER, tag, owner, clock) , m_68kint_callback(*this) , m_zint_callback(*this) diff --git a/src/mame/sega/segaic16_m.h b/src/mame/sega/segaic16_m.h index 06483b4e727..30b8c20a86e 100644 --- a/src/mame/sega/segaic16_m.h +++ b/src/mame/sega/segaic16_m.h @@ -23,7 +23,7 @@ class sega_315_5248_multiplier_device : public device_t { public: // construction/destruction - sega_315_5248_multiplier_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega_315_5248_multiplier_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interface u16 read(offs_t offset); @@ -46,7 +46,7 @@ class sega_315_5249_divider_device : public device_t { public: // construction/destruction - sega_315_5249_divider_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega_315_5249_divider_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interface u16 read(offs_t offset); @@ -72,7 +72,7 @@ class sega_315_5250_compare_timer_device : public device_t { public: // construction/destruction - sega_315_5250_compare_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega_315_5250_compare_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto m68kint_callback() { return m_68kint_callback.bind(); } diff --git a/src/mame/sega/segaic16_road.cpp b/src/mame/sega/segaic16_road.cpp index 35d31cb4057..543c4593167 100644 --- a/src/mame/sega/segaic16_road.cpp +++ b/src/mame/sega/segaic16_road.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(SEGAIC16_ROAD, segaic16_road_device, "segaic16_road", "Sega 16-bit Road Generator") -segaic16_road_device::segaic16_road_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +segaic16_road_device::segaic16_road_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGAIC16_ROAD, tag, owner, clock) , m_gfx_region(*this, DEVICE_SELF) , m_roadram(*this, "roadram") diff --git a/src/mame/sega/segaic16_road.h b/src/mame/sega/segaic16_road.h index e0a5fdba410..b56804a3f75 100644 --- a/src/mame/sega/segaic16_road.h +++ b/src/mame/sega/segaic16_road.h @@ -40,7 +40,7 @@ public: }; - segaic16_road_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + segaic16_road_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void segaic16_road_hangon_decode(struct road_info *info); void segaic16_road_outrun_decode(struct road_info *info); diff --git a/src/mame/sega/segaic24.cpp b/src/mame/sega/segaic24.cpp index a6703442671..5039b883200 100644 --- a/src/mame/sega/segaic24.cpp +++ b/src/mame/sega/segaic24.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(S24SPRITE, segas24_sprite_device, "segas24_sprite", "Sega Sys DEFINE_DEVICE_TYPE(S24MIXER, segas24_mixer_device, "segas24_mixer", "Sega System 24 Mixer") -segas24_tile_device::segas24_tile_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas24_tile_device::segas24_tile_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S24TILE, tag, owner, clock) , device_gfx_interface(mconfig, *this) , char_gfx_index(0) @@ -550,7 +550,7 @@ void segas24_tile_device::xvout_w(uint16_t data) m_xvout_write_cb(data); } -segas24_sprite_device::segas24_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas24_sprite_device::segas24_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S24SPRITE, tag, owner, clock) { } @@ -788,7 +788,7 @@ uint16_t segas24_sprite_device::read(offs_t offset) } -segas24_mixer_device::segas24_mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas24_mixer_device::segas24_mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S24MIXER, tag, owner, clock) { } diff --git a/src/mame/sega/segaic24.h b/src/mame/sega/segaic24.h index 34ee492112c..8dc899732ac 100644 --- a/src/mame/sega/segaic24.h +++ b/src/mame/sega/segaic24.h @@ -18,13 +18,13 @@ class segas24_tile_device : public device_t, public device_gfx_interface friend class segas24_tile_config; public: - segas24_tile_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint16_t _tile_mask) + segas24_tile_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint16_t _tile_mask) : segas24_tile_device(mconfig, tag, owner, clock) { set_tile_mask(_tile_mask); } - segas24_tile_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas24_tile_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_tile_mask(uint16_t _tile_mask) { tile_mask = _tile_mask; } @@ -81,7 +81,7 @@ class segas24_sprite_device : public device_t friend class segas24_sprite_config; public: - segas24_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas24_sprite_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -101,7 +101,7 @@ class segas24_mixer_device : public device_t friend class segas24_mixer_config; public: - segas24_mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas24_mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/sega/segajw.cpp b/src/mame/sega/segajw.cpp index ab5a8964de3..ee5c73450e0 100644 --- a/src/mame/sega/segajw.cpp +++ b/src/mame/sega/segajw.cpp @@ -376,11 +376,11 @@ void segajw_state::ramdac_map(address_map &map) void segajw_state::segajw(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); // unknown clock + M68000(config, m_maincpu, XTAL::u(8000000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &segajw_state::segajw_map); m_maincpu->set_vblank_int("screen", FUNC(segajw_state::irq4_line_hold)); - Z80(config, m_audiocpu, 4000000); // unknown clock + Z80(config, m_audiocpu, XTAL::u(4000000)); // unknown clock m_audiocpu->set_addrmap(AS_PROGRAM, &segajw_state::segajw_audiocpu_map); m_audiocpu->set_addrmap(AS_IO, &segajw_state::segajw_audiocpu_io_map); @@ -388,14 +388,14 @@ void segajw_state::segajw(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_NONE); - sega_315_5296_device &io1a(SEGA_315_5296(config, "io1a", 0)); // unknown clock + sega_315_5296_device &io1a(SEGA_315_5296(config, "io1a")); // unknown clock io1a.out_pa_callback().set(FUNC(segajw_state::coin_counter_w)); io1a.out_pb_callback().set(FUNC(segajw_state::lamps1_w)); io1a.out_pc_callback().set(FUNC(segajw_state::lamps2_w)); io1a.out_pd_callback().set(FUNC(segajw_state::hopper_w)); io1a.in_pf_callback().set(FUNC(segajw_state::coin_counter_r)); - sega_315_5296_device &io1c(SEGA_315_5296(config, "io1c", 0)); // unknown clock + sega_315_5296_device &io1c(SEGA_315_5296(config, "io1c")); // unknown clock io1c.in_pa_callback().set_ioport("IN0"); io1c.in_pb_callback().set_ioport("IN1"); io1c.in_pc_callback().set_ioport("IN2"); @@ -412,10 +412,10 @@ void segajw_state::segajw(machine_config &config) screen.set_palette("palette"); PALETTE(config, "palette").set_entries(16); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); + ramdac_device &ramdac(RAMDAC(config, "ramdac", "palette")); ramdac.set_addrmap(0, &segajw_state::ramdac_map); - hd63484_device &hd63484(HD63484(config, "hd63484", 8000000)); + hd63484_device &hd63484(HD63484(config, "hd63484", XTAL::u(8000000))); hd63484.set_addrmap(0, &segajw_state::segajw_hd63484_map); // unknown clock /* sound hardware */ @@ -426,7 +426,7 @@ void segajw_state::segajw(machine_config &config) GENERIC_LATCH_8(config, "soundlatch2"); - ym3438_device &ymsnd(YM3438(config, "ymsnd", 8000000)); // unknown clock + ym3438_device &ymsnd(YM3438(config, "ymsnd", XTAL::u(8000000))); // unknown clock ymsnd.irq_handler().set_inputline("maincpu", 5); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/sega/segald.cpp b/src/mame/sega/segald.cpp index ee9e39a85ca..2d2f5946724 100644 --- a/src/mame/sega/segald.cpp +++ b/src/mame/sega/segald.cpp @@ -379,7 +379,7 @@ void segald_state::astron(machine_config &config) m_maincpu->set_addrmap(AS_IO, &segald_state::mainport); m_maincpu->set_periodic_int(FUNC(segald_state::nmi_line_pulse), attotime::from_hz(1000.0/59.94)); - PIONEER_LDV1000(config, m_laserdisc, 0); + PIONEER_LDV1000(config, m_laserdisc); m_laserdisc->set_overlay(256, 256, FUNC(segald_state::screen_update_astron)); m_laserdisc->add_route(0, "lspeaker", 1.0); m_laserdisc->add_route(1, "rspeaker", 1.0); diff --git a/src/mame/sega/segaorun.cpp b/src/mame/sega/segaorun.cpp index 0dc0804a020..f1f8b15c0f9 100644 --- a/src/mame/sega/segaorun.cpp +++ b/src/mame/sega/segaorun.cpp @@ -1192,7 +1192,7 @@ void segaorun_state::outrun_base(machine_config &config) m_screen->set_palette(m_palette); SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); - SEGAIC16_ROAD(config, m_segaic16road, 0); + SEGAIC16_ROAD(config, m_segaic16road); // sound hardware SPEAKER(config, "lspeaker").front_left(); @@ -1220,7 +1220,7 @@ void segaorun_state::outrundx(machine_config &config) TIMER(config, "bankmotor").configure_periodic(FUNC(segaorun_state::bankmotor_update), attotime::from_msec(10)); // video hardware - SEGA_OUTRUN_SPRITES(config, m_sprites, 0); + SEGA_OUTRUN_SPRITES(config, m_sprites); } void segaorun_state::outrun(machine_config &config) @@ -1267,7 +1267,7 @@ void segaorun_state::shangon(machine_config &config) m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224); m_screen->set_screen_update(FUNC(segaorun_state::screen_update_shangon)); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); } void segaorun_state::shangon_fd1089b(machine_config &config) diff --git a/src/mame/sega/segapm.cpp b/src/mame/sega/segapm.cpp index 494aedcd64e..26913e83ed0 100644 --- a/src/mame/sega/segapm.cpp +++ b/src/mame/sega/segapm.cpp @@ -60,7 +60,7 @@ INPUT_PORTS_END void segapm_state::segapm(machine_config &config) { - M68000(config, m_maincpu, 8000000); // ?? + M68000(config, m_maincpu, XTAL::u(8000000)); // ?? m_maincpu->set_addrmap(AS_PROGRAM, &segapm_state::segapm_map); // + 2 sh2s on 32x board diff --git a/src/mame/sega/segas16a.cpp b/src/mame/sega/segas16a.cpp index 03bafb7bb11..02a7d21d1c2 100644 --- a/src/mame/sega/segas16a.cpp +++ b/src/mame/sega/segas16a.cpp @@ -1965,15 +1965,15 @@ GFXDECODE_END void segas16a_state::system16a(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &segas16a_state::system16a_map); m_maincpu->set_vblank_int("screen", FUNC(segas16a_state::irq4_line_hold)); - Z80(config, m_soundcpu, 4000000); + Z80(config, m_soundcpu, XTAL::u(4000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas16a_state::sound_map); m_soundcpu->set_addrmap(AS_IO, &segas16a_state::sound_portmap); - N7751(config, m_n7751, 6000000); + N7751(config, m_n7751, XTAL::u(6000000)); m_n7751->bus_in_cb().set(FUNC(segas16a_state::n7751_rom_r)); m_n7751->t1_in_cb().set_constant(0); // labelled as "TEST", connected to ground m_n7751->p1_out_cb().set("dac", FUNC(dac_byte_interface::data_w)); @@ -2004,7 +2004,7 @@ void segas16a_state::system16a(machine_config &config) m_screen->set_screen_update(FUNC(segas16a_state::screen_update)); m_screen->set_palette(m_palette); - SEGA_SYS16A_SPRITES(config, m_sprites, 0); + SEGA_SYS16A_SPRITES(config, m_sprites); SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); GFXDECODE(config, "gfxdecode", m_palette, gfx_segas16a); @@ -2015,11 +2015,11 @@ void segas16a_state::system16a(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - YM2151(config, m_ymsnd, 4000000); + YM2151(config, m_ymsnd, XTAL::u(4000000)); m_ymsnd->port_write_handler().set(FUNC(segas16a_state::n7751_control_w)); m_ymsnd->add_route(ALL_OUTPUTS, "speaker", 0.43); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC } @@ -2059,7 +2059,7 @@ void segas16a_state::system16a_i8751(machine_config &config) system16a(config); m_maincpu->remove_vblank_int(); - I8751(config, m_mcu, 8000000); + I8751(config, m_mcu, XTAL::u(8000000)); m_mcu->set_addrmap(AS_IO, &segas16a_state::mcu_io_map); m_mcu->port_out_cb<1>().set(FUNC(segas16a_state::mcu_control_w)); diff --git a/src/mame/sega/segas16b.cpp b/src/mame/sega/segas16b.cpp index 383a264517e..cccb8a0fa22 100644 --- a/src/mame/sega/segas16b.cpp +++ b/src/mame/sega/segas16b.cpp @@ -3939,7 +3939,7 @@ void segas16b_state::system16b(machine_config &config) m_screen->set_screen_update(FUNC(segas16b_state::screen_update)); m_screen->set_palette(m_palette); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); // sound hardware @@ -3954,7 +3954,7 @@ void segas16b_state::system16b(machine_config &config) m_upd7759->drq().set(FUNC(segas16b_state::upd7759_generate_nmi)); m_upd7759->add_route(0, "netlist", 0.48, 2); - NETLIST_SOUND(config, "netlist", 48000) + NETLIST_SOUND(config, "netlist", XTAL::u(48000)) .set_source(netlist_segas16b_audio) .add_route(ALL_OUTPUTS, "mono", 1.0); @@ -4043,9 +4043,9 @@ void segas16b_state::system16b_i8751(machine_config &config) void segas16b_state::rom_5797_fragment(machine_config &config) { - SEGA_315_5248_MULTIPLIER(config, m_multiplier, 0); - SEGA_315_5250_COMPARE_TIMER(config, m_cmptimer_1, 0); - SEGA_315_5250_COMPARE_TIMER(config, m_cmptimer_2, 0); + SEGA_315_5248_MULTIPLIER(config, m_multiplier); + SEGA_315_5250_COMPARE_TIMER(config, m_cmptimer_1); + SEGA_315_5250_COMPARE_TIMER(config, m_cmptimer_2); } void segas16b_state::system16b_5797(machine_config &config) @@ -4122,7 +4122,7 @@ void segas16b_state::fpointbl(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, 0); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(75); // these align the pieces with the playfield m_sprites->set_local_originy(-2); // some other gfx don't have identical alignment to original tho (flickey character over 'good luck') @@ -4162,7 +4162,7 @@ void segas16b_state::lockonph(machine_config &config) m_screen->set_screen_update(FUNC(segas16b_state::screen_update)); m_screen->set_palette(m_palette); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); // sound hardware @@ -4245,7 +4245,7 @@ void dfjail_state::dfjail(machine_config &config) //config.device_remove("ym2151"); config.device_remove("upd"); - AD7533(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.25); // AD7533KN + AD7533(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.25); // AD7533KN } diff --git a/src/mame/sega/segas16b_isgsm.cpp b/src/mame/sega/segas16b_isgsm.cpp index eae80840810..914f54420f7 100644 --- a/src/mame/sega/segas16b_isgsm.cpp +++ b/src/mame/sega/segas16b_isgsm.cpp @@ -522,7 +522,7 @@ void isgsm_state::isgsm(machine_config &config) config.device_remove("maincpu"); config.device_remove("mapper"); - M68000(config, m_maincpu, 16000000); // no obvious CPU, but seems to be clocked faster than an original system16 based on the boot times + M68000(config, m_maincpu, XTAL::u(16000000)); // no obvious CPU, but seems to be clocked faster than an original system16 based on the boot times m_maincpu->set_addrmap(AS_PROGRAM, &isgsm_state::isgsm_map); m_maincpu->set_vblank_int("screen", FUNC(isgsm_state::irq4_line_hold)); diff --git a/src/mame/sega/segas18.cpp b/src/mame/sega/segas18.cpp index bd7c0b5f19f..dce0c5750c0 100644 --- a/src/mame/sega/segas18.cpp +++ b/src/mame/sega/segas18.cpp @@ -1354,11 +1354,11 @@ WRITE_LINE_MEMBER(segas18_state::vdp_lv4irqline_callback_s18) void segas18_state::system18(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &segas18_state::system18_map); m_maincpu->set_vblank_int("screen", FUNC(segas18_state::irq4_line_hold)); - Z80(config, m_soundcpu, 8000000); + Z80(config, m_soundcpu, XTAL::u(8000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas18_state::sound_map); m_soundcpu->set_addrmap(AS_IO, &segas18_state::sound_portmap); @@ -1368,7 +1368,7 @@ void segas18_state::system18(machine_config &config) m_mapper->set_mapper(FUNC(segas18_state::memory_mapper)); m_mapper->pbf().set_inputline(m_soundcpu, INPUT_LINE_NMI); - SEGA_315_5296(config, m_io, 16000000); + SEGA_315_5296(config, m_io, XTAL::u(16000000)); m_io->in_pa_callback().set_ioport("P1"); m_io->in_pb_callback().set_ioport("P2"); m_io->in_pc_callback().set_ioport("P3"); @@ -1403,20 +1403,20 @@ void segas18_state::system18(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_segas18); PALETTE(config, m_palette).set_entries(2048*2 + 64*3); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); // sound hardware SPEAKER(config, "mono").front_center(); - ym3438_device &ym1(YM3438(config, "ym1", 8000000)); + ym3438_device &ym1(YM3438(config, "ym1", XTAL::u(8000000))); ym1.add_route(ALL_OUTPUTS, "mono", 0.40); ym1.irq_handler().set_inputline("soundcpu", INPUT_LINE_IRQ0); - ym3438_device &ym2(YM3438(config, "ym2", 8000000)); + ym3438_device &ym2(YM3438(config, "ym2", XTAL::u(8000000))); ym2.add_route(ALL_OUTPUTS, "mono", 0.40); - rf5c68_device &rfsnd(RF5C68(config, "rfsnd", 10000000)); // ASSP (RF)5C68A + rf5c68_device &rfsnd(RF5C68(config, "rfsnd", XTAL::u(10000000))); // ASSP (RF)5C68A rfsnd.add_route(ALL_OUTPUTS, "mono", 1.0); rfsnd.set_addrmap(0, &segas18_state::pcm_map); } @@ -1489,7 +1489,7 @@ void segas18_state::system18_i8751(machine_config &config) m_mapper->mcu_int().set_inputline(m_mcu, INPUT_LINE_IRQ1); - I8751(config, m_mcu, 8000000); + I8751(config, m_mcu, XTAL::u(8000000)); m_mcu->set_addrmap(AS_IO, &segas18_state::mcu_io_map); m_mcu->set_vblank_int("screen", FUNC(segas18_state::irq0_line_hold)); } @@ -1503,7 +1503,7 @@ void segas18_state::system18_fd1094_i8751(machine_config &config) m_mapper->mcu_int().set_inputline(m_mcu, INPUT_LINE_IRQ1); - I8751(config, m_mcu, 8000000); + I8751(config, m_mcu, XTAL::u(8000000)); m_mcu->set_addrmap(AS_IO, &segas18_state::mcu_io_map); m_mcu->set_vblank_int("screen", FUNC(segas18_state::irq0_line_hold)); } diff --git a/src/mame/sega/segas18_astormbl.cpp b/src/mame/sega/segas18_astormbl.cpp index 6ae3019748d..f4661a3cf98 100644 --- a/src/mame/sega/segas18_astormbl.cpp +++ b/src/mame/sega/segas18_astormbl.cpp @@ -491,7 +491,7 @@ void segas18_astormbl_state::astormbl_video(machine_config &config) // see note in segas16a.cpp, also used here for consistency m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(64); } @@ -544,7 +544,7 @@ void segas18_astormbl_s18snd_state::sound_w(offs_t offset, uint16_t data, uint16 void segas18_astormbl_s18snd_state::astormbl_sound(machine_config &config) { - Z80(config, m_soundcpu, 8'000'000); + Z80(config, m_soundcpu, XTAL::u(8'000'000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas18_astormbl_s18snd_state::sound_map); m_soundcpu->set_addrmap(AS_IO, &segas18_astormbl_s18snd_state::sound_portmap); @@ -553,14 +553,14 @@ void segas18_astormbl_s18snd_state::astormbl_sound(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym3438_device &ym1(YM3438(config, "ym1", 8'000'000)); + ym3438_device &ym1(YM3438(config, "ym1", XTAL::u(8'000'000))); ym1.add_route(ALL_OUTPUTS, "mono", 0.40); ym1.irq_handler().set_inputline("soundcpu", INPUT_LINE_IRQ0); - ym3438_device &ym2(YM3438(config, "ym2", 8'000'000)); + ym3438_device &ym2(YM3438(config, "ym2", XTAL::u(8'000'000))); ym2.add_route(ALL_OUTPUTS, "mono", 0.40); - rf5c68_device &rfsnd(RF5C68(config, "rfsnd", 10'000'000)); // ASSP (RF)5C68A + rf5c68_device &rfsnd(RF5C68(config, "rfsnd", XTAL::u(10'000'000))); // ASSP (RF)5C68A rfsnd.add_route(ALL_OUTPUTS, "mono", 1.0); rfsnd.set_addrmap(0, &segas18_astormbl_s18snd_state::pcm_map); } @@ -568,7 +568,7 @@ void segas18_astormbl_s18snd_state::astormbl_sound(machine_config &config) void segas18_astormbl_s18snd_state::astormbl(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &segas18_astormbl_s18snd_state::astormbl_map); m_maincpu->set_vblank_int("screen", FUNC(segas18_astormbl_s18snd_state::irq4_line_hold)); diff --git a/src/mame/sega/segas24.cpp b/src/mame/sega/segas24.cpp index 38b96f8111b..af9453d0e73 100644 --- a/src/mame/sega/segas24.cpp +++ b/src/mame/sega/segas24.cpp @@ -1940,8 +1940,8 @@ void segas24_state::system24(machine_config &config) TIMER(config, "irq_frc").configure_periodic(FUNC(segas24_state::irq_frc_cb), attotime::from_hz(FRC_CLOCK_MODE1)); S24TILE(config, m_vtile, 0, 0xfff).set_palette("palette"); - S24SPRITE(config, m_vsprite, 0); - S24MIXER(config, m_vmixer, 0); + S24SPRITE(config, m_vsprite); + S24MIXER(config, m_vmixer); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); @@ -1954,12 +1954,12 @@ void segas24_state::system24(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 4000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set(FUNC(segas24_state::irq_ym)); ymsnd.add_route(0, "lspeaker", 0.50); ymsnd.add_route(1, "rspeaker", 0.50); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "lspeaker", 0.5).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC } void segas24_state::system24_rom(machine_config &config) @@ -2005,13 +2005,13 @@ void segas24_state::system24_floppy_hotrod(machine_config &config) upd2.set_portx_tag("DIAL3"); upd2.set_porty_tag("DIAL4"); - msm6253_device &adc1(MSM6253(config, "adc1", 0)); // IC5 - 33k/33p R/C clock + msm6253_device &adc1(MSM6253(config, "adc1")); // IC5 - 33k/33p R/C clock adc1.set_input_tag<0>("PEDAL1"); adc1.set_input_tag<1>("PEDAL2"); adc1.set_input_tag<2>("PEDAL3"); adc1.set_input_tag<3>("PEDAL4"); - MSM6253(config, "adc2", 0); // IC2 - 33k/33p R/C clock + MSM6253(config, "adc2"); // IC2 - 33k/33p R/C clock } void segas24_state::system24_floppy_fd1094(machine_config &config) diff --git a/src/mame/sega/segas32.cpp b/src/mame/sega/segas32.cpp index 6d7d2633df8..5fa0a000091 100644 --- a/src/mame/sega/segas32.cpp +++ b/src/mame/sega/segas32.cpp @@ -556,12 +556,12 @@ orunners: Interleaved with the dj and << >> buttons is the data the drives the DEFINE_DEVICE_TYPE(SEGA_S32_PCB, segas32_state, "segas32_pcb", "Sega System 32 PCB") -segas32_state::segas32_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_state::segas32_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_state(mconfig, SEGA_S32_PCB, tag, owner, clock, false) { } -segas32_state::segas32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_multi32) +segas32_state::segas32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_multi32) : device_t(mconfig, type, tag, owner, clock) , m_z80_shared_ram(*this,"z80_shared_ram") , m_system32_workram(*this,"workram") @@ -612,7 +612,7 @@ segas32_state::segas32_state(const machine_config &mconfig, device_type type, co * *************************************/ -#define MASTER_CLOCK 32215900 +#define MASTER_CLOCK XTAL::u(32215900) #define RFC_CLOCK XTAL(50'000'000) #define MULTI32_CLOCK XTAL(40'000'000) @@ -2260,7 +2260,7 @@ void segas32_state::device_add_mconfig(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &segas32_state::system32_sound_map); m_soundcpu->set_addrmap(AS_IO, &segas32_state::system32_sound_portmap); - sega_315_5296_device &io_chip(SEGA_315_5296(config, "io_chip", 0)); // unknown clock + sega_315_5296_device &io_chip(SEGA_315_5296(config, "io_chip")); // unknown clock io_chip.in_pa_callback().set_ioport("P1_A"); io_chip.in_pb_callback().set_ioport("P2_A"); io_chip.in_pc_callback().set_ioport("PORTC_A"); @@ -2308,12 +2308,12 @@ void segas32_state::device_add_mconfig(machine_config &config) rfsnd.add_route(1, "rspeaker", 0.55); rfsnd.set_addrmap(0, &segas32_state::rf5c68_map); - S32COMM(config, m_s32comm, 0); + S32COMM(config, m_s32comm); } DEFINE_DEVICE_TYPE(SEGA_S32_REGULAR_DEVICE, segas32_regular_state, "segas32_pcb_regular", "Sega System 32 regular PCB") -segas32_regular_state::segas32_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_regular_state::segas32_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_state(mconfig, SEGA_S32_REGULAR_DEVICE, tag, owner, clock, false) { } @@ -2335,7 +2335,7 @@ void segas32_analog_state::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &segas32_analog_state::system32_analog_map); - msm6253_device &adc(MSM6253(config, "adc", 0)); + msm6253_device &adc(MSM6253(config, "adc")); adc.set_input_tag<0>("ANALOG1"); adc.set_input_tag<1>("ANALOG2"); adc.set_input_tag<2>("ANALOG3"); @@ -2344,12 +2344,12 @@ void segas32_analog_state::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_S32_ANALOG_DEVICE, segas32_analog_state, "segas32_pcb_analog", "Sega System 32 analog PCB") -segas32_analog_state::segas32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_analog_state::segas32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_analog_state(mconfig, SEGA_S32_ANALOG_DEVICE, tag, owner, clock) { } -segas32_analog_state::segas32_analog_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +segas32_analog_state::segas32_analog_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : segas32_state(mconfig, type, tag, owner, clock, false) { } @@ -2391,7 +2391,7 @@ void segas32_trackball_state::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_S32_TRACKBALL_DEVICE, segas32_trackball_state, "segas32_pcb_trackball", "Sega System 32 trackball PCB") -segas32_trackball_state::segas32_trackball_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_trackball_state::segas32_trackball_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_state(mconfig, SEGA_S32_TRACKBALL_DEVICE, tag, owner, clock, false) { } @@ -2421,12 +2421,12 @@ void segas32_4player_state::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_S32_4PLAYER_DEVICE, segas32_4player_state, "segas32_pcb_4player", "Sega System 32 4-player/fighting PCB") -segas32_4player_state::segas32_4player_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_4player_state::segas32_4player_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_4player_state(mconfig, SEGA_S32_4PLAYER_DEVICE, tag, owner, clock) { } -segas32_4player_state::segas32_4player_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +segas32_4player_state::segas32_4player_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : segas32_state(mconfig, type, tag, owner, clock, false) { } @@ -2448,16 +2448,16 @@ void segas32_v25_state::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &segas32_v25_state::ga2_main_map); - MB8421(config, "dpram", 0); + MB8421(config, "dpram"); /* add a V25 for protection */ - v25_device &mcu(V25(config, "mcu", 10000000)); + v25_device &mcu(V25(config, "mcu", XTAL::u(10000000))); mcu.set_addrmap(AS_PROGRAM, &segas32_v25_state::v25_map); } DEFINE_DEVICE_TYPE(SEGA_S32_V25_DEVICE, segas32_v25_state, "segas32_pcb_v25", "Sega System 32 V25 PCB") -segas32_v25_state::segas32_v25_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_v25_state::segas32_v25_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_4player_state(mconfig, SEGA_S32_V25_DEVICE, tag, owner, clock) { } @@ -2471,7 +2471,7 @@ void segas32_upd7725_state::device_add_mconfig(machine_config &config) segas32_analog_state::device_add_mconfig(config); /* add a upd7725; this is on the 837-8341 daughterboard which plugs into the socket on the master pcb's ROM board where an fd1149 could go */ - upd7725_device &dsp(UPD7725(config, "dsp", 8000000)); // TODO: Find real clock speed for the upd7725; this is a canned oscillator on the 837-8341 pcb + upd7725_device &dsp(UPD7725(config, "dsp", XTAL::u(8000000))); // TODO: Find real clock speed for the upd7725; this is a canned oscillator on the 837-8341 pcb dsp.set_addrmap(AS_PROGRAM, &segas32_upd7725_state::upd7725_prg_map); dsp.set_addrmap(AS_DATA, &segas32_upd7725_state::upd7725_data_map); dsp.set_disable(); // TODO: disable for now, needs DMA pins and interrupts implemented in upd7725 core @@ -2483,7 +2483,7 @@ void segas32_upd7725_state::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_S32_UPD7725_DEVICE, segas32_upd7725_state, "segas32_pcb_upd7725", "Sega System 32 uPD7725 PCB") -segas32_upd7725_state::segas32_upd7725_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_upd7725_state::segas32_upd7725_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_analog_state(mconfig, SEGA_S32_UPD7725_DEVICE, tag, owner, clock) { } @@ -2539,7 +2539,7 @@ void segas32_cd_state::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &segas32_cd_state::system32_cd_map); - mb89352_device &scsictrl(MB89352A(config, "mb89352", 8000000)); + mb89352_device &scsictrl(MB89352A(config, "mb89352", XTAL::u(8000000))); scsictrl.set_scsi_port("scsi"); scsictrl.irq_cb().set(FUNC(segas32_cd_state::scsi_irq_w)); scsictrl.drq_cb().set(FUNC(segas32_cd_state::scsi_drq_w)); @@ -2556,7 +2556,7 @@ void segas32_cd_state::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_S32_CD_DEVICE, segas32_cd_state, "segas32_pcb_cd", "Sega System 32 CD PCB") -segas32_cd_state::segas32_cd_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segas32_cd_state::segas32_cd_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segas32_state(mconfig, SEGA_S32_CD_DEVICE, tag, owner, clock, false) , m_lamps(*this, "lamp%u", 0U) { @@ -2575,7 +2575,7 @@ void sega_multi32_state::device_add_mconfig(machine_config &config) m_soundcpu->set_addrmap(AS_PROGRAM, &sega_multi32_state::multi32_sound_map); m_soundcpu->set_addrmap(AS_IO, &sega_multi32_state::multi32_sound_portmap); - sega_315_5296_device &io_chip_0(SEGA_315_5296(config, "io_chip_0", 0)); // unknown clock + sega_315_5296_device &io_chip_0(SEGA_315_5296(config, "io_chip_0")); // unknown clock io_chip_0.in_pa_callback().set_ioport("P1_A"); io_chip_0.in_pb_callback().set_ioport("P2_A"); io_chip_0.in_pc_callback().set_ioport("PORTC_A"); @@ -2587,7 +2587,7 @@ void sega_multi32_state::device_add_mconfig(machine_config &config) io_chip_0.out_cnt1_callback().set(FUNC(segas32_state::display_enable_w<0>)); io_chip_0.out_cnt2_callback().set_inputline(m_soundcpu, INPUT_LINE_RESET).invert(); - sega_315_5296_device &io_chip_1(SEGA_315_5296(config, "io_chip_1", 0)); // unknown clock + sega_315_5296_device &io_chip_1(SEGA_315_5296(config, "io_chip_1")); // unknown clock io_chip_1.in_pa_callback().set_ioport("P1_B"); io_chip_1.in_pb_callback().set_ioport("P2_B"); io_chip_1.in_pc_callback().set_ioport("PORTC_B"); @@ -2636,18 +2636,18 @@ void sega_multi32_state::device_add_mconfig(machine_config &config) m_multipcm->add_route(1, "lspeaker", 1.0); m_multipcm->add_route(0, "rspeaker", 1.0); - S32COMM(config, m_s32comm, 0); + S32COMM(config, m_s32comm); } DEFINE_DEVICE_TYPE(SEGA_MULTI32_DEVICE, sega_multi32_state, "segas32_pcb_multi", "Sega Multi 32") -sega_multi32_state::sega_multi32_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_multi32_state::sega_multi32_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_multi32_state(mconfig, SEGA_MULTI32_DEVICE, tag, owner, clock) { } -sega_multi32_state::sega_multi32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sega_multi32_state::sega_multi32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : segas32_state(mconfig, type, tag, owner, clock, true) { } @@ -2668,7 +2668,7 @@ void sega_multi32_analog_state::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sega_multi32_analog_state::multi32_analog_map); - msm6253_device &adc(MSM6253(config, "adc", 0)); + msm6253_device &adc(MSM6253(config, "adc")); adc.set_input_tag<0>("ANALOG1"); adc.set_input_tag<1>("ANALOG2"); adc.set_input_cb<2>(FUNC(sega_multi32_analog_state::in2_analog_read)); @@ -2692,7 +2692,7 @@ void sega_multi32_analog_state::analog_bank_w(uint8_t data) DEFINE_DEVICE_TYPE(SEGA_MULTI32_ANALOG_DEVICE, sega_multi32_analog_state, "segas32_pcb_multi_analog", "Sega Multi 32 analog PCB") -sega_multi32_analog_state::sega_multi32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_multi32_analog_state::sega_multi32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_multi32_state(mconfig, SEGA_MULTI32_ANALOG_DEVICE, tag, owner, clock) , m_analog_ports(*this, "ANALOG%u", 1) , m_analog_bank(0) @@ -2722,7 +2722,7 @@ void sega_multi32_6player_state::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_MULTI32_6PLAYER_DEVICE, sega_multi32_6player_state, "segas32_pcb_multi_6player", "Sega Multi 32 6-player PCB") -sega_multi32_6player_state::sega_multi32_6player_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_multi32_6player_state::sega_multi32_6player_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_multi32_state(mconfig, SEGA_MULTI32_6PLAYER_DEVICE, tag, owner, clock) { } @@ -2790,68 +2790,68 @@ private: void segas32_new_state::sega_system32(machine_config &config) { - SEGA_S32_REGULAR_DEVICE(config, "mainpcb", 0); + SEGA_S32_REGULAR_DEVICE(config, "mainpcb"); } void segas32_new_state::sega_system32_analog(machine_config &config) { - SEGA_S32_ANALOG_DEVICE(config, "mainpcb", 0); + SEGA_S32_ANALOG_DEVICE(config, "mainpcb"); } void segas32_new_state::sega_system32_track(machine_config &config) { - SEGA_S32_TRACKBALL_DEVICE(config, "mainpcb", 0); + SEGA_S32_TRACKBALL_DEVICE(config, "mainpcb"); } void segas32_new_state::sega_system32_4p(machine_config &config) { - SEGA_S32_4PLAYER_DEVICE(config, "mainpcb", 0); + SEGA_S32_4PLAYER_DEVICE(config, "mainpcb"); } void segas32_new_state::sega_system32_cd(machine_config &config) { - SEGA_S32_CD_DEVICE(config, "mainpcb", 0); + SEGA_S32_CD_DEVICE(config, "mainpcb"); } // for f1en where there is a sub-board containing shared ram sitting underneath the ROM board bridging 2 PCBs (not a network link) void segas32_new_state::sega_system32_dual_direct(machine_config &config) { - SEGA_S32_ANALOG_DEVICE(config, "mainpcb", 0); - SEGA_S32_ANALOG_DEVICE(config, "slavepcb", 0); + SEGA_S32_ANALOG_DEVICE(config, "mainpcb"); + SEGA_S32_ANALOG_DEVICE(config, "slavepcb"); } // air rescue is like f1en above but also has the 837-8341 DSP daughterboard on the mainpcb side only void segas32_new_state::sega_system32_dual_direct_upd7725(machine_config &config) { - SEGA_S32_UPD7725_DEVICE(config, "mainpcb", 0); - SEGA_S32_ANALOG_DEVICE(config, "slavepcb", 0); + SEGA_S32_UPD7725_DEVICE(config, "mainpcb"); + SEGA_S32_ANALOG_DEVICE(config, "slavepcb"); } void segas32_new_state::sega_system32_ga2(machine_config &config) { - SEGA_S32_V25_DEVICE(config, "mainpcb", 0); + SEGA_S32_V25_DEVICE(config, "mainpcb"); subdevice("mainpcb:mcu")->set_decryption_table(segas32_v25_state::ga2_opcode_table); } void segas32_new_state::sega_system32_arf(machine_config &config) { - SEGA_S32_V25_DEVICE(config, "mainpcb", 0); + SEGA_S32_V25_DEVICE(config, "mainpcb"); subdevice("mainpcb:mcu")->set_decryption_table(segas32_v25_state::arf_opcode_table); } void segas32_new_state::sega_multi32(machine_config &config) { - SEGA_MULTI32_DEVICE(config, "mainpcb", 0); + SEGA_MULTI32_DEVICE(config, "mainpcb"); } void segas32_new_state::sega_multi32_analog(machine_config &config) { - SEGA_MULTI32_ANALOG_DEVICE(config, "mainpcb", 0); + SEGA_MULTI32_ANALOG_DEVICE(config, "mainpcb"); } void segas32_new_state::sega_multi32_6p(machine_config &config) { - SEGA_MULTI32_6PLAYER_DEVICE(config, "mainpcb", 0); + SEGA_MULTI32_6PLAYER_DEVICE(config, "mainpcb"); } /************************************* diff --git a/src/mame/sega/segas32.h b/src/mame/sega/segas32.h index 3f617a43e3b..ab1d9f71bec 100644 --- a/src/mame/sega/segas32.h +++ b/src/mame/sega/segas32.h @@ -23,7 +23,7 @@ class segas32_state : public device_t { public: - segas32_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void init_alien3(); void init_arescue(int m_hasdsp); @@ -68,7 +68,7 @@ public: void tilebank_external_w(uint8_t data); protected: - segas32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_multi32); + segas32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_multi32); typedef void (segas32_state::*sys32_output_callback)(int which, uint16_t data); @@ -274,16 +274,16 @@ protected: class segas32_regular_state : public segas32_state { public: - segas32_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class segas32_analog_state : public segas32_state { public: - segas32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - segas32_analog_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + segas32_analog_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; }; @@ -291,7 +291,7 @@ protected: class segas32_trackball_state : public segas32_state { public: - segas32_trackball_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_trackball_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void system32_trackball_map(address_map &map); protected: @@ -301,10 +301,10 @@ protected: class segas32_4player_state : public segas32_state { public: - segas32_4player_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_4player_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - segas32_4player_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + segas32_4player_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; }; @@ -312,7 +312,7 @@ protected: class segas32_v25_state : public segas32_4player_state { public: - segas32_v25_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_v25_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const uint8_t arf_opcode_table[256]; static const uint8_t ga2_opcode_table[256]; @@ -328,7 +328,7 @@ private: class segas32_upd7725_state : public segas32_analog_state { public: - segas32_upd7725_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_upd7725_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -337,7 +337,7 @@ protected: class segas32_cd_state : public segas32_state { public: - segas32_cd_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segas32_cd_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void lamps1_w(uint8_t data); void lamps2_w(uint8_t data); @@ -356,10 +356,10 @@ private: class sega_multi32_state : public segas32_state { public: - sega_multi32_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_multi32_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - sega_multi32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega_multi32_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; }; @@ -367,7 +367,7 @@ protected: class sega_multi32_analog_state : public sega_multi32_state { public: - sega_multi32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_multi32_analog_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ioport_value in2_analog_read(); ioport_value in3_analog_read(); @@ -386,7 +386,7 @@ private: class sega_multi32_6player_state : public sega_multi32_state { public: - sega_multi32_6player_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_multi32_6player_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/sega/segashiobd.cpp b/src/mame/sega/segashiobd.cpp index b30f6406eb9..64f292c1eb7 100644 --- a/src/mame/sega/segashiobd.cpp +++ b/src/mame/sega/segashiobd.cpp @@ -93,7 +93,7 @@ void sega_837_14438_device::device_add_mconfig(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sega_837_14438_device::sh4_map); } -sega_837_14438_device::sega_837_14438_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_837_14438_device::sega_837_14438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA837_14438, tag, owner, clock), m_maincpu(*this, "shiobdcpu") { diff --git a/src/mame/sega/segashiobd.h b/src/mame/sega/segashiobd.h index c1bec8871f9..dc08946483c 100644 --- a/src/mame/sega/segashiobd.h +++ b/src/mame/sega/segashiobd.h @@ -13,7 +13,7 @@ class sega_837_14438_device : public device_t { public: // construction/destruction - sega_837_14438_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_837_14438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual const tiny_rom_entry *device_rom_region() const override; protected: diff --git a/src/mame/sega/segasm1.cpp b/src/mame/sega/segasm1.cpp index e8a217e7ec7..2ffadf40a47 100644 --- a/src/mame/sega/segasm1.cpp +++ b/src/mame/sega/segasm1.cpp @@ -615,10 +615,10 @@ INPUT_PORTS_END void systemm1_state::m1base(machine_config &config) { - M68000(config, m_maincpu, 10'000'000); + M68000(config, m_maincpu, XTAL::u(10'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &systemm1_state::mem_map); - Z80(config, m_soundcpu, 4'000'000); + Z80(config, m_soundcpu, XTAL::u(4'000'000)); m_soundcpu->set_addrmap(AS_PROGRAM, &systemm1_state::z80_map); m_soundcpu->set_addrmap(AS_IO, &systemm1_state::z80_io_map); @@ -635,7 +635,7 @@ void systemm1_state::m1base(machine_config &config) S24TILE(config, m_tiles, 0, 0x3fff); m_tiles->set_palette(m_palette); - S24MIXER(config, m_mixer, 0); + S24MIXER(config, m_mixer); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -666,10 +666,10 @@ void systemm1_state::m1comm(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &systemm1_state::mem_comm_map); - Z80(config, m_commcpu, 4'000'000); // unknown clock + Z80(config, m_commcpu, XTAL::u(4'000'000)); // unknown clock m_commcpu->set_addrmap(AS_PROGRAM, &systemm1_state::comm_map); - I8251(config, "uart", 4000000); // unknown clock + I8251(config, "uart", XTAL::u(4000000)); // unknown clock mb8421_device &dpram(MB8421(config, "dpram")); dpram.intl_callback().set_inputline("m1comm", 0); diff --git a/src/mame/sega/segaspeech.cpp b/src/mame/sega/segaspeech.cpp index 48b49b8c796..38682cdb4fa 100644 --- a/src/mame/sega/segaspeech.cpp +++ b/src/mame/sega/segaspeech.cpp @@ -27,7 +27,7 @@ CONSTANTS ***************************************************************************/ -#define SPEECH_MASTER_CLOCK 3120000 +#define SPEECH_MASTER_CLOCK XTAL::u(3120000) @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(SEGA_SPEECH_BOARD, sega_speech_device, "sega_speech_device", "Sega Speech Sound Board") -sega_speech_device::sega_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +sega_speech_device::sega_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_SPEECH_BOARD, tag, owner, clock), device_mixer_interface(mconfig, *this), m_speech(*this, "data"), diff --git a/src/mame/sega/segaspeech.h b/src/mame/sega/segaspeech.h index 5250c359a2b..ae21e06ed37 100644 --- a/src/mame/sega/segaspeech.h +++ b/src/mame/sega/segaspeech.h @@ -17,7 +17,7 @@ class sega_speech_device : public device_t, public device_mixer_interface { public: - sega_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + sega_speech_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // auto int_cb() { return m_int_cb.bind(); } diff --git a/src/mame/sega/segattl.cpp b/src/mame/sega/segattl.cpp index 03a6825ad9e..1ef130e7907 100644 --- a/src/mame/sega/segattl.cpp +++ b/src/mame/sega/segattl.cpp @@ -64,7 +64,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -135,7 +135,7 @@ void segattl_state::video_start() void segattl_state::segattl(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_segattl); + NETLIST_CPU(config, m_maincpu).set_source(netlist_segattl); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/sega/segaufo.cpp b/src/mame/sega/segaufo.cpp index 7c803a0b7aa..ccd98424c65 100644 --- a/src/mame/sega/segaufo.cpp +++ b/src/mame/sega/segaufo.cpp @@ -854,7 +854,7 @@ void ufo_state::ufo21(machine_config &config) m_io2->out_pf_callback().set(FUNC(ufo_state::ex_crane_xyz_w)); m_io2->out_pg_callback().set_nop(); - sega_315_5338a_device &io3(SEGA_315_5338A(config, "io3", 0)); + sega_315_5338a_device &io3(SEGA_315_5338A(config, "io3")); io3.out_pa_callback().set(FUNC(ufo_state::ex_upd_start_w)); io3.in_pb_callback().set(FUNC(ufo_state::ex_upd_busy_r)); io3.out_pe_callback().set(FUNC(ufo_state::ex_ufo21_lamps1_w)); diff --git a/src/mame/sega/segausb.cpp b/src/mame/sega/segausb.cpp index 07d1729e200..9eda413f32a 100644 --- a/src/mame/sega/segausb.cpp +++ b/src/mame/sega/segausb.cpp @@ -23,11 +23,11 @@ CONSTANTS ***************************************************************************/ -#define USB_MASTER_CLOCK 6000000 +#define USB_MASTER_CLOCK XTAL::u(6000000) #define USB_2MHZ_CLOCK (USB_MASTER_CLOCK/3) #define USB_PCS_CLOCK (USB_2MHZ_CLOCK/2) #define USB_GOS_CLOCK (USB_2MHZ_CLOCK/16/4) -#define MM5837_CLOCK 100000 +#define MM5837_CLOCK XTAL::u(100000) /*************************************************************************** @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(SEGAUSB, usb_sound_device, "segausb", "Sega Universal Sound Board") -usb_sound_device::usb_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +usb_sound_device::usb_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_mixer_interface(mconfig, *this), m_in_latch(0), @@ -70,7 +70,7 @@ usb_sound_device::usb_sound_device(const machine_config &mconfig, device_type ty { } -usb_sound_device::usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +usb_sound_device::usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : usb_sound_device(mconfig, SEGAUSB, tag, owner, clock) { } @@ -764,16 +764,16 @@ void usb_sound_device::device_add_mconfig(machine_config &config) m_ourcpu->p2_out_cb().set(FUNC(usb_sound_device::p2_w)); m_ourcpu->t1_in_cb().set(FUNC(usb_sound_device::t1_r)); - TIMER(config, "usb_timer", 0).configure_periodic( + TIMER(config, "usb_timer").configure_periodic( FUNC(usb_sound_device::increment_t1_clock_timer_cb), attotime::from_hz(USB_2MHZ_CLOCK / 256)); #if (ENABLE_SEGAUSB_NETLIST) - TIMER(config, "gos_timer", 0).configure_periodic( + TIMER(config, "gos_timer").configure_periodic( FUNC(usb_sound_device::gos_timer), attotime::from_hz(USB_GOS_CLOCK)); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(segausb)) .add_route(ALL_OUTPUTS, *this, 1.0); @@ -810,7 +810,7 @@ void usb_sound_device::device_add_mconfig(machine_config &config) // configure the PIT clocks and gates for (int index = 0; index < 3; index++) { - PIT8253(config, m_pit[index], 0); + PIT8253(config, m_pit[index]); m_pit[index]->set_clk<0>(USB_PCS_CLOCK); m_pit[index]->set_clk<1>(USB_PCS_CLOCK); m_pit[index]->set_clk<2>(USB_2MHZ_CLOCK); @@ -833,7 +833,7 @@ void usb_sound_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGAUSBROM, usb_rom_sound_device, "segausbrom", "Sega Universal Sound Board with ROM") -usb_rom_sound_device::usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +usb_rom_sound_device::usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : usb_sound_device(mconfig, SEGAUSBROM, tag, owner, clock) { } diff --git a/src/mame/sega/segausb.h b/src/mame/sega/segausb.h index e96b6cd98b2..8c1419fadeb 100644 --- a/src/mame/sega/segausb.h +++ b/src/mame/sega/segausb.h @@ -25,13 +25,13 @@ class usb_sound_device : public device_t, public device_mixer_interface { public: - template usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&maincpu_tag) + template usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&maincpu_tag) : usb_sound_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(maincpu_tag); } - usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + usb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t status_r(); void data_w(uint8_t data); @@ -53,7 +53,7 @@ public: protected: - usb_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + usb_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -174,13 +174,13 @@ DECLARE_DEVICE_TYPE(SEGAUSB, usb_sound_device) class usb_rom_sound_device : public usb_sound_device { public: - template usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, T &&maincpu_tag) + template usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&maincpu_tag) : usb_rom_sound_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(maincpu_tag); } - usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + usb_rom_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/mame/sega/segaxbd.cpp b/src/mame/sega/segaxbd.cpp index 66238a54b95..9496e8080f8 100644 --- a/src/mame/sega/segaxbd.cpp +++ b/src/mame/sega/segaxbd.cpp @@ -279,12 +279,12 @@ ROMs: DEFINE_DEVICE_TYPE(SEGA_XBD_PCB, segaxbd_state, "segaxbd_pcb", "Sega X-Board PCB") -segaxbd_state::segaxbd_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_state::segaxbd_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_PCB, tag, owner, clock) { } -segaxbd_state::segaxbd_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +segaxbd_state::segaxbd_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_maincpu(*this, "maincpu") , m_subcpu(*this, "subcpu") @@ -1677,16 +1677,16 @@ void segaxbd_state::xboard_base_mconfig(machine_config &config) MB3773(config, "watchdog"); - SEGA_315_5248_MULTIPLIER(config, "multiplier_main", 0); - SEGA_315_5248_MULTIPLIER(config, "multiplier_subx", 0); - SEGA_315_5249_DIVIDER(config, "divider_main", 0); - SEGA_315_5249_DIVIDER(config, "divider_subx", 0); + SEGA_315_5248_MULTIPLIER(config, "multiplier_main"); + SEGA_315_5248_MULTIPLIER(config, "multiplier_subx"); + SEGA_315_5249_DIVIDER(config, "divider_main"); + SEGA_315_5249_DIVIDER(config, "divider_subx"); - SEGA_315_5250_COMPARE_TIMER(config, m_cmptimer_1, 0); + SEGA_315_5250_COMPARE_TIMER(config, m_cmptimer_1); m_cmptimer_1->m68kint_callback().set(FUNC(segaxbd_state::timer_irq_w)); m_cmptimer_1->zint_callback().set_inputline(m_soundcpu, INPUT_LINE_NMI); - SEGA_315_5250_COMPARE_TIMER(config, "cmptimer_subx", 0); + SEGA_315_5250_COMPARE_TIMER(config, "cmptimer_subx"); CXD1095(config, m_iochip[0]); // IC160 m_iochip[0]->in_porta_cb().set_ioport("IO0PORTA"); @@ -1712,11 +1712,11 @@ void segaxbd_state::xboard_base_mconfig(machine_config &config) m_screen->set_screen_update(FUNC(segaxbd_state::screen_update)); m_screen->set_palette(m_palette); - SEGA_XBOARD_SPRITES(config, m_sprites, 0); + SEGA_XBOARD_SPRITES(config, m_sprites); SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); m_segaic16vid->set_screen(m_screen); - SEGAIC16_ROAD(config, m_segaic16road, 0); + SEGAIC16_ROAD(config, m_segaic16road); // sound hardware SPEAKER(config, "lspeaker").front_left(); @@ -1736,7 +1736,7 @@ void segaxbd_state::xboard_base_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_XBD_REGULAR, segaxbd_regular_state, "segaxbd_pcb_reg", "Sega X-Board PCB (regular)") -segaxbd_regular_state::segaxbd_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_regular_state::segaxbd_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_REGULAR, tag, owner, clock) { } @@ -1748,13 +1748,13 @@ void segaxbd_regular_state::device_add_mconfig(machine_config &config) void segaxbd_new_state::sega_xboard(machine_config &config) { - SEGA_XBD_REGULAR(config, "mainpcb", 0); + SEGA_XBD_REGULAR(config, "mainpcb"); } DEFINE_DEVICE_TYPE(SEGA_XBD_FD1094, segaxbd_fd1094_state, "segaxbd_pcb_fd1094", "Sega X-Board PCB (FD1094)") -segaxbd_fd1094_state::segaxbd_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_fd1094_state::segaxbd_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_FD1094, tag, owner, clock) { } @@ -1770,13 +1770,13 @@ void segaxbd_fd1094_state::device_add_mconfig(machine_config &config) void segaxbd_new_state::sega_xboard_fd1094(machine_config &config) { - SEGA_XBD_FD1094(config, "mainpcb", 0); + SEGA_XBD_FD1094(config, "mainpcb"); } void segaxbd_new_state_double::sega_xboard_fd1094_double(machine_config &config) { - SEGA_XBD_FD1094(config, "mainpcb", 0); - SEGA_XBD_FD1094(config, "subpcb", 0); + SEGA_XBD_FD1094(config, "mainpcb"); + SEGA_XBD_FD1094(config, "subpcb"); //config.m_perfect_cpu_quantum = subtag("mainpcb:maincpu"); // doesn't help.. } @@ -1788,7 +1788,7 @@ void segaxbd_new_state_double::sega_xboard_fd1094_double(machine_config &config) DEFINE_DEVICE_TYPE(SEGA_XBD_ABURNER2_DEVICE, segaxbd_aburner2_state, "segaxbd_pcb_aburner2", "Sega X-Board PCB (After Burner)") -segaxbd_aburner2_state::segaxbd_aburner2_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_aburner2_state::segaxbd_aburner2_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_ABURNER2_DEVICE, tag, owner, clock) { } @@ -1803,13 +1803,13 @@ void segaxbd_aburner2_state::device_add_mconfig(machine_config &config) void segaxbd_new_state::sega_aburner2(machine_config &config) { - SEGA_XBD_ABURNER2_DEVICE(config, "mainpcb", 0); + SEGA_XBD_ABURNER2_DEVICE(config, "mainpcb"); } DEFINE_DEVICE_TYPE(SEGA_XBD_LASTSURV_FD1094, segaxbd_lastsurv_fd1094_state, "segaxbd_pcb_lastsurv_fd1094", "Sega X-Board PCB (Last Survivor, FD1094)") -segaxbd_lastsurv_fd1094_state::segaxbd_lastsurv_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_lastsurv_fd1094_state::segaxbd_lastsurv_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_LASTSURV_FD1094, tag, owner, clock) { } @@ -1836,13 +1836,13 @@ void segaxbd_lastsurv_fd1094_state::device_add_mconfig(machine_config &config) void segaxbd_new_state::sega_lastsurv_fd1094(machine_config &config) { - SEGA_XBD_LASTSURV_FD1094(config, "mainpcb", 0); + SEGA_XBD_LASTSURV_FD1094(config, "mainpcb"); } DEFINE_DEVICE_TYPE(SEGA_XBD_LASTSURV, segaxbd_lastsurv_state, "segaxbd_pcb_lastsurv", "Sega X-Board PCB (Last Survivor)") -segaxbd_lastsurv_state::segaxbd_lastsurv_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_lastsurv_state::segaxbd_lastsurv_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_LASTSURV, tag, owner, clock) { } @@ -1865,13 +1865,13 @@ void segaxbd_lastsurv_state::device_add_mconfig(machine_config &config) void segaxbd_new_state::sega_lastsurv(machine_config &config) { - SEGA_XBD_LASTSURV(config, "mainpcb", 0); + SEGA_XBD_LASTSURV(config, "mainpcb"); } DEFINE_DEVICE_TYPE(SEGA_XBD_SMGP_FD1094, segaxbd_smgp_fd1094_state, "segaxbd_pcb_smgp_fd1094", "Sega X-Board PCB (SMGP, FD1094)") -segaxbd_smgp_fd1094_state::segaxbd_smgp_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_smgp_fd1094_state::segaxbd_smgp_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_SMGP_FD1094, tag, owner, clock) { } @@ -1914,13 +1914,13 @@ void segaxbd_smgp_fd1094_state::device_add_mconfig(machine_config &config) void segaxbd_new_state::sega_smgp_fd1094(machine_config &config) { - SEGA_XBD_SMGP_FD1094(config, "mainpcb", 0); + SEGA_XBD_SMGP_FD1094(config, "mainpcb"); } DEFINE_DEVICE_TYPE(SEGA_XBD_SMGP, segaxbd_smgp_state, "segaxbd_pcb_smgp", "Sega X-Board PCB (SMGP)") -segaxbd_smgp_state::segaxbd_smgp_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_smgp_state::segaxbd_smgp_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_SMGP, tag, owner, clock) { } @@ -1959,13 +1959,13 @@ void segaxbd_smgp_state::device_add_mconfig(machine_config &config) void segaxbd_new_state::sega_smgp(machine_config &config) { - SEGA_XBD_SMGP(config, "mainpcb", 0); + SEGA_XBD_SMGP(config, "mainpcb"); } DEFINE_DEVICE_TYPE(SEGA_XBD_RASCOT, segaxbd_rascot_state, "segaxbd_pcb_rascot", "Sega X-Board PCB (Royal Ascot)") -segaxbd_rascot_state::segaxbd_rascot_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +segaxbd_rascot_state::segaxbd_rascot_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segaxbd_state(mconfig, SEGA_XBD_RASCOT, tag, owner, clock) , m_commram(*this, "commram") , m_usart(*this, "usart") @@ -1986,17 +1986,17 @@ void segaxbd_rascot_state::device_add_mconfig(machine_config &config) config.device_remove("rspeaker"); m_cmptimer_1->zint_callback().set_nop(); - cpu_device &commcpu(Z80(config, "commcpu", 8'000'000)); // clock unknown + cpu_device &commcpu(Z80(config, "commcpu", XTAL::u(8'000'000))); // clock unknown commcpu.set_addrmap(AS_PROGRAM, &segaxbd_rascot_state::comm_map); MB8421(config, m_commram).intl_callback().set_inputline("commcpu", INPUT_LINE_IRQ0); - I8251(config, m_usart, 2'000'000); // clock unknown + I8251(config, m_usart, XTAL::u(2'000'000)); // clock unknown } void segaxbd_new_state::sega_rascot(machine_config &config) { - SEGA_XBD_RASCOT(config, "mainpcb", 0); + SEGA_XBD_RASCOT(config, "mainpcb"); } diff --git a/src/mame/sega/segaxbd.h b/src/mame/sega/segaxbd.h index 30ab96e9d9d..df32a862b05 100644 --- a/src/mame/sega/segaxbd.h +++ b/src/mame/sega/segaxbd.h @@ -33,7 +33,7 @@ class segaxbd_state : public device_t { public: // construction/destruction - segaxbd_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void xboard_base_mconfig(machine_config &config); @@ -81,7 +81,7 @@ protected: void sound_portmap(address_map &map); void sub_map(address_map &map); - segaxbd_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + segaxbd_state(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device overrides // virtual void machine_reset(); @@ -151,7 +151,7 @@ protected: class segaxbd_regular_state : public segaxbd_state { public: - segaxbd_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_regular_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -162,7 +162,7 @@ protected: class segaxbd_fd1094_state : public segaxbd_state { public: - segaxbd_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -171,7 +171,7 @@ protected: class segaxbd_aburner2_state : public segaxbd_state { public: - segaxbd_aburner2_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_aburner2_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -182,7 +182,7 @@ protected: class segaxbd_lastsurv_fd1094_state : public segaxbd_state { public: - segaxbd_lastsurv_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_lastsurv_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -191,7 +191,7 @@ protected: class segaxbd_lastsurv_state : public segaxbd_state { public: - segaxbd_lastsurv_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_lastsurv_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -201,7 +201,7 @@ protected: class segaxbd_smgp_fd1094_state : public segaxbd_state { public: - segaxbd_smgp_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_smgp_fd1094_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -211,7 +211,7 @@ protected: class segaxbd_smgp_state : public segaxbd_state { public: - segaxbd_smgp_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_smgp_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -221,7 +221,7 @@ protected: class segaxbd_rascot_state : public segaxbd_state { public: - segaxbd_rascot_state(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segaxbd_rascot_state(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/sega/segaybd.cpp b/src/mame/sega/segaybd.cpp index 28beb8cb1e6..829de9ea591 100644 --- a/src/mame/sega/segaybd.cpp +++ b/src/mame/sega/segaybd.cpp @@ -1435,18 +1435,18 @@ void segaybd_state::yboard(machine_config &config) io.out_ph_callback().set(FUNC(segaybd_state::output2_w)); // FMCS and CKOT connect to CS and OSC IN on MSM6253 below - msm6253_device &adc(MSM6253(config, "adc", 0)); + msm6253_device &adc(MSM6253(config, "adc")); adc.set_input_tag<0>("ADC.0"); adc.set_input_tag<1>("ADC.1"); adc.set_input_tag<2>("ADC.2"); adc.set_input_cb<3>(FUNC(segaybd_state::analog_mux)); - SEGA_315_5248_MULTIPLIER(config, "multiplier_main", 0); - SEGA_315_5248_MULTIPLIER(config, "multiplier_subx", 0); - SEGA_315_5248_MULTIPLIER(config, "multiplier_suby", 0); - SEGA_315_5249_DIVIDER(config, "divider_main", 0); - SEGA_315_5249_DIVIDER(config, "divider_subx", 0); - SEGA_315_5249_DIVIDER(config, "divider_suby", 0); + SEGA_315_5248_MULTIPLIER(config, "multiplier_main"); + SEGA_315_5248_MULTIPLIER(config, "multiplier_subx"); + SEGA_315_5248_MULTIPLIER(config, "multiplier_suby"); + SEGA_315_5249_DIVIDER(config, "divider_main"); + SEGA_315_5249_DIVIDER(config, "divider_subx"); + SEGA_315_5249_DIVIDER(config, "divider_suby"); // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -1458,8 +1458,8 @@ void segaybd_state::yboard(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfxdecode_device::empty); - SEGA_SYS16B_SPRITES(config, m_bsprites, 0); - SEGA_YBOARD_SPRITES(config, m_ysprites, 0); + SEGA_SYS16B_SPRITES(config, m_bsprites); + SEGA_YBOARD_SPRITES(config, m_ysprites); SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); PALETTE(config, m_palette).set_entries(8192*2); diff --git a/src/mame/sega/sg1000.cpp b/src/mame/sega/sg1000.cpp index a3004543a98..07600ce094c 100644 --- a/src/mame/sega/sg1000.cpp +++ b/src/mame/sega/sg1000.cpp @@ -636,7 +636,7 @@ void sf7000_state::sf7000(machine_config &config) ppi.out_pb_callback().set("cent_data_out", FUNC(output_latch_device::write)); ppi.out_pc_callback().set(FUNC(sf7000_state::ppi_pc_w)); - i8251_device &upd8251(I8251(config, UPD8251_TAG, 0)); + i8251_device &upd8251(I8251(config, UPD8251_TAG)); upd8251.txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); upd8251.dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); upd8251.rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); @@ -645,7 +645,7 @@ void sf7000_state::sf7000(machine_config &config) rs232.rxd_handler().set(UPD8251_TAG, FUNC(i8251_device::write_rxd)); rs232.dsr_handler().set(UPD8251_TAG, FUNC(i8251_device::write_dsr)); - UPD765A(config, m_fdc, 8'000'000, false, false); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, false); FLOPPY_CONNECTOR(config, UPD765_TAG ":0", sf7000_floppies, "3ssdd", sf7000_state::floppy_formats); CENTRONICS(config, m_centronics, centronics_devices, "printer"); diff --git a/src/mame/sega/shtzone.cpp b/src/mame/sega/shtzone.cpp index d7f496fac84..e3aceb47ac5 100644 --- a/src/mame/sega/shtzone.cpp +++ b/src/mame/sega/shtzone.cpp @@ -333,7 +333,7 @@ void shtzone_state::shtzone(machine_config &config) m_vdp->n_nmi().set_inputline(m_maincpu, INPUT_LINE_NMI); m_vdp->add_route(ALL_OUTPUTS, "mono", 1.00); - BEEP(config, m_buzzer, 1000).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_buzzer, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 0.50); for (int i = 1; i < 5; i++) SMS_CART_SLOT(config, m_slots[i], sms_cart, nullptr); diff --git a/src/mame/sega/sms.cpp b/src/mame/sega/sms.cpp index c471fffc943..3b2ff5f0362 100644 --- a/src/mame/sega/sms.cpp +++ b/src/mame/sega/sms.cpp @@ -252,15 +252,15 @@ DC00 - Selection buttons #2, 9-16 (R) #include "sms1.lh" -#define MASTER_CLOCK_GG 32215905.0 -#define MASTER_CLOCK_PALN 10746168.0 +#define MASTER_CLOCK_GG XTAL::u(32215905) +#define MASTER_CLOCK_PALN XTAL::u(10746168) // The clocks for PAL and PAL-M used here differ from their nominal values, // because with the latter errors will occur on Flubba's VDPTest, probably // due to rounding issues in the core. // Nominal XTAL value for SMS PAL-M (Brazil) is 10726834. -#define MASTER_CLOCK_PALM 10726833.0 +#define MASTER_CLOCK_PALM XTAL::u(10726833) // Nominal XTAL value for SMS PAL is 53203424. -#define MASTER_CLOCK_PAL 53203425.0 /* 12 * subcarrier freq. (4.43361875MHz) */ +#define MASTER_CLOCK_PAL XTAL::u(53203425) /* 12 * subcarrier freq. (4.43361875MHz) */ void sms1_state::sms1_mem(address_map &map) diff --git a/src/mame/sega/speedbsk.cpp b/src/mame/sega/speedbsk.cpp index b1afd88c2f5..ec4e9a2465b 100644 --- a/src/mame/sega/speedbsk.cpp +++ b/src/mame/sega/speedbsk.cpp @@ -384,23 +384,23 @@ void speedbsk_state::speedbsk(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &speedbsk_state::main_map); // placeholder - clock_device &irqclock(CLOCK(config, "irqclock", 60)); + clock_device &irqclock(CLOCK(config, "irqclock", XTAL::u(60))); irqclock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // MB8464A-10LL-SK + MB8730A + battery // placeholder, uarts will operate at 9600 baud - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set("d71051", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("d71051", FUNC(i8251_device::write_rxc)); uart_clock.signal_handler().append("tmp82c51", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("tmp82c51", FUNC(i8251_device::write_rxc)); - i8251_device &uart_main(I8251(config, "d71051", 0)); + i8251_device &uart_main(I8251(config, "d71051")); uart_main.txd_handler().set("tmp82c51", FUNC(i8251_device::write_rxd)); uart_main.rts_handler().set("tmp82c51", FUNC(i8251_device::write_cts)); - PIT8254(config, "d71054", 0); + PIT8254(config, "d71054"); I8255(config, m_ppi[0]); m_ppi[0]->out_pa_callback().set(FUNC(speedbsk_state::solenoid1_w)); @@ -452,7 +452,7 @@ void speedbsk_state::speedbsk(machine_config &config) PALETTE(config, "palette", FUNC(speedbsk_state::lcd_palette), 3); - HD44780(config, m_lcd, 0); + HD44780(config, m_lcd); m_lcd->set_lcd_size(2, 20); m_lcd->set_pixel_update_cb(FUNC(speedbsk_state::lcd_pixel_update)); @@ -465,12 +465,12 @@ void speedbsk_state::speedbsk(machine_config &config) audiocpu.set_addrmap(AS_PROGRAM, &speedbsk_state::audio_map); audiocpu.set_addrmap(AS_IO, &speedbsk_state::audio_io_map); - i8251_device &tmp82c51(I8251(config, "tmp82c51", 0)); + i8251_device &tmp82c51(I8251(config, "tmp82c51")); tmp82c51.rxrdy_handler().set_inputline("audiocpu", INPUT_LINE_IRQ0); tmp82c51.txd_handler().set("d71051", FUNC(i8251_device::write_rxd)); tmp82c51.rts_handler().set("d71051", FUNC(i8251_device::write_cts)); - msm6253_device &adc(MSM6253(config, "adc", 0)); + msm6253_device &adc(MSM6253(config, "adc")); adc.set_input_tag<0>("unk"); SPEAKER(config, "mono").front_center(); // TODO: verify if stereo diff --git a/src/mame/sega/stv.cpp b/src/mame/sega/stv.cpp index 1fd14112b1e..c3a65d24d06 100644 --- a/src/mame/sega/stv.cpp +++ b/src/mame/sega/stv.cpp @@ -1126,10 +1126,10 @@ void stv_state::stv(machine_config &config) m_slave->set_is_slave(1); TIMER(config, "slave_scantimer").configure_scanline(FUNC(stv_state::saturn_slave_scanline), "screen", 0, 1); - M68000(config, m_audiocpu, 11289600); //11.2896 MHz + M68000(config, m_audiocpu, XTAL::u(11289600)); //11.2896 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &stv_state::sound_mem); - SEGA_SCU(config, m_scu, 0); + SEGA_SCU(config, m_scu); m_scu->set_hostcpu(m_maincpu); SMPC_HLE(config, m_smpc_hle, XTAL(4'000'000)); @@ -1164,14 +1164,14 @@ void stv_state::stv(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - SCSP(config, m_scsp, 22579200); // TODO : Unknown clock, divider + SCSP(config, m_scsp, XTAL::u(22579200)); // TODO : Unknown clock, divider m_scsp->set_addrmap(0, &stv_state::scsp_mem); m_scsp->irq_cb().set(FUNC(saturn_state::scsp_irq)); m_scsp->main_irq_cb().set(m_scu, FUNC(sega_scu_device::sound_req_w)); m_scsp->add_route(0, "lspeaker", 1.0); m_scsp->add_route(1, "rspeaker", 1.0); - SEGA_BILLBOARD(config, m_billboard, 0); + SEGA_BILLBOARD(config, m_billboard); config.set_default_layout(layout_segabill); } @@ -1179,7 +1179,7 @@ void stv_state::stv(machine_config &config) void stv_state::stv_5881(machine_config &config) { stv(config); - SEGA315_5881_CRYPT(config, m_cryptdevice, 0); + SEGA315_5881_CRYPT(config, m_cryptdevice); m_cryptdevice->set_read_cb(FUNC(stv_state::crypt_read_callback)); } @@ -1214,7 +1214,7 @@ void stv_state::stvcd(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &stv_state::stvcd_mem); m_slave->set_addrmap(AS_PROGRAM, &stv_state::stvcd_mem); - stvcd_device &stvcd(STVCD(config, "stvcd", 0)); + stvcd_device &stvcd(STVCD(config, "stvcd")); stvcd.add_route(0, "scsp", 1.0, 0); stvcd.add_route(1, "scsp", 1.0, 1); } @@ -1229,7 +1229,7 @@ void stv_state::stv_5838(machine_config &config) { stv(config); - SEGA315_5838_COMP(config, m_5838crypt, 0); + SEGA315_5838_COMP(config, m_5838crypt); m_5838crypt->set_addrmap(0, &stv_state::sega5838_map); } @@ -1252,7 +1252,7 @@ void stv_state::batmanfr_sound_comms_w(offs_t offset, uint32_t data, uint32_t me void stv_state::batmanfr(machine_config &config) { stv(config); - ACCLAIM_RAX(config, "rax", 0); + ACCLAIM_RAX(config, "rax"); } void stv_state::shienryu(machine_config &config) diff --git a/src/mame/sega/stv.h b/src/mame/sega/stv.h index d06338cb62e..0ff115505e4 100644 --- a/src/mame/sega/stv.h +++ b/src/mame/sega/stv.h @@ -191,8 +191,8 @@ public: static constexpr feature_type unemulated_features() { return feature::CAMERA | feature::PRINTER; } }; -//#define MASTER_CLOCK_352 57272720 -//#define MASTER_CLOCK_320 53693174 +//#define MASTER_CLOCK_352 XTAL::u(57272720) +//#define MASTER_CLOCK_320 XTAL::u(53693174) #define CEF_1 m_vdp1_regs[0x010/2]|=0x0002 #define CEF_0 m_vdp1_regs[0x010/2]&=~0x0002 #define BEF_1 m_vdp1_regs[0x010/2]|=0x0001 diff --git a/src/mame/sega/suprloco.cpp b/src/mame/sega/suprloco.cpp index 403341d8b40..0bbd2413181 100644 --- a/src/mame/sega/suprloco.cpp +++ b/src/mame/sega/suprloco.cpp @@ -472,13 +472,13 @@ GFXDECODE_END void suprloco_state::suprloco(machine_config &config) { // basic machine hardware - sega_315_5015_device &maincpu(SEGA_315_5015(config, m_maincpu, 4'000'000)); // 4 MHz (?) + sega_315_5015_device &maincpu(SEGA_315_5015(config, m_maincpu, XTAL::u(4'000'000))); // 4 MHz (?) maincpu.set_addrmap(AS_PROGRAM, &suprloco_state::main_map); maincpu.set_addrmap(AS_OPCODES, &suprloco_state::decrypted_opcodes_map); maincpu.set_vblank_int("screen", FUNC(suprloco_state::irq0_line_hold)); maincpu.set_decrypted_tag(":decrypted_opcodes"); - Z80(config, m_audiocpu, 4'000'000); + Z80(config, m_audiocpu, XTAL::u(4'000'000)); m_audiocpu->set_addrmap(AS_PROGRAM, &suprloco_state::sound_map); m_audiocpu->set_periodic_int(FUNC(suprloco_state::irq0_line_hold), attotime::from_hz(4 * 60)); // NMIs are caused by the main CPU @@ -503,9 +503,9 @@ void suprloco_state::suprloco(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76496(config, "sn1", 4'000'000).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76496(config, "sn1", XTAL::u(4'000'000)).add_route(ALL_OUTPUTS, "mono", 1.0); - SN76496(config, "sn2", 2'000'000).add_route(ALL_OUTPUTS, "mono", 1.0); + SN76496(config, "sn2", XTAL::u(2'000'000)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/sega/system1.cpp b/src/mame/sega/system1.cpp index 68a8fadaad0..74366baeb95 100644 --- a/src/mame/sega/system1.cpp +++ b/src/mame/sega/system1.cpp @@ -2284,7 +2284,7 @@ void system1_state::sys1ppi(machine_config &config) Z80(config, m_soundcpu, SOUND_CLOCK/2); m_soundcpu->set_addrmap(AS_PROGRAM, &system1_state::sound_map); - TIMER(config, "soundirq", 0).configure_scanline(FUNC(system1_state::soundirq_gen), "screen", 32, 64); + TIMER(config, "soundirq").configure_scanline(FUNC(system1_state::soundirq_gen), "screen", 32, 64); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -2588,7 +2588,7 @@ void system1_state::mcu(machine_config &config) // This interrupt is driven by pin 15 of a PAL16R4 (315-5138 on Choplifter), based on the vertical count. // The actual duty cycle likely differs from VBLANK, which is another output from the same PAL. - TIMER(config, "mcu_t0", 0).configure_periodic(FUNC(system1_state::mcu_t0_callback), attotime::from_usec(2500)); + TIMER(config, "mcu_t0").configure_periodic(FUNC(system1_state::mcu_t0_callback), attotime::from_usec(2500)); } /* alternate program map with RAM/collision swapped */ diff --git a/src/mame/sega/system16.cpp b/src/mame/sega/system16.cpp index 63eb6826b76..e4c3563610b 100644 --- a/src/mame/sega/system16.cpp +++ b/src/mame/sega/system16.cpp @@ -2051,7 +2051,7 @@ GFXDECODE_END void segas1x_bootleg_state::z80_ym2151(machine_config &config) { - Z80(config, m_soundcpu, 4000000); + Z80(config, m_soundcpu, XTAL::u(4000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::sound_map); m_soundcpu->set_addrmap(AS_IO, &segas1x_bootleg_state::sound_io_map); @@ -2059,7 +2059,7 @@ void segas1x_bootleg_state::z80_ym2151(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, "ymsnd", 4000000).add_route(0, "lspeaker", 0.32).add_route(1, "rspeaker", 0.32); + YM2151(config, "ymsnd", XTAL::u(4000000)).add_route(0, "lspeaker", 0.32).add_route(1, "rspeaker", 0.32); } WRITE_LINE_MEMBER(segas1x_bootleg_state::sound_cause_nmi) @@ -2070,7 +2070,7 @@ WRITE_LINE_MEMBER(segas1x_bootleg_state::sound_cause_nmi) void segas1x_bootleg_state::z80_ym2151_upd7759(machine_config &config) { - Z80(config, m_soundcpu, 4000000); + Z80(config, m_soundcpu, XTAL::u(4000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::sound_7759_map); m_soundcpu->set_addrmap(AS_IO, &segas1x_bootleg_state::sound_7759_io_map); @@ -2078,7 +2078,7 @@ void segas1x_bootleg_state::z80_ym2151_upd7759(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, "ymsnd", 4000000).add_route(0, "lspeaker", 0.32).add_route(1, "rspeaker", 0.32); + YM2151(config, "ymsnd", XTAL::u(4000000)).add_route(0, "lspeaker", 0.32).add_route(1, "rspeaker", 0.32); UPD7759(config, m_upd7759); m_upd7759->md_w(0); @@ -2094,16 +2094,16 @@ void segas1x_bootleg_state::datsu_ym2151_msm5205(machine_config &config) - speaker is likely to be mono for the bootlegs, not stereo. - check msm5205 frequency. */ - Z80(config, m_soundcpu, 4000000); + Z80(config, m_soundcpu, XTAL::u(4000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::tturfbl_sound_map); m_soundcpu->set_addrmap(AS_IO, &segas1x_bootleg_state::tturfbl_sound_io_map); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, "ymsnd", 4000000).add_route(0, "lspeaker", 0.32).add_route(1, "rspeaker", 0.32); + YM2151(config, "ymsnd", XTAL::u(4000000)).add_route(0, "lspeaker", 0.32).add_route(1, "rspeaker", 0.32); - MSM5205(config, m_msm, 220000); + MSM5205(config, m_msm, XTAL::u(220000)); m_msm->vck_legacy_callback().set(FUNC(segas1x_bootleg_state::tturfbl_msm5205_callback)); m_msm->set_prescaler_selector(msm5205_device::S48_4B); m_msm->add_route(ALL_OUTPUTS, "lspeaker", 0.80); @@ -2112,29 +2112,29 @@ void segas1x_bootleg_state::datsu_ym2151_msm5205(machine_config &config) void segas1x_bootleg_state::datsu_2x_ym2203_msm5205(machine_config &config) { - Z80(config, m_soundcpu, 4000000); + Z80(config, m_soundcpu, XTAL::u(4000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::shinobi_datsu_sound_map); /* sound hardware */ SPEAKER(config, "mono").front_center(); // 2x YM2203C, one at U57, one at U56 - ym2203_device &ym1(YM2203(config, "ym1", 4000000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(4000000))); ym1.add_route(0, "mono", 0.50); ym1.add_route(1, "mono", 0.50); ym1.add_route(2, "mono", 0.50); ym1.add_route(3, "mono", 0.80); - ym2203_device &ym2(YM2203(config, "ym2", 4000000)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(4000000))); ym2.add_route(0, "mono", 0.50); ym2.add_route(1, "mono", 0.50); ym2.add_route(2, "mono", 0.50); ym2.add_route(3, "mono", 0.80); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("5205", FUNC(msm5205_device::data_w)); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(segas1x_bootleg_state::datsu_msm5205_callback)); m_msm->set_prescaler_selector(msm5205_device::S48_4B); m_msm->add_route(ALL_OUTPUTS, "mono", 0.80); @@ -2151,7 +2151,7 @@ void segas1x_bootleg_state::datsu_2x_ym2203_msm5205(machine_config &config) void segas1x_bootleg_state::system16_base(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_vblank_int("screen", FUNC(segas1x_bootleg_state::irq4_line_hold)); /* video hardware */ @@ -2248,7 +2248,7 @@ void segas1x_bootleg_state::wb3bble(machine_config &config) void segas1x_bootleg_state::goldnaxeb_base(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::goldnaxeb1_map); m_maincpu->set_addrmap(AS_OPCODES, &segas1x_bootleg_state::decrypted_opcodes_map); m_maincpu->set_vblank_int("screen", FUNC(segas1x_bootleg_state::irq4_line_hold)); @@ -2265,7 +2265,7 @@ void segas1x_bootleg_state::goldnaxeb_base(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_sys16); PALETTE(config, m_palette, palette_device::BLACK, 2048*SHADOW_COLORS_MULTIPLIER); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-121); MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system16) @@ -2326,7 +2326,7 @@ void segas1x_bootleg_state::tturfbl(machine_config &config) datsu_ym2151_msm5205(config); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-107); } @@ -2337,7 +2337,7 @@ void segas1x_bootleg_state::dduxbl(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::dduxbl_map); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-112); z80_ym2151(config); @@ -2350,7 +2350,7 @@ void segas1x_bootleg_state::eswatbl(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::eswatbl_map); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-124); z80_ym2151_upd7759(config); @@ -2363,7 +2363,7 @@ void segas1x_bootleg_state::eswatbl2(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::eswatbl2_map); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-121); datsu_2x_ym2203_msm5205(config); @@ -2376,7 +2376,7 @@ void segas1x_bootleg_state::tetrisbl(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::tetrisbl_map); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-112); z80_ym2151(config); @@ -2389,7 +2389,7 @@ void segas1x_bootleg_state::altbeastbl(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::tetrisbl_map); - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-112); datsu_2x_ym2203_msm5205(config); @@ -2412,10 +2412,10 @@ void segas1x_bootleg_state::beautyb(machine_config &config) void segas1x_bootleg_state::system18(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_vblank_int("screen", FUNC(segas1x_bootleg_state::irq4_line_hold)); - Z80(config, m_soundcpu, 8000000); + Z80(config, m_soundcpu, XTAL::u(8000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::sound_18_map); m_soundcpu->set_addrmap(AS_IO, &segas1x_bootleg_state::sound_18_io_map); @@ -2433,7 +2433,7 @@ void segas1x_bootleg_state::system18(machine_config &config) MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system18old) - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(64); /* sound hardware */ @@ -2442,15 +2442,15 @@ void segas1x_bootleg_state::system18(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym3438_device &ym3438_0(YM3438(config, "3438.0", 8000000)); + ym3438_device &ym3438_0(YM3438(config, "3438.0", XTAL::u(8000000))); ym3438_0.add_route(0, "lspeaker", 0.40); ym3438_0.add_route(1, "rspeaker", 0.40); - ym3438_device &ym3438_1(YM3438(config, "3438.1", 8000000)); + ym3438_device &ym3438_1(YM3438(config, "3438.1", XTAL::u(8000000))); ym3438_1.add_route(0, "lspeaker", 0.40); ym3438_1.add_route(1, "rspeaker", 0.40); - rf5c68_device &rf5c68(RF5C68(config, "5c68", 8000000)); + rf5c68_device &rf5c68(RF5C68(config, "5c68", XTAL::u(8000000))); rf5c68.add_route(ALL_OUTPUTS, "lspeaker", 1.0); rf5c68.add_route(ALL_OUTPUTS, "rspeaker", 1.0); rf5c68.set_addrmap(0, &segas1x_bootleg_state::pcm_map); @@ -2480,7 +2480,7 @@ void segas1x_bootleg_state::mwalkbl(machine_config &config) MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system18old) - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(64); GENERIC_LATCH_8(config, m_soundlatch); @@ -2506,7 +2506,7 @@ void segas1x_bootleg_state::shdancbl(machine_config &config) config.device_remove("5c68"); - MSM5205(config, m_msm, 200000); + MSM5205(config, m_msm, XTAL::u(200000)); m_msm->vck_legacy_callback().set(FUNC(segas1x_bootleg_state::shdancbl_msm5205_callback)); m_msm->set_prescaler_selector(msm5205_device::S48_4B); m_msm->add_route(ALL_OUTPUTS, "lspeaker", 0.80); @@ -2525,7 +2525,7 @@ void segas1x_bootleg_state::shdancbla(machine_config &config) config.device_remove("5c68"); - MSM5205(config, m_msm, 200000); + MSM5205(config, m_msm, XTAL::u(200000)); m_msm->vck_legacy_callback().set(FUNC(segas1x_bootleg_state::shdancbl_msm5205_callback)); m_msm->set_prescaler_selector(msm5205_device::S48_4B); m_msm->add_route(ALL_OUTPUTS, "lspeaker", 0.80); @@ -2548,7 +2548,7 @@ MACHINE_RESET_MEMBER(segas1x_bootleg_state,ddcrewbl) void segas1x_bootleg_state::ddcrewbl(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &segas1x_bootleg_state::ddcrewbl_map); m_maincpu->set_vblank_int("screen", FUNC(segas1x_bootleg_state::irq4_line_hold)); @@ -2566,7 +2566,7 @@ void segas1x_bootleg_state::ddcrewbl(machine_config &config) MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system18old) - SEGA_SYS16B_SPRITES(config, m_sprites, 0); + SEGA_SYS16B_SPRITES(config, m_sprites); m_sprites->set_local_originx(189-124); MCFG_MACHINE_RESET_OVERRIDE(segas1x_bootleg_state,ddcrewbl) diff --git a/src/mame/sega/timetrv.cpp b/src/mame/sega/timetrv.cpp index 5c0552bbae5..967cc710d83 100644 --- a/src/mame/sega/timetrv.cpp +++ b/src/mame/sega/timetrv.cpp @@ -316,11 +316,11 @@ void timetrv_state::timetrv(machine_config &config) ppi2.in_pb_callback().set_ioport("DSW2"); ppi2.in_pc_callback().set_ioport("DSW3"); - NS16450(config, m_uart, 768000); // P82050 (serial interface for Laserdisc player) + NS16450(config, m_uart, XTAL::u(768000)); // P82050 (serial interface for Laserdisc player) m_uart->out_tx_callback().set(m_laserdisc, FUNC(pioneer_ldv4200hle_device::rx_w)); /* video hardware */ - PIONEER_LDV4200HLE(config, m_laserdisc, 0); + PIONEER_LDV4200HLE(config, m_laserdisc); m_laserdisc->set_overlay(256, 256, FUNC(timetrv_state::screen_update)); m_laserdisc->add_route(0, "mono", 0.4); m_laserdisc->add_route(1, "mono", 0.4); @@ -328,7 +328,7 @@ void timetrv_state::timetrv(machine_config &config) m_laserdisc->serial_tx().set(m_uart, FUNC(ns16450_device::rx_w)); /* sound hardware */ - DAC_1BIT(config, m_audiodac, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + DAC_1BIT(config, m_audiodac).add_route(ALL_OUTPUTS, "mono", 0.25); SPEAKER(config, "mono").front_center(); } diff --git a/src/mame/sega/triforce.cpp b/src/mame/sega/triforce.cpp index f989ebae859..87470213b46 100644 --- a/src/mame/sega/triforce.cpp +++ b/src/mame/sega/triforce.cpp @@ -589,7 +589,7 @@ void triforce_state::machine_start() void triforce_state::triforce_base(machine_config &config) { /* basic machine hardware */ - PPC603(config, m_maincpu, 64000000); /* Correct CPU is a PowerPC 750 (what Apple called "G3") with paired-single vector instructions added */ + PPC603(config, m_maincpu, XTAL::u(64000000)); /* Correct CPU is a PowerPC 750 (what Apple called "G3") with paired-single vector instructions added */ m_maincpu->set_addrmap(AS_PROGRAM, &triforce_state::gc_map); config.set_maximum_quantum(attotime::from_hz(6000)); diff --git a/src/mame/sega/vicdual-97269pb.cpp b/src/mame/sega/vicdual-97269pb.cpp index c67b5edb18a..f3e74ba6a6f 100644 --- a/src/mame/sega/vicdual-97269pb.cpp +++ b/src/mame/sega/vicdual-97269pb.cpp @@ -91,7 +91,7 @@ const tiny_rom_entry *s97269pb_device::device_rom_region() const // s97269pb_device - constructor //------------------------------------------------- -s97269pb_device::s97269pb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s97269pb_device::s97269pb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S97269PB, tag, owner, clock), m_prom_ptr(*this, "s97269pb") { diff --git a/src/mame/sega/vicdual-97269pb.h b/src/mame/sega/vicdual-97269pb.h index 8054b869f06..e295182c8b7 100644 --- a/src/mame/sega/vicdual-97269pb.h +++ b/src/mame/sega/vicdual-97269pb.h @@ -13,7 +13,7 @@ class s97269pb_device : public device_t { public: // construction/destruction - s97269pb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s97269pb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // daughterboard logic void palette_bank_w(uint8_t data); diff --git a/src/mame/sega/vicdual-97271p.cpp b/src/mame/sega/vicdual-97271p.cpp index 66479232b80..e34c2f911e6 100644 --- a/src/mame/sega/vicdual-97271p.cpp +++ b/src/mame/sega/vicdual-97271p.cpp @@ -76,7 +76,7 @@ enum // s97271p_device - constructor //------------------------------------------------- -s97271p_device::s97271p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +s97271p_device::s97271p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S97271P, tag, owner, clock), m_samples(*this, "samples") { diff --git a/src/mame/sega/vicdual-97271p.h b/src/mame/sega/vicdual-97271p.h index adcf26888e6..3f4ab1835fa 100644 --- a/src/mame/sega/vicdual-97271p.h +++ b/src/mame/sega/vicdual-97271p.h @@ -15,7 +15,7 @@ class s97271p_device : public device_t { public: // construction/destruction - s97271p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s97271p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // daughterboard logic void port_w(uint8_t data); diff --git a/src/mame/sega/vicdual.cpp b/src/mame/sega/vicdual.cpp index 04a43e13099..180dc9cc518 100644 --- a/src/mame/sega/vicdual.cpp +++ b/src/mame/sega/vicdual.cpp @@ -324,7 +324,7 @@ void carnival_state::carnivalb_audio(machine_config &config) m_audiocpu->p1_out_cb().set(FUNC(carnival_state::carnivalb_music_port_1_w)); m_audiocpu->p2_out_cb().set(FUNC(carnival_state::carnivalb_music_port_2_w)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(XTAL(3'579'545)/3); m_pit->set_clk<1>(XTAL(3'579'545)/3); m_pit->set_clk<2>(XTAL(3'579'545)/3); @@ -1215,7 +1215,7 @@ void vicdual_state::frogs(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - FROGS_AUDIO(config, m_vicdual_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + FROGS_AUDIO(config, m_vicdual_sound).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -3062,7 +3062,7 @@ void tranqgun_state::tranqgun(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - BORDERLINE_AUDIO(config, m_vicdual_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + BORDERLINE_AUDIO(config, m_vicdual_sound).add_route(ALL_OUTPUTS, "mono", 1.0); } void tranqgun_state::brdrlinet(machine_config &config) @@ -3081,7 +3081,7 @@ void vicdual_state::brdrline(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - BORDERLINE_AUDIO(config, m_vicdual_sound, 0).add_route(ALL_OUTPUTS, "mono", 1.0); + BORDERLINE_AUDIO(config, m_vicdual_sound).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -3448,13 +3448,13 @@ void nsub_state::nsub(machine_config &config) m_screen->set_raw(VICDUAL_PIXEL_CLOCK, VICDUAL_HTOTAL, VICDUAL_HBEND, VICDUAL_HBSTART, VICDUAL_VTOTAL, VICDUAL_VBEND, VICDUAL_VBSTART); m_screen->set_screen_update(FUNC(nsub_state::screen_update_color)); - S97269PB(config, m_s97269pb, 0); + S97269PB(config, m_s97269pb); MCFG_MACHINE_START_OVERRIDE(nsub_state, nsub) MCFG_MACHINE_RESET_OVERRIDE(nsub_state, nsub) /* audio hardware */ - S97271P(config, m_s97271p, 0); + S97271P(config, m_s97271p); } diff --git a/src/mame/sega/vicdual_a.cpp b/src/mame/sega/vicdual_a.cpp index b53ba6f6aa6..49a370fd9f1 100644 --- a/src/mame/sega/vicdual_a.cpp +++ b/src/mame/sega/vicdual_a.cpp @@ -307,7 +307,7 @@ void vicdual_state::invho2_audio_w(uint8_t data) * *************************************/ -vicdual_audio_device_base::vicdual_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale) : +vicdual_audio_device_base::vicdual_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale) : device_t(mconfig, type, tag, owner, clock), device_mixer_interface(mconfig, *this), m_input_line(*this, "sound_nl:in_%u", 0), @@ -319,7 +319,7 @@ vicdual_audio_device_base::vicdual_audio_device_base(const machine_config &mconf void vicdual_audio_device_base::device_add_mconfig(machine_config &config) { - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(m_netlist) .add_route(ALL_OUTPUTS, *this, 1.0); @@ -368,7 +368,7 @@ void vicdual_audio_device_base::write(u8 value) DEFINE_DEVICE_TYPE(BORDERLINE_AUDIO, borderline_audio_device, "borderline_audio", "Borderline Sound Board") -borderline_audio_device::borderline_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +borderline_audio_device::borderline_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vicdual_audio_device_base(mconfig, BORDERLINE_AUDIO, tag, owner, clock, 0xff, NETLIST_NAME(brdrline), 1.0) { } @@ -383,7 +383,7 @@ borderline_audio_device::borderline_audio_device(const machine_config &mconfig, DEFINE_DEVICE_TYPE(FROGS_AUDIO, frogs_audio_device, "frogs_audio", "Frogs Sound Board") -frogs_audio_device::frogs_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +frogs_audio_device::frogs_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vicdual_audio_device_base(mconfig, FROGS_AUDIO, tag, owner, clock, 0xff, NETLIST_NAME(frogs), 1.0) { } diff --git a/src/mame/sega/vicdual_a.h b/src/mame/sega/vicdual_a.h index e0a918899e2..e838ea2762d 100644 --- a/src/mame/sega/vicdual_a.h +++ b/src/mame/sega/vicdual_a.h @@ -12,7 +12,7 @@ class vicdual_audio_device_base : public device_t, public device_mixer_interface { protected: - vicdual_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale); + vicdual_audio_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 inputs_mask, void (*netlist)(netlist::nlparse_t &), double output_scale); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -32,14 +32,14 @@ private: class borderline_audio_device : public vicdual_audio_device_base { public: - borderline_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + borderline_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class frogs_audio_device : public vicdual_audio_device_base { public: - frogs_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + frogs_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/mame/sega/y2.cpp b/src/mame/sega/y2.cpp index cc63702f0c1..69508c02d58 100644 --- a/src/mame/sega/y2.cpp +++ b/src/mame/sega/y2.cpp @@ -61,7 +61,7 @@ INPUT_PORTS_END void system_board_y2_state::system_board_y2(machine_config &config) { /* - SH4LE(config, m_maincpu, 266666666); + SH4LE(config, m_maincpu, XTAL::u(266666666)); m_maincpu->set_md(0, 1); m_maincpu->set_md(1, 0); m_maincpu->set_md(2, 1); diff --git a/src/mame/seibu/airraid.cpp b/src/mame/seibu/airraid.cpp index a8356d08677..894d984c671 100644 --- a/src/mame/seibu/airraid.cpp +++ b/src/mame/seibu/airraid.cpp @@ -435,7 +435,7 @@ void airraid_state::airraid(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x100); - AIRRAID_VIDEO(config, m_airraid_video, 0); + AIRRAID_VIDEO(config, m_airraid_video); // sound hardware SPEAKER(config, "mono").front_center(); @@ -445,13 +445,13 @@ void airraid_state::airraid(machine_config &config) ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->ym_read_callback().set("ymsnd", FUNC(ym2151_device::read)); m_seibu_sound->ym_write_callback().set("ymsnd", FUNC(ym2151_device::write)); - SEI80BU(config, "sei80bu", 0).set_device_rom_tag("audiocpu"); + SEI80BU(config, "sei80bu").set_device_rom_tag("audiocpu"); } void airraid_state::airraide(machine_config &config) diff --git a/src/mame/seibu/airraid_dev.cpp b/src/mame/seibu/airraid_dev.cpp index fa947915cea..f2fae55bf5e 100644 --- a/src/mame/seibu/airraid_dev.cpp +++ b/src/mame/seibu/airraid_dev.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(AIRRAID_VIDEO, airraid_video_device, "airraid_vid", "Seibu Air Raid Video") -airraid_video_device::airraid_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +airraid_video_device::airraid_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AIRRAID_VIDEO, tag, owner, clock), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "^palette"), diff --git a/src/mame/seibu/airraid_dev.h b/src/mame/seibu/airraid_dev.h index bf8b1ea52ce..e6662ea2686 100644 --- a/src/mame/seibu/airraid_dev.h +++ b/src/mame/seibu/airraid_dev.h @@ -18,7 +18,7 @@ class airraid_video_device : public device_t { public: // construction/destruction - airraid_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + airraid_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void txram_w(offs_t offset, uint8_t data); void vregs_w(offs_t offset, uint8_t data); diff --git a/src/mame/seibu/banprestoms.cpp b/src/mame/seibu/banprestoms.cpp index 79a581b72fa..d858417e48e 100644 --- a/src/mame/seibu/banprestoms.cpp +++ b/src/mame/seibu/banprestoms.cpp @@ -448,7 +448,7 @@ void banprestoms_state::banprestoms(machine_config &config) screen.set_screen_update(FUNC(banprestoms_state::screen_update)); screen.set_palette(m_palette); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(banprestoms_state::layer_en_w)); crtc.layer_scroll_callback().set(FUNC(banprestoms_state::layer_scroll_w)); @@ -458,7 +458,7 @@ void banprestoms_state::banprestoms(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH)); // TODO: check frequency and pin 7. + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH)); // TODO: check frequency and pin 7. oki.set_addrmap(0, &banprestoms_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 0.40); } diff --git a/src/mame/seibu/bloodbro.cpp b/src/mame/seibu/bloodbro.cpp index 9e64a0370b0..1b3c33c5783 100644 --- a/src/mame/seibu/bloodbro.cpp +++ b/src/mame/seibu/bloodbro.cpp @@ -542,7 +542,7 @@ void bloodbro_state::bloodbro(machine_config &config) m_screen->set_screen_update(FUNC(bloodbro_state::screen_update_bloodbro)); m_screen->set_palette(m_palette); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(bloodbro_state::layer_en_w)); crtc.layer_scroll_callback().set(FUNC(bloodbro_state::layer_scroll_w)); @@ -559,7 +559,7 @@ void bloodbro_state::bloodbro(machine_config &config) okim6295_device &oki(OKIM6295(config, "oki", XTAL(12'000'000)/12, okim6295_device::PIN7_HIGH)); oki.add_route(ALL_OUTPUTS, "mono", 1.0); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/cabal.cpp b/src/mame/seibu/cabal.cpp index ed0ee86034d..e7a65ac0977 100644 --- a/src/mame/seibu/cabal.cpp +++ b/src/mame/seibu/cabal.cpp @@ -619,7 +619,7 @@ void cabal_state::cabal(machine_config &config) m_audiocpu->set_addrmap(AS_OPCODES, &cabal_state::sound_decrypted_opcodes_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - SEI80BU(config, "sei80bu", 0).set_device_rom_tag("audiocpu"); + SEI80BU(config, "sei80bu").set_device_rom_tag("audiocpu"); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -634,7 +634,7 @@ void cabal_state::cabal(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 1024); /* sound hardware */ - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->ym_read_callback().set("ymsnd", FUNC(ym2151_device::read)); diff --git a/src/mame/seibu/darkmist.cpp b/src/mame/seibu/darkmist.cpp index 96a1f37a351..60d693d0691 100644 --- a/src/mame/seibu/darkmist.cpp +++ b/src/mame/seibu/darkmist.cpp @@ -242,12 +242,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(darkmist_state::scanline) void darkmist_state::darkmist(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &darkmist_state::memmap); m_maincpu->set_addrmap(AS_OPCODES, &darkmist_state::decrypted_opcodes_map); TIMER(config, "scantimer").configure_scanline(FUNC(darkmist_state::scanline), "screen", 0, 1); - T5182(config, m_t5182, 0); + T5182(config, m_t5182); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/seibu/dcon.cpp b/src/mame/seibu/dcon.cpp index 84dad3e00c8..a7c8202a5d2 100644 --- a/src/mame/seibu/dcon.cpp +++ b/src/mame/seibu/dcon.cpp @@ -278,11 +278,11 @@ void dcon_state::layer_scroll_w(offs_t offset, uint16_t data, uint16_t mem_mask) void dcon_state::dcon(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); + M68000(config, m_maincpu, XTAL::u(10000000)); m_maincpu->set_addrmap(AS_PROGRAM, &dcon_state::dcon_map); m_maincpu->set_vblank_int("screen", FUNC(dcon_state::irq4_line_hold)); - z80_device &audiocpu(Z80(config, "audiocpu", 4000000)); /* Perhaps 14318180/4? */ + z80_device &audiocpu(Z80(config, "audiocpu", XTAL::u(4000000))); /* Perhaps 14318180/4? */ audiocpu.set_addrmap(AS_PROGRAM, &dcon_state::seibu_sound_map); audiocpu.set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); @@ -295,7 +295,7 @@ void dcon_state::dcon(machine_config &config) screen.set_screen_update(FUNC(dcon_state::screen_update_dcon)); screen.set_palette(m_palette); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(dcon_state::layer_en_w)); crtc.layer_scroll_callback().set(FUNC(dcon_state::layer_scroll_w)); @@ -305,14 +305,14 @@ void dcon_state::dcon(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 4000000)); + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler)); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - okim6295_device &oki(OKIM6295(config, "oki", 1320000, okim6295_device::PIN7_LOW)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1320000), okim6295_device::PIN7_LOW)); oki.add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -340,7 +340,7 @@ void dcon_state::sdgndmps(machine_config &config) /* PCB number is PB91008 */ screen.set_screen_update(FUNC(dcon_state::screen_update_sdgndmps)); screen.set_palette(m_palette); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(dcon_state::layer_en_w)); crtc.layer_scroll_callback().set(FUNC(dcon_state::layer_scroll_w)); @@ -358,7 +358,7 @@ void dcon_state::sdgndmps(machine_config &config) /* PCB number is PB91008 */ okim6295_device &oki(OKIM6295(config, "oki", XTAL(20'000'000)/16, okim6295_device::PIN7_LOW)); /* 1.25Mhz? unverified clock & divisor (was 1320000) */ oki.add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/deadang.cpp b/src/mame/seibu/deadang.cpp index 899e178c20a..0112ba8d644 100644 --- a/src/mame/seibu/deadang.cpp +++ b/src/mame/seibu/deadang.cpp @@ -369,7 +369,7 @@ void deadang_state::deadang(machine_config &config) m_audiocpu->set_addrmap(AS_OPCODES, &deadang_state::sound_decrypted_opcodes_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - SEI80BU(config, "sei80bu", 0).set_device_rom_tag("audiocpu"); + SEI80BU(config, "sei80bu").set_device_rom_tag("audiocpu"); config.set_maximum_quantum(attotime::from_hz(60)); // the game stops working with higher interleave rates.. @@ -390,7 +390,7 @@ void deadang_state::deadang(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/dynduke.cpp b/src/mame/seibu/dynduke.cpp index 078ef5a5cfb..5bb34ef8c77 100644 --- a/src/mame/seibu/dynduke.cpp +++ b/src/mame/seibu/dynduke.cpp @@ -328,7 +328,7 @@ void dynduke_state::dynduke(machine_config &config) audiocpu.set_addrmap(AS_OPCODES, &dynduke_state::sound_decrypted_opcodes_map); audiocpu.set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - sei80bu_device &sei80bu(SEI80BU(config, "sei80bu", 0)); + sei80bu_device &sei80bu(SEI80BU(config, "sei80bu")); sei80bu.set_addrmap(AS_PROGRAM, &dynduke_state::sei80bu_encrypted_full_map); config.set_maximum_quantum(attotime::from_hz(3600)); @@ -356,10 +356,10 @@ void dynduke_state::dynduke(machine_config &config) ymsnd.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler)); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - okim6295_device &oki(OKIM6295(config, "oki", 1320000, okim6295_device::PIN7_LOW)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1320000), okim6295_device::PIN7_LOW)); oki.add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/goodejan.cpp b/src/mame/seibu/goodejan.cpp index 2c0c50421f3..63d6acca7b0 100644 --- a/src/mame/seibu/goodejan.cpp +++ b/src/mame/seibu/goodejan.cpp @@ -625,7 +625,7 @@ void goodejan_state::goodejan(machine_config &config) screen.set_palette(m_palette); screen.screen_vblank().set(FUNC(goodejan_state::vblank_irq)); - SEIBU_CRTC(config, m_crtc, 0); + SEIBU_CRTC(config, m_crtc); m_crtc->layer_en_callback().set(FUNC(goodejan_state::layer_en_w)); m_crtc->layer_scroll_callback().set(FUNC(goodejan_state::layer_scroll_w)); @@ -642,7 +642,7 @@ void goodejan_state::goodejan(machine_config &config) okim6295_device &oki(OKIM6295(config, "oki", GOODEJAN_MHZ2/16, okim6295_device::PIN7_HIGH)); oki.add_route(ALL_OUTPUTS, "mono", 0.40); - seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound", 0)); + seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound")); seibu_sound.int_callback().set_inputline("audiocpu", 0); seibu_sound.set_rom_tag("audiocpu"); seibu_sound.set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/legionna.cpp b/src/mame/seibu/legionna.cpp index c341d3fef46..93c1bc564f2 100644 --- a/src/mame/seibu/legionna.cpp +++ b/src/mame/seibu/legionna.cpp @@ -1187,7 +1187,7 @@ void legionna_state::legionna(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &legionna_state::seibu_sound_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(legionna_state::videowrite_cb_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1201,7 +1201,7 @@ void legionna_state::legionna(machine_config &config) screen.set_screen_update(FUNC(legionna_state::screen_update_legionna)); screen.set_palette(m_palette); - SEIBU_CRTC(config, m_crtc, 0); + SEIBU_CRTC(config, m_crtc); m_crtc->layer_en_callback().set(FUNC(legionna_state::tilemap_enable_w)); m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w)); m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w)); @@ -1221,7 +1221,7 @@ void legionna_state::legionna(machine_config &config) OKIM6295(config, m_oki, 20_MHz_XTAL / 20, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -1240,7 +1240,7 @@ void legionna_state::heatbrl(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &legionna_state::seibu_sound_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(legionna_state::videowrite_cb_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1254,7 +1254,7 @@ void legionna_state::heatbrl(machine_config &config) screen.set_screen_update(FUNC(legionna_state::screen_update_heatbrl)); screen.set_palette(m_palette); - SEIBU_CRTC(config, m_crtc, 0); + SEIBU_CRTC(config, m_crtc); m_crtc->layer_en_callback().set(FUNC(legionna_state::tilemap_enable_w)); m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w)); m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w)); @@ -1274,7 +1274,7 @@ void legionna_state::heatbrl(machine_config &config) OKIM6295(config, m_oki, 20_MHz_XTAL / 20, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -1294,7 +1294,7 @@ void legionna_state::godzilla(machine_config &config) m_audiocpu->set_addrmap(AS_IO, &legionna_state::godzilla_sound_io_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(legionna_state::videowrite_cb_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1309,7 +1309,7 @@ void legionna_state::godzilla(machine_config &config) screen.set_screen_update(FUNC(legionna_state::screen_update_godzilla)); screen.set_palette(m_palette); - SEIBU_CRTC(config, m_crtc, 0); + SEIBU_CRTC(config, m_crtc); m_crtc->layer_en_callback().set(FUNC(legionna_state::tilemap_enable_w)); m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w)); m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w)); @@ -1331,7 +1331,7 @@ void legionna_state::godzilla(machine_config &config) OKIM6295(config, m_oki, 20_MHz_XTAL / 20, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -1350,7 +1350,7 @@ void legionna_state::denjinmk(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &legionna_state::seibu_sound_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(legionna_state::videowrite_cb_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1364,7 +1364,7 @@ void legionna_state::denjinmk(machine_config &config) screen.set_screen_update(FUNC(legionna_state::screen_update_godzilla)); screen.set_palette(m_palette); - SEIBU_CRTC(config, m_crtc, 0); + SEIBU_CRTC(config, m_crtc); m_crtc->layer_en_callback().set(FUNC(legionna_state::tilemap_enable_w)); m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w)); m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w)); @@ -1385,7 +1385,7 @@ void legionna_state::denjinmk(machine_config &config) OKIM6295(config, m_oki, 20_MHz_XTAL / 20, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -1404,7 +1404,7 @@ void legionna_state::grainbow(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &legionna_state::seibu_sound_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(legionna_state::videowrite_cb_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1418,7 +1418,7 @@ void legionna_state::grainbow(machine_config &config) screen.set_screen_update(FUNC(legionna_state::screen_update_grainbow)); screen.set_palette(m_palette); - SEIBU_CRTC(config, m_crtc, 0); + SEIBU_CRTC(config, m_crtc); m_crtc->layer_en_callback().set(FUNC(legionna_state::tilemap_enable_w)); m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w)); m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w)); @@ -1439,7 +1439,7 @@ void legionna_state::grainbow(machine_config &config) OKIM6295(config, m_oki, 20_MHz_XTAL / 20, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -1458,7 +1458,7 @@ void legionna_state::cupsoc(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &legionna_state::seibu_sound_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(legionna_state::videowrite_cb_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1476,7 +1476,7 @@ void legionna_state::cupsoc(machine_config &config) screen.set_screen_update(FUNC(legionna_state::screen_update_grainbow)); screen.set_palette(m_palette); - SEIBU_CRTC(config, m_crtc, 0); + SEIBU_CRTC(config, m_crtc); m_crtc->layer_en_callback().set(FUNC(legionna_state::tilemap_enable_w)); m_crtc->layer_scroll_callback().set(FUNC(legionna_state::tile_scroll_w)); m_crtc->reg_1a_callback().set(FUNC(legionna_state::tile_vreg_1a_w)); @@ -1496,7 +1496,7 @@ void legionna_state::cupsoc(machine_config &config) OKIM6295(config, m_oki, 20_MHz_XTAL / 20, okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/metlfrzr.cpp b/src/mame/seibu/metlfrzr.cpp index 8ca2c880143..5cd9b98a92b 100644 --- a/src/mame/seibu/metlfrzr.cpp +++ b/src/mame/seibu/metlfrzr.cpp @@ -386,7 +386,7 @@ void metlfrzr_state::metlfrzr(machine_config &config) m_maincpu->set_addrmap(AS_OPCODES, &metlfrzr_state::decrypted_opcodes_map); TIMER(config, "scantimer").configure_scanline(FUNC(metlfrzr_state::scanline), "screen", 0, 1); - T5182(config, "t5182", 0); + T5182(config, "t5182"); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x200).set_indirect_entries(256 * 2); diff --git a/src/mame/seibu/mustache.cpp b/src/mame/seibu/mustache.cpp index 8c185b45167..9ba087b1f7f 100644 --- a/src/mame/seibu/mustache.cpp +++ b/src/mame/seibu/mustache.cpp @@ -168,9 +168,9 @@ void mustache_state::mustache(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mustache_state::memmap); m_maincpu->set_addrmap(AS_OPCODES, &mustache_state::decrypted_opcodes_map); - SEI80BU(config, "sei80bu", 0).set_device_rom_tag("maincpu"); + SEI80BU(config, "sei80bu").set_device_rom_tag("maincpu"); - T5182(config, "t5182", 0); + T5182(config, "t5182"); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/seibu/panicr.cpp b/src/mame/seibu/panicr.cpp index 3d81ea36044..156d3187558 100644 --- a/src/mame/seibu/panicr.cpp +++ b/src/mame/seibu/panicr.cpp @@ -609,7 +609,7 @@ void panicr_state::panicr(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &panicr_state::panicr_map); TIMER(config, "scantimer").configure_scanline(FUNC(panicr_state::scanline), "screen", 0, 1); - T5182(config, m_t5182, 0); + T5182(config, m_t5182); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); diff --git a/src/mame/seibu/r2dx_v33.cpp b/src/mame/seibu/r2dx_v33.cpp index 5f628bbdaff..d2b22dc360e 100644 --- a/src/mame/seibu/r2dx_v33.cpp +++ b/src/mame/seibu/r2dx_v33.cpp @@ -740,7 +740,7 @@ void r2dx_v33_state::rdx_v33(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, r2dx_v33_state::gfx_raiden2); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(r2dx_v33_state::tilemap_enable_w)); crtc.layer_scroll_callback().set(FUNC(r2dx_v33_state::tile_scroll_w)); @@ -778,7 +778,7 @@ void r2dx_v33_state::nzerotea(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, r2dx_v33_state::gfx_raiden2); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(r2dx_v33_state::tilemap_enable_w)); crtc.layer_scroll_callback().set(FUNC(r2dx_v33_state::tile_scroll_w)); @@ -794,7 +794,7 @@ void r2dx_v33_state::nzerotea(machine_config &config) okim6295_device &oki(OKIM6295(config, "oki", XTAL(28'636'363)/28, okim6295_device::PIN7_HIGH)); oki.add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/raiden.cpp b/src/mame/seibu/raiden.cpp index 1380b231c8b..26d8337cf23 100644 --- a/src/mame/seibu/raiden.cpp +++ b/src/mame/seibu/raiden.cpp @@ -385,7 +385,7 @@ void raiden_state::raiden(machine_config &config) okim6295_device &oki(OKIM6295(config, "oki", XTAL(12'000'000)/12, okim6295_device::PIN7_HIGH)); // frequency and pin 7 verified oki.add_route(ALL_OUTPUTS, "mono", 0.75); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -399,7 +399,7 @@ void raiden_state::raidene(machine_config &config) subdevice("audiocpu")->set_addrmap(AS_PROGRAM, &raiden_state::raiden_sound_map); subdevice("audiocpu")->set_addrmap(AS_OPCODES, &raiden_state::raiden_sound_decrypted_opcodes_map); - sei80bu_device &sei80bu(SEI80BU(config, "sei80bu", 0)); + sei80bu_device &sei80bu(SEI80BU(config, "sei80bu")); sei80bu.set_addrmap(AS_PROGRAM, &raiden_state::sei80bu_encrypted_full_map); } @@ -430,7 +430,7 @@ void raidenb_state::raidenb(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &raidenb_state::raidenb_main_map); // video hardware - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(raidenb_state::raidenb_layer_enable_w)); crtc.layer_scroll_callback().set(FUNC(raidenb_state::raidenb_layer_scroll_w)); diff --git a/src/mame/seibu/raiden2.cpp b/src/mame/seibu/raiden2.cpp index 5bde7a8a6e0..8ad73d95555 100644 --- a/src/mame/seibu/raiden2.cpp +++ b/src/mame/seibu/raiden2.cpp @@ -1056,13 +1056,13 @@ void raiden2_state::raiden2(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, raiden2_state::gfx_raiden2); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(raiden2_state::tilemap_enable_w)); crtc.layer_scroll_callback().set(FUNC(raiden2_state::tile_scroll_w)); BUFFERED_SPRITERAM16(config, m_spriteram); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(raiden2_state::m_videoram_private_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1081,7 +1081,7 @@ void raiden2_state::raiden2(machine_config &config) okim6295_device &oki2(OKIM6295(config, "oki2", XTAL(28'636'363)/28, okim6295_device::PIN7_HIGH)); oki2.add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -1120,13 +1120,13 @@ void raiden2_state::zeroteam(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, raiden2_state::gfx_raiden2); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(raiden2_state::tilemap_enable_w)); crtc.layer_scroll_callback().set(FUNC(raiden2_state::tile_scroll_w)); BUFFERED_SPRITERAM16(config, m_spriteram); - RAIDEN2COP(config, m_raiden2cop, 0); + RAIDEN2COP(config, m_raiden2cop); m_raiden2cop->videoramout_cb().set(FUNC(raiden2_state::m_videoram_private_w)); m_raiden2cop->paletteramout_cb().set(m_palette, FUNC(palette_device::write16)); m_raiden2cop->set_host_cpu_tag(m_maincpu); @@ -1141,7 +1141,7 @@ void raiden2_state::zeroteam(machine_config &config) okim6295_device &oki(OKIM6295(config, "oki", XTAL(28'636'363)/28, okim6295_device::PIN7_HIGH)); oki.add_route(ALL_OUTPUTS, "mono", 0.40); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline("audiocpu", 0); m_seibu_sound->set_rom_tag("audiocpu"); m_seibu_sound->set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/seibu_crtc.cpp b/src/mame/seibu/seibu_crtc.cpp index 4c882f63185..24098fb634c 100644 --- a/src/mame/seibu/seibu_crtc.cpp +++ b/src/mame/seibu/seibu_crtc.cpp @@ -288,7 +288,7 @@ void seibu_crtc_device::layer_scroll_base_w(offs_t offset, uint16_t data, uint16 // seibu_crtc_device - constructor //------------------------------------------------- -seibu_crtc_device::seibu_crtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +seibu_crtc_device::seibu_crtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEIBU_CRTC, tag, owner, clock), device_memory_interface(mconfig, *this), device_video_interface(mconfig, *this), diff --git a/src/mame/seibu/seibu_crtc.h b/src/mame/seibu/seibu_crtc.h index b3ded496959..6aacef36ef3 100644 --- a/src/mame/seibu/seibu_crtc.h +++ b/src/mame/seibu/seibu_crtc.h @@ -24,7 +24,7 @@ class seibu_crtc_device : public device_t, { public: // construction/destruction - seibu_crtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + seibu_crtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto decrypt_key_callback() { return m_decrypt_key_cb.bind(); } auto layer_en_callback() { return m_layer_en_cb.bind(); } diff --git a/src/mame/seibu/seibucats.cpp b/src/mame/seibu/seibucats.cpp index 2c3626f50be..ff673759076 100644 --- a/src/mame/seibu/seibucats.cpp +++ b/src/mame/seibu/seibucats.cpp @@ -320,8 +320,8 @@ void seibucats_state::seibucats(machine_config &config) //JRC6355E(config, m_rtc, XTAL(32'768)); - I8251(config, "usart1", 0); - I8251(config, "usart2", 0); + I8251(config, "usart1"); + I8251(config, "usart2"); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/seibu/seibucop.cpp b/src/mame/seibu/seibucop.cpp index 26fb9af4b49..adddbeb6478 100644 --- a/src/mame/seibu/seibucop.cpp +++ b/src/mame/seibu/seibucop.cpp @@ -126,7 +126,7 @@ DEFINE_DEVICE_TYPE(RAIDEN2COP, raiden2cop_device, "raiden2cop", "Seibu COP (Raiden 2)") -raiden2cop_device::raiden2cop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +raiden2cop_device::raiden2cop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RAIDEN2COP, tag, owner, clock), cop_latch_addr(0), cop_latch_trigger(0), diff --git a/src/mame/seibu/seibucop.h b/src/mame/seibu/seibucop.h index 302bb8804e5..8901d751b3c 100644 --- a/src/mame/seibu/seibucop.h +++ b/src/mame/seibu/seibucop.h @@ -16,7 +16,7 @@ class raiden2cop_device : public device_t { public: - raiden2cop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + raiden2cop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Command Table uint16_t cop_func_trigger[0x100/8]; /* function trigger */ diff --git a/src/mame/seibu/seibuspi.cpp b/src/mame/seibu/seibuspi.cpp index 44a4c0caf9a..a9e795db62b 100644 --- a/src/mame/seibu/seibuspi.cpp +++ b/src/mame/seibu/seibuspi.cpp @@ -1819,7 +1819,7 @@ void seibuspi_state::spi(machine_config &config) PALETTE(config, m_palette, palette_device::BLACK, 6144); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.decrypt_key_callback().set(FUNC(seibuspi_state::tile_decrypt_key_w)); crtc.layer_en_callback().set(FUNC(seibuspi_state::spi_layer_enable_w)); crtc.reg_1a_callback().set(FUNC(seibuspi_state::spi_layer_bank_w)); @@ -1941,7 +1941,7 @@ void seibuspi_state::sys386i(machine_config &config) PALETTE(config, m_palette, palette_device::BLACK, 6144); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.decrypt_key_callback().set(FUNC(seibuspi_state::tile_decrypt_key_w)); crtc.layer_en_callback().set(FUNC(seibuspi_state::spi_layer_enable_w)); crtc.reg_1a_callback().set(FUNC(seibuspi_state::spi_layer_bank_w)); diff --git a/src/mame/seibu/seicopbl.cpp b/src/mame/seibu/seicopbl.cpp index b4e898bc505..444be6235a0 100644 --- a/src/mame/seibu/seicopbl.cpp +++ b/src/mame/seibu/seicopbl.cpp @@ -403,7 +403,7 @@ void seibu_cop_bootleg_device::seibucopbl_map(address_map &map) map(0x1b4, 0x1b5).r(FUNC(seibu_cop_bootleg_device::angle_r)); } -seibu_cop_bootleg_device::seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +seibu_cop_bootleg_device::seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEIBU_COP_BOOTLEG, tag, owner, clock), device_memory_interface(mconfig, *this), m_host_cpu(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/seibu/seicopbl.h b/src/mame/seibu/seicopbl.h index 07aff2ec18c..10fe1ff52f4 100644 --- a/src/mame/seibu/seicopbl.h +++ b/src/mame/seibu/seicopbl.h @@ -12,12 +12,12 @@ class seibu_cop_bootleg_device : public device_t, public device_memory_interface public: template seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : seibu_cop_bootleg_device(mconfig, tag, owner, (uint32_t)0) + : seibu_cop_bootleg_device(mconfig, tag, owner) { m_host_cpu.set_tag(std::forward(cpu_tag)); } - seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); void write(offs_t offset, uint16_t data); diff --git a/src/mame/seibu/seicupbl.cpp b/src/mame/seibu/seicupbl.cpp index 185cf4d488b..b8a2bb88cb2 100644 --- a/src/mame/seibu/seicupbl.cpp +++ b/src/mame/seibu/seicupbl.cpp @@ -575,7 +575,7 @@ void seicupbl_state::cupsocbl(machine_config &config) screen.set_screen_update(FUNC(seicupbl_state::screen_update)); screen.set_palette(m_palette); - //seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + //seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); //crtc.layer_en_callback().set(FUNC(seicupbl_state::tilemap_enable_w)); //crtc.layer_scroll_callback().set(FUNC(seicupbl_state::tile_scroll_w)); //crtc.reg_1a_callback().set(FUNC(seicupbl_state::tile_vreg_1a_w)); diff --git a/src/mame/seibu/sengokmj.cpp b/src/mame/seibu/sengokmj.cpp index 6f8ba6a4721..7809364a299 100644 --- a/src/mame/seibu/sengokmj.cpp +++ b/src/mame/seibu/sengokmj.cpp @@ -605,7 +605,7 @@ void sengokmj_state::sengokmj(machine_config &config) screen.set_palette(m_palette); screen.screen_vblank().set(FUNC(sengokmj_state::vblank_irq)); - seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0)); + seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc")); crtc.layer_en_callback().set(FUNC(sengokmj_state::layer_en_w)); crtc.layer_scroll_callback().set(FUNC(sengokmj_state::layer_scroll_w)); @@ -619,10 +619,10 @@ void sengokmj_state::sengokmj(machine_config &config) ymsnd.irq_handler().set("seibu_sound", FUNC(seibu_sound_device::fm_irqhandler)); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - okim6295_device &oki(OKIM6295(config, "oki", 1320000, okim6295_device::PIN7_LOW)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1320000), okim6295_device::PIN7_LOW)); oki.add_route(ALL_OUTPUTS, "mono", 0.40); - seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound", 0)); + seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound")); seibu_sound.int_callback().set_inputline("audiocpu", 0); seibu_sound.set_rom_tag("audiocpu"); seibu_sound.set_rombank_tag("seibu_bank1"); diff --git a/src/mame/seibu/stfight.cpp b/src/mame/seibu/stfight.cpp index b50d9fb96ca..dbd39a22dd6 100644 --- a/src/mame/seibu/stfight.cpp +++ b/src/mame/seibu/stfight.cpp @@ -506,7 +506,7 @@ void stfight_state::stfight(machine_config &config) m_maincpu->set_addrmap(AS_OPCODES, &stfight_state::decrypted_opcodes_map); m_maincpu->set_vblank_int("stfight_vid:screen", FUNC(stfight_state::stfight_vb_interrupt)); - STFIGHT_VIDEO(config, "stfight_vid", 0); + STFIGHT_VIDEO(config, "stfight_vid"); } void stfight_state::cshooter(machine_config &config) @@ -515,7 +515,7 @@ void stfight_state::cshooter(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &stfight_state::cshooter_cpu1_map); m_maincpu->set_vblank_int("airraid_vid:screen", FUNC(stfight_state::stfight_vb_interrupt)); - AIRRAID_VIDEO(config, "airraid_vid", 0); + AIRRAID_VIDEO(config, "airraid_vid"); } diff --git a/src/mame/seibu/stfight_dev.cpp b/src/mame/seibu/stfight_dev.cpp index 6757fd77d9b..394b3eaed42 100644 --- a/src/mame/seibu/stfight_dev.cpp +++ b/src/mame/seibu/stfight_dev.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(STFIGHT_VIDEO, stfight_video_device, "stfight_vid", "Seibu Street Fight Video") -stfight_video_device::stfight_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +stfight_video_device::stfight_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, STFIGHT_VIDEO, tag, owner, clock), m_gfxdecode(*this, "gfxdecode"), m_palette(*this,"^palette"), diff --git a/src/mame/seibu/stfight_dev.h b/src/mame/seibu/stfight_dev.h index 440a2ebd5e4..53de56c2fbc 100644 --- a/src/mame/seibu/stfight_dev.h +++ b/src/mame/seibu/stfight_dev.h @@ -17,7 +17,7 @@ class stfight_video_device : public device_t { public: // construction/destruction - stfight_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + stfight_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void stfight_text_char_w(offs_t offset, uint8_t data); diff --git a/src/mame/seibu/t5182.cpp b/src/mame/seibu/t5182.cpp index 4debad2a609..325afaa6bce 100644 --- a/src/mame/seibu/t5182.cpp +++ b/src/mame/seibu/t5182.cpp @@ -153,7 +153,7 @@ rom. DEFINE_DEVICE_TYPE(T5182, t5182_device, "t5182", "T5182 MCU") -t5182_device::t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +t5182_device::t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, T5182, tag, owner, clock), m_ourcpu(*this, "t5182_z80"), m_sharedram(*this, "sharedram"), diff --git a/src/mame/seibu/t5182.h b/src/mame/seibu/t5182.h index f5f2e1c941c..d15100bbe79 100644 --- a/src/mame/seibu/t5182.h +++ b/src/mame/seibu/t5182.h @@ -12,7 +12,7 @@ class t5182_device : public device_t { public: - t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + t5182_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { diff --git a/src/mame/seibu/toki.cpp b/src/mame/seibu/toki.cpp index f4514713fb7..2c37127fb29 100644 --- a/src/mame/seibu/toki.cpp +++ b/src/mame/seibu/toki.cpp @@ -505,7 +505,7 @@ void toki_state::toki(machine_config &config) m_audiocpu->set_addrmap(AS_OPCODES, &toki_state::toki_audio_opcodes_map); m_audiocpu->set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb)); - SEI80BU(config, "sei80bu", 0).set_device_rom_tag("audiocpu"); + SEI80BU(config, "sei80bu").set_device_rom_tag("audiocpu"); /* video hardware */ BUFFERED_SPRITERAM16(config, m_spriteram); @@ -529,7 +529,7 @@ void toki_state::toki(machine_config &config) okim6295_device &oki(OKIM6295(config, "oki", XTAL(12'000'000)/12, okim6295_device::PIN7_HIGH)); // verified on pcb oki.add_route(ALL_OUTPUTS, "mono", 1.0); - SEIBU_SOUND(config, m_seibu_sound, 0); + SEIBU_SOUND(config, m_seibu_sound); m_seibu_sound->int_callback().set_inputline(m_audiocpu, 0); m_seibu_sound->set_rom_tag(m_audiocpu_rom); m_seibu_sound->set_rombank_tag("seibu_bank1"); @@ -549,11 +549,11 @@ void toki_state::jujuba(machine_config &config) void toki_state::tokib(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); /* 10MHz causes bad slowdowns with monkey machine rd1, but is correct, 20Mhz XTAL */ + M68000(config, m_maincpu, XTAL::u(10000000)); /* 10MHz causes bad slowdowns with monkey machine rd1, but is correct, 20Mhz XTAL */ m_maincpu->set_addrmap(AS_PROGRAM, &toki_state::tokib_map); m_maincpu->set_vblank_int("screen", FUNC(toki_state::irq6_line_hold)); /* VBL (could be level1, same vector) */ - Z80(config, m_audiocpu, 4000000); /* verified with PCB */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* verified with PCB */ m_audiocpu->set_addrmap(AS_PROGRAM, &toki_state::tokib_audio_map); WATCHDOG_TIMER(config, "watchdog"); @@ -578,10 +578,10 @@ void toki_state::tokib(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 3579545)); + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(3579545))); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(toki_state::tokib_adpcm_int)); /* interrupt function */ m_msm->set_prescaler_selector(msm5205_device::S96_4B); /* 4KHz */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.60); diff --git a/src/mame/sequential/prophet600.cpp b/src/mame/sequential/prophet600.cpp index fc72c7ffd65..59b8284d141 100644 --- a/src/mame/sequential/prophet600.cpp +++ b/src/mame/sequential/prophet600.cpp @@ -286,7 +286,7 @@ void prophet600_state::prophet600(machine_config &config) pit8253.out_handler<0>().set(FUNC(prophet600_state::pit_ch0_tick_w)); pit8253.out_handler<2>().set(FUNC(prophet600_state::pit_ch2_tick_w)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("mdout", FUNC(midi_port_device::write_txd)); m_acia->irq_handler().set(FUNC(prophet600_state::acia_irq_w)); diff --git a/src/mame/seta/albazc.cpp b/src/mame/seta/albazc.cpp index e97e0911e4a..d677d4d348b 100644 --- a/src/mame/seta/albazc.cpp +++ b/src/mame/seta/albazc.cpp @@ -223,7 +223,7 @@ GFXDECODE_END void albazc_state::hanaroku(machine_config &config) { - Z80(config, m_maincpu, 6000000); // ? MHz + Z80(config, m_maincpu, XTAL::u(6000000)); // ? MHz m_maincpu->set_addrmap(AS_PROGRAM, &albazc_state::prg_map); m_maincpu->set_vblank_int("screen", FUNC(albazc_state::irq0_line_hold)); @@ -249,7 +249,7 @@ void albazc_state::hanaroku(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", 1500000)); // ? MHz + ym2149_device &aysnd(YM2149(config, "aysnd", XTAL::u(1500000))); // ? MHz aysnd.port_a_read_callback().set_ioport("DSW1"); aysnd.port_b_read_callback().set_ioport("DSW2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/seta/jclub2.cpp b/src/mame/seta/jclub2.cpp index dc9c66ad3d4..112e70fc79a 100644 --- a/src/mame/seta/jclub2.cpp +++ b/src/mame/seta/jclub2.cpp @@ -1144,11 +1144,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(common_state::scanline_irq) // Older hardware (ST-0020 + ST-0016) void jclub2o_state::jclub2o(machine_config &config) { - M68EC020(config, m_maincpu, 12000000); + M68EC020(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &jclub2o_state::jclub2o_map); TIMER(config, "scantimer").configure_scanline(FUNC(common_state::scanline_irq), "screen", 0, 1); - ST0016_CPU(config, m_soundcpu, 8000000); + ST0016_CPU(config, m_soundcpu, XTAL::u(8000000)); m_soundcpu->set_addrmap(AS_PROGRAM, &jclub2o_state::st0016_mem); m_soundcpu->set_addrmap(AS_IO, &jclub2o_state::st0016_io); m_soundcpu->set_vblank_int("screen", FUNC(jclub2o_state::irq0_line_hold)); @@ -1171,7 +1171,7 @@ void jclub2o_state::jclub2o(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x10000); - ST0020_SPRITES(config, m_st0020, 0); + ST0020_SPRITES(config, m_st0020); m_st0020->set_is_jclub2(1); m_st0020->set_palette(m_palette); @@ -1190,7 +1190,7 @@ void jclub2o_state::jclub2o(machine_config &config) // Newer hardware (ST-0032) void jclub2_state::jclub2(machine_config &config) { - M68EC020(config, m_maincpu, 12000000); + M68EC020(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &jclub2_state::jclub2_map); TIMER(config, "scantimer").configure_scanline(FUNC(common_state::scanline_irq), "screen", 0, 1); @@ -1213,7 +1213,7 @@ void jclub2_state::jclub2(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x10000); // NOT an ST0020 but instead ST0032, ram format isn't compatible at least - ST0020_SPRITES(config, m_st0020, 0); + ST0020_SPRITES(config, m_st0020); m_st0020->set_is_st0032(1); m_st0020->set_is_jclub2(1); // offsets m_st0020->set_palette(m_palette); @@ -1234,7 +1234,7 @@ void jclub2_state::jclub2(machine_config &config) void darkhors_state::darkhors(machine_config &config) { - M68EC020(config, m_maincpu, 12000000); // 36MHz/3 ?? + M68EC020(config, m_maincpu, XTAL::u(12000000)); // 36MHz/3 ?? m_maincpu->set_addrmap(AS_PROGRAM, &darkhors_state::darkhors_map); TIMER(config, "scantimer").configure_scanline(FUNC(common_state::scanline_irq), "screen", 0, 1); @@ -1264,7 +1264,7 @@ void darkhors_state::darkhors(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 528000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(528000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } diff --git a/src/mame/seta/macs.cpp b/src/mame/seta/macs.cpp index e775c294d18..1371292c486 100644 --- a/src/mame/seta/macs.cpp +++ b/src/mame/seta/macs.cpp @@ -506,7 +506,7 @@ uint8_t macs_state::dma_offset() void macs_state::macs(machine_config &config) { /* basic machine hardware */ - ST0016_CPU(config, m_maincpu, 8000000); // 8 MHz ? + ST0016_CPU(config, m_maincpu, XTAL::u(8000000)); // 8 MHz ? m_maincpu->set_memory_map(&macs_state::macs_mem); m_maincpu->set_io_map(&macs_state::macs_io); m_maincpu->set_dma_offs_callback(FUNC(macs_state::dma_offset)); diff --git a/src/mame/seta/seta.cpp b/src/mame/seta/seta.cpp index 2d99b3f0d0c..7795c5bc43d 100644 --- a/src/mame/seta/seta.cpp +++ b/src/mame/seta/seta.cpp @@ -8083,7 +8083,7 @@ void usclssic_state::usclssic(machine_config &config) m_upd4701->set_portx_tag("TRACKX"); m_upd4701->set_porty_tag("TRACKY"); - HC157(config, m_buttonmux, 0); + HC157(config, m_buttonmux); m_buttonmux->out_callback().set(m_upd4701, FUNC(upd4701_device::middle_w)).bit(0); m_buttonmux->out_callback().append(m_upd4701, FUNC(upd4701_device::right_w)).bit(1); m_buttonmux->out_callback().append(m_upd4701, FUNC(upd4701_device::left_w)).bit(2); @@ -8198,15 +8198,15 @@ void downtown_state::calibr50(machine_config &config) void downtown_state::metafox(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000/2); /* 8 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)/2); /* 8 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &downtown_state::downtown_map); m_maincpu->set_vblank_int("screen", FUNC(downtown_state::irq3_line_assert)); - M65C02(config, m_subcpu, 16000000/8); /* 2 MHz */ + M65C02(config, m_subcpu, XTAL::u(16000000)/8); /* 2 MHz */ m_subcpu->set_addrmap(AS_PROGRAM, &downtown_state::metafox_sub_map); TIMER(config, "s_scantimer").configure_scanline(FUNC(downtown_state::seta_sub_interrupt), "screen", 0, 1); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(downtown_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // sprites unknown, tilemap correct (test grid) @@ -8234,7 +8234,7 @@ void downtown_state::metafox(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch[0]); GENERIC_LATCH_8(config, m_soundlatch[1]); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -8254,11 +8254,11 @@ void downtown_state::arbalest(machine_config &config) void seta_state::atehate(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::atehate_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // correct (test grid) @@ -8279,7 +8279,7 @@ void seta_state::atehate(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -8334,11 +8334,11 @@ void seta_state::blandia(machine_config &config) void seta_state::blandiap(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::blandiap_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_2_and_4), "screen", 0, 1); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(8, 0); // correct (test grid, startup bg) @@ -8363,7 +8363,7 @@ void seta_state::blandiap(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); m_x1snd->set_addrmap(0, &seta_state::blandia_x1_map); } @@ -8430,14 +8430,14 @@ void seta_state::blockcarb(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::blockcarb_map); m_maincpu->set_vblank_int("screen", FUNC(seta_state::irq3_line_hold)); - Z80(config, m_audiocpu, 4000000); // unk freq + Z80(config, m_audiocpu, XTAL::u(4000000)); // unk freq m_audiocpu->set_addrmap(AS_PROGRAM, &seta_state::blockcarb_sound_map); m_audiocpu->set_addrmap(AS_IO, &seta_state::blockcarb_sound_portmap); /* the sound hardware / program is ripped from Tetris (S16B) */ config.device_remove("x1snd"); - OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified .add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -8557,7 +8557,7 @@ void seta_state::qzkklgy2(machine_config &config) { drgnunit(config); /* basic machine hardware */ - m_maincpu->set_clock(16000000); /* 16 MHz */ + m_maincpu->set_clock(XTAL::u(16000000)); /* 16 MHz */ m_spritegen->set_fg_xoffsets(0, 0); // sprites unknown, tilemaps correct (test grid) m_layers[0]->set_xoffsets(-3, -1); @@ -8601,8 +8601,8 @@ void setaroul_state::setaroul(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_RANDOM); /* devices */ - UPD4992(config, m_rtc, 32'768); // ! Actually D4911C ! - ACIA6850(config, "acia0", 0); + UPD4992(config, m_rtc, XTAL::u(32'768)); // ! Actually D4911C ! + ACIA6850(config, "acia0"); TICKET_DISPENSER(config, "hopper", attotime::from_msec(150), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); /* video hardware */ @@ -8638,12 +8638,12 @@ void setaroul_state::setaroul(machine_config &config) void seta_state::eightfrc(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::wrofaero_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(4, 3); // correct (test mode) @@ -8666,7 +8666,7 @@ void seta_state::eightfrc(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); m_x1snd->set_addrmap(0, &seta_state::blandia_x1_map); } @@ -8686,12 +8686,12 @@ void seta_state::extdwnhl(machine_config &config) // TODO: verify clocks (16 MHz and 14.318 MHz XTALs are both on board) /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::extdwnhl_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // correct (test grid, background images) @@ -8715,7 +8715,7 @@ void seta_state::extdwnhl(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(0, "lspeaker", 1.0); m_x1snd->add_route(1, "rspeaker", 1.0); } @@ -8828,12 +8828,12 @@ void zombraid_state::zombraid(machine_config &config) void seta_state::jjsquawk(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::wrofaero_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); WATCHDOG_TIMER(config, "watchdog"); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(1, 1); // correct (test mode) @@ -8856,18 +8856,18 @@ void seta_state::jjsquawk(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } void seta_state::jjsquawb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::jjsquawb_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(1, 1); // correct (test mode) @@ -8890,7 +8890,7 @@ void seta_state::jjsquawb(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -8903,17 +8903,17 @@ void seta_state::jjsquawb(machine_config &config) void seta_state::kamenrid(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::kamenrid_map); m_maincpu->set_vblank_int("screen", FUNC(seta_state::irq2_line_assert)); WATCHDOG_TIMER(config, "watchdog"); - pit8254_device &pit(PIT8254(config, "pit", 0)); // uPD71054C - pit.set_clk<0>(16000000/2/8); + pit8254_device &pit(PIT8254(config, "pit")); // uPD71054C + pit.set_clk<0>(XTAL::u(16000000)/2/8); pit.out_handler<0>().set(FUNC(seta_state::pit_out0)); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // correct (map, banpresto logo) @@ -8936,7 +8936,7 @@ void seta_state::kamenrid(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -9015,7 +9015,7 @@ void keroppi_state::keroppi(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - X1_010(config, m_x1snd, 14318180); /* 14.318180 MHz */ + X1_010(config, m_x1snd, XTAL::u(14318180)); /* 14.318180 MHz */ m_x1snd->add_route(0, "lspeaker", 1.0); m_x1snd->add_route(1, "rspeaker", 1.0); } @@ -9074,15 +9074,15 @@ void seta_state::krzybowl(machine_config &config) void seta_state::madshark(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::madshark_map); m_maincpu->set_vblank_int("screen", FUNC(seta_state::irq2_line_assert)); - pit8254_device &pit(PIT8254(config, "pit", 0)); // uPD71054C - pit.set_clk<0>(16000000/2/8); + pit8254_device &pit(PIT8254(config, "pit")); // uPD71054C + pit.set_clk<0>(XTAL::u(16000000)/2/8); pit.out_handler<0>().set(FUNC(seta_state::pit_out0)); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // unknown (wrong when flipped, but along y) @@ -9107,7 +9107,7 @@ void seta_state::madshark(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -9163,17 +9163,17 @@ void magspeed_state::machine_start() void magspeed_state::magspeed(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &magspeed_state::magspeed_map); m_maincpu->set_vblank_int("screen", FUNC(magspeed_state::irq2_line_assert)); WATCHDOG_TIMER(config, "watchdog"); - pit8254_device &pit(PIT8254(config, "pit", 0)); // uPD71054C - pit.set_clk<0>(16000000/2/8); + pit8254_device &pit(PIT8254(config, "pit")); // uPD71054C + pit.set_clk<0>(XTAL::u(16000000)/2/8); pit.out_handler<0>().set(FUNC(magspeed_state::pit_out0)); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(magspeed_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // floating tilemap maybe 1px off in test grid @@ -9196,7 +9196,7 @@ void magspeed_state::magspeed(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -9210,15 +9210,15 @@ void magspeed_state::magspeed(machine_config &config) void seta_state::msgundam(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::msgundam_map); m_maincpu->set_vblank_int("screen", FUNC(seta_state::irq2_line_assert)); - pit8254_device &pit(PIT8254(config, "pit", 0)); // uPD71054C - pit.set_clk<0>(16000000/2/8); + pit8254_device &pit(PIT8254(config, "pit")); // uPD71054C + pit.set_clk<0>(XTAL::u(16000000)/2/8); pit.out_handler<0>().set(FUNC(seta_state::pit_out0)); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // correct (test grid, banpresto logo) @@ -9242,7 +9242,7 @@ void seta_state::msgundam(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -9260,11 +9260,11 @@ void seta_state::msgundamb(machine_config &config) void seta_state::oisipuzl(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::oisipuzl_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(1, 1); // correct (test mode) flip screen not supported? @@ -9290,7 +9290,7 @@ void seta_state::oisipuzl(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(0, "lspeaker", 1.0); m_x1snd->add_route(1, "rspeaker", 1.0); } @@ -9305,11 +9305,11 @@ void seta_state::oisipuzl(machine_config &config) void seta_state::triplfun(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::triplfun_map); m_maincpu->set_vblank_int("screen", FUNC(seta_state::irq3_line_hold)); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(1, 1); // correct (test mode) flip screen not supported? @@ -9335,7 +9335,7 @@ void seta_state::triplfun(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - okim6295_device &oki(OKIM6295(config, "oki", 792000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(792000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 1.0); oki.add_route(ALL_OUTPUTS, "rspeaker", 1.0); } @@ -9587,15 +9587,15 @@ void seta_state::umanclub(machine_config &config) void seta_state::utoukond(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::utoukond_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); - Z80(config, m_audiocpu, 16000000/4); /* 4 MHz */ + Z80(config, m_audiocpu, XTAL::u(16000000)/4); /* 4 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &seta_state::utoukond_sound_map); m_audiocpu->set_addrmap(AS_IO, &seta_state::utoukond_sound_io_map); - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // unknown (wrong when flipped, but along y) @@ -9623,11 +9623,11 @@ void seta_state::utoukond(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); m_soundlatch->set_separate_acknowledge(true); - X1_010(config, m_x1snd, 16000000); + X1_010(config, m_x1snd, XTAL::u(16000000)); m_x1snd->add_route(0, "lspeaker", 1.0); m_x1snd->add_route(1, "rspeaker", 1.0); - ym3438_device &ymsnd(YM3438(config, "ymsnd", 16000000/4)); /* 4 MHz */ + ym3438_device &ymsnd(YM3438(config, "ymsnd", XTAL::u(16000000)/4)); /* 4 MHz */ ymsnd.irq_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); ymsnd.add_route(0, "lspeaker", 0.30); ymsnd.add_route(1, "rspeaker", 0.30); @@ -9641,7 +9641,7 @@ void seta_state::utoukond(machine_config &config) void seta_state::wrofaero(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::wrofaero_map); #if USE_uPD71054_TIMER m_maincpu->set_vblank_int("screen", FUNC(seta_state::wrofaero_interrupt)); @@ -9655,7 +9655,7 @@ void seta_state::wrofaero(machine_config &config) MCFG_MACHINE_START_OVERRIDE(seta_state, wrofaero ) #endif // USE_uPD71054_TIMER - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // correct (test mode) @@ -9678,7 +9678,7 @@ void seta_state::wrofaero(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -9736,13 +9736,13 @@ void seta_state::zingzipbl(machine_config &config) m_layers[0]->set_info(gfx_zingzipbl_layer1); m_layers[1]->set_info(gfx_zingzipbl_layer2); - M68000(config.replace(), m_maincpu, 16000000); /* 16 MHz */ + M68000(config.replace(), m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::zingzipbl_map); TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); config.device_remove("x1snd"); - OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); + OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -9778,7 +9778,7 @@ void pairlove_state::pairlove(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - X1_010(config, m_x1snd, 16000000); /* 16 MHz */ + X1_010(config, m_x1snd, XTAL::u(16000000)); /* 16 MHz */ m_x1snd->add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -9866,7 +9866,7 @@ void jockeyc_state::jockeyc(machine_config &config) WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(2.0)); // jockeyc: watchdog test error if over 2.5s - X1_001(config, m_spritegen, 16000000, m_palette, gfx_sprites); + X1_001(config, m_spritegen, XTAL::u(16000000), m_palette, gfx_sprites); m_spritegen->set_gfxbank_callback(FUNC(seta_state::setac_gfxbank_callback)); // position kludges m_spritegen->set_fg_xoffsets(0, 0); // sprites correct? (bets), tilemap correct (test grid) @@ -9877,8 +9877,8 @@ void jockeyc_state::jockeyc(machine_config &config) MCFG_MACHINE_START_OVERRIDE(jockeyc_state, jockeyc) /* devices */ - UPD4992(config, m_rtc, 32'768); // ! Actually D4911C ! - ACIA6850(config, "acia0", 0); + UPD4992(config, m_rtc, XTAL::u(32'768)); // ! Actually D4911C ! + ACIA6850(config, "acia0"); TICKET_DISPENSER(config, "hopper1", attotime::from_msec(150), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); TICKET_DISPENSER(config, "hopper2", attotime::from_msec(150), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); @@ -9898,7 +9898,7 @@ void jockeyc_state::jockeyc(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - X1_010(config, m_x1snd, 16000000); + X1_010(config, m_x1snd, XTAL::u(16000000)); m_x1snd->add_route(0, "lspeaker", 1.0); m_x1snd->add_route(1, "rspeaker", 1.0); @@ -9929,11 +9929,11 @@ void jockeyc_state::inttoote(machine_config &config) m_layers[0]->set_xoffsets(0, -2); // I/O board (not hooked up yet) - PIA6821(config, "pia0", 0); - PIA6821(config, "pia1", 0); + PIA6821(config, "pia0"); + PIA6821(config, "pia1"); - ACIA6850(config, "acia1", 0); - ACIA6850(config, "acia2", 0); + ACIA6850(config, "acia1"); + ACIA6850(config, "acia2"); // layout config.set_default_layout(layout_inttoote); diff --git a/src/mame/seta/seta2.cpp b/src/mame/seta/seta2.cpp index 5e9b6f382cf..ab39da63e15 100644 --- a/src/mame/seta/seta2.cpp +++ b/src/mame/seta/seta2.cpp @@ -682,7 +682,7 @@ class funcube_touchscreen_device : public device_t, public device_serial_interface { public: - funcube_touchscreen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + funcube_touchscreen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; auto tx_cb() { return m_tx_cb.bind(); } @@ -720,7 +720,7 @@ static INPUT_PORTS_START( funcube_touchscreen ) PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_Y ) PORT_MINMAX(0,0x46+1) PORT_CROSSHAIR(Y, -(0xf0-8.0)/0xf0*0x047/0x46, -1.0/0x46, 0) PORT_SENSITIVITY(45) PORT_KEYDELTA(5) PORT_REVERSE INPUT_PORTS_END -funcube_touchscreen_device::funcube_touchscreen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +funcube_touchscreen_device::funcube_touchscreen_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FUNCUBE_TOUCHSCREEN, tag, owner, clock), device_serial_interface(mconfig, *this), m_tx_cb(*this), @@ -738,7 +738,7 @@ ioport_constructor funcube_touchscreen_device::device_input_ports() const void funcube_touchscreen_device::device_start() { set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_tra_rate(9600); + set_tra_rate(XTAL::u(9600)); m_button_state = 0x00; emu_timer *tm = timer_alloc(FUNC(funcube_touchscreen_device::read_buttons), this); tm->adjust(attotime::from_ticks(1, clock()), 0, attotime::from_ticks(1, clock())); @@ -2442,7 +2442,7 @@ void staraudi_state::staraudi(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &staraudi_state::staraudi_map); SHARP_LH28F016S_16BIT(config, "flash"); - UPD4992(config, m_rtc, 32'768); + UPD4992(config, m_rtc, XTAL::u(32'768)); // video hardware m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate @@ -2507,9 +2507,9 @@ void funcube_state::funcube(machine_config &config) m_sub->set_addrmap(AS_PROGRAM, &funcube_state::funcube_sub_map); m_sub->set_addrmap(AS_IO, &funcube_state::funcube_sub_io); - MCF5206E_PERIPHERAL(config, "maincpu_onboard", 0, m_maincpu); + MCF5206E_PERIPHERAL(config, "maincpu_onboard", m_maincpu); - FUNCUBE_TOUCHSCREEN(config, "touchscreen", 200).tx_cb().set(":sub:sci1", FUNC(h8_sci_device::rx_w)); + FUNCUBE_TOUCHSCREEN(config, "touchscreen", XTAL::u(200)).tx_cb().set(":sub:sci1", FUNC(h8_sci_device::rx_w)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/seta/simple_st0016.cpp b/src/mame/seta/simple_st0016.cpp index b8a10562401..840dc867a03 100644 --- a/src/mame/seta/simple_st0016.cpp +++ b/src/mame/seta/simple_st0016.cpp @@ -564,7 +564,7 @@ void st0016_state::mayjinsn(machine_config &config) m_maincpu->set_addrmap(AS_IO, &st0016_state::st0016_m2_io); - V810(config, m_subcpu, 10000000); //25 Mhz ? + V810(config, m_subcpu, XTAL::u(10000000)); //25 Mhz ? m_subcpu->set_addrmap(AS_PROGRAM, &st0016_state::v810_mem); config.set_maximum_quantum(attotime::from_hz(60)); diff --git a/src/mame/seta/srmp2.cpp b/src/mame/seta/srmp2.cpp index 5059170ae32..552afd99f28 100644 --- a/src/mame/seta/srmp2.cpp +++ b/src/mame/seta/srmp2.cpp @@ -1174,7 +1174,7 @@ void srmp2_state::srmp2(machine_config &config) aysnd.port_b_read_callback().set_ioport("DSW1"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.40); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(srmp2_state::adpcm_int)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz, 4 Bits */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.45); @@ -1183,7 +1183,7 @@ void srmp2_state::srmp2(machine_config &config) void srmp2_state::srmp3(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3500000); /* 3.50 MHz? or 4.00 MHz? */ + Z80(config, m_maincpu, XTAL::u(3500000)); /* 3.50 MHz? or 4.00 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &srmp2_state::srmp3_map); m_maincpu->set_addrmap(AS_IO, &srmp2_state::srmp3_io_map); m_maincpu->set_vblank_int("screen", FUNC(srmp2_state::irq0_line_assert)); @@ -1217,7 +1217,7 @@ void srmp2_state::srmp3(machine_config &config) aysnd.port_b_read_callback().set_ioport("DSW1"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.20); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(srmp2_state::adpcm_int)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz, 4 Bits */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.45); @@ -1271,7 +1271,7 @@ void srmp2_state::mjyuugi(machine_config &config) aysnd.port_b_read_callback().set_ioport("DSW1"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.20); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(srmp2_state::adpcm_int)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz, 4 Bits */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.45); diff --git a/src/mame/seta/srmp6.cpp b/src/mame/seta/srmp6.cpp index 67303b6704f..f39548c628b 100644 --- a/src/mame/seta/srmp6.cpp +++ b/src/mame/seta/srmp6.cpp @@ -683,7 +683,7 @@ INPUT_PORTS_END void srmp6_state::srmp6(machine_config &config) { - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &srmp6_state::srmp6_map); m_maincpu->set_vblank_int("screen", FUNC(srmp6_state::irq4_line_assert)); // irq3 is a timer irq, but it's never enabled diff --git a/src/mame/seta/ssv.cpp b/src/mame/seta/ssv.cpp index fe1bb3aee60..51b0ff6a730 100644 --- a/src/mame/seta/ssv.cpp +++ b/src/mame/seta/ssv.cpp @@ -2631,7 +2631,7 @@ void ssv_state::drifto94(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::drifto94_map); - UPD96050(config, m_dsp, 10000000); /* TODO: correct? */ + UPD96050(config, m_dsp, XTAL::u(10000000)); /* TODO: correct? */ m_dsp->set_addrmap(AS_PROGRAM, &ssv_state::dsp_prg_map); m_dsp->set_addrmap(AS_DATA, &ssv_state::dsp_data_map); @@ -2652,7 +2652,7 @@ void gdfs_state::gdfs(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); - ADC0809(config, m_adc, 1000000); // unknown clock + ADC0809(config, m_adc, XTAL::u(1000000)); // unknown clock m_adc->in_callback<0>().set_ioport("GUNX1"); m_adc->in_callback<1>().set_ioport("GUNY1"); m_adc->in_callback<2>().set_ioport("GUNX2"); @@ -2663,7 +2663,7 @@ void gdfs_state::gdfs(machine_config &config) m_screen->set_visarea(0, (0xd5-0x2c)*2-1, 0, (0x102-0x12)-1); m_screen->set_screen_update(FUNC(gdfs_state::screen_update)); - ST0020_SPRITES(config, m_st0020, 0); + ST0020_SPRITES(config, m_st0020); m_st0020->set_palette(m_palette); m_gfxdecode->set_info(gfx_gdfs); @@ -2805,7 +2805,7 @@ void ssv_state::stmblade(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::drifto94_map); - UPD96050(config, m_dsp, 10000000); + UPD96050(config, m_dsp, XTAL::u(10000000)); m_dsp->set_addrmap(AS_PROGRAM, &ssv_state::dsp_prg_map); m_dsp->set_addrmap(AS_DATA, &ssv_state::dsp_data_map); @@ -2872,7 +2872,7 @@ void sxyreact_state::sxyreact(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); - UPD7001(config, m_sxyreact_adc, 1'500'000); // FIXME: runs too fast because CPU doesn't wait long enough + UPD7001(config, m_sxyreact_adc, XTAL::u(1'500'000)); // FIXME: runs too fast because CPU doesn't wait long enough m_sxyreact_adc->a0_callback().set_ioport("PADDLE"); m_sxyreact_adc->dl_w(1); m_sxyreact_adc->si_w(0); @@ -2892,7 +2892,7 @@ void sxyreact_state::sxyreac2(machine_config &config) WATCHDOG_TIMER(config, "watchdog"); - UPD7001(config, m_sxyreact_adc, 1'500'000); // FIXME: runs too fast because CPU doesn't wait long enough + UPD7001(config, m_sxyreact_adc, XTAL::u(1'500'000)); // FIXME: runs too fast because CPU doesn't wait long enough m_sxyreact_adc->a0_callback().set_ioport("PADDLE"); /* video hardware */ @@ -2921,7 +2921,7 @@ void ssv_state::twineag2(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::twineag2_map); - UPD96050(config, m_dsp, 10000000); + UPD96050(config, m_dsp, XTAL::u(10000000)); m_dsp->set_addrmap(AS_PROGRAM, &ssv_state::dsp_prg_map); m_dsp->set_addrmap(AS_DATA, &ssv_state::dsp_data_map); @@ -2953,7 +2953,7 @@ void ssv_state::jsk(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &ssv_state::jsk_map); - V810(config, "sub", 25000000).set_addrmap(AS_PROGRAM, &ssv_state::jsk_v810_mem); + V810(config, "sub", XTAL::u(25000000)).set_addrmap(AS_PROGRAM, &ssv_state::jsk_v810_mem); WATCHDOG_TIMER(config, "watchdog"); diff --git a/src/mame/seta/st0016.cpp b/src/mame/seta/st0016.cpp index 425263fe8d1..2f794c26997 100644 --- a/src/mame/seta/st0016.cpp +++ b/src/mame/seta/st0016.cpp @@ -44,7 +44,7 @@ void st0016_cpu_device::charam_map(address_map &map) // note: a lot of bits are left uninitialized by the games, the default values are uncertain -st0016_cpu_device::st0016_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st0016_cpu_device::st0016_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, ST0016_CPU, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr, "palette") , device_video_interface(mconfig, *this, false) diff --git a/src/mame/seta/st0020.cpp b/src/mame/seta/st0020.cpp index e04f9232eb5..4699d7d442c 100644 --- a/src/mame/seta/st0020.cpp +++ b/src/mame/seta/st0020.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(ST0020_SPRITES, st0020_device, "st0020", "Seta ST0020 Sprites do { if (m_is_st0032) mem_mask = swapendian_int16(mem_mask); } while (false) -st0020_device::st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +st0020_device::st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ST0020_SPRITES, tag, owner, clock), device_gfx_interface(mconfig, *this), m_rom_ptr(*this, DEVICE_SELF) diff --git a/src/mame/seta/st0020.h b/src/mame/seta/st0020.h index 6c6e6f73337..014ffec18fa 100644 --- a/src/mame/seta/st0020.h +++ b/src/mame/seta/st0020.h @@ -11,7 +11,7 @@ class st0020_device : public device_t, public device_gfx_interface { public: - st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + st0020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_is_st0032(int is_st0032) { m_is_st0032 = is_st0032; } diff --git a/src/mame/seta/x1_012.cpp b/src/mame/seta/x1_012.cpp index 9e4a3a85456..40e022ac70a 100644 --- a/src/mame/seta/x1_012.cpp +++ b/src/mame/seta/x1_012.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(X1_012, x1_012_device, "x1_012", "Seta X1-012 Tile Layer") -x1_012_device::x1_012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +x1_012_device::x1_012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X1_012, tag, owner, clock) , device_gfx_interface(mconfig, *this) , m_tile_offset_callback(*this) diff --git a/src/mame/seta/x1_012.h b/src/mame/seta/x1_012.h index 3ac9bfc9501..cec0e5a860d 100644 --- a/src/mame/seta/x1_012.h +++ b/src/mame/seta/x1_012.h @@ -10,9 +10,9 @@ class x1_012_device : public device_t, public device_gfx_interface { public: - x1_012_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + x1_012_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template x1_012_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&palette_tag, const gfx_decode_entry *gfxinfo) - : x1_012_device(mconfig, tag, owner, u32(0)) + : x1_012_device(mconfig, tag, owner) { set_info(gfxinfo); set_palette(std::forward(palette_tag)); diff --git a/src/mame/sfrj/galeb.cpp b/src/mame/sfrj/galeb.cpp index 970d32ab41b..649e12231bf 100644 --- a/src/mame/sfrj/galeb.cpp +++ b/src/mame/sfrj/galeb.cpp @@ -301,7 +301,7 @@ u32 galeb_state::screen_update_galeb(screen_device &screen, bitmap_ind16 &bitmap void galeb_state::galeb(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1000000); + M6502(config, m_maincpu, XTAL::u(1000000)); m_maincpu->set_addrmap(AS_PROGRAM, &galeb_state::mem_map); /* video hardware */ @@ -319,13 +319,13 @@ void galeb_state::galeb(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.0625); // unknown DAC + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.0625); // unknown DAC - clock_device &acia_clock(CLOCK(config, "acia_clock", 4'800)); // 300 baud x 16(divider) = 4800 + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(4'800))); // 300 baud x 16(divider) = 4800 acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set([this] (bool state) { m_cassbit = state; }); /* cassette */ diff --git a/src/mame/sfrj/tim100.cpp b/src/mame/sfrj/tim100.cpp index bdbf6b86d13..0726179d0a8 100644 --- a/src/mame/sfrj/tim100.cpp +++ b/src/mame/sfrj/tim100.cpp @@ -185,7 +185,7 @@ void tim100_state::tim100(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfx_tim100); - I8276(config, m_crtc, 800'000); + I8276(config, m_crtc, XTAL::u(800'000)); m_crtc->set_character_width(12); m_crtc->set_display_callback(FUNC(tim100_state::crtc_display_pixels)); m_crtc->drq_wr_callback().set_inputline(m_maincpu, I8085_RST75_LINE); @@ -194,7 +194,7 @@ void tim100_state::tim100(machine_config &config) PALETTE(config, m_palette).set_entries(3); - i8251_device &uart_u17(I8251(config, "uart_u17", 0)); + i8251_device &uart_u17(I8251(config, "uart_u17")); uart_u17.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart_u17.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart_u17.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -206,7 +206,7 @@ void tim100_state::tim100(machine_config &config) rs232.cts_handler().set("uart_u17", FUNC(i8251_device::write_cts)); rs232.set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(keyboard)); - i8251_device &uart_u18(I8251(config, "uart_u18", 0)); + i8251_device &uart_u18(I8251(config, "uart_u18")); uart_u18.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); uart_u18.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr)); uart_u18.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -218,7 +218,7 @@ void tim100_state::tim100(machine_config &config) rs232a.cts_handler().set("uart_u18", FUNC(i8251_device::write_cts)); rs232a.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153'600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153'600))); uart_clock.signal_handler().set("uart_u17", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart_u17", FUNC(i8251_device::write_rxc)); uart_clock.signal_handler().append("uart_u18", FUNC(i8251_device::write_txc)); diff --git a/src/mame/sgi/4dpi.cpp b/src/mame/sgi/4dpi.cpp index f14aaa5d073..1f2d07dda97 100644 --- a/src/mame/sgi/4dpi.cpp +++ b/src/mame/sgi/4dpi.cpp @@ -676,7 +676,7 @@ void pi4d2x_state::common(machine_config &config) { wd33c9x_base_device &wd33c93(downcast(*device)); - wd33c93.set_clock(10000000); + wd33c93.set_clock(XTAL::u(10000000)); wd33c93.irq_cb().set(*this, FUNC(pi4d2x_state::lio_interrupt)).invert(); wd33c93.drq_cb().set(*this, FUNC(pi4d2x_state::scsi_drq)); }); @@ -829,7 +829,7 @@ void pi4d3x_state::common(machine_config &config) NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr, false); NSCSI_CONNECTOR(config, "scsi:7", scsi_devices, nullptr, false); - SEEQ8003(config, m_enet, 0); + SEEQ8003(config, m_enet); m_enet->out_int_cb().set(&pi4d3x_state::lio_interrupt<0, 3>, "lio0.3"); input_merger_device &duart_int(INPUT_MERGER_ANY_HIGH(config, "duart_int")); @@ -856,7 +856,7 @@ void pi4d3x_state::common(machine_config &config) // duart 1: serial ports SCC85C30(config, m_duart[1], 10_MHz_XTAL); // Z8513010VSC ESCC - m_duart[1]->configure_channels(3'686'400, 0, 3'686'400, 0); + m_duart[1]->configure_channels(XTAL::u(3'686'400), XTAL(), XTAL::u(3'686'400), XTAL()); m_duart[1]->out_int_callback().set(duart_int, FUNC(input_merger_device::in_w<1>)); // serial port 1 diff --git a/src/mame/sgi/crime.cpp b/src/mame/sgi/crime.cpp index 6e6a6272698..328843a3a8c 100644 --- a/src/mame/sgi/crime.cpp +++ b/src/mame/sgi/crime.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SGI_CRIME, crime_device, "sgicrime", "SGI CRIME") -crime_device::crime_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crime_device::crime_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_CRIME, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/mame/sgi/crime.h b/src/mame/sgi/crime.h index e23c276c277..74906997250 100644 --- a/src/mame/sgi/crime.h +++ b/src/mame/sgi/crime.h @@ -18,12 +18,12 @@ class crime_device : public device_t public: template crime_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : crime_device(mconfig, tag, owner, (uint32_t)0) + : crime_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); } - crime_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crime_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); diff --git a/src/mame/sgi/hal2.cpp b/src/mame/sgi/hal2.cpp index 9483e6419c3..5b70ff1714e 100644 --- a/src/mame/sgi/hal2.cpp +++ b/src/mame/sgi/hal2.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SGI_HAL2, hal2_device, "hal2", "SGI HAL2") -hal2_device::hal2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hal2_device::hal2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_HAL2, tag, owner, clock) , m_ldac(*this, "ldac") , m_rdac(*this, "rdac") @@ -382,9 +382,9 @@ void hal2_device::device_add_mconfig(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac, 0); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_ldac); m_ldac->add_route(ALL_OUTPUTS, "lspeaker", 0.25); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac, 0); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_rdac); m_rdac->add_route(ALL_OUTPUTS, "rspeaker", 0.25); } diff --git a/src/mame/sgi/hal2.h b/src/mame/sgi/hal2.h index 0320dbd2c28..6b99aa0ebdf 100644 --- a/src/mame/sgi/hal2.h +++ b/src/mame/sgi/hal2.h @@ -17,12 +17,7 @@ class hal2_device : public device_t { public: - hal2_device(const machine_config &mconfig, const char *tag, device_t *owner) - : hal2_device(mconfig, tag, owner, (uint32_t)0) - { - } - - hal2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hal2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void write(offs_t offset, uint16_t data); uint16_t read(offs_t offset); diff --git a/src/mame/sgi/hpc1.cpp b/src/mame/sgi/hpc1.cpp index 8c60331dca9..c5d7d56bdba 100644 --- a/src/mame/sgi/hpc1.cpp +++ b/src/mame/sgi/hpc1.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(SGI_HPC1, hpc1_device, "hpc1", "SGI HPC1") /*static*/ const XTAL hpc1_device::SCC_RXB_CLK = 3.6864_MHz_XTAL; // Needs verification /*static*/ const XTAL hpc1_device::SCC_TXB_CLK = XTAL(0); -hpc1_device::hpc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hpc1_device::hpc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_HPC1, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_eeprom(*this, finder_base::DUMMY_TAG) @@ -129,7 +129,7 @@ void hpc1_device::scsi_devices(device_slot_interface &device) void hpc1_device::wd33c93(device_t *device) { - device->set_clock(10000000); + device->set_clock(XTAL::u(10000000)); downcast(device)->irq_cb().set(*this, FUNC(hpc1_device::scsi_irq)); downcast(device)->drq_cb().set(*this, FUNC(hpc1_device::scsi_drq)); } @@ -137,12 +137,12 @@ void hpc1_device::wd33c93(device_t *device) void hpc1_device::device_add_mconfig(machine_config &config) { SCC85C30(config, m_scc[0], SCC_PCLK); - m_scc[0]->configure_channels(SCC_RXA_CLK.value(), SCC_TXA_CLK.value(), SCC_RXB_CLK.value(), SCC_TXB_CLK.value()); + m_scc[0]->configure_channels(SCC_RXA_CLK, SCC_TXA_CLK, SCC_RXB_CLK, SCC_TXB_CLK); m_scc[0]->out_int_callback().set(FUNC(hpc1_device::duart0_int_w)); m_scc[0]->out_txda_callback().set("keyboard", FUNC(sgi_keyboard_port_device::write_txd)); SCC85C30(config, m_scc[1], SCC_PCLK); - m_scc[1]->configure_channels(SCC_RXA_CLK.value(), SCC_TXA_CLK.value(), SCC_RXB_CLK.value(), SCC_TXB_CLK.value()); + m_scc[1]->configure_channels(SCC_RXA_CLK, SCC_TXA_CLK, SCC_RXB_CLK, SCC_TXB_CLK); m_scc[1]->out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd)); m_scc[1]->out_dtra_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_dtr)); m_scc[1]->out_rtsa_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_rts)); @@ -152,7 +152,7 @@ void hpc1_device::device_add_mconfig(machine_config &config) m_scc[1]->out_int_callback().set(FUNC(hpc1_device::duart1_int_w)); SCC85C30(config, m_scc[2], SCC_PCLK); - m_scc[2]->configure_channels(SCC_RXA_CLK.value(), SCC_TXA_CLK.value(), SCC_RXB_CLK.value(), SCC_TXB_CLK.value()); + m_scc[2]->configure_channels(SCC_RXA_CLK, SCC_TXA_CLK, SCC_RXB_CLK, SCC_TXB_CLK); m_scc[2]->out_int_callback().set(FUNC(hpc1_device::duart2_int_w)); SGIKBD_PORT(config, "keyboard", default_sgi_keyboard_devices, "hlekbd").rxd_handler().set(m_scc[0], FUNC(z80scc_device::rxa_w)); @@ -173,7 +173,7 @@ void hpc1_device::device_add_mconfig(machine_config &config) rs232b.dcd_handler().set(m_scc[1], FUNC(scc85c30_device::dcdb_w)); rs232b.rxd_handler().set(m_scc[1], FUNC(scc85c30_device::rxb_w)); - NSCSI_BUS(config, "scsibus", 0); + NSCSI_BUS(config, "scsibus"); NSCSI_CONNECTOR(config, "scsibus:0").option_set("wd33c93", WD33C93) .machine_config([this](device_t *device) { wd33c93(device); }); NSCSI_CONNECTOR(config, "scsibus:1", scsi_devices, "harddisk", false); @@ -186,7 +186,7 @@ void hpc1_device::device_add_mconfig(machine_config &config) DP8573(config, m_rtc); - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); m_pit->set_clk<0>(1000000); m_pit->set_clk<1>(1000000); m_pit->set_clk<2>(1000000); diff --git a/src/mame/sgi/hpc1.h b/src/mame/sgi/hpc1.h index e7b87c5ac0c..531d5f4a8d6 100644 --- a/src/mame/sgi/hpc1.h +++ b/src/mame/sgi/hpc1.h @@ -22,13 +22,13 @@ class hpc1_device : public device_t public: template hpc1_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&eeprom_tag) - : hpc1_device(mconfig, tag, owner, (uint32_t)0) + : hpc1_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); m_eeprom.set_tag(std::forward(eeprom_tag)); } - hpc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hpc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset, uint32_t mem_mask = ~0); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/mame/sgi/hpc3.cpp b/src/mame/sgi/hpc3.cpp index 8067e118183..6ff1c1c295c 100644 --- a/src/mame/sgi/hpc3.cpp +++ b/src/mame/sgi/hpc3.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(SGI_HPC3, hpc3_device, "hpc3", "SGI HPC3") -hpc3_device::hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hpc3_device::hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_HPC3, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_pio_space_config{ diff --git a/src/mame/sgi/hpc3.h b/src/mame/sgi/hpc3.h index af2e7319841..78ca06a2c5b 100644 --- a/src/mame/sgi/hpc3.h +++ b/src/mame/sgi/hpc3.h @@ -31,11 +31,11 @@ public: AS_PIO9 }; - hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&hal2_tag) - : hpc3_device(mconfig, tag, owner, (uint32_t)0) + : hpc3_device(mconfig, tag, owner) { set_hal2_tag(std::forward(hal2_tag)); } diff --git a/src/mame/sgi/indigo.cpp b/src/mame/sgi/indigo.cpp index f1c9066d42b..2b159259928 100644 --- a/src/mame/sgi/indigo.cpp +++ b/src/mame/sgi/indigo.cpp @@ -214,7 +214,7 @@ void indigo4k_state::indigo4k(machine_config &config) { indigo_base(config); - R4000(config, m_maincpu, 50000000); + R4000(config, m_maincpu, XTAL::u(50000000)); //m_maincpu->set_icache_size(32768); //m_maincpu->set_dcache_size(32768); m_maincpu->set_addrmap(AS_PROGRAM, &indigo4k_state::mem_map); diff --git a/src/mame/sgi/indy_indigo2.cpp b/src/mame/sgi/indy_indigo2.cpp index fe538a99710..a9b6d87b416 100644 --- a/src/mame/sgi/indy_indigo2.cpp +++ b/src/mame/sgi/indy_indigo2.cpp @@ -314,7 +314,7 @@ INPUT_PORTS_END void ip24_state::wd33c93(device_t *device) { - device->set_clock(10000000); + device->set_clock(XTAL::u(10000000)); downcast(device)->irq_cb().set(m_ioc2, FUNC(ioc2_device::scsi0_int_w)); downcast(device)->drq_cb().set(m_hpc3, FUNC(hpc3_device::scsi0_drq)); } @@ -332,7 +332,7 @@ void ip24_state::ip24_base(machine_config &config) m_mem_ctrl->int_dma_done_cb().set(m_ioc2, FUNC(ioc2_device::mc_dma_done_w)); m_mem_ctrl->eisa_present().set_constant(1); - NSCSI_BUS(config, "scsibus", 0); + NSCSI_BUS(config, "scsibus"); NSCSI_CONNECTOR(config, "scsibus:0").option_set("wd33c93", WD33C93B) .machine_config([this](device_t *device) { wd33c93(device); }); NSCSI_CONNECTOR(config, "scsibus:1", scsi_devices, "harddisk", false); @@ -400,14 +400,14 @@ void ip24_state::ip24(machine_config &config) m_vino->i2c_stop().set(m_dmsd, FUNC(saa7191_device::i2c_stop_w)); m_vino->interrupt_cb().set(m_ioc2, FUNC(ioc2_device::video_int_w)); - DS1386_8K(config, m_rtc, 32768); + DS1386_8K(config, m_rtc, XTAL::u(32768)); } void ip24_state::indy_5015(machine_config &config) { ip24(config); - R5000BE(config, m_maincpu, 75'000'000); + R5000BE(config, m_maincpu, XTAL::u(75'000'000)); m_maincpu->set_icache_size(0x8000); m_maincpu->set_dcache_size(0x8000); m_maincpu->set_addrmap(AS_PROGRAM, &ip24_state::ip24_map); @@ -417,7 +417,7 @@ void ip24_state::indy_4613(machine_config &config) { ip24(config); - R4600BE(config, m_maincpu, 66'666'666); + R4600BE(config, m_maincpu, XTAL::u(66'666'666)); m_maincpu->set_icache_size(0x4000); m_maincpu->set_dcache_size(0x4000); m_maincpu->set_addrmap(AS_PROGRAM, &ip24_state::ip24_map); @@ -427,7 +427,7 @@ void ip24_state::indy_4610(machine_config &config) { ip24(config); - R4600BE(config, m_maincpu, 50'000'000); + R4600BE(config, m_maincpu, XTAL::u(50'000'000)); m_maincpu->set_icache_size(0x4000); m_maincpu->set_dcache_size(0x4000); m_maincpu->set_addrmap(AS_PROGRAM, &ip24_state::ip24_map); @@ -435,21 +435,21 @@ void ip24_state::indy_4610(machine_config &config) void ip22_state::wd33c93_2(device_t *device) { - device->set_clock(10000000); + device->set_clock(XTAL::u(10000000)); downcast(device)->irq_cb().set(m_ioc2, FUNC(ioc2_device::scsi1_int_w)); downcast(device)->drq_cb().set(m_hpc3, FUNC(hpc3_device::scsi1_drq)); } void ip22_state::indigo2_4415(machine_config &config) { - R4400BE(config, m_maincpu, 75'000'000); + R4400BE(config, m_maincpu, XTAL::u(75'000'000)); m_maincpu->set_icache_size(0x4000); m_maincpu->set_dcache_size(0x4000); m_maincpu->set_addrmap(AS_PROGRAM, &ip22_state::ip22_map); ip24_base(config); - NSCSI_BUS(config, "scsibus2", 0); + NSCSI_BUS(config, "scsibus2"); NSCSI_CONNECTOR(config, "scsibus2:0").option_set("wd33c93", WD33C93B) .machine_config([this](device_t *device) { wd33c93_2(device); }); NSCSI_CONNECTOR(config, "scsibus2:1", scsi_devices, nullptr, false); @@ -469,7 +469,7 @@ void ip22_state::indigo2_4415(machine_config &config) m_hpc3->hd_reset_cb<1>().set(m_scsi_ctrl2, FUNC(wd33c93b_device::reset_w)); SGI_IOC2_FULL_HOUSE(config, m_ioc2, m_maincpu); - DS1286(config, m_rtc, 32768); + DS1286(config, m_rtc, XTAL::u(32768)); } #define INDY_BIOS_FLAGS(bios) ROM_GROUPDWORD | ROM_BIOS(bios) diff --git a/src/mame/sgi/ioc2.cpp b/src/mame/sgi/ioc2.cpp index 7522eb84c69..718906fde80 100644 --- a/src/mame/sgi/ioc2.cpp +++ b/src/mame/sgi/ioc2.cpp @@ -45,12 +45,12 @@ DEFINE_DEVICE_TYPE(SGI_IOC2_GUINNESS, ioc2_guinness_device, "ioc2g", "SGI IOC2 (Guinness)") DEFINE_DEVICE_TYPE(SGI_IOC2_FULL_HOUSE, ioc2_full_house_device, "ioc2f", "SGI IOC2 (Full House)") -ioc2_guinness_device::ioc2_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ioc2_guinness_device::ioc2_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ioc2_device(mconfig, SGI_IOC2_GUINNESS, tag, owner, clock) { } -ioc2_full_house_device::ioc2_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ioc2_full_house_device::ioc2_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ioc2_device(mconfig, SGI_IOC2_FULL_HOUSE, tag, owner, clock) { } @@ -70,7 +70,7 @@ ioport_constructor ioc2_device::device_input_ports() const void ioc2_device::device_add_mconfig(machine_config &config) { SCC85230(config, m_scc, SCC_PCLK); - m_scc->configure_channels(SCC_RXA_CLK.value(), SCC_TXA_CLK.value(), SCC_RXB_CLK.value(), SCC_TXB_CLK.value()); + m_scc->configure_channels(SCC_RXA_CLK, SCC_TXA_CLK, SCC_RXB_CLK, SCC_TXB_CLK); m_scc->out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd)); m_scc->out_dtra_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_dtr)); m_scc->out_rtsa_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_rts)); @@ -123,7 +123,7 @@ void ioc2_device::device_add_mconfig(machine_config &config) } -ioc2_device::ioc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ioc2_device::ioc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_scc(*this, SCC_TAG) diff --git a/src/mame/sgi/ioc2.h b/src/mame/sgi/ioc2.h index b69cc24d6f0..78609dbedfa 100644 --- a/src/mame/sgi/ioc2.h +++ b/src/mame/sgi/ioc2.h @@ -71,7 +71,7 @@ public: void set_mappable_int(uint8_t mask, bool state); protected: - ioc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ioc2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -198,13 +198,13 @@ class ioc2_guinness_device : public ioc2_device public: template ioc2_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : ioc2_guinness_device(mconfig, tag, owner, (uint32_t)0) + : ioc2_guinness_device(mconfig, tag, owner) { set_cpu_tag(std::forward(cpu_tag)); } void map(address_map &map); - ioc2_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ioc2_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: uint8_t get_system_id() override { return 0x26; } @@ -215,12 +215,12 @@ class ioc2_full_house_device : public ioc2_device public: template ioc2_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : ioc2_full_house_device(mconfig, tag, owner, (uint32_t)0) + : ioc2_full_house_device(mconfig, tag, owner) { set_cpu_tag(std::forward(cpu_tag)); } - ioc2_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ioc2_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); void int2_map(address_map &map); diff --git a/src/mame/sgi/iris3130.cpp b/src/mame/sgi/iris3130.cpp index 79f4a842176..5c14e34ccad 100644 --- a/src/mame/sgi/iris3130.cpp +++ b/src/mame/sgi/iris3130.cpp @@ -620,10 +620,10 @@ DEVICE_INPUT_DEFAULTS_END void iris3000_state::iris3130(machine_config &config) { /* basic machine hardware */ - M68020(config, m_maincpu, 16000000); + M68020(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &iris3000_state::mem_map); - M68000(config, m_storagercpu, 10000000); + M68000(config, m_storagercpu, XTAL::u(10000000)); m_storagercpu->set_addrmap(AS_PROGRAM, &iris3000_state::storager_map); ADDRESS_MAP_BANK(config, "text_data").set_map(&iris3000_state::text_data_map).set_options(ENDIANNESS_BIG, 32, 32); diff --git a/src/mame/sgi/light.cpp b/src/mame/sgi/light.cpp index 9d2f986b34a..a42ae203263 100644 --- a/src/mame/sgi/light.cpp +++ b/src/mame/sgi/light.cpp @@ -64,7 +64,7 @@ enum DEFINE_DEVICE_TYPE(LIGHT_VIDEO, light_video_device, "light_video", "SGI Light graphics board") -light_video_device::light_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +light_video_device::light_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LIGHT_VIDEO, tag, owner, clock) , m_palette(*this, "palette") { diff --git a/src/mame/sgi/light.h b/src/mame/sgi/light.h index 8d3312e88e9..f5a2f88ab41 100644 --- a/src/mame/sgi/light.h +++ b/src/mame/sgi/light.h @@ -15,12 +15,7 @@ class light_video_device : public device_t { public: - light_video_device(const machine_config &mconfig, const char *tag, device_t *owner) - : light_video_device(mconfig, tag, owner, (uint32_t)0) - { - } - - light_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + light_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t screen_update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mame/sgi/mace.cpp b/src/mame/sgi/mace.cpp index fa55b353289..e693bae9234 100644 --- a/src/mame/sgi/mace.cpp +++ b/src/mame/sgi/mace.cpp @@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(SGI_MACE, mace_device, "sgimace", "SGI MACE") -mace_device::mace_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mace_device::mace_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_MACE, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_rtc_read_callback(*this) diff --git a/src/mame/sgi/mace.h b/src/mame/sgi/mace.h index f2a29d94726..ff055907206 100644 --- a/src/mame/sgi/mace.h +++ b/src/mame/sgi/mace.h @@ -18,12 +18,12 @@ class mace_device : public device_t public: template mace_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) - : mace_device(mconfig, tag, owner, (uint32_t)0) + : mace_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); } - mace_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mace_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto rtc_read_callback() { return m_rtc_read_callback.bind(); } auto rtc_write_callback() { return m_rtc_write_callback.bind(); } diff --git a/src/mame/sgi/o2.cpp b/src/mame/sgi/o2.cpp index c386ccb3159..9d40d9393aa 100644 --- a/src/mame/sgi/o2.cpp +++ b/src/mame/sgi/o2.cpp @@ -84,7 +84,7 @@ void o2_state::o2(machine_config &config) SGI_CRIME(config, m_crime, m_maincpu); - DS1687(config, "rtc", 32768); + DS1687(config, "rtc", XTAL::u(32768)); } ROM_START( o2 ) diff --git a/src/mame/sgi/sgi.cpp b/src/mame/sgi/sgi.cpp index 0b943ae4d90..70150c8b657 100644 --- a/src/mame/sgi/sgi.cpp +++ b/src/mame/sgi/sgi.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SGI_MC, sgi_mc_device, "sgi_mc", "SGI Memory Controller") -sgi_mc_device::sgi_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sgi_mc_device::sgi_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_MC, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_eeprom(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/sgi/sgi.h b/src/mame/sgi/sgi.h index c634e353108..1f6eb45755d 100644 --- a/src/mame/sgi/sgi.h +++ b/src/mame/sgi/sgi.h @@ -20,12 +20,12 @@ class sgi_mc_device : public device_t public: template sgi_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&eeprom_tag) - : sgi_mc_device(mconfig, tag, owner, (uint32_t)0) + : sgi_mc_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); m_eeprom.set_tag(std::forward(eeprom_tag)); } - sgi_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sgi_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_dma_done_cb() { return m_int_dma_done_cb.bind(); } auto eisa_present() { return m_eisa_present.bind(); } diff --git a/src/mame/sgi/sgi_ge5.cpp b/src/mame/sgi/sgi_ge5.cpp index 2016d43c026..23a6e610574 100644 --- a/src/mame/sgi/sgi_ge5.cpp +++ b/src/mame/sgi/sgi_ge5.cpp @@ -129,7 +129,7 @@ static char const *const token_gl[] = DEFINE_DEVICE_TYPE(SGI_GE5, sgi_ge5_device, "ge5", "SGI Geometry Engine 5") -sgi_ge5_device::sgi_ge5_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +sgi_ge5_device::sgi_ge5_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, SGI_GE5, tag, owner, clock) , m_code_config("code", ENDIANNESS_BIG, 64, 15, -3, address_map_constructor(FUNC(sgi_ge5_device::code_map), this)) , m_data_config("data", ENDIANNESS_BIG, 32, 13, -2, address_map_constructor(FUNC(sgi_ge5_device::data_map), this)) diff --git a/src/mame/sgi/sgi_ge5.h b/src/mame/sgi/sgi_ge5.h index c1c8f75b93c..867dad85685 100644 --- a/src/mame/sgi/sgi_ge5.h +++ b/src/mame/sgi/sgi_ge5.h @@ -11,7 +11,7 @@ class sgi_ge5_device : public cpu_device { public: - sgi_ge5_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + sgi_ge5_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // host interface auto out_int() { return m_int_cb.bind(); } diff --git a/src/mame/sgi/sgi_gr1.cpp b/src/mame/sgi/sgi_gr1.cpp index eed77bfc59a..3548ef0cdb1 100644 --- a/src/mame/sgi/sgi_gr1.cpp +++ b/src/mame/sgi/sgi_gr1.cpp @@ -68,7 +68,7 @@ DEFINE_DEVICE_TYPE(SGI_GR1, sgi_gr1_device, "sgi_gr1", "SGI GR1 Graphics") -sgi_gr1_device::sgi_gr1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +sgi_gr1_device::sgi_gr1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_GR1, tag, owner, clock) , m_bank(*this, "bank") , m_screen(*this, "screen") @@ -173,7 +173,7 @@ void sgi_gr1_device::device_add_mconfig(machine_config &config) m_ge->re_r().set(m_re, FUNC(sgi_re2_device::reg_r)); m_ge->re_w().set(m_re, FUNC(sgi_re2_device::reg_w)); - SGI_RE2(config, m_re, 0); + SGI_RE2(config, m_re); m_re->out_rdy().set(m_ge, FUNC(sgi_ge5_device::re_rdy_w)); m_re->out_drq().set(m_ge, FUNC(sgi_ge5_device::re_drq_w)); diff --git a/src/mame/sgi/sgi_gr1.h b/src/mame/sgi/sgi_gr1.h index 95be8df03f8..264c7b12fd8 100644 --- a/src/mame/sgi/sgi_gr1.h +++ b/src/mame/sgi/sgi_gr1.h @@ -17,7 +17,7 @@ class sgi_gr1_device : public device_t { public: - sgi_gr1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + sgi_gr1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); static constexpr feature_type imperfect_features() { return feature::GRAPHICS; } diff --git a/src/mame/sgi/sgi_re2.cpp b/src/mame/sgi/sgi_re2.cpp index 3a831608884..81026441136 100644 --- a/src/mame/sgi/sgi_re2.cpp +++ b/src/mame/sgi/sgi_re2.cpp @@ -49,7 +49,7 @@ static u32 const regmask[] = DEFINE_DEVICE_TYPE(SGI_RE2, sgi_re2_device, "sgi_re2", "SGI Raster Engine 2") -sgi_re2_device::sgi_re2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +sgi_re2_device::sgi_re2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_RE2, tag, owner, clock) , m_xmap(*this, "^xmap%u", 0U) , m_cursor(*this, "^cursor%u", 0U) diff --git a/src/mame/sgi/sgi_re2.h b/src/mame/sgi/sgi_re2.h index 0130e39d082..1887794af74 100644 --- a/src/mame/sgi/sgi_re2.h +++ b/src/mame/sgi/sgi_re2.h @@ -14,7 +14,7 @@ class sgi_re2_device : public device_t { public: - sgi_re2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + sgi_re2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); auto out_rdy() { return m_rdy_cb.bind(); } auto out_drq() { return m_drq_cb.bind(); } diff --git a/src/mame/sgi/sgi_xmap2.cpp b/src/mame/sgi/sgi_xmap2.cpp index 789387bc743..454531a55ce 100644 --- a/src/mame/sgi/sgi_xmap2.cpp +++ b/src/mame/sgi/sgi_xmap2.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(SGI_XMAP2, sgi_xmap2_device, "sgi_xmap2", "SGI XMAP2") -sgi_xmap2_device::sgi_xmap2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +sgi_xmap2_device::sgi_xmap2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SGI_XMAP2, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_options_port(*this, "^options") diff --git a/src/mame/sgi/sgi_xmap2.h b/src/mame/sgi/sgi_xmap2.h index ab58f727354..6d0060d49c4 100644 --- a/src/mame/sgi/sgi_xmap2.h +++ b/src/mame/sgi/sgi_xmap2.h @@ -11,7 +11,7 @@ class sgi_xmap2_device , public device_palette_interface { public: - sgi_xmap2_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + sgi_xmap2_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device_t overrides virtual void device_start() override; diff --git a/src/mame/sgi/vino.cpp b/src/mame/sgi/vino.cpp index 5de93c7fb78..70405f0c73b 100644 --- a/src/mame/sgi/vino.cpp +++ b/src/mame/sgi/vino.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(VINO, vino_device, "vino", "SGI VINO Controller") -vino_device::vino_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vino_device::vino_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VINO, tag, owner, clock) , m_i2c_data_out(*this) , m_i2c_data_in(*this) diff --git a/src/mame/sgi/vino.h b/src/mame/sgi/vino.h index bec1474421d..de9353a42a8 100644 --- a/src/mame/sgi/vino.h +++ b/src/mame/sgi/vino.h @@ -20,7 +20,7 @@ class vino_device : public device_t { public: - vino_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + vino_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t read(offs_t offset, uint32_t mem_mask = ~0); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/mame/shared/alpha68k_palette.cpp b/src/mame/shared/alpha68k_palette.cpp index 153c1b022d3..dc2b09a84f1 100644 --- a/src/mame/shared/alpha68k_palette.cpp +++ b/src/mame/shared/alpha68k_palette.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(ALPHA68K_PALETTE, alpha68k_palette_device, "alpha68k_palette" // alpha68k_palette_device - constructor //------------------------------------------------- -alpha68k_palette_device::alpha68k_palette_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +alpha68k_palette_device::alpha68k_palette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ALPHA68K_PALETTE, tag, owner, clock) , device_palette_interface(mconfig, *this) { diff --git a/src/mame/shared/alpha68k_palette.h b/src/mame/shared/alpha68k_palette.h index cc97e643c49..d3bd85fd847 100644 --- a/src/mame/shared/alpha68k_palette.h +++ b/src/mame/shared/alpha68k_palette.h @@ -30,7 +30,7 @@ class alpha68k_palette_device : public device_t, { public: // construction/destruction - alpha68k_palette_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + alpha68k_palette_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_entries(u32 entries) { m_entries = entries; } // terminology is from NeoGeo development wiki page u16 get_reference_pen() { return 0; } diff --git a/src/mame/shared/ballysound.cpp b/src/mame/shared/ballysound.cpp index e937f922e04..8b691bea266 100644 --- a/src/mame/shared/ballysound.cpp +++ b/src/mame/shared/ballysound.cpp @@ -253,7 +253,7 @@ void bally_as3022_device::device_add_mconfig(machine_config &config) M6808(config, m_cpu, DERIVED_CLOCK(1, 1)); m_cpu->set_addrmap(AS_PROGRAM, &bally_as3022_device::as3022_map); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(bally_as3022_device::pia_porta_r)); m_pia->writepa_handler().set(FUNC(bally_as3022_device::pia_porta_w)); m_pia->writepb_handler().set(FUNC(bally_as3022_device::pia_portb_w)); @@ -401,7 +401,7 @@ void bally_sounds_plus_device::device_add_mconfig(machine_config &config) // and required as the chip likes to output a DC offset at idle. FILTER_RC(config, m_mc3417_filter).set_ac(); m_mc3417_filter->add_route(ALL_OUTPUTS, *this, 1.0); - MC3417(config, m_mc3417, 0); + MC3417(config, m_mc3417); // A gain of 2.2 is a guess. It sounds about loud enough and doesn't clip. m_mc3417->add_route(ALL_OUTPUTS, "mc3417_filter", 2.2); } @@ -528,7 +528,7 @@ void bally_cheap_squeak_device::device_add_mconfig(machine_config &config) m_cpu->in_p2_cb().set(FUNC(bally_cheap_squeak_device::in_p2_cb)); m_cpu->out_p2_cb().set(FUNC(bally_cheap_squeak_device::out_p2_cb)); - ZN429E(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 1.00, AUTO_ALLOC_INPUT, 0); + ZN429E(config, "dac").add_route(ALL_OUTPUTS, *this, 1.00, AUTO_ALLOC_INPUT, 0); } //------------------------------------------------- @@ -696,14 +696,14 @@ void bally_squawk_n_talk_device::device_add_mconfig(machine_config &config) M6802(config, m_cpu, DERIVED_CLOCK(1, 1)); // could also be jumpered to use a 6808 m_cpu->set_addrmap(AS_PROGRAM, &bally_squawk_n_talk_device::squawk_n_talk_map); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set(m_tms5200, FUNC(tms5220_device::status_r)); m_pia1->writepa_handler().set(m_tms5200, FUNC(tms5220_device::data_w)); m_pia1->writepb_handler().set(FUNC(bally_squawk_n_talk_device::pia1_portb_w)); m_pia1->irqa_handler().set(FUNC(bally_squawk_n_talk_device::pia_irq_w)); m_pia1->irqb_handler().set(FUNC(bally_squawk_n_talk_device::pia_irq_w)); - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); m_pia2->readpa_handler().set(FUNC(bally_squawk_n_talk_device::pia2_porta_r)); m_pia2->ca2_handler().set_output("sound_led0"); m_pia2->irqa_handler().set(FUNC(bally_squawk_n_talk_device::pia_irq_w)); @@ -712,13 +712,13 @@ void bally_squawk_n_talk_device::device_add_mconfig(machine_config &config) FILTER_RC(config, m_dac_filter); m_dac_filter->add_route(ALL_OUTPUTS, *this, 1.0); m_dac_filter->set_rc(filter_rc_device::HIGHPASS, 2000, 0, 0, CAP_U(2)); - AD558(config, "dac", 0).add_route(ALL_OUTPUTS, "dac_filter", 0.75); + AD558(config, "dac").add_route(ALL_OUTPUTS, "dac_filter", 0.75); // TODO: Calculate exact filter values. An AC filter is good enough for now // and required as the chip likes to output a DC offset at idle. FILTER_RC(config, m_speech_filter).set_ac(); m_speech_filter->add_route(ALL_OUTPUTS, *this, 1.0); - TMS5200(config, m_tms5200, 640000); + TMS5200(config, m_tms5200, XTAL::u(640000)); m_tms5200->add_route(ALL_OUTPUTS, "speech_filter", 1.0); m_tms5200->ready_cb().set(m_pia1, FUNC(pia6821_device::ca2_w)); m_tms5200->irq_cb().set(m_pia1, FUNC(pia6821_device::cb1_w)); diff --git a/src/mame/shared/ballysound.h b/src/mame/shared/ballysound.h index 19f7d867b30..723858e4102 100644 --- a/src/mame/shared/ballysound.h +++ b/src/mame/shared/ballysound.h @@ -68,7 +68,7 @@ protected: device_type type, const char *tag, device_t *owner) : - device_t(mconfig, type, tag, owner, 0), + device_t(mconfig, type, tag, owner), device_mixer_interface(mconfig, *this), m_snd_prom(*this, "sound"), m_discrete(*this, "discrete"), diff --git a/src/mame/shared/cage.cpp b/src/mame/shared/cage.cpp index 9276b8b6dfc..90a7d705244 100644 --- a/src/mame/shared/cage.cpp +++ b/src/mame/shared/cage.cpp @@ -185,12 +185,12 @@ DEFINE_DEVICE_TYPE(ATARI_CAGE, atari_cage_device, "atari_cage", "Atari CAGE") // atari_cage_device - constructor //------------------------------------------------- -atari_cage_device::atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +atari_cage_device::atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_cage_device(mconfig, ATARI_CAGE, tag, owner, clock) { } -atari_cage_device::atari_cage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +atari_cage_device::atari_cage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_mixer_interface(mconfig, *this, 5), // 5 output routines in JSPKR m_cpu(*this, "cpu"), @@ -726,7 +726,7 @@ DEFINE_DEVICE_TYPE(ATARI_CAGE_SEATTLE, atari_cage_seattle_device, "atari_cage_se // atari_cage_seattle_device - constructor //------------------------------------------------- -atari_cage_seattle_device::atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +atari_cage_seattle_device::atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : atari_cage_device(mconfig, ATARI_CAGE_SEATTLE, tag, owner, clock) { } diff --git a/src/mame/shared/cage.h b/src/mame/shared/cage.h index c93bc4419ea..032470a28ff 100644 --- a/src/mame/shared/cage.h +++ b/src/mame/shared/cage.h @@ -27,7 +27,7 @@ public: }; // construction/destruction - atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_cage_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_speedup(offs_t speedup) { m_speedup = speedup; } auto irq_handler() { return m_irqhandler.bind(); } @@ -44,7 +44,7 @@ public: void cage_map(address_map &map); protected: - atari_cage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + atari_cage_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -111,7 +111,7 @@ class atari_cage_seattle_device : public atari_cage_device { public: // construction/destruction - atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + atari_cage_seattle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void cage_map_seattle(address_map &map); protected: diff --git a/src/mame/shared/cclimber_a.cpp b/src/mame/shared/cclimber_a.cpp index 2ee26394eff..57688eb99e9 100644 --- a/src/mame/shared/cclimber_a.cpp +++ b/src/mame/shared/cclimber_a.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(CCLIMBER_AUDIO, cclimber_audio_device, "cclimber_audio", "Cra // cclimber_audio_device: Constructor //------------------------------------------------- -cclimber_audio_device::cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +cclimber_audio_device::cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CCLIMBER_AUDIO, tag, owner, clock), m_dac(*this, "dac"), m_volume(*this, "volume"), diff --git a/src/mame/shared/cclimber_a.h b/src/mame/shared/cclimber_a.h index 1f6d56703cb..fdf5e55a463 100644 --- a/src/mame/shared/cclimber_a.h +++ b/src/mame/shared/cclimber_a.h @@ -22,7 +22,7 @@ class cclimber_audio_device : public device_t { public: // construction/destruction - cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto &set_sample_clockdiv(u8 div) { m_sample_clockdiv = div; return *this; } // determines base sound pitch (default 2) diff --git a/src/mame/shared/dcs.cpp b/src/mame/shared/dcs.cpp index 7666176aaab..2820dbed627 100644 --- a/src/mame/shared/dcs.cpp +++ b/src/mame/shared/dcs.cpp @@ -682,7 +682,7 @@ void dcs_audio_device::denver_postload() // dcs_audio_device - constructor //------------------------------------------------- -dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int rev) : +dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int rev) : device_t(mconfig, type, tag, owner, clock), m_cpu(nullptr), m_program(nullptr), @@ -2531,7 +2531,7 @@ DEFINE_DEVICE_TYPE(DCS_AUDIO_2K, dcs_audio_2k_device, "dcs_audio_2k", "DCS Audio // dcs_audio_2k_device - constructor //------------------------------------------------- -dcs_audio_2k_device::dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs_audio_2k_device::dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs_audio_device(mconfig, DCS_AUDIO_2K, tag, owner, clock, REV_DCS1) { } @@ -2547,7 +2547,7 @@ DEFINE_DEVICE_TYPE(DCS_AUDIO_2K_UART, dcs_audio_2k_uart_device, "dcs_audio_2k_ua // dcs_audio_2k_uart_device - constructor //------------------------------------------------- -dcs_audio_2k_uart_device::dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs_audio_2k_uart_device::dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs_audio_device(mconfig, DCS_AUDIO_2K_UART, tag, owner, clock, REV_DCS1) { } @@ -2565,7 +2565,7 @@ DEFINE_DEVICE_TYPE(DCS_AUDIO_8K, dcs_audio_8k_device, "dcs_audio_8k", "DCS Audio // dcs_audio_8k_device - constructor //------------------------------------------------- -dcs_audio_8k_device::dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs_audio_8k_device::dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs_audio_device(mconfig, DCS_AUDIO_8K, tag, owner, clock, REV_DCS1) { } @@ -2584,7 +2584,7 @@ DEFINE_DEVICE_TYPE(DCS_AUDIO_WPC, dcs_audio_wpc_device, "dcs_audio_wpc", "DCS Au // dcs_audio_wpc_device - constructor //------------------------------------------------- -dcs_audio_wpc_device::dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs_audio_wpc_device::dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs_audio_device(mconfig, DCS_AUDIO_WPC, tag, owner, clock, REV_DCS1P5) { } @@ -2601,7 +2601,7 @@ void dcs_audio_wpc_device::device_add_mconfig(machine_config &config) // dcs2_audio_device - constructor //------------------------------------------------- -dcs2_audio_device::dcs2_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dcs2_audio_device::dcs2_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : dcs_audio_device(mconfig, type, tag, owner, clock, REV_DCS1) { } @@ -2632,7 +2632,7 @@ DEFINE_DEVICE_TYPE(DCS2_AUDIO_2115, dcs2_audio_2115_device, "dcs2_audio_2115", " // dcs2_audio_2115_device - constructor //------------------------------------------------- -dcs2_audio_2115_device::dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs2_audio_2115_device::dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs2_audio_device(mconfig, DCS2_AUDIO_2115, tag, owner, clock) { } @@ -2649,7 +2649,7 @@ DEFINE_DEVICE_TYPE(DCS2_AUDIO_2104, dcs2_audio_2104_device, "dcs2_audio_2104", " //------------------------------------------------- -dcs2_audio_2104_device::dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs2_audio_2104_device::dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs2_audio_device(mconfig, DCS2_AUDIO_2104, tag, owner, clock) { } @@ -2671,7 +2671,7 @@ DEFINE_DEVICE_TYPE(DCS2_AUDIO_DSIO, dcs2_audio_dsio_device, "dcs2_audio_dsio", " // dcs2_audio_dsio_device - constructor //------------------------------------------------- -dcs2_audio_dsio_device::dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs2_audio_dsio_device::dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs2_audio_device(mconfig, DCS2_AUDIO_DSIO, tag, owner, clock) { } @@ -2703,7 +2703,7 @@ void dcs2_audio_dsio_device::device_add_mconfig(machine_config &config) //------------------------------------------------- // dcs2_audio_denver_device - constructor //------------------------------------------------- -dcs2_audio_denver_device::dcs2_audio_denver_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +dcs2_audio_denver_device::dcs2_audio_denver_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : dcs2_audio_device(mconfig, type, tag, owner, clock) { } @@ -2725,7 +2725,7 @@ void dcs2_audio_denver_device::device_add_mconfig(machine_config &config) TIMER(config, m_sport0_timer).configure_generic(FUNC(dcs_audio_device::sport0_irq)); // Atlantis driver waits for sport0 rx interrupts } -dcs2_audio_denver_5ch_device::dcs2_audio_denver_5ch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs2_audio_denver_5ch_device::dcs2_audio_denver_5ch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs2_audio_denver_device(mconfig, DCS2_AUDIO_DENVER_5CH, tag, owner, clock) { } @@ -2751,7 +2751,7 @@ void dcs2_audio_denver_5ch_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(DCS2_AUDIO_DENVER_5CH, dcs2_audio_denver_5ch_device, "dcs2_audio_denver_5ch", "DCS2 Audio Denver 5 Channel") -dcs2_audio_denver_2ch_device::dcs2_audio_denver_2ch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +dcs2_audio_denver_2ch_device::dcs2_audio_denver_2ch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dcs2_audio_denver_device(mconfig, DCS2_AUDIO_DENVER_2CH, tag, owner, clock) { } diff --git a/src/mame/shared/dcs.h b/src/mame/shared/dcs.h index 21a565899c1..fea9087d0ad 100644 --- a/src/mame/shared/dcs.h +++ b/src/mame/shared/dcs.h @@ -130,7 +130,7 @@ public: protected: // construction/destruction - dcs_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int rev); + dcs_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int rev); // device-level overrides virtual void device_start() override; @@ -259,7 +259,7 @@ class dcs_audio_2k_device : public dcs_audio_device { public: // construction/destruction - dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs_audio_2k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -276,7 +276,7 @@ class dcs_audio_2k_uart_device : public dcs_audio_device { public: // construction/destruction - dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs_audio_2k_uart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -292,7 +292,7 @@ class dcs_audio_8k_device : public dcs_audio_device { public: // construction/destruction - dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs_audio_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -308,7 +308,7 @@ class dcs_audio_wpc_device : public dcs_audio_device { public: // construction/destruction - dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs_audio_wpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void dcs_wpc_data_map(address_map &map); protected: @@ -326,7 +326,7 @@ class dcs2_audio_device : public dcs_audio_device { protected: // construction/destruction - dcs2_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dcs2_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -339,7 +339,7 @@ class dcs2_audio_2115_device : public dcs2_audio_device { public: // construction/destruction - dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs2_audio_2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -355,7 +355,7 @@ class dcs2_audio_2104_device : public dcs2_audio_device { public: // construction/destruction - dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs2_audio_2104_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -371,7 +371,7 @@ class dcs2_audio_dsio_device : public dcs2_audio_device { public: // construction/destruction - dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs2_audio_dsio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides @@ -386,7 +386,7 @@ class dcs2_audio_denver_device : public dcs2_audio_device { public: // construction/destruction - dcs2_audio_denver_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + dcs2_audio_denver_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -396,7 +396,7 @@ class dcs2_audio_denver_5ch_device : public dcs2_audio_denver_device { public: // construction/destruction - dcs2_audio_denver_5ch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs2_audio_denver_5ch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -406,7 +406,7 @@ class dcs2_audio_denver_2ch_device : public dcs2_audio_denver_device { public: // construction/destruction - dcs2_audio_denver_2ch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dcs2_audio_denver_2ch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/shared/decobsmt.cpp b/src/mame/shared/decobsmt.cpp index d4f3ff2182d..fecf8e1b143 100644 --- a/src/mame/shared/decobsmt.cpp +++ b/src/mame/shared/decobsmt.cpp @@ -71,7 +71,7 @@ void decobsmt_device::device_add_mconfig(machine_config &config) // decobsmt_device - constructor //------------------------------------------------- -decobsmt_device::decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decobsmt_device::decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECOBSMT, tag, owner, clock) , m_ourcpu(*this, M6809_TAG) , m_bsmt(*this, BSMT_TAG) diff --git a/src/mame/shared/decobsmt.h b/src/mame/shared/decobsmt.h index f34050ec7e4..75f3b5efdff 100644 --- a/src/mame/shared/decobsmt.h +++ b/src/mame/shared/decobsmt.h @@ -19,7 +19,7 @@ class decobsmt_device : public device_t { public: // construction/destruction - decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decobsmt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void bsmt_reset_w(u8 data); u8 bsmt_status_r(); diff --git a/src/mame/shared/decospr.cpp b/src/mame/shared/decospr.cpp index 1d085dd5869..b527da01df6 100644 --- a/src/mame/shared/decospr.cpp +++ b/src/mame/shared/decospr.cpp @@ -143,7 +143,7 @@ DECOSPR_COLOUR_CB_MEMBER(decospr_device::default_col_cb) DEFINE_DEVICE_TYPE(DECO_SPRITE, decospr_device, "decospr", "DECO 52 Sprite") -decospr_device::decospr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +decospr_device::decospr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DECO_SPRITE, tag, owner, clock) , device_video_interface(mconfig, *this) , m_gfxregion(0) diff --git a/src/mame/shared/decospr.h b/src/mame/shared/decospr.h index dc80a15ba03..7bf2632e2a1 100644 --- a/src/mame/shared/decospr.h +++ b/src/mame/shared/decospr.h @@ -17,7 +17,7 @@ typedef device_delegate decospr_col_cb_del class decospr_device : public device_t, public device_video_interface { public: - decospr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + decospr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/shared/efo_zsu.cpp b/src/mame/shared/efo_zsu.cpp index 4bb4e7c1105..74841dc9056 100644 --- a/src/mame/shared/efo_zsu.cpp +++ b/src/mame/shared/efo_zsu.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(EFO_ZSU1, efo_zsu1_device, "efo_zsu1", DEFINE_DEVICE_TYPE(CEDAR_MAGNET_SOUND, cedar_magnet_sound_device, "gedmag_sound", "Cedar Sound") -efo_zsu_device::efo_zsu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +efo_zsu_device::efo_zsu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_ctc(*this, "ctc%u", 0U) , m_ctc0_ch0(*this, "ctc0:ch0") @@ -61,19 +61,19 @@ efo_zsu_device::efo_zsu_device(const machine_config &mconfig, device_type type, } -efo_zsu_device::efo_zsu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +efo_zsu_device::efo_zsu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : efo_zsu_device(mconfig, EFO_ZSU, tag, owner, clock) { } -efo_zsu1_device::efo_zsu1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +efo_zsu1_device::efo_zsu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : efo_zsu_device(mconfig, EFO_ZSU1, tag, owner, clock) { } -cedar_magnet_sound_device::cedar_magnet_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cedar_magnet_sound_device::cedar_magnet_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : efo_zsu_device(mconfig, CEDAR_MAGNET_SOUND, tag, owner, clock) , cedar_magnet_board_interface(mconfig, *this, "soundcpu", "ram") { @@ -279,7 +279,7 @@ void efo_zsu_device::device_add_mconfig(machine_config &config) aysnd1.port_a_write_callback().set(FUNC(efo_zsu_device::ay1_porta_w)); aysnd1.add_route(ALL_OUTPUTS, "mono", 0.5); - CD40105(config, m_fifo, 0); + CD40105(config, m_fifo); m_fifo->out_ready_cb().set(FUNC(efo_zsu_device::fifo_dor_w)); m_fifo->out_cb().set(m_adpcm, FUNC(msm5205_device::data_w)); diff --git a/src/mame/shared/efo_zsu.h b/src/mame/shared/efo_zsu.h index 66fa927a3e8..91f15fce6ae 100644 --- a/src/mame/shared/efo_zsu.h +++ b/src/mame/shared/efo_zsu.h @@ -25,12 +25,12 @@ class efo_zsu_device : public device_t { public: // construction/destruction - efo_zsu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + efo_zsu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void sound_command_w(u8 data); protected: - efo_zsu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + efo_zsu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -75,7 +75,7 @@ class efo_zsu1_device : public efo_zsu_device { public: // construction/destruction - efo_zsu1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + efo_zsu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; @@ -83,7 +83,7 @@ class cedar_magnet_sound_device : public efo_zsu_device, public cedar_magnet_boa { public: // construction/destruction - cedar_magnet_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cedar_magnet_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/shared/exidysound.cpp b/src/mame/shared/exidysound.cpp index 5fa970a7292..2797fee60a1 100644 --- a/src/mame/shared/exidysound.cpp +++ b/src/mame/shared/exidysound.cpp @@ -188,12 +188,12 @@ void exidy_sound_device::common_sh_start() DEFINE_DEVICE_TYPE(EXIDY, exidy_sound_device, "exidy_sfx", "Exidy SFX") -exidy_sound_device::exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +exidy_sound_device::exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : exidy_sound_device(mconfig, EXIDY, tag, owner, clock) { } -exidy_sh8253_sound_device::exidy_sh8253_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +exidy_sh8253_sound_device::exidy_sh8253_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : exidy_sound_device(mconfig, type, tag, owner, clock), m_riot(*this, "riot"), m_cvsd(*this, "cvsd"), @@ -205,7 +205,7 @@ exidy_sh8253_sound_device::exidy_sh8253_sound_device(const machine_config &mconf { } -exidy_sound_device::exidy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +exidy_sound_device::exidy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), m_stream(nullptr), @@ -642,12 +642,12 @@ void venture_sound_device::filter_w(uint8_t data) DEFINE_DEVICE_TYPE(EXIDY_VENTURE, venture_sound_device, "venture_sound", "Exidy SFX+PSG") -venture_sound_device::venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +venture_sound_device::venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : venture_sound_device(mconfig, EXIDY_VENTURE, tag, owner, clock) { } -venture_sound_device::venture_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +venture_sound_device::venture_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : exidy_sh8253_sound_device(mconfig, type, tag, owner, clock) , m_pa_callback(*this) , m_pb_callback(*this) @@ -755,7 +755,7 @@ void venture_sound_device::venture_audio_map(address_map &map) void venture_sound_device::device_add_mconfig(machine_config &config) { - m6502_device &audiocpu(M6502(config, "audiocpu", 3579545/4)); + m6502_device &audiocpu(M6502(config, "audiocpu", XTAL::u(3579545)/4)); audiocpu.set_addrmap(AS_PROGRAM, &venture_sound_device::venture_audio_map); RIOT6532(config, m_riot, SH6532_CLOCK); @@ -765,7 +765,7 @@ void venture_sound_device::device_add_mconfig(machine_config &config) m_riot->out_pb_callback().set(FUNC(venture_sound_device::r6532_portb_w)); m_riot->irq_callback().set("audioirq", FUNC(input_merger_device::in_w<0>)); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(venture_sound_device::pia_pa_w)); m_pia->writepb_handler().set(FUNC(venture_sound_device::pia_pb_w)); m_pia->ca2_handler().set(FUNC(venture_sound_device::pia_ca2_w)); @@ -789,7 +789,7 @@ void venture_sound_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(EXIDY_MTRAP, mtrap_sound_device, "mtrap_sound", "Exidy SFX+PSG+CVSD") -mtrap_sound_device::mtrap_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mtrap_sound_device::mtrap_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : venture_sound_device(mconfig, EXIDY_MTRAP, tag, owner, clock) , m_cvsd_timer(*this,"cvsd_timer") , m_cvsd_clk(false) @@ -873,14 +873,14 @@ void mtrap_sound_device::device_add_mconfig(machine_config &config) m_cvsdcpu->set_addrmap(AS_PROGRAM, &mtrap_sound_device::cvsd_map); m_cvsdcpu->set_addrmap(AS_IO, &mtrap_sound_device::cvsd_iomap); - TIMER(config, m_cvsd_timer).configure_periodic(FUNC(mtrap_sound_device::cvsd_timer), attotime::from_hz(CVSD_CLOCK*2.0)); // this is a 555 timer with 53% duty cycle, within margin of error of 50% duty cycle; the handler clocks on both clock edges, hence * 2.0 + TIMER(config, m_cvsd_timer).configure_periodic(FUNC(mtrap_sound_device::cvsd_timer), attotime::from_hz(CVSD_CLOCK*2)); // this is a 555 timer with 53% duty cycle, within margin of error of 50% duty cycle; the handler clocks on both clock edges, hence * 2.0 /* audio hardware */ FILTER_BIQUAD(config, m_cvsd_filter2).opamp_mfb_lowpass_setup(RES_K(10), RES_K(3.9), RES_K(18), CAP_N(20), CAP_N(2.2)); m_cvsd_filter2->add_route(ALL_OUTPUTS, "mono", 1.0); FILTER_BIQUAD(config, m_cvsd_filter).opamp_mfb_lowpass_setup(RES_K(10), RES_K(3.9), RES_K(18), CAP_N(20), CAP_N(2.2)); m_cvsd_filter->add_route(ALL_OUTPUTS, m_cvsd_filter2, 1.0); - MC3417(config, m_cvsd, 0).add_route(ALL_OUTPUTS, m_cvsd_filter, 0.3086); // each filter has gain of 1.8 for total gain of 3.24, 0.3086 cancels this out. was 0.8 + MC3417(config, m_cvsd).add_route(ALL_OUTPUTS, m_cvsd_filter, 0.3086); // each filter has gain of 1.8 for total gain of 3.24, 0.3086 cancels this out. was 0.8 } @@ -965,7 +965,7 @@ WRITE_LINE_MEMBER(victory_sound_device::main_ack_w) DEFINE_DEVICE_TYPE(EXIDY_VICTORY, victory_sound_device, "victory_sound", "Exidy SFX+PSG+Speech") -victory_sound_device::victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +victory_sound_device::victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : exidy_sh8253_sound_device(mconfig, EXIDY_VICTORY, tag, owner, clock) , m_victory_sound_response_ack_clk(0) { @@ -1031,7 +1031,7 @@ void victory_sound_device::device_add_mconfig(machine_config &config) m_riot->out_pb_callback().set(FUNC(victory_sound_device::r6532_portb_w)); m_riot->irq_callback().set("audioirq", FUNC(input_merger_device::in_w<0>)); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->ca2_handler().set(FUNC(victory_sound_device::irq_clear_w)); m_pia->cb2_handler().set(FUNC(victory_sound_device::main_ack_w)); m_pia->irqb_handler().set("audioirq", FUNC(input_merger_device::in_w<1>)); @@ -1042,5 +1042,5 @@ void victory_sound_device::device_add_mconfig(machine_config &config) this->add_route(ALL_OUTPUTS, "mono", 1.0); - TMS5220(config, m_tms, 640000).add_route(ALL_OUTPUTS, "mono", 1.0); + TMS5220(config, m_tms, XTAL::u(640000)).add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/shared/exidysound.h b/src/mame/shared/exidysound.h index ce66b0e33fd..e24437c9cbd 100644 --- a/src/mame/shared/exidysound.h +++ b/src/mame/shared/exidysound.h @@ -36,7 +36,7 @@ class exidy_sound_device : public device_t, }; public: - exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + exidy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~exidy_sound_device() {} uint8_t sh6840_r(offs_t offset); @@ -44,7 +44,7 @@ public: void sfxctrl_w(offs_t offset, uint8_t data); protected: - exidy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + exidy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -98,7 +98,7 @@ class exidy_sh8253_sound_device : public exidy_sound_device }; protected: - exidy_sh8253_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + exidy_sh8253_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -133,7 +133,7 @@ protected: class venture_sound_device : public exidy_sh8253_sound_device { public: - venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + venture_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration access auto pa_callback() { return m_pa_callback.bind(); } @@ -148,7 +148,7 @@ public: DECLARE_WRITE_LINE_MEMBER(cb_w); protected: - venture_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + venture_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -177,7 +177,7 @@ DECLARE_DEVICE_TYPE(EXIDY_VENTURE, venture_sound_device) class mtrap_sound_device : public venture_sound_device { public: - mtrap_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mtrap_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -200,7 +200,7 @@ DECLARE_DEVICE_TYPE(EXIDY_MTRAP, mtrap_sound_device) class victory_sound_device : public exidy_sh8253_sound_device { public: - victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + victory_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // external access uint8_t response_r(); diff --git a/src/mame/shared/fruitsamples.cpp b/src/mame/shared/fruitsamples.cpp index 72cc8c865ff..172daf5b47e 100644 --- a/src/mame/shared/fruitsamples.cpp +++ b/src/mame/shared/fruitsamples.cpp @@ -57,7 +57,7 @@ const uint8_t fruit_sample_channels[fruit_samples_device::SAMPLE_END] = DEFINE_DEVICE_TYPE(FRUIT_SAMPLES, fruit_samples_device, "fruit_samples", "Fruit machine mechanical samples") -fruit_samples_device::fruit_samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +fruit_samples_device::fruit_samples_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FRUIT_SAMPLES, tag, owner, clock), m_samples(*this, "samples") { diff --git a/src/mame/shared/fruitsamples.h b/src/mame/shared/fruitsamples.h index 1a2bac05b78..2bd0e1d4607 100644 --- a/src/mame/shared/fruitsamples.h +++ b/src/mame/shared/fruitsamples.h @@ -16,7 +16,7 @@ class fruit_samples_device : public device_t { public: - fruit_samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fruit_samples_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void play(uint8_t index); diff --git a/src/mame/shared/gottlieb_a.cpp b/src/mame/shared/gottlieb_a.cpp index 3a7a3f1385a..28cc50da40d 100644 --- a/src/mame/shared/gottlieb_a.cpp +++ b/src/mame/shared/gottlieb_a.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(GOTTLIEB_SOUND_REV2, gottlieb_sound_r2_device, // gottlieb_sound_p2_device - constructors //------------------------------------------------- -gottlieb_sound_p2_device::gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_p2_device::gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GOTTLIEB_SOUND_PIN2, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "audiocpu") @@ -127,16 +127,16 @@ INPUT_CHANGED_MEMBER( gottlieb_sound_p2_device::audio_nmi ) void gottlieb_sound_p2_device::device_add_mconfig(machine_config &config) { // audio CPU - M6502(config, m_cpu, 800'000); // M6503 - clock is a gate, a resistor and a capacitor. Freq 675-1000kHz. + M6502(config, m_cpu, XTAL::u(800'000)); // M6503 - clock is a gate, a resistor and a capacitor. Freq 675-1000kHz. m_cpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_p2_device::p2_map); // I/O configuration - MOS6530(config, m_r6530, 800'000); // same as cpu + MOS6530(config, m_r6530, XTAL::u(800'000)); // same as cpu m_r6530->out_pa_callback().set("dac", FUNC(dac_byte_interface::data_w)); m_r6530->in_pb_callback().set(FUNC(gottlieb_sound_p2_device::r6530b_r)); // sound devices - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.50); // SSS1408-6P + MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.50); // SSS1408-6P } @@ -170,7 +170,7 @@ void gottlieb_sound_p2_device::device_start() // gottlieb_sound_p3_device - constructors //------------------------------------------------- -gottlieb_sound_p3_device::gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_p3_device::gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GOTTLIEB_SOUND_PIN3, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "audiocpu") @@ -237,17 +237,17 @@ void gottlieb_sound_p3_device::p3_map(address_map &map) void gottlieb_sound_p3_device::device_add_mconfig(machine_config &config) { // audio CPU - M6502(config, m_cpu, 800'000); // M6503 - clock is a gate, a resistor and a capacitor. Freq 675-1000kHz. + M6502(config, m_cpu, XTAL::u(800'000)); // M6503 - clock is a gate, a resistor and a capacitor. Freq 675-1000kHz. m_cpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_p3_device::p3_map); // I/O configuration - MOS6530(config, m_r6530, 800'000); // same as cpu + MOS6530(config, m_r6530, XTAL::u(800'000)); // same as cpu m_r6530->out_pa_callback().set("dac", FUNC(dac_byte_interface::data_w)); m_r6530->in_pb_callback().set(FUNC(gottlieb_sound_p3_device::r6530b_r)); m_r6530->out_pb_callback().set(FUNC(gottlieb_sound_p3_device::r6530b_w)); // sound devices - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.50); // SSS1408-6P + MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.50); // SSS1408-6P } @@ -269,7 +269,7 @@ void gottlieb_sound_p3_device::device_start() // gottlieb_sound_r1_device - constructors //------------------------------------------------- -gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_r1_device::gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gottlieb_sound_r1_device(mconfig, GOTTLIEB_SOUND_REV1, tag, owner, clock) { } @@ -370,7 +370,7 @@ void gottlieb_sound_r1_device::device_add_mconfig(machine_config &config) m_riot->irq_callback().set_inputline("audiocpu", M6502_IRQ_LINE); // sound devices - MC1408(config, m_dac, 0).add_route(ALL_OUTPUTS, *this, 0.25); + MC1408(config, m_dac).add_route(ALL_OUTPUTS, *this, 0.25); } @@ -406,7 +406,7 @@ void gottlieb_sound_r1_device::device_start() // constructor //------------------------------------------------- -gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_r1_with_votrax_device::gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gottlieb_sound_r1_device(mconfig, GOTTLIEB_SOUND_REV1_VOTRAX, tag, owner, clock) , m_votrax(*this, "votrax") , m_last_speech_clock(0) @@ -426,7 +426,7 @@ void gottlieb_sound_r1_with_votrax_device::device_add_mconfig(machine_config &co m_dac->add_route(ALL_OUTPUTS, *this, 0.20); // add the VOTRAX - VOTRAX_SC01(config, m_votrax, 720000); + VOTRAX_SC01(config, m_votrax, XTAL::u(720000)); m_votrax->ar_callback().set("nmi", FUNC(input_merger_device::in_w<1>)); m_votrax->add_route(ALL_OUTPUTS, *this, 0.80); } @@ -506,7 +506,7 @@ void gottlieb_sound_r1_with_votrax_device::speech_clock_dac_w(uint8_t data) // gottlieb_sound_r2_device - constructor //------------------------------------------------- -gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gottlieb_sound_p4_device(mconfig, GOTTLIEB_SOUND_REV2, tag, owner, clock) , m_sp0250(*this, "spsnd") , m_cobram3_mod(false) @@ -657,8 +657,8 @@ void gottlieb_sound_r2_device::device_add_mconfig(machine_config &config) m_ycpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_r2_device::r2_ymap); // sound hardware - AD7528(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); // Dac A adjusts the ref voltage of DAC B, which in turn makes the sound - AD7528(config, "dacvol", 0) + AD7528(config, "dac").add_route(ALL_OUTPUTS, *this, 0.25); // Dac A adjusts the ref voltage of DAC B, which in turn makes the sound + AD7528(config, "dacvol") .set_output_range(0, 1) .add_route(0, "dac", 1.0, DAC_INPUT_RANGE_HI) .add_route(0, "dac", -1.0, DAC_INPUT_RANGE_LO); @@ -707,12 +707,12 @@ void gottlieb_sound_r2_device::device_start() // gottlieb_sound_p4_device - constructor //------------------------------------------------- -gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gottlieb_sound_p4_device(mconfig, GOTTLIEB_SOUND_PIN4, tag, owner, clock) { } -gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_p4_device::gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_dcpu(*this, "audiocpu") @@ -949,8 +949,8 @@ void gottlieb_sound_p4_device::device_add_mconfig(machine_config &config) m_ycpu->set_addrmap(AS_PROGRAM, &gottlieb_sound_p4_device::p4_ymap); // sound hardware - AD7528(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.5); - AD7528(config, "dacvol", 0) + AD7528(config, "dac").add_route(ALL_OUTPUTS, *this, 0.5); + AD7528(config, "dacvol") .set_output_range(0, 1) .add_route(0, "dac", 1.0, DAC_INPUT_RANGE_HI) .add_route(0, "dac", -1.0, DAC_INPUT_RANGE_LO); @@ -1029,7 +1029,7 @@ TIMER_CALLBACK_MEMBER(gottlieb_sound_p4_device::update_latch) // gottlieb_sound_p5_device - constructor //------------------------------------------------- -gottlieb_sound_p5_device::gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_p5_device::gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gottlieb_sound_p4_device(mconfig, GOTTLIEB_SOUND_PIN5, tag, owner, clock) , m_ym2151(*this, "ym2151") { @@ -1080,7 +1080,7 @@ void gottlieb_sound_p5_device::device_start() // gottlieb_sound_p6_device - constructor //------------------------------------------------- -gottlieb_sound_p6_device::gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_p6_device::gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gottlieb_sound_p5_device(mconfig, GOTTLIEB_SOUND_PIN6, tag, owner, clock) { } @@ -1115,8 +1115,8 @@ void gottlieb_sound_p6_device::device_add_mconfig(machine_config &config) M6502(config, m_dcpu2, SOUND2_CLOCK/2); m_dcpu2->set_addrmap(AS_PROGRAM, &gottlieb_sound_p6_device::p6_dmap); - AD7528(config, "dac2", 0).add_route(ALL_OUTPUTS, *this, 0.5); - AD7528(config, "dacvol2", 0) + AD7528(config, "dac2").add_route(ALL_OUTPUTS, *this, 0.5); + AD7528(config, "dacvol2") .set_output_range(0, 1) .add_route(0, "dac2", 1.0, DAC_INPUT_RANGE_HI) .add_route(0, "dac2", -1.0, DAC_INPUT_RANGE_LO); @@ -1136,7 +1136,7 @@ void gottlieb_sound_p6_device::device_start() // gottlieb_sound_p7_device - constructor //------------------------------------------------- -gottlieb_sound_p7_device::gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gottlieb_sound_p7_device::gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gottlieb_sound_p5_device(mconfig, GOTTLIEB_SOUND_PIN7, tag, owner, clock) , m_oki(*this, "oki") { diff --git a/src/mame/shared/gottlieb_a.h b/src/mame/shared/gottlieb_a.h index 4f098e695b1..a2c9724a5af 100644 --- a/src/mame/shared/gottlieb_a.h +++ b/src/mame/shared/gottlieb_a.h @@ -42,7 +42,7 @@ class gottlieb_sound_p2_device : public device_t, public device_mixer_interface { public: // construction/destruction - gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_p2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(uint8_t data); @@ -75,7 +75,7 @@ class gottlieb_sound_p3_device : public device_t, public device_mixer_interface { public: // construction/destruction - gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_p3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(uint8_t data); @@ -106,13 +106,13 @@ class gottlieb_sound_r1_device : public device_t, public device_mixer_interface { public: // construction/destruction - gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_r1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u8 data); protected: - gottlieb_sound_r1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gottlieb_sound_r1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -138,7 +138,7 @@ class gottlieb_sound_r1_with_votrax_device : public gottlieb_sound_r1_device { public: // construction/destruction - gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_r1_with_votrax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -169,13 +169,13 @@ class gottlieb_sound_p4_device : public device_t, public device_mixer_interface { public: // construction/destruction - gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_p4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u8 data); protected: - gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gottlieb_sound_p4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -231,7 +231,7 @@ class gottlieb_sound_r2_device : public gottlieb_sound_p4_device { public: // construction/destruction - gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_r2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers void enable_cobram3_mods() { m_cobram3_mod = true; } @@ -268,10 +268,10 @@ class gottlieb_sound_p5_device : public gottlieb_sound_p4_device { public: // construction/destruction - gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_p5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: - gottlieb_sound_p5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gottlieb_sound_p5_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -289,7 +289,7 @@ class gottlieb_sound_p6_device : public gottlieb_sound_p5_device { public: // construction/destruction - gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_p6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -309,7 +309,7 @@ class gottlieb_sound_p7_device : public gottlieb_sound_p5_device { public: // construction/destruction - gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gottlieb_sound_p7_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides diff --git a/src/mame/shared/inder_vid.cpp b/src/mame/shared/inder_vid.cpp index c4ad7a7f299..f9e8453f5b8 100644 --- a/src/mame/shared/inder_vid.cpp +++ b/src/mame/shared/inder_vid.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(INDER_VIDEO, inder_vid_device, "indervd", "Inder / Dinamic TMS Video") -inder_vid_device::inder_vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +inder_vid_device::inder_vid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INDER_VIDEO, tag, owner, clock), /* device_video_interface(mconfig, *this, false), */ m_vram(*this, "vram"), @@ -113,7 +113,7 @@ void inder_vid_device::device_add_mconfig(machine_config &config) PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &inder_vid_device::ramdac_map); ramdac.set_split_read(1); } diff --git a/src/mame/shared/inder_vid.h b/src/mame/shared/inder_vid.h index d827230fd76..7f40b3148e2 100644 --- a/src/mame/shared/inder_vid.h +++ b/src/mame/shared/inder_vid.h @@ -24,7 +24,7 @@ class inder_vid_device : public device_t { public: // construction/destruction - inder_vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + inder_vid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // probably set by a register somewhere either on TMS side or 68k side void set_bpp(int bpp) diff --git a/src/mame/shared/isbc_215g.cpp b/src/mame/shared/isbc_215g.cpp index 7bcc0211c5c..e3a1b5dea4a 100644 --- a/src/mame/shared/isbc_215g.cpp +++ b/src/mame/shared/isbc_215g.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(ISBC_215G, isbc_215g_device, "isbc_215g", "ISBC 215G Winchester Disk Controller") -isbc_215g_device::isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +isbc_215g_device::isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISBC_215G, tag, owner, clock), m_maincpu(*this, finder_base::DUMMY_TAG), m_dmac(*this, "u84"), @@ -361,13 +361,13 @@ void isbc_215g_device::device_add_mconfig(machine_config &config) m_dmac->set_addrmap(AS_IO, &isbc_215g_device::isbc_215g_io); m_dmac->set_data_width(16); - HARDDISK(config, "drive0", 0); - HARDDISK(config, "drive1", 0); + HARDDISK(config, "drive0"); + HARDDISK(config, "drive1"); - ISBX_SLOT(config, m_sbx1, 0, isbx_cards, nullptr); + ISBX_SLOT(config, m_sbx1, isbx_cards, nullptr); m_sbx1->mintr0().set(FUNC(isbc_215g_device::isbx_irq_00_w)); m_sbx1->mintr1().set(FUNC(isbc_215g_device::isbx_irq_01_w)); - ISBX_SLOT(config, m_sbx2, 0, isbx_cards, "fdc_218a"); + ISBX_SLOT(config, m_sbx2, isbx_cards, "fdc_218a"); m_sbx2->mintr0().set(FUNC(isbc_215g_device::isbx_irq_10_w)); m_sbx2->mintr1().set(FUNC(isbc_215g_device::isbx_irq_11_w)); } diff --git a/src/mame/shared/isbc_215g.h b/src/mame/shared/isbc_215g.h index 8f00143dd17..aade7994e02 100644 --- a/src/mame/shared/isbc_215g.h +++ b/src/mame/shared/isbc_215g.h @@ -13,14 +13,14 @@ class isbc_215g_device : public device_t { public: template - isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint16_t wakeup, T &&cpu_tag) - : isbc_215g_device(mconfig, tag, owner, clock) + isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t wakeup, T &&cpu_tag) + : isbc_215g_device(mconfig, tag, owner) { m_wakeup = wakeup; m_maincpu.set_tag(std::forward(cpu_tag)); } - isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + isbc_215g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_callback() { return m_out_irq_func.bind(); } diff --git a/src/mame/shared/mega32x.cpp b/src/mame/shared/mega32x.cpp index 4fac35aa490..75d5d35f2f7 100644 --- a/src/mame/shared/mega32x.cpp +++ b/src/mame/shared/mega32x.cpp @@ -213,7 +213,7 @@ GFX check (these don't explicitly fails): DEFINE_DEVICE_TYPE(SEGA_32X_NTSC, sega_32x_ntsc_device, "sega_32x_ntsc", "Sega 32X (NTSC)") DEFINE_DEVICE_TYPE(SEGA_32X_PAL, sega_32x_pal_device, "sega_32x_pal", "Sega 32X (PAL)") -sega_32x_device::sega_32x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sega_32x_device::sega_32x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_palette_interface(mconfig, *this) , device_sound_interface(mconfig, *this) @@ -230,12 +230,12 @@ sega_32x_device::sega_32x_device(const machine_config &mconfig, device_type type { } -sega_32x_ntsc_device::sega_32x_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_32x_ntsc_device::sega_32x_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_32x_device(mconfig, SEGA_32X_NTSC, tag, owner, clock) { } -sega_32x_pal_device::sega_32x_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_32x_pal_device::sega_32x_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_32x_device(mconfig, SEGA_32X_PAL, tag, owner, clock) { } @@ -1706,8 +1706,8 @@ void sega_32x_ntsc_device::device_add_mconfig(machine_config &config) m_master_cpu->set_addrmap(AS_PROGRAM, &sega_32x_ntsc_device::sh2_main_map); m_slave_cpu->set_addrmap(AS_PROGRAM, &sega_32x_ntsc_device::sh2_slave_map); - DAC_12BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, *this, 0.4, 0); // unknown DAC - DAC_12BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, *this, 0.4, 1); // unknown DAC + DAC_12BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, *this, 0.4, 0); // unknown DAC + DAC_12BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, *this, 0.4, 1); // unknown DAC } void sega_32x_pal_device::device_add_mconfig(machine_config &config) @@ -1717,8 +1717,8 @@ void sega_32x_pal_device::device_add_mconfig(machine_config &config) m_master_cpu->set_addrmap(AS_PROGRAM, &sega_32x_pal_device::sh2_main_map); m_slave_cpu->set_addrmap(AS_PROGRAM, &sega_32x_pal_device::sh2_slave_map); - DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, *this, 0.4, 0); // unknown DAC - DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, *this, 0.4, 1); // unknown DAC + DAC_16BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, *this, 0.4, 0); // unknown DAC + DAC_16BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, *this, 0.4, 1); // unknown DAC } @@ -1733,7 +1733,7 @@ void sega_32x_device::device_start() set_pen_color(i, pal5bit(r), pal5bit(g), pal5bit(b)); } - m_stream = stream_alloc(2, 2, 48000 * 4); + m_stream = stream_alloc(2, 2, XTAL::u(48000) * 4); m_32x_pwm_timer = timer_alloc(FUNC(sega_32x_device::handle_pwm_callback), this); m_32x_dram0 = std::make_unique(0x40000/2); diff --git a/src/mame/shared/mega32x.h b/src/mame/shared/mega32x.h index 14a952117e5..cedd2562d9d 100644 --- a/src/mame/shared/mega32x.h +++ b/src/mame/shared/mega32x.h @@ -98,7 +98,7 @@ public: void sh2_common_map(address_map &map); protected: - sega_32x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega_32x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_shared_ptr m_sh2_shared; @@ -204,14 +204,14 @@ class sega_32x_ntsc_device : public sega_32x_device { public: template - sega_32x_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&main_cpu_tag, U &&timer_tag) + sega_32x_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&main_cpu_tag, U &&timer_tag) : sega_32x_ntsc_device(mconfig, tag, owner, clock) { m_main_cpu.set_tag(std::forward(main_cpu_tag)); m_scan_timer.set_tag(std::forward(timer_tag)); } - sega_32x_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_32x_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -222,14 +222,14 @@ class sega_32x_pal_device : public sega_32x_device { public: template - sega_32x_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&main_cpu_tag, U &&timer_tag) + sega_32x_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&main_cpu_tag, U &&timer_tag) : sega_32x_pal_device(mconfig, tag, owner, clock) { m_main_cpu.set_tag(std::forward(main_cpu_tag)); m_scan_timer.set_tag(std::forward(timer_tag)); } - sega_32x_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_32x_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/shared/megacdcd.cpp b/src/mame/shared/megacdcd.cpp index 22759b96a3a..4a97b112076 100644 --- a/src/mame/shared/megacdcd.cpp +++ b/src/mame/shared/megacdcd.cpp @@ -133,7 +133,7 @@ DEFINE_DEVICE_TYPE(LC89510_TEMP, lc89510_temp_device, "lc89510_temp", "lc89510_temp_device") -lc89510_temp_device::lc89510_temp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lc89510_temp_device::lc89510_temp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LC89510_TEMP, tag, owner, clock) , m_segacd_dma_callback(*this, FUNC(lc89510_temp_device::Fake_CDC_Do_DMA)) , m_type1_interrupt_callback(*this, FUNC(lc89510_temp_device::dummy_interrupt_callback)) diff --git a/src/mame/shared/megacdcd.h b/src/mame/shared/megacdcd.h index 21fc407896b..6803074a3fa 100644 --- a/src/mame/shared/megacdcd.h +++ b/src/mame/shared/megacdcd.h @@ -26,7 +26,7 @@ public: template void set_68k_tag(T &&tag) { m_68k.set_tag(std::forward(tag)); } - lc89510_temp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lc89510_temp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t get_segacd_irq_mask() const { return segacd_irq_mask; } diff --git a/src/mame/shared/mitcrt.cpp b/src/mame/shared/mitcrt.cpp index 30037934a4c..5df377b1050 100644 --- a/src/mame/shared/mitcrt.cpp +++ b/src/mame/shared/mitcrt.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(CRT, crt_device, "crt", "CRT Video") // crt_device - constructor //------------------------------------------------- -crt_device::crt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +crt_device::crt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CRT, tag, owner, clock), m_list(nullptr), m_list_head(nullptr), diff --git a/src/mame/shared/mitcrt.h b/src/mame/shared/mitcrt.h index bf4c94fd0d5..dec626fda9a 100644 --- a/src/mame/shared/mitcrt.h +++ b/src/mame/shared/mitcrt.h @@ -23,7 +23,7 @@ class crt_device : public device_t { public: - crt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + crt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_num_levels(int levels) { m_num_intensity_levels = levels; } void set_offsets(int x_offset, int y_offset) diff --git a/src/mame/shared/ms7004.cpp b/src/mame/shared/ms7004.cpp index ee04d98c888..5a04e5c34a0 100644 --- a/src/mame/shared/ms7004.cpp +++ b/src/mame/shared/ms7004.cpp @@ -72,7 +72,7 @@ void ms7004_device::device_add_mconfig(machine_config &config) m_i8243->p7_out_cb().set(FUNC(ms7004_device::i8243_port_w<3>)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_speaker, 3250).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_speaker, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 0.50); } const tiny_rom_entry *ms7004_device::device_rom_region() const @@ -350,7 +350,7 @@ ioport_constructor ms7004_device::device_input_ports() const // ms7004_device - constructor //------------------------------------------------- -ms7004_device::ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ms7004_device::ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MS7004, tag, owner, clock) , m_maincpu(*this, MS7004_CPU_TAG) , m_speaker(*this, MS7004_SPK_TAG) diff --git a/src/mame/shared/ms7004.h b/src/mame/shared/ms7004.h index ace9c954667..bb224143db5 100644 --- a/src/mame/shared/ms7004.h +++ b/src/mame/shared/ms7004.h @@ -22,7 +22,7 @@ class ms7004_device : public device_t //, public device_serial_interface { public: // construction/destruction - ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto tx_handler() { return m_tx_handler.bind(); } auto rts_handler() { return m_rts_handler.bind(); } diff --git a/src/mame/shared/namco_c355spr.cpp b/src/mame/shared/namco_c355spr.cpp index 9cc1ff6b4c9..e4d89a9c195 100644 --- a/src/mame/shared/namco_c355spr.cpp +++ b/src/mame/shared/namco_c355spr.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(NAMCO_C355SPR, namco_c355spr_device, "namco_c355spr", "Namco 186/187 or C355 (Sprites)") -namco_c355spr_device::namco_c355spr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +namco_c355spr_device::namco_c355spr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_gfx_interface(mconfig, *this, nullptr), device_video_interface(mconfig, *this), @@ -83,7 +83,7 @@ namco_c355spr_device::namco_c355spr_device(const machine_config &mconfig, device m_spriteram[i] = nullptr; } -namco_c355spr_device::namco_c355spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +namco_c355spr_device::namco_c355spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : namco_c355spr_device(mconfig, NAMCO_C355SPR, tag, owner, clock) { } diff --git a/src/mame/shared/namco_c355spr.h b/src/mame/shared/namco_c355spr.h index 33aed939a36..e19e4f55910 100644 --- a/src/mame/shared/namco_c355spr.h +++ b/src/mame/shared/namco_c355spr.h @@ -12,7 +12,7 @@ class namco_c355spr_device : public device_t, public device_gfx_interface, publi { public: // construction/destruction - namco_c355spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + namco_c355spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_color_base(u16 base) { m_colbase = base; } void set_scroll_offsets(int x, int y) { m_scrolloffs[0] = x; m_scrolloffs[1] = y; } @@ -72,7 +72,7 @@ public: bitmap_ind16 &screen_bitmap() { return m_screenbitmap; } protected: - namco_c355spr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock = 0); + namco_c355spr_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; diff --git a/src/mame/shared/pcshare.cpp b/src/mame/shared/pcshare.cpp index d9d977c10ef..ac842218c70 100644 --- a/src/mame/shared/pcshare.cpp +++ b/src/mame/shared/pcshare.cpp @@ -147,7 +147,7 @@ void pcat_base_state::pcvideo_vga(machine_config &config) screen.set_raw(25.1748_MHz_XTAL, 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(vga_device::screen_update)); - vga_device &vga(VGA(config, "vga", 0)); + vga_device &vga(VGA(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x100000); } @@ -158,7 +158,7 @@ void pcat_base_state::pcvideo_trident_vga(machine_config &config) screen.set_raw(25.1748_MHz_XTAL, 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(trident_vga_device::screen_update)); - trident_vga_device &vga(TRIDENT_VGA(config, "vga", 0)); + trident_vga_device &vga(TRIDENT_VGA(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x200000); } @@ -169,7 +169,7 @@ void pcat_base_state::pcvideo_s3_vga(machine_config &config) screen.set_raw(25.1748_MHz_XTAL, 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(s3_vga_device::screen_update)); - s3_vga_device &vga(S3_VGA(config, "vga", 0)); + s3_vga_device &vga(S3_VGA(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x100000); } @@ -181,7 +181,7 @@ void pcat_base_state::pcvideo_cirrus_gd5428(machine_config &config) screen.set_raw(25.1748_MHz_XTAL, 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(cirrus_gd5428_device::screen_update)); - cirrus_gd5428_device &vga(CIRRUS_GD5428(config, "vga", 0)); + cirrus_gd5428_device &vga(CIRRUS_GD5428(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x200000); @@ -193,7 +193,7 @@ void pcat_base_state::pcvideo_cirrus_gd5430(machine_config &config) screen.set_raw(25.1748_MHz_XTAL, 900, 0, 640, 526, 0, 480); screen.set_screen_update("vga", FUNC(cirrus_gd5430_device::screen_update)); - cirrus_gd5430_device &vga(CIRRUS_GD5430(config, "vga", 0)); + cirrus_gd5430_device &vga(CIRRUS_GD5430(config, "vga")); vga.set_screen("screen"); vga.set_vram_size(0x200000); @@ -201,12 +201,12 @@ void pcat_base_state::pcvideo_cirrus_gd5430(machine_config &config) void pcat_base_state::pcat_common(machine_config &config) { - PIC8259(config, m_pic8259_1, 0); + PIC8259(config, m_pic8259_1); m_pic8259_1->out_int_callback().set_inputline(m_maincpu, 0); m_pic8259_1->in_sp_callback().set_constant(1); m_pic8259_1->read_slave_ack_callback().set(FUNC(pcat_base_state::get_slave_ack)); - PIC8259(config, m_pic8259_2, 0); + PIC8259(config, m_pic8259_2); m_pic8259_2->out_int_callback().set(m_pic8259_1, FUNC(pic8259_device::ir2_w)); m_pic8259_2->in_sp_callback().set_constant(0); @@ -221,7 +221,7 @@ void pcat_base_state::pcat_common(machine_config &config) AM9517A(config, m_dma8237_2, 14.318181_MHz_XTAL / 3); - PIT8254(config, m_pit8254, 0); + PIT8254(config, m_pit8254); m_pit8254->set_clk<0>(4772720/4); // heartbeat IRQ m_pit8254->out_handler<0>().set(m_pic8259_1, FUNC(pic8259_device::ir0_w)); m_pit8254->set_clk<1>(4772720/4); // DRAM refresh @@ -232,7 +232,7 @@ void pcat_base_state::pcat_common(machine_config &config) m_mc146818->irq().set(m_pic8259_2, FUNC(pic8259_device::ir0_w)); m_mc146818->set_century_index(0x32); - KBDC8042(config, m_kbdc, 0); + KBDC8042(config, m_kbdc); m_kbdc->set_keyboard_type(kbdc8042_device::KBDC8042_STANDARD); m_kbdc->system_reset_callback().set_inputline(m_maincpu, INPUT_LINE_RESET); m_kbdc->gate_a20_callback().set_inputline(m_maincpu, INPUT_LINE_A20); diff --git a/src/mame/shared/rax.cpp b/src/mame/shared/rax.cpp index 93e64464e57..b4ec7221435 100644 --- a/src/mame/shared/rax.cpp +++ b/src/mame/shared/rax.cpp @@ -476,7 +476,7 @@ DEFINE_DEVICE_TYPE(ACCLAIM_RAX, acclaim_rax_device, "rax_audio", "Acclaim RAX") // acclaim_rax_device - constructor //------------------------------------------------- -acclaim_rax_device::acclaim_rax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acclaim_rax_device::acclaim_rax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACCLAIM_RAX, tag, owner, clock) , m_cpu(*this, "adsp") , m_dmadac(*this, { "dacl", "dacr" }) diff --git a/src/mame/shared/rax.h b/src/mame/shared/rax.h index 957fa923b9e..df5e9846493 100644 --- a/src/mame/shared/rax.h +++ b/src/mame/shared/rax.h @@ -20,7 +20,7 @@ class acclaim_rax_device : public device_t { public: // construction/destruction - acclaim_rax_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acclaim_rax_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t data_r(); void data_w(uint16_t data); diff --git a/src/mame/shared/s11c_bg.cpp b/src/mame/shared/s11c_bg.cpp index 27e59b1eeaa..523ce82bde1 100644 --- a/src/mame/shared/s11c_bg.cpp +++ b/src/mame/shared/s11c_bg.cpp @@ -224,7 +224,7 @@ DEFINE_DEVICE_TYPE(S11_OBG, s11_obg_device, "s11_obg", "Williams System 11 (Olde DEFINE_DEVICE_TYPE(S11_BGM, s11_bgm_device, "s11_bgm", "Williams System 11 Background Sound/Music Board") // D-11197 DEFINE_DEVICE_TYPE(S11_BGS, s11_bgs_device, "s11_bgs", "Williams System 11 Background Sound Board") // C-11029 or C-11030 -s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig,S11C_BG,tag,owner,clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -242,7 +242,7 @@ s11c_bg_device::s11c_bg_device(const machine_config &mconfig, const char *tag, d } // constructor with overridable type for subclass -s11c_bg_device::s11c_bg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +s11c_bg_device::s11c_bg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig,type,tag,owner,clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -260,22 +260,22 @@ s11c_bg_device::s11c_bg_device(const machine_config &mconfig, device_type type, } // subclass definitions -s11_bg_device::s11_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s11_bg_device::s11_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s11c_bg_device(mconfig,S11_BG,tag,owner,clock) { } -s11_obg_device::s11_obg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s11_obg_device::s11_obg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s11c_bg_device(mconfig,S11_OBG,tag,owner,clock) { } -s11_bgm_device::s11_bgm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s11_bgm_device::s11_bgm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s11c_bg_device(mconfig,S11_BGM,tag,owner,clock) { } -s11_bgs_device::s11_bgs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s11_bgs_device::s11_bgs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s11c_bg_device(mconfig,S11_BGS,tag,owner,clock) { } @@ -367,9 +367,9 @@ void s11c_bg_device::s11_bg_base(machine_config &config) m_cpu->set_addrmap(AS_PROGRAM, &s11c_bg_device::s11c_bg_map); // override this as needed config.set_maximum_quantum(attotime::from_hz(50)); - MC1408(config, m_dac, 0); + MC1408(config, m_dac); - PIA6821(config, m_pia40, 0); + PIA6821(config, m_pia40); m_pia40->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia40->writepb_handler().set(FUNC(s11c_bg_device::pia40_pb_w)); // ca2 handler is set in the s11_bg_ym function @@ -401,7 +401,7 @@ void s11c_bg_device::s11_bg_cvsd(machine_config &config) FILTER_BIQUAD(config, m_cvsd_filter2).opamp_mfb_lowpass_setup(RES_K(27), RES_K(15), RES_K(27), CAP_P(4700), CAP_P(1200)); FILTER_BIQUAD(config, m_cvsd_filter).opamp_mfb_lowpass_setup(RES_K(43), RES_K(36), RES_K(180), CAP_P(0), CAP_P(180)); // note the first capacitor is 0pf meaning it doesn't exist m_cvsd_filter->add_route(ALL_OUTPUTS, m_cvsd_filter2, 1.0); - HC55516(config, m_cvsd, 0).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0/4.0); // to prevent massive clipping issues, we divide the signal by 4 here before going into the filters, then multiply it by 4 after it comes out the other end + HC55516(config, m_cvsd).add_route(ALL_OUTPUTS, m_cvsd_filter, 1.0/4.0); // to prevent massive clipping issues, we divide the signal by 4 here before going into the filters, then multiply it by 4 after it comes out the other end } diff --git a/src/mame/shared/s11c_bg.h b/src/mame/shared/s11c_bg.h index 1df38b63900..9125836347e 100644 --- a/src/mame/shared/s11c_bg.h +++ b/src/mame/shared/s11c_bg.h @@ -24,7 +24,7 @@ class s11c_bg_device : public device_t, public device_mixer_interface { public: // construction/destruction - s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + s11c_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // base config void s11_bg_base(machine_config &config); @@ -52,7 +52,7 @@ public: //mc6809e_device *get_cpu() { return m_cpu; } protected: // constructor with overridable type for subclass - s11c_bg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + s11c_bg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // overrides virtual void device_start() override; @@ -87,7 +87,7 @@ private: class s11_bg_device : public s11c_bg_device { public: - s11_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + s11_bg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; }; @@ -95,7 +95,7 @@ protected: class s11_obg_device : public s11c_bg_device { public: - s11_obg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + s11_obg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; }; @@ -103,7 +103,7 @@ protected: class s11_bgm_device : public s11c_bg_device { public: - s11_bgm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + s11_bgm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; }; @@ -111,7 +111,7 @@ protected: class s11_bgs_device : public s11c_bg_device { public: - s11_bgs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + s11_bgs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void device_add_mconfig(machine_config &config) override; }; diff --git a/src/mame/shared/sec.cpp b/src/mame/shared/sec.cpp index 6fbb69c2b1d..9492cf5b73a 100644 --- a/src/mame/shared/sec.cpp +++ b/src/mame/shared/sec.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(SEC, sec_device, "sec", "Barcrest/Bell Fruit Serial Electronic Counter (SEC)") -sec_device::sec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sec_device::sec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEC, tag, owner, clock) { } diff --git a/src/mame/shared/sec.h b/src/mame/shared/sec.h index cb04daf6826..2f130fbe023 100644 --- a/src/mame/shared/sec.h +++ b/src/mame/shared/sec.h @@ -46,7 +46,7 @@ class sec_device : public device_t { public: // construction/destruction - sec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sec_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); /* serial interface */ DECLARE_WRITE_LINE_MEMBER(clk_w); diff --git a/src/mame/shared/segam1audio.cpp b/src/mame/shared/segam1audio.cpp index a908997bc5d..f0ce3176737 100644 --- a/src/mame/shared/segam1audio.cpp +++ b/src/mame/shared/segam1audio.cpp @@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(SEGAM1AUDIO, segam1audio_device, "segam1audio", "Sega Model 1 void segam1audio_device::device_add_mconfig(machine_config &config) { - M68000(config, m_audiocpu, 10000000); // verified on real h/w + M68000(config, m_audiocpu, XTAL::u(10000000)); // verified on real h/w m_audiocpu->set_addrmap(AS_PROGRAM, &segam1audio_device::segam1audio_map); SPEAKER(config, "lspeaker").front_left(); @@ -76,7 +76,7 @@ void segam1audio_device::device_add_mconfig(machine_config &config) m_uart->rxrdy_handler().set_inputline(m_audiocpu, M68K_IRQ_2); m_uart->txd_handler().set(FUNC(segam1audio_device::output_txd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(500000))); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); } @@ -89,7 +89,7 @@ void segam1audio_device::device_add_mconfig(machine_config &config) // segam1audio_device - constructor //------------------------------------------------- -segam1audio_device::segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +segam1audio_device::segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGAM1AUDIO, tag, owner, clock), m_audiocpu(*this, "sndcpu"), m_multipcm_1(*this, "pcm1"), diff --git a/src/mame/shared/segam1audio.h b/src/mame/shared/segam1audio.h index af8752efa0d..b73dce23168 100644 --- a/src/mame/shared/segam1audio.h +++ b/src/mame/shared/segam1audio.h @@ -24,7 +24,7 @@ class segam1audio_device : public device_t { public: // construction/destruction - segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + segam1audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto rxd_handler() { return m_rxd_handler.bind(); } diff --git a/src/mame/shared/seibusound.cpp b/src/mame/shared/seibusound.cpp index c22aaac61d6..8062eec8075 100644 --- a/src/mame/shared/seibusound.cpp +++ b/src/mame/shared/seibusound.cpp @@ -74,7 +74,7 @@ DEFINE_DEVICE_TYPE(SEIBU_SOUND, seibu_sound_device, "seibu_sound", "Seibu Sound System") -seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEIBU_SOUND, tag, owner, clock), m_int_cb(*this), m_ym_read_cb(*this), @@ -345,7 +345,7 @@ void seibu_sound_common::seibu_sound_map(address_map &map) DEFINE_DEVICE_TYPE(SEI80BU, sei80bu_device, "sei80bu", "SEI80BU Encrypted Z80 Interface") -sei80bu_device::sei80bu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sei80bu_device::sei80bu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEI80BU, tag, owner, clock), device_rom_interface(mconfig, *this) { @@ -397,7 +397,7 @@ u8 sei80bu_device::opcode_r(offs_t offset) DEFINE_DEVICE_TYPE(SEIBU_ADPCM, seibu_adpcm_device, "seibu_adpcm", "Seibu ADPCM interface") -seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEIBU_ADPCM, tag, owner, clock) , m_msm(*this, finder_base::DUMMY_TAG) , m_current(0) diff --git a/src/mame/shared/seibusound.h b/src/mame/shared/seibusound.h index 664615e000c..4461da405d6 100644 --- a/src/mame/shared/seibusound.h +++ b/src/mame/shared/seibusound.h @@ -44,7 +44,7 @@ protected: class seibu_sound_device : public device_t { public: - seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + seibu_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~seibu_sound_device() { } // configuration @@ -119,7 +119,7 @@ DECLARE_DEVICE_TYPE(SEIBU_SOUND, seibu_sound_device) class sei80bu_device : public device_t, public device_rom_interface<16> { public: - sei80bu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sei80bu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 data_r(offs_t offset); u8 opcode_r(offs_t offset); @@ -136,12 +136,12 @@ DECLARE_DEVICE_TYPE(SEI80BU, sei80bu_device) class seibu_adpcm_device : public device_t { public: - template seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&msm5205_tag) + template seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&msm5205_tag) : seibu_adpcm_device(mconfig, tag, owner, clock) { m_msm.set_tag(std::forward(msm5205_tag)); } - seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~seibu_adpcm_device() { } void decrypt(); diff --git a/src/mame/shared/snk68_spr.cpp b/src/mame/shared/snk68_spr.cpp index a6b12e256db..30c7773a298 100644 --- a/src/mame/shared/snk68_spr.cpp +++ b/src/mame/shared/snk68_spr.cpp @@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(SNK68_SPR, snk68_spr_device, "snk68_spr", "SNK68 Sprites") -snk68_spr_device::snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +snk68_spr_device::snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNK68_SPR, tag, owner, clock) , m_newtilecb(*this, FUNC(snk68_spr_device::tile_callback_noindirect)) , m_gfxdecode(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/shared/snk68_spr.h b/src/mame/shared/snk68_spr.h index 0cce7a71b50..fe35281deb8 100644 --- a/src/mame/shared/snk68_spr.h +++ b/src/mame/shared/snk68_spr.h @@ -13,7 +13,7 @@ class snk68_spr_device : public device_t public: typedef device_delegate tile_indirection_delegate; - snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snk68_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/shared/taito68705.cpp b/src/mame/shared/taito68705.cpp index ad426357faf..9b1090e8943 100644 --- a/src/mame/shared/taito68705.cpp +++ b/src/mame/shared/taito68705.cpp @@ -177,12 +177,12 @@ void taito68705_mcu_device_base::latch_control(u8 data, u8 &value, unsigned host } -taito68705_mcu_device::taito68705_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +taito68705_mcu_device::taito68705_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : taito68705_mcu_device(mconfig, TAITO68705_MCU, tag, owner, clock) { } -taito68705_mcu_device::taito68705_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +taito68705_mcu_device::taito68705_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : taito68705_mcu_device_base(mconfig, type, tag, owner, clock) , m_aux_out_cb(*this) , m_aux_strobe_cb(*this) @@ -261,7 +261,7 @@ void taito68705_mcu_device::mcu_portb_w(offs_t offset, u8 data, u8 mem_mask) /* The Tiger-Heli interface has some extensions, handle them here */ -taito68705_mcu_tiger_device::taito68705_mcu_tiger_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +taito68705_mcu_tiger_device::taito68705_mcu_tiger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : taito68705_mcu_device(mconfig, TAITO68705_MCU_TIGER, tag, owner, clock) { } diff --git a/src/mame/shared/taito68705.h b/src/mame/shared/taito68705.h index c9df56368d8..429627ca22c 100644 --- a/src/mame/shared/taito68705.h +++ b/src/mame/shared/taito68705.h @@ -66,10 +66,10 @@ public: template auto aux_out_cb() { return m_aux_out_cb[N].bind(); } auto aux_strobe_cb() { return m_aux_strobe_cb.bind(); } - taito68705_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito68705_mcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - taito68705_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + taito68705_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual u8 mcu_portc_r(); void mcu_portb_w(offs_t offset, u8 data, u8 mem_mask = ~0); @@ -87,7 +87,7 @@ protected: class taito68705_mcu_tiger_device : public taito68705_mcu_device { public: - taito68705_mcu_tiger_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + taito68705_mcu_tiger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 mcu_portc_r() override; @@ -124,7 +124,7 @@ protected: class arkanoid_68705p3_device : public arkanoid_mcu_device_base { public: - arkanoid_68705p3_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + arkanoid_68705p3_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -134,7 +134,7 @@ protected: class arkanoid_68705p5_device : public arkanoid_mcu_device_base { public: - arkanoid_68705p5_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + arkanoid_68705p5_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/shared/taitosnd.cpp b/src/mame/shared/taitosnd.cpp index 83313926599..46628f08795 100644 --- a/src/mame/shared/taitosnd.cpp +++ b/src/mame/shared/taitosnd.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(PC060HA, pc060ha_device, "pc060ha", "Taito PC060HA CIU") // tc0140syt_device - constructor //------------------------------------------------- -tc0140syt_device::tc0140syt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +tc0140syt_device::tc0140syt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_mainmode(0) , m_submode(0) @@ -60,7 +60,7 @@ tc0140syt_device::tc0140syt_device(const machine_config &mconfig, device_type ty std::fill(std::begin(m_masterdata), std::end(m_masterdata), 0); } -tc0140syt_device::tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0140syt_device::tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0140syt_device(mconfig, TC0140SYT, tag, owner, clock) { } @@ -302,7 +302,7 @@ u8 tc0140syt_device::slave_comm_r() // pc060ha_device - constructor //------------------------------------------------- -pc060ha_device::pc060ha_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pc060ha_device::pc060ha_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0140syt_device(mconfig, PC060HA, tag, owner, clock) { } diff --git a/src/mame/shared/taitosnd.h b/src/mame/shared/taitosnd.h index 33c1b3c437a..2d24d2afbd8 100644 --- a/src/mame/shared/taitosnd.h +++ b/src/mame/shared/taitosnd.h @@ -13,7 +13,7 @@ class tc0140syt_device : public device_t { public: - tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0140syt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_master_tag(T &&tag) { m_mastercpu.set_tag(std::forward(tag)); } template void set_slave_tag(T &&tag) { m_slavecpu.set_tag(std::forward(tag)); } @@ -29,7 +29,7 @@ public: void slave_comm_w(u8 data); protected: - tc0140syt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + tc0140syt_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -54,7 +54,7 @@ private: class pc060ha_device : public tc0140syt_device { public: - pc060ha_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pc060ha_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(TC0140SYT, tc0140syt_device) diff --git a/src/mame/shared/tecmo_spr.cpp b/src/mame/shared/tecmo_spr.cpp index 9d520f39eb5..a56ffe865a0 100644 --- a/src/mame/shared/tecmo_spr.cpp +++ b/src/mame/shared/tecmo_spr.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(TECMO_SPRITE, tecmo_spr_device, "tecmo_spr", "Tecmo Chained Sprites") -tecmo_spr_device::tecmo_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tecmo_spr_device::tecmo_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TECMO_SPRITE, tag, owner, clock) , m_bootleg(false) , m_yoffset(0) diff --git a/src/mame/shared/tecmo_spr.h b/src/mame/shared/tecmo_spr.h index 78e3e5b4e8a..8d2e5387eba 100644 --- a/src/mame/shared/tecmo_spr.h +++ b/src/mame/shared/tecmo_spr.h @@ -10,7 +10,7 @@ class tecmo_spr_device : public device_t { public: - tecmo_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tecmo_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_bootleg(bool bootleg) { m_bootleg = bootleg; } void set_yoffset(int yoffset) { m_yoffset = yoffset; } diff --git a/src/mame/shared/teleprinter.cpp b/src/mame/shared/teleprinter.cpp index 75b1654a7ef..950cda7a868 100644 --- a/src/mame/shared/teleprinter.cpp +++ b/src/mame/shared/teleprinter.cpp @@ -139,7 +139,7 @@ static const uint8_t teleprinter_font[128*8] = 0x2a,0x15,0x2a,0x15,0x2a,0x15,0x2a,0x15 }; -teleprinter_device::teleprinter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +teleprinter_device::teleprinter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_terminal_device(mconfig, TELEPRINTER, tag, owner, clock, WIDTH, HEIGHT) { } @@ -216,11 +216,11 @@ void teleprinter_device::device_add_mconfig(machine_config &config) screen.set_size(teleprinter_device::WIDTH*8, teleprinter_device::HEIGHT*8); screen.set_visarea(0, teleprinter_device::WIDTH*8-1, 0, teleprinter_device::HEIGHT*8-1); screen.set_screen_update(FUNC(teleprinter_device::tp_update)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(generic_terminal_device::kbd_put)); SPEAKER(config, "bell").front_center(); - BEEP(config, "beeper", 2'000).add_route(ALL_OUTPUTS, "bell", 0.50); + BEEP(config, "beeper", XTAL::u(2'000)).add_route(ALL_OUTPUTS, "bell", 0.50); } diff --git a/src/mame/shared/teleprinter.h b/src/mame/shared/teleprinter.h index 05eb6c63c8f..2eed652c05e 100644 --- a/src/mame/shared/teleprinter.h +++ b/src/mame/shared/teleprinter.h @@ -21,7 +21,7 @@ class teleprinter_device : public generic_terminal_device { public: - teleprinter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + teleprinter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void term_write(uint8_t data) override; diff --git a/src/mame/shared/timeplt_a.cpp b/src/mame/shared/timeplt_a.cpp index d55495efbf4..305b26440fd 100644 --- a/src/mame/shared/timeplt_a.cpp +++ b/src/mame/shared/timeplt_a.cpp @@ -22,17 +22,17 @@ DEFINE_DEVICE_TYPE(TIMEPLT_AUDIO, timeplt_audio_device, "timplt_audio", "Time Pilot Audio") DEFINE_DEVICE_TYPE(LOCOMOTN_AUDIO, locomotn_audio_device, "locomotn_audio", "Loco-Motion Audio") -timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timeplt_audio_device(mconfig, TIMEPLT_AUDIO, tag, owner, clock) { } -locomotn_audio_device::locomotn_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +locomotn_audio_device::locomotn_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timeplt_audio_device(mconfig, LOCOMOTN_AUDIO, tag, owner, clock) { } -timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +timeplt_audio_device::timeplt_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_soundcpu(*this, "tpsound") , m_soundlatch(*this, "soundlatch") diff --git a/src/mame/shared/timeplt_a.h b/src/mame/shared/timeplt_a.h index b4e5b7c0677..e62d0b950d1 100644 --- a/src/mame/shared/timeplt_a.h +++ b/src/mame/shared/timeplt_a.h @@ -13,14 +13,14 @@ class timeplt_audio_device : public device_t { public: - timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 14'318'181); + timeplt_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(14'318'181)); void sound_data_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(sh_irqtrigger_w); DECLARE_WRITE_LINE_MEMBER(mute_w); protected: - timeplt_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + timeplt_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -47,7 +47,7 @@ private: class locomotn_audio_device : public timeplt_audio_device { public: - locomotn_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 14'318'181); + locomotn_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(14'318'181)); protected: // device-level overrides diff --git a/src/mame/shared/vboysound.cpp b/src/mame/shared/vboysound.cpp index 5cb56eddabf..b7a1e9988b1 100644 --- a/src/mame/shared/vboysound.cpp +++ b/src/mame/shared/vboysound.cpp @@ -195,7 +195,7 @@ static inline void mputb(uint8_t *ptr, int8_t data) { *ptr = data; } // vboysnd_device - constructor //------------------------------------------------- -vboysnd_device::vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vboysnd_device::vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VBOYSND, tag, owner, clock) , device_sound_interface(mconfig, *this) { @@ -207,12 +207,12 @@ vboysnd_device::vboysnd_device(const machine_config &mconfig, const char *tag, d void vboysnd_device::device_start() { - uint32_t rate = clock() / 120; + XTAL rate = clock() / 120; // create the stream m_stream = stream_alloc(0, 2, rate); m_timer = timer_alloc(FUNC(vboysnd_device::delayed_stream_update), this); - m_timer->adjust(attotime::zero, 0, rate ? attotime::from_hz(rate / 4) : attotime::never); + m_timer->adjust(attotime::zero, 0, !rate.disabled() ? attotime::from_hz(rate.value() / 4) : attotime::never); for (int i=0; i<2048; i++) waveFreq2LenTbl[i] = ((2048 - i) * 32) / 120; @@ -234,10 +234,10 @@ void vboysnd_device::device_start() void vboysnd_device::device_clock_changed() { - uint32_t rate = clock() / 120; + XTAL rate = clock() / 120; m_stream->set_sample_rate(rate); - m_timer->adjust(attotime::zero, 0, rate ? attotime::from_hz(rate / 4) : attotime::never); + m_timer->adjust(attotime::zero, 0, !rate.disabled() ? attotime::from_hz(rate.value() / 4) : attotime::never); } diff --git a/src/mame/shared/vboysound.h b/src/mame/shared/vboysound.h index 11f8dbc44b8..5618c90a397 100644 --- a/src/mame/shared/vboysound.h +++ b/src/mame/shared/vboysound.h @@ -22,7 +22,7 @@ class vboysnd_device : public device_t, public device_sound_interface { public: // construction/destruction - vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 5'000'000); + vboysnd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(5'000'000)); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/mame/shared/vt100_kbd.cpp b/src/mame/shared/vt100_kbd.cpp index 70d5fb7cb4d..0d2380d37bd 100644 --- a/src/mame/shared/vt100_kbd.cpp +++ b/src/mame/shared/vt100_kbd.cpp @@ -164,12 +164,12 @@ INPUT_PORTS_END // vt100_keyboard_device - constructor //------------------------------------------------- -vt100_keyboard_device::vt100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vt100_keyboard_device::vt100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vt100_keyboard_device(mconfig, VT100_KEYBOARD, tag, owner, clock) { } -vt100_keyboard_device::vt100_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +vt100_keyboard_device::vt100_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_signal_out_cb(*this) , m_uart(*this, "uart") @@ -194,7 +194,7 @@ vt100_keyboard_device::vt100_keyboard_device(const machine_config &mconfig, devi void vt100_keyboard_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - BEEP(config, m_speaker, 786); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz + BEEP(config, m_speaker, XTAL::u(786)); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz m_speaker->add_route(ALL_OUTPUTS, "mono", 0.50); AY31015(config, m_uart); @@ -488,7 +488,7 @@ INPUT_PORTS_END // ms7002_device - constructor //------------------------------------------------- -ms7002_device::ms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ms7002_device::ms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vt100_keyboard_device(mconfig, MS7002, tag, owner, clock) , m_scan_enable(false) { diff --git a/src/mame/shared/vt100_kbd.h b/src/mame/shared/vt100_kbd.h index 9b6f15a490d..28bb9bf8dbc 100644 --- a/src/mame/shared/vt100_kbd.h +++ b/src/mame/shared/vt100_kbd.h @@ -27,7 +27,7 @@ class vt100_keyboard_device : public device_t { public: // construction/destruction - vt100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vt100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto signal_out_callback() { return m_signal_out_cb.bind(); } @@ -35,7 +35,7 @@ public: DECLARE_WRITE_LINE_MEMBER(signal_line_w); protected: - vt100_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + vt100_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -74,7 +74,7 @@ class ms7002_device : public vt100_keyboard_device { public: // construction/destruction - ms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ms7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; diff --git a/src/mame/shared/williamssound.cpp b/src/mame/shared/williamssound.cpp index 0944beccb7e..3a31c9329f8 100644 --- a/src/mame/shared/williamssound.cpp +++ b/src/mame/shared/williamssound.cpp @@ -76,7 +76,7 @@ DEFINE_DEVICE_TYPE(WILLIAMS_S11_SOUND, williams_s11_sound_device, "wmss11", "Wil // williams_cvsd_sound_device - constructor //------------------------------------------------- -williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +williams_cvsd_sound_device::williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WILLIAMS_CVSD_SOUND, tag, owner, clock), device_mixer_interface(mconfig, *this), m_cpu(*this, "cpu"), @@ -188,7 +188,7 @@ void williams_cvsd_sound_device::device_add_mconfig(machine_config &config) MC6809E(config, m_cpu, CVSD_MASTER_CLOCK / 4); m_cpu->set_addrmap(AS_PROGRAM, &williams_cvsd_sound_device::williams_cvsd_map); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia->writepb_handler().set(FUNC(williams_cvsd_sound_device::talkback_w)); m_pia->ca2_handler().set(m_ym2151, FUNC(ym2151_device::reset_w)); @@ -199,9 +199,9 @@ void williams_cvsd_sound_device::device_add_mconfig(machine_config &config) m_ym2151->irq_handler().set(m_pia, FUNC(pia6821_device::ca1_w)).invert(); // IRQ is not true state m_ym2151->add_route(ALL_OUTPUTS, *this, 0.10); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.25); + MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.25); - HC55516(config, m_hc55516, 0); + HC55516(config, m_hc55516); m_hc55516->add_route(ALL_OUTPUTS, *this, 0.60); } @@ -272,7 +272,7 @@ TIMER_CALLBACK_MEMBER(williams_cvsd_sound_device::sync_write) // williams_narc_sound_device - constructor //------------------------------------------------- -williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +williams_narc_sound_device::williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WILLIAMS_NARC_SOUND, tag, owner, clock), device_mixer_interface(mconfig, *this), m_cpu(*this, "cpu%u", 0U), @@ -519,10 +519,10 @@ void williams_narc_sound_device::device_add_mconfig(machine_config &config) ym2151.irq_handler().set_inputline("cpu0", M6809_FIRQ_LINE); ym2151.add_route(ALL_OUTPUTS, *this, 0.10); - AD7224(config, "dac1", 0).add_route(ALL_OUTPUTS, *this, 0.25); - AD7224(config, "dac2", 0).add_route(ALL_OUTPUTS, *this, 0.25); + AD7224(config, "dac1").add_route(ALL_OUTPUTS, *this, 0.25); + AD7224(config, "dac2").add_route(ALL_OUTPUTS, *this, 0.25); - HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, *this, 0.60); + HC55516(config, m_hc55516).add_route(ALL_OUTPUTS, *this, 0.60); } @@ -626,7 +626,7 @@ TIMER_CALLBACK_MEMBER(williams_narc_sound_device::sync_clear) // williams_adpcm_sound_device - constructor //------------------------------------------------- -williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +williams_adpcm_sound_device::williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WILLIAMS_ADPCM_SOUND, tag, owner, clock), device_mixer_interface(mconfig, *this), m_cpu(*this, "cpu"), @@ -772,7 +772,7 @@ void williams_adpcm_sound_device::device_add_mconfig(machine_config &config) ym2151.irq_handler().set_inputline("cpu", M6809_FIRQ_LINE); ym2151.add_route(ALL_OUTPUTS, *this, 0.10); - AD7524(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.10); + AD7524(config, "dac").add_route(ALL_OUTPUTS, *this, 0.10); okim6295_device &oki(OKIM6295(config, "oki", ADPCM_MASTER_CLOCK/8, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.set_addrmap(0, &williams_adpcm_sound_device::williams_adpcm_oki_map); @@ -859,7 +859,7 @@ TIMER_CALLBACK_MEMBER(williams_adpcm_sound_device::irq_clear) //------------------------------------------------- // williams_s4_sound_device - constructor //------------------------------------------------- -williams_s4_sound_device::williams_s4_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +williams_s4_sound_device::williams_s4_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WILLIAMS_S4_SOUND, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -898,12 +898,12 @@ void williams_s4_sound_device::williams_s4_map(address_map &map) //------------------------------------------------- void williams_s4_sound_device::device_add_mconfig(machine_config &config) { - M6808(config, m_cpu, 3580000); + M6808(config, m_cpu, XTAL::u(3580000)); m_cpu->set_addrmap(AS_PROGRAM, &williams_s4_sound_device::williams_s4_map); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.5); + MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.5); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia->irqa_handler().set_inputline(m_cpu, M6808_IRQ_LINE); m_pia->irqb_handler().set_inputline(m_cpu, M6808_IRQ_LINE); @@ -961,7 +961,7 @@ ioport_constructor williams_s4_sound_device::device_input_ports() const //------------------------------------------------- // williams_s6_sound_device - constructor //------------------------------------------------- -williams_s6_sound_device::williams_s6_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +williams_s6_sound_device::williams_s6_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WILLIAMS_S6_SOUND, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -1010,14 +1010,14 @@ void williams_s6_sound_device::williams_s6_map(address_map &map) //------------------------------------------------- void williams_s6_sound_device::device_add_mconfig(machine_config &config) { - M6802(config, m_cpu, 3580000); + M6802(config, m_cpu, XTAL::u(3580000)); m_cpu->set_addrmap(AS_PROGRAM, &williams_s6_sound_device::williams_s6_map); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.5); + MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.5); - HC55516(config, m_hc, 0).add_route(ALL_OUTPUTS, *this, 1.00); + HC55516(config, m_hc).add_route(ALL_OUTPUTS, *this, 1.00); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia->writepb_handler().set(FUNC(williams_s6_sound_device::pb_w)); m_pia->ca2_handler().set(m_hc, FUNC(hc55516_device::digit_w)); @@ -1081,7 +1081,7 @@ ioport_constructor williams_s6_sound_device::device_input_ports() const //------------------------------------------------- // williams_s9_sound_device - constructor //------------------------------------------------- -williams_s9_sound_device::williams_s9_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +williams_s9_sound_device::williams_s9_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WILLIAMS_S9_SOUND, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -1124,11 +1124,11 @@ void williams_s9_sound_device::device_add_mconfig(machine_config &config) M6802(config, m_cpu, XTAL(4'000'000)); m_cpu->set_addrmap(AS_PROGRAM, &williams_s9_sound_device::williams_s9_map); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.5); + MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.5); - HC55516(config, m_hc, 0).add_route(ALL_OUTPUTS, *this, 1.00); + HC55516(config, m_hc).add_route(ALL_OUTPUTS, *this, 1.00); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->set_port_a_input_overrides_output_mask(0xff); m_pia->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia->ca2_handler().set(m_hc, FUNC(hc55516_device::clock_w)); @@ -1185,7 +1185,7 @@ ioport_constructor williams_s9_sound_device::device_input_ports() const //------------------------------------------------- // williams_s11_sound_device - constructor //------------------------------------------------- -williams_s11_sound_device::williams_s11_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +williams_s11_sound_device::williams_s11_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WILLIAMS_S11_SOUND, tag, owner, clock) , device_mixer_interface(mconfig, *this) , m_cpu(*this, "cpu") @@ -1239,11 +1239,11 @@ void williams_s11_sound_device::device_add_mconfig(machine_config &config) M6802(config, m_cpu, XTAL(4'000'000)); m_cpu->set_addrmap(AS_PROGRAM, &williams_s11_sound_device::williams_s11_map); - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.5); + MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.5); - HC55516(config, m_hc, 0).add_route(ALL_OUTPUTS, *this, 1.00); + HC55516(config, m_hc).add_route(ALL_OUTPUTS, *this, 1.00); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->set_port_a_input_overrides_output_mask(0xff); m_pia->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w)); m_pia->ca2_handler().set(m_hc, FUNC(hc55516_device::clock_w)); diff --git a/src/mame/shared/williamssound.h b/src/mame/shared/williamssound.h index 8f499b803d8..561a007f51c 100644 --- a/src/mame/shared/williamssound.h +++ b/src/mame/shared/williamssound.h @@ -42,7 +42,7 @@ class williams_cvsd_sound_device : public device_t, { public: // construction/destruction - williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + williams_cvsd_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u16 data); @@ -89,7 +89,7 @@ class williams_narc_sound_device : public device_t, { public: // construction/destruction - williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + williams_narc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write u16 read(); @@ -151,7 +151,7 @@ class williams_adpcm_sound_device : public device_t, { public: // construction/destruction - williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + williams_adpcm_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u16 data); @@ -200,7 +200,7 @@ class williams_s4_sound_device : public device_t, public device_mixer_interface { public: // construction/destruction - williams_s4_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + williams_s4_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u8 data); @@ -229,7 +229,7 @@ class williams_s6_sound_device : public device_t, public device_mixer_interface { public: // construction/destruction - williams_s6_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + williams_s6_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u8 data); @@ -260,7 +260,7 @@ class williams_s9_sound_device : public device_t, public device_mixer_interface { public: // construction/destruction - williams_s9_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + williams_s9_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u8 data); @@ -291,7 +291,7 @@ class williams_s11_sound_device : public device_t, public device_mixer_interface { public: // construction/destruction - williams_s11_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + williams_s11_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write void write(u8 data); diff --git a/src/mame/shared/wswansound.cpp b/src/mame/shared/wswansound.cpp index 68f8bfeb990..d1a1c43c92a 100644 --- a/src/mame/shared/wswansound.cpp +++ b/src/mame/shared/wswansound.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(WSWAN_SND, wswan_sound_device, "wswan_sound", "WonderSwan Cus // wswan_sound_device - constructor //------------------------------------------------- -wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WSWAN_SND, tag, owner, clock), device_sound_interface(mconfig, *this), device_rom_interface(mconfig, *this), diff --git a/src/mame/shared/wswansound.h b/src/mame/shared/wswansound.h index 5cdd7952e66..a2e3037b061 100644 --- a/src/mame/shared/wswansound.h +++ b/src/mame/shared/wswansound.h @@ -18,7 +18,7 @@ class wswan_sound_device : public device_t, public device_rom_interface<14,1> { public: - wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void port_w(offs_t offset, u16 data, u16 mem_mask); u16 port_r(offs_t offset, u16 mem_mask); diff --git a/src/mame/shared/xbox.cpp b/src/mame/shared/xbox.cpp index 4c1bd217039..010d650b6f4 100644 --- a/src/mame/shared/xbox.cpp +++ b/src/mame/shared/xbox.cpp @@ -670,7 +670,7 @@ IRQ_CALLBACK_MEMBER(xbox_base_state::irq_callback) DEFINE_DEVICE_TYPE(XBOX_PIC16LC, xbox_pic16lc_device, "pic16lc", "XBOX PIC16LC") -xbox_pic16lc_device::xbox_pic16lc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xbox_pic16lc_device::xbox_pic16lc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XBOX_PIC16LC, tag, owner, clock) { } @@ -721,7 +721,7 @@ void xbox_pic16lc_device::device_reset() DEFINE_DEVICE_TYPE(XBOX_CX25871, xbox_cx25871_device, "cx25871", "XBOX CX25871") -xbox_cx25871_device::xbox_cx25871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xbox_cx25871_device::xbox_cx25871_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XBOX_CX25871, tag, owner, clock) { } @@ -760,7 +760,7 @@ static int dummyeeprom[256] = { DEFINE_DEVICE_TYPE(XBOX_EEPROM, xbox_eeprom_device, "eeprom", "XBOX EEPROM") -xbox_eeprom_device::xbox_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xbox_eeprom_device::xbox_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XBOX_EEPROM, tag, owner, clock) { } @@ -800,7 +800,7 @@ void xbox_eeprom_device::device_reset() DEFINE_DEVICE_TYPE(XBOX_SUPERIO, xbox_superio_device, "superio_device", "XBOX debug SuperIO") -xbox_superio_device::xbox_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xbox_superio_device::xbox_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XBOX_SUPERIO, tag, owner, clock) , configuration_mode(false) , index(0) @@ -959,26 +959,26 @@ void xbox_base_state::xbox_base_map_io(address_map &map) void xbox_base_state::xbox_base(machine_config &config) { /* basic machine hardware */ - PENTIUM3(config, m_maincpu, 733333333); /* Wrong! family 6 model 8 stepping 10 */ + PENTIUM3(config, m_maincpu, XTAL::u(733333333)); /* Wrong! family 6 model 8 stepping 10 */ m_maincpu->set_irq_acknowledge_callback(FUNC(xbox_base_state::irq_callback)); config.set_maximum_quantum(attotime::from_hz(6000)); - PCI_ROOT(config, "pci", 0); + PCI_ROOT(config, "pci"); NV2A_HOST(config, "pci:00.0", 0, m_maincpu); NV2A_RAM(config, "pci:00.3", 0, 128); // 128 megabytes MCPX_ISALPC(config, "pci:01.0", 0, 0).interrupt_output().set(FUNC(xbox_base_state::maincpu_interrupt)); - XBOX_SUPERIO(config, "pci:01.0:0", 0); + XBOX_SUPERIO(config, "pci:01.0:0"); MCPX_SMBUS(config, "pci:01.1", 0, 0).interrupt_handler().set("pci:01.0", FUNC(mcpx_isalpc_device::irq11)); //.set(FUNC(xbox_base_state::smbus_interrupt_changed)); - XBOX_PIC16LC(config, "pci:01.1:110", 0); // these 3 are on smbus number 1 - XBOX_CX25871(config, "pci:01.1:145", 0); - XBOX_EEPROM(config, "pci:01.1:154", 0); + XBOX_PIC16LC(config, "pci:01.1:110"); // these 3 are on smbus number 1 + XBOX_CX25871(config, "pci:01.1:145"); + XBOX_EEPROM(config, "pci:01.1:154"); MCPX_OHCI(config, "pci:02.0", 0, 0).interrupt_handler().set("pci:01.0", FUNC(mcpx_isalpc_device::irq1)); //.set(FUNC(xbox_base_state::ohci_usb_interrupt_changed)); MCPX_OHCI(config, "pci:03.0", 0, 0); - MCPX_ETH(config, "pci:04.0", 0); + MCPX_ETH(config, "pci:04.0"); MCPX_APU(config, "pci:05.0", 0, 0, m_maincpu); MCPX_AC97_AUDIO(config, "pci:06.0", 0, 0); - MCPX_AC97_MODEM(config, "pci:06.1", 0); + MCPX_AC97_MODEM(config, "pci:06.1"); PCI_BRIDGE(config, "pci:08.0", 0, 0x10de01b8, 0); MCPX_IDE(config, "pci:09.0", 0, 0).pri_interrupt_handler().set("pci:01.0", FUNC(mcpx_isalpc_device::irq14)); //.set(FUNC(xbox_base_state::ide_interrupt_changed)); NV2A_AGP(config, "pci:1e.0", 0, 0x10de01b7, 0); diff --git a/src/mame/shared/xbox.h b/src/mame/shared/xbox.h index 94970626b0d..e624a668738 100644 --- a/src/mame/shared/xbox.h +++ b/src/mame/shared/xbox.h @@ -19,7 +19,7 @@ class xbox_pic16lc_device : public device_t, public smbus_interface { public: - xbox_pic16lc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xbox_pic16lc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; protected: @@ -39,7 +39,7 @@ DECLARE_DEVICE_TYPE(XBOX_PIC16LC, xbox_pic16lc_device) class xbox_cx25871_device : public device_t, public smbus_interface { public: - xbox_cx25871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xbox_cx25871_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; protected: @@ -58,7 +58,7 @@ DECLARE_DEVICE_TYPE(XBOX_CX25871, xbox_cx25871_device) class xbox_eeprom_device : public device_t, public smbus_interface { public: - xbox_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xbox_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual int execute_command(int command, int rw, int data) override; std::function hack_eeprom; @@ -79,7 +79,7 @@ DECLARE_DEVICE_TYPE(XBOX_EEPROM, xbox_eeprom_device) class xbox_superio_device : public device_t, public lpcbus_device_interface { public: - xbox_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xbox_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_extra(address_space *memory_space, address_space *io_space) override; virtual void set_host(int index, lpcbus_host_interface *host) override; diff --git a/src/mame/shared/xbox_pci.cpp b/src/mame/shared/xbox_pci.cpp index 23149e53e96..96fad5723ec 100644 --- a/src/mame/shared/xbox_pci.cpp +++ b/src/mame/shared/xbox_pci.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(NV2A_HOST, nv2a_host_device, "nv2a_host", "NV2A PCI Bridge Device - Host Bridge") -nv2a_host_device::nv2a_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nv2a_host_device::nv2a_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, NV2A_HOST, tag, owner, clock), cpu(*this, finder_base::DUMMY_TAG) { @@ -66,7 +66,7 @@ void nv2a_ram_device::config_map(address_map &map) map(0x6c, 0x6f).rw(FUNC(nv2a_ram_device::config_register_r), FUNC(nv2a_ram_device::config_register_w)); } -nv2a_ram_device::nv2a_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nv2a_ram_device::nv2a_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, NV2A_RAM, tag, owner, clock) { set_ids(0x10de02a6, 0, 0, 0); @@ -124,7 +124,7 @@ void mcpx_isalpc_device::map_extra(uint64_t memory_window_start, uint64_t memory lpcdevices[a]->map_extra(memory_space, io_space); } -mcpx_isalpc_device::mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id) +mcpx_isalpc_device::mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id) : mcpx_isalpc_device(mconfig, tag, owner, clock) { // revision id must be at least 0xb4 in the xbox, otherwise usb will require a hub @@ -132,7 +132,7 @@ mcpx_isalpc_device::mcpx_isalpc_device(const machine_config &mconfig, const char set_ids(0x10de01b2, 0xb4, 0x060100, subsystem_id); } -mcpx_isalpc_device::mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcpx_isalpc_device::mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_ISALPC, tag, owner, clock), m_smi_callback(*this), m_interrupt_output(*this), @@ -205,16 +205,16 @@ void mcpx_isalpc_device::device_reset() void mcpx_isalpc_device::device_add_mconfig(machine_config &config) { - pic8259_device &pic8259_1(PIC8259(config, "pic8259_1", 0)); + pic8259_device &pic8259_1(PIC8259(config, "pic8259_1")); pic8259_1.out_int_callback().set(FUNC(mcpx_isalpc_device::interrupt_ouptut_changed)); pic8259_1.in_sp_callback().set_constant(1); pic8259_1.read_slave_ack_callback().set(FUNC(mcpx_isalpc_device::get_slave_ack)); - pic8259_device &pic8259_2(PIC8259(config, "pic8259_2", 0)); + pic8259_device &pic8259_2(PIC8259(config, "pic8259_2")); pic8259_2.out_int_callback().set(pic8259_1, FUNC(pic8259_device::ir2_w)); pic8259_2.in_sp_callback().set_constant(0); - pit8254_device &pit8254(PIT8254(config, "pit8254", 0)); + pit8254_device &pit8254(PIT8254(config, "pit8254")); pit8254.set_clk<0>(1125000); /* heartbeat IRQ */ pit8254.out_handler<0>().set(FUNC(mcpx_isalpc_device::pit8254_out0_changed)); pit8254.set_clk<1>(1125000); /* originally dram refresh, now only legacy support */ @@ -222,7 +222,7 @@ void mcpx_isalpc_device::device_add_mconfig(machine_config &config) pit8254.set_clk<2>(1125000); /* (unused) pio port c pin 4, and speaker polling enough */ pit8254.out_handler<2>().set(FUNC(mcpx_isalpc_device::pit8254_out2_changed)); - ds12885ext_device &ds12885(DS12885EXT(config, "rtc", 0)); + ds12885ext_device &ds12885(DS12885EXT(config, "rtc")); ds12885.irq().set(pic8259_2, FUNC(pic8259_device::ir0_w)); /* @@ -517,13 +517,13 @@ void mcpx_smbus_device::smbus_io2(address_map &map) map(0x00000000, 0x0000001f).noprw(); } -mcpx_smbus_device::mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id) +mcpx_smbus_device::mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id) : mcpx_smbus_device(mconfig, tag, owner, clock) { set_ids(0x10de01b4, 0xc1, 0x0c0500, subsystem_id); } -mcpx_smbus_device::mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcpx_smbus_device::mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_SMBUS, tag, owner, clock), m_interrupt_handler(*this) { @@ -685,13 +685,13 @@ void mcpx_ohci_device::ohci_mmio(address_map &map) map(0x00000000, 0x00000fff).rw(FUNC(mcpx_ohci_device::ohci_r), FUNC(mcpx_ohci_device::ohci_w)); } -mcpx_ohci_device::mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id) +mcpx_ohci_device::mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id) : mcpx_ohci_device(mconfig, tag, owner, clock) { set_ids(0x10de01c2, 0xc3, 0x0c0310, subsystem_id); } -mcpx_ohci_device::mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcpx_ohci_device::mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_OHCI, tag, owner, clock), ohci_usb(nullptr), m_interrupt_handler(*this), @@ -798,7 +798,7 @@ void mcpx_eth_device::eth_io(address_map &map) map(0x00000000, 0x000000007).rw(FUNC(mcpx_eth_device::eth_io_r), FUNC(mcpx_eth_device::eth_io_w)); } -mcpx_eth_device::mcpx_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcpx_eth_device::mcpx_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_ETH, tag, owner, clock) { set_ids(0x10de01c3, 0, 0, 0); @@ -854,7 +854,7 @@ void mcpx_apu_device::apu_mmio(address_map &map) map(0x00000000, 0x00007ffff).rw(FUNC(mcpx_apu_device::apu_r), FUNC(mcpx_apu_device::apu_w)); } -mcpx_apu_device::mcpx_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mcpx_apu_device::mcpx_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_APU, tag, owner, clock), cpu(*this, finder_base::DUMMY_TAG) { @@ -1056,13 +1056,13 @@ void mcpx_ac97_audio_device::ac97_io1(address_map &map) map(0x00000000, 0x00000007f).rw(FUNC(mcpx_ac97_audio_device::ac97_audio_io1_r), FUNC(mcpx_ac97_audio_device::ac97_audio_io1_w)); } -mcpx_ac97_audio_device::mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id) +mcpx_ac97_audio_device::mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id) : mcpx_ac97_audio_device(mconfig, tag, owner, clock) { set_ids(0x10de01b1, 0xc2, 0x040100, subsystem_id); } -mcpx_ac97_audio_device::mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcpx_ac97_audio_device::mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_AC97_AUDIO, tag, owner, clock) { } @@ -1159,7 +1159,7 @@ void mcpx_ac97_audio_device::ac97_audio_io1_w(uint32_t data) DEFINE_DEVICE_TYPE(MCPX_AC97_MODEM, mcpx_ac97_modem_device, "mcpx_ac97_modem", "MCPX AC'97 Modem Controller") -mcpx_ac97_modem_device::mcpx_ac97_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcpx_ac97_modem_device::mcpx_ac97_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_AC97_MODEM, tag, owner, clock) { set_ids(0x10de01c1, 0, 0, 0); @@ -1207,13 +1207,13 @@ void mcpx_ide_device::ide_io(address_map &map) map(0x0008, 0x000f).rw("ide2", FUNC(bus_master_ide_controller_device::bmdma_r), FUNC(bus_master_ide_controller_device::bmdma_w)); } -mcpx_ide_device::mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id) +mcpx_ide_device::mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id) : mcpx_ide_device(mconfig, tag, owner, clock) { set_ids(0x10de01bc, 0xc3, 0x01018a, subsystem_id); } -mcpx_ide_device::mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcpx_ide_device::mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, MCPX_IDE, tag, owner, clock), m_pri(*this, "ide1"), m_sec(*this, "ide2"), @@ -1244,11 +1244,11 @@ void mcpx_ide_device::device_reset() void mcpx_ide_device::device_add_mconfig(machine_config &config) { - bus_master_ide_controller_device &ide1(BUS_MASTER_IDE_CONTROLLER(config, "ide1", 0)); + bus_master_ide_controller_device &ide1(BUS_MASTER_IDE_CONTROLLER(config, "ide1")); ide1.irq_handler().set(FUNC(mcpx_ide_device::ide_pri_interrupt)); ide1.set_bus_master_space(":maincpu", AS_PROGRAM); - bus_master_ide_controller_device &ide2(BUS_MASTER_IDE_CONTROLLER(config, "ide2", 0)); + bus_master_ide_controller_device &ide2(BUS_MASTER_IDE_CONTROLLER(config, "ide2")); ide2.irq_handler().set(FUNC(mcpx_ide_device::ide_sec_interrupt)); ide2.set_bus_master_space(":maincpu", AS_PROGRAM); } @@ -1352,7 +1352,7 @@ void nv2a_agp_device::config_map(address_map& map) map(0x40, 0xff).rw(FUNC(nv2a_agp_device::unknown_r), FUNC(nv2a_agp_device::unknown_w)); } -nv2a_agp_device::nv2a_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nv2a_agp_device::nv2a_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : agp_bridge_device(mconfig, NV2A_AGP, tag, owner, clock) { } @@ -1401,7 +1401,7 @@ void nv2a_gpu_device::nv2a_mirror(address_map &map) map(0x00000000, 0x07ffffff).ram().rw(FUNC(nv2a_gpu_device::nv2a_mirror_r), FUNC(nv2a_gpu_device::nv2a_mirror_w)); } -nv2a_gpu_device::nv2a_gpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nv2a_gpu_device::nv2a_gpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : agp_device(mconfig, NV2A_GPU, tag, owner, clock), nvidia_nv2a(nullptr), cpu(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/shared/xbox_pci.h b/src/mame/shared/xbox_pci.h index 23c1cb43c37..e1ae20e7d45 100644 --- a/src/mame/shared/xbox_pci.h +++ b/src/mame/shared/xbox_pci.h @@ -19,13 +19,13 @@ class nv2a_host_device : public pci_host_device { public: template - nv2a_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + nv2a_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : nv2a_host_device(mconfig, tag, owner, clock) { set_ids_host(0x10de02a5, 0, 0); set_cpu_tag(std::forward(cpu_tag)); } - nv2a_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nv2a_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; template void set_cpu_tag(T &&cpu_tag) { cpu.set_tag(std::forward(cpu_tag)); } @@ -46,12 +46,12 @@ DECLARE_DEVICE_TYPE(NV2A_HOST, nv2a_host_device) class nv2a_ram_device : public pci_device { public: - nv2a_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int memory_size) + nv2a_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int memory_size) : nv2a_ram_device(mconfig, tag, owner, clock) { ram_size = memory_size; } - nv2a_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nv2a_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void config_map(address_map &map) override; @@ -89,8 +89,8 @@ public: class mcpx_isalpc_device : public pci_device, public lpcbus_host_interface { public: - mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id); - mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id); + mcpx_isalpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto smi() { return m_smi_callback.bind(); } auto interrupt_output() { return m_interrupt_output.bind(); } @@ -172,8 +172,8 @@ public: class mcpx_smbus_device : public pci_device { public: - mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id); - mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id); + mcpx_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto interrupt_handler() { return m_interrupt_handler.bind(); } @@ -217,8 +217,8 @@ DECLARE_DEVICE_TYPE(MCPX_SMBUS, mcpx_smbus_device) class usb_function_device; class mcpx_ohci_device : public pci_device { public: - mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id); - mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id); + mcpx_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_hack_callback(std::function hack) { hack_callback = hack; } void plug_usb_device(int port, device_usb_ohci_function_interface *function); @@ -260,7 +260,7 @@ DECLARE_DEVICE_TYPE(MCPX_OHCI, mcpx_ohci_device) class mcpx_eth_device : public pci_device { public: - mcpx_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t eth_r(); void eth_w(uint32_t data); @@ -285,13 +285,13 @@ DECLARE_DEVICE_TYPE(MCPX_ETH, mcpx_eth_device) class mcpx_apu_device : public pci_device { public: template - mcpx_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id, T &&cpu_tag) + mcpx_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id, T &&cpu_tag) : mcpx_apu_device(mconfig, tag, owner, clock) { set_ids(0x10de01b0, 0xc2, 0x040100, subsystem_id); set_cpu_tag(std::forward(cpu_tag)); } - mcpx_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&cpu_tag) { cpu.set_tag(std::forward(cpu_tag)); } uint32_t apu_r(offs_t offset, uint32_t mem_mask = ~0); @@ -342,8 +342,8 @@ DECLARE_DEVICE_TYPE(MCPX_APU, mcpx_apu_device) class mcpx_ac97_audio_device : public pci_device { public: - mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id); - mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id); + mcpx_ac97_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t ac97_audio_r(offs_t offset, uint32_t mem_mask = ~0); void ac97_audio_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); @@ -378,7 +378,7 @@ DECLARE_DEVICE_TYPE(MCPX_AC97_AUDIO, mcpx_ac97_audio_device) class mcpx_ac97_modem_device : public pci_device { public: - mcpx_ac97_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_ac97_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(MCPX_AC97_MODEM, mcpx_ac97_modem_device) @@ -389,8 +389,8 @@ DECLARE_DEVICE_TYPE(MCPX_AC97_MODEM, mcpx_ac97_modem_device) class mcpx_ide_device : public pci_device { public: - mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subsystem_id); - mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subsystem_id); + mcpx_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto pri_interrupt_handler() { return m_pri_interrupt_handler.bind(); } auto sec_interrupt_handler() { return m_sec_interrupt_handler.bind(); } @@ -435,12 +435,12 @@ DECLARE_DEVICE_TYPE(MCPX_IDE, mcpx_ide_device) class nv2a_agp_device : public agp_bridge_device { public: - nv2a_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision) + nv2a_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision) : nv2a_agp_device(mconfig, tag, owner, clock) { set_ids_bridge(main_id, revision); } - nv2a_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nv2a_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void config_map(address_map& map) override; @@ -461,12 +461,12 @@ DECLARE_DEVICE_TYPE(NV2A_AGP, nv2a_agp_device) class nv2a_gpu_device : public agp_device { public: template - nv2a_gpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + nv2a_gpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : nv2a_gpu_device(mconfig, tag, owner, clock) { set_cpu_tag(std::forward(cpu_tag)); } - nv2a_gpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nv2a_gpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu_tag(T &&cpu_tag) { cpu.set_tag(std::forward(cpu_tag)); } nv2a_renderer *debug_get_renderer() { return nvidia_nv2a; } diff --git a/src/mame/shared/xbox_usb.cpp b/src/mame/shared/xbox_usb.cpp index 48be6a458b7..4624f01a2b4 100644 --- a/src/mame/shared/xbox_usb.cpp +++ b/src/mame/shared/xbox_usb.cpp @@ -1337,7 +1337,7 @@ int device_usb_ohci_function_interface::execute_transfer(int endpoint, int pid, DEFINE_DEVICE_TYPE(OHCI_USB_CONNECTOR, ohci_usb_connector, "usb_connector", "Usb Connector Abstraction"); -ohci_usb_connector::ohci_usb_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ohci_usb_connector::ohci_usb_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OHCI_USB_CONNECTOR, tag, owner, clock), device_single_card_slot_interface(mconfig, *this) { @@ -1421,7 +1421,7 @@ const USBStandardEndpointDescriptor ohci_game_controller_device::enddesc02 = { 7 DEFINE_DEVICE_TYPE(OHCI_GAME_CONTROLLER, ohci_game_controller_device, "ohci_gc", "OHCI Game Controller") -ohci_game_controller_device::ohci_game_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ohci_game_controller_device::ohci_game_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OHCI_GAME_CONTROLLER, tag, owner, clock), device_usb_ohci_function_interface(mconfig, *this), m_ThumbstickLh(*this, "ThumbstickLh"), diff --git a/src/mame/shared/xbox_usb.h b/src/mame/shared/xbox_usb.h index 495e68ad749..34b3ce5e5e0 100644 --- a/src/mame/shared/xbox_usb.h +++ b/src/mame/shared/xbox_usb.h @@ -475,7 +475,7 @@ class ohci_usb_connector : public device_t, public device_single_card_slot_inter public: template ohci_usb_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed) - : ohci_usb_connector(mconfig, tag, owner, 0) + : ohci_usb_connector(mconfig, tag, owner) { option_reset(); opts(*this); @@ -483,7 +483,7 @@ public: set_fixed(fixed); } - ohci_usb_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ohci_usb_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~ohci_usb_connector(); protected: @@ -501,7 +501,7 @@ DECLARE_DEVICE_TYPE(OHCI_GAME_CONTROLLER, ohci_game_controller_device) class ohci_game_controller_device : public device_t, public device_usb_ohci_function_interface { public: - ohci_game_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ohci_game_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void initialize() override; int handle_nonstandard_request(int endpoint, USBSetupPacket *setup) override; int handle_interrupt_pid(int endpoint, int pid, uint8_t *buffer, int size) override; diff --git a/src/mame/sharp/fontwriter.cpp b/src/mame/sharp/fontwriter.cpp index d949b94de89..8a6b35ad1bd 100644 --- a/src/mame/sharp/fontwriter.cpp +++ b/src/mame/sharp/fontwriter.cpp @@ -112,7 +112,7 @@ void fontwriter_state::fontwriter(machine_config &config) m_maincpu->p6_in_cb().set(FUNC(fontwriter_state::vbl_r)); m_maincpu->p7_in_cb().set(FUNC(fontwriter_state::vbl2_r)); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -129,7 +129,7 @@ void fontwriter_state::fw600(machine_config &config) m_maincpu->p6_in_cb().set(FUNC(fontwriter_state::vbl_r)); m_maincpu->p7_in_cb().set(FUNC(fontwriter_state::vbl2_r)); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); diff --git a/src/mame/sharp/mz2000.cpp b/src/mame/sharp/mz2000.cpp index b2e44400696..fc78bb5d7ce 100644 --- a/src/mame/sharp/mz2000.cpp +++ b/src/mame/sharp/mz2000.cpp @@ -900,13 +900,13 @@ void mz2000_state::mz2000(machine_config &config) pio.in_pb_callback().set(FUNC(mz2000_state::mz2000_pio1_portb_r)); /* TODO: clocks aren't known */ - PIT8253(config, m_pit8253, 0); + PIT8253(config, m_pit8253); m_pit8253->set_clk<0>(31250); m_pit8253->set_clk<1>(31250); /* needed by "Art Magic" to boot */ m_pit8253->set_clk<2>(31250); SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 4096).add_route(ALL_OUTPUTS,"mono",0.15); + BEEP(config, "beeper", XTAL::u(4096)).add_route(ALL_OUTPUTS,"mono",0.15); MB8877(config, m_mb8877a, 1_MHz_XTAL); diff --git a/src/mame/sharp/mz2500.cpp b/src/mame/sharp/mz2500.cpp index 6af6040f257..c15f03ab693 100644 --- a/src/mame/sharp/mz2500.cpp +++ b/src/mame/sharp/mz2500.cpp @@ -1795,7 +1795,7 @@ static void mz2500_floppies(device_slot_interface &device) void mz2500_state::mz2500(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 6000000); + Z80(config, m_maincpu, XTAL::u(6000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mz2500_state::mz2500_map); m_maincpu->set_addrmap(AS_IO, &mz2500_state::mz2500_io); m_maincpu->set_vblank_int("screen", FUNC(mz2500_state::mz2500_vbl)); @@ -1814,17 +1814,17 @@ void mz2500_state::mz2500(machine_config &config) ppi.in_pc_callback().set(FUNC(mz2500_state::mz2500_portc_r)); ppi.out_pc_callback().set(FUNC(mz2500_state::mz2500_portc_w)); - z80pio_device& pio(Z80PIO(config, "z80pio_1", 6000000)); + z80pio_device& pio(Z80PIO(config, "z80pio_1", XTAL::u(6000000))); pio.in_pa_callback().set(FUNC(mz2500_state::mz2500_pio1_porta_r)); pio.out_pa_callback().set(FUNC(mz2500_state::mz2500_pio1_porta_w)); pio.in_pb_callback().set(FUNC(mz2500_state::mz2500_pio1_porta_r)); - Z80SIO(config, "z80sio", 6000000); + Z80SIO(config, "z80sio", XTAL::u(6000000)); RP5C15(config, m_rtc, 32.768_kHz_XTAL); m_rtc->alarm().set(FUNC(mz2500_state::mz2500_rtc_alarm_irq)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(31250); m_pit->out_handler<0>().set(FUNC(mz2500_state::pit8253_clk0_irq)); // TODO: is this really right? @@ -1854,7 +1854,7 @@ void mz2500_state::mz2500(machine_config &config) SPEAKER(config, "mono").front_center(); - ym2203_device &ym(YM2203(config, "ym", 2000000)); //unknown clock / divider + ym2203_device &ym(YM2203(config, "ym", XTAL::u(2000000))); //unknown clock / divider ym.port_a_read_callback().set(FUNC(mz2500_state::opn_porta_r)); ym.port_b_read_callback().set_ioport("DSW1"); ym.port_a_write_callback().set(FUNC(mz2500_state::opn_porta_w)); @@ -1863,7 +1863,7 @@ void mz2500_state::mz2500(machine_config &config) ym.add_route(2, "mono", 0.50); ym.add_route(3, "mono", 0.50); - BEEP(config, m_beeper, 4096).add_route(ALL_OUTPUTS,"mono",0.50); + BEEP(config, m_beeper, XTAL::u(4096)).add_route(ALL_OUTPUTS,"mono",0.50); } diff --git a/src/mame/sharp/mz3500.cpp b/src/mame/sharp/mz3500.cpp index beadc6d4177..ae354e780c2 100644 --- a/src/mame/sharp/mz3500.cpp +++ b/src/mame/sharp/mz3500.cpp @@ -771,7 +771,7 @@ void mz3500_state::machine_reset() elem->get_device()->set_rpm(300); } - m_fdc->set_rate(250000); + m_fdc->set_rate(XTAL::u(250000)); m_beeper->set_state(0); } @@ -812,7 +812,7 @@ void mz3500_state::mz3500(machine_config &config) ppi.out_pb_callback().set(FUNC(mz3500_state::mz3500_pb_w)); ppi.out_pc_callback().set(FUNC(mz3500_state::mz3500_pc_w)); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set_inputline(m_master, INPUT_LINE_IRQ0); FLOPPY_CONNECTOR(config, "upd765a:0", mz3500_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, "upd765a:1", mz3500_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats); @@ -843,7 +843,7 @@ void mz3500_state::mz3500(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2400).add_route(ALL_OUTPUTS, "mono", 0.15); + BEEP(config, m_beeper, XTAL::u(2400)).add_route(ALL_OUTPUTS, "mono", 0.15); } diff --git a/src/mame/sharp/mz6500.cpp b/src/mame/sharp/mz6500.cpp index 68b2cfae71f..e0e567f2529 100644 --- a/src/mame/sharp/mz6500.cpp +++ b/src/mame/sharp/mz6500.cpp @@ -149,7 +149,7 @@ void mz6500_state::upd7220_map(address_map &map) void mz6500_state::mz6500(machine_config &config) { /* basic machine hardware */ - I8086(config, m_maincpu, 8000000); //unk clock + I8086(config, m_maincpu, XTAL::u(8000000)); //unk clock m_maincpu->set_addrmap(AS_PROGRAM, &mz6500_state::mem_map); m_maincpu->set_addrmap(AS_IO, &mz6500_state::io_map); diff --git a/src/mame/sharp/mz700.cpp b/src/mame/sharp/mz700.cpp index 92375129941..fa973e5ee87 100644 --- a/src/mame/sharp/mz700.cpp +++ b/src/mame/sharp/mz700.cpp @@ -400,7 +400,7 @@ void mz_state::mz700(machine_config &config) TIMER(config, "other").configure_periodic(FUNC(mz_state::ne556_other_callback), attotime::from_hz(34.5)); /* devices */ - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(XTAL(17'734'470)/20); m_pit->out_handler<0>().set(FUNC(mz_state::pit_out0_changed)); m_pit->set_clk<1>(15611.0); diff --git a/src/mame/sharp/mz80.cpp b/src/mame/sharp/mz80.cpp index c8980acffda..19143719268 100644 --- a/src/mame/sharp/mz80.cpp +++ b/src/mame/sharp/mz80.cpp @@ -309,7 +309,7 @@ void mz80_state::mz80k(machine_config &config) m_ppi->in_pc_callback().set(FUNC(mz80_state::mz80k_8255_portc_r)); m_ppi->out_pc_callback().set(FUNC(mz80_state::mz80k_8255_portc_w)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(XTAL(8'000'000)/4); m_pit->out_handler<0>().set(FUNC(mz80_state::pit_out0_changed)); m_pit->set_clk<1>(XTAL(8'000'000)/256); diff --git a/src/mame/sharp/pce220.cpp b/src/mame/sharp/pce220.cpp index 7d925240456..20f37fe6ca1 100644 --- a/src/mame/sharp/pce220.cpp +++ b/src/mame/sharp/pce220.cpp @@ -935,7 +935,7 @@ void pce220_state::pce220(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beep, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 0.50); TIMER(config, "pce220_timer").configure_periodic(FUNC(pce220_state::pce220_timer_callback), attotime::from_msec(468)); @@ -944,7 +944,7 @@ void pce220_state::pce220(machine_config &config) /* internal ram */ RAM(config, RAM_TAG).set_default_size("64K"); // 32K internal + 32K external card - PCE220SERIAL(config, m_serial, 0); + PCE220SERIAL(config, m_serial); config.set_default_layout(layout_pce220); } diff --git a/src/mame/sharp/pce220_ser.cpp b/src/mame/sharp/pce220_ser.cpp index b88088fcafd..88be3905075 100644 --- a/src/mame/sharp/pce220_ser.cpp +++ b/src/mame/sharp/pce220_ser.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(PCE220SERIAL, pce220_serial_device, "pce220_serial", "Sharp P // pce220_serial_device - constructor //------------------------------------------------- -pce220_serial_device::pce220_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pce220_serial_device::pce220_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCE220SERIAL, tag, owner, clock) , device_image_interface(mconfig, *this) { diff --git a/src/mame/sharp/pce220_ser.h b/src/mame/sharp/pce220_ser.h index 9ba165cd0af..12d97ffc63d 100644 --- a/src/mame/sharp/pce220_ser.h +++ b/src/mame/sharp/pce220_ser.h @@ -25,7 +25,7 @@ class pce220_serial_device : public device_t, { public: // construction/destruction - pce220_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pce220_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~pce220_serial_device(); // image-level overrides diff --git a/src/mame/sharp/pocketc.cpp b/src/mame/sharp/pocketc.cpp index e568bb000b0..269bd9ffbf5 100644 --- a/src/mame/sharp/pocketc.cpp +++ b/src/mame/sharp/pocketc.cpp @@ -741,7 +741,7 @@ void pocketc_state::pocketc_base(machine_config &config) void pc1401_state::pc1401(machine_config &config) { pocketc_base(config); - SC61860(config, m_maincpu, 192000); /* 7.8336 MHz */ + SC61860(config, m_maincpu, XTAL::u(192000)); /* 7.8336 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &pc1401_state::pc1401_mem); m_maincpu->reset_cb().set(FUNC(pc1401_state::reset_r)); m_maincpu->brk_cb().set(FUNC(pc1401_state::brk_r)); @@ -764,7 +764,7 @@ void pc1401_state::pc1402(machine_config &config) void pc1251_state::pc1250(machine_config &config) { pocketc_base(config); - SC61860(config, m_maincpu, 192000); /* 7.8336 MHz */ + SC61860(config, m_maincpu, XTAL::u(192000)); /* 7.8336 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &pc1251_state::pc1250_mem); m_maincpu->reset_cb().set_constant(0); m_maincpu->brk_cb().set(FUNC(pc1251_state::brk_r)); @@ -809,7 +809,7 @@ void pc1260_state::pc1261(machine_config &config) void pc1350_state::pc1350(machine_config &config) { pocketc_base(config); - SC61860(config, m_maincpu, 192000); /* 7.8336 MHz */ + SC61860(config, m_maincpu, XTAL::u(192000)); /* 7.8336 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &pc1350_state::pc1350_mem); m_maincpu->reset_cb().set_constant(0); m_maincpu->brk_cb().set(FUNC(pc1350_state::brk_r)); @@ -832,7 +832,7 @@ void pc1350_state::pc1350(machine_config &config) void pc1403_state::pc1403(machine_config &config) { pocketc_base(config); - SC61860(config, m_maincpu, 256000); + SC61860(config, m_maincpu, XTAL::u(256000)); m_maincpu->set_addrmap(AS_PROGRAM, &pc1403_state::pc1403_mem); m_maincpu->reset_cb().set_constant(0); m_maincpu->brk_cb().set(FUNC(pc1403_state::brk_r)); diff --git a/src/mame/sharp/wizard.cpp b/src/mame/sharp/wizard.cpp index 877f14aed7b..96661129aff 100644 --- a/src/mame/sharp/wizard.cpp +++ b/src/mame/sharp/wizard.cpp @@ -138,7 +138,7 @@ void wizard_state::main_map(address_map &map) void wizard_state::iq7000(machine_config &config) { - ARM9(config, m_maincpu, 240000000); // actually Sharp SC62015B02, currently unemulated + ARM9(config, m_maincpu, XTAL::u(240000000)); // actually Sharp SC62015B02, currently unemulated m_maincpu->set_addrmap(AS_PROGRAM, &wizard_state::main_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); // all wrong, TBD diff --git a/src/mame/sharp/x1.cpp b/src/mame/sharp/x1.cpp index 034fd3e4fb6..066aa1f90c8 100644 --- a/src/mame/sharp/x1.cpp +++ b/src/mame/sharp/x1.cpp @@ -2174,7 +2174,7 @@ void x1_state::x1(machine_config &config) ctc.zc_callback<1>().set("ctc", FUNC(z80ctc_device::trg1)); ctc.zc_callback<2>().set("ctc", FUNC(z80ctc_device::trg2)); - X1_KEYBOARD(config, "x1kb", 0); + X1_KEYBOARD(config, "x1kb"); i8255_device &ppi(I8255A(config, "ppi8255_0")); ppi.in_pa_callback().set(FUNC(x1_state::x1_porta_r)); diff --git a/src/mame/sharp/x1.h b/src/mame/sharp/x1.h index 0c28bbbac72..1ed0e8c4907 100644 --- a/src/mame/sharp/x1.h +++ b/src/mame/sharp/x1.h @@ -41,7 +41,7 @@ class x1_keyboard_device : public device_t, { public: // construction/destruction - x1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + x1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: virtual void device_start() override; diff --git a/src/mame/sharp/x1_m.cpp b/src/mame/sharp/x1_m.cpp index 94d02ea0a96..2eef76a7455 100644 --- a/src/mame/sharp/x1_m.cpp +++ b/src/mame/sharp/x1_m.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(X1_KEYBOARD, x1_keyboard_device, "x1_keyboard", "Sharp X1 Key // z80ctc_device - constructor //------------------------------------------------- -x1_keyboard_device::x1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +x1_keyboard_device::x1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X1_KEYBOARD, tag, owner, clock) , device_z80daisy_interface(mconfig, *this) { diff --git a/src/mame/sharp/x1twin.cpp b/src/mame/sharp/x1twin.cpp index 80bed757305..ffba32c2a63 100644 --- a/src/mame/sharp/x1twin.cpp +++ b/src/mame/sharp/x1twin.cpp @@ -434,7 +434,7 @@ void x1twin_state::x1twin(machine_config &config) ctc.zc_callback<1>().set("ctc", FUNC(z80ctc_device::trg1)); ctc.zc_callback<2>().set("ctc", FUNC(z80ctc_device::trg2)); - X1_KEYBOARD(config, "x1kb", 0); + X1_KEYBOARD(config, "x1kb"); i8255_device &ppi(I8255A(config, "ppi8255_0")); ppi.in_pa_callback().set(FUNC(x1_state::x1_porta_r)); diff --git a/src/mame/sharp/x68k.cpp b/src/mame/sharp/x68k.cpp index a989005e70d..6b9d3980355 100644 --- a/src/mame/sharp/x68k.cpp +++ b/src/mame/sharp/x68k.cpp @@ -1623,7 +1623,7 @@ void x68k_state::x68000_base(machine_config &config) rs232_port_device &keyboard(RS232_PORT(config, "keyboard", keyboard_devices, "x68k")); keyboard.rxd_handler().set(m_mfpdev, FUNC(mc68901_device::si_w)); - I8255A(config, m_ppi, 0); + I8255A(config, m_ppi); m_ppi->in_pa_callback().set(FUNC(x68k_state::ppi_port_a_r)); m_ppi->in_pb_callback().set(FUNC(x68k_state::ppi_port_b_r)); m_ppi->in_pc_callback().set(FUNC(x68k_state::ppi_port_c_r)); @@ -1718,7 +1718,7 @@ void x68k_state::x68000(machine_config &config) m_crtc->gvram_read_cb().set(FUNC(x68k_state::gvram_read)); m_crtc->gvram_write_cb().set(FUNC(x68k_state::gvram_write)); - X68KHDC(config, "x68k_hdc", 0); + X68KHDC(config, "x68k_hdc"); } void x68ksupr_state::x68ksupr_base(machine_config &config) diff --git a/src/mame/sharp/x68k_crtc.cpp b/src/mame/sharp/x68k_crtc.cpp index 37e263066ad..7f9179dc25b 100644 --- a/src/mame/sharp/x68k_crtc.cpp +++ b/src/mame/sharp/x68k_crtc.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(VINAS, vinas_device, "vinas", "IX0902/IX0903 VINAS CRTC") DEFINE_DEVICE_TYPE(VICON, vicon_device, "vicon", "IX1093 VICON CRTC") -x68k_crtc_device::x68k_crtc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +x68k_crtc_device::x68k_crtc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , m_vdisp_callback(*this) @@ -47,12 +47,12 @@ x68k_crtc_device::x68k_crtc_device(const machine_config &mconfig, device_type ty std::fill(std::begin(m_reg), std::end(m_reg), 0); } -vinas_device::vinas_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vinas_device::vinas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : x68k_crtc_device(mconfig, VINAS, tag, owner, clock) { } -vicon_device::vicon_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vicon_device::vicon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : x68k_crtc_device(mconfig, VICON, tag, owner, clock) { } diff --git a/src/mame/sharp/x68k_crtc.h b/src/mame/sharp/x68k_crtc.h index fd8bb2a4a01..29a78557c15 100644 --- a/src/mame/sharp/x68k_crtc.h +++ b/src/mame/sharp/x68k_crtc.h @@ -54,7 +54,7 @@ public: protected: // base constructor - x68k_crtc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + x68k_crtc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-specific overrides virtual void device_resolve_objects() override; @@ -122,13 +122,13 @@ private: class vinas_device : public x68k_crtc_device { public: - vinas_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vinas_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class vicon_device : public x68k_crtc_device { public: - vicon_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vicon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definitions diff --git a/src/mame/sharp/x68k_hdc.cpp b/src/mame/sharp/x68k_hdc.cpp index f4e74b08c22..5da4f06fca7 100644 --- a/src/mame/sharp/x68k_hdc.cpp +++ b/src/mame/sharp/x68k_hdc.cpp @@ -26,7 +26,7 @@ ALLOW_SAVE_TYPE(x68k_hdc_image_device::sasi_phase); DEFINE_DEVICE_TYPE(X68KHDC, x68k_hdc_image_device, "x68k_hdc_image", "SASI Hard Disk") -x68k_hdc_image_device::x68k_hdc_image_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x68k_hdc_image_device::x68k_hdc_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : harddisk_image_base_device(mconfig, X68KHDC, tag, owner, clock) { } diff --git a/src/mame/sharp/x68k_hdc.h b/src/mame/sharp/x68k_hdc.h index 4a6e36a0f39..f80474c6704 100644 --- a/src/mame/sharp/x68k_hdc.h +++ b/src/mame/sharp/x68k_hdc.h @@ -95,7 +95,7 @@ class x68k_hdc_image_device : public harddisk_image_base_device public: // construction/destruction - x68k_hdc_image_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + x68k_hdc_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // image-level overrides virtual const char *file_extensions() const noexcept override { return "hdf"; } diff --git a/src/mame/sharp/x68k_kbd.cpp b/src/mame/sharp/x68k_kbd.cpp index 1b1301237a8..11976f38840 100644 --- a/src/mame/sharp/x68k_kbd.cpp +++ b/src/mame/sharp/x68k_kbd.cpp @@ -6,8 +6,8 @@ #include "machine/keyboard.ipp" -x68k_keyboard_device::x68k_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) - : buffered_rs232_device(mconfig, X68K_KEYBOARD, tag, owner, 0) +x68k_keyboard_device::x68k_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) + : buffered_rs232_device(mconfig, X68K_KEYBOARD, tag, owner) , device_matrix_keyboard_interface(mconfig, *this, "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8", "LINE9", "LINEA", "LINEB", "LINEC", "LINED", "LINEE") , m_led_kana(*this, "key_led_kana") , m_led_romaji(*this, "key_led_romaji") @@ -291,7 +291,7 @@ void x68k_keyboard_device::device_reset() buffered_rs232_device::device_reset(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rate(2400); + set_rate(XTAL::u(2400)); receive_register_reset(); transmit_register_reset(); diff --git a/src/mame/sharp/x68k_kbd.h b/src/mame/sharp/x68k_kbd.h index a1587809fc1..5a548544611 100644 --- a/src/mame/sharp/x68k_kbd.h +++ b/src/mame/sharp/x68k_kbd.h @@ -12,7 +12,7 @@ class x68k_keyboard_device : public buffered_rs232_device<16U>, protected device_matrix_keyboard_interface<15U> { public: - x68k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + x68k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; protected: diff --git a/src/mame/siemens/bitel.cpp b/src/mame/siemens/bitel.cpp index 7471130627b..05199ddd9fc 100644 --- a/src/mame/siemens/bitel.cpp +++ b/src/mame/siemens/bitel.cpp @@ -52,10 +52,10 @@ INPUT_PORTS_END void bitel_state::t3210(machine_config &config) { - I8031(config, m_maincpu, 12000000); // main board clocks unknown + I8031(config, m_maincpu, XTAL::u(12000000)); // main board clocks unknown m_maincpu->set_addrmap(AS_PROGRAM, &bitel_state::prog_map); - I8742(config, "upi", 6000000).set_disable(); + I8742(config, "upi", XTAL::u(6000000)).set_disable(); i8039_device &submcu(I8039(config, "submcu", 4.194304_MHz_XTAL)); submcu.set_addrmap(AS_PROGRAM, &bitel_state::sub_prog_map); @@ -63,10 +63,10 @@ void bitel_state::t3210(machine_config &config) void bitel_state::feap90(machine_config &config) { - I8031(config, m_maincpu, 12000000); // XTAL illegible + I8031(config, m_maincpu, XTAL::u(12000000)); // XTAL illegible m_maincpu->set_addrmap(AS_PROGRAM, &bitel_state::prog_map); - I8042AH(config, "upi", 6000000).set_disable(); // XTAL illegible + I8042AH(config, "upi", XTAL::u(6000000)).set_disable(); // XTAL illegible } ROM_START(t3210) // i8031, 8742, D80C39C // 4+2k ram onboard; 24kb in battery-backed expansion diff --git a/src/mame/siemens/pcd.cpp b/src/mame/siemens/pcd.cpp index 1f48b74e1d9..735695d9440 100644 --- a/src/mame/siemens/pcd.cpp +++ b/src/mame/siemens/pcd.cpp @@ -477,13 +477,13 @@ void pcd_state::pcd(machine_config &config) TIMER(config, "timer0_tick").configure_periodic(FUNC(pcd_state::timer0_tick), attotime::from_hz(16_MHz_XTAL / 24)); // adjusted to pass post - PIC8259(config, m_pic1, 0); + PIC8259(config, m_pic1); m_pic1->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int0_w)); - PIC8259(config, m_pic2, 0); + PIC8259(config, m_pic2); m_pic2->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int1_w)); - PCD_VIDEO(config, "video", 0); + PCD_VIDEO(config, "video"); RAM(config, RAM_TAG).set_default_size("1M"); @@ -533,10 +533,10 @@ void pcd_state::pcd(machine_config &config) m_rtc->set_epoch(1900); m_rtc->set_24hrs(true); - pcd_keyboard_device &keyboard(PCD_KEYBOARD(config, "keyboard", 0)); + pcd_keyboard_device &keyboard(PCD_KEYBOARD(config, "keyboard")); keyboard.out_tx_handler().set(m_usart[1], FUNC(scn2661b_device::rxd_w)); - SCSI_PORT(config, m_scsi, 0); + SCSI_PORT(config, m_scsi); m_scsi->set_data_input_buffer("scsi_data_in"); m_scsi->msg_handler().set(FUNC(pcd_state::write_scsi_msg)); m_scsi->bsy_handler().set(FUNC(pcd_state::write_scsi_bsy)); @@ -544,10 +544,10 @@ void pcd_state::pcd(machine_config &config) m_scsi->cd_handler().set(FUNC(pcd_state::write_scsi_cd)); m_scsi->req_handler().set(FUNC(pcd_state::write_scsi_req)); - output_latch_device &scsi_out(OUTPUT_LATCH(config, "scsi_data_out", 0)); + output_latch_device &scsi_out(OUTPUT_LATCH(config, "scsi_data_out")); m_scsi->set_output_latch(scsi_out); - INPUT_BUFFER(config, "scsi_data_in", 0); + INPUT_BUFFER(config, "scsi_data_in"); m_scsi->set_slot_device(1, "harddisk", OMTI5100, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_0)); SOFTWARE_LIST(config, "flop_list").set_original("pcd_flop"); diff --git a/src/mame/siemens/pcd.h b/src/mame/siemens/pcd.h index 69b58b8c84c..af865242bc4 100644 --- a/src/mame/siemens/pcd.h +++ b/src/mame/siemens/pcd.h @@ -21,7 +21,7 @@ public: void detect_w(uint8_t data); protected: - pcdx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pcdx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void pcdx_palette(palette_device &palette) const; @@ -33,7 +33,7 @@ protected: class pcd_video_device : public pcdx_video_device { public: - pcd_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcd_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; void vram_sw_w(uint8_t data); @@ -82,7 +82,7 @@ class pcx_video_device : public pcdx_video_device, public device_serial_interface { public: - pcx_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcx_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto txd_handler() { return m_txd_handler.bind(); } virtual void map(address_map &map) override; diff --git a/src/mame/siemens/pcd_kbd.cpp b/src/mame/siemens/pcd_kbd.cpp index 356dfdc26b4..391fc0ff4ba 100644 --- a/src/mame/siemens/pcd_kbd.cpp +++ b/src/mame/siemens/pcd_kbd.cpp @@ -31,7 +31,7 @@ void pcd_keyboard_device::pcd_keyboard_map(address_map &map) void pcd_keyboard_device::device_add_mconfig(machine_config &config) { - i8035_device &mcu(I8035(config, "mcu", 5760000)); + i8035_device &mcu(I8035(config, "mcu", XTAL::u(5760000))); mcu.set_addrmap(AS_PROGRAM, &pcd_keyboard_device::pcd_keyboard_map); mcu.bus_in_cb().set(FUNC(pcd_keyboard_device::bus_r)); mcu.p1_in_cb().set(FUNC(pcd_keyboard_device::p1_r)); @@ -222,7 +222,7 @@ ioport_constructor pcd_keyboard_device::device_input_ports() const return INPUT_PORTS_NAME( pcd_keyboard ); } -pcd_keyboard_device::pcd_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcd_keyboard_device::pcd_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCD_KEYBOARD, tag, owner, clock) , m_rows(*this, "ROW.%u", 0) , m_p1(0) diff --git a/src/mame/siemens/pcd_kbd.h b/src/mame/siemens/pcd_kbd.h index 7b6f31b5734..e84391a4577 100644 --- a/src/mame/siemens/pcd_kbd.h +++ b/src/mame/siemens/pcd_kbd.h @@ -9,7 +9,7 @@ class pcd_keyboard_device : public device_t { public: - pcd_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcd_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_tx_handler() { return m_out_tx_handler.bind(); } diff --git a/src/mame/siemens/pcd_v.cpp b/src/mame/siemens/pcd_v.cpp index e472116b2cc..21cf07decf5 100644 --- a/src/mame/siemens/pcd_v.cpp +++ b/src/mame/siemens/pcd_v.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(PCD_VIDEO, pcd_video_device, "pcd_video", "Siemens PC-D Video") DEFINE_DEVICE_TYPE(PCX_VIDEO, pcx_video_device, "pcx_video", "Siemens PC-X Video") -pcdx_video_device::pcdx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +pcdx_video_device::pcdx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_gfx_interface(mconfig, *this, nullptr, "palette"), m_maincpu(*this, ":maincpu"), @@ -21,7 +21,7 @@ pcdx_video_device::pcdx_video_device(const machine_config &mconfig, device_type { } -pcd_video_device::pcd_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pcd_video_device::pcd_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pcdx_video_device(mconfig, PCD_VIDEO, tag, owner, clock), m_crtc(*this, "crtc"), m_mouse_btn(*this, "MOUSE"), @@ -32,7 +32,7 @@ pcd_video_device::pcd_video_device(const machine_config &mconfig, const char *ta { } -pcx_video_device::pcx_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pcx_video_device::pcx_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pcdx_video_device(mconfig, PCX_VIDEO, tag, owner, clock), device_serial_interface(mconfig, *this), m_crtc(*this, "crtc"), @@ -423,7 +423,7 @@ void pcx_video_device::device_start() m_txd_handler.resolve_safe(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rate(600); + set_rate(XTAL::u(600)); decode_gfx(gfx_pcx); } diff --git a/src/mame/siemens/pg685.cpp b/src/mame/siemens/pg685.cpp index 55e27818964..07561e0e857 100644 --- a/src/mame/siemens/pg685.cpp +++ b/src/mame/siemens/pg685.cpp @@ -396,15 +396,15 @@ MC6845_UPDATE_ROW( pg685_state::crtc_update_row_oua12 ) void pg685_state::pg685_backplane(machine_config &config) { - PIT8253(config, m_bppit, 0); + PIT8253(config, m_bppit); m_bppit->set_clk<0>(XTAL(12'288'000) / 10); // same input clock as for PC16-11? m_bppit->set_clk<1>(XTAL(12'288'000) / 10); m_bppit->set_clk<2>(XTAL(12'288'000) / 10); - pic8259_device &bppic(PIC8259(config, "bppic", 0)); + pic8259_device &bppic(PIC8259(config, "bppic")); bppic.out_int_callback().set_nop(); // configured in single 8086 mode? - SCN2661B(config, "bpuart", 4915200); + SCN2661B(config, "bpuart", XTAL::u(4915200)); } void pg685_state::pg685_module(machine_config &config) @@ -412,8 +412,8 @@ void pg685_state::pg685_module(machine_config &config) FD1797(config, m_fdc, XTAL(4'000'000) / 2); // divider guessed m_fdc->intrq_wr_callback().set("mainpic", FUNC(pic8259_device::ir4_w)); - I8255(config, "modppi1", 0); - I8255(config, "modppi2", 0); + I8255(config, "modppi1"); + I8255(config, "modppi2"); I8251(config, "moduart", XTAL(4'000'000) / 2); // divider guessed @@ -427,7 +427,7 @@ void pg685_state::pg675(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pg685_state::pg675_mem); m_maincpu->set_irq_acknowledge_callback("mainpic", FUNC(pic8259_device::inta_cb)); - pic8259_device &mainpic(PIC8259(config, "mainpic", 0)); + pic8259_device &mainpic(PIC8259(config, "mainpic")); mainpic.out_int_callback().set_inputline(m_maincpu, 0); mainpic.in_sp_callback().set_constant(1); @@ -437,10 +437,10 @@ void pg685_state::pg675(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(12288000, 882, 0, 720, 370, 0, 350 ); // not real values + screen.set_raw(XTAL::u(12288000), 882, 0, 720, 370, 0, 350 ); // not real values screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - mc6845_device &crtc(MC6845(config, "crtc", 12288000)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(12288000))); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); @@ -475,7 +475,7 @@ void pg685_state::pg685(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pg685_state::pg685_mem); m_maincpu->set_irq_acknowledge_callback("mainpic", FUNC(pic8259_device::inta_cb)); - pic8259_device &mainpic(PIC8259(config, "mainpic", 0)); + pic8259_device &mainpic(PIC8259(config, "mainpic")); mainpic.out_int_callback().set_inputline(m_maincpu, 0); mainpic.in_sp_callback().set_constant(1); @@ -485,10 +485,10 @@ void pg685_state::pg685(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(12288000, 882, 0, 720, 370, 0, 350 ); // not real values + screen.set_raw(XTAL::u(12288000), 882, 0, 720, 370, 0, 350 ); // not real values screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - mc6845_device &crtc(MC6845(config, "crtc", 12288000)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(12288000))); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); @@ -527,7 +527,7 @@ void pg685_state::pg685oua12(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pg685_state::pg685oua12_mem); m_maincpu->set_irq_acknowledge_callback("mainpic", FUNC(pic8259_device::inta_cb)); - pic8259_device &mainpic(PIC8259(config, "mainpic", 0)); + pic8259_device &mainpic(PIC8259(config, "mainpic")); mainpic.out_int_callback().set_inputline(m_maincpu, 0); mainpic.in_sp_callback().set_constant(1); @@ -537,10 +537,10 @@ void pg685_state::pg685oua12(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(12288000, 882, 0, 720, 370, 0, 350 ); // not real values + screen.set_raw(XTAL::u(12288000), 882, 0, 720, 370, 0, 350 ); // not real values screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - mc6845_device &crtc(MC6845(config, "crtc", 12288000)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(12288000))); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); diff --git a/src/mame/sigma/nyny.cpp b/src/mame/sigma/nyny.cpp index 9db28f5898f..f8ce2162ad8 100644 --- a/src/mame/sigma/nyny.cpp +++ b/src/mame/sigma/nyny.cpp @@ -596,7 +596,7 @@ void nyny_state::machine_reset() void nyny_state::nyny(machine_config &config) { /* basic machine hardware */ - MC6809(config, m_maincpu, 5600000); /* 1.40 MHz? The clock signal is generated by analog chips */ + MC6809(config, m_maincpu, XTAL::u(5600000)); /* 1.40 MHz? The clock signal is generated by analog chips */ m_maincpu->set_addrmap(AS_PROGRAM, &nyny_state::main_map); m_maincpu->set_periodic_int(FUNC(nyny_state::update_pia_1), attotime::from_hz(25)); @@ -624,7 +624,7 @@ void nyny_state::nyny(machine_config &config) m_mc6845->out_de_callback().set(m_ic48_1, FUNC(ttl74123_device::a_w)); /* 74LS123 */ - TTL74123(config, m_ic48_1, 0); + TTL74123(config, m_ic48_1); m_ic48_1->set_connection_type(TTL74123_GROUNDED); /* the hook up type */ m_ic48_1->set_resistor_value(RES_K(22)); /* resistor connected to RCext */ m_ic48_1->set_capacitor_value(CAP_U(0.01)); /* capacitor connected to Cext and RCext */ @@ -666,7 +666,7 @@ void nyny_state::nyny(machine_config &config) AY8910(config, "ay3", AUDIO_CPU_2_CLOCK).add_route(ALL_OUTPUTS, "speaker", 0.03); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/sigma/r2dtank.cpp b/src/mame/sigma/r2dtank.cpp index f047855940b..e602ebc5e6c 100644 --- a/src/mame/sigma/r2dtank.cpp +++ b/src/mame/sigma/r2dtank.cpp @@ -468,7 +468,7 @@ void r2dtank_state::r2dtank(machine_config &config) /* 74LS123 */ - ttl74123_device &ttl74123(TTL74123(config, "74123", 0)); + ttl74123_device &ttl74123(TTL74123(config, "74123")); ttl74123.set_connection_type(TTL74123_GROUNDED); /* the hook up type */ ttl74123.set_resistor_value(RES_K(22)); /* resistor connected to RCext */ ttl74123.set_capacitor_value(CAP_U(0.01)); /* capacitor connected to Cext and RCext */ @@ -477,14 +477,14 @@ void r2dtank_state::r2dtank(machine_config &config) ttl74123.set_clear_pin_value(1); /* Clear pin - pulled high */ ttl74123.out_cb().set(FUNC(r2dtank_state::ttl74123_output_changed)); - PIA6821(config, m_pia_main, 0); + PIA6821(config, m_pia_main); m_pia_main->readpa_handler().set_ioport("IN0"); m_pia_main->readpb_handler().set_ioport("IN1"); m_pia_main->cb2_handler().set(FUNC(r2dtank_state::flipscreen_w)); m_pia_main->irqa_handler().set(FUNC(r2dtank_state::main_cpu_irq)); m_pia_main->irqb_handler().set(FUNC(r2dtank_state::main_cpu_irq)); - PIA6821(config, m_pia_audio, 0); + PIA6821(config, m_pia_audio); m_pia_audio->readpa_handler().set(FUNC(r2dtank_state::AY8910_port_r)); m_pia_audio->writepa_handler().set(FUNC(r2dtank_state::AY8910_port_w)); m_pia_audio->writepb_handler().set(FUNC(r2dtank_state::AY8910_select_w)); diff --git a/src/mame/sigma/sigma21.cpp b/src/mame/sigma/sigma21.cpp index bc15f37c867..6119ae1685d 100644 --- a/src/mame/sigma/sigma21.cpp +++ b/src/mame/sigma/sigma21.cpp @@ -80,16 +80,16 @@ GFXDECODE_END void sigma21_state::sigma21(machine_config &config) { - MC6809(config, m_maincpu, 5600000); // exact type and clock unknown + MC6809(config, m_maincpu, XTAL::u(5600000)); // exact type and clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &sigma21_state::mem_map); PIA6821(config, "pia"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(5600000, 360, 0, 256, 276, 0, 224); // copied from r2dtank; actual params are in badly dumped ROM + screen.set_raw(XTAL::u(5600000), 360, 0, 256, 276, 0, 224); // copied from r2dtank; actual params are in badly dumped ROM screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - mc6845_device &crtc(MC6845(config, "crtc", 700000)); + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(700000))); crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); diff --git a/src/mame/sigma/sigmab98.cpp b/src/mame/sigma/sigmab98.cpp index fe0d3523969..8fd56e6b80c 100644 --- a/src/mame/sigma/sigmab98.cpp +++ b/src/mame/sigma/sigmab98.cpp @@ -1431,7 +1431,7 @@ INTERRUPT_GEN_MEMBER(sigmab98_state::sigmab98_vblank_interrupt) void sigmab98_state::sigmab98(machine_config &config) { - KY80(config, m_maincpu, 20000000); // !! TAXAN KY-80, clock @X1? !! + KY80(config, m_maincpu, XTAL::u(20000000)); // !! TAXAN KY-80, clock @X1? !! m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::gegege_mem_map); m_maincpu->set_addrmap(AS_IO, &sigmab98_state::gegege_io_map); m_maincpu->set_vblank_int("screen", FUNC(sigmab98_state::sigmab98_vblank_interrupt)); @@ -1460,7 +1460,7 @@ void sigmab98_state::sigmab98(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400)); // clock @X2? + ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL::u(16934400))); // clock @X2? ymz.add_route(0, "lspeaker", 1.0); ymz.add_route(1, "rspeaker", 1.0); } @@ -1499,7 +1499,7 @@ void lufykzku_state::lufykzku(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // battery backed RAM (TC55257DFL-70L) // No EEPROM - MB3773(config, m_watchdog, 0); + MB3773(config, m_watchdog); TICKET_DISPENSER(config, m_hopper, attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ); // 2 x 8-bit parallel/serial converters diff --git a/src/mame/sigma/spiders.cpp b/src/mame/sigma/spiders.cpp index fd6453391fc..dd4d07e98e3 100644 --- a/src/mame/sigma/spiders.cpp +++ b/src/mame/sigma/spiders.cpp @@ -202,7 +202,7 @@ #include "screen.h" -#define MAIN_CPU_MASTER_CLOCK (11200000) +#define MAIN_CPU_MASTER_CLOCK XTAL::u(11200000) #define PIXEL_CLOCK (MAIN_CPU_MASTER_CLOCK / 2) #define CRTC_CLOCK (MAIN_CPU_MASTER_CLOCK / 16) @@ -504,11 +504,11 @@ INPUT_PORTS_END void spiders_state::spiders(machine_config &config) { /* basic machine hardware */ - MC6809(config, m_maincpu, 2800000); + MC6809(config, m_maincpu, XTAL::u(2800000)); m_maincpu->set_addrmap(AS_PROGRAM, &spiders_state::spiders_main_map); m_maincpu->set_periodic_int(FUNC(spiders_state::update_pia_1), attotime::from_hz(25)); - M6802(config, m_audiocpu, 3000000); + M6802(config, m_audiocpu, XTAL::u(3000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &spiders_state::spiders_audio_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -527,20 +527,20 @@ void spiders_state::spiders(machine_config &config) crtc.set_update_row_callback(FUNC(spiders_state::crtc_update_row)); crtc.out_de_callback().set("ic60", FUNC(ttl74123_device::a_w)); - PIA6821(config, m_pia[0], 0); + PIA6821(config, m_pia[0]); m_pia[0]->readpa_handler().set_ioport("IN0"); m_pia[0]->readpb_handler().set_ioport("IN1"); m_pia[0]->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_pia[0]->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_pia[1], 0); + PIA6821(config, m_pia[1]); m_pia[1]->readpa_handler().set(FUNC(spiders_state::gfx_rom_r)); m_pia[1]->writepb_handler().set(FUNC(spiders_state::gfx_rom_intf_w)); m_pia[1]->cb2_handler().set(FUNC(spiders_state::flipscreen_w)); m_pia[1]->irqa_handler().set_inputline("maincpu", M6809_FIRQ_LINE); m_pia[1]->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); - PIA6821(config, m_pia[2], 0); + PIA6821(config, m_pia[2]); m_pia[2]->writepa_handler().set(FUNC(spiders_state::spiders_audio_ctrl_w)); m_pia[2]->writepb_handler().set(FUNC(spiders_state::spiders_audio_command_w)); m_pia[2]->irqa_handler().set("mainirq", FUNC(input_merger_device::in_w<3>)); @@ -548,12 +548,12 @@ void spiders_state::spiders(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); - PIA6821(config, m_pia[3], 0); + PIA6821(config, m_pia[3]); m_pia[3]->writepa_handler().set(FUNC(spiders_state::spiders_audio_a_w)); m_pia[3]->writepb_handler().set(FUNC(spiders_state::spiders_audio_b_w)); m_pia[3]->irqa_handler().set_inputline("audiocpu", M6802_IRQ_LINE); - ttl74123_device &ic60(TTL74123(config, "ic60", 0)); + ttl74123_device &ic60(TTL74123(config, "ic60")); ic60.set_connection_type(TTL74123_GROUNDED); /* the hook up type */ ic60.set_resistor_value(RES_K(22)); /* resistor connected to RCext */ ic60.set_capacitor_value(CAP_U(0.01)); /* capacitor connected to Cext and RCext */ diff --git a/src/mame/sinclair/atm.cpp b/src/mame/sinclair/atm.cpp index 8ff87a33212..158f01262d2 100644 --- a/src/mame/sinclair/atm.cpp +++ b/src/mame/sinclair/atm.cpp @@ -509,7 +509,7 @@ void atm_state::atm(machine_config &config) m_screen->set_raw(X1_128_SINCLAIR / 5, 448, 312, {get_screen_area().left() - 40, get_screen_area().right() + 40, get_screen_area().top() - 40, get_screen_area().bottom() + 40}); subdevice("gfxdecode")->set_info(gfx_atm); - BETA_DISK(config, m_beta, 0); + BETA_DISK(config, m_beta); ATA_INTERFACE(config, m_ata).options(atm_ata_devices, nullptr, nullptr, false);; CENTRONICS(config, m_centronics, centronics_devices, "covox"); diff --git a/src/mame/sinclair/beta_m.cpp b/src/mame/sinclair/beta_m.cpp index a64778af78d..5555dd14120 100644 --- a/src/mame/sinclair/beta_m.cpp +++ b/src/mame/sinclair/beta_m.cpp @@ -27,7 +27,7 @@ BUGS: DEFINE_DEVICE_TYPE(BETA_DISK, beta_disk_device, "betadisk", "Beta Disk Interface") -beta_disk_device::beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +beta_disk_device::beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BETA_DISK, tag, owner, clock) , m_betadisk_active(0) , m_wd179x(*this, "wd179x") diff --git a/src/mame/sinclair/beta_m.h b/src/mame/sinclair/beta_m.h index 72ed4353cd0..90dbde4e34f 100644 --- a/src/mame/sinclair/beta_m.h +++ b/src/mame/sinclair/beta_m.h @@ -23,7 +23,7 @@ class beta_disk_device : public device_t { public: - beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + beta_disk_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t status_r(); uint8_t track_r(); diff --git a/src/mame/sinclair/elwro800.cpp b/src/mame/sinclair/elwro800.cpp index fcf736a8e27..67978f1f8fd 100644 --- a/src/mame/sinclair/elwro800.cpp +++ b/src/mame/sinclair/elwro800.cpp @@ -589,7 +589,7 @@ void elwro800_state::elwro800(machine_config &config) UPD765A(config, "upd765", 8_MHz_XTAL / 2, true, true); - I8255A(config, m_i8255, 0); + I8255A(config, m_i8255); m_i8255->in_pa_callback().set_ioport("JOY"); m_i8255->in_pb_callback().set("cent_data_in", FUNC(input_buffer_device::read)); m_i8255->out_pb_callback().set("cent_data_out", FUNC(output_latch_device::write)); diff --git a/src/mame/sinclair/glukrs.cpp b/src/mame/sinclair/glukrs.cpp index 9c6f33f2453..ca9595a36f0 100644 --- a/src/mame/sinclair/glukrs.cpp +++ b/src/mame/sinclair/glukrs.cpp @@ -13,7 +13,7 @@ #include "emu.h" #include "glukrs.h" -glukrs_device::glukrs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +glukrs_device::glukrs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GLUKRS, tag, owner, clock), device_rtc_interface(mconfig, *this), m_nvram(*this, "nvram") {} diff --git a/src/mame/sinclair/glukrs.h b/src/mame/sinclair/glukrs.h index 44b2e300e65..d7d5cf15a2b 100644 --- a/src/mame/sinclair/glukrs.h +++ b/src/mame/sinclair/glukrs.h @@ -13,7 +13,7 @@ class glukrs_device : public device_t, public device_rtc_interface { public: - glukrs_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32'768); + glukrs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 32'768); void enable() { m_glukrs_active = true; } void disable() { m_glukrs_active = false; } diff --git a/src/mame/sinclair/pentagon.cpp b/src/mame/sinclair/pentagon.cpp index e8ed652d65a..fc6af6a1355 100644 --- a/src/mame/sinclair/pentagon.cpp +++ b/src/mame/sinclair/pentagon.cpp @@ -204,7 +204,7 @@ void pentagon_state::pentagon(machine_config &config) m_screen->set_raw(14_MHz_XTAL / 2, 448, 320, {get_screen_area().left() - 48, get_screen_area().right() + 48, get_screen_area().top() - 48, get_screen_area().bottom() + 48}); subdevice("gfxdecode")->set_info(gfx_pentagon); - BETA_DISK(config, m_beta, 0); + BETA_DISK(config, m_beta); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); diff --git a/src/mame/sinclair/qimi.cpp b/src/mame/sinclair/qimi.cpp index dba7bd9ee59..dd5862236ac 100644 --- a/src/mame/sinclair/qimi.cpp +++ b/src/mame/sinclair/qimi.cpp @@ -103,7 +103,7 @@ ioport_constructor qimi_device::device_input_ports() const // qimi_device - constructor //------------------------------------------------- -qimi_device::qimi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +qimi_device::qimi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, QIMI, tag, owner, clock), m_write_extint(*this), m_buttons(*this, "mouse_buttons"), diff --git a/src/mame/sinclair/qimi.h b/src/mame/sinclair/qimi.h index 777eea916f2..7241ae13a16 100644 --- a/src/mame/sinclair/qimi.h +++ b/src/mame/sinclair/qimi.h @@ -22,7 +22,7 @@ class qimi_device : public device_t { public: // construction/destruction - qimi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + qimi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto extint_wr_callback() { return m_write_extint.bind(); } diff --git a/src/mame/sinclair/ql.cpp b/src/mame/sinclair/ql.cpp index 25badc80d75..a6f62e9b6ca 100644 --- a/src/mame/sinclair/ql.cpp +++ b/src/mame/sinclair/ql.cpp @@ -962,7 +962,7 @@ void ql_state::ql(machine_config &config) QL_ROM_CARTRIDGE_SLOT(config, m_cart, ql_rom_cartridge_cards, nullptr); - QIMI(config, m_qimi, 0); + QIMI(config, m_qimi); m_qimi->extint_wr_callback().set(FUNC(ql_state::qimi_extintl_w)); // software lists diff --git a/src/mame/sinclair/scorpion.cpp b/src/mame/sinclair/scorpion.cpp index 2f423c80c81..6737f0e5709 100644 --- a/src/mame/sinclair/scorpion.cpp +++ b/src/mame/sinclair/scorpion.cpp @@ -297,7 +297,7 @@ void scorpion_state::scorpion(machine_config &config) AY8912(config, "ay8912", X1 / 8).add_route(ALL_OUTPUTS, "mono", 0.25); - BETA_DISK(config, m_beta, 0); + BETA_DISK(config, m_beta); TIMER(config, "nmi_timer").configure_periodic(FUNC(scorpion_state::nmi_check_callback), attotime::from_hz(50)); config.device_remove("exp"); diff --git a/src/mame/sinclair/tsconf.cpp b/src/mame/sinclair/tsconf.cpp index 7b96902865e..0aa0fab1d5f 100644 --- a/src/mame/sinclair/tsconf.cpp +++ b/src/mame/sinclair/tsconf.cpp @@ -262,8 +262,8 @@ void tsconf_state::tsconf(machine_config &config) m_dma->out_sfile_callback().set(FUNC(tsconf_state::sfile_write16)); m_dma->on_ready_callback().set(FUNC(tsconf_state::dma_ready)); - BETA_DISK(config, m_beta, 0); - SPI_SDCARD(config, m_sdcard, 0); + BETA_DISK(config, m_beta); + SPI_SDCARD(config, m_sdcard); m_sdcard->spi_miso_callback().set(FUNC(tsconf_state::tsconf_spi_miso_w)); SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/sinclair/tsconfdma.cpp b/src/mame/sinclair/tsconfdma.cpp index 79ef8bc2d50..98632fe095b 100644 --- a/src/mame/sinclair/tsconfdma.cpp +++ b/src/mame/sinclair/tsconfdma.cpp @@ -9,7 +9,7 @@ #include "emu.h" #include "tsconfdma.h" -tsconfdma_device::tsconfdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tsconfdma_device::tsconfdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TSCONF_DMA, tag, owner, clock), m_in_mreq_cb(*this), m_out_mreq_cb(*this), diff --git a/src/mame/sinclair/tsconfdma.h b/src/mame/sinclair/tsconfdma.h index 582017fdfff..4381380b68b 100644 --- a/src/mame/sinclair/tsconfdma.h +++ b/src/mame/sinclair/tsconfdma.h @@ -14,7 +14,7 @@ class tsconfdma_device : public device_t { public: - tsconfdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tsconfdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_mreq_callback() { return m_in_mreq_cb.bind(); } auto out_mreq_callback() { return m_out_mreq_cb.bind(); } diff --git a/src/mame/sinclair/zx8301.cpp b/src/mame/sinclair/zx8301.cpp index 419412c0476..ae2765f0d40 100644 --- a/src/mame/sinclair/zx8301.cpp +++ b/src/mame/sinclair/zx8301.cpp @@ -110,7 +110,7 @@ inline void zx8301_device::writebyte(offs_t address, uint8_t data) // zx8301_device - constructor //------------------------------------------------- -zx8301_device::zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +zx8301_device::zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZX8301, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_video_interface(mconfig, *this) diff --git a/src/mame/sinclair/zx8301.h b/src/mame/sinclair/zx8301.h index 86c722a80dc..af779c3b141 100644 --- a/src/mame/sinclair/zx8301.h +++ b/src/mame/sinclair/zx8301.h @@ -47,13 +47,13 @@ class zx8301_device : public device_t, { public: // construction/destruction - template zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + template zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : zx8301_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); } - zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + zx8301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto vsync_wr_callback() { return m_write_vsync.bind(); } diff --git a/src/mame/sinclair/zx8302.cpp b/src/mame/sinclair/zx8302.cpp index 49e0d9dde94..7bbea35cc6b 100644 --- a/src/mame/sinclair/zx8302.cpp +++ b/src/mame/sinclair/zx8302.cpp @@ -129,7 +129,7 @@ inline void zx8302_device::transmit_ipc_data() // zx8302_device - constructor //------------------------------------------------- -zx8302_device::zx8302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +zx8302_device::zx8302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZX8302, tag, owner, clock), device_serial_interface(mconfig, *this), m_rtc_clock(0), diff --git a/src/mame/sinclair/zx8302.h b/src/mame/sinclair/zx8302.h index 372bf475dd6..5193b5c1a2c 100644 --- a/src/mame/sinclair/zx8302.h +++ b/src/mame/sinclair/zx8302.h @@ -48,7 +48,7 @@ class zx8302_device : public device_t, { public: // construction/destruction - zx8302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + zx8302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_rtc_clock(int rtc_clock) { m_rtc_clock = rtc_clock; } void set_rtc_clock(const XTAL &rtc_clock) { set_rtc_clock(rtc_clock.value()); } diff --git a/src/mame/skeleton/airbase99.cpp b/src/mame/skeleton/airbase99.cpp index f6250981fd4..104ff908b48 100644 --- a/src/mame/skeleton/airbase99.cpp +++ b/src/mame/skeleton/airbase99.cpp @@ -55,11 +55,11 @@ INPUT_PORTS_END void airbase99_state::airbase99(machine_config &config) { - PIC17C43(config, m_maincpu, 16'000'000); // PIC17C43-16/P (XTAL unreadable) + PIC17C43(config, m_maincpu, XTAL::u(16'000'000)); // PIC17C43-16/P (XTAL unreadable) m_maincpu->set_mode(pic17c43_device::mode::MICROPROCESSOR); m_maincpu->set_addrmap(AS_PROGRAM, &airbase99_state::mem_map); - PIC17C43(config, m_slavecpu, 16'000'000); // PIC17C43-33/P (XTAL unreadable) + PIC17C43(config, m_slavecpu, XTAL::u(16'000'000)); // PIC17C43-33/P (XTAL unreadable) m_slavecpu->set_mode(pic17c43_device::mode::MICROCONTROLLER); m_slavecpu->set_disable(); @@ -73,7 +73,7 @@ void airbase99_state::airbase99(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(HD44780(config, "lcdc")); lcdc.set_lcd_size(2, 20); lcdc.set_pixel_update_cb(FUNC(airbase99_state::pixel_update)); } diff --git a/src/mame/skeleton/alfaskop41xx.cpp b/src/mame/skeleton/alfaskop41xx.cpp index b65a28fe6a8..700b1950a50 100644 --- a/src/mame/skeleton/alfaskop41xx.cpp +++ b/src/mame/skeleton/alfaskop41xx.cpp @@ -370,7 +370,7 @@ void alfaskop4110_state::alfaskop4110(machine_config &config) m_screen->set_raw(19'170'000, 80 * 8, 0, 80 * 8, 400, 0, 400); m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update)); - PIA6821(config, m_mic_pia, 0); // Main board PIA + PIA6821(config, m_mic_pia); // Main board PIA m_mic_pia->cb1_w(0); m_mic_pia->cb2_handler().set([this](offs_t offset, uint8_t data) { LOGMIC("->MIC PIA: CB2 write %d\n", data); }); @@ -432,7 +432,7 @@ void alfaskop4110_state::alfaskop4110(machine_config &config) m_mic_pia->ca1_w(0); m_mic_pia->ca2_w(0); - PIA6821(config, m_dia_pia, 0); // Display PIA, controls how the CRTC accesses memory etc + PIA6821(config, m_dia_pia); // Display PIA, controls how the CRTC accesses memory etc m_dia_pia->cb1_w(0); m_dia_pia->cb2_handler().set([this](offs_t offset, uint8_t data) { LOGDIA("DIA PIA: CB2_w %d\n", data); }); m_dia_pia->writepa_handler().set([this](offs_t offset, uint8_t data) { LOGDIA("DIA PIA: PA_w %02x\n", data); }); @@ -442,7 +442,7 @@ void alfaskop4110_state::alfaskop4110(machine_config &config) m_dia_pia->ca1_w(0); m_dia_pia->ca2_w(0); - ACIA6850(config, m_kbd_acia, 0); + ACIA6850(config, m_kbd_acia); //CLOCK(config, "acia_clock", ACIA_CLOCK).signal_handler().set(FUNC(alfaskop4110_state::write_acia_clock)); m_kbd_acia->irq_handler().set("irq3", FUNC(input_merger_device::in_w<3>)); @@ -531,8 +531,8 @@ void alfaskop4120_state::alfaskop4120(machine_config &config) M6800(config, m_maincpu, XTAL(19'170'000) / 18); // Verified from service manual m_maincpu->set_addrmap(AS_PROGRAM, &alfaskop4120_state::mem_map); - PIA6821(config, m_mic_pia, 0); // Main Board PIA - PIA6821(config, m_fdapia, 0); // Floppy Disk PIA + PIA6821(config, m_mic_pia); // Main Board PIA + PIA6821(config, m_fdapia); // Floppy Disk PIA } void alfaskop4101_state::alfaskop4101(machine_config &config) @@ -541,7 +541,7 @@ void alfaskop4101_state::alfaskop4101(machine_config &config) M6800(config, m_maincpu, XTAL(19'170'000) / 18); // Verified from service manual m_maincpu->set_addrmap(AS_PROGRAM, &alfaskop4101_state::mem_map); - PIA6821(config, m_mic_pia, 0); // Main board PIA + PIA6821(config, m_mic_pia); // Main board PIA } /* ROM definitions */ diff --git a/src/mame/skeleton/alfaskop_s41_kb.h b/src/mame/skeleton/alfaskop_s41_kb.h index de604fd37b4..d5c1f1e4ebd 100644 --- a/src/mame/skeleton/alfaskop_s41_kb.h +++ b/src/mame/skeleton/alfaskop_s41_kb.h @@ -16,7 +16,7 @@ public: auto txd_cb() { return m_txd_cb.bind(); } auto leds_cb() { return m_leds_cb.bind(); } - alfaskop_s41_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + alfaskop_s41_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_INPUT_CHANGED_MEMBER(key); DECLARE_WRITE_LINE_MEMBER(rxd_w); diff --git a/src/mame/skeleton/alphasma.cpp b/src/mame/skeleton/alphasma.cpp index e747eebb4c2..ee6e36b890d 100644 --- a/src/mame/skeleton/alphasma.cpp +++ b/src/mame/skeleton/alphasma.cpp @@ -567,9 +567,9 @@ void alphasmart_state::alphasmart(machine_config &config) m_maincpu->in_pd_callback().set(FUNC(alphasmart_state::port_d_r)); m_maincpu->out_pd_callback().set(FUNC(alphasmart_state::port_d_w)); - KS0066_F05(config, m_lcdc[0], 0); + KS0066_F05(config, m_lcdc[0]); m_lcdc[0]->set_lcd_size(2, 40); - KS0066_F05(config, m_lcdc[1], 0); + KS0066_F05(config, m_lcdc[1]); m_lcdc[1]->set_lcd_size(2, 40); /* video hardware */ diff --git a/src/mame/skeleton/alphasma3k.cpp b/src/mame/skeleton/alphasma3k.cpp index f0ecc6ba050..21a64fb2ecd 100644 --- a/src/mame/skeleton/alphasma3k.cpp +++ b/src/mame/skeleton/alphasma3k.cpp @@ -72,13 +72,13 @@ INPUT_PORTS_END void alphasmart3k_state::alphasmart3k(machine_config &config) { // Basic machine hardware - MC68328(config, m_maincpu, 16'000'000); // MC68EZ328PU16V, clock unverified + MC68328(config, m_maincpu, XTAL::u(16'000'000)); // MC68EZ328PU16V, clock unverified // Values from AlphaSmart 2000, not confirmed for AlphaSmart 3000 // AlphaSmart 3000 uses a Data Image CM4040 LCD display - KS0066_F05(config, m_lcdc0, 0); + KS0066_F05(config, m_lcdc0); m_lcdc0->set_lcd_size(2, 40); - KS0066_F05(config, m_lcdc1, 0); + KS0066_F05(config, m_lcdc1); m_lcdc1->set_lcd_size(2, 40); RAM(config, RAM_TAG).set_default_size("256K"); diff --git a/src/mame/skeleton/ampex.cpp b/src/mame/skeleton/ampex.cpp index cb6f049668e..013c264cc0f 100644 --- a/src/mame/skeleton/ampex.cpp +++ b/src/mame/skeleton/ampex.cpp @@ -372,7 +372,7 @@ void ampex_state::ampex(machine_config &config) m_vtac->vsyn_callback().set(FUNC(ampex_state::vsyn_w)); m_vtac->set_screen("screen"); - AY31015(config, m_uart, 0); // COM8017, actually + AY31015(config, m_uart); // COM8017, actually m_uart->write_so_callback().set(FUNC(ampex_state::so_w)); m_uart->write_dav_callback().set(FUNC(ampex_state::dav_w)); m_uart->set_auto_rdav(true); diff --git a/src/mame/skeleton/ampex210_kbd.cpp b/src/mame/skeleton/ampex210_kbd.cpp index 65acbccba88..344c0eef519 100644 --- a/src/mame/skeleton/ampex210_kbd.cpp +++ b/src/mame/skeleton/ampex210_kbd.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(AMPEX230_KEYBOARD, ampex230_keyboard_device, "ampex230_kbd", "Ampex 230 Keyboard") -ampex230_keyboard_device::ampex230_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ampex230_keyboard_device::ampex230_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMPEX230_KEYBOARD, tag, owner, clock) , m_data_out_callback(*this) , m_clock_out_callback(*this) diff --git a/src/mame/skeleton/ampex210_kbd.h b/src/mame/skeleton/ampex210_kbd.h index 7775ca3a9ad..a08a4227a1e 100644 --- a/src/mame/skeleton/ampex210_kbd.h +++ b/src/mame/skeleton/ampex210_kbd.h @@ -10,7 +10,7 @@ class ampex230_keyboard_device : public device_t { public: // construction/destruction - ampex230_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ampex230_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto data_out_callback() { return m_data_out_callback.bind(); } diff --git a/src/mame/skeleton/anzterm.cpp b/src/mame/skeleton/anzterm.cpp index 5938606f34f..eb360563fcd 100644 --- a/src/mame/skeleton/anzterm.cpp +++ b/src/mame/skeleton/anzterm.cpp @@ -419,11 +419,11 @@ void anzterm_state::anzterm(machine_config &config) m6809_device &maincpu(M6809(config, "maincpu", 15974400/4)); maincpu.set_addrmap(AS_PROGRAM, &anzterm_state::anzterm_mem); - I8214(config, "pic.ic39", 0); - MC6854(config, "adlc.ic16", 0); - MC6854(config, "adlc.1c19", 0); - ACIA6850(config, "acia.ic17", 0); - ACIA6850(config, "acia.ic18", 0); + I8214(config, "pic.ic39"); + MC6854(config, "adlc.ic16"); + MC6854(config, "adlc.1c19"); + ACIA6850(config, "acia.ic17"); + ACIA6850(config, "acia.ic18"); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER, rgb_t::green())); screen.set_screen_update(FUNC(anzterm_state::screen_update)); diff --git a/src/mame/skeleton/attache.cpp b/src/mame/skeleton/attache.cpp index 5c3404ce2e9..c1d40f77c2c 100644 --- a/src/mame/skeleton/attache.cpp +++ b/src/mame/skeleton/attache.cpp @@ -1250,7 +1250,7 @@ void attache816_state::attache816(machine_config &config) m_ctc->zc_callback<1>().set(m_sio, FUNC(z80sio_device::rxtxcb_w)); m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - I8255A(config, m_ppi, 0); + I8255A(config, m_ppi); m_ppi->out_pa_callback().set(FUNC(attache816_state::x86_comms_w)); m_ppi->in_pa_callback().set(FUNC(attache816_state::x86_comms_r)); m_ppi->out_pb_callback().set(FUNC(attache816_state::x86_irq_enable)); diff --git a/src/mame/skeleton/ax20.cpp b/src/mame/skeleton/ax20.cpp index b27f055e5dc..31db944aebc 100644 --- a/src/mame/skeleton/ax20.cpp +++ b/src/mame/skeleton/ax20.cpp @@ -150,7 +150,7 @@ void ax20_state::ax20(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_ax20); PALETTE(config, m_palette, palette_device::MONOCHROME); - I8272A(config, m_fdc, 8'000'000, true); + I8272A(config, m_fdc, XTAL::u(8'000'000), true); /* Devices */ FLOPPY_CONNECTOR(config, "fdc:0", ax20_floppies, "525dd", isa8_fdc_device::floppy_formats); diff --git a/src/mame/skeleton/basf7100.cpp b/src/mame/skeleton/basf7100.cpp index 62859323228..33798d972a5 100644 --- a/src/mame/skeleton/basf7100.cpp +++ b/src/mame/skeleton/basf7100.cpp @@ -599,20 +599,20 @@ void basf7100_state::machine_reset() void basf7100_state::basf7100(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &basf7100_state::mem_map); m_maincpu->set_addrmap(AS_IO, &basf7100_state::io_map); m_maincpu->set_irq_acknowledge_callback(FUNC(basf7100_state::maincpu_irq_callback)); - Z80(config, m_fdccpu, 4000000); + Z80(config, m_fdccpu, XTAL::u(4000000)); m_fdccpu->set_addrmap(AS_PROGRAM, &basf7100_state::fdc_mem_map); m_fdccpu->set_addrmap(AS_IO, &basf7100_state::fdc_io_map); m_fdccpu->set_irq_acknowledge_callback(FUNC(basf7100_state::fdccpu_irq_callback)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - I8251(config, m_usart[0], 0); // unknown clock + I8251(config, m_usart[0]); // unknown clock m_usart[0]->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_usart[0]->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); m_usart[0]->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); @@ -626,7 +626,7 @@ void basf7100_state::basf7100(machine_config &config) rs232.cts_handler().set(m_usart[0], FUNC(i8251_device::write_cts)); rs232.dsr_handler().set(m_usart[0], FUNC(i8251_device::write_dsr)); - I8251(config, m_usart[1], 0); // unknown clock + I8251(config, m_usart[1]); // unknown clock m_usart[1]->txd_handler().set("auxrs232", FUNC(rs232_port_device::write_txd)); m_usart[1]->rts_handler().set("auxrs232", FUNC(rs232_port_device::write_rts)); m_usart[1]->dtr_handler().set("auxrs232", FUNC(rs232_port_device::write_dtr)); @@ -688,7 +688,7 @@ void basf7100_state::basf7100(machine_config &config) m_centronics->busy_handler().set(FUNC(basf7100_state::centronics_busy_w)); // floppy - FD1791(config, m_fdc, 1000000); + FD1791(config, m_fdc, XTAL::u(1000000)); m_fdc->intrq_wr_callback().set_inputline(m_fdccpu, INPUT_LINE_IRQ0); m_fdc->drq_wr_callback().set(FUNC(basf7100_state::fdc_drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", basf7100_floppies, "basf6106", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/skeleton/basf7100_kbd.cpp b/src/mame/skeleton/basf7100_kbd.cpp index 147d208c913..dd571703ba7 100644 --- a/src/mame/skeleton/basf7100_kbd.cpp +++ b/src/mame/skeleton/basf7100_kbd.cpp @@ -194,7 +194,7 @@ ioport_constructor basf7100_kbd_device::device_input_ports() const // basf7100_kbd_device - constructor //------------------------------------------------- -basf7100_kbd_device::basf7100_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +basf7100_kbd_device::basf7100_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BASF7100_KBD, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6", "row_7", "row_8"), m_translation(*this, "translation"), diff --git a/src/mame/skeleton/basf7100_kbd.h b/src/mame/skeleton/basf7100_kbd.h index f49168d681c..6240a9cba40 100644 --- a/src/mame/skeleton/basf7100_kbd.h +++ b/src/mame/skeleton/basf7100_kbd.h @@ -24,7 +24,7 @@ class basf7100_kbd_device : public device_t, protected device_matrix_keyboard_i { public: // construction/destruction - basf7100_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + basf7100_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/mame/skeleton/bitgraph.cpp b/src/mame/skeleton/bitgraph.cpp index ccf61b7f0ec..f58440ceb57 100644 --- a/src/mame/skeleton/bitgraph.cpp +++ b/src/mame/skeleton/bitgraph.cpp @@ -496,7 +496,7 @@ void bitgraph_state::bg_motherboard(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - ACIA6850(config, m_acia0, 0); + ACIA6850(config, m_acia0); m_acia0->txd_handler().set(RS232_H_TAG, FUNC(rs232_port_device::write_txd)); m_acia0->rts_handler().set(RS232_H_TAG, FUNC(rs232_port_device::write_rts)); m_acia0->irq_handler().set_inputline(m_maincpu, M68K_IRQ_1); @@ -506,7 +506,7 @@ void bitgraph_state::bg_motherboard(machine_config &config) rs232h.dcd_handler().set(m_acia0, FUNC(acia6850_device::write_dcd)); rs232h.cts_handler().set(m_acia0, FUNC(acia6850_device::write_cts)); - ACIA6850(config, m_acia1, 0); + ACIA6850(config, m_acia1); m_acia1->txd_handler().set(RS232_K_TAG, FUNC(rs232_port_device::write_txd)); m_acia1->rts_handler().set(RS232_K_TAG, FUNC(rs232_port_device::write_rts)); m_acia1->irq_handler().set_inputline(m_maincpu, M68K_IRQ_1); @@ -517,7 +517,7 @@ void bitgraph_state::bg_motherboard(machine_config &config) rs232k.cts_handler().set(m_acia1, FUNC(acia6850_device::write_cts)); rs232k.set_option_device_input_defaults("keyboard", DEVICE_INPUT_DEFAULTS_NAME(kbd_rs232_defaults)); - ACIA6850(config, m_acia2, 0); + ACIA6850(config, m_acia2); m_acia2->txd_handler().set(RS232_D_TAG, FUNC(rs232_port_device::write_txd)); m_acia2->rts_handler().set(RS232_D_TAG, FUNC(rs232_port_device::write_rts)); m_acia2->irq_handler().set_inputline(m_maincpu, M68K_IRQ_1); @@ -535,7 +535,7 @@ void bitgraph_state::bg_motherboard(machine_config &config) m_dbrgb->fr_handler().set(FUNC(bitgraph_state::com8116_b_fr_w)); m_dbrgb->ft_handler().set(FUNC(bitgraph_state::com8116_b_ft_w)); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readca1_handler().set(FUNC(bitgraph_state::pia_ca1_r)); m_pia->cb2_handler().set(FUNC(bitgraph_state::pia_cb2_w)); m_pia->readpa_handler().set(FUNC(bitgraph_state::pia_pa_r)); @@ -543,7 +543,7 @@ void bitgraph_state::bg_motherboard(machine_config &config) m_pia->readpb_handler().set(FUNC(bitgraph_state::pia_pb_r)); m_pia->writepb_handler().set(FUNC(bitgraph_state::pia_pb_w)); - ER2055(config, m_earom, 0); + ER2055(config, m_earom); SPEAKER(config, "mono").front_center(); AY8912(config, m_psg, XTAL(1'294'400)); @@ -587,9 +587,9 @@ void bitgraph_state::bitgrpha(machine_config &config) bg_motherboard(config); - CLOCK(config, "system_clock", 40).signal_handler().set(FUNC(bitgraph_state::system_clock_write)); + CLOCK(config, "system_clock", XTAL::u(40)).signal_handler().set(FUNC(bitgraph_state::system_clock_write)); - ACIA6850(config, m_acia3, 0); + ACIA6850(config, m_acia3); m_acia3->txd_handler().set(RS232_M_TAG, FUNC(rs232_port_device::write_txd)); m_acia3->rts_handler().set(RS232_M_TAG, FUNC(rs232_port_device::write_rts)); m_acia3->irq_handler().set_inputline(M68K_TAG, M68K_IRQ_1); @@ -610,7 +610,7 @@ void bitgraph_state::bitgrphb(machine_config &config) bg_motherboard(config); // bg_ppu(config); - CLOCK(config, "system_clock", 1040).signal_handler().set(FUNC(bitgraph_state::system_clock_write)); + CLOCK(config, "system_clock", XTAL::u(1040)).signal_handler().set(FUNC(bitgraph_state::system_clock_write)); RAM(config, RAM_TAG).set_default_size("512K"); } diff --git a/src/mame/skeleton/blit.cpp b/src/mame/skeleton/blit.cpp index c1aef0bceb8..0a1c8a7c6cd 100644 --- a/src/mame/skeleton/blit.cpp +++ b/src/mame/skeleton/blit.cpp @@ -248,9 +248,9 @@ void blit_state::blit(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - CLOCK(config, "system_clock", 19200 * 16).signal_handler().set(FUNC(blit_state::system_clock_write)); + CLOCK(config, "system_clock", XTAL::u(19200 * 16)).signal_handler().set(FUNC(blit_state::system_clock_write)); - ACIA6850(config, m_acia0, 0); + ACIA6850(config, m_acia0); m_acia0->txd_handler().set(RS232_H_TAG, FUNC(rs232_port_device::write_txd)); m_acia0->rts_handler().set(RS232_H_TAG, FUNC(rs232_port_device::write_rts)); m_acia0->irq_handler().set_inputline(M68K_TAG, M68K_IRQ_5); @@ -261,7 +261,7 @@ void blit_state::blit(machine_config &config) rs232h.cts_handler().set(m_acia0, FUNC(acia6850_device::write_cts)); rs232h.set_option_device_input_defaults("null_modem", DEVICE_INPUT_DEFAULTS_NAME(host_rs232_defaults)); - ACIA6850(config, m_acia1, 0); + ACIA6850(config, m_acia1); m_acia1->txd_handler().set(RS232_K_TAG, FUNC(rs232_port_device::write_txd)); m_acia1->rts_handler().set(RS232_K_TAG, FUNC(rs232_port_device::write_rts)); m_acia1->irq_handler().set_inputline(M68K_TAG, M68K_IRQ_2); diff --git a/src/mame/skeleton/br8641.cpp b/src/mame/skeleton/br8641.cpp index 6cc378c3fb4..775365a19b1 100644 --- a/src/mame/skeleton/br8641.cpp +++ b/src/mame/skeleton/br8641.cpp @@ -179,7 +179,7 @@ void brandt8641_state::brandt8641(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 2000).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beep, XTAL::u(2000)).add_route(ALL_OUTPUTS, "mono", 0.50); // Z80APIO U9 // Z80APIO U14 diff --git a/src/mame/skeleton/busicom.cpp b/src/mame/skeleton/busicom.cpp index 57fb6cd9dca..9a8db062b23 100644 --- a/src/mame/skeleton/busicom.cpp +++ b/src/mame/skeleton/busicom.cpp @@ -234,7 +234,7 @@ void busicom_state::machine_reset() void busicom_state::busicom(machine_config &config) { /* basic machine hardware */ - I4004(config, m_maincpu, 750000); + I4004(config, m_maincpu, XTAL::u(750000)); m_maincpu->set_rom_map(&busicom_state::busicom_rom); m_maincpu->set_ram_memory_map(&busicom_state::busicom_mem); m_maincpu->set_rom_ports_map(&busicom_state::busicom_rp); diff --git a/src/mame/skeleton/c2color.cpp b/src/mame/skeleton/c2color.cpp index 3efa00c721d..7d24e52ff86 100644 --- a/src/mame/skeleton/c2color.cpp +++ b/src/mame/skeleton/c2color.cpp @@ -126,7 +126,7 @@ INPUT_PORTS_END void c2_color_state::c2_color(machine_config &config) { - I8032(config, m_maincpu, 12'000'000); // exact type and clock unknown + I8032(config, m_maincpu, XTAL::u(12'000'000)); // exact type and clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &c2_color_state::prog_map); m_maincpu->set_addrmap(AS_IO, &c2_color_state::ext_map); diff --git a/src/mame/skeleton/candela.cpp b/src/mame/skeleton/candela.cpp index 213ad4d2555..ea42f138293 100644 --- a/src/mame/skeleton/candela.cpp +++ b/src/mame/skeleton/candela.cpp @@ -680,7 +680,7 @@ void can09t_state::can09t(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &can09t_state::can09t_map); /* --PIA inits----------------------- */ - PIA6821(config, m_syspia, 0); // CPU board + PIA6821(config, m_syspia); // CPU board m_syspia->readpa_handler().set(FUNC(can09t_state::syspia_A_r)); m_syspia->readpb_handler().set(FUNC(can09t_state::syspia_B_r)); m_syspia->writepb_handler().set(FUNC(can09t_state::syspia_B_w)); @@ -693,7 +693,7 @@ void can09t_state::can09t(machine_config &config) /* 0xE20A 0xB113 (SYSPIA Control B) = 0x34 - CB2 is low and lock DDRB */ /* 0xE20E 0xB111 (SYSPIA port B) = 0x10 - Data to port B */ - PIA6821(config, m_usrpia, 0); // CPU board + PIA6821(config, m_usrpia); // CPU board m_usrpia->cb2_handler().set(FUNC(can09t_state::usrpia_cb2_w)); /* 0xE212 0xB122 (USRPIA Control A) = 0x00 - Channel A IRQ disabled */ /* 0xE212 0xB123 (USRPIA Control B) = 0x00 - Channel B IRQ disabled */ @@ -701,13 +701,13 @@ void can09t_state::can09t(machine_config &config) /* 0xE215 0xB121 (USRPIA DDR B) = 0xFF - Port B all outputs */ /* 0xE21A 0xB122 (USRPIA Control A) = 0x34 - CA2 is low and lock DDRB */ /* 0xE21A 0xB123 (USRPIA Control B) = 0x34 - CB2 is low and lock DDRB */ - PIA6821(config, m_pia3, 0); // ROM board - PIA6821(config, m_pia4, 0); // ROM board + PIA6821(config, m_pia3); // ROM board + PIA6821(config, m_pia4); // ROM board - PTM6840(config, "ptm", 0); + PTM6840(config, "ptm"); /* RS232 usage: mame can09t -window -debug -rs232 terminal */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal")); @@ -778,7 +778,7 @@ void can09_state::can09(machine_config &config) #endif /* --PIA inits----------------------- */ - PIA6821(config, m_pia1, 0); // CPU board + PIA6821(config, m_pia1); // CPU board m_pia1->readpa_handler().set(FUNC(can09_state::pia1_A_r)); m_pia1->writepa_handler().set(FUNC(can09_state::pia1_A_w)); m_pia1->readpb_handler().set(FUNC(can09_state::pia1_B_r)); @@ -793,9 +793,9 @@ void can09_state::can09(machine_config &config) /* 0xFF93 0xE034 (PIA1 Port B) = 0x18 - Write Data on Port B */ #if 1 - PIA6821(config, PIA2_TAG, 0); // CPU board - ACIA6850(config, "acia1", 0); // CPU board - ACIA6850(config, "acia2", 0); // CPU board + PIA6821(config, PIA2_TAG); // CPU board + ACIA6850(config, "acia1"); // CPU board + ACIA6850(config, "acia2"); // CPU board #endif } diff --git a/src/mame/skeleton/cd100.cpp b/src/mame/skeleton/cd100.cpp index 145d4be1bbc..c2d5b08ca4d 100644 --- a/src/mame/skeleton/cd100.cpp +++ b/src/mame/skeleton/cd100.cpp @@ -237,7 +237,7 @@ void cd100_state::cd100b(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // 6264/62256 + same battery as RTC - RTC72421(config, "rtc", 32768).out_int_handler().set_inputline(m_maincpu, Z180_INPUT_LINE_IRQ2); + RTC72421(config, "rtc", XTAL::u(32768)).out_int_handler().set_inputline(m_maincpu, Z180_INPUT_LINE_IRQ2); M6803(config, m_mechcpu, 4.9152_MHz_XTAL); m_mechcpu->set_addrmap(AS_PROGRAM, &cd100_state::mc6803_map); diff --git a/src/mame/skeleton/cd2650.cpp b/src/mame/skeleton/cd2650.cpp index c075994a306..ec83a67adc4 100644 --- a/src/mame/skeleton/cd2650.cpp +++ b/src/mame/skeleton/cd2650.cpp @@ -352,10 +352,10 @@ void cd2650_state::cd2650(machine_config &config) /* Sound */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 950).add_route(ALL_OUTPUTS, "mono", 0.50); // guess + BEEP(config, "beeper", XTAL::u(950)).add_route(ALL_OUTPUTS, "mono", 0.50); // guess /* Devices */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(cd2650_state::kbd_put)); CASSETTE(config, m_cass); m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); diff --git a/src/mame/skeleton/ckz80.cpp b/src/mame/skeleton/ckz80.cpp index b1667cf4fc2..9f793f99164 100644 --- a/src/mame/skeleton/ckz80.cpp +++ b/src/mame/skeleton/ckz80.cpp @@ -204,7 +204,7 @@ void ckz80_state::ckz80(machine_config &config) m_maincpu->set_addrmap(AS_IO, &ckz80_state::io_map); m_maincpu->set_daisy_config(daisy_chain); - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(ckz80_state::kbd_put)); UPD765A(config, m_fdc, 8_MHz_XTAL, true, true); FLOPPY_CONNECTOR(config, "fdc:0", ckz80_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/skeleton/consola_emt.cpp b/src/mame/skeleton/consola_emt.cpp index 74bff79497f..5bc870081a5 100644 --- a/src/mame/skeleton/consola_emt.cpp +++ b/src/mame/skeleton/consola_emt.cpp @@ -277,7 +277,7 @@ void consoemt_state::consoemt(machine_config &config) PALETTE(config, "palette", FUNC(consoemt_state::consoemt_palette), 3); - KS0066_F05(config, m_lcdc, 0); + KS0066_F05(config, m_lcdc); m_lcdc->set_lcd_size(2, 20); m_lcdc->set_pixel_update_cb(FUNC(consoemt_state::lcd_pixel_update)); } diff --git a/src/mame/skeleton/cortex.cpp b/src/mame/skeleton/cortex.cpp index 2308cdddce1..53bc1c24662 100644 --- a/src/mame/skeleton/cortex.cpp +++ b/src/mame/skeleton/cortex.cpp @@ -223,7 +223,7 @@ void cortex_state::cortex(machine_config &config) crtc.set_vram_size(0x4000); SCREEN(config, "screen", SCREEN_TYPE_RASTER); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(cortex_state::kbd_put)); //TMS9902(config, "uart1", XTAL(12'000'000) / 4); @@ -231,7 +231,7 @@ void cortex_state::cortex(machine_config &config) /* Sound */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 950); // guess + BEEP(config, m_beep, XTAL::u(950)); // guess m_beep->add_route(ALL_OUTPUTS, "mono", 0.05); } diff --git a/src/mame/skeleton/cosmicos.cpp b/src/mame/skeleton/cosmicos.cpp index 395e1b666ae..dd3452fb5cb 100644 --- a/src/mame/skeleton/cosmicos.cpp +++ b/src/mame/skeleton/cosmicos.cpp @@ -526,7 +526,7 @@ void cosmicos_state::cosmicos(machine_config &config) /* video hardware */ config.set_default_layout(layout_cosmicos); - DM9368(config, m_led, 0); + DM9368(config, m_led); TIMER(config, "digit").configure_periodic(FUNC(cosmicos_state::digit_tick), attotime::from_hz(100)); TIMER(config, "interrupt").configure_periodic(FUNC(cosmicos_state::int_tick), attotime::from_hz(1000)); diff --git a/src/mame/skeleton/cp1.cpp b/src/mame/skeleton/cp1.cpp index b1efa22d6f9..68edf5cf422 100644 --- a/src/mame/skeleton/cp1.cpp +++ b/src/mame/skeleton/cp1.cpp @@ -280,13 +280,13 @@ void cp1_state::cp1(machine_config &config) maincpu.t0_in_cb().set_log("t0_r"); maincpu.t1_in_cb().set_log("t1_r"); - i8155_device &i8155(I8155(config, "i8155", 0)); + i8155_device &i8155(I8155(config, "i8155")); i8155.out_pa_callback().set(FUNC(cp1_state::i8155_porta_w)); i8155.in_pb_callback().set(FUNC(cp1_state::i8155_portb_r)); i8155.out_pb_callback().set(FUNC(cp1_state::i8155_portb_w)); i8155.out_pc_callback().set(FUNC(cp1_state::i8155_portc_w)); - I8155(config, "i8155_cp3", 0); + I8155(config, "i8155_cp3"); PWM_DISPLAY(config, m_display).set_size(6, 7); m_display->set_segmask(0x3f, 0x7f); diff --git a/src/mame/skeleton/ct909e_segadvd.cpp b/src/mame/skeleton/ct909e_segadvd.cpp index 6ae67c1d3a1..8bb69dff4fa 100644 --- a/src/mame/skeleton/ct909e_segadvd.cpp +++ b/src/mame/skeleton/ct909e_segadvd.cpp @@ -70,7 +70,7 @@ INPUT_PORTS_END void ct909e_megatrix_state::megatrix(machine_config &config) { - SPARCV8(config, m_maincpu, 100'000'000); // unknown frequency + SPARCV8(config, m_maincpu, XTAL::u(100'000'000)); // unknown frequency m_maincpu->set_addrmap(0, &ct909e_megatrix_state::mem_map); m_maincpu->set_addrmap(0x19, &ct909e_megatrix_state::mem_map); diff --git a/src/mame/skeleton/cxhumax.cpp b/src/mame/skeleton/cxhumax.cpp index ccfb44dfe4e..aa12e717a42 100644 --- a/src/mame/skeleton/cxhumax.cpp +++ b/src/mame/skeleton/cxhumax.cpp @@ -1044,12 +1044,12 @@ void cxhumax_state::machine_reset() void cxhumax_state::cxhumax(machine_config &config) { - ARM920T(config, m_maincpu, 180000000); // CX24175 (RevC up?) + ARM920T(config, m_maincpu, XTAL::u(180000000)); // CX24175 (RevC up?) m_maincpu->set_addrmap(AS_PROGRAM, &cxhumax_state::cxhumax_map); INTEL_28F320J3D(config, "flash"); - I2C_24C64(config, "eeprom", 0); // 24LC64 + I2C_24C64(config, "eeprom"); // 24LC64 /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -1061,7 +1061,7 @@ void cxhumax_state::cxhumax(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); } ROM_START( hxhdci2k ) diff --git a/src/mame/skeleton/daruma.cpp b/src/mame/skeleton/daruma.cpp index f76048451c4..7f6679a19d2 100644 --- a/src/mame/skeleton/daruma.cpp +++ b/src/mame/skeleton/daruma.cpp @@ -121,7 +121,7 @@ INPUT_PORTS_END void daruma_state::daruma(machine_config &config) { /* basic machine hardware */ - I80C32(config, m_maincpu, 11059200); //verified on pcb + I80C32(config, m_maincpu, XTAL::u(11059200)); //verified on pcb m_maincpu->set_addrmap(AS_PROGRAM, &daruma_state::mem_prg); m_maincpu->set_addrmap(AS_IO, &daruma_state::mem_io); // TODO: ports diff --git a/src/mame/skeleton/datacast.cpp b/src/mame/skeleton/datacast.cpp index 46a2d991dc6..76bce62832e 100644 --- a/src/mame/skeleton/datacast.cpp +++ b/src/mame/skeleton/datacast.cpp @@ -192,7 +192,7 @@ void datacast_state::datacast(machine_config &config) m_screen->set_raw(6_MHz_XTAL, 768, 0, 480, 312, 0, 250); m_screen->set_screen_update("saa5240", FUNC(saa5240a_device::screen_update)); - MM74C923(config, m_kb, 0); + MM74C923(config, m_kb); m_kb->x1_rd_callback().set_ioport("X1"); m_kb->x2_rd_callback().set_ioport("X2"); m_kb->x3_rd_callback().set_ioport("X3"); @@ -203,7 +203,7 @@ void datacast_state::datacast(machine_config &config) SAA5240A(config, m_cct, 6_MHz_XTAL); m_cct->set_addrmap(0, &datacast_state::saa5240_map); - //SAA5250(config, m_saa5250, 0); + //SAA5250(config, m_saa5250); //m_saa5250->set_addrmap(0, &datacast_state::saa5250_map); // 2K RAM I2C_PCF8582(config, m_i2cmem).set_e0(1); @@ -217,7 +217,7 @@ void datacast_state::datacast(machine_config &config) input_merger_device &usartint(INPUT_MERGER_ANY_HIGH(config, "usartint")); usartint.output_handler().set(m_maincpu, FUNC(i80186_cpu_device::int0_w)); - I8251(config, m_usart[0], 0); + I8251(config, m_usart[0]); m_usart[0]->txd_handler().set("modem", FUNC(rs232_port_device::write_txd)); m_usart[0]->dtr_handler().set("modem", FUNC(rs232_port_device::write_dtr)); m_usart[0]->rts_handler().set("modem", FUNC(rs232_port_device::write_rts)); @@ -228,7 +228,7 @@ void datacast_state::datacast(machine_config &config) modem.rxd_handler().set(m_usart[0], FUNC(i8251_device::write_rxd)); modem.dsr_handler().set(m_usart[0], FUNC(i8251_device::write_dsr)); - I8251(config, m_usart[1], 0); + I8251(config, m_usart[1]); m_usart[1]->txd_handler().set("printer", FUNC(rs232_port_device::write_txd)); m_usart[1]->dtr_handler().set("printer", FUNC(rs232_port_device::write_dtr)); m_usart[1]->rts_handler().set("printer", FUNC(rs232_port_device::write_rts)); @@ -241,7 +241,7 @@ void datacast_state::datacast(machine_config &config) // Teletext data is extracted from video signal by SAA5231. // Use bitbanger to read a T42 teletext stream. - BITBANGER(config, m_ttd, 0); + BITBANGER(config, m_ttd); } diff --git a/src/mame/skeleton/design.cpp b/src/mame/skeleton/design.cpp index 65ab3d8372b..92afb07177c 100644 --- a/src/mame/skeleton/design.cpp +++ b/src/mame/skeleton/design.cpp @@ -265,7 +265,7 @@ void design6_state::design6(machine_config &config) m_maincpu->set_addrmap(AS_IO, &design6_state::io_map); m_maincpu->port_out_cb<1>().set(FUNC(design6_state::port1_w)); - ADDRESS_MAP_BANK(config, m_iobank, 0); + ADDRESS_MAP_BANK(config, m_iobank); m_iobank->set_map(&design6_state::iobanked_map); m_iobank->set_addr_width(17); m_iobank->set_data_width(8); diff --git a/src/mame/skeleton/didact.cpp b/src/mame/skeleton/didact.cpp index 8873be65f47..ee080a99ca3 100644 --- a/src/mame/skeleton/didact.cpp +++ b/src/mame/skeleton/didact.cpp @@ -786,7 +786,7 @@ void modulab_state::modulab(machine_config &config) config.set_default_layout(layout_modulab); /* Devices */ - MM74C923(config, m_kb, 0); + MM74C923(config, m_kb); m_kb->set_cap_osc(CAP_U(0.10)); m_kb->set_cap_debounce(CAP_U(1)); m_kb->da_wr_callback().set(FUNC(modulab_state::da_w)); @@ -811,12 +811,12 @@ void md6802_state::md6802(machine_config &config) config.set_default_layout(layout_md6802); /* Devices */ - TTL74145(config, m_tb16_74145, 0); + TTL74145(config, m_tb16_74145); /* PIA #1 0xA000-0xA003 - used differently by laborations and loaded software */ - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); /* PIA #2 Keyboard & Display 0xC000-0xC003 */ - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); /* --PIA init----------------------- */ /* 0xE007 0xC002 (DDR B) = 0xFF - Port B all outputs and set to 0 (zero) */ /* 0xE00B 0xC000 (DDR A) = 0x70 - Port A three outputs and set to 0 (zero) */ @@ -841,16 +841,16 @@ void mp68a_state::mp68a(machine_config &config) { // Clock source is based on a N9602N Dual Retriggerable Resettable Monostable Multivibrator oscillator at aprox 505KHz. // Trimpot seems broken/stuck at 5K Ohm thu. ROM code 1Ms delay loops suggest 1MHz+ - M6800(config, m_maincpu, 505000); + M6800(config, m_maincpu, XTAL::u(505000)); m_maincpu->set_addrmap(AS_PROGRAM, &mp68a_state::mp68a_map); config.set_default_layout(layout_mp68a); /* Devices */ /* PIA #1 0x500-0x503 - used differently by laborations and loaded software */ - PIA6820(config, m_pia1, 0); + PIA6820(config, m_pia1); /* PIA #2 Keyboard & Display 0x600-0x603 */ - PIA6820(config, m_pia2, 0); + PIA6820(config, m_pia2); /* --PIA inits----------------------- */ /* 0x0BAF 0x601 (Control A) = 0x30 - CA2 is low and enable DDRA */ /* 0x0BB1 0x603 (Control B) = 0x30 - CB2 is low and enable DDRB */ @@ -883,12 +883,12 @@ void mp68a_state::mp68a(machine_config &config) /* 0x086B 0x600 (Port A) = 0x70 */ /* 0x086B 0x600 (Port A) = 0x50 */ /* 0x086B 0x600 (Port A) = 0x70 */ - DM9368(config, m_digits[0], 0).update_cb().set(FUNC(mp68a_state::digit_w<0>)); - DM9368(config, m_digits[1], 0).update_cb().set(FUNC(mp68a_state::digit_w<1>)); - DM9368(config, m_digits[2], 0).update_cb().set(FUNC(mp68a_state::digit_w<2>)); - DM9368(config, m_digits[3], 0).update_cb().set(FUNC(mp68a_state::digit_w<3>)); - DM9368(config, m_digits[4], 0).update_cb().set(FUNC(mp68a_state::digit_w<4>)); - DM9368(config, m_digits[5], 0).update_cb().set(FUNC(mp68a_state::digit_w<5>)); + DM9368(config, m_digits[0]).update_cb().set(FUNC(mp68a_state::digit_w<0>)); + DM9368(config, m_digits[1]).update_cb().set(FUNC(mp68a_state::digit_w<1>)); + DM9368(config, m_digits[2]).update_cb().set(FUNC(mp68a_state::digit_w<2>)); + DM9368(config, m_digits[3]).update_cb().set(FUNC(mp68a_state::digit_w<3>)); + DM9368(config, m_digits[4]).update_cb().set(FUNC(mp68a_state::digit_w<4>)); + DM9368(config, m_digits[5]).update_cb().set(FUNC(mp68a_state::digit_w<5>)); /* Cassette */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/skeleton/digel804.cpp b/src/mame/skeleton/digel804.cpp index d8f5fc2d3df..f675e15ab01 100644 --- a/src/mame/skeleton/digel804.cpp +++ b/src/mame/skeleton/digel804.cpp @@ -652,7 +652,7 @@ void digel804_state::digel804(machine_config &config) /* video hardware */ config.set_default_layout(layout_digel804); - MM74C923(config, m_kb, 0); + MM74C923(config, m_kb); m_kb->da_wr_callback().set(FUNC(digel804_state::da_w)); m_kb->x1_rd_callback().set_ioport("LINE0"); m_kb->x2_rd_callback().set_ioport("LINE1"); @@ -660,7 +660,7 @@ void digel804_state::digel804(machine_config &config) m_kb->x4_rd_callback().set_ioport("LINE3"); /* acia */ - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(3.6864_MHz_XTAL/2); m_acia->irq_handler().set(FUNC(digel804_state::acia_irq_w)); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); diff --git a/src/mame/skeleton/digilog320.cpp b/src/mame/skeleton/digilog320.cpp index 7d7f26e0d5c..8913e9784bd 100644 --- a/src/mame/skeleton/digilog320.cpp +++ b/src/mame/skeleton/digilog320.cpp @@ -364,7 +364,7 @@ void digilog320_state::digilog320(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - AM9519(config, m_uic, 0); + AM9519(config, m_uic); m_uic->out_int_callback().set_inputline(m_subcpu, INPUT_LINE_IRQ0); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -385,7 +385,7 @@ void digilog320_state::digilog320(machine_config &config) m_duart->outport_cb().set("usart", FUNC(i8251_device::write_txc)).bit(3); m_duart->outport_cb().append("usart", FUNC(i8251_device::write_rxc)).bit(3); - I8251(config, "usart", 0); + I8251(config, "usart"); SCC8530N(config, m_scc[0], 3.6864_MHz_XTAL); diff --git a/src/mame/skeleton/digilog_kbd.cpp b/src/mame/skeleton/digilog_kbd.cpp index c324a6f03eb..c905265dd94 100644 --- a/src/mame/skeleton/digilog_kbd.cpp +++ b/src/mame/skeleton/digilog_kbd.cpp @@ -206,7 +206,7 @@ ioport_constructor digilog_kbd_device::device_input_ports() const // digilog_kbd_device - constructor //------------------------------------------------- -digilog_kbd_device::digilog_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +digilog_kbd_device::digilog_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DIGILOG_KBD, tag, owner, clock), m_mcu(*this, "mcu"), m_keys(*this, "row_%x", 0U), diff --git a/src/mame/skeleton/digilog_kbd.h b/src/mame/skeleton/digilog_kbd.h index 143925c2fbc..dee850f25b2 100644 --- a/src/mame/skeleton/digilog_kbd.h +++ b/src/mame/skeleton/digilog_kbd.h @@ -24,7 +24,7 @@ class digilog_kbd_device : public device_t { public: // construction/destruction - digilog_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + digilog_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto tx_handler() { return m_tx_handler.bind(); } diff --git a/src/mame/skeleton/dim68k.cpp b/src/mame/skeleton/dim68k.cpp index 113bf2c3f04..72e96f1ebde 100644 --- a/src/mame/skeleton/dim68k.cpp +++ b/src/mame/skeleton/dim68k.cpp @@ -435,12 +435,12 @@ void dim68k_state::dim68k(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - UPD765A(config, m_fdc, 4'000'000, true, true); // these options unknown + UPD765A(config, m_fdc, XTAL::u(4'000'000), true, true); // these options unknown FLOPPY_CONNECTOR(config, m_floppy[0], dim68k_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, m_floppy[1], dim68k_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); m_fdc->intrq_wr_callback().set(FUNC(dim68k_state::fdc_irq_w)); - MC6845(config, m_crtc, 1790000); + MC6845(config, m_crtc, XTAL::u(1790000)); m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); diff --git a/src/mame/skeleton/dm7000.cpp b/src/mame/skeleton/dm7000.cpp index 62571f39265..42533541d5b 100644 --- a/src/mame/skeleton/dm7000.cpp +++ b/src/mame/skeleton/dm7000.cpp @@ -319,7 +319,7 @@ void dm7000_state::dm7000(machine_config &config) screen.set_visarea(0, 640-1, 0, 480-1); screen.set_screen_update(FUNC(dm7000_state::screen_update_dm7000)); - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(dm7000_state::kbd_put)); } diff --git a/src/mame/skeleton/dmv.cpp b/src/mame/skeleton/dmv.cpp index cd8b94c62be..55b8c712547 100644 --- a/src/mame/skeleton/dmv.cpp +++ b/src/mame/skeleton/dmv.cpp @@ -810,7 +810,7 @@ void dmv_state::dmv(machine_config &config) config.set_perfect_quantum(m_maincpu); - DMV_KEYBOARD(config, m_keyboard, 0); + DMV_KEYBOARD(config, m_keyboard); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -844,13 +844,13 @@ void dmv_state::dmv(machine_config &config) m_dmac->out_iow_callback<3>().set(m_fdc, FUNC(i8272a_device::dma_w)); m_dmac->out_dack_callback<3>().set(FUNC(dmv_state::dmac_dack3)); - I8272A(config, m_fdc, 8'000'000, true); + I8272A(config, m_fdc, XTAL::u(8'000'000), true); m_fdc->intrq_wr_callback().set(FUNC(dmv_state::fdc_irq)); m_fdc->drq_wr_callback().set(m_dmac, FUNC(am9517a_device::dreq3_w)); FLOPPY_CONNECTOR(config, "i8272:0", dmv_floppies, "525dd", dmv_state::floppy_formats); FLOPPY_CONNECTOR(config, "i8272:1", dmv_floppies, "525dd", dmv_state::floppy_formats); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(50); m_pit->out_handler<0>().set(FUNC(dmv_state::pit_out0)); m_pit->set_clk<2>(XTAL(24'000'000) / 3 / 16); diff --git a/src/mame/skeleton/dmv_keyb.cpp b/src/mame/skeleton/dmv_keyb.cpp index a2a88666925..27b6176bc0f 100644 --- a/src/mame/skeleton/dmv_keyb.cpp +++ b/src/mame/skeleton/dmv_keyb.cpp @@ -196,7 +196,7 @@ ioport_constructor dmv_keyboard_device::device_input_ports() const // dmv_keyboard_device - constructor //------------------------------------------------- -dmv_keyboard_device::dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dmv_keyboard_device::dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMV_KEYBOARD, tag, owner, clock) , m_maincpu(*this, "mcu") , m_keyboard(*this, "COL.%u", 0) diff --git a/src/mame/skeleton/dmv_keyb.h b/src/mame/skeleton/dmv_keyb.h index 75b6c46a19d..7d63da51ca2 100644 --- a/src/mame/skeleton/dmv_keyb.h +++ b/src/mame/skeleton/dmv_keyb.h @@ -25,7 +25,7 @@ class dmv_keyboard_device : public device_t { public: // construction/destruction - dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(sd_poll_w); DECLARE_READ_LINE_MEMBER(sd_poll_r); diff --git a/src/mame/skeleton/dps1.cpp b/src/mame/skeleton/dps1.cpp index ed93f730a86..e427734f0f1 100644 --- a/src/mame/skeleton/dps1.cpp +++ b/src/mame/skeleton/dps1.cpp @@ -191,7 +191,7 @@ void dps1_state::machine_reset() { m_bank1->set_entry(1); // set fdc for 8 inch floppies - m_fdc->set_rate(500000); + m_fdc->set_rate(XTAL::u(500000)); // turn on the motor floppy_image_device *floppy = m_floppy0->get_device(); m_fdc->set_floppy(floppy); @@ -224,8 +224,8 @@ void dps1_state::dps1(machine_config &config) rs232.dsr_handler().set(uart, FUNC(scn2651_device::dsr_w)); rs232.cts_handler().set(uart, FUNC(scn2651_device::cts_w)); - AM9519(config, "am9519a", 0); - AM9519(config, "am9519b", 0); + AM9519(config, "am9519a"); + AM9519(config, "am9519b"); // floppy UPD765A(config, m_fdc, 16_MHz_XTAL / 2, false, true); diff --git a/src/mame/skeleton/e100.cpp b/src/mame/skeleton/e100.cpp index 4615775cd09..5faef15255a 100644 --- a/src/mame/skeleton/e100.cpp +++ b/src/mame/skeleton/e100.cpp @@ -528,7 +528,7 @@ void e100_state::e100(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &e100_state::e100_map); /* Devices */ - TTL74145(config, m_kbd_74145, 0); + TTL74145(config, m_kbd_74145); /* --PIA inits----------------------- */ /* 0xF883 0xC818 (PIA1 DDR A) = 0x00 - Port A all inputs */ @@ -545,7 +545,7 @@ void e100_state::e100(machine_config &config) /* 0xF894 0xC818 (PIA2 Control A) = 0x34 - CA2 is low and lock DDRA */ /* 0xF896 0xC818 (PIA1 Control B) = 0x34 - CB2 is low and lock DDRB */ /* 0xF896 0xC818 (PIA2 Control B) = 0x34 - CB2 is low and lock DDRB */ - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->writepa_handler().set(FUNC(e100_state::pia1_kbA_w)); m_pia1->readpa_handler().set(FUNC(e100_state::pia1_kbA_r)); m_pia1->writepb_handler().set(FUNC(e100_state::pia1_kbB_w)); @@ -555,7 +555,7 @@ void e100_state::e100(machine_config &config) m_pia1->cb2_handler().set(FUNC(e100_state::pia1_cb2_w)); /* The optional second PIA enables the expansion port on CA1 and a software RTC with 50Hz resolution */ - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); m_pia2->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE); /* Serial port support */ diff --git a/src/mame/skeleton/easy_karaoke.cpp b/src/mame/skeleton/easy_karaoke.cpp index 0ddece8a557..5d3e1f0e60d 100644 --- a/src/mame/skeleton/easy_karaoke.cpp +++ b/src/mame/skeleton/easy_karaoke.cpp @@ -146,7 +146,7 @@ void easy_karaoke_state::arm_map(address_map &map) void easy_karaoke_state::easy_karaoke_base(machine_config &config) { - ARM9(config, m_maincpu, 72000000); // ARM 720 core + ARM9(config, m_maincpu, XTAL::u(72000000)); // ARM 720 core m_maincpu->set_addrmap(AS_PROGRAM, &easy_karaoke_state::arm_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/skeleton/elzet80.cpp b/src/mame/skeleton/elzet80.cpp index 3501adf4478..94ce4207f2d 100644 --- a/src/mame/skeleton/elzet80.cpp +++ b/src/mame/skeleton/elzet80.cpp @@ -130,14 +130,14 @@ void elzet80_state::elzet80(machine_config &config) m_maincpu->set_addrmap(AS_IO, &elzet80_state::io_map); // devices - FD1793(config, m_fdc, 1000000); // unknown where this is derived + FD1793(config, m_fdc, XTAL::u(1000000)); // unknown where this is derived FLOPPY_CONNECTOR(config, "fdc:0", elzet80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", elzet80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - Z80PIO(config, m_pio, 0); - Z80SIO(config, m_uart, 0); - Z80CTC(config, m_ctc, 0); - Z80DMA(config, m_dma, 0); + Z80PIO(config, m_pio); + Z80SIO(config, m_uart); + Z80CTC(config, m_ctc); + Z80DMA(config, m_dma); } diff --git a/src/mame/skeleton/epic14e.cpp b/src/mame/skeleton/epic14e.cpp index 6f3eb99bf10..f061a6f70cf 100644 --- a/src/mame/skeleton/epic14e.cpp +++ b/src/mame/skeleton/epic14e.cpp @@ -209,7 +209,7 @@ void epic14e_state::epic14e(machine_config &config) MOS6522(config, m_via, 17.01_MHz_XTAL / 9); // SY6522A m_via->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); - I8748(config, "keybmcu", 4608000).set_disable(); + I8748(config, "keybmcu", XTAL::u(4608000)).set_disable(); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_color(rgb_t::green()); diff --git a/src/mame/skeleton/eurit.cpp b/src/mame/skeleton/eurit.cpp index 8fe65e434d8..44cc39594d0 100644 --- a/src/mame/skeleton/eurit.cpp +++ b/src/mame/skeleton/eurit.cpp @@ -146,7 +146,7 @@ void eurit_state::palette_init(palette_device &palette) void eurit_state::eurit30(machine_config &config) { - M37730S2(config, m_maincpu, 4'096'000); + M37730S2(config, m_maincpu, XTAL::u(4'096'000)); m_maincpu->set_addrmap(AS_PROGRAM, &eurit_state::mem_map); m_maincpu->p4_in_cb().set("lcdc", FUNC(hd44780_device::db_r)); // not actually used for input? m_maincpu->p4_out_cb().set("lcdc", FUNC(hd44780_device::db_w)); @@ -156,7 +156,7 @@ void eurit_state::eurit30(machine_config &config) m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rw_w)).bit(5); // not actually used for read mode? m_maincpu->p6_out_cb().append("lcdc", FUNC(hd44780_device::rs_w)).bit(4); - am79c30a_device &dsc(AM79C30A(config, "dsc", 12'288'000)); + am79c30a_device &dsc(AM79C30A(config, "dsc", XTAL::u(12'288'000))); dsc.int_callback().set_inputline(m_maincpu, M37710_LINE_IRQ0); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); @@ -169,7 +169,7 @@ void eurit_state::eurit30(machine_config &config) PALETTE(config, "palette", FUNC(eurit_state::palette_init), 2); - hd44780_device &lcdc(SED1278_0B(config, "lcdc", 0)); + hd44780_device &lcdc(SED1278_0B(config, "lcdc")); lcdc.set_lcd_size(2, 20); lcdc.set_pixel_update_cb(FUNC(eurit_state::lcd_pixel_update)); } diff --git a/src/mame/skeleton/eurocom2.cpp b/src/mame/skeleton/eurocom2.cpp index 01432c5d09d..23e68298c40 100644 --- a/src/mame/skeleton/eurocom2.cpp +++ b/src/mame/skeleton/eurocom2.cpp @@ -424,10 +424,10 @@ void eurocom2_state::eurocom2(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(eurocom2_state::kbd_put)); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->ca2_w(m_sst_state); // SST output Q14 m_pia1->cb1_w(m_sst_state); // SST output Q6 m_pia1->cb2_handler().set(FUNC(eurocom2_state::pia1_cb2_w)); // SST reset input @@ -436,11 +436,11 @@ void eurocom2_state::eurocom2(machine_config &config) // m_pia1->irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); // m_pia1->irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); // m_pia2->irqa_handler().set_inputline("maincpu", M6809_FIRQ_LINE); // m_pia2->irqb_handler().set_inputline("maincpu", M6809_FIRQ_LINE); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr)); @@ -464,14 +464,14 @@ void waveterm_state::waveterm(machine_config &config) // ports A(in/out), B(out), CA1(in), CA2(in), and CB2(out) = interface to PPG bus via DIL socket on WTI board // CB1 -- front panel "End" button - PIA6821(config, m_pia3, 0); + PIA6821(config, m_pia3); // m_pia3->readpa_handler().set(FUNC(waveterm_state::pia3_pa_r)); // m_pia3->writepa_handler().set(FUNC(waveterm_state::pia3_pa_w)); m_pia3->writepb_handler().set(FUNC(waveterm_state::pia3_pb_w)); m_pia3->readcb1_handler().set_ioport("FP"); // m_pia3->cb2_handler().set(FUNC(waveterm_state::pia3_cb2_w)); - PTM6840(config, m_ptm, 0); + PTM6840(config, m_ptm); SOFTWARE_LIST(config, "disk_list").set_original("waveterm"); } diff --git a/src/mame/skeleton/fanucspmg.cpp b/src/mame/skeleton/fanucspmg.cpp index 8259c6d2b75..03286dacea4 100644 --- a/src/mame/skeleton/fanucspmg.cpp +++ b/src/mame/skeleton/fanucspmg.cpp @@ -963,17 +963,17 @@ void fanucspmg_state::fanucspmg(machine_config &config) I8085A(config, m_subcpu, XTAL(16'000'000)/2/2); m_subcpu->set_addrmap(AS_PROGRAM, &fanucspmg_state::subcpu_mem); - I8251(config, m_usart[0], 0); - I8251(config, m_usart[1], 0); - I8251(config, m_usart[2], 0); - I8251(config, m_usart[3], 0); + I8251(config, m_usart[0]); + I8251(config, m_usart[1]); + I8251(config, m_usart[2]); + I8251(config, m_usart[3]); - PIT8253(config, m_pit[0], 0); + PIT8253(config, m_pit[0]); m_pit[0]->set_clk<0>(XTAL(15'000'000)/12); m_pit[0]->set_clk<1>(XTAL(15'000'000)/12); m_pit[0]->set_clk<2>(XTAL(15'000'000)/12); - PIT8253(config, m_pit[1], 0); + PIT8253(config, m_pit[1]); m_pit[1]->set_clk<0>(XTAL(15'000'000)/12); m_pit[1]->set_clk<1>(XTAL(15'000'000)/12); m_pit[1]->set_clk<2>(XTAL(15'000'000)/12); @@ -986,16 +986,16 @@ void fanucspmg_state::fanucspmg(machine_config &config) m_dmac->in_ior_cb<0>().set(FUNC(fanucspmg_state::fdcdma_r)); m_dmac->out_iow_cb<0>().set(FUNC(fanucspmg_state::fdcdma_w)); - PIC8259(config, m_pic[0], 0); + PIC8259(config, m_pic[0]); m_pic[0]->out_int_callback().set_inputline(m_maincpu, 0); m_pic[0]->in_sp_callback().set_constant(1); m_pic[0]->read_slave_ack_callback().set(FUNC(fanucspmg_state::get_slave_ack)); - PIC8259(config, m_pic[1], 0); + PIC8259(config, m_pic[1]); m_pic[1]->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir7_w)); m_pic[1]->in_sp_callback().set_constant(0); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); m_fdc->intrq_wr_callback().set(m_pic[0], FUNC(pic8259_device::ir3_w)); m_fdc->drq_wr_callback().set(m_dmac, FUNC(i8257_device::dreq0_w)); FLOPPY_CONNECTOR(config, FDC_TAG":0", fanuc_floppies, "525dd", fanucspmg_state::floppy_formats); diff --git a/src/mame/skeleton/fc100.cpp b/src/mame/skeleton/fc100.cpp index 59447471ed8..74ee2a7cd0f 100644 --- a/src/mame/skeleton/fc100.cpp +++ b/src/mame/skeleton/fc100.cpp @@ -548,7 +548,7 @@ void fc100_state::fc100(machine_config &config) m_cass->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set([this] (bool state) { m_cassbit = state; }); clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL(4'915'200)/16/16)); // gives 19200 uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); diff --git a/src/mame/skeleton/fk1.cpp b/src/mame/skeleton/fk1.cpp index e0d11652fee..e3b2faf3ca8 100644 --- a/src/mame/skeleton/fk1.cpp +++ b/src/mame/skeleton/fk1.cpp @@ -437,7 +437,7 @@ void fk1_state::fk1(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - pit8253_device &pit8253(PIT8253(config, "pit", 0)); + pit8253_device &pit8253(PIT8253(config, "pit")); pit8253.set_clk<0>(50); pit8253.out_handler<0>().set(FUNC(fk1_state::pit_out0)); pit8253.set_clk<1>(1000000); @@ -468,7 +468,7 @@ void fk1_state::fk1(machine_config &config) ppi3.out_pc_callback().set(FUNC(fk1_state::ppi3_c_w)); /* uart */ - I8251(config, "uart", 0); + I8251(config, "uart"); /* internal ram */ RAM(config, RAM_TAG).set_default_size("48K"); // 32 for banks1,2 + 16 for vram diff --git a/src/mame/skeleton/ft68m.cpp b/src/mame/skeleton/ft68m.cpp index fe04a2c7c0e..de183faf7a9 100644 --- a/src/mame/skeleton/ft68m.cpp +++ b/src/mame/skeleton/ft68m.cpp @@ -88,7 +88,7 @@ void ft68m_state::ft68m(machine_config &config) M68000(config, m_maincpu, XTAL(19'660'800) / 2); m_maincpu->set_addrmap(AS_PROGRAM, &ft68m_state::mem_map); - upd7201_device& mpsc(UPD7201(config, "mpsc", 0)); + upd7201_device& mpsc(UPD7201(config, "mpsc")); mpsc.out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd)); mpsc.out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr)); mpsc.out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/skeleton/gimix.cpp b/src/mame/skeleton/gimix.cpp index f6f298de4ee..34d93a82cd3 100644 --- a/src/mame/skeleton/gimix.cpp +++ b/src/mame/skeleton/gimix.cpp @@ -751,7 +751,7 @@ void gimix_state::gimix(machine_config &config) rtc.irq().set(m_irqs, FUNC(input_merger_device::in_w<0>)); /* timer */ - ptm6840_device &ptm(PTM6840(config, "timer", 2'000'000)); // clock is a guess + ptm6840_device &ptm(PTM6840(config, "timer", XTAL::u(2'000'000))); // clock is a guess // PCB pictures show both the RTC and timer set to generate IRQs (are jumper configurable) ptm.irq_callback().set(m_irqs, FUNC(input_merger_device::in_w<1>)); @@ -766,31 +766,31 @@ void gimix_state::gimix(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:3", gimix_floppies, "525hd", gimix_state::floppy_formats).enable_sound(true); /* parallel ports */ - pia6821_device &pia1(PIA6821(config, "pia1", 2'000'000)); + pia6821_device &pia1(PIA6821(config, "pia1", XTAL::u(2'000'000))); pia1.writepa_handler().set(FUNC(gimix_state::pia_pa_w)); pia1.writepb_handler().set(FUNC(gimix_state::pia_pb_w)); pia1.readpa_handler().set(FUNC(gimix_state::pia_pa_r)); pia1.readpb_handler().set(FUNC(gimix_state::pia_pb_r)); - PIA6821(config, "pia2", 2'000'000); + PIA6821(config, "pia2", XTAL::u(2'000'000)); /* serial ports */ - ACIA6850(config, m_acia1, 2'000'000); + ACIA6850(config, m_acia1, XTAL::u(2'000'000)); m_acia1->txd_handler().set("serial1", FUNC(rs232_port_device::write_txd)); m_acia1->rts_handler().set("serial1", FUNC(rs232_port_device::write_rts)); m_acia1->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<2>)); - ACIA6850(config, m_acia2, 2'000'000); + ACIA6850(config, m_acia2, XTAL::u(2'000'000)); m_acia2->txd_handler().set("serial2", FUNC(rs232_port_device::write_txd)); m_acia2->rts_handler().set("serial2", FUNC(rs232_port_device::write_rts)); m_acia2->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<3>)); - ACIA6850(config, m_acia3, 2'000'000); + ACIA6850(config, m_acia3, XTAL::u(2'000'000)); m_acia3->txd_handler().set("serial3", FUNC(rs232_port_device::write_txd)); m_acia3->rts_handler().set("serial3", FUNC(rs232_port_device::write_rts)); m_acia3->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<4>)); - ACIA6850(config, m_acia4, 2'000'000); + ACIA6850(config, m_acia4, XTAL::u(2'000'000)); m_acia4->txd_handler().set("serial4", FUNC(rs232_port_device::write_txd)); m_acia4->rts_handler().set("serial4", FUNC(rs232_port_device::write_rts)); m_acia4->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<5>)); @@ -811,7 +811,7 @@ void gimix_state::gimix(machine_config &config) serial4.rxd_handler().set(m_acia4, FUNC(acia6850_device::write_rxd)); serial4.cts_handler().set(m_acia4, FUNC(acia6850_device::write_cts)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 9600 * 16)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(9600 * 16))); acia_clock.signal_handler().set(m_acia1, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia1, FUNC(acia6850_device::write_rxc)); acia_clock.signal_handler().append(m_acia2, FUNC(acia6850_device::write_txc)); diff --git a/src/mame/skeleton/gm1000.cpp b/src/mame/skeleton/gm1000.cpp index 76e2c75b6a0..f8c8b8f8803 100644 --- a/src/mame/skeleton/gm1000.cpp +++ b/src/mame/skeleton/gm1000.cpp @@ -81,7 +81,7 @@ INPUT_PORTS_END void gm1000_state::gm1000(machine_config &config) { - M37702S1(config, m_maincpu, 4'000'000); // unknown clock; type guessed + M37702S1(config, m_maincpu, XTAL::u(4'000'000)); // unknown clock; type guessed m_maincpu->set_addrmap(AS_PROGRAM, &gm1000_state::mem_map); m_maincpu->p4_in_cb().set_ioport("P4"); m_maincpu->p6_in_cb().set_ioport("P6"); @@ -101,7 +101,7 @@ void gm1000_state::gm1000(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(HD44780(config, "lcdc")); lcdc.set_lcd_size(2, 24); lcdc.set_pixel_update_cb(FUNC(gm1000_state::lcd_pixel_update)); lcdc.set_function_set_at_any_time(true); diff --git a/src/mame/skeleton/goupil.cpp b/src/mame/skeleton/goupil.cpp index c2272e3e88b..deb6e91e68a 100644 --- a/src/mame/skeleton/goupil.cpp +++ b/src/mame/skeleton/goupil.cpp @@ -522,7 +522,7 @@ void goupil_base_state::base(machine_config &config) // TODO: sound hardware - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); // TODO: Is this specific to the G1? MOS6522(config, m_via_video, CPU_CLOCK / 4); diff --git a/src/mame/skeleton/grfd2301.cpp b/src/mame/skeleton/grfd2301.cpp index a17b1616455..cd068d1dcbf 100644 --- a/src/mame/skeleton/grfd2301.cpp +++ b/src/mame/skeleton/grfd2301.cpp @@ -118,7 +118,7 @@ uint32_t grfd2301_state::screen_update(screen_device &screen, bitmap_ind16 &bitm void grfd2301_state::grfd2301(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &grfd2301_state::mem_map); m_maincpu->set_addrmap(AS_IO, &grfd2301_state::io_map); diff --git a/src/mame/skeleton/hazeltin.cpp b/src/mame/skeleton/hazeltin.cpp index 89ab346bf79..6e76c684dab 100644 --- a/src/mame/skeleton/hazeltin.cpp +++ b/src/mame/skeleton/hazeltin.cpp @@ -750,12 +750,12 @@ void hazl1500_state::hazl1500(machine_config &config) NETLIST_LOGIC_INPUT(config, NETLIST_TAG ":cpu_db6", "cpu_db6.IN", 0); NETLIST_LOGIC_INPUT(config, NETLIST_TAG ":cpu_db7", "cpu_db7.IN", 0); - NETLIST_ANALOG_OUTPUT(config, NETLIST_TAG ":video_out", 0).set_params("video_out", FUNC(hazl1500_state::video_out_cb)); - NETLIST_ANALOG_OUTPUT(config, NETLIST_TAG ":vblank", 0).set_params("vblank", FUNC(hazl1500_state::vblank_cb)); - NETLIST_ANALOG_OUTPUT(config, NETLIST_TAG ":tvinterq", 0).set_params("tvinterq", FUNC(hazl1500_state::tvinterq_cb)); + NETLIST_ANALOG_OUTPUT(config, NETLIST_TAG ":video_out").set_params("video_out", FUNC(hazl1500_state::video_out_cb)); + NETLIST_ANALOG_OUTPUT(config, NETLIST_TAG ":vblank").set_params("vblank", FUNC(hazl1500_state::vblank_cb)); + NETLIST_ANALOG_OUTPUT(config, NETLIST_TAG ":tvinterq").set_params("tvinterq", FUNC(hazl1500_state::tvinterq_cb)); /* keyboard controller */ - AY3600(config, m_kbdc, 0); + AY3600(config, m_kbdc); m_kbdc->x0().set_ioport("X0"); m_kbdc->x1().set_ioport("X1"); m_kbdc->x2().set_ioport("X2"); diff --git a/src/mame/skeleton/hazl1420.cpp b/src/mame/skeleton/hazl1420.cpp index 85400ec2347..82b57448772 100644 --- a/src/mame/skeleton/hazl1420.cpp +++ b/src/mame/skeleton/hazl1420.cpp @@ -360,7 +360,7 @@ void hazl1420_state::hazl1420(machine_config &config) m_ioexp[1]->p6_in_cb().set_ioport("INP6"); m_ioexp[1]->p7_in_cb().set_ioport("INP7"); - ins8250_device &ace(INS8250(config, "ace", 2'764'800)); + ins8250_device &ace(INS8250(config, "ace", XTAL::u(2'764'800))); ace.out_int_callback().set(m_mainint, FUNC(input_merger_device::in_w<1>)); ace.out_tx_callback().set("eia", FUNC(rs232_port_device::write_txd)); ace.out_rts_callback().set("eia", FUNC(rs232_port_device::write_rts)); @@ -375,7 +375,7 @@ void hazl1420_state::hazl1420(machine_config &config) screen.set_screen_update(FUNC(hazl1420_state::screen_update)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1000).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beeper, XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 1.00); rs232_port_device &eia(RS232_PORT(config, "eia", default_rs232_devices, nullptr)); eia.rxd_handler().set("ace", FUNC(ins8250_device::rx_w)); diff --git a/src/mame/skeleton/hohnadam.cpp b/src/mame/skeleton/hohnadam.cpp index cac17f5af01..8ca1fc7f07b 100644 --- a/src/mame/skeleton/hohnadam.cpp +++ b/src/mame/skeleton/hohnadam.cpp @@ -86,16 +86,16 @@ INPUT_PORTS_END void hohnadam_state::hohnadam(machine_config &config) { - M68000(config, m_maincpu, 12000000); // MC68000FN12, unknown clock + M68000(config, m_maincpu, XTAL::u(12000000)); // MC68000FN12, unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &hohnadam_state::main_map); - I8032(config, m_panelcpu, 12000000); // unknown type and clock + I8032(config, m_panelcpu, XTAL::u(12000000)); // unknown type and clock m_panelcpu->set_addrmap(AS_PROGRAM, &hohnadam_state::panel_map); m_panelcpu->set_addrmap(AS_IO, &hohnadam_state::panel_ext_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // 2x HY62256ALJ-70 + CR2032 battery - //F82C721(config, "io", 24000000); + //F82C721(config, "io", XTAL::u(24000000)); // TODO: LCD, everything else } diff --git a/src/mame/skeleton/hprot1.cpp b/src/mame/skeleton/hprot1.cpp index feaff0856f5..287728c84f5 100644 --- a/src/mame/skeleton/hprot1.cpp +++ b/src/mame/skeleton/hprot1.cpp @@ -267,7 +267,7 @@ void hprot1_state::hprot1(machine_config &config) PALETTE(config, "palette", FUNC(hprot1_state::hprot1_palette), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_hprot1); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 16); m_lcdc->set_pixel_update_cb(FUNC(hprot1_state::hprot1_pixel_update)); diff --git a/src/mame/skeleton/ht68k.cpp b/src/mame/skeleton/ht68k.cpp index c226e223ed2..d11f1b9e72b 100644 --- a/src/mame/skeleton/ht68k.cpp +++ b/src/mame/skeleton/ht68k.cpp @@ -129,7 +129,7 @@ void ht68k_state::ht68k(machine_config &config) /* video hardware */ MC68681(config, m_duart, 8_MHz_XTAL / 2); - m_duart->set_clocks(500000, 500000, 1000000, 1000000); + m_duart->set_clocks(XTAL::u(500000), XTAL::u(500000), XTAL::u(1000000), XTAL::u(1000000)); m_duart->irq_cb().set_inputline(m_maincpu, M68K_IRQ_3); m_duart->a_tx_cb().set("rs232", FUNC(rs232_port_device::write_txd)); m_duart->b_tx_cb().set(FUNC(ht68k_state::duart_txb)); diff --git a/src/mame/skeleton/i7000.cpp b/src/mame/skeleton/i7000.cpp index dbefadee7e9..1d4526cc9c6 100644 --- a/src/mame/skeleton/i7000.cpp +++ b/src/mame/skeleton/i7000.cpp @@ -362,7 +362,7 @@ void i7000_state::i7000(machine_config &config) SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); /* Programmable timer */ - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); + pit8253_device &pit8253(PIT8253(config, "pit8253")); // pit8253.set_clk<0>(XTAL(4'000'000) / 2); /* TODO: verify on PCB */ // pit8253.out_handler<0>().set(FUNC(i7000_state::i7000_pit_out0)); // pit8253.set_clk<1>(XTAL(4'000'000) / 2); /* TODO: verify on PCB */ @@ -371,7 +371,7 @@ void i7000_state::i7000(machine_config &config) pit8253.out_handler<2>().set("speaker", FUNC(speaker_sound_device::level_w)); /* Keyboard interface */ - i8279_device &kbdc(I8279(config, "i8279", 4000000)); /* guessed value. TODO: verify on PCB */ + i8279_device &kbdc(I8279(config, "i8279", XTAL::u(4000000))); /* guessed value. TODO: verify on PCB */ kbdc.out_sl_callback().set(FUNC(i7000_state::scanlines_w)); // scan SL lines kbdc.in_rl_callback().set(FUNC(i7000_state::kbd_r)); // kbd RL lines kbdc.in_shift_callback().set_constant(1); // TODO: Shift key diff --git a/src/mame/skeleton/icatel.cpp b/src/mame/skeleton/icatel.cpp index 151fd97ed80..19e6fe16e22 100644 --- a/src/mame/skeleton/icatel.cpp +++ b/src/mame/skeleton/icatel.cpp @@ -261,7 +261,7 @@ void icatel_state::icatel(machine_config &config) PALETTE(config, "palette", FUNC(icatel_state::icatel_palette), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_icatel); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 16); m_lcdc->set_pixel_update_cb(FUNC(icatel_state::icatel_pixel_update)); } diff --git a/src/mame/skeleton/icebox.cpp b/src/mame/skeleton/icebox.cpp index 27c10c0a0e6..6d25f421b96 100644 --- a/src/mame/skeleton/icebox.cpp +++ b/src/mame/skeleton/icebox.cpp @@ -324,7 +324,7 @@ void icebox_state::icebox(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &icebox_state::mem_map); m_maincpu->set_addrmap(AS_IO, &icebox_state::io_map); - I8251(config, m_uart0, 0); + I8251(config, m_uart0); m_uart0->txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); m_uart0->dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr)); m_uart0->rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -335,7 +335,7 @@ void icebox_state::icebox(machine_config &config) rs232a.cts_handler().set(m_uart0, FUNC(i8251_device::write_cts)); rs232a.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal)); // must be exactly here - I8251(config, m_uart1, 0); + I8251(config, m_uart1); m_uart1->txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); m_uart1->dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr)); m_uart1->rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/skeleton/iez80.cpp b/src/mame/skeleton/iez80.cpp index 091910c4509..cd55eecc3b2 100644 --- a/src/mame/skeleton/iez80.cpp +++ b/src/mame/skeleton/iez80.cpp @@ -177,21 +177,21 @@ static const z80_daisy_config daisy_chain[] = void iez80_state::iez80(machine_config &config) { - Z80(config, m_maincpu, 2'500'000); // unknown clock + Z80(config, m_maincpu, XTAL::u(2'500'000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &iez80_state::mem_map); m_maincpu->set_addrmap(AS_IO, &iez80_state::io_map); m_maincpu->set_daisy_config(daisy_chain); - Z80DMA(config, "dma", 4'000'000); // unknown clock + Z80DMA(config, "dma", XTAL::u(4'000'000)); // unknown clock - z80ctc_device& ctc(Z80CTC(config, "ctc", 4'000'000)); // unknown clock + z80ctc_device& ctc(Z80CTC(config, "ctc", XTAL::u(4'000'000))); // unknown clock ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - Z80PIO(config, "pio", 4'000'000); // unknown clock + Z80PIO(config, "pio", XTAL::u(4'000'000)); // unknown clock - Z80DART(config, "dart1", 4'000'000); // unknown clock (5.0688_MHz_XTAL near) + Z80DART(config, "dart1", XTAL::u(4'000'000)); // unknown clock (5.0688_MHz_XTAL near) - Z80DART(config, "dart2", 4'000'000); // unknown clock (5.0688_MHz_XTAL near) + Z80DART(config, "dart2", XTAL::u(4'000'000)); // unknown clock (5.0688_MHz_XTAL near) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/skeleton/if800.cpp b/src/mame/skeleton/if800.cpp index 64f979fc854..688ac201157 100644 --- a/src/mame/skeleton/if800.cpp +++ b/src/mame/skeleton/if800.cpp @@ -90,12 +90,12 @@ void if800_state::upd7220_map(address_map &map) void if800_state::if800(machine_config &config) { /* basic machine hardware */ - I8086(config, m_maincpu, 8000000); + I8086(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &if800_state::if800_map); m_maincpu->set_addrmap(AS_IO, &if800_state::if800_io); -// PIC8259(config, "pic8259", 0); +// PIC8259(config, "pic8259"); UPD7220(config, m_hgdc, 8000000/4); m_hgdc->set_addrmap(0, &if800_state::upd7220_map); m_hgdc->set_display_pixels(FUNC(if800_state::hgdc_display_pixels)); diff --git a/src/mame/skeleton/imsai.cpp b/src/mame/skeleton/imsai.cpp index c1674aa4c3e..09ff887fb6b 100644 --- a/src/mame/skeleton/imsai.cpp +++ b/src/mame/skeleton/imsai.cpp @@ -143,13 +143,13 @@ void imsai_state::imsai(machine_config &config) m_maincpu->set_addrmap(AS_IO, &imsai_state::io_map); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(imsai_state::kbd_put)); /* Devices */ - I8251(config, "uart", 0); + I8251(config, "uart"); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(6_MHz_XTAL / 3); // Timer 0: baud rate gen for 8251 m_pit->out_handler<0>().set("uart", FUNC(i8251_device::write_txc)); m_pit->out_handler<0>().append("uart", FUNC(i8251_device::write_rxc)); diff --git a/src/mame/skeleton/indiana.cpp b/src/mame/skeleton/indiana.cpp index 733f58f8635..fae940f7279 100644 --- a/src/mame/skeleton/indiana.cpp +++ b/src/mame/skeleton/indiana.cpp @@ -111,10 +111,10 @@ void indiana_state::indiana(machine_config &config) isa.irq14_callback().set("mfp", FUNC(mc68901_device::i3_w)); isa.irq15_callback().set("mfp", FUNC(mc68901_device::i2_w)); - ISA16_SLOT(config, "isa1", 0, ISABUS_TAG, indiana_isa_cards, "vga", false); - ISA16_SLOT(config, "isa2", 0, ISABUS_TAG, indiana_isa_cards, "fdc_at", false); - ISA16_SLOT(config, "isa3", 0, ISABUS_TAG, indiana_isa_cards, "comat", false); - ISA16_SLOT(config, "isa4", 0, ISABUS_TAG, indiana_isa_cards, "ide", false); + ISA16_SLOT(config, "isa1", ISABUS_TAG, indiana_isa_cards, "vga", false); + ISA16_SLOT(config, "isa2", ISABUS_TAG, indiana_isa_cards, "fdc_at", false); + ISA16_SLOT(config, "isa3", ISABUS_TAG, indiana_isa_cards, "comat", false); + ISA16_SLOT(config, "isa4", ISABUS_TAG, indiana_isa_cards, "ide", false); pc_kbdc_device &kbd(PC_KBDC(config, "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_84)); kbd.out_data_cb().set("mfp", FUNC(mc68901_device::i0_w)); diff --git a/src/mame/skeleton/itt1700_kbd.cpp b/src/mame/skeleton/itt1700_kbd.cpp index e24cb0c2a64..4673b6cc9e9 100644 --- a/src/mame/skeleton/itt1700_kbd.cpp +++ b/src/mame/skeleton/itt1700_kbd.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(ITT1700_KEYBOARD, itt1700_keyboard_device, "itt1700_kbd", "IT // itt1700_keyboard_device - constructor //------------------------------------------------- -itt1700_keyboard_device::itt1700_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +itt1700_keyboard_device::itt1700_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ITT1700_KEYBOARD, tag, owner, clock) , m_clock_state(true) , m_line1_state(true) diff --git a/src/mame/skeleton/itt1700_kbd.h b/src/mame/skeleton/itt1700_kbd.h index b8ee3cfd3ee..914d6ffb5f4 100644 --- a/src/mame/skeleton/itt1700_kbd.h +++ b/src/mame/skeleton/itt1700_kbd.h @@ -17,7 +17,7 @@ class itt1700_keyboard_device : public device_t { public: // device constructor - itt1700_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + itt1700_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // host interface DECLARE_WRITE_LINE_MEMBER(line1_w); diff --git a/src/mame/skeleton/itt3030.cpp b/src/mame/skeleton/itt3030.cpp index d0d53336263..243d8174301 100644 --- a/src/mame/skeleton/itt3030.cpp +++ b/src/mame/skeleton/itt3030.cpp @@ -753,7 +753,7 @@ void itt3030_state::itt3030(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 1.00); SOFTWARE_LIST(config, "flop_list").set_original("itt3030"); } diff --git a/src/mame/skeleton/itt9216.cpp b/src/mame/skeleton/itt9216.cpp index 6f31da10327..e9c18d4c79f 100644 --- a/src/mame/skeleton/itt9216.cpp +++ b/src/mame/skeleton/itt9216.cpp @@ -82,10 +82,10 @@ INPUT_PORTS_END void itt9216_state::itt9216(machine_config &config) { - M68008(config, m_maincpu, 8000000); // clock unknown + M68008(config, m_maincpu, XTAL::u(8000000)); // clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &itt9216_state::mem_map); - I8741A(config, "upi", 6000000).set_disable(); // clock unknown + I8741A(config, "upi", XTAL::u(6000000)).set_disable(); // clock unknown } // XTALs: 38.080 MHz (U7), 11.250(?) MHz (U1) diff --git a/src/mame/skeleton/jonos.cpp b/src/mame/skeleton/jonos.cpp index 1381fbe909a..5344fc4b405 100644 --- a/src/mame/skeleton/jonos.cpp +++ b/src/mame/skeleton/jonos.cpp @@ -207,7 +207,7 @@ void jonos_state::jonos(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_jonos); PALETTE(config, "palette", palette_device::MONOCHROME); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(jonos_state::kbd_put)); } diff --git a/src/mame/skeleton/juku.cpp b/src/mame/skeleton/juku.cpp index 7dcdc95a153..0fd67782031 100644 --- a/src/mame/skeleton/juku.cpp +++ b/src/mame/skeleton/juku.cpp @@ -458,7 +458,7 @@ void juku_state::machine_reset() void juku_state::juku(machine_config &config) { // КР580ВМ80A @ 2 MHz - I8080A(config, m_maincpu, 2000000); + I8080A(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &juku_state::mem_map); m_maincpu->set_addrmap(AS_IO, &juku_state::io_map); m_maincpu->in_inta_func().set("pic", FUNC(pic8259_device::acknowledge)); @@ -470,11 +470,11 @@ void juku_state::juku(machine_config &config) m_bank->set_stride(0x10000); // КР580ВН59 - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); // КР580ВИ53 - PIT8253(config, m_pit[0], 0); + PIT8253(config, m_pit[0]); m_pit[0]->set_clk<0>(16_MHz_XTAL/16); m_pit[0]->out_handler<0>().set(m_pit[1], FUNC(pit8253_device::write_clk0)); m_pit[0]->out_handler<0>().append(m_pit[0], FUNC(pit8253_device::write_gate1)); @@ -485,13 +485,13 @@ void juku_state::juku(machine_config &config) m_pit[0]->out_handler<2>().append(m_pit[1], FUNC(pit8253_device::write_clk2)); // КР580ВИ53 - PIT8253(config, m_pit[1], 0); + PIT8253(config, m_pit[1]); m_pit[1]->out_handler<0>().set(m_pit[1], FUNC(pit8253_device::write_gate1)); m_pit[1]->out_handler<0>().append(m_pit[1], FUNC(pit8253_device::write_gate2)); m_pit[1]->out_handler<1>().set(m_pic, FUNC(pic8259_device::ir5_w)); // КР580ВИ53 - PIT8253(config, m_pit[2], 0); + PIT8253(config, m_pit[2]); // КР580ВВ55A I8255A(config, m_pio[0]); @@ -503,12 +503,12 @@ void juku_state::juku(machine_config &config) I8255A(config, m_pio[1]); // КР580ВВ51A - I8251(config, m_sio[0], 0); + I8251(config, m_sio[0]); m_sio[0]->rxrdy_handler().set("pic", FUNC(pic8259_device::ir2_w)); m_sio[0]->txrdy_handler().set("pic", FUNC(pic8259_device::ir3_w)); // КР580ВВ51A (instead of FDC?) - I8251(config, m_sio[1], 0); + I8251(config, m_sio[1]); m_sio[1]->rxrdy_handler().set("pic", FUNC(pic8259_device::ir0_w)); m_sio[1]->txrdy_handler().set("pic", FUNC(pic8259_device::ir1_w)); @@ -519,9 +519,9 @@ void juku_state::juku(machine_config &config) screen.set_visarea(0, 319, 0, 239); screen.set_screen_update(FUNC(juku_state::screen_update)); - TTL74148(config, m_key_encoder, 0); + TTL74148(config, m_key_encoder); - KR1818VG93(config, m_fdc, 1000000); + KR1818VG93(config, m_fdc, XTAL::u(1000000)); // m_fdc->intrq_wr_callback().set(FUNC(juku_state::fdc_intrq_w)); m_fdc->drq_wr_callback().set(FUNC(juku_state::fdc_drq_w)); FLOPPY_CONNECTOR(config, "fdc:0", juku_floppies, "525qd", juku_state::floppy_formats); diff --git a/src/mame/skeleton/junior80.cpp b/src/mame/skeleton/junior80.cpp index 913e7b1633c..100842180d5 100644 --- a/src/mame/skeleton/junior80.cpp +++ b/src/mame/skeleton/junior80.cpp @@ -260,7 +260,7 @@ static void junior80_floppies(device_slot_interface &device) void junior80_state::junior80(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2'500'000); // 2.5 or 4MHz selectable by jumpers + Z80(config, m_maincpu, XTAL::u(2'500'000)); // 2.5 or 4MHz selectable by jumpers m_maincpu->set_addrmap(AS_PROGRAM, &junior80_state::mem_map); m_maincpu->set_addrmap(AS_IO, &junior80_state::io_map); @@ -269,13 +269,13 @@ void junior80_state::junior80(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:0", junior80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", junior80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - Z80PIO(config, m_pio, 0); - Z80SIO(config, m_uart, 0); - Z80CTC(config, m_ctc, 0); - PIT8253(config, m_pit, 0); - I8255(config, m_ppi, 0); + Z80PIO(config, m_pio); + Z80SIO(config, m_uart); + Z80CTC(config, m_ctc); + PIT8253(config, m_pit); + I8255(config, m_ppi); - I8257(config, m_dma, 0); + I8257(config, m_dma); //m_dma->out_hrq_cb().set(FUNC(junior80_state::hrq_w)); //m_dma->in_memr_cb().set(FUNC(junior80_state::memory_r)); //m_dma->out_memw_cb().set(FUNC(junior80_state::memory_w)); diff --git a/src/mame/skeleton/lee1214.cpp b/src/mame/skeleton/lee1214.cpp index d8e7be6ab04..5d39a4dde12 100644 --- a/src/mame/skeleton/lee1214.cpp +++ b/src/mame/skeleton/lee1214.cpp @@ -69,7 +69,7 @@ void lee1214_state::lee1214(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &lee1214_state::mem_map); m_maincpu->set_addrmap(AS_IO, &lee1214_state::io_map); - i8274_device &mpsc(I8274(config, "mpsc", 4'000'000)); + i8274_device &mpsc(I8274(config, "mpsc", XTAL::u(4'000'000))); mpsc.out_int_callback().set("maincpu", FUNC(i80188_cpu_device::int0_w)); EEPROM_2816(config, "eeprom"); diff --git a/src/mame/skeleton/lee1220.cpp b/src/mame/skeleton/lee1220.cpp index ed82b0ce522..242b2d7c318 100644 --- a/src/mame/skeleton/lee1220.cpp +++ b/src/mame/skeleton/lee1220.cpp @@ -103,17 +103,17 @@ INPUT_PORTS_END void lee1220_state::lee1220(machine_config &config) { - I8085A(config, m_maincpu, 10'000'000); // Intel P8085AH-2 + I8085A(config, m_maincpu, XTAL::u(10'000'000)); // Intel P8085AH-2 m_maincpu->set_addrmap(AS_PROGRAM, &lee1220_state::mem_map); m_maincpu->set_addrmap(AS_IO, &lee1220_state::io_map); - AM9517A(config, "dmac", 5'000'000); // Intel P8237A-5 + AM9517A(config, "dmac", XTAL::u(5'000'000)); // Intel P8237A-5 I8748(config, "kbdmcu", 5.9904_MHz_XTAL); //WD1933(config, m_sdlc); // WDC WD1933PL-11 - i8251_device &usart(I8251(config, "usart", 0)); // NEC D8251AC + i8251_device &usart(I8251(config, "usart")); // NEC D8251AC usart.rxrdy_handler().set_inputline(m_maincpu, I8085_RST55_LINE); PIT8253(config, "pit"); // Intel D8253-5 @@ -123,7 +123,7 @@ void lee1220_state::lee1220(machine_config &config) screen.set_raw(28'944'000, 1152, 0, 960, 420, 0, 400); screen.set_screen_update(m_crtc, FUNC(hd6845s_device::screen_update)); - HD6845S(config, m_crtc, 2'412'000); // Hitachi HD46505SP/HD6845SP + HD6845S(config, m_crtc, XTAL::u(2'412'000)); // Hitachi HD46505SP/HD6845SP m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(12); diff --git a/src/mame/skeleton/lms46.cpp b/src/mame/skeleton/lms46.cpp index 718f5d2e28d..a1ae5f17042 100644 --- a/src/mame/skeleton/lms46.cpp +++ b/src/mame/skeleton/lms46.cpp @@ -92,11 +92,11 @@ INPUT_PORTS_END void lms46_state::lms46(machine_config &config) { - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &lms46_state::mem_map); m_maincpu->set_addrmap(AS_IO, &lms46_state::io_map); - MSM5832(config, m_rtc, 32768); + MSM5832(config, m_rtc, XTAL::u(32768)); } diff --git a/src/mame/skeleton/mccpm.cpp b/src/mame/skeleton/mccpm.cpp index 6e498d34398..97cff3f940b 100644 --- a/src/mame/skeleton/mccpm.cpp +++ b/src/mame/skeleton/mccpm.cpp @@ -204,7 +204,7 @@ void mccpm_state::mccpm(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mccpm_state::mem_map); m_maincpu->set_addrmap(AS_IO, &mccpm_state::io_map); - ADDRESS_MAP_BANK(config, m_bank, 0); + ADDRESS_MAP_BANK(config, m_bank); m_bank->set_addrmap(0, &mccpm_state::bankdev_map); m_bank->set_data_width(8); m_bank->set_addr_width(16); diff --git a/src/mame/skeleton/mes.cpp b/src/mame/skeleton/mes.cpp index 631c99e22a4..0367af71991 100644 --- a/src/mame/skeleton/mes.cpp +++ b/src/mame/skeleton/mes.cpp @@ -161,11 +161,11 @@ void mes_state::mes(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - Z80CTC(config, "ctc", 0); - Z80PIO(config, "pio", 0); - Z80SIO(config, "sio", 0); + Z80CTC(config, "ctc"); + Z80PIO(config, "pio"); + Z80SIO(config, "sio"); - generic_keyboard_device &keybd(GENERIC_KEYBOARD(config, "keybd", 0)); + generic_keyboard_device &keybd(GENERIC_KEYBOARD(config, "keybd")); keybd.set_keyboard_callback(FUNC(mes_state::kbd_put)); } diff --git a/src/mame/skeleton/mfabfz.cpp b/src/mame/skeleton/mfabfz.cpp index 8089f4fac77..7d86b5141dd 100644 --- a/src/mame/skeleton/mfabfz.cpp +++ b/src/mame/skeleton/mfabfz.cpp @@ -213,7 +213,7 @@ void mfabfz_state::mfabfz(machine_config &config) uart1_clock.signal_handler().set("uart1", FUNC(i8251_device::write_txc)); uart1_clock.signal_handler().append("uart1", FUNC(i8251_device::write_rxc)); - i8251_device &uart1(I8251(config, "uart1", 0)); + i8251_device &uart1(I8251(config, "uart1")); uart1.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart1.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart1.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/skeleton/mice.cpp b/src/mame/skeleton/mice.cpp index e6de8d4ec76..0f9144a380c 100644 --- a/src/mame/skeleton/mice.cpp +++ b/src/mame/skeleton/mice.cpp @@ -199,7 +199,7 @@ void mice_state::mice2(machine_config &config) I8255(config, "rttppi3"); I8255(config, "rttppi4"); I8255(config, "rttppi5"); - I8155(config, "rtt8155", 0); + I8155(config, "rtt8155"); } /* ROM definitions */ diff --git a/src/mame/skeleton/micral.cpp b/src/mame/skeleton/micral.cpp index 915ab57fb98..301e1f28eb9 100644 --- a/src/mame/skeleton/micral.cpp +++ b/src/mame/skeleton/micral.cpp @@ -432,13 +432,13 @@ void micral_state::micral(machine_config &config) /* sound hardware */ //SPEAKER(config, "mono").front_center(); - //BEEP(config, m_beep, 2000).add_route(ALL_OUTPUTS, "mono", 0.50); + //BEEP(config, m_beep, XTAL::u(2000)).add_route(ALL_OUTPUTS, "mono", 0.50); AY31015(config, m_uart); // CDP6402 m_uart->read_si_callback().set("rs232", FUNC(rs232_port_device::rxd_r)); m_uart->write_so_callback().set("rs232", FUNC(rs232_port_device::write_txd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set(m_uart, FUNC(ay31015_device::write_tcp)); uart_clock.signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp)); diff --git a/src/mame/skeleton/micromon.cpp b/src/mame/skeleton/micromon.cpp index 7c8e3c497f2..b47c56dcb7e 100644 --- a/src/mame/skeleton/micromon.cpp +++ b/src/mame/skeleton/micromon.cpp @@ -76,7 +76,7 @@ void micromon_state::machine_reset() void micromon_state::micromon(machine_config &config) { // basic machine hardware - CDP1802(config, m_maincpu, 2457600); + CDP1802(config, m_maincpu, XTAL::u(2457600)); m_maincpu->set_addrmap(AS_PROGRAM, µmon_state::mem_map); m_maincpu->set_addrmap(AS_IO, µmon_state::io_map); m_maincpu->wait_cb().set_constant(1); diff --git a/src/mame/skeleton/micronic.cpp b/src/mame/skeleton/micronic.cpp index ee630def976..f03f1020ab6 100644 --- a/src/mame/skeleton/micronic.cpp +++ b/src/mame/skeleton/micronic.cpp @@ -375,7 +375,7 @@ void micronic_state::micronic(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 0).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep).add_route(ALL_OUTPUTS, "mono", 1.00); /* ram banks */ RAM(config, RAM_TAG).set_default_size("224K"); diff --git a/src/mame/skeleton/milwaukee.cpp b/src/mame/skeleton/milwaukee.cpp index 44e6c587ace..485c9e4202a 100644 --- a/src/mame/skeleton/milwaukee.cpp +++ b/src/mame/skeleton/milwaukee.cpp @@ -62,22 +62,22 @@ void milwaukee_state::milwaukee(machine_config &config) M6502(config, m_maincpu, 16_MHz_XTAL / 16); m_maincpu->set_addrmap(AS_PROGRAM, &milwaukee_state::mem_map); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(16_MHz_XTAL / 16 / 4); // 250 kHz pit.out_handler<0>().set("pit", FUNC(pit8253_device::write_gate0)).invert(); pit.set_clk<1>(16_MHz_XTAL / 2 / 13 / 2048 / 5); // 60.09 Hz? pit.out_handler<1>().set("pit", FUNC(pit8253_device::write_clk2)).invert(); - PIA6821(config, "pia1", 0); - PIA6821(config, "pia2", 0); - ACIA6850(config, "acia2", 0); - MC6852(config, "ssda", 0); + PIA6821(config, "pia1"); + PIA6821(config, "pia2"); + ACIA6850(config, "acia2"); + MC6852(config, "ssda"); clock_device &acia_clock(CLOCK(config, "acia_clock", 16_MHz_XTAL / 2 / 13 / 4)); acia_clock.signal_handler().set("acia1", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia1", FUNC(acia6850_device::write_rxc)); - acia6850_device &acia1(ACIA6850(config, "acia1", 0)); + acia6850_device &acia1(ACIA6850(config, "acia1")); acia1.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); acia1.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/skeleton/mindset.cpp b/src/mame/skeleton/mindset.cpp index b0c2d8e2c9a..69013e710f8 100644 --- a/src/mame/skeleton/mindset.cpp +++ b/src/mame/skeleton/mindset.cpp @@ -73,7 +73,7 @@ protected: void irq_w(int state); - mindset_module_interface(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mindset_module_interface(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; @@ -93,7 +93,7 @@ void mindset_module_interface::device_reset() m_irq_cb(m_irq_state); } -mindset_module_interface::mindset_module_interface(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mindset_module_interface::mindset_module_interface(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_irq_cb(*this) { @@ -111,14 +111,14 @@ class mindset_module: public device_t, public: template mindset_module(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false) - : mindset_module(mconfig, tag, owner, 0) + : mindset_module(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(fixed); } - mindset_module(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mindset_module(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~mindset_module() = default; void map(address_space &space, offs_t base, bool id); @@ -130,7 +130,7 @@ protected: DEFINE_DEVICE_TYPE(MINDSET_MODULE, mindset_module, "mindset_module", "MINDSET module") -mindset_module::mindset_module(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mindset_module::mindset_module(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MINDSET_MODULE, tag, owner, clock), device_slot_interface(mconfig, *this) { @@ -157,7 +157,7 @@ void mindset_module::map(address_space &space, offs_t base, bool id) class mindset_sound_module: public mindset_module_interface { public: - mindset_sound_module(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mindset_sound_module(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~mindset_sound_module() = default; virtual void map(address_map &map) override; @@ -182,7 +182,7 @@ private: DEFINE_DEVICE_TYPE(MINDSET_SOUND_MODULE, mindset_sound_module, "mindset_sound_module", "MINDSET stereo sound module") -mindset_sound_module::mindset_sound_module(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mindset_sound_module::mindset_sound_module(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mindset_module_interface(mconfig, MINDSET_SOUND_MODULE, tag, owner, clock), m_soundcpu(*this, "soundcpu"), m_dac(*this, "dac") @@ -249,13 +249,13 @@ void mindset_sound_module::device_add_mconfig(machine_config &config) m_soundcpu->p2_out_cb().set(FUNC(mindset_sound_module::p2_w)); SPEAKER(config, "rspeaker").front_right(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); } class mindset_rs232_module: public mindset_module_interface { public: - mindset_rs232_module(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mindset_rs232_module(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~mindset_rs232_module() = default; virtual void map(address_map &map) override; @@ -271,7 +271,7 @@ private: DEFINE_DEVICE_TYPE(MINDSET_RS232_MODULE, mindset_rs232_module, "mindset_rs232_module", "MINDSET RS232 module") -mindset_rs232_module::mindset_rs232_module(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mindset_rs232_module::mindset_rs232_module(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mindset_module_interface(mconfig, MINDSET_RS232_MODULE, tag, owner, clock), m_ins8250(*this, "ins8250"), m_rs232(*this, "rs232") @@ -1349,7 +1349,7 @@ void mindset_state::mindset(machine_config &config) FLOPPY_CONNECTOR(config, m_fdco[1], pc_dd_floppies, "525dd", floppy_image_device::default_pc_floppy_formats); SPEAKER(config, "lspeaker").front_left(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); MINDSET_MODULE(config, "m0", mindset_modules, "stereo", false); MINDSET_MODULE(config, "m1", mindset_modules, "rs232", false); diff --git a/src/mame/skeleton/mini2440.cpp b/src/mame/skeleton/mini2440.cpp index b25a80dc2bd..8ade7a8b77b 100644 --- a/src/mame/skeleton/mini2440.cpp +++ b/src/mame/skeleton/mini2440.cpp @@ -228,7 +228,7 @@ void mini2440_state::init_mini2440() void mini2440_state::mini2440(machine_config &config) { - ARM920T(config, m_maincpu, 400000000); + ARM920T(config, m_maincpu, XTAL::u(400000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mini2440_state::mini2440_map); PALETTE(config, "palette").set_entries(32768); @@ -242,10 +242,10 @@ void mini2440_state::mini2440(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - UDA1341TS(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // uda1341ts.u12 - UDA1341TS(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // uda1341ts.u12 + UDA1341TS(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // uda1341ts.u12 + UDA1341TS(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // uda1341ts.u12 - S3C2440(config, m_s3c2440, 12000000); + S3C2440(config, m_s3c2440, XTAL::u(12000000)); m_s3c2440->set_palette_tag("palette"); m_s3c2440->set_screen_tag("screen"); m_s3c2440->core_pin_r_callback().set(FUNC(mini2440_state::s3c2440_core_pin_r)); @@ -258,7 +258,7 @@ void mini2440_state::mini2440(machine_config &config) m_s3c2440->nand_data_r_callback().set(FUNC(mini2440_state::s3c2440_nand_data_r)); m_s3c2440->nand_data_w_callback().set(FUNC(mini2440_state::s3c2440_nand_data_w)); - NAND(config, m_nand, 0); + NAND(config, m_nand); m_nand->set_nand_type(nand_device::chip::K9F1G08U0B); m_nand->rnb_wr_callback().set(m_s3c2440, FUNC(s3c2440_device::frnb_w)); } diff --git a/src/mame/skeleton/miniframe.cpp b/src/mame/skeleton/miniframe.cpp index 57c2ec7f907..101ec3e0461 100644 --- a/src/mame/skeleton/miniframe.cpp +++ b/src/mame/skeleton/miniframe.cpp @@ -235,13 +235,13 @@ void miniframe_state::miniframe(machine_config &config) ADDRESS_MAP_BANK(config, "ramrombank").set_map(&miniframe_state::ramrombank_map).set_options(ENDIANNESS_BIG, 16, 32, 0x400000); // floppy - WD2797(config, m_wd2797, 1000000); + WD2797(config, m_wd2797, XTAL::u(1000000)); // m_wd2797->intrq_wr_callback().set(FUNC(miniframe_state::wd2797_intrq_w)); // m_wd2797->drq_wr_callback().set(FUNC(miniframe_state::wd2797_drq_w)); FLOPPY_CONNECTOR(config, "wd2797:0", miniframe_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats); // 8263s - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); + pit8253_device &pit8253(PIT8253(config, "pit8253")); pit8253.set_clk<0>(76800); pit8253.set_clk<1>(76800); pit8253.out_handler<0>().set("pic8259", FUNC(pic8259_device::ir4_w)); // FIXME: fighting for IR4 - error, or needs input merger? @@ -250,13 +250,13 @@ void miniframe_state::miniframe(machine_config &config) // and ir4 on the PIC pit8253.out_handler<1>().append("pic8259", FUNC(pic8259_device::ir4_w)); - pit8253_device &baudgen(PIT8253(config, "baudgen", 0)); + pit8253_device &baudgen(PIT8253(config, "baudgen")); baudgen.set_clk<0>(1228800); baudgen.set_clk<1>(1228800); baudgen.set_clk<2>(1228800); // PIC8259s - pic8259_device &pic8259(PIC8259(config, "pic8259", 0)); + pic8259_device &pic8259(PIC8259(config, "pic8259")); pic8259.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_4); pic8259.in_sp_callback().set_constant(1); } diff --git a/src/mame/skeleton/ml20.cpp b/src/mame/skeleton/ml20.cpp index d31a697b5a0..3f1618b9d09 100644 --- a/src/mame/skeleton/ml20.cpp +++ b/src/mame/skeleton/ml20.cpp @@ -271,7 +271,7 @@ void ml20_state::ml20(machine_config &config) PALETTE(config, "palette", FUNC(ml20_state::lcd_palette), 3); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 16); m_lcdc->set_pixel_update_cb(FUNC(ml20_state::lcd_pixel_update)); diff --git a/src/mame/skeleton/mmd1.cpp b/src/mame/skeleton/mmd1.cpp index c0d76f13271..3192d06fc58 100644 --- a/src/mame/skeleton/mmd1.cpp +++ b/src/mame/skeleton/mmd1.cpp @@ -326,7 +326,7 @@ void mmd1_state::mmd1(machine_config &config) m_uart->write_so_callback().set(FUNC(mmd1_state::so)); m_uart->set_auto_rdav(true); - clock_device &uart_clock(CLOCK(config, "uart_clock", 4800)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(4800))); uart_clock.signal_handler().set(FUNC(mmd1_state::kansas_w)); TIMER(config, "kansas_r").configure_periodic(FUNC(mmd1_state::kansas_r), attotime::from_hz(40000)); diff --git a/src/mame/skeleton/mmd2.cpp b/src/mame/skeleton/mmd2.cpp index f8f0d65eea8..d05e106f464 100644 --- a/src/mame/skeleton/mmd2.cpp +++ b/src/mame/skeleton/mmd2.cpp @@ -373,7 +373,7 @@ void mmd2_state::mmd2(machine_config &config) config.set_default_layout(layout_mmd2); /* Devices */ - i8279_device &kbdc(I8279(config, "i8279", 400000)); // based on divider + i8279_device &kbdc(I8279(config, "i8279", XTAL::u(400000))); // based on divider kbdc.out_sl_callback().set(FUNC(mmd2_state::scanlines_w)); // scan SL lines kbdc.out_disp_callback().set(FUNC(mmd2_state::digit_w)); // display A&B kbdc.in_rl_callback().set(FUNC(mmd2_state::keyboard_r)); // kbd RL lines diff --git a/src/mame/skeleton/mod8.cpp b/src/mame/skeleton/mod8.cpp index 004033feb57..348abd9b346 100644 --- a/src/mame/skeleton/mod8.cpp +++ b/src/mame/skeleton/mod8.cpp @@ -157,13 +157,13 @@ void mod8_state::kbd_put(u8 data) void mod8_state::mod8(machine_config &config) { /* basic machine hardware */ - I8008(config, m_maincpu, 800000); + I8008(config, m_maincpu, XTAL::u(800000)); m_maincpu->set_addrmap(AS_PROGRAM, &mod8_state::mem_map); m_maincpu->set_addrmap(AS_IO, &mod8_state::io_map); m_maincpu->set_irq_acknowledge_callback(FUNC(mod8_state::mod8_irq_callback)); /* video hardware */ - TELEPRINTER(config, m_teleprinter, 0); + TELEPRINTER(config, m_teleprinter); m_teleprinter->set_keyboard_callback(FUNC(mod8_state::kbd_put)); } diff --git a/src/mame/skeleton/modellot.cpp b/src/mame/skeleton/modellot.cpp index 6f6c84b871f..7112a63ba62 100644 --- a/src/mame/skeleton/modellot.cpp +++ b/src/mame/skeleton/modellot.cpp @@ -234,7 +234,7 @@ void modellot_state::modellot(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); /* Devices */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(modellot_state::kbd_put)); } diff --git a/src/mame/skeleton/ms9540.cpp b/src/mame/skeleton/ms9540.cpp index 5bc9c1bdfaa..4bd9fc4c44e 100644 --- a/src/mame/skeleton/ms9540.cpp +++ b/src/mame/skeleton/ms9540.cpp @@ -117,11 +117,11 @@ void ms9540_state::kbd_put(u8 data) void ms9540_state::ms9540(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); // unknown clock + M68000(config, m_maincpu, XTAL::u(8000000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &ms9540_state::mem_map); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(ms9540_state::kbd_put)); } diff --git a/src/mame/skeleton/mtd1256.cpp b/src/mame/skeleton/mtd1256.cpp index 0c05033a071..d2c8c9baa8f 100644 --- a/src/mame/skeleton/mtd1256.cpp +++ b/src/mame/skeleton/mtd1256.cpp @@ -126,7 +126,7 @@ void mtd1256_state::mtd1256(machine_config &config) MM58274C(config, "rtc", 32.768_kHz_XTAL); // TODO: 1 second interrupt output configured - MM74C923(config, m_encoder, 0); // timing parameters unknown + MM74C923(config, m_encoder); // timing parameters unknown screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(50); diff --git a/src/mame/skeleton/mx2178.cpp b/src/mame/skeleton/mx2178.cpp index 59963598088..71a4cb25d5e 100644 --- a/src/mame/skeleton/mx2178.cpp +++ b/src/mame/skeleton/mx2178.cpp @@ -161,7 +161,7 @@ void mx2178_state::mx2178(machine_config &config) acia_clock.signal_handler().append("acia2", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia2", FUNC(acia6850_device::write_rxc)); - acia6850_device &acia1(ACIA6850(config, "acia1", 0)); + acia6850_device &acia1(ACIA6850(config, "acia1")); acia1.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); acia1.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); acia1.irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); @@ -170,7 +170,7 @@ void mx2178_state::mx2178(machine_config &config) rs232a.rxd_handler().set("acia1", FUNC(acia6850_device::write_rxd)); rs232a.cts_handler().set("acia1", FUNC(acia6850_device::write_cts)); - acia6850_device &acia2(ACIA6850(config, "acia2", 0)); + acia6850_device &acia2(ACIA6850(config, "acia2")); acia2.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); acia2.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts)); acia2.irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); diff --git a/src/mame/skeleton/mycom.cpp b/src/mame/skeleton/mycom.cpp index a5876aa64fd..1705951d88b 100644 --- a/src/mame/skeleton/mycom.cpp +++ b/src/mame/skeleton/mycom.cpp @@ -544,7 +544,7 @@ void mycom_state::mycom(machine_config &config) /* Manual states clock is 1.008mhz for 40 cols, and 2.016 mhz for 80 cols. The manual states the CRTC is a HD46505S (apparently same as HD6845S). The start registers need to be readable. */ - HD6845S(config, m_crtc, 1008000); + HD6845S(config, m_crtc, XTAL::u(1008000)); m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); diff --git a/src/mame/skeleton/ngen.cpp b/src/mame/skeleton/ngen.cpp index 81af26b9a6f..4e8d0d675c1 100644 --- a/src/mame/skeleton/ngen.cpp +++ b/src/mame/skeleton/ngen.cpp @@ -936,10 +936,10 @@ void ngen_state::ngen(machine_config &config) m_maincpu->tmrout0_handler().set(FUNC(ngen_state::cpu_timer_w)); m_maincpu->read_slave_ack_callback().set(FUNC(ngen_state::irq_cb)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int0_w)); - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); m_pit->set_clk<0>(78120/4); // 19.53kHz, /4 of the CPU timer output? m_pit->out_handler<0>().set(FUNC(ngen_state::pit_out0_w)); // RS232 channel B baud rate m_pit->set_clk<1>(14.7456_MHz_XTAL / 12); // correct? - based on patent @@ -966,7 +966,7 @@ void ngen_state::ngen(machine_config &config) m_dmac->out_iow_callback<3>().set(FUNC(ngen_state::dma_3_dack_w)); // I/O board - UPD7201(config, m_iouart, 0); // clocked by PIT channel 2? + UPD7201(config, m_iouart); // clocked by PIT channel 2? m_iouart->out_txda_callback().set("rs232_a", FUNC(rs232_port_device::write_txd)); m_iouart->out_txdb_callback().set("rs232_b", FUNC(rs232_port_device::write_txd)); m_iouart->out_dtra_callback().set("rs232_a", FUNC(rs232_port_device::write_dtr)); @@ -1002,13 +1002,13 @@ void ngen_state::ngen(machine_config &config) m_crtc->set_update_row_callback(FUNC(ngen_state::crtc_update_row)); // keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board) - I8251(config, m_viduart, 0); // main clock unknown, Rx/Tx clocks are 19.53kHz + I8251(config, m_viduart); // main clock unknown, Rx/Tx clocks are 19.53kHz // m_viduart->txempty_handler().set(m_pic, FUNC(pic8259_device::ir4_w)); m_viduart->txd_handler().set("keyboard", FUNC(rs232_port_device::write_txd)); rs232_port_device &kbd(RS232_PORT(config, "keyboard", keyboard, "ngen")); kbd.rxd_handler().set(m_viduart, FUNC(i8251_device::write_rxd)); - CLOCK(config, "refresh_clock", 19200*16).signal_handler().set(FUNC(ngen_state::timer_clk_out)); // should be 19530Hz + CLOCK(config, "refresh_clock", XTAL::u(19200*16)).signal_handler().set(FUNC(ngen_state::timer_clk_out)); // should be 19530Hz // floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each) WD2797(config, m_fdc, 20_MHz_XTAL / 20); @@ -1016,7 +1016,7 @@ void ngen_state::ngen(machine_config &config) m_fdc->drq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::drq1_w)); m_fdc->set_force_ready(true); - PIT8253(config, m_fdc_timer, 0); + PIT8253(config, m_fdc_timer); m_fdc_timer->set_clk<0>(0); m_fdc_timer->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir5_w)); // clocked on FDC data register access m_fdc_timer->set_clk<1>(20_MHz_XTAL / 20); @@ -1035,11 +1035,11 @@ void ngen_state::ngen(machine_config &config) m_hdc->in_tk000_callback().set_constant(1); m_hdc->in_sc_callback().set_constant(1); - PIT8253(config, m_hdc_timer, 0); + PIT8253(config, m_hdc_timer); m_hdc_timer->set_clk<2>(20_MHz_XTAL / 10); // 2MHz FLOPPY_CONNECTOR(config, "fdc:0", ngen_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); - HARDDISK(config, "hard0", 0); + HARDDISK(config, "hard0"); } void ngen386_state::ngen386(machine_config &config) @@ -1049,10 +1049,10 @@ void ngen386_state::ngen386(machine_config &config) m_i386cpu->set_addrmap(AS_IO, &ngen386_state::ngen386_io); m_i386cpu->set_irq_acknowledge_callback("pic", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_i386cpu, 0); - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); m_pit->set_clk<0>(78120/4); // 19.53kHz, /4 of the CPU timer output? m_pit->out_handler<0>().set(FUNC(ngen386_state::pit_out0_w)); // RS232 channel B baud rate m_pit->set_clk<1>(14.7456_MHz_XTAL / 12); // correct? - based on patent @@ -1079,7 +1079,7 @@ void ngen386_state::ngen386(machine_config &config) m_dmac->out_iow_callback<3>().set(FUNC(ngen386_state::dma_3_dack_w)); // I/O board - UPD7201(config, m_iouart, 0); // clocked by PIT channel 2? + UPD7201(config, m_iouart); // clocked by PIT channel 2? m_iouart->out_txda_callback().set("rs232_a", FUNC(rs232_port_device::write_txd)); m_iouart->out_txdb_callback().set("rs232_b", FUNC(rs232_port_device::write_txd)); m_iouart->out_dtra_callback().set("rs232_a", FUNC(rs232_port_device::write_dtr)); @@ -1115,13 +1115,13 @@ void ngen386_state::ngen386(machine_config &config) m_crtc->set_update_row_callback(FUNC(ngen386_state::crtc_update_row)); // keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board) - I8251(config, m_viduart, 0); // main clock unknown, Rx/Tx clocks are 19.53kHz + I8251(config, m_viduart); // main clock unknown, Rx/Tx clocks are 19.53kHz // m_viduart->txempty_handler().set("pic", FUNC(pic8259_device::ir4_w)); m_viduart->txd_handler().set("keyboard", FUNC(rs232_port_device::write_txd)); rs232_port_device &kbd(RS232_PORT(config, "keyboard", keyboard, "ngen")); kbd.rxd_handler().set(m_viduart, FUNC(i8251_device::write_rxd)); - CLOCK(config, "refresh_clock", 19200*16).signal_handler().set(FUNC(ngen386_state::timer_clk_out)); // should be 19530Hz + CLOCK(config, "refresh_clock", XTAL::u(19200*16)).signal_handler().set(FUNC(ngen386_state::timer_clk_out)); // should be 19530Hz // floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each) WD2797(config, m_fdc, 20_MHz_XTAL / 20); @@ -1129,7 +1129,7 @@ void ngen386_state::ngen386(machine_config &config) //m_fdc->drq_wr_callback().set(m_i386cpu, FUNC(i80186_cpu_device_device::drq1_w)); m_fdc->set_force_ready(true); - PIT8253(config, m_fdc_timer, 0); + PIT8253(config, m_fdc_timer); m_fdc_timer->set_clk<0>(0); m_fdc_timer->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir5_w)); // clocked on FDC data register access m_fdc_timer->set_clk<1>(20_MHz_XTAL / 20); @@ -1148,11 +1148,11 @@ void ngen386_state::ngen386(machine_config &config) m_hdc->in_tk000_callback().set_constant(1); m_hdc->in_sc_callback().set_constant(1); - PIT8253(config, m_hdc_timer, 0); + PIT8253(config, m_hdc_timer); m_hdc_timer->set_clk<2>(20_MHz_XTAL / 10); // 2MHz FLOPPY_CONNECTOR(config, "fdc:0", ngen_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); - HARDDISK(config, "hard0", 0); + HARDDISK(config, "hard0"); } void ngen386_state::_386i(machine_config &config) diff --git a/src/mame/skeleton/ngen_kb.cpp b/src/mame/skeleton/ngen_kb.cpp index 3f363de2533..abaafd6da95 100644 --- a/src/mame/skeleton/ngen_kb.cpp +++ b/src/mame/skeleton/ngen_kb.cpp @@ -11,8 +11,8 @@ #include "emu.h" #include "ngen_kb.h" -ngen_keyboard_device::ngen_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) - : serial_keyboard_device(mconfig, NGEN_KEYBOARD, tag, owner, 0) +ngen_keyboard_device::ngen_keyboard_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) + : serial_keyboard_device(mconfig, NGEN_KEYBOARD, tag, owner) , m_keys_down(0U) , m_last_reset(0U) { @@ -68,7 +68,7 @@ void ngen_keyboard_device::device_start() save_item(NAME(m_keys_down)); save_item(NAME(m_last_reset)); - set_rcv_rate(19200); + set_rcv_rate(XTAL::u(19200)); } void ngen_keyboard_device::device_reset() diff --git a/src/mame/skeleton/ngen_kb.h b/src/mame/skeleton/ngen_kb.h index 37589926303..46ba4733b71 100644 --- a/src/mame/skeleton/ngen_kb.h +++ b/src/mame/skeleton/ngen_kb.h @@ -12,7 +12,7 @@ class ngen_keyboard_device : public serial_keyboard_device { public: - ngen_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ngen_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; protected: diff --git a/src/mame/skeleton/onyx.cpp b/src/mame/skeleton/onyx.cpp index 4b9acf3ebf0..5bfcb5f0c8e 100644 --- a/src/mame/skeleton/onyx.cpp +++ b/src/mame/skeleton/onyx.cpp @@ -146,7 +146,7 @@ void onyx_state::c8002(machine_config &config) subcpu.set_addrmap(AS_PROGRAM, &onyx_state::submem); subcpu.set_addrmap(AS_IO, &onyx_state::subio); - clock_device &sio1_clock(CLOCK(config, "sio1_clock", 307200)); + clock_device &sio1_clock(CLOCK(config, "sio1_clock", XTAL::u(307200))); sio1_clock.signal_handler().set(m_sio[0], FUNC(z80sio_device::rxca_w)); sio1_clock.signal_handler().append(m_sio[0], FUNC(z80sio_device::txca_w)); @@ -176,7 +176,7 @@ void onyx_state::c8002(machine_config &config) //z80pio_device& pio1s(Z80PIO(config, "pio1s", XTAL(16'000'000)/4)); //pio1s->out_int_callback().set_inputline("subcpu", INPUT_LINE_IRQ0); - clock_device &sio1s_clock(CLOCK(config, "sio1s_clock", 614400)); + clock_device &sio1s_clock(CLOCK(config, "sio1s_clock", XTAL::u(614400))); sio1s_clock.signal_handler().set("sio1s", FUNC(z80sio_device::rxtxcb_w)); //sio1s_clock.signal_handler().append("sio1s", FUNC(z80sio_device::txca_w)); @@ -253,7 +253,7 @@ void onyx_state::c5000(machine_config &config) maincpu.set_addrmap(AS_PROGRAM, &onyx_state::c5000_mem); maincpu.set_addrmap(AS_IO, &onyx_state::c5000_io); - clock_device &sio1_clock(CLOCK(config, "sio1_clock", 614400)); + clock_device &sio1_clock(CLOCK(config, "sio1_clock", XTAL::u(614400))); sio1_clock.signal_handler().set(m_sio[0], FUNC(z80sio_device::rxtxcb_w)); //sio1_clock.signal_handler().append(m_sio[0], FUNC(z80sio_device::txca_w)); diff --git a/src/mame/skeleton/p8k.cpp b/src/mame/skeleton/p8k.cpp index 4363afd65dd..cfecd089baf 100644 --- a/src/mame/skeleton/p8k.cpp +++ b/src/mame/skeleton/p8k.cpp @@ -63,7 +63,7 @@ class p8k_16_daisy_device : public device_t, public z80_daisy_chain_interface { public: - p8k_16_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + p8k_16_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t viack_r() { device_z80daisy_interface *intf = daisy_get_irq_device(); return intf ? intf->z80daisy_irq_ack() : 0; @@ -75,7 +75,7 @@ protected: DEFINE_DEVICE_TYPE(P8K_16_DAISY, p8k_16_daisy_device, "p8k_16_daisy", "P8000 16-bit daisy chain device") -p8k_16_daisy_device::p8k_16_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +p8k_16_daisy_device::p8k_16_daisy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, P8K_16_DAISY, tag, owner, clock) , z80_daisy_chain_interface(mconfig, *this) {} @@ -434,17 +434,17 @@ void p8k_state::p8k(machine_config &config) dma.in_iorq_callback().set(FUNC(p8k_state::io_read_byte)); dma.out_iorq_callback().set(FUNC(p8k_state::io_write_byte)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 307200)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(307200))); uart_clock.signal_handler().set("sio", FUNC(z80sio_device::txcb_w)); uart_clock.signal_handler().append("sio", FUNC(z80sio_device::rxcb_w)); - z80ctc_device& ctc0(Z80CTC(config, "ctc0", 1229000)); /* 1.22MHz clock */ + z80ctc_device& ctc0(Z80CTC(config, "ctc0", XTAL::u(1229000))); /* 1.22MHz clock */ // to implement: callbacks! // manual states the callbacks should go to // Baud Gen 3, FDC, System-Kanal ctc0.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - z80ctc_device& ctc1(Z80CTC(config, "ctc1", 1229000)); /* 1.22MHz clock */ + z80ctc_device& ctc1(Z80CTC(config, "ctc1", XTAL::u(1229000))); /* 1.22MHz clock */ // to implement: callbacks! // manual states the callbacks should go to // Baud Gen 0, Baud Gen 1, Baud Gen 2, @@ -463,13 +463,13 @@ void p8k_state::p8k(machine_config &config) z80sio_device& sio1(Z80SIO(config, "sio1", 16_MHz_XTAL / 4)); sio1.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - z80pio_device& pio0(Z80PIO(config, "pio0", 1229000)); + z80pio_device& pio0(Z80PIO(config, "pio0", XTAL::u(1229000))); pio0.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - z80pio_device& pio1(Z80PIO(config, "pio1", 1229000)); + z80pio_device& pio1(Z80PIO(config, "pio1", XTAL::u(1229000))); pio1.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - Z80PIO(config, m_pio2, 1229000); + Z80PIO(config, m_pio2, XTAL::u(1229000)); m_pio2->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_pio2->in_pa_callback().set_ioport("DSW"); @@ -481,7 +481,7 @@ void p8k_state::p8k(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 3250).add_route(ALL_OUTPUTS, "mono", 0.5); + BEEP(config, "beeper", XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 0.5); } void p8k_state::p8k_16(machine_config &config) @@ -493,10 +493,10 @@ void p8k_state::p8k_16(machine_config &config) maincpu.set_addrmap(AS_IO, &p8k_state::p8k_16_iomap); maincpu.viack().set("p8k_16_daisy", FUNC(p8k_16_daisy_device::viack_r)); - P8K_16_DAISY(config, m_daisy, 0); + P8K_16_DAISY(config, m_daisy); m_daisy->set_daisy_config(p8k_16_daisy_chain); - clock_device &uart_clock(CLOCK(config, "uart_clock", 307200)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(307200))); uart_clock.signal_handler().set("sio", FUNC(z80sio_device::txcb_w)); uart_clock.signal_handler().append("sio", FUNC(z80sio_device::rxcb_w)); @@ -531,7 +531,7 @@ void p8k_state::p8k_16(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 3250).add_route(ALL_OUTPUTS, "mono", 0.5); + BEEP(config, "beeper", XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 0.5); } /* ROM definition */ diff --git a/src/mame/skeleton/palestra.cpp b/src/mame/skeleton/palestra.cpp index cd66fb7f242..c397167ac57 100644 --- a/src/mame/skeleton/palestra.cpp +++ b/src/mame/skeleton/palestra.cpp @@ -34,7 +34,7 @@ #include -#define MASTER_CLOCK (4000000) +#define MASTER_CLOCK XTAL::u(4000000) #define V_TOTAL_PONG 315 #define H_TOTAL_PONG 256 // tbc @@ -68,7 +68,7 @@ INPUT_PORTS_END void palestra_state::palestra(machine_config &config) { - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()) + NETLIST_CPU(config, m_maincpu) .set_source(netlist_palestra); NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", m_video, FUNC(fixedfreq_device::update_composite_monochrome)); diff --git a/src/mame/skeleton/pdt3100.cpp b/src/mame/skeleton/pdt3100.cpp index 1a78bb98095..8c664741506 100644 --- a/src/mame/skeleton/pdt3100.cpp +++ b/src/mame/skeleton/pdt3100.cpp @@ -57,7 +57,7 @@ INPUT_PORTS_END void pdt3100_state::pdt3100(machine_config &config) { - V25(config, m_maincpu, 8'000'000); + V25(config, m_maincpu, XTAL::u(8'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &pdt3100_state::mem_map); m_maincpu->set_addrmap(AS_IO, &pdt3100_state::io_map); } diff --git a/src/mame/skeleton/pes.cpp b/src/mame/skeleton/pes.cpp index 545c23397c6..43f087c46fe 100644 --- a/src/mame/skeleton/pes.cpp +++ b/src/mame/skeleton/pes.cpp @@ -184,10 +184,10 @@ void pes_state::pes(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - TMS5220C(config, m_speech, 720000); /* 720Khz clock, 9khz sample-rate, adjustable with 10-turn trimpot */ + TMS5220C(config, m_speech, XTAL::u(720000)); /* 720Khz clock, 9khz sample-rate, adjustable with 10-turn trimpot */ m_speech->add_route(ALL_OUTPUTS, "mono", 1.0); - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(pes_state::kbd_put)); } diff --git a/src/mame/skeleton/philipsbo.cpp b/src/mame/skeleton/philipsbo.cpp index d31600d6da1..72acc1c302e 100644 --- a/src/mame/skeleton/philipsbo.cpp +++ b/src/mame/skeleton/philipsbo.cpp @@ -197,7 +197,7 @@ void pbo_state::pbo(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pbo_state::main_map); SCC85C30(config, m_scc, 10_MHz_XTAL); // Unknown PCLK - m_scc->configure_channels(4'915'200, 4'915'200, 4'915'200, 4'915'200); + m_scc->configure_channels(XTAL::u(4'915'200), XTAL::u(4'915'200), XTAL::u(4'915'200), XTAL::u(4'915'200)); m_scc->out_txda_callback().set(m_rs232[0], FUNC(rs232_port_device::write_txd)); m_scc->out_dtra_callback().set(m_rs232[0], FUNC(rs232_port_device::write_dtr)); m_scc->out_rtsa_callback().set(m_rs232[0], FUNC(rs232_port_device::write_rts)); @@ -253,7 +253,7 @@ void pbo_state::pbo(machine_config &config) AM7990(config, m_lance); m_lance->intr_out().set(FUNC(pbo_state::net_irq_w)); - MC68681(config, "duart", 3'686'400); + MC68681(config, "duart", XTAL::u(3'686'400)); } ROM_START( pbo ) diff --git a/src/mame/skeleton/picno.cpp b/src/mame/skeleton/picno.cpp index c8446775a86..e367ba52c0d 100644 --- a/src/mame/skeleton/picno.cpp +++ b/src/mame/skeleton/picno.cpp @@ -64,7 +64,7 @@ INPUT_PORTS_END void picno_state::picno(machine_config &config) { /* basic machine hardware */ - HD6435328(config, m_maincpu, 20'000'000); // TODO: clock is a guess, divided by 2 in the cpu + HD6435328(config, m_maincpu, XTAL::u(20'000'000)); // TODO: clock is a guess, divided by 2 in the cpu m_maincpu->set_addrmap(AS_PROGRAM, &picno_state::mem_map); //SPEAKER(config, "lspeaker").front_left(); // no speaker in the unit, but there's a couple of sockets on the back diff --git a/src/mame/skeleton/plan80.cpp b/src/mame/skeleton/plan80.cpp index a99aec6cefb..70e845b982d 100644 --- a/src/mame/skeleton/plan80.cpp +++ b/src/mame/skeleton/plan80.cpp @@ -250,7 +250,7 @@ GFXDECODE_END void plan80_state::plan80(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2048000); + I8080(config, m_maincpu, XTAL::u(2048000)); m_maincpu->set_addrmap(AS_PROGRAM, &plan80_state::mem_map); m_maincpu->set_addrmap(AS_IO, &plan80_state::io_map); diff --git a/src/mame/skeleton/pm68k.cpp b/src/mame/skeleton/pm68k.cpp index 9a331e7a1fa..f1331c72f5e 100644 --- a/src/mame/skeleton/pm68k.cpp +++ b/src/mame/skeleton/pm68k.cpp @@ -60,10 +60,10 @@ void pm68k_state::machine_reset() void pm68k_state::pm68k(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 8000000); + M68000(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pm68k_state::mem_map); - i8274_device& mpsc(I8274(config, "mpsc", 0)); + i8274_device& mpsc(I8274(config, "mpsc")); mpsc.out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd)); mpsc.out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr)); mpsc.out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -71,7 +71,7 @@ void pm68k_state::pm68k(machine_config &config) mpsc.out_dtrb_callback().set("rs232b", FUNC(rs232_port_device::write_dtr)); mpsc.out_rtsb_callback().set("rs232b", FUNC(rs232_port_device::write_rts)); - am9513_device &stc(AM9513(config, "stc", 4000000)); + am9513_device &stc(AM9513(config, "stc", XTAL::u(4000000))); stc.out4_cb().set("mpsc", FUNC(i8274_device::rxca_w)); stc.out4_cb().append("mpsc", FUNC(i8274_device::txca_w)); stc.out5_cb().set("mpsc", FUNC(i8274_device::rxcb_w)); diff --git a/src/mame/skeleton/pockchal.cpp b/src/mame/skeleton/pockchal.cpp index a8062d81a36..993f0e11453 100644 --- a/src/mame/skeleton/pockchal.cpp +++ b/src/mame/skeleton/pockchal.cpp @@ -105,7 +105,7 @@ void pockchalv1_state::machine_reset() void pockchalv1_state::pockchalv1(machine_config &config) { /* basic machine hardware */ - TMP90845(config, m_maincpu, 8000000); /* ? MHz */ + TMP90845(config, m_maincpu, XTAL::u(8000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &pockchalv1_state::pockchalv1_map); // m_maincpu->->set_vblank_int("screen", FUNC(pockchalv1_state::irq0_line_hold)); diff --git a/src/mame/skeleton/proteus3.cpp b/src/mame/skeleton/proteus3.cpp index 3da71c4bf2d..9d658e41202 100644 --- a/src/mame/skeleton/proteus3.cpp +++ b/src/mame/skeleton/proteus3.cpp @@ -415,16 +415,16 @@ void proteus3_state::proteus3(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); /* Devices */ - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(proteus3_state::video_w)); m_pia->ca2_handler().set(FUNC(proteus3_state::ca2_w)); m_pia->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(proteus3_state::kbd_put)); /* cassette */ - ACIA6850(config, m_acia1, 0); + ACIA6850(config, m_acia1); m_acia1->txd_handler().set([this] (bool state) { m_cassbit = state; }); SPEAKER(config, "mono").front_center(); @@ -435,7 +435,7 @@ void proteus3_state::proteus3(machine_config &config) TIMER(config, "kansas_r").configure_periodic(FUNC(proteus3_state::kansas_r), attotime::from_hz(40000)); // optional tty keyboard - ACIA6850(config, m_acia2, 0); + ACIA6850(config, m_acia2); m_acia2->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia2->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/skeleton/pt68k4.cpp b/src/mame/skeleton/pt68k4.cpp index 37627775faa..d94c7087945 100644 --- a/src/mame/skeleton/pt68k4.cpp +++ b/src/mame/skeleton/pt68k4.cpp @@ -427,22 +427,22 @@ void pt68k4_state::pt68k2(machine_config &config) pc_kbdc.out_clock_cb().set(FUNC(pt68k4_state::keyboard_clock_w)); pc_kbdc.out_data_cb().set(FUNC(pt68k4_state::keyboard_data_w)); - M48T02(config, TIMEKEEPER_TAG, 0); + M48T02(config, TIMEKEEPER_TAG); WD1772(config, m_wdfdc, 16_MHz_XTAL / 2); FLOPPY_CONNECTOR(config, m_floppy_connector[0], pt68k_floppies, "525dd", pt68k4_state::floppy_formats); FLOPPY_CONNECTOR(config, m_floppy_connector[1], pt68k_floppies, "525dd", pt68k4_state::floppy_formats); - ISA8(config, m_isa, 0); + ISA8(config, m_isa); m_isa->set_custom_spaces(); m_isa->irq5_callback().set(FUNC(pt68k4_state::irq5_w)); - ISA8_SLOT(config, "isa1", 0, m_isa, pt68k4_isa8_cards, "cga", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, m_isa, pt68k4_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa3", 0, m_isa, pt68k4_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, m_isa, pt68k4_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa5", 0, m_isa, pt68k4_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa6", 0, m_isa, pt68k4_isa8_cards, nullptr, false), + ISA8_SLOT(config, "isa1", m_isa, pt68k4_isa8_cards, "cga", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", m_isa, pt68k4_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa3", m_isa, pt68k4_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", m_isa, pt68k4_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa5", m_isa, pt68k4_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", m_isa, pt68k4_isa8_cards, nullptr, false), SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); @@ -467,18 +467,18 @@ void pt68k4_state::pt68k4(machine_config &config) pc_kbdc.out_clock_cb().set(FUNC(pt68k4_state::keyboard_clock_w)); pc_kbdc.out_data_cb().set(FUNC(pt68k4_state::keyboard_data_w)); - M48T02(config, TIMEKEEPER_TAG, 0); + M48T02(config, TIMEKEEPER_TAG); - ISA8(config, m_isa, 0); + ISA8(config, m_isa); m_isa->set_custom_spaces(); - ISA8_SLOT(config, "isa1", 0, m_isa, pt68k4_isa8_cards, "fdc_at", false); // FIXME: determine ISA bus clock - ISA8_SLOT(config, "isa2", 0, m_isa, pt68k4_isa8_cards, "cga", false); - ISA8_SLOT(config, "isa3", 0, m_isa, pt68k4_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa4", 0, m_isa, pt68k4_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa5", 0, m_isa, pt68k4_isa8_cards, nullptr, false); - ISA8_SLOT(config, "isa6", 0, m_isa, pt68k4_isa8_cards, nullptr, false), - ISA8_SLOT(config, "isa7", 0, m_isa, pt68k4_isa8_cards, nullptr, false), + ISA8_SLOT(config, "isa1", m_isa, pt68k4_isa8_cards, "fdc_at", false); // FIXME: determine ISA bus clock + ISA8_SLOT(config, "isa2", m_isa, pt68k4_isa8_cards, "cga", false); + ISA8_SLOT(config, "isa3", m_isa, pt68k4_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa4", m_isa, pt68k4_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa5", m_isa, pt68k4_isa8_cards, nullptr, false); + ISA8_SLOT(config, "isa6", m_isa, pt68k4_isa8_cards, nullptr, false), + ISA8_SLOT(config, "isa7", m_isa, pt68k4_isa8_cards, nullptr, false), SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); @@ -520,5 +520,5 @@ ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1988, pt68k2, 0, 0, pt68k2, pt68k4, pt68k4_state, empty_init, "Peripheral Technology", "PT68K2", MACHINE_SUPPORTS_SAVE ) -COMP( 1990, pt68k4, 0, 0, pt68k4, pt68k4, pt68k4_state, empty_init, "Peripheral Technology", "PT68K4", MACHINE_SUPPORTS_SAVE ) +COMP( 1988, pt68k2, 0, 0, pt68k2, pt68k4, pt68k4_state, empty_init, "Peripheral Technology", "PT68K2", MACHINE_SUPPORTS_SAVE ) +COMP( 1990, pt68k4, 0, 0, pt68k4, pt68k4, pt68k4_state, empty_init, "Peripheral Technology", "PT68K4", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/skeleton/ptcsol.cpp b/src/mame/skeleton/ptcsol.cpp index 3b427e2dc95..acb221dff92 100644 --- a/src/mame/skeleton/ptcsol.cpp +++ b/src/mame/skeleton/ptcsol.cpp @@ -764,7 +764,7 @@ void sol20_state::sol20(machine_config &config) AY51013(config, m_uart); // TMS6011NC m_uart->set_auto_rdav(true); // ROD (pin 4) tied to RDD (pin 18) - CLOCK(config, m_uart_clock, 4800); + CLOCK(config, m_uart_clock, XTAL::u(4800)); m_uart_clock->signal_handler().set(m_uart, FUNC(ay51013_device::write_rcp)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay51013_device::write_tcp)); @@ -775,11 +775,11 @@ void sol20_state::sol20(machine_config &config) m_uart_s->write_so_callback().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_uart_s->set_auto_rdav(true); // ROD (pin 4) tied to RDD (pin 18) - CLOCK(config, m_uart_s_clock, 4800); + CLOCK(config, m_uart_s_clock, XTAL::u(4800)); m_uart_s_clock->signal_handler().set(m_uart_s, FUNC(ay51013_device::write_rcp)); m_uart_s_clock->signal_handler().append(m_uart_s, FUNC(ay51013_device::write_tcp)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(sol20_state::kbd_put)); SOFTWARE_LIST(config, "cass_list").set_original("sol20_cass"); diff --git a/src/mame/skeleton/pv9234.cpp b/src/mame/skeleton/pv9234.cpp index 52d8ed427c6..366315be0f6 100644 --- a/src/mame/skeleton/pv9234.cpp +++ b/src/mame/skeleton/pv9234.cpp @@ -152,7 +152,7 @@ uint32_t pv9234_state::screen_update_pv9234(screen_device &screen, bitmap_ind16 void pv9234_state::pv9234(machine_config &config) { /* basic machine hardware */ - ARM7(config, m_maincpu, 4915000); //probably a more powerful clone. + ARM7(config, m_maincpu, XTAL::u(4915000)); //probably a more powerful clone. m_maincpu->set_addrmap(AS_PROGRAM, &pv9234_state::pv9234_map); /* video hardware */ diff --git a/src/mame/skeleton/qtsbc.cpp b/src/mame/skeleton/qtsbc.cpp index 75bb34c7e3c..fb6004343b3 100644 --- a/src/mame/skeleton/qtsbc.cpp +++ b/src/mame/skeleton/qtsbc.cpp @@ -532,7 +532,7 @@ void qtsbc_state::qtsbc(machine_config &config) m_pit->set_clk<1>(4_MHz_XTAL / 2); m_pit->out_handler<1>().set(m_pit, FUNC(pit8253_device::write_clk2)); - I8251(config, m_usart, 0); // U8 + I8251(config, m_usart); // U8 m_usart->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); RS232_PORT(config, m_rs232, default_rs232_devices, "terminal"); diff --git a/src/mame/skeleton/rvoice.cpp b/src/mame/skeleton/rvoice.cpp index 01762f8462b..41424c01725 100644 --- a/src/mame/skeleton/rvoice.cpp +++ b/src/mame/skeleton/rvoice.cpp @@ -90,13 +90,13 @@ void rvoice_state::rvoicepc(machine_config &config) //playercpu.set_addrmap(AS_PROGRAM, &rvoice_state::hd63701_slave_io); config.set_maximum_quantum(attotime::from_hz(60)); - mos6551_device &acia(MOS6551(config, "acia65c51", 0)); + mos6551_device &acia(MOS6551(config, "acia65c51")); acia.set_xtal(1.8432_MHz_XTAL); /* video hardware */ /* sound hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(rvoice_state::null_kbd_put)); } diff --git a/src/mame/skeleton/sacstate.cpp b/src/mame/skeleton/sacstate.cpp index d4b3461bcfc..9820219b041 100644 --- a/src/mame/skeleton/sacstate.cpp +++ b/src/mame/skeleton/sacstate.cpp @@ -144,12 +144,12 @@ void sacstate_state::machine_start() void sacstate_state::sacstate(machine_config &config) { /* basic machine hardware */ - I8008(config, m_maincpu, 800000); + I8008(config, m_maincpu, XTAL::u(800000)); m_maincpu->set_addrmap(AS_PROGRAM, &sacstate_state::sacstate_mem); m_maincpu->set_addrmap(AS_IO, &sacstate_state::sacstate_io); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(sacstate_state::kbd_put)); } diff --git a/src/mame/skeleton/sansa_fuze.cpp b/src/mame/skeleton/sansa_fuze.cpp index f452f0a14da..fda6c0848fb 100644 --- a/src/mame/skeleton/sansa_fuze.cpp +++ b/src/mame/skeleton/sansa_fuze.cpp @@ -46,7 +46,7 @@ INPUT_PORTS_END void sansa_fuze_state::sansa_fuze(machine_config &config) { /* basic machine hardware */ - ARM7(config, m_maincpu, 50000000); // arm based, speed unknown + ARM7(config, m_maincpu, XTAL::u(50000000)); // arm based, speed unknown m_maincpu->set_addrmap(AS_PROGRAM, &sansa_fuze_state::sansa_fuze_map); } diff --git a/src/mame/skeleton/sartorius.cpp b/src/mame/skeleton/sartorius.cpp index 17df80470e4..5ff0c551d1c 100644 --- a/src/mame/skeleton/sartorius.cpp +++ b/src/mame/skeleton/sartorius.cpp @@ -89,7 +89,7 @@ private: void sart3733_state::sart3733(machine_config &config) { - i4040_cpu_device &cpu(I4040(config, "maincpu", 750'000)); // clock speed is a complete guess - can't see crystal or multi-phase clock generator + i4040_cpu_device &cpu(I4040(config, "maincpu", XTAL::u(750'000))); // clock speed is a complete guess - can't see crystal or multi-phase clock generator cpu.set_rom_map(&sart3733_state::sart3733_rom); cpu.set_ram_memory_map(&sart3733_state::sart3733_memory); cpu.set_ram_status_map(&sart3733_state::sart3733_status); diff --git a/src/mame/skeleton/sbrain.cpp b/src/mame/skeleton/sbrain.cpp index 841b7a7469c..7c011003f8d 100644 --- a/src/mame/skeleton/sbrain.cpp +++ b/src/mame/skeleton/sbrain.cpp @@ -706,7 +706,7 @@ void sbrain_state::sbrain(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 800).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(800)).add_route(ALL_OUTPUTS, "mono", 1.00); /* Devices */ I8255(config, m_ppi); @@ -749,7 +749,7 @@ void sbrain_state::sbrain(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:2", sbrain_floppies, nullptr, floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:3", sbrain_floppies, nullptr, floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - TIMER(config, "timer_a", 0).configure_periodic(FUNC(sbrain_state::kbd_scan), attotime::from_hz(15)); + TIMER(config, "timer_a").configure_periodic(FUNC(sbrain_state::kbd_scan), attotime::from_hz(15)); SOFTWARE_LIST(config, "flop_list").set_original("sbrain"); } diff --git a/src/mame/skeleton/scopus.cpp b/src/mame/skeleton/scopus.cpp index 44002f3d7dd..db59a6bfa5c 100644 --- a/src/mame/skeleton/scopus.cpp +++ b/src/mame/skeleton/scopus.cpp @@ -185,7 +185,7 @@ void sagitta180_state::sagitta180(machine_config &config) m_dma8257->out_hrq_cb().set(FUNC(sagitta180_state::hrq_w)); m_dma8257->in_memr_cb().set(FUNC(sagitta180_state::memory_read_byte)); - i8251_device &uart(I8251(config, "uart", 0)); + i8251_device &uart(I8251(config, "uart")); uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -195,11 +195,11 @@ void sagitta180_state::sagitta180(machine_config &config) rs232.cts_handler().set("uart", FUNC(i8251_device::write_cts)); rs232.dsr_handler().set("uart", FUNC(i8251_device::write_dsr)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set("uart", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart", FUNC(i8251_device::write_rxc)); -// i8212_device &intlatch(I8212(config, "intlatch", 0)); +// i8212_device &intlatch(I8212(config, "intlatch")); // intlatch.md_rd_callback().set_constant(GND); // guessed ! // intlatch.di_rd_callback().set("picu", FUNC(i8214_device::vector_r)); // intlatch.int_wr_callback().set_inputline("maincpu", I8085_INTR_LINE); // guessed ! diff --git a/src/mame/skeleton/sh4robot.cpp b/src/mame/skeleton/sh4robot.cpp index e373b9885ce..ab7f49fa0d4 100644 --- a/src/mame/skeleton/sh4robot.cpp +++ b/src/mame/skeleton/sh4robot.cpp @@ -71,7 +71,7 @@ INPUT_PORTS_END void sh4robot_state::sh4robot(machine_config &config) { /* basic machine hardware */ - SH4LE(config, m_maincpu, 200000000); // SH7750 + SH4LE(config, m_maincpu, XTAL::u(200000000)); // SH7750 m_maincpu->set_md(0, 1); m_maincpu->set_md(1, 0); m_maincpu->set_md(2, 1); diff --git a/src/mame/skeleton/shine.cpp b/src/mame/skeleton/shine.cpp index 6218cac3b0d..08a6047df72 100644 --- a/src/mame/skeleton/shine.cpp +++ b/src/mame/skeleton/shine.cpp @@ -246,7 +246,7 @@ void shine_state::machine_start() void shine_state::shine(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 2000000); // 2MHz ?? + M6502(config, m_maincpu, XTAL::u(2000000)); // 2MHz ?? m_maincpu->set_addrmap(AS_PROGRAM, &shine_state::shine_mem); INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set_inputline("maincpu", M6502_IRQ_LINE); @@ -267,18 +267,18 @@ void shine_state::shine(machine_config &config) m_ram->set_default_size("32K"); m_ram->set_extra_options("16K"); - MOS6522(config, m_via[0], 1000000); + MOS6522(config, m_via[0], XTAL::u(1000000)); m_via[0]->readpa_handler().set(FUNC(shine_state::via0_pa_r)); m_via[0]->writepb_handler().set(FUNC(shine_state::via0_pb_w)); m_via[0]->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); m_via[0]->cb2_handler().set(m_speaker, FUNC(speaker_sound_device::level_w)); - MOS6522(config, m_via[1], 1000000); + MOS6522(config, m_via[1], XTAL::u(1000000)); m_via[1]->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); CENTRONICS(config, m_centronics, centronics_devices, "printer"); - FD1771(config, m_fdc, 1000000); + FD1771(config, m_fdc, XTAL::u(1000000)); FLOPPY_CONNECTOR(config, m_floppy[0], "525qd", FLOPPY_525_QD, true, floppy_image_device::default_mfm_floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, m_floppy[1], "525qd", FLOPPY_525_QD, false, floppy_image_device::default_mfm_floppy_formats).enable_sound(true); diff --git a/src/mame/skeleton/slsstars.cpp b/src/mame/skeleton/slsstars.cpp index cd5b14064bd..e4f4e4c1bd8 100644 --- a/src/mame/skeleton/slsstars.cpp +++ b/src/mame/skeleton/slsstars.cpp @@ -44,7 +44,7 @@ INPUT_PORTS_END void slsstars_state::slsstars(machine_config &config) { - MC68HC11F1(config, m_maincpu, 8'000'000); // unknown clock + MC68HC11F1(config, m_maincpu, XTAL::u(8'000'000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &slsstars_state::mem_map); m_maincpu->set_default_config(0x3f); diff --git a/src/mame/skeleton/softbox.cpp b/src/mame/skeleton/softbox.cpp index c892b276c07..46b6e627ec0 100644 --- a/src/mame/skeleton/softbox.cpp +++ b/src/mame/skeleton/softbox.cpp @@ -362,7 +362,7 @@ void softbox_state::softbox(machine_config &config) m_maincpu->set_addrmap(AS_IO, &softbox_state::softbox_io); // devices - i8251_device &i8251(I8251(config, I8251_TAG, 0)); + i8251_device &i8251(I8251(config, I8251_TAG)); i8251.txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); i8251.dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); i8251.rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); @@ -390,7 +390,7 @@ void softbox_state::softbox(machine_config &config) ieee488_device::add_cbm_devices(config, "c8050"); - CORVUS_HDC(config, m_hdc, 0); + CORVUS_HDC(config, m_hdc); HARDDISK(config, "harddisk1", "corvus_hdd"); HARDDISK(config, "harddisk2", "corvus_hdd"); HARDDISK(config, "harddisk3", "corvus_hdd"); diff --git a/src/mame/skeleton/squale.cpp b/src/mame/skeleton/squale.cpp index 19695481447..802e633e96c 100644 --- a/src/mame/skeleton/squale.cpp +++ b/src/mame/skeleton/squale.cpp @@ -814,7 +814,7 @@ void squale_state::squale(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &squale_state::squale_mem); /* Cartridge pia */ - PIA6821(config, m_pia_u72, 0); + PIA6821(config, m_pia_u72); m_pia_u72->readpa_handler().set(FUNC(squale_state::pia_u72_porta_r)); m_pia_u72->readpb_handler().set(FUNC(squale_state::pia_u72_portb_r)); m_pia_u72->writepa_handler().set(FUNC(squale_state::pia_u72_porta_w)); @@ -823,7 +823,7 @@ void squale_state::squale(machine_config &config) m_pia_u72->cb2_handler().set(FUNC(squale_state::pia_u72_cb2_w)); /* Keyboard pia */ - PIA6821(config, m_pia_u75, 0); + PIA6821(config, m_pia_u75); m_pia_u75->readpa_handler().set(FUNC(squale_state::pia_u75_porta_r)); m_pia_u75->readpb_handler().set(FUNC(squale_state::pia_u75_portb_r)); m_pia_u75->writepa_handler().set(FUNC(squale_state::pia_u75_porta_w)); @@ -840,7 +840,7 @@ void squale_state::squale(machine_config &config) m_ay8910->port_b_write_callback().set(FUNC(squale_state::ay_portb_w)); m_ay8910->add_route(ALL_OUTPUTS, "mono", 0.50); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); /* screen */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/skeleton/swyft.cpp b/src/mame/skeleton/swyft.cpp index faac891b732..06e9ff2b3eb 100644 --- a/src/mame/skeleton/swyft.cpp +++ b/src/mame/skeleton/swyft.cpp @@ -761,7 +761,7 @@ void swyft_state::swyft(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - ACIA6850(config, m_acia6850, 0); + ACIA6850(config, m_acia6850); // acia rx and tx clocks come from one of the VIA pins and are tied together, fix this below? acia e clock comes from 68008 clock_device &acia_clock(CLOCK(config, "acia_clock", (XTAL(15'897'600)/2)/5)); // out e clock from 68008, ~ 10in clocks per out clock acia_clock.signal_handler().set(FUNC(swyft_state::write_acia_clock)); diff --git a/src/mame/skeleton/sys2900.cpp b/src/mame/skeleton/sys2900.cpp index de993bd64f7..4ded7ff6a2d 100644 --- a/src/mame/skeleton/sys2900.cpp +++ b/src/mame/skeleton/sys2900.cpp @@ -154,10 +154,10 @@ void sys2900_state::sys2900(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); - Z80CTC(config, "ctc", 0); - Z80PIO(config, "pio", 0); - Z80SIO(config, "sio1", 0); - Z80SIO(config, "sio2", 0); + Z80CTC(config, "ctc"); + Z80PIO(config, "pio"); + Z80SIO(config, "sio1"); + Z80SIO(config, "sio2"); } /* ROM definition */ diff --git a/src/mame/skeleton/sys9002.cpp b/src/mame/skeleton/sys9002.cpp index 3e113c90f59..ee77f7d9667 100644 --- a/src/mame/skeleton/sys9002.cpp +++ b/src/mame/skeleton/sys9002.cpp @@ -139,13 +139,13 @@ void sys9002_state::sys9002(machine_config &config) crtc.set_char_width(8); crtc.set_update_row_callback(FUNC(sys9002_state::crtc_update_row)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 9600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(9600))); uart_clock.signal_handler().set("uart1", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart1", FUNC(i8251_device::write_rxc)); uart_clock.signal_handler().append("uart2", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart2", FUNC(i8251_device::write_rxc)); - i8251_device &uart1(I8251(config, "uart1", 0)); // sync + i8251_device &uart1(I8251(config, "uart1")); // sync uart1.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); uart1.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr)); uart1.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -155,7 +155,7 @@ void sys9002_state::sys9002(machine_config &config) rs232a.dsr_handler().set("uart1", FUNC(i8251_device::write_dsr)); rs232a.cts_handler().set("uart1", FUNC(i8251_device::write_cts)); - i8251_device &uart2(I8251(config, "uart2", 0)); // sync + i8251_device &uart2(I8251(config, "uart2")); // sync uart2.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); uart2.dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr)); uart2.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/skeleton/systec.cpp b/src/mame/skeleton/systec.cpp index 37107a0039b..536933dac9d 100644 --- a/src/mame/skeleton/systec.cpp +++ b/src/mame/skeleton/systec.cpp @@ -92,7 +92,7 @@ void systec_state::systec(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &systec_state::mem_map); m_maincpu->set_addrmap(AS_IO, &systec_state::io_map); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set("sio", FUNC(z80sio_device::txca_w)); uart_clock.signal_handler().append("sio", FUNC(z80sio_device::rxca_w)); diff --git a/src/mame/skeleton/tavernie.cpp b/src/mame/skeleton/tavernie.cpp index da9c729c307..9fcd642e157 100644 --- a/src/mame/skeleton/tavernie.cpp +++ b/src/mame/skeleton/tavernie.cpp @@ -404,7 +404,7 @@ void cpu09_state::cpu09(machine_config &config) m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); TIMER(config, "kansas_r").configure_periodic(FUNC(cpu09_state::kansas_r), attotime::from_hz(19200)); - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpa_handler().set(FUNC(cpu09_state::pa_r)); m_pia0->ca1_w(0); m_pia0->writepa_handler().set(FUNC(cpu09_state::pa_w)); @@ -412,13 +412,13 @@ void cpu09_state::cpu09(machine_config &config) PTM6840(config, m_ptm, 4_MHz_XTAL / 4); // all i/o lines connect to the 40-pin expansion connector - m_ptm->set_external_clocks(0, 0, 0); + m_ptm->set_external_clocks(XTAL(), XTAL(), XTAL()); m_ptm->o1_callback().set("acia", FUNC(acia6850_device::write_txc)); m_ptm->o1_callback().append("acia", FUNC(acia6850_device::write_rxc)); m_ptm->o2_callback().set_inputline("maincpu", INPUT_LINE_NMI); m_ptm->irq_callback().set_inputline("maincpu", M6809_IRQ_LINE); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_acia->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -445,21 +445,21 @@ void ivg09_state::ivg09(machine_config &config) PALETTE(config, m_palette, FUNC(ivg09_state::ivg09_palette), 3); /* sound hardware */ - BEEP(config, m_beep, 950).add_route(ALL_OUTPUTS, "mono", 0.50); // guess + BEEP(config, m_beep, XTAL::u(950)).add_route(ALL_OUTPUTS, "mono", 0.50); // guess /* Devices */ subdevice("rs232")->set_default_option(nullptr); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(ivg09_state::kbd_put)); - MC6845(config, m_crtc, 1008000); // unknown clock + MC6845(config, m_crtc, XTAL::u(1008000)); // unknown clock m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); m_crtc->set_update_row_callback(FUNC(ivg09_state::crtc_update_row)); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpb_handler().set(FUNC(ivg09_state::pb_ivg_r)); m_pia1->writepa_handler().set(FUNC(ivg09_state::pa_ivg_w)); m_pia1->cb2_handler().set(m_beep, FUNC(beep_device::set_state)); diff --git a/src/mame/skeleton/telex274.cpp b/src/mame/skeleton/telex274.cpp index aaa6f7bdce9..5cbe8f6670f 100644 --- a/src/mame/skeleton/telex274.cpp +++ b/src/mame/skeleton/telex274.cpp @@ -154,19 +154,19 @@ void telex274_state::telex274(machine_config &config) maintimer.out4_cb().append("mpsc", FUNC(i8274_device::txca_w)); // ? maintimer.out5_cb().set("mpsc", FUNC(i8274_device::rxtxcb_w)); // ? - I8274(config, "mpsc", 4'000'000); + I8274(config, "mpsc", XTAL::u(4'000'000)); - M68000(config, m_coaxcpu, 10'000'000); + M68000(config, m_coaxcpu, XTAL::u(10'000'000)); m_coaxcpu->set_addrmap(AS_PROGRAM, &telex274_state::coax_mem); m_coaxcpu->set_disable(); - M68000(config, m_examcpu, 10'000'000); + M68000(config, m_examcpu, XTAL::u(10'000'000)); m_examcpu->set_addrmap(AS_PROGRAM, &telex274_state::exam_mem); m_examcpu->set_disable(); - //AM9513A(config, "examtimer", 4'000'000); + //AM9513A(config, "examtimer", XTAL::u(4'000'000)); - //WD2797(config, "fdc", 1'000'000); + //WD2797(config, "fdc", XTAL::u(1'000'000)); } diff --git a/src/mame/skeleton/terak.cpp b/src/mame/skeleton/terak.cpp index 75c352a26bc..1846b7fb2c4 100644 --- a/src/mame/skeleton/terak.cpp +++ b/src/mame/skeleton/terak.cpp @@ -106,7 +106,7 @@ uint32_t terak_state::screen_update_terak(screen_device &screen, bitmap_ind16 &b void terak_state::terak(machine_config &config) { /* basic machine hardware */ - T11(config, m_maincpu, 4'000'000); // FIXME: actually LSI-11 + T11(config, m_maincpu, XTAL::u(4'000'000)); // FIXME: actually LSI-11 m_maincpu->set_initial_mode(6 << 13); m_maincpu->set_addrmap(AS_PROGRAM, &terak_state::mem_map); diff --git a/src/mame/skeleton/terco.cpp b/src/mame/skeleton/terco.cpp index c4257a95d8f..7cba93d99a8 100644 --- a/src/mame/skeleton/terco.cpp +++ b/src/mame/skeleton/terco.cpp @@ -301,9 +301,9 @@ void t4490_state::t4490(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &t4490_state::t4490_map); /* devices */ - PIA6821(config, m_pia1, 0); - PIA6821(config, m_pia2, 0); - ACIA6850(config, "acia", 0); + PIA6821(config, m_pia1); + PIA6821(config, m_pia2); + ACIA6850(config, "acia"); } ROM_START( t4490 ) diff --git a/src/mame/skeleton/terminal.cpp b/src/mame/skeleton/terminal.cpp index 618e97de484..267a82baf56 100644 --- a/src/mame/skeleton/terminal.cpp +++ b/src/mame/skeleton/terminal.cpp @@ -47,7 +47,7 @@ INPUT_PORTS_END void terminal_state::terminal(machine_config &config) { - I8031(config, m_maincpu, 12'000'000); + I8031(config, m_maincpu, XTAL::u(12'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &terminal_state::mem_map); } diff --git a/src/mame/skeleton/testpat.cpp b/src/mame/skeleton/testpat.cpp index 48f4eb1b484..fd0ef957bb7 100644 --- a/src/mame/skeleton/testpat.cpp +++ b/src/mame/skeleton/testpat.cpp @@ -29,7 +29,7 @@ Radio, 1985, N6 namespace { -#define MASTER_CLOCK (4000000) +#define MASTER_CLOCK XTAL::u(4000000) #define V_TOTAL_PONG 315 #define H_TOTAL_PONG 256 // tbc @@ -97,7 +97,7 @@ INPUT_PORTS_END void tp1983_state::tp1983(machine_config &config) { - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_tp1983); + NETLIST_CPU(config, m_maincpu).set_source(netlist_tp1983); NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", m_video, FUNC(fixedfreq_device::update_composite_monochrome)); @@ -113,7 +113,7 @@ void tp1983_state::tp1983(machine_config &config) void tp1985_state::tp1985(machine_config &config) { - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_tp1985); + NETLIST_CPU(config, m_maincpu).set_source(netlist_tp1985); NETLIST_ANALOG_OUTPUT(config, "maincpu:vid0").set_params("videomix", FUNC(tp1985_state::video_out_cb)); diff --git a/src/mame/skeleton/ti630.cpp b/src/mame/skeleton/ti630.cpp index 16831f4a346..c14e98c1c37 100644 --- a/src/mame/skeleton/ti630.cpp +++ b/src/mame/skeleton/ti630.cpp @@ -161,7 +161,7 @@ void ti630_state::ti630(machine_config &config) PALETTE(config, "palette", FUNC(ti630_state::ti630_palette), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_ti630); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 16); } diff --git a/src/mame/skeleton/tk635.cpp b/src/mame/skeleton/tk635.cpp index 3b27c8907c5..39811b61f39 100644 --- a/src/mame/skeleton/tk635.cpp +++ b/src/mame/skeleton/tk635.cpp @@ -187,7 +187,7 @@ void tk635_state::machine_reset() void tk635_state::tk635(machine_config &config) { - I80188(config, m_maincpu, 25000000); + I80188(config, m_maincpu, XTAL::u(25000000)); m_maincpu->set_addrmap(AS_PROGRAM, &tk635_state::mem_map); m_maincpu->set_addrmap(AS_IO, &tk635_state::io_map); diff --git a/src/mame/skeleton/tr175.cpp b/src/mame/skeleton/tr175.cpp index ad5865652c1..ac1f7a3ef51 100644 --- a/src/mame/skeleton/tr175.cpp +++ b/src/mame/skeleton/tr175.cpp @@ -88,7 +88,7 @@ INPUT_PORTS_END void tr175_state::tr175(machine_config &config) { - M68000(config, m_maincpu, 12'000'000); + M68000(config, m_maincpu, XTAL::u(12'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &tr175_state::mem_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -106,7 +106,7 @@ void tr175_state::tr175(machine_config &config) duart.irq_cb().set_inputline("maincpu", M68K_IRQ_1); PALETTE(config, "palette").set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); + ramdac_device &ramdac(RAMDAC(config, "ramdac", "palette")); ramdac.set_addrmap(0, &tr175_state::ramdac_map); } diff --git a/src/mame/skeleton/tsispch.cpp b/src/mame/skeleton/tsispch.cpp index 6974970c400..bfdc4e38b0a 100644 --- a/src/mame/skeleton/tsispch.cpp +++ b/src/mame/skeleton/tsispch.cpp @@ -411,11 +411,11 @@ void tsispch_state::prose2k(machine_config &config) m_dsp->p1().set(FUNC(tsispch_state::dsp_to_8086_p1_w)); /* PIC 8259 */ - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); /* uarts */ - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_uart->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_uart->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -423,13 +423,13 @@ void tsispch_state::prose2k(machine_config &config) m_uart->txrdy_handler().set(m_pic, FUNC(pic8259_device::ir3_w)); m_uart->txempty_handler().set(m_pic, FUNC(pic8259_device::ir2_w)); - clock_device &clock(CLOCK(config, "baudclock", 153600)); // this comes from a resonator? or a divider? not sure. + clock_device &clock(CLOCK(config, "baudclock", XTAL::u(153600))); // this comes from a resonator? or a divider? not sure. clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_12BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up) + DAC_12BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up) rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal")); rs232.rxd_handler().set("i8251a_u15", FUNC(i8251_device::write_rxd)); diff --git a/src/mame/skeleton/tulip1.cpp b/src/mame/skeleton/tulip1.cpp index 45d9db49066..0a4bc074557 100644 --- a/src/mame/skeleton/tulip1.cpp +++ b/src/mame/skeleton/tulip1.cpp @@ -143,37 +143,37 @@ void tulip1_state::machine_start() void tulip1_state::tulip1(machine_config &config) { // main cpu - I8086(config, m_cpu, 8000000); + I8086(config, m_cpu, XTAL::u(8000000)); m_cpu->set_addrmap(AS_PROGRAM, &tulip1_state::mem_map); m_cpu->set_addrmap(AS_IO, &tulip1_state::io_map); // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(16000000, 912, 0, 640, 312, 0, 275); // unknown clock + screen.set_raw(XTAL::u(16000000), 912, 0, 640, 312, 0, 275); // unknown clock screen.set_screen_update(m_crtc, FUNC(mc6845_device::screen_update)); PALETTE(config, m_palette, palette_device::MONOCHROME); GFXDECODE(config, m_gfxdecode, m_palette, chars); - HD6845S(config, m_crtc, 2000000); // unknown clock + HD6845S(config, m_crtc, XTAL::u(2000000)); // unknown clock m_crtc->set_screen("screen"); m_crtc->set_show_border_area(false); m_crtc->set_char_width(8); m_crtc->set_update_row_callback(FUNC(tulip1_state::crtc_update_row)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set("kbd", FUNC(rs232_port_device::write_txd)); rs232_port_device &rs232(RS232_PORT(config, "kbd", default_rs232_devices, "keyboard")); rs232.rxd_handler().set(m_acia, FUNC(acia6850_device::write_rxd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); uart_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); // floppy disk controller - WD2793(config, m_fdc, 1000000); // unknown clock + WD2793(config, m_fdc, XTAL::u(1000000)); // unknown clock // floppy drives FLOPPY_CONNECTOR(config, "fdc:0", tulip1_floppies, "525qd", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/skeleton/v6809.cpp b/src/mame/skeleton/v6809.cpp index 599ab551399..5d96c425830 100644 --- a/src/mame/skeleton/v6809.cpp +++ b/src/mame/skeleton/v6809.cpp @@ -320,38 +320,38 @@ void v6809_state::v6809(machine_config &config) m_crtc->set_update_row_callback(FUNC(v6809_state::crtc_update_row)); m_crtc->set_on_update_addr_change_callback(FUNC(v6809_state::crtc_update_addr)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(v6809_state::kbd_put)); // port A = drive select and 2 control lines ; port B = keyboard - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpb_handler().set(FUNC(v6809_state::pb_r)); m_pia0->writepa_handler().set(FUNC(v6809_state::pa_w)); m_pia0->irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); m_pia0->irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); // no idea what this does - pia6821_device &pia1(PIA6821(config, "pia1", 0)); + pia6821_device &pia1(PIA6821(config, "pia1")); pia1.irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE); pia1.irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE); ptm6840_device &ptm(PTM6840(config, "ptm", 16_MHz_XTAL / 4)); - ptm.set_external_clocks(4000000.0/14.0, 4000000.0/14.0, (4000000.0/14.0)/8.0); + ptm.set_external_clocks(XTAL::u(4000000)/14, XTAL::u(4000000)/14, XTAL::u(4000000)/14/8); ptm.o1_callback().set(FUNC(v6809_state::speaker_en_w)); ptm.o2_callback().set(FUNC(v6809_state::speaker_w)); ptm.irq_callback().set_inputline("maincpu", M6809_IRQ_LINE); - ACIA6850(config, "acia0", 0); + ACIA6850(config, "acia0"); - ACIA6850(config, "acia1", 0); + ACIA6850(config, "acia1"); - clock_device &acia_clock(CLOCK(config, "acia_clock", 153600)); + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(153600))); acia_clock.signal_handler().set("acia0", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia0", FUNC(acia6850_device::write_rxc)); acia_clock.signal_handler().append("acia1", FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append("acia1", FUNC(acia6850_device::write_rxc)); - MM58174(config, "rtc", 0); + MM58174(config, "rtc"); //rtc.irq_handler().set(m_pia0, FUNC(pia6821_device::cb2_w)); // unsupported by RTC emulation MB8876(config, m_fdc, 16_MHz_XTAL / 16); diff --git a/src/mame/skeleton/vanguardmk1.cpp b/src/mame/skeleton/vanguardmk1.cpp index b55429283b0..92421ce28cb 100644 --- a/src/mame/skeleton/vanguardmk1.cpp +++ b/src/mame/skeleton/vanguardmk1.cpp @@ -31,7 +31,7 @@ INPUT_PORTS_END void vanguardmk1_state::vanguardmk1(machine_config &config) { - mc68hc811e2_device &mcu(MC68HC811E2(config, "mcu", 8000000)); // unknown clock + mc68hc811e2_device &mcu(MC68HC811E2(config, "mcu", XTAL::u(8000000))); // unknown clock mcu.set_addrmap(AS_PROGRAM, &vanguardmk1_state::mcu_map); mcu.set_default_config(0xff); } diff --git a/src/mame/skeleton/vd56sp.cpp b/src/mame/skeleton/vd56sp.cpp index 7e8962e5a27..9721a16786e 100644 --- a/src/mame/skeleton/vd56sp.cpp +++ b/src/mame/skeleton/vd56sp.cpp @@ -41,7 +41,7 @@ INPUT_PORTS_END void vd56sp_state::vd56sp(machine_config &config) { - L2800(config, m_maincpu, 8'000'000); // L28L2800-38 (XTAL not readable) + L2800(config, m_maincpu, XTAL::u(8'000'000)); // L28L2800-38 (XTAL not readable) m_maincpu->set_addrmap(AS_DATA, &vd56sp_state::exp_map); // Modem IC: Conexant R6764-61 diff --git a/src/mame/skeleton/vector4.cpp b/src/mame/skeleton/vector4.cpp index b26d4f13679..4e43bf840ac 100644 --- a/src/mame/skeleton/vector4.cpp +++ b/src/mame/skeleton/vector4.cpp @@ -137,12 +137,12 @@ void vector4_state::machine_reset() void vector4_state::vector4(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5'100'000); // manual says 5.1MHz (8088 uses this frequency too) + Z80(config, m_maincpu, XTAL::u(5'100'000)); // manual says 5.1MHz (8088 uses this frequency too) m_maincpu->set_addrmap(AS_PROGRAM, &vector4_state::vector4_mem); m_maincpu->set_addrmap(AS_IO, &vector4_state::vector4_io); /* video hardware */ - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set("uart1", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart0", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart0", FUNC(i8251_device::write_rxc)); @@ -152,9 +152,9 @@ void vector4_state::vector4(machine_config &config) uart_clock.signal_handler().append("uart3", FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append("uart3", FUNC(i8251_device::write_rxc)); - I8251(config, "uart0", 0); + I8251(config, "uart0"); - i8251_device &uart1(I8251(config, "uart1", 0)); + i8251_device &uart1(I8251(config, "uart1")); uart1.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd)); uart1.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr)); uart1.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts)); @@ -164,7 +164,7 @@ void vector4_state::vector4(machine_config &config) rs232a.dsr_handler().set("uart1", FUNC(i8251_device::write_dsr)); rs232a.cts_handler().set("uart1", FUNC(i8251_device::write_cts)); - i8251_device &uart2(I8251(config, "uart2", 0)); + i8251_device &uart2(I8251(config, "uart2")); uart2.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd)); uart2.dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr)); uart2.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts)); @@ -174,7 +174,7 @@ void vector4_state::vector4(machine_config &config) rs232b.dsr_handler().set("uart2", FUNC(i8251_device::write_dsr)); rs232b.cts_handler().set("uart2", FUNC(i8251_device::write_cts)); - i8251_device &uart3(I8251(config, "uart3", 0)); + i8251_device &uart3(I8251(config, "uart3")); uart3.txd_handler().set("rs232c", FUNC(rs232_port_device::write_txd)); uart3.dtr_handler().set("rs232c", FUNC(rs232_port_device::write_dtr)); uart3.rts_handler().set("rs232c", FUNC(rs232_port_device::write_rts)); @@ -185,7 +185,7 @@ void vector4_state::vector4(machine_config &config) rs232c.cts_handler().set("uart3", FUNC(i8251_device::write_cts)); I8255A(config, "ppi"); - PIT8253(config, "pit", 0); + PIT8253(config, "pit"); } /* ROM definition */ diff --git a/src/mame/skeleton/vectrix.cpp b/src/mame/skeleton/vectrix.cpp index d114ba42119..2f1ac148027 100644 --- a/src/mame/skeleton/vectrix.cpp +++ b/src/mame/skeleton/vectrix.cpp @@ -56,7 +56,7 @@ void vectrix_state::vectrix(machine_config &config) maincpu.set_addrmap(AS_PROGRAM, &vectrix_state::mem_map); maincpu.set_addrmap(AS_IO, &vectrix_state::io_map); - I8251(config, "uart1", 0); + I8251(config, "uart1"); } ROM_START( vectrix ) diff --git a/src/mame/skeleton/vp415.cpp b/src/mame/skeleton/vp415.cpp index 78454b17225..c99567844ec 100644 --- a/src/mame/skeleton/vp415.cpp +++ b/src/mame/skeleton/vp415.cpp @@ -520,7 +520,7 @@ void vp415_state::vp415(machine_config &config) m_drivecpu->set_addrmap(AS_PROGRAM, &vp415_state::drive_program_map); m_drivecpu->set_addrmap(AS_IO, &vp415_state::drive_io_map); - i8155_device &i8155(I8155(config, I8155_TAG, 0)); + i8155_device &i8155(I8155(config, I8155_TAG)); i8155.out_pa_callback().set(CHARGEN_TAG, FUNC(mb88303_device::da_w)); i8155.in_pb_callback().set(FUNC(vp415_state::drive_i8155_pb_r)); i8155.in_pc_callback().set(FUNC(vp415_state::drive_i8155_pc_r)); @@ -530,7 +530,7 @@ void vp415_state::vp415(machine_config &config) ppi.out_pb_callback().set(FUNC(vp415_state::drive_i8255_pb_w)); ppi.in_pc_callback().set(FUNC(vp415_state::drive_i8255_pc_r)); - MB88303(config, m_chargen, 0); + MB88303(config, m_chargen); saa1043_device &saa1043(SAA1043(config, SYNCGEN_TAG, XTAL(5'000'000))); saa1043.v2_callback().set(FUNC(vp415_state::refv_w)); diff --git a/src/mame/skeleton/vsmilepro.cpp b/src/mame/skeleton/vsmilepro.cpp index bf3d844dde7..2672f24f3ac 100644 --- a/src/mame/skeleton/vsmilepro.cpp +++ b/src/mame/skeleton/vsmilepro.cpp @@ -55,7 +55,7 @@ INPUT_PORTS_END void vsmilpro_state::vsmilpro(machine_config &config) { /* basic machine hardware */ - ARM9(config, m_maincpu, 150000000); + ARM9(config, m_maincpu, XTAL::u(150000000)); m_maincpu->set_addrmap(AS_PROGRAM, &vsmilpro_state::vsmilpro_map); CDROM(config, "cdrom").set_interface("vsmile_vdisk"); diff --git a/src/mame/skeleton/wicat.cpp b/src/mame/skeleton/wicat.cpp index db3110aac62..b675b54ba6c 100644 --- a/src/mame/skeleton/wicat.cpp +++ b/src/mame/skeleton/wicat.cpp @@ -637,7 +637,7 @@ void wicat_state::wicat(machine_config &config) m_via->writepb_handler().set(FUNC(wicat_state::via_b_w)); m_via->irq_handler().set_inputline(m_maincpu, M68K_IRQ_1); - MM58174(config, m_rtc, 0); + MM58174(config, m_rtc); // internal terminal SCN2661C(config, m_uart[0], 5.0688_MHz_XTAL); // connected to terminal board @@ -705,7 +705,7 @@ void wicat_state::wicat(machine_config &config) INPUT_MERGER_ALL_HIGH(config, "dmairq").output_handler().set_inputline(m_videocpu, z8002_device::NMI_LINE); - IM6402(config, m_videouart, 0); + IM6402(config, m_videouart); m_videouart->set_rrc(0); m_videouart->set_trc(1200); m_videouart->dr_callback().set(m_videoirq, FUNC(input_merger_device::in_w<2>)); diff --git a/src/mame/skeleton/zeebo_qualcomm_adreno130.cpp b/src/mame/skeleton/zeebo_qualcomm_adreno130.cpp index c26ef04de57..fd871584ecc 100644 --- a/src/mame/skeleton/zeebo_qualcomm_adreno130.cpp +++ b/src/mame/skeleton/zeebo_qualcomm_adreno130.cpp @@ -120,7 +120,7 @@ uint32_t zeebo_game_state::screen_update(screen_device &screen, bitmap_rgb32 &bi void zeebo_game_state::zeebo(machine_config &config) { - ARM11(config, m_maincpu, 528000000); // 528 MHz ARM11 based SoC + ARM11(config, m_maincpu, XTAL::u(528000000)); // 528 MHz ARM11 based SoC m_maincpu->set_addrmap(AS_PROGRAM, &zeebo_game_state::zeebo_arm11_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/skeleton/zms8085.cpp b/src/mame/skeleton/zms8085.cpp index 17e80822d7d..b522f48d5c0 100644 --- a/src/mame/skeleton/zms8085.cpp +++ b/src/mame/skeleton/zms8085.cpp @@ -343,7 +343,7 @@ void zms8085_state::zephyr(machine_config &config) m_uart->write_dav_callback().set_inputline("maincpu", I8085_RST65_LINE); m_uart->set_auto_rdav(true); - CLOCK(config, m_uart_clock, 153600); // should actually be configurable somehow + CLOCK(config, m_uart_clock, XTAL::u(153600)); // should actually be configurable somehow m_uart_clock->signal_handler().set(m_uart, FUNC(ay51013_device::write_tcp)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay51013_device::write_rcp)); diff --git a/src/mame/skeleton/zorba.cpp b/src/mame/skeleton/zorba.cpp index e0d40e09204..4a410c8bb2d 100644 --- a/src/mame/skeleton/zorba.cpp +++ b/src/mame/skeleton/zorba.cpp @@ -148,7 +148,7 @@ void zorba_state::zorba(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 800).add_route(ALL_OUTPUTS, "mono", 1.00); // should be horizontal frequency / 16, so depends on CRTC parameters + BEEP(config, m_beep, XTAL::u(800)).add_route(ALL_OUTPUTS, "mono", 1.00); // should be horizontal frequency / 16, so depends on CRTC parameters INPUT_MERGER_ANY_HIGH(config, "irq0").output_handler().set(FUNC(zorba_state::irq_w<0>)); INPUT_MERGER_ANY_HIGH(config, "irq1").output_handler().set(FUNC(zorba_state::irq_w<1>)); @@ -185,13 +185,13 @@ void zorba_state::zorba(machine_config &config) // port A - disk select etc, beeper // port B - parallel interface - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->writepa_handler().set(FUNC(zorba_state::pia0_porta_w)); m_pia0->writepb_handler().set("parprndata", FUNC(output_latch_device::write)); m_pia0->cb2_handler().set("parprn", FUNC(centronics_device::write_strobe)); // IEEE488 interface - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set(m_ieee, FUNC(ieee488_device::dio_r)); // TODO: gated with PB1 m_pia1->writepa_handler().set(m_ieee, FUNC(ieee488_device::host_dio_w)); // TODO: gated with PB1 m_pia1->readpb_handler().set(FUNC(zorba_state::pia1_portb_r)); @@ -202,7 +202,7 @@ void zorba_state::zorba(machine_config &config) m_pia1->irqb_handler().set("irq1", FUNC(input_merger_device::in_w<1>)); // PIT - pit8254_device &pit(PIT8254(config, "pit", 0)); + pit8254_device &pit(PIT8254(config, "pit")); pit.set_clk<0>(24_MHz_XTAL / 3); pit.set_clk<1>(24_MHz_XTAL / 3); pit.set_clk<2>(24_MHz_XTAL / 3); diff --git a/src/mame/skeleton/zorbakbd.h b/src/mame/skeleton/zorbakbd.h index 4a88735ae41..11b321c995a 100644 --- a/src/mame/skeleton/zorbakbd.h +++ b/src/mame/skeleton/zorbakbd.h @@ -15,7 +15,7 @@ class zorba_keyboard_device : public device_t public: auto rxd_cb() { return m_rxd_cb.bind(); } - zorba_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 0); + zorba_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER(txd_w); diff --git a/src/mame/skeleton/zt8802.cpp b/src/mame/skeleton/zt8802.cpp index 027e2132156..f0a32907d15 100644 --- a/src/mame/skeleton/zt8802.cpp +++ b/src/mame/skeleton/zt8802.cpp @@ -85,11 +85,11 @@ INPUT_PORTS_END void zt8802_state::zt8802(machine_config &config) { - V40(config, m_maincpu, 16'000'000); + V40(config, m_maincpu, XTAL::u(16'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &zt8802_state::mem_map); m_maincpu->set_addrmap(AS_IO, &zt8802_state::io_map); - DS1202(config, m_rtc, 32'768); + DS1202(config, m_rtc, XTAL::u(32'768)); } ROM_START( zt8802 ) diff --git a/src/mame/slicer/slicer.cpp b/src/mame/slicer/slicer.cpp index 0287e681b62..f98a2978942 100644 --- a/src/mame/slicer/slicer.cpp +++ b/src/mame/slicer/slicer.cpp @@ -70,7 +70,7 @@ WRITE_LINE_MEMBER(slicer_state::drive_sel_w) WRITE_LINE_MEMBER(slicer_state::drive_size_w) { - m_fdc->set_unscaled_clock (state ? 1'000'000 : 2'000'000); + m_fdc->set_unscaled_clock (state ? XTAL::u(1'000'000) : 2'000'000); } void slicer_state::slicer_map(address_map &map) @@ -133,7 +133,7 @@ void slicer_state::slicer(machine_config &config) drivelatch.q_out_cb<6>().set(FUNC(slicer_state::drive_size_w)); drivelatch.q_out_cb<7>().set("fdc", FUNC(fd1797_device::dden_w)); - SCSI_PORT(config, m_sasi, 0); + SCSI_PORT(config, m_sasi); m_sasi->set_data_input_buffer("sasi_data_in"); m_sasi->bsy_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit3)); m_sasi->msg_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit4)); diff --git a/src/mame/snk/bbusters.cpp b/src/mame/snk/bbusters.cpp index a33746c3353..e9545afa027 100644 --- a/src/mame/snk/bbusters.cpp +++ b/src/mame/snk/bbusters.cpp @@ -474,11 +474,11 @@ GFXDECODE_END void bbusters_state::bbusters(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &bbusters_state::bbusters_map); m_maincpu->set_vblank_int("screen", FUNC(bbusters_state::irq6_line_hold)); - Z80(config, m_audiocpu, 4000000); // Accurate + Z80(config, m_audiocpu, XTAL::u(4000000)); // Accurate m_audiocpu->set_addrmap(AS_PROGRAM, &bbusters_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &bbusters_state::sound_portmap); @@ -506,12 +506,12 @@ void bbusters_state::bbusters(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_bbusters); PALETTE(config, "palette").set_format(palette_device::RGBx_444, 2048); - SNK_BBUSTERS_SPR(config, m_sprites[0], 0); + SNK_BBUSTERS_SPR(config, m_sprites[0]); m_sprites[0]->set_scaletable_tag("sprites1:scale_table"); m_sprites[0]->set_palette("palette"); m_sprites[0]->set_spriteram_tag("spriteram1"); - SNK_BBUSTERS_SPR(config, m_sprites[1], 0); + SNK_BBUSTERS_SPR(config, m_sprites[1]); m_sprites[1]->set_scaletable_tag("sprites2:scale_table"); m_sprites[1]->set_palette("palette"); m_sprites[1]->set_spriteram_tag("spriteram2"); @@ -526,7 +526,7 @@ void bbusters_state::bbusters(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch[0]); GENERIC_LATCH_8(config, m_soundlatch[1]); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline("audiocpu", 0); ymsnd.add_route(0, "lspeaker", 1.0); ymsnd.add_route(0, "rspeaker", 1.0); diff --git a/src/mame/snk/dmndrby.cpp b/src/mame/snk/dmndrby.cpp index 364f77caf2d..0b5a7c00ebf 100644 --- a/src/mame/snk/dmndrby.cpp +++ b/src/mame/snk/dmndrby.cpp @@ -539,12 +539,12 @@ INTERRUPT_GEN_MEMBER(dmndrby_state::dderby_timer_irq) void dmndrby_state::dderby(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* ? MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* ? MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &dmndrby_state::memmap); m_maincpu->set_vblank_int("screen", FUNC(dmndrby_state::dderby_irq)); m_maincpu->set_periodic_int(FUNC(dmndrby_state::dderby_timer_irq), attotime::from_hz(244/2)); - Z80(config, m_audiocpu, 4000000); /* verified on schematics */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* verified on schematics */ m_audiocpu->set_addrmap(AS_PROGRAM, &dmndrby_state::dderby_sound_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -566,7 +566,7 @@ void dmndrby_state::dderby(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "ay1", 1789750).add_route(ALL_OUTPUTS, "mono", 0.35); // frequency guessed + AY8910(config, "ay1", XTAL::u(1789750)).add_route(ALL_OUTPUTS, "mono", 0.35); // frequency guessed } diff --git a/src/mame/snk/hng64.cpp b/src/mame/snk/hng64.cpp index 9681495607e..f700cd78c5b 100644 --- a/src/mame/snk/hng64.cpp +++ b/src/mame/snk/hng64.cpp @@ -2183,7 +2183,7 @@ uint8_t hng64_state::ioport3_r() DEFINE_DEVICE_TYPE(HNG64_LAMPS, hng64_lamps_device, "hng64_lamps", "HNG64 Lamps") -hng64_lamps_device::hng64_lamps_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hng64_lamps_device::hng64_lamps_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HNG64_LAMPS, tag, owner, clock) , m_lamps_out_cb(*this) { @@ -2420,7 +2420,7 @@ void hng64_state::hng64(machine_config &config) m_maincpu->set_dcache_size(16384); m_maincpu->set_addrmap(AS_PROGRAM, &hng64_state::hng_map); - TIMER(config, "scantimer", 0).configure_scanline(FUNC(hng64_state::hng64_irq), "screen", 0, 1); + TIMER(config, "scantimer").configure_scanline(FUNC(hng64_state::hng64_irq), "screen", 0, 1); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -2468,7 +2468,7 @@ void hng64_state::hng64(machine_config &config) iomcu.serial0_out_cb().set(FUNC(hng64_state::sio0_w)); //iomcu.serial1_out_cb().set(FUNC(hng64_state::sio1_w)); // not initialized / used - IDT71321(config, "dt71321_dpram", 0); + IDT71321(config, "dt71321_dpram"); //MCFG_MB8421_INTL_AN0R(INPUTLINE("xxx", 0)) // I don't think the IRQs are connected } @@ -2476,7 +2476,7 @@ void hng64_state::hng64_default(machine_config &config) { hng64(config); - hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps, 0)); + hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps)); lamps.lamps_out_cb<0>().set(FUNC(hng64_state::hng64_default_lamps_w<0>)); lamps.lamps_out_cb<1>().set(FUNC(hng64_state::hng64_default_lamps_w<1>)); lamps.lamps_out_cb<2>().set(FUNC(hng64_state::hng64_default_lamps_w<2>)); @@ -2491,7 +2491,7 @@ void hng64_state::hng64_drive(machine_config &config) { hng64(config); - hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps, 0)); + hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps)); lamps.lamps_out_cb<5>().set(FUNC(hng64_state::hng64_drive_lamps5_w)); // force feedback steering lamps.lamps_out_cb<6>().set(FUNC(hng64_state::hng64_drive_lamps6_w)); // lamps + coin counter lamps.lamps_out_cb<7>().set(FUNC(hng64_state::hng64_drive_lamps7_w)); // lamps @@ -2501,7 +2501,7 @@ void hng64_state::hng64_shoot(machine_config &config) { hng64(config); - hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps, 0)); + hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps)); lamps.lamps_out_cb<6>().set(FUNC(hng64_state::hng64_shoot_lamps6_w)); // start lamps (some missing?!) lamps.lamps_out_cb<7>().set(FUNC(hng64_state::hng64_shoot_lamps7_w)); // gun lamps } @@ -2510,7 +2510,7 @@ void hng64_state::hng64_fight(machine_config &config) { hng64(config); - hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps, 0)); + hng64_lamps_device &lamps(HNG64_LAMPS(config, m_lamps)); lamps.lamps_out_cb<6>().set(FUNC(hng64_state::hng64_fight_lamps6_w)); // coin counters } diff --git a/src/mame/snk/hng64.h b/src/mame/snk/hng64.h index 1a4be231e91..5ab27a34658 100644 --- a/src/mame/snk/hng64.h +++ b/src/mame/snk/hng64.h @@ -120,7 +120,7 @@ private: class hng64_lamps_device : public device_t { public: - hng64_lamps_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hng64_lamps_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template auto lamps_out_cb() { return m_lamps_out_cb[N].bind(); } diff --git a/src/mame/snk/k1ge.cpp b/src/mame/snk/k1ge.cpp index d7f2b416568..02dad0201d6 100644 --- a/src/mame/snk/k1ge.cpp +++ b/src/mame/snk/k1ge.cpp @@ -858,12 +858,12 @@ void k1ge_device::device_reset() DEFINE_DEVICE_TYPE(K1GE, k1ge_device, "k1ge", "K1GE Monochrome Graphics + LCD") -k1ge_device::k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k1ge_device::k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : k1ge_device(mconfig, K1GE, tag, owner, clock) { } -k1ge_device::k1ge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +k1ge_device::k1ge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_video_interface(mconfig, *this) , m_vblank_pin_w(*this) @@ -884,7 +884,7 @@ void k1ge_device::device_add_mconfig(machine_config &config) DEFINE_DEVICE_TYPE(K2GE, k2ge_device, "k2ge", "K2GE Color Graphics + LCD") -k2ge_device::k2ge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k2ge_device::k2ge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : k1ge_device(mconfig, K2GE, tag, owner, clock) { } diff --git a/src/mame/snk/k1ge.h b/src/mame/snk/k1ge.h index 0648b1cc43c..03b09ba9eea 100644 --- a/src/mame/snk/k1ge.h +++ b/src/mame/snk/k1ge.h @@ -17,13 +17,13 @@ class k1ge_device : public device_t, public device_video_interface { public: template - k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : k1ge_device(mconfig, tag, owner, clock) { set_screen(std::forward(screen_tag)); } - k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k1ge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); @@ -37,7 +37,7 @@ public: static const int K1GE_SCREEN_HEIGHT = 199; protected: - k1ge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + k1ge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -69,13 +69,13 @@ class k2ge_device : public k1ge_device { public: template - k2ge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + k2ge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : k2ge_device(mconfig, tag, owner, clock) { set_screen(std::forward(screen_tag)); } - k2ge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k2ge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/mame/snk/lasso.cpp b/src/mame/snk/lasso.cpp index 3317eb5b60d..bbe2746700e 100644 --- a/src/mame/snk/lasso.cpp +++ b/src/mame/snk/lasso.cpp @@ -497,7 +497,7 @@ void lasso_state::base(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::lasso_main_map); m_maincpu->set_vblank_int("screen", FUNC(lasso_state::irq0_line_hold)); - M6502(config, m_audiocpu, 600000); + M6502(config, m_audiocpu, XTAL::u(600000)); m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::lasso_audio_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -518,8 +518,8 @@ void lasso_state::base(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - SN76489(config, m_sn_1, 2000000).add_route(ALL_OUTPUTS, "speaker", 1.0); - SN76489(config, m_sn_2, 2000000).add_route(ALL_OUTPUTS, "speaker", 1.0); + SN76489(config, m_sn_1, XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 1.0); + SN76489(config, m_sn_2, XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 1.0); } void lasso_state::lasso(machine_config &config) @@ -569,7 +569,7 @@ void lasso_state::wwjgtin(machine_config &config) MCFG_VIDEO_START_OVERRIDE(lasso_state,wwjgtin) /* sound hardware */ - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void lasso_state::pinbo(machine_config &config) diff --git a/src/mame/snk/mainsnk.cpp b/src/mame/snk/mainsnk.cpp index 77df37194e2..e5ac86ad494 100644 --- a/src/mame/snk/mainsnk.cpp +++ b/src/mame/snk/mainsnk.cpp @@ -593,11 +593,11 @@ GFXDECODE_END void mainsnk_state::mainsnk(machine_config &config) { - Z80(config, m_maincpu, 3360000); + Z80(config, m_maincpu, XTAL::u(3360000)); m_maincpu->set_addrmap(AS_PROGRAM, &mainsnk_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(mainsnk_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &mainsnk_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &mainsnk_state::sound_portmap); m_audiocpu->set_periodic_int(FUNC(mainsnk_state::irq0_line_assert), attotime::from_hz(244)); @@ -620,8 +620,8 @@ void mainsnk_state::mainsnk(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - AY8910(config, "ay1", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35); - AY8910(config, "ay2", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35); + AY8910(config, "ay1", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.35); + AY8910(config, "ay2", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.35); } diff --git a/src/mame/snk/mechatt.cpp b/src/mame/snk/mechatt.cpp index cb02c6423a4..ff684fbf2e2 100644 --- a/src/mame/snk/mechatt.cpp +++ b/src/mame/snk/mechatt.cpp @@ -487,11 +487,11 @@ GFXDECODE_END void mechatt_state::mechatt(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mechatt_state::mechatt_map); m_maincpu->set_vblank_int("screen", FUNC(mechatt_state::irq4_line_hold)); - Z80(config, m_audiocpu, 4000000); /* Accurate */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* Accurate */ m_audiocpu->set_addrmap(AS_PROGRAM, &mechatt_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &mechatt_state::sounda_portmap); @@ -509,7 +509,7 @@ void mechatt_state::mechatt(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram); - SNK_BBUSTERS_SPR(config, m_sprites, 0); + SNK_BBUSTERS_SPR(config, m_sprites); m_sprites->set_scaletable_tag("sprites1:scale_table"); m_sprites->set_palette("palette"); m_sprites->set_spriteram_tag("spriteram1"); @@ -521,7 +521,7 @@ void mechatt_state::mechatt(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch[0]); GENERIC_LATCH_8(config, m_soundlatch[1]); - ym2608_device &ymsnd(YM2608(config, "ymsnd", 8000000)); + ym2608_device &ymsnd(YM2608(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline("audiocpu", 0); ymsnd.add_route(0, "lspeaker", 0.15); ymsnd.add_route(0, "rspeaker", 0.15); diff --git a/src/mame/snk/miconkit.cpp b/src/mame/snk/miconkit.cpp index 4ed0ea5e99b..e244f8a1cce 100644 --- a/src/mame/snk/miconkit.cpp +++ b/src/mame/snk/miconkit.cpp @@ -245,7 +245,7 @@ void miconkit_state::micon2(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + BEEP(config, m_beeper).add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/snk/munchmo.cpp b/src/mame/snk/munchmo.cpp index 1be5bf0532f..8c577fc344e 100644 --- a/src/mame/snk/munchmo.cpp +++ b/src/mame/snk/munchmo.cpp @@ -556,7 +556,7 @@ void munchmo_state::mnchmobl(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &munchmo_state::sound_map); m_audiocpu->set_irq_acknowledge_callback(FUNC(munchmo_state::generic_irq_ack)); // IORQ clears flip-flop at 1-7H - LS259(config, m_mainlatch, 0); // 12E + LS259(config, m_mainlatch); // 12E m_mainlatch->q_out_cb<0>().set(FUNC(munchmo_state::palette_bank_0_w)); // BCL0 2-11E m_mainlatch->q_out_cb<1>().set(FUNC(munchmo_state::palette_bank_1_w)); // BCL1 2-11E m_mainlatch->q_out_cb<2>().set_nop(); // CL2 2-11E diff --git a/src/mame/snk/ngp.cpp b/src/mame/snk/ngp.cpp index fb1337406f1..ac082486275 100644 --- a/src/mame/snk/ngp.cpp +++ b/src/mame/snk/ngp.cpp @@ -852,8 +852,8 @@ void ngp_state::ngp_common(machine_config &config) m_t6w28->add_route(0, "lspeaker", 0.50); m_t6w28->add_route(1, "rspeaker", 0.50); - DAC_8BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC - DAC_8BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC } diff --git a/src/mame/snk/snk.cpp b/src/mame/snk/snk.cpp index cf46480d8ee..0c1d5cdcd8f 100644 --- a/src/mame/snk/snk.cpp +++ b/src/mame/snk/snk.cpp @@ -4033,15 +4033,15 @@ GFXDECODE_END void snk_state::marvins(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3360000); /* 3.36 MHz */ + Z80(config, m_maincpu, XTAL::u(3360000)); /* 3.36 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &snk_state::marvins_cpuA_map); m_maincpu->set_vblank_int("screen", FUNC(snk_state::irq0_line_hold)); - Z80(config, m_subcpu, 3360000); /* 3.36 MHz */ + Z80(config, m_subcpu, XTAL::u(3360000)); /* 3.36 MHz */ m_subcpu->set_addrmap(AS_PROGRAM, &snk_state::marvins_cpuB_map); m_subcpu->set_vblank_int("screen", FUNC(snk_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4000000); /* verified on schematics */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* verified on schematics */ m_audiocpu->set_addrmap(AS_PROGRAM, &snk_state::marvins_sound_map); m_audiocpu->set_addrmap(AS_IO, &snk_state::marvins_sound_portmap); m_audiocpu->set_periodic_int(FUNC(snk_state::nmi_line_assert), attotime::from_hz(244)); // schematics show a separate 244Hz timer @@ -4069,9 +4069,9 @@ void snk_state::marvins(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0, HOLD_LINE); - AY8910(config, "ay1", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35); /* verified on schematics */ - AY8910(config, "ay2", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35);/* verified on schematics */ - SNKWAVE(config, "wave", 8000000).add_route(ALL_OUTPUTS, "mono", 0.30); /* verified on schematics */ + AY8910(config, "ay1", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.35); /* verified on schematics */ + AY8910(config, "ay2", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.35);/* verified on schematics */ + SNKWAVE(config, "wave", XTAL::u(8000000)).add_route(ALL_OUTPUTS, "mono", 0.30); /* verified on schematics */ } void snk_state::vangrd2(machine_config &config) @@ -4095,15 +4095,15 @@ void snk_state::madcrush(machine_config &config) void snk_state::jcross(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3350000); /* NOT verified */ + Z80(config, m_maincpu, XTAL::u(3350000)); /* NOT verified */ m_maincpu->set_addrmap(AS_PROGRAM, &snk_state::jcross_cpuA_map); m_maincpu->set_vblank_int("screen", FUNC(snk_state::irq0_line_hold)); - Z80(config, m_subcpu, 3350000); /* NOT verified */ + Z80(config, m_subcpu, XTAL::u(3350000)); /* NOT verified */ m_subcpu->set_addrmap(AS_PROGRAM, &snk_state::jcross_cpuB_map); m_subcpu->set_vblank_int("screen", FUNC(snk_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4000000); /* NOT verified */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* NOT verified */ m_audiocpu->set_addrmap(AS_PROGRAM, &snk_state::jcross_sound_map); m_audiocpu->set_addrmap(AS_IO, &snk_state::jcross_sound_portmap); m_audiocpu->set_periodic_int(FUNC(snk_state::irq0_line_assert), attotime::from_hz(244)); // Marvin's frequency, sounds ok @@ -4130,8 +4130,8 @@ void snk_state::jcross(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "ay1", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35); /* NOT verified */ - AY8910(config, "ay2", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35); /* NOT verified */ + AY8910(config, "ay1", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.35); /* NOT verified */ + AY8910(config, "ay2", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 0.35); /* NOT verified */ } void snk_state::sgladiat(machine_config &config) @@ -4401,15 +4401,15 @@ void snk_state::choppera(machine_config &config) void snk_state::tdfever(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &snk_state::tdfever_cpuA_map); m_maincpu->set_vblank_int("screen", FUNC(snk_state::irq0_line_hold)); - Z80(config, m_subcpu, 4000000); + Z80(config, m_subcpu, XTAL::u(4000000)); m_subcpu->set_addrmap(AS_PROGRAM, &snk_state::tdfever_cpuB_map); m_subcpu->set_vblank_int("screen", FUNC(snk_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4000000); + Z80(config, m_audiocpu, XTAL::u(4000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &snk_state::YM3526_Y8950_sound_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -4432,11 +4432,11 @@ void snk_state::tdfever(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym3526_device &ym1(YM3526(config, "ym1", 4000000)); + ym3526_device &ym1(YM3526(config, "ym1", XTAL::u(4000000))); ym1.irq_handler().set(FUNC(snk_state::ymirq_callback_1)); ym1.add_route(ALL_OUTPUTS, "mono", 1.0); - y8950_device &ym2(Y8950(config, "ym2", 4000000)); + y8950_device &ym2(Y8950(config, "ym2", XTAL::u(4000000))); ym2.irq_handler().set(FUNC(snk_state::ymirq_callback_2)); ym2.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/snk/snk6502.cpp b/src/mame/snk/snk6502.cpp index 11e31496647..50d26ef4902 100644 --- a/src/mame/snk/snk6502.cpp +++ b/src/mame/snk/snk6502.cpp @@ -853,7 +853,7 @@ void snk6502_state::sasuke(machine_config &config) TIMER(config, "sasuke_timer").configure_periodic(FUNC(snk6502_state::sasuke_update_counter), attotime::from_hz(MASTER_CLOCK / 8)); // sound hardware - SASUKE_SOUND(config, "snk6502", 0); + SASUKE_SOUND(config, "snk6502"); } void snk6502_state::satansat(machine_config &config) @@ -900,7 +900,7 @@ void vanguard_state::vanguard(machine_config &config) crtc.set_char_width(8); // sound hardware - VANGUARD_SOUND(config, "snk6502", 0); + VANGUARD_SOUND(config, "snk6502"); } void fantasy_state::fantasy(machine_config &config) diff --git a/src/mame/snk/snk6502_a.cpp b/src/mame/snk/snk6502_a.cpp index 16aeee28691..a4819503a85 100644 --- a/src/mame/snk/snk6502_a.cpp +++ b/src/mame/snk/snk6502_a.cpp @@ -136,7 +136,7 @@ DEFINE_DEVICE_TYPE(SASUKE_SOUND, sasuke_sound_device, "sasuke_sound", "SNK DEFINE_DEVICE_TYPE(SATANSAT_SOUND, satansat_sound_device, "satansat_sound", "SNK Satan of Saturn Sound") -snk6502_sound_device::snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +snk6502_sound_device::snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNK6502_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_tone_clock_expire(0) @@ -563,7 +563,7 @@ void snk6502_sound_device::sound_stream_update(sound_stream &stream, std::vector } -vanguard_sound_device::vanguard_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vanguard_sound_device::vanguard_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VANGUARD_SOUND, tag, owner, clock) , m_custom(*this, "custom") , m_sn76477_2(*this, "sn76477.2") @@ -689,7 +689,7 @@ void vanguard_sound_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SNK6502_SOUND(config, m_custom, 0); + SNK6502_SOUND(config, m_custom); m_custom->add_route(ALL_OUTPUTS, "mono", 0.50); SAMPLES(config, m_samples); @@ -744,12 +744,12 @@ void vanguard_sound_device::device_reset() } -fantasy_sound_device::fantasy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fantasy_sound_device::fantasy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fantasy_sound_device(mconfig, FANTASY_SOUND, tag, owner, clock) { } -fantasy_sound_device::fantasy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +fantasy_sound_device::fantasy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_custom(*this, "custom") , m_discrete(*this, "discrete") @@ -886,7 +886,7 @@ void fantasy_sound_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SNK6502_SOUND(config, m_custom, 0); + SNK6502_SOUND(config, m_custom); m_custom->add_route(ALL_OUTPUTS, "mono", 0.50); samples_device &samples(SAMPLES(config, "samples")); @@ -929,7 +929,7 @@ void fantasy_sound_device::device_reset() } -nibbler_sound_device::nibbler_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nibbler_sound_device::nibbler_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fantasy_sound_device(mconfig, NIBBLER_SOUND, tag, owner, clock) { } @@ -942,7 +942,7 @@ void nibbler_sound_device::device_add_mconfig(machine_config &config) } -pballoon_sound_device::pballoon_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pballoon_sound_device::pballoon_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fantasy_sound_device(mconfig, PBALLOON_SOUND, tag, owner, clock) { } @@ -961,7 +961,7 @@ void pballoon_sound_device::device_reset() } -sasuke_sound_device::sasuke_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sasuke_sound_device::sasuke_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SASUKE_SOUND, tag, owner, clock) , m_custom(*this, "custom") , m_samples(*this, "samples") @@ -1036,7 +1036,7 @@ void sasuke_sound_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SNK6502_SOUND(config, m_custom, 0); + SNK6502_SOUND(config, m_custom); m_custom->add_route(ALL_OUTPUTS, "mono", 0.50); samples_device &samples(SAMPLES(config, "samples")); @@ -1110,7 +1110,7 @@ void sasuke_sound_device::device_reset() } -satansat_sound_device::satansat_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +satansat_sound_device::satansat_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SATANSAT_SOUND, tag, owner, clock) , m_custom(*this, "custom") , m_samples(*this, "samples") @@ -1177,7 +1177,7 @@ void satansat_sound_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - SNK6502_SOUND(config, m_custom, 0); + SNK6502_SOUND(config, m_custom); m_custom->add_route(ALL_OUTPUTS, "mono", 0.50); samples_device &samples(SAMPLES(config, "samples")); diff --git a/src/mame/snk/snk6502_a.h b/src/mame/snk/snk6502_a.h index 54474aa8207..49d257f1772 100644 --- a/src/mame/snk/snk6502_a.h +++ b/src/mame/snk/snk6502_a.h @@ -17,7 +17,7 @@ class snk6502_sound_device : public device_t, public device_sound_interface { public: - snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_READ_LINE_MEMBER(music0_playing); @@ -79,7 +79,7 @@ private: class vanguard_sound_device : public device_t { public: - vanguard_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vanguard_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(offs_t offset, uint8_t data); void speech_w(uint8_t data); @@ -101,13 +101,13 @@ private: class fantasy_sound_device : public device_t { public: - fantasy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fantasy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(offs_t offset, uint8_t data); void speech_w(uint8_t data); protected: - fantasy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + fantasy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual void device_start() override; @@ -125,7 +125,7 @@ private: class nibbler_sound_device : public fantasy_sound_device { public: - nibbler_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nibbler_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -135,7 +135,7 @@ protected: class pballoon_sound_device : public fantasy_sound_device { public: - pballoon_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pballoon_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -146,7 +146,7 @@ protected: class sasuke_sound_device : public device_t { public: - sasuke_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sasuke_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(offs_t offset, uint8_t data); @@ -166,7 +166,7 @@ private: class satansat_sound_device : public device_t { public: - satansat_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + satansat_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(offs_t offset, uint8_t data); diff --git a/src/mame/snk/snk68.cpp b/src/mame/snk/snk68.cpp index 6913fac1b5a..ee361e17a1b 100644 --- a/src/mame/snk/snk68.cpp +++ b/src/mame/snk/snk68.cpp @@ -604,10 +604,10 @@ void snk68_state::pow(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pow); - ALPHA68K_PALETTE(config, m_palette, 0); + ALPHA68K_PALETTE(config, m_palette); m_palette->set_entries(2048); - SNK68_SPR(config, m_sprites, 0); + SNK68_SPR(config, m_sprites); m_sprites->set_gfxdecode_tag(m_gfxdecode); m_sprites->set_tile_indirect_cb(FUNC(snk68_state::tile_callback_pow)); m_sprites->set_xpos_shift(12); @@ -635,7 +635,7 @@ void snk68_state::powb(machine_config &config) config.device_remove("upd"); - MSM5205(config, "msm", 0).add_route(ALL_OUTPUTS, "mono", 0.50); // TODO: hook this up + MSM5205(config, "msm").add_route(ALL_OUTPUTS, "mono", 0.50); // TODO: hook this up } void snk68_state::streetsm(machine_config &config) diff --git a/src/mame/snk/snk_bbusters_spr.cpp b/src/mame/snk/snk_bbusters_spr.cpp index 1dc4ca27e72..aa1ce8ad10a 100644 --- a/src/mame/snk/snk_bbusters_spr.cpp +++ b/src/mame/snk/snk_bbusters_spr.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(SNK_BBUSTERS_SPR, snk_bbusters_spr_device, "snk_bbusters_spr", "SNK Beast Busters Sprites") -snk_bbusters_spr_device::snk_bbusters_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +snk_bbusters_spr_device::snk_bbusters_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SNK_BBUSTERS_SPR, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo) , m_scale_table(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/snk/snk_bbusters_spr.h b/src/mame/snk/snk_bbusters_spr.h index 6ec82cfa813..2127705441c 100644 --- a/src/mame/snk/snk_bbusters_spr.h +++ b/src/mame/snk/snk_bbusters_spr.h @@ -10,7 +10,7 @@ class snk_bbusters_spr_device : public device_t, public device_gfx_interface { public: - snk_bbusters_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + snk_bbusters_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_spriteram_tag(T &&tag) { m_spriteram.set_tag(std::forward(tag)); } diff --git a/src/mame/sony/cat702.cpp b/src/mame/sony/cat702.cpp index a9b586ab06c..42eaa7f75dc 100644 --- a/src/mame/sony/cat702.cpp +++ b/src/mame/sony/cat702.cpp @@ -89,7 +89,7 @@ DEFINE_DEVICE_TYPE(CAT702, cat702_device, "cat702", "CAT702") -cat702_device::cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cat702_device::cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CAT702, tag, owner, clock), m_region(*this, DEVICE_SELF), m_select(1), diff --git a/src/mame/sony/cat702.h b/src/mame/sony/cat702.h index 997c55bf241..13fba49cd85 100644 --- a/src/mame/sony/cat702.h +++ b/src/mame/sony/cat702.h @@ -13,7 +13,7 @@ DECLARE_DEVICE_TYPE(CAT702, cat702_device) class cat702_device : public device_t { public: - cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cat702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto dataout_handler() { return m_dataout_handler.bind(); } diff --git a/src/mame/sony/dfs500.cpp b/src/mame/sony/dfs500.cpp index a408d6c34eb..cd211742324 100644 --- a/src/mame/sony/dfs500.cpp +++ b/src/mame/sony/dfs500.cpp @@ -937,7 +937,7 @@ void dfs500_state::dfs500(machine_config &config) m_cpanelcpu->set_irq_acknowledge_callback(FUNC(dfs500_state::irq_callback)); // CXQ71054P at IC16 (Programmable Timer / Counter) - PIT8254(config, m_cpanel_pit, 0); + PIT8254(config, m_cpanel_pit); m_cpanel_pit->set_clk<0>(8_MHz_XTAL); m_cpanel_pit->set_clk<1>(8_MHz_XTAL/2); m_cpanel_pit->out_handler<1>().set(m_cpanel_pit, FUNC(pit8254_device::write_clk2)); @@ -962,7 +962,7 @@ void dfs500_state::dfs500(machine_config &config) //Buzzer SPEAKER(config, "mono").front_center(); - BEEP(config, "buzzer", 4000).add_route(ALL_OUTPUTS, "mono", 0.05); // incorrect/arbitrary freq. + BEEP(config, "buzzer", XTAL::u(4000)).add_route(ALL_OUTPUTS, "mono", 0.05); // incorrect/arbitrary freq. // I did not calculate the correct one yet. /******************* Effects Processing Unit ********************/ @@ -976,7 +976,7 @@ void dfs500_state::dfs500(machine_config &config) m_effectcpu->set_addrmap(AS_PROGRAM, &dfs500_state::effectcpu_mem_map); // CXQ71054P at IC51 (Programmable Timer / Counter) - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); m_pit->set_clk<0>(8_MHz_XTAL); m_pit->set_clk<1>(8_MHz_XTAL); m_pit->out_handler<1>().set(m_pit, FUNC(pit8254_device::write_clk2)); @@ -986,7 +986,7 @@ void dfs500_state::dfs500(machine_config &config) m_pit->out_handler<0>().append(m_serial2, FUNC(i8251_device::write_rxc)); // NEC D71059C at IC52 (Programmable Interruption Controller) - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); // CXQ71051P at IC53 (Serial Interface Unit) diff --git a/src/mame/sony/dmac_0266.cpp b/src/mame/sony/dmac_0266.cpp index 22f1402ad0a..7e29ab92fbf 100644 --- a/src/mame/sony/dmac_0266.cpp +++ b/src/mame/sony/dmac_0266.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(DMAC_0266, dmac_0266_device, "dmac_0266", "Sony 0266 DMA Controller") -dmac_0266_device::dmac_0266_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dmac_0266_device::dmac_0266_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMAC_0266, tag, owner, clock) , m_bus(*this, finder_base::DUMMY_TAG, -1, 32) , m_dma_r(*this) diff --git a/src/mame/sony/dmac_0266.h b/src/mame/sony/dmac_0266.h index fec9ddbccef..ccbe885cd8e 100644 --- a/src/mame/sony/dmac_0266.h +++ b/src/mame/sony/dmac_0266.h @@ -9,7 +9,7 @@ class dmac_0266_device : public device_t { public: - dmac_0266_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dmac_0266_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // configuration template void set_bus(T &&tag, int spacenum) { m_bus.set_tag(std::forward(tag), spacenum); } diff --git a/src/mame/sony/dmac_0448.cpp b/src/mame/sony/dmac_0448.cpp index 365df3e9582..32339dffe76 100644 --- a/src/mame/sony/dmac_0448.cpp +++ b/src/mame/sony/dmac_0448.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(DMAC_0448, dmac_0448_device, "dmac_0448", "Sony DMA Controller 0448") -dmac_0448_device::dmac_0448_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dmac_0448_device::dmac_0448_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DMAC_0448, tag, owner, clock) , m_bus(*this, finder_base::DUMMY_TAG, -1, 32) , m_out_int(*this) diff --git a/src/mame/sony/dmac_0448.h b/src/mame/sony/dmac_0448.h index de755b03dbe..b8d64491071 100644 --- a/src/mame/sony/dmac_0448.h +++ b/src/mame/sony/dmac_0448.h @@ -9,7 +9,7 @@ class dmac_0448_device : public device_t { public: - dmac_0448_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dmac_0448_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // configuration template void set_bus(T &&tag, int spacenum) { m_bus.set_tag(std::forward(tag), spacenum); } diff --git a/src/mame/sony/dpsv55.cpp b/src/mame/sony/dpsv55.cpp index 4c5ce15a6d4..2039fe6a57b 100644 --- a/src/mame/sony/dpsv55.cpp +++ b/src/mame/sony/dpsv55.cpp @@ -104,7 +104,7 @@ void dpsv55_state::dpsv55(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 20); m_lcdc->set_pixel_update_cb(FUNC(dpsv55_state::pixel_update)); diff --git a/src/mame/sony/news_38xx.cpp b/src/mame/sony/news_38xx.cpp index a9924195d91..9cdb0f6cb94 100644 --- a/src/mame/sony/news_38xx.cpp +++ b/src/mame/sony/news_38xx.cpp @@ -181,7 +181,7 @@ void news_38xx_state::machine_reset() void news_38xx_state::init_common() { // HACK: hardwire the rate - m_fdc->set_rate(500000); + m_fdc->set_rate(XTAL::u(500000)); } void news_38xx_state::cpu_map(address_map &map) @@ -326,10 +326,10 @@ void news_38xx_state::common(machine_config &config) RTC62421(config, m_rtc, 32.768_kHz_XTAL); - DMAC_0266(config, m_dma[0], 0); + DMAC_0266(config, m_dma[0]); m_dma[0]->set_bus(m_iop, 0); - DMAC_0266(config, m_dma[1], 0); + DMAC_0266(config, m_dma[1]); m_dma[1]->set_bus(m_iop, 0); INPUT_MERGER_ANY_HIGH(config, m_serial_irq); diff --git a/src/mame/sony/news_68k.cpp b/src/mame/sony/news_68k.cpp index a31138b2d15..30f2599cfa7 100644 --- a/src/mame/sony/news_68k.cpp +++ b/src/mame/sony/news_68k.cpp @@ -177,7 +177,7 @@ void news_68k_state::machine_reset() void news_68k_state::init_common() { // HACK: hardwire the rate - m_fdc->set_rate(500000); + m_fdc->set_rate(XTAL::u(500000)); } void news_68k_state::cpu_map(address_map &map) @@ -332,13 +332,13 @@ void news_68k_state::common(machine_config &config) M48T02(config, m_rtc); - DMAC_0266(config, m_dma, 0); + DMAC_0266(config, m_dma); m_dma->set_bus(m_cpu, 0); INPUT_MERGER_ANY_HIGH(config, m_irq5); m_irq5->output_handler().set_inputline(m_cpu, INPUT_LINE_IRQ5); - SCC85C30(config, m_scc, 3993600); + SCC85C30(config, m_scc, XTAL::u(3993600)); m_scc->out_int_callback().set( [this](int state) { diff --git a/src/mame/sony/news_hid.cpp b/src/mame/sony/news_hid.cpp index e2c229820ce..8c6233f4c81 100644 --- a/src/mame/sony/news_hid.cpp +++ b/src/mame/sony/news_hid.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(NEWS_HID_HLE, news_hid_hle_device, "news_hid_hle", "Sony NEWS Keyboard and Mouse (HLE)") -news_hid_hle_device::news_hid_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +news_hid_hle_device::news_hid_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NEWS_HID_HLE, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7") , m_mouse_x_axis(*this, "mouse_x_axis") diff --git a/src/mame/sony/news_hid.h b/src/mame/sony/news_hid.h index f336a7f4f7d..b86b048817c 100644 --- a/src/mame/sony/news_hid.h +++ b/src/mame/sony/news_hid.h @@ -13,7 +13,7 @@ class news_hid_hle_device , public device_matrix_keyboard_interface<8U> { public: - news_hid_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + news_hid_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); enum news_hid_device : unsigned { diff --git a/src/mame/sony/news_r3k.cpp b/src/mame/sony/news_r3k.cpp index 523bfbea5b5..d41d8bcc6eb 100644 --- a/src/mame/sony/news_r3k.cpp +++ b/src/mame/sony/news_r3k.cpp @@ -194,7 +194,7 @@ void news_r3k_state::init_common() m_cpu->space(0).install_ram(0x00000000, m_ram->mask(), m_ram->pointer()); // HACK: hardwire the rate until fdc is better understood - m_fdc->set_rate(500000); + m_fdc->set_rate(XTAL::u(500000)); // HACK: signal floppy density? m_scsi->port_w(0x02); @@ -412,7 +412,7 @@ void news_r3k_state::common(machine_config &config) // TODO: confirm each bank supports 4x1M or 4x4M m_ram->set_extra_options("4M,8M,12M,20M,24M,32M,36M,48M"); - DMAC_0448(config, m_dma, 0); + DMAC_0448(config, m_dma); m_dma->set_bus(m_cpu, 0); m_dma->out_int_cb().set(FUNC(news_r3k_state::irq_w)); m_dma->dma_r_cb<1>().set(m_fdc, FUNC(upd72067_device::dma_r)); @@ -481,7 +481,7 @@ void news_r3k_state::common(machine_config &config) }); SCREEN(config, m_lcd, SCREEN_TYPE_LCD); - m_lcd->set_raw(52416000, 1120, 0, 1120, 780, 0, 780); + m_lcd->set_raw(XTAL::u(52416000), 1120, 0, 1120, 780, 0, 780); m_lcd->set_screen_update(FUNC(news_r3k_state::screen_update)); NEWS_HID_HLE(config, m_hid); diff --git a/src/mame/sony/pockstat.cpp b/src/mame/sony/pockstat.cpp index 1a7f70d7b21..88ff005f836 100644 --- a/src/mame/sony/pockstat.cpp +++ b/src/mame/sony/pockstat.cpp @@ -1003,7 +1003,7 @@ void pockstat_state::pockstat(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); SPEAKER(config, "speaker").front_center(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC /* cartridge */ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "pockstat_cart", "gme"); diff --git a/src/mame/sony/psx.cpp b/src/mame/sony/psx.cpp index 0bf399e84c1..064c5440b41 100644 --- a/src/mame/sony/psx.cpp +++ b/src/mame/sony/psx.cpp @@ -500,7 +500,7 @@ void psx1_state::psx_base(machine_config &config) m_maincpu->cd_write().set(m_psxcd, FUNC(psxcd_device::write)); m_maincpu->subdevice("ram")->set_default_size("2M"); - psxcontrollerports_device &controllers(PSXCONTROLLERPORTS(config, "controllers", 0)); + psxcontrollerports_device &controllers(PSXCONTROLLERPORTS(config, "controllers")); controllers.rxd().set("maincpu:sio0", FUNC(psxsio0_device::write_rxd)); controllers.dsr().set("maincpu:sio0", FUNC(psxsio0_device::write_dsr)); PSX_CONTROLLER_PORT(config, "port1", psx_controllers, "digital_pad"); @@ -545,7 +545,7 @@ void psx1_state::psj(machine_config &config) void psx1_state::psu(machine_config &config) { psj(config); - HD63705(config, "subcpu", 4166667).set_addrmap(AS_PROGRAM, &psx1_state::subcpu_map); // MC68HC05G6 + HD63705(config, "subcpu", XTAL::u(4166667)).set_addrmap(AS_PROGRAM, &psx1_state::subcpu_map); // MC68HC05G6 } void psx1_state::pse(machine_config &config) diff --git a/src/mame/sony/psxcd.cpp b/src/mame/sony/psxcd.cpp index f5385897857..359d3b33048 100644 --- a/src/mame/sony/psxcd.cpp +++ b/src/mame/sony/psxcd.cpp @@ -79,7 +79,7 @@ enum submode_flags DEFINE_DEVICE_TYPE(PSXCD, psxcd_device, "psx_cd", "PSX CD-ROM") -psxcd_device::psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +psxcd_device::psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cdrom_image_device(mconfig, PSXCD, tag, owner, clock), m_irq_handler(*this), m_maincpu(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/sony/psxcd.h b/src/mame/sony/psxcd.h index 9bfd55f3489..5d667ee02bf 100644 --- a/src/mame/sony/psxcd.h +++ b/src/mame/sony/psxcd.h @@ -14,13 +14,13 @@ class psxcd_device : public cdrom_image_device public: template psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&spu_tag) - : psxcd_device(mconfig, tag, owner, (uint32_t)0) + : psxcd_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward(cpu_tag)); m_spu.set_tag(std::forward(spu_tag)); } - psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + psxcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/mame/sony/smc777.cpp b/src/mame/sony/smc777.cpp index a5d4256ac3e..1d27d05ee7b 100644 --- a/src/mame/sony/smc777.cpp +++ b/src/mame/sony/smc777.cpp @@ -1143,7 +1143,7 @@ void smc777_state::smc777(machine_config &config) SN76489A(config, "sn1", MASTER_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.50); // unknown clock / divider - BEEP(config, m_beeper, 300); // TODO: correct frequency + BEEP(config, m_beeper, XTAL::u(300)); // TODO: correct frequency m_beeper->add_route(ALL_OUTPUTS, "mono", 0.50); TIMER(config, "keyboard_timer").configure_periodic(FUNC(smc777_state::keyboard_callback), attotime::from_hz(240/32)); diff --git a/src/mame/sony/taito_zm.cpp b/src/mame/sony/taito_zm.cpp index 9e95ae49e9b..8b099f12b8b 100644 --- a/src/mame/sony/taito_zm.cpp +++ b/src/mame/sony/taito_zm.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(TAITO_ZOOM, taito_zoom_device, "taito_zoom", "Taito Zoom Soun // taito_zoom_device - constructor //------------------------------------------------- -taito_zoom_device::taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +taito_zoom_device::taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TAITO_ZOOM, tag, owner, clock), device_mixer_interface(mconfig, *this, 2), m_soundcpu(*this, "mn10200"), diff --git a/src/mame/sony/taito_zm.h b/src/mame/sony/taito_zm.h index 052111f203e..0d5127ad825 100644 --- a/src/mame/sony/taito_zm.h +++ b/src/mame/sony/taito_zm.h @@ -19,7 +19,7 @@ class taito_zoom_device : public device_t, public device_mixer_interface public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + taito_zoom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void sound_irq_w(uint16_t data); uint16_t sound_irq_r(); diff --git a/src/mame/sony/taitogn.cpp b/src/mame/sony/taitogn.cpp index 8f57291b7f9..98a1b851413 100644 --- a/src/mame/sony/taitogn.cpp +++ b/src/mame/sony/taitogn.cpp @@ -636,7 +636,7 @@ void taitogn_state::coh3002t(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &taitogn_state::main_map); - RF5C296(config, "rf5c296", 0).set_pccard("pccard"); + RF5C296(config, "rf5c296").set_pccard("pccard"); PCCARD_SLOT(config, m_pccard, slot_ataflash, nullptr); diff --git a/src/mame/sony/zn.cpp b/src/mame/sony/zn.cpp index 31cf24c4588..e3468d5af61 100644 --- a/src/mame/sony/zn.cpp +++ b/src/mame/sony/zn.cpp @@ -154,10 +154,10 @@ void zn_state::zn_1mb_vram(machine_config &config) sio0.sck_handler().append(m_znmcu, FUNC(znmcu_device::write_clock)); sio0.txd_handler().set(m_cat702[0], FUNC(cat702_device::write_datain)); - CAT702(config, m_cat702[0], 0); + CAT702(config, m_cat702[0]); m_cat702[0]->dataout_handler().set(FUNC(zn_state::cat702_dataout<0>)); - ZNMCU(config, m_znmcu, 0); + ZNMCU(config, m_znmcu); m_znmcu->dataout_handler().set(FUNC(zn_state::znmcu_dataout)); m_znmcu->dsr_handler().set("maincpu:sio0", FUNC(psxsio0_device::write_dsr)); m_znmcu->dsw_handler().set_ioport("DSW"); @@ -177,7 +177,7 @@ void zn_state::zn_1mb_vram(machine_config &config) m_spu->add_route(0, "lspeaker", 0.35); m_spu->add_route(1, "rspeaker", 0.35); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); } void zn_state::zn_2mb_vram(machine_config &config) @@ -199,10 +199,10 @@ void zn_state::zn2(machine_config &config) sio0.sck_handler().append(m_znmcu, FUNC(znmcu_device::write_clock)); sio0.txd_handler().set(m_cat702[0], FUNC(cat702_device::write_datain)); - CAT702(config, m_cat702[0], 0); + CAT702(config, m_cat702[0]); m_cat702[0]->dataout_handler().set(FUNC(zn_state::cat702_dataout<0>)); - ZNMCU(config, m_znmcu, 0); + ZNMCU(config, m_znmcu); m_znmcu->dataout_handler().set(FUNC(zn_state::znmcu_dataout)); m_znmcu->dsr_handler().set("maincpu:sio0", FUNC(psxsio0_device::write_dsr)); m_znmcu->dsw_handler().set_ioport("DSW"); @@ -222,7 +222,7 @@ void zn_state::zn2(machine_config &config) m_spu->add_route(0, "lspeaker", 0.35); m_spu->add_route(1, "rspeaker", 0.35); - AT28C16(config, "at28c16", 0); + AT28C16(config, "at28c16"); } void zn_state::gameboard_cat702(machine_config &config) @@ -231,7 +231,7 @@ void zn_state::gameboard_cat702(machine_config &config) sio0.sck_handler().append(m_cat702[1], FUNC(cat702_device::write_clock)); sio0.txd_handler().append(m_cat702[1], FUNC(cat702_device::write_datain)); - CAT702(config, m_cat702[1], 0); + CAT702(config, m_cat702[1]); m_cat702[1]->dataout_handler().set(FUNC(zn_state::cat702_dataout<1>)); } @@ -900,7 +900,7 @@ void taito_fx1a_state::coh1000ta(machine_config &config) MB3773(config, m_mb3773); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -1456,7 +1456,7 @@ void beastrzrb_state::beastrzrb(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_LOW)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_LOW)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "lspeaker", 1.0); oki.add_route(ALL_OUTPUTS, "rspeaker", 1.0); oki.set_addrmap(0, &beastrzrb_state::oki_map); @@ -1951,7 +1951,7 @@ void nbajamex_state::nbajamex(machine_config &config) ADDRESS_MAP_BANK(config, "nbajamex_bankmap").set_map(&nbajamex_state::bank_map).set_options(ENDIANNESS_LITTLE, 32, 24, 0x800000); - ACCLAIM_RAX(config, m_rax, 0); + ACCLAIM_RAX(config, m_rax); } void jdredd_state::jdredd(machine_config &config) @@ -2394,7 +2394,7 @@ void tecmo_zn_state::link_port_map(address_map &map) void tecmo_zn_state::coh1002ml(machine_config &config) { coh1002m(config); - z80_device &link(Z80(config, "link", 4000000)); // ? + z80_device &link(Z80(config, "link", XTAL::u(4000000))); // ? link.set_addrmap(AS_PROGRAM, &tecmo_zn_state::link_map); link.set_addrmap(AS_IO, &tecmo_zn_state::link_port_map); } diff --git a/src/mame/sony/znmcu.cpp b/src/mame/sony/znmcu.cpp index 75288a8af79..3d7fadbadc5 100644 --- a/src/mame/sony/znmcu.cpp +++ b/src/mame/sony/znmcu.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(ZNMCU, znmcu_device, "znmcu", "Sony ZN MCU") -znmcu_device::znmcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +znmcu_device::znmcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ZNMCU, tag, owner, clock), m_dsw_handler(*this), m_analog1_handler(*this), diff --git a/src/mame/sony/znmcu.h b/src/mame/sony/znmcu.h index 60166999897..56f932d3e0b 100644 --- a/src/mame/sony/znmcu.h +++ b/src/mame/sony/znmcu.h @@ -11,7 +11,7 @@ DECLARE_DEVICE_TYPE(ZNMCU, znmcu_device) class znmcu_device : public device_t { public: - znmcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + znmcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto dsw_handler() { return m_dsw_handler.bind(); } diff --git a/src/mame/stern/astinvad.cpp b/src/mame/stern/astinvad.cpp index 5c70e9eb2aa..e3363ea5ad0 100644 --- a/src/mame/stern/astinvad.cpp +++ b/src/mame/stern/astinvad.cpp @@ -727,7 +727,7 @@ void spcking2_state::spcking2(machine_config &config) void spaceint_state::spaceint(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 2'000'000); // a guess + Z80(config, m_maincpu, XTAL::u(2'000'000)); // a guess m_maincpu->set_addrmap(AS_PROGRAM, &spaceint_state::prg_map); m_maincpu->set_addrmap(AS_IO, &spaceint_state::port_map); m_maincpu->set_vblank_int("screen", FUNC(spaceint_state::irq0_line_hold)); diff --git a/src/mame/stern/berzerk.cpp b/src/mame/stern/berzerk.cpp index 2245ef9db4d..7106661e808 100644 --- a/src/mame/stern/berzerk.cpp +++ b/src/mame/stern/berzerk.cpp @@ -1192,7 +1192,7 @@ void berzerk_state::berzerk(machine_config &config) m_s14001a->add_route(ALL_OUTPUTS, "s14001a_volume", 0.5); FILTER_VOLUME(config, m_s14001a_volume).add_route(ALL_OUTPUTS, "mono", 1.0); - EXIDY(config, m_custom, 0).add_route(ALL_OUTPUTS, "mono", 0.33); + EXIDY(config, m_custom).add_route(ALL_OUTPUTS, "mono", 0.33); } diff --git a/src/mame/stern/cliffhgr.cpp b/src/mame/stern/cliffhgr.cpp index 5360d0d1137..8dd03c9abde 100644 --- a/src/mame/stern/cliffhgr.cpp +++ b/src/mame/stern/cliffhgr.cpp @@ -691,14 +691,14 @@ INPUT_PORTS_END void cliffhgr_state::cliffhgr(machine_config &config) { - Z80(config, m_maincpu, 4000000); /* 4MHz */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &cliffhgr_state::mainmem); m_maincpu->set_addrmap(AS_IO, &cliffhgr_state::mainport); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - PIONEER_PR8210(config, m_laserdisc, 0); + PIONEER_PR8210(config, m_laserdisc); m_laserdisc->set_overlay(tms9928a_device::TOTAL_HORZ, tms9928a_device::TOTAL_VERT_NTSC, "tms9928a", FUNC(tms9928a_device::screen_update)); m_laserdisc->set_overlay_clip(tms9928a_device::HORZ_DISPLAY_START-12, tms9928a_device::HORZ_DISPLAY_START+32*8+12-1, tms9928a_device::VERT_DISPLAY_START_NTSC - 12, tms9928a_device::VERT_DISPLAY_START_NTSC+24*8+12-1); m_laserdisc->add_route(0, "lspeaker", 1.0); diff --git a/src/mame/subsino/lastfght.cpp b/src/mame/subsino/lastfght.cpp index 62fe7527fa3..ee0480ab976 100644 --- a/src/mame/subsino/lastfght.cpp +++ b/src/mame/subsino/lastfght.cpp @@ -568,7 +568,7 @@ void lastfght_state::lastfght(machine_config &config) /* video hardware */ PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &lastfght_state::ramdac_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/subsino/subsino.cpp b/src/mame/subsino/subsino.cpp index c064e7f3bcb..c434be7d91b 100644 --- a/src/mame/subsino/subsino.cpp +++ b/src/mame/subsino/subsino.cpp @@ -2898,7 +2898,7 @@ void subsino_state::dinofmly(machine_config &config) PALETTE(config.replace(), m_palette).set_entries(0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &subsino_state::ramdac_map); } @@ -2976,7 +2976,7 @@ void subsino_state::stbsub(machine_config &config) PALETTE(config, m_palette).set_entries(0x100); //PALETTE(config, m_palette, FUNC(subsino_state::_3proms_palette), 0x100); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &subsino_state::ramdac_map); MCFG_VIDEO_START_OVERRIDE(subsino_state,stbsub) diff --git a/src/mame/subsino/subsino2.cpp b/src/mame/subsino/subsino2.cpp index 216c33f4927..c44ef891ec7 100644 --- a/src/mame/subsino/subsino2.cpp +++ b/src/mame/subsino/subsino2.cpp @@ -2930,7 +2930,7 @@ void subsino2_state::bishjan(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &subsino2_state::ramdac_map); // sound hardware @@ -2980,7 +2980,7 @@ void subsino2_state::mtrain(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &subsino2_state::ramdac_map); // sound hardware @@ -3014,7 +3014,7 @@ void subsino2_state::saklove(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &subsino2_state::ramdac_map); // sound hardware @@ -3050,7 +3050,7 @@ void subsino2_state::xplan(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_ss9601); PALETTE(config, m_palette).set_entries(256); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); // HMC HM86171 VGA 256 colour RAMDAC + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); // HMC HM86171 VGA 256 colour RAMDAC ramdac.set_addrmap(0, &subsino2_state::ramdac_map); // sound hardware diff --git a/src/mame/sun/sun3.cpp b/src/mame/sun/sun3.cpp index a63122c5e65..0ae72645581 100644 --- a/src/mame/sun/sun3.cpp +++ b/src/mame/sun/sun3.cpp @@ -980,7 +980,7 @@ void sun3_state::machine_reset() void sun3_state::sun3(machine_config &config) { /* basic machine hardware */ - M68020(config, m_maincpu, 16670000); + M68020(config, m_maincpu, XTAL::u(16670000)); m_maincpu->set_addrmap(AS_PROGRAM, &sun3_state::sun3_mem); screen_device &bwtwo(SCREEN(config, "bwtwo", SCREEN_TYPE_RASTER)); @@ -1029,7 +1029,7 @@ void sun3_state::sun3(machine_config &config) rs232b.dcd_handler().set(m_scc2, FUNC(z80scc_device::dcdb_w)); rs232b.cts_handler().set(m_scc2, FUNC(z80scc_device::ctsb_w)); - AM79C90(config, m_lance, 10'000'000); // clock is a guess + AM79C90(config, m_lance, XTAL::u(10'000'000)); // clock is a guess NSCSI_BUS(config, "scsibus"); NSCSI_CONNECTOR(config, "scsibus:0", scsi_devices, nullptr); @@ -1084,10 +1084,10 @@ void sun3_state::sun3200(machine_config &config) void sun3_state::sun3_50(machine_config &config) { /* basic machine hardware */ - M68020(config, m_maincpu, 15700000); + M68020(config, m_maincpu, XTAL::u(15700000)); m_maincpu->set_addrmap(AS_PROGRAM, &sun3_state::sun3_mem); - AM79C90(config, m_lance, 10'000'000); // clock is a guess + AM79C90(config, m_lance, XTAL::u(10'000'000)); // clock is a guess screen_device &bwtwo(SCREEN(config, "bwtwo", SCREEN_TYPE_RASTER)); bwtwo.set_screen_update(FUNC(sun3_state::bw2_350_update)); diff --git a/src/mame/sun/sun3x.cpp b/src/mame/sun/sun3x.cpp index 826a3be5203..dc2e9658360 100644 --- a/src/mame/sun/sun3x.cpp +++ b/src/mame/sun/sun3x.cpp @@ -584,10 +584,10 @@ static void sun_floppies(device_slot_interface &device) void sun3x_state::sun3_80(machine_config &config) { /* basic machine hardware */ - M68030(config, m_maincpu, 20000000); + M68030(config, m_maincpu, XTAL::u(20000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sun3x_state::sun3_80_mem); - M48T02(config, TIMEKEEPER_TAG, 0); + M48T02(config, TIMEKEEPER_TAG); SCC8530N(config, m_scc1, 4.9152_MHz_XTAL); m_scc1->out_txda_callback().set(KEYBOARD_TAG, FUNC(sun_keyboard_port_device::write_txd)); @@ -632,10 +632,10 @@ void sun3x_state::sun3_80(machine_config &config) void sun3x_state::sun3_460(machine_config &config) { /* basic machine hardware */ - M68030(config, m_maincpu, 33000000); + M68030(config, m_maincpu, XTAL::u(33000000)); m_maincpu->set_addrmap(AS_PROGRAM, &sun3x_state::sun3_460_mem); - ICM7170(config, "rtc", 32768).irq().set_inputline(m_maincpu, M68K_IRQ_7); + ICM7170(config, "rtc", XTAL::u(32768)).irq().set_inputline(m_maincpu, M68K_IRQ_7); SCC8530N(config, m_scc1, 4.9152_MHz_XTAL); SCC8530N(config, m_scc2, 4.9152_MHz_XTAL); diff --git a/src/mame/sun/sun4.cpp b/src/mame/sun/sun4.cpp index eae540d969c..3c04de48c04 100644 --- a/src/mame/sun/sun4.cpp +++ b/src/mame/sun/sun4.cpp @@ -1355,7 +1355,7 @@ void sun4_base_state::ncr53c90a(device_t *device) { ncr53c90a_device &adapter = downcast(*device); - adapter.set_clock(10000000); + adapter.set_clock(XTAL::u(10000000)); adapter.irq_handler_cb().set(*this, FUNC(sun4_base_state::scsi_irq)); adapter.drq_handler_cb().set(*this, FUNC(sun4_base_state::scsi_drq)); } @@ -1365,7 +1365,7 @@ void sun4_base_state::sun4_base(machine_config &config) RAM(config, m_ram).set_default_size("16M").set_default_value(0x00); m_ram->set_extra_options("4M,8M,12M,16M,20M,24M,28M,32M,36M,40M,48M,52M,64M"); - M48T02(config, TIMEKEEPER_TAG, 0); + M48T02(config, TIMEKEEPER_TAG); N82077AA(config, m_fdc, 24_MHz_XTAL); m_fdc->set_ready_line_connected(false); @@ -1427,7 +1427,7 @@ void sun4_base_state::sun4_base(machine_config &config) void sun4_state::sun4(machine_config &config) { /* basic machine hardware */ - SPARCV7(config, m_maincpu, 16'670'000); + SPARCV7(config, m_maincpu, XTAL::u(16'670'000)); m_maincpu->add_asi_desc([](sparc_disassembler *dasm) { dasm->add_asi_desc(sun4_asi_desc); }); m_maincpu->set_addrmap(0, &sun4_state::debugger_map); @@ -1436,7 +1436,7 @@ void sun4_state::sun4(machine_config &config) // MMU Type 1 device space ADDRESS_MAP_BANK(config, m_type1space).set_map(&sun4_state::type1space_map).set_options(ENDIANNESS_BIG, 32, 32, 0x80000000); - SUN4_MMU(config, m_mmu, 25'000'000); + SUN4_MMU(config, m_mmu, XTAL::u(25'000'000)); m_mmu->type1_r().set(m_type1space, FUNC(address_map_bank_device::read32)); m_mmu->type1_w().set(m_type1space, FUNC(address_map_bank_device::write32)); m_mmu->set_cpu(m_maincpu); @@ -1449,7 +1449,7 @@ void sun4_state::sun4(machine_config &config) void sun4c_state::sun4c(machine_config &config) { /* basic machine hardware */ - SPARCV7(config, m_maincpu, 20'000'000); + SPARCV7(config, m_maincpu, XTAL::u(20'000'000)); m_maincpu->add_asi_desc([](sparc_disassembler *dasm) { dasm->add_asi_desc(sun4c_asi_desc); }); m_maincpu->set_addrmap(0x00, &sun4c_state::debugger_map); m_maincpu->set_addrmap(0x12, &sun4c_state::system_asi_map); @@ -1472,7 +1472,7 @@ void sun4c_state::sun4c(machine_config &config) // MMU Type 1 device space ADDRESS_MAP_BANK(config, m_type1space).set_map(&sun4c_state::type1space_map).set_options(ENDIANNESS_BIG, 32, 32, 0x80000000); - SUN4C_MMU(config, m_mmu, 20'000'000); + SUN4C_MMU(config, m_mmu, XTAL::u(20'000'000)); m_mmu->type1_r().set(m_type1space, FUNC(address_map_bank_device::read32)); m_mmu->type1_w().set(m_type1space, FUNC(address_map_bank_device::write32)); m_mmu->set_cpu(m_maincpu); @@ -1483,7 +1483,7 @@ void sun4c_state::sun4c(machine_config &config) m_maincpu->set_mmu(m_mmu); // SBus - SBUS(config, m_sbus, 20'000'000, m_maincpu, m_type1space, 0); + SBUS(config, m_sbus, XTAL::u(20'000'000), m_maincpu, m_type1space, 0); m_sbus->irq<0>().set(FUNC(sun4c_state::sbus_irq_w)); m_sbus->irq<1>().set(FUNC(sun4c_state::sbus_irq_w)); m_sbus->irq<2>().set(FUNC(sun4c_state::sbus_irq_w)); @@ -1491,9 +1491,9 @@ void sun4c_state::sun4c(machine_config &config) m_sbus->irq<4>().set(FUNC(sun4c_state::sbus_irq_w)); m_sbus->irq<5>().set(FUNC(sun4c_state::sbus_irq_w)); m_sbus->irq<6>().set(FUNC(sun4c_state::sbus_irq_w)); - SBUS_SLOT(config, m_sbus_slot[0], 20'000'000, m_sbus, 0, sbus_cards, nullptr); - SBUS_SLOT(config, m_sbus_slot[1], 20'000'000, m_sbus, 1, sbus_cards, nullptr); - SBUS_SLOT(config, m_sbus_slot[2], 20'000'000, m_sbus, 2, sbus_cards, nullptr); + SBUS_SLOT(config, m_sbus_slot[0], XTAL::u(20'000'000), m_sbus, 0, sbus_cards, nullptr); + SBUS_SLOT(config, m_sbus_slot[1], XTAL::u(20'000'000), m_sbus, 1, sbus_cards, nullptr); + SBUS_SLOT(config, m_sbus_slot[2], XTAL::u(20'000'000), m_sbus, 2, sbus_cards, nullptr); } void sun4c_state::sun4_20(machine_config &config) diff --git a/src/mame/suna/go2000.cpp b/src/mame/suna/go2000.cpp index 945ff3cb878..dafb9a5307f 100644 --- a/src/mame/suna/go2000.cpp +++ b/src/mame/suna/go2000.cpp @@ -357,7 +357,7 @@ void go2000_state::go2000(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_soundcpu, 0); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac", 0).add_route(0, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(0, "speaker", 0.25); // unknown DAC } ROM_START( go2000 ) diff --git a/src/mame/suna/suna16.cpp b/src/mame/suna/suna16.cpp index 920527cc161..22ef9ae22b6 100644 --- a/src/mame/suna/suna16.cpp +++ b/src/mame/suna/suna16.cpp @@ -867,10 +867,10 @@ void suna16_state::bssoccer(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.2); ymsnd.add_route(1, "rspeaker", 0.2); - DAC_4BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC - DAC_4BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC - DAC_4BIT_R2R(config, "ldac2", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC - DAC_4BIT_R2R(config, "rdac2", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "ldac2").add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "rdac2").add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC } @@ -922,8 +922,8 @@ void suna16_state::uballoon(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.50); ymsnd.add_route(1, "rspeaker", 0.50); - DAC_4BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC - DAC_4BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + DAC_4BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC + DAC_4BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC } @@ -974,8 +974,8 @@ void suna16_state::sunaq(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.50); ymsnd.add_route(1, "rspeaker", 0.50); - DAC_4BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC - DAC_4BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC + DAC_4BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.25); // unknown DAC + DAC_4BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.25); // unknown DAC } @@ -1037,10 +1037,10 @@ void suna16_state::bestbest(machine_config &config) ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 1.0); ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 1.0); - DAC_4BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC - DAC_4BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC - DAC_4BIT_R2R(config, "ldac2", 0).add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC - DAC_4BIT_R2R(config, "rdac2", 0).add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "ldac2").add_route(ALL_OUTPUTS, "lspeaker", 0.2); // unknown DAC + DAC_4BIT_R2R(config, "rdac2").add_route(ALL_OUTPUTS, "rspeaker", 0.2); // unknown DAC } /*************************************************************************** diff --git a/src/mame/suna/suna8.cpp b/src/mame/suna/suna8.cpp index 0ca7f2385c5..c5621ef2a1a 100644 --- a/src/mame/suna/suna8.cpp +++ b/src/mame/suna/suna8.cpp @@ -2069,10 +2069,10 @@ void suna8_state::brickzn11(machine_config &config) AY8910(config, "aysnd", XTAL(24'000'000) / 16).add_route(ALL_OUTPUTS, "speaker", 0.33); // 1.5MHz (measured) - DAC_4BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC - DAC_4BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC - DAC_4BIT_R2R(config, "ldac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC - DAC_4BIT_R2R(config, "rdac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC + DAC_4BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC + DAC_4BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC + DAC_4BIT_R2R(config, "ldac2").add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC + DAC_4BIT_R2R(config, "rdac2").add_route(ALL_OUTPUTS, "speaker", 0.17); // unknown DAC } void suna8_state::brickzn(machine_config &config) diff --git a/src/mame/sunelectronics/shanghai.cpp b/src/mame/sunelectronics/shanghai.cpp index c0fda2fbf31..1c4b509cdca 100644 --- a/src/mame/sunelectronics/shanghai.cpp +++ b/src/mame/sunelectronics/shanghai.cpp @@ -422,7 +422,7 @@ void shanghai_state::shanghai(machine_config &config) PALETTE(config, "palette", FUNC(shanghai_state::shanghai_palette)).set_format(palette_device::xBGR_444, 256); - HD63484(config, "hd63484", 0).set_addrmap(0, &shanghai_state::hd63484_map); + HD63484(config, "hd63484").set_addrmap(0, &shanghai_state::hd63484_map); // sound hardware SPEAKER(config, "mono").front_center(); @@ -456,7 +456,7 @@ void shanghai_state::shangha2(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_444, 256); - HD63484(config, "hd63484", 0).set_addrmap(0, &shanghai_state::hd63484_map); + HD63484(config, "hd63484").set_addrmap(0, &shanghai_state::hd63484_map); // sound hardware SPEAKER(config, "mono").front_center(); @@ -495,7 +495,7 @@ void shanghai_state::kothello(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_444, 256); - hd63484_device &hd63484(HD63484(config, "hd63484", 0)); + hd63484_device &hd63484(HD63484(config, "hd63484")); hd63484.set_addrmap(0, &shanghai_state::hd63484_map); hd63484.set_external_skew(2); @@ -509,7 +509,7 @@ void shanghai_state::kothello(machine_config &config) ymsnd.port_b_read_callback().set_ioport("DSW2"); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.15); - seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound", 0)); + seibu_sound_device &seibu_sound(SEIBU_SOUND(config, "seibu_sound")); seibu_sound.int_callback().set_inputline("audiocpu", 0); seibu_sound.set_rom_tag("audiocpu"); seibu_sound.set_rombank_tag("seibu_bank1"); diff --git a/src/mame/svision/svis_snd.cpp b/src/mame/svision/svis_snd.cpp index 90c08fe84f8..e7eb229677c 100644 --- a/src/mame/svision/svis_snd.cpp +++ b/src/mame/svision/svis_snd.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(SVISION_SND, svision_sound_device, "svision_sound", "Super Vi // svision_sound_device - constructor //------------------------------------------------- -svision_sound_device::svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +svision_sound_device::svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SVISION_SND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_irq_cb(*this) diff --git a/src/mame/svision/svis_snd.h b/src/mame/svision/svis_snd.h index d080976261b..c345f003564 100644 --- a/src/mame/svision/svis_snd.h +++ b/src/mame/svision/svis_snd.h @@ -18,14 +18,14 @@ class svision_sound_device : public device_t, public device_sound_interface { public: template - svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &®ion_tag) + svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &®ion_tag) : svision_sound_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); m_cartrom.set_tag(std::forward(region_tag)); } - svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto irq_cb() { return m_irq_cb.bind(); } diff --git a/src/mame/svision/svision.cpp b/src/mame/svision/svision.cpp index e3b5a4ce405..5c99f7bd44b 100644 --- a/src/mame/svision/svision.cpp +++ b/src/mame/svision/svision.cpp @@ -516,7 +516,7 @@ void svision_state::svision(machine_config &config) { svision_base(config); - M65C02(config, m_maincpu, 4000000); + M65C02(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &svision_state::svision_mem); SCREEN(config, m_screen, SCREEN_TYPE_LCD); @@ -540,7 +540,7 @@ void svision_state::svisionp(machine_config &config) { svision(config); - m_maincpu->set_clock(4430000); + m_maincpu->set_clock(XTAL::u(4430000)); m_screen->set_refresh(HZ_TO_ATTOSECONDS(50)); m_palette->set_init(FUNC(svision_state::svisionp_palette)); } diff --git a/src/mame/swtpc/swtpc09.cpp b/src/mame/swtpc/swtpc09.cpp index d69debfdb8e..2d37c3e40d6 100644 --- a/src/mame/swtpc/swtpc09.cpp +++ b/src/mame/swtpc/swtpc09.cpp @@ -462,7 +462,7 @@ void swtpc09_state::swtpc09_base(machine_config &config) MC6809(config, m_maincpu, 8_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &swtpc09_state::mp09_mem); - ADDRESS_MAP_BANK(config, m_bankdev, 0); + ADDRESS_MAP_BANK(config, m_bankdev); m_bankdev->set_endianness(ENDIANNESS_BIG); m_bankdev->set_data_width(8); m_bankdev->set_addr_width(20); @@ -497,14 +497,14 @@ void swtpc09_state::swtpc09_base(machine_config &config) io7.firq_cb().set("mainfirq", FUNC(input_merger_device::in_w<7>)); // IO8 at 0xe080 is used internally by the MPID board PIA. - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(swtpc09_state::pia0_a_r)); m_pia->ca1_w(0); m_pia->irqa_handler().set(FUNC(swtpc09_state::pia0_irq_a)); // IO9 at 0xe090 is used internally by the MPID board 6840 timer. - PTM6840(config, m_ptm, 2000000); - m_ptm->set_external_clocks(50, 0, 50); + PTM6840(config, m_ptm, XTAL::u(2000000)); + m_ptm->set_external_clocks(XTAL::u(50), XTAL()0, XTAL::u(50)); m_ptm->o1_callback().set(FUNC(swtpc09_state::ptm_o1_callback)); m_ptm->o3_callback().set(FUNC(swtpc09_state::ptm_o3_callback)); m_ptm->irq_callback().set(FUNC(swtpc09_state::ptm_irq)); @@ -569,7 +569,7 @@ void swtpc09_state::swtpc09(machine_config &config) swtpc09_base(config); // DMAF2 - FD1797(config, m_fdc, 2000000); + FD1797(config, m_fdc, XTAL::u(2000000)); FLOPPY_CONNECTOR(config, "fdc:0", swtpc09_flex_floppies, "dd", swtpc09_state::floppy_flex_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", swtpc09_flex_floppies, "dd", swtpc09_state::floppy_flex_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:2", swtpc09_flex_floppies, "dd", swtpc09_state::floppy_flex_formats).enable_sound(true); @@ -599,7 +599,7 @@ void swtpc09_state::swtpc09u(machine_config &config) m_bankdev->set_addrmap(AS_PROGRAM, &swtpc09_state::uniflex_dmaf2_mem); // DMAF2 - FD1797(config, m_fdc, 2400000); + FD1797(config, m_fdc, XTAL::u(2400000)); FLOPPY_CONNECTOR(config, "fdc:0", swtpc09_uniflex_floppies, "8dsdd", swtpc09_state::floppy_uniflex_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", swtpc09_uniflex_floppies, "8dsdd", swtpc09_state::floppy_uniflex_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:2", swtpc09_uniflex_floppies, "8dsdd", swtpc09_state::floppy_uniflex_formats).enable_sound(true); @@ -615,11 +615,11 @@ void swtpc09_state::swtpc09u(machine_config &config) void swtpc09_state::swtpc09d3(machine_config &config) { swtpc09_base(config); - m_pia->set_clock(2000000); + m_pia->set_clock(XTAL::u(2000000)); m_bankdev->set_addrmap(AS_PROGRAM, &swtpc09_state::uniflex_dmaf3_mem); // DMAF3 - FD1797(config, m_fdc, 2400000); + FD1797(config, m_fdc, XTAL::u(2400000)); FLOPPY_CONNECTOR(config, "fdc:0", swtpc09_uniflex_floppies, "8dsdd", swtpc09_state::floppy_uniflex_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:1", swtpc09_uniflex_floppies, "8dsdd", swtpc09_state::floppy_uniflex_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "fdc:2", swtpc09_uniflex_floppies, "8dsdd", swtpc09_state::floppy_uniflex_formats).enable_sound(true); @@ -633,10 +633,10 @@ void swtpc09_state::swtpc09d3(machine_config &config) WD1000(config, m_hdc, 5_MHz_XTAL); m_hdc->intrq_wr_callback().set(FUNC(swtpc09_state::dmaf3_hdc_intrq_w)); m_hdc->drq_wr_callback().set(FUNC(swtpc09_state::dmaf3_hdc_drq_w)); - HARDDISK(config, "hdc:0", 0); - HARDDISK(config, "hdc:1", 0); - HARDDISK(config, "hdc:2", 0); - HARDDISK(config, "hdc:3", 0); + HARDDISK(config, "hdc:0"); + HARDDISK(config, "hdc:1"); + HARDDISK(config, "hdc:2"); + HARDDISK(config, "hdc:3"); via6522_device &via(MOS6522(config, "via", 4_MHz_XTAL / 4)); via.readpa_handler().set(FUNC(swtpc09_state::dmaf3_via_read_porta)); diff --git a/src/mame/swtpc/swtpc8212.cpp b/src/mame/swtpc/swtpc8212.cpp index d6b38d27e01..1418201274a 100644 --- a/src/mame/swtpc/swtpc8212.cpp +++ b/src/mame/swtpc/swtpc8212.cpp @@ -31,7 +31,7 @@ private: void swtpc8212_state::swtpc8212(machine_config &config) { - SWTPC8212(config, m_swtpc8212, 0); + SWTPC8212(config, m_swtpc8212); RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); m_rs232->dcd_handler().set(m_swtpc8212, FUNC(swtpc8212_device::rs232_conn_dcd_w)); diff --git a/src/mame/synertek/ktm3.cpp b/src/mame/synertek/ktm3.cpp index 12fac466f26..23fd9aa0f2e 100644 --- a/src/mame/synertek/ktm3.cpp +++ b/src/mame/synertek/ktm3.cpp @@ -284,7 +284,7 @@ void ktm3_state::ktm3(machine_config &config) rs232.cts_handler().set(m_acia, FUNC(mos6551_device::write_dsr)); rs232.dcd_handler().set(m_acia, FUNC(mos6551_device::write_dcd)); - CLOCK(config, "60hz", 60).signal_handler().set(FUNC(ktm3_state::signal_w)); + CLOCK(config, "60hz", XTAL::u(60)).signal_handler().set(FUNC(ktm3_state::signal_w)); } ROM_START(ktm3) diff --git a/src/mame/synertek/sym1.cpp b/src/mame/synertek/sym1.cpp index 8c07ffa0e33..0c75b4a8d44 100644 --- a/src/mame/synertek/sym1.cpp +++ b/src/mame/synertek/sym1.cpp @@ -423,7 +423,7 @@ void sym1_state::sym1(machine_config &config) riot.pb_rd_callback().set(FUNC(sym1_state::riot_b_r)); riot.pb_wr_callback().set(FUNC(sym1_state::riot_b_w)); - TTL74145(config, m_ttl74145, 0); + TTL74145(config, m_ttl74145); m_ttl74145->output_line_callback<0>().set(FUNC(sym1_state::sym1_74145_output_0_w)); m_ttl74145->output_line_callback<1>().set(FUNC(sym1_state::sym1_74145_output_1_w)); m_ttl74145->output_line_callback<2>().set(FUNC(sym1_state::sym1_74145_output_2_w)); @@ -445,7 +445,7 @@ void sym1_state::sym1(machine_config &config) via3.writepa_handler().set(FUNC(sym1_state::via3_a_w)); via3.irq_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); - input_merger_device &merger(INPUT_MERGER_ANY_HIGH(config, "mainirq", 0)); // wire-or connection + input_merger_device &merger(INPUT_MERGER_ANY_HIGH(config, "mainirq")); // wire-or connection merger.output_handler().set_inputline(m_maincpu, M6502_IRQ_LINE); RS232_PORT(config, "crt", default_rs232_devices, nullptr); diff --git a/src/mame/ta/alphatpc16.cpp b/src/mame/ta/alphatpc16.cpp index 781bbec942d..a6994964d40 100644 --- a/src/mame/ta/alphatpc16.cpp +++ b/src/mame/ta/alphatpc16.cpp @@ -490,7 +490,7 @@ void alphatpc16_state::alphatpc16(machine_config &config) m_maincpu->set_addrmap(AS_IO, &alphatpc16_state::apc16_io); m_maincpu->set_irq_acknowledge_callback(m_pic8259, FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); z80dart_device &dart(Z80DART(config, "z80dart", 15_MHz_XTAL / 3)); // clock? @@ -513,7 +513,7 @@ void alphatpc16_state::alphatpc16(machine_config &config) i8741.p2_out_cb().set(FUNC(alphatpc16_state::p2_w)); SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 1000).add_route(ALL_OUTPUTS, "mono", 1.00); // Unknown freq + BEEP(config, "beeper", XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 1.00); // Unknown freq screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(50); @@ -522,7 +522,7 @@ void alphatpc16_state::alphatpc16(machine_config &config) screen.set_visarea(00, 492-1, 00, 270-1); PALETTE(config, "palette").set_entries(8); - EF9345(config, m_ef9345, 0); + EF9345(config, m_ef9345); m_ef9345->set_palette_tag("palette"); TIMER(config, "scanline").configure_scanline(NAME([this](timer_device &t, s32 p){m_ef9345->update_scanline((uint16_t)p);}), screen, 0, 10); diff --git a/src/mame/ta/alphatpx.cpp b/src/mame/ta/alphatpx.cpp index 8037770f157..a95ee261ea9 100644 --- a/src/mame/ta/alphatpx.cpp +++ b/src/mame/ta/alphatpx.cpp @@ -1237,9 +1237,9 @@ void alphatp_12_state::alphatp2(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 1060).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(1060)).add_route(ALL_OUTPUTS, "mono", 1.00); - I8251(config, "uart", 0); + I8251(config, "uart"); // 4.9152_MHz_XTAL serial clock FD1791(config, m_fdc, 4_MHz_XTAL / 4); @@ -1314,9 +1314,9 @@ void alphatp_34_state::alphatp3(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 1060).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(1060)).add_route(ALL_OUTPUTS, "mono", 1.00); - I8251(config, "uart", 0); + I8251(config, "uart"); // 4.9152_MHz_XTAL serial clock FD1791(config, m_fdc, 4_MHz_XTAL / 4); @@ -1330,17 +1330,17 @@ void alphatp_34_state::alphatp3(machine_config &config) void alphatp_34_state::alphatp30(machine_config &config) { alphatp3(config); - I8088(config, m_i8088, 6000000); // unknown clock + I8088(config, m_i8088, XTAL::u(6000000)); // unknown clock m_i8088->set_addrmap(AS_PROGRAM, &alphatp_34_state::alphatp30_8088_map); m_i8088->set_addrmap(AS_IO, &alphatp_34_state::alphatp30_8088_io); m_i8088->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb)); m_i8088->set_disable(); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_i8088, 0); m_pic->in_sp_callback().set_constant(0); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(100000); // 15Mhz osc with unknown divisor pit.set_clk<1>(100000); pit.set_clk<2>(100000); diff --git a/src/mame/ta/alphatro.cpp b/src/mame/ta/alphatro.cpp index b4bb6da7e13..028f26bdb16 100644 --- a/src/mame/ta/alphatro.cpp +++ b/src/mame/ta/alphatro.cpp @@ -373,7 +373,7 @@ void alphatro_state::portf0_w(uint8_t data) if (floppy) { floppy->mon_w(0); - m_fdc->set_rate(250000); + m_fdc->set_rate(XTAL::u(250000)); } } } @@ -845,7 +845,7 @@ void alphatro_state::alphatro(machine_config &config) m_dmac->out_iow_cb<2>().set(m_fdc, FUNC(upd765a_device::dma_w)); m_dmac->out_tc_cb().set(m_fdc, FUNC(upd765a_device::tc_line_w)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->in_sp_callback().set_constant(1); m_pic->out_int_callback().set_inputline(m_maincpu, 0); diff --git a/src/mame/tab/e22_kbd.cpp b/src/mame/tab/e22_kbd.cpp index 52525fe5227..45fdc48db56 100644 --- a/src/mame/tab/e22_kbd.cpp +++ b/src/mame/tab/e22_kbd.cpp @@ -185,7 +185,7 @@ ioport_constructor e22_kbd_hle_device::device_input_ports() const // e22_kbd_hle_device - constructor //------------------------------------------------- -e22_kbd_hle_device::e22_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +e22_kbd_hle_device::e22_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, E22_KBD_HLE, tag, owner, clock), device_buffered_serial_interface(mconfig, *this), device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6", "row_7"), @@ -220,8 +220,8 @@ void e22_kbd_hle_device::device_reset() transmit_register_reset(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_rcv_rate(1200); - set_tra_rate(1200); + set_rcv_rate(XTAL::u(1200)); + set_tra_rate(XTAL::u(1200)); reset_key_state(); start_processing(attotime::from_hz(1200)); diff --git a/src/mame/tab/e22_kbd.h b/src/mame/tab/e22_kbd.h index a3bac1d98d6..f1fd3f1decc 100644 --- a/src/mame/tab/e22_kbd.h +++ b/src/mame/tab/e22_kbd.h @@ -27,7 +27,7 @@ class e22_kbd_hle_device : public device_t, { public: // construction/destruction - e22_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + e22_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto tx_handler() { return m_tx_handler.bind(); } diff --git a/src/mame/tab/tabe22.cpp b/src/mame/tab/tabe22.cpp index 03157aca83c..cd33d6e500b 100644 --- a/src/mame/tab/tabe22.cpp +++ b/src/mame/tab/tabe22.cpp @@ -255,7 +255,7 @@ void tabe22_state::tabe22(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &tabe22_state::mem_map); m_maincpu->set_addrmap(AS_IO, &tabe22_state::io_map); - ADDRESS_MAP_BANK(config, m_vram_bank, 0); + ADDRESS_MAP_BANK(config, m_vram_bank); m_vram_bank->set_map(&tabe22_state::vram_map); m_vram_bank->set_addr_width(13); m_vram_bank->set_data_width(8); diff --git a/src/mame/taito/2mindril.cpp b/src/mame/taito/2mindril.cpp index 675a62885bb..f6a571ed97e 100644 --- a/src/mame/taito/2mindril.cpp +++ b/src/mame/taito/2mindril.cpp @@ -350,12 +350,12 @@ void _2mindril_state::machine_reset() void _2mindril_state::drill(machine_config &config) { - M68000(config, m_maincpu, 16000000); + M68000(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &_2mindril_state::drill_map); m_maincpu->set_vblank_int("screen", FUNC(_2mindril_state::vblank_irq)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_2mindril); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_0_callback().set_ioport("DSW"); tc0510nio.read_1_callback().set(FUNC(_2mindril_state::arm_pwr_r)); tc0510nio.read_2_callback().set(FUNC(_2mindril_state::sensors_r)); diff --git a/src/mame/taito/40love.cpp b/src/mame/taito/40love.cpp index 2053c10a150..3cd3290d982 100644 --- a/src/mame/taito/40love.cpp +++ b/src/mame/taito/40love.cpp @@ -664,7 +664,7 @@ void fortyl_state::common(machine_config &config) TA7630(config, m_ta7630); - YM2149(config, m_ay, 2000000); + YM2149(config, m_ay, XTAL::u(2000000)); m_ay->port_a_write_callback().set(FUNC(fortyl_state::sound_control_2_w)); m_ay->port_b_write_callback().set(FUNC(fortyl_state::sound_control_3_w)); m_ay->add_route(ALL_OUTPUTS, "speaker", 0.1); @@ -683,7 +683,7 @@ void fortyl_state::common(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.2); // unknown DAC } void fortyl_state::_40love(machine_config &config) diff --git a/src/mame/taito/ashnojoe.cpp b/src/mame/taito/ashnojoe.cpp index fb836af00cb..238085a816c 100644 --- a/src/mame/taito/ashnojoe.cpp +++ b/src/mame/taito/ashnojoe.cpp @@ -567,7 +567,7 @@ void ashnojoe_state::ashnojoe(machine_config &config) ymsnd.port_b_write_callback().set(FUNC(ashnojoe_state::ym2203_write_b)); ymsnd.add_route(ALL_OUTPUTS, "mono", 0.1); - MSM5205(config, m_msm, 384'000); + MSM5205(config, m_msm, XTAL::u(384'000)); m_msm->vck_legacy_callback().set(FUNC(ashnojoe_state::vclk_cb)); m_msm->set_prescaler_selector(msm5205_device::S48_4B); m_msm->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/taito/asuka.cpp b/src/mame/taito/asuka.cpp index 7139119db7a..bdf3a130bd0 100644 --- a/src/mame/taito/asuka.cpp +++ b/src/mame/taito/asuka.cpp @@ -1111,15 +1111,15 @@ void bonzeadv_state::bonzeadv(machine_config &config) screen.screen_vblank().set(FUNC(bonzeadv_state::screen_vblank)); screen.set_palette("tc0110pcr"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_offsets(0, 8); m_pc090oj->set_palette("tc0110pcr"); m_pc090oj->set_colpri_callback(FUNC(bonzeadv_state::fixed_colpri_cb)); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette("tc0110pcr"); - TC0110PCR(config, "tc0110pcr", 0); + TC0110PCR(config, "tc0110pcr"); // sound hardware SPEAKER(config, "mono").front_center(); @@ -1130,7 +1130,7 @@ void bonzeadv_state::bonzeadv(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -1147,7 +1147,7 @@ void msm_state::asuka(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc", 0)); + tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc")); tc0220ioc.read_0_callback().set_ioport("DSWA"); tc0220ioc.read_1_callback().set_ioport("DSWB"); tc0220ioc.read_2_callback().set_ioport("IN0"); @@ -1165,16 +1165,16 @@ void msm_state::asuka(machine_config &config) screen.screen_vblank().set(FUNC(msm_state::screen_vblank)); screen.set_palette("tc0110pcr"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_offsets(0, 8); m_pc090oj->set_usebuffer(true); m_pc090oj->set_palette("tc0110pcr"); m_pc090oj->set_colpri_callback(FUNC(msm_state::variable_colpri_cb)); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette("tc0110pcr"); - TC0110PCR(config, "tc0110pcr", 0); + TC0110PCR(config, "tc0110pcr"); // sound hardware SPEAKER(config, "mono").front_center(); @@ -1190,10 +1190,10 @@ void msm_state::asuka(machine_config &config) m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8 kHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.5); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -1214,7 +1214,7 @@ void cadash_state::cadash(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc", 0)); + tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc")); tc0220ioc.read_0_callback().set_ioport("DSWA"); tc0220ioc.read_1_callback().set_ioport("DSWB"); tc0220ioc.read_2_callback().set_ioport("IN0"); @@ -1232,17 +1232,17 @@ void cadash_state::cadash(machine_config &config) screen.screen_vblank().set(FUNC(cadash_state::screen_vblank)); screen.set_palette("tc0110pcr"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_offsets(0, 8); m_pc090oj->set_usebuffer(true); m_pc090oj->set_palette("tc0110pcr"); m_pc090oj->set_colpri_callback(FUNC(cadash_state::fixed_colpri_cb)); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_offsets(1, 0); m_tc0100scn->set_palette("tc0110pcr"); - TC0110PCR(config, "tc0110pcr", 0); + TC0110PCR(config, "tc0110pcr"); // sound hardware SPEAKER(config, "mono").front_center(); @@ -1253,7 +1253,7 @@ void cadash_state::cadash(machine_config &config) ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -1261,16 +1261,16 @@ void cadash_state::cadash(machine_config &config) void msm_state::mofflott(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 8000000); // 8 MHz ??? + M68000(config, m_maincpu, XTAL::u(8000000)); // 8 MHz ??? m_maincpu->set_addrmap(AS_PROGRAM, &msm_state::asuka_map); m_maincpu->set_vblank_int("screen", FUNC(msm_state::irq5_line_hold)); - Z80(config, m_audiocpu, 4000000); // 4 MHz ??? + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4 MHz ??? m_audiocpu->set_addrmap(AS_PROGRAM, &msm_state::z80_map); config.set_maximum_quantum(attotime::from_hz(600)); - tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc", 0)); + tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc")); tc0220ioc.read_0_callback().set_ioport("DSWA"); tc0220ioc.read_1_callback().set_ioport("DSWB"); tc0220ioc.read_2_callback().set_ioport("IN0"); @@ -1288,35 +1288,35 @@ void msm_state::mofflott(machine_config &config) screen.screen_vblank().set(FUNC(msm_state::screen_vblank)); screen.set_palette("tc0110pcr"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_offsets(0, 8); m_pc090oj->set_palette("tc0110pcr"); m_pc090oj->set_colpri_callback(FUNC(msm_state::variable_colpri_cb)); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_offsets(1, 0); m_tc0100scn->set_palette("tc0110pcr"); - TC0110PCR(config, "tc0110pcr", 0); + TC0110PCR(config, "tc0110pcr"); // sound hardware SPEAKER(config, "mono").front_center(); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 4000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.port_write_handler().set_membank(m_audiobank).mask(0x03); ymsnd.add_route(0, "mono", 0.25); ymsnd.add_route(1, "mono", 0.25); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(msm_state::msm5205_vck)); // VCK function m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8 kHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.5); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -1324,16 +1324,16 @@ void msm_state::mofflott(machine_config &config) void base_state::eto(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 8000000); // 8 MHz ??? + M68000(config, m_maincpu, XTAL::u(8000000)); // 8 MHz ??? m_maincpu->set_addrmap(AS_PROGRAM, &base_state::eto_map); m_maincpu->set_vblank_int("screen", FUNC(base_state::irq5_line_hold)); - Z80(config, m_audiocpu, 4000000); // 4 MHz ??? + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4 MHz ??? m_audiocpu->set_addrmap(AS_PROGRAM, &base_state::z80_map); config.set_maximum_quantum(attotime::from_hz(600)); - tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc", 0)); + tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc")); tc0220ioc.read_0_callback().set_ioport("DSWA"); tc0220ioc.read_1_callback().set_ioport("DSWB"); tc0220ioc.read_2_callback().set_ioport("IN0"); @@ -1351,27 +1351,27 @@ void base_state::eto(machine_config &config) screen.screen_vblank().set(FUNC(base_state::screen_vblank)); screen.set_palette("tc0110pcr"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_offsets(0, 8); m_pc090oj->set_palette("tc0110pcr"); m_pc090oj->set_colpri_callback(FUNC(base_state::variable_colpri_cb)); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_offsets(1, 0); m_tc0100scn->set_palette("tc0110pcr"); - TC0110PCR(config, "tc0110pcr", 0); + TC0110PCR(config, "tc0110pcr"); // sound hardware SPEAKER(config, "mono").front_center(); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 4000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.port_write_handler().set_membank(m_audiobank).mask(0x03); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/bigevglf.cpp b/src/mame/taito/bigevglf.cpp index c9b842c87fb..0935da1b1d7 100644 --- a/src/mame/taito/bigevglf.cpp +++ b/src/mame/taito/bigevglf.cpp @@ -608,7 +608,7 @@ void bigevglf_state::bigevglf(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.50); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.50); // unknown DAC } /*************************************************************************** diff --git a/src/mame/taito/bingowav.cpp b/src/mame/taito/bingowav.cpp index ce8a7404240..e834678252c 100644 --- a/src/mame/taito/bingowav.cpp +++ b/src/mame/taito/bingowav.cpp @@ -113,7 +113,7 @@ INPUT_PORTS_END void bingowav_state::bingowav(machine_config &config) { - TMP68301(config, m_maincpu, 12000000); // actually TMP63803F-16 + TMP68301(config, m_maincpu, XTAL::u(12000000)); // actually TMP63803F-16 m_maincpu->set_addrmap(AS_PROGRAM, &bingowav_state::bingowav_main_map); te7750_device &mainioh(TE7750(config, "mainioh")); @@ -122,21 +122,21 @@ void bingowav_state::bingowav(machine_config &config) te7750_device &mainiol(TE7750(config, "mainiol")); mainiol.ios_cb().set_constant(4); - Z80(config, "audiocpu", 4000000).set_addrmap(AS_PROGRAM, &bingowav_state::bingowav_audio_map); + Z80(config, "audiocpu", XTAL::u(4000000)).set_addrmap(AS_PROGRAM, &bingowav_state::bingowav_audio_map); SPEAKER(config, "mono").front_center(); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline("audiocpu", 0); ymsnd.add_route(0, "mono", 0.25); ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag("audiocpu"); - m68000_device &termcpu(M68000(config, "termcpu", 12000000)); // actually TMP63803F-16 + m68000_device &termcpu(M68000(config, "termcpu", XTAL::u(12000000))); // actually TMP63803F-16 termcpu.set_addrmap(AS_PROGRAM, &bingowav_state::bingowav_drive_map); termcpu.set_disable(); diff --git a/src/mame/taito/bking.cpp b/src/mame/taito/bking.cpp index 2bf211183cc..ac3aedfa23f 100644 --- a/src/mame/taito/bking.cpp +++ b/src/mame/taito/bking.cpp @@ -433,7 +433,7 @@ void bking_state::bking(machine_config &config) ay2.port_b_write_callback().set(FUNC(bking_state::port_b_w)); ay2.add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } void bking_state::bking3(machine_config &config) diff --git a/src/mame/taito/capr1.cpp b/src/mame/taito/capr1.cpp index 3834c2afe1c..53a8fe6c494 100644 --- a/src/mame/taito/capr1.cpp +++ b/src/mame/taito/capr1.cpp @@ -201,7 +201,7 @@ INPUT_PORTS_END void capr1_state::cspin2(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); // clock frequency unknown + Z80(config, m_maincpu, XTAL::u(4000000)); // clock frequency unknown m_maincpu->set_addrmap(AS_PROGRAM, &capr1_state::cspin2_map); //m_maincpu->set_periodic_int(FUNC(capr1_state::nmi_line_pulse), attotime::from_hz(20)); @@ -222,7 +222,7 @@ void capr1_state::cspin2(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym2203_device &ym(YM2203(config, "ym", 4000000)); // clock frequency unknown + ym2203_device &ym(YM2203(config, "ym", XTAL::u(4000000))); // clock frequency unknown ym.irq_handler().set_inputline(m_maincpu, 0); ym.port_a_read_callback().set_ioport("INA"); ym.port_b_read_callback().set_ioport("INB"); @@ -231,7 +231,7 @@ void capr1_state::cspin2(machine_config &config) ym.add_route(2, "mono", 0.15); ym.add_route(3, "mono", 0.40); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified } diff --git a/src/mame/taito/caprcyc.cpp b/src/mame/taito/caprcyc.cpp index c4debe1e3b6..e60501a95df 100644 --- a/src/mame/taito/caprcyc.cpp +++ b/src/mame/taito/caprcyc.cpp @@ -66,7 +66,7 @@ INPUT_PORTS_END void caprcyc_state::caprcyc(machine_config &config) { /* basic machine hardware */ - VR4300BE(config, m_maincpu, 100000000); // cpu configuration is unknown + VR4300BE(config, m_maincpu, XTAL::u(100000000)); // cpu configuration is unknown m_maincpu->set_addrmap(AS_PROGRAM, &caprcyc_state::caprcyc_map); /* no video! */ diff --git a/src/mame/taito/changela.cpp b/src/mame/taito/changela.cpp index eb606614f0c..7a02176db92 100644 --- a/src/mame/taito/changela.cpp +++ b/src/mame/taito/changela.cpp @@ -418,11 +418,11 @@ void changela_state::machine_reset() void changela_state::changela(machine_config &config) { - Z80(config, m_maincpu, 5000000); + Z80(config, m_maincpu, XTAL::u(5000000)); m_maincpu->set_addrmap(AS_PROGRAM, &changela_state::changela_map); TIMER(config, "scantimer").configure_scanline(FUNC(changela_state::changela_scanline), "screen", 0, 1); - M68705P3(config, m_mcu, 2500000); + M68705P3(config, m_mcu, XTAL::u(2500000)); m_mcu->portb_r().set_ioport("MCU"); m_mcu->porta_w().set(FUNC(changela_state::changela_68705_port_a_w)); m_mcu->portc_w().set(FUNC(changela_state::changela_68705_port_c_w)); @@ -448,12 +448,12 @@ void changela_state::changela(machine_config &config) SPEAKER(config, "mono").front_center(); - ay8910_device &ay1(AY8910(config, "ay1", 1250000)); + ay8910_device &ay1(AY8910(config, "ay1", XTAL::u(1250000))); ay1.port_a_read_callback().set_ioport("DSWA"); ay1.port_b_read_callback().set_ioport("DSWB"); ay1.add_route(ALL_OUTPUTS, "mono", 0.50); - ay8910_device &ay2(AY8910(config, "ay2", 1250000)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(1250000))); ay2.port_a_read_callback().set_ioport("DSWC"); ay2.port_b_read_callback().set_ioport("DSWD"); ay2.add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/taito/cpzodiac.cpp b/src/mame/taito/cpzodiac.cpp index efc5f4c0962..39e8460abac 100644 --- a/src/mame/taito/cpzodiac.cpp +++ b/src/mame/taito/cpzodiac.cpp @@ -198,7 +198,7 @@ void cpzodiac_state::cpzodiac(machine_config &config) ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - tc0140syt_device &syt(TC0140SYT(config, "syt", 0)); + tc0140syt_device &syt(TC0140SYT(config, "syt")); syt.set_master_tag(m_maincpu); syt.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/cucaracha.cpp b/src/mame/taito/cucaracha.cpp index cc4f3a75c53..cc1b5dbb333 100644 --- a/src/mame/taito/cucaracha.cpp +++ b/src/mame/taito/cucaracha.cpp @@ -147,16 +147,16 @@ void cucaracha_state::cucaracha(machine_config &config) te7750.out_port8_cb().set(FUNC(cucaracha_state::out8_w)); te7750.out_port9_cb().set(FUNC(cucaracha_state::out9_w)); - z80_device &soundcpu(Z80(config, "soundcpu", 4000000)); + z80_device &soundcpu(Z80(config, "soundcpu", XTAL::u(4000000))); soundcpu.set_addrmap(AS_PROGRAM, &cucaracha_state::sound_map); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag("soundcpu"); SPEAKER(config, "mono").front_center(); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 3000000)); + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(3000000))); ymsnd.irq_handler().set_inputline("soundcpu", 0); ymsnd.port_a_write_callback().set(FUNC(cucaracha_state::ym_porta_w)); ymsnd.add_route(0, "mono", 0.25); @@ -164,7 +164,7 @@ void cucaracha_state::cucaracha(machine_config &config) ymsnd.add_route(2, "mono", 0.25); ymsnd.add_route(3, "mono", 0.80); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified } INPUT_PORTS_START( cucaracha ) diff --git a/src/mame/taito/darius.cpp b/src/mame/taito/darius.cpp index e0ebc55a42f..7765b5fb010 100644 --- a/src/mame/taito/darius.cpp +++ b/src/mame/taito/darius.cpp @@ -746,7 +746,7 @@ void darius_state::darius(machine_config &config) rscreen.set_screen_update(FUNC(darius_state::screen_update_right)); rscreen.set_palette(m_palette); - PC080SN(config, m_pc080sn, 0); + PC080SN(config, m_pc080sn); m_pc080sn->set_gfx_region(1); m_pc080sn->set_offsets(-16, 8); m_pc080sn->set_yinvert(0); @@ -800,7 +800,7 @@ void darius_state::darius(machine_config &config) FILTER_VOLUME(config, m_msm5205_l).add_route(ALL_OUTPUTS, "lspeaker", 1.0); FILTER_VOLUME(config, m_msm5205_r).add_route(ALL_OUTPUTS, "rspeaker", 1.0); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/exzisus.cpp b/src/mame/taito/exzisus.cpp index 0cfabe05562..1f7f4df5ef7 100644 --- a/src/mame/taito/exzisus.cpp +++ b/src/mame/taito/exzisus.cpp @@ -369,19 +369,19 @@ GFXDECODE_END void exzisus_state::exzisus(machine_config &config) { // basic machine hardware - z80_device &cpua(Z80(config, "cpua", 6000000)); + z80_device &cpua(Z80(config, "cpua", XTAL::u(6000000))); cpua.set_addrmap(AS_PROGRAM, &exzisus_state::cpua_map); cpua.set_vblank_int("screen", FUNC(exzisus_state::irq0_line_hold)); - z80_device &cpub(Z80(config, "cpub", 6000000)); + z80_device &cpub(Z80(config, "cpub", XTAL::u(6000000))); cpub.set_addrmap(AS_PROGRAM, &exzisus_state::cpub_map); cpub.set_vblank_int("screen", FUNC(exzisus_state::irq0_line_hold)); - Z80(config, m_cpuc, 6000000); + Z80(config, m_cpuc, XTAL::u(6000000)); m_cpuc->set_addrmap(AS_PROGRAM, &exzisus_state::cpuc_map); m_cpuc->set_vblank_int("screen", FUNC(exzisus_state::irq0_line_hold)); - z80_device &audiocpu(Z80(config, "audiocpu", 4000000)); + z80_device &audiocpu(Z80(config, "audiocpu", XTAL::u(4000000))); audiocpu.set_addrmap(AS_PROGRAM, &exzisus_state::sound_map); config.set_maximum_quantum(attotime::from_hz(600)); // 10 CPU slices per frame - enough for the sound CPU to read all commands @@ -401,12 +401,12 @@ void exzisus_state::exzisus(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 4000000)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(4000000))); ymsnd.irq_handler().set_inputline("audiocpu", 0); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag("cpub"); ciu.set_slave_tag("audiocpu"); } diff --git a/src/mame/taito/flstory.cpp b/src/mame/taito/flstory.cpp index 61c1b860762..46cfe6f3365 100644 --- a/src/mame/taito/flstory.cpp +++ b/src/mame/taito/flstory.cpp @@ -795,7 +795,7 @@ void flstory_state::common(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC } void flstory_state::flstory(machine_config &config) diff --git a/src/mame/taito/galastrm.cpp b/src/mame/taito/galastrm.cpp index 275b42f159e..5e5afa6322b 100644 --- a/src/mame/taito/galastrm.cpp +++ b/src/mame/taito/galastrm.cpp @@ -835,12 +835,12 @@ void galastrm_state::galastrm(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - adc0809_device &adc(ADC0809(config, "adc", 500'000)); // unknown clock + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500'000))); // unknown clock adc.eoc_ff_callback().set_inputline("maincpu", 6); adc.in_callback<0>().set_ioport("STICKX"); adc.in_callback<1>().set_ioport("STICKY"); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_2_callback().set_ioport("IN0"); tc0510nio.read_3_callback().set_ioport("IN1"); tc0510nio.write_3_callback().set("eeprom", FUNC(eeprom_serial_93cxx_device::clk_write)).bit(5); @@ -860,21 +860,21 @@ void galastrm_state::galastrm(machine_config &config) GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_galastrm); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_offsets(-48, -56); m_tc0100scn->set_palette(m_tc0110pcr); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_tc0110pcr); m_tc0480scp->set_offsets(-40, -3); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - taito_en_device &taito_en(TAITO_EN(config, "taito_en", 0)); + taito_en_device &taito_en(TAITO_EN(config, "taito_en")); taito_en.add_route(0, "lspeaker", 1.0); taito_en.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/taito/gladiatr.cpp b/src/mame/taito/gladiatr.cpp index b53e677cd39..82eb3f358db 100644 --- a/src/mame/taito/gladiatr.cpp +++ b/src/mame/taito/gladiatr.cpp @@ -1083,7 +1083,7 @@ void gladiatr_state::gladiatr(machine_config &config) m_msm->set_prescaler_selector(msm5205_device::SEX_4B); /* vclk input mode */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.60); - LS259(config, "filtlatch", 0); // 9R - filters on sound output + LS259(config, "filtlatch"); // 9R - filters on sound output } void gladiatr_state::greatgur(machine_config &config) diff --git a/src/mame/taito/grchamp.cpp b/src/mame/taito/grchamp.cpp index 82a47717bfb..66ee3ba30e2 100644 --- a/src/mame/taito/grchamp.cpp +++ b/src/mame/taito/grchamp.cpp @@ -72,8 +72,8 @@ * *************************************/ -#define MASTER_CLOCK (18432000) -#define SOUND_CLOCK (6000000) +#define MASTER_CLOCK XTAL::u(18432000) +#define SOUND_CLOCK XTAL::u(6000000) #define PIXEL_CLOCK (MASTER_CLOCK/3) diff --git a/src/mame/taito/groundfx.cpp b/src/mame/taito/groundfx.cpp index 9005cc6e879..58fed0e0287 100644 --- a/src/mame/taito/groundfx.cpp +++ b/src/mame/taito/groundfx.cpp @@ -552,14 +552,14 @@ void groundfx_state::groundfx(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - adc0809_device &adc(ADC0809(config, "adc", 500'000)); // unknown clock + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500'000))); // unknown clock adc.eoc_ff_callback().set_inputline("maincpu", 5); adc.in_callback<0>().set_constant(0); // unknown adc.in_callback<1>().set_constant(0); // unknown (used to be labeled 'volume' - but doesn't seem to affect it) adc.in_callback<2>().set_ioport("WHEEL"); adc.in_callback<3>().set_ioport("ACCEL"); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_2_callback().set_ioport("BUTTONS"); tc0510nio.read_3_callback().set("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)).lshift(7); tc0510nio.read_3_callback().append(FUNC(groundfx_state::frame_counter_r)).lshift(0); @@ -581,11 +581,11 @@ void groundfx_state::groundfx(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_groundfx); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 16384); - TC0620SCC(config, m_tc0620scc, 0); + TC0620SCC(config, m_tc0620scc); m_tc0620scc->set_offsets(50, 8); m_tc0620scc->set_palette(m_palette); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x24, 0); m_tc0480scp->set_offsets_tx(-1, 0); @@ -594,7 +594,7 @@ void groundfx_state::groundfx(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - taito_en_device &taito_en(TAITO_EN(config, "taito_en", 0)); + taito_en_device &taito_en(TAITO_EN(config, "taito_en")); taito_en.add_route(0, "lspeaker", 1.0); taito_en.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/taito/gsword.cpp b/src/mame/taito/gsword.cpp index 58477591c90..9e6452c1b48 100644 --- a/src/mame/taito/gsword.cpp +++ b/src/mame/taito/gsword.cpp @@ -993,7 +993,7 @@ void gsword_state::gsword(machine_config &config) mcu3.t1_in_cb().set_ioport("COINS").bit(1); // clock unknown, using value from gladiatr - CLOCK(config, "tclk", 12'000'000/8/128/2).signal_handler().set([this] (int state) { m_tclk_val = state != 0; }); + CLOCK(config, "tclk", XTAL::u(12'000'000)/8/128/2).signal_handler().set([this] (int state) { m_tclk_val = state != 0; }); // lazy way to ensure communication works config.set_perfect_quantum("mcu1"); @@ -1017,7 +1017,7 @@ void gsword_state::gsword(machine_config &config) AY8910(config, m_ay0, XTAL(18'000'000)/12).add_route(ALL_OUTPUTS, "mono", 0.30); // Clock verified on PCB - AY8910(config, m_ay1, 1500000); + AY8910(config, m_ay1, XTAL::u(1500000)); m_ay1->port_a_write_callback().set(FUNC(gsword_state::nmi_set_w)); m_ay1->add_route(ALL_OUTPUTS, "mono", 0.30); @@ -1077,11 +1077,11 @@ void josvolly_state::josvolly(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - AY8910(config, m_ay0, 1500000).add_route(ALL_OUTPUTS, "mono", 0.30); - AY8910(config, m_ay1, 1500000).add_route(ALL_OUTPUTS, "mono", 0.30); + AY8910(config, m_ay0, XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.30); + AY8910(config, m_ay1, XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.30); #if 0 - MSM5205(config, "msm", 384000).add_route(ALL_OUTPUTS, "mono", 0.60); + MSM5205(config, "msm", XTAL::u(384000)).add_route(ALL_OUTPUTS, "mono", 0.60); #endif } diff --git a/src/mame/taito/gunbustr.cpp b/src/mame/taito/gunbustr.cpp index 2a607c6fd34..f943695e4b9 100644 --- a/src/mame/taito/gunbustr.cpp +++ b/src/mame/taito/gunbustr.cpp @@ -542,7 +542,7 @@ void gunbustr_state::gunbustr(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_0_callback().set_ioport("EXTRA"); tc0510nio.read_2_callback().set_ioport("INPUTS"); tc0510nio.read_3_callback().set_ioport("SPECIAL"); @@ -564,7 +564,7 @@ void gunbustr_state::gunbustr(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_gunbustr); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 4096); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x20, 0x07); m_tc0480scp->set_offsets_tx(-1, -1); @@ -574,7 +574,7 @@ void gunbustr_state::gunbustr(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - taito_en_device &taito_en(TAITO_EN(config, "taito_en", 0)); + taito_en_device &taito_en(TAITO_EN(config, "taito_en")); taito_en.add_route(0, "lspeaker", 1.0); taito_en.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/taito/heromem.cpp b/src/mame/taito/heromem.cpp index 32a95ac883a..ec34ab1ceee 100644 --- a/src/mame/taito/heromem.cpp +++ b/src/mame/taito/heromem.cpp @@ -241,11 +241,11 @@ void heromem_state::heromem(machine_config &config) rscreen.screen_vblank().set(FUNC(heromem_state::screen_vblank_r)); rscreen.set_palette("tc0091lvc_r:palette"); - pc060ha_device &ciu_l(PC060HA(config, "ciu_l", 0)); + pc060ha_device &ciu_l(PC060HA(config, "ciu_l")); ciu_l.set_master_tag("maincpu"); ciu_l.set_slave_tag(m_tc0091lvc_l); - pc060ha_device &ciu_r(PC060HA(config, "ciu_r", 0)); + pc060ha_device &ciu_r(PC060HA(config, "ciu_r")); ciu_r.set_master_tag("maincpu"); ciu_r.set_slave_tag(m_tc0091lvc_r); @@ -260,11 +260,11 @@ void heromem_state::heromem(machine_config &config) SPEAKER(config, "rspeaker").front_right(); - tc0140syt_device &syt_l(TC0140SYT(config, "tc0140syt_l", 0)); + tc0140syt_device &syt_l(TC0140SYT(config, "tc0140syt_l")); syt_l.set_master_tag("maincpu"); syt_l.set_slave_tag("audiocpu_l"); - tc0140syt_device &syt_r(TC0140SYT(config, "tc0140syt_r", 0)); + tc0140syt_device &syt_r(TC0140SYT(config, "tc0140syt_r")); syt_r.set_master_tag("maincpu"); syt_r.set_slave_tag("audiocpu_r"); diff --git a/src/mame/taito/kikikai.cpp b/src/mame/taito/kikikai.cpp index 44b8acbb836..becc1375023 100644 --- a/src/mame/taito/kikikai.cpp +++ b/src/mame/taito/kikikai.cpp @@ -704,7 +704,7 @@ void kikikai_state::base(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2203(config, m_ymsnd, 3000000); + YM2203(config, m_ymsnd, XTAL::u(3000000)); m_ymsnd->port_a_read_callback().set_ioport("DSW0"); m_ymsnd->port_b_read_callback().set_ioport("DSW1"); m_ymsnd->add_route(0, "mono", 0.30); @@ -754,7 +754,7 @@ void mexico86_state::mexico86_68705(machine_config& config) base(config); m_maincpu->set_irq_acknowledge_callback(FUNC(mexico86_state::mcram_vect_r)); - M68705P3(config, m_68705mcu, 4000000); /* xtal is 4MHz, divided by 4 internally */ + M68705P3(config, m_68705mcu, XTAL::u(4000000)); /* xtal is 4MHz, divided by 4 internally */ m_68705mcu->portc_r().set_ioport("IN0"); m_68705mcu->porta_w().set(FUNC(mexico86_state::mexico86_68705_port_a_w)); m_68705mcu->portb_w().set(FUNC(mexico86_state::mexico86_68705_port_b_w)); diff --git a/src/mame/taito/ksayakyu.cpp b/src/mame/taito/ksayakyu.cpp index de2f2cea0f5..79803a7ac28 100644 --- a/src/mame/taito/ksayakyu.cpp +++ b/src/mame/taito/ksayakyu.cpp @@ -498,7 +498,7 @@ void ksayakyu_state::ksayakyu(machine_config &config) ay2.port_b_write_callback().set(FUNC(ksayakyu_state::dummy3_w)); ay2.add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_6BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_6BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } ROM_START( ksayakyu ) diff --git a/src/mame/taito/lgp.cpp b/src/mame/taito/lgp.cpp index 9b76c5469de..d26ebb9fd79 100644 --- a/src/mame/taito/lgp.cpp +++ b/src/mame/taito/lgp.cpp @@ -413,7 +413,7 @@ void lgp_state::lgp(machine_config &config) audiocpu.set_addrmap(AS_PROGRAM, &lgp_state::sound_program_map); audiocpu.set_addrmap(AS_IO, &lgp_state::sound_io_map); - PIONEER_LDV1000(config, m_laserdisc, 0); + PIONEER_LDV1000(config, m_laserdisc); m_laserdisc->command_strobe_callback().set(FUNC(lgp_state::ld_command_strobe_cb)); m_laserdisc->set_overlay(256, 256, FUNC(lgp_state::screen_update_lgp)); m_laserdisc->add_route(0, "lspeaker", 1.0); diff --git a/src/mame/taito/missb2.cpp b/src/mame/taito/missb2.cpp index 899c2b1d532..3afce610b3f 100644 --- a/src/mame/taito/missb2.cpp +++ b/src/mame/taito/missb2.cpp @@ -509,7 +509,7 @@ void missb2_state::missb2(machine_config &config) m_ym3526->irq_handler().set(FUNC(missb2_state::irqhandler)); m_ym3526->add_route(ALL_OUTPUTS, "mono", 0.40); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "mono", 0.4); } diff --git a/src/mame/taito/mlanding.cpp b/src/mame/taito/mlanding.cpp index 6c914b2f959..abcc10f850d 100644 --- a/src/mame/taito/mlanding.cpp +++ b/src/mame/taito/mlanding.cpp @@ -948,7 +948,7 @@ void mlanding_state::mlanding(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &mlanding_state::audio_map_prog); m_audiocpu->set_addrmap(AS_IO, &mlanding_state::audio_map_io); - Z80(config, m_mechacpu, 4000000); // ? + Z80(config, m_mechacpu, XTAL::u(4000000)); // ? m_mechacpu->set_addrmap(AS_PROGRAM, &mlanding_state::mecha_map_prog); m_mechacpu->set_vblank_int("screen", FUNC(mlanding_state::irq0_line_hold)); @@ -961,13 +961,13 @@ void mlanding_state::mlanding(machine_config &config) Z80CTC(config, m_ctc, 16_MHz_XTAL / 4); m_ctc->zc_callback<0>().set(FUNC(mlanding_state::z80ctc_to0)); - pc060ha_device& ciu(PC060HA(config, "ciu", 0)); + pc060ha_device& ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); config.set_maximum_quantum(attotime::from_hz(600)); - TAITOIO_YOKE(config, m_yoke, 0); + TAITOIO_YOKE(config, m_yoke); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/taito/msisaac.cpp b/src/mame/taito/msisaac.cpp index 256c027b683..38b8b195072 100644 --- a/src/mame/taito/msisaac.cpp +++ b/src/mame/taito/msisaac.cpp @@ -777,16 +777,16 @@ void msisaac_state::machine_reset() void msisaac_state::msisaac(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 4'000'000); + Z80(config, m_maincpu, XTAL::u(4'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &msisaac_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(msisaac_state::irq0_line_hold)); - Z80(config, m_audiocpu, 4'000'000); + Z80(config, m_audiocpu, XTAL::u(4'000'000)); m_audiocpu->set_addrmap(AS_PROGRAM, &msisaac_state::sound_map); m_audiocpu->set_vblank_int("screen", FUNC(msisaac_state::irq0_line_hold)); // source of IRQs is unknown #ifdef USE_MCU - M68705(config, "mcu", 8'000'000 / 2).set_addrmap(AS_PROGRAM, &msisaac_state::buggychl_mcu_map); // 4 MHz + M68705(config, "mcu", XTAL::u(8'000'000) / 2).set_addrmap(AS_PROGRAM, &msisaac_state::buggychl_mcu_map); // 4 MHz BUGGYCHL_MCU(config, m_bmcu, 0); #endif @@ -808,13 +808,13 @@ void msisaac_state::msisaac(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); TA7630(config, m_ta7630); - AY8910(config, "ay1", 2'000'000).add_route(ALL_OUTPUTS, "mono", 0.15); + AY8910(config, "ay1", XTAL::u(2'000'000)).add_route(ALL_OUTPUTS, "mono", 0.15); // port A/B likely to be TA7630 filters - AY8910(config, "ay2", 2'000'000).add_route(ALL_OUTPUTS, "mono", 0.15); + AY8910(config, "ay2", XTAL::u(2'000'000)).add_route(ALL_OUTPUTS, "mono", 0.15); // port A/B likely to be TA7630 filters - MSM5232(config, m_msm, 2'000'000); + MSM5232(config, m_msm, XTAL::u(2'000'000)); m_msm->set_capacitors(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6); // 0.65 (???) uF capacitors (match the sample, not verified) m_msm->add_route(0, "mono", 1.0); // pin 28 2'-1 m_msm->add_route(1, "mono", 1.0); // pin 29 4'-1 diff --git a/src/mame/taito/ninjaw.cpp b/src/mame/taito/ninjaw.cpp index 749cb233f38..d76d4b91f36 100644 --- a/src/mame/taito/ninjaw.cpp +++ b/src/mame/taito/ninjaw.cpp @@ -611,7 +611,7 @@ class subwoofer_device : public device_t, public device_sound_interface { public: - subwoofer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + subwoofer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~subwoofer_device() {} protected: @@ -630,7 +630,7 @@ extern const device_type SUBWOOFER; const device_type SUBWOOFER = device_creator; -subwoofer_device::subwoofer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +subwoofer_device::subwoofer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SUBWOOFER, "Subwoofer", tag, owner, clock), device_sound_interface(mconfig, *this) { @@ -719,7 +719,7 @@ void ninjaw_state::ninjaw(machine_config &config) config.set_maximum_quantum(attotime::from_hz(16000000/1024)); /* CPU slices */ //config.m_perfect_cpu_quantum = subtag("maincpu"); - tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc", 0)); + tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc")); tc0040ioc.read_0_callback().set_ioport("DSWA"); tc0040ioc.read_1_callback().set_ioport("DSWB"); tc0040ioc.read_2_callback().set_ioport("IN0"); @@ -758,29 +758,29 @@ void ninjaw_state::ninjaw(machine_config &config) rscreen.set_screen_update(FUNC(ninjaw_state::screen_update_right)); rscreen.set_palette(m_tc0110pcr[2]); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(22, 0); m_tc0100scn[0]->set_multiscr_xoffs(0); m_tc0100scn[0]->set_multiscr_hack(0); m_tc0100scn[0]->set_palette(m_tc0110pcr[0]); - TC0110PCR(config, m_tc0110pcr[0], 0); + TC0110PCR(config, m_tc0110pcr[0]); - TC0100SCN(config, m_tc0100scn[1], 0); + TC0100SCN(config, m_tc0100scn[1]); m_tc0100scn[1]->set_offsets(22, 0); m_tc0100scn[1]->set_multiscr_xoffs(2); m_tc0100scn[1]->set_multiscr_hack(1); m_tc0100scn[1]->set_palette(m_tc0110pcr[1]); - TC0110PCR(config, m_tc0110pcr[1], 0); + TC0110PCR(config, m_tc0110pcr[1]); - TC0100SCN(config, m_tc0100scn[2], 0); + TC0100SCN(config, m_tc0100scn[2]); m_tc0100scn[2]->set_offsets(22, 0); m_tc0100scn[2]->set_multiscr_xoffs(4); m_tc0100scn[2]->set_multiscr_hack(1); m_tc0100scn[2]->set_palette(m_tc0110pcr[2]); - TC0110PCR(config, m_tc0110pcr[2], 0); + TC0110PCR(config, m_tc0110pcr[2]); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -800,9 +800,9 @@ void ninjaw_state::ninjaw(machine_config &config) FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); -// SUBWOOFER(config, "subwoofer", 0); +// SUBWOOFER(config, "subwoofer"); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_maincpu); m_tc0140syt->set_slave_tag("audiocpu"); } @@ -825,7 +825,7 @@ void ninjaw_state::darius2(machine_config &config) config.set_maximum_quantum(attotime::from_hz(16000000/1024)); /* CPU slices */ //config.m_perfect_cpu_quantum = subtag("maincpu"); - tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc", 0)); + tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc")); tc0040ioc.read_0_callback().set_ioport("DSWA"); tc0040ioc.read_1_callback().set_ioport("DSWB"); tc0040ioc.read_2_callback().set_ioport("IN0"); @@ -864,29 +864,29 @@ void ninjaw_state::darius2(machine_config &config) rscreen.set_screen_update(FUNC(ninjaw_state::screen_update_right)); rscreen.set_palette(m_tc0110pcr[2]); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(22, 0); m_tc0100scn[0]->set_multiscr_xoffs(0); m_tc0100scn[0]->set_multiscr_hack(0); m_tc0100scn[0]->set_palette(m_tc0110pcr[0]); - TC0110PCR(config, m_tc0110pcr[0], 0); + TC0110PCR(config, m_tc0110pcr[0]); - TC0100SCN(config, m_tc0100scn[1], 0); + TC0100SCN(config, m_tc0100scn[1]); m_tc0100scn[1]->set_offsets(22, 0); m_tc0100scn[1]->set_multiscr_xoffs(2); m_tc0100scn[1]->set_multiscr_hack(1); m_tc0100scn[1]->set_palette(m_tc0110pcr[1]); - TC0110PCR(config, m_tc0110pcr[1], 0); + TC0110PCR(config, m_tc0110pcr[1]); - TC0100SCN(config, m_tc0100scn[2], 0); + TC0100SCN(config, m_tc0100scn[2]); m_tc0100scn[2]->set_offsets(22, 0); m_tc0100scn[2]->set_multiscr_xoffs(4); m_tc0100scn[2]->set_multiscr_hack(1); m_tc0100scn[2]->set_palette(m_tc0110pcr[2]); - TC0110PCR(config, m_tc0110pcr[2], 0); + TC0110PCR(config, m_tc0110pcr[2]); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -906,9 +906,9 @@ void ninjaw_state::darius2(machine_config &config) FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); -// SUBWOOFER(config, "subwoofer", 0); +// SUBWOOFER(config, "subwoofer"); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_maincpu); m_tc0140syt->set_slave_tag("audiocpu"); } diff --git a/src/mame/taito/nycaptor.cpp b/src/mame/taito/nycaptor.cpp index 3e9a67904a8..477a9d38dc8 100644 --- a/src/mame/taito/nycaptor.cpp +++ b/src/mame/taito/nycaptor.cpp @@ -746,7 +746,7 @@ void nycaptor_state::nycaptor(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &nycaptor_state::sound_map); m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), attotime::from_hz(2*60)); /* IRQ generated by ??? */ - TAITO68705_MCU(config, m_bmcu, 2000000); + TAITO68705_MCU(config, m_bmcu, XTAL::u(2000000)); config.set_maximum_quantum(attotime::from_hz(6000)); /* 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs */ @@ -781,7 +781,7 @@ void nycaptor_state::nycaptor(machine_config &config) ay2.port_b_write_callback().set(FUNC(nycaptor_state::unk_w)); ay2.add_route(ALL_OUTPUTS, "speaker", 0.15); - MSM5232(config, m_msm, 2000000); + MSM5232(config, m_msm, XTAL::u(2000000)); m_msm->set_capacitors(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6); /* 0.65 (???) uF capacitors (match the sample, not verified) */ m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 @@ -795,7 +795,7 @@ void nycaptor_state::nycaptor(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } void nycaptor_state::cyclshtg(machine_config &config) @@ -814,7 +814,7 @@ void nycaptor_state::cyclshtg(machine_config &config) m_audiocpu->set_periodic_int(FUNC(nycaptor_state::irq0_line_hold), attotime::from_hz(2*60)); #ifdef USE_MCU - TAITO68705_MCU(config, m_bmcu, 2000000); + TAITO68705_MCU(config, m_bmcu, XTAL::u(2000000)); #endif config.set_maximum_quantum(attotime::from_hz(60)); @@ -848,7 +848,7 @@ void nycaptor_state::cyclshtg(machine_config &config) ay2.port_b_write_callback().set(FUNC(nycaptor_state::unk_w)); ay2.add_route(ALL_OUTPUTS, "speaker", 0.15); - MSM5232(config, m_msm, 2000000); + MSM5232(config, m_msm, XTAL::u(2000000)); m_msm->set_capacitors(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6); /* 0.65 (???) uF capacitors (match the sample, not verified) */ m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 @@ -862,7 +862,7 @@ void nycaptor_state::cyclshtg(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } @@ -912,7 +912,7 @@ void nycaptor_state::bronx(machine_config &config) ay2.port_b_write_callback().set(FUNC(nycaptor_state::unk_w)); ay2.add_route(ALL_OUTPUTS, "speaker", 0.15); - MSM5232(config, m_msm, 2000000); + MSM5232(config, m_msm, XTAL::u(2000000)); m_msm->set_capacitors(0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6, 0.65e-6); /* 0.65 (???) uF capacitors (match the sample, not verified) */ m_msm->add_route(0, "speaker", 1.0); // pin 28 2'-1 m_msm->add_route(1, "speaker", 1.0); // pin 29 4'-1 @@ -926,7 +926,7 @@ void nycaptor_state::bronx(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/taito/opwolf.cpp b/src/mame/taito/opwolf.cpp index 4522de07852..5558dd114d0 100644 --- a/src/mame/taito/opwolf.cpp +++ b/src/mame/taito/opwolf.cpp @@ -916,11 +916,11 @@ void opwolf_state::opwolf(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_opwolf); PALETTE(config, "palette").set_format(palette_device::xRGBRRRRGGGGBBBB_bit0, 2048); - PC080SN(config, m_pc080sn, 0); + PC080SN(config, m_pc080sn); m_pc080sn->set_gfx_region(0); m_pc080sn->set_gfxdecode_tag("gfxdecode"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_palette("palette"); m_pc090oj->set_colpri_callback(FUNC(opwolf_state::opwolf_colpri_cb)); @@ -934,19 +934,19 @@ void opwolf_state::opwolf(machine_config &config) ymsnd.add_route(0, "lspeaker", 1.0); ymsnd.add_route(1, "rspeaker", 1.0); - MSM5205(config, m_msm[0], 384000); + MSM5205(config, m_msm[0], XTAL::u(384000)); m_msm[0]->vck_legacy_callback().set(FUNC(opwolf_state::msm5205_vck_w<0>)); m_msm[0]->set_prescaler_selector(msm5205_device::S48_4B); /* 8 kHz */ m_msm[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - MSM5205(config, m_msm[1], 384000); + MSM5205(config, m_msm[1], XTAL::u(384000)); m_msm[1]->vck_legacy_callback().set(FUNC(opwolf_state::msm5205_vck_w<1>)); m_msm[1]->set_prescaler_selector(msm5205_device::S48_4B); /* 8 kHz */ m_msm[1]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm[1]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -990,11 +990,11 @@ void opwolf_state::opwolfb(machine_config &config) /* OSC clocks unknown for the GFXDECODE(config, "gfxdecode", "palette", gfx_opwolf); PALETTE(config, "palette").set_format(palette_device::xRGBRRRRGGGGBBBB_bit0, 2048); - PC080SN(config, m_pc080sn, 0); + PC080SN(config, m_pc080sn); m_pc080sn->set_gfx_region(0); m_pc080sn->set_gfxdecode_tag("gfxdecode"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_palette("palette"); m_pc090oj->set_colpri_callback(FUNC(opwolf_state::opwolf_colpri_cb)); @@ -1008,19 +1008,19 @@ void opwolf_state::opwolfb(machine_config &config) /* OSC clocks unknown for the ymsnd.add_route(0, "lspeaker", 1.0); ymsnd.add_route(1, "rspeaker", 1.0); - MSM5205(config, m_msm[0], 384000); + MSM5205(config, m_msm[0], XTAL::u(384000)); m_msm[0]->vck_legacy_callback().set(FUNC(opwolf_state::msm5205_vck_w<0>)); m_msm[0]->set_prescaler_selector(msm5205_device::S48_4B); /* 8 kHz */ m_msm[0]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm[0]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - MSM5205(config, m_msm[1], 384000); + MSM5205(config, m_msm[1], XTAL::u(384000)); m_msm[1]->vck_legacy_callback().set(FUNC(opwolf_state::msm5205_vck_w<1>)); m_msm[1]->set_prescaler_selector(msm5205_device::S48_4B); /* 8 kHz */ m_msm[1]->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_msm[1]->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/othunder.cpp b/src/mame/taito/othunder.cpp index 28fd747168f..f20826a70c9 100644 --- a/src/mame/taito/othunder.cpp +++ b/src/mame/taito/othunder.cpp @@ -595,7 +595,7 @@ void othunder_state::othunder(machine_config &config) adc.in_callback<2>().set_ioport("P2X"); adc.in_callback<3>().set_ioport("P2Y"); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -616,11 +616,11 @@ void othunder_state::othunder(machine_config &config) GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_othunder); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_offsets(4, 0); m_tc0100scn->set_palette(m_tc0110pcr); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); /* sound hardware */ SPEAKER(config, "speaker").front_center(); @@ -641,7 +641,7 @@ void othunder_state::othunder(machine_config &config) FILTER_VOLUME(config, "2610.2l").add_route(ALL_OUTPUTS, "speaker", 1.0); FILTER_VOLUME(config, "2610.2r").add_route(ALL_OUTPUTS, "speaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_maincpu); m_tc0140syt->set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/pc080sn.cpp b/src/mame/taito/pc080sn.cpp index 4de91c850cb..7205bf29dd7 100644 --- a/src/mame/taito/pc080sn.cpp +++ b/src/mame/taito/pc080sn.cpp @@ -51,7 +51,7 @@ Control registers DEFINE_DEVICE_TYPE(PC080SN, pc080sn_device, "pc080sn", "Taito PC080SN") -pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC080SN, tag, owner, clock), m_ram(nullptr), m_gfxnum(0), diff --git a/src/mame/taito/pc080sn.h b/src/mame/taito/pc080sn.h index 7396913d260..9deb845f315 100644 --- a/src/mame/taito/pc080sn.h +++ b/src/mame/taito/pc080sn.h @@ -11,7 +11,7 @@ class pc080sn_device : public device_t { public: - pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/taito/pc090oj.cpp b/src/mame/taito/pc090oj.cpp index 2f283eff2d5..7117a5a5be5 100644 --- a/src/mame/taito/pc090oj.cpp +++ b/src/mame/taito/pc090oj.cpp @@ -74,7 +74,7 @@ static constexpr u32 PC090OJ_ACTIVE_RAM_SIZE = 0x800; DEFINE_DEVICE_TYPE(PC090OJ, pc090oj_device, "pc090oj", "Taito PC090OJ") -pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC090OJ, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , m_colpri_cb(*this) diff --git a/src/mame/taito/pc090oj.h b/src/mame/taito/pc090oj.h index 42a5b5bd245..a98b9f02a24 100644 --- a/src/mame/taito/pc090oj.h +++ b/src/mame/taito/pc090oj.h @@ -10,7 +10,7 @@ class pc090oj_device : public device_t, public device_gfx_interface public: typedef device_delegate colpri_cb_delegate; - pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_usebuffer(bool use_buf) { m_use_buffer = use_buf; } diff --git a/src/mame/taito/qix.cpp b/src/mame/taito/qix.cpp index b05b930de1f..0564733b4b8 100644 --- a/src/mame/taito/qix.cpp +++ b/src/mame/taito/qix.cpp @@ -612,17 +612,17 @@ void qix_state::qix_base(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpa_handler().set_ioport("P1"); m_pia0->set_port_a_input_overrides_output_mask(0xff); m_pia0->readpb_handler().set_ioport("COIN"); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set_ioport("SPARE"); m_pia1->set_port_a_input_overrides_output_mask(0xff); m_pia1->readpb_handler().set_ioport("IN0"); - PIA6821(config, m_pia2, 0); + PIA6821(config, m_pia2); m_pia2->readpa_handler().set_ioport("P2"); m_pia2->set_port_a_input_overrides_output_mask(0xff); m_pia2->writepb_handler().set(FUNC(qix_state::qix_coinctl_w)); diff --git a/src/mame/taito/qix_a.cpp b/src/mame/taito/qix_a.cpp index 0d91566498b..a9e446f2736 100644 --- a/src/mame/taito/qix_a.cpp +++ b/src/mame/taito/qix_a.cpp @@ -177,7 +177,7 @@ void qix_state::qix_audio(machine_config &config) M6802(config, m_audiocpu, SOUND_CLOCK_OSC/2); /* 0.92 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &qix_state::audio_map); - PIA6821(config, m_sndpia0, 0); + PIA6821(config, m_sndpia0); m_sndpia0->writepa_handler().set(FUNC(qix_state::sync_sndpia1_porta_w)); m_sndpia0->writepb_handler().set(FUNC(qix_state::qix_vol_w)); m_sndpia0->ca2_handler().set("sndpia1", FUNC(pia6821_device::ca1_w)); @@ -185,14 +185,14 @@ void qix_state::qix_audio(machine_config &config) m_sndpia0->irqa_handler().set(FUNC(qix_state::qix_pia_dint)); m_sndpia0->irqb_handler().set(FUNC(qix_state::qix_pia_dint)); - PIA6821(config, m_sndpia1, 0); + PIA6821(config, m_sndpia1); m_sndpia1->writepa_handler().set("sndpia0", FUNC(pia6821_device::porta_w)); m_sndpia1->writepb_handler().set(FUNC(qix_state::qix_dac_w)); m_sndpia1->ca2_handler().set("sndpia0", FUNC(pia6821_device::ca1_w)); m_sndpia1->irqa_handler().set(FUNC(qix_state::qix_pia_sint)); m_sndpia1->irqb_handler().set(FUNC(qix_state::qix_pia_sint)); - PIA6821(config, m_sndpia2, 0); + PIA6821(config, m_sndpia2); m_sndpia2->writepa_handler().set(FUNC(qix_state::sndpia_2_warning_w)); m_sndpia2->writepb_handler().set(FUNC(qix_state::sndpia_2_warning_w)); m_sndpia2->ca2_handler().set(FUNC(qix_state::sndpia_2_warning_w)); @@ -208,7 +208,7 @@ void qix_state::qix_audio(machine_config &config) void qix_state::slither_audio(machine_config &config) { - PIA6821(config, m_sndpia0, 0); + PIA6821(config, m_sndpia0); m_sndpia0->readpa_handler().set_ioport("P2"); m_sndpia0->writepb_handler().set(FUNC(qix_state::slither_coinctl_w)); m_sndpia0->cb2_handler().set(FUNC(qix_state::qix_flip_screen_w)); diff --git a/src/mame/taito/rastan.cpp b/src/mame/taito/rastan.cpp index 892e281497e..6b47d33c407 100644 --- a/src/mame/taito/rastan.cpp +++ b/src/mame/taito/rastan.cpp @@ -455,10 +455,10 @@ void rastan_state::rastan(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_rastan); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 2048); - PC080SN(config, m_pc080sn, 0); + PC080SN(config, m_pc080sn); m_pc080sn->set_gfxdecode_tag("gfxdecode"); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_palette("palette"); m_pc090oj->set_colpri_callback(FUNC(rastan_state::colpri_cb)); @@ -476,10 +476,10 @@ void rastan_state::rastan(machine_config &config) m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8 kHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.60); - LS157(config, m_adpcm_sel, 0); + LS157(config, m_adpcm_sel); m_adpcm_sel->out_callback().set(m_msm, FUNC(msm5205_device::data_w)); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/rbisland.cpp b/src/mame/taito/rbisland.cpp index c3cc256d63f..3b3743eb8dc 100644 --- a/src/mame/taito/rbisland.cpp +++ b/src/mame/taito/rbisland.cpp @@ -842,11 +842,11 @@ void rbisland_state::rbisland(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_rbisland); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); - PC080SN(config, m_pc080sn, 0); + PC080SN(config, m_pc080sn); m_pc080sn->set_gfx_region(0); m_pc080sn->set_gfxdecode_tag(m_gfxdecode); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_palette(m_palette); m_pc090oj->set_colpri_callback(FUNC(rbisland_state::colpri_cb)); @@ -859,7 +859,7 @@ void rbisland_state::rbisland(machine_config &config) ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.50); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -890,7 +890,7 @@ void jumping_state::jumping(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_jumping); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 2048); - PC080SN(config, m_pc080sn, 0); + PC080SN(config, m_pc080sn); m_pc080sn->set_gfx_region(1); m_pc080sn->set_yinvert(1); m_pc080sn->set_gfxdecode_tag(m_gfxdecode); diff --git a/src/mame/taito/scyclone.cpp b/src/mame/taito/scyclone.cpp index 8189389ae23..b8d43bb6325 100644 --- a/src/mame/taito/scyclone.cpp +++ b/src/mame/taito/scyclone.cpp @@ -651,9 +651,9 @@ void scyclone_state::scyclone(machine_config &config) // this is just taken from route16.cpp - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } ROM_START( scyclone ) diff --git a/src/mame/taito/slapshot.cpp b/src/mame/taito/slapshot.cpp index 903b9094658..08f95f05944 100644 --- a/src/mame/taito/slapshot.cpp +++ b/src/mame/taito/slapshot.cpp @@ -407,7 +407,7 @@ void slapshot_state::slapshot(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0640FIO(config, m_tc0640fio, 0); + TC0640FIO(config, m_tc0640fio); m_tc0640fio->read_1_callback().set_ioport("COINS"); m_tc0640fio->read_2_callback().set_ioport("BUTTONS"); m_tc0640fio->read_3_callback().set_ioport("SYSTEM"); @@ -427,14 +427,14 @@ void slapshot_state::slapshot(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_slapshot); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 8192); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(30 + 3, 9); m_tc0480scp->set_offsets_tx(-1, -1); m_tc0480scp->set_offsets_flip(0, 2); m_tc0480scp->set_col_base(4096); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -447,9 +447,9 @@ void slapshot_state::slapshot(machine_config &config) ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - MK48T08(config, "mk48t08", 0); + MK48T08(config, "mk48t08"); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_maincpu); m_tc0140syt->set_slave_tag("audiocpu"); } @@ -466,14 +466,14 @@ void slapshot_state::opwolf3(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - adc0809_device &adc(ADC0809(config, "adc", 500000)); // unknown clock + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500000))); // unknown clock adc.eoc_ff_callback().set_inputline("maincpu", 3); adc.in_callback<0>().set_ioport("GUN1X"); adc.in_callback<1>().set_ioport("GUN1Y"); adc.in_callback<2>().set_ioport("GUN2X"); adc.in_callback<3>().set_ioport("GUN2Y"); - TC0640FIO(config, m_tc0640fio, 0); + TC0640FIO(config, m_tc0640fio); m_tc0640fio->read_1_callback().set_ioport("COINS"); m_tc0640fio->read_2_callback().set_ioport("BUTTONS"); m_tc0640fio->read_3_callback().set_ioport("SYSTEM"); @@ -493,14 +493,14 @@ void slapshot_state::opwolf3(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_slapshot); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 8192); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(30 + 3, 9); m_tc0480scp->set_offsets_tx(-1, -1); m_tc0480scp->set_offsets_flip(0, 2); m_tc0480scp->set_col_base(4096); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -513,9 +513,9 @@ void slapshot_state::opwolf3(machine_config &config) ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - MK48T08(config, "mk48t08", 0); + MK48T08(config, "mk48t08"); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_maincpu); m_tc0140syt->set_slave_tag("audiocpu"); } diff --git a/src/mame/taito/spdheat.cpp b/src/mame/taito/spdheat.cpp index 361be000320..30e279cc606 100644 --- a/src/mame/taito/spdheat.cpp +++ b/src/mame/taito/spdheat.cpp @@ -773,7 +773,7 @@ void spdheat_state::spdheat(machine_config &config) ym4.port_b_write_callback().set(FUNC(spdheat_state::ym4_port_b_w)); ym4.add_route(ALL_OUTPUTS, "mono", 0.3); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.3); + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "mono", 0.3); } diff --git a/src/mame/taito/superchs.cpp b/src/mame/taito/superchs.cpp index 09652827800..f46f1977ccf 100644 --- a/src/mame/taito/superchs.cpp +++ b/src/mame/taito/superchs.cpp @@ -215,13 +215,13 @@ void superchs_state::superchs(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - adc0809_device &adc(ADC0809(config, "adc", 500000)); // unknown clock + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500000))); // unknown clock adc.eoc_ff_callback().set_inputline("maincpu", 3); adc.in_callback<0>().set_ioport("WHEEL"); adc.in_callback<1>().set_ioport("ACCEL"); adc.in_callback<2>().set(FUNC(superchs_state::volume_r)); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_1_callback().set_ioport("COINS"); tc0510nio.read_2_callback().set_ioport("SWITCHES"); tc0510nio.read_3_callback().set(m_eeprom, FUNC(eeprom_serial_93cxx_device::do_read)).lshift(7); @@ -243,7 +243,7 @@ void superchs_state::superchs(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_superchs); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 8192); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x20, 0x08); m_tc0480scp->set_offsets_tx(-1, 0); @@ -252,7 +252,7 @@ void superchs_state::superchs(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - taito_en_device &taito_en(TAITO_EN(config, "taito_en", 0)); + taito_en_device &taito_en(TAITO_EN(config, "taito_en")); taito_en.add_route(0, "lspeaker", 1.0); taito_en.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/taito/taito_b.cpp b/src/mame/taito/taito_b.cpp index 2364396902f..349984c236a 100644 --- a/src/mame/taito/taito_b.cpp +++ b/src/mame/taito/taito_b.cpp @@ -1870,7 +1870,7 @@ void taitob_state::rastsag2(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -1907,7 +1907,7 @@ void taitob_state::rastsag2(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -1924,7 +1924,7 @@ void taitob_state::masterw(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc", 0)); + tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc")); tc0040ioc.read_0_callback().set_ioport("DSWA"); tc0040ioc.read_1_callback().set_ioport("DSWB"); tc0040ioc.read_2_callback().set_ioport("IN0"); @@ -1963,7 +1963,7 @@ void taitob_state::masterw(machine_config &config) ymsnd.add_route(2, "mono", 0.25); ymsnd.add_route(3, "mono", 0.80); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -1995,7 +1995,7 @@ void taitob_state::ashura(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2032,7 +2032,7 @@ void taitob_state::ashura(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2049,7 +2049,7 @@ void taitob_state::crimec(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2086,7 +2086,7 @@ void taitob_state::crimec(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2103,7 +2103,7 @@ void hitice_state::hitice(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2142,10 +2142,10 @@ void hitice_state::hitice(machine_config &config) ymsnd.add_route(2, "mono", 0.25); ymsnd.add_route(3, "mono", 0.80); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "mono", 0.50); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -2162,7 +2162,7 @@ void taitob_state::rambo3p(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2199,7 +2199,7 @@ void taitob_state::rambo3p(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2216,7 +2216,7 @@ void taitob_state::rambo3(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2253,7 +2253,7 @@ void taitob_state::rambo3(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2272,7 +2272,7 @@ void taitob_state::pbobble(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - TC0640FIO(config, m_tc0640fio, 0); + TC0640FIO(config, m_tc0640fio); m_tc0640fio->read_0_callback().set_ioport("SERVICE"); m_tc0640fio->read_1_callback().set_ioport("COIN"); m_tc0640fio->read_2_callback().set_ioport("START"); @@ -2312,7 +2312,7 @@ void taitob_state::pbobble(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2331,7 +2331,7 @@ void taitob_state::spacedx(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - TC0640FIO(config, m_tc0640fio, 0); + TC0640FIO(config, m_tc0640fio); m_tc0640fio->read_0_callback().set_ioport("SERVICE"); m_tc0640fio->read_1_callback().set_ioport("COIN"); m_tc0640fio->read_2_callback().set_ioport("START"); @@ -2371,7 +2371,7 @@ void taitob_state::spacedx(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2388,7 +2388,7 @@ void taitob_state::spacedxo(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2425,7 +2425,7 @@ void taitob_state::spacedxo(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2434,17 +2434,17 @@ void taitob_state::spacedxo(machine_config &config) void taitob_state::qzshowby(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz according to the readme*/ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz according to the readme*/ m_maincpu->set_addrmap(AS_PROGRAM, &taitob_state::qzshowby_map); - Z80(config, m_audiocpu, 4000000); /* 4 MHz */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* 4 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &taitob_state::sound_map); config.set_maximum_quantum(attotime::from_hz(600)); EEPROM_93C46_16BIT(config, "eeprom"); - TC0640FIO(config, m_tc0640fio, 0); + TC0640FIO(config, m_tc0640fio); m_tc0640fio->read_0_callback().set_ioport("SERVICE"); m_tc0640fio->read_1_callback().set_ioport("COIN"); m_tc0640fio->read_2_callback().set_ioport("START"); @@ -2478,13 +2478,13 @@ void taitob_state::qzshowby(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym2610b_device &ymsnd(YM2610B(config, "ymsnd", 8000000)); + ym2610b_device &ymsnd(YM2610B(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.25); ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2501,7 +2501,7 @@ void taitob_state::viofight(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2543,7 +2543,7 @@ void taitob_state::viofight(machine_config &config) okim6295_device &oki(OKIM6295(config, "oki", 4.224_MHz_XTAL / 4, okim6295_device::PIN7_HIGH)); // 1.056MHz clock frequency, but pin 7 not verified oki.add_route(ALL_OUTPUTS, "mono", 0.50); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -2560,7 +2560,7 @@ void taitob_state::silentd(machine_config &config) /* ET910000B PCB */ config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2597,7 +2597,7 @@ void taitob_state::silentd(machine_config &config) /* ET910000B PCB */ ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2614,7 +2614,7 @@ void taitob_state::selfeena(machine_config &config) /* ET910000A PCB */ config.set_maximum_quantum(attotime::from_hz(600)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2651,7 +2651,7 @@ void taitob_state::selfeena(machine_config &config) /* ET910000A PCB */ ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2678,15 +2678,15 @@ void taitob_state::sbm_patch(void) void taitob_state::sbm(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* 12 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &taitob_state::sbm_map); - Z80(config, m_audiocpu, 4000000); /* 4 MHz */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* 4 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &taitob_state::sound_map); config.set_maximum_quantum(attotime::from_hz(600)); - TC0510NIO(config, m_tc0510nio, 0); + TC0510NIO(config, m_tc0510nio); m_tc0510nio->read_0_callback().set_ioport("DSWA"); m_tc0510nio->read_1_callback().set_ioport("DSWB"); m_tc0510nio->read_2_callback().set_ioport("JOY"); @@ -2717,13 +2717,13 @@ void taitob_state::sbm(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym2610b_device &ymsnd(YM2610B(config, "ymsnd", 8000000)); + ym2610b_device &ymsnd(YM2610B(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.25); ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2732,15 +2732,15 @@ void taitob_state::sbm(machine_config &config) void taitob_c_state::realpunc(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); + M68000(config, m_maincpu, XTAL::u(12000000)); m_maincpu->set_addrmap(AS_PROGRAM, &taitob_c_state::realpunc_map); - Z80(config, m_audiocpu, 6000000); + Z80(config, m_audiocpu, XTAL::u(6000000)); m_audiocpu->set_addrmap(AS_PROGRAM, &taitob_c_state::sound_map); config.set_maximum_quantum(attotime::from_hz(600)); - TC0510NIO(config, m_tc0510nio, 0); + TC0510NIO(config, m_tc0510nio); m_tc0510nio->read_0_callback().set_ioport("DSWA"); m_tc0510nio->read_1_callback().set_ioport("DSWB"); m_tc0510nio->read_2_callback().set_ioport("IN0"); @@ -2759,7 +2759,7 @@ void taitob_c_state::realpunc(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096); - hd63484_device &hd63484(HD63484(config, "hd63484", 0)); + hd63484_device &hd63484(HD63484(config, "hd63484")); hd63484.set_addrmap(0, &taitob_c_state::realpunc_hd63484_map); hd63484.set_auto_configure_screen(false); @@ -2775,13 +2775,13 @@ void taitob_c_state::realpunc(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ym2610b_device &ymsnd(YM2610B(config, "ymsnd", 8000000)); + ym2610b_device &ymsnd(YM2610B(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.25); ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/taito_en.cpp b/src/mame/taito/taito_en.cpp index bfda6b59aef..92edc6af376 100644 --- a/src/mame/taito/taito_en.cpp +++ b/src/mame/taito/taito_en.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(TAITO_EN, taito_en_device, "taito_en", "Taito Ensoniq Sound System") -taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TAITO_EN, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , m_audiocpu(*this, "audiocpu") @@ -235,7 +235,7 @@ void taito_en_device::device_add_mconfig(machine_config &config) MB87078(config, m_mb87078); m_mb87078->gain_changed().set(FUNC(taito_en_device::mb87078_gain_changed)); - MB8421(config, "dpram", 0); // host accesses this from the other side + MB8421(config, "dpram"); // host accesses this from the other side /* sound hardware */ ESQ_5505_5510_PUMP(config, m_pump, XTAL(30'476'180) / (2 * 16 * 32)); diff --git a/src/mame/taito/taito_en.h b/src/mame/taito/taito_en.h index 6d7aad2da3f..f924139de02 100644 --- a/src/mame/taito/taito_en.h +++ b/src/mame/taito/taito_en.h @@ -24,7 +24,7 @@ class taito_en_device : public device_t, public device_mixer_interface public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); m68000_device &audiocpu() { return *m_audiocpu; } diff --git a/src/mame/taito/taito_f2.cpp b/src/mame/taito/taito_f2.cpp index 6265ab98a66..c930eb7b874 100644 --- a/src/mame/taito/taito_f2.cpp +++ b/src/mame/taito/taito_f2.cpp @@ -2806,7 +2806,7 @@ void taitof2_state::taito_f2(machine_config &config) ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -2817,7 +2817,7 @@ void taitof2_state::taito_f2_tc0220ioc(machine_config &config) /* basic machine hardware */ config.device_remove("watchdog"); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -2832,7 +2832,7 @@ void taitof2_state::taito_f2_tc0510nio(machine_config &config) /* basic machine hardware */ config.device_remove("watchdog"); - TC0510NIO(config, m_tc0510nio, 0); + TC0510NIO(config, m_tc0510nio); m_tc0510nio->read_0_callback().set_ioport("DSWA"); m_tc0510nio->read_1_callback().set_ioport("DSWB"); m_tc0510nio->read_2_callback().set_ioport("IN0"); @@ -2860,7 +2860,7 @@ void taitof2_state::taito_f2_te7750(machine_config &config) void taitof2_state::taito_f2_tc0110pcr(machine_config &config) { - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); m_gfxdecode->set_palette(m_tc0110pcr); m_screen->set_palette(m_tc0110pcr); } @@ -2879,7 +2879,7 @@ void taitof2_state::finalb(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,finalb) m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(1, 0); m_tc0100scn[0]->set_palette(m_tc0110pcr); } @@ -2896,15 +2896,15 @@ void taitof2_state::dondokod(machine_config &config) m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri_roz)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0280GRD(config, m_tc0280grd, 0); + TC0280GRD(config, m_tc0280grd); m_tc0280grd->set_color_base(0); m_tc0280grd->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::megab(machine_config &config) @@ -2924,11 +2924,11 @@ void taitof2_state::megab(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,megab) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::thundfox(machine_config &config) @@ -2943,13 +2943,13 @@ void taitof2_state::thundfox(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_thundfox)); m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed_thundfox)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_offsets_flip(5, 0); m_tc0100scn[0]->set_offsets_fliptx(4, 1); m_tc0100scn[0]->set_palette(m_palette); - TC0100SCN(config, m_tc0100scn[1], 0); + TC0100SCN(config, m_tc0100scn[1]); m_tc0100scn[1]->set_offsets(3, 0); m_tc0100scn[1]->set_offsets_flip(5, 0); m_tc0100scn[1]->set_offsets_fliptx(4, 1); @@ -2957,7 +2957,7 @@ void taitof2_state::thundfox(machine_config &config) m_tc0100scn[1]->set_multiscr_hack(1); m_tc0100scn[1]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::cameltry(machine_config &config) @@ -2971,15 +2971,15 @@ void taitof2_state::cameltry(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,dondokod) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri_roz)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0280GRD(config, m_tc0280grd, 0); + TC0280GRD(config, m_tc0280grd); m_tc0280grd->set_color_base(0); m_tc0280grd->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::driftoutct(machine_config &config) @@ -3001,7 +3001,7 @@ void taitof2_state::qtorimon(machine_config &config) /* video hardware */ m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_gfxlayout(TC0100SCN_LAYOUT_1BPP); m_tc0100scn[0]->set_palette(m_tc0110pcr); } @@ -3018,11 +3018,11 @@ void taitof2_state::liquidk(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri)); m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::quizhq(machine_config &config) @@ -3037,7 +3037,7 @@ void taitof2_state::quizhq(machine_config &config) /* video hardware */ m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_gfxlayout(TC0100SCN_LAYOUT_1BPP); m_tc0100scn[0]->set_palette(m_tc0110pcr); } @@ -3056,7 +3056,7 @@ void taitof2_state::ssi(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_ssi)); m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed_thundfox)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); } @@ -3075,11 +3075,11 @@ void taitof2_state::gunfront(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri)); m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::growl(machine_config &config) @@ -3095,11 +3095,11 @@ void taitof2_state::growl(machine_config &config) m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 4096); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::mjnquest(machine_config &config) @@ -3114,7 +3114,7 @@ void taitof2_state::mjnquest(machine_config &config) /* video hardware */ MCFG_VIDEO_START_OVERRIDE(taitof2_state,mjnquest) - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_palette(m_tc0110pcr); m_tc0100scn[0]->set_tile_callback(FUNC(taitof2_state::mjnquest_tmap_cb)); } @@ -3131,13 +3131,13 @@ void taitof2_state::footchmp(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_deadconx)); m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_full_buffer_delayed)); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x1d + 3, 0x08); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_offsets_flip(-1, 0); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::footchmpbl(machine_config &config) @@ -3161,9 +3161,9 @@ void taitof2_state::hthero(machine_config &config) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_deadconx)); m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_full_buffer_delayed)); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x33 + 3, -0x04); m_tc0480scp->set_offsets_tx(-1, 0); @@ -3183,12 +3183,12 @@ void taitof2_state::koshien(machine_config &config) m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 4096); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(1, 0); m_tc0100scn[0]->set_offsets_flip(2, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::yuyugogo(machine_config &config) @@ -3204,7 +3204,7 @@ void taitof2_state::yuyugogo(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,yuyugogo) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_yesnoj)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_gfxlayout(TC0100SCN_LAYOUT_1BPP); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); @@ -3231,11 +3231,11 @@ void taitof2_state::ninjak(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,ninjak) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(1, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::solfigtr(machine_config &config) @@ -3249,13 +3249,13 @@ void taitof2_state::solfigtr(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,solfigtr) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_offsets_flip(6, 0); m_tc0100scn[0]->set_offsets_fliptx(6, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::qzquest(machine_config &config) @@ -3268,7 +3268,7 @@ void taitof2_state::qzquest(machine_config &config) /* video hardware */ m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_palette(m_palette); } @@ -3283,15 +3283,15 @@ void taitof2_state::pulirula(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,pulirula) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri_roz)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0430GRW(config, m_tc0430grw, 0); + TC0430GRW(config, m_tc0430grw); m_tc0430grw->set_color_base(0); m_tc0430grw->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::metalb(machine_config &config) @@ -3307,14 +3307,14 @@ void taitof2_state::metalb(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,metalb) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_metalb)); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x32 + 3, -0x04); m_tc0480scp->set_offsets_tx(1, 0); m_tc0480scp->set_offsets_flip(-1, 0); m_tc0480scp->set_col_base(4096); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::qzchikyu(machine_config &config) @@ -3328,7 +3328,7 @@ void taitof2_state::qzchikyu(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,qzchikyu) m_screen->screen_vblank().set(FUNC(taitof2_state::screen_vblank_partial_buffer_delayed_qzchikyu)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(0, 0); m_tc0100scn[0]->set_offsets_flip(-4, 0); m_tc0100scn[0]->set_offsets_fliptx(-11, 0); @@ -3348,7 +3348,7 @@ void taitof2_state::yesnoj(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,yesnoj) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_yesnoj)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_gfxlayout(TC0100SCN_LAYOUT_1BPP); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); @@ -3369,13 +3369,13 @@ void taitof2_state::deadconx(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,deadconx) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_deadconx)); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x1e + 3, 0x08); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_offsets_flip(-1, 0); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::deadconxj(machine_config &config) @@ -3389,13 +3389,13 @@ void taitof2_state::deadconxj(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,deadconxj) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_deadconx)); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x34 + 3, -0x05); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_offsets_flip(-1, 0); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::dinorex(machine_config &config) @@ -3411,11 +3411,11 @@ void taitof2_state::dinorex(machine_config &config) m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 4096); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::qjinsei(machine_config &config) @@ -3431,11 +3431,11 @@ void taitof2_state::qjinsei(machine_config &config) m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 4096); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::qcrayon(machine_config &config) @@ -3451,11 +3451,11 @@ void taitof2_state::qcrayon(machine_config &config) m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 4096); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::qcrayon2(machine_config &config) @@ -3471,11 +3471,11 @@ void taitof2_state::qcrayon2(machine_config &config) m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 4096); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::driftout(machine_config &config) @@ -3489,15 +3489,15 @@ void taitof2_state::driftout(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,driftout) m_screen->set_screen_update(FUNC(taitof2_state::screen_update_pri_roz)); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0430GRW(config, m_tc0430grw, 0); + TC0430GRW(config, m_tc0430grw); m_tc0430grw->set_color_base(0); m_tc0430grw->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); } void taitof2_state::cameltrya(machine_config &config) @@ -3510,7 +3510,7 @@ void taitof2_state::cameltrya(machine_config &config) Z80(config, m_audiocpu, 24000000/4); /* verifed on pcb */ m_audiocpu->set_addrmap(AS_PROGRAM, &taitof2_state::cameltrya_sound_map); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -3533,15 +3533,15 @@ void taitof2_state::cameltrya(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,dondokod) - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0280GRD(config, m_tc0280grd, 0); + TC0280GRD(config, m_tc0280grd); m_tc0280grd->set_color_base(0); m_tc0280grd->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -3557,7 +3557,7 @@ void taitof2_state::cameltrya(machine_config &config) OKIM6295(config, m_oki, XTAL(4'224'000)/4, okim6295_device::PIN7_HIGH); /* verified on pcb */ m_oki->add_route(ALL_OUTPUTS, "mono", 0.10); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -3572,7 +3572,7 @@ void taitof2_state::driveout(machine_config &config) Z80(config, m_audiocpu, 8_MHz_XTAL / 2); // verified on PCB m_audiocpu->set_addrmap(AS_PROGRAM, &taitof2_state::driveout_sound_map); - TC0510NIO(config, m_tc0510nio, 0); + TC0510NIO(config, m_tc0510nio); m_tc0510nio->read_0_callback().set_ioport("DSWA"); m_tc0510nio->read_1_callback().set_ioport("DSWB"); m_tc0510nio->read_2_callback().set_ioport("IN0"); @@ -3595,15 +3595,15 @@ void taitof2_state::driveout(machine_config &config) MCFG_VIDEO_START_OVERRIDE(taitof2_state,driftout) - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(3, 0); m_tc0100scn[0]->set_palette(m_palette); - TC0430GRW(config, m_tc0430grw, 0); + TC0430GRW(config, m_tc0430grw); m_tc0430grw->set_color_base(0); m_tc0430grw->set_palette(m_palette); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); /* does it ? */ @@ -3614,7 +3614,7 @@ void taitof2_state::driveout(machine_config &config) m_oki->add_route(ALL_OUTPUTS, "lspeaker", 1.0); m_oki->add_route(ALL_OUTPUTS, "rspeaker", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/taito_f3.cpp b/src/mame/taito/taito_f3.cpp index 58c63a66249..115cbdbd443 100644 --- a/src/mame/taito/taito_f3.cpp +++ b/src/mame/taito/taito_f3.cpp @@ -476,7 +476,7 @@ void taito_f3_state::f3(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - TAITO_EN(config, m_taito_en, 0); + TAITO_EN(config, m_taito_en); m_taito_en->add_route(0, "lspeaker", 1.0); m_taito_en->add_route(1, "rspeaker", 1.0); } @@ -562,7 +562,7 @@ void taito_f3_state::bubsympb(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH); // not verified + OKIM6295(config, m_oki, XTAL::u(1000000), okim6295_device::PIN7_HIGH); // not verified m_oki->set_addrmap(0, &taito_f3_state::bubsympb_oki_map); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/taito/taito_h.cpp b/src/mame/taito/taito_h.cpp index aebf6c0a9f4..d7a48998a3a 100644 --- a/src/mame/taito/taito_h.cpp +++ b/src/mame/taito/taito_h.cpp @@ -588,7 +588,7 @@ void taitoh_state::taitoh_base(machine_config &config) // video hardware PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 33*16); - TC0080VCO(config, m_tc0080vco, 0); + TC0080VCO(config, m_tc0080vco); m_tc0080vco->set_offsets(1, 1); m_tc0080vco->set_bgflip_yoffs(-2); m_tc0080vco->set_palette(m_palette); @@ -602,7 +602,7 @@ void taitoh_state::taitoh_base(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -615,7 +615,7 @@ void syvalion_state::syvalion(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &syvalion_state::syvalion_map); m_maincpu->set_vblank_int("screen", FUNC(taitoh_state::irq2_line_hold)); - TC0040IOC(config, m_tc0040ioc, 0); + TC0040IOC(config, m_tc0040ioc); m_tc0040ioc->read_0_callback().set_ioport("DSWA"); m_tc0040ioc->read_1_callback().set_ioport("DSWB"); m_tc0040ioc->read_2_callback().set_ioport("IN0"); @@ -641,7 +641,7 @@ void taitoh_state::recordbr(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &taitoh_state::recordbr_map); m_maincpu->set_vblank_int("screen", FUNC(taitoh_state::irq2_line_hold)); - TC0040IOC(config, m_tc0040ioc, 0); + TC0040IOC(config, m_tc0040ioc); m_tc0040ioc->read_0_callback().set_ioport("DSWA"); m_tc0040ioc->read_1_callback().set_ioport("DSWB"); m_tc0040ioc->read_2_callback().set_ioport("IN0"); @@ -679,7 +679,7 @@ void taitoh_state::dleague(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &taitoh_state::dleague_map); m_maincpu->set_vblank_int("screen", FUNC(taitoh_state::irq1_line_hold)); - tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc", 0)); + tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc")); tc0220ioc.read_0_callback().set_ioport("DSWA"); tc0220ioc.read_1_callback().set_ioport("DSWB"); tc0220ioc.read_2_callback().set_ioport("IN0"); diff --git a/src/mame/taito/taito_l.cpp b/src/mame/taito/taito_l.cpp index 034d947956b..4f5070e9bc4 100644 --- a/src/mame/taito/taito_l.cpp +++ b/src/mame/taito/taito_l.cpp @@ -1301,7 +1301,7 @@ void fhawk_state::fhawk(machine_config &config) config.set_perfect_quantum(m_main_cpu); - tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc", 0)); + tc0220ioc_device &tc0220ioc(TC0220IOC(config, "tc0220ioc")); tc0220ioc.read_0_callback().set_ioport("DSWA"); tc0220ioc.read_1_callback().set_ioport("DSWB"); tc0220ioc.read_2_callback().set_ioport("IN0"); @@ -1326,7 +1326,7 @@ void fhawk_state::fhawk(machine_config &config) ymsnd.add_route(2, "mono", 0.20); ymsnd.add_route(3, "mono", 0.80); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag("slave"); ciu.set_slave_tag(m_audio_cpu); } @@ -1366,7 +1366,7 @@ void taitol_2cpu_state::raimais(machine_config &config) config.set_perfect_quantum(m_main_cpu); - tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc", 0)); + tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc")); tc0040ioc.read_0_callback().set_ioport("DSWA"); tc0040ioc.read_1_callback().set_ioport("DSWB"); tc0040ioc.read_2_callback().set_ioport("IN0"); @@ -1391,7 +1391,7 @@ void taitol_2cpu_state::raimais(machine_config &config) ymsnd.add_route(1, "mono", 1.0); ymsnd.add_route(2, "mono", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag("slave"); tc0140syt.set_slave_tag(m_audio_cpu); } @@ -1409,7 +1409,7 @@ void taitol_2cpu_state::kurikint(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); - tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc", 0)); + tc0040ioc_device &tc0040ioc(TC0040IOC(config, "tc0040ioc")); tc0040ioc.read_0_callback().set_ioport("DSWA"); tc0040ioc.read_1_callback().set_ioport("DSWB"); tc0040ioc.read_2_callback().set_ioport("IN0"); @@ -1437,11 +1437,11 @@ void taitol_2cpu_state::kurikint(machine_config &config) void taitol_1cpu_state::add_muxes(machine_config &config) { - LS157_X2(config, m_mux[0], 0); + LS157_X2(config, m_mux[0]); m_mux[0]->a_in_callback().set_ioport("DSWA"); m_mux[0]->b_in_callback().set_ioport("DSWB"); - LS157_X2(config, m_mux[1], 0); + LS157_X2(config, m_mux[1]); m_mux[1]->a_in_callback().set_ioport("IN0"); m_mux[1]->b_in_callback().set_ioport("IN1"); } @@ -1511,7 +1511,7 @@ void horshoes_state::horshoes(machine_config &config) m_main_cpu->set_addrmap(AS_PROGRAM, &horshoes_state::horshoes_map); m_main_cpu->set_tile_callback(FUNC(horshoes_state::horshoes_tile_cb)); - UPD4701A(config, m_upd4701, 0); + UPD4701A(config, m_upd4701); m_upd4701->set_portx_tag("AN0"); m_upd4701->set_porty_tag("AN1"); } @@ -1524,7 +1524,7 @@ void taitol_1cpu_state::palamed(machine_config &config) /* basic machine hardware */ m_main_cpu->set_addrmap(AS_PROGRAM, &taitol_1cpu_state::palamed_map); - i8255_device &ppi(I8255(config, "ppi", 0)); // Toshiba TMP8255AP-5 + i8255_device &ppi(I8255(config, "ppi")); // Toshiba TMP8255AP-5 ppi.in_pa_callback().set_ioport("IN0"); ppi.in_pb_callback().set_ioport("IN1"); ppi.in_pc_callback().set_ioport("IN2"); @@ -1554,7 +1554,7 @@ void taitol_2cpu_state::evilston(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_0_callback().set_ioport("DSWA"); tc0510nio.read_1_callback().set_ioport("DSWB"); tc0510nio.read_2_callback().set_ioport("IN0"); diff --git a/src/mame/taito/taito_o.cpp b/src/mame/taito/taito_o.cpp index 558c69c392f..c7a99a65f2b 100644 --- a/src/mame/taito/taito_o.cpp +++ b/src/mame/taito/taito_o.cpp @@ -288,7 +288,7 @@ void taitoo_state::machine_start() void taitoo_state::parentj(machine_config &config) { - M68000(config, m_maincpu, 12000000); //?? MHz + M68000(config, m_maincpu, XTAL::u(12000000)); //?? MHz m_maincpu->set_addrmap(AS_PROGRAM, &taitoo_state::prg_map); TIMER(config, "scantimer").configure_scanline(FUNC(taitoo_state::interrupt), "screen", 0, 1); @@ -304,14 +304,14 @@ void taitoo_state::parentj(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 33*16); - TC0080VCO(config, m_tc0080vco, 0); + TC0080VCO(config, m_tc0080vco); m_tc0080vco->set_offsets(1, 1); m_tc0080vco->set_bgflip_yoffs(-2); m_tc0080vco->set_palette(m_palette); SPEAKER(config, "mono").front_center(); - ym2203_device &ymsnd(YM2203(config, "ymsnd", 2000000)); // ?? MHz + ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL::u(2000000))); // ?? MHz ymsnd.port_a_read_callback().set_ioport("DSWA"); ymsnd.port_b_read_callback().set_ioport("DSWB"); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/taito/taito_x.cpp b/src/mame/taito/taito_x.cpp index 60a632f8afc..b859ef975a6 100644 --- a/src/mame/taito/taito_x.cpp +++ b/src/mame/taito/taito_x.cpp @@ -1059,7 +1059,7 @@ void taitox_cchip_state::superman(machine_config &config) ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -1101,7 +1101,7 @@ void taitox_state::daisenpu(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.45); ymsnd.add_route(1, "rspeaker", 0.45); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } @@ -1109,11 +1109,11 @@ void taitox_state::daisenpu(machine_config &config) void taitox_state::gigandes(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 8000000); // 8 MHz? + M68000(config, m_maincpu, XTAL::u(8000000)); // 8 MHz? m_maincpu->set_addrmap(AS_PROGRAM, &taitox_state::gigandes_map); m_maincpu->set_vblank_int("screen", FUNC(taitox_state::irq2_line_hold)); - Z80(config, m_audiocpu, 4000000); // 4 MHz ??? + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4 MHz ??? m_audiocpu->set_addrmap(AS_PROGRAM, &taitox_state::sound_map); config.set_maximum_quantum(attotime::from_hz(600)); // 10 CPU slices per frame - enough for the sound CPU to read all commands @@ -1137,14 +1137,14 @@ void taitox_state::gigandes(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 0.25); ymsnd.add_route(0, "rspeaker", 0.25); ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } @@ -1152,11 +1152,11 @@ void taitox_state::gigandes(machine_config &config) void taitox_state::ballbros(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 8000000); // 8 MHz? + M68000(config, m_maincpu, XTAL::u(8000000)); // 8 MHz? m_maincpu->set_addrmap(AS_PROGRAM, &taitox_state::ballbros_map); m_maincpu->set_vblank_int("screen", FUNC(taitox_state::irq2_line_hold)); - Z80(config, m_audiocpu, 4000000); // 4 MHz ??? + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4 MHz ??? m_audiocpu->set_addrmap(AS_PROGRAM, &taitox_state::sound_map); config.set_maximum_quantum(attotime::from_hz(600)); // 10 CPU slices per frame - enough for the sound CPU to read all commands @@ -1181,14 +1181,14 @@ void taitox_state::ballbros(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 0.25); ymsnd.add_route(0, "rspeaker", 0.25); ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/taito_z.cpp b/src/mame/taito/taito_z.cpp index 949ddb6221f..7d3fd459059 100644 --- a/src/mame/taito/taito_z.cpp +++ b/src/mame/taito/taito_z.cpp @@ -3193,7 +3193,7 @@ void contcirc_state::contcirc(machine_config &config) //OSC: 26.686, 24.000, 16. m_subcpu->set_addrmap(AS_PROGRAM, &contcirc_state::contcirc_cpub_map); m_subcpu->set_vblank_int("screen", FUNC(contcirc_state::irq6_line_hold)); - TC0040IOC(config, m_tc0040ioc, 0); + TC0040IOC(config, m_tc0040ioc); m_tc0040ioc->read_0_callback().set_ioport("DSWA"); m_tc0040ioc->read_1_callback().set_ioport("DSWB"); m_tc0040ioc->read_2_callback().set_ioport("IN0"); @@ -3201,19 +3201,19 @@ void contcirc_state::contcirc(machine_config &config) //OSC: 26.686, 24.000, 16. m_tc0040ioc->write_4_callback().set(FUNC(contcirc_state::coin_control_w)); m_tc0040ioc->read_7_callback().set_ioport("IN2"); - screen_config(config, 24, 248); + screen_config(config, 24, XTAL::u(248)); m_screen->set_screen_update(FUNC(contcirc_state::screen_update_contcirc)); m_screen->set_palette(m_tc0110pcr); m_screen->screen_vblank().set(FUNC(contcirc_state::scope_vblank)); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_taitoz); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette(m_tc0110pcr); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); /* sound hardware */ SPEAKER(config, "front").front_center(); @@ -3233,7 +3233,7 @@ void contcirc_state::contcirc(machine_config &config) //OSC: 26.686, 24.000, 16. FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rear", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "front", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } @@ -3252,7 +3252,7 @@ void chasehq_state::chasehq(machine_config &config) //OSC: 26.686, 24.000, 16.00 m_subcpu->set_addrmap(AS_PROGRAM, &chasehq_state::chasehq_cpub_map); m_subcpu->set_vblank_int("screen", FUNC(chasehq_state::irq4_line_hold)); - TC0040IOC(config, m_tc0040ioc, 0); + TC0040IOC(config, m_tc0040ioc); m_tc0040ioc->read_0_callback().set_ioport("DSWA"); m_tc0040ioc->read_1_callback().set_ioport("DSWB"); m_tc0040ioc->read_2_callback().set_ioport("IN0"); @@ -3261,18 +3261,18 @@ void chasehq_state::chasehq(machine_config &config) //OSC: 26.686, 24.000, 16.00 m_tc0040ioc->read_7_callback().set_ioport("IN2"); /* video hardware */ - screen_config(config, 16, 256); + screen_config(config, 16, XTAL::u(256)); m_screen->set_screen_update(FUNC(chasehq_state::screen_update_chasehq)); m_screen->set_palette(m_tc0110pcr); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_chasehq); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette(m_tc0110pcr); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); /* sound hardware */ SPEAKER(config, "front").front_center(); @@ -3292,7 +3292,7 @@ void chasehq_state::chasehq(machine_config &config) //OSC: 26.686, 24.000, 16.00 FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rear", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "front", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } @@ -3313,7 +3313,7 @@ void contcirc_state::enforce(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0040IOC(config, m_tc0040ioc, 0); + TC0040IOC(config, m_tc0040ioc); m_tc0040ioc->read_0_callback().set_ioport("DSWA"); m_tc0040ioc->read_1_callback().set_ioport("DSWB"); m_tc0040ioc->read_2_callback().set_ioport("IN0"); @@ -3322,19 +3322,19 @@ void contcirc_state::enforce(machine_config &config) m_tc0040ioc->read_7_callback().set_ioport("IN2"); /* video hardware */ - screen_config(config, 24, 248); + screen_config(config, 24, XTAL::u(248)); m_screen->set_screen_update(FUNC(contcirc_state::screen_update_contcirc)); m_screen->set_palette(m_tc0110pcr); m_screen->screen_vblank().set(FUNC(contcirc_state::scope_vblank)); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_taitoz); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette(m_tc0110pcr); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3354,7 +3354,7 @@ void contcirc_state::enforce(machine_config &config) FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } @@ -3362,17 +3362,17 @@ void contcirc_state::enforce(machine_config &config) void taitoz_state::bshark_base(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz ??? */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* 12 MHz ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &taitoz_state::bshark_map); m_maincpu->set_vblank_int("screen", FUNC(taitoz_state::irq4_line_hold)); - M68000(config, m_subcpu, 12000000); /* 12 MHz ??? */ + M68000(config, m_subcpu, XTAL::u(12000000)); /* 12 MHz ??? */ m_subcpu->set_addrmap(AS_PROGRAM, &taitoz_state::bshark_cpub_map); m_subcpu->set_vblank_int("screen", FUNC(taitoz_state::irq4_line_hold)); config.set_maximum_quantum(attotime::from_hz(6000)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -3380,17 +3380,17 @@ void taitoz_state::bshark_base(machine_config &config) m_tc0220ioc->write_4_callback().set(FUNC(taitoz_state::coin_control_w)); m_tc0220ioc->read_7_callback().set_ioport("IN2"); - screen_config(config, 16, 256); + screen_config(config, 16, XTAL::u(256)); m_screen->set_screen_update(FUNC(taitoz_state::screen_update_bshark)); m_screen->set_palette("palette"); GFXDECODE(config, m_gfxdecode, "palette", gfx_taitoz); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 4096); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette("palette"); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3415,7 +3415,7 @@ void taitoz_state::bshark(machine_config &config) { bshark_base(config); - adc0809_device &adc(ADC0809(config, "adc", 500000)); // clock unknown + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500000))); // clock unknown adc.eoc_ff_callback().set_inputline("maincpu", 6); adc.in_callback<0>().set_ioport("STICKX"); adc.in_callback<1>().set_ioport("X_ADJUST"); @@ -3446,7 +3446,7 @@ void sci_state::sci(machine_config &config) config.set_maximum_quantum(attotime::from_hz(3000)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -3455,17 +3455,17 @@ void sci_state::sci(machine_config &config) m_tc0220ioc->read_7_callback().set_ioport("IN2"); /* video hardware */ - screen_config(config, 16, 256); + screen_config(config, 16, XTAL::u(256)); m_screen->set_screen_update(FUNC(sci_state::screen_update_sci)); m_screen->set_palette("palette"); GFXDECODE(config, m_gfxdecode, "palette", gfx_taitoz); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 4096); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette("palette"); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3485,7 +3485,7 @@ void sci_state::sci(machine_config &config) FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } @@ -3506,14 +3506,14 @@ void nightstr_state::nightstr(machine_config &config) //OSC: 26.686, 24.000, 16. config.set_maximum_quantum(attotime::from_hz(6000)); - adc0809_device &adc(ADC0809(config, "adc", 500000)); // clock unknown + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500000))); // clock unknown adc.eoc_ff_callback().set_inputline("maincpu", 6); adc.in_callback<0>().set_ioport("STICKX"); adc.in_callback<1>().set_ioport("STICKY"); adc.in_callback<2>().set_ioport("X_ADJUST"); adc.in_callback<3>().set_ioport("Y_ADJUST"); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -3523,18 +3523,18 @@ void nightstr_state::nightstr(machine_config &config) //OSC: 26.686, 24.000, 16. m_tc0220ioc->read_7_callback().set_ioport("IN2"); /* video hardware */ - screen_config(config, 16, 256); + screen_config(config, 16, XTAL::u(256)); m_screen->set_screen_update(FUNC(nightstr_state::screen_update_chasehq)); m_screen->set_palette(m_tc0110pcr); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_chasehq); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette(m_tc0110pcr); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); /* sound hardware */ SPEAKER(config, "front").front_center(); @@ -3554,7 +3554,7 @@ void nightstr_state::nightstr(machine_config &config) //OSC: 26.686, 24.000, 16. FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rear", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "front", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } @@ -3575,7 +3575,7 @@ void taitoz_z80_sound_state::aquajack(machine_config &config) //OSC: 26.686, 24. config.set_maximum_quantum(attotime::from_hz(30000)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -3584,18 +3584,18 @@ void taitoz_z80_sound_state::aquajack(machine_config &config) //OSC: 26.686, 24. m_tc0220ioc->read_7_callback().set_ioport("IN2"); /* video hardware */ - screen_config(config, 16, 256); + screen_config(config, 16, XTAL::u(256)); m_screen->set_screen_update(FUNC(taitoz_z80_sound_state::screen_update_aquajack)); m_screen->set_palette(m_tc0110pcr); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_taitoz); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette(m_tc0110pcr); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3615,7 +3615,7 @@ void taitoz_z80_sound_state::aquajack(machine_config &config) //OSC: 26.686, 24. FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } @@ -3633,14 +3633,14 @@ void spacegun_state::spacegun(machine_config &config) //OSC: 26.686, 24.000, 16. EEPROM_93C46_16BIT(config, m_eeprom); - adc0809_device &adc(ADC0809(config, "adc", 500000)); // clock unknown + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500000))); // clock unknown adc.eoc_ff_callback().set_inputline("sub", 5); adc.in_callback<0>().set_ioport("STICKX1"); adc.in_callback<1>().set_ioport("STICKY1"); adc.in_callback<2>().set_ioport("STICKX2"); adc.in_callback<3>().set_ioport("STICKY2"); - TC0510NIO(config, m_tc0510nio, 0); + TC0510NIO(config, m_tc0510nio); m_tc0510nio->read_0_callback().set_ioport("DSWA"); m_tc0510nio->read_1_callback().set_ioport("DSWB"); m_tc0510nio->read_2_callback().set_ioport("IN0"); @@ -3650,17 +3650,17 @@ void spacegun_state::spacegun(machine_config &config) //OSC: 26.686, 24.000, 16. m_tc0510nio->read_7_callback().set_ioport("IN2"); /* video hardware */ - screen_config(config, 16, 256); + screen_config(config, 16, XTAL::u(256)); m_screen->set_screen_update(FUNC(spacegun_state::screen_update_spacegun)); m_screen->set_palette(m_tc0110pcr); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_taitoz); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_offsets(4, 0); m_tc0100scn->set_palette(m_tc0110pcr); - TC0110PCR(config, m_tc0110pcr, 0); + TC0110PCR(config, m_tc0110pcr); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3698,7 +3698,7 @@ void taitoz_z80_sound_state::dblaxle(machine_config &config) // make quantum time to be a multiple of the xtal (fixes road layer stuck on continue) config.set_maximum_quantum(attotime::from_hz(XTAL(32'000'000)/1024)); - TC0510NIO(config, m_tc0510nio, 0); + TC0510NIO(config, m_tc0510nio); m_tc0510nio->read_0_callback().set_ioport("DSWA"); m_tc0510nio->read_1_callback().set_ioport("DSWB"); m_tc0510nio->read_2_callback().set_ioport("IN0"); @@ -3714,11 +3714,11 @@ void taitoz_z80_sound_state::dblaxle(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_taitoz); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 4096); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette("palette"); m_tc0480scp->set_offsets(0x1f, 0x08); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3738,7 +3738,7 @@ void taitoz_z80_sound_state::dblaxle(machine_config &config) FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } @@ -3759,7 +3759,7 @@ void sci_state::racingb(machine_config &config) config.set_maximum_quantum(attotime::from_hz(600)); - TC0510NIO(config, m_tc0510nio, 0); + TC0510NIO(config, m_tc0510nio); m_tc0510nio->read_0_callback().set_ioport("DSWA"); m_tc0510nio->read_1_callback().set_ioport("DSWB"); m_tc0510nio->read_2_callback().set_ioport("IN0"); @@ -3768,18 +3768,18 @@ void sci_state::racingb(machine_config &config) m_tc0510nio->read_7_callback().set_ioport("IN2"); /* video hardware */ - screen_config(config, 16, 256); + screen_config(config, 16, XTAL::u(256)); m_screen->set_screen_update(FUNC(sci_state::screen_update_racingb)); m_screen->set_palette("palette"); GFXDECODE(config, m_gfxdecode, "palette", gfx_taitoz); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 4096); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette("palette"); m_tc0480scp->set_offsets(0x1f, 0x08); - TC0150ROD(config, m_tc0150rod, 0); + TC0150ROD(config, m_tc0150rod); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); @@ -3799,7 +3799,7 @@ void sci_state::racingb(machine_config &config) FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/taitoair.cpp b/src/mame/taito/taitoair.cpp index bfea10fb5b3..0b2cf4bee73 100644 --- a/src/mame/taito/taitoair.cpp +++ b/src/mame/taito/taitoair.cpp @@ -689,7 +689,7 @@ void taitoair_state::airsys(machine_config &config) config.set_perfect_quantum(m_maincpu); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -697,7 +697,7 @@ void taitoair_state::airsys(machine_config &config) m_tc0220ioc->write_4_callback().set(FUNC(taitoair_state::coin_control_w)); m_tc0220ioc->read_7_callback().set_ioport("IN2"); - TAITOIO_YOKE(config, m_yoke, 0); + TAITOIO_YOKE(config, m_yoke); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -706,13 +706,13 @@ void taitoair_state::airsys(machine_config &config) // m_screen->set_size(64*16, 32*16); // m_screen->set_visarea(0*16, 32*16-1, 3*16, 28*16-1); // Estimated, assume same as mlanding.cpp - m_screen->set_raw(16000000, 640, 0, 512, 462, 3*16, 28*16); + m_screen->set_raw(XTAL::u(16000000), 640, 0, 512, 462, 3*16, 28*16); m_screen->set_screen_update(FUNC(taitoair_state::screen_update)); m_screen->set_palette(m_palette); PALETTE(config, m_palette, palette_device::BLACK, 512*16+512*16); - TC0080VCO(config, m_tc0080vco, 0); + TC0080VCO(config, m_tc0080vco); m_tc0080vco->set_offsets(1, 1); m_tc0080vco->set_bgflip_yoffs(-2); m_tc0080vco->set_palette(m_palette); @@ -726,7 +726,7 @@ void taitoair_state::airsys(machine_config &config) ymsnd.add_route(1, "mono", 0.60); ymsnd.add_route(2, "mono", 0.60); - tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt", 0)); + tc0140syt_device &tc0140syt(TC0140SYT(config, "tc0140syt")); tc0140syt.set_master_tag(m_maincpu); tc0140syt.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/taitocchip.cpp b/src/mame/taito/taitocchip.cpp index 2ed4694ea69..585dbf727eb 100644 --- a/src/mame/taito/taitocchip.cpp +++ b/src/mame/taito/taitocchip.cpp @@ -110,7 +110,7 @@ This chip *ALWAYS* has a bypass capacitor (ceramic, 104, 0.10 uF) soldered on to DEFINE_DEVICE_TYPE(TAITO_CCHIP, taito_cchip_device, "cchip", "Taito TC0030CMD (C-Chip)") -taito_cchip_device::taito_cchip_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +taito_cchip_device::taito_cchip_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TAITO_CCHIP, tag, owner, clock), m_upd7811(*this, "upd7811"), m_upd4464_bank(*this, "upd4464_bank"), @@ -235,7 +235,7 @@ void taito_cchip_device::device_add_mconfig(machine_config &config) upd.an6_func().set([this] { return BIT(m_in_ad_cb(), 6) ? 0xff : 0; }); upd.an7_func().set([this] { return BIT(m_in_ad_cb(), 7) ? 0xff : 0; }); - ADDRESS_MAP_BANK(config, m_upd4464_bank, 0); + ADDRESS_MAP_BANK(config, m_upd4464_bank); m_upd4464_bank->set_map(&taito_cchip_device::cchip_ram_bank); m_upd4464_bank->set_endianness(ENDIANNESS_LITTLE); m_upd4464_bank->set_data_width(8); @@ -243,7 +243,7 @@ void taito_cchip_device::device_add_mconfig(machine_config &config) m_upd4464_bank->set_stride(0x400); // the 68k has a different view into the banked memory? - ADDRESS_MAP_BANK(config, m_upd4464_bank68, 0); + ADDRESS_MAP_BANK(config, m_upd4464_bank68); m_upd4464_bank68->set_map(&taito_cchip_device::cchip_ram_bank68); m_upd4464_bank68->set_endianness(ENDIANNESS_LITTLE); m_upd4464_bank68->set_data_width(8); diff --git a/src/mame/taito/taitocchip.h b/src/mame/taito/taitocchip.h index eac1e06ed78..e981cc10df3 100644 --- a/src/mame/taito/taitocchip.h +++ b/src/mame/taito/taitocchip.h @@ -14,7 +14,7 @@ class taito_cchip_device : public device_t { public: // construction/destruction - taito_cchip_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + taito_cchip_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto in_pb_callback() { return m_in_pb_cb.bind(); } diff --git a/src/mame/taito/taitoio.cpp b/src/mame/taito/taitoio.cpp index eb20b4bd0bf..f80f4cc563d 100644 --- a/src/mame/taito/taitoio.cpp +++ b/src/mame/taito/taitoio.cpp @@ -66,7 +66,7 @@ Newer version of the I/O chip ? DEFINE_DEVICE_TYPE(TC0040IOC, tc0040ioc_device, "tc0040ioc", "Taito TC0040IOC") -tc0040ioc_device::tc0040ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tc0040ioc_device::tc0040ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0040IOC, tag, owner, clock), m_port(0), m_watchdog(*this, "watchdog"), @@ -212,7 +212,7 @@ void tc0040ioc_device::portreg_w(u8 data) DEFINE_DEVICE_TYPE(TC0220IOC, tc0220ioc_device, "tc0220ioc", "Taito TC0220IOC") -tc0220ioc_device::tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tc0220ioc_device::tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0220IOC, tag, owner, clock), m_watchdog(*this, "watchdog"), m_read_0_cb(*this), @@ -330,7 +330,7 @@ void tc0220ioc_device::write(offs_t offset, u8 data) DEFINE_DEVICE_TYPE(TC0510NIO, tc0510nio_device, "tc0510nio", "Taito TC0510NIO") -tc0510nio_device::tc0510nio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc0510nio_device::tc0510nio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0510NIO, tag, owner, clock), m_watchdog(*this, "watchdog"), m_read_0_cb(*this), @@ -472,7 +472,7 @@ void tc0510nio_device::halfword_wordswap_w(offs_t offset, u16 data, u16 mem_mask DEFINE_DEVICE_TYPE(TC0640FIO, tc0640fio_device, "tc0640fio", "Taito TC0640FIO") -tc0640fio_device::tc0640fio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc0640fio_device::tc0640fio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0640FIO, tag, owner, clock), m_watchdog(*this, "watchdog"), m_read_0_cb(*this), diff --git a/src/mame/taito/taitoio.h b/src/mame/taito/taitoio.h index 1d864c18b78..a6078a06d89 100644 --- a/src/mame/taito/taitoio.h +++ b/src/mame/taito/taitoio.h @@ -19,7 +19,7 @@ class tc0040ioc_device : public device_t { public: - tc0040ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0040ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_read_0_cb.bind(); } auto read_1_callback() { return m_read_1_cb.bind(); } @@ -62,7 +62,7 @@ DECLARE_DEVICE_TYPE(TC0040IOC, tc0040ioc_device) class tc0220ioc_device : public device_t { public: - tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0220ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_read_0_cb.bind(); } auto read_1_callback() { return m_read_1_cb.bind(); } @@ -101,7 +101,7 @@ DECLARE_DEVICE_TYPE(TC0220IOC, tc0220ioc_device) class tc0510nio_device : public device_t { public: - tc0510nio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0510nio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_read_0_cb.bind(); } auto read_1_callback() { return m_read_1_cb.bind(); } @@ -144,7 +144,7 @@ DECLARE_DEVICE_TYPE(TC0510NIO, tc0510nio_device) class tc0640fio_device : public device_t { public: - tc0640fio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0640fio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_read_0_cb.bind(); } auto read_1_callback() { return m_read_1_cb.bind(); } diff --git a/src/mame/taito/taitoio_yoke.cpp b/src/mame/taito/taitoio_yoke.cpp index 9d7fa7fec24..5652bd1ed4d 100644 --- a/src/mame/taito/taitoio_yoke.cpp +++ b/src/mame/taito/taitoio_yoke.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(TAITOIO_YOKE, taitoio_yoke_device, "taitoio_yoke", "Taito I/O // taitoio_yoke_device - constructor //------------------------------------------------- -taitoio_yoke_device::taitoio_yoke_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +taitoio_yoke_device::taitoio_yoke_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TAITOIO_YOKE, tag, owner, clock) , m_stick_x(*this, "STICK_X") , m_stick_y(*this, "STICK_Y") diff --git a/src/mame/taito/taitoio_yoke.h b/src/mame/taito/taitoio_yoke.h index d531ade856a..becb42a31d3 100644 --- a/src/mame/taito/taitoio_yoke.h +++ b/src/mame/taito/taitoio_yoke.h @@ -19,7 +19,7 @@ class taitoio_yoke_device : public device_t { public: // construction/destruction - taitoio_yoke_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taitoio_yoke_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations u16 throttle_r(); diff --git a/src/mame/taito/taitojc.cpp b/src/mame/taito/taitojc.cpp index bdadeb007ee..ccbf54d3088 100644 --- a/src/mame/taito/taitojc.cpp +++ b/src/mame/taito/taitojc.cpp @@ -1104,7 +1104,7 @@ void taitojc_state::taitojc(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - TC0640FIO(config, m_tc0640fio, 0); + TC0640FIO(config, m_tc0640fio); m_tc0640fio->read_0_callback().set_ioport("SERVICE"); m_tc0640fio->read_1_callback().set_ioport("COINS"); m_tc0640fio->read_2_callback().set_ioport("START"); @@ -1122,13 +1122,13 @@ void taitojc_state::taitojc(machine_config &config) PALETTE(config, m_palette).set_entries(32768); - TC0780FPA(config, m_tc0780fpa, 0); + TC0780FPA(config, m_tc0780fpa); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - taito_en_device &taito_en(TAITO_EN(config, "taito_en", 0)); + taito_en_device &taito_en(TAITO_EN(config, "taito_en")); taito_en.add_route(0, "lspeaker", 1.0); taito_en.add_route(1, "rspeaker", 1.0); } @@ -1147,7 +1147,7 @@ void taitojc_state::dendego(machine_config &config) SPEAKER(config, "vibration").seat(); /* clock frequency & pin 7 not verified */ - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "vibration", 0.20); + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "vibration", 0.20); } diff --git a/src/mame/taito/taitopjc.cpp b/src/mame/taito/taitopjc.cpp index ab096d89cfd..160c6e6c44c 100644 --- a/src/mame/taito/taitopjc.cpp +++ b/src/mame/taito/taitopjc.cpp @@ -829,12 +829,12 @@ INTERRUPT_GEN_MEMBER(taitopjc_state::taitopjc_vbi) void taitopjc_state::taitopjc(machine_config &config) { - PPC603E(config, m_maincpu, 100000000); + PPC603E(config, m_maincpu, XTAL::u(100000000)); m_maincpu->set_bus_frequency(XTAL(66'666'700)); /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &taitopjc_state::ppc603e_mem); /* TMP95C063F I/O CPU */ - TMP95C063(config, m_iocpu, 25000000); + TMP95C063(config, m_iocpu, XTAL::u(25000000)); m_iocpu->port5_read().set_ioport("INPUTS1"); m_iocpu->portd_read().set_ioport("INPUTS2"); m_iocpu->porte_read().set_ioport("INPUTS3"); @@ -846,12 +846,12 @@ void taitopjc_state::taitopjc(machine_config &config) m_iocpu->set_vblank_int("screen", FUNC(taitopjc_state::taitopjc_vbi)); /* TMS320C53 DSP */ - TMS32053(config, m_dsp, 40000000); + TMS32053(config, m_dsp, XTAL::u(40000000)); m_dsp->set_addrmap(AS_PROGRAM, &taitopjc_state::tms_program_map); m_dsp->set_addrmap(AS_DATA, &taitopjc_state::tms_data_map); m_dsp->set_addrmap(AS_IO, &taitopjc_state::tms_io_map); - MN1020012A(config, m_soundcpu, 10000000); /* MN1020819DA sound CPU - NOTE: May have 64kB internal ROM */ + MN1020012A(config, m_soundcpu, XTAL::u(10000000)); /* MN1020819DA sound CPU - NOTE: May have 64kB internal ROM */ m_soundcpu->set_addrmap(AS_PROGRAM, &taitopjc_state::mn10200_map); config.set_maximum_quantum(attotime::from_hz(200000)); @@ -869,7 +869,7 @@ void taitopjc_state::taitopjc(machine_config &config) PALETTE(config, m_palette).set_entries(32768); GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty); - TC0780FPA(config, m_tc0780fpa, 0); + TC0780FPA(config, m_tc0780fpa); } diff --git a/src/mame/taito/taitosj.cpp b/src/mame/taito/taitosj.cpp index 793e6ceca67..ec4cc930b4d 100644 --- a/src/mame/taito/taitosj.cpp +++ b/src/mame/taito/taitosj.cpp @@ -1831,7 +1831,7 @@ void taitosj_state::nomcu(machine_config &config) WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393 on CPU board, counts 128 vblanks before firing watchdog - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // 30k r-2r network + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.15); // 30k r-2r network DISCRETE(config, m_dacvol, taitosj_dacvol_discrete); m_dacvol->add_route(0, "dac", 1.0, DAC_INPUT_RANGE_HI); m_dacvol->add_route(0, "dac", -1.0, DAC_INPUT_RANGE_LO); diff --git a/src/mame/taito/taitottl.cpp b/src/mame/taito/taitottl.cpp index 2c89fa22773..7eb2c5b4e44 100644 --- a/src/mame/taito/taitottl.cpp +++ b/src/mame/taito/taitottl.cpp @@ -71,7 +71,7 @@ // copied by Pong, not accurate for this driver! // start -#define MASTER_CLOCK 7159000 +#define MASTER_CLOCK XTAL::u(7159000) #define V_TOTAL (0x105+1) // 262 #define H_TOTAL (0x1C6+1) // 454 @@ -140,7 +140,7 @@ void taitottl_state::video_start() void taitottl_state::taitottl(machine_config &config) { /* basic machine hardware */ - NETLIST_CPU(config, m_maincpu, netlist::config::DEFAULT_CLOCK()).set_source(netlist_taitottl); + NETLIST_CPU(config, m_maincpu).set_source(netlist_taitottl); /* video hardware */ SCREEN(config, "screen", SCREEN_TYPE_RASTER); diff --git a/src/mame/taito/taitotx.cpp b/src/mame/taito/taitotx.cpp index 1a27e239753..e4f109d1d4c 100644 --- a/src/mame/taito/taitotx.cpp +++ b/src/mame/taito/taitotx.cpp @@ -175,7 +175,7 @@ void taito_type_x_state::machine_reset() void taito_type_x_state::taito_type_x(machine_config &config) { /* basic machine hardware */ - PENTIUM3(config, m_maincpu, 733333333); /* Wrong, much newer processors, much faster. */ + PENTIUM3(config, m_maincpu, XTAL::u(733333333)); /* Wrong, much newer processors, much faster. */ m_maincpu->set_addrmap(AS_PROGRAM, &taito_type_x_state::taito_type_x_map); /* video hardware */ diff --git a/src/mame/taito/taitotz.cpp b/src/mame/taito/taitotz.cpp index 6e0f775d317..3bd085ed149 100644 --- a/src/mame/taito/taitotz.cpp +++ b/src/mame/taito/taitotz.cpp @@ -2635,12 +2635,12 @@ WRITE_LINE_MEMBER(taitotz_state::ide_interrupt) void taitotz_state::taitotz(machine_config &config) { /* IBM EMPPC603eBG-100 */ - PPC603E(config, m_maincpu, 100000000); + PPC603E(config, m_maincpu, XTAL::u(100000000)); m_maincpu->set_bus_frequency(XTAL(66'666'700)); /* Multiplier 1.5, Bus = 66MHz, Core = 100MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &taitotz_state::ppc603e_mem); /* TMP95C063F I/O CPU */ - TMP95C063(config, m_iocpu, 25000000); + TMP95C063(config, m_iocpu, XTAL::u(25000000)); m_iocpu->port9_read().set_ioport("INPUTS1"); m_iocpu->portb_read().set_ioport("INPUTS2"); m_iocpu->portd_read().set_ioport("INPUTS3"); diff --git a/src/mame/taito/taitowlf.cpp b/src/mame/taito/taitowlf.cpp index 29dc6784e3e..5cf49f328bd 100644 --- a/src/mame/taito/taitowlf.cpp +++ b/src/mame/taito/taitowlf.cpp @@ -368,13 +368,13 @@ void taitowlf_state::taitowlf_palette(palette_device &palette) const void taitowlf_state::taitowlf(machine_config &config) { /* basic machine hardware */ - PENTIUM(config, m_maincpu, 200000000); + PENTIUM(config, m_maincpu, XTAL::u(200000000)); m_maincpu->set_addrmap(AS_PROGRAM, &taitowlf_state::taitowlf_map); m_maincpu->set_addrmap(AS_IO, &taitowlf_state::taitowlf_io); m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb)); - pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus", 0, 0)); + pci_bus_legacy_device &pcibus(PCI_BUS_LEGACY(config, "pcibus")); pcibus.set_device(0, FUNC(taitowlf_state::intel82439tx_pci_r), FUNC(taitowlf_state::intel82439tx_pci_w)); pcibus.set_device(7, FUNC(taitowlf_state::intel82371ab_pci_r), FUNC(taitowlf_state::intel82371ab_pci_w)); diff --git a/src/mame/taito/tc0080vco.cpp b/src/mame/taito/tc0080vco.cpp index 28c18d5ce30..2446e5401e4 100644 --- a/src/mame/taito/tc0080vco.cpp +++ b/src/mame/taito/tc0080vco.cpp @@ -80,7 +80,7 @@ this seems to be the only zoom feature actually used in the games. DEFINE_DEVICE_TYPE(TC0080VCO, tc0080vco_device, "tc0080vco", "Taito TC0080VCO") -tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0080VCO, tag, owner, clock) , device_gfx_interface(mconfig, *this, nullptr) , m_ram(nullptr) diff --git a/src/mame/taito/tc0080vco.h b/src/mame/taito/tc0080vco.h index 34f804bda6b..ab9b249c360 100644 --- a/src/mame/taito/tc0080vco.h +++ b/src/mame/taito/tc0080vco.h @@ -11,7 +11,7 @@ class tc0080vco_device : public device_t, public device_gfx_interface { public: - tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_colbase(u16 base) { m_colbase = base; } diff --git a/src/mame/taito/tc0100scn.cpp b/src/mame/taito/tc0100scn.cpp index f265565fecd..b53b86b5e92 100644 --- a/src/mame/taito/tc0100scn.cpp +++ b/src/mame/taito/tc0100scn.cpp @@ -152,7 +152,7 @@ the wide tilemap mode) DEFINE_DEVICE_TYPE(TC0100SCN, tc0100scn_device, "tc0100scn", "Taito TC0100SCN") DEFINE_DEVICE_TYPE(TC0620SCC, tc0620scc_device, "tc0620scc", "Taito TC0620SCC") -tc0100scn_base_device::tc0100scn_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +tc0100scn_base_device::tc0100scn_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_gfx_interface(mconfig, *this) , m_gfxlayout(TC0100SCN_LAYOUT_DEFAULT) @@ -181,12 +181,12 @@ tc0100scn_base_device::tc0100scn_base_device(const machine_config &mconfig, devi std::fill(std::begin(m_bg_colbank), std::end(m_bg_colbank), 0); } -tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0100scn_base_device(mconfig, TC0100SCN, tag, owner, clock) { } -tc0620scc_device::tc0620scc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0620scc_device::tc0620scc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0100scn_base_device(mconfig, TC0620SCC, tag, owner, clock) { } diff --git a/src/mame/taito/tc0100scn.h b/src/mame/taito/tc0100scn.h index 1770d584ec2..9810c13eef5 100644 --- a/src/mame/taito/tc0100scn.h +++ b/src/mame/taito/tc0100scn.h @@ -66,7 +66,7 @@ public: int bottomlayer(); protected: - tc0100scn_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + tc0100scn_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -113,7 +113,7 @@ private: class tc0100scn_device : public tc0100scn_base_device { public: - tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -128,7 +128,7 @@ private: class tc0620scc_device : public tc0100scn_base_device { public: - tc0620scc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0620scc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/mame/taito/tc0110pcr.cpp b/src/mame/taito/tc0110pcr.cpp index 8abacae788a..95622c61bd7 100644 --- a/src/mame/taito/tc0110pcr.cpp +++ b/src/mame/taito/tc0110pcr.cpp @@ -18,7 +18,7 @@ The data bus is 16 bits wide. DEFINE_DEVICE_TYPE(TC0110PCR, tc0110pcr_device, "tc0110pcr", "Taito TC0110PCR") -tc0110pcr_device::tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0110pcr_device::tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0110PCR, tag, owner, clock) , device_palette_interface(mconfig, *this) , m_ram(nullptr) diff --git a/src/mame/taito/tc0110pcr.h b/src/mame/taito/tc0110pcr.h index 4a5f7c402b5..ecf9efc3551 100644 --- a/src/mame/taito/tc0110pcr.h +++ b/src/mame/taito/tc0110pcr.h @@ -9,7 +9,7 @@ class tc0110pcr_device : public device_t, public device_palette_interface { public: - tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 word_r(offs_t offset); void word_w(offs_t offset, u16 data); /* color index goes up in step of 2 */ diff --git a/src/mame/taito/tc0150rod.cpp b/src/mame/taito/tc0150rod.cpp index b5c271d629f..627e4446b13 100644 --- a/src/mame/taito/tc0150rod.cpp +++ b/src/mame/taito/tc0150rod.cpp @@ -14,7 +14,7 @@ Road generator. Two roads allow for forking. Gfx data fetched from ROM. Refer to DEFINE_DEVICE_TYPE(TC0150ROD, tc0150rod_device, "tc0150rod", "Taito TC0150ROD") -tc0150rod_device::tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0150rod_device::tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0150ROD, tag, owner, clock) , m_roadgfx(*this, DEVICE_SELF) { diff --git a/src/mame/taito/tc0150rod.h b/src/mame/taito/tc0150rod.h index 2b396e67ddd..a12f29a613d 100644 --- a/src/mame/taito/tc0150rod.h +++ b/src/mame/taito/tc0150rod.h @@ -8,7 +8,7 @@ class tc0150rod_device : public device_t { public: - tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t word_r(offs_t offset); void word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/taito/tc0180vcu.cpp b/src/mame/taito/tc0180vcu.cpp index c4bfb9d1485..8399c61a1a4 100644 --- a/src/mame/taito/tc0180vcu.cpp +++ b/src/mame/taito/tc0180vcu.cpp @@ -49,7 +49,7 @@ void tc0180vcu_device::tc0180vcu_memrw(address_map &map) DEFINE_DEVICE_TYPE(TC0180VCU, tc0180vcu_device, "tc0180vcu", "Taito TC0180VCU") -tc0180vcu_device::tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tc0180vcu_device::tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0180VCU, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), device_video_interface(mconfig, *this), diff --git a/src/mame/taito/tc0180vcu.h b/src/mame/taito/tc0180vcu.h index 4074742e582..ccfb0b8de17 100644 --- a/src/mame/taito/tc0180vcu.h +++ b/src/mame/taito/tc0180vcu.h @@ -11,7 +11,7 @@ class tc0180vcu_device : public device_t, public device_gfx_interface, public device_video_interface { public: - tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0180vcu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_fb_colorbase(int color) { m_fb_color_base = color * 16; } diff --git a/src/mame/taito/tc0280grd.cpp b/src/mame/taito/tc0280grd.cpp index ce581642952..06ab49a0c8e 100644 --- a/src/mame/taito/tc0280grd.cpp +++ b/src/mame/taito/tc0280grd.cpp @@ -29,7 +29,7 @@ control registers: DEFINE_DEVICE_TYPE(TC0280GRD, tc0280grd_device, "tc0280grd", "Taito TC0280GRD / TC0430GRW") -tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0280GRD, tag, owner, clock) , device_gfx_interface(mconfig, *this) , m_ram(nullptr) diff --git a/src/mame/taito/tc0280grd.h b/src/mame/taito/tc0280grd.h index 281e1befdc1..96fb4f51195 100644 --- a/src/mame/taito/tc0280grd.h +++ b/src/mame/taito/tc0280grd.h @@ -11,7 +11,7 @@ class tc0280grd_device : public device_t, public device_gfx_interface { public: - tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_color_base(u16 base) { m_colorbase = base; } diff --git a/src/mame/taito/tc0360pri.cpp b/src/mame/taito/tc0360pri.cpp index 5d6d237c495..32975f9f1dc 100644 --- a/src/mame/taito/tc0360pri.cpp +++ b/src/mame/taito/tc0360pri.cpp @@ -45,7 +45,7 @@ each one of them can declare to have four different priority levels. DEFINE_DEVICE_TYPE(TC0360PRI, tc0360pri_device, "tc0360pri", "Taito TC0360PRI") -tc0360pri_device::tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc0360pri_device::tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0360PRI, tag, owner, clock) { } diff --git a/src/mame/taito/tc0360pri.h b/src/mame/taito/tc0360pri.h index 058cd070db1..032474c515f 100644 --- a/src/mame/taito/tc0360pri.h +++ b/src/mame/taito/tc0360pri.h @@ -8,7 +8,7 @@ class tc0360pri_device : public device_t { public: - tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, u8 data); u8 read(offs_t offset); diff --git a/src/mame/taito/tc0480scp.cpp b/src/mame/taito/tc0480scp.cpp index b34c52fab91..ae578018731 100644 --- a/src/mame/taito/tc0480scp.cpp +++ b/src/mame/taito/tc0480scp.cpp @@ -152,7 +152,7 @@ Control registers DEFINE_DEVICE_TYPE(TC0480SCP, tc0480scp_device, "tc0480scp", "Taito TC0480SCP") -tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0480SCP, tag, owner, clock) , device_gfx_interface(mconfig, *this) , m_pri_reg(0) diff --git a/src/mame/taito/tc0480scp.h b/src/mame/taito/tc0480scp.h index 21a09bf64bd..50db0beebe9 100644 --- a/src/mame/taito/tc0480scp.h +++ b/src/mame/taito/tc0480scp.h @@ -16,7 +16,7 @@ enum class tc0480scp_device : public device_t, public device_gfx_interface { public: - tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_gfxlayout(int gfxlayout) { m_gfxlayout = gfxlayout; } diff --git a/src/mame/taito/tc0780fpa.cpp b/src/mame/taito/tc0780fpa.cpp index 26cf36f9fda..0a82d7c6da7 100644 --- a/src/mame/taito/tc0780fpa.cpp +++ b/src/mame/taito/tc0780fpa.cpp @@ -392,7 +392,7 @@ void tc0780fpa_renderer::render(uint16_t *polygon_fifo, int length) DEFINE_DEVICE_TYPE(TC0780FPA, tc0780fpa_device, "tc0780fpa", "TC0780FPA Polygon Renderer") -tc0780fpa_device::tc0780fpa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc0780fpa_device::tc0780fpa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TC0780FPA, tag, owner, clock) , device_video_interface(mconfig, *this) { diff --git a/src/mame/taito/tc0780fpa.h b/src/mame/taito/tc0780fpa.h index 2591b39d5f3..e410781684d 100644 --- a/src/mame/taito/tc0780fpa.h +++ b/src/mame/taito/tc0780fpa.h @@ -45,7 +45,7 @@ private: class tc0780fpa_device : public device_t, public device_video_interface { public: - tc0780fpa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc0780fpa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/taito/tnzs.cpp b/src/mame/taito/tnzs.cpp index 3824255982e..0eafdc9c3b6 100644 --- a/src/mame/taito/tnzs.cpp +++ b/src/mame/taito/tnzs.cpp @@ -1566,7 +1566,7 @@ void tnzs_base_state::tnzs_base(machine_config &config) config.set_perfect_quantum(m_maincpu); /* video hardware */ - X1_001(config, m_spritegen, 12'000'000, m_palette, gfx_tnzs); + X1_001(config, m_spritegen, XTAL::u(12'000'000), m_palette, gfx_tnzs); m_spritegen->set_fg_yoffsets( -0x12, 0x0e ); m_spritegen->set_bg_yoffsets( 0x1, -0x1 ); @@ -1720,7 +1720,7 @@ void kabukiz_state::kabukiz(machine_config &config) ymsnd.port_a_write_callback().set(FUNC(kabukiz_state::sound_bank_w)); ymsnd.port_b_write_callback().set("dac", FUNC(dac_byte_interface::data_w)); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } void jpopnics_state::jpopnics(machine_config &config) diff --git a/src/mame/taito/topspeed.cpp b/src/mame/taito/topspeed.cpp index 5db76d9db57..4396d9f4ca9 100644 --- a/src/mame/taito/topspeed.cpp +++ b/src/mame/taito/topspeed.cpp @@ -579,21 +579,21 @@ void topspeed_state::topspeed(machine_config &config) z80ctc_device& ctc(Z80CTC(config, "ctc", XTAL(16'000'000) / 4)); ctc.zc_callback<0>().set(FUNC(topspeed_state::z80ctc_to0)); - PC080SN(config, m_pc080sn[0], 0); + PC080SN(config, m_pc080sn[0]); m_pc080sn[0]->set_gfx_region(1); m_pc080sn[0]->set_offsets(0, 8); m_pc080sn[0]->set_gfxdecode_tag(m_gfxdecode); - PC080SN(config, m_pc080sn[1], 0); + PC080SN(config, m_pc080sn[1]); m_pc080sn[1]->set_gfx_region(1); m_pc080sn[1]->set_offsets(0, 8); m_pc080sn[1]->set_gfxdecode_tag(m_gfxdecode); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); - TC0040IOC(config, m_tc0040ioc, 0); + TC0040IOC(config, m_tc0040ioc); m_tc0040ioc->read_0_callback().set_ioport("DSWA"); m_tc0040ioc->read_1_callback().set_ioport("DSWB"); m_tc0040ioc->read_2_callback().set_ioport("IN0"); diff --git a/src/mame/taito/tsamurai.cpp b/src/mame/taito/tsamurai.cpp index b3b28a22ad2..864a4718e98 100644 --- a/src/mame/taito/tsamurai.cpp +++ b/src/mame/taito/tsamurai.cpp @@ -744,8 +744,8 @@ void tsamurai_state::tsamurai(machine_config &config) AY8910(config,"aysnd", XTAL(24'000'000)/8).add_route(ALL_OUTPUTS, "speaker", 0.1); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC } @@ -787,7 +787,7 @@ void vsgongf_state::vsgongf(machine_config &config) AY8910(config,"aysnd", XTAL(24'000'000)/8).add_route(ALL_OUTPUTS, "speaker", 0.1); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC } @@ -836,8 +836,8 @@ void m660_state::m660(machine_config &config) AY8910(config,"aysnd", XTAL(24'000'000)/8).add_route(ALL_OUTPUTS, "speaker", 0.1); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC } diff --git a/src/mame/taito/undrfire.cpp b/src/mame/taito/undrfire.cpp index e646bb2a805..61b11619198 100644 --- a/src/mame/taito/undrfire.cpp +++ b/src/mame/taito/undrfire.cpp @@ -521,7 +521,7 @@ void undrfire_state::undrfire(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_0_callback().set_ioport("INPUTS0"); tc0510nio.read_1_callback().set_ioport("INPUTS1"); tc0510nio.read_2_callback().set_ioport("INPUTS2"); @@ -545,11 +545,11 @@ void undrfire_state::undrfire(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_undrfire); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 16384); - TC0620SCC(config, m_tc0620scc, 0); + TC0620SCC(config, m_tc0620scc); m_tc0620scc->set_offsets(50, 8); m_tc0620scc->set_palette(m_palette); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x24, 0); m_tc0480scp->set_offsets_tx(-1, 0); @@ -558,7 +558,7 @@ void undrfire_state::undrfire(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - taito_en_device &taito_en(TAITO_EN(config, "taito_en", 0)); + taito_en_device &taito_en(TAITO_EN(config, "taito_en")); taito_en.add_route(0, "lspeaker", 1.0); taito_en.add_route(1, "rspeaker", 1.0); } @@ -579,11 +579,11 @@ void undrfire_state::cbombers(machine_config &config) EEPROM_93C46_16BIT(config, "eeprom"); - adc0809_device &adc(ADC0809(config, "adc", 500000)); // unknown clock + adc0809_device &adc(ADC0809(config, "adc", XTAL::u(500000))); // unknown clock adc.eoc_ff_callback().set_inputline("maincpu", 5); adc.in_callback<0>().set_ioport("STEER"); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_0_callback().set_ioport("INPUTS0"); tc0510nio.read_1_callback().set_ioport("INPUTS1"); tc0510nio.read_2_callback().set_ioport("INPUTS2"); @@ -607,23 +607,23 @@ void undrfire_state::cbombers(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_undrfire); PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 16384); - TC0620SCC(config, m_tc0620scc, 0); + TC0620SCC(config, m_tc0620scc); m_tc0620scc->set_offsets(50, 8); m_tc0620scc->set_palette(m_palette); - TC0480SCP(config, m_tc0480scp, 0); + TC0480SCP(config, m_tc0480scp); m_tc0480scp->set_palette(m_palette); m_tc0480scp->set_offsets(0x24, 0); m_tc0480scp->set_offsets_tx(-1, 0); m_tc0480scp->set_col_base(4096); - TC0360PRI(config, m_tc0360pri, 0); + TC0360PRI(config, m_tc0360pri); /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - taito_en_device &taito_en(TAITO_EN(config, "taito_en", 0)); + taito_en_device &taito_en(TAITO_EN(config, "taito_en")); taito_en.add_route(0, "lspeaker", 1.0); taito_en.add_route(1, "rspeaker", 1.0); } diff --git a/src/mame/taito/volfied.cpp b/src/mame/taito/volfied.cpp index 9a897e106f2..7dfc7130a2c 100644 --- a/src/mame/taito/volfied.cpp +++ b/src/mame/taito/volfied.cpp @@ -425,7 +425,7 @@ void volfied_state::volfied(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xBGR_555, 8192); - PC090OJ(config, m_pc090oj, 0); + PC090OJ(config, m_pc090oj); m_pc090oj->set_palette("palette"); m_pc090oj->set_colpri_callback(FUNC(volfied_state::colpri_cb)); @@ -441,7 +441,7 @@ void volfied_state::volfied(machine_config &config) ymsnd.add_route(2, "mono", 0.15); ymsnd.add_route(3, "mono", 0.60); - pc060ha_device &ciu(PC060HA(config, "ciu", 0)); + pc060ha_device &ciu(PC060HA(config, "ciu")); ciu.set_master_tag(m_maincpu); ciu.set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/warriorb.cpp b/src/mame/taito/warriorb.cpp index a137bc2e9f0..8ab2e660143 100644 --- a/src/mame/taito/warriorb.cpp +++ b/src/mame/taito/warriorb.cpp @@ -589,7 +589,7 @@ void warriorb_state::darius2d(machine_config &config) z80_device &audiocpu(Z80(config, "audiocpu", 16_MHz_XTAL / 4)); // 4 MHz (16 MHz XTAL / 4) audiocpu.set_addrmap(AS_PROGRAM, &warriorb_state::z80_sound_map); - tc0220ioc_device & tc0220ioc(TC0220IOC(config, "tc0220ioc", 0)); + tc0220ioc_device & tc0220ioc(TC0220IOC(config, "tc0220ioc")); tc0220ioc.read_0_callback().set_ioport("DSWA"); tc0220ioc.read_1_callback().set_ioport("DSWB"); tc0220ioc.read_2_callback().set_ioport("IN0"); @@ -611,11 +611,11 @@ void warriorb_state::darius2d(machine_config &config) lscreen.set_screen_update(FUNC(warriorb_state::screen_update<0>)); lscreen.set_palette(m_tc0110pcr[0]); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(4, 0); m_tc0100scn[0]->set_palette(m_tc0110pcr[0]); - TC0110PCR(config, m_tc0110pcr[0], 0); + TC0110PCR(config, m_tc0110pcr[0]); screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER)); rscreen.set_refresh_hz(60); @@ -625,12 +625,12 @@ void warriorb_state::darius2d(machine_config &config) rscreen.set_screen_update(FUNC(warriorb_state::screen_update<1>)); rscreen.set_palette(m_tc0110pcr[1]); - TC0100SCN(config, m_tc0100scn[1], 0); + TC0100SCN(config, m_tc0100scn[1]); m_tc0100scn[1]->set_offsets(4, 0); m_tc0100scn[1]->set_multiscr_hack(1); m_tc0100scn[1]->set_palette(m_tc0110pcr[1]); - TC0110PCR(config, m_tc0110pcr[1], 0); + TC0110PCR(config, m_tc0110pcr[1]); // sound hardware SPEAKER(config, "lspeaker").front_left(); @@ -650,7 +650,7 @@ void warriorb_state::darius2d(machine_config &config) FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_maincpu); m_tc0140syt->set_slave_tag("audiocpu"); } @@ -665,7 +665,7 @@ void warriorb_state::warriorb(machine_config &config) z80_device &audiocpu(Z80(config, "audiocpu", 16_MHz_XTAL / 4)); // 4 MHz (16 MHz XTAL / 4) audiocpu.set_addrmap(AS_PROGRAM, &warriorb_state::z80_sound_map); - tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio", 0)); + tc0510nio_device &tc0510nio(TC0510NIO(config, "tc0510nio")); tc0510nio.read_0_callback().set_ioport("DSWA"); tc0510nio.read_1_callback().set_ioport("DSWB"); tc0510nio.read_2_callback().set_ioport("IN0"); @@ -687,11 +687,11 @@ void warriorb_state::warriorb(machine_config &config) lscreen.set_screen_update(FUNC(warriorb_state::screen_update<0>)); lscreen.set_palette(m_tc0110pcr[0]); - TC0100SCN(config, m_tc0100scn[0], 0); + TC0100SCN(config, m_tc0100scn[0]); m_tc0100scn[0]->set_offsets(4, 0); m_tc0100scn[0]->set_palette(m_tc0110pcr[0]); - TC0110PCR(config, m_tc0110pcr[0], 0); + TC0110PCR(config, m_tc0110pcr[0]); screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER)); rscreen.set_refresh_hz(60); @@ -701,13 +701,13 @@ void warriorb_state::warriorb(machine_config &config) rscreen.set_screen_update(FUNC(warriorb_state::screen_update<1>)); rscreen.set_palette(m_tc0110pcr[1]); - TC0100SCN(config, m_tc0100scn[1], 0); + TC0100SCN(config, m_tc0100scn[1]); m_tc0100scn[1]->set_offsets(4, 0); m_tc0100scn[1]->set_multiscr_xoffs(1); m_tc0100scn[1]->set_multiscr_hack(1); m_tc0100scn[1]->set_palette(m_tc0110pcr[1]); - TC0110PCR(config, m_tc0110pcr[1], 0); + TC0110PCR(config, m_tc0110pcr[1]); // sound hardware SPEAKER(config, "lspeaker").front_left(); @@ -728,7 +728,7 @@ void warriorb_state::warriorb(machine_config &config) FILTER_VOLUME(config, "2610.2.l").add_route(ALL_OUTPUTS, "lspeaker", 1.0); FILTER_VOLUME(config, "2610.2.r").add_route(ALL_OUTPUTS, "rspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_maincpu); m_tc0140syt->set_slave_tag("audiocpu"); } diff --git a/src/mame/taito/wgp.cpp b/src/mame/taito/wgp.cpp index a79905f5aee..50c5dc63f8a 100644 --- a/src/mame/taito/wgp.cpp +++ b/src/mame/taito/wgp.cpp @@ -849,20 +849,20 @@ void wgp_state::machine_start() void wgp_state::wgp(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); /* 12 MHz ??? */ + M68000(config, m_maincpu, XTAL::u(12000000)); /* 12 MHz ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &wgp_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(wgp_state::irq4_line_hold)); Z80(config, m_audiocpu, 16000000/4); /* 4 MHz ??? */ m_audiocpu->set_addrmap(AS_PROGRAM, &wgp_state::z80_sound_map); - M68000(config, m_subcpu, 12000000); /* 12 MHz ??? */ + M68000(config, m_subcpu, XTAL::u(12000000)); /* 12 MHz ??? */ m_subcpu->set_addrmap(AS_PROGRAM, &wgp_state::cpu2_map); m_subcpu->set_vblank_int("screen", FUNC(wgp_state::cpub_interrupt)); config.set_maximum_quantum(attotime::from_hz(30000)); - TC0220IOC(config, m_tc0220ioc, 0); + TC0220IOC(config, m_tc0220ioc); m_tc0220ioc->read_0_callback().set_ioport("DSWA"); m_tc0220ioc->read_1_callback().set_ioport("DSWB"); m_tc0220ioc->read_2_callback().set_ioport("IN0"); @@ -891,7 +891,7 @@ void wgp_state::wgp(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_wgp); PALETTE(config, m_palette).set_format(palette_device::RGBx_444, 4096); - TC0100SCN(config, m_tc0100scn, 0); + TC0100SCN(config, m_tc0100scn); m_tc0100scn->set_palette(m_palette); /* sound hardware */ @@ -905,7 +905,7 @@ void wgp_state::wgp(machine_config &config) ymsnd.add_route(1, "lspeaker", 1.0); ymsnd.add_route(2, "rspeaker", 1.0); - TC0140SYT(config, m_tc0140syt, 0); + TC0140SYT(config, m_tc0140syt); m_tc0140syt->set_master_tag(m_subcpu); m_tc0140syt->set_slave_tag(m_audiocpu); } diff --git a/src/mame/taito/wyvernf0.cpp b/src/mame/taito/wyvernf0.cpp index de1e5f5b9d8..4cbe5023d8e 100644 --- a/src/mame/taito/wyvernf0.cpp +++ b/src/mame/taito/wyvernf0.cpp @@ -687,7 +687,7 @@ void wyvernf0_state::wyvernf0(machine_config &config) // pin 2 SOLO 16' not mapped // pin 22 Noise Output not mapped - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.25); // unknown DAC } /*************************************************************************** diff --git a/src/mame/tangerine/hhtiger.cpp b/src/mame/tangerine/hhtiger.cpp index 739887f9377..58c260abcbb 100644 --- a/src/mame/tangerine/hhtiger.cpp +++ b/src/mame/tangerine/hhtiger.cpp @@ -539,7 +539,7 @@ void hhtiger_state::hhtiger(machine_config &config) m_cassette->set_default_state(CASSETTE_STOPPED); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); - MOS6551(config, m_acia, 0); + MOS6551(config, m_acia); m_acia->set_xtal(1.8432_MHz_XTAL); m_acia->irq_handler().set("irqs", FUNC(input_merger_device::in_w<3>)); m_acia->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); diff --git a/src/mame/tangerine/oric.cpp b/src/mame/tangerine/oric.cpp index bd16f31a4d3..7abbe3ee65e 100644 --- a/src/mame/tangerine/oric.cpp +++ b/src/mame/tangerine/oric.cpp @@ -841,7 +841,7 @@ void oric_state::oric(machine_config &config, bool add_ext) // this variable not m_centronics->set_output_latch(*m_cent_data_out); /* cassette */ - CASSETTE(config, m_cassette, 0); + CASSETTE(config, m_cassette); m_cassette->set_formats(oric_cassette_formats); m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); @@ -880,7 +880,7 @@ void telestrat_state::telstrat(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &telestrat_state::telestrat_mem); /* acia */ - mos6551_device &acia(MOS6551(config, "acia", 0)); + mos6551_device &acia(MOS6551(config, "acia")); acia.set_xtal(1.8432_MHz_XTAL); acia.irq_handler().set(FUNC(telestrat_state::acia_irq_w)); diff --git a/src/mame/tatsumi/kingdrby.cpp b/src/mame/tatsumi/kingdrby.cpp index 2183b938fcc..a0cc2eec688 100644 --- a/src/mame/tatsumi/kingdrby.cpp +++ b/src/mame/tatsumi/kingdrby.cpp @@ -1058,7 +1058,7 @@ void kingdrby_state::cowrace(machine_config &config) m_gfxdecode->set_info(gfx_cowrace); m_palette->set_init(FUNC(kingdrby_state::kingdrby_palette)); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.80); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.80); // clock frequency & pin 7 not verified ym2203_device &aysnd(YM2203(config.replace(), "aysnd", 3000000)); aysnd.port_a_read_callback().set(FUNC(kingdrby_state::sound_cmd_r)); diff --git a/src/mame/tatsumi/tatsumi.cpp b/src/mame/tatsumi/tatsumi.cpp index f607a9ead8b..0caaa3de07a 100644 --- a/src/mame/tatsumi/tatsumi.cpp +++ b/src/mame/tatsumi/tatsumi.cpp @@ -886,7 +886,7 @@ void apache3_state::apache3(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); MCFG_MACHINE_RESET_OVERRIDE(apache3_state, apache3) - m58990_device &adc(M58990(config, "adc", 1000000)); // unknown clock + m58990_device &adc(M58990(config, "adc", XTAL::u(1000000))); // unknown clock adc.in_callback<0>().set_ioport("STICK_X"); adc.in_callback<1>().set_ioport("STICK_Y"); adc.in_callback<2>().set_constant(0); // VSP1 diff --git a/src/mame/tatsumi/tx1_a.cpp b/src/mame/tatsumi/tx1_a.cpp index 429352cdb7d..8bc28964410 100644 --- a/src/mame/tatsumi/tx1_a.cpp +++ b/src/mame/tatsumi/tx1_a.cpp @@ -57,12 +57,12 @@ static const double tx1_engine_gains[16] = DEFINE_DEVICE_TYPE(TX1_SOUND, tx1_sound_device, "tx1_sound", "TX-1 Custom Sound") DEFINE_DEVICE_TYPE(TX1J_SOUND, tx1j_sound_device, "tx1j_sound", "TX-1 Custom Sound (Japan)") -tx1_sound_device::tx1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tx1_sound_device::tx1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tx1_sound_device(mconfig, TX1_SOUND, tag, owner, clock) { } -tx1_sound_device::tx1_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tx1_sound_device::tx1_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), m_audiocpu(*this, "audio_cpu"), @@ -94,7 +94,7 @@ tx1_sound_device::tx1_sound_device(const machine_config &mconfig, device_type ty { } -tx1j_sound_device::tx1j_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tx1j_sound_device::tx1j_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tx1_sound_device(mconfig, TX1J_SOUND, tag, owner, clock) { } @@ -619,18 +619,18 @@ static const double bb_engine_gains[16] = DEFINE_DEVICE_TYPE(BUGGYBOY_SOUND, buggyboy_sound_device, "buggyboy_sound", "Buggy Boy Custom Sound") DEFINE_DEVICE_TYPE(BUGGYBOYJR_SOUND, buggyboyjr_sound_device, "buggyboyjr_sound", "Buggy Boy Jr. Custom Sound") -buggyboy_sound_device::buggyboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +buggyboy_sound_device::buggyboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : buggyboy_sound_device(mconfig, BUGGYBOY_SOUND, tag, owner, clock) { } -buggyboy_sound_device::buggyboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +buggyboy_sound_device::buggyboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : tx1_sound_device(mconfig, type, tag, owner, clock) , m_ym(*this, "ym%u", 1U) { } -buggyboyjr_sound_device::buggyboyjr_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +buggyboyjr_sound_device::buggyboyjr_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : buggyboy_sound_device(mconfig, BUGGYBOYJR_SOUND, tag, owner, clock) { } diff --git a/src/mame/tatsumi/tx1_a.h b/src/mame/tatsumi/tx1_a.h index 8d8e4d49739..15a862ffa32 100644 --- a/src/mame/tatsumi/tx1_a.h +++ b/src/mame/tatsumi/tx1_a.h @@ -17,7 +17,7 @@ class tx1_sound_device : public device_t, public device_sound_interface { public: - tx1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tx1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void z80_busreq_w(uint16_t data); uint16_t dipswitches_r(); @@ -64,7 +64,7 @@ protected: int idx[3]; }; - tx1_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + tx1_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -129,7 +129,7 @@ protected: class tx1j_sound_device : public tx1_sound_device { public: - tx1j_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tx1j_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: @@ -140,13 +140,13 @@ protected: class buggyboy_sound_device : public tx1_sound_device { public: - buggyboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + buggyboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void ym2_a_w(uint8_t data); void ym2_b_w(uint8_t data); protected: - buggyboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + buggyboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual ioport_constructor device_input_ports() const override; @@ -173,7 +173,7 @@ protected: class buggyboyjr_sound_device : public buggyboy_sound_device { public: - buggyboyjr_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + buggyboyjr_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/mame/tch/littlerb.cpp b/src/mame/tch/littlerb.cpp index a50c37fa932..f7ec9fc465c 100644 --- a/src/mame/tch/littlerb.cpp +++ b/src/mame/tch/littlerb.cpp @@ -307,7 +307,7 @@ void littlerb_state::littlerb(machine_config &config) M68000(config, m_maincpu, XTAL(16'000'000)/2); // 10MHz rated part, near 16Mhz XTAL m_maincpu->set_addrmap(AS_PROGRAM, &littlerb_state::main); - INDER_VIDEO(config, m_indervid, 0); // XTAL(40'000'000) + INDER_VIDEO(config, m_indervid); // XTAL(40'000'000) // TODO: not accurate - driven by XTAL(6'000'000)? TIMER(config, "step_timer").configure_periodic(FUNC(littlerb_state::sound_step_cb), attotime::from_hz(7500/150)); @@ -316,8 +316,8 @@ void littlerb_state::littlerb(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_8BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC - DAC_8BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC } ROM_START( littlerb ) diff --git a/src/mame/tch/rltennis.cpp b/src/mame/tch/rltennis.cpp index 7f09307a260..80a82ea8271 100644 --- a/src/mame/tch/rltennis.cpp +++ b/src/mame/tch/rltennis.cpp @@ -197,14 +197,14 @@ void rltennis_state::rltennis(machine_config &config) EEPROM_2864(config, "eeprom"); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); + ramdac_device &ramdac(RAMDAC(config, "ramdac", "palette")); ramdac.set_addrmap(0, &rltennis_state::ramdac_map); ramdac.set_split_read(1); SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // Unknown DAC - DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // Unknown DAC + DAC_8BIT_R2R(config, "dac1").add_route(ALL_OUTPUTS, "speaker", 0.5); // Unknown DAC + DAC_8BIT_R2R(config, "dac2").add_route(ALL_OUTPUTS, "speaker", 0.25); // Unknown DAC } ROM_START( rltennis ) diff --git a/src/mame/tch/speedspn.cpp b/src/mame/tch/speedspn.cpp index dbc4385c880..0729c3c90f1 100644 --- a/src/mame/tch/speedspn.cpp +++ b/src/mame/tch/speedspn.cpp @@ -284,12 +284,12 @@ void speedspn_state::machine_start() void speedspn_state::speedspn(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 6000000); /* 6 MHz */ + Z80(config, m_maincpu, XTAL::u(6000000)); /* 6 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &speedspn_state::program_map); m_maincpu->set_addrmap(AS_IO, &speedspn_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(speedspn_state::irq0_line_hold)); - Z80(config, m_audiocpu, 6000000); /* 6 MHz */ + Z80(config, m_audiocpu, XTAL::u(6000000)); /* 6 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &speedspn_state::sound_map); /* video hardware */ @@ -309,7 +309,7 @@ void speedspn_state::speedspn(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1122000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1122000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); m_oki->set_addrmap(0, &speedspn_state::oki_map); } diff --git a/src/mame/tch/wheelfir.cpp b/src/mame/tch/wheelfir.cpp index 2d02c34c8c1..ab734944de6 100644 --- a/src/mame/tch/wheelfir.cpp +++ b/src/mame/tch/wheelfir.cpp @@ -727,7 +727,7 @@ void wheelfir_state::wheelfir(machine_config &config) //config.set_maximum_quantum(attotime::from_hz(12000)); - adc0808_device &adc(ADC0808(config, "adc", 500000)); // unknown clock + adc0808_device &adc(ADC0808(config, "adc", XTAL::u(500000))); // unknown clock adc.eoc_ff_callback().set(FUNC(wheelfir_state::adc_eoc_w)); adc.in_callback<0>().set_ioport("STEERING"); adc.in_callback<1>().set_ioport("ACCELERATOR"); @@ -744,7 +744,7 @@ void wheelfir_state::wheelfir(machine_config &config) m_screen->set_palette(m_palette); PALETTE(config, m_palette).set_entries(NUM_COLORS); - ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette)); + ramdac_device &ramdac(RAMDAC(config, "ramdac", m_palette)); ramdac.set_addrmap(0, &wheelfir_state::ramdac_map); EEPROM_93C46_16BIT(config, "eeprom"); @@ -754,8 +754,8 @@ void wheelfir_state::wheelfir(machine_config &config) /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - DAC_10BIT_R2R(config, "ldac", 0).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC - DAC_10BIT_R2R(config, "rdac", 0).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC + DAC_10BIT_R2R(config, "ldac").add_route(ALL_OUTPUTS, "lspeaker", 1.0); // unknown DAC + DAC_10BIT_R2R(config, "rdac").add_route(ALL_OUTPUTS, "rspeaker", 1.0); // unknown DAC ; } diff --git a/src/mame/teamconcepts/comquest.cpp b/src/mame/teamconcepts/comquest.cpp index 32a58e60e23..fbb91f1febf 100644 --- a/src/mame/teamconcepts/comquest.cpp +++ b/src/mame/teamconcepts/comquest.cpp @@ -256,7 +256,7 @@ void comquest_state::machine_reset() void comquest_state::comquest(machine_config &config) { /* basic machine hardware */ - M68HC05L11(config, m_maincpu, 4000000); /* 4000000? */ + M68HC05L11(config, m_maincpu, XTAL::u(4000000)); /* 4000000? */ /* 8 bit bus, integrated io, serial io?, diff --git a/src/mame/tecfri/holeland.cpp b/src/mame/tecfri/holeland.cpp index 27570fdbcf4..1f6e961ea60 100644 --- a/src/mame/tecfri/holeland.cpp +++ b/src/mame/tecfri/holeland.cpp @@ -556,7 +556,7 @@ GFXDECODE_END void holeland_state::holeland(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 3'355'700); // measured 298ns on PCB + Z80(config, m_maincpu, XTAL::u(3'355'700)); // measured 298ns on PCB m_maincpu->set_addrmap(AS_PROGRAM, &holeland_state::prg_map); m_maincpu->set_addrmap(AS_IO, &holeland_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(holeland_state::irq0_line_hold)); @@ -592,7 +592,7 @@ void holeland_state::holeland(machine_config &config) ay2.port_b_read_callback().set_ioport("DSW2"); ay2.add_route(ALL_OUTPUTS, "mono", 0.25); - sp0256_device &speech(SP0256(config, "speech", 3'355'700)); // measured 298ns on PCB + sp0256_device &speech(SP0256(config, "speech", XTAL::u(3'355'700))); // measured 298ns on PCB speech.data_request_callback().set_inputline("maincpu", INPUT_LINE_NMI); speech.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/technos/battlane.cpp b/src/mame/technos/battlane.cpp index 60a513b4a99..a9950773c5c 100644 --- a/src/mame/technos/battlane.cpp +++ b/src/mame/technos/battlane.cpp @@ -553,11 +553,11 @@ void battlane_state::machine_reset() void battlane_state::battlane(machine_config &config) { // TODO: measure clocks and determine whether CPUs are MC6809 or MC6809E (both are surface-scratched) - MC6809E(config, m_maincpu, 1'500'000); + MC6809E(config, m_maincpu, XTAL::u(1'500'000)); m_maincpu->set_addrmap(AS_PROGRAM, &battlane_state::prg_map); m_maincpu->set_vblank_int("screen", FUNC(battlane_state::cpu1_interrupt)); - MC6809E(config, m_subcpu, 1'500'000); + MC6809E(config, m_subcpu, XTAL::u(1'500'000)); m_subcpu->set_addrmap(AS_PROGRAM, &battlane_state::prg_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -577,7 +577,7 @@ void battlane_state::battlane(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym3526_device &ymsnd(YM3526(config, "ymsnd", 3'000'000)); + ym3526_device &ymsnd(YM3526(config, "ymsnd", XTAL::u(3'000'000))); ymsnd.irq_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/technos/blockout.cpp b/src/mame/technos/blockout.cpp index 5376150488d..afc8cb9b71a 100644 --- a/src/mame/technos/blockout.cpp +++ b/src/mame/technos/blockout.cpp @@ -471,7 +471,7 @@ void blockout_state::blockout(machine_config &config) ymsnd.add_route(0, "lspeaker", 0.60); ymsnd.add_route(1, "rspeaker", 0.60); - okim6295_device &oki(OKIM6295(config, "oki", 1'056'000, okim6295_device::PIN7_HIGH)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1'056'000), okim6295_device::PIN7_HIGH)); oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50); oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50); } diff --git a/src/mame/technos/chinagat.cpp b/src/mame/technos/chinagat.cpp index f93dac403bb..2d55f3f0000 100644 --- a/src/mame/technos/chinagat.cpp +++ b/src/mame/technos/chinagat.cpp @@ -782,12 +782,12 @@ void chinagat_state::chinagat(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, INPUT_LINE_NMI); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(3579545))); ymsnd.irq_handler().set_inputline(m_soundcpu, 0); ymsnd.add_route(0, "mono", 0.80); ymsnd.add_route(1, "mono", 0.80); - okim6295_device &oki(OKIM6295(config, "oki", 1065000, okim6295_device::PIN7_HIGH)); // pin 7 not verified, clock frequency estimated with recording + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1065000), okim6295_device::PIN7_HIGH)); // pin 7 not verified, clock frequency estimated with recording oki.add_route(ALL_OUTPUTS, "mono", 0.80); } @@ -804,7 +804,7 @@ void chinagat_state::saiyugoub1(machine_config &config) Z80(config, m_soundcpu, XTAL(3'579'545)); /* 3.579545 MHz oscillator */ m_soundcpu->set_addrmap(AS_PROGRAM, &chinagat_state::saiyugoub1_sound_map); - i8748_device &mcu(I8748(config, "mcu", 9263750)); /* 9.263750 MHz oscillator, divided by 3*5 internally */ + i8748_device &mcu(I8748(config, "mcu", XTAL::u(9263750))); /* 9.263750 MHz oscillator, divided by 3*5 internally */ mcu.set_addrmap(AS_PROGRAM, &chinagat_state::i8748_map); mcu.bus_in_cb().set(FUNC(chinagat_state::saiyugoub1_mcu_command_r)); //MCFG_MCS48_PORT_T0_CLK_CUSTOM(chinagat_state, saiyugoub1_m5205_clk_w) /* Drives the clock on the m5205 at 1/8 of this frequency */ @@ -829,7 +829,7 @@ void chinagat_state::saiyugoub1(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, INPUT_LINE_NMI); - ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545)); + ym2151_device &ymsnd(YM2151(config, "ymsnd", XTAL::u(3579545))); ymsnd.irq_handler().set_inputline(m_soundcpu, 0); ymsnd.add_route(0, "mono", 0.80); ymsnd.add_route(1, "mono", 0.80); @@ -870,14 +870,14 @@ void chinagat_state::saiyugoub2(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_soundcpu, INPUT_LINE_NMI); - ym2203_device &ym1(YM2203(config, "ym1", 3579545)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(3579545))); ym1.irq_handler().set_inputline(m_soundcpu, 0); ym1.add_route(0, "mono", 0.50); ym1.add_route(1, "mono", 0.50); ym1.add_route(2, "mono", 0.50); ym1.add_route(3, "mono", 0.80); - ym2203_device &ym2(YM2203(config, "ym2", 3579545)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(3579545))); ym2.add_route(0, "mono", 0.50); ym2.add_route(1, "mono", 0.50); ym2.add_route(2, "mono", 0.50); diff --git a/src/mame/technos/ddragon.cpp b/src/mame/technos/ddragon.cpp index ed50ab8cd5f..882186bf7ce 100644 --- a/src/mame/technos/ddragon.cpp +++ b/src/mame/technos/ddragon.cpp @@ -1088,7 +1088,7 @@ void ddragon_state::ddragon2(machine_config &config) Z80(config, m_subcpu, MAIN_CLOCK / 3); /* 4 MHz */ m_subcpu->set_addrmap(AS_PROGRAM, &ddragon_state::dd2_sub_map); - Z80(config, m_soundcpu, 3579545); + Z80(config, m_soundcpu, XTAL::u(3579545)); m_soundcpu->set_addrmap(AS_PROGRAM, &ddragon_state::dd2_sound_map); config.set_maximum_quantum(attotime::from_hz(60000)); /* heavy interleaving to sync up sprite<->main CPUs */ @@ -1113,7 +1113,7 @@ void ddragon_state::ddragon2(machine_config &config) fmsnd.add_route(0, "mono", 0.60); fmsnd.add_route(1, "mono", 0.60); - okim6295_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 verified on bootleg PCB by Jose Tejada + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 verified on bootleg PCB by Jose Tejada oki.add_route(ALL_OUTPUTS, "mono", 0.20); } diff --git a/src/mame/technos/matmania.cpp b/src/mame/technos/matmania.cpp index 10d1ccd63ff..954cd546258 100644 --- a/src/mame/technos/matmania.cpp +++ b/src/mame/technos/matmania.cpp @@ -613,11 +613,11 @@ GFXDECODE_END void matmania_state::matmania(machine_config &config) { // basic machine hardware - M6502(config, m_maincpu, 1'500'000); // 1.5 MHz ???? + M6502(config, m_maincpu, XTAL::u(1'500'000)); // 1.5 MHz ???? m_maincpu->set_addrmap(AS_PROGRAM, &matmania_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(matmania_state::irq0_line_hold)); - M6502(config, m_audiocpu, 1'200'000); // 1.2 MHz ???? + M6502(config, m_audiocpu, XTAL::u(1'200'000)); // 1.2 MHz ???? m_audiocpu->set_addrmap(AS_PROGRAM, &matmania_state::sound_map); m_audiocpu->set_periodic_int(FUNC(matmania_state::nmi_line_pulse), attotime::from_hz(15 * 60)); // ???? @@ -640,20 +640,20 @@ void matmania_state::matmania(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, M6502_IRQ_LINE); - AY8910(config, "ay1", 1'500'000).add_route(ALL_OUTPUTS, "speaker", 0.3); - AY8910(config, "ay2", 1'500'000).add_route(ALL_OUTPUTS, "speaker", 0.3); + AY8910(config, "ay1", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "speaker", 0.3); + AY8910(config, "ay2", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "speaker", 0.3); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC } void maniach_state::maniach(machine_config &config) { // basic machine hardware - M6502(config, m_maincpu, 1'500'000); // 1.5 MHz ???? + M6502(config, m_maincpu, XTAL::u(1'500'000)); // 1.5 MHz ???? m_maincpu->set_addrmap(AS_PROGRAM, &maniach_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(maniach_state::irq0_line_hold)); - MC6809E(config, m_audiocpu, 1'500'000); // 1.5 MHz ???? (HD68A09EP) + MC6809E(config, m_audiocpu, XTAL::u(1'500'000)); // 1.5 MHz ???? (HD68A09EP) m_audiocpu->set_addrmap(AS_PROGRAM, &maniach_state::sound_map); TAITO68705_MCU(config, m_mcu, 1'500'000 * 2); // (don't know really how fast, but it doesn't need to even be this fast) @@ -677,11 +677,11 @@ void maniach_state::maniach(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, M6809_IRQ_LINE); - ym3526_device &ymsnd(YM3526(config, "ymsnd", 3'600'000)); + ym3526_device &ymsnd(YM3526(config, "ymsnd", XTAL::u(3'600'000))); ymsnd.irq_handler().set_inputline(m_audiocpu, M6809_FIRQ_LINE); ymsnd.add_route(ALL_OUTPUTS, "speaker", 1.0); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC } diff --git a/src/mame/technos/spdodgeb.cpp b/src/mame/technos/spdodgeb.cpp index 3ce6f0c87de..a87f8ef7d21 100644 --- a/src/mame/technos/spdodgeb.cpp +++ b/src/mame/technos/spdodgeb.cpp @@ -578,7 +578,7 @@ void spdodgeb_state::spdodgeb(machine_config &config) MC6809(config, m_audiocpu, XTAL(12'000'000) / 2); // HD68A09P (1.5MHz internally) m_audiocpu->set_addrmap(AS_PROGRAM, &spdodgeb_state::sound_map); - hd63701y0_cpu_device &mcu(HD63701Y0(config, m_mcu, 4'000'000)); // unknown clock + hd63701y0_cpu_device &mcu(HD63701Y0(config, m_mcu, XTAL::u(4'000'000))); // unknown clock mcu.set_addrmap(AS_PROGRAM, &spdodgeb_state::mcu_map); mcu.in_p2_cb().set_ioport("P1"); mcu.in_p6_cb().set_ioport("P2"); @@ -608,13 +608,13 @@ void spdodgeb_state::spdodgeb(machine_config &config) ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 1.0); ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 1.0); - MSM5205(config, m_msm[0], 384000); + MSM5205(config, m_msm[0], XTAL::u(384000)); m_msm[0]->vck_legacy_callback().set(FUNC(spdodgeb_state::adpcm_int<0>)); // interrupt function m_msm[0]->set_prescaler_selector(msm5205_device::S48_4B); // 8kHz? m_msm[0]->add_route(ALL_OUTPUTS, "lspeaker", 0.50); m_msm[0]->add_route(ALL_OUTPUTS, "rspeaker", 0.50); - MSM5205(config, m_msm[1], 384000); + MSM5205(config, m_msm[1], XTAL::u(384000)); m_msm[1]->vck_legacy_callback().set(FUNC(spdodgeb_state::adpcm_int<1>)); // interrupt function m_msm[1]->set_prescaler_selector(msm5205_device::S48_4B); // 8kHz? m_msm[1]->add_route(ALL_OUTPUTS, "lspeaker", 0.50); diff --git a/src/mame/technos/ssozumo.cpp b/src/mame/technos/ssozumo.cpp index 164d0538de8..9c630ed0647 100644 --- a/src/mame/technos/ssozumo.cpp +++ b/src/mame/technos/ssozumo.cpp @@ -411,11 +411,11 @@ INTERRUPT_GEN_MEMBER(ssozumo_state::sound_timer_irq) void ssozumo_state::ssozumo(machine_config &config) { // basic machine hardware - M6502(config, m_maincpu, 1'200'000); // 1.2 MHz ???? + M6502(config, m_maincpu, XTAL::u(1'200'000)); // 1.2 MHz ???? m_maincpu->set_addrmap(AS_PROGRAM, &ssozumo_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(ssozumo_state::irq0_line_hold)); - M6502(config, m_audiocpu, 975'000); // 975 kHz ?? + M6502(config, m_audiocpu, XTAL::u(975'000)); // 975 kHz ?? m_audiocpu->set_addrmap(AS_PROGRAM, &ssozumo_state::sound_map); m_audiocpu->set_periodic_int(FUNC(ssozumo_state::sound_timer_irq), attotime::from_hz(272 / 16 * 57)); // guess, assume to be the same as tagteam @@ -438,10 +438,10 @@ void ssozumo_state::ssozumo(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, m6502_device::IRQ_LINE); - YM2149(config, "ay1", 1'500'000).add_route(ALL_OUTPUTS, "speaker", 0.3); - YM2149(config, "ay2", 1'500'000).add_route(ALL_OUTPUTS, "speaker", 0.3); + YM2149(config, "ay1", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "speaker", 0.3); + YM2149(config, "ay2", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "speaker", 0.3); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC } diff --git a/src/mame/technos/tagteam.cpp b/src/mame/technos/tagteam.cpp index e3c25866078..127b5d7b3ab 100644 --- a/src/mame/technos/tagteam.cpp +++ b/src/mame/technos/tagteam.cpp @@ -470,7 +470,7 @@ void tagteam_state::tagteam(machine_config &config) AY8910(config, "ay1", XTAL(12'000'000) / 8).add_route(ALL_OUTPUTS, "speaker", 0.25); AY8910(config, "ay2", XTAL(12'000'000) / 8).add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC } diff --git a/src/mame/tecmo/gaiden.cpp b/src/mame/tecmo/gaiden.cpp index 9e2bf350b67..88e5dd23d37 100644 --- a/src/mame/tecmo/gaiden.cpp +++ b/src/mame/tecmo/gaiden.cpp @@ -735,7 +735,7 @@ void gaiden_state::shadoww(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &gaiden_state::gaiden_map); m_maincpu->set_vblank_int("screen", FUNC(gaiden_state::irq5_line_assert)); - Z80(config, m_audiocpu, 4000000); /* 4 MHz */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* 4 MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &gaiden_state::sound_map); /* IRQs are triggered by the YM2203 */ WATCHDOG_TIMER(config, "watchdog"); @@ -753,9 +753,9 @@ void gaiden_state::shadoww(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaiden); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 4096); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); - TECMO_MIXER(config, m_mixer, 0); + TECMO_MIXER(config, m_mixer); m_mixer->set_mixer_shifts(10,9,4); m_mixer->set_blendcols( 0x0400 + 0x300, 0x0400 + 0x200, 0x0400 + 0x100, 0x0400 + 0x000 ); m_mixer->set_regularcols( 0x0000 + 0x300, 0x0000 + 0x200, 0x0000 + 0x100, 0x0000 + 0x000 ); @@ -770,20 +770,20 @@ void gaiden_state::shadoww(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - ym2203_device &ym1(YM2203(config, "ym1", 4000000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(4000000))); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(0, "mono", 0.15); ym1.add_route(1, "mono", 0.15); ym1.add_route(2, "mono", 0.15); ym1.add_route(3, "mono", 0.60); - ym2203_device &ym2(YM2203(config, "ym2", 4000000)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(4000000))); ym2.add_route(0, "mono", 0.15); ym2.add_route(1, "mono", 0.15); ym2.add_route(2, "mono", 0.15); ym2.add_route(3, "mono", 0.60); - okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH)); + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH)); oki.add_route(ALL_OUTPUTS, "mono", 0.20); } @@ -844,9 +844,9 @@ void gaiden_state::drgnbowl(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0); - YM2151(config, "ymsnd", 4000000).add_route(ALL_OUTPUTS, "mono", 0.40); + YM2151(config, "ymsnd", XTAL::u(4000000)).add_route(ALL_OUTPUTS, "mono", 0.40); - OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); + OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); } /* @@ -966,11 +966,11 @@ void gaiden_state::mastninj_map(address_map &map) void gaiden_state::mastninj(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); /* 10 MHz? */ + M68000(config, m_maincpu, XTAL::u(10000000)); /* 10 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &gaiden_state::mastninj_map); m_maincpu->set_vblank_int("screen", FUNC(gaiden_state::irq5_line_assert)); - Z80(config, m_audiocpu, 4000000); /* ?? MHz */ + Z80(config, m_audiocpu, XTAL::u(4000000)); /* ?? MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &gaiden_state::mastninj_sound_map); MCFG_MACHINE_START_OVERRIDE(gaiden_state,mastninj) @@ -1001,31 +1001,31 @@ void gaiden_state::mastninj(machine_config &config) GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0); // YM2203 clocks chosen by analogy with Automat; actual rate unknown, but 4 MHz is obviously too fast - ym2203_device &ym1(YM2203(config, "ym1", 1250000)); + ym2203_device &ym1(YM2203(config, "ym1", XTAL::u(1250000))); ym1.add_route(0, "mono", 0.15); ym1.add_route(1, "mono", 0.15); ym1.add_route(2, "mono", 0.15); ym1.add_route(3, "mono", 0.60); - ym2203_device &ym2(YM2203(config, "ym2", 1250000)); + ym2203_device &ym2(YM2203(config, "ym2", XTAL::u(1250000))); ym2.add_route(0, "mono", 0.15); ym2.add_route(1, "mono", 0.15); ym2.add_route(2, "mono", 0.15); ym2.add_route(3, "mono", 0.60); - LS157(config, m_adpcm_select[0], 0); + LS157(config, m_adpcm_select[0]); m_adpcm_select[0]->out_callback().set("msm1", FUNC(msm5205_device::data_w)); - LS157(config, m_adpcm_select[1], 0); + LS157(config, m_adpcm_select[1]); m_adpcm_select[1]->out_callback().set("msm2", FUNC(msm5205_device::data_w)); - MSM5205(config, m_msm[0], 384000); + MSM5205(config, m_msm[0], XTAL::u(384000)); m_msm[0]->vck_callback().set(m_msm[1], FUNC(msm5205_device::vclk_w)); m_msm[0]->vck_callback().append(FUNC(gaiden_state::vck_flipflop_w)); m_msm[0]->set_prescaler_selector(msm5205_device::S96_4B); m_msm[0]->add_route(ALL_OUTPUTS, "mono", 0.20); - MSM5205(config, m_msm[1], 384000); + MSM5205(config, m_msm[1], XTAL::u(384000)); m_msm[1]->set_prescaler_selector(msm5205_device::SEX_4B); m_msm[1]->add_route(ALL_OUTPUTS, "mono", 0.20); } diff --git a/src/mame/tecmo/senjyo.cpp b/src/mame/tecmo/senjyo.cpp index da0d9cd6e36..d6fa4addab8 100644 --- a/src/mame/tecmo/senjyo.cpp +++ b/src/mame/tecmo/senjyo.cpp @@ -567,16 +567,16 @@ static const z80_daisy_config senjyo_daisy_chain[] = void senjyo_state::senjyo(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); /* 4 MHz? */ + Z80(config, m_maincpu, XTAL::u(4000000)); /* 4 MHz? */ m_maincpu->set_addrmap(AS_PROGRAM, &senjyo_state::senjyo_map); m_maincpu->set_vblank_int("screen", FUNC(senjyo_state::irq0_line_assert)); - z80_device& sub(Z80(config, "sub", 2000000)); /* 2 MHz? */ + z80_device& sub(Z80(config, "sub", XTAL::u(2000000))); /* 2 MHz? */ sub.set_daisy_config(senjyo_daisy_chain); sub.set_addrmap(AS_PROGRAM, &senjyo_state::senjyo_sound_map); sub.set_addrmap(AS_IO, &senjyo_state::senjyo_sound_io_map); - Z80PIO(config, m_pio, 2000000); + Z80PIO(config, m_pio, XTAL::u(2000000)); m_pio->out_int_callback().set_inputline("sub", INPUT_LINE_IRQ0); m_pio->in_pa_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); @@ -601,9 +601,9 @@ void senjyo_state::senjyo(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - SN76496(config, "sn1", 2000000).add_route(ALL_OUTPUTS, "speaker", 0.5); - SN76496(config, "sn2", 2000000).add_route(ALL_OUTPUTS, "speaker", 0.5); - SN76496(config, "sn3", 2000000).add_route(ALL_OUTPUTS, "speaker", 0.5); + SN76496(config, "sn1", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 0.5); + SN76496(config, "sn2", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 0.5); + SN76496(config, "sn3", XTAL::u(2000000)).add_route(ALL_OUTPUTS, "speaker", 0.5); GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set(m_pio, FUNC(z80pio_device::strobe_a)).invert(); diff --git a/src/mame/tecmo/solomon.cpp b/src/mame/tecmo/solomon.cpp index 5d019ca4878..9bb9656e167 100644 --- a/src/mame/tecmo/solomon.cpp +++ b/src/mame/tecmo/solomon.cpp @@ -354,11 +354,11 @@ INTERRUPT_GEN_MEMBER(solomon_state::vblank_irq) void solomon_state::solomon(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 4'000'000); // 4.0 MHz (?????) + Z80(config, m_maincpu, XTAL::u(4'000'000)); // 4.0 MHz (?????) m_maincpu->set_addrmap(AS_PROGRAM, &solomon_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(solomon_state::vblank_irq)); - Z80(config, m_audiocpu, 3'072'000); + Z80(config, m_audiocpu, XTAL::u(3'072'000)); m_audiocpu->set_addrmap(AS_PROGRAM, &solomon_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &solomon_state::sound_portmap); m_audiocpu->set_periodic_int(FUNC(solomon_state::irq0_line_hold), attotime::from_hz(2*60)); // ??? @@ -381,9 +381,9 @@ void solomon_state::solomon(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - AY8910(config, "ay1", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.12); - AY8910(config, "ay2", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.12); - AY8910(config, "ay3", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.12); + AY8910(config, "ay1", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "mono", 0.12); + AY8910(config, "ay2", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "mono", 0.12); + AY8910(config, "ay3", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "mono", 0.12); } /*************************************************************************** diff --git a/src/mame/tecmo/spbactn.cpp b/src/mame/tecmo/spbactn.cpp index 326211c9c8b..f17829bd242 100644 --- a/src/mame/tecmo/spbactn.cpp +++ b/src/mame/tecmo/spbactn.cpp @@ -772,9 +772,9 @@ void spbactn_state::spbactn(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_spbactn); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x2800 / 2); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); - TECMO_MIXER(config, m_mixer, 0); + TECMO_MIXER(config, m_mixer); m_mixer->set_mixer_shifts(8,10,4); m_mixer->set_blendcols( 0x0000 + 0x300, 0x0000 + 0x200, 0x0000 + 0x100, 0x0000 + 0x000 ); m_mixer->set_regularcols( 0x0800 + 0x300, 0x0800 + 0x200, 0x0800 + 0x100, 0x0800 + 0x000 ); @@ -838,9 +838,9 @@ void spbactnp_state::spbactnp(machine_config &config) config.set_default_layout(layout_spbactnp); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); - TECMO_MIXER(config, m_mixer, 0); + TECMO_MIXER(config, m_mixer); m_mixer->set_mixer_shifts(12,14,8); m_mixer->set_blendcols( 0x0000 + 0x300, 0x0000 + 0x200, 0x0000 + 0x100, 0x0000 + 0x000 ); m_mixer->set_regularcols( 0x0800 + 0x300, 0x0800 + 0x200, 0x0800 + 0x100, 0x0800 + 0x000 ); diff --git a/src/mame/tecmo/tbowl.cpp b/src/mame/tecmo/tbowl.cpp index ae05c334246..5b0ec1ba1f4 100644 --- a/src/mame/tecmo/tbowl.cpp +++ b/src/mame/tecmo/tbowl.cpp @@ -609,17 +609,17 @@ void tbowl_state::machine_reset() void tbowl_state::tbowl(machine_config &config) { // CPU on Board '6206B' - Z80(config, m_maincpu, 8000000); // NEC D70008AC-8 (Z80 Clone) + Z80(config, m_maincpu, XTAL::u(8000000)); // NEC D70008AC-8 (Z80 Clone) m_maincpu->set_addrmap(AS_PROGRAM, &tbowl_state::_6206B_map); m_maincpu->set_vblank_int("lscreen", FUNC(tbowl_state::irq0_line_hold)); // CPU on Board '6206C' - z80_device &sub(Z80(config, "sub", 8000000)); // NEC D70008AC-8 (Z80 Clone) + z80_device &sub(Z80(config, "sub", XTAL::u(8000000))); // NEC D70008AC-8 (Z80 Clone) sub.set_addrmap(AS_PROGRAM, &tbowl_state::_6206C_map); sub.set_vblank_int("lscreen", FUNC(tbowl_state::irq0_line_hold)); // CPU on Board '6206A' - Z80(config, m_audiocpu, 4000000); // Actual Z80 + Z80(config, m_audiocpu, XTAL::u(4000000)); // Actual Z80 m_audiocpu->set_addrmap(AS_PROGRAM, &tbowl_state::_6206A_map); config.set_maximum_quantum(attotime::from_hz(6000)); @@ -629,7 +629,7 @@ void tbowl_state::tbowl(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 1024*2).set_endianness(ENDIANNESS_BIG); config.set_default_layout(layout_dualhsxs); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER)); lscreen.set_refresh_hz(60); @@ -654,19 +654,19 @@ void tbowl_state::tbowl(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - ym3812_device &ym1(YM3812(config, "ym1", 4000000)); + ym3812_device &ym1(YM3812(config, "ym1", XTAL::u(4000000))); ym1.irq_handler().set_inputline(m_audiocpu, 0); ym1.add_route(ALL_OUTPUTS, "mono", 0.80); - ym3812_device &ym2(YM3812(config, "ym2", 4000000)); + ym3812_device &ym2(YM3812(config, "ym2", XTAL::u(4000000))); ym2.add_route(ALL_OUTPUTS, "mono", 0.80); - MSM5205(config, m_msm[0], 384000); + MSM5205(config, m_msm[0], XTAL::u(384000)); m_msm[0]->vck_legacy_callback().set(FUNC(tbowl_state::adpcm_int<0>)); // interrupt function m_msm[0]->set_prescaler_selector(msm5205_device::S48_4B); // 8KHz m_msm[0]->add_route(ALL_OUTPUTS, "mono", 0.50); - MSM5205(config, m_msm[1], 384000); + MSM5205(config, m_msm[1], XTAL::u(384000)); m_msm[1]->vck_legacy_callback().set(FUNC(tbowl_state::adpcm_int<1>)); // interrupt function m_msm[1]->set_prescaler_selector(msm5205_device::S48_4B); // 8KHz m_msm[1]->add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/tecmo/tecmo.cpp b/src/mame/tecmo/tecmo.cpp index e1f381c6bee..c71d4414cf2 100644 --- a/src/mame/tecmo/tecmo.cpp +++ b/src/mame/tecmo/tecmo.cpp @@ -868,7 +868,7 @@ void tecmo_state::rygar(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_tecmo); PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 1024).set_endianness(ENDIANNESS_BIG); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/tecmo/tecmo16.cpp b/src/mame/tecmo/tecmo16.cpp index e2859d96aeb..f9925c785ec 100644 --- a/src/mame/tecmo/tecmo16.cpp +++ b/src/mame/tecmo/tecmo16.cpp @@ -688,9 +688,9 @@ void tecmo16_state::base(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_tecmo16); PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::xBGR_444, 4096); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); - TECMO_MIXER(config, m_mixer, 0); + TECMO_MIXER(config, m_mixer); m_mixer->set_mixer_shifts(10, 9, 4); m_mixer->set_blendcols( 0x0400 + 0x300, 0x0400 + 0x200, 0x0400 + 0x100, 0x0400 + 0x000 ); m_mixer->set_regularcols( 0x0000 + 0x300, 0x0000 + 0x200, 0x0000 + 0x100, 0x0000 + 0x000 ); diff --git a/src/mame/tecmo/tecmo_mix.cpp b/src/mame/tecmo/tecmo_mix.cpp index ea40b7c9550..40c1013159e 100644 --- a/src/mame/tecmo/tecmo_mix.cpp +++ b/src/mame/tecmo/tecmo_mix.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(TECMO_MIXER, tecmo_mix_device, "tecmo_mix", "Tecmo 16-bit Mixer") -tecmo_mix_device::tecmo_mix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tecmo_mix_device::tecmo_mix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TECMO_MIXER, tag, owner, clock), device_video_interface(mconfig, *this), m_sprpri_shift(0), diff --git a/src/mame/tecmo/tecmo_mix.h b/src/mame/tecmo/tecmo_mix.h index 69b3d5ef326..2cf066b3ae0 100644 --- a/src/mame/tecmo/tecmo_mix.h +++ b/src/mame/tecmo/tecmo_mix.h @@ -12,7 +12,7 @@ class tecmo_mix_device : public device_t, public device_video_interface { public: - tecmo_mix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tecmo_mix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mix_bitmaps(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, palette_device &palette, bitmap_ind16* bitmap_bg, bitmap_ind16* bitmap_fg, bitmap_ind16* bitmap_tx, bitmap_ind16* bitmap_sp); void set_mixer_shifts(int sprpri_shift, int sprbln_shift, int sprcol_shift) diff --git a/src/mame/tecmo/tehkanwc.cpp b/src/mame/tecmo/tehkanwc.cpp index ee2d3b22b3b..267ee77765e 100644 --- a/src/mame/tecmo/tehkanwc.cpp +++ b/src/mame/tecmo/tehkanwc.cpp @@ -706,7 +706,7 @@ void tehkanwc_state::tehkanwc(machine_config &config) ay2.port_b_read_callback().set(FUNC(tehkanwc_state::portB_r)); ay2.add_route(ALL_OUTPUTS, "mono", 0.25); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(tehkanwc_state::adpcm_int)); /* interrupt function */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8KHz */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.45); diff --git a/src/mame/tecmo/wc90.cpp b/src/mame/tecmo/wc90.cpp index 0b49b28baa7..247532ad184 100644 --- a/src/mame/tecmo/wc90.cpp +++ b/src/mame/tecmo/wc90.cpp @@ -586,7 +586,7 @@ void wc90_state::wc90(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_wc90); PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 1024).set_endianness(ENDIANNESS_BIG); - TECMO_SPRITE(config, m_sprgen, 0); + TECMO_SPRITE(config, m_sprgen); // sound hardware SPEAKER(config, "mono").front_center(); diff --git a/src/mame/tektronix/tek405x.cpp b/src/mame/tektronix/tek405x.cpp index b03d1c76233..2410e97bdce 100644 --- a/src/mame/tektronix/tek405x.cpp +++ b/src/mame/tektronix/tek405x.cpp @@ -961,7 +961,7 @@ void tek4051_state::tek4051(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &tek4051_state::tek4051_mem); // video hardware - VECTOR(config, "vector", 0); + VECTOR(config, "vector"); screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_VECTOR)); screen.set_color(rgb_t::green()); screen.set_refresh_hz(50); @@ -979,7 +979,7 @@ void tek4051_state::tek4051(machine_config &config) // devices TIMER(config, "keyboard").configure_periodic(FUNC(tek4051_state::keyboard_tick), attotime::from_hz(XTAL(12'500'000)/15/4)); - pia6821_device &piax(PIA6821(config, MC6820_X_TAG, 0)); + pia6821_device &piax(PIA6821(config, MC6820_X_TAG)); piax.readpa_handler().set(FUNC(tek4051_state::x_pia_pa_r)); // CB1 viewcause piax.writepa_handler().set(FUNC(tek4051_state::x_pia_pa_w)); @@ -989,7 +989,7 @@ void tek4051_state::tek4051(machine_config &config) piax.irqa_handler().set(FUNC(tek4051_state::x_pia_irqa_w)); piax.irqb_handler().set(FUNC(tek4051_state::x_pia_irqb_w)); - pia6821_device &piay(PIA6821(config, MC6820_Y_TAG, 0)); + pia6821_device &piay(PIA6821(config, MC6820_Y_TAG)); piay.readpa_handler().set(FUNC(tek4051_state::sa_r)); // CA1 rdbyte // CB1 mdata @@ -1000,7 +1000,7 @@ void tek4051_state::tek4051(machine_config &config) piay.irqa_handler().set(FUNC(tek4051_state::y_pia_irqa_w)); piay.irqb_handler().set(FUNC(tek4051_state::y_pia_irqb_w)); - pia6821_device &piakbd(PIA6821(config, MC6820_KB_TAG, 0)); + pia6821_device &piakbd(PIA6821(config, MC6820_KB_TAG)); piakbd.readpa_handler().set(FUNC(tek4051_state::kb_pia_pa_r)); piakbd.readpb_handler().set(FUNC(tek4051_state::kb_pia_pb_r)); // CA1 key @@ -1009,7 +1009,7 @@ void tek4051_state::tek4051(machine_config &config) piakbd.irqa_handler().set(FUNC(tek4051_state::kb_pia_irqa_w)); piakbd.irqb_handler().set(FUNC(tek4051_state::kb_pia_irqb_w)); - pia6821_device &piatape(PIA6821(config, MC6820_TAPE_TAG, 0)); + pia6821_device &piatape(PIA6821(config, MC6820_TAPE_TAG)); piatape.readpa_handler().set(FUNC(tek4051_state::tape_pia_pa_r)); // CA1 rmark // CB1 lohole @@ -1020,7 +1020,7 @@ void tek4051_state::tek4051(machine_config &config) piatape.irqa_handler().set(FUNC(tek4051_state::tape_pia_irqa_w)); piatape.irqb_handler().set(FUNC(tek4051_state::tape_pia_irqb_w)); - PIA6821(config, m_gpib_pia, 0); + PIA6821(config, m_gpib_pia); m_gpib_pia->readpa_handler().set(IEEE488_TAG, FUNC(ieee488_device::dio_r)); m_gpib_pia->readpb_handler().set(FUNC(tek4051_state::gpib_pia_pb_r)); m_gpib_pia->writepa_handler().set(FUNC(tek4051_state::dio_w)); @@ -1029,7 +1029,7 @@ void tek4051_state::tek4051(machine_config &config) m_gpib_pia->irqa_handler().set(FUNC(tek4051_state::gpib_pia_irqa_w)); m_gpib_pia->irqb_handler().set(FUNC(tek4051_state::gpib_pia_irqb_w)); - PIA6821(config, m_com_pia, 0); + PIA6821(config, m_com_pia); m_com_pia->readpb_handler().set(FUNC(tek4051_state::com_pia_pb_r)); //CA1 - SRX (RS-232 pin 12) m_com_pia->writepa_handler().set(FUNC(tek4051_state::com_pia_pa_w)); @@ -1037,10 +1037,10 @@ void tek4051_state::tek4051(machine_config &config) m_com_pia->irqa_handler().set(FUNC(tek4051_state::com_pia_irqa_w)); m_com_pia->irqb_handler().set(FUNC(tek4051_state::com_pia_irqb_w)); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->irq_handler().set(FUNC(tek4051_state::acia_irq_w)); - CLOCK(config, m_acia_clock, 38400); + CLOCK(config, m_acia_clock, XTAL::u(38400)); m_acia_clock->signal_handler().set(FUNC(tek4051_state::write_acia_clock)); IEEE488(config, m_gpib); @@ -1058,11 +1058,11 @@ void tek4051_state::tek4051(machine_config &config) void tek4052_state::tek4052(machine_config &config) { // basic machine hardware - m6800_cpu_device &cpu(M6800(config, AM2901A_TAG, 1000000)); // should be 4x AM2901A + AM2911 + m6800_cpu_device &cpu(M6800(config, AM2901A_TAG, XTAL::u(1000000))); // should be 4x AM2901A + AM2911 cpu.set_addrmap(AS_PROGRAM, &tek4052_state::tek4052_mem); // video hardware - VECTOR(config, "vector", 0); + VECTOR(config, "vector"); screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_VECTOR)); screen.set_color(rgb_t::green()); screen.set_refresh_hz(50); diff --git a/src/mame/tektronix/tek410x_kbd.cpp b/src/mame/tektronix/tek410x_kbd.cpp index 4d0d1beea46..1286cf31034 100644 --- a/src/mame/tektronix/tek410x_kbd.cpp +++ b/src/mame/tektronix/tek410x_kbd.cpp @@ -140,7 +140,7 @@ // device type definition DEFINE_DEVICE_TYPE(TEK410X_KEYBOARD, tek410x_keyboard_device, "tek410x_kbd", "Tektronix 410X Standard Keyboard (119-1592-01)") -tek410x_keyboard_device::tek410x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tek410x_keyboard_device::tek410x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TEK410X_KEYBOARD, tag, owner, clock) , m_mcu(*this, "mcu") , m_key_matrix(*this, "X%u", 0U) diff --git a/src/mame/tektronix/tek410x_kbd.h b/src/mame/tektronix/tek410x_kbd.h index 095f7648094..03b9ff623c1 100644 --- a/src/mame/tektronix/tek410x_kbd.h +++ b/src/mame/tektronix/tek410x_kbd.h @@ -19,7 +19,7 @@ class tek410x_keyboard_device : public device_t { public: // device type constructor - tek410x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tek410x_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto tdata_callback() { return m_tdata_callback.bind(); } diff --git a/src/mame/tektronix/tek43xx.cpp b/src/mame/tektronix/tek43xx.cpp index 838243a0620..29368e81840 100644 --- a/src/mame/tektronix/tek43xx.cpp +++ b/src/mame/tektronix/tek43xx.cpp @@ -51,7 +51,7 @@ INPUT_PORTS_END void tek43xx_state::tek4319(machine_config &config) { - M68020(config, m_maincpu, 20'000'000); + M68020(config, m_maincpu, XTAL::u(20'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &tek43xx_state::mem_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/tektronix/tekigw.cpp b/src/mame/tektronix/tekigw.cpp index 3000d55ccd3..d032684a3fe 100644 --- a/src/mame/tektronix/tekigw.cpp +++ b/src/mame/tektronix/tekigw.cpp @@ -704,7 +704,7 @@ void tekigw_state_base::common_config(machine_config &config) SCC8530N(config, m_scc, 16_MHz_XTAL / 4); m_scc->out_int_callback().set(m_icu, FUNC(ns32202_device::ir_w<1>)).invert(); - m_scc->configure_channels(2'457'600, 0, 2'457'600, 0); + m_scc->configure_channels(XTAL::u(2'457'600), XTAL(), XTAL::u(2'457'600), XTAL()); RS232_PORT(config, m_serial[0], default_rs232_devices, "terminal"); m_serial[0]->cts_handler().set(m_scc, FUNC(z80scc_device::ctsa_w)); @@ -777,7 +777,7 @@ void tek6100_state::tek6130(machine_config &config) * - Micropolis 1304 (830,6,16,512) * - Maxtor XT-1105 (918,11,16,512) */ - HARDDISK(config, m_hdd, 0); + HARDDISK(config, m_hdd); TMS9914(config, m_gpib, 20_MHz_XTAL / 4); m_gpib->int_write_cb().set(m_icu, FUNC(ns32202_device::ir_w<10>)); @@ -807,16 +807,16 @@ void tek6100_state::tek6130(machine_config &config) // TODO: graphics board disabled for now if (false) { - NS32016(config, m_dpu_cpu, 0); // 8'000'000); + NS32016(config, m_dpu_cpu); // 8'000'000); m_dpu_cpu->set_addrmap(0, &tek6100_state::dpu_cpu_map<0>); - ns32081_device &dpu_fpu(NS32081(config, "dpu_fpu", 8'000'000)); + ns32081_device &dpu_fpu(NS32081(config, "dpu_fpu", XTAL::u(8'000'000))); m_dpu_cpu->set_fpu(dpu_fpu); - ns32202_device &dpu_icu(NS32202(config, "dpu_icu", 20'000)); + ns32202_device &dpu_icu(NS32202(config, "dpu_icu", XTAL::u(20'000))); dpu_icu.out_int().set_inputline(m_dpu_cpu, INPUT_LINE_IRQ0).invert(); - i8744_device &dpu_mcu(I8744(config, "dpu_mcu", 0)); // 10'000'000)); // 8744H-10 + i8744_device &dpu_mcu(I8744(config, "dpu_mcu")); // 10'000'000)); // 8744H-10 (void)dpu_mcu; mc6845_device &dpu_crtc(SY6845E(config, "dpu_crtc", 25.2_MHz_XTAL)); // SYP6845EA @@ -833,7 +833,7 @@ void tek6100_state::tek6130(machine_config &config) // 13-inch 640x480 60Hz 4-bit color // 15-inch 640x480 60Hz monochrome screen_device &dpu_screen(SCREEN(config, "dpu_screen", SCREEN_TYPE_RASTER)); - dpu_screen.set_raw(25200000, 800, 0, 640, 525, 0, 480); + dpu_screen.set_raw(XTAL::u(25200000), 800, 0, 640, 525, 0, 480); dpu_screen.set_screen_update(FUNC(tek6100_state::screen_update)); } } @@ -852,7 +852,7 @@ void tek4132_state::tek4132(machine_config &config) m_lan->set_addrmap(0, &tek4132_state::lan_map); - m_scc->configure_channels(3'686'400, 0, 3'686'400, 0); + m_scc->configure_channels(XTAL::u(3'686'400), XTAL(), XTAL::u(3'686'400), XTAL()0); /* * Interrupt sources @@ -879,7 +879,7 @@ void tek4132_state::tek4132(machine_config &config) EEPROM_X24C44_16BIT(config, m_nov[1]); // X2443P m_nov[1]->do_callback().set(FUNC(tek4132_state::nov_do)); - AM9517A(config, m_sdma, 4'000'000); // clock? + AM9517A(config, m_sdma, XTAL::u(4'000'000)); // clock? m_sdma->dreq_active_low(); INPUT_MERGER_ALL_HIGH(config, m_sirq); diff --git a/src/mame/telenova/compis.cpp b/src/mame/telenova/compis.cpp index 4643249e468..4f9fda5e897 100644 --- a/src/mame/telenova/compis.cpp +++ b/src/mame/telenova/compis.cpp @@ -755,7 +755,7 @@ void compis_state::compis(machine_config &config) m_osp->delay().set(m_osp, FUNC(i80130_device::ir7_w)); m_osp->baud().set(FUNC(compis_state::tmr2_w)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(15.36_MHz_XTAL/8); m_pit->out_handler<0>().set(m_mpsc, FUNC(i8274_device::rxtxcb_w)); m_pit->set_clk<1>(15.36_MHz_XTAL/8); @@ -767,12 +767,12 @@ void compis_state::compis(machine_config &config) m_ppi->in_pb_callback().set(FUNC(compis_state::ppi_pb_r)); m_ppi->out_pc_callback().set(FUNC(compis_state::ppi_pc_w)); - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set(COMPIS_KEYBOARD_TAG, FUNC(compis_keyboard_device::si_w)); m_uart->rxrdy_handler().set(m_osp, FUNC(i80130_device::ir2_w)); m_uart->txrdy_handler().set(m_maincpu, FUNC(i80186_cpu_device::int1_w)); - compis_keyboard_device &kb(COMPIS_KEYBOARD(config, COMPIS_KEYBOARD_TAG, 0)); + compis_keyboard_device &kb(COMPIS_KEYBOARD(config, COMPIS_KEYBOARD_TAG)); kb.out_tx_handler().set(m_uart, FUNC(i8251_device::write_rxd)); I8274(config, m_mpsc, 15.36_MHz_XTAL/4); @@ -812,11 +812,11 @@ void compis_state::compis(machine_config &config) COMPIS_GRAPHICS_SLOT(config, m_graphics, 15.36_MHz_XTAL/2, compis_graphics_cards, "hrg"); - ISBX_SLOT(config, m_isbx0, 0, isbx_cards, "fdc"); + ISBX_SLOT(config, m_isbx0, isbx_cards, "fdc"); m_isbx0->mintr0().set(m_osp, FUNC(i80130_device::ir1_w)); m_isbx0->mintr1().set(m_osp, FUNC(i80130_device::ir0_w)); m_isbx0->mdrqt().set(m_maincpu, FUNC(i80186_cpu_device::drq0_w)); - ISBX_SLOT(config, m_isbx1, 0, isbx_cards, nullptr); + ISBX_SLOT(config, m_isbx1, isbx_cards, nullptr); m_isbx1->mintr0().set(m_osp, FUNC(i80130_device::ir6_w)); m_isbx1->mintr1().set(m_osp, FUNC(i80130_device::ir5_w)); m_isbx1->mdrqt().set(m_maincpu, FUNC(i80186_cpu_device::drq1_w)); diff --git a/src/mame/telenova/compiskb.cpp b/src/mame/telenova/compiskb.cpp index c20d71434fb..1d9bf76dbcf 100644 --- a/src/mame/telenova/compiskb.cpp +++ b/src/mame/telenova/compiskb.cpp @@ -57,7 +57,7 @@ const tiny_rom_entry *compis_keyboard_device::device_rom_region() const void compis_keyboard_device::device_add_mconfig(machine_config &config) { - I8748(config, m_maincpu, 2016000); // XTAL(4'032'000)/2 ??? + I8748(config, m_maincpu, XTAL::u(2016000)); // XTAL(4'032'000)/2 ??? m_maincpu->bus_in_cb().set(FUNC(compis_keyboard_device::bus_r)); m_maincpu->bus_out_cb().set(FUNC(compis_keyboard_device::bus_w)); m_maincpu->p1_in_cb().set(FUNC(compis_keyboard_device::p1_r)); @@ -221,7 +221,7 @@ ioport_constructor compis_keyboard_device::device_input_ports() const // compis_keyboard_device - constructor //------------------------------------------------- -compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COMPIS_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8748_TAG), m_speaker(*this, SPEAKER_TAG), diff --git a/src/mame/telenova/compiskb.h b/src/mame/telenova/compiskb.h index 5232f1d5e1b..cb8ab6e5297 100644 --- a/src/mame/telenova/compiskb.h +++ b/src/mame/telenova/compiskb.h @@ -25,7 +25,7 @@ class compis_keyboard_device : public device_t { public: // construction/destruction - compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_tx_handler() { return m_out_tx_handler.bind(); } diff --git a/src/mame/telercas/tmc1800.cpp b/src/mame/telercas/tmc1800.cpp index 26b92dc1abd..afa24241abf 100644 --- a/src/mame/telercas/tmc1800.cpp +++ b/src/mame/telercas/tmc1800.cpp @@ -686,7 +686,7 @@ void tmc1800_state::machine_reset() /* initialize beeper */ m_beeper->set_state(0); - m_beeper->set_clock(0); + m_beeper->set_clock(XTAL::u(0)); } // OSCOM 1000B @@ -797,7 +797,7 @@ void tmc1800_state::tmc1800(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + BEEP(config, m_beeper).add_route(ALL_OUTPUTS, "mono", 0.25); // devices QUICKLOAD(config, "quickload", "bin").set_load_callback(FUNC(tmc1800_base_state::quickload_cb)); @@ -832,7 +832,7 @@ void osc1000b_state::osc1000b(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + BEEP(config, m_beeper).add_route(ALL_OUTPUTS, "mono", 0.25); // devices QUICKLOAD(config, "quickload", "bin").set_load_callback(FUNC(tmc1800_base_state::quickload_cb)); diff --git a/src/mame/televideo/ts802.cpp b/src/mame/televideo/ts802.cpp index f75d4d0df89..789e914e2fa 100644 --- a/src/mame/televideo/ts802.cpp +++ b/src/mame/televideo/ts802.cpp @@ -198,7 +198,7 @@ void ts802_state::ts802(machine_config &config) //m_maincpu->set_daisy_config(daisy_chain_intf); // causes problems /* Devices */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(ts802_state::kbd_put)); z80dma_device& dma(Z80DMA(config, "dma", 16_MHz_XTAL / 4)); @@ -218,7 +218,7 @@ void ts802_state::ts802(machine_config &config) z80ctc_device& ctc(Z80CTC(config, "ctc", 16_MHz_XTAL / 4)); ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - FD1793(config, "fdc", 4'000'000 / 2); // unknown clock + FD1793(config, "fdc", XTAL::u(4'000'000) / 2); // unknown clock FLOPPY_CONNECTOR(config, "fdc:0", ts802_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); } diff --git a/src/mame/televideo/ts816.cpp b/src/mame/televideo/ts816.cpp index 1ff3c43ab21..91798a42650 100644 --- a/src/mame/televideo/ts816.cpp +++ b/src/mame/televideo/ts816.cpp @@ -272,7 +272,7 @@ void ts816_state::ts816(machine_config &config) m_maincpu->set_daisy_config(daisy_chain); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(ts816_state::kbd_put)); //z80sio_device& sio0(Z80SIO(config, "sio0", XTAL(16'000'000) / 4)); diff --git a/src/mame/televideo/tv910.cpp b/src/mame/televideo/tv910.cpp index 30b3c43abad..2ba90e1ca50 100644 --- a/src/mame/televideo/tv910.cpp +++ b/src/mame/televideo/tv910.cpp @@ -533,7 +533,7 @@ void tv910_state::tv910(machine_config &config) m_crtc->set_on_update_addr_change_callback(FUNC(tv910_state::crtc_update_addr)); m_crtc->out_vsync_callback().set(FUNC(tv910_state::vbl_w)); - AY3600(config, m_ay3600, 0); + AY3600(config, m_ay3600); m_ay3600->x0().set_ioport("X0"); m_ay3600->x1().set_ioport("X1"); m_ay3600->x2().set_ioport("X2"); @@ -548,7 +548,7 @@ void tv910_state::tv910(machine_config &config) m_ay3600->data_ready().set(FUNC(tv910_state::ay3600_data_ready_w)); m_ay3600->ako().set(FUNC(tv910_state::ay3600_ako_w)); - mos6551_device &acia(MOS6551(config, ACIA_TAG, 0)); + mos6551_device &acia(MOS6551(config, ACIA_TAG)); acia.set_xtal(1.8432_MHz_XTAL); acia.irq_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); acia.txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); diff --git a/src/mame/televideo/tv924.cpp b/src/mame/televideo/tv924.cpp index 31d51bc3ace..ebc6f352b82 100644 --- a/src/mame/televideo/tv924.cpp +++ b/src/mame/televideo/tv924.cpp @@ -63,7 +63,7 @@ INPUT_PORTS_END void tv924_state::tv924(machine_config &config) { - M6502(config, m_maincpu, 1'723'560); // R6502AP (clock guessed) + M6502(config, m_maincpu, XTAL::u(1'723'560)); // R6502AP (clock guessed) m_maincpu->set_addrmap(AS_PROGRAM, &tv924_state::mem_map); I8049(config, "kbdc", 5.7143_MHz_XTAL).set_disable(); @@ -75,7 +75,7 @@ void tv924_state::tv924(machine_config &config) screen.set_raw(27'576'960, 848 * 2, 0, 640 * 2, 271, 0, 250); screen.set_screen_update("pvtc", FUNC(scn2672_device::screen_update)); - SCN2672(config, m_pvtc, 1'723'560); // SCN2672A (with SCB2673B + AMI gate arrays 130170-00 and 130180-00) + SCN2672(config, m_pvtc, XTAL::u(1'723'560)); // SCN2672A (with SCB2673B + AMI gate arrays 130170-00 and 130180-00) m_pvtc->set_screen("screen"); m_pvtc->set_character_width(16); // nominally 8, but with half-dot shifting m_pvtc->set_addrmap(0, &tv924_state::char_map); diff --git a/src/mame/televideo/tv950kb.cpp b/src/mame/televideo/tv950kb.cpp index f36aecc0cde..21137fd1ef2 100644 --- a/src/mame/televideo/tv950kb.cpp +++ b/src/mame/televideo/tv950kb.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(TV950_KEYBOARD, tv950kb_device, "tv950kb", "TeleVideo 950 Keyboard") -tv950kb_device::tv950kb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tv950kb_device::tv950kb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TV950_KEYBOARD, tag, owner, clock) , m_tx_cb(*this) , m_mcu(*this, "mcu") diff --git a/src/mame/televideo/tv950kb.h b/src/mame/televideo/tv950kb.h index 319f690b363..0009accd3ee 100644 --- a/src/mame/televideo/tv950kb.h +++ b/src/mame/televideo/tv950kb.h @@ -20,7 +20,7 @@ class tv950kb_device : public device_t { public: - tv950kb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tv950kb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto tx_cb() { return m_tx_cb.bind(); } diff --git a/src/mame/televideo/tv955.cpp b/src/mame/televideo/tv955.cpp index 2196dcc9b17..f4c5043ae3d 100644 --- a/src/mame/televideo/tv955.cpp +++ b/src/mame/televideo/tv955.cpp @@ -170,19 +170,19 @@ void tv955_state::tv955(machine_config &config) m_crtc->intr_callback().set_inputline(m_maincpu, m6502_device::NMI_LINE); m_crtc->set_screen("screen"); - MOS6551(config, m_hostuart, 0); + MOS6551(config, m_hostuart); m_hostuart->set_xtal(3.6864_MHz_XTAL); m_hostuart->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<0>)); m_hostuart->txd_handler().set(m_mainport, FUNC(rs232_port_device::write_txd)); m_hostuart->rts_handler().set(m_mainport, FUNC(rs232_port_device::write_rts)); m_hostuart->dtr_handler().set(m_mainport, FUNC(rs232_port_device::write_dtr)); - MOS6551(config, m_printuart, 0); + MOS6551(config, m_printuart); m_printuart->set_xtal(3.6864_MHz_XTAL / 2); m_printuart->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); m_printuart->txd_handler().set(m_printer, FUNC(rs232_port_device::write_txd)); - MOS6551(config, m_keybuart, 0); + MOS6551(config, m_keybuart); m_keybuart->set_xtal(3.6864_MHz_XTAL / 2); m_keybuart->irq_handler().set("mainirq", FUNC(input_merger_device::in_w<2>)); m_keybuart->txd_handler().set("keyboard", FUNC(tv955kb_device::write_rxd)); diff --git a/src/mame/televideo/tv955kb.cpp b/src/mame/televideo/tv955kb.cpp index 80d493d6766..4c50f43f8cb 100644 --- a/src/mame/televideo/tv955kb.cpp +++ b/src/mame/televideo/tv955kb.cpp @@ -21,7 +21,7 @@ Connector pinout: DEFINE_DEVICE_TYPE(TV955_KEYBOARD, tv955kb_device, "tv955kb", "TeleVideo 955 Keyboard") -tv955kb_device::tv955kb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tv955kb_device::tv955kb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TV955_KEYBOARD, tag, owner, clock) , m_txd_cb(*this) , m_reset_cb(*this) diff --git a/src/mame/televideo/tv955kb.h b/src/mame/televideo/tv955kb.h index 8b45986b622..9f65bf6f30e 100644 --- a/src/mame/televideo/tv955kb.h +++ b/src/mame/televideo/tv955kb.h @@ -19,7 +19,7 @@ class tv955kb_device : public device_t { public: - tv955kb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tv955kb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto txd_cb() { return m_txd_cb.bind(); } diff --git a/src/mame/televideo/tv965.cpp b/src/mame/televideo/tv965.cpp index d70c580e230..830c2d096b8 100644 --- a/src/mame/televideo/tv965.cpp +++ b/src/mame/televideo/tv965.cpp @@ -89,10 +89,10 @@ void tv965_state::tv965(machine_config &config) crtc.intr_callback().set_inputline(m_maincpu, G65816_LINE_NMI); crtc.set_screen("screen"); - mos6551_device &acia1(MOS6551(config, "acia1", 0)); + mos6551_device &acia1(MOS6551(config, "acia1")); acia1.set_xtal(3.6864_MHz_XTAL / 2); // divider not verified, possibly even programmable - mos6551_device &acia2(MOS6551(config, "acia2", 0)); + mos6551_device &acia2(MOS6551(config, "acia2")); acia2.set_xtal(3.6864_MHz_XTAL / 2); // divider not verified, possibly even programmable } diff --git a/src/mame/televideo/tv990.cpp b/src/mame/televideo/tv990.cpp index 07a86a293da..0b869946340 100644 --- a/src/mame/televideo/tv990.cpp +++ b/src/mame/televideo/tv990.cpp @@ -374,7 +374,7 @@ void tv990_state::device_post_load() void tv990_state::tv990(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 14967500); // verified (59.86992/4) + M68000(config, m_maincpu, XTAL::u(14967500)); // verified (59.86992/4) m_maincpu->set_addrmap(AS_PROGRAM, &tv990_state::tv990_mem); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -419,7 +419,7 @@ void tv990_state::tv990(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); SPEAKER(config, "mono").front_center(); - BEEP(config, "beep", 1000).add_route(ALL_OUTPUTS, "mono", 1.0); //whats the freq? + BEEP(config, "beep", XTAL::u(1000)).add_route(ALL_OUTPUTS, "mono", 1.0); //whats the freq? } /* ROM definition */ diff --git a/src/mame/tesla/ondra.cpp b/src/mame/tesla/ondra.cpp index 18682329a00..27979e631b4 100644 --- a/src/mame/tesla/ondra.cpp +++ b/src/mame/tesla/ondra.cpp @@ -178,7 +178,7 @@ void ondra_state::ondra(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 950); // guess + BEEP(config, m_beep, XTAL::u(950)); // guess m_beep->add_route(ALL_OUTPUTS, "mono", 0.25); CASSETTE(config, m_cassette); diff --git a/src/mame/tesla/pmd85.cpp b/src/mame/tesla/pmd85.cpp index ea0156236ba..6d2cd977720 100644 --- a/src/mame/tesla/pmd85.cpp +++ b/src/mame/tesla/pmd85.cpp @@ -648,7 +648,7 @@ void pmd85_state::pmd85(machine_config &config, bool with_uart) *******************************************************************************/ - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(0); m_pit->set_clk<1>(XTAL(18'432'000)/9); m_pit->set_clk<2>(1); @@ -683,7 +683,7 @@ void pmd85_state::pmd85(machine_config &config, bool with_uart) /* uart */ if (with_uart) { - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set([this] (bool state) { m_txd = state; }); m_uart->rts_handler().set([this] (bool state) { m_uart->write_cts(state); }); } @@ -696,7 +696,7 @@ void pmd85_state::pmd851(machine_config &config) { pmd85(config); - I8255(config, m_ppi0, 0); + I8255(config, m_ppi0); m_ppi0->in_pa_callback().set(FUNC(pmd85_state::ppi0_porta_r)); m_ppi0->in_pb_callback().set(FUNC(pmd85_state::ppi0_portb_r)); m_ppi0->in_pc_callback().set(FUNC(pmd85_state::ppi0_portc_r)); @@ -704,7 +704,7 @@ void pmd85_state::pmd851(machine_config &config) m_ppi0->out_pb_callback().set(FUNC(pmd85_state::ppi0_portb_w)); m_ppi0->out_pc_callback().set(FUNC(pmd85_state::ppi0_portc_w)); - I8255(config, m_ppi1, 0); + I8255(config, m_ppi1); m_ppi1->in_pa_callback().set(FUNC(pmd85_state::ppi1_porta_r)); m_ppi1->in_pb_callback().set(FUNC(pmd85_state::ppi1_portb_r)); m_ppi1->in_pc_callback().set(FUNC(pmd85_state::ppi1_portc_r)); @@ -712,7 +712,7 @@ void pmd85_state::pmd851(machine_config &config) m_ppi1->out_pb_callback().set(FUNC(pmd85_state::ppi1_portb_w)); m_ppi1->out_pc_callback().set(FUNC(pmd85_state::ppi1_portc_w)); - I8255(config, m_ppi2, 0); + I8255(config, m_ppi2); m_ppi2->in_pa_callback().set(FUNC(pmd85_state::ppi2_porta_r)); m_ppi2->in_pb_callback().set(FUNC(pmd85_state::ppi2_portb_r)); m_ppi2->in_pc_callback().set(FUNC(pmd85_state::ppi2_portc_r)); @@ -720,7 +720,7 @@ void pmd85_state::pmd851(machine_config &config) m_ppi2->out_pb_callback().set(FUNC(pmd85_state::ppi2_portb_w)); m_ppi2->out_pc_callback().set(FUNC(pmd85_state::ppi2_portc_w)); - I8255(config, m_ppi3, 0); + I8255(config, m_ppi3); m_ppi3->in_pa_callback().set(FUNC(pmd85_state::ppi3_porta_r)); m_ppi3->in_pb_callback().set(FUNC(pmd85_state::ppi3_portb_r)); m_ppi3->in_pc_callback().set(FUNC(pmd85_state::ppi3_portc_r)); @@ -746,7 +746,7 @@ void pmd85_state::alfa(machine_config &config) pmd85(config); m_maincpu->set_addrmap(AS_PROGRAM, &pmd85_state::alfa_mem); - I8255(config, m_ppi0, 0); + I8255(config, m_ppi0); m_ppi0->in_pa_callback().set(FUNC(pmd85_state::ppi0_porta_r)); m_ppi0->in_pb_callback().set(FUNC(pmd85_state::ppi0_portb_r)); m_ppi0->in_pc_callback().set(FUNC(pmd85_state::ppi0_portc_r)); @@ -754,7 +754,7 @@ void pmd85_state::alfa(machine_config &config) m_ppi0->out_pb_callback().set(FUNC(pmd85_state::ppi0_portb_w)); m_ppi0->out_pc_callback().set(FUNC(pmd85_state::ppi0_portc_w)); - I8255(config, m_ppi1, 0); + I8255(config, m_ppi1); m_ppi1->in_pa_callback().set(FUNC(pmd85_state::ppi1_porta_r)); m_ppi1->in_pb_callback().set(FUNC(pmd85_state::ppi1_portb_r)); m_ppi1->in_pc_callback().set(FUNC(pmd85_state::ppi1_portc_r)); @@ -762,7 +762,7 @@ void pmd85_state::alfa(machine_config &config) m_ppi1->out_pb_callback().set(FUNC(pmd85_state::ppi1_portb_w)); m_ppi1->out_pc_callback().set(FUNC(pmd85_state::ppi1_portc_w)); - I8255(config, m_ppi2, 0); + I8255(config, m_ppi2); m_ppi2->in_pa_callback().set(FUNC(pmd85_state::ppi2_porta_r)); m_ppi2->in_pb_callback().set(FUNC(pmd85_state::ppi2_portb_r)); m_ppi2->in_pc_callback().set(FUNC(pmd85_state::ppi2_portc_r)); @@ -777,7 +777,7 @@ void pmd85_state::mato(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pmd85_state::mato_mem); m_maincpu->set_addrmap(AS_IO, &pmd85_state::mato_io); - I8255(config, m_ppi0, 0); + I8255(config, m_ppi0); m_ppi0->in_pa_callback().set(FUNC(pmd85_state::ppi0_porta_r)); m_ppi0->out_pa_callback().set(FUNC(pmd85_state::ppi0_porta_w)); m_ppi0->in_pb_callback().set(FUNC(pmd85_state::mato_ppi0_portb_r)); diff --git a/src/mame/tesla/sapi1.cpp b/src/mame/tesla/sapi1.cpp index 0194ce96a71..68fee11a0c7 100644 --- a/src/mame/tesla/sapi1.cpp +++ b/src/mame/tesla/sapi1.cpp @@ -823,7 +823,7 @@ void sapi_state::sapi2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sapi_state::sapi2_mem); m_maincpu->set_addrmap(AS_IO, &sapi_state::sapi2_io); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(sapi_state::kbd_put)); } @@ -853,7 +853,7 @@ void sapi_state::sapi3b(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &sapi_state::sapi3b_mem); m_maincpu->set_addrmap(AS_IO, &sapi_state::sapi3b_io); - mc6845_device &crtc(MC6845(config, "crtc", 1008000)); // guess + mc6845_device &crtc(MC6845(config, "crtc", XTAL::u(1008000))); // guess crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(6); diff --git a/src/mame/thepit/timelimt.cpp b/src/mame/thepit/timelimt.cpp index 27396ff178a..eead1ec1ec8 100644 --- a/src/mame/thepit/timelimt.cpp +++ b/src/mame/thepit/timelimt.cpp @@ -231,7 +231,7 @@ INTERRUPT_GEN_MEMBER(timelimt_state::main_nmi) void timelimt_state::timelimt(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 5000000); /* 5.000 MHz */ + Z80(config, m_maincpu, XTAL::u(5000000)); /* 5.000 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &timelimt_state::main_map); m_maincpu->set_addrmap(AS_IO, &timelimt_state::main_io_map); m_maincpu->set_vblank_int("screen", FUNC(timelimt_state::main_nmi)); diff --git a/src/mame/thomson/thomson.cpp b/src/mame/thomson/thomson.cpp index 0bd3d83b58b..950ec835c1d 100644 --- a/src/mame/thomson/thomson.cpp +++ b/src/mame/thomson/thomson.cpp @@ -517,11 +517,11 @@ void thomson_state::to7_base(machine_config &config, bool is_mo) /* sound */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "buzzer", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC_6BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // 6-bit game extension R-2R DAC (R=10K) + DAC_1BIT(config, "buzzer").add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_6BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // 6-bit game extension R-2R DAC (R=10K) /* speech synthesis */ - MEA8000(config, m_mea8000, 3840000).add_route(ALL_OUTPUTS, "speaker", 1.0); + MEA8000(config, m_mea8000, XTAL::u(3840000)).add_route(ALL_OUTPUTS, "speaker", 1.0); /* cassette */ CASSETTE(config, m_cassette); @@ -541,7 +541,7 @@ void thomson_state::to7_base(machine_config &config, bool is_mo) m_extension->option_add("nanoreseau", NANORESEAU_TO); /* pia */ - PIA6821(config, m_pia_sys, 0); + PIA6821(config, m_pia_sys); m_pia_sys->readpa_handler().set(FUNC(thomson_state::to7_sys_porta_in)); m_pia_sys->readpb_handler().set(FUNC(thomson_state::to7_sys_portb_in)); m_pia_sys->writepb_handler().set(FUNC(thomson_state::to7_sys_portb_out)); @@ -550,7 +550,7 @@ void thomson_state::to7_base(machine_config &config, bool is_mo) m_pia_sys->irqa_handler().set("mainfirq", FUNC(input_merger_device::in_w<1>)); m_pia_sys->irqb_handler().set("mainfirq", FUNC(input_merger_device::in_w<1>)); - PIA6821(config, m_pia_game, 0); + PIA6821(config, m_pia_game); m_pia_game->readpa_handler().set(FUNC(thomson_state::to7_game_porta_in)); m_pia_game->readpb_handler().set(FUNC(thomson_state::to7_game_portb_in)); m_pia_game->writepb_handler().set(FUNC(thomson_state::to7_game_portb_out)); @@ -559,7 +559,7 @@ void thomson_state::to7_base(machine_config &config, bool is_mo) m_pia_game->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); /* TODO: CONVERT THIS TO A SLOT DEVICE (RF 57-932) */ - mos6551_device &acia(MOS6551(config, "acia", 0)); + mos6551_device &acia(MOS6551(config, "acia")); acia.set_xtal(1.8432_MHz_XTAL); acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); @@ -572,17 +572,17 @@ void thomson_state::to7_base(machine_config &config, bool is_mo) /* TODO: CONVERT THIS TO A SLOT DEVICE (CC 90-232) */ - TO7_IO_LINE(config, "to7_io", 0); + TO7_IO_LINE(config, "to7_io"); /* TODO: CONVERT THIS TO A SLOT DEVICE (MD 90-120) */ - PIA6821(config, THOM_PIA_MODEM, 0); + PIA6821(config, THOM_PIA_MODEM); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set(FUNC(thomson_state::to7_modem_tx_w)); m_acia->irq_handler().set(FUNC(thomson_state::to7_modem_cb)); - clock_device &acia_clock(CLOCK(config, "acia_clock", 1200)); /* 1200 bauds, might be divided by 16 */ + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(1200))); /* 1200 bauds, might be divided by 16 */ acia_clock.signal_handler().set(FUNC(thomson_state::write_acia_clock)); /* cartridge */ diff --git a/src/mame/thomson/thomson.h b/src/mame/thomson/thomson.h index a949ada1547..e23d6e9d2f9 100644 --- a/src/mame/thomson/thomson.h +++ b/src/mame/thomson/thomson.h @@ -699,7 +699,7 @@ class to7_io_line_device : public device_t { public: // construction/destruction - to7_io_line_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + to7_io_line_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/mame/thomson/thomson_m.cpp b/src/mame/thomson/thomson_m.cpp index 0e1f93729a8..dd650818ebb 100644 --- a/src/mame/thomson/thomson_m.cpp +++ b/src/mame/thomson/thomson_m.cpp @@ -500,7 +500,7 @@ DEFINE_DEVICE_TYPE(TO7_IO_LINE, to7_io_line_device, "to7_io_line", "TO7 Serial s // to7_io_line_device - constructor //------------------------------------------------- -to7_io_line_device::to7_io_line_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +to7_io_line_device::to7_io_line_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TO7_IO_LINE, tag, owner, clock), m_pia_io(*this, THOM_PIA_IO), m_rs232(*this, "rs232"), @@ -511,7 +511,7 @@ to7_io_line_device::to7_io_line_device(const machine_config &mconfig, const char void to7_io_line_device::device_add_mconfig(machine_config &config) { /// THIS PIO is part of CC 90-232 expansion - PIA6821(config, m_pia_io, 0); + PIA6821(config, m_pia_io); m_pia_io->readpa_handler().set(FUNC(to7_io_line_device::porta_in)); m_pia_io->writepa_handler().set(FUNC(to7_io_line_device::porta_out)); m_pia_io->writepb_handler().set("cent_data_out", FUNC(output_latch_device::write)); diff --git a/src/mame/ti/733_asr.cpp b/src/mame/ti/733_asr.cpp index 08f28ed486f..78220884bc5 100644 --- a/src/mame/ti/733_asr.cpp +++ b/src/mame/ti/733_asr.cpp @@ -76,7 +76,7 @@ GFXDECODE_END DEFINE_DEVICE_TYPE(ASR733, asr733_device, "asr733", "733 ASR") -asr733_device::asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +asr733_device::asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ASR733, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfx_asr733, "palette") , m_screen(*this, "screen") diff --git a/src/mame/ti/733_asr.h b/src/mame/ti/733_asr.h index a15bf0e0037..aeca9984cb1 100644 --- a/src/mame/ti/733_asr.h +++ b/src/mame/ti/733_asr.h @@ -19,7 +19,7 @@ public: chr_region_len = 128*single_char_len }; - asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t cru_r(offs_t offset); void cru_w(offs_t offset, uint8_t data); diff --git a/src/mame/ti/911_vdt.cpp b/src/mame/ti/911_vdt.cpp index f9dacb65181..76e101b5262 100644 --- a/src/mame/ti/911_vdt.cpp +++ b/src/mame/ti/911_vdt.cpp @@ -141,7 +141,7 @@ static void apply_char_overrides(int nb_char_overrides, const char_override_t ch DEFINE_DEVICE_TYPE(VDT911, vdt911_device, "vdt911", "911 VDT") -vdt911_device::vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vdt911_device::vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VDT911, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfx_vdt911, "palette") , m_beeper(*this, "beeper") @@ -795,7 +795,7 @@ void vdt911_device::device_add_mconfig(machine_config &config) m_screen->set_palette("palette"); SPEAKER(config, "speaker").front_center(); - BEEP(config, m_beeper, 3250).add_route(ALL_OUTPUTS, "speaker", 0.50); + BEEP(config, m_beeper, XTAL::u(3250)).add_route(ALL_OUTPUTS, "speaker", 0.50); PALETTE(config, "palette", FUNC(vdt911_device::vdt911_palette), std::size(vdt911_pens), std::size(vdt911_colors)); } diff --git a/src/mame/ti/911_vdt.h b/src/mame/ti/911_vdt.h index 7b45480124c..36cb13af4fa 100644 --- a/src/mame/ti/911_vdt.h +++ b/src/mame/ti/911_vdt.h @@ -45,7 +45,7 @@ public: FrenchWP // French word processing }; - vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vdt911_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t cru_r(offs_t offset); void cru_w(offs_t offset, uint8_t data); diff --git a/src/mame/ti/avigo.cpp b/src/mame/ti/avigo.cpp index abbb5a1af1b..77b97d38418 100644 --- a/src/mame/ti/avigo.cpp +++ b/src/mame/ti/avigo.cpp @@ -748,7 +748,7 @@ void avigo_state::nvram_init(nvram_device &nvram, void *base, size_t size) void avigo_state::avigo(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &avigo_state::avigo_mem); m_maincpu->set_addrmap(AS_IO, &avigo_state::avigo_io); config.set_maximum_quantum(attotime::from_hz(60)); diff --git a/src/mame/ti/cc40.cpp b/src/mame/ti/cc40.cpp index 171e46db833..1f21ab04929 100644 --- a/src/mame/ti/cc40.cpp +++ b/src/mame/ti/cc40.cpp @@ -640,7 +640,7 @@ void cc40_state::cc40(machine_config &config) PALETTE(config, "palette", FUNC(cc40_state::cc40_palette), 3); - hd44780_device &hd44780(HD44780(config, "hd44780", 0)); + hd44780_device &hd44780(HD44780(config, "hd44780")); hd44780.set_lcd_size(2, 16); // 2*16 internal hd44780.set_pixel_update_cb(FUNC(cc40_state::cc40_pixel_update)); diff --git a/src/mame/ti/evmbug.cpp b/src/mame/ti/evmbug.cpp index 35a004aec09..f912f676c7d 100644 --- a/src/mame/ti/evmbug.cpp +++ b/src/mame/ti/evmbug.cpp @@ -153,7 +153,7 @@ void evmbug_state::evmbug(machine_config &config) m_maincpu->set_addrmap(AS_IO, &evmbug_state::io_map); /* video hardware */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(evmbug_state::kbd_put)); //TMS9902(config, "uart1", XTAL(12'000'000) / 4); diff --git a/src/mame/ti/exelv.cpp b/src/mame/ti/exelv.cpp index 40765b98e28..194d7913d8e 100644 --- a/src/mame/ti/exelv.cpp +++ b/src/mame/ti/exelv.cpp @@ -858,21 +858,21 @@ void exelv_state::exl100(machine_config &config) TIMER(config, m_timer_k).configure_generic(FUNC(exelv_state::timer_k)); - //SPEECHROM(config, "vsm", 0); + //SPEECHROM(config, "vsm"); /* sound */ SPEAKER(config, "mono").front_center(); // The cassette output is connected into the audio circuit SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.30); - TMS5220C(config, m_tms5220c, 640000); + TMS5220C(config, m_tms5220c, XTAL::u(640000)); // m_tms5220c->set_speechrom_tag("vsm"); m_tms5220c->add_route(ALL_OUTPUTS, "mono", 1.00); /* cartridge */ GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "exelvision_cart", "bin,rom"); - CASSETTE(config, m_cass, 0); + CASSETTE(config, m_cass); m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); @@ -921,7 +921,7 @@ void exelv_state::exeltel(machine_config &config) PALETTE(config, "palette", palette_device::RGB_3BIT); - SPEECHROM(config, "vsm", 0); + SPEECHROM(config, "vsm"); /* sound */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/ti/geneve.cpp b/src/mame/ti/geneve.cpp index 4f1ebdc96e1..266c261d649 100644 --- a/src/mame/ti/geneve.cpp +++ b/src/mame/ti/geneve.cpp @@ -1135,13 +1135,13 @@ void geneve_state::geneve(machine_config &config) geneve_common(config); // Gate array - GENEVE_GATE_ARRAY(config, m_gatearray, 0); + GENEVE_GATE_ARRAY(config, m_gatearray); m_gatearray->kbdint_cb().set(FUNC(geneve_state::keyboard_interrupt)); m_gatearray->kbdclk_cb().set(m_kbdconn, FUNC(pc_kbdc_device::clock_write_from_mb)); m_gatearray->kbddata_cb().set(m_kbdconn, FUNC(pc_kbdc_device::data_write_from_mb)); // Peripheral expansion box (Geneve composition) - TI99_PERIBOX_GEN(config, m_peribox, 0); + TI99_PERIBOX_GEN(config, m_peribox); m_peribox->inta_cb().set(FUNC(geneve_state::inta)); m_peribox->intb_cb().set(FUNC(geneve_state::intb)); m_peribox->ready_cb().set(FUNC(geneve_state::extready)); @@ -1150,16 +1150,16 @@ void geneve_state::geneve(machine_config &config) void geneve_state::genmod(machine_config &config) { geneve_common(config); - GENMOD_DECODER(config, m_genmod_decoder, 0); + GENMOD_DECODER(config, m_genmod_decoder); // Gate Array - GENEVE_GATE_ARRAY(config, m_gatearray, 0); + GENEVE_GATE_ARRAY(config, m_gatearray); m_gatearray->kbdint_cb().set(FUNC(geneve_state::keyboard_interrupt)); m_gatearray->kbdclk_cb().set(m_kbdconn, FUNC(pc_kbdc_device::clock_write_from_mb)); m_gatearray->kbddata_cb().set(m_kbdconn, FUNC(pc_kbdc_device::data_write_from_mb)); // Peripheral expansion box (Geneve composition with Genmod and plugged-in Memex) - TI99_PERIBOX_GENMOD(config, m_peribox, 0); + TI99_PERIBOX_GENMOD(config, m_peribox); m_peribox->inta_cb().set(FUNC(geneve_state::inta)); m_peribox->intb_cb().set(FUNC(geneve_state::intb)); m_peribox->ready_cb().set(FUNC(geneve_state::extready)); @@ -1169,7 +1169,7 @@ void geneve_state::geneve_common(machine_config &config) { // basic machine hardware // TMS9995 CPU @ 12.0 MHz - TMS9995(config, m_cpu, 12000000); + TMS9995(config, m_cpu, XTAL::u(12000000)); m_cpu->set_addrmap(AS_PROGRAM, &geneve_state::memmap); m_cpu->set_addrmap(AS_IO, &geneve_state::crumap); m_cpu->set_addrmap(tms9995_device::AS_SETADDRESS, &geneve_state::memmap_setaddress); @@ -1192,7 +1192,7 @@ void geneve_state::geneve_common(machine_config &config) screen.set_screen_update(TIGEN_V9938_TAG, FUNC(v99x8_device::screen_update)); // Main board components - TMS9901(config, m_tms9901, 0); + TMS9901(config, m_tms9901); m_tms9901->read_cb().set(FUNC(geneve_state::psi_input)); m_tms9901->p_out_cb(0).set(FUNC(geneve_state::peripheral_bus_reset)); m_tms9901->p_out_cb(1).set(FUNC(geneve_state::VDP_reset)); @@ -1208,10 +1208,10 @@ void geneve_state::geneve_common(machine_config &config) m_tms9901->p_out_cb(13).set(FUNC(geneve_state::pfm_a18)); // Clock - MM58274C(config, GENEVE_CLOCK_TAG, 0).set_mode_and_day(1, 0); // 24h, sunday + MM58274C(config, GENEVE_CLOCK_TAG).set_mode_and_day(1, 0); // 24h, sunday // PAL - GENEVE_PAL(config, m_pal, 0); + GENEVE_PAL(config, m_pal); m_pal->ready_cb().set("maincpu", FUNC(tms9995_device::ready_line)); // Sound hardware diff --git a/src/mame/ti/ti74.cpp b/src/mame/ti/ti74.cpp index 80208cfaadc..63d2fa437fc 100644 --- a/src/mame/ti/ti74.cpp +++ b/src/mame/ti/ti74.cpp @@ -544,7 +544,7 @@ void ti74_state::ti74(machine_config &config) PALETTE(config, "palette", FUNC(ti74_state::ti74_palette), 3); - hd44780_device &hd44780(HD44780(config, "hd44780", 0)); // 270kHz + hd44780_device &hd44780(HD44780(config, "hd44780")); // 270kHz hd44780.set_lcd_size(2, 16); // 2*16 internal hd44780.set_pixel_update_cb(FUNC(ti74_state::ti74_pixel_update)); @@ -577,7 +577,7 @@ void ti74_state::ti95(machine_config &config) PALETTE(config, "palette", FUNC(ti74_state::ti74_palette), 3); - hd44780_device &hd44780(HD44780(config, "hd44780", 0)); + hd44780_device &hd44780(HD44780(config, "hd44780")); hd44780.set_lcd_size(2, 16); hd44780.set_pixel_update_cb(FUNC(ti74_state::ti95_pixel_update)); diff --git a/src/mame/ti/ti85.cpp b/src/mame/ti/ti85.cpp index 3d31e64e686..942c9c0e57c 100644 --- a/src/mame/ti/ti85.cpp +++ b/src/mame/ti/ti85.cpp @@ -582,7 +582,7 @@ INPUT_PORTS_END void ti85_state::ti81(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 2000000); /* 2 MHz */ + Z80(config, m_maincpu, XTAL::u(2000000)); /* 2 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &ti85_state::ti81_mem); m_maincpu->set_addrmap(AS_IO, &ti85_state::ti81_io); @@ -604,7 +604,7 @@ void ti85_state::ti81(machine_config &config) void ti85_state::ti85(machine_config &config) { ti81(config); - m_maincpu->set_clock(6000000); /* 6 MHz */ + m_maincpu->set_clock(XTAL::u(6000000)); /* 6 MHz */ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti85_io); MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 ) @@ -627,7 +627,7 @@ void ti85_state::ti85d(machine_config &config) void ti85_state::ti82(machine_config &config) { ti81(config); - m_maincpu->set_clock(6000000); /* 6 MHz */ + m_maincpu->set_clock(XTAL::u(6000000)); /* 6 MHz */ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti82_io); MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 ) @@ -636,7 +636,7 @@ void ti85_state::ti82(machine_config &config) subdevice("palette")->set_entries(2).set_init(FUNC(ti85_state::ti82_palette)); - T6A04(config, "t6a04", 0).set_size(96, 64); + T6A04(config, "t6a04").set_size(96, 64); TI8X_LINK_PORT(config, m_link_port, default_ti8x_link_devices, nullptr); } @@ -652,7 +652,7 @@ void ti85_state::ti81v2(machine_config &config) void ti85_state::ti83(machine_config &config) { ti81(config); - m_maincpu->set_clock(6000000); /* 6 MHz */ + m_maincpu->set_clock(XTAL::u(6000000)); /* 6 MHz */ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti83_io); MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 ) @@ -661,7 +661,7 @@ void ti85_state::ti83(machine_config &config) subdevice("palette")->set_entries(2).set_init(FUNC(ti85_state::ti82_palette)); - T6A04(config, "t6a04", 0).set_size(96, 64); + T6A04(config, "t6a04").set_size(96, 64); } void ti85_state::ti86(machine_config &config) @@ -679,7 +679,7 @@ void ti85_state::ti86(machine_config &config) void ti85_state::ti83p(machine_config &config) { ti81(config); - m_maincpu->set_clock(6000000); /* 8 MHz running at 6 MHz */ + m_maincpu->set_clock(XTAL::u(6000000)); /* 8 MHz running at 6 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &ti85_state::ti83p_asic_mem); m_maincpu->set_addrmap(AS_IO, &ti85_state::ti83p_io); @@ -695,7 +695,7 @@ void ti85_state::ti83p(machine_config &config) ADDRESS_MAP_BANK(config, m_membank[2]).set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000); ADDRESS_MAP_BANK(config, m_membank[3]).set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000); - T6A04(config, "t6a04", 0).set_size(96, 64); + T6A04(config, "t6a04").set_size(96, 64); TI8X_LINK_PORT(config, m_link_port, default_ti8x_link_devices, nullptr); @@ -705,7 +705,7 @@ void ti85_state::ti83p(machine_config &config) void ti85_state::ti83pse(machine_config &config) { ti83p(config); - m_maincpu->set_clock(15000000); + m_maincpu->set_clock(XTAL::u(15000000)); m_maincpu->set_addrmap(AS_IO, &ti85_state::ti83pse_io); m_membank[0]->set_map(&ti85_state::ti83pse_banked_mem); diff --git a/src/mame/ti/ti990_10.cpp b/src/mame/ti/ti990_10.cpp index c65b24bd518..6faec10ed8e 100644 --- a/src/mame/ti/ti990_10.cpp +++ b/src/mame/ti/ti990_10.cpp @@ -333,22 +333,22 @@ void ti990_10_state::ti990_10(machine_config &config) { /* basic machine hardware */ /* TI990/10 CPU @ 4.0(???) MHz */ - TI990_10(config, m_maincpu, 4000000); + TI990_10(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ti990_10_state::main_map); m_maincpu->set_addrmap(AS_IO, &ti990_10_state::io_map); // VDT 911 terminal - VDT911(config, m_terminal, 0); + VDT911(config, m_terminal); m_terminal->keyint_cb().set(FUNC(ti990_10_state::key_interrupt)); m_terminal->lineint_cb().set(FUNC(ti990_10_state::line_interrupt)); // Hard disk - ti990_hdc_device &hdc(TI990_HDC(config, "hdc", 0)); + ti990_hdc_device &hdc(TI990_HDC(config, "hdc")); hdc.set_memory_space(m_maincpu, AS_PROGRAM); hdc.int_cb().set(FUNC(ti990_10_state::set_int13)); // Tape controller - tap_990_device &tpc(TI990_TAPE_CTRL(config, "tpc", 0)); + tap_990_device &tpc(TI990_TAPE_CTRL(config, "tpc")); tpc.set_memory_space(m_maincpu, AS_PROGRAM); tpc.int_cb().set(FUNC(ti990_10_state::tape_interrupt)); } diff --git a/src/mame/ti/ti990_4.cpp b/src/mame/ti/ti990_4.cpp index e56598800d6..baa327916c7 100644 --- a/src/mame/ti/ti990_4.cpp +++ b/src/mame/ti/ti990_4.cpp @@ -279,19 +279,19 @@ void ti990_4_state::ti990_4(machine_config &config) { /* basic machine hardware */ /* TMS9900 CPU @ 3.0(???) MHz */ - TMS9900(config, m_maincpu, 3000000); + TMS9900(config, m_maincpu, XTAL::u(3000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ti990_4_state::memmap); m_maincpu->set_addrmap(AS_IO, &ti990_4_state::crumap); m_maincpu->extop_cb().set(FUNC(ti990_4_state::external_operation)); m_maincpu->intlevel_cb().set(FUNC(ti990_4_state::interrupt_level)); // Terminal - asr733_device& term(ASR733(config, "asr733", 0)); + asr733_device& term(ASR733(config, "asr733")); term.keyint_cb().set(FUNC(ti990_4_state::asrkey_interrupt)); term.lineint_cb().set(FUNC(ti990_4_state::line_interrupt)); // Floppy controller - TI99X_FD800(config, "fd800", 0).int_cb().set(FUNC(ti990_4_state::fd_interrupt)); + TI99X_FD800(config, "fd800").int_cb().set(FUNC(ti990_4_state::fd_interrupt)); // TODO: Add floppy drives } @@ -300,19 +300,19 @@ void ti990_4_state::ti990_4v(machine_config &config) { /* basic machine hardware */ /* TMS9900 CPU @ 3.0(???) MHz */ - TMS9900(config, m_maincpu, 3000000); + TMS9900(config, m_maincpu, XTAL::u(3000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ti990_4_state::memmap); m_maincpu->set_addrmap(AS_IO, &ti990_4_state::crumap_v); m_maincpu->extop_cb().set(FUNC(ti990_4_state::external_operation)); m_maincpu->intlevel_cb().set(FUNC(ti990_4_state::interrupt_level)); // VDT 911 terminal - vdt911_device& term(VDT911(config, "vdt911", 0)); + vdt911_device& term(VDT911(config, "vdt911")); term.keyint_cb().set(FUNC(ti990_4_state::vdtkey_interrupt)); term.lineint_cb().set(FUNC(ti990_4_state::line_interrupt)); // Floppy controller - TI99X_FD800(config, "fd800", 0).int_cb().set(FUNC(ti990_4_state::fd_interrupt)); + TI99X_FD800(config, "fd800").int_cb().set(FUNC(ti990_4_state::fd_interrupt)); // TODO: Add floppy drives } diff --git a/src/mame/ti/ti99_2.cpp b/src/mame/ti/ti99_2.cpp index 302f0b0824b..8bf78ef57f7 100644 --- a/src/mame/ti/ti99_2.cpp +++ b/src/mame/ti/ti99_2.cpp @@ -427,7 +427,7 @@ void ti99_2_state::ti99_224(machine_config& config) screen.set_screen_update(TI992_VDC_TAG, FUNC(video992_device::screen_update)); // I/O interface circuit. No banking callback. - IO99224(config, m_io992, 0); + IO99224(config, m_io992); } void ti99_2_state::ti99_232(machine_config& config) @@ -451,7 +451,7 @@ void ti99_2_state::ti99_232(machine_config& config) screen.set_screen_update(TI992_VDC_TAG, FUNC(video992_device::screen_update)); // I/O interface circuit - IO99232(config, m_io992, 0).rombank_cb().set(FUNC(ti99_2_state::rombank_set)); + IO99232(config, m_io992).rombank_cb().set(FUNC(ti99_2_state::rombank_set)); } void ti99_2_state::ti99_2(machine_config& config) @@ -473,7 +473,7 @@ void ti99_2_state::ti99_2(machine_config& config) // Cassette drives // There is no route from the cassette to some audio input, // so we don't hear it. - CASSETTE(config, "cassette", 0); + CASSETTE(config, "cassette"); // Hexbus HEXBUS(config, TI992_HEXBUS_TAG, 0, hexbus_options, nullptr); diff --git a/src/mame/ti/ti99_4p.cpp b/src/mame/ti/ti99_4p.cpp index de3926ca18a..f9a1c06769a 100644 --- a/src/mame/ti/ti99_4p.cpp +++ b/src/mame/ti/ti99_4p.cpp @@ -1043,7 +1043,7 @@ void ti99_4p_state::ti99_4p_60hz(machine_config& config) { /* basic machine hardware */ /* TMS9900 CPU @ 3.0 MHz */ - TMS9900(config, m_cpu, 3000000); + TMS9900(config, m_cpu, XTAL::u(3000000)); m_cpu->set_addrmap(AS_PROGRAM, &ti99_4p_state::memmap); m_cpu->set_addrmap(AS_IO, &ti99_4p_state::crumap); m_cpu->set_addrmap(tms99xx_device::AS_SETADDRESS, &ti99_4p_state::memmap_setaddress); @@ -1052,7 +1052,7 @@ void ti99_4p_state::ti99_4p_60hz(machine_config& config) m_cpu->clkout_cb().set(FUNC(ti99_4p_state::clock_out)); // tms9901 - TMS9901(config, m_tms9901, 0); + TMS9901(config, m_tms9901); m_tms9901->read_cb().set(FUNC(ti99_4p_state::psi_input)); m_tms9901->p_out_cb(2).set(FUNC(ti99_4p_state::keyC0)); m_tms9901->p_out_cb(3).set(FUNC(ti99_4p_state::keyC1)); @@ -1064,7 +1064,7 @@ void ti99_4p_state::ti99_4p_60hz(machine_config& config) m_tms9901->intreq_cb().set(FUNC(ti99_4p_state::tms9901_interrupt)); // Peripheral expansion box (SGCPU composition) - TI99_PERIBOX_SG(config, m_peribox, 0); + TI99_PERIBOX_SG(config, m_peribox); m_peribox->inta_cb().set(FUNC(ti99_4p_state::extint)); m_peribox->intb_cb().set(FUNC(ti99_4p_state::notconnected)); m_peribox->ready_cb().set(FUNC(ti99_4p_state::ready_line)); @@ -1080,7 +1080,7 @@ void ti99_4p_state::ti99_4p_60hz(machine_config& config) // Cassette drives SPEAKER(config, "cass_out").front_center(); - CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "cass_out", 0.25); + CASSETTE(config, "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25); // Joystick port TI99_JOYPORT(config, m_joyport, 0, ti99_joyport_options_plain, "twinjoy"); diff --git a/src/mame/ti/ti99_4x.cpp b/src/mame/ti/ti99_4x.cpp index d2caef21afc..b42a72903b4 100644 --- a/src/mame/ti/ti99_4x.cpp +++ b/src/mame/ti/ti99_4x.cpp @@ -892,7 +892,7 @@ void ti99_4x_state::driver_reset() void ti99_4x_state::ti99_4_common(machine_config& config) { // CPU - TMS9900(config, m_cpu, 3000000); + TMS9900(config, m_cpu, XTAL::u(3000000)); m_cpu->set_addrmap(AS_PROGRAM, &ti99_4x_state::memmap); m_cpu->set_addrmap(AS_IO, &ti99_4x_state::crumap); m_cpu->set_addrmap(tms99xx_device::AS_SETADDRESS, &ti99_4x_state::memmap_setaddress); @@ -901,7 +901,7 @@ void ti99_4x_state::ti99_4_common(machine_config& config) m_cpu->clkout_cb().set(FUNC(ti99_4x_state::clock_out)); // Programmable system interface (driven by CLKOUT) - TMS9901(config, m_tms9901, 0); + TMS9901(config, m_tms9901); m_tms9901->p_out_cb(2).set(FUNC(ti99_4x_state::keyC0)); m_tms9901->p_out_cb(3).set(FUNC(ti99_4x_state::keyC1)); m_tms9901->p_out_cb(4).set(FUNC(ti99_4x_state::keyC2)); @@ -912,7 +912,7 @@ void ti99_4x_state::ti99_4_common(machine_config& config) m_tms9901->intreq_cb().set(FUNC(ti99_4x_state::tms9901_interrupt)); // Databus multiplexer - TI99_DATAMUX(config, m_datamux, 0).ready_cb().set(FUNC(ti99_4x_state::console_ready_dmux)); + TI99_DATAMUX(config, m_datamux).ready_cb().set(FUNC(ti99_4x_state::console_ready_dmux)); // Cartridge port (aka GROMport) TI99_GROMPORT(config, m_gromport, 0, ti99_gromport_options, "single"); @@ -930,8 +930,8 @@ void ti99_4x_state::ti99_4_common(machine_config& config) // Cassette drives. Second drive is record-only. SPEAKER(config, "cass_out").front_center(); - CASSETTE(config, "cassette1", 0).add_route(ALL_OUTPUTS, "cass_out", 0.25); - CASSETTE(config, "cassette2", 0); + CASSETTE(config, "cassette1").add_route(ALL_OUTPUTS, "cass_out", 0.25); + CASSETTE(config, "cassette2"); // GROM devices TMC0430(config, TI99_GROM0_TAG, TI99_CONSOLEGROM, 0x0000, 0).ready_cb().set(FUNC(ti99_4x_state::console_ready_grom)); @@ -1109,7 +1109,7 @@ void ti99_4x_state::ti99_4ev_60hz(machine_config& config) // EVPC connector // This is needed for delivering the video interrupt from the // EVPC expansion card into the console, after the video processor has been removed - TI99_EVPCCONN(config, TI99_EVPC_CONN_TAG, 0).vdpint_cb().set(FUNC(ti99_4x_state::video_interrupt_evpc_in)); + TI99_EVPCCONN(config, TI99_EVPC_CONN_TAG).vdpint_cb().set(FUNC(ti99_4x_state::video_interrupt_evpc_in)); // Input/output port: Configure for EVPC TI99_IOPORT(config, m_ioport, 0, ti99_ioport_options_evpc, "peb"); diff --git a/src/mame/ti/ti99_8.cpp b/src/mame/ti/ti99_8.cpp index 7c0fab42796..27da2dad8ec 100644 --- a/src/mame/ti/ti99_8.cpp +++ b/src/mame/ti/ti99_8.cpp @@ -696,7 +696,7 @@ void ti99_8_state::ti99_8(machine_config& config) m_cpu->holda_cb().set(TI998_MAINBOARD_TAG, FUNC(mainboard8_device::holda_line)); // 9901 configuration - TMS9901(config, m_tms9901, 0); + TMS9901(config, m_tms9901); m_tms9901->read_cb().set(FUNC(ti99_8_state::psi_input)); m_tms9901->p_out_cb(0).set(FUNC(ti99_8_state::keyC0)); m_tms9901->p_out_cb(1).set(FUNC(ti99_8_state::keyC1)); @@ -710,7 +710,7 @@ void ti99_8_state::ti99_8(machine_config& config) m_tms9901->intreq_cb().set(FUNC(ti99_8_state::tms9901_interrupt)); // Mainboard with custom chips - TI99_MAINBOARD8(config, m_mainboard, 0); + TI99_MAINBOARD8(config, m_mainboard); m_mainboard->ready_cb().set(FUNC(ti99_8_state::console_ready)); m_mainboard->reset_cb().set(FUNC(ti99_8_state::console_reset)); m_mainboard->hold_cb().set(FUNC(ti99_8_state::cpu_hold)); @@ -737,13 +737,13 @@ void ti99_8_state::ti99_8(machine_config& config) // Sound hardware SPEAKER(config, "sound_out").front_center(); - sn76496_device& soundgen(SN76496(config, TI998_SOUNDCHIP_TAG, 3579545)); + sn76496_device& soundgen(SN76496(config, TI998_SOUNDCHIP_TAG, XTAL::u(3579545))); soundgen.ready_cb().set(TI998_MAINBOARD_TAG, FUNC(mainboard8_device::sound_ready)); soundgen.add_route(ALL_OUTPUTS, "sound_out", 0.75); // Speech hardware // Note: SPEECHROM uses its tag for referencing the region - SPEECHROM(config, TI998_SPEECHROM_REG, 0).set_reverse_bit_order(true); + SPEECHROM(config, TI998_SPEECHROM_REG).set_reverse_bit_order(true); SPEAKER(config, "speech_out").front_center(); cd2501ecd_device& vsp(CD2501ECD(config, TI998_SPEECHSYN_TAG, 640000L)); @@ -753,7 +753,7 @@ void ti99_8_state::ti99_8(machine_config& config) // Cassette drive SPEAKER(config, "cass_out").front_center(); - CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "cass_out", 0.25); + CASSETTE(config, "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25); // GROM library using namespace bus::ti99::internal; diff --git a/src/mame/ti/tm990189.cpp b/src/mame/ti/tm990189.cpp index e725dc252f8..ccf75f4df07 100644 --- a/src/mame/ti/tm990189.cpp +++ b/src/mame/ti/tm990189.cpp @@ -462,13 +462,13 @@ class tm990_189_rs232_image_device : public device_t, public device_image_interf { public: // construction/destruction - template tm990_189_rs232_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&tms_tag) + template tm990_189_rs232_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&tms_tag) : tm990_189_rs232_image_device(mconfig, tag, owner, clock) { m_tms9902.set_tag(std::forward(tms_tag)); } - tm990_189_rs232_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tm990_189_rs232_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual bool is_readable() const noexcept override { return true; } @@ -495,7 +495,7 @@ protected: DEFINE_DEVICE_TYPE(TM990_189_RS232, tm990_189_rs232_image_device, "tm990_189_rs232_image", "TM990/189 RS232 port") -tm990_189_rs232_image_device::tm990_189_rs232_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tm990_189_rs232_image_device::tm990_189_rs232_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TM990_189_RS232, tag, owner, clock) , device_image_interface(mconfig, *this) , m_tms9902(*this, finder_base::DUMMY_TAG) @@ -848,7 +848,7 @@ void tm990189_state::tm990_189(machine_config &config) SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "mono", 0.25); + CASSETTE(config, "cassette").add_route(ALL_OUTPUTS, "mono", 0.25); TMS9901(config, m_tms9901_usr, 8_MHz_XTAL / 4); m_tms9901_usr->p_out_cb(0).set(FUNC(tm990189_state::usr9901_led0_w)); @@ -911,7 +911,7 @@ void tm990189_state::tm990_189_v(machine_config &config) SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); /* one two-level buzzer */ /* Devices */ - CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "mono", 0.25); + CASSETTE(config, "cassette").add_route(ALL_OUTPUTS, "mono", 0.25); TMS9901(config, m_tms9901_usr, 8_MHz_XTAL / 4); m_tms9901_usr->p_out_cb(0).set(FUNC(tm990189_state::usr9901_led0_w)); diff --git a/src/mame/tiger/gamecom.cpp b/src/mame/tiger/gamecom.cpp index 38841881ee7..765a7fb64ec 100644 --- a/src/mame/tiger/gamecom.cpp +++ b/src/mame/tiger/gamecom.cpp @@ -280,9 +280,9 @@ void gamecom_state::gamecom(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); /* TODO: much more complex than this */ - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC (Digital audio) - DAC_4BIT_R2R(config, m_dac0, 0).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC (Frequency modulation) - DAC_4BIT_R2R(config, m_dac1, 0).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC (Frequency modulation) + DAC_8BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC (Digital audio) + DAC_4BIT_R2R(config, m_dac0).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC (Frequency modulation) + DAC_4BIT_R2R(config, m_dac1).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC (Frequency modulation) /* cartridge */ GENERIC_CARTSLOT(config, "cartslot1", generic_linear_slot, "gamecom_cart", "bin,tgc").set_device_load(FUNC(gamecom_state::cart1_load)); diff --git a/src/mame/tiger/k28.cpp b/src/mame/tiger/k28.cpp index c41e97eb712..cf09991f32f 100644 --- a/src/mame/tiger/k28.cpp +++ b/src/mame/tiger/k28.cpp @@ -315,7 +315,7 @@ void k28_state::k28(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - VOTRAX_SC01(config, "speech", 760000).add_route(ALL_OUTPUTS, "mono", 0.5); // measured 760kHz on its RC pin + VOTRAX_SC01(config, "speech", XTAL::u(760000)).add_route(ALL_OUTPUTS, "mono", 0.5); // measured 760kHz on its RC pin } diff --git a/src/mame/tigertel/docg3.cpp b/src/mame/tigertel/docg3.cpp index 4d2464c19d3..ab5e052711a 100644 --- a/src/mame/tigertel/docg3.cpp +++ b/src/mame/tigertel/docg3.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(DISKONCHIP_G3, diskonchip_g3_device, "diskonchip_g3", "DiskOn // diskonchip_g3_device - constructor //------------------------------------------------- -diskonchip_g3_device::diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +diskonchip_g3_device::diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DISKONCHIP_G3, tag, owner, clock) , device_nvram_interface(mconfig, *this) { diff --git a/src/mame/tigertel/docg3.h b/src/mame/tigertel/docg3.h index 8c7c7caf659..fa602156419 100644 --- a/src/mame/tigertel/docg3.h +++ b/src/mame/tigertel/docg3.h @@ -19,7 +19,7 @@ class diskonchip_g3_device : public device_t, public device_nvram_interface { public: - diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + diskonchip_g3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_size(int _size) { m_size = _size; } protected: diff --git a/src/mame/tigertel/gizmondo.cpp b/src/mame/tigertel/gizmondo.cpp index c1f2c0ca166..b70631dc820 100644 --- a/src/mame/tigertel/gizmondo.cpp +++ b/src/mame/tigertel/gizmondo.cpp @@ -175,7 +175,7 @@ void gizmondo_state::init_gizmondo() void gizmondo_state::gizmondo(machine_config &config) { - ARM9(config, m_maincpu, 40000000); + ARM9(config, m_maincpu, XTAL::u(40000000)); m_maincpu->set_addrmap(AS_PROGRAM, &gizmondo_state::gizmondo_map); PALETTE(config, "palette").set_entries(32768); @@ -187,9 +187,9 @@ void gizmondo_state::gizmondo(machine_config &config) screen.set_visarea_full(); screen.set_screen_update("gf4500", FUNC(gf4500_device::screen_update)); - GF4500(config, m_gf4500, 0); + GF4500(config, m_gf4500); - S3C2440(config, m_s3c2440, 12000000); + S3C2440(config, m_s3c2440, XTAL::u(12000000)); m_s3c2440->set_palette_tag("palette"); m_s3c2440->set_screen_tag("screen"); m_s3c2440->gpio_port_r_callback().set(FUNC(gizmondo_state::s3c2440_gpio_port_r)); diff --git a/src/mame/tiki/tiki100.cpp b/src/mame/tiki/tiki100.cpp index 0ed7af5e76b..9c474b8177c 100644 --- a/src/mame/tiki/tiki100.cpp +++ b/src/mame/tiki/tiki100.cpp @@ -722,7 +722,7 @@ void tiki100_state::tiki100(machine_config &config) m_screen->set_screen_update(FUNC(tiki100_state::screen_update)); PALETTE(config, m_palette).set_entries(16); - TIKI100_BUS(config, m_exp, 0); + TIKI100_BUS(config, m_exp); m_exp->irq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_exp->nmi_wr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); m_exp->busrq_wr_callback().set(FUNC(tiki100_state::busrq_w)); diff --git a/src/mame/toaplan/gp9001.cpp b/src/mame/toaplan/gp9001.cpp index dabe10276b9..381c993d5e6 100644 --- a/src/mame/toaplan/gp9001.cpp +++ b/src/mame/toaplan/gp9001.cpp @@ -209,7 +209,7 @@ GFXDECODE_END DEFINE_DEVICE_TYPE(GP9001_VDP, gp9001vdp_device, "gp9001vdp", "GP9001 VDP") -gp9001vdp_device::gp9001vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +gp9001vdp_device::gp9001vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GP9001_VDP, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo) , device_video_interface(mconfig, *this) diff --git a/src/mame/toaplan/gp9001.h b/src/mame/toaplan/gp9001.h index 157dfd3cc6f..ee0d1b0206c 100644 --- a/src/mame/toaplan/gp9001.h +++ b/src/mame/toaplan/gp9001.h @@ -17,7 +17,7 @@ class gp9001vdp_device : public device_t, public: typedef device_delegate gp9001_cb_delegate; - gp9001vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + gp9001vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_tile_callback(T &&... args) { m_gp9001_cb.set(std::forward(args)...); } diff --git a/src/mame/toaplan/mjsister.cpp b/src/mame/toaplan/mjsister.cpp index 3cc21ff6559..ae6cf369c72 100644 --- a/src/mame/toaplan/mjsister.cpp +++ b/src/mame/toaplan/mjsister.cpp @@ -468,7 +468,7 @@ void mjsister_state::mjsister(machine_config &config) aysnd.port_b_read_callback().set_ioport("DSW2"); aysnd.add_route(ALL_OUTPUTS, "speaker", 0.15); - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC } /************************************* diff --git a/src/mame/toaplan/slapfght.cpp b/src/mame/toaplan/slapfght.cpp index e532afa7baa..4f85d0247d4 100644 --- a/src/mame/toaplan/slapfght.cpp +++ b/src/mame/toaplan/slapfght.cpp @@ -1014,7 +1014,7 @@ void slapfght_state::tigerhb4(machine_config &config) tigerhb2(config); // TODO: hook up - m68705p_device &mcu(M68705P5(config, "mcu", 6000000)); // unverified clock + m68705p_device &mcu(M68705P5(config, "mcu", XTAL::u(6000000))); // unverified clock mcu.porta_r().set_log("port A read"); mcu.portb_r().set_log("port B read"); mcu.portc_r().set_log("port C read"); diff --git a/src/mame/toaplan/toaplan1.cpp b/src/mame/toaplan/toaplan1.cpp index 87434431775..077830178b0 100644 --- a/src/mame/toaplan/toaplan1.cpp +++ b/src/mame/toaplan/toaplan1.cpp @@ -1968,7 +1968,7 @@ void toaplan1_rallybik_state::rallybik(machine_config &config) m_screen->set_screen_update(FUNC(toaplan1_rallybik_state::screen_update)); m_screen->screen_vblank().set(FUNC(toaplan1_rallybik_state::screen_vblank)); - TOAPLAN_SCU(config, m_spritegen, 0); + TOAPLAN_SCU(config, m_spritegen); m_spritegen->set_screen(m_screen); m_spritegen->set_palette(m_palette); m_spritegen->set_xoffsets(31, 15); diff --git a/src/mame/toaplan/toaplan2.cpp b/src/mame/toaplan/toaplan2.cpp index 8c63b3c8935..fe3f0bb35b9 100644 --- a/src/mame/toaplan/toaplan2.cpp +++ b/src/mame/toaplan/toaplan2.cpp @@ -3936,7 +3936,7 @@ void toaplan2_state::pwrkick(machine_config &config) M68000(config, m_maincpu, 16_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::pwrkick_68k_mem); - UPD4992(config, m_rtc, 32'768); + UPD4992(config, m_rtc, XTAL::u(32'768)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -3971,7 +3971,7 @@ void toaplan2_state::othldrby(machine_config &config) M68000(config, m_maincpu, 16_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::othldrby_68k_mem); - UPD4992(config, m_rtc, 32'768); + UPD4992(config, m_rtc, XTAL::u(32'768)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -4186,7 +4186,7 @@ void toaplan2_state::batrider(machine_config &config) MCFG_MACHINE_RESET_OVERRIDE(toaplan2_state,bgaregga) - ADDRESS_MAP_BANK(config, m_dma_space, 0); + ADDRESS_MAP_BANK(config, m_dma_space); m_dma_space->set_addrmap(0, &toaplan2_state::batrider_dma_mem); m_dma_space->set_endianness(ENDIANNESS_BIG); m_dma_space->set_data_width(16); @@ -4252,7 +4252,7 @@ void toaplan2_state::bbakraid(machine_config &config) EEPROM_93C66_8BIT(config, "eeprom"); - ADDRESS_MAP_BANK(config, m_dma_space, 0); + ADDRESS_MAP_BANK(config, m_dma_space); m_dma_space->set_addrmap(0, &toaplan2_state::batrider_dma_mem); m_dma_space->set_endianness(ENDIANNESS_BIG); m_dma_space->set_data_width(16); @@ -4300,7 +4300,7 @@ void toaplan2_state::nprobowl(machine_config &config) M68000(config, m_maincpu, 32_MHz_XTAL / 2); // 32MHz Oscillator, divisor not verified m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::nprobowl_68k_mem); - ADDRESS_MAP_BANK(config, m_dma_space, 0); + ADDRESS_MAP_BANK(config, m_dma_space); m_dma_space->set_addrmap(0, &toaplan2_state::batrider_dma_mem); m_dma_space->set_endianness(ENDIANNESS_BIG); m_dma_space->set_data_width(16); diff --git a/src/mame/toaplan/toaplan_scu.cpp b/src/mame/toaplan/toaplan_scu.cpp index 815e8fc99aa..ab16b340c01 100644 --- a/src/mame/toaplan/toaplan_scu.cpp +++ b/src/mame/toaplan/toaplan_scu.cpp @@ -29,7 +29,7 @@ GFXDECODE_MEMBER( toaplan_scu_device::gfxinfo ) GFXDECODE_END -toaplan_scu_device::toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +toaplan_scu_device::toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TOAPLAN_SCU, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo) , device_video_interface(mconfig, *this) diff --git a/src/mame/toaplan/toaplan_scu.h b/src/mame/toaplan/toaplan_scu.h index 6bbb89a7a7b..9fee82090d9 100644 --- a/src/mame/toaplan/toaplan_scu.h +++ b/src/mame/toaplan/toaplan_scu.h @@ -9,7 +9,7 @@ class toaplan_scu_device : public device_t, public device_gfx_interface, public device_video_interface { public: - toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + toaplan_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); typedef device_delegate pri_cb_delegate; diff --git a/src/mame/toaplan/twincobr.cpp b/src/mame/toaplan/twincobr.cpp index 53dea192f4a..824db24d408 100644 --- a/src/mame/toaplan/twincobr.cpp +++ b/src/mame/toaplan/twincobr.cpp @@ -705,7 +705,7 @@ void twincobr_state::twincobr(machine_config &config) crtc.set_show_border_area(false); crtc.set_char_width(2); - TOAPLAN_SCU(config, m_spritegen, 0); + TOAPLAN_SCU(config, m_spritegen); m_spritegen->set_screen(m_screen); m_spritegen->set_palette(m_palette); m_spritegen->set_xoffsets(31, 15); diff --git a/src/mame/toaplan/wardner.cpp b/src/mame/toaplan/wardner.cpp index b59f06204c9..91529f7955f 100644 --- a/src/mame/toaplan/wardner.cpp +++ b/src/mame/toaplan/wardner.cpp @@ -438,7 +438,7 @@ void wardner_state::wardner(machine_config &config) crtc.set_show_border_area(false); crtc.set_char_width(2); - TOAPLAN_SCU(config, m_spritegen, 0); + TOAPLAN_SCU(config, m_spritegen); m_spritegen->set_screen(m_screen); m_spritegen->set_palette(m_palette); m_spritegen->set_xoffsets(32, 14); diff --git a/src/mame/tomy/tomy_princ.cpp b/src/mame/tomy/tomy_princ.cpp index c003788abe3..f2635196572 100644 --- a/src/mame/tomy/tomy_princ.cpp +++ b/src/mame/tomy/tomy_princ.cpp @@ -149,7 +149,7 @@ void tomy_princ_state::tomy_princ(machine_config &config) m_screen->set_size(256, 256); m_screen->set_visarea(0, 256-1, 0, 256-1); - TIMER(config, m_scantimer, 0); + TIMER(config, m_scantimer); m_scantimer->configure_scanline(FUNC(tomy_princ_state::scan_interrupt), "screen", 0, 1); GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "princ_cart"); diff --git a/src/mame/tomy/tutor.cpp b/src/mame/tomy/tutor.cpp index 096ac2f4a46..b48c59a400c 100644 --- a/src/mame/tomy/tutor.cpp +++ b/src/mame/tomy/tutor.cpp @@ -768,7 +768,7 @@ void tutor_state::tutor(machine_config &config) // Sound SPEAKER(config, "sound_out").front_center(); - SN76489A(config, "sn76489a", 3579545).add_route(ALL_OUTPUTS, "sound_out", 0.75); + SN76489A(config, "sn76489a", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "sound_out", 0.75); CENTRONICS(config, m_centronics, centronics_devices, "printer").busy_handler().set(FUNC(tutor_state::write_centronics_busy)); @@ -777,7 +777,7 @@ void tutor_state::tutor(machine_config &config) // Cassette SPEAKER(config, "cass_out").front_center(); - CASSETTE(config, "cassette", 0).add_route(ALL_OUTPUTS, "cass_out", 0.25); + CASSETTE(config, "cassette").add_route(ALL_OUTPUTS, "cass_out", 0.25); // Cartridge slot GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "tutor_cart", "bin"); diff --git a/src/mame/toshiba/paso1600.cpp b/src/mame/toshiba/paso1600.cpp index d2e259d08d9..f55f0c6c120 100644 --- a/src/mame/toshiba/paso1600.cpp +++ b/src/mame/toshiba/paso1600.cpp @@ -317,7 +317,7 @@ void paso1600_state::paso1600(machine_config &config) crtc.set_show_border_area(false); crtc.set_char_width(8); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); AM9517A(config, m_dma, 16000000/4); diff --git a/src/mame/toshiba/pasopia7.cpp b/src/mame/toshiba/pasopia7.cpp index edd4120fb98..4ffc196c7ce 100644 --- a/src/mame/toshiba/pasopia7.cpp +++ b/src/mame/toshiba/pasopia7.cpp @@ -838,7 +838,7 @@ void pasopia7_state::p7_base(machine_config &config) m_ppi2->in_pc_callback().set(FUNC(pasopia7_state::nmi_reg_r)); m_ppi2->out_pc_callback().set(FUNC(pasopia7_state::nmi_reg_w)); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); FLOPPY_CONNECTOR(config, "fdc:0", pasopia7_floppies, "525hd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, "fdc:1", pasopia7_floppies, "525hd", floppy_image_device::default_mfm_floppy_formats); diff --git a/src/mame/trainer/amico2k.cpp b/src/mame/trainer/amico2k.cpp index 96877b7a607..60b0a0da012 100644 --- a/src/mame/trainer/amico2k.cpp +++ b/src/mame/trainer/amico2k.cpp @@ -220,7 +220,7 @@ void amico2k_state::machine_start() void amico2k_state::amico2k(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1000000); /* 1MHz */ + M6502(config, m_maincpu, XTAL::u(1000000)); /* 1MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &amico2k_state::amico2k_mem); /* video hardware */ diff --git a/src/mame/trainer/babbage.cpp b/src/mame/trainer/babbage.cpp index e24a0756d9f..60e206d7972 100644 --- a/src/mame/trainer/babbage.cpp +++ b/src/mame/trainer/babbage.cpp @@ -263,7 +263,7 @@ void babbage_state::babbage(machine_config &config) m_pio[1]->in_pa_callback().set(FUNC(babbage_state::pio2_a_r)); m_pio[1]->out_pb_callback().set(FUNC(babbage_state::pio2_b_w)); - TIMER(config, "keyboard_timer", 0).configure_periodic(FUNC(babbage_state::keyboard_callback), attotime::from_hz(30)); + TIMER(config, "keyboard_timer").configure_periodic(FUNC(babbage_state::keyboard_callback), attotime::from_hz(30)); } diff --git a/src/mame/trainer/crei680.cpp b/src/mame/trainer/crei680.cpp index f6645efa3d5..484d30c564a 100644 --- a/src/mame/trainer/crei680.cpp +++ b/src/mame/trainer/crei680.cpp @@ -288,17 +288,17 @@ void crei680_state::crei680(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 900).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, "beeper", XTAL::u(900)).add_route(ALL_OUTPUTS, "mono", 0.50); /* devices */ - PIA6821(config, m_pia0, 0); + PIA6821(config, m_pia0); m_pia0->readpa_handler().set_ioport("X1"); m_pia0->writepb_handler().set(FUNC(crei680_state::pia0b_w)); //m_pia0->cb2_handler().set(FUNC(crei680_state::screen_w)); m_pia0->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE); m_pia0->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE); - PIA6821(config, m_pia1, 0); + PIA6821(config, m_pia1); m_pia1->readpa_handler().set_ioport("X0"); m_pia1->writepb_handler().set(FUNC(crei680_state::pia1b_w)); //m_pia1->cb2_handler().set(FUNC(crei680_state::screen_w)); @@ -309,7 +309,7 @@ void crei680_state::crei680(machine_config &config) m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); - ACIA6850(config, m_uart, 0); + ACIA6850(config, m_uart); m_uart->txd_handler().set([this] (bool state) { m_cassbit = state; }); //m_uart->rts_handler().set(FUNC(crei680_state::acia_rts_w)); m_uart->irq_handler().set_inputline("maincpu", M6800_IRQ_LINE); diff --git a/src/mame/trainer/emma2.cpp b/src/mame/trainer/emma2.cpp index 9bc53bbf736..cbc6f33f883 100644 --- a/src/mame/trainer/emma2.cpp +++ b/src/mame/trainer/emma2.cpp @@ -188,7 +188,7 @@ void emma2_state::machine_start() void emma2_state::emma2(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1'000'000); + M6502(config, m_maincpu, XTAL::u(1'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &emma2_state::mem_map); /* video hardware */ @@ -197,10 +197,10 @@ void emma2_state::emma2(machine_config &config) m_display->set_segmask(0xff, 0xff); /* Devices */ - MOS6522(config, m_via, 1'000'000); // #2 from cpu + MOS6522(config, m_via, XTAL::u(1'000'000)); // #2 from cpu m_via->irq_handler().set_inputline(m_maincpu, m6502_device::IRQ_LINE); - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->writepa_handler().set(FUNC(emma2_state::segment_w)); m_pia->writepb_handler().set(FUNC(emma2_state::digit_w)); m_pia->readpb_handler().set(FUNC(emma2_state::keyboard_r)); diff --git a/src/mame/trainer/mk14.cpp b/src/mame/trainer/mk14.cpp index 17a5b09ceb8..29fda46cb31 100644 --- a/src/mame/trainer/mk14.cpp +++ b/src/mame/trainer/mk14.cpp @@ -209,8 +209,8 @@ void mk14_state::mk14(machine_config &config) // sound SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); - ZN425E(config, "dac8", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // Ferranti ZN425E + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); + ZN425E(config, "dac8").add_route(ALL_OUTPUTS, "speaker", 0.5); // Ferranti ZN425E /* devices */ ins8154_device &ic8(INS8154(config, "ic8")); diff --git a/src/mame/trainer/selz80.cpp b/src/mame/trainer/selz80.cpp index 7bfde1bc4c0..9cd8ccae3e1 100644 --- a/src/mame/trainer/selz80.cpp +++ b/src/mame/trainer/selz80.cpp @@ -246,11 +246,11 @@ void selz80_state::selz80(machine_config &config) m_display->set_segmask(0xff, 0xff); /* Devices */ - CLOCK(config, m_clock, 153'600); + CLOCK(config, m_clock, XTAL::u(153'600)); m_clock->signal_handler().set("uart", FUNC(i8251_device::write_txc)); m_clock->signal_handler().append("uart", FUNC(i8251_device::write_rxc)); - i8251_device &uart(I8251(config, "uart", 0)); + i8251_device &uart(I8251(config, "uart")); uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/trs/6883sam.cpp b/src/mame/trs/6883sam.cpp index 140791aa7fb..388b5c2196f 100644 --- a/src/mame/trs/6883sam.cpp +++ b/src/mame/trs/6883sam.cpp @@ -89,7 +89,7 @@ DEFINE_DEVICE_TYPE(SAM6883, sam6883_device, "sam6883", "MC6883 SAM") // constructor //------------------------------------------------- -sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAM6883, tag, owner, clock) , device_memory_interface(mconfig, *this) , sam6883_friend_device_interface(mconfig, *this, 4) diff --git a/src/mame/trs/6883sam.h b/src/mame/trs/6883sam.h index 1a283d74e66..0d14c9b8a21 100644 --- a/src/mame/trs/6883sam.h +++ b/src/mame/trs/6883sam.h @@ -82,13 +82,13 @@ class sam6883_device : public device_t, public device_memory_interface, public s { public: template - sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : sam6883_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); } - sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // CPU read/write handlers uint8_t read(offs_t offset); diff --git a/src/mame/trs/coco12.cpp b/src/mame/trs/coco12.cpp index 970faca3371..1dc28c58e9f 100644 --- a/src/mame/trs/coco12.cpp +++ b/src/mame/trs/coco12.cpp @@ -426,10 +426,10 @@ void coco_state::coco_sound(machine_config &config) SPEAKER(config, "speaker").front_center(); // 6-bit D/A: R10-15 = 10K, 20K, 40.2K, 80.6K, 162K, 324K (according to parts list); output also controls joysticks - DAC_6BIT_BINARY_WEIGHTED(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.125); + DAC_6BIT_BINARY_WEIGHTED(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.125); // Single-bit sound: R22 = 10K - DAC_1BIT(config, "sbs", 0).set_output_range(-1, 1).add_route(ALL_OUTPUTS, "speaker", 0.125); + DAC_1BIT(config, "sbs").set_output_range(-1, 1).add_route(ALL_OUTPUTS, "speaker", 0.125); } @@ -478,7 +478,7 @@ void coco12_state::coco(machine_config &config) INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, m_firqs).output_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE); - pia6821_device &pia0(PIA6821(config, PIA0_TAG, 0)); + pia6821_device &pia0(PIA6821(config, PIA0_TAG)); pia0.writepa_handler().set(FUNC(coco_state::pia0_pa_w)); pia0.writepb_handler().set(FUNC(coco_state::pia0_pb_w)); pia0.tspb_handler().set_constant(0xff); @@ -487,7 +487,7 @@ void coco12_state::coco(machine_config &config) pia0.irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); pia0.irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); - pia6821_device &pia1(PIA6821(config, PIA1_TAG, 0)); + pia6821_device &pia1(PIA6821(config, PIA1_TAG)); pia1.readpa_handler().set(FUNC(coco_state::pia1_pa_r)); pia1.readpb_handler().set(FUNC(coco_state::pia1_pb_r)); pia1.writepa_handler().set(FUNC(coco_state::pia1_pa_w)); @@ -508,7 +508,7 @@ void coco12_state::coco(machine_config &config) m_sam->set_addrmap(7, &coco12_state::coco_ff60); // Becker Port device - COCO_DWSOCK(config, DWSOCK_TAG, 0); + COCO_DWSOCK(config, DWSOCK_TAG); // sound hardware coco_sound(config); diff --git a/src/mame/trs/coco3.cpp b/src/mame/trs/coco3.cpp index 151a24a0475..4e22e782544 100644 --- a/src/mame/trs/coco3.cpp +++ b/src/mame/trs/coco3.cpp @@ -272,7 +272,7 @@ void coco3_state::coco3(machine_config &config) INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, m_firqs).output_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE); - pia6821_device &pia0(PIA6821(config, PIA0_TAG, 0)); + pia6821_device &pia0(PIA6821(config, PIA0_TAG)); pia0.writepa_handler().set(FUNC(coco_state::pia0_pa_w)); pia0.writepb_handler().set(FUNC(coco_state::pia0_pb_w)); pia0.tspb_handler().set_constant(0xff); @@ -281,7 +281,7 @@ void coco3_state::coco3(machine_config &config) pia0.irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); pia0.irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); - pia6821_device &pia1(PIA6821(config, PIA1_TAG, 0)); + pia6821_device &pia1(PIA6821(config, PIA1_TAG)); pia1.readpa_handler().set(FUNC(coco_state::pia1_pa_r)); pia1.readpb_handler().set(FUNC(coco_state::pia1_pb_r)); pia1.writepa_handler().set(FUNC(coco_state::pia1_pa_w)); @@ -292,7 +292,7 @@ void coco3_state::coco3(machine_config &config) pia1.irqb_handler().set(m_firqs, FUNC(input_merger_device::in_w<1>)); // Becker Port device - COCO_DWSOCK(config, DWSOCK_TAG, 0); + COCO_DWSOCK(config, DWSOCK_TAG); // sound hardware coco_sound(config); diff --git a/src/mame/trs/coco_vhd.cpp b/src/mame/trs/coco_vhd.cpp index b2b95e30830..13633d3a1c0 100644 --- a/src/mame/trs/coco_vhd.cpp +++ b/src/mame/trs/coco_vhd.cpp @@ -71,7 +71,7 @@ DEFINE_DEVICE_TYPE(COCO_VHD, coco_vhd_image_device, "coco_vhd_image", "CoCo Virt // coco_vhd_image_device - constructor //------------------------------------------------- -coco_vhd_image_device::coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +coco_vhd_image_device::coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COCO_VHD, tag, owner, clock) , device_image_interface(mconfig, *this) , m_cpu(*this, finder_base::DUMMY_TAG) diff --git a/src/mame/trs/coco_vhd.h b/src/mame/trs/coco_vhd.h index 98463dcc5db..4e0e2d3ea3e 100644 --- a/src/mame/trs/coco_vhd.h +++ b/src/mame/trs/coco_vhd.h @@ -25,12 +25,12 @@ class coco_vhd_image_device : public device_t, public: // construction/destruction template - coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : coco_vhd_image_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward(cpu_tag)); } - coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + coco_vhd_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~coco_vhd_image_device(); // image-level overrides diff --git a/src/mame/trs/dgn_beta.cpp b/src/mame/trs/dgn_beta.cpp index 810a076a2dd..7a9b3fcdb1a 100644 --- a/src/mame/trs/dgn_beta.cpp +++ b/src/mame/trs/dgn_beta.cpp @@ -326,7 +326,7 @@ void dgn_beta_state::dgnbeta(machine_config &config) PALETTE(config, m_palette, FUNC(dgn_beta_state::dgn_beta_palette), std::size(dgnbeta_pens)); /* PIA 0 at $FC20-$FC23 I46 */ - PIA6821(config, m_pia_0, 0); + PIA6821(config, m_pia_0); m_pia_0->readpa_handler().set(FUNC(dgn_beta_state::d_pia0_pa_r)); m_pia_0->readpb_handler().set(FUNC(dgn_beta_state::d_pia0_pb_r)); m_pia_0->writepa_handler().set(FUNC(dgn_beta_state::d_pia0_pa_w)); @@ -336,7 +336,7 @@ void dgn_beta_state::dgnbeta(machine_config &config) m_pia_0->irqb_handler().set(FUNC(dgn_beta_state::d_pia0_irq_b)); /* PIA 1 at $FC24-$FC27 I63 */ - PIA6821(config, m_pia_1, 0); + PIA6821(config, m_pia_1); m_pia_1->readpa_handler().set(FUNC(dgn_beta_state::d_pia1_pa_r)); m_pia_1->readpb_handler().set(FUNC(dgn_beta_state::d_pia1_pb_r)); m_pia_1->writepa_handler().set(FUNC(dgn_beta_state::d_pia1_pa_w)); @@ -347,7 +347,7 @@ void dgn_beta_state::dgnbeta(machine_config &config) /* PIA 2 at FCC0-FCC3 I28 */ /* This seems to control the RAM paging system, and have the DRQ */ /* from the WD2797 */ - PIA6821(config, m_pia_2, 0); + PIA6821(config, m_pia_2); m_pia_2->readpa_handler().set(FUNC(dgn_beta_state::d_pia2_pa_r)); m_pia_2->readpb_handler().set(FUNC(dgn_beta_state::d_pia2_pb_r)); m_pia_2->writepa_handler().set(FUNC(dgn_beta_state::d_pia2_pa_w)); diff --git a/src/mame/trs/dragon.cpp b/src/mame/trs/dragon.cpp index fcde7f5cb1c..803282e4051 100644 --- a/src/mame/trs/dragon.cpp +++ b/src/mame/trs/dragon.cpp @@ -246,7 +246,7 @@ void dragon_state::dragon_base(machine_config &config) INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE); INPUT_MERGER_ANY_HIGH(config, m_firqs).output_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE); - pia6821_device &pia0(PIA6821(config, PIA0_TAG, 0)); + pia6821_device &pia0(PIA6821(config, PIA0_TAG)); pia0.writepa_handler().set(FUNC(coco_state::pia0_pa_w)); pia0.writepb_handler().set(FUNC(coco_state::pia0_pb_w)); pia0.tspb_handler().set_constant(0xff); @@ -255,7 +255,7 @@ void dragon_state::dragon_base(machine_config &config) pia0.irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); pia0.irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<1>)); - pia6821_device &pia1(PIA6821(config, PIA1_TAG, 0)); + pia6821_device &pia1(PIA6821(config, PIA1_TAG)); pia1.readpa_handler().set(FUNC(coco_state::pia1_pa_r)); pia1.readpb_handler().set(FUNC(coco_state::pia1_pb_r)); pia1.writepa_handler().set(FUNC(coco_state::pia1_pa_w)); @@ -280,7 +280,7 @@ void dragon_state::dragon_base(machine_config &config) m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cassette->set_interface("dragon_cass"); - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); // video hardware SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER); @@ -334,7 +334,7 @@ void dragon64_state::dragon64(machine_config &config) cartslot.halt_callback().set_inputline(m_maincpu, INPUT_LINE_HALT); // acia - mos6551_device &acia(MOS6551(config, "acia", 0)); + mos6551_device &acia(MOS6551(config, "acia")); acia.set_xtal(1.8432_MHz_XTAL); acia.irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<2>)); acia.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); @@ -408,7 +408,7 @@ void dragon_alpha_state::dgnalpha(machine_config &config) cartslot.halt_callback().set_inputline(m_maincpu, INPUT_LINE_HALT); // acia - mos6551_device &acia(MOS6551(config, "acia", 0)); + mos6551_device &acia(MOS6551(config, "acia")); acia.set_xtal(1.8432_MHz_XTAL); // floppy @@ -428,7 +428,7 @@ void dragon_alpha_state::dgnalpha(machine_config &config) ay8912.add_route(ALL_OUTPUTS, "speaker", 0.75); // pia 2 - pia6821_device &pia2(PIA6821(config, PIA2_TAG, 0)); + pia6821_device &pia2(PIA6821(config, PIA2_TAG)); pia2.writepa_handler().set(FUNC(dragon_alpha_state::pia2_pa_w)); pia2.irqa_handler().set(m_firqs, FUNC(input_merger_device::in_w<2>)); pia2.irqb_handler().set(m_firqs, FUNC(input_merger_device::in_w<3>)); diff --git a/src/mame/trs/gime.cpp b/src/mame/trs/gime.cpp index 40d4bc32e81..5cd898c7614 100644 --- a/src/mame/trs/gime.cpp +++ b/src/mame/trs/gime.cpp @@ -139,7 +139,7 @@ // ctor //------------------------------------------------- -gime_device::gime_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint8_t *fontdata) +gime_device::gime_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *fontdata) : mc6847_friend_device(mconfig, type, tag, owner, clock, fontdata, true, 263, 25+192+26+3, 8, false) , sam6883_friend_device_interface(mconfig, *this, 8) , m_write_irq(*this) @@ -2215,10 +2215,10 @@ const uint8_t gime_device::lowres_font[] = DEFINE_DEVICE_TYPE(GIME_NTSC, gime_ntsc_device, "gime_ntsc", "TCC1014 (VC2645QC) GIME (NTSC)") DEFINE_DEVICE_TYPE(GIME_PAL, gime_pal_device, "gime_pal", "TCC1014 (VC2645QC) GIME (PAL)") -gime_ntsc_device::gime_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gime_ntsc_device::gime_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gime_device(mconfig, GIME_NTSC, tag, owner, clock, lowres_font) { } -gime_pal_device::gime_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gime_pal_device::gime_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gime_device(mconfig, GIME_PAL, tag, owner, clock, lowres_font) { } template class device_finder; diff --git a/src/mame/trs/gime.h b/src/mame/trs/gime.h index 1791358646b..c9c0fc3321e 100644 --- a/src/mame/trs/gime.h +++ b/src/mame/trs/gime.h @@ -61,7 +61,7 @@ public: void set_il2(bool value) { set_interrupt_value(INTERRUPT_EI2, value); } protected: - gime_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint8_t *fontdata); + gime_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint8_t *fontdata); // device-level overrides virtual void device_start() override; @@ -257,7 +257,7 @@ class gime_ntsc_device : public gime_device { public: template - gime_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&ram_tag, V &&ext_tag, W &®ion_tag) + gime_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&ram_tag, V &&ext_tag, W &®ion_tag) : gime_ntsc_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); @@ -267,14 +267,14 @@ public: m_rom_region.set_tag(std::forward(region_tag)); } - gime_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gime_ntsc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class gime_pal_device : public gime_device { public: template - gime_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&ram_tag, V &&ext_tag, W &®ion_tag) + gime_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&ram_tag, V &&ext_tag, W &®ion_tag) : gime_pal_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward(cpu_tag)); @@ -284,7 +284,7 @@ public: m_rom_region.set_tag(std::forward(region_tag)); } - gime_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gime_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(GIME_NTSC, gime_ntsc_device) diff --git a/src/mame/trs/lnw80.cpp b/src/mame/trs/lnw80.cpp index 42beaec46f7..6a31b884daf 100644 --- a/src/mame/trs/lnw80.cpp +++ b/src/mame/trs/lnw80.cpp @@ -632,7 +632,7 @@ void lnw80_state::lnw80(machine_config &config) OUTPUT_LATCH(config, m_cent_data_out); m_centronics->set_output_latch(*m_cent_data_out); - CLOCK(config, m_uart_clock, 19200 * 16); + CLOCK(config, m_uart_clock, XTAL::u(19200 * 16)); m_uart_clock->signal_handler().set(m_uart, FUNC(ay31015_device::write_rcp)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_tcp)); diff --git a/src/mame/trs/max80.cpp b/src/mame/trs/max80.cpp index 3406015b5aa..307bbcf402e 100644 --- a/src/mame/trs/max80.cpp +++ b/src/mame/trs/max80.cpp @@ -480,7 +480,7 @@ void max80_state::max80(machine_config &config) m_pio->out_pa_callback().set(FUNC(max80_state::pio_pa_w)); m_pio->out_pb_callback().set(FUNC(max80_state::pio_pb_w)); - COM8116(config, m_brg, 5'068'800); // A few gates wired up as an oscillator. Frequency guessed. + COM8116(config, m_brg, XTAL::u(5'068'800)); // A few gates wired up as an oscillator. Frequency guessed. m_brg->fr_handler().set(m_uart, FUNC(z80sio_device::rxca_w)); m_brg->ft_handler().set(m_uart, FUNC(z80sio_device::rxcb_w)); @@ -490,7 +490,7 @@ void max80_state::max80(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 800).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_beep, XTAL::u(800)).add_route(ALL_OUTPUTS, "mono", 0.50); TIMER(config, m_beep_timer).configure_generic(FUNC(max80_state::beep_timer)); } diff --git a/src/mame/trs/mc10.cpp b/src/mame/trs/mc10.cpp index 2ee93ab7e7a..f8fe81260f9 100644 --- a/src/mame/trs/mc10.cpp +++ b/src/mame/trs/mc10.cpp @@ -494,7 +494,7 @@ void mc10_state::mc10_base(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.0625); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.0625); CASSETTE(config, m_cassette); m_cassette->set_formats(alice32_cassette_formats); @@ -563,7 +563,7 @@ void alice32_state::alice32(machine_config &config) screen.set_visarea(00, 336-1, 00, 270-1); PALETTE(config, "palette").set_entries(8); - EF9345(config, m_ef9345, 0); + EF9345(config, m_ef9345); m_ef9345->set_screen("screen"); m_ef9345->set_palette_tag("palette"); TIMER(config, "alice32_sl").configure_scanline(FUNC(alice32_state::alice32_scanline), "screen", 0, 10); diff --git a/src/mame/trs/meritum.cpp b/src/mame/trs/meritum.cpp index fe20b986d81..037d02418f0 100644 --- a/src/mame/trs/meritum.cpp +++ b/src/mame/trs/meritum.cpp @@ -352,7 +352,7 @@ void meritum_state::meritum1(machine_config &config) INPUT_MERGER_ALL_HIGH(config, "nmigate").output_handler().set("mainpit", FUNC(pit8253_device::write_gate2)).invert(); - pit8253_device &pit(PIT8253(config, "mainpit", 0)); + pit8253_device &pit(PIT8253(config, "mainpit")); pit.set_clk<0>(10_MHz_XTAL / 5); // 2 MHz pit.set_clk<1>(10_MHz_XTAL / 10); // 1 MHz pit.set_clk<2>(10_MHz_XTAL / 4); // same as CPU clock @@ -374,7 +374,7 @@ void meritum_state::meritum1(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - PIT8253(config, "audiopit", 0); // optional audio interface + PIT8253(config, "audiopit"); // optional audio interface // video SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -405,7 +405,7 @@ void meritum_state::meritum2(machine_config &config) meritum1(config); m_maincpu->set_addrmap(AS_PROGRAM, &meritum_state::mem_map2); m_maincpu->set_addrmap(AS_IO, &meritum_state::io_map2); - I8255(config, "flopppi", 0); // floppy disk interface + I8255(config, "flopppi"); // floppy disk interface m_screen->set_screen_update(FUNC(meritum_state::screen_update_meritum2)); SOFTWARE_LIST(config.replace(), "quik_list").set_original("trs80_quik").set_filter("M2"); } diff --git a/src/mame/trs/radionic.cpp b/src/mame/trs/radionic.cpp index 008e8b92ecf..5673a7a9ca3 100644 --- a/src/mame/trs/radionic.cpp +++ b/src/mame/trs/radionic.cpp @@ -531,7 +531,7 @@ void radionic_state::radionic(machine_config &config) OUTPUT_LATCH(config, m_cent_data_out); m_centronics->set_output_latch(*m_cent_data_out); - CLOCK(config, m_clock, 4'800); + CLOCK(config, m_clock, XTAL::u(4'800)); m_clock->signal_handler().set(m_uart2, FUNC(i8251_device::write_txc)); m_clock->signal_handler().set(m_uart2, FUNC(i8251_device::write_rxc)); diff --git a/src/mame/trs/tandy2k.cpp b/src/mame/trs/tandy2k.cpp index e7356d7fd65..a0c3815be9a 100644 --- a/src/mame/trs/tandy2k.cpp +++ b/src/mame/trs/tandy2k.cpp @@ -456,7 +456,7 @@ INPUT_PORTS_END class tandy2kb_hle_device : public pc_keyboard_device { public: - tandy2kb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tandy2kb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual ioport_constructor device_input_ports() const override; @@ -464,7 +464,7 @@ protected: DEFINE_DEVICE_TYPE(TANDY2K_HLE_KEYB, tandy2kb_hle_device, "tandy2kb_hle", "Tandy 2000 Keyboard HLE") -tandy2kb_hle_device::tandy2kb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tandy2kb_hle_device::tandy2kb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_keyboard_device(mconfig, TANDY2K_HLE_KEYB, tag, owner, clock) { m_type = KEYBOARD_TYPE::PC; @@ -1024,11 +1024,11 @@ void tandy2k_state::tandy2k(machine_config &config) vpac.sld_callback().set(FUNC(tandy2k_state::vpac_sld_w)); vpac.set_screen(SCREEN_TAG); - CRT9212(config, m_drb0, 0); + CRT9212(config, m_drb0); m_drb0->set_wen2(1); m_drb0->dout().set(FUNC(tandy2k_state::vidla_w)); - CRT9212(config, m_drb1, 0); + CRT9212(config, m_drb1); m_drb1->set_wen2(1); m_drb1->dout().set(FUNC(tandy2k_state::drb_attr_w)); @@ -1049,7 +1049,7 @@ void tandy2k_state::tandy2k(machine_config &config) m_i8255a->in_pb_callback().set(FUNC(tandy2k_state::ppi_pb_r)); m_i8255a->out_pc_callback().set(FUNC(tandy2k_state::ppi_pc_w)); - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_uart->dtr_handler().set(m_rs232, FUNC(rs232_port_device::write_dtr)); m_uart->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts)); @@ -1062,7 +1062,7 @@ void tandy2k_state::tandy2k(machine_config &config) // TODO pin 15 external transmit clock // TODO pin 17 external receiver clock - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(16_MHz_XTAL / 16); m_pit->out_handler<0>().set(FUNC(tandy2k_state::outspkr_w)); m_pit->set_clk<1>(16_MHz_XTAL / 8); @@ -1070,10 +1070,10 @@ void tandy2k_state::tandy2k(machine_config &config) //m_pit->set_clk<2>(16_MHz_XTAL / 8); //m_pit->out_handler<2>().set(FUNC(tandy2k_state::rfrqpulse_w)); - PIC8259(config, m_pic0, 0); + PIC8259(config, m_pic0); m_pic0->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int0_w)); - PIC8259(config, m_pic1, 0); + PIC8259(config, m_pic1); m_pic1->out_int_callback().set(m_maincpu, FUNC(i80186_cpu_device::int1_w)); I8272A(config, m_fdc, 16_MHz_XTAL / 4, true); @@ -1094,12 +1094,12 @@ void tandy2k_state::tandy2k(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - TANDY2K_KEYBOARD(config, m_kb, 0); + TANDY2K_KEYBOARD(config, m_kb); m_kb->clock_wr_callback().set(FUNC(tandy2k_state::kbdclk_w)); m_kb->data_wr_callback().set(FUNC(tandy2k_state::kbddat_w)); // temporary until the tandy keyboard has a rom dump - TANDY2K_HLE_KEYB(config, m_pc_keyboard, 0).keypress().set(I8259A_1_TAG, FUNC(pic8259_device::ir0_w)); + TANDY2K_HLE_KEYB(config, m_pc_keyboard).keypress().set(I8259A_1_TAG, FUNC(pic8259_device::ir0_w)); // software lists SOFTWARE_LIST(config, "flop_list").set_original("tandy2k"); @@ -1115,7 +1115,7 @@ void tandy2k_state::tandy2k_hd(machine_config &config) m_maincpu->set_addrmap(AS_IO, &tandy2k_state::tandy2k_hd_io); // Tandon TM502 hard disk - HARDDISK(config, "harddisk0", 0); + HARDDISK(config, "harddisk0"); //MCFG_WD1010_ADD(WD1010_TAG, wd1010_intf) //MCFG_WD1100_11_ADD(WD1100_11_TAG, wd1100_11_intf) } diff --git a/src/mame/trs/tandy2kb.cpp b/src/mame/trs/tandy2kb.cpp index ab489ed3a2e..eb1111e5279 100644 --- a/src/mame/trs/tandy2kb.cpp +++ b/src/mame/trs/tandy2kb.cpp @@ -53,7 +53,7 @@ const tiny_rom_entry *tandy2k_keyboard_device::device_rom_region() const void tandy2k_keyboard_device::device_add_mconfig(machine_config &config) { - I8048(config, m_maincpu, 1000000); // ? + I8048(config, m_maincpu, XTAL::u(1000000)); // ? m_maincpu->p1_out_cb().set(FUNC(tandy2k_keyboard_device::kb_p1_w)); m_maincpu->p2_out_cb().set(FUNC(tandy2k_keyboard_device::kb_p2_w)); m_maincpu->bus_in_cb().set(FUNC(tandy2k_keyboard_device::kb_p1_r)); @@ -207,7 +207,7 @@ ioport_constructor tandy2k_keyboard_device::device_input_ports() const // tandy2k_keyboard_device - constructor //------------------------------------------------- -tandy2k_keyboard_device::tandy2k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tandy2k_keyboard_device::tandy2k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TANDY2K_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8048_TAG), m_y(*this, "Y%u", 0), diff --git a/src/mame/trs/tandy2kb.h b/src/mame/trs/tandy2kb.h index 769d91ed521..e38fa8c2391 100644 --- a/src/mame/trs/tandy2kb.h +++ b/src/mame/trs/tandy2kb.h @@ -32,7 +32,7 @@ class tandy2k_keyboard_device : public device_t { public: // construction/destruction - tandy2k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tandy2k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto clock_wr_callback() { return m_write_clock.bind(); } auto data_wr_callback() { return m_write_data.bind(); } diff --git a/src/mame/trs/trs80.cpp b/src/mame/trs/trs80.cpp index 8af755ecefb..233b7959a5f 100644 --- a/src/mame/trs/trs80.cpp +++ b/src/mame/trs/trs80.cpp @@ -520,7 +520,7 @@ void trs80_state::sys80(machine_config &config) subdevice("screen")->set_screen_update(FUNC(trs80_state::screen_update_sys80)); config.device_remove("brg"); - CLOCK(config, m_uart_clock, 19200 * 16); + CLOCK(config, m_uart_clock, XTAL::u(19200 * 16)); m_uart_clock->signal_handler().set(m_uart, FUNC(ay31015_device::write_rcp)); m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_tcp)); } @@ -540,7 +540,7 @@ void trs80_state::ht1080z(machine_config &config) subdevice("screen")->set_screen_update(FUNC(trs80_state::screen_update_ht1080z)); subdevice("gfxdecode")->set_info(gfx_ht1080z); - AY8910(config, "ay1", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.25); // guess of clock + AY8910(config, "ay1", XTAL::u(1'500'000)).add_route(ALL_OUTPUTS, "mono", 0.25); // guess of clock //ay1.port_a_read_callback(FUNC(trs80_state::...); // ports are some kind of expansion slot //ay1.port_b_read_callback(FUNC(trs80_state::...); diff --git a/src/mame/trs/trs80dt1.cpp b/src/mame/trs/trs80dt1.cpp index 891e5697dea..055c24f0e6b 100644 --- a/src/mame/trs/trs80dt1.cpp +++ b/src/mame/trs/trs80dt1.cpp @@ -365,12 +365,12 @@ void trs80dt1_state::trs80dt1(machine_config &config) X2210(config, "nvram"); - TTL7474(config, m_7474, 0); + TTL7474(config, m_7474); m_7474->comp_output_cb().set_inputline(m_maincpu, MCS51_INT1_LINE).invert(); // /Q connects directly to /INT1, so we need to invert /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_buzzer, 2000).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_buzzer, XTAL::u(2000)).add_route(ALL_OUTPUTS, "mono", 0.50); RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); m_rs232->rxd_handler().set_inputline("maincpu", MCS51_RX_LINE); diff --git a/src/mame/trs/trs80m2.cpp b/src/mame/trs/trs80m2.cpp index 430bd5e7c98..8fd616f8778 100644 --- a/src/mame/trs/trs80m2.cpp +++ b/src/mame/trs/trs80m2.cpp @@ -764,9 +764,9 @@ void trs80m2_state::trs80m2(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - TRS80M2_KEYBOARD(config, m_kb, 0); + TRS80M2_KEYBOARD(config, m_kb); m_kb->clock_wr_callback().set(FUNC(trs80m2_state::kb_clock_w)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG)); keyboard.set_keyboard_callback(FUNC(trs80m2_state::kbd_w)); // internal RAM @@ -848,7 +848,7 @@ void trs80m16_state::trs80m16(machine_config &config) z80sio_device& sio(Z80SIO(config, Z80SIO_TAG, 8_MHz_XTAL / 2)); sio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - AM9519(config, m_uic, 0); + AM9519(config, m_uic); m_uic->out_int_callback().set_inputline(m_subcpu, M68K_IRQ_5); CENTRONICS(config, m_centronics, centronics_devices, "printer"); @@ -860,9 +860,9 @@ void trs80m16_state::trs80m16(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - TRS80M2_KEYBOARD(config, m_kb, 0); + TRS80M2_KEYBOARD(config, m_kb); m_kb->clock_wr_callback().set(FUNC(trs80m2_state::kb_clock_w)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG)); keyboard.set_keyboard_callback(FUNC(trs80m2_state::kbd_w)); // internal RAM diff --git a/src/mame/trs/trs80m2kb.cpp b/src/mame/trs/trs80m2kb.cpp index d1e4c5eb322..444e62c09f0 100644 --- a/src/mame/trs/trs80m2kb.cpp +++ b/src/mame/trs/trs80m2kb.cpp @@ -55,7 +55,7 @@ const tiny_rom_entry *trs80m2_keyboard_device::device_rom_region() const void trs80m2_keyboard_device::device_add_mconfig(machine_config &config) { - I8021(config, m_maincpu, 3000000); // 1000uH inductor connected across the XTAL inputs + I8021(config, m_maincpu, XTAL::u(3000000)); // 1000uH inductor connected across the XTAL inputs m_maincpu->t1_in_cb().set(FUNC(trs80m2_keyboard_device::kb_t1_r)); m_maincpu->bus_in_cb().set(FUNC(trs80m2_keyboard_device::kb_p0_r)); m_maincpu->p1_out_cb().set(FUNC(trs80m2_keyboard_device::kb_p1_w)); @@ -210,7 +210,7 @@ ioport_constructor trs80m2_keyboard_device::device_input_ports() const // trs80m2_keyboard_device - constructor //------------------------------------------------- -trs80m2_keyboard_device::trs80m2_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +trs80m2_keyboard_device::trs80m2_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TRS80M2_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8021_TAG), m_y(*this, "Y%u", 0), diff --git a/src/mame/trs/trs80m2kb.h b/src/mame/trs/trs80m2kb.h index 2b4383008a2..a9be0550107 100644 --- a/src/mame/trs/trs80m2kb.h +++ b/src/mame/trs/trs80m2kb.h @@ -33,7 +33,7 @@ class trs80m2_keyboard_device : public device_t { public: // construction/destruction - trs80m2_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + trs80m2_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto clock_wr_callback() { return m_write_clock.bind(); } diff --git a/src/mame/trs/trs80m3.cpp b/src/mame/trs/trs80m3.cpp index 21f1e9852d5..efdd2a771a2 100644 --- a/src/mame/trs/trs80m3.cpp +++ b/src/mame/trs/trs80m3.cpp @@ -426,11 +426,11 @@ void trs80m3_state::model4(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &trs80m3_state::m4_mem); m_maincpu->set_addrmap(AS_IO, &trs80m3_state::m4_io); - RAM(config, m_mainram, 0); + RAM(config, m_mainram); m_mainram->set_default_size("64K"); m_mainram->set_extra_options("16K,128K"); - ADDRESS_MAP_BANK(config, m_m4_bank, 0); + ADDRESS_MAP_BANK(config, m_m4_bank); m_m4_bank->set_map(&trs80m3_state::m4_banked_mem); m_m4_bank->set_endianness(ENDIANNESS_LITTLE); m_m4_bank->set_data_width(8); @@ -449,11 +449,11 @@ void trs80m3_state::model4p(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &trs80m3_state::m4p_mem); m_maincpu->set_addrmap(AS_IO, &trs80m3_state::m4p_io); - RAM(config, m_mainram, 0); + RAM(config, m_mainram); m_mainram->set_default_size("64K"); m_mainram->set_extra_options("128K"); - ADDRESS_MAP_BANK(config, m_m4p_bank, 0); + ADDRESS_MAP_BANK(config, m_m4p_bank); m_m4p_bank->set_map(&trs80m3_state::m4p_banked_mem); m_m4p_bank->set_endianness(ENDIANNESS_LITTLE); m_m4p_bank->set_data_width(8); diff --git a/src/mame/trs/trs80m3_m.cpp b/src/mame/trs/trs80m3_m.cpp index 922222ddd54..46915c506aa 100644 --- a/src/mame/trs/trs80m3_m.cpp +++ b/src/mame/trs/trs80m3_m.cpp @@ -9,7 +9,7 @@ #define IRQ_M4_RTC 0x04 /* RTC on Model 4 */ #define CASS_RISE 0x01 /* high speed cass on Model III/4) */ #define CASS_FALL 0x02 /* high speed cass on Model III/4) */ -#define MODEL4_MASTER_CLOCK 20275200 +#define MODEL4_MASTER_CLOCK XTAL::u(20275200) TIMER_CALLBACK_MEMBER(trs80m3_state::cassette_data_callback) diff --git a/src/mame/trs/vis.cpp b/src/mame/trs/vis.cpp index f214fa57330..4cd433206e1 100644 --- a/src/mame/trs/vis.cpp +++ b/src/mame/trs/vis.cpp @@ -20,7 +20,7 @@ class vis_audio_device : public device_t, public device_isa16_card_interface { public: - vis_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vis_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t pcm_r(offs_t offset); void pcm_w(offs_t offset, uint8_t data); @@ -49,7 +49,7 @@ private: DEFINE_DEVICE_TYPE(VIS_AUDIO, vis_audio_device, "vis_pcm", "vis_pcm") -vis_audio_device::vis_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vis_audio_device::vis_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VIS_AUDIO, tag, owner, clock), device_isa16_card_interface(mconfig, *this), m_rdac(*this, "rdac"), @@ -143,8 +143,8 @@ void vis_audio_device::device_add_mconfig(machine_config &config) ymf262.add_route(2, "lspeaker", 1.00); ymf262.add_route(3, "rspeaker", 1.00); - DAC_16BIT_R2R(config, m_ldac, 0); - DAC_16BIT_R2R(config, m_rdac, 0); + DAC_16BIT_R2R(config, m_ldac); + DAC_16BIT_R2R(config, m_rdac); m_ldac->add_route(ALL_OUTPUTS, "lspeaker", 1.0); // sanyo lc7883k m_rdac->add_route(ALL_OUTPUTS, "rspeaker", 1.0); // sanyo lc7883k } @@ -236,7 +236,7 @@ class vis_vga_device : public svga_device, public device_isa16_card_interface { public: - vis_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vis_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t vga_r(offs_t offset); void vga_w(offs_t offset, uint8_t data); uint8_t visvgamem_r(offs_t offset); @@ -262,7 +262,7 @@ private: DEFINE_DEVICE_TYPE(VIS_VGA, vis_vga_device, "vis_vga", "vis_vga") -vis_vga_device::vis_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vis_vga_device::vis_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, VIS_VGA, tag, owner, clock), device_isa16_card_interface(mconfig, *this) { @@ -1027,13 +1027,13 @@ void vis_state::vis(machine_config &config) kbdc.input_buffer_full_callback().set("mb:pic8259_master", FUNC(pic8259_device::ir1_w)); // FIXME: determine ISA bus clock - ISA16_SLOT(config, "mcd", 0, "mb:isabus", pc_isa16_cards, "mcd", true); - ISA16_SLOT(config, "visaudio", 0, "mb:isabus", vis_cards, "visaudio", true); - ISA16_SLOT(config, "visvga", 0, "mb:isabus", vis_cards, "visvga", true); + ISA16_SLOT(config, "mcd", "mb:isabus", pc_isa16_cards, "mcd", true); + ISA16_SLOT(config, "visaudio", "mb:isabus", vis_cards, "visaudio", true); + ISA16_SLOT(config, "visvga", "mb:isabus", vis_cards, "visvga", true); SOFTWARE_LIST(config, "cd_list").set_original("vis"); - DS6417(config, m_card, 0); + DS6417(config, m_card); } ROM_START(vis) diff --git a/src/mame/tvgames/actions_atj2279b.cpp b/src/mame/tvgames/actions_atj2279b.cpp index beb53f04e9e..af9d053c880 100644 --- a/src/mame/tvgames/actions_atj2279b.cpp +++ b/src/mame/tvgames/actions_atj2279b.cpp @@ -77,7 +77,7 @@ uint32_t actions_atj2279b_state::screen_update(screen_device &screen, bitmap_rgb void actions_atj2279b_state::actions_atj2279b(machine_config &config) { - ARM7_BE(config, m_maincpu, 450'000'000); // Probably ATJ227X 450MHz, but this needs to be checked more closely + ARM7_BE(config, m_maincpu, XTAL::u(450'000'000)); // Probably ATJ227X 450MHz, but this needs to be checked more closely m_maincpu->set_addrmap(AS_PROGRAM, &actions_atj2279b_state::atj2279b_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/tvgames/bl_handhelds_lcdc.cpp b/src/mame/tvgames/bl_handhelds_lcdc.cpp index fe137b8ea6e..ba246adab8c 100644 --- a/src/mame/tvgames/bl_handhelds_lcdc.cpp +++ b/src/mame/tvgames/bl_handhelds_lcdc.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(BL_HANDHELDS_LCDC, bl_handhelds_lcdc_device, "blhandheldlcdc", "BaoBaoLong Handhelds LCD Controller") -bl_handhelds_lcdc_device::bl_handhelds_lcdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bl_handhelds_lcdc_device::bl_handhelds_lcdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BL_HANDHELDS_LCDC, tag, owner, clock) { } diff --git a/src/mame/tvgames/bl_handhelds_lcdc.h b/src/mame/tvgames/bl_handhelds_lcdc.h index 7b47a07fe04..d72db24dbf2 100644 --- a/src/mame/tvgames/bl_handhelds_lcdc.h +++ b/src/mame/tvgames/bl_handhelds_lcdc.h @@ -12,7 +12,7 @@ class bl_handhelds_lcdc_device : public device_t { public: // construction/destruction - bl_handhelds_lcdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bl_handhelds_lcdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void lcdc_command_w(u8 data); u8 lcdc_data_r(); diff --git a/src/mame/tvgames/elan_ep3a19a.cpp b/src/mame/tvgames/elan_ep3a19a.cpp index 920c13d30d7..fd218285c90 100644 --- a/src/mame/tvgames/elan_ep3a19a.cpp +++ b/src/mame/tvgames/elan_ep3a19a.cpp @@ -263,16 +263,16 @@ void elan_ep3a19a_state::elan_ep3a19a(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_elan_eu3a05_fake); - ELAN_EU3A05_GPIO(config, m_gpio, 0); + ELAN_EU3A05_GPIO(config, m_gpio); m_gpio->read_0_callback().set_ioport("IN0"); m_gpio->read_1_callback().set_ioport("IN1"); m_gpio->read_2_callback().set_ioport("IN2"); - ELAN_EP3A19A_SYS(config, m_sys, 0); + ELAN_EP3A19A_SYS(config, m_sys); m_sys->set_cpu("maincpu"); m_sys->set_addrbank("bank"); - ELAN_EU3A05_VID(config, m_vid, 0); + ELAN_EU3A05_VID(config, m_vid); m_vid->set_cpu("maincpu"); m_vid->set_addrbank("bank"); m_vid->set_palette("palette"); @@ -286,7 +286,7 @@ void elan_ep3a19a_state::elan_ep3a19a(machine_config &config) SPEAKER(config, "mono").front_center(); - ELAN_EU3A05_SOUND(config, m_sound, 8000); + ELAN_EU3A05_SOUND(config, m_sound, XTAL::u(8000)); m_sound->space_read_callback().set(FUNC(elan_ep3a19a_state::read_full_space)); m_sound->add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/tvgames/elan_ep3a19asys.cpp b/src/mame/tvgames/elan_ep3a19asys.cpp index 53c1c9b22ce..9d15f5e2f9a 100644 --- a/src/mame/tvgames/elan_ep3a19asys.cpp +++ b/src/mame/tvgames/elan_ep3a19asys.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(ELAN_EP3A19A_SYS, elan_ep3a19asys_device, "elan_ep3a19asys", "Elan EP3A19A System") -elan_ep3a19asys_device::elan_ep3a19asys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +elan_ep3a19asys_device::elan_ep3a19asys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : elan_eu3a05commonsys_device(mconfig, ELAN_EP3A19A_SYS, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("regs", ENDIANNESS_NATIVE, 8, 5, 0, address_map_constructor(FUNC(elan_ep3a19asys_device::map), this)) diff --git a/src/mame/tvgames/elan_ep3a19asys.h b/src/mame/tvgames/elan_ep3a19asys.h index 25789370ec2..86a703d3e0d 100644 --- a/src/mame/tvgames/elan_ep3a19asys.h +++ b/src/mame/tvgames/elan_ep3a19asys.h @@ -9,7 +9,7 @@ class elan_ep3a19asys_device : public elan_eu3a05commonsys_device, public device_memory_interface { public: - elan_ep3a19asys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + elan_ep3a19asys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t elan_eu3a05_dmatrg_r(); void elan_eu3a05_dmatrg_w(uint8_t data); diff --git a/src/mame/tvgames/elan_eu3a05.cpp b/src/mame/tvgames/elan_eu3a05.cpp index e6b3fa89727..d76c921bb44 100644 --- a/src/mame/tvgames/elan_eu3a05.cpp +++ b/src/mame/tvgames/elan_eu3a05.cpp @@ -764,16 +764,16 @@ void elan_eu3a05_state::elan_eu3a05(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_elan_eu3a05_fake); - ELAN_EU3A05_GPIO(config, m_gpio, 0); + ELAN_EU3A05_GPIO(config, m_gpio); m_gpio->read_0_callback().set_ioport("IN0"); m_gpio->read_1_callback().set_ioport("IN1"); m_gpio->read_2_callback().set_ioport("IN2"); - ELAN_EU3A05_SYS(config, m_sys, 0); + ELAN_EU3A05_SYS(config, m_sys); m_sys->set_cpu("maincpu"); m_sys->set_addrbank("bank"); - ELAN_EU3A05_VID(config, m_vid, 0); + ELAN_EU3A05_VID(config, m_vid); m_vid->set_cpu("maincpu"); m_vid->set_addrbank("bank"); m_vid->set_palette("palette"); @@ -782,7 +782,7 @@ void elan_eu3a05_state::elan_eu3a05(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ELAN_EU3A05_SOUND(config, m_sound, 8000); + ELAN_EU3A05_SOUND(config, m_sound, XTAL::u(8000)); m_sound->space_read_callback().set(FUNC(elan_eu3a05_state::read_full_space)); m_sound->add_route(ALL_OUTPUTS, "mono", 1.0); /* just causes select sound to loop in Tetris for now! diff --git a/src/mame/tvgames/elan_eu3a05_a.cpp b/src/mame/tvgames/elan_eu3a05_a.cpp index 1ae8a1bc704..7fa15d27c89 100644 --- a/src/mame/tvgames/elan_eu3a05_a.cpp +++ b/src/mame/tvgames/elan_eu3a05_a.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A05_SOUND, elan_eu3a05_sound_device, "elan_eu3a05soun #include "logmacro.h" -elan_eu3a05_sound_device::elan_eu3a05_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +elan_eu3a05_sound_device::elan_eu3a05_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELAN_EU3A05_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), device_memory_interface(mconfig, *this), diff --git a/src/mame/tvgames/elan_eu3a05_a.h b/src/mame/tvgames/elan_eu3a05_a.h index 692d685cf64..02ea58af92f 100644 --- a/src/mame/tvgames/elan_eu3a05_a.h +++ b/src/mame/tvgames/elan_eu3a05_a.h @@ -15,7 +15,7 @@ class elan_eu3a05_sound_device : public device_t, public device_sound_interface, public device_memory_interface { public: - elan_eu3a05_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a05_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto space_read_callback() { return m_space_read_cb.bind(); } diff --git a/src/mame/tvgames/elan_eu3a05commonsys.cpp b/src/mame/tvgames/elan_eu3a05commonsys.cpp index f785ad2fe75..b668e103c7a 100644 --- a/src/mame/tvgames/elan_eu3a05commonsys.cpp +++ b/src/mame/tvgames/elan_eu3a05commonsys.cpp @@ -169,7 +169,7 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A05_COMMONSYS, elan_eu3a05commonsys_device, "elan_eu3a05commonsys", "Elan EU3A05/EU3A14 Common System") -elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_cpu(*this, finder_base::DUMMY_TAG), m_bank(*this, finder_base::DUMMY_TAG), @@ -179,7 +179,7 @@ elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &m { } -elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +elan_eu3a05commonsys_device::elan_eu3a05commonsys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : elan_eu3a05commonsys_device(mconfig, ELAN_EU3A05_COMMONSYS, tag, owner, clock) { } diff --git a/src/mame/tvgames/elan_eu3a05commonsys.h b/src/mame/tvgames/elan_eu3a05commonsys.h index 77c185b72ee..9acf021d5da 100644 --- a/src/mame/tvgames/elan_eu3a05commonsys.h +++ b/src/mame/tvgames/elan_eu3a05commonsys.h @@ -10,8 +10,8 @@ class elan_eu3a05commonsys_device : public device_t { public: - elan_eu3a05commonsys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - elan_eu3a05commonsys_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a05commonsys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + elan_eu3a05commonsys_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(std::forward(tag)); } template void set_addrbank(T &&tag) { m_bank.set_tag(std::forward(tag)); } diff --git a/src/mame/tvgames/elan_eu3a05commonvid.cpp b/src/mame/tvgames/elan_eu3a05commonvid.cpp index bec98795352..2413c98df39 100644 --- a/src/mame/tvgames/elan_eu3a05commonvid.cpp +++ b/src/mame/tvgames/elan_eu3a05commonvid.cpp @@ -10,12 +10,12 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A05_COMMONVID, elan_eu3a05commonvid_device, "elan_eu3a05commonvid", "Elan EU3A05/EU3A14 Common Video") -elan_eu3a05commonvid_device::elan_eu3a05commonvid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +elan_eu3a05commonvid_device::elan_eu3a05commonvid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : elan_eu3a05commonvid_device(mconfig, ELAN_EU3A05_COMMONVID, tag, owner, clock) { } -elan_eu3a05commonvid_device::elan_eu3a05commonvid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +elan_eu3a05commonvid_device::elan_eu3a05commonvid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_palette(*this, finder_base::DUMMY_TAG) { diff --git a/src/mame/tvgames/elan_eu3a05commonvid.h b/src/mame/tvgames/elan_eu3a05commonvid.h index 890072f1e5b..8d320a02ef4 100644 --- a/src/mame/tvgames/elan_eu3a05commonvid.h +++ b/src/mame/tvgames/elan_eu3a05commonvid.h @@ -9,8 +9,8 @@ class elan_eu3a05commonvid_device : public device_t { public: - elan_eu3a05commonvid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - elan_eu3a05commonvid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a05commonvid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + elan_eu3a05commonvid_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template void set_palette(T &&tag) { m_palette.set_tag(std::forward(tag)); } void set_entries(int entries) { m_palram.resize(entries*2); } diff --git a/src/mame/tvgames/elan_eu3a05gpio.cpp b/src/mame/tvgames/elan_eu3a05gpio.cpp index 9d01f3d0618..ac6c66b07f6 100644 --- a/src/mame/tvgames/elan_eu3a05gpio.cpp +++ b/src/mame/tvgames/elan_eu3a05gpio.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A05_GPIO, elan_eu3a05gpio_device, "elan_eu3a05gpio", "Elan EU3A05 GPIO") -elan_eu3a05gpio_device::elan_eu3a05gpio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +elan_eu3a05gpio_device::elan_eu3a05gpio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ELAN_EU3A05_GPIO, tag, owner, clock), m_write_0_callback(*this), m_write_1_callback(*this), diff --git a/src/mame/tvgames/elan_eu3a05gpio.h b/src/mame/tvgames/elan_eu3a05gpio.h index 5f1e22cbde9..b2705f90c73 100644 --- a/src/mame/tvgames/elan_eu3a05gpio.h +++ b/src/mame/tvgames/elan_eu3a05gpio.h @@ -8,7 +8,7 @@ class elan_eu3a05gpio_device : public device_t { public: - elan_eu3a05gpio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a05gpio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto write_0_callback() { return m_write_0_callback.bind(); } auto write_1_callback() { return m_write_1_callback.bind(); } diff --git a/src/mame/tvgames/elan_eu3a05sys.cpp b/src/mame/tvgames/elan_eu3a05sys.cpp index 681beb03404..04c2b23fc61 100644 --- a/src/mame/tvgames/elan_eu3a05sys.cpp +++ b/src/mame/tvgames/elan_eu3a05sys.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A05_SYS, elan_eu3a05sys_device, "elan_eu3a05sys", "Elan EU3A05 System") -elan_eu3a05sys_device::elan_eu3a05sys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +elan_eu3a05sys_device::elan_eu3a05sys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : elan_eu3a05commonsys_device(mconfig, ELAN_EU3A05_SYS, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("regs", ENDIANNESS_NATIVE, 8, 5, 0, address_map_constructor(FUNC(elan_eu3a05sys_device::map), this)) diff --git a/src/mame/tvgames/elan_eu3a05sys.h b/src/mame/tvgames/elan_eu3a05sys.h index 57fc5d9fce7..efe1db5d0ce 100644 --- a/src/mame/tvgames/elan_eu3a05sys.h +++ b/src/mame/tvgames/elan_eu3a05sys.h @@ -9,7 +9,7 @@ class elan_eu3a05sys_device : public elan_eu3a05commonsys_device, public device_memory_interface { public: - elan_eu3a05sys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a05sys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t elan_eu3a05_dmatrg_r(); void elan_eu3a05_dmatrg_w(uint8_t data); diff --git a/src/mame/tvgames/elan_eu3a05vid.cpp b/src/mame/tvgames/elan_eu3a05vid.cpp index 787175a238a..c4b764c2b7e 100644 --- a/src/mame/tvgames/elan_eu3a05vid.cpp +++ b/src/mame/tvgames/elan_eu3a05vid.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A05_VID, elan_eu3a05vid_device, "elan_eu3a05vid", "El // tilemaps start at 0x0600 in mainram, sprites at 0x3e00, unlike eu3a14 these could be fixed addresses -elan_eu3a05vid_device::elan_eu3a05vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +elan_eu3a05vid_device::elan_eu3a05vid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : elan_eu3a05commonvid_device(mconfig, ELAN_EU3A05_VID, tag, owner, clock), device_memory_interface(mconfig, *this), m_cpu(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/tvgames/elan_eu3a05vid.h b/src/mame/tvgames/elan_eu3a05vid.h index b8693bc7ec0..6c00d1b0ca6 100644 --- a/src/mame/tvgames/elan_eu3a05vid.h +++ b/src/mame/tvgames/elan_eu3a05vid.h @@ -12,7 +12,7 @@ class elan_eu3a05vid_device : public elan_eu3a05commonvid_device, public device_memory_interface { public: - elan_eu3a05vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a05vid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(std::forward(tag)); } template void set_addrbank(T &&tag) { m_bank.set_tag(std::forward(tag)); } diff --git a/src/mame/tvgames/elan_eu3a14.cpp b/src/mame/tvgames/elan_eu3a14.cpp index d0c1b105bc3..acc81cc2dfc 100644 --- a/src/mame/tvgames/elan_eu3a14.cpp +++ b/src/mame/tvgames/elan_eu3a14.cpp @@ -748,7 +748,7 @@ void elan_eu3a14_state::radica_eu3a14(machine_config &config) ADDRESS_MAP_BANK(config, "bank").set_map(&elan_eu3a14_state::bank_map).set_options(ENDIANNESS_LITTLE, 8, 24, 0x8000); - ELAN_EU3A14_SYS(config, m_sys, 0); + ELAN_EU3A14_SYS(config, m_sys); m_sys->set_cpu("maincpu"); m_sys->set_addrbank("bank"); @@ -765,7 +765,7 @@ void elan_eu3a14_state::radica_eu3a14(machine_config &config) PALETTE(config, m_palette).set_entries(512); - ELAN_EU3A14_VID(config, m_vid, 0); + ELAN_EU3A14_VID(config, m_vid); m_vid->set_cpu("maincpu"); m_vid->set_addrbank("bank"); m_vid->set_palette("palette"); @@ -776,7 +776,7 @@ void elan_eu3a14_state::radica_eu3a14(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - ELAN_EU3A05_SOUND(config, m_sound, 8000); + ELAN_EU3A05_SOUND(config, m_sound, XTAL::u(8000)); m_sound->space_read_callback().set(FUNC(elan_eu3a14_state::read_full_space)); m_sound->add_route(ALL_OUTPUTS, "mono", 1.0); m_sound->sound_end_cb<0>().set(FUNC(elan_eu3a14_state::sound_end0)); diff --git a/src/mame/tvgames/elan_eu3a14sys.cpp b/src/mame/tvgames/elan_eu3a14sys.cpp index 201b94601cf..c8da51599e8 100644 --- a/src/mame/tvgames/elan_eu3a14sys.cpp +++ b/src/mame/tvgames/elan_eu3a14sys.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A14_SYS, elan_eu3a14sys_device, "elan_eu3a14sys", "Elan EU3A14 System") -elan_eu3a14sys_device::elan_eu3a14sys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +elan_eu3a14sys_device::elan_eu3a14sys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : elan_eu3a05commonsys_device(mconfig, ELAN_EU3A14_SYS, tag, owner, clock), device_memory_interface(mconfig, *this), m_space_config("regs", ENDIANNESS_NATIVE, 8, 5, 0, address_map_constructor(FUNC(elan_eu3a14sys_device::map), this)) diff --git a/src/mame/tvgames/elan_eu3a14sys.h b/src/mame/tvgames/elan_eu3a14sys.h index 3734597ee2b..b18b618d251 100644 --- a/src/mame/tvgames/elan_eu3a14sys.h +++ b/src/mame/tvgames/elan_eu3a14sys.h @@ -9,7 +9,7 @@ class elan_eu3a14sys_device : public elan_eu3a05commonsys_device, public device_memory_interface { public: - elan_eu3a14sys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a14sys_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t dma_trigger_r(); void dma_trigger_w(uint8_t data); diff --git a/src/mame/tvgames/elan_eu3a14vid.cpp b/src/mame/tvgames/elan_eu3a14vid.cpp index 9f31ef164fc..798ca1853dc 100644 --- a/src/mame/tvgames/elan_eu3a14vid.cpp +++ b/src/mame/tvgames/elan_eu3a14vid.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(ELAN_EU3A14_VID, elan_eu3a14vid_device, "elan_eu3a14vid", "Elan EU3A14 Video") -elan_eu3a14vid_device::elan_eu3a14vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +elan_eu3a14vid_device::elan_eu3a14vid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : elan_eu3a05commonvid_device(mconfig, ELAN_EU3A14_VID, tag, owner, clock), device_memory_interface(mconfig, *this), m_cpu(*this, finder_base::DUMMY_TAG), diff --git a/src/mame/tvgames/elan_eu3a14vid.h b/src/mame/tvgames/elan_eu3a14vid.h index 6726144d8df..d07a305aec4 100644 --- a/src/mame/tvgames/elan_eu3a14vid.h +++ b/src/mame/tvgames/elan_eu3a14vid.h @@ -12,7 +12,7 @@ class elan_eu3a14vid_device : public elan_eu3a05commonvid_device, public device_memory_interface { public: - elan_eu3a14vid_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + elan_eu3a14vid_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template void set_cpu(T &&tag) { m_cpu.set_tag(std::forward(tag)); } template void set_addrbank(T &&tag) { m_bank.set_tag(std::forward(tag)); } diff --git a/src/mame/tvgames/generalplus_gpl16250_m.cpp b/src/mame/tvgames/generalplus_gpl16250_m.cpp index c6ed0621d66..27522931dd6 100644 --- a/src/mame/tvgames/generalplus_gpl16250_m.cpp +++ b/src/mame/tvgames/generalplus_gpl16250_m.cpp @@ -7,7 +7,7 @@ // device type definition DEFINE_DEVICE_TYPE(FULL_MEMORY, full_memory_device, "full_memory", "SunPlus Full CS Memory Map") -full_memory_device::full_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +full_memory_device::full_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FULL_MEMORY, tag, owner, clock), device_memory_interface(mconfig, *this), m_program(nullptr) diff --git a/src/mame/tvgames/generalplus_gpl16250_m.h b/src/mame/tvgames/generalplus_gpl16250_m.h index e06f34a5f62..7fae2dd47de 100644 --- a/src/mame/tvgames/generalplus_gpl16250_m.h +++ b/src/mame/tvgames/generalplus_gpl16250_m.h @@ -12,7 +12,7 @@ class full_memory_device : { public: // construction/destruction - full_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + full_memory_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template full_memory_device& set_map(T &&... args) { set_addrmap(0, std::forward(args)...); return *this; } diff --git a/src/mame/tvgames/generalplus_gpl162xx_lcdtype.cpp b/src/mame/tvgames/generalplus_gpl162xx_lcdtype.cpp index 6a78ff04068..2c29fb56d7f 100644 --- a/src/mame/tvgames/generalplus_gpl162xx_lcdtype.cpp +++ b/src/mame/tvgames/generalplus_gpl162xx_lcdtype.cpp @@ -835,7 +835,7 @@ WRITE_LINE_MEMBER(gpl162xx_lcdtype_state::screen_vblank) void gpl162xx_lcdtype_state::gpl162xx_lcdtype(machine_config &config) { - UNSP_20(config, m_maincpu, 96000000); // unknown CPU, unsp20 based, 96Mhz is listed as the maximum for most unSP2.0 chips, and appears correct here + UNSP_20(config, m_maincpu, XTAL::u(96000000)); // unknown CPU, unsp20 based, 96Mhz is listed as the maximum for most unSP2.0 chips, and appears correct here m_maincpu->set_addrmap(AS_PROGRAM, &gpl162xx_lcdtype_state::map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -848,7 +848,7 @@ void gpl162xx_lcdtype_state::gpl162xx_lcdtype(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x8000); - BL_HANDHELDS_MENUCONTROL(config, m_menucontrol, 0); + BL_HANDHELDS_MENUCONTROL(config, m_menucontrol); m_menucontrol->set_is_unsp_type_hack(); } diff --git a/src/mame/tvgames/generalplus_gpl32612.cpp b/src/mame/tvgames/generalplus_gpl32612.cpp index 68254388e0c..114616d941c 100644 --- a/src/mame/tvgames/generalplus_gpl32612.cpp +++ b/src/mame/tvgames/generalplus_gpl32612.cpp @@ -172,7 +172,7 @@ void generalplus_gpl32612_game_state::bootstrap() void generalplus_gpl32612_game_state::gpl32612(machine_config &config) { - ARM9(config, m_maincpu, 240'000'000); // unknown core / frequency, but ARM based + ARM9(config, m_maincpu, XTAL::u(240'000'000)); // unknown core / frequency, but ARM based m_maincpu->set_addrmap(AS_PROGRAM, &generalplus_gpl32612_game_state::arm_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -212,7 +212,7 @@ void generalplus_zippity_game_state::zippity(machine_config &config) { // don't inherit from gpl32612 as in reality this is GPL32300A and could differ - ARM9(config, m_maincpu, 240'000'000); // unknown core / frequency, but ARM based + ARM9(config, m_maincpu, XTAL::u(240'000'000)); // unknown core / frequency, but ARM based m_maincpu->set_addrmap(AS_PROGRAM, &generalplus_zippity_game_state::arm_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/tvgames/generalplus_gpl_unknown.cpp b/src/mame/tvgames/generalplus_gpl_unknown.cpp index dacc222477f..11779d0beef 100644 --- a/src/mame/tvgames/generalplus_gpl_unknown.cpp +++ b/src/mame/tvgames/generalplus_gpl_unknown.cpp @@ -554,7 +554,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( generalplus_gpl_unknown_state::timer3 ) void generalplus_gpl_unknown_state::generalplus_gpl_unknown(machine_config &config) { - UNSP_20(config, m_maincpu, 96000000); // internal ROM uses unsp2.0 opcodes, unknown clock + UNSP_20(config, m_maincpu, XTAL::u(96000000)); // internal ROM uses unsp2.0 opcodes, unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &generalplus_gpl_unknown_state::map); m_maincpu->set_vectorbase(0x4010); // there is also a set of vectors for what looks to be a burn-in test at 4000, maybe external pin selects? @@ -568,7 +568,7 @@ void generalplus_gpl_unknown_state::generalplus_gpl_unknown(machine_config &conf m_screen->set_palette(m_palette); SPEAKER(config, "speaker").front_center(); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC TIMER(config, "timer").configure_periodic(FUNC(generalplus_gpl_unknown_state::timer), attotime::from_hz(200000)); // draw timer (pushes pixels to the display in the IRQ) TIMER(config, "timer2").configure_periodic(FUNC(generalplus_gpl_unknown_state::timer2), attotime::from_hz(1000)); // game speed? diff --git a/src/mame/tvgames/hyperscan_card.cpp b/src/mame/tvgames/hyperscan_card.cpp index ad9642fec3a..efa189ec2a7 100644 --- a/src/mame/tvgames/hyperscan_card.cpp +++ b/src/mame/tvgames/hyperscan_card.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(HYPERSCAN_CARD, hyperscan_card_device, "hyperscan_card", "Hyperscan RFID card") -hyperscan_card_device::hyperscan_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hyperscan_card_device::hyperscan_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HYPERSCAN_CARD, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/mame/tvgames/hyperscan_card.h b/src/mame/tvgames/hyperscan_card.h index 5518bf4ee7e..d38973e1a64 100644 --- a/src/mame/tvgames/hyperscan_card.h +++ b/src/mame/tvgames/hyperscan_card.h @@ -13,7 +13,7 @@ class hyperscan_card_device : public device_t, public device_memcard_image_interface { public: - hyperscan_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hyperscan_card_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); int read(); void write(int state); diff --git a/src/mame/tvgames/hyperscan_ctrl.cpp b/src/mame/tvgames/hyperscan_ctrl.cpp index c99972feab8..e353687d21e 100644 --- a/src/mame/tvgames/hyperscan_ctrl.cpp +++ b/src/mame/tvgames/hyperscan_ctrl.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(HYPERSCAN_CTRL, hyperscan_ctrl_device, "hyperscan_ctrl", "Hyperscan controller HLE") -hyperscan_ctrl_device::hyperscan_ctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hyperscan_ctrl_device::hyperscan_ctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HYPERSCAN_CTRL, tag, owner, clock) , m_inputs(*this, "IN.%u", 0U) { diff --git a/src/mame/tvgames/hyperscan_ctrl.h b/src/mame/tvgames/hyperscan_ctrl.h index f85ce86b88a..3800d85b1ae 100644 --- a/src/mame/tvgames/hyperscan_ctrl.h +++ b/src/mame/tvgames/hyperscan_ctrl.h @@ -10,7 +10,7 @@ class hyperscan_ctrl_device : public device_t { public: - hyperscan_ctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hyperscan_ctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t read(offs_t offset); diff --git a/src/mame/tvgames/magiceyes_pollux_vr3520f.cpp b/src/mame/tvgames/magiceyes_pollux_vr3520f.cpp index 505b95eba5c..2785a9bbe18 100644 --- a/src/mame/tvgames/magiceyes_pollux_vr3520f.cpp +++ b/src/mame/tvgames/magiceyes_pollux_vr3520f.cpp @@ -88,7 +88,7 @@ uint32_t magiceyes_vr3520f_game_state::screen_update(screen_device &screen, bitm void magiceyes_vr3520f_game_state::leapfrog_didj(machine_config &config) { - ARM9(config, m_maincpu, 533000000); // 533 MHz ARM926TEJ (clocked at @ 393 MHz for the Didj?) + ARM9(config, m_maincpu, XTAL::u(533000000)); // 533 MHz ARM926TEJ (clocked at @ 393 MHz for the Didj?) m_maincpu->set_addrmap(AS_PROGRAM, &magiceyes_vr3520f_game_state::didj_arm9_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/tvgames/monkey_king_3b.cpp b/src/mame/tvgames/monkey_king_3b.cpp index 158ed564f00..ee8d4e72886 100644 --- a/src/mame/tvgames/monkey_king_3b.cpp +++ b/src/mame/tvgames/monkey_king_3b.cpp @@ -151,7 +151,7 @@ void mk3b_soc_state::mk3b_soc(machine_config &config) { // type unknown (should actually have VFP?) // debug output suggests 240MHz clock - ARM920T(config, m_maincpu, 240000000); + ARM920T(config, m_maincpu, XTAL::u(240000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mk3b_soc_state::map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/tvgames/spg29x.cpp b/src/mame/tvgames/spg29x.cpp index 60c3e827549..35af44a920f 100644 --- a/src/mame/tvgames/spg29x.cpp +++ b/src/mame/tvgames/spg29x.cpp @@ -485,10 +485,10 @@ void spg29x_game_state::hyperscan(machine_config &config) CDROM(config, "cdrom").set_interface("cdrom"); - HYPERSCAN_CTRL(config, m_hyperscan_ctrl[0], 0); - HYPERSCAN_CTRL(config, m_hyperscan_ctrl[1], 0); + HYPERSCAN_CTRL(config, m_hyperscan_ctrl[0]); + HYPERSCAN_CTRL(config, m_hyperscan_ctrl[1]); - HYPERSCAN_CARD(config, m_hyperscan_card, 0); + HYPERSCAN_CARD(config, m_hyperscan_card); SOFTWARE_LIST(config, "cd_list").set_original("hyperscan"); SOFTWARE_LIST(config, "card_list").set_original("hyperscan_card"); diff --git a/src/mame/tvgames/spg2xx.cpp b/src/mame/tvgames/spg2xx.cpp index e942271496b..4edcce45527 100644 --- a/src/mame/tvgames/spg2xx.cpp +++ b/src/mame/tvgames/spg2xx.cpp @@ -1380,7 +1380,7 @@ void spg2xx_game_senspeed_state::senspeed(machine_config &config) 02B 1 A7J4565E */ - I2C_24C01(config, "i2cmem", 0); // saves 0x80 bytes, but loading fails? + I2C_24C01(config, "i2cmem"); // saves 0x80 bytes, but loading fails? } @@ -1491,7 +1491,7 @@ void spg2xx_game_tmntmutm_state::tmntmutm(machine_config &config) m_maincpu->guny_in().set(FUNC(spg2xx_game_tmntmutm_state::guny_r)); m_maincpu->gunx_in().set(FUNC(spg2xx_game_tmntmutm_state::gunx_r)); - I2C_24C08(config, "i2cmem", 0); + I2C_24C08(config, "i2cmem"); } uint16_t spg2xx_game_albkickb_state::portb_r(offs_t offset, uint16_t mem_mask) @@ -1595,7 +1595,7 @@ void spg2xx_game_swclone_state::swclone(machine_config &config) m_maincpu->guny_in().set(FUNC(spg2xx_game_swclone_state::base_guny_r)); m_maincpu->gunx_in().set(FUNC(spg2xx_game_swclone_state::base_gunx_r)); - I2C_24C08(config, "i2cmem", 0); + I2C_24C08(config, "i2cmem"); } @@ -1656,7 +1656,7 @@ void spg2xx_game_dreamlss_state::dreamlss(machine_config &config) m_maincpu->portb_out().set(FUNC(spg2xx_game_dreamlss_state::portb_w)); m_maincpu->portc_out().set(FUNC(spg2xx_game_dreamlss_state::portc_w)); - I2C_24C08(config, "i2cmem", 0); + I2C_24C08(config, "i2cmem"); } void spg2xx_game_gssytts_state::portc_w(offs_t offset, uint16_t data, uint16_t mem_mask) diff --git a/src/mame/tvgames/spg2xx_jakks.cpp b/src/mame/tvgames/spg2xx_jakks.cpp index bfcb7e8f1ed..fb1324e7ae1 100644 --- a/src/mame/tvgames/spg2xx_jakks.cpp +++ b/src/mame/tvgames/spg2xx_jakks.cpp @@ -131,7 +131,7 @@ void jakks_state::base_config(machine_config& config) m_maincpu->portc_in().set_ioport("P3"); m_maincpu->portc_out().set(FUNC(jakks_state::portc_w)); - I2C_24C04(config, m_i2cmem, 0); // ? + I2C_24C04(config, m_i2cmem); // ? } void jakks_state::spg2xx_jakks(machine_config &config) diff --git a/src/mame/tvgames/spg2xx_jakks_gkr.cpp b/src/mame/tvgames/spg2xx_jakks_gkr.cpp index 48fd59422d9..b782e0c990f 100644 --- a/src/mame/tvgames/spg2xx_jakks_gkr.cpp +++ b/src/mame/tvgames/spg2xx_jakks_gkr.cpp @@ -468,7 +468,7 @@ void jakks_gkr_state::jakks_gkr(machine_config &config) void jakks_gkr_state::jakks_gkr_i2c(machine_config &config) { jakks_gkr(config); - I2C_24C16(config, m_i2cmem, 0); // ? + I2C_24C16(config, m_i2cmem); // ? } diff --git a/src/mame/tvgames/spg2xx_jakks_tvtouch.cpp b/src/mame/tvgames/spg2xx_jakks_tvtouch.cpp index 98ac6a11ff1..3bf0d52d188 100644 --- a/src/mame/tvgames/spg2xx_jakks_tvtouch.cpp +++ b/src/mame/tvgames/spg2xx_jakks_tvtouch.cpp @@ -266,7 +266,7 @@ void jakks_tvtouch_state::tvtouch(machine_config &config) m_maincpu->portb_out().set(FUNC(jakks_tvtouch_state::portb_w)); m_maincpu->portc_out().set(FUNC(jakks_tvtouch_state::portc_w)); - I2C_24C04(config, m_i2cmem, 0); + I2C_24C04(config, m_i2cmem); } ROM_START( tvtchsw ) diff --git a/src/mame/tvgames/st2302u_bbl_rom.cpp b/src/mame/tvgames/st2302u_bbl_rom.cpp index 624ba18269c..15d7736dff6 100644 --- a/src/mame/tvgames/st2302u_bbl_rom.cpp +++ b/src/mame/tvgames/st2302u_bbl_rom.cpp @@ -315,7 +315,7 @@ INPUT_PORTS_END void st22xx_bbl338_state::st22xx_dphh8213(machine_config &config) { - ST2302U(config, m_maincpu, 24000000); + ST2302U(config, m_maincpu, XTAL::u(24000000)); m_maincpu->set_addrmap(AS_DATA, &st22xx_bbl338_state::st22xx_dphh8213_map); m_maincpu->in_pa_callback().set(FUNC(st22xx_bbl338_state::porta_r)); m_maincpu->out_pa_callback().set(FUNC(st22xx_bbl338_state::porta_w)); @@ -337,12 +337,12 @@ void st22xx_bbl338_state::st22xx_dphh8213(machine_config &config) m_screen->set_visarea(0, 160 - 1, 0, 128 - 1); m_screen->set_screen_update(FUNC(st22xx_bbl338_state::screen_update)); - BL_HANDHELDS_LCDC(config, m_lcdc, 0); + BL_HANDHELDS_LCDC(config, m_lcdc); } void st22xx_bbl338_state::st22xx_bbl338(machine_config &config) { - ST2302U(config, m_maincpu, 24000000); + ST2302U(config, m_maincpu, XTAL::u(24000000)); m_maincpu->set_addrmap(AS_DATA, &st22xx_bbl338_state::st22xx_bbl338_map); m_maincpu->in_pa_callback().set(FUNC(st22xx_bbl338_state::porta_r)); m_maincpu->out_pb_callback().set(FUNC(st22xx_bbl338_state::portb_w)); @@ -357,7 +357,7 @@ void st22xx_bbl338_state::st22xx_bbl338(machine_config &config) m_screen->set_screen_update(FUNC(st22xx_bbl338_state::screen_update)); // incorrect for bbl338 (or will need changes to support higher resolutions) - BL_HANDHELDS_LCDC(config, m_lcdc, 0); + BL_HANDHELDS_LCDC(config, m_lcdc); } diff --git a/src/mame/tvgames/st2302u_bbl_spi.cpp b/src/mame/tvgames/st2302u_bbl_spi.cpp index aa29a00c68b..f47ec977154 100644 --- a/src/mame/tvgames/st2302u_bbl_spi.cpp +++ b/src/mame/tvgames/st2302u_bbl_spi.cpp @@ -264,7 +264,7 @@ INPUT_PORTS_END void bbl380_state::bbl380(machine_config &config) { - ST2302U(config, m_maincpu, 32000000); // unknown clock; type not confirmed + ST2302U(config, m_maincpu, XTAL::u(32000000)); // unknown clock; type not confirmed m_maincpu->set_addrmap(AS_DATA, &bbl380_state::bbl380_map); m_maincpu->in_pa_callback().set_ioport("IN0"); m_maincpu->in_pb_callback().set_ioport("IN1"); @@ -291,8 +291,8 @@ void bbl380_state::bbl380(machine_config &config) m_screen->set_visarea(0, 160 - 1, 0, 128 - 1); m_screen->set_screen_update(FUNC(bbl380_state::screen_update)); - BL_HANDHELDS_MENUCONTROL(config, m_menucontrol, 0); - BL_HANDHELDS_LCDC(config, m_lcdc, 0); + BL_HANDHELDS_MENUCONTROL(config, m_menucontrol); + BL_HANDHELDS_LCDC(config, m_lcdc); // LCD controller seems to be either Sitronix ST7735R or (if RDDID bytes match) Ilitek ILI9163C // (SoC's built-in LCDC is unused or nonexistent?) diff --git a/src/mame/tvgames/titan_soc.cpp b/src/mame/tvgames/titan_soc.cpp index 6403e66dece..8efaef87146 100644 --- a/src/mame/tvgames/titan_soc.cpp +++ b/src/mame/tvgames/titan_soc.cpp @@ -125,7 +125,7 @@ void titan_soc_state::machine_reset() void titan_soc_state::titan_soc(machine_config &config) { /* basic machine hardware */ - ARM920T(config, m_maincpu, 200000000); // type + clock unknown + ARM920T(config, m_maincpu, XTAL::u(200000000)); // type + clock unknown m_maincpu->set_addrmap(AS_PROGRAM, &titan_soc_state::map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff --git a/src/mame/tvgames/trkfldch.cpp b/src/mame/tvgames/trkfldch.cpp index b83743a9eb2..c382869d5a0 100644 --- a/src/mame/tvgames/trkfldch.cpp +++ b/src/mame/tvgames/trkfldch.cpp @@ -1426,7 +1426,7 @@ void trkfldch_state::machine_reset() void trkfldch_state::trkfldch(machine_config &config) { /* basic machine hardware */ - G65816(config, m_maincpu, 20000000); + G65816(config, m_maincpu, XTAL::u(20000000)); //m_maincpu->set_addrmap(AS_DATA, &trkfldch_state::mem_map); m_maincpu->set_addrmap(AS_PROGRAM, &trkfldch_state::trkfldch_map); m_maincpu->set_addrmap(g65816_device::AS_VECTORS, &trkfldch_state::vectors_map); diff --git a/src/mame/tvgames/xavix.cpp b/src/mame/tvgames/xavix.cpp index 3281f61d515..2ba6d52f7fb 100644 --- a/src/mame/tvgames/xavix.cpp +++ b/src/mame/tvgames/xavix.cpp @@ -1309,7 +1309,7 @@ void xavix_state::xavix(machine_config &config) ADDRESS_MAP_BANK(config, "lowbus").set_map(&xavix_state::xavix_lowbus_map).set_options(ENDIANNESS_LITTLE, 8, 24, 0x8000); - XAVIX_ADC(config, m_adc, 0); + XAVIX_ADC(config, m_adc); m_adc->read_0_callback().set(FUNC(xavix_state::adc0_r)); m_adc->read_1_callback().set(FUNC(xavix_state::adc1_r)); m_adc->read_2_callback().set(FUNC(xavix_state::adc2_r)); @@ -1319,13 +1319,13 @@ void xavix_state::xavix(machine_config &config) m_adc->read_6_callback().set(FUNC(xavix_state::adc6_r)); m_adc->read_7_callback().set(FUNC(xavix_state::adc7_r)); - XAVIX_ANPORT(config, m_anport, 0); + XAVIX_ANPORT(config, m_anport); m_anport->read_0_callback().set(FUNC(xavix_state::anport0_r)); m_anport->read_1_callback().set(FUNC(xavix_state::anport1_r)); m_anport->read_2_callback().set(FUNC(xavix_state::anport2_r)); m_anport->read_3_callback().set(FUNC(xavix_state::anport3_r)); - XAVIX_MATH(config, m_math, 0); + XAVIX_MATH(config, m_math); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -1366,14 +1366,14 @@ void xavix_i2c_state::xavix_i2c_24c02(machine_config &config) { xavix(config); - I2C_24C02(config, "i2cmem", 0); + I2C_24C02(config, "i2cmem"); } void xavix_i2c_state::xavix_i2c_24lc04(machine_config &config) { xavix(config); - I2C_24C04(config, "i2cmem", 0); // 24LC04 on Nostalgia games, 24C04 on others + I2C_24C04(config, "i2cmem"); // 24LC04 on Nostalgia games, 24C04 on others } void xavix_i2c_ltv_tam_state::xavix_i2c_24lc04_tam(machine_config &config) @@ -1390,7 +1390,7 @@ void xavix_i2c_state::xavix_i2c_24c08(machine_config &config) { xavix(config); - I2C_24C08(config, "i2cmem", 0); + I2C_24C08(config, "i2cmem"); } void xavix_state::xavixp(machine_config &config) @@ -1419,7 +1419,7 @@ void xavix_mtrk_state::xavix_mtrk(machine_config &config) { xavix(config); - XAVIX_MTRK_WHEEL(config, m_wheel, 0); + XAVIX_MTRK_WHEEL(config, m_wheel); m_wheel->event_out_cb().set(FUNC(xavix_state::ioevent_trg08)); } @@ -1434,7 +1434,7 @@ void xavix_madfb_state::xavix_madfb(machine_config &config) { xavix(config); - XAVIX_MADFB_BALL(config, m_ball, 0); + XAVIX_MADFB_BALL(config, m_ball); m_ball->event_out_cb().set(FUNC(xavix_state::ioevent_trg01)); } @@ -1450,7 +1450,7 @@ void xavix_i2c_cart_state::xavix_i2c_taiko(machine_config &config) { xavix_cart(config); - I2C_24C02(config, "i2cmem", 0); // 24LC02 + I2C_24C02(config, "i2cmem"); // 24LC02 SOFTWARE_LIST(config, "cart_list_japan_d").set_original("ekara_japan_d"); SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp"); @@ -1462,7 +1462,7 @@ void xavix_i2c_cart_state::xavix_i2c_jpopira(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - I2C_24C02(config, "i2cmem", 0); // 24LC02 + I2C_24C02(config, "i2cmem"); // 24LC02 SOFTWARE_LIST(config, "cart_list_jpopira_jp").set_original("jpopira_jp"); // NOTE, these are for Jumping Popira only, they don't work with the karaoke or regular popira units SOFTWARE_LIST(config, "cart_list_japan_sp").set_original("ekara_japan_sp"); diff --git a/src/mame/tvgames/xavix.h b/src/mame/tvgames/xavix.h index 0c124d8f221..7f2cdf677a5 100644 --- a/src/mame/tvgames/xavix.h +++ b/src/mame/tvgames/xavix.h @@ -33,7 +33,7 @@ class xavix_sound_device : public device_t, public device_sound_interface { public: - xavix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_regs_callback() { return m_readregs_cb.bind(); } auto read_samples_callback() { return m_readsamples_cb.bind(); } diff --git a/src/mame/tvgames/xavix2.cpp b/src/mame/tvgames/xavix2.cpp index 56f30c5447e..f9b114934c7 100644 --- a/src/mame/tvgames/xavix2.cpp +++ b/src/mame/tvgames/xavix2.cpp @@ -705,7 +705,7 @@ INPUT_PORTS_END void xavix2_state::config(machine_config &config) { // unknown CPU 'SSD 2002-2004 NEC 800208-51' - XAVIX2(config, m_maincpu, 98'000'000); + XAVIX2(config, m_maincpu, XTAL::u(98'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &xavix2_state::mem); m_maincpu->set_vblank_int("screen", FUNC(xavix2_state::vblank_irq)); diff --git a/src/mame/tvgames/xavix2002_io.cpp b/src/mame/tvgames/xavix2002_io.cpp index c193aabb02c..893ca7a6ad3 100644 --- a/src/mame/tvgames/xavix2002_io.cpp +++ b/src/mame/tvgames/xavix2002_io.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(XAVIX2002IO, xavix2002_io_device, "xavix2002io", "XaviX 2002 IO") -xavix2002_io_device::xavix2002_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix2002_io_device::xavix2002_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIX2002IO, tag, owner, clock) , m_in0_cb(*this) , m_in1_cb(*this) diff --git a/src/mame/tvgames/xavix2002_io.h b/src/mame/tvgames/xavix2002_io.h index 97af1cee883..2cc518b2209 100644 --- a/src/mame/tvgames/xavix2002_io.h +++ b/src/mame/tvgames/xavix2002_io.h @@ -8,7 +8,7 @@ class xavix2002_io_device : public device_t { public: - xavix2002_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix2002_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_in0_cb.bind(); } auto read_1_callback() { return m_in1_cb.bind(); } diff --git a/src/mame/tvgames/xavix_2000.cpp b/src/mame/tvgames/xavix_2000.cpp index 76f9ae14dbb..340563bbe4b 100644 --- a/src/mame/tvgames/xavix_2000.cpp +++ b/src/mame/tvgames/xavix_2000.cpp @@ -219,21 +219,21 @@ void xavix_i2c_state::xavix2000_i2c_24c08(machine_config &config) { xavix2000(config); - I2C_24C08(config, "i2cmem", 0); + I2C_24C08(config, "i2cmem"); } void xavix_i2c_state::xavix2000_i2c_24c04(machine_config &config) { xavix2000(config); - I2C_24C04(config, "i2cmem", 0); + I2C_24C04(config, "i2cmem"); } void xavix_i2c_state::xavix2000_i2c_24c02(machine_config &config) { xavix2000(config); - I2C_24C02(config, "i2cmem", 0); + I2C_24C02(config, "i2cmem"); } diff --git a/src/mame/tvgames/xavix_2002.cpp b/src/mame/tvgames/xavix_2002.cpp index 3a1475f444c..bbc167d46d3 100644 --- a/src/mame/tvgames/xavix_2002.cpp +++ b/src/mame/tvgames/xavix_2002.cpp @@ -332,7 +332,7 @@ void xavix_state::xavix2002(machine_config &config) m_palette->set_entries(512); - XAVIX2002IO(config, m_xavix2002io, 0); + XAVIX2002IO(config, m_xavix2002io); } @@ -363,21 +363,21 @@ void xavix_i2c_state::xavix2002_i2c_24c08(machine_config &config) { xavix2002(config); - I2C_24C08(config, "i2cmem", 0); + I2C_24C08(config, "i2cmem"); } void xavix_i2c_state::xavix2002_i2c_24c04(machine_config &config) { xavix2002(config); - I2C_24C04(config, "i2cmem", 0); + I2C_24C04(config, "i2cmem"); } void xavix_i2c_state::xavix2002_i2c_mrangbat(machine_config &config) { xavix2002(config); - I2C_24C02(config, "i2cmem", 0); // 24C02? + I2C_24C02(config, "i2cmem"); // 24C02? m_xavix2002io->read_0_callback().set_ioport("EX0"); m_xavix2002io->read_1_callback().set_ioport("EX1"); diff --git a/src/mame/tvgames/xavix_a.cpp b/src/mame/tvgames/xavix_a.cpp index febdba4f6eb..9cc3a1db771 100644 --- a/src/mame/tvgames/xavix_a.cpp +++ b/src/mame/tvgames/xavix_a.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(XAVIX_SOUND, xavix_sound_device, "xavix_sound", "XaviX Sound") -xavix_sound_device::xavix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix_sound_device::xavix_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIX_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_stream(nullptr) diff --git a/src/mame/tvgames/xavix_adc.cpp b/src/mame/tvgames/xavix_adc.cpp index e1271e39e47..da14a0a385b 100644 --- a/src/mame/tvgames/xavix_adc.cpp +++ b/src/mame/tvgames/xavix_adc.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(XAVIX_ADC, xavix_adc_device, "xavix_adc", "XaviX ADC") -xavix_adc_device::xavix_adc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix_adc_device::xavix_adc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIX_ADC, tag, owner, clock) , m_in0_cb(*this) , m_in1_cb(*this) diff --git a/src/mame/tvgames/xavix_adc.h b/src/mame/tvgames/xavix_adc.h index 53aac3ea934..afb8a3e1f0d 100644 --- a/src/mame/tvgames/xavix_adc.h +++ b/src/mame/tvgames/xavix_adc.h @@ -7,7 +7,7 @@ class xavix_adc_device : public device_t { public: - xavix_adc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_adc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_in0_cb.bind(); } auto read_1_callback() { return m_in1_cb.bind(); } diff --git a/src/mame/tvgames/xavix_anport.cpp b/src/mame/tvgames/xavix_anport.cpp index 7f5356d570a..aac4a8ceb63 100644 --- a/src/mame/tvgames/xavix_anport.cpp +++ b/src/mame/tvgames/xavix_anport.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(XAVIX_ANPORT, xavix_anport_device, "xavix_anport", "XaviX Analog ports") -xavix_anport_device::xavix_anport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix_anport_device::xavix_anport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIX_ANPORT, tag, owner, clock) , m_in0_cb(*this) , m_in1_cb(*this) diff --git a/src/mame/tvgames/xavix_anport.h b/src/mame/tvgames/xavix_anport.h index ae4972ea081..a00d6ca6d25 100644 --- a/src/mame/tvgames/xavix_anport.h +++ b/src/mame/tvgames/xavix_anport.h @@ -7,7 +7,7 @@ class xavix_anport_device : public device_t { public: - xavix_anport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_anport_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_in0_cb.bind(); } auto read_1_callback() { return m_in1_cb.bind(); } diff --git a/src/mame/tvgames/xavix_io.cpp b/src/mame/tvgames/xavix_io.cpp index ec44213ccff..f30dab47805 100644 --- a/src/mame/tvgames/xavix_io.cpp +++ b/src/mame/tvgames/xavix_io.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(XAVIXIO, xavix_io_device, "xavixio", "XaviX IO") -xavix_io_device::xavix_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix_io_device::xavix_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIXIO, tag, owner, clock) , m_in0_cb(*this) , m_in1_cb(*this) diff --git a/src/mame/tvgames/xavix_io.h b/src/mame/tvgames/xavix_io.h index fe9b46fdd8e..70b919949f7 100644 --- a/src/mame/tvgames/xavix_io.h +++ b/src/mame/tvgames/xavix_io.h @@ -7,7 +7,7 @@ class xavix_io_device : public device_t { public: - xavix_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_0_callback() { return m_in0_cb.bind(); } auto read_1_callback() { return m_in1_cb.bind(); } diff --git a/src/mame/tvgames/xavix_madfb_ball.cpp b/src/mame/tvgames/xavix_madfb_ball.cpp index a127ebdeeed..ff2671bbc4d 100644 --- a/src/mame/tvgames/xavix_madfb_ball.cpp +++ b/src/mame/tvgames/xavix_madfb_ball.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(XAVIX_MADFB_BALL, xavix_madfb_ball_device, "xavix_madfb_ball", "XaviX / Radica Football Ball") -xavix_madfb_ball_device::xavix_madfb_ball_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix_madfb_ball_device::xavix_madfb_ball_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIX_MADFB_BALL, tag, owner, clock), m_event_out_cb(*this), m_in(*this, "BALL") diff --git a/src/mame/tvgames/xavix_madfb_ball.h b/src/mame/tvgames/xavix_madfb_ball.h index 6ee5d266fb0..bb9e472de70 100644 --- a/src/mame/tvgames/xavix_madfb_ball.h +++ b/src/mame/tvgames/xavix_madfb_ball.h @@ -15,7 +15,7 @@ class xavix_madfb_ball_device : public device_t { public: // construction/destruction - xavix_madfb_ball_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_madfb_ball_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto event_out_cb() { return m_event_out_cb.bind(); } diff --git a/src/mame/tvgames/xavix_math.cpp b/src/mame/tvgames/xavix_math.cpp index b41883a98c1..9887bd6c595 100644 --- a/src/mame/tvgames/xavix_math.cpp +++ b/src/mame/tvgames/xavix_math.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(XAVIX_MATH, xavix_math_device, "xavix_math", "XaviX Math Unit") -xavix_math_device::xavix_math_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix_math_device::xavix_math_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIX_MATH, tag, owner, clock) { } diff --git a/src/mame/tvgames/xavix_math.h b/src/mame/tvgames/xavix_math.h index 0ca20d8e156..d9c4035f440 100644 --- a/src/mame/tvgames/xavix_math.h +++ b/src/mame/tvgames/xavix_math.h @@ -7,7 +7,7 @@ class xavix_math_device : public device_t { public: - xavix_math_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_math_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t mult_r(offs_t offset); void mult_w(offs_t offset, uint8_t data); diff --git a/src/mame/tvgames/xavix_mtrk_wheel.cpp b/src/mame/tvgames/xavix_mtrk_wheel.cpp index 207b32563c1..26dfd0e1f0b 100644 --- a/src/mame/tvgames/xavix_mtrk_wheel.cpp +++ b/src/mame/tvgames/xavix_mtrk_wheel.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(XAVIX_MTRK_WHEEL, xavix_mtrk_wheel_device, "xavix_mtrk_wheel", "XaviX / Radica Monster Truck Steering Wheel") -xavix_mtrk_wheel_device::xavix_mtrk_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xavix_mtrk_wheel_device::xavix_mtrk_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XAVIX_MTRK_WHEEL, tag, owner, clock), m_event_out_cb(*this), m_in(*this, "WHEEL") diff --git a/src/mame/tvgames/xavix_mtrk_wheel.h b/src/mame/tvgames/xavix_mtrk_wheel.h index 593fdf4808d..6d6ac5f4b68 100644 --- a/src/mame/tvgames/xavix_mtrk_wheel.h +++ b/src/mame/tvgames/xavix_mtrk_wheel.h @@ -15,7 +15,7 @@ class xavix_mtrk_wheel_device : public device_t { public: // construction/destruction - xavix_mtrk_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_mtrk_wheel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto event_out_cb() { return m_event_out_cb.bind(); } diff --git a/src/mame/ultimachine/rambo.cpp b/src/mame/ultimachine/rambo.cpp index 1667cb535e6..bf18886d332 100644 --- a/src/mame/ultimachine/rambo.cpp +++ b/src/mame/ultimachine/rambo.cpp @@ -20,7 +20,7 @@ #include "emu.h" #include "cpu/avr8/avr8.h" -#define MASTER_CLOCK 16000000 +#define MASTER_CLOCK XTAL::u(16000000) /****************************************************\ * I/O devices * diff --git a/src/mame/unico/unianapc.cpp b/src/mame/unico/unianapc.cpp index 9acef774a55..f5f18ea64f3 100644 --- a/src/mame/unico/unianapc.cpp +++ b/src/mame/unico/unianapc.cpp @@ -75,7 +75,7 @@ void unianapc_state::machine_reset() void unianapc_state::unianapc(machine_config &config) { /* basic machine hardware */ - PENTIUM3(config, m_maincpu, 100000000); // actually a Celeron at 1.70 GHz + PENTIUM3(config, m_maincpu, XTAL::u(100000000)); // actually a Celeron at 1.70 GHz m_maincpu->set_addrmap(AS_PROGRAM, &unianapc_state::unianapc_map); /* video hardware */ diff --git a/src/mame/unisonic/gic.cpp b/src/mame/unisonic/gic.cpp index 287c55cb9e2..c2cbcf4e418 100644 --- a/src/mame/unisonic/gic.cpp +++ b/src/mame/unisonic/gic.cpp @@ -81,13 +81,13 @@ ROM_END // gic_device - constructor //------------------------------------------------- -gic_device::gic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gic_device::gic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gic_device(mconfig, GIC, tag, owner, clock) { } -gic_device::gic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gic_device::gic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_video_interface(mconfig, *this) diff --git a/src/mame/unisonic/gic.h b/src/mame/unisonic/gic.h index 5e939b0a2b0..0b0abf8c32d 100644 --- a/src/mame/unisonic/gic.h +++ b/src/mame/unisonic/gic.h @@ -44,7 +44,7 @@ class gic_device : public device_t { public: // construction/destruction - gic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto ram_callback() { return m_ram.bind(); } @@ -63,7 +63,7 @@ public: static constexpr int LINES = 262; protected: - gic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gic_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; diff --git a/src/mame/unisys/univac.cpp b/src/mame/unisys/univac.cpp index 317450d130a..3406ded9ffa 100644 --- a/src/mame/unisys/univac.cpp +++ b/src/mame/unisys/univac.cpp @@ -593,7 +593,7 @@ void univac_state::uts20(machine_config &config) PALETTE(config, m_palette, palette_device::MONOCHROME); GFXDECODE(config, "gfxdecode", m_palette, gfx_uts); - dp835x_device &crtc(DP835X_A(config, "crtc", 19'980'000)); + dp835x_device &crtc(DP835X_A(config, "crtc", XTAL::u(19'980'000))); crtc.set_screen("screen"); crtc.vblank_callback().set(m_ctc, FUNC(z80ctc_device::trg0)); crtc.vblank_callback().append(m_ctc, FUNC(z80ctc_device::trg3)); diff --git a/src/mame/universal/cheekyms.cpp b/src/mame/universal/cheekyms.cpp index c14a87a960b..568bb384e2a 100644 --- a/src/mame/universal/cheekyms.cpp +++ b/src/mame/universal/cheekyms.cpp @@ -139,7 +139,7 @@ void cheekyms_state::cheekyms(machine_config &config) PALETTE(config, m_palette, FUNC(cheekyms_state::cheekyms_palette), 0xc0); /* audio hardware */ - CHEEKY_MOUSE_AUDIO(config, m_sound_board, 0); + CHEEKY_MOUSE_AUDIO(config, m_sound_board); } diff --git a/src/mame/universal/cheekyms_a.cpp b/src/mame/universal/cheekyms_a.cpp index f5268f62b10..77ce74e1bbd 100644 --- a/src/mame/universal/cheekyms_a.cpp +++ b/src/mame/universal/cheekyms_a.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(CHEEKY_MOUSE_AUDIO, cheekyms_audio_device, "cheekyms_audio", "Cheeky Mouse Sound Board") -cheekyms_audio_device::cheekyms_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cheekyms_audio_device::cheekyms_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CHEEKY_MOUSE_AUDIO, tag, owner, clock) , m_mute(*this, "sound_nl:mute") , m_cheese(*this, "sound_nl:cheese") @@ -41,7 +41,7 @@ void cheekyms_audio_device::device_add_mconfig(machine_config &config) { SPEAKER(config, "mono").front_center(); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(NETLIST_NAME(cheekyms)) .add_route(ALL_OUTPUTS, "mono", 1.0); diff --git a/src/mame/universal/cheekyms_a.h b/src/mame/universal/cheekyms_a.h index 65b25753e5f..9bc7e73ff34 100644 --- a/src/mame/universal/cheekyms_a.h +++ b/src/mame/universal/cheekyms_a.h @@ -11,7 +11,7 @@ class cheekyms_audio_device : public device_t { public: - cheekyms_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cheekyms_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(mute_w); // 15 DECLARE_WRITE_LINE_MEMBER(cheese_w); // 13 diff --git a/src/mame/universal/cosmic.cpp b/src/mame/universal/cosmic.cpp index be00eb9bbd0..136af0f2774 100644 --- a/src/mame/universal/cosmic.cpp +++ b/src/mame/universal/cosmic.cpp @@ -849,7 +849,7 @@ void cosmic_state::panic(machine_config &config) m_samples->set_samples_names(panic_sample_names); m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); } void cosmic_state::cosmica(machine_config &config) @@ -891,7 +891,7 @@ void cosmic_state::magspot(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); } void cosmic_state::devzone(machine_config &config) @@ -918,7 +918,7 @@ void cosmic_state::nomnlnd(machine_config &config) /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); } diff --git a/src/mame/universal/cosmicg.cpp b/src/mame/universal/cosmicg.cpp index e53e873ee77..79ca2f7b8d8 100644 --- a/src/mame/universal/cosmicg.cpp +++ b/src/mame/universal/cosmicg.cpp @@ -373,7 +373,7 @@ void cosmicg_state::cosmicg(machine_config &config) m_samples->set_samples_names(cosmicg_sample_names); m_samples->add_route(ALL_OUTPUTS, "speaker", 0.25); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // NE556 + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5); // NE556 // Other DACs include 3-bit binary-weighted (100K/50K/25K) DAC combined with another NE556 for attack march } diff --git a/src/mame/universal/ladybug.cpp b/src/mame/universal/ladybug.cpp index 4fbbd53c71f..0f1ccdca8ae 100644 --- a/src/mame/universal/ladybug.cpp +++ b/src/mame/universal/ladybug.cpp @@ -690,7 +690,7 @@ void ladybug_state::ladybug(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_ladybug); PALETTE(config, "palette", FUNC(ladybug_state::ladybug_palette), 4*8 + 4*16, 32); - LADYBUG_VIDEO(config, m_video, 4000000).set_gfxdecode_tag("gfxdecode"); + LADYBUG_VIDEO(config, m_video, XTAL::u(4000000)).set_gfxdecode_tag("gfxdecode"); ls259_device &videolatch(LS259(config, "videolatch")); // L5 on video board or H3 on single board videolatch.q_out_cb<0>().set(FUNC(ladybug_state::flip_screen_set)); // no other outputs used diff --git a/src/mame/universal/ladybug_video.h b/src/mame/universal/ladybug_video.h index add6b8f3bd9..3d9fb931e72 100644 --- a/src/mame/universal/ladybug_video.h +++ b/src/mame/universal/ladybug_video.h @@ -13,7 +13,7 @@ class ladybug_video_device : public device_t { public: - ladybug_video_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ladybug_video_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } diff --git a/src/mame/universal/superdq.cpp b/src/mame/universal/superdq.cpp index 202e81bdf23..c9a3d9ec37e 100644 --- a/src/mame/universal/superdq.cpp +++ b/src/mame/universal/superdq.cpp @@ -29,7 +29,7 @@ #include "tilemap.h" -#define MASTER_CLOCK 20000000 +#define MASTER_CLOCK XTAL::u(20000000) class superdq_state : public driver_device @@ -344,7 +344,7 @@ void superdq_state::superdq(machine_config &config) m_maincpu->set_addrmap(AS_IO, &superdq_state::superdq_io); m_maincpu->set_vblank_int("screen", FUNC(superdq_state::superdq_vblank)); - PIONEER_LDV1000(config, m_laserdisc, 0); + PIONEER_LDV1000(config, m_laserdisc); m_laserdisc->set_overlay(256, 256, FUNC(superdq_state::screen_update_superdq)); m_laserdisc->add_route(0, "lspeaker", 1.0); m_laserdisc->add_route(1, "rspeaker", 1.0); diff --git a/src/mame/upl/mouser.cpp b/src/mame/upl/mouser.cpp index 3d57b12bd12..540824d617a 100644 --- a/src/mame/upl/mouser.cpp +++ b/src/mame/upl/mouser.cpp @@ -399,11 +399,11 @@ void mouser_state::machine_start() void mouser_state::mouser(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 4'000'000); // 4 MHz ? + Z80(config, m_maincpu, XTAL::u(4'000'000)); // 4 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &mouser_state::main_map); m_maincpu->set_addrmap(AS_OPCODES, &mouser_state::decrypted_opcodes_map); - Z80(config, m_audiocpu, 4'000'000); // ??? + Z80(config, m_audiocpu, XTAL::u(4'000'000)); // ??? m_audiocpu->set_addrmap(AS_PROGRAM, &mouser_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &mouser_state::sound_io_map); m_audiocpu->set_periodic_int(FUNC(mouser_state::sound_nmi_assert), attotime::from_hz(4 * 60)); // ??? This controls the sound tempo diff --git a/src/mame/usp/patinho_feio.cpp b/src/mame/usp/patinho_feio.cpp index aebd744ad92..16bb0a34228 100644 --- a/src/mame/usp/patinho_feio.cpp +++ b/src/mame/usp/patinho_feio.cpp @@ -245,7 +245,7 @@ void patinho_feio_state::patinho_feio(machine_config &config) { /* basic machine hardware */ /* CPU @ approx. 500 kHz (memory cycle time is 2usec) */ - PATO_FEIO_CPU(config, m_maincpu, 500000); + PATO_FEIO_CPU(config, m_maincpu, XTAL::u(500000)); m_maincpu->rc_read().set_ioport("RC"); m_maincpu->buttons_read().set_ioport("BUTTONS"); m_maincpu->set_update_panel_cb(FUNC(patinho_feio_state::update_panel)); @@ -275,11 +275,11 @@ void patinho_feio_state::patinho_feio(machine_config &config) // m_maincpu->iodev_read<14>().set(FUNC(patinho_feio_state::papertapereader_data_r)); /* DECWRITER */ - TELEPRINTER(config, m_decwriter, 0); + TELEPRINTER(config, m_decwriter); m_decwriter->set_keyboard_callback(FUNC(patinho_feio_state::decwriter_kbd_input)); /* Teletype */ - TELEPRINTER(config, m_tty, 1); + TELEPRINTER(config, m_tty, XTAL::u(1)); m_tty->set_keyboard_callback(FUNC(patinho_feio_state::teletype_kbd_input)); /* punched tape */ diff --git a/src/mame/ussr/apogee.cpp b/src/mame/ussr/apogee.cpp index 9bc7021a817..c622237287d 100644 --- a/src/mame/ussr/apogee.cpp +++ b/src/mame/ussr/apogee.cpp @@ -250,7 +250,7 @@ void apogee_state::apogee(machine_config &config) I8080(config, m_maincpu, XTAL(16'000'000) / 9); m_maincpu->set_addrmap(AS_PROGRAM, &apogee_state::mem_map); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(XTAL(16'000'000)/9); pit.out_handler<0>().set(FUNC(apogee_state::pit8253_out0_changed)); pit.set_clk<1>(XTAL(16'000'000)/9); diff --git a/src/mame/ussr/argo.cpp b/src/mame/ussr/argo.cpp index 027a2581379..36316f13c3e 100644 --- a/src/mame/ussr/argo.cpp +++ b/src/mame/ussr/argo.cpp @@ -468,7 +468,7 @@ void argo_state::machine_start() void argo_state::argo(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3500000); // unknown frequency + Z80(config, m_maincpu, XTAL::u(3500000)); // unknown frequency m_maincpu->set_addrmap(AS_PROGRAM, &argo_state::mem_map); m_maincpu->set_addrmap(AS_IO, &argo_state::io_map); @@ -491,12 +491,12 @@ void argo_state::argo(machine_config &config) TIMER(config, "kansas_r").configure_periodic(FUNC(argo_state::kansas_r), attotime::from_hz(38400)); /* Devices */ - I8251(config, m_uart, 0); + I8251(config, m_uart); m_uart->txd_handler().set([this] (bool state) { m_txd = state; }); m_uart->txempty_handler().set([this] (bool state) { m_txe = state; }); m_uart->rts_handler().set([this] (bool state) { m_rts = state; }); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(1689600); // this gives the 2400Hz required by the cassette m_pit->out_handler<0>().set(FUNC(argo_state::z0_w)); m_pit->set_clk<1>(0); diff --git a/src/mame/ussr/b2m.cpp b/src/mame/ussr/b2m.cpp index f67f60ed26f..79fae3db0dc 100644 --- a/src/mame/ussr/b2m.cpp +++ b/src/mame/ussr/b2m.cpp @@ -204,7 +204,7 @@ static void b2m_floppies(device_slot_interface &device) void b2m_state::b2m(machine_config &config) { /* basic machine hardware */ - i8080_cpu_device &maincpu(I8080(config, m_maincpu, 2000000)); + i8080_cpu_device &maincpu(I8080(config, m_maincpu, XTAL::u(2000000))); maincpu.set_addrmap(AS_PROGRAM, &b2m_state::b2m_mem); maincpu.set_addrmap(AS_IO, &b2m_state::b2m_io); maincpu.set_vblank_int("screen", FUNC(b2m_state::vblank_interrupt)); @@ -221,7 +221,7 @@ void b2m_state::b2m(machine_config &config) PALETTE(config, m_palette, FUNC(b2m_state::b2m_palette), 4); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(0); m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir1_w)); m_pit->set_clk<1>(2000000); @@ -243,7 +243,7 @@ void b2m_state::b2m(machine_config &config) ppi3.out_pb_callback().set(FUNC(b2m_state::romdisk_portb_w)); ppi3.out_pc_callback().set(FUNC(b2m_state::romdisk_portc_w)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); /* sound */ @@ -251,7 +251,7 @@ void b2m_state::b2m(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); /* uart */ - I8251(config, "uart", 0); + I8251(config, "uart"); FD1793(config, m_fdc, 8_MHz_XTAL / 8); m_fdc->drq_wr_callback().set(FUNC(b2m_state::fdc_drq)); diff --git a/src/mame/ussr/bk.cpp b/src/mame/ussr/bk.cpp index ba15ed99110..d9ed3242832 100644 --- a/src/mame/ussr/bk.cpp +++ b/src/mame/ussr/bk.cpp @@ -181,7 +181,7 @@ INPUT_PORTS_END void bk_state::bk0010(machine_config &config) { /* basic machine hardware */ - T11(config, m_maincpu, 3000000); // FIXME: actually K1801VM1 + T11(config, m_maincpu, XTAL::u(3000000)); // FIXME: actually K1801VM1 m_maincpu->set_initial_mode(0x36ff); /* initial mode word has DAL15,14,11,8 pulled low */ m_maincpu->set_addrmap(AS_PROGRAM, &bk_state::bk0010_mem); m_maincpu->in_iack().set(FUNC(bk_state::irq_callback)); diff --git a/src/mame/ussr/cm1800.cpp b/src/mame/ussr/cm1800.cpp index b8439a69cff..3c52502ce36 100644 --- a/src/mame/ussr/cm1800.cpp +++ b/src/mame/ussr/cm1800.cpp @@ -111,7 +111,7 @@ void cm1800_state::cm1800(machine_config &config) m_uart->write_so_callback().set("rs232", FUNC(rs232_port_device::write_txd)); m_uart->set_auto_rdav(true); - clock_device &uart_clock(CLOCK(config, "uart_clock", 153600)); + clock_device &uart_clock(CLOCK(config, "uart_clock", XTAL::u(153600))); uart_clock.signal_handler().set(m_uart, FUNC(ay31015_device::write_tcp)); uart_clock.signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp)); diff --git a/src/mame/ussr/dvk_kcgd.cpp b/src/mame/ussr/dvk_kcgd.cpp index 1cde1f449b2..74ad0bed855 100644 --- a/src/mame/ussr/dvk_kcgd.cpp +++ b/src/mame/ussr/dvk_kcgd.cpp @@ -429,7 +429,7 @@ void kcgd_state::kcgd(machine_config &config) // m_dl11kbd->txrdy_wr_callback().set_inputline(m_maincpu, T11_IRQ0); // m_dl11kbd->rxrdy_wr_callback().set_inputline(m_maincpu, T11_IRQ0); - MS7004(config, m_ms7004, 0); + MS7004(config, m_ms7004); m_ms7004->tx_handler().set(m_dl11kbd, FUNC(dl11_device::rx_w)); } diff --git a/src/mame/ussr/dvk_ksm.cpp b/src/mame/ussr/dvk_ksm.cpp index 51c5560551f..a91f8a24be1 100644 --- a/src/mame/ussr/dvk_ksm.cpp +++ b/src/mame/ussr/dvk_ksm.cpp @@ -423,7 +423,7 @@ void ksm_state::ksm(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_ksm); PALETTE(config, "palette", palette_device::MONOCHROME); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); // D30 @@ -434,7 +434,7 @@ void ksm_state::ksm(machine_config &config) ppi.out_pc_callback().set(FUNC(ksm_state::ksm_ppi_portc_w)); // D42 - serial connection to host - I8251(config, m_i8251line, 0); + I8251(config, m_i8251line); m_i8251line->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_i8251line->rxrdy_handler().set(m_pic8259, FUNC(pic8259_device::ir3_w)); @@ -444,16 +444,16 @@ void ksm_state::ksm(machine_config &config) m_rs232->dsr_handler().set(m_i8251line, FUNC(i8251_device::write_dsr)); // D41 - serial connection to MS7004 keyboard - I8251(config, m_i8251kbd, 0); + I8251(config, m_i8251kbd); m_i8251kbd->rxrdy_handler().set(m_pic8259, FUNC(pic8259_device::ir1_w)); m_i8251kbd->rts_handler().set(FUNC(ksm_state::write_brga)); m_i8251kbd->dtr_handler().set(FUNC(ksm_state::write_brgb)); - MS7004(config, m_ms7004, 0); + MS7004(config, m_ms7004); m_ms7004->tx_handler().set(m_i8251kbd, FUNC(i8251_device::write_rxd)); // baud rate is supposed to be 4800 but keyboard is slightly faster - clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", 4960 * 16)); + clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", XTAL::u(4960 * 16))); keyboard_clock.signal_handler().set(FUNC(ksm_state::write_keyboard_clock)); } diff --git a/src/mame/ussr/ie15.cpp b/src/mame/ussr/ie15.cpp index 6699a9c2805..dafbbc0fb9b 100644 --- a/src/mame/ussr/ie15.cpp +++ b/src/mame/ussr/ie15.cpp @@ -38,7 +38,7 @@ private: void ie15_state::ie15(machine_config &config) { - IE15(config, m_ie15, 0); + IE15(config, m_ie15); rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr)); //rs232.dcd_handler().set("ie15", FUNC(ie15_device::rs232_conn_dcd_w)); diff --git a/src/mame/ussr/intellect02.cpp b/src/mame/ussr/intellect02.cpp index c3aba407f55..f73553e51dc 100644 --- a/src/mame/ussr/intellect02.cpp +++ b/src/mame/ussr/intellect02.cpp @@ -213,7 +213,7 @@ INPUT_PORTS_END void intel02_state::intel02(machine_config &config) { // basic machine hardware - I8080A(config, m_maincpu, 1500000); // measured (no XTAL) + I8080A(config, m_maincpu, XTAL::u(1500000)); // measured (no XTAL) m_maincpu->set_addrmap(AS_PROGRAM, &intel02_state::main_map); m_maincpu->set_addrmap(AS_IO, &intel02_state::main_io); @@ -231,7 +231,7 @@ void intel02_state::intel02(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - BEEP(config, m_beeper, 3640); // measured, from RC circuit + BEEP(config, m_beeper, XTAL::u(3640)); // measured, from RC circuit m_beeper->add_route(ALL_OUTPUTS, "speaker", 0.25); // cartridge diff --git a/src/mame/ussr/irisha.cpp b/src/mame/ussr/irisha.cpp index fd8319d1aec..b4614bfa825 100644 --- a/src/mame/ussr/irisha.cpp +++ b/src/mame/ussr/irisha.cpp @@ -398,9 +398,9 @@ void irisha_state::irisha(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - I8251(config, "uart", 0); + I8251(config, "uart"); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(16_MHz_XTAL / 9); m_pit->out_handler<0>().set("pic", FUNC(pic8259_device::ir0_w)); m_pit->set_clk<1>(16_MHz_XTAL / 9 / 8 / 8); @@ -416,7 +416,7 @@ void irisha_state::irisha(machine_config &config) ppi.in_pc_callback().set(FUNC(irisha_state::portc_r)); ppi.out_pc_callback().set(FUNC(irisha_state::portc_w)); - pic8259_device &pic8259(PIC8259(config, "pic", 0)); + pic8259_device &pic8259(PIC8259(config, "pic")); pic8259.out_int_callback().set_inputline(m_maincpu, 0); } diff --git a/src/mame/ussr/istrebiteli.cpp b/src/mame/ussr/istrebiteli.cpp index 018d4675fab..36390d64c22 100644 --- a/src/mame/ussr/istrebiteli.cpp +++ b/src/mame/ussr/istrebiteli.cpp @@ -36,13 +36,13 @@ class istrebiteli_sound_device : public device_t, public device_sound_interface { public: - template istrebiteli_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &®ion_tag) + template istrebiteli_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &®ion_tag) : istrebiteli_sound_device(mconfig, tag, owner, clock) { m_rom.set_tag(std::forward(region_tag)); } - istrebiteli_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + istrebiteli_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void sound_w(uint8_t data); @@ -71,7 +71,7 @@ DECLARE_DEVICE_TYPE(ISTREBITELI_SOUND, istrebiteli_sound_device) DEFINE_DEVICE_TYPE(ISTREBITELI_SOUND, istrebiteli_sound_device, "istrebiteli_sound", "Istrebiteli Sound") -istrebiteli_sound_device::istrebiteli_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +istrebiteli_sound_device::istrebiteli_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ISTREBITELI_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), m_channel(nullptr), diff --git a/src/mame/ussr/km035.cpp b/src/mame/ussr/km035.cpp index c233717a9c6..e3e54974245 100644 --- a/src/mame/ussr/km035.cpp +++ b/src/mame/ussr/km035.cpp @@ -68,7 +68,7 @@ void km035_device::device_add_mconfig(machine_config &config) m_maincpu->t1_in_cb().set([this] () { return m_rx; }); SPEAKER(config, "mono").front_center(); - BEEP(config, m_speaker, 3250).add_route(ALL_OUTPUTS, "mono", 0.50); + BEEP(config, m_speaker, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 0.50); } const tiny_rom_entry *km035_device::device_rom_region() const @@ -259,7 +259,7 @@ ioport_constructor km035_device::device_input_ports() const // km035_device - constructor //------------------------------------------------- -km035_device::km035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +km035_device::km035_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KM035, tag, owner, clock) , m_maincpu(*this, KM035_CPU_TAG) , m_speaker(*this, KM035_SPK_TAG) diff --git a/src/mame/ussr/km035.h b/src/mame/ussr/km035.h index 4d342737c23..5e41e335e99 100644 --- a/src/mame/ussr/km035.h +++ b/src/mame/ussr/km035.h @@ -19,7 +19,7 @@ class km035_device : public device_t { public: // construction/destruction - km035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + km035_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto tx_handler() { return m_tx_handler.bind(); } auto rts_handler() { return m_rts_handler.bind(); } diff --git a/src/mame/ussr/lviv.cpp b/src/mame/ussr/lviv.cpp index 9a251d2a6af..fdc59841395 100644 --- a/src/mame/ussr/lviv.cpp +++ b/src/mame/ussr/lviv.cpp @@ -424,7 +424,7 @@ INPUT_PORTS_END void lviv_state::lviv(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2500000); + I8080(config, m_maincpu, XTAL::u(2500000)); m_maincpu->set_addrmap(AS_PROGRAM, &lviv_state::mem_map); m_maincpu->set_addrmap(AS_IO, &lviv_state::io_map); config.set_maximum_quantum(attotime::from_hz(60)); diff --git a/src/mame/ussr/mikro80.cpp b/src/mame/ussr/mikro80.cpp index 0863af75bf4..5a2d6e6c618 100644 --- a/src/mame/ussr/mikro80.cpp +++ b/src/mame/ussr/mikro80.cpp @@ -212,7 +212,7 @@ u32 mikro80_state::screen_update_mikro80(screen_device &screen, bitmap_ind16 &bi void mikro80_state::mikro80(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &mikro80_state::mikro80_mem); m_maincpu->set_addrmap(AS_IO, &mikro80_state::mikro80_io); @@ -251,7 +251,7 @@ void mikro80_state::radio99(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_IO, &mikro80_state::radio99_io); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.50); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.50); } void mikro80_state::kristall(machine_config &config) diff --git a/src/mame/ussr/mikrosha.cpp b/src/mame/ussr/mikrosha.cpp index 45bde38ca55..23bdf76bb23 100644 --- a/src/mame/ussr/mikrosha.cpp +++ b/src/mame/ussr/mikrosha.cpp @@ -235,7 +235,7 @@ void mikrosha_state::mikrosha(machine_config &config) i8275.set_display_callback(FUNC(mikrosha_state::display_pixels)); i8275.drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w)); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(0); pit.set_clk<1>(0); pit.set_clk<2>(2000000); diff --git a/src/mame/ussr/mk98.cpp b/src/mame/ussr/mk98.cpp index cf9dde16fcd..0117e6c839f 100644 --- a/src/mame/ussr/mk98.cpp +++ b/src/mame/ussr/mk98.cpp @@ -441,10 +441,10 @@ void mk98_state::mk98(machine_config &config) m_maincpu->set_addrmap(AS_IO, &mk98_state::mk98_io); m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(mk98pic_device::inta_cb)); - pit8254_device &pit8254(PIT8254(config, "pit8254", 0)); + pit8254_device &pit8254(PIT8254(config, "pit8254")); pit8254.set_clk<0>(16000000/2/8); // FIXME unknown clock - MK98PIC(config, m_pic8259, 0); + MK98PIC(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); pc_kbdc_device &pc_kbdc(PC_KBDC(config, "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)); diff --git a/src/mame/ussr/ms0515.cpp b/src/mame/ussr/ms0515.cpp index 31a56a7e621..6ff0e6f6ac6 100644 --- a/src/mame/ussr/ms0515.cpp +++ b/src/mame/ussr/ms0515.cpp @@ -558,7 +558,7 @@ void ms0515_state::ms0515(machine_config &config) PALETTE(config, "palette", FUNC(ms0515_state::ms0515_palette), 16); - KR1818VG93(config, m_fdc, 1000000); + KR1818VG93(config, m_fdc, XTAL::u(1000000)); FLOPPY_CONNECTOR(config, "vg93:0", ms0515_floppies, "525qd", ms0515_state::floppy_formats).enable_sound(true); FLOPPY_CONNECTOR(config, "vg93:1", ms0515_floppies, "525qd", ms0515_state::floppy_formats).enable_sound(true); @@ -568,7 +568,7 @@ void ms0515_state::ms0515(machine_config &config) ppi.out_pc_callback().set(FUNC(ms0515_state::ms0515_portc_w)); // serial connection to printer - I8251(config, m_i8251line, 0); + I8251(config, m_i8251line); m_i8251line->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_i8251line->rxrdy_handler().set(FUNC(ms0515_state::irq9_w)); m_i8251line->txrdy_handler().set(FUNC(ms0515_state::irq8_w)); @@ -578,23 +578,23 @@ void ms0515_state::ms0515(machine_config &config) m_rs232->cts_handler().set(m_i8251line, FUNC(i8251_device::write_cts)); m_rs232->dsr_handler().set(m_i8251line, FUNC(i8251_device::write_dsr)); -// clock_device &line_clock(CLOCK(config, "line_clock", 4800*16)); // 8251 is set to /16 on the clock input +// clock_device &line_clock(CLOCK(config, "line_clock", XTAL::u(4800*16))); // 8251 is set to /16 on the clock input // line_clock.signal_handler().set(FUNC(ms0515_state::write_line_clock)); // serial connection to MS7004 keyboard - I8251(config, m_i8251kbd, 0); + I8251(config, m_i8251kbd); m_i8251kbd->rxrdy_handler().set(FUNC(ms0515_state::irq5_w)); m_i8251kbd->txd_handler().set("ms7004", FUNC(ms7004_device::write_rxd)); - MS7004(config, m_ms7004, 0); + MS7004(config, m_ms7004); m_ms7004->tx_handler().set(m_i8251kbd, FUNC(i8251_device::write_rxd)); m_ms7004->rts_handler().set(m_i8251kbd, FUNC(i8251_device::write_cts)); // baud rate is supposed to be 4800 but keyboard is slightly faster - clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", 4960*16)); + clock_device &keyboard_clock(CLOCK(config, "keyboard_clock", XTAL::u(4960*16))); keyboard_clock.signal_handler().set(FUNC(ms0515_state::write_keyboard_clock)); - PIT8253(config, m_pit8253, 0); + PIT8253(config, m_pit8253); m_pit8253->set_clk<0>(XTAL(2'000'000)); // m_pit8253->out_handler<0>().set(FUNC(ms0515_state::write_keyboard_clock)); m_pit8253->set_clk<1>(XTAL(2'000'000)); diff --git a/src/mame/ussr/ms6102.cpp b/src/mame/ussr/ms6102.cpp index 246e0b84416..c78c8485c39 100644 --- a/src/mame/ussr/ms6102.cpp +++ b/src/mame/ussr/ms6102.cpp @@ -315,7 +315,7 @@ void ms6102_state::ms6102(machine_config &config) I8214(config, m_pic, XTAL(18'432'000) / 9); m_pic->int_wr_callback().set(FUNC(ms6102_state::irq_w)); - KR1601RR1(config, m_earom, 0); + KR1601RR1(config, m_earom); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -351,17 +351,17 @@ void ms6102_state::ms6102(machine_config &config) ie5.set_stages(2); ie5.count_out_cb().set(FUNC(ms6102_state::kbd_uart_clock_w)); - MS7002(config, m_keyboard, 0).signal_out_callback().set(m_kbd_uart, FUNC(ay31015_device::write_si)); + MS7002(config, m_keyboard).signal_out_callback().set(m_kbd_uart, FUNC(ay31015_device::write_si)); // serial connection to host - I8251(config, m_i8251, 0); + I8251(config, m_i8251); m_i8251->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); m_i8251->rxrdy_handler().set(FUNC(ms6102_state::irq<3>)); RS232_PORT(config, m_rs232, default_rs232_devices, "null_modem"); m_rs232->rxd_handler().set(m_i8251, FUNC(i8251_device::write_rxd)); - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); + pit8253_device &pit8253(PIT8253(config, "pit8253")); pit8253.set_clk<0>(XTAL(16'400'000) / 9); pit8253.out_handler<0>().set(m_i8251, FUNC(i8251_device::write_txc)); pit8253.set_clk<1>(XTAL(16'400'000) / 9); diff --git a/src/mame/ussr/okean240.cpp b/src/mame/ussr/okean240.cpp index 281c2302a7f..081e62b5c19 100644 --- a/src/mame/ussr/okean240.cpp +++ b/src/mame/ussr/okean240.cpp @@ -478,7 +478,7 @@ void okean240_state::okean240t(machine_config &config) m_maincpu->set_addrmap(AS_IO, &okean240_state::okean240_io); m_maincpu->in_inta_func().set("pic", FUNC(pic8259_device::acknowledge)); - i8251_device &uart(I8251(config, "uart", 0)); + i8251_device &uart(I8251(config, "uart")); uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -499,12 +499,12 @@ void okean240_state::okean240t(machine_config &config) i8255_device &ppie(I8255(config, "ppie")); ppie.out_pc_callback().set(FUNC(okean240_state::okean240_porte2_w)); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<1>(3072000); // artificial rate pit.out_handler<1>().set("uart", FUNC(i8251_device::write_txc)); pit.out_handler<1>().append("uart", FUNC(i8251_device::write_rxc)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); /* video hardware */ @@ -538,7 +538,7 @@ void okean240_state::okean240(machine_config &config) okean240t(config); GFXDECODE(config, "gfxdecode", "palette", gfx_okean240); subdevice("rs232")->set_default_option(nullptr); // not used for keyboard - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(okean240_state::kbd_put)); } diff --git a/src/mame/ussr/orion.cpp b/src/mame/ussr/orion.cpp index a54cd7b03ae..e34527e9f83 100644 --- a/src/mame/ussr/orion.cpp +++ b/src/mame/ussr/orion.cpp @@ -99,7 +99,7 @@ void orion_state::orion_floppy_formats(format_registration &fr) /* Machine driver */ void orion_state::orion128(machine_config &config) { - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &orion_state::mem_map); m_maincpu->set_addrmap(AS_IO, &orion_state::io_map); @@ -168,7 +168,7 @@ void orion_state::orion128ms(machine_config &config) void orion_z80_state::orionz80(machine_config &config) { - Z80(config, m_maincpu, 2500000); + Z80(config, m_maincpu, XTAL::u(2500000)); m_maincpu->set_addrmap(AS_PROGRAM, &orion_z80_state::mem_map); m_maincpu->set_addrmap(AS_IO, &orion_z80_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(orion_z80_state::orionz80_interrupt)); @@ -200,7 +200,7 @@ void orion_z80_state::orionz80(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 1.0); - auto &ay8912(AY8912(config, "ay8912", 1773400)); + auto &ay8912(AY8912(config, "ay8912", XTAL::u(1773400))); ay8912.add_route(ALL_OUTPUTS, "mono", 1.00); CASSETTE(config, m_cassette); @@ -244,7 +244,7 @@ void orion_z80_state::orionz80ms(machine_config &config) void orion_pro_state::orionpro(machine_config &config) { - Z80(config, m_maincpu, 5000000); + Z80(config, m_maincpu, XTAL::u(5000000)); m_maincpu->set_addrmap(AS_PROGRAM, &orion_pro_state::mem_map); m_maincpu->set_addrmap(AS_IO, &orion_pro_state::io_map); @@ -272,7 +272,7 @@ void orion_pro_state::orionpro(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 1.0); - auto &ay8912(AY8912(config, "ay8912", 1773400)); + auto &ay8912(AY8912(config, "ay8912", XTAL::u(1773400))); ay8912.add_route(ALL_OUTPUTS, "mono", 1.00); CASSETTE(config, m_cassette); diff --git a/src/mame/ussr/pk8000.cpp b/src/mame/ussr/pk8000.cpp index 55721841498..c05fd5e7a4d 100644 --- a/src/mame/ussr/pk8000.cpp +++ b/src/mame/ussr/pk8000.cpp @@ -351,7 +351,7 @@ u32 pk8000_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con void pk8000_state::pk8000(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 1780000); // pk8002 = 10'220'000 / 8 + I8080(config, m_maincpu, XTAL::u(1780000)); // pk8002 = 10'220'000 / 8 m_maincpu->set_addrmap(AS_PROGRAM, &pk8000_state::pk8000_mem); m_maincpu->set_addrmap(AS_IO, &pk8000_state::pk8000_io); m_maincpu->set_vblank_int("screen", FUNC(pk8000_state::interrupt)); diff --git a/src/mame/ussr/pyl601.cpp b/src/mame/ussr/pyl601.cpp index 1cb0ffbcafc..6ebd765c1c4 100644 --- a/src/mame/ussr/pyl601.cpp +++ b/src/mame/ussr/pyl601.cpp @@ -579,7 +579,7 @@ void pyl601_state::pyl601(machine_config &config) crtc.set_char_width(8); /* ? */ crtc.set_update_row_callback(FUNC(pyl601_state::pyl601_update_row)); - UPD765A(config, m_fdc, 8'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(8'000'000), true, true); FLOPPY_CONNECTOR(config, "upd765:0", pyl601_floppies, "525hd", pyl601_state::floppy_formats); FLOPPY_CONNECTOR(config, "upd765:1", pyl601_floppies, "525hd", pyl601_state::floppy_formats); SOFTWARE_LIST(config, "flop_list").set_original("pyl601"); diff --git a/src/mame/ussr/sm1800.cpp b/src/mame/ussr/sm1800.cpp index 9f70c78868f..fa0e92fda1f 100644 --- a/src/mame/ussr/sm1800.cpp +++ b/src/mame/ussr/sm1800.cpp @@ -187,11 +187,11 @@ void sm1800_state::sm1800(machine_config &config) m_ppi->in_pc_callback().set(FUNC(sm1800_state::portc_r)); m_ppi->out_pc_callback().set(FUNC(sm1800_state::portc_w)); - I8275(config, m_crtc, 2000000); + I8275(config, m_crtc, XTAL::u(2000000)); m_crtc->set_character_width(8); m_crtc->set_display_callback(FUNC(sm1800_state::crtc_display_pixels)); - I8251(config, m_uart, 0); + I8251(config, m_uart); } /* ROM definition */ diff --git a/src/mame/ussr/sm7238.cpp b/src/mame/ussr/sm7238.cpp index 0bd2aa5312e..df87129ca4d 100644 --- a/src/mame/ussr/sm7238.cpp +++ b/src/mame/ussr/sm7238.cpp @@ -370,27 +370,27 @@ void sm7238_state::sm7238(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_HIGHLIGHT); GFXDECODE(config, "gfxdecode", "palette", gfx_sm7238); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set_inputline(m_maincpu, 0); - PIT8253(config, m_t_hblank, 0); + PIT8253(config, m_t_hblank); m_t_hblank->set_clk<1>(16.384_MHz_XTAL / 9); // FIXME -- keyboard is slower and doesn't sync otherwise m_t_hblank->out_handler<1>().set(FUNC(sm7238_state::write_keyboard_clock)); - PIT8253(config, m_t_vblank, 0); + PIT8253(config, m_t_vblank); m_t_vblank->set_clk<2>(16.5888_MHz_XTAL / 9); m_t_vblank->out_handler<2>().set(FUNC(sm7238_state::write_printer_clock)); - PIT8253(config, m_t_color, 0); + PIT8253(config, m_t_color); - PIT8253(config, m_t_iface, 0); + PIT8253(config, m_t_iface); m_t_iface->set_clk<1>(16.5888_MHz_XTAL / 9); m_t_iface->out_handler<1>().set(m_i8251line, FUNC(i8251_device::write_txc)); m_t_iface->set_clk<2>(16.5888_MHz_XTAL / 9); m_t_iface->out_handler<2>().set(m_i8251line, FUNC(i8251_device::write_rxc)); // serial connection to host - I8251(config, m_i8251line, 0); + I8251(config, m_i8251line); m_i8251line->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); m_i8251line->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); m_i8251line->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -402,16 +402,16 @@ void sm7238_state::sm7238(machine_config &config) rs232.dsr_handler().set(m_i8251line, FUNC(i8251_device::write_dsr)); // serial connection to KM-035 keyboard - I8251(config, m_i8251kbd, 0); + I8251(config, m_i8251kbd); m_i8251kbd->txd_handler().set(m_keyboard, FUNC(km035_device::write_rxd)); m_i8251kbd->rxrdy_handler().set(m_pic8259, FUNC(pic8259_device::ir3_w)); - KM035(config, m_keyboard, 0); + KM035(config, m_keyboard); m_keyboard->tx_handler().set(m_i8251kbd, FUNC(i8251_device::write_rxd)); m_keyboard->rts_handler().set(m_i8251kbd, FUNC(i8251_device::write_cts)); // serial connection to printer - I8251(config, m_i8251prn, 0); + I8251(config, m_i8251prn); m_i8251prn->rxrdy_handler().set("pic8259", FUNC(pic8259_device::ir3_w)); rs232_port_device &prtr(RS232_PORT(config, "prtr", default_rs232_devices, nullptr)); diff --git a/src/mame/ussr/special.cpp b/src/mame/ussr/special.cpp index 9b6fee5335c..65f8ad2ec2d 100644 --- a/src/mame/ussr/special.cpp +++ b/src/mame/ussr/special.cpp @@ -489,7 +489,7 @@ static void specimx_floppies(device_slot_interface &device) void special_state::special(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &special_state::specialist_mem); /* video hardware */ @@ -505,7 +505,7 @@ void special_state::special(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.0625); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.0625); /* Devices */ I8255(config, m_ppi); @@ -555,10 +555,10 @@ void special_state::specimx(machine_config &config) m_palette->set_entries(16); /* audio hardware */ - SPECIMX_SND(config, "custom", 0).add_route(ALL_OUTPUTS, "mono", 1.0); + SPECIMX_SND(config, "custom").add_route(ALL_OUTPUTS, "mono", 1.0); /* Devices */ - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(2000000); m_pit->out_handler<0>().set("custom", FUNC(specimx_sound_device::set_input_ch0)); m_pit->set_clk<1>(2000000); @@ -585,7 +585,7 @@ void special_state::specimx(machine_config &config) void special_state::erik(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &special_state::erik_mem); m_maincpu->set_addrmap(AS_IO, &special_state::erik_io); @@ -602,7 +602,7 @@ void special_state::erik(machine_config &config) /* audio hardware */ SPEAKER(config, "mono").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.0625); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.0625); /* Devices */ CASSETTE(config, m_cassette); diff --git a/src/mame/ussr/special_gambl.cpp b/src/mame/ussr/special_gambl.cpp index 488b253a54a..374082a70ab 100644 --- a/src/mame/ussr/special_gambl.cpp +++ b/src/mame/ussr/special_gambl.cpp @@ -253,9 +253,9 @@ void dinaris_state::dice(machine_config &config) // Sound SPEAKER(config, "speaker").front_center(); - SPECIMX_SND(config, "custom", 0).add_route(ALL_OUTPUTS, "speaker", 1.0); + SPECIMX_SND(config, "custom").add_route(ALL_OUTPUTS, "speaker", 1.0); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(XTAL(8'000'000) / 4); m_pit->out_handler<0>().set("custom", FUNC(specimx_sound_device::set_input_ch0)); m_pit->set_clk<1>(XTAL(8'000'000) / 4); diff --git a/src/mame/ussr/specialsound.cpp b/src/mame/ussr/specialsound.cpp index c6cdb0804ae..15496bd2a3a 100644 --- a/src/mame/ussr/specialsound.cpp +++ b/src/mame/ussr/specialsound.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(SPECIMX_SND, specimx_sound_device, "specimx_sound", "Speciali // specimx_sound_device - constructor //------------------------------------------------- -specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPECIMX_SND, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_mixer_channel(nullptr) diff --git a/src/mame/ussr/specialsound.h b/src/mame/ussr/specialsound.h index 51dca82f12f..d7c998aa8ee 100644 --- a/src/mame/ussr/specialsound.h +++ b/src/mame/ussr/specialsound.h @@ -15,7 +15,7 @@ class specimx_sound_device : public device_t, public device_sound_interface { public: - specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(set_input_ch0); DECLARE_WRITE_LINE_MEMBER(set_input_ch1); diff --git a/src/mame/ussr/tiamc1.cpp b/src/mame/ussr/tiamc1.cpp index c3db9da6dbf..513a9d84691 100644 --- a/src/mame/ussr/tiamc1.cpp +++ b/src/mame/ussr/tiamc1.cpp @@ -128,7 +128,7 @@ #include "speaker.h" -#define MASTER_CLOCK (15750000) +#define MASTER_CLOCK XTAL::u(15750000) #define CPU_CLOCK (MASTER_CLOCK / 9) #define SND_CLOCK (MASTER_CLOCK / 9) #define PIXEL_CLOCK (MASTER_CLOCK / 3) @@ -370,7 +370,7 @@ void tiamc1_state::kot(machine_config &config) config.device_remove("2x8253"); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - pit8253_device &pit8253(PIT8253(config, "pit8253", 0)); + pit8253_device &pit8253(PIT8253(config, "pit8253")); pit8253.set_clk<0>(PIXEL_CLOCK / 4); pit8253.set_clk<2>(SND_CLOCK); // guess pit8253.out_handler<2>().set(FUNC(tiamc1_state::pit8253_2_w)); diff --git a/src/mame/ussr/tiamc1_a.cpp b/src/mame/ussr/tiamc1_a.cpp index f0829c07f94..f5829926a18 100644 --- a/src/mame/ussr/tiamc1_a.cpp +++ b/src/mame/ussr/tiamc1_a.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(TIAMC1, tiamc1_sound_device, "tiamc1_sound", "TIA-MC1 Custom // tiamc1_sound_device - constructor //------------------------------------------------- -tiamc1_sound_device::tiamc1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tiamc1_sound_device::tiamc1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIAMC1, tag, owner, clock), device_sound_interface(mconfig, *this), m_channel(nullptr), diff --git a/src/mame/ussr/tiamc1_a.h b/src/mame/ussr/tiamc1_a.h index f469e8a40e0..94f72bac118 100644 --- a/src/mame/ussr/tiamc1_a.h +++ b/src/mame/ussr/tiamc1_a.h @@ -14,7 +14,7 @@ class tiamc1_sound_device : public device_t, public device_sound_interface { public: - tiamc1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tiamc1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void tiamc1_timer0_w(offs_t offset, uint8_t data); void tiamc1_timer1_w(offs_t offset, uint8_t data); diff --git a/src/mame/ussr/uknc.cpp b/src/mame/ussr/uknc.cpp index 85d9704b26f..b3ec4a3ea5f 100644 --- a/src/mame/ussr/uknc.cpp +++ b/src/mame/ussr/uknc.cpp @@ -75,11 +75,11 @@ uint32_t uknc_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, void uknc_state::uknc(machine_config &config) { /* basic machine hardware */ - K1801VM2(config, m_maincpu, 8'000'000); + K1801VM2(config, m_maincpu, XTAL::u(8'000'000)); m_maincpu->set_initial_mode(0x8000); m_maincpu->set_addrmap(AS_PROGRAM, &uknc_state::uknc_mem); - k1801vm2_device &subcpu(K1801VM2(config, "subcpu", 6'250'000)); + k1801vm2_device &subcpu(K1801VM2(config, "subcpu", XTAL::u(6'250'000))); subcpu.set_initial_mode(0x8000); subcpu.set_addrmap(AS_PROGRAM, &uknc_state::uknc_sub_mem); diff --git a/src/mame/ussr/unior.cpp b/src/mame/ussr/unior.cpp index b2cc583958a..30ae1bb3929 100644 --- a/src/mame/ussr/unior.cpp +++ b/src/mame/ussr/unior.cpp @@ -507,7 +507,7 @@ void unior_state::unior(machine_config &config) m_uart->txempty_handler().set([this] (bool state) { m_txe = state; }); m_uart->rts_handler().set([this] (bool state) { m_rts = state; }); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(20_MHz_XTAL / 12); m_pit->set_clk<1>(20_MHz_XTAL / 9); m_pit->out_handler<1>().set(FUNC(unior_state::ctc_z1_w)); diff --git a/src/mame/ussr/ut88.cpp b/src/mame/ussr/ut88.cpp index 496caa3b167..cb3b1dde8e8 100644 --- a/src/mame/ussr/ut88.cpp +++ b/src/mame/ussr/ut88.cpp @@ -213,7 +213,7 @@ u32 ut88_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const void ut88_state::ut88(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ut88_state::mem_map); m_maincpu->set_addrmap(AS_IO, &ut88_state::io_map); @@ -231,7 +231,7 @@ void ut88_state::ut88(machine_config &config) /* audio hardware */ SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); + DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); /* Devices */ I8255A(config, m_ppi); @@ -251,7 +251,7 @@ void ut88_state::ut88(machine_config &config) void ut88mini_state::ut88mini(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &ut88mini_state::mem_map); m_maincpu->set_addrmap(AS_IO, &ut88mini_state::io_map); diff --git a/src/mame/ussr/vector06.cpp b/src/mame/ussr/vector06.cpp index 6073fab822d..dcf8ef5f770 100644 --- a/src/mame/ussr/vector06.cpp +++ b/src/mame/ussr/vector06.cpp @@ -172,7 +172,7 @@ static void vector06_floppies(device_slot_interface &device) void vector06_state::vector06(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 3000000); // actual speed is wrong due to unemulated latency + I8080(config, m_maincpu, XTAL::u(3000000)); // actual speed is wrong due to unemulated latency m_maincpu->set_addrmap(AS_PROGRAM, &vector06_state::mem_map); m_maincpu->set_addrmap(AS_IO, &vector06_state::io_map); m_maincpu->out_status_func().set(FUNC(vector06_state::status_callback)); @@ -224,7 +224,7 @@ void vector06_state::vector06(machine_config &config) SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(1500000); m_pit->set_clk<1>(1500000); m_pit->set_clk<2>(1500000); @@ -233,7 +233,7 @@ void vector06_state::vector06(machine_config &config) m_pit->out_handler<2>().set(FUNC(vector06_state::speaker_w)); // optional - AY8910(config, m_ay, 1773400).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8910(config, m_ay, XTAL::u(1773400)).add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/ussr/vta2000.cpp b/src/mame/ussr/vta2000.cpp index 669e095552b..49e1ba5b64a 100644 --- a/src/mame/ussr/vta2000.cpp +++ b/src/mame/ussr/vta2000.cpp @@ -190,18 +190,18 @@ void vta2000_state::vta2000(machine_config &config) m_maincpu->set_addrmap(AS_IO, &vta2000_state::io_map); m_maincpu->in_inta_func().set("pic", FUNC(pic8259_device::acknowledge)); - PIT8253(config, m_mainpit, 0); + PIT8253(config, m_mainpit); m_mainpit->set_clk<0>(500'000); m_mainpit->out_handler<0>().set(FUNC(vta2000_state::speaker_w)); - pic8259_device &pic(PIC8259(config, "pic", 0)); + pic8259_device &pic(PIC8259(config, "pic")); pic.in_sp_callback().set_constant(0); pic.out_int_callback().set_inputline(m_maincpu, 0); i8251_device &usart(I8251(config, "usart", XTAL(4'000'000) / 4)); usart.rxrdy_handler().set("pic", FUNC(pic8259_device::ir4_w)); - pit8253_device &brgpit(PIT8253(config, "brgpit", 0)); + pit8253_device &brgpit(PIT8253(config, "brgpit")); brgpit.set_clk<0>(1'228'800); // maybe brgpit.set_clk<1>(1'228'800); brgpit.out_handler<0>().set("usart", FUNC(i8251_device::write_rxc)); diff --git a/src/mame/valadon/bagman.cpp b/src/mame/valadon/bagman.cpp index 67a1e570488..487d90e09b2 100644 --- a/src/mame/valadon/bagman.cpp +++ b/src/mame/valadon/bagman.cpp @@ -523,7 +523,7 @@ void bagman_state::bagman(machine_config &config) m_tmsprom->pdc().set("tms", FUNC(tms5110_device::pdc_w)); // tms pdc func m_tmsprom->ctl().set("tms", FUNC(tms5110_device::ctl_w)); // tms ctl func - tms5110a_device &tms(TMS5110A(config, "tms", 640000)); + tms5110a_device &tms(TMS5110A(config, "tms", XTAL::u(640000))); tms.m0().set("tmsprom", FUNC(tmsprom_device::m0_w)); tms.data().set("tmsprom", FUNC(tmsprom_device::data_r)); tms.add_route(ALL_OUTPUTS, "mono", 1.0); @@ -581,13 +581,13 @@ void pickin_state::pickin(machine_config &config) // Sound hardware SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1500000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1500000))); aysnd.port_a_read_callback().set_ioport("P1"); aysnd.port_b_read_callback().set_ioport("P2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.40); // Maybe - ay8910_device &ay2(AY8910(config, "ay2", 1500000)); + ay8910_device &ay2(AY8910(config, "ay2", XTAL::u(1500000))); ay2.port_a_read_callback().set_constant(0xff); // needed to avoid spurious credits on startup ay2.port_b_read_callback().set_constant(0xff); ay2.add_route(ALL_OUTPUTS, "mono", 0.40); @@ -643,12 +643,12 @@ void pickin_state::botanic(machine_config &config) // Sound hardware SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 1500000)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(1500000))); aysnd.port_a_read_callback().set_ioport("P1"); aysnd.port_b_read_callback().set_ioport("P2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.40); - AY8910(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.40); + AY8910(config, "ay2", XTAL::u(1500000)).add_route(ALL_OUTPUTS, "mono", 0.40); } diff --git a/src/mame/venture/looping.cpp b/src/mame/venture/looping.cpp index 17c823bd43f..595c8e6e1dc 100644 --- a/src/mame/venture/looping.cpp +++ b/src/mame/venture/looping.cpp @@ -668,12 +668,12 @@ void looping_state::looping(machine_config &config) m_aysnd->port_a_read_callback().set("soundlatch", FUNC(generic_latch_8_device::read)); m_aysnd->add_route(ALL_OUTPUTS, "speaker", 0.2); - TMS5220(config, m_tms, 640'000); + TMS5220(config, m_tms, XTAL::u(640'000)); //m_tms->irq_cb().set(FUNC(looping_state::spcint)); m_tms->irq_cb().set(FUNC(looping_state::int_update)); m_tms->add_route(ALL_OUTPUTS, "speaker", 0.5); - DAC_2BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // unknown DAC + DAC_2BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.15); // unknown DAC ls259_device &sen0(LS259(config, "sen0")); // B3 on sound board sen0.q_out_cb<0>().set(FUNC(looping_state::souint_clr)); diff --git a/src/mame/venture/spcforce.cpp b/src/mame/venture/spcforce.cpp index 9d7fd55ec5b..97ea72008d8 100644 --- a/src/mame/venture/spcforce.cpp +++ b/src/mame/venture/spcforce.cpp @@ -329,7 +329,7 @@ void spcforce_state::spcforce(machine_config &config) I8085A(config, m_maincpu, 8'000'000 * 2); // 4.00 MHz??? m_maincpu->set_addrmap(AS_PROGRAM, &spcforce_state::main_map); - I8035(config, m_audiocpu, 6'144'000); /* divisor ??? */ + I8035(config, m_audiocpu, XTAL::u(6'144'000)); /* divisor ??? */ m_audiocpu->set_addrmap(AS_PROGRAM, &spcforce_state::sound_map); m_audiocpu->bus_in_cb().set("soundlatch", FUNC(generic_latch_8_device::read)); m_audiocpu->p1_out_cb().set(FUNC(spcforce_state::sn76496_latch_w)); @@ -362,15 +362,15 @@ void spcforce_state::spcforce(machine_config &config) GENERIC_LATCH_8(config, "soundlatch"); - SN76496(config, m_sn[0], 2000000); + SN76496(config, m_sn[0], XTAL::u(2000000)); m_sn[0]->add_route(ALL_OUTPUTS, "mono", 1.0); m_sn[0]->ready_cb().set(FUNC(spcforce_state::write_sn_ready<0>)); - SN76496(config, m_sn[1], 2000000); + SN76496(config, m_sn[1], XTAL::u(2000000)); m_sn[1]->add_route(ALL_OUTPUTS, "mono", 1.0); m_sn[1]->ready_cb().set(FUNC(spcforce_state::write_sn_ready<1>)); - SN76496(config, m_sn[2], 2000000); + SN76496(config, m_sn[2], XTAL::u(2000000)); m_sn[2]->add_route(ALL_OUTPUTS, "mono", 1.0); m_sn[2]->ready_cb().set(FUNC(spcforce_state::write_sn_ready<2>)); } diff --git a/src/mame/verifone/tranz330.cpp b/src/mame/verifone/tranz330.cpp index 77fad03ef36..5106ba5af1e 100644 --- a/src/mame/verifone/tranz330.cpp +++ b/src/mame/verifone/tranz330.cpp @@ -183,7 +183,7 @@ void tranz330_state::tranz330(machine_config &config) // sound SPEAKER(config, "mono").front_center(); - SPEAKER_SOUND(config, "speaker", 0) + SPEAKER_SOUND(config, "speaker") .add_route(ALL_OUTPUTS, "mono", 0.25); } diff --git a/src/mame/vidbrain/uv201.cpp b/src/mame/vidbrain/uv201.cpp index 56b670247b3..9ee82c2edc7 100644 --- a/src/mame/vidbrain/uv201.cpp +++ b/src/mame/vidbrain/uv201.cpp @@ -95,7 +95,7 @@ DEFINE_DEVICE_TYPE(UV201, uv201_device, "uv201", "UV201") // uv201_device - constructor //------------------------------------------------- -uv201_device::uv201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +uv201_device::uv201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UV201, tag, owner, clock), device_video_interface(mconfig, *this), m_write_ext_int(*this), diff --git a/src/mame/vidbrain/uv201.h b/src/mame/vidbrain/uv201.h index e3cd03b2af6..933614fc229 100644 --- a/src/mame/vidbrain/uv201.h +++ b/src/mame/vidbrain/uv201.h @@ -71,7 +71,7 @@ class uv201_device : public device_t, { public: // construction/destruction - uv201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + uv201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ext_int_wr_callback() { return m_write_ext_int.bind(); } auto hblank_wr_callback() { return m_write_hblank.bind(); } diff --git a/src/mame/vidbrain/vidbrain.cpp b/src/mame/vidbrain/vidbrain.cpp index e3e8fecf120..2dc139fdf26 100644 --- a/src/mame/vidbrain/vidbrain.cpp +++ b/src/mame/vidbrain/vidbrain.cpp @@ -418,8 +418,8 @@ void vidbrain_state::vidbrain(machine_config &config) screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER)); screen.set_screen_update(UV201_TAG, FUNC(uv201_device::screen_update)); - screen.set_raw(3636363, 232, 18, 232, 262, 21, 262); - UV201(config, m_uv, 3636363); + screen.set_raw(XTAL::u(3636363), 232, 18, 232, 262, 21, 262); + UV201(config, m_uv, XTAL::u(3636363)); m_uv->set_screen(SCREEN_TAG); m_uv->ext_int_wr_callback().set(FUNC(vidbrain_state::ext_int_w)); m_uv->hblank_wr_callback().set(FUNC(vidbrain_state::hblank_w)); @@ -427,7 +427,7 @@ void vidbrain_state::vidbrain(machine_config &config) // sound hardware SPEAKER(config, "speaker").front_center(); - DAC_2BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.167); // 74ls74.u16 + 120k + 56k + DAC_2BIT_R2R(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.167); // 74ls74.u16 + 120k + 56k // devices F3853(config, m_smi, XTAL(4'000'000)/2); diff --git a/src/mame/videoton/tvc.cpp b/src/mame/videoton/tvc.cpp index fa156fc5540..10642f4955e 100644 --- a/src/mame/videoton/tvc.cpp +++ b/src/mame/videoton/tvc.cpp @@ -761,7 +761,7 @@ void tvc_exp(device_slot_interface &device) void tvc_state::tvc(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3125000); + Z80(config, m_maincpu, XTAL::u(3125000)); m_maincpu->set_addrmap(AS_PROGRAM, &tvc_state::tvc_mem); m_maincpu->set_addrmap(AS_IO, &tvc_state::tvc_io); @@ -808,7 +808,7 @@ void tvc_state::tvc(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - TVC_SOUND(config, m_sound, 0); + TVC_SOUND(config, m_sound); m_sound->sndint_wr_callback().set(FUNC(tvc_state::int_ff_set)); m_sound->add_route(ALL_OUTPUTS, "mono", 0.75); diff --git a/src/mame/videoton/tvc_a.cpp b/src/mame/videoton/tvc_a.cpp index d80dfa1a97f..da565949683 100644 --- a/src/mame/videoton/tvc_a.cpp +++ b/src/mame/videoton/tvc_a.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(TVC_SOUND, tvc_sound_device, "tvc_sound", "TVC 64 Custom Soun // tvc_sound_device - constructor //------------------------------------------------- -tvc_sound_device::tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tvc_sound_device::tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TVC_SOUND, tag, owner, clock), device_sound_interface(mconfig, *this), m_write_sndint(*this) diff --git a/src/mame/videoton/tvc_a.h b/src/mame/videoton/tvc_a.h index 7aba16f91d3..1d83ea3b5a5 100644 --- a/src/mame/videoton/tvc_a.h +++ b/src/mame/videoton/tvc_a.h @@ -22,7 +22,7 @@ class tvc_sound_device : public device_t, public device_sound_interface { public: // construction/destruction - tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tvc_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto sndint_wr_callback() { return m_write_sndint.bind(); } diff --git a/src/mame/virtual/vgmplay.cpp b/src/mame/virtual/vgmplay.cpp index e5e2e35ef87..2d9df9653e7 100644 --- a/src/mame/virtual/vgmplay.cpp +++ b/src/mame/virtual/vgmplay.cpp @@ -227,7 +227,7 @@ public: A_GA20_1 = 0xa8000000, }; - vgmplay_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vgmplay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint32_t execute_min_cycles() const noexcept override; virtual uint32_t execute_max_cycles() const noexcept override; @@ -474,7 +474,7 @@ public: private: virtual void machine_start() override; - uint32_t m_held_clock = 0; + XTAL m_held_clock; std::vector m_file_data; required_device m_vgmplay; required_device m_mixer; @@ -536,7 +536,7 @@ private: uint8_t r8(int offset) const; }; -vgmplay_device::vgmplay_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vgmplay_device::vgmplay_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, VGMPLAY, tag, owner, clock), m_act_leds(*this, "led_act_%u", 0U), m_file_config("file", ENDIANNESS_LITTLE, 8, 32), @@ -2872,8 +2872,8 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state::load_file) { chip_volume /= 2.0f; } - device.set_unscaled_clock(c & ~0xc0000000); - if (device.unscaled_clock() != 0) + device.set_unscaled_clock(XTAL::u(c & ~0xc0000000)); + if (!device.unscaled_clock().disabled()) dynamic_cast(&device)->set_output_gain(ALL_OUTPUTS, chip_volume); else dynamic_cast(&device)->set_output_gain(ALL_OUTPUTS, 0); @@ -2987,16 +2987,16 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state::load_file) setup_device(*m_k051649[1], 1, CT_K051649, 0x9c, 0x161); // HACK: Some VGMs contain the halved clock speed of the sound core inside the SCC - m_k051649[0]->set_clock_scale(m_k051649[0]->unscaled_clock() < 2097152 ? 2.0 : 1.0); - m_k051649[1]->set_clock_scale(m_k051649[1]->unscaled_clock() < 2097152 ? 2.0 : 1.0); + m_k051649[0]->set_clock_scale(m_k051649[0]->unscaled_clock().value() < 2097152 ? 2.0 : 1.0); + m_k051649[1]->set_clock_scale(m_k051649[1]->unscaled_clock().value() < 2097152 ? 2.0 : 1.0); setup_device(*m_k054539[0], 0, CT_K054539, 0xa0, 0x161); setup_device(*m_k054539[1], 1, CT_K054539, 0xa0, 0x161); // HACK: Some VGMs contain 48,000 instead of 18,432,000 - m_k054539[0]->set_clock_scale(m_k054539[0]->unscaled_clock() == 48000 ? 384.0 : 1.0); - m_k054539[1]->set_clock_scale(m_k054539[1]->unscaled_clock() == 48000 ? 384.0 : 1.0); - if (m_k054539[0]->unscaled_clock() == 48000 || m_k054539[1]->unscaled_clock() == 48000) + m_k054539[0]->set_clock_scale(m_k054539[0]->unscaled_clock().value() == 48000 ? 384.0 : 1.0); + m_k054539[1]->set_clock_scale(m_k054539[1]->unscaled_clock().value() == 48000 ? 384.0 : 1.0); + if (m_k054539[0]->unscaled_clock().value() == 48000 || m_k054539[1]->unscaled_clock().value() == 48000) osd_printf_error("bad rip detected, correcting k054539 clock\n"); // HACK: VGM contain the halved clock speed of the sound core inside the HUC6280 @@ -3023,8 +3023,8 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state::load_file) setup_device(*m_qsound, 0, CT_QSOUND, 0xb4, 0x161); // HACK: VGMs contain 4,000,000 instead of 60,000,000 - m_qsound->set_clock_scale(m_qsound->unscaled_clock() == 4000000 ? 15.0 : 1.0); - if (m_qsound->unscaled_clock() == 4000000) + m_qsound->set_clock_scale(m_qsound->unscaled_clock().value() == 4000000 ? 15.0 : 1.0); + if (m_qsound->unscaled_clock().value() == 4000000) osd_printf_error("bad rip detected, correcting qsound clock\n"); setup_device(*m_scsp[0], 0, CT_SCSP, 0xb8, 0x171); @@ -3062,8 +3062,8 @@ QUICKLOAD_LOAD_MEMBER(vgmplay_state::load_file) setup_device(*m_ga20[1], 1, CT_GA20, 0xe0, 0x171); for (device_t &child : subdevices()) - if (child.clock() != 0) - logerror("%s %d\n", child.tag(), child.clock()); + if (!child.clock().disabled()) + logerror("%s %d\n", child.tag(), child.clock().value()); //for (auto &stream : machine().sound().streams()) // if (stream->sample_rate() != 0) @@ -3166,8 +3166,8 @@ template void vgmplay_state::okim6258_clock_w(offs_t offset, uint8_t data, uint8_t mem_mask) { int shift = ((offset & 3) << 3); - uint32_t c = (m_okim6258[Index]->unscaled_clock() & ~(mem_mask << shift)) | ((data & mem_mask) << shift); - m_okim6258[Index]->set_unscaled_clock(c); + uint32_t c = (m_okim6258[Index]->unscaled_clock().value() & ~(mem_mask << shift)) | ((data & mem_mask) << shift); + m_okim6258[Index]->set_unscaled_clock(XTAL::u(c)); } @@ -3185,8 +3185,8 @@ template void vgmplay_state::okim6295_clock_w(offs_t offset, uint8_t data, uint8_t mem_mask) { int shift = ((offset & 3) << 3); - uint32_t c = (m_okim6295[Index]->unscaled_clock() & ~(mem_mask << shift)) | ((data & mem_mask) << shift); - m_okim6295[Index]->set_unscaled_clock(c); + uint32_t c = (m_okim6295[Index]->unscaled_clock().value() & ~(mem_mask << shift)) | ((data & mem_mask) << shift); + m_okim6295[Index]->set_unscaled_clock(XTAL::u(c)); } @@ -3294,19 +3294,19 @@ INPUT_CHANGED_MEMBER(vgmplay_state::key_pressed) m_mixer->cycle_viz_mode(); break; case VGMPLAY_RATE_DOWN: - m_vgmplay->set_unscaled_clock((uint32_t)(m_vgmplay->clock() * 0.95f)); + m_vgmplay->set_unscaled_clock(XTAL::u((uint32_t)(m_vgmplay->clock().value() * 0.95f))); break; case VGMPLAY_RATE_UP: - m_vgmplay->set_unscaled_clock((uint32_t)(m_vgmplay->clock() / 0.95f)); + m_vgmplay->set_unscaled_clock(XTAL::u((uint32_t)(m_vgmplay->clock().value() / 0.95f))); break; case VGMPLAY_RATE_RST: - m_vgmplay->set_unscaled_clock(44100); + m_vgmplay->set_unscaled_clock(XTAL::u(44100)); break; case VGMPLAY_HOLD: if (newval) { m_held_clock = m_vgmplay->clock(); - m_vgmplay->set_unscaled_clock(0); + m_vgmplay->set_unscaled_clock(XTAL()); } else { @@ -3626,7 +3626,7 @@ void vgmplay_state::rf5c164_map(address_map &map) void vgmplay_state::vgmplay(machine_config &config) { - VGMPLAY(config, m_vgmplay, 44100); + VGMPLAY(config, m_vgmplay, XTAL::u(44100)); m_vgmplay->set_addrmap(AS_PROGRAM, &vgmplay_state::file_map); m_vgmplay->set_addrmap(AS_IO, &vgmplay_state::soundchips_map); m_vgmplay->set_addrmap(AS_IO16LE, &vgmplay_state::soundchips16le_map); @@ -3640,71 +3640,71 @@ void vgmplay_state::vgmplay(machine_config &config) config.set_default_layout(layout_vgmplay); - SN76489(config, m_sn76489[0], 0); + SN76489(config, m_sn76489[0]); m_sn76489[0]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_sn76489[0]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - SN76489(config, m_sn76489[1], 0); + SN76489(config, m_sn76489[1]); m_sn76489[1]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_sn76489[1]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - YM2413(config, m_ym2413[0], 0); + YM2413(config, m_ym2413[0]); m_ym2413[0]->add_route(ALL_OUTPUTS, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ym2413[0]->add_route(ALL_OUTPUTS, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - YM2413(config, m_ym2413[1], 0); + YM2413(config, m_ym2413[1]); m_ym2413[1]->add_route(ALL_OUTPUTS, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ym2413[1]->add_route(ALL_OUTPUTS, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - YM2612(config, m_ym2612[0], 0); + YM2612(config, m_ym2612[0]); m_ym2612[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ym2612[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - YM2612(config, m_ym2612[1], 0); + YM2612(config, m_ym2612[1]); m_ym2612[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ym2612[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - YM2151(config, m_ym2151[0], 0); + YM2151(config, m_ym2151[0]); m_ym2151[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ym2151[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - YM2151(config, m_ym2151[1], 0); + YM2151(config, m_ym2151[1]); m_ym2151[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ym2151[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - SEGAPCM(config, m_segapcm[0], 0); + SEGAPCM(config, m_segapcm[0]); m_segapcm[0]->set_addrmap(0, &vgmplay_state::segapcm_map<0>); m_segapcm[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_segapcm[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - SEGAPCM(config, m_segapcm[1], 0); + SEGAPCM(config, m_segapcm[1]); m_segapcm[1]->set_addrmap(0, &vgmplay_state::segapcm_map<1>); m_segapcm[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_segapcm[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - RF5C68(config, m_rf5c68, 0); + RF5C68(config, m_rf5c68); m_rf5c68->set_addrmap(0, &vgmplay_state::rf5c68_map<0>); m_rf5c68->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_rf5c68->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); // TODO: prevent error.log spew - YM2203(config, m_ym2203[0], 0); + YM2203(config, m_ym2203[0]); m_ym2203[0]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_ym2203[0]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); - YM2203(config, m_ym2203[1], 0); + YM2203(config, m_ym2203[1]); m_ym2203[1]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_ym2203[1]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); // TODO: prevent error.log spew - YM2608(config, m_ym2608[0], 0); + YM2608(config, m_ym2608[0]); m_ym2608[0]->set_addrmap(0, &vgmplay_state::ym2608_map<0>); m_ym2608[0]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_ym2608[0]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); m_ym2608[0]->add_route(1, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ym2608[0]->add_route(2, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); - YM2608(config, m_ym2608[1], 0); + YM2608(config, m_ym2608[1]); m_ym2608[1]->set_addrmap(0, &vgmplay_state::ym2608_map<1>); m_ym2608[1]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_ym2608[1]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); @@ -3712,7 +3712,7 @@ void vgmplay_state::vgmplay(machine_config &config) m_ym2608[1]->add_route(2, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); // TODO: prevent error.log spew - YM2610(config, m_ym2610[0], 0); + YM2610(config, m_ym2610[0]); m_ym2610[0]->set_addrmap(0, &vgmplay_state::ym2610_adpcm_a_map<0>); m_ym2610[0]->set_addrmap(1, &vgmplay_state::ym2610_adpcm_b_map<0>); m_ym2610[0]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); @@ -3720,7 +3720,7 @@ void vgmplay_state::vgmplay(machine_config &config) m_ym2610[0]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_ym2610[0]->add_route(2, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - YM2610(config, m_ym2610[1], 0); + YM2610(config, m_ym2610[1]); m_ym2610[1]->set_addrmap(0, &vgmplay_state::ym2610_adpcm_a_map<1>); m_ym2610[1]->set_addrmap(1, &vgmplay_state::ym2610_adpcm_b_map<1>); m_ym2610[1]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); @@ -3728,46 +3728,46 @@ void vgmplay_state::vgmplay(machine_config &config) m_ym2610[1]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_ym2610[1]->add_route(2, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - YM3812(config, m_ym3812[0], 0); + YM3812(config, m_ym3812[0]); m_ym3812[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_ym3812[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - YM3812(config, m_ym3812[1], 0); + YM3812(config, m_ym3812[1]); m_ym3812[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_ym3812[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - YM3526(config, m_ym3526[0], 0); + YM3526(config, m_ym3526[0]); m_ym3526[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_ym3526[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - YM3526(config, m_ym3526[1], 0); + YM3526(config, m_ym3526[1]); m_ym3526[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_ym3526[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - Y8950(config, m_y8950[0], 0); + Y8950(config, m_y8950[0]); m_y8950[0]->set_addrmap(0, &vgmplay_state::y8950_map<0>); m_y8950[0]->add_route(ALL_OUTPUTS, m_mixer, 0.40, AUTO_ALLOC_INPUT, 0); m_y8950[0]->add_route(ALL_OUTPUTS, m_mixer, 0.40, AUTO_ALLOC_INPUT, 1); - Y8950(config, m_y8950[1], 0); + Y8950(config, m_y8950[1]); m_y8950[1]->set_addrmap(0, &vgmplay_state::y8950_map<1>); m_y8950[1]->add_route(ALL_OUTPUTS, m_mixer, 0.40, AUTO_ALLOC_INPUT, 0); m_y8950[1]->add_route(ALL_OUTPUTS, m_mixer, 0.40, AUTO_ALLOC_INPUT, 1); - YMF262(config, m_ymf262[0], 0); + YMF262(config, m_ymf262[0]); m_ymf262[0]->add_route(0, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf262[0]->add_route(1, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); m_ymf262[0]->add_route(2, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf262[0]->add_route(3, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); - YMF262(config, m_ymf262[1], 0); + YMF262(config, m_ymf262[1]); m_ymf262[1]->add_route(0, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf262[1]->add_route(1, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); m_ymf262[1]->add_route(2, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf262[1]->add_route(3, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); // TODO: prevent error.log spew - YMF278B(config, m_ymf278b[0], 0); + YMF278B(config, m_ymf278b[0]); m_ymf278b[0]->set_addrmap(0, &vgmplay_state::ymf278b_map<0>); m_ymf278b[0]->add_route(0, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf278b[0]->add_route(1, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); @@ -3776,7 +3776,7 @@ void vgmplay_state::vgmplay(machine_config &config) m_ymf278b[0]->add_route(4, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf278b[0]->add_route(5, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); - YMF278B(config, m_ymf278b[1], 0); + YMF278B(config, m_ymf278b[1]); m_ymf278b[1]->set_addrmap(0, &vgmplay_state::ymf278b_map<1>); m_ymf278b[1]->add_route(0, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf278b[1]->add_route(1, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); @@ -3785,14 +3785,14 @@ void vgmplay_state::vgmplay(machine_config &config) m_ymf278b[1]->add_route(4, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_ymf278b[1]->add_route(5, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); - YMF271(config, m_ymf271[0], 0); + YMF271(config, m_ymf271[0]); m_ymf271[0]->set_addrmap(0, &vgmplay_state::ymf271_map<0>); m_ymf271[0]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_ymf271[0]->add_route(1, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); m_ymf271[0]->add_route(2, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_ymf271[0]->add_route(3, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); - YMF271(config, m_ymf271[1], 0); + YMF271(config, m_ymf271[1]); m_ymf271[1]->set_addrmap(0, &vgmplay_state::ymf271_map<0>); m_ymf271[1]->add_route(0, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_ymf271[1]->add_route(1, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); @@ -3800,272 +3800,272 @@ void vgmplay_state::vgmplay(machine_config &config) m_ymf271[1]->add_route(3, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); // TODO: prevent error.log spew - YMZ280B(config, m_ymz280b[0], 0); + YMZ280B(config, m_ymz280b[0]); m_ymz280b[0]->set_addrmap(0, &vgmplay_state::ymz280b_map<0>); m_ymz280b[0]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_ymz280b[0]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - YMZ280B(config, m_ymz280b[1], 0); + YMZ280B(config, m_ymz280b[1]); m_ymz280b[1]->set_addrmap(0, &vgmplay_state::ymz280b_map<1>); m_ymz280b[1]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_ymz280b[1]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - RF5C164(config, m_rf5c164, 0); + RF5C164(config, m_rf5c164); m_rf5c164->set_addrmap(0, &vgmplay_state::rf5c164_map<0>); m_rf5c164->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_rf5c164->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); /// TODO: rewrite to generate audio without using DAC devices - SEGA_32X_NTSC(config, m_sega32x, 0, "sega32x_maincpu", "sega32x_scanline_timer"); + SEGA_32X_NTSC(config, m_sega32x, XTAL(), "sega32x_maincpu", "sega32x_scanline_timer"); m_sega32x->add_route(0, m_mixer, 1.00, AUTO_ALLOC_INPUT, 0); m_sega32x->add_route(1, m_mixer, 1.00, AUTO_ALLOC_INPUT, 1); - auto& sega32x_maincpu(M68000(config, "sega32x_maincpu", 0)); + auto& sega32x_maincpu(M68000(config, "sega32x_maincpu")); sega32x_maincpu.set_disable(); - TIMER(config, "sega32x_scanline_timer", 0); + TIMER(config, "sega32x_scanline_timer"); m_sega32x->subdevice("32x_master_sh2")->set_disable(); m_sega32x->subdevice("32x_slave_sh2")->set_disable(); // TODO: prevent error.log spew - AY8910(config, m_ay8910[0], 0); + AY8910(config, m_ay8910[0]); m_ay8910[0]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 0); m_ay8910[0]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 1); - AY8910(config, m_ay8910[1], 0); + AY8910(config, m_ay8910[1]); m_ay8910[1]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 0); m_ay8910[1]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 1); - DMG_APU(config, m_dmg[0], 0); + DMG_APU(config, m_dmg[0]); m_dmg[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_dmg[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - DMG_APU(config, m_dmg[1], 0); + DMG_APU(config, m_dmg[1]); m_dmg[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_dmg[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - RP2A03G(config, m_nescpu[0], 0); + RP2A03G(config, m_nescpu[0]); m_nescpu[0]->set_addrmap(AS_PROGRAM, &vgmplay_state::nescpu_map<0>); m_nescpu[0]->set_disable(); m_nescpu[0]->add_route(ALL_OUTPUTS, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_nescpu[0]->add_route(ALL_OUTPUTS, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - RP2A03G(config, m_nescpu[1], 0); + RP2A03G(config, m_nescpu[1]); m_nescpu[1]->set_addrmap(AS_PROGRAM, &vgmplay_state::nescpu_map<1>); m_nescpu[1]->set_disable(); m_nescpu[1]->add_route(ALL_OUTPUTS, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_nescpu[1]->add_route(ALL_OUTPUTS, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - MULTIPCM(config, m_multipcm[0], 0); + MULTIPCM(config, m_multipcm[0]); m_multipcm[0]->set_addrmap(0, &vgmplay_state::multipcm_map<0>); m_multipcm[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_multipcm[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - MULTIPCM(config, m_multipcm[1], 0); + MULTIPCM(config, m_multipcm[1]); m_multipcm[1]->set_addrmap(0, &vgmplay_state::multipcm_map<1>); m_multipcm[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_multipcm[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - UPD7759(config, m_upd7759[0], 0); + UPD7759(config, m_upd7759[0]); m_upd7759[0]->drq().set(FUNC(vgmplay_state::upd7759_drq_w<0>)); m_upd7759[0]->set_addrmap(0, &vgmplay_state::upd7759_map<0>); m_upd7759[0]->add_route(ALL_OUTPUTS, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); m_upd7759[0]->add_route(ALL_OUTPUTS, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); - UPD7759(config, m_upd7759[1], 0); + UPD7759(config, m_upd7759[1]); m_upd7759[1]->drq().set(FUNC(vgmplay_state::upd7759_drq_w<1>)); m_upd7759[1]->set_addrmap(0, &vgmplay_state::upd7759_map<1>); m_upd7759[1]->add_route(ALL_OUTPUTS, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); m_upd7759[1]->add_route(ALL_OUTPUTS, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); - OKIM6258(config, m_okim6258[0], 0); + OKIM6258(config, m_okim6258[0]); m_okim6258[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_okim6258[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - OKIM6258(config, m_okim6258[1], 0); + OKIM6258(config, m_okim6258[1]); m_okim6258[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_okim6258[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - OKIM6295(config, m_okim6295[0], 0, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_okim6295[0], XTAL(), okim6295_device::PIN7_HIGH); m_okim6295[0]->set_addrmap(0, &vgmplay_state::okim6295_map<0>); m_okim6295[0]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_okim6295[0]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); - OKIM6295(config, m_okim6295[1], 0, okim6295_device::PIN7_HIGH); + OKIM6295(config, m_okim6295[1], XTAL(), okim6295_device::PIN7_HIGH); m_okim6295[1]->set_addrmap(0, &vgmplay_state::okim6295_map<1>); m_okim6295[1]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 0); m_okim6295[1]->add_route(ALL_OUTPUTS, m_mixer, 0.25, AUTO_ALLOC_INPUT, 1); - K051649(config, m_k051649[0], 0); + K051649(config, m_k051649[0]); m_k051649[0]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 0); m_k051649[0]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 1); - K051649(config, m_k051649[1], 0); + K051649(config, m_k051649[1]); m_k051649[1]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 0); m_k051649[1]->add_route(ALL_OUTPUTS, m_mixer, 0.33, AUTO_ALLOC_INPUT, 1); - K054539(config, m_k054539[0], 0); + K054539(config, m_k054539[0]); m_k054539[0]->set_addrmap(0, &vgmplay_state::k054539_map<0>); m_k054539[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_k054539[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - K054539(config, m_k054539[1], 0); + K054539(config, m_k054539[1]); m_k054539[1]->set_addrmap(0, &vgmplay_state::k054539_map<1>); m_k054539[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_k054539[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); // TODO: prevent error.log spew - H6280(config, m_huc6280[0], 0); + H6280(config, m_huc6280[0]); m_huc6280[0]->set_disable(); m_huc6280[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_huc6280[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - H6280(config, m_huc6280[1], 0); + H6280(config, m_huc6280[1]); m_huc6280[1]->set_disable(); m_huc6280[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_huc6280[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - C140(config, m_c140[0], 0); + C140(config, m_c140[0]); m_c140[0]->set_addrmap(0, &vgmplay_state::c140_map<0>); m_c140[0]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_c140[0]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - C140(config, m_c140[1], 0); + C140(config, m_c140[1]); m_c140[1]->set_addrmap(0, &vgmplay_state::c140_map<1>); m_c140[1]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_c140[1]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - C219(config, m_c219[0], 0); + C219(config, m_c219[0]); m_c219[0]->set_addrmap(0, &vgmplay_state::c219_map<0>); m_c219[0]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_c219[0]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - C219(config, m_c219[1], 0); + C219(config, m_c219[1]); m_c219[1]->set_addrmap(0, &vgmplay_state::c219_map<1>); m_c219[1]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_c219[1]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - K053260(config, m_k053260[0], 0); + K053260(config, m_k053260[0]); m_k053260[0]->set_addrmap(0, &vgmplay_state::k053260_map<0>); m_k053260[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_k053260[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - K053260(config, m_k053260[1], 0); + K053260(config, m_k053260[1]); m_k053260[1]->set_addrmap(0, &vgmplay_state::k053260_map<1>); m_k053260[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_k053260[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - POKEY(config, m_pokey[0], 0); + POKEY(config, m_pokey[0]); m_pokey[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_pokey[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - POKEY(config, m_pokey[1], 0); + POKEY(config, m_pokey[1]); m_pokey[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_pokey[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - QSOUND(config, m_qsound, 0); + QSOUND(config, m_qsound); m_qsound->set_addrmap(0, &vgmplay_state::qsound_map<0>); m_qsound->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_qsound->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - SCSP(config, m_scsp[0], 0); + SCSP(config, m_scsp[0]); m_scsp[0]->set_addrmap(0, &vgmplay_state::scsp_map<0>); m_scsp[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_scsp[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - SCSP(config, m_scsp[1], 0); + SCSP(config, m_scsp[1]); m_scsp[1]->set_addrmap(0, &vgmplay_state::scsp_map<1>); m_scsp[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_scsp[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - WSWAN_SND(config, m_wswan[0], 0); + WSWAN_SND(config, m_wswan[0]); m_wswan[0]->set_addrmap(0, &vgmplay_state::wswan_map<0>); m_wswan[0]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_wswan[0]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - WSWAN_SND(config, m_wswan[1], 0); + WSWAN_SND(config, m_wswan[1]); m_wswan[1]->set_addrmap(0, &vgmplay_state::wswan_map<1>); m_wswan[1]->add_route(0, m_mixer, 0.50, AUTO_ALLOC_INPUT, 0); m_wswan[1]->add_route(1, m_mixer, 0.50, AUTO_ALLOC_INPUT, 1); - VBOYSND(config, m_vsu_vue[0], 0); + VBOYSND(config, m_vsu_vue[0]); m_vsu_vue[0]->add_route(0, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); m_vsu_vue[0]->add_route(1, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); - VBOYSND(config, m_vsu_vue[1], 0); + VBOYSND(config, m_vsu_vue[1]); m_vsu_vue[1]->add_route(0, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); m_vsu_vue[1]->add_route(1, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); - SAA1099(config, m_saa1099[0], 0); + SAA1099(config, m_saa1099[0]); m_saa1099[0]->add_route(0, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); m_saa1099[0]->add_route(1, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); - SAA1099(config, m_saa1099[1], 0); + SAA1099(config, m_saa1099[1]); m_saa1099[1]->add_route(0, m_mixer, 1.0, AUTO_ALLOC_INPUT, 0); m_saa1099[1]->add_route(1, m_mixer, 1.0, AUTO_ALLOC_INPUT, 1); - ES5503(config, m_es5503[0], 0); + ES5503(config, m_es5503[0]); m_es5503[0]->set_channels(2); m_es5503[0]->set_addrmap(0, &vgmplay_state::es5503_map<0>); m_es5503[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_es5503[0]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - ES5503(config, m_es5503[1], 0); + ES5503(config, m_es5503[1]); m_es5503[1]->set_channels(2); m_es5503[1]->set_addrmap(0, &vgmplay_state::es5503_map<1>); m_es5503[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_es5503[1]->add_route(ALL_OUTPUTS, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - ES5505(config, m_es5505[0], 0); + ES5505(config, m_es5505[0]); // TODO m_es5505[0]->set_addrmap(0, &vgmplay_state::es5505_map<0>); // TODO m_es5505[0]->set_addrmap(1, &vgmplay_state::es5505_map<0>); m_es5505[0]->set_channels(1); m_es5505[0]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_es5505[0]->add_route(1, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - ES5505(config, m_es5505[1], 0); + ES5505(config, m_es5505[1]); // TODO m_es5505[1]->set_addrmap(0, &vgmplay_state::es5505_map<1>); // TODO m_es5505[1]->set_addrmap(1, &vgmplay_state::es5505_map<1>); m_es5505[1]->set_channels(1); m_es5505[1]->add_route(0, m_mixer, 0.5, AUTO_ALLOC_INPUT, 0); m_es5505[1]->add_route(1, m_mixer, 0.5, AUTO_ALLOC_INPUT, 1); - X1_010(config, m_x1_010[0], 0); + X1_010(config, m_x1_010[0]); m_x1_010[0]->set_addrmap(0, &vgmplay_state::x1_010_map<0>); m_x1_010[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_x1_010[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - X1_010(config, m_x1_010[1], 0); + X1_010(config, m_x1_010[1]); m_x1_010[1]->set_addrmap(0, &vgmplay_state::x1_010_map<1>); m_x1_010[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_x1_010[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - C352(config, m_c352[0], 0, 1); + C352(config, m_c352[0], XTAL(), 1); m_c352[0]->set_addrmap(0, &vgmplay_state::c352_map<0>); m_c352[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_c352[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); m_c352[0]->add_route(2, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_c352[0]->add_route(3, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - C352(config, m_c352[1], 0, 1); + C352(config, m_c352[1], XTAL(), 1); m_c352[1]->set_addrmap(0, &vgmplay_state::c352_map<1>); m_c352[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_c352[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); m_c352[1]->add_route(2, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_c352[1]->add_route(3, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - IREMGA20(config, m_ga20[0], 0); + IREMGA20(config, m_ga20[0]); m_ga20[0]->set_addrmap(0, &vgmplay_state::ga20_map<0>); m_ga20[0]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ga20[0]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - IREMGA20(config, m_ga20[1], 0); + IREMGA20(config, m_ga20[1]); m_ga20[1]->set_addrmap(0, &vgmplay_state::ga20_map<1>); m_ga20[1]->add_route(0, m_mixer, 1, AUTO_ALLOC_INPUT, 0); m_ga20[1]->add_route(1, m_mixer, 1, AUTO_ALLOC_INPUT, 1); - VGMVIZ(config, m_mixer, 0); + VGMVIZ(config, m_mixer); m_mixer->add_route(0, "lspeaker", 1); m_mixer->add_route(1, "rspeaker", 1); diff --git a/src/mame/visual/v100.cpp b/src/mame/visual/v100.cpp index 1b6969d6f4d..1c5badc2663 100644 --- a/src/mame/visual/v100.cpp +++ b/src/mame/visual/v100.cpp @@ -398,7 +398,7 @@ void v100_state::v100(machine_config &config) I8214(config, m_picu, 47.736_MHz_XTAL / 20); m_picu->int_wr_callback().set_inputline(m_maincpu, 0, ASSERT_LINE); - i8255_device &ppi(I8255(config, "ppi", 0)); + i8255_device &ppi(I8255(config, "ppi")); ppi.out_pa_callback().set(FUNC(v100_state::ppi_porta_w)); ppi.out_pb_callback().set(m_earom, FUNC(er1400_device::c3_w)).bit(6).invert(); ppi.out_pb_callback().append(m_earom, FUNC(er1400_device::c2_w)).bit(5).invert(); diff --git a/src/mame/visual/v102.cpp b/src/mame/visual/v102.cpp index f0672344cf7..b9c03c3878b 100644 --- a/src/mame/visual/v102.cpp +++ b/src/mame/visual/v102.cpp @@ -140,7 +140,7 @@ void v102_state::v102(machine_config &config) INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(18.575_MHz_XTAL / 6); pit.set_clk<1>(18.575_MHz_XTAL / 6); pit.set_clk<2>(18.575_MHz_XTAL / 6); diff --git a/src/mame/visual/v102_kbd.cpp b/src/mame/visual/v102_kbd.cpp index 65580e38556..31009288228 100644 --- a/src/mame/visual/v102_kbd.cpp +++ b/src/mame/visual/v102_kbd.cpp @@ -21,19 +21,19 @@ DEFINE_DEVICE_TYPE(V102_KEYBOARD, v102_keyboard_device, "v102_kbd", "Visual 102 DEFINE_DEVICE_TYPE(V550_KEYBOARD, v550_keyboard_device, "v550_kbd", "Visual 550 Keyboard") visual_mcs48_keyboard_device::visual_mcs48_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner) - : device_t(mconfig, type, tag, owner, 0U) + : device_t(mconfig, type, tag, owner) , m_txd_callback(*this) , m_kbdc(*this, "kbdc") , m_keys(*this, "KEY%u", 0U) { } -v102_keyboard_device::v102_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +v102_keyboard_device::v102_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : visual_mcs48_keyboard_device(mconfig, V102_KEYBOARD, tag, owner) { } -v550_keyboard_device::v550_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +v550_keyboard_device::v550_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : visual_mcs48_keyboard_device(mconfig, V550_KEYBOARD, tag, owner) { } @@ -356,7 +356,7 @@ void v102_keyboard_device::device_add_mconfig(machine_config &config) void v550_keyboard_device::device_add_mconfig(machine_config &config) { - I8039(config, m_kbdc, 4'608'000); + I8039(config, m_kbdc, XTAL::u(4'608'000)); m_kbdc->set_addrmap(AS_PROGRAM, &v550_keyboard_device::prog_map); m_kbdc->p1_in_cb().set(FUNC(v550_keyboard_device::p1_r)); m_kbdc->p2_out_cb().set(FUNC(v550_keyboard_device::p2_w)); diff --git a/src/mame/visual/v102_kbd.h b/src/mame/visual/v102_kbd.h index e9e0dd7e2d0..46b38b8478a 100644 --- a/src/mame/visual/v102_kbd.h +++ b/src/mame/visual/v102_kbd.h @@ -38,7 +38,7 @@ protected: class v102_keyboard_device : public visual_mcs48_keyboard_device { public: - v102_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + v102_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual ioport_constructor device_input_ports() const override; @@ -49,7 +49,7 @@ protected: class v550_keyboard_device : public visual_mcs48_keyboard_device { public: - v550_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + v550_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/visual/v1050.cpp b/src/mame/visual/v1050.cpp index 556a86d4f93..5f1d6a4c29e 100644 --- a/src/mame/visual/v1050.cpp +++ b/src/mame/visual/v1050.cpp @@ -1083,7 +1083,7 @@ void v1050_state::v1050(machine_config &config) clock_kb.signal_handler().set(FUNC(v1050_state::write_keyboard_clock)); // keyboard - v1050_keyboard_device &keyboard(V1050_KEYBOARD(config, V1050_KEYBOARD_TAG, 0)); + v1050_keyboard_device &keyboard(V1050_KEYBOARD(config, V1050_KEYBOARD_TAG)); keyboard.out_tx_handler().set(m_uart_kb, FUNC(i8251_device::write_rxd)); I8251(config, m_uart_sio, 0/*16_MHz_XTAL/8,*/); @@ -1109,7 +1109,7 @@ void v1050_state::v1050(machine_config &config) FLOPPY_CONNECTOR(config, MB8877_TAG":3", v1050_floppies, nullptr, floppy_image_device::default_mfm_floppy_formats); // SASI bus - SCSI_PORT(config, m_sasibus, 0); + SCSI_PORT(config, m_sasibus); m_sasibus->set_data_input_buffer(m_sasi_data_in); m_sasibus->req_handler().set(m_sasi_ctrl_in, FUNC(input_buffer_device::write_bit0)).exor(1); m_sasibus->bsy_handler().set(m_sasi_ctrl_in, FUNC(input_buffer_device::write_bit1)); diff --git a/src/mame/visual/v1050kb.cpp b/src/mame/visual/v1050kb.cpp index e488b6b602c..0ff4cbf0fd9 100644 --- a/src/mame/visual/v1050kb.cpp +++ b/src/mame/visual/v1050kb.cpp @@ -284,7 +284,7 @@ ioport_constructor v1050_keyboard_device::device_input_ports() const // v1050_keyboard_device - constructor //------------------------------------------------- -v1050_keyboard_device::v1050_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +v1050_keyboard_device::v1050_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, V1050_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8049_TAG), m_discrete(*this, DISCRETE_TAG), diff --git a/src/mame/visual/v1050kb.h b/src/mame/visual/v1050kb.h index 080b8531048..b66f229fcb2 100644 --- a/src/mame/visual/v1050kb.h +++ b/src/mame/visual/v1050kb.h @@ -25,7 +25,7 @@ class v1050_keyboard_device : public device_t { public: // construction/destruction - v1050_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v1050_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device flags static constexpr feature_type imperfect_features() { return feature::KEYBOARD; } diff --git a/src/mame/votrax/votrhv.cpp b/src/mame/votrax/votrhv.cpp index 5a52563e518..1a55c2f257a 100644 --- a/src/mame/votrax/votrhv.cpp +++ b/src/mame/votrax/votrhv.cpp @@ -667,7 +667,7 @@ void votrhv_state::votrhv(machine_config &config) /* basic machine hardware */ // ~1MHz done using two 74L123 multivibrators with cap 100pf res 11k, which each oscillate at 1.8-2.5mhz // since you need two clock phases for the 6800, each multivibrator does one phase and the falling edge of one triggers the other, so the actual clock rate is half the rate of each - M6800(config, m_maincpu, 2'000'000 / 2 ); + M6800(config, m_maincpu, XTAL::u(2'000'000) / 2 ); m_maincpu->set_addrmap(AS_PROGRAM, &votrhv_state::mem_map); INPUT_MERGER_ALL_LOW(config, m_reset).output_handler().set(FUNC(votrhv_state::reset_counter)); @@ -680,7 +680,7 @@ void votrhv_state::votrhv(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); // TEMPORARY HACK until 1818c device is done - VOTRAX_SC01(config, m_votrax, 720000); + VOTRAX_SC01(config, m_votrax, XTAL::u(720000)); m_votrax->ar_callback().set(FUNC(votrhv_state::pho_done)); m_votrax->add_route(ALL_OUTPUTS, "mono", 1.00); } diff --git a/src/mame/votrax/votrpss.cpp b/src/mame/votrax/votrpss.cpp index ddbc77d101b..920ba2c4d7b 100644 --- a/src/mame/votrax/votrpss.cpp +++ b/src/mame/votrax/votrpss.cpp @@ -570,13 +570,13 @@ void votrpss_state::votrpss(machine_config &config) ay.port_b_read_callback().set_ioport("DSW1"); ay.port_a_write_callback().set("votrax", FUNC(votrax_sc01_device::write)); ay.add_route(ALL_OUTPUTS, "mono", 0.25); - VOTRAX_SC01(config, "votrax", 720000).add_route(ALL_OUTPUTS, "mono", 1.00); /* the actual SC-01-A clock is generated by an R/C circuit PWMed by the timer1 output of the 8253 PIT to adjust the resistance, to allow for fine pitch control. 8253 Timer2 is used to PWM an analog switch on the output of the SC-01 to adjust the volume.*/ + VOTRAX_SC01(config, "votrax", XTAL::u(720000)).add_route(ALL_OUTPUTS, "mono", 1.00); /* the actual SC-01-A clock is generated by an R/C circuit PWMed by the timer1 output of the 8253 PIT to adjust the resistance, to allow for fine pitch control. 8253 Timer2 is used to PWM an analog switch on the output of the SC-01 to adjust the volume.*/ /* Devices */ - GENERIC_TERMINAL(config, m_terminal, 0); + GENERIC_TERMINAL(config, m_terminal); m_terminal->set_keyboard_callback(FUNC(votrpss_state::kbd_put)); - i8251_device &uart(I8251(config, "uart", 0)); + i8251_device &uart(I8251(config, "uart")); uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); uart.dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); uart.rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); @@ -587,7 +587,7 @@ void votrpss_state::votrpss(machine_config &config) rs232.dsr_handler().set("uart", FUNC(i8251_device::write_dsr)); rs232.cts_handler().set("uart", FUNC(i8251_device::write_cts)); - pit8253_device &pit(PIT8253(config, "pit", 0)); + pit8253_device &pit(PIT8253(config, "pit")); pit.set_clk<0>(8_MHz_XTAL); // Timer 0: baud rate gen for 8251 pit.out_handler<0>().set("uart", FUNC(i8251_device::write_txc)); pit.out_handler<0>().append("uart", FUNC(i8251_device::write_rxc)); diff --git a/src/mame/votrax/votrtnt.cpp b/src/mame/votrax/votrtnt.cpp index 74251ceb5dc..eae75bafef5 100644 --- a/src/mame/votrax/votrtnt.cpp +++ b/src/mame/votrax/votrtnt.cpp @@ -122,7 +122,7 @@ void votrtnt_state::machine_reset() { if (BIT(dips, i)) { - m_clock->set_unscaled_clock(75*speed*16); + m_clock->set_unscaled_clock(2.4576_MHz_XTAL / 2048 * speed); return; } speed *= 2; @@ -155,13 +155,13 @@ void votrtnt_state::votrtnt(machine_config &config) rs232.rxd_handler().set("acia", FUNC(acia6850_device::write_rxd)); rs232.cts_handler().set("acia", FUNC(acia6850_device::write_cts)); - CLOCK(config, m_clock, 153600); + CLOCK(config, m_clock, XTAL::u(153600)); m_clock->signal_handler().set("acia", FUNC(acia6850_device::write_txc)); m_clock->signal_handler().append("acia", FUNC(acia6850_device::write_rxc)); /* sound hardware */ SPEAKER(config, "mono").front_center(); - VOTRAX_SC01(config, m_votrax, 720000); // 720kHz? needs verify + VOTRAX_SC01(config, m_votrax, XTAL::u(720000)); // 720kHz? needs verify m_votrax->ar_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); m_votrax->add_route(ALL_OUTPUTS, "mono", 1.00); } diff --git a/src/mame/vsystem/aerofgt.cpp b/src/mame/vsystem/aerofgt.cpp index 1e327880f51..5e14bd2c08e 100644 --- a/src/mame/vsystem/aerofgt.cpp +++ b/src/mame/vsystem/aerofgt.cpp @@ -1475,7 +1475,7 @@ void aerofgt_state::pspikes(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pspikes); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(1); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); @@ -1492,7 +1492,7 @@ void aerofgt_state::pspikes(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 0.25); ymsnd.add_route(0, "rspeaker", 0.25); @@ -1528,7 +1528,7 @@ void aerofgt_state::spikes91(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_spikes91); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1562,14 +1562,14 @@ void aerofgt_state::pspikesb(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pspikesb); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_LOW); // clock frequency & pin 7 not verified, pin high causes sound pitch to be too high + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_LOW); // clock frequency & pin 7 not verified, pin high causes sound pitch to be too high m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1606,12 +1606,12 @@ void aerofgt_state::kickball(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_kickball); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(1); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - //VSYSTEM_GGA(config, "gga", 0); // still accessed as if it exists, in clone hardware? + //VSYSTEM_GGA(config, "gga"); // still accessed as if it exists, in clone hardware? MCFG_VIDEO_START_OVERRIDE(aerofgt_state,pspikes) @@ -1652,9 +1652,9 @@ void aerofgt_state::pspikesc(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pspikes); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(1); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); @@ -1664,7 +1664,7 @@ void aerofgt_state::pspikesc(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -1696,12 +1696,12 @@ void aerofgt_state::karatblz(machine_config &config) VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(2); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - VSYSTEM_SPR2(config, m_spr_old[1], 0); + VSYSTEM_SPR2(config, m_spr_old[1]); m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback)); m_spr_old[1]->set_gfx_region(3); m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); @@ -1750,17 +1750,17 @@ void aerofgt_state::karatblzbl(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_turbofrc); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024); - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(2); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - VSYSTEM_SPR2(config, m_spr_old[1], 0); + VSYSTEM_SPR2(config, m_spr_old[1]); m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback)); m_spr_old[1]->set_gfx_region(3); m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz) @@ -1807,12 +1807,12 @@ void aerofgt_state::spinlbrk(machine_config &config) VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_pritype(1); m_spr_old[0]->set_gfx_region(2); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - VSYSTEM_SPR2(config, m_spr_old[1], 0); + VSYSTEM_SPR2(config, m_spr_old[1]); m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::spinbrk_tile_callback)); // rom lookup m_spr_old[1]->set_pritype(1); m_spr_old[1]->set_gfx_region(3); @@ -1864,12 +1864,12 @@ void aerofgt_state::turbofrc(machine_config &config) VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(2); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - VSYSTEM_SPR2(config, m_spr_old[1], 0); + VSYSTEM_SPR2(config, m_spr_old[1]); m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback)); m_spr_old[1]->set_gfx_region(3); m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); @@ -1920,12 +1920,12 @@ void aerofgt_state::aerofgtb(machine_config &config) VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(2); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - VSYSTEM_SPR2(config, m_spr_old[1], 0); + VSYSTEM_SPR2(config, m_spr_old[1]); m_spr_old[1]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_ol2_tile_callback)); m_spr_old[1]->set_gfx_region(3); m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); @@ -1940,7 +1940,7 @@ void aerofgt_state::aerofgtb(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 0.25); ymsnd.add_route(0, "rspeaker", 0.25); @@ -1962,7 +1962,7 @@ void aerofgt_state::aerofgt(machine_config &config) MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt) MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt) - vs9209_device &io(VS9209(config, "io", 0)); + vs9209_device &io(VS9209(config, "io")); io.porta_input_cb().set_ioport("P1"); io.portb_input_cb().set_ioport("P2"); io.portc_input_cb().set_ioport("SYSTEM"); @@ -1972,7 +1972,7 @@ void aerofgt_state::aerofgt(machine_config &config) io.portg_output_cb().set("watchdog", FUNC(mb3773_device::write_line_ck)).bit(7); io.porth_input_cb().set_ioport("JP1"); - MB3773(config, "watchdog", 0); + MB3773(config, "watchdog"); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -1986,7 +1986,7 @@ void aerofgt_state::aerofgt(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_aerofgt); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024); - VSYSTEM_SPR(config, m_spr, 0); + VSYSTEM_SPR(config, m_spr); m_spr->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_tile_callback)); m_spr->set_gfx_region(2); m_spr->set_gfxdecode_tag(m_gfxdecode); @@ -2034,7 +2034,7 @@ void aerofgt_state::aerfboot(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_aerfboot); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) @@ -2044,7 +2044,7 @@ void aerofgt_state::aerfboot(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->set_addrmap(0, &aerofgt_state::oki_map); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -2071,14 +2071,14 @@ void aerofgt_state::aerfboo2(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_aerfboo2); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -2105,9 +2105,9 @@ void aerofgt_state::wbbc97(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_wbbc97); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(aerofgt_state::aerofgt_old_tile_callback)); m_spr_old[0]->set_gfx_region(1); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); @@ -2120,11 +2120,11 @@ void aerofgt_state::wbbc97(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 3579545)); + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(3579545))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified + OKIM6295(config, m_oki, XTAL::u(1056000), okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified m_oki->add_route(ALL_OUTPUTS, "mono", 0.50); } diff --git a/src/mame/vsystem/crshrace.cpp b/src/mame/vsystem/crshrace.cpp index 020602b2bce..115567103da 100644 --- a/src/mame/vsystem/crshrace.cpp +++ b/src/mame/vsystem/crshrace.cpp @@ -384,11 +384,11 @@ void crshrace_state::machine_reset() void crshrace_state::crshrace(machine_config &config) { // basic machine hardware - M68000(config, m_maincpu, 16000000); // 16 MHz ??? + M68000(config, m_maincpu, XTAL::u(16000000)); // 16 MHz ??? m_maincpu->set_addrmap(AS_PROGRAM, &crshrace_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(crshrace_state::irq1_line_hold)); - Z80(config, m_audiocpu, 4000000); // 4 MHz ??? + Z80(config, m_audiocpu, XTAL::u(4000000)); // 4 MHz ??? m_audiocpu->set_addrmap(AS_PROGRAM, &crshrace_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &crshrace_state::sound_io_map); @@ -405,7 +405,7 @@ void crshrace_state::crshrace(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_crshrace); PALETTE(config, m_palette).set_format(palette_device::xGBR_555, 2048); - VSYSTEM_SPR(config, m_spr, 0); + VSYSTEM_SPR(config, m_spr); m_spr->set_tile_indirect_cb(FUNC(crshrace_state::tile_callback)); m_spr->set_gfx_region(2); m_spr->set_gfxdecode_tag(m_gfxdecode); @@ -413,7 +413,7 @@ void crshrace_state::crshrace(machine_config &config) BUFFERED_SPRITERAM16(config, m_spriteram[0]); BUFFERED_SPRITERAM16(config, m_spriteram[1]); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_wrap(1); m_k053936->set_offsets(-48, -21); @@ -425,7 +425,7 @@ void crshrace_state::crshrace(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 0.25); ymsnd.add_route(0, "rspeaker", 0.25); diff --git a/src/mame/vsystem/f1gp.cpp b/src/mame/vsystem/f1gp.cpp index a8546346415..652b59e92f4 100644 --- a/src/mame/vsystem/f1gp.cpp +++ b/src/mame/vsystem/f1gp.cpp @@ -381,11 +381,11 @@ void f1gp_state::f1gp(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); /* 100 CPU slices per frame */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->irq_handler().set_inputline("sub", M68K_IRQ_3); m_acia->txd_handler().set("acia", FUNC(acia6850_device::write_rxd)); // loopback for now - clock_device &acia_clock(CLOCK(config, "acia_clock", 1000000)); // guessed + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(1000000))); // guessed acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); @@ -402,19 +402,19 @@ void f1gp_state::f1gp(machine_config &config) VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - VSYSTEM_SPR2(config, m_spr_old[0], 0); + VSYSTEM_SPR2(config, m_spr_old[0]); m_spr_old[0]->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<0>)); m_spr_old[0]->set_gfx_region(1); m_spr_old[0]->set_pritype(2); m_spr_old[0]->set_gfxdecode_tag(m_gfxdecode); - VSYSTEM_SPR2(config, m_spr_old[1], 0); + VSYSTEM_SPR2(config, m_spr_old[1]); m_spr_old[1]->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<1>)); m_spr_old[1]->set_gfx_region(2); m_spr_old[1]->set_pritype(2); m_spr_old[1]->set_gfxdecode_tag(m_gfxdecode); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_wrap(1); m_k053936->set_offsets(-58, -2); @@ -437,22 +437,22 @@ void f1gp_state::f1gp(machine_config &config) void f1gp_state::f1gpb(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 10000000); /* 10 MHz ??? */ + M68000(config, m_maincpu, XTAL::u(10000000)); /* 10 MHz ??? */ m_maincpu->set_addrmap(AS_PROGRAM, &f1gp_state::f1gpb_cpu1_map); m_maincpu->set_vblank_int("screen", FUNC(f1gp_state::irq1_line_hold)); - m68000_device &sub(M68000(config, "sub", 10000000)); /* 10 MHz ??? */ + m68000_device &sub(M68000(config, "sub", XTAL::u(10000000))); /* 10 MHz ??? */ sub.set_addrmap(AS_PROGRAM, &f1gp_state::f1gpb_cpu2_map); sub.set_vblank_int("screen", FUNC(f1gp_state::irq1_line_hold)); /* NO sound CPU */ config.set_maximum_quantum(attotime::from_hz(6000)); /* 100 CPU slices per frame */ - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->irq_handler().set_inputline("sub", M68K_IRQ_3); m_acia->txd_handler().set("acia", FUNC(acia6850_device::write_rxd)); // loopback for now - clock_device &acia_clock(CLOCK(config, "acia_clock", 1000000)); // guessed + clock_device &acia_clock(CLOCK(config, "acia_clock", XTAL::u(1000000))); // guessed acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc)); acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc)); @@ -467,12 +467,12 @@ void f1gp_state::f1gpb(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_f1gp); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - //VSYSTEM_GGA(config, "gga", 0); + //VSYSTEM_GGA(config, "gga"); /* sound hardware */ SPEAKER(config, "mono").front_center(); - okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified + okim6295_device &oki(OKIM6295(config, "oki", XTAL::u(1000000), okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified oki.add_route(ALL_OUTPUTS, "mono", 1.00); } @@ -493,7 +493,7 @@ void f1gp2_state::f1gp2(machine_config &config) config.device_remove("vsystem_spr_old1"); config.device_remove("vsystem_spr_old2"); - VSYSTEM_SPR(config, m_spr, 0); + VSYSTEM_SPR(config, m_spr); m_spr->set_tile_indirect_cb(FUNC(f1gp2_state::tile_callback<0>)); m_spr->set_gfx_region(1); m_spr->set_gfxdecode_tag(m_gfxdecode); diff --git a/src/mame/vsystem/fromanc2.cpp b/src/mame/vsystem/fromanc2.cpp index e9618d8196c..15661c3f074 100644 --- a/src/mame/vsystem/fromanc2.cpp +++ b/src/mame/vsystem/fromanc2.cpp @@ -542,7 +542,7 @@ void fromanc2_state::fromanc2(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); GENERIC_LATCH_8(config, m_soundlatch2); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.75); @@ -600,7 +600,7 @@ void fromanc2_state::fromancr(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); GENERIC_LATCH_8(config, m_soundlatch2); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.75); @@ -622,7 +622,7 @@ void fromanc2_state::fromanc4(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); - NS16550(config, m_uart, 2000000); // actual type is TL16C550CFN; clock unknown + NS16550(config, m_uart, XTAL::u(2000000)); // actual type is TL16C550CFN; clock unknown m_uart->out_int_callback().set_inputline("maincpu", M68K_IRQ_2); //m_uart->out_tx_callback().set("link", FUNC(rs232_port_device::write_txd)); //m_uart->out_rts_callback().set("link", FUNC(rs232_port_device::write_rts)); @@ -659,7 +659,7 @@ void fromanc2_state::fromanc4(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); GENERIC_LATCH_8(config, m_soundlatch2); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 0.75); diff --git a/src/mame/vsystem/fromance.cpp b/src/mame/vsystem/fromance.cpp index 9bef9de3f42..ed0c8b5d85a 100644 --- a/src/mame/vsystem/fromance.cpp +++ b/src/mame/vsystem/fromance.cpp @@ -935,7 +935,7 @@ void fromance_state::nekkyoku(machine_config &config) AY8910(config, "aysnd", 12000000/6).add_route(ALL_OUTPUTS, "mono", 0.15); // type not verified - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(fromance_state::fromance_adpcm_int)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.80); @@ -976,7 +976,7 @@ void fromance_state::idolmj(machine_config &config) YM2149(config, "aysnd", 12_MHz_XTAL / 6).add_route(ALL_OUTPUTS, "mono", 0.15); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(fromance_state::fromance_adpcm_int)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.80); @@ -1016,9 +1016,9 @@ void fromance_state::fromance(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - YM2413(config, "ymsnd", 3579545).add_route(ALL_OUTPUTS, "mono", 0.90); + YM2413(config, "ymsnd", XTAL::u(3579545)).add_route(ALL_OUTPUTS, "mono", 0.90); - MSM5205(config, m_msm, 384000); + MSM5205(config, m_msm, XTAL::u(384000)); m_msm->vck_legacy_callback().set(FUNC(fromance_state::fromance_adpcm_int)); /* IRQ handler */ m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8 KHz */ m_msm->add_route(ALL_OUTPUTS, "mono", 0.10); diff --git a/src/mame/vsystem/gstriker.cpp b/src/mame/vsystem/gstriker.cpp index 83866fa5103..e1ccb5864fa 100644 --- a/src/mame/vsystem/gstriker.cpp +++ b/src/mame/vsystem/gstriker.cpp @@ -629,7 +629,7 @@ void gstriker_state::base(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &gstriker_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &gstriker_state::sound_io_map); - vs9209_device &io(VS9209(config, "io", 0)); + vs9209_device &io(VS9209(config, "io")); io.porta_input_cb().set_ioport("P1"); io.portb_input_cb().set_ioport("P2"); io.portc_input_cb().set_ioport("SYSTEM"); @@ -638,7 +638,7 @@ void gstriker_state::base(machine_config &config) io.porth_input_cb().set("soundlatch", FUNC(generic_latch_8_device::pending_r)).lshift(0); io.porth_output_cb().set("watchdog", FUNC(mb3773_device::write_line_ck)).bit(3); - MB3773(config, m_watchdog, 0); + MB3773(config, m_watchdog); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); @@ -653,15 +653,15 @@ void gstriker_state::base(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_gstriker); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x800); - MB60553(config, m_bg, 0); + MB60553(config, m_bg); m_bg->set_gfxdecode_tag(m_gfxdecode); m_bg->set_gfx_region(1); - VS920A(config, m_tx, 0); + VS920A(config, m_tx); m_tx->set_gfxdecode_tag(m_gfxdecode); m_tx->set_gfx_region(0); - VSYSTEM_SPR(config, m_spr, 0); + VSYSTEM_SPR(config, m_spr); m_spr->set_gfx_region(2); m_spr->set_pal_mask(0x1f); m_spr->set_transpen(0); @@ -690,7 +690,7 @@ void gstriker_state::gstriker(machine_config &config) base(config); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->irq_handler().set_inputline(m_maincpu, M68K_IRQ_2); //m_acia->txd_handler().set("link", FUNC(rs232_port_device::write_txd)); //m_acia->rts_handler().set("link", FUNC(rs232_port_device::write_rts)); diff --git a/src/mame/vsystem/inufuku.cpp b/src/mame/vsystem/inufuku.cpp index 39935c72517..45fa3a00c1e 100644 --- a/src/mame/vsystem/inufuku.cpp +++ b/src/mame/vsystem/inufuku.cpp @@ -556,7 +556,7 @@ void inufuku_state::inufuku(machine_config &config) screen.screen_vblank().set(m_sprattrram, FUNC(buffered_spriteram16_device::vblank_copy_rising)); screen.set_palette(m_palette); - VSYSTEM_SPR(config, m_spr, 0); + VSYSTEM_SPR(config, m_spr); m_spr->set_offsets(0, 1); // reference videos confirm at least the +1 against tilemaps in 3on3dunk (the highscore header text and black box are meant to be 1 pixel misaligned, although there is currently a priority bug there too) m_spr->set_pdraw(true); m_spr->set_tile_indirect_cb(FUNC(inufuku_state::tile_callback)); diff --git a/src/mame/vsystem/mb60553.cpp b/src/mame/vsystem/mb60553.cpp index 2438cf24cc9..a441f388322 100644 --- a/src/mame/vsystem/mb60553.cpp +++ b/src/mame/vsystem/mb60553.cpp @@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(MB60553, mb60553_zooming_tilemap_device, "mb60553", "MB60553 Zooming Tilemap") -mb60553_zooming_tilemap_device::mb60553_zooming_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb60553_zooming_tilemap_device::mb60553_zooming_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB60553, tag, owner, clock) , m_tmap(nullptr) , m_vram() diff --git a/src/mame/vsystem/mb60553.h b/src/mame/vsystem/mb60553.h index 80b3758289d..a6977da7487 100644 --- a/src/mame/vsystem/mb60553.h +++ b/src/mame/vsystem/mb60553.h @@ -16,7 +16,7 @@ public: template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfx_region = gfxregion; } - mb60553_zooming_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb60553_zooming_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_pal_base(int pal_base) { m_pal_base = pal_base; } void set_transparent_pen(pen_t pen) { m_tmap->set_transparent_pen(pen); } diff --git a/src/mame/vsystem/ojankohs.cpp b/src/mame/vsystem/ojankohs.cpp index a67379dfef7..a73ae53dbec 100644 --- a/src/mame/vsystem/ojankohs.cpp +++ b/src/mame/vsystem/ojankohs.cpp @@ -708,7 +708,7 @@ void ojankohs_state::machine_reset() void ojankohs_state::ojankohs(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 12'000'000 / 2); // 6.00 MHz ? + Z80(config, m_maincpu, XTAL::u(12'000'000) / 2); // 6.00 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &ojankohs_state::map); m_maincpu->set_addrmap(AS_IO, &ojankohs_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(ojankohs_state::irq0_line_hold)); @@ -732,12 +732,12 @@ void ojankohs_state::ojankohs(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ym2149_device &aysnd(YM2149(config, "aysnd", 12'000'000 / 6)); + ym2149_device &aysnd(YM2149(config, "aysnd", XTAL::u(12'000'000) / 6)); aysnd.port_a_read_callback().set(FUNC(ojankohs_state::dipsw1_r)); aysnd.port_b_read_callback().set(FUNC(ojankohs_state::dipsw2_r)); aysnd.add_route(ALL_OUTPUTS, "mono", 0.15); - MSM5205(config, m_msm, 384'000); + MSM5205(config, m_msm, XTAL::u(384'000)); m_msm->vck_legacy_callback().set(FUNC(ojankohs_state::adpcm_int)); // IRQ handler m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8 KHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); @@ -746,7 +746,7 @@ void ojankohs_state::ojankohs(machine_config &config) void ojankoy_state::ojankoy(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 12'000'000 / 2); // 6.00 MHz ? + Z80(config, m_maincpu, XTAL::u(12'000'000) / 2); // 6.00 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &ojankoy_state::map); m_maincpu->set_addrmap(AS_IO, &ojankoy_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(ojankoy_state::irq0_line_hold)); @@ -768,12 +768,12 @@ void ojankoy_state::ojankoy(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 12'000'000 / 8)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(12'000'000) / 8)); aysnd.port_a_read_callback().set_ioport("dsw1"); aysnd.port_b_read_callback().set_ioport("dsw2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.15); - MSM5205(config, m_msm, 384'000); + MSM5205(config, m_msm, XTAL::u(384'000)); m_msm->vck_legacy_callback().set(FUNC(ojankoy_state::adpcm_int)); // IRQ handler m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8 KHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); @@ -782,7 +782,7 @@ void ojankoy_state::ojankoy(machine_config &config) void ccasino_state::ccasino(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 12'000'000 / 2); // 6.00 MHz ? + Z80(config, m_maincpu, XTAL::u(12'000'000) / 2); // 6.00 MHz ? m_maincpu->set_addrmap(AS_PROGRAM, &ccasino_state::map); m_maincpu->set_addrmap(AS_IO, &ccasino_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(ccasino_state::irq0_line_hold)); @@ -807,12 +807,12 @@ void ccasino_state::ccasino(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - ay8910_device &aysnd(AY8910(config, "aysnd", 12'000'000 / 8)); + ay8910_device &aysnd(AY8910(config, "aysnd", XTAL::u(12'000'000) / 8)); aysnd.port_a_read_callback().set_ioport("dsw1"); aysnd.port_b_read_callback().set_ioport("dsw2"); aysnd.add_route(ALL_OUTPUTS, "mono", 0.15); - MSM5205(config, m_msm, 384'000); + MSM5205(config, m_msm, XTAL::u(384'000)); m_msm->vck_legacy_callback().set(FUNC(ccasino_state::adpcm_int)); // IRQ handler m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8 KHz m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); diff --git a/src/mame/vsystem/pipedrm.cpp b/src/mame/vsystem/pipedrm.cpp index a9096600b48..42a65864413 100644 --- a/src/mame/vsystem/pipedrm.cpp +++ b/src/mame/vsystem/pipedrm.cpp @@ -673,7 +673,7 @@ void pipedrm_state::pipedrm(machine_config &config) VSYSTEM_GGA(config, m_gga, XTAL(14'318'181) / 2); // divider not verified m_gga->write_cb().set(FUNC(pipedrm_state::fromance_gga_data_w)); - VSYSTEM_SPR2(config, m_spr_old, 0); + VSYSTEM_SPR2(config, m_spr_old); m_spr_old->set_gfx_region(2); m_spr_old->set_offsets(-13, -6); m_spr_old->set_pritype(3); @@ -686,7 +686,7 @@ void pipedrm_state::pipedrm(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_subcpu, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline("sub", 0); ymsnd.add_route(0, "mono", 0.50); ymsnd.add_route(1, "mono", 1.0); @@ -730,7 +730,7 @@ void hatris_state::hatris(machine_config &config) // sound board. //m_soundlatch->data_pending_callback().set_inputline(m_subcpu, INPUT_LINE_NMI); - ym2608_device &ym2608(YM2608(config, "ymsnd", 8000000)); + ym2608_device &ym2608(YM2608(config, "ymsnd", XTAL::u(8000000))); ym2608.irq_handler().set_inputline("sub", 0); ym2608.add_route(0, "mono", 0.50); ym2608.add_route(1, "mono", 1.0); diff --git a/src/mame/vsystem/suprslam.cpp b/src/mame/vsystem/suprslam.cpp index 663522f3fdc..589706eaeae 100644 --- a/src/mame/vsystem/suprslam.cpp +++ b/src/mame/vsystem/suprslam.cpp @@ -437,7 +437,7 @@ void suprslam_state::suprslam(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &suprslam_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &suprslam_state::sound_io_map); - vs9209_device &io(VS9209(config, "io", 0)); + vs9209_device &io(VS9209(config, "io")); io.porta_input_cb().set_ioport("P1"); io.portb_input_cb().set_ioport("P2"); io.portc_input_cb().set_ioport("SYSTEM"); @@ -458,12 +458,12 @@ void suprslam_state::suprslam(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xGBR_555, 0x800); - VSYSTEM_SPR(config, m_spr, 0); + VSYSTEM_SPR(config, m_spr); m_spr->set_tile_indirect_cb(FUNC(suprslam_state::tile_callback)); m_spr->set_gfx_region(1); m_spr->set_gfxdecode_tag(m_gfxdecode); - K053936(config, m_k053936, 0); + K053936(config, m_k053936); m_k053936->set_wrap(1); m_k053936->set_offsets(-45, -21); diff --git a/src/mame/vsystem/tail2nos.cpp b/src/mame/vsystem/tail2nos.cpp index 5e4ddb6a50e..69b5e07135b 100644 --- a/src/mame/vsystem/tail2nos.cpp +++ b/src/mame/vsystem/tail2nos.cpp @@ -482,7 +482,7 @@ void tail2nos_state::tail2nos(machine_config &config) m_audiocpu->set_addrmap(AS_IO, &tail2nos_state::sound_port_map); // IRQs are triggered by the YM2608 - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->irq_handler().set_inputline("maincpu", M68K_IRQ_3); //m_acia->txd_handler().set("link", FUNC(rs232_port_device::write_txd)); //m_acia->rts_handler().set("link", FUNC(rs232_port_device::write_rts)); @@ -499,7 +499,7 @@ void tail2nos_state::tail2nos(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_tail2nos); PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048); - K051316(config, m_k051316, 0); + K051316(config, m_k051316); m_k051316->set_palette(m_palette); m_k051316->set_bpp(-4); m_k051316->set_offsets(-89, -14); diff --git a/src/mame/vsystem/taotaido.cpp b/src/mame/vsystem/taotaido.cpp index c1f60d48514..5ff5f1503e4 100644 --- a/src/mame/vsystem/taotaido.cpp +++ b/src/mame/vsystem/taotaido.cpp @@ -345,7 +345,7 @@ void taotaido_state::taotaido(machine_config &config) m_audiocpu->set_addrmap(AS_PROGRAM, &taotaido_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &taotaido_state::sound_port_map); /* IRQs are triggered by the YM2610 */ - vs9209_device &io1(VS9209(config, "io1", 0)); + vs9209_device &io1(VS9209(config, "io1")); io1.porta_input_cb().set_ioport("P1"); io1.portb_input_cb().set_ioport("P2"); io1.portc_input_cb().set_ioport("SYSTEM"); @@ -355,11 +355,11 @@ void taotaido_state::taotaido(machine_config &config) io1.portg_output_cb().set(FUNC(taotaido_state::unknown_output_w)); io1.porth_input_cb().set_ioport("JP"); - vs9209_device &io2(VS9209(config, "io2", 0)); + vs9209_device &io2(VS9209(config, "io2")); io2.porta_input_cb().set_ioport("P3"); // used only by taotaida io2.portb_input_cb().set_ioport("P4"); // used only by taotaida - MB3773(config, m_watchdog, 0); + MB3773(config, m_watchdog); GFXDECODE(config, m_gfxdecode, "palette", gfx_taotaido); @@ -374,7 +374,7 @@ void taotaido_state::taotaido(machine_config &config) PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x800); - VSYSTEM_SPR(config, m_spr, 0); + VSYSTEM_SPR(config, m_spr); m_spr->set_tile_indirect_cb(FUNC(taotaido_state::tile_callback)); m_spr->set_gfx_region(0); m_spr->set_gfxdecode_tag(m_gfxdecode); @@ -387,7 +387,7 @@ void taotaido_state::taotaido(machine_config &config) m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); m_soundlatch->set_separate_acknowledge(true); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "lspeaker", 0.25); ymsnd.add_route(0, "rspeaker", 0.25); diff --git a/src/mame/vsystem/vs9209.cpp b/src/mame/vsystem/vs9209.cpp index 49dd131f6e0..e59782eb44e 100644 --- a/src/mame/vsystem/vs9209.cpp +++ b/src/mame/vsystem/vs9209.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(VS9209, vs9209_device, "vs9209", "VS9209 I/O") // vs9209_device - constructor //------------------------------------------------- -vs9209_device::vs9209_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vs9209_device::vs9209_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VS9209, tag, owner, clock) , m_input_cb(*this) , m_output_cb(*this) diff --git a/src/mame/vsystem/vs9209.h b/src/mame/vsystem/vs9209.h index 820b44868f9..326d5d45ab1 100644 --- a/src/mame/vsystem/vs9209.h +++ b/src/mame/vsystem/vs9209.h @@ -21,7 +21,7 @@ class vs9209_device : public device_t { public: // construction/destruction - vs9209_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vs9209_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto porta_input_cb() { return m_input_cb[0].bind(); } diff --git a/src/mame/vsystem/vs920a.cpp b/src/mame/vsystem/vs920a.cpp index d3f5e476ac1..663e22113ee 100644 --- a/src/mame/vsystem/vs920a.cpp +++ b/src/mame/vsystem/vs920a.cpp @@ -32,7 +32,7 @@ t=tile, p=palette DEFINE_DEVICE_TYPE(VS920A, vs920a_text_tilemap_device, "vs920a", "VS920A Text Tilemap") -vs920a_text_tilemap_device::vs920a_text_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vs920a_text_tilemap_device::vs920a_text_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VS920A, tag, owner, clock) , m_tmap(nullptr) , m_vram() diff --git a/src/mame/vsystem/vs920a.h b/src/mame/vsystem/vs920a.h index 0bcb60d75f7..fe8b814456b 100644 --- a/src/mame/vsystem/vs920a.h +++ b/src/mame/vsystem/vs920a.h @@ -14,7 +14,7 @@ public: template void set_gfxdecode_tag(T &&tag) { m_gfxdecode.set_tag(std::forward(tag)); } void set_gfx_region(int gfxregion) { m_gfx_region = gfxregion; } - vs920a_text_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vs920a_text_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_pal_base(int pal_base) { m_pal_base = pal_base; } void set_transparent_pen(pen_t pen) { m_tmap->set_transparent_pen(pen); } diff --git a/src/mame/vsystem/vsystem_gga.cpp b/src/mame/vsystem/vsystem_gga.cpp index 945c813af42..42df6f724bc 100644 --- a/src/mame/vsystem/vsystem_gga.cpp +++ b/src/mame/vsystem/vsystem_gga.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(VSYSTEM_GGA, vsystem_gga_device, "vsystem_gga", "Video System // vsystem_gga_device - constructor //------------------------------------------------- -vsystem_gga_device::vsystem_gga_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +vsystem_gga_device::vsystem_gga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VSYSTEM_GGA, tag, owner, clock), device_video_interface(mconfig, *this, false), m_write_cb(*this) diff --git a/src/mame/vsystem/vsystem_gga.h b/src/mame/vsystem/vsystem_gga.h index fa2b36284aa..d5f75ff72c4 100644 --- a/src/mame/vsystem/vsystem_gga.h +++ b/src/mame/vsystem/vsystem_gga.h @@ -57,7 +57,7 @@ class vsystem_gga_device : public device_t, public device_video_interface { public: // construction/destruction - vsystem_gga_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + vsystem_gga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration auto write_cb() { return m_write_cb.bind(); } diff --git a/src/mame/vsystem/vsystem_spr.cpp b/src/mame/vsystem/vsystem_spr.cpp index 0c716e84e9c..f20f46f7ef8 100644 --- a/src/mame/vsystem/vsystem_spr.cpp +++ b/src/mame/vsystem/vsystem_spr.cpp @@ -66,7 +66,7 @@ Abstracts the VS9210 DEFINE_DEVICE_TYPE(VSYSTEM_SPR, vsystem_spr_device, "vsystem_spr", "Video System VS9108 Sprites") -vsystem_spr_device::vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vsystem_spr_device::vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VSYSTEM_SPR, tag, owner, clock) , m_newtilecb(*this, DEVICE_SELF, FUNC(vsystem_spr_device::tile_callback_noindirect)) , m_xoffs(0) diff --git a/src/mame/vsystem/vsystem_spr.h b/src/mame/vsystem/vsystem_spr.h index 40e0a3f1128..16e8ec5178c 100644 --- a/src/mame/vsystem/vsystem_spr.h +++ b/src/mame/vsystem/vsystem_spr.h @@ -28,7 +28,7 @@ public: void set_pal_mask(int pal_mask) { m_pal_mask = pal_mask; } void set_transpen(int transpen) { m_transpen = transpen; } - vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void draw_sprites(uint16_t const *spriteram, int spriteram_bytes, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int prihack_mask = -1, int prihack_val = -1 ); diff --git a/src/mame/vsystem/vsystem_spr2.cpp b/src/mame/vsystem/vsystem_spr2.cpp index aa62f29ce30..d6bb2a27687 100644 --- a/src/mame/vsystem/vsystem_spr2.cpp +++ b/src/mame/vsystem/vsystem_spr2.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(VSYSTEM_SPR2, vsystem_spr2_device, "vsystem2_spr", "Video System VS8904/VS8905 Sprites") -vsystem_spr2_device::vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vsystem_spr2_device::vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VSYSTEM_SPR2, tag, owner, clock) , m_newtilecb(*this, DEVICE_SELF, FUNC(vsystem_spr2_device::tile_callback_noindirect)) , m_pritype(0) // hack until we have better handling diff --git a/src/mame/vsystem/vsystem_spr2.h b/src/mame/vsystem/vsystem_spr2.h index 87e28ecff9e..d9203f89569 100644 --- a/src/mame/vsystem/vsystem_spr2.h +++ b/src/mame/vsystem/vsystem_spr2.h @@ -21,7 +21,7 @@ public: m_yoffs = yoffs; } - vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vsystem_spr2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void turbofrc_draw_sprites(uint16_t const *spriteram3, int spriteram3_bytes, int spritepalettebank, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param, bool flip_screen = false); void turbofrc_draw_sprites(uint16_t const *spriteram3, int spriteram3_bytes, int spritepalettebank, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, int pri_param, bool flip_screen = false); diff --git a/src/mame/vsystem/welltris.cpp b/src/mame/vsystem/welltris.cpp index 171508ce725..b9be29df053 100644 --- a/src/mame/vsystem/welltris.cpp +++ b/src/mame/vsystem/welltris.cpp @@ -846,7 +846,7 @@ void welltris_state::welltris(machine_config &config) VSYSTEM_GGA(config, "gga", XTAL(14'318'181) / 2); // divider not verified - VSYSTEM_SPR2(config, m_spr_old, 0); + VSYSTEM_SPR2(config, m_spr_old); m_spr_old->set_gfx_region(1); m_spr_old->set_pritype(-1); m_spr_old->set_gfxdecode_tag(m_gfxdecode); @@ -858,7 +858,7 @@ void welltris_state::welltris(machine_config &config) soundlatch.data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI); soundlatch.set_separate_acknowledge(true); - ym2610_device &ymsnd(YM2610(config, "ymsnd", 8000000)); + ym2610_device &ymsnd(YM2610(config, "ymsnd", XTAL::u(8000000))); ymsnd.irq_handler().set_inputline(m_audiocpu, 0); ymsnd.add_route(0, "mono", 0.25); ymsnd.add_route(1, "mono", 0.75); diff --git a/src/mame/vtech/crvision.cpp b/src/mame/vtech/crvision.cpp index 86dede84006..2fbaf0a220c 100644 --- a/src/mame/vtech/crvision.cpp +++ b/src/mame/vtech/crvision.cpp @@ -802,7 +802,7 @@ void crvision_state::creativision(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &crvision_state::crvision_map); // devices - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(crvision_state::pia_pa_r)); m_pia->readpb_handler().set(FUNC(crvision_state::pia_pb_r)); m_pia->writepa_handler().set(FUNC(crvision_state::pia_pa_w)); @@ -821,7 +821,7 @@ void crvision_state::creativision(machine_config &config) CENTRONICS(config, m_centronics, centronics_devices, "printer"); m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit7)); - INPUT_BUFFER(config, "cent_status_in", 0); + INPUT_BUFFER(config, "cent_status_in"); OUTPUT_LATCH(config, m_cent_data_out); m_centronics->set_output_latch(*m_cent_data_out); @@ -881,7 +881,7 @@ void laser2001_state::lasr2001(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &laser2001_state::lasr2001_map); // devices - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(laser2001_state::pia_pa_r)); m_pia->readpb_handler().set(FUNC(laser2001_state::pia_pb_r)); m_pia->readca1_handler().set(FUNC(laser2001_state::pia_ca1_r)); diff --git a/src/mame/vtech/gamemachine.cpp b/src/mame/vtech/gamemachine.cpp index db7fe8aa554..d3a8eae456e 100644 --- a/src/mame/vtech/gamemachine.cpp +++ b/src/mame/vtech/gamemachine.cpp @@ -359,7 +359,7 @@ void gm_state::gamemach(machine_config &config) config.set_default_layout(layout_gamemach); // sound hardware - NETLIST_SOUND(config, "snd_nl", 48000).set_source(NETLIST_NAME(gamemachine)).add_route(ALL_OUTPUTS, "mono", 1.0); + NETLIST_SOUND(config, "snd_nl", XTAL::u(48000)).set_source(NETLIST_NAME(gamemachine)).add_route(ALL_OUTPUTS, "mono", 1.0); NETLIST_STREAM_OUTPUT(config, "snd_nl:cout0", 0, "SPK1.2").set_mult_offset(-10000.0 / 32768.0, 10000.0 * 3.75 / 32768.0); NETLIST_LOGIC_INPUT(config, "snd_nl:p08", "P08.IN", 0); diff --git a/src/mame/vtech/geniusjr.cpp b/src/mame/vtech/geniusjr.cpp index 7be46e41481..721ac777783 100644 --- a/src/mame/vtech/geniusjr.cpp +++ b/src/mame/vtech/geniusjr.cpp @@ -260,7 +260,7 @@ void geniusjr_state::machine_start() void geniusjr_state::gj4000(machine_config &config) { - M68HC05L9(config, m_maincpu, 8'000'000); // unknown clock + M68HC05L9(config, m_maincpu, XTAL::u(8'000'000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &geniusjr_state::gj4000_map); m_bank_size = 0x8000; @@ -277,7 +277,7 @@ void geniusjr_state::gln(machine_config &config) void geniusjr_state::gj5000(machine_config &config) { - M68HC05L9(config, m_maincpu, 8'000'000); // unknown clock (type also uncertain) + M68HC05L9(config, m_maincpu, XTAL::u(8'000'000)); // unknown clock (type also uncertain) m_maincpu->set_addrmap(AS_PROGRAM, &geniusjr_state::gj5000_map); m_bank_size = 0x4000; @@ -287,7 +287,7 @@ void geniusjr_state::gj5000(machine_config &config) void geniusjr_state::gjrstar(machine_config &config) { - M68HC05L9(config, m_maincpu, 8'000'000); // unknown clock (type also uncertain, could be L7 instead of L9) + M68HC05L9(config, m_maincpu, XTAL::u(8'000'000)); // unknown clock (type also uncertain, could be L7 instead of L9) m_maincpu->set_addrmap(AS_PROGRAM, &geniusjr_state::gjrstar_map); m_bank_size = 0x2000; diff --git a/src/mame/vtech/glcx.cpp b/src/mame/vtech/glcx.cpp index 0d8a9b3fb4c..0a5830c5443 100644 --- a/src/mame/vtech/glcx.cpp +++ b/src/mame/vtech/glcx.cpp @@ -85,7 +85,7 @@ INPUT_PORTS_END void glcx_state::glcx(machine_config &config) { /* basic machine hardware */ - CR16B(config, m_maincpu, 10000000); // FIXME: determine exact type and clock + CR16B(config, m_maincpu, XTAL::u(10000000)); // FIXME: determine exact type and clock m_maincpu->set_addrmap(AS_PROGRAM, &glcx_state::mem_map); /* video hardware */ diff --git a/src/mame/vtech/innotv_innotabmax.cpp b/src/mame/vtech/innotv_innotabmax.cpp index fb829bc8181..32dd4fc24b3 100644 --- a/src/mame/vtech/innotv_innotabmax.cpp +++ b/src/mame/vtech/innotv_innotabmax.cpp @@ -138,7 +138,7 @@ void vtech_innotv_innotabmax_state::main_map(address_map &map) void vtech_innotv_innotabmax_state::vtech_innotv_innotabmax(machine_config &config) { - ARM9(config, m_maincpu, 240000000); // unknown core type / frequency, but confirmed as ARM based + ARM9(config, m_maincpu, XTAL::u(240000000)); // unknown core type / frequency, but confirmed as ARM based m_maincpu->set_addrmap(AS_PROGRAM, &vtech_innotv_innotabmax_state::main_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/vtech/inteladv.cpp b/src/mame/vtech/inteladv.cpp index 440438d46a3..36c5aeae8b0 100644 --- a/src/mame/vtech/inteladv.cpp +++ b/src/mame/vtech/inteladv.cpp @@ -68,14 +68,14 @@ INPUT_PORTS_END void inteladv_state::inteladv(machine_config &config) { - ST2205U(config, m_maincpu, 4000000); + ST2205U(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_DATA, &inteladv_state::inteladv_map); m_maincpu->in_pa_callback().set_ioport("POWER"); } void inteladv_state::dyndesk(machine_config &config) { - ST2202(config, m_maincpu, 4000000); + ST2202(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_DATA, &inteladv_state::dyndesk_map); m_maincpu->in_pa_callback().set_ioport("POWER"); } diff --git a/src/mame/vtech/laser3k.cpp b/src/mame/vtech/laser3k.cpp index 686958d4821..43ce9b549a3 100644 --- a/src/mame/vtech/laser3k.cpp +++ b/src/mame/vtech/laser3k.cpp @@ -960,7 +960,7 @@ void laser3k_state::laser3k_palette(palette_device &palette) const void laser3k_state::laser3k(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, 1021800); + M6502(config, m_maincpu, XTAL::u(1021800)); m_maincpu->set_addrmap(AS_PROGRAM, &laser3k_state::laser3k_map); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); @@ -982,7 +982,7 @@ void laser3k_state::laser3k(machine_config &config) RAM(config, "mainram").set_default_size("192K"); /* the 8048 isn't dumped, so substitute modified real Apple II h/w */ - AY3600(config, m_ay3600, 0); + AY3600(config, m_ay3600); m_ay3600->x0().set_ioport("X0"); m_ay3600->x1().set_ioport("X1"); m_ay3600->x2().set_ioport("X2"); @@ -999,7 +999,7 @@ void laser3k_state::laser3k(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); - SN76489(config, m_sn, 1020484).add_route(ALL_OUTPUTS, "mono", 0.50); + SN76489(config, m_sn, XTAL::u(1020484)).add_route(ALL_OUTPUTS, "mono", 0.50); } ROM_START(las3000) diff --git a/src/mame/vtech/lcmate2.cpp b/src/mame/vtech/lcmate2.cpp index e5d13c6d502..81e138231b8 100644 --- a/src/mame/vtech/lcmate2.cpp +++ b/src/mame/vtech/lcmate2.cpp @@ -253,7 +253,7 @@ void lcmate2_state::lcmate2(machine_config &config) PALETTE(config, "palette", FUNC(lcmate2_state::lcmate2_palette), 2); GFXDECODE(config, "gfxdecode", "palette", gfx_lcmate2); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 20); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); diff --git a/src/mame/vtech/pc2000.cpp b/src/mame/vtech/pc2000.cpp index 8000aa9abe8..7b6c7e24886 100644 --- a/src/mame/vtech/pc2000.cpp +++ b/src/mame/vtech/pc2000.cpp @@ -931,7 +931,7 @@ void pc2000_state::pc2000gen(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 1.00); GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "genius_cart").set_device_load(FUNC(pc2000_state::cart_load)); @@ -941,14 +941,14 @@ void pc2000_state::pc2000gen(machine_config &config) void pc2000_state::pc2000(machine_config &config) { pc2000gen(config); - HD44780(config, m_lcdc, 0); + HD44780(config, m_lcdc); m_lcdc->set_lcd_size(2, 20); } void pc2000_state::pc2000eur(machine_config &config) { pc2000gen(config); - SED1278_0B(config, m_lcdc, 0); + SED1278_0B(config, m_lcdc); m_lcdc->set_lcd_size(2, 20); } diff --git a/src/mame/vtech/pc4.cpp b/src/mame/vtech/pc4.cpp index bf8e634ad7b..928fdda37ff 100644 --- a/src/mame/vtech/pc4.cpp +++ b/src/mame/vtech/pc4.cpp @@ -243,7 +243,7 @@ void pc4_state::pc4(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.00); + BEEP(config, m_beep, XTAL::u(3250)).add_route(ALL_OUTPUTS, "mono", 1.00); RP5C01(config, "rtc", XTAL(32'768)); } diff --git a/src/mame/vtech/socrates_a.cpp b/src/mame/vtech/socrates_a.cpp index 8f5c6dfbfed..126ea042102 100644 --- a/src/mame/vtech/socrates_a.cpp +++ b/src/mame/vtech/socrates_a.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(SOCRATES_SOUND, socrates_snd_device, "socrates_snd", "Socrate // socrates_snd_device - constructor //------------------------------------------------- -socrates_snd_device::socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +socrates_snd_device::socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SOCRATES_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) { diff --git a/src/mame/vtech/socrates_a.h b/src/mame/vtech/socrates_a.h index 2f4c8693016..79d525ecf9d 100644 --- a/src/mame/vtech/socrates_a.h +++ b/src/mame/vtech/socrates_a.h @@ -9,7 +9,7 @@ class socrates_snd_device : public device_t, public device_sound_interface { public: - socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + socrates_snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void reg0_w(int data); void reg1_w(int data); diff --git a/src/mame/vtech/storio.cpp b/src/mame/vtech/storio.cpp index 5ac9c6afbc2..0b77538c596 100644 --- a/src/mame/vtech/storio.cpp +++ b/src/mame/vtech/storio.cpp @@ -98,7 +98,7 @@ INPUT_PORTS_END void vtech_storio_state::vtech_storio_base(machine_config &config) { - ARM9(config, m_maincpu, 240000000); // ARM926EJ-S CPU core (probably 240MHz, but not sure) + ARM9(config, m_maincpu, XTAL::u(240000000)); // ARM926EJ-S CPU core (probably 240MHz, but not sure) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); diff --git a/src/mame/vtech/vtech2.cpp b/src/mame/vtech/vtech2.cpp index 003e1549217..9c38ed24c97 100644 --- a/src/mame/vtech/vtech2.cpp +++ b/src/mame/vtech/vtech2.cpp @@ -465,7 +465,7 @@ static const floppy_interface vtech2_floppy_interface = void vtech2_state::laser350(machine_config &config) { /* basic machine hardware */ - Z80(config, m_maincpu, 3694700); /* 3.694700 MHz */ + Z80(config, m_maincpu, XTAL::u(3694700)); /* 3.694700 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &vtech2_state::mem_map); m_maincpu->set_addrmap(AS_IO, &vtech2_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(vtech2_state::irq0_line_hold)); diff --git a/src/mame/vtech/vtech_eu3a12.cpp b/src/mame/vtech/vtech_eu3a12.cpp index 60552ba2544..d9e2216d08a 100644 --- a/src/mame/vtech/vtech_eu3a12.cpp +++ b/src/mame/vtech/vtech_eu3a12.cpp @@ -139,7 +139,7 @@ void vreadere_state::palette_init(palette_device &palette) void vreadere_state::vreadere(machine_config &config) { - EPG3231(config, m_maincpu, 8'000'000); + EPG3231(config, m_maincpu, XTAL::u(8'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &vreadere_state::prog_map); m_maincpu->out_portb_cb().set(FUNC(vreadere_state::portb_w)); m_maincpu->in_portc_cb().set(FUNC(vreadere_state::portc_r)); diff --git a/src/mame/vtech/vtech_innotab.cpp b/src/mame/vtech/vtech_innotab.cpp index c467bc565a0..76f5bb292c9 100644 --- a/src/mame/vtech/vtech_innotab.cpp +++ b/src/mame/vtech/vtech_innotab.cpp @@ -81,7 +81,7 @@ INPUT_PORTS_END void vtech_innotab_state::vtech_innotab(machine_config& config) { - ARM9(config, m_maincpu, 240000000); // unknown ARM type + ARM9(config, m_maincpu, XTAL::u(240000000)); // unknown ARM type SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); diff --git a/src/mame/wang/wangpc.cpp b/src/mame/wang/wangpc.cpp index 93ed05aa9e3..ad22b29818a 100644 --- a/src/mame/wang/wangpc.cpp +++ b/src/mame/wang/wangpc.cpp @@ -1271,14 +1271,14 @@ void wangpc_state::on_disk1_unload(floppy_image_device *image) void wangpc_state::wangpc(machine_config &config) { - I8086(config, m_maincpu, 8000000); + I8086(config, m_maincpu, XTAL::u(8000000)); m_maincpu->set_addrmap(AS_PROGRAM, &wangpc_state::wangpc_mem); m_maincpu->set_addrmap(AS_IO, &wangpc_state::wangpc_io); m_maincpu->set_irq_acknowledge_callback(I8259A_TAG, FUNC(pic8259_device::inta_cb)); //config.m_perfect_cpu_quantum = subtag(I8086_TAG); // devices - AM9517A(config, m_dmac, 4000000); + AM9517A(config, m_dmac, XTAL::u(4000000)); m_dmac->out_hreq_callback().set(FUNC(wangpc_state::hrq_w)); m_dmac->out_eop_callback().set(FUNC(wangpc_state::eop_w)); m_dmac->in_memr_callback().set(FUNC(wangpc_state::memr_r)); @@ -1294,16 +1294,16 @@ void wangpc_state::wangpc(machine_config &config) m_dmac->out_dack_callback<2>().set(FUNC(wangpc_state::dack2_w)); m_dmac->out_dack_callback<3>().set(FUNC(wangpc_state::dack3_w)); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - I8255A(config, m_ppi, 0); + I8255A(config, m_ppi); m_ppi->in_pa_callback().set(FUNC(wangpc_state::ppi_pa_r)); m_ppi->in_pb_callback().set(FUNC(wangpc_state::ppi_pb_r)); m_ppi->in_pc_callback().set(FUNC(wangpc_state::ppi_pc_r)); m_ppi->out_pc_callback().set(FUNC(wangpc_state::ppi_pc_w)); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<0>(500000); m_pit->out_handler<0>().set(m_pic, FUNC(pic8259_device::ir0_w)); m_pit->set_clk<1>(2000000); @@ -1315,14 +1315,14 @@ void wangpc_state::wangpc(machine_config &config) m_uart->dr_callback().set(FUNC(wangpc_state::uart_dr_w)); m_uart->tbre_callback().set(FUNC(wangpc_state::uart_tbre_w)); - SCN2661C(config, m_epci, 5'068'800); + SCN2661C(config, m_epci, XTAL::u(5'068'800)); m_epci->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd)); m_epci->rxrdy_handler().set(FUNC(wangpc_state::epci_irq_w)); m_epci->rts_handler().set(RS232_TAG, FUNC(rs232_port_device::write_rts)); m_epci->dtr_handler().set(RS232_TAG, FUNC(rs232_port_device::write_dtr)); m_epci->txemt_dschg_handler().set(FUNC(wangpc_state::epci_irq_w)); - UPD765A(config, m_fdc, 8'000'000, false, false); + UPD765A(config, m_fdc, XTAL::u(8'000'000), false, false); m_fdc->intrq_wr_callback().set(FUNC(wangpc_state::fdc_irq)); m_fdc->drq_wr_callback().set(FUNC(wangpc_state::fdc_drq)); FLOPPY_CONNECTOR(config, UPD765_TAG ":0", wangpc_floppies, "525dd", floppy_image_device::default_pc_floppy_formats); @@ -1349,7 +1349,7 @@ void wangpc_state::wangpc(machine_config &config) WANGPC_KEYBOARD(config, "wangpckb").txd_handler().set(m_uart, FUNC(im6402_device::write_rri)); // bus - WANGPC_BUS(config, m_bus, 0); + WANGPC_BUS(config, m_bus); m_bus->irq2_wr_callback().set(FUNC(wangpc_state::bus_irq2_w)); m_bus->irq3_wr_callback().set(m_pic, FUNC(pic8259_device::ir3_w)); m_bus->irq4_wr_callback().set(m_pic, FUNC(pic8259_device::ir4_w)); diff --git a/src/mame/wang/wangpckb.cpp b/src/mame/wang/wangpckb.cpp index 7e77c60829a..295ee9c9f08 100644 --- a/src/mame/wang/wangpckb.cpp +++ b/src/mame/wang/wangpckb.cpp @@ -125,7 +125,7 @@ void wangpc_keyboard_device::device_add_mconfig(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76496(config, SN76496_TAG, 2000000).add_route(ALL_OUTPUTS, "mono", 1.00); // ??? + SN76496(config, SN76496_TAG, XTAL::u(2000000)).add_route(ALL_OUTPUTS, "mono", 1.00); // ??? } @@ -367,7 +367,7 @@ ioport_constructor wangpc_keyboard_device::device_input_ports() const // wangpc_keyboard_device - constructor //------------------------------------------------- -wangpc_keyboard_device::wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wangpc_keyboard_device::wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WANGPC_KEYBOARD, tag, owner, clock), device_serial_interface(mconfig, *this), m_maincpu(*this, I8051_TAG), @@ -391,8 +391,8 @@ void wangpc_keyboard_device::device_start() set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); - set_rcv_rate(62500); - //set_tra_rate(62500); + set_rcv_rate(XTAL::u(62500)); + //set_tra_rate(XTAL::u(62500)); save_item(NAME(m_keylatch)); save_item(NAME(m_rxd)); diff --git a/src/mame/wang/wangpckb.h b/src/mame/wang/wangpckb.h index 2f8cc338dc7..3477a4cff2c 100644 --- a/src/mame/wang/wangpckb.h +++ b/src/mame/wang/wangpckb.h @@ -28,7 +28,7 @@ class wangpc_keyboard_device : public device_t, public device_serial_interface { public: // construction/destruction - wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + wangpc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto txd_handler() { return m_txd_handler.bind(); } diff --git a/src/mame/wavemate/bullet.cpp b/src/mame/wavemate/bullet.cpp index 58b141abc89..e137972554a 100644 --- a/src/mame/wavemate/bullet.cpp +++ b/src/mame/wavemate/bullet.cpp @@ -1256,7 +1256,7 @@ void bulletf_state::bulletf(machine_config &config) rs232_port_device &rs232b(RS232_PORT(config, RS232_B_TAG, default_rs232_devices, nullptr)); rs232b.rxd_handler().set(m_dart, FUNC(z80dart_device::rxb_w)); - SCSI_PORT(config, m_scsibus, 0); + SCSI_PORT(config, m_scsibus); m_scsibus->bsy_handler().set(m_scsi_ctrl_in, FUNC(input_buffer_device::write_bit3)); m_scsibus->msg_handler().set(m_scsi_ctrl_in, FUNC(input_buffer_device::write_bit4)); m_scsibus->cd_handler().set(m_scsi_ctrl_in, FUNC(input_buffer_device::write_bit5)); diff --git a/src/mame/wavemate/jupiter.cpp b/src/mame/wavemate/jupiter.cpp index d67cde256b0..49e5b980806 100644 --- a/src/mame/wavemate/jupiter.cpp +++ b/src/mame/wavemate/jupiter.cpp @@ -294,11 +294,11 @@ void jupiter3_state::machine_reset() void jupiter2_state::jupiter2(machine_config &config) { // basic machine hardware - M6800(config, m_maincpu, 2000000); + M6800(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &jupiter2_state::jupiter2_mem); // devices - FD1771(config, INS1771N1_TAG, 1000000); + FD1771(config, INS1771N1_TAG, XTAL::u(1000000)); FLOPPY_CONNECTOR(config, INS1771N1_TAG":0", jupiter_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, INS1771N1_TAG":1", jupiter_floppies, nullptr, floppy_image_device::default_mfm_floppy_formats); @@ -330,7 +330,7 @@ void jupiter2_state::jupiter2(machine_config &config) void jupiter3_state::jupiter3(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 4000000); + Z80(config, m_maincpu, XTAL::u(4000000)); m_maincpu->set_addrmap(AS_PROGRAM, &jupiter3_state::jupiter3_mem); m_maincpu->set_addrmap(AS_IO, &jupiter3_state::jupiter3_io); @@ -346,11 +346,11 @@ void jupiter3_state::jupiter3(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME); // devices - FD1771(config, INS1771N1_TAG, 1000000); + FD1771(config, INS1771N1_TAG, XTAL::u(1000000)); FLOPPY_CONNECTOR(config, INS1771N1_TAG":0", jupiter_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, INS1771N1_TAG":1", jupiter_floppies, nullptr, floppy_image_device::default_mfm_floppy_formats); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(jupiter3_state::kbd_put)); // internal ram diff --git a/src/mame/westinghouse/testconsole.cpp b/src/mame/westinghouse/testconsole.cpp index dc4d75a451f..1c5785892f4 100644 --- a/src/mame/westinghouse/testconsole.cpp +++ b/src/mame/westinghouse/testconsole.cpp @@ -183,7 +183,7 @@ void whouse_testcons_state::whousetc(machine_config &config) I8155(config, "i8155", 6.144_MHz_XTAL); - I8255(config, "i8255", 0); + I8255(config, "i8255"); DL1416B(config, m_dsp[0], u32(0)); m_dsp[0]->update().set(FUNC(whouse_testcons_state::update_dsp<0>)); diff --git a/src/mame/wing/luckgrln.cpp b/src/mame/wing/luckgrln.cpp index 91ebc1363c9..cca820130e4 100644 --- a/src/mame/wing/luckgrln.cpp +++ b/src/mame/wing/luckgrln.cpp @@ -853,7 +853,7 @@ INTERRUPT_GEN_MEMBER(luckgrln_state::irq) void luckgrln_state::luckgrln(machine_config &config) { - HD647180X(config, m_maincpu, 16000000); + HD647180X(config, m_maincpu, XTAL::u(16000000)); m_maincpu->set_addrmap(AS_PROGRAM, &luckgrln_state::mainmap); m_maincpu->set_addrmap(AS_IO, &luckgrln_state::luckgrln_io); m_maincpu->set_vblank_int("screen", FUNC(luckgrln_state::irq)); @@ -864,7 +864,7 @@ void luckgrln_state::luckgrln(machine_config &config) crtc.set_show_border_area(false); crtc.set_char_width(8); - MSM6242(config, "rtc", 0); + MSM6242(config, "rtc"); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(12_MHz_XTAL, 752, 0, 512, 274, 0, 256); diff --git a/src/mame/wing/pinkiri8.cpp b/src/mame/wing/pinkiri8.cpp index 6e0a5c9cf0a..7883965e7cf 100644 --- a/src/mame/wing/pinkiri8.cpp +++ b/src/mame/wing/pinkiri8.cpp @@ -49,7 +49,7 @@ Dumped by Chackn class janshi_vdp_device : public device_t, public device_memory_interface { public: - janshi_vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + janshi_vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); @@ -152,7 +152,7 @@ void janshi_vdp_device::map(address_map &map) DEFINE_DEVICE_TYPE(JANSHIVDP, janshi_vdp_device, "janshi_vdp", "Janshi VDP") -janshi_vdp_device::janshi_vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +janshi_vdp_device::janshi_vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, JANSHIVDP, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("janshi_vdp", ENDIANNESS_LITTLE, 8,24, 0, address_map_constructor(FUNC(janshi_vdp_device::map), this)) @@ -1132,12 +1132,12 @@ void pinkiri8_state::pinkiri8(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pinkiri8); PALETTE(config, m_palette).set_entries(0x2000); - JANSHIVDP(config, m_vdp, 0); + JANSHIVDP(config, m_vdp); /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", XTAL::u(1056000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.5); // clock frequency & pin 7 not verified } void pinkiri8_state::ronjan(machine_config &config) diff --git a/src/mame/wyse/wy50kb.cpp b/src/mame/wyse/wy50kb.cpp index 0a7533fa7c2..b3fd9882ef8 100644 --- a/src/mame/wyse/wy50kb.cpp +++ b/src/mame/wyse/wy50kb.cpp @@ -38,18 +38,18 @@ DEFINE_DEVICE_TYPE(WY50_KEYBOARD, wy50_keyboard_device, "wy50kb", "WY-50 Keyboar DEFINE_DEVICE_TYPE(WY100_KEYBOARD, wy100_keyboard_device, "wy100kb", "WY-100 Keyboard") wyse_parallel_keyboard_device::wyse_parallel_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner) - : device_t(mconfig, type, tag, owner, 0U) + : device_t(mconfig, type, tag, owner) , m_key_matrix(*this, "COL%u", 0U) , m_address(0) { } -wy50_keyboard_device::wy50_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +wy50_keyboard_device::wy50_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wyse_parallel_keyboard_device(mconfig, WY50_KEYBOARD, tag, owner) { } -wy100_keyboard_device::wy100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +wy100_keyboard_device::wy100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wyse_parallel_keyboard_device(mconfig, WY100_KEYBOARD, tag, owner) { } diff --git a/src/mame/wyse/wy50kb.h b/src/mame/wyse/wy50kb.h index 399596432f8..cc9ee6a407c 100644 --- a/src/mame/wyse/wy50kb.h +++ b/src/mame/wyse/wy50kb.h @@ -26,7 +26,7 @@ private: class wy50_keyboard_device : public wyse_parallel_keyboard_device { public: - wy50_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + wy50_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual ioport_constructor device_input_ports() const override; @@ -35,7 +35,7 @@ protected: class wy100_keyboard_device : public wyse_parallel_keyboard_device { public: - wy100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + wy100_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/xerox/alto2.cpp b/src/mame/xerox/alto2.cpp index 8ba13e2ef74..397421fa7d7 100644 --- a/src/mame/xerox/alto2.cpp +++ b/src/mame/xerox/alto2.cpp @@ -292,8 +292,8 @@ void alto2_state::alto2(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.80); - DIABLO_HD(config, DIABLO_HD_0, 3333333); - DIABLO_HD(config, DIABLO_HD_1, 3333333); + DIABLO_HD(config, DIABLO_HD_0, XTAL::u(3333333)); + DIABLO_HD(config, DIABLO_HD_1, XTAL::u(3333333)); } void alto2_state::driver_start() diff --git a/src/mame/xerox/bigbord2.cpp b/src/mame/xerox/bigbord2.cpp index 03a7d60a47d..ddfe7ee9fbb 100644 --- a/src/mame/xerox/bigbord2.cpp +++ b/src/mame/xerox/bigbord2.cpp @@ -646,7 +646,7 @@ void bigbord2_state::bigbord2(machine_config &config) // d0=to U42; d1=DECODE; d3=PGM; d4=VPPENB; d5=STD-B8 proglatch.q_out_cb<6>().set("outlatch1", FUNC(ls259_device::clear_w)); // FCRST - also resets the 8877 - LS259(config, m_syslatch1, 0); // U14 + LS259(config, m_syslatch1); // U14 m_syslatch1->q_out_cb<0>().set_membank(m_bankr); // D_S m_syslatch1->q_out_cb<0>().append_membank(m_bankv); m_syslatch1->q_out_cb<0>().append_membank(m_banka); @@ -661,15 +661,15 @@ void bigbord2_state::bigbord2(machine_config &config) m_syslatch1->q_out_cb<6>().set(FUNC(bigbord2_state::disk_motor_w)); // MOTOR m_syslatch1->q_out_cb<7>().set("beeper", FUNC(beep_device::set_state)); // BELL - LS259(config, "outlatch1", 0); // U96 + LS259(config, "outlatch1"); // U96 /* keyboard */ - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(bigbord2_state::kbd_put)); /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, "beeper", 950).add_route(ALL_OUTPUTS, "mono", 0.50); // actual frequency is unknown + BEEP(config, "beeper", XTAL::u(950)).add_route(ALL_OUTPUTS, "mono", 0.50); // actual frequency is unknown } diff --git a/src/mame/xerox/notetaker.cpp b/src/mame/xerox/notetaker.cpp index 8e5aa1f9585..efac2d2b6c8 100644 --- a/src/mame/xerox/notetaker.cpp +++ b/src/mame/xerox/notetaker.cpp @@ -830,7 +830,7 @@ void notetaker_state::notetakr(machine_config &config) m_iop_cpu->set_addrmap(AS_IO, ¬etaker_state::iop_io); m_iop_cpu->set_irq_acknowledge_callback("iop_pic8259", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_iop_pic, 0); // iP8259A-2 @ E6 + PIC8259(config, m_iop_pic); // iP8259A-2 @ E6 m_iop_pic->out_int_callback().set_inputline(m_iop_cpu, 0); /* Emulator CPU: 8086@5MHz */ @@ -840,7 +840,7 @@ void notetaker_state::notetakr(machine_config &config) m_ep_cpu->set_addrmap(AS_IO, ¬etaker_state::ep_io); m_ep_cpu->set_irq_acknowledge_callback("ep_pic8259", FUNC(pic8259_device::inta_cb)); - PIC8259(config, m_ep_pic, 0); // iP8259A-2 @ E6 + PIC8259(config, m_ep_pic); // iP8259A-2 @ E6 m_ep_pic->out_int_callback().set_inputline(m_ep_cpu, 0); /* video hardware */ @@ -894,7 +894,7 @@ void notetaker_state::notetakr(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); // TODO: hook DAC up to two HA2425 (sample and hold) chips and hook those up to the speakers - DAC1200(config, m_dac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + DAC1200(config, m_dac).add_route(ALL_OUTPUTS, "lspeaker", 0.5).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC } void notetaker_state::driver_start() diff --git a/src/mame/xerox/x820kb.cpp b/src/mame/xerox/x820kb.cpp index de9a11e356c..337018f611a 100644 --- a/src/mame/xerox/x820kb.cpp +++ b/src/mame/xerox/x820kb.cpp @@ -242,7 +242,7 @@ ioport_constructor xerox_820_keyboard_device::device_input_ports() const // xerox_820_keyboard_device - constructor //------------------------------------------------- -xerox_820_keyboard_device::xerox_820_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xerox_820_keyboard_device::xerox_820_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, XEROX_820_KEYBOARD, tag, owner, clock), m_maincpu(*this, I8748_TAG), m_y(*this, "Y%u", 0), diff --git a/src/mame/xerox/x820kb.h b/src/mame/xerox/x820kb.h index 34660f104c7..e661313b231 100644 --- a/src/mame/xerox/x820kb.h +++ b/src/mame/xerox/x820kb.h @@ -24,7 +24,7 @@ class xerox_820_keyboard_device : public device_t { public: // construction/destruction - xerox_820_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xerox_820_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto kbstb_wr_callback() { return m_kbstb_cb.bind(); } diff --git a/src/mame/xerox/xerox820.cpp b/src/mame/xerox/xerox820.cpp index 157dfccf239..81763144f89 100644 --- a/src/mame/xerox/xerox820.cpp +++ b/src/mame/xerox/xerox820.cpp @@ -651,7 +651,7 @@ void xerox820_state::xerox820(machine_config &config) dbrg.fr_handler().append(m_sio, FUNC(z80sio_device::txca_w)); dbrg.ft_handler().set(m_sio, FUNC(z80sio_device::rxtxcb_w)); - XEROX_820_KEYBOARD(config, m_kb, 0); + XEROX_820_KEYBOARD(config, m_kb); m_kb->kbstb_wr_callback().set(m_kbpio, FUNC(z80pio_device::strobe_b)); // software lists @@ -664,7 +664,7 @@ void bigboard_state::bigboard(machine_config &config) xerox820(config); /* sound hardware */ SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 950).add_route(ALL_OUTPUTS, "mono", 1.00); /* bigboard only */ + BEEP(config, m_beeper, XTAL::u(950)).add_route(ALL_OUTPUTS, "mono", 1.00); /* bigboard only */ TIMER(config, m_beep_timer).configure_generic(FUNC(bigboard_state::beep_timer)); } @@ -742,11 +742,11 @@ void xerox820ii_state::xerox820ii(machine_config &config) dbrg.fr_handler().append(m_sio, FUNC(z80sio_device::txca_w)); dbrg.ft_handler().set(m_sio, FUNC(z80sio_device::rxtxcb_w)); - XEROX_820_KEYBOARD(config, m_kb, 0); + XEROX_820_KEYBOARD(config, m_kb); m_kb->kbstb_wr_callback().set(m_kbpio, FUNC(z80pio_device::strobe_b)); // SASI bus - SCSI_PORT(config, m_sasibus, 0); + SCSI_PORT(config, m_sasibus); m_sasibus->set_data_input_buffer("sasi_data_in"); m_sasibus->bsy_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit0)).exor(1); m_sasibus->msg_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit1)).exor(1); @@ -768,7 +768,7 @@ void xerox820ii_state::xerox820ii(machine_config &config) void xerox820ii_state::xerox168(machine_config &config) { xerox820ii(config); - i8086_cpu_device &i8086(I8086(config, I8086_TAG, 4770000)); + i8086_cpu_device &i8086(I8086(config, I8086_TAG, XTAL::u(4770000))); i8086.set_addrmap(AS_PROGRAM, &xerox820ii_state::xerox168_mem); /* internal ram */ diff --git a/src/mame/yamaha/fb01.cpp b/src/mame/yamaha/fb01.cpp index aeec3d25368..5c2ae3958e4 100644 --- a/src/mame/yamaha/fb01.cpp +++ b/src/mame/yamaha/fb01.cpp @@ -180,7 +180,7 @@ void fb01_state::fb01(machine_config &config) PALETTE(config, "palette", FUNC(fb01_state::fb01_palette), 2); - hd44780_device &hd44780(HD44780(config, "hd44780", 0)); + hd44780_device &hd44780(HD44780(config, "hd44780")); hd44780.set_lcd_size(2, 8); // 2x8 displayed as 1x16 hd44780.set_pixel_update_cb(FUNC(fb01_state::fb01_pixel_update)); diff --git a/src/mame/yamaha/mulcd.cpp b/src/mame/yamaha/mulcd.cpp index 00de220db7d..ea9162584d6 100644 --- a/src/mame/yamaha/mulcd.cpp +++ b/src/mame/yamaha/mulcd.cpp @@ -25,7 +25,7 @@ const tiny_rom_entry *mulcd_device::device_rom_region() const return ROM_NAME(mulcd); } -mulcd_device::mulcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mulcd_device::mulcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MULCD, tag, owner, clock), m_lcd(*this, "hd44780"), m_outputs(*this, "%03x.%d.%d", 0U, 0U, 0U), diff --git a/src/mame/yamaha/mulcd.h b/src/mame/yamaha/mulcd.h index 9b0f1c75447..6d79798cfe5 100644 --- a/src/mame/yamaha/mulcd.h +++ b/src/mame/yamaha/mulcd.h @@ -15,7 +15,7 @@ class mulcd_device : public device_t { public: - mulcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mulcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_contrast(u8 contrast); void set_leds(u8 leds); diff --git a/src/mame/yamaha/tg100.cpp b/src/mame/yamaha/tg100.cpp index 7747bd644dd..9e31c1e32b9 100644 --- a/src/mame/yamaha/tg100.cpp +++ b/src/mame/yamaha/tg100.cpp @@ -76,7 +76,7 @@ void tg100_state::tg100(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MULTIPCM(config, m_ymw258, 9400000); + MULTIPCM(config, m_ymw258, XTAL::u(9400000)); m_ymw258->set_addrmap(0, &tg100_state::ymw258_map); m_ymw258->add_route(0, "lspeaker", 1.0); m_ymw258->add_route(1, "rspeaker", 1.0); diff --git a/src/mame/yamaha/ymdx100.cpp b/src/mame/yamaha/ymdx100.cpp index a9b7813b425..b487ae7dcef 100644 --- a/src/mame/yamaha/ymdx100.cpp +++ b/src/mame/yamaha/ymdx100.cpp @@ -122,7 +122,7 @@ void yamaha_dx100_state::dx100(machine_config &config) PALETTE(config, "palette", FUNC(yamaha_dx100_state::palette_init), 3); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); // HD44780RA00 + hd44780_device &lcdc(HD44780(config, "lcdc")); // HD44780RA00 lcdc.set_lcd_size(2, 16); lcdc.set_pixel_update_cb(FUNC(yamaha_dx100_state::lcd_pixel_update)); diff --git a/src/mame/yamaha/ymdx11.cpp b/src/mame/yamaha/ymdx11.cpp index a4136e56e4f..cb85e94f0f4 100644 --- a/src/mame/yamaha/ymdx11.cpp +++ b/src/mame/yamaha/ymdx11.cpp @@ -112,7 +112,7 @@ void yamaha_dx11_state::dx11(machine_config &config) PALETTE(config, "palette", FUNC(yamaha_dx11_state::palette_init), 2); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(HD44780(config, "lcdc")); lcdc.set_lcd_size(2, 16); lcdc.set_pixel_update_cb(FUNC(yamaha_dx11_state::lcd_pixel_update)); diff --git a/src/mame/yamaha/ympsr340.cpp b/src/mame/yamaha/ympsr340.cpp index 3e965af04e9..d75fe51df0e 100644 --- a/src/mame/yamaha/ympsr340.cpp +++ b/src/mame/yamaha/ympsr340.cpp @@ -278,7 +278,7 @@ void psr340_state::psr340(machine_config &config) // SCI0 is externally clocked at the 31250 Hz MIDI rate m_maincpu->subdevice("sci0")->set_external_clock_period(attotime::from_hz(31250 * 16)); - KS0066_F05(config, m_lcdc, 0); + KS0066_F05(config, m_lcdc); m_lcdc->set_lcd_size(2, 40); /* video hardware */ diff --git a/src/mame/yamaha/ympsr40.cpp b/src/mame/yamaha/ympsr40.cpp index 3b14fb7cbc0..bfed9adb9c2 100644 --- a/src/mame/yamaha/ympsr40.cpp +++ b/src/mame/yamaha/ympsr40.cpp @@ -46,7 +46,7 @@ INPUT_PORTS_END void yamaha_psr40_state::psr40(machine_config &config) { - Z80(config, m_maincpu, 4'000'000); // unknown clock + Z80(config, m_maincpu, XTAL::u(4'000'000)); // unknown clock m_maincpu->set_addrmap(AS_PROGRAM, &yamaha_psr40_state::mem_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5517APL + battery? diff --git a/src/mame/yamaha/ympsr60.cpp b/src/mame/yamaha/ympsr60.cpp index 7ee7f6ec7d2..4f0fe8cbaa2 100644 --- a/src/mame/yamaha/ympsr60.cpp +++ b/src/mame/yamaha/ympsr60.cpp @@ -660,7 +660,7 @@ void psr60_state::psr_common(machine_config &config) MIXER(config, m_bbd_mixer); m_bbd_mixer->add_route(0, m_postbbd_rc, 1.0); - MN3204P(config, m_bbd, 50000); + MN3204P(config, m_bbd, XTAL::u(50000)); m_bbd->set_cv_handler(FUNC(psr60_state::cv_handler)); m_bbd->add_route(0, m_bbd_mixer, 0.5); m_bbd->add_route(1, m_bbd_mixer, 0.5); diff --git a/src/mame/yamaha/ymqy70.cpp b/src/mame/yamaha/ymqy70.cpp index 7239f5dd66a..471b3f22824 100644 --- a/src/mame/yamaha/ymqy70.cpp +++ b/src/mame/yamaha/ymqy70.cpp @@ -169,7 +169,7 @@ void qy70_state::qy70(machine_config &config) NVRAM(config, "userdata.nv", nvram_device::DEFAULT_NONE); NVRAM(config, "workdata.nv", nvram_device::DEFAULT_NONE); - T6963C(config, m_lcdc, 0); + T6963C(config, m_lcdc); m_lcdc->set_addrmap(0, &qy70_state::lcd_map); m_lcdc->set_fs(2); m_lcdc->set_md(8); diff --git a/src/mame/yamaha/ymrx15.cpp b/src/mame/yamaha/ymrx15.cpp index 3c0afffad00..58fb5819741 100644 --- a/src/mame/yamaha/ymrx15.cpp +++ b/src/mame/yamaha/ymrx15.cpp @@ -77,7 +77,7 @@ void rx15_state::rx15(machine_config &config) PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(HD44780(config, "lcdc")); lcdc.set_lcd_size(2, 8); lcdc.set_pixel_update_cb(FUNC(rx15_state::pixel_update)); diff --git a/src/mame/yamaha/ymtx81z.cpp b/src/mame/yamaha/ymtx81z.cpp index e237f4493ec..3154bdba3be 100644 --- a/src/mame/yamaha/ymtx81z.cpp +++ b/src/mame/yamaha/ymtx81z.cpp @@ -155,7 +155,7 @@ void ymtx81z_state::tx81z(machine_config &config) config.set_default_layout(layout_tx81z); - hd44780_device &lcdc(HD44780(config, "lcdc", 0)); + hd44780_device &lcdc(HD44780(config, "lcdc")); lcdc.set_lcd_size(2, 16); lcdc.set_pixel_update_cb(FUNC(ymtx81z_state::lcd_pixel_update)); diff --git a/src/mame/yunsung/nmg5.cpp b/src/mame/yunsung/nmg5.cpp index 01651c2165c..050528ce4bc 100644 --- a/src/mame/yunsung/nmg5.cpp +++ b/src/mame/yunsung/nmg5.cpp @@ -985,11 +985,11 @@ void nmg5_state::machine_reset() void nmg5_state::nmg5(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, 16000000); /* 16 MHz */ + M68000(config, m_maincpu, XTAL::u(16000000)); /* 16 MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &nmg5_state::nmg5_map); m_maincpu->set_vblank_int("screen", FUNC(nmg5_state::irq6_line_hold)); - Z80(config, m_soundcpu, 4000000); /* 4 MHz */ + Z80(config, m_soundcpu, XTAL::u(4000000)); /* 4 MHz */ m_soundcpu->set_addrmap(AS_PROGRAM, &nmg5_state::nmg5_sound_map); m_soundcpu->set_addrmap(AS_IO, &nmg5_state::sound_io_map); @@ -1005,7 +1005,7 @@ void nmg5_state::nmg5(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_nmg5); PALETTE(config, "palette").set_format(palette_device::xBGR_555, 0x400); - DECO_SPRITE(config, m_sprgen, 0); + DECO_SPRITE(config, m_sprgen); m_sprgen->set_gfx_region(1); m_sprgen->set_is_bootleg(true); m_sprgen->set_flipallx(1); @@ -1017,11 +1017,11 @@ void nmg5_state::nmg5(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - ym3812_device &ymsnd(YM3812(config, "ymsnd", 4000000)); /* 4MHz */ + ym3812_device &ymsnd(YM3812(config, "ymsnd", XTAL::u(4000000))); /* 4MHz */ ymsnd.irq_handler().set_inputline(m_soundcpu, 0); ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0); - OKIM6295(config, m_oki, 1000000 , okim6295_device::PIN7_HIGH); + OKIM6295(config, m_oki, XTAL::u(1000000) , okim6295_device::PIN7_HIGH); m_oki->add_route(ALL_OUTPUTS, "mono", 1.0); } diff --git a/src/mame/yunsung/yunsung8.cpp b/src/mame/yunsung/yunsung8.cpp index 73ad419d871..01a0b1c418b 100644 --- a/src/mame/yunsung/yunsung8.cpp +++ b/src/mame/yunsung/yunsung8.cpp @@ -616,7 +616,7 @@ void yunsung8_state::yunsung8(machine_config &config) ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 1.0); ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 1.0); - LS157(config, m_adpcm_select, 0); + LS157(config, m_adpcm_select); m_adpcm_select->out_callback().set("msm", FUNC(msm5205_device::data_w)); MSM5205(config, m_msm, XTAL(400'000)); // verified on PCB diff --git a/src/mame/zaccaria/seabattl.cpp b/src/mame/zaccaria/seabattl.cpp index 6b8456e9118..0b6972aed4a 100644 --- a/src/mame/zaccaria/seabattl.cpp +++ b/src/mame/zaccaria/seabattl.cpp @@ -477,16 +477,16 @@ void seabattl_state::seabattl(machine_config &config) m_maincpu->set_vblank_int("screen", FUNC(seabattl_state::seabattl_interrupt)); m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank)); m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; }); - S2636(config, m_s2636, 0); + S2636(config, m_s2636); m_s2636->set_offsets(-13, -29); m_s2636->add_route(ALL_OUTPUTS, "mono", 0.10); - DM9368(config, m_digits[0], 0).update_cb().set(FUNC(seabattl_state::digit_w<0>)); - DM9368(config, m_digits[1], 0).update_cb().set(FUNC(seabattl_state::digit_w<1>)); - DM9368(config, m_digits[2], 0).update_cb().set(FUNC(seabattl_state::digit_w<2>)); - DM9368(config, m_digits[3], 0).update_cb().set(FUNC(seabattl_state::digit_w<3>)); - DM9368(config, m_digits[4], 0).update_cb().set(FUNC(seabattl_state::digit_w<4>)); - DM9368(config, m_digits[5], 0).update_cb().set(FUNC(seabattl_state::digit_w<5>)); + DM9368(config, m_digits[0]).update_cb().set(FUNC(seabattl_state::digit_w<0>)); + DM9368(config, m_digits[1]).update_cb().set(FUNC(seabattl_state::digit_w<1>)); + DM9368(config, m_digits[2]).update_cb().set(FUNC(seabattl_state::digit_w<2>)); + DM9368(config, m_digits[3]).update_cb().set(FUNC(seabattl_state::digit_w<3>)); + DM9368(config, m_digits[4]).update_cb().set(FUNC(seabattl_state::digit_w<4>)); + DM9368(config, m_digits[5]).update_cb().set(FUNC(seabattl_state::digit_w<5>)); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/mame/zaccaria/zac2650.cpp b/src/mame/zaccaria/zac2650.cpp index e7cbf477dbb..98e0578a235 100644 --- a/src/mame/zaccaria/zac2650.cpp +++ b/src/mame/zaccaria/zac2650.cpp @@ -252,7 +252,7 @@ void zac2650_state::tinvader(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - S2636(config, m_s2636, 0).add_route(ALL_OUTPUTS, "mono", 0.25); + S2636(config, m_s2636).add_route(ALL_OUTPUTS, "mono", 0.25); } void zac2650_state::tinvader_sound_w(uint8_t data) diff --git a/src/mame/zaccaria/zaccaria_a.cpp b/src/mame/zaccaria/zaccaria_a.cpp index 080b00741e4..ed1d0c59e30 100644 --- a/src/mame/zaccaria/zaccaria_a.cpp +++ b/src/mame/zaccaria/zaccaria_a.cpp @@ -235,7 +235,7 @@ void zac1b111xx_melody_base::device_add_mconfig(machine_config &config) clock_device &timebase(CLOCK(config, "timebase", XTAL(3'579'545)/4096/2)); // CPU clock divided using 4040 and half of 74LS74 timebase.signal_handler().set(m_melodypia, FUNC(pia6821_device::cb1_w)); - PIA6821(config, m_melodypia, 0); + PIA6821(config, m_melodypia); m_melodypia->readpa_handler().set(FUNC(zac1b111xx_melody_base::melodypia_porta_r)); m_melodypia->writepa_handler().set(FUNC(zac1b111xx_melody_base::melodypia_porta_w)); m_melodypia->writepb_handler().set(FUNC(zac1b111xx_melody_base::melodypia_portb_w)); @@ -264,7 +264,7 @@ void zac1b111xx_melody_base::device_reset() // 1B11107-SPECIFIC IMPLEMENTATION //************************************************************************** -zac1b11107_audio_device::zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +zac1b11107_audio_device::zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11107, tag, owner, clock) { } @@ -326,7 +326,7 @@ void zac1b11107_audio_device::device_add_mconfig(machine_config &config) // 1B11142-SPECIFIC IMPLEMENTATION //************************************************************************** -zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11142, tag, owner, clock) , m_acs_cb(*this) , m_audiocpu(*this, "audiocpu") @@ -430,22 +430,22 @@ void zac1b11142_audio_device::device_add_mconfig(machine_config &config) M6802(config, m_audiocpu, XTAL(3'579'545)); // verified on pcb m_audiocpu->set_addrmap(AS_PROGRAM, &zac1b11142_audio_device::zac1b11142_audio_map); - PIA6821(config, m_pia_1i, 0); + PIA6821(config, m_pia_1i); m_pia_1i->readpa_handler().set(m_speech, FUNC(tms5220_device::status_r)); m_pia_1i->writepa_handler().set(m_speech, FUNC(tms5220_device::data_w)); m_pia_1i->writepb_handler().set(FUNC(zac1b11142_audio_device::pia_1i_portb_w)); - //MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 0.30, AUTO_ALLOC_INPUT, 0); // mc1408.1f - MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "sound_nl", 1.0, 7); // mc1408.1f + //MC1408(config, "dac").add_route(ALL_OUTPUTS, *this, 0.30, AUTO_ALLOC_INPUT, 0); // mc1408.1f + MC1408(config, "dac").add_route(ALL_OUTPUTS, "sound_nl", 1.0, 7); // mc1408.1f // There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) // 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz - TMS5200(config, m_speech, 649200); // ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that) + TMS5200(config, m_speech, XTAL::u(649200)); // ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that) m_speech->irq_cb().set(m_pia_1i, FUNC(pia6821_device::cb1_w)); m_speech->ready_cb().set(m_pia_1i, FUNC(pia6821_device::ca2_w)); m_speech->add_route(0, "sound_nl", 1.0, 6); - NETLIST_SOUND(config, "sound_nl", 48000) + NETLIST_SOUND(config, "sound_nl", XTAL::u(48000)) .set_source(netlist_zac1b11142) .add_route(ALL_OUTPUTS, *this, 1.0, AUTO_ALLOC_INPUT, 0); diff --git a/src/mame/zaccaria/zaccaria_a.h b/src/mame/zaccaria/zaccaria_a.h index fe903a405cf..8471b89f4ad 100644 --- a/src/mame/zaccaria/zaccaria_a.h +++ b/src/mame/zaccaria/zaccaria_a.h @@ -55,7 +55,7 @@ protected: class zac1b11107_audio_device : public zac1b111xx_melody_base { public: - zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // host interface void sound_w(u8 data); @@ -76,7 +76,7 @@ class zac1b11142_audio_device : public zac1b111xx_melody_base public: auto acs_cb() { return m_acs_cb.bind(); } - zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // host interface void hs_w(u8 data); diff --git a/src/mame/zenith/z100.cpp b/src/mame/zenith/z100.cpp index 52b5313a38c..882400127ee 100644 --- a/src/mame/zenith/z100.cpp +++ b/src/mame/zenith/z100.cpp @@ -784,7 +784,7 @@ void z100_state::z100(machine_config &config) m_keybeep->out_cb().set(FUNC(z100_state::beep_update)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 1'000'000'000 / PERIOD_OF_555_ASTABLE_NSEC(RES_K(470), RES_K(470), CAP_U(.001))); + BEEP(config, m_beeper, XTAL::u(1'000'000'000) / PERIOD_OF_555_ASTABLE_NSEC(RES_K(470), RES_K(470), CAP_U(.001))); m_beeper->add_route(ALL_OUTPUTS, "mono", 0.50); /* video hardware */ diff --git a/src/mame/zpa/iq151.cpp b/src/mame/zpa/iq151.cpp index a8c2a22e745..e290a184175 100644 --- a/src/mame/zpa/iq151.cpp +++ b/src/mame/zpa/iq151.cpp @@ -412,7 +412,7 @@ void iq151_state::iq151(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set_inputline(m_maincpu, 0); i8255_device &ppi(I8255(config, "ppi8255")); diff --git a/src/mame/zvt/pp01.cpp b/src/mame/zvt/pp01.cpp index 2e66f7c0fdd..0b7a5c3d163 100644 --- a/src/mame/zvt/pp01.cpp +++ b/src/mame/zvt/pp01.cpp @@ -185,7 +185,7 @@ INPUT_PORTS_END void pp01_state::pp01(machine_config &config) { /* basic machine hardware */ - I8080(config, m_maincpu, 2000000); + I8080(config, m_maincpu, XTAL::u(2000000)); m_maincpu->set_addrmap(AS_PROGRAM, &pp01_state::mem_map); m_maincpu->set_addrmap(AS_IO, &pp01_state::io_map); @@ -205,12 +205,12 @@ void pp01_state::pp01(machine_config &config) SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); /* Devices */ - I8251(config, m_uart, 2000000); + I8251(config, m_uart, XTAL::u(2000000)); m_uart->txd_handler().set([this] (bool state) { m_txd = state; }); m_uart->txempty_handler().set([this] (bool state) { m_txe = state; }); m_uart->rts_handler().set([this] (bool state) { m_rts = state; }); - PIT8253(config, m_pit, 0); + PIT8253(config, m_pit); m_pit->set_clk<2>(2000000); m_pit->out_handler<2>().set(FUNC(pp01_state::z2_w)); diff --git a/src/osd/modules/render/aviwrite.cpp b/src/osd/modules/render/aviwrite.cpp index e86d8f99ba6..381f064e4cb 100644 --- a/src/osd/modules/render/aviwrite.cpp +++ b/src/osd/modules/render/aviwrite.cpp @@ -69,12 +69,12 @@ void avi_write::begin_avi_recording(std::string_view name) info.video_depth = 24; info.audio_format = 0; - info.audio_timescale = m_machine.sample_rate(); + info.audio_timescale = m_machine.sample_rate().value(); info.audio_sampletime = 1; info.audio_numsamples = 0; info.audio_channels = 2; info.audio_samplebits = 16; - info.audio_samplerate = m_machine.sample_rate(); + info.audio_samplerate = m_machine.sample_rate().value(); // compute the frame time m_frame_period = attotime::from_seconds(1000) / info.video_timescale; -- cgit v1.2.3-70-g09d2